depository-deploy 1.2.3 → 1.3.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "depository-deploy",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "description": "Depository document management system – deployment wizard and installers",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -25,9 +25,9 @@
25
25
  "scripts/publish.mjs"
26
26
  ],
27
27
  "optionalDependencies": {
28
- "depository-deploy-linux": "1.2.3",
29
- "depository-deploy-macos": "1.2.3",
30
- "depository-deploy-windows": "1.2.3"
28
+ "depository-deploy-linux": "1.3.0",
29
+ "depository-deploy-macos": "1.3.0",
30
+ "depository-deploy-windows": "1.3.0"
31
31
  },
32
32
  "scripts": {
33
33
  "start": "node wizard-server.mjs"
package/wizard-server.mjs CHANGED
@@ -347,13 +347,14 @@ const server = createServer((req, res) => {
347
347
  for (const sub of job.subs) sendSSE(sub, 'line', { text });
348
348
  }
349
349
 
350
- const cmd = ['npm', ['install', '-g', `${PKG_NAME}@latest`]];
350
+ const npmBin = os.platform() === 'win32' ? 'npm.cmd' : 'npm';
351
+ const npmArgs = ['install', '-g', `${PKG_NAME}@latest`];
351
352
 
352
353
  pushLine(`Updating ${PKG_NAME} → latest...`);
353
- pushLine(`Running: ${cmd[0]} ${cmd[1].join(' ')}`);
354
+ pushLine(`Running: npm ${npmArgs.join(' ')}`);
354
355
 
355
- const proc = spawn(cmd[0], cmd[1], {
356
- cwd: __dirname, shell: true, stdio: 'pipe',
356
+ const proc = spawn(npmBin, npmArgs, {
357
+ cwd: __dirname, shell: false, stdio: 'pipe',
357
358
  });
358
359
 
359
360
  proc.stdout.on('data', d => d.toString().split(/\r?\n/).forEach(pushLine));