@sparkelf/dsh-plus 0.2.0-rc.3 → 0.2.0-rc.5

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/lib/bin.js CHANGED
@@ -177,8 +177,8 @@ function spawnServer(options) {
177
177
  env: options.env
178
178
  });
179
179
  const stream = createWriteStream(options.logPath);
180
- output.stdout?.pipe(stream);
181
- output.stderr?.pipe(stream);
180
+ output.stdout.pipe(stream);
181
+ output.stderr.pipe(stream);
182
182
  output.unref();
183
183
  if (output.pid === void 0) throw new Error("the server process did not start");
184
184
  return output.pid;
@@ -710,7 +710,7 @@ function parseStartOptions(argv) {
710
710
  foreground = true;
711
711
  continue;
712
712
  }
713
- throw new Error("unknown option: " + token);
713
+ throw new Error("unknown option: " + String(token));
714
714
  }
715
715
  return {
716
716
  port,
@@ -1010,6 +1010,8 @@ async function runStandaloneCli(argv) {
1010
1010
  }
1011
1011
  //#endregion
1012
1012
  //#region lib/types/bin.js
1013
+ /** This package's own manifest, read beside the built entry. */
1014
+ const manifestPath = fileURLToPath(new URL("../package.json", import.meta.url));
1013
1015
  /**
1014
1016
  * Dispatch the command line.
1015
1017
  *
@@ -1018,11 +1020,22 @@ async function runStandaloneCli(argv) {
1018
1020
  * one executable for both, so a user who installed the distribution from the registry
1019
1021
  * never needs to know which half owns a command.
1020
1022
  *
1023
+ * `--version` answers with the installed distribution version. The release sequence
1024
+ * drives every family's entry through it to prove an installed artifact runs and reports
1025
+ * the version its tarball carried, so the standalone installer has to answer like the
1026
+ * official launcher does.
1027
+ *
1021
1028
  * @returns the process exit code.
1022
1029
  */
1023
1030
  async function main() {
1024
1031
  const argv = process.argv.slice(2);
1025
- if (argv[0] === "apply") {
1032
+ const first = argv[0];
1033
+ if (first === "--version" || first === "-v") {
1034
+ const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
1035
+ console.log(String(manifest.version));
1036
+ return 0;
1037
+ }
1038
+ if (first === "apply") {
1026
1039
  runApply(argv);
1027
1040
  return 0;
1028
1041
  }
package/lib/types/bin.js CHANGED
@@ -1,6 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ import { readFileSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
2
4
  import { runApply } from "./apply.js";
3
5
  import { runStandaloneCli } from "./standalone-cli.js";
6
+ /** This package's own manifest, read beside the built entry. */
7
+ const manifestPath = fileURLToPath(new URL('../package.json', import.meta.url));
4
8
  /**
5
9
  * Dispatch the command line.
6
10
  *
@@ -9,11 +13,21 @@ import { runStandaloneCli } from "./standalone-cli.js";
9
13
  * one executable for both, so a user who installed the distribution from the registry
10
14
  * never needs to know which half owns a command.
11
15
  *
16
+ * `--version` answers with the installed distribution version. The release sequence
17
+ * drives every family's entry through it to prove an installed artifact runs and reports
18
+ * the version its tarball carried, so the standalone installer has to answer like the
19
+ * official launcher does.
20
+ *
12
21
  * @returns the process exit code.
13
22
  */
14
23
  async function main() {
15
24
  const argv = process.argv.slice(2);
16
25
  const first = argv[0];
26
+ if (first === '--version' || first === '-v') {
27
+ const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
28
+ console.log(String(manifest.version));
29
+ return 0;
30
+ }
17
31
  if (first === 'apply') {
18
32
  // `runApply` parses the command word itself, so it receives the arguments this
19
33
  // dispatcher already inspected rather than a slice that dropped it.
@@ -48,7 +48,7 @@ function parseStartOptions(argv) {
48
48
  foreground = true;
49
49
  continue;
50
50
  }
51
- throw new Error('unknown option: ' + token);
51
+ throw new Error('unknown option: ' + String(token));
52
52
  }
53
53
  return { port, host, open, foreground };
54
54
  }
@@ -99,8 +99,8 @@ export function spawnServer(options) {
99
99
  env: options.env,
100
100
  });
101
101
  const stream = createWriteStream(options.logPath);
102
- output.stdout?.pipe(stream);
103
- output.stderr?.pipe(stream);
102
+ output.stdout.pipe(stream);
103
+ output.stderr.pipe(stream);
104
104
  output.unref();
105
105
  if (output.pid === undefined)
106
106
  throw new Error('the server process did not start');
package/package.json CHANGED
@@ -4,20 +4,22 @@
4
4
  },
5
5
  "dependencies": {
6
6
  "@sparkelf/dsh-mobile-bridge": ">=0.2.11",
7
- "@sparkelf/dsh-patch-better-sidebar-media-path": ">=0.2.0-rc.3",
8
- "@sparkelf/dsh-patch-browser-auth-mode": ">=0.2.0-rc.3",
9
- "@sparkelf/dsh-patch-composer-popover-boundaries": ">=0.2.0-rc.3",
10
- "@sparkelf/dsh-patch-legacy-code-preset": ">=0.2.0-rc.3",
11
- "@sparkelf/dsh-patch-mobile-journal-generation": ">=0.2.0-rc.3",
12
- "@sparkelf/dsh-patch-officecli-deliverables": ">=0.2.0-rc.3",
13
- "@sparkelf/dsh-patch-ptc-mcp-schema-types": ">=0.2.0-rc.3",
14
- "@sparkelf/dsh-patch-responses-reasoning-status": ">=0.2.0-rc.3",
15
- "@sparkelf/dsh-patch-session-export-chinese": ">=0.2.0-rc.3",
16
- "@sparkelf/dsh-patch-session-format-legacy-restart": ">=0.2.0-rc.3",
17
- "@sparkelf/dsh-patch-session-log-trajectory-toolbar": ">=0.2.0-rc.3",
18
- "@sparkelf/dsh-patch-subagent-settings-presets": ">=0.2.0-rc.3",
19
- "@sparkelf/dsh-patch-web-base-path": ">=0.2.0-rc.3",
20
- "@sparkelf/dsh-patch-workspace-storage-restore": ">=0.2.0-rc.3",
7
+ "@sparkelf/dsh-patch-better-sidebar-html-preview-path": ">=0.2.0-rc.5",
8
+ "@sparkelf/dsh-patch-better-sidebar-media-path": ">=0.2.0-rc.5",
9
+ "@sparkelf/dsh-patch-browser-auth-mode": ">=0.2.0-rc.5",
10
+ "@sparkelf/dsh-patch-composer-popover-boundaries": ">=0.2.0-rc.5",
11
+ "@sparkelf/dsh-patch-legacy-code-preset": ">=0.2.0-rc.5",
12
+ "@sparkelf/dsh-patch-mobile-journal-generation": ">=0.2.0-rc.5",
13
+ "@sparkelf/dsh-patch-officecli-deliverables": ">=0.2.0-rc.5",
14
+ "@sparkelf/dsh-patch-ptc-mcp-schema-types": ">=0.2.0-rc.5",
15
+ "@sparkelf/dsh-patch-responses-reasoning-status": ">=0.2.0-rc.5",
16
+ "@sparkelf/dsh-patch-session-export-chinese": ">=0.2.0-rc.5",
17
+ "@sparkelf/dsh-patch-session-format-legacy-restart": ">=0.2.0-rc.5",
18
+ "@sparkelf/dsh-patch-session-log-trajectory-toolbar": ">=0.2.0-rc.5",
19
+ "@sparkelf/dsh-patch-subagent-settings-presets": ">=0.2.0-rc.5",
20
+ "@sparkelf/dsh-patch-web-base-path": ">=0.2.0-rc.5",
21
+ "@sparkelf/dsh-patch-workspace-storage-restore": ">=0.2.0-rc.5",
22
+ "@sparkelf/dsh-patch-wsl-native-open": ">=0.2.0-rc.5",
21
23
  "@sparkelf/dsh-plugin-backup": ">=0.1.0-rc.26",
22
24
  "@sparkelf/dsh-plugin-dataops": ">=0.1.0-rc.26",
23
25
  "@sparkelf/dsh-plugin-mcp-credentials": ">=0.1.0-rc.26",
@@ -56,7 +58,9 @@
56
58
  "@sparkelf/dsh-patch-web-base-path",
57
59
  "@sparkelf/dsh-patch-composer-popover-boundaries",
58
60
  "@sparkelf/dsh-patch-mobile-journal-generation",
59
- "@sparkelf/dsh-patch-session-format-legacy-restart"
61
+ "@sparkelf/dsh-patch-session-format-legacy-restart",
62
+ "@sparkelf/dsh-patch-wsl-native-open",
63
+ "@sparkelf/dsh-patch-better-sidebar-html-preview-path"
60
64
  ],
61
65
  "profile": {
62
66
  "allowBuilds": {
@@ -72,7 +76,9 @@
72
76
  },
73
77
  "bundles": [
74
78
  "@deepseek-ai/dsh-base",
79
+ "@deepseek-ai/dsh-experimental-agent-team-profile",
75
80
  "@deepseek-ai/dsh-web-app",
81
+ "@deepseek-ai/dsh-experimental-agent-team-web-profile",
76
82
  "@sparkelf/dsh-mineru",
77
83
  "@sparkelf/dsh-officecli",
78
84
  "@sparkelf/dsh-mobile-bridge",
@@ -90,8 +96,10 @@
90
96
  "@sparkelf/dsh-api-client"
91
97
  ],
92
98
  "dependencies": {
93
- "@changfenhuang/dsh-genui": "0.9.9",
94
- "@huanlin/dsh-plugin-better-locale": "0.4.1",
99
+ "@changfenhuang/dsh-genui": "0.11.0",
100
+ "@deepseek-ai/dsh-experimental-agent-team-profile": ">=0.1.6-alpha.1",
101
+ "@deepseek-ai/dsh-experimental-agent-team-web-profile": ">=0.1.6-alpha.1",
102
+ "@huanlin/dsh-plugin-better-locale": "0.4.3",
95
103
  "@sparkelf/dsh-api-client": "0.5.1",
96
104
  "@sparkelf/dsh-mineru": "0.1.2",
97
105
  "@sparkelf/dsh-office-viewer-fonts": "0.1.2",
@@ -167,5 +175,5 @@
167
175
  },
168
176
  "type": "module",
169
177
  "types": "lib/types/index.d.ts",
170
- "version": "0.2.0-rc.3"
178
+ "version": "0.2.0-rc.5"
171
179
  }