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.
@@ -15,7 +15,7 @@ module.exports = {
15
15
  apps: [
16
16
  {
17
17
  name: 'dialog-survey',
18
- script: 'dist/src/server.js',
18
+ script: 'dist/server.js',
19
19
  instances: 1,
20
20
  exec_mode: 'fork',
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dialog-survey",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "type": "module",
5
5
  "description": "AI-powered interview robot that conducts async multi-turn interviews via DingTalk",
6
6
  "repository": {
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=${exec("node -e \"console.log(require('crypto').randomBytes(16).toString('hex'))\"")}`,
389
- `ADMIN_API_KEY=${exec("node -e \"console.log(require('crypto').randomBytes(16).toString('hex'))\"")}`,
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: build
523
- log("Building project...");
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(