@ankhorage/doctor 0.2.1 → 0.3.1
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 +12 -0
- package/README.md +12 -4
- package/dist/analysis.d.ts +18 -1
- package/dist/analysis.d.ts.map +1 -1
- package/dist/analysis.js +786 -57
- package/dist/analysis.js.map +1 -1
- package/dist/{ankh.provider.d.ts → cli/index.d.ts} +2 -2
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/{ankh.provider.js → cli/index.js} +16 -15
- package/dist/cli/index.js.map +1 -0
- package/dist/commands.d.ts +2 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +19 -4
- package/dist/commands.js.map +1 -1
- package/dist/diagnostics.d.ts +5 -1
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +1 -1
- package/dist/packageMetadata.js.map +1 -1
- package/dist/readme-usage.js +11 -3
- package/dist/readme-usage.js.map +1 -1
- package/package.json +7 -2
- package/src/analysis.ts +1082 -145
- package/src/{ankh.provider.ts → cli/index.ts} +12 -9
- package/src/commands.ts +22 -5
- package/src/diagnostics.ts +67 -10
- package/src/index.ts +7 -2
- package/src/packageMetadata.ts +1 -1
- package/src/readme-usage.ts +11 -3
- package/dist/ankh.provider.d.ts.map +0 -1
- package/dist/ankh.provider.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0c1f5c2: Expose the package command provider.
|
|
8
|
+
|
|
9
|
+
## 0.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0c86ddb: Add a profile-based doctor policy engine with non-mutating fix plans.
|
|
14
|
+
|
|
3
15
|
## 0.2.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# DOCTOR
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Executable doctor provider and standalone CLI for lightweight Ankhorage repo and package compliance diagnostics.
|
|
9
9
|
|
|
@@ -25,10 +25,18 @@ Current command surface:
|
|
|
25
25
|
- `repo`
|
|
26
26
|
- `package`
|
|
27
27
|
|
|
28
|
-
`doctor#
|
|
28
|
+
`doctor#2` adds a profile-based policy engine:
|
|
29
29
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
30
|
+
- strict `public-package` validation for extracted public package repos
|
|
31
|
+
- light recognized `integration-monorepo` validation for `ankhorage4`
|
|
32
|
+
- non-mutating `fix` plans for deterministic mechanical changes only
|
|
33
|
+
|
|
34
|
+
Still deferred:
|
|
35
|
+
|
|
36
|
+
- GitHub checks
|
|
37
|
+
- CI checks
|
|
38
|
+
- on-disk `fix --apply`
|
|
39
|
+
- deeper cross-repo policy enforcement
|
|
32
40
|
|
|
33
41
|
Path handling:
|
|
34
42
|
|
package/dist/analysis.d.ts
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
import type { DoctorDiagnostic } from './diagnostics.js';
|
|
1
|
+
import type { DoctorDiagnostic, DoctorPolicyProfile, DoctorRuleId } from './diagnostics.js';
|
|
2
2
|
export type DoctorTargetCheck = 'package' | 'repo';
|
|
3
3
|
export type DoctorTargetMode = 'fix' | 'package' | 'repo' | 'validate';
|
|
4
|
+
export type DoctorPlannedChangeKind = 'create-directory' | 'create-file' | 'update-json' | 'update-text';
|
|
4
5
|
export interface DoctorAnalysisRequest {
|
|
5
6
|
readonly cwd: string;
|
|
6
7
|
readonly inputPath?: string;
|
|
7
8
|
readonly mode: DoctorTargetMode;
|
|
8
9
|
}
|
|
10
|
+
export interface DoctorPlannedChange {
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filePath: string;
|
|
13
|
+
readonly kind: DoctorPlannedChangeKind;
|
|
14
|
+
readonly ruleId: DoctorRuleId;
|
|
15
|
+
readonly safe: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface DoctorFixPlan {
|
|
18
|
+
readonly changes: readonly DoctorPlannedChange[];
|
|
19
|
+
readonly diagnostics: readonly DoctorDiagnostic[];
|
|
20
|
+
readonly profile: DoctorPolicyProfile;
|
|
21
|
+
readonly targetPath: string;
|
|
22
|
+
}
|
|
9
23
|
export interface DoctorAnalysisResult {
|
|
10
24
|
readonly appliedChecks: readonly DoctorTargetCheck[];
|
|
11
25
|
readonly diagnostics: readonly DoctorDiagnostic[];
|
|
26
|
+
readonly fixPlan: DoctorFixPlan | null;
|
|
12
27
|
readonly hasPackageJson: boolean;
|
|
28
|
+
readonly plannedChanges: readonly DoctorPlannedChange[];
|
|
29
|
+
readonly profile: DoctorPolicyProfile;
|
|
13
30
|
readonly repoMarkers: readonly string[];
|
|
14
31
|
readonly targetPath: string;
|
|
15
32
|
}
|
package/dist/analysis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5F,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAC;AACnD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AACvE,MAAM,MAAM,uBAAuB,GACjC,kBAAkB,GAAG,aAAa,GAAG,aAAa,GA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