dsh-nextsteps 1.4.7 → 1.4.8

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/client.js CHANGED
@@ -581,7 +581,8 @@ window.__ModuleLoader__.load({
581
581
  };
582
582
  let result = await installSpec(NPM_NAME + '@' + info.latest);
583
583
  if (result?.error?.code === 'already-installed') result = await installSpec('https://registry.npmjs.org/' + NPM_NAME + '/-/' + NPM_NAME + '-' + info.latest + '.tgz');
584
- const firstLine = () => result?.error?.diagnostic?.split(String.fromCharCode(10)).find((line) => line.trim() !== '') ?? result?.error?.code ?? result?.application;
584
+ const diagnosticLines = String(result?.error?.diagnostic ?? '').split(String.fromCharCode(10)).map((line) => line.trim()).filter((line) => line !== '');
585
+ const firstLine = () => diagnosticLines.find((line) => line.startsWith('dsh:')) ?? diagnosticLines.at(-1) ?? result?.error?.code ?? result?.application;
585
586
  const live = result?.application === 'applied';
586
587
  if (!live && result?.application !== 'restart-required' && result?.version !== info.latest) throw new Error(firstLine());
587
588
  if (result?.application === 'failed') console.warn(`dsh-nextsteps: ${info.latest} is installed; dsh could not start it before a restart: ${firstLine()}`);
@@ -0,0 +1,4 @@
1
+ - insert:
2
+ - id: dsh-nextsteps
3
+ name: 'dsh-nextsteps'
4
+ config: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-nextsteps",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -9,6 +9,7 @@
9
9
  "./package.json": "./package.json"
10
10
  },
11
11
  "files": [
12
+ "cordis.patch.yml",
12
13
  "index.js",
13
14
  "client.js",
14
15
  "lib/locale",