dsh-composition-doctor 0.1.2 → 0.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/CHANGELOG.md +17 -0
- package/README.md +23 -7
- package/README.zh.md +56 -11
- package/dist/cli/main.js +66 -18
- package/dist/client/index.js +5 -4
- package/dist/client/report-view.js +110 -11
- package/dist/client.js +112 -18
- package/dist/core/bundle-inventory.js +66 -0
- package/dist/core/composition-adapter.js +56 -9
- package/dist/core/composition-provenance.js +8 -0
- package/dist/core/diff.js +41 -36
- package/dist/core/dsh-dump-parser.js +111 -0
- package/dist/core/dsh-dump-provider.js +93 -0
- package/dist/core/package-provenance.js +80 -0
- package/dist/core/preflight/artifact-resolver.js +150 -0
- package/dist/core/preflight/candidate-artifact-resolver.js +61 -0
- package/dist/core/preflight/npm-artifact.js +132 -0
- package/dist/core/preflight/package-manager.js +4 -0
- package/dist/core/preflight/package-resolution.js +66 -0
- package/dist/core/preflight/rehearsal-profile.js +6 -0
- package/dist/core/preflight/smoke.js +1 -0
- package/dist/core/preflight.js +98 -11
- package/dist/core/profile-reader.js +16 -1
- package/dist/core/redaction.js +28 -1
- package/dist/core/rules.js +64 -12
- package/dist/core/snapshot.js +60 -46
- package/dist/plugin/index.js +16 -3
- package/dist/reports/location.js +9 -0
- package/dist/reports/markdown.js +3 -2
- package/dist/reports/schema.js +49 -0
- package/package.json +18 -10
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** JSON Schema for the report wire format. Report schemaVersion remains 1;
|
|
2
|
+
* evidenceSchemaVersion is additive and separates evidence capability names. */
|
|
3
|
+
export const analysisReportJsonSchema = {
|
|
4
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
5
|
+
type: 'object',
|
|
6
|
+
required: ['schemaVersion', 'evidenceSchemaVersion', 'generatedAt', 'profileDir', 'evidenceMode', 'runtimeObserved', 'unverifiedFindings', 'diagnostics'],
|
|
7
|
+
properties: {
|
|
8
|
+
schemaVersion: { const: 1 },
|
|
9
|
+
evidenceSchemaVersion: { const: 2 },
|
|
10
|
+
generatedAt: { type: 'string' },
|
|
11
|
+
profileDir: { type: 'string' },
|
|
12
|
+
evidenceMode: { enum: ['static', 'composed', 'runtime-observed', 'mixed'] },
|
|
13
|
+
runtimeObserved: { type: 'boolean' },
|
|
14
|
+
unverifiedFindings: { type: 'array', items: { type: 'string' } },
|
|
15
|
+
diagnostics: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: ['id', 'severity', 'title', 'evidence', 'explanation', 'remediation'],
|
|
20
|
+
properties: {
|
|
21
|
+
id: { type: 'string' },
|
|
22
|
+
severity: { enum: ['info', 'warning', 'error'] },
|
|
23
|
+
title: { type: 'string' },
|
|
24
|
+
explanation: { type: 'string' },
|
|
25
|
+
remediation: { type: 'string' },
|
|
26
|
+
evidence: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
items: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
required: ['source', 'detail', 'evidenceKind'],
|
|
31
|
+
properties: {
|
|
32
|
+
source: { type: 'string' },
|
|
33
|
+
detail: { type: 'string' },
|
|
34
|
+
evidenceKind: { enum: ['static', 'composed', 'runtime-observed'] },
|
|
35
|
+
subject: { type: 'string' },
|
|
36
|
+
packageName: { type: 'string' },
|
|
37
|
+
version: { type: 'string' },
|
|
38
|
+
severity: { enum: ['info', 'warning', 'error'] }
|
|
39
|
+
},
|
|
40
|
+
additionalProperties: false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
additionalProperties: false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
additionalProperties: true
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-composition-doctor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Read-only DSH and Cordis composition diagnostics, snapshots, diffs, and isolated preflight.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/lemonxiny55/dsh-composition-doctor.git"
|
|
10
|
+
},
|
|
7
11
|
"main": "./dist/plugin/index.js",
|
|
12
|
+
"bin": {
|
|
13
|
+
"dsh-doctor": "./dist/cli/main.js"
|
|
14
|
+
},
|
|
8
15
|
"exports": {
|
|
9
16
|
".": "./dist/plugin/index.js",
|
|
10
17
|
"./client": "./dist/client.js",
|
|
11
|
-
"./cli": "./dist/cli/main.js"
|
|
18
|
+
"./cli": "./dist/cli/main.js",
|
|
19
|
+
"./package.json": "./package.json"
|
|
12
20
|
},
|
|
13
21
|
"files": [
|
|
14
22
|
"dist",
|
|
15
23
|
"cordis.patch.yml",
|
|
16
24
|
"README.md",
|
|
17
25
|
"README.zh.md",
|
|
26
|
+
"CHANGELOG.md",
|
|
18
27
|
"LICENSE"
|
|
19
28
|
],
|
|
20
29
|
"dsh": {
|
|
@@ -36,13 +45,6 @@
|
|
|
36
45
|
"engines": {
|
|
37
46
|
"node": ">=20"
|
|
38
47
|
},
|
|
39
|
-
"packageManager": "pnpm@10.17.1",
|
|
40
|
-
"scripts": {
|
|
41
|
-
"test": "vitest run",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
43
|
-
"build": "tsc && node scripts/build-client.mjs",
|
|
44
|
-
"dsh-doctor": "node dist/cli/main.js"
|
|
45
|
-
},
|
|
46
48
|
"dependencies": {
|
|
47
49
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
48
50
|
"semver": "^7.7.2",
|
|
@@ -53,5 +55,11 @@
|
|
|
53
55
|
"esbuild": "^0.28.2",
|
|
54
56
|
"typescript": "^5.9.2",
|
|
55
57
|
"vitest": "^3.2.4"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"test": "pnpm build && vitest run",
|
|
61
|
+
"typecheck": "tsc --noEmit",
|
|
62
|
+
"build": "tsc && node scripts/build-client.mjs",
|
|
63
|
+
"dsh-doctor": "node dist/cli/main.js"
|
|
56
64
|
}
|
|
57
|
-
}
|
|
65
|
+
}
|