dialog-survey 1.6.4 → 1.6.6
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/package.json +2 -3
- package/scripts/cli.mjs +9 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dialog-survey",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI-powered interview robot that conducts async multi-turn interviews via DingTalk",
|
|
6
6
|
"repository": {
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"src/views/",
|
|
14
14
|
"public/",
|
|
15
15
|
"prisma/",
|
|
16
|
-
"ecosystem.config.cjs"
|
|
17
|
-
"package-lock.json"
|
|
16
|
+
"ecosystem.config.cjs"
|
|
18
17
|
],
|
|
19
18
|
"bin": {
|
|
20
19
|
"dialog-survey": "scripts/cli.mjs"
|
package/scripts/cli.mjs
CHANGED
|
@@ -462,7 +462,6 @@ export async function installCommand(flags) {
|
|
|
462
462
|
log("Copying package files...");
|
|
463
463
|
const filesToCopy = [
|
|
464
464
|
"package.json",
|
|
465
|
-
"package-lock.json",
|
|
466
465
|
"dist",
|
|
467
466
|
"prisma",
|
|
468
467
|
"src/views",
|
|
@@ -484,13 +483,16 @@ export async function installCommand(flags) {
|
|
|
484
483
|
await writeFile(join(INSTALL_DIR, ".env"), envContent, "utf-8");
|
|
485
484
|
log(` Created ${INSTALL_DIR}/.env`);
|
|
486
485
|
|
|
487
|
-
// Step 7: npm
|
|
488
|
-
|
|
486
|
+
// Step 7: npm install
|
|
487
|
+
// Use npm install instead of npm ci because package-lock.json is never
|
|
488
|
+
// included in npm published packages by design. npm install generates
|
|
489
|
+
// its own lock file from package.json.
|
|
490
|
+
log("Installing dependencies (npm install --omit=dev)...");
|
|
489
491
|
try {
|
|
490
|
-
exec("npm
|
|
492
|
+
exec("npm install --omit=dev --ignore-scripts", { cwd: INSTALL_DIR });
|
|
491
493
|
log(" Dependencies installed ✓");
|
|
492
494
|
} catch (err) {
|
|
493
|
-
logError(`npm
|
|
495
|
+
logError(`npm install failed: ${err.message}`);
|
|
494
496
|
process.exitCode = 1;
|
|
495
497
|
return;
|
|
496
498
|
}
|
|
@@ -517,18 +519,8 @@ export async function installCommand(flags) {
|
|
|
517
519
|
return;
|
|
518
520
|
}
|
|
519
521
|
|
|
520
|
-
// Step 10:
|
|
521
|
-
|
|
522
|
-
try {
|
|
523
|
-
exec("npm run build", { cwd: INSTALL_DIR });
|
|
524
|
-
log(" Build complete ✓");
|
|
525
|
-
} catch (err) {
|
|
526
|
-
logError(`Build failed: ${err.message}`);
|
|
527
|
-
process.exitCode = 1;
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
// Step 11: PM2 start
|
|
522
|
+
// Step 10: PM2 start
|
|
523
|
+
// Note: No build step needed — dist/ is pre-compiled in the npm package.
|
|
532
524
|
log("Starting service via PM2...");
|
|
533
525
|
try {
|
|
534
526
|
exec(
|