dsh-composition-doctor 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ - Fixed the packaged `dsh-doctor` CLI entrypoint when pnpm's Windows shim supplies a non-canonical path.
6
+ - Added a built-entrypoint regression test covering `--version` and `--help`.
7
+
3
8
  ## 0.2.1
4
9
 
5
10
  - Fixed clean-checkout CI coverage by tracking the report schema and committed fixture packages that were previously hidden by broad ignore rules.
package/README.md CHANGED
@@ -8,7 +8,7 @@ English | [中文](README.zh.md)
8
8
 
9
9
  Composition and upgrade preflight doctor for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`). It reads an explicitly selected profile and explains observable Cordis/plugin composition risks with concrete evidence. It never edits a real profile or silently changes permissions.
10
10
 
11
- Current package release: `0.2.1`.
11
+ Current package release: `0.2.2`.
12
12
 
13
13
  ## What the model gets
14
14
 
package/README.zh.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)的组合与升级预检工具。它读取明确指定的 profile,用可追溯证据说明可观察到的 Cordis/plugin 组合风险;不会编辑真实 profile,也不会静默扩大权限。
10
10
 
11
- 当前 package release:`0.2.1`。
11
+ 当前 package release:`0.2.2`。
12
12
 
13
13
  ## 模型可用能力
14
14
 
package/dist/cli/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from 'node:url';
2
- import { readFileSync } from 'node:fs';
2
+ import { readFileSync, realpathSync } from 'node:fs';
3
3
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
4
4
  import { dirname, resolve } from 'node:path';
5
5
  import { resolveComposition } from '../core/composition-adapter.js';
@@ -174,7 +174,25 @@ export async function runCli(argv, io = { write: (line) => console.log(line) })
174
174
  return 1;
175
175
  }
176
176
  }
177
- if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
177
+ function canonicalPath(value) {
178
+ try {
179
+ return realpathSync(value);
180
+ }
181
+ catch {
182
+ return resolve(value);
183
+ }
184
+ }
185
+ function isMainModule() {
186
+ const entrypoint = process.argv[1];
187
+ if (entrypoint === undefined)
188
+ return false;
189
+ const modulePath = canonicalPath(fileURLToPath(import.meta.url));
190
+ const entrypointPath = canonicalPath(entrypoint);
191
+ return process.platform === 'win32'
192
+ ? modulePath.toLowerCase() === entrypointPath.toLowerCase()
193
+ : modulePath === entrypointPath;
194
+ }
195
+ if (isMainModule()) {
178
196
  runCli(process.argv.slice(2)).then((exitCode) => {
179
197
  process.exitCode = exitCode;
180
198
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-composition-doctor",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "Read-only DSH and Cordis composition diagnostics, snapshots, diffs, and isolated preflight.",
6
6
  "license": "MIT",