dialog-survey 1.6.5 → 1.6.7
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/ecosystem.config.cjs +1 -1
- package/package.json +1 -1
- package/scripts/cli.mjs +5 -14
package/ecosystem.config.cjs
CHANGED
package/package.json
CHANGED
package/scripts/cli.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { homedir, tmpdir } from "node:os";
|
|
|
15
15
|
import { join, dirname } from "node:path";
|
|
16
16
|
import { fileURLToPath } from "node:url";
|
|
17
17
|
import http from "node:http";
|
|
18
|
+
import crypto from "node:crypto";
|
|
18
19
|
import net from "node:net";
|
|
19
20
|
|
|
20
21
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
@@ -385,8 +386,8 @@ export function generateEnvContent(config) {
|
|
|
385
386
|
`DINGTALK_AGENT_ID=${config.DINGTALK_AGENT_ID}`,
|
|
386
387
|
"",
|
|
387
388
|
"# Security",
|
|
388
|
-
`ENCRYPTION_KEY=${
|
|
389
|
-
`ADMIN_API_KEY=${
|
|
389
|
+
`ENCRYPTION_KEY=${crypto.randomBytes(16).toString("hex")}`,
|
|
390
|
+
`ADMIN_API_KEY=${crypto.randomBytes(16).toString("hex")}`,
|
|
390
391
|
"",
|
|
391
392
|
"# Logging",
|
|
392
393
|
"LOG_LEVEL=info",
|
|
@@ -519,18 +520,8 @@ export async function installCommand(flags) {
|
|
|
519
520
|
return;
|
|
520
521
|
}
|
|
521
522
|
|
|
522
|
-
// Step 10:
|
|
523
|
-
|
|
524
|
-
try {
|
|
525
|
-
exec("npm run build", { cwd: INSTALL_DIR });
|
|
526
|
-
log(" Build complete ✓");
|
|
527
|
-
} catch (err) {
|
|
528
|
-
logError(`Build failed: ${err.message}`);
|
|
529
|
-
process.exitCode = 1;
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
// Step 11: PM2 start
|
|
523
|
+
// Step 10: PM2 start
|
|
524
|
+
// Note: No build step needed — dist/ is pre-compiled in the npm package.
|
|
534
525
|
log("Starting service via PM2...");
|
|
535
526
|
try {
|
|
536
527
|
exec(
|