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 +5 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/cli/main.js +20 -2
- package/package.json +1 -1
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.
|
|
11
|
+
Current package release: `0.2.2`.
|
|
12
12
|
|
|
13
13
|
## What the model gets
|
|
14
14
|
|
package/README.zh.md
CHANGED
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
|
-
|
|
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
|
});
|