pipely-ai 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -520,7 +520,7 @@ function generateLocalEnv() {
|
|
|
520
520
|
const setupKey = randomUUID();
|
|
521
521
|
const dir = getLocalDir();
|
|
522
522
|
|
|
523
|
-
const dbPath = join(dir, "data", "pipely.db").replace(/\\/g, "/")
|
|
523
|
+
const dbPath = join(dir, "data", "pipely.db").replace(/\\/g, "/");
|
|
524
524
|
const frontendPath = join(getBundleDir(), "frontend").replace(/\\/g, "/");
|
|
525
525
|
const env = `# Pipely AI — Local Mode
|
|
526
526
|
DATABASE_URL=file:${dbPath}
|
|
@@ -611,7 +611,7 @@ async function installLocal() {
|
|
|
611
611
|
mkdirSync(join(dir, "data"), { recursive: true });
|
|
612
612
|
|
|
613
613
|
// Setup database
|
|
614
|
-
const dbPath = join(dir, "data", "pipely.db").replace(/\\/g, "/")
|
|
614
|
+
const dbPath = join(dir, "data", "pipely.db").replace(/\\/g, "/");
|
|
615
615
|
process.stdout.write(` Criando banco de dados... `);
|
|
616
616
|
try {
|
|
617
617
|
execSync("npx prisma db push", {
|
|
@@ -690,6 +690,11 @@ async function runLocal() {
|
|
|
690
690
|
|
|
691
691
|
const childEnv = { ...process.env, ...envVars };
|
|
692
692
|
|
|
693
|
+
// Copy .env to bundle subdirs so dotenv/config finds it
|
|
694
|
+
const envRaw = readFileSync(envPath, "utf-8");
|
|
695
|
+
try { writeFileSync(join(bundleDir, "server", ".env"), envRaw); } catch {}
|
|
696
|
+
try { writeFileSync(join(bundleDir, "agent", ".env"), envRaw); } catch {}
|
|
697
|
+
|
|
693
698
|
// Start server (serves frontend via SERVE_FRONTEND env)
|
|
694
699
|
const server = fork(join(bundleDir, "server/dist/index.js"), [], {
|
|
695
700
|
cwd: join(bundleDir, "server"),
|