feat: Enhance provider components with detailed documentation and comments
- Added comprehensive comments and JSDoc-style documentation to NotificationProvider, ThemeProvider, UserProvider, and WebsiteThemeProvider for better clarity and maintainability. - Improved type definitions in index.ts for better code understanding and usage. - Introduced Docker support with Dockerfiles for various services including AI server, signaling server, and browser-use service. - Created a docker-compose.yml file to orchestrate multiple services including PostgreSQL, AI, scraper, and frontend. - Added a startup guide (startup.txt) for setting up the CRM environment on Ubuntu with Docker. - Included a .dockerignore file to exclude unnecessary files from Docker builds.
This commit is contained in:
@@ -8,7 +8,9 @@ import { execSync, spawn } from "node:child_process"
|
||||
import { platform } from "node:os"
|
||||
import { statSync } from "node:fs"
|
||||
|
||||
/** Locate the Python 3 executable. Checks common install paths first, then the system PATH. */
|
||||
function detectPython() {
|
||||
// Pre-check common Windows install directories to avoid PATH lookup
|
||||
const commonPaths = [
|
||||
`${process.env.LOCALAPPDATA}\\Programs\\Python\\Python313\\python.exe`,
|
||||
`${process.env.LOCALAPPDATA}\\Programs\\Python\\Python312\\python.exe`,
|
||||
@@ -21,6 +23,7 @@ function detectPython() {
|
||||
return p
|
||||
} catch {}
|
||||
}
|
||||
// Fall back to PATH resolution (prefer python3 on Unix)
|
||||
const candidates = platform() === "win32" ? ["python", "python3"] : ["python3", "python"]
|
||||
for (const cmd of candidates) {
|
||||
try {
|
||||
@@ -42,6 +45,6 @@ if (!script) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Spawn Python with inherited stdio so the script's output is visible
|
||||
// Spawn Python with inherited stdio so the script's output is visible in real-time
|
||||
const proc = spawn(PYTHON, [script, ...args], { stdio: "inherit" })
|
||||
proc.on("exit", (code) => process.exit(code ?? 1))
|
||||
|
||||
Reference in New Issue
Block a user