depository-deploy 1.1.20 → 1.2.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.1.20",
3
+ "version": "1.2.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.1.20",
29
- "depository-deploy-macos": "1.1.20",
30
- "depository-deploy-windows": "1.1.20"
28
+ "depository-deploy-linux": "1.2.0",
29
+ "depository-deploy-macos": "1.2.0",
30
+ "depository-deploy-windows": "1.2.0"
31
31
  },
32
32
  "scripts": {
33
33
  "start": "node wizard-server.mjs"
package/wizard-server.mjs CHANGED
@@ -347,13 +347,7 @@ const server = createServer((req, res) => {
347
347
  for (const sub of job.subs) sendSSE(sub, 'line', { text });
348
348
  }
349
349
 
350
- // Detect if running via npx/global install and pick the right update command
351
- const scriptPath = process.argv[1] || '';
352
- const isGlobal = scriptPath.includes('node_modules') ||
353
- process.env.npm_config_global === 'true';
354
- const cmd = isGlobal
355
- ? ['npm', ['install', '-g', `${PKG_NAME}@latest`]]
356
- : ['npx', [`${PKG_NAME}@latest`]];
350
+ const cmd = ['npm', ['install', '-g', `${PKG_NAME}@latest`]];
357
351
 
358
352
  pushLine(`Updating ${PKG_NAME} → latest...`);
359
353
  pushLine(`Running: ${cmd[0]} ${cmd[1].join(' ')}`);
package/wizard.html CHANGED
@@ -2235,9 +2235,11 @@ async function selfUpdate() {
2235
2235
  const { id } = await r.json();
2236
2236
 
2237
2237
  // Stream the update log via SSE
2238
+ let lastLine = '';
2238
2239
  const es = new EventSource(SERVER_BASE + '/api/install-stream/' + id);
2239
2240
  es.addEventListener('line', e => {
2240
2241
  const { text } = JSON.parse(e.data);
2242
+ if (text) lastLine = text;
2241
2243
  status.textContent = text;
2242
2244
  });
2243
2245
  es.addEventListener('done', e => {
@@ -2249,7 +2251,8 @@ async function selfUpdate() {
2249
2251
  } else {
2250
2252
  btn.disabled = false;
2251
2253
  btn.textContent = t('update_btn');
2252
- status.textContent = t('update_failed');
2254
+ const hint = t('update_failed');
2255
+ status.textContent = lastLine ? `${lastLine} — ${hint}` : hint;
2253
2256
  }
2254
2257
  });
2255
2258
  es.onerror = () => {