@maverickcer/env-cap 0.7.5 → 0.7.7
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/ADOPTION.md +12 -12
- package/AGENTS.md +85 -120
- package/CHANGELOG.md +36 -0
- package/CODE_REVIEW.md +5 -5
- package/CONTRIBUTING.md +5 -5
- package/GUIDE.md +42 -24
- package/README.md +52 -34
- package/RELEASING.md +78 -64
- package/SECURITY.md +15 -15
- package/VERSIONING.md +16 -15
- package/benchmarks/READING-BENCHMARKS.md +101 -85
- package/benchmarks/README.md +12 -9
- package/benchmarks/WRITING-BENCHMARKS.md +89 -79
- package/benchmarks/performance-buildtime/BENCHMARKS.md +20 -20
- package/benchmarks/performance-runtime/BENCHMARKS.md +107 -107
- package/dist/.dts/_ipc/build-fs.d.ts +3 -3
- package/dist/.dts/_ipc/build-fs.d.ts.map +1 -1
- package/dist/.dts/_ipc/display-path.d.ts +1 -1
- package/dist/.dts/_ipc/glob.d.ts +3 -2
- package/dist/.dts/_ipc/glob.d.ts.map +1 -1
- package/dist/.dts/_ipc/no-node-fs.d.ts +2 -2
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +16 -16
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts/_ipc/typescript.d.ts +4 -4
- package/dist/.dts/build/assemble-project.d.ts +14 -15
- package/dist/.dts/build/assemble-project.d.ts.map +1 -1
- package/dist/.dts/build/change-model.d.ts +14 -14
- package/dist/.dts/build/change-model.d.ts.map +1 -1
- package/dist/.dts/build/check-artifacts.d.ts +4 -4
- package/dist/.dts/build/check-artifacts.d.ts.map +1 -1
- package/dist/.dts/build/citation-verification.d.ts +13 -14
- package/dist/.dts/build/citation-verification.d.ts.map +1 -1
- package/dist/.dts/build/compatibility.d.ts +24 -24
- package/dist/.dts/build/compatibility.d.ts.map +1 -1
- package/dist/.dts/build/contract-model.d.ts +10 -10
- package/dist/.dts/build/contract-model.d.ts.map +1 -1
- package/dist/.dts/build/deep-equal.d.ts +2 -2
- package/dist/.dts/build/deep-freeze.d.ts +2 -2
- package/dist/.dts/build/dependency-graph.d.ts +48 -55
- package/dist/.dts/build/dependency-graph.d.ts.map +1 -1
- package/dist/.dts/build/dependency-model.d.ts +18 -18
- package/dist/.dts/build/dependency-model.d.ts.map +1 -1
- package/dist/.dts/build/discover.d.ts +11 -11
- package/dist/.dts/build/discover.d.ts.map +1 -1
- package/dist/.dts/build/docs.d.ts +34 -38
- package/dist/.dts/build/docs.d.ts.map +1 -1
- package/dist/.dts/build/env-example.d.ts +13 -13
- package/dist/.dts/build/env-example.d.ts.map +1 -1
- package/dist/.dts/build/errors.d.ts +8 -8
- package/dist/.dts/build/evidence-cache.d.ts +23 -23
- package/dist/.dts/build/evidence-cache.d.ts.map +1 -1
- package/dist/.dts/build/evidence-model.d.ts +3 -3
- package/dist/.dts/build/evidence-reference.d.ts +15 -15
- package/dist/.dts/build/evidence-reference.d.ts.map +1 -1
- package/dist/.dts/build/evidence-snapshot.d.ts +47 -53
- package/dist/.dts/build/evidence-snapshot.d.ts.map +1 -1
- package/dist/.dts/build/exclusive-group.d.ts +4 -4
- package/dist/.dts/build/exclusive-group.d.ts.map +1 -1
- package/dist/.dts/build/finding-model.d.ts +12 -12
- package/dist/.dts/build/finding-model.d.ts.map +1 -1
- package/dist/.dts/build/generate-documentation.d.ts +19 -19
- package/dist/.dts/build/generate-documentation.d.ts.map +1 -1
- package/dist/.dts/build/generate-env-artifacts.d.ts +43 -43
- package/dist/.dts/build/generate-env-artifacts.d.ts.map +1 -1
- package/dist/.dts/build/generate-evidence.d.ts +19 -19
- package/dist/.dts/build/generate-evidence.d.ts.map +1 -1
- package/dist/.dts/build/generate-manifest.d.ts +11 -12
- package/dist/.dts/build/generate-manifest.d.ts.map +1 -1
- package/dist/.dts/build/generate-usage.d.ts +23 -24
- package/dist/.dts/build/generate-usage.d.ts.map +1 -1
- package/dist/.dts/build/generated-banner.d.ts +5 -5
- package/dist/.dts/build/governance-fields.d.ts +7 -7
- package/dist/.dts/build/humanize-key.d.ts +1 -1
- package/dist/.dts/build/humanize-key.d.ts.map +1 -1
- package/dist/.dts/build/index.d.ts +20 -36
- package/dist/.dts/build/index.d.ts.map +1 -1
- package/dist/.dts/build/lifecycle-model.d.ts +87 -85
- package/dist/.dts/build/lifecycle-model.d.ts.map +1 -1
- package/dist/.dts/build/link.d.ts +38 -39
- package/dist/.dts/build/link.d.ts.map +1 -1
- package/dist/.dts/build/literal-eval.d.ts +2 -2
- package/dist/.dts/build/literal-eval.d.ts.map +1 -1
- package/dist/.dts/build/live-expirations.d.ts +14 -13
- package/dist/.dts/build/live-expirations.d.ts.map +1 -1
- package/dist/.dts/build/manifest.d.ts +6 -6
- package/dist/.dts/build/map-utils.d.ts +4 -4
- package/dist/.dts/build/merge-documentation.d.ts +9 -8
- package/dist/.dts/build/merge-documentation.d.ts.map +1 -1
- package/dist/.dts/build/ownership-model.d.ts +14 -15
- package/dist/.dts/build/ownership-model.d.ts.map +1 -1
- package/dist/.dts/build/parse.d.ts +20 -21
- package/dist/.dts/build/parse.d.ts.map +1 -1
- package/dist/.dts/build/reference-projections.d.ts +36 -38
- package/dist/.dts/build/reference-projections.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-import.d.ts +18 -14
- package/dist/.dts/build/resolution/resolve-import.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-package-schema.d.ts +26 -26
- package/dist/.dts/build/resolution/resolve-package-schema.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-within-root.d.ts +9 -9
- package/dist/.dts/build/sarif.d.ts +5 -5
- package/dist/.dts/build/sarif.d.ts.map +1 -1
- package/dist/.dts/build/scan-dependencies.d.ts +17 -16
- package/dist/.dts/build/scan-dependencies.d.ts.map +1 -1
- package/dist/.dts/build/sort-by-identity.d.ts +1 -1
- package/dist/.dts/build/source-position.d.ts +13 -13
- package/dist/.dts/build/tool-version.d.ts +1 -1
- package/dist/.dts/build/usage-report.d.ts +19 -19
- package/dist/.dts/build/usage-report.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/index.d.ts +16 -5
- package/dist/.dts/eslint-plugin/index.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts +4 -4
- package/dist/.dts/evidence/define-projection.d.ts +15 -16
- package/dist/.dts/evidence/define-projection.d.ts.map +1 -1
- package/dist/.dts/evidence/index.d.ts +11 -15
- package/dist/.dts/evidence/index.d.ts.map +1 -1
- package/dist/.dts/helpers/index.d.ts +15 -18
- package/dist/.dts/helpers/index.d.ts.map +1 -1
- package/dist/.dts/helpers/validators.d.ts +2 -2
- package/dist/.dts/helpers/validators.d.ts.map +1 -1
- package/dist/.dts/node/index.d.ts +19 -0
- package/dist/.dts/node/index.d.ts.map +1 -1
- package/dist/.dts/runtime/create.d.ts +3 -3
- package/dist/.dts/runtime/document.d.ts +90 -99
- package/dist/.dts/runtime/document.d.ts.map +1 -1
- package/dist/.dts/runtime/errors.d.ts +5 -5
- package/dist/.dts/runtime/reset.d.ts +1 -1
- package/dist/.dts/runtime/types.d.ts +23 -24
- package/dist/.dts/runtime/types.d.ts.map +1 -1
- package/dist/.dts/runtime/validate.d.ts +1 -1
- package/dist/.dts7/_ipc/build-fs.d.ts +3 -3
- package/dist/.dts7/_ipc/build-fs.d.ts.map +1 -1
- package/dist/.dts7/_ipc/display-path.d.ts +1 -1
- package/dist/.dts7/_ipc/glob.d.ts +3 -2
- package/dist/.dts7/_ipc/glob.d.ts.map +1 -1
- package/dist/.dts7/_ipc/no-node-fs.d.ts +2 -2
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts +16 -16
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts7/_ipc/typescript.d.ts +4 -4
- package/dist/.dts7/build/assemble-project.d.ts +14 -15
- package/dist/.dts7/build/assemble-project.d.ts.map +1 -1
- package/dist/.dts7/build/change-model.d.ts +14 -14
- package/dist/.dts7/build/change-model.d.ts.map +1 -1
- package/dist/.dts7/build/check-artifacts.d.ts +4 -4
- package/dist/.dts7/build/check-artifacts.d.ts.map +1 -1
- package/dist/.dts7/build/citation-verification.d.ts +13 -14
- package/dist/.dts7/build/citation-verification.d.ts.map +1 -1
- package/dist/.dts7/build/compatibility.d.ts +24 -24
- package/dist/.dts7/build/compatibility.d.ts.map +1 -1
- package/dist/.dts7/build/contract-model.d.ts +10 -10
- package/dist/.dts7/build/contract-model.d.ts.map +1 -1
- package/dist/.dts7/build/deep-equal.d.ts +2 -2
- package/dist/.dts7/build/deep-freeze.d.ts +2 -2
- package/dist/.dts7/build/dependency-graph.d.ts +48 -55
- package/dist/.dts7/build/dependency-graph.d.ts.map +1 -1
- package/dist/.dts7/build/dependency-model.d.ts +18 -18
- package/dist/.dts7/build/dependency-model.d.ts.map +1 -1
- package/dist/.dts7/build/discover.d.ts +11 -11
- package/dist/.dts7/build/discover.d.ts.map +1 -1
- package/dist/.dts7/build/docs.d.ts +34 -38
- package/dist/.dts7/build/docs.d.ts.map +1 -1
- package/dist/.dts7/build/env-example.d.ts +13 -13
- package/dist/.dts7/build/env-example.d.ts.map +1 -1
- package/dist/.dts7/build/errors.d.ts +8 -8
- package/dist/.dts7/build/evidence-cache.d.ts +23 -23
- package/dist/.dts7/build/evidence-cache.d.ts.map +1 -1
- package/dist/.dts7/build/evidence-model.d.ts +3 -3
- package/dist/.dts7/build/evidence-reference.d.ts +15 -15
- package/dist/.dts7/build/evidence-reference.d.ts.map +1 -1
- package/dist/.dts7/build/evidence-snapshot.d.ts +47 -53
- package/dist/.dts7/build/evidence-snapshot.d.ts.map +1 -1
- package/dist/.dts7/build/exclusive-group.d.ts +4 -4
- package/dist/.dts7/build/exclusive-group.d.ts.map +1 -1
- package/dist/.dts7/build/finding-model.d.ts +12 -12
- package/dist/.dts7/build/finding-model.d.ts.map +1 -1
- package/dist/.dts7/build/generate-documentation.d.ts +19 -19
- package/dist/.dts7/build/generate-documentation.d.ts.map +1 -1
- package/dist/.dts7/build/generate-env-artifacts.d.ts +43 -43
- package/dist/.dts7/build/generate-env-artifacts.d.ts.map +1 -1
- package/dist/.dts7/build/generate-evidence.d.ts +19 -19
- package/dist/.dts7/build/generate-evidence.d.ts.map +1 -1
- package/dist/.dts7/build/generate-manifest.d.ts +11 -12
- package/dist/.dts7/build/generate-manifest.d.ts.map +1 -1
- package/dist/.dts7/build/generate-usage.d.ts +23 -24
- package/dist/.dts7/build/generate-usage.d.ts.map +1 -1
- package/dist/.dts7/build/generated-banner.d.ts +5 -5
- package/dist/.dts7/build/governance-fields.d.ts +7 -7
- package/dist/.dts7/build/humanize-key.d.ts +1 -1
- package/dist/.dts7/build/humanize-key.d.ts.map +1 -1
- package/dist/.dts7/build/index.d.ts +20 -36
- package/dist/.dts7/build/index.d.ts.map +1 -1
- package/dist/.dts7/build/lifecycle-model.d.ts +87 -85
- package/dist/.dts7/build/lifecycle-model.d.ts.map +1 -1
- package/dist/.dts7/build/link.d.ts +38 -39
- package/dist/.dts7/build/link.d.ts.map +1 -1
- package/dist/.dts7/build/literal-eval.d.ts +2 -2
- package/dist/.dts7/build/literal-eval.d.ts.map +1 -1
- package/dist/.dts7/build/live-expirations.d.ts +14 -13
- package/dist/.dts7/build/live-expirations.d.ts.map +1 -1
- package/dist/.dts7/build/manifest.d.ts +6 -6
- package/dist/.dts7/build/map-utils.d.ts +4 -4
- package/dist/.dts7/build/merge-documentation.d.ts +9 -8
- package/dist/.dts7/build/merge-documentation.d.ts.map +1 -1
- package/dist/.dts7/build/ownership-model.d.ts +14 -15
- package/dist/.dts7/build/ownership-model.d.ts.map +1 -1
- package/dist/.dts7/build/parse.d.ts +20 -21
- package/dist/.dts7/build/parse.d.ts.map +1 -1
- package/dist/.dts7/build/reference-projections.d.ts +36 -38
- package/dist/.dts7/build/reference-projections.d.ts.map +1 -1
- package/dist/.dts7/build/resolution/resolve-import.d.ts +18 -14
- package/dist/.dts7/build/resolution/resolve-import.d.ts.map +1 -1
- package/dist/.dts7/build/resolution/resolve-package-schema.d.ts +26 -26
- package/dist/.dts7/build/resolution/resolve-package-schema.d.ts.map +1 -1
- package/dist/.dts7/build/resolution/resolve-within-root.d.ts +9 -9
- package/dist/.dts7/build/sarif.d.ts +5 -5
- package/dist/.dts7/build/sarif.d.ts.map +1 -1
- package/dist/.dts7/build/scan-dependencies.d.ts +17 -16
- package/dist/.dts7/build/scan-dependencies.d.ts.map +1 -1
- package/dist/.dts7/build/sort-by-identity.d.ts +1 -1
- package/dist/.dts7/build/source-position.d.ts +13 -13
- package/dist/.dts7/build/tool-version.d.ts +1 -1
- package/dist/.dts7/build/usage-report.d.ts +19 -19
- package/dist/.dts7/build/usage-report.d.ts.map +1 -1
- package/dist/.dts7/eslint-plugin/index.d.ts +16 -5
- package/dist/.dts7/eslint-plugin/index.d.ts.map +1 -1
- package/dist/.dts7/eslint-plugin/no-raw-process-env.d.ts +4 -4
- package/dist/.dts7/evidence/define-projection.d.ts +15 -16
- package/dist/.dts7/evidence/define-projection.d.ts.map +1 -1
- package/dist/.dts7/evidence/index.d.ts +11 -15
- package/dist/.dts7/evidence/index.d.ts.map +1 -1
- package/dist/.dts7/helpers/index.d.ts +15 -18
- package/dist/.dts7/helpers/index.d.ts.map +1 -1
- package/dist/.dts7/helpers/validators.d.ts +2 -2
- package/dist/.dts7/helpers/validators.d.ts.map +1 -1
- package/dist/.dts7/node/index.d.ts +19 -0
- package/dist/.dts7/node/index.d.ts.map +1 -1
- package/dist/.dts7/runtime/create.d.ts +3 -3
- package/dist/.dts7/runtime/document.d.ts +90 -99
- package/dist/.dts7/runtime/document.d.ts.map +1 -1
- package/dist/.dts7/runtime/errors.d.ts +5 -5
- package/dist/.dts7/runtime/reset.d.ts +1 -1
- package/dist/.dts7/runtime/types.d.ts +23 -24
- package/dist/.dts7/runtime/types.d.ts.map +1 -1
- package/dist/.dts7/runtime/validate.d.ts +1 -1
- package/dist/{build-DNAYWD2B.js → build-33O5SDTC.js} +37 -39
- package/dist/build-33O5SDTC.js.map +1 -0
- package/dist/build.cjs +36 -38
- package/dist/build.cjs.map +1 -1
- package/dist/build.js +36 -38
- package/dist/build.js.map +1 -1
- package/dist/{chunk-HAGMVMN5.js → chunk-4D67AQFY.js} +2 -2
- package/dist/cli/index.js +29 -28
- package/dist/cli/index.js.map +1 -1
- package/dist/eslint-plugin/index.cjs.map +1 -1
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/evidence.cjs +1 -1
- package/dist/evidence.cjs.map +1 -1
- package/dist/evidence.js +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/helpers.cjs +4 -4
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.js +4 -4
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/examples/README.md +1 -1
- package/package.json +20 -13
- package/schemas/contract-model.schema.json +7 -7
- package/schemas/env-cap-report.schema.json +88 -88
- package/skills/env-cap/SKILL.md +12 -13
- package/skills/env-cap/references/api.md +1 -1
- package/specs/architecture.md +145 -120
- package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +9 -0
- package/specs/generated-artifacts.md +78 -70
- package/specs/migrations/README.md +6 -6
- package/specs/migrations/from-centralized-schema.md +1 -1
- package/specs/migrations/from-t3-env.md +9 -9
- package/PROMPT.md +0 -89
- package/dist/build-DNAYWD2B.js.map +0 -1
- /package/dist/{chunk-HAGMVMN5.js.map → chunk-4D67AQFY.js.map} +0 -0
|
@@ -30,7 +30,7 @@ export interface BuildFileSystem {
|
|
|
30
30
|
/** Resolve a path to its canonical, symlink-free absolute form. */
|
|
31
31
|
readonly realpath: (path: string) => Promise<string>;
|
|
32
32
|
}
|
|
33
|
-
/** One directory entry from {@link BuildFileSystem.readdir}
|
|
33
|
+
/** One directory entry from {@link BuildFileSystem.readdir}: the subset of Node's `Dirent` the build code reads. */
|
|
34
34
|
export interface BuildDirent {
|
|
35
35
|
readonly name: string;
|
|
36
36
|
/** Same contract as Node's `Dirent.isDirectory()`. */
|
|
@@ -38,11 +38,11 @@ export interface BuildDirent {
|
|
|
38
38
|
/** Same contract as Node's `Dirent.isFile()`. */
|
|
39
39
|
readonly isFile: () => boolean;
|
|
40
40
|
}
|
|
41
|
-
/** A path's stat info from {@link BuildFileSystem.stat}
|
|
41
|
+
/** A path's stat info from {@link BuildFileSystem.stat}: the subset of Node's `Stats` the build code reads. */
|
|
42
42
|
export interface BuildStats {
|
|
43
43
|
/** Same contract as Node's `Stats.isFile()`. */
|
|
44
44
|
readonly isFile: () => boolean;
|
|
45
|
-
/** Size in bytes
|
|
45
|
+
/** Size in bytes: read by the package-schema resolver to enforce a size ceiling. */
|
|
46
46
|
readonly size: number;
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=build-fs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-fs.d.ts","sourceRoot":"","sources":["../../../src/_ipc/build-fs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACtE,mGAAmG;IACnG,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnF,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACtF,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,QAAQ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CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACrD;AAED,oHAAoH;AACpH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAA;IACnC,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAA;CAC/B;AAED,+GAA+G;AAC/G,MAAM,WAAW,UAAU;IACzB,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAA;IAC9B,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* helpers that call this again. Resolving a relative path against `process.cwd()` first, which is what
|
|
9
9
|
* `path.relative` does on its own, silently gives a wrong answer whenever the working directory is not `root`.
|
|
10
10
|
* - An absolute path that would need to climb outside `root` is returned unchanged, never rewritten into a
|
|
11
|
-
* `../` escape
|
|
11
|
+
* `../` escape. A file discovered in another package legitimately lives outside `root`, and its absolute path
|
|
12
12
|
* is the only unambiguous thing to say about it.
|
|
13
13
|
* @param root - The directory paths are published relative to.
|
|
14
14
|
* @param filePath - An absolute path, or one already relative to `root`.
|
package/dist/.dts/_ipc/glob.d.ts
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
export declare function globToRegExp(pattern: string): RegExp;
|
|
11
11
|
/**
|
|
12
12
|
* Whether a lint rule's `allow` list covers a file. ESLint gives a rule the file's absolute path, while a config
|
|
13
|
-
* writes its patterns relative to the working directory (`src/cli/**`)
|
|
14
|
-
* as given
|
|
13
|
+
* writes its patterns relative to the working directory (`src/cli/**`). So each pattern is tested against the path
|
|
14
|
+
* as given. When the file is inside `cwd`, it is also tested against the path from there, written with `/` on
|
|
15
|
+
* every platform.
|
|
15
16
|
* (`split`/`join`, not `replaceAll`: a package that carries this copy may compile for ES2020.)
|
|
16
17
|
* @param patterns - the rule's `allow` globs.
|
|
17
18
|
* @param filename - the file as ESLint names it (`context.filename`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/_ipc/glob.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4BpD;AAED
|
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/_ipc/glob.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4BpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,OAAO,CAeT"}
|
|
@@ -8,9 +8,9 @@ export interface NoNodeFsWording {
|
|
|
8
8
|
readonly guide: string;
|
|
9
9
|
}
|
|
10
10
|
export interface RuleOptions {
|
|
11
|
-
/** Glob-array of files this rule doesn't apply to
|
|
11
|
+
/** Glob-array of files this rule doesn't apply to: a project's own
|
|
12
12
|
* executable entry points (a CLI, a script) that legitimately construct
|
|
13
|
-
* the concrete filesystem adapter. Empty by default
|
|
13
|
+
* the concrete filesystem adapter. Empty by default: populate it
|
|
14
14
|
* explicitly; the rule never guesses at what counts as an executable
|
|
15
15
|
* capability boundary. */
|
|
16
16
|
allow?: string[];
|
|
@@ -7,14 +7,14 @@ import type { BuildFileSystem } from "./build-fs.js";
|
|
|
7
7
|
* `tsconfig.json` `compilerOptions.paths`/`baseUrl`, so a schema or consumer reached only
|
|
8
8
|
* through an alias isn't misreported by `link.ts`/`dependency-graph.ts` as unresolved or
|
|
9
9
|
* abandoned. Unlike a package-schema resolver, this never crosses a
|
|
10
|
-
* trust/versioning boundary
|
|
11
|
-
* project source
|
|
10
|
+
* trust/versioning boundary (every resolved file is already local, already-trusted
|
|
11
|
+
* project source), so it is on by default (auto-detecting `root/tsconfig.json`) rather
|
|
12
12
|
* than requiring an explicit allowlist.
|
|
13
13
|
*
|
|
14
14
|
* The actual `paths`/`baseUrl` matching algorithm (longest-prefix matching, `*` wildcard
|
|
15
15
|
* substitution, multiple fallback targets, `extends`-chain merging, JSONC parsing) is
|
|
16
16
|
* delegated entirely to the TypeScript compiler via `ts.resolveModuleName()` and
|
|
17
|
-
* `ts.parseJsonConfigFileContent()`
|
|
17
|
+
* `ts.parseJsonConfigFileContent()` (the same functions `tsc`/`tsserver` themselves use)
|
|
18
18
|
* rather than reimplemented here. This module's own logic is limited to loading the config,
|
|
19
19
|
* caching resolutions, and enforcing the `node_modules` safety boundary below.
|
|
20
20
|
*/
|
|
@@ -38,7 +38,7 @@ export interface PathMappingOptions {
|
|
|
38
38
|
export declare function pathMappingOptions(options: TS.CompilerOptions): PathMappingOptions;
|
|
39
39
|
/** Parsed `tsconfig.json` `paths`/`baseUrl` configuration, immutable for the life of one generate*() run. See {@link loadTsconfigPaths}. */
|
|
40
40
|
export interface TsconfigPathsResolution {
|
|
41
|
-
/** The subset of `compilerOptions` `ts.resolveModuleName()` needs
|
|
41
|
+
/** The subset of `compilerOptions` `ts.resolveModuleName()` needs: at minimum `paths` and/or `baseUrl`. */
|
|
42
42
|
readonly compilerOptions: TS.CompilerOptions;
|
|
43
43
|
/** Absolute path of the tsconfig.json this was loaded from, for diagnostics. */
|
|
44
44
|
readonly configFile: string;
|
|
@@ -53,7 +53,7 @@ export interface AliasResolutionCache {
|
|
|
53
53
|
/**
|
|
54
54
|
* Keyed by `` `${importingFile}\0${specifier}` ``, not by `specifier` alone. With one
|
|
55
55
|
* fixed `compilerOptions` object and no project-reference support, `paths`-pattern
|
|
56
|
-
* substitution itself doesn't depend on the importing file
|
|
56
|
+
* substitution itself doesn't depend on the importing file, but `ts.resolveModuleName()`'s
|
|
57
57
|
* fallback behavior when `paths` doesn't match a real file (classic-mode ancestor search,
|
|
58
58
|
* extension-preference edge cases) legitimately can. A `Map`, not a network call, so
|
|
59
59
|
* keying defensively by both costs nothing.
|
|
@@ -84,24 +84,24 @@ export declare function typescriptPath(file: string, separator: string): string;
|
|
|
84
84
|
/**
|
|
85
85
|
* Loads and parses a `tsconfig.json` for alias resolution. Called exactly once per
|
|
86
86
|
* `generate*()`/`computeArtifacts()` invocation, at the same point
|
|
87
|
-
* `resolveAllowlistedPackages()` is already called once
|
|
87
|
+
* `resolveAllowlistedPackages()` is already called once, so at most one tsconfig-related
|
|
88
88
|
* warning is ever produced per run, never once per file scanned.
|
|
89
89
|
*
|
|
90
90
|
* @param product - The consuming package's name, used in the message when no usable compiler resolved.
|
|
91
91
|
* @remarks
|
|
92
92
|
* `tsconfigOption === false` disables alias resolution entirely.
|
|
93
|
-
* `tsconfigOption === undefined` (the default) looks for `root/tsconfig.json` exactly
|
|
93
|
+
* `tsconfigOption === undefined` (the default) looks for `root/tsconfig.json` exactly:
|
|
94
94
|
* deliberately not `ts.findConfigFile()`'s upward directory walk, since every other
|
|
95
95
|
* root-relative mechanism in this codebase (schema discovery, `packages` resolution)
|
|
96
96
|
* treats `root` as a hard boundary. A missing default tsconfig is silent (most projects
|
|
97
97
|
* don't use aliases); a missing *explicit* `tsconfigOption` is a real misconfiguration and
|
|
98
|
-
* warns. `jsconfig.json` is intentionally not auto-detected
|
|
98
|
+
* warns. `jsconfig.json` is intentionally not auto-detected: pass `tsconfig:
|
|
99
99
|
* "jsconfig.json"` explicitly if needed; this loader only cares about the file's JSON
|
|
100
100
|
* shape, not its name.
|
|
101
101
|
*
|
|
102
102
|
* The gate for building a resolution is "`paths` non-empty OR `baseUrl` set", not `paths`
|
|
103
|
-
* alone
|
|
104
|
-
* bare specifiers relative to `baseUrl
|
|
103
|
+
* alone. A `baseUrl`-only tsconfig (no `paths` at all) still makes TypeScript resolve
|
|
104
|
+
* bare specifiers relative to `baseUrl`. `ts.resolveModuleName()` already handles that
|
|
105
105
|
* once `compilerOptions.baseUrl` is passed through.
|
|
106
106
|
*/
|
|
107
107
|
export declare function loadTsconfigPaths(product: string, root: string, tsconfigOption: string | false | undefined, fs: BuildFileSystem): Promise<LoadTsconfigPathsResult>;
|
|
@@ -110,7 +110,7 @@ export declare function loadTsconfigPaths(product: string, root: string, tsconfi
|
|
|
110
110
|
* or returns `undefined` if it doesn't resolve through this mechanism.
|
|
111
111
|
*
|
|
112
112
|
* @remarks
|
|
113
|
-
* Necessarily synchronous
|
|
113
|
+
* Necessarily synchronous: `ts.resolveModuleName()` has no async form, matching how
|
|
114
114
|
* `tsc`/`tsserver` themselves always call it. `ts.sys` is used directly as the resolution
|
|
115
115
|
* host (an existing Node-backed singleton the `typescript` package exports; nothing to
|
|
116
116
|
* construct).
|
|
@@ -118,16 +118,16 @@ export declare function loadTsconfigPaths(product: string, root: string, tsconfi
|
|
|
118
118
|
* Two safety/scope filters apply to any candidate `ts.resolveModuleName()` returns,
|
|
119
119
|
* independent of its own internal fallback behavior:
|
|
120
120
|
* - **Never resolves into `node_modules`.** `ts.resolveModuleName()` can, in principle,
|
|
121
|
-
* fall through to classic Node resolution and land inside `node_modules
|
|
121
|
+
* fall through to classic Node resolution and land inside `node_modules`. Any resolved
|
|
122
122
|
* path containing a `node_modules` path segment (checked after `path.normalize()`, so
|
|
123
123
|
* mixed separators can't slip past it on Windows) is discarded here. Bare package
|
|
124
|
-
* specifiers continue to be handled exclusively by `resolvePackageImport()
|
|
125
|
-
*
|
|
124
|
+
* specifiers continue to be handled exclusively by `resolvePackageImport()`:
|
|
125
|
+
* this mechanism never overlaps with that trust boundary.
|
|
126
126
|
* - **`.ts`/`.tsx` only.** Matches `resolveRelativeImport()`'s own existing candidate set
|
|
127
|
-
* and `resolve-package-schema.ts`'s `SCHEMA_FILE_EXTENSIONS
|
|
127
|
+
* and `resolve-package-schema.ts`'s `SCHEMA_FILE_EXTENSIONS`: this codebase's static-
|
|
128
128
|
* analysis pipeline is `.ts`/`.tsx` only today. A resolved non-`.ts`/`.tsx` file is a
|
|
129
129
|
* real risk, not just a gap: feeding it straight into `ts.createSourceFile()` wouldn't
|
|
130
|
-
* error, it would silently parse garbage
|
|
130
|
+
* error, it would silently parse garbage: exactly the "guess" this codebase's
|
|
131
131
|
* warn-don't-guess philosophy exists to avoid.
|
|
132
132
|
*/
|
|
133
133
|
export declare function resolveAliasImport(specifier: string, importingFile: string, resolution: TsconfigPathsResolution, cache: AliasResolutionCache): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/_ipc/resolve-tsconfig-paths.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,GAAG,kBAAkB,CAElF;AAED,4IAA4I;AAC5I,MAAM,WAAW,uBAAuB;IACtC,
|
|
1
|
+
{"version":3,"file":"resolve-tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/_ipc/resolve-tsconfig-paths.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,C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;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,uBAAuB,EACnC,KAAK,EAAE,oBAAoB,GAC1B,MAAM,GAAG,SAAS,CAiBpB"}
|
|
@@ -3,13 +3,13 @@ import type TS from "typescript";
|
|
|
3
3
|
export type TypeScript = typeof TS;
|
|
4
4
|
/**
|
|
5
5
|
* Picks the compiler the scanner parses with: the consumer's `typescript` when it exposes the
|
|
6
|
-
* classic compiler API (TypeScript 5 and 6), otherwise the bundled `@typescript/typescript6
|
|
7
|
-
* Microsoft's side-by-side TypeScript 6 package, a dependency of the package so the scanner keeps working
|
|
8
|
-
* for a consumer whose own `typescript` is 7
|
|
6
|
+
* classic compiler API (TypeScript 5 and 6), otherwise the bundled `@typescript/typescript6`. That is
|
|
7
|
+
* Microsoft's side-by-side TypeScript 6 package, a dependency of the package, so the scanner keeps working
|
|
8
|
+
* for a consumer whose own `typescript` is 7+ (which ships no programmatic API). Chosen by capability, never by version,
|
|
9
9
|
* so a future `typescript` that regains the API is used as-is.
|
|
10
10
|
*
|
|
11
11
|
* When neither has the API (the bundled dependency was stripped from an install), it returns the
|
|
12
|
-
* consumer's module anyway so `assertCompilerApi`
|
|
12
|
+
* consumer's module anyway so `assertCompilerApi` (called at every scanner entry point) fails
|
|
13
13
|
* with its readable message instead of a bare "is not a function".
|
|
14
14
|
* @param load - How a module id is resolved (a parameter so a test can hand in stand-ins).
|
|
15
15
|
* @throws Whatever `load` throws for a reason other than the module not being installed.
|
|
@@ -5,7 +5,7 @@ import type { ImportResolutionContext } from "./resolution/resolve-import.js";
|
|
|
5
5
|
import type { PackageOrigin } from "./resolution/resolve-package-schema.js";
|
|
6
6
|
/** Options for {@link assembleProject}. */
|
|
7
7
|
export interface AssembleProjectOptions {
|
|
8
|
-
/** The filesystem capability
|
|
8
|
+
/** The filesystem capability: `./build` never imports `node:fs` (ADR 0040). */
|
|
9
9
|
readonly fs: BuildFileSystem;
|
|
10
10
|
readonly root: string;
|
|
11
11
|
readonly include: readonly string[];
|
|
@@ -15,33 +15,32 @@ export interface AssembleProjectOptions {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Everything downstream model-building and artifact-rendering needs from one
|
|
18
|
-
* discovery+link pass
|
|
19
|
-
* context
|
|
20
|
-
* `buildDependencyModel()`, ...) must reuse
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* discovery+link pass. It holds the linked contract graph and the
|
|
19
|
+
* import-resolution context. Every later resolution call
|
|
20
|
+
* (`computeScanSurface()`, `buildDependencyModel()`, ...) must reuse that
|
|
21
|
+
* context to agree with `linkResult`. It also holds a shared file-read cache,
|
|
22
|
+
* so a file matched by more than one later pass' glob is read from disk once
|
|
23
|
+
* (e.g. a schema file also matched by the usage pass' broader `SCAN_INCLUDE`).
|
|
24
24
|
*/
|
|
25
25
|
export interface AssembledProject {
|
|
26
26
|
readonly root: string;
|
|
27
27
|
readonly readFileCached: (filePath: string) => Promise<string>;
|
|
28
28
|
readonly linkResult: LinkResult;
|
|
29
29
|
readonly context: ImportResolutionContext;
|
|
30
|
-
/** Keyed by resolved file path
|
|
30
|
+
/** Keyed by resolved file path: see `resolveAllowlistedPackages()`. */
|
|
31
31
|
readonly origins: ReadonlyMap<string, PackageOrigin>;
|
|
32
32
|
readonly packageWarnings: readonly ParseWarning[];
|
|
33
33
|
readonly tsconfigWarnings: readonly ParseWarning[];
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* The one shared discovery+link pass every orchestrator needs
|
|
36
|
+
* The one shared discovery+link pass every orchestrator needs: local +
|
|
37
37
|
* allow-listed-package schema discovery, tsconfig path-alias resolution, and
|
|
38
|
-
* cross-file linking, exactly once.
|
|
38
|
+
* cross-file linking, exactly once. `computeArtifacts()`
|
|
39
39
|
* (`generate-env-artifacts.ts`) and `generateEvidenceModel()`
|
|
40
|
-
* (`generate-evidence.ts`)
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* assembly too.
|
|
40
|
+
* (`generate-evidence.ts`) both call it, so the two orchestrators can never
|
|
41
|
+
* drift into scanning the same source tree twice. This is ADR 0011's "shared
|
|
42
|
+
* discovery, computed once" principle for manifest/docs/usage, extended to
|
|
43
|
+
* evidence assembly.
|
|
45
44
|
*/
|
|
46
45
|
export declare function assembleProject(options: AssembleProjectOptions): Promise<AssembledProject>;
|
|
47
46
|
//# sourceMappingURL=assemble-project.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assemble-project.d.ts","sourceRoot":"","sources":["../../../src/build/assemble-project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAK7E,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wCAAwC,CAAA;AAM/C,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"assemble-project.d.ts","sourceRoot":"","sources":["../../../src/build/assemble-project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAK7E,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wCAAwC,CAAA;AAM/C,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;CAC9C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9D,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAA;IACzC,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpD,QAAQ,CAAC,eAAe,EAAE,SAAS,YAAY,EAAE,CAAA;IACjD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,YAAY,EAAE,CAAA;CACnD;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA2ChG"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import type { DiscoveredContract } from "./link.js";
|
|
2
2
|
import type { ManifestChangeReport } from "./evidence-snapshot.js";
|
|
3
3
|
/**
|
|
4
|
-
* The sixth of env-cap's seven canonical fact models (ADR 0024)
|
|
5
|
-
* changed since the last persisted evidence snapshot (ADR 0038
|
|
6
|
-
*
|
|
4
|
+
* The sixth of env-cap's seven canonical fact models (ADR 0024): what
|
|
5
|
+
* changed since the last persisted evidence snapshot (ADR 0038, which
|
|
6
|
+
* replaces the manifest-scoped snapshot of ADR 0021). See ADR 0030 (base shape) and ADR
|
|
7
7
|
* 0029 (the `renamedFrom` field this file's rename correlation is gated
|
|
8
8
|
* on).
|
|
9
9
|
*
|
|
10
10
|
* @remarks
|
|
11
11
|
* Wraps `ManifestChangeReport` (`evidence-snapshot.ts`) rather than
|
|
12
|
-
* replacing it
|
|
12
|
+
* replacing it: this model exists to give the change report a versioned,
|
|
13
13
|
* model-namespaced shape Evidence Model can assemble against, alongside the
|
|
14
14
|
* other six models. Empty (no adds/removes/updates) whenever no previous
|
|
15
|
-
* evidence snapshot location was configured for this run
|
|
15
|
+
* evidence snapshot location was configured for this run: there is
|
|
16
16
|
* nothing to diff against, which is a genuinely different state from a
|
|
17
17
|
* first-ever run *with* tracking configured (where everything reads as
|
|
18
18
|
* added).
|
|
19
19
|
*/
|
|
20
|
-
/** Bump only when a reader could misinterpret the new shape
|
|
20
|
+
/** Bump only when a reader could misinterpret the new shape: same discipline every other canonical model's `schemaVersion` follows. */
|
|
21
21
|
export declare const CHANGE_MODEL_SCHEMA_VERSION = 1;
|
|
22
22
|
/** One `addedVariables`/`removedVariables` pair in `manifest`, correlated into a single rename via the current declaration's `renamedFrom` field (ADR 0029). */
|
|
23
23
|
export interface RenamedVariable {
|
|
24
|
-
/** The owning contract's identity (`${file}#${exportName}`)
|
|
24
|
+
/** The owning contract's identity (`${file}#${exportName}`): a rename never crosses contracts. */
|
|
25
25
|
readonly contractIdentity: string;
|
|
26
26
|
readonly file: string;
|
|
27
27
|
readonly exportName: string;
|
|
28
28
|
readonly contractName: string;
|
|
29
|
-
/** The variable's key before the rename
|
|
29
|
+
/** The variable's key before the rename: matches a `manifest.removedVariables` entry. */
|
|
30
30
|
readonly previousKey: string;
|
|
31
|
-
/** The variable's key after the rename
|
|
31
|
+
/** The variable's key after the rename: matches a `manifest.addedVariables` entry. */
|
|
32
32
|
readonly currentKey: string;
|
|
33
33
|
}
|
|
34
|
-
/** The versioned, JSON-serializable root of the Change Model
|
|
34
|
+
/** The versioned, JSON-serializable root of the Change Model: what changed since the last persisted evidence snapshot. See this module's own doc comment for the full picture. */
|
|
35
35
|
export interface ChangeModel {
|
|
36
36
|
readonly schemaVersion: typeof CHANGE_MODEL_SCHEMA_VERSION;
|
|
37
|
-
/** The existing manifest change report, unmodified
|
|
37
|
+
/** The existing manifest change report, unmodified: see ADR 0021. `addedVariables`/`removedVariables` still list a correlated rename's two halves separately; `renamedVariables` below is an additive, separately-computed view, not a filter over this field. */
|
|
38
38
|
readonly manifest: ManifestChangeReport;
|
|
39
39
|
/**
|
|
40
40
|
* Every `addedVariables`/`removedVariables` pair this run's currently
|
|
@@ -42,10 +42,10 @@ export interface ChangeModel {
|
|
|
42
42
|
* contract identity then current key.
|
|
43
43
|
*
|
|
44
44
|
* @remarks
|
|
45
|
-
* Only ever populated from an *authored* `renamedFrom
|
|
45
|
+
* Only ever populated from an *authored* `renamedFrom`: never guessed
|
|
46
46
|
* from name similarity (ADR 0010's "provable, not heuristic" ethos).
|
|
47
47
|
* Variable-level only: Lifecycle Model deliberately has no contract-level
|
|
48
|
-
* `renamedFrom` (ADR 0029), so there is no `renamedContracts
|
|
48
|
+
* `renamedFrom` (ADR 0029), so there is no `renamedContracts`; a
|
|
49
49
|
* contract-level rename has no field to correlate from.
|
|
50
50
|
*/
|
|
51
51
|
readonly renamedVariables: readonly RenamedVariable[];
|
|
@@ -56,7 +56,7 @@ export interface ChangeModel {
|
|
|
56
56
|
* shape, and correlates renames using the current run's `renamedFrom`
|
|
57
57
|
* declarations. `currentContracts` should be the same contracts the
|
|
58
58
|
* manifest was generated from (active contracts only, matching
|
|
59
|
-
* `renderManifest()`'s own scope
|
|
59
|
+
* `renderManifest()`'s own scope: same as every other input to this
|
|
60
60
|
* report family).
|
|
61
61
|
*/
|
|
62
62
|
export declare function buildChangeModel(manifest: ManifestChangeReport, currentContracts: readonly DiscoveredContract[], root: string): ChangeModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-model.d.ts","sourceRoot":"","sources":["../../../src/build/change-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAuB,MAAM,wBAAwB,CAAA;AAEvF;;;;;;;;;;;;;;;;GAgBG;AAEH,
|
|
1
|
+
{"version":3,"file":"change-model.d.ts","sourceRoot":"","sources":["../../../src/build/change-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAuB,MAAM,wBAAwB,CAAA;AAEvF;;;;;;;;;;;;;;;;GAgBG;AAEH,uIAAuI;AACvI,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C,gKAAgK;AAChK,MAAM,WAAW,eAAe;IAC9B,kGAAkG;IAClG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,kLAAkL;AAClL,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,2BAA2B,CAAA;IAC1D,kQAAkQ;IAClQ,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAA;IACvC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAA;CACtD;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,oBAAoB,EAC9B,gBAAgB,EAAE,SAAS,kBAAkB,EAAE,EAC/C,IAAI,EAAE,MAAM,GACX,WAAW,CAqCb"}
|
|
@@ -24,14 +24,14 @@ export interface CheckEnvArtifactsResult {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Parses `text` as an `EvidenceModel` and re-serializes it with
|
|
27
|
-
* `provenance.generatedAt` normalized out (see `normalizeEvidenceSnapshotForComparison()`)
|
|
28
|
-
*
|
|
27
|
+
* `provenance.generatedAt` normalized out (see `normalizeEvidenceSnapshotForComparison()`):
|
|
28
|
+
* so `--check` never reports drift solely because a fresh render's
|
|
29
29
|
* timestamp differs from the committed file's. A parse failure returns
|
|
30
30
|
* `text` unchanged, so a corrupted on-disk file simply fails to match
|
|
31
31
|
* `expected`'s normalized form (reported as `"stale"`), rather than
|
|
32
32
|
* crashing `--check` itself.
|
|
33
33
|
*/
|
|
34
|
-
/** @internal Exported for direct unit coverage
|
|
34
|
+
/** @internal Exported for direct unit coverage: reached through `checkEnvArtifacts()`'s `--evidence` pass in production, but the exact "returns text unchanged, not undefined/thrown" catch behavior isn't independently observable through that public path (any malformed `actual` already reads as "stale" against a well-formed `expected`, regardless of the catch's exact return value). */
|
|
35
35
|
export declare function normalizeEvidenceJsonForComparison(text: string): string;
|
|
36
36
|
/**
|
|
37
37
|
* Verifies every requested artifact (`manifest`/`docs`/`envExample`/`usage`)
|
|
@@ -39,7 +39,7 @@ export declare function normalizeEvidenceJsonForComparison(text: string): string
|
|
|
39
39
|
* writing anything.
|
|
40
40
|
*
|
|
41
41
|
* @remarks
|
|
42
|
-
* `--check` reports drift, it doesn't paper over a run that would otherwise fail
|
|
42
|
+
* `--check` reports drift, it doesn't paper over a run that would otherwise fail:
|
|
43
43
|
* see `@throws` below.
|
|
44
44
|
*
|
|
45
45
|
* @throws {EnvProjectGenerationError} On the same blocking findings a real run would throw on.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-artifacts.d.ts","sourceRoot":"","sources":["../../../src/build/check-artifacts.ts"],"names":[],"mapp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QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAA;CACnD;AAOD;;;;;;;;GAQG;AACH,kYAAkY;AAClY,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvE;AAqBD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,uBAAuB,CAAC,CAwFlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Re-verifies developer-declared `dynamicAccess` citations every run
|
|
2
|
+
* Re-verifies developer-declared `dynamicAccess` citations every run: never
|
|
3
3
|
* trusted forever (ADR 0037). Two independent steps, kept as two separate
|
|
4
4
|
* functions rather than one, since they answer two different questions and
|
|
5
5
|
* the second is a pure read over the first's result:
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
* label the citation `"fresh"` / `"stale"` / `"missing"`. Existence is
|
|
11
11
|
* always re-checked live, never trusted from either snapshot. A citation
|
|
12
12
|
* with no previous baseline (the first time it's ever been seen) is
|
|
13
|
-
* `"fresh"
|
|
13
|
+
* `"fresh"`: there is nothing to contradict it yet. Never throws on a
|
|
14
14
|
* missing file; that citation is simply labeled `"missing"`.
|
|
15
15
|
* - `verifyDynamicAccessCitations` (pure): flattens that result down to just
|
|
16
|
-
* the citations that need a human's attention
|
|
16
|
+
* the citations that need a human's attention; every `"stale"`/`"missing"`
|
|
17
17
|
* assertion, enriched with the owning contract's display name. These are the
|
|
18
18
|
* direct input to `finding-model.ts`'s `STALE_DYNAMIC_ACCESS_CITATION` /
|
|
19
19
|
* `MISSING_DYNAMIC_ACCESS_CITATION` findings.
|
|
20
20
|
*
|
|
21
21
|
* Deliberately separate from `evidence-snapshot.ts`'s own `diffContracts()`,
|
|
22
|
-
* which stays synchronous and pure
|
|
22
|
+
* which stays synchronous and pure: these are the only filesystem-touching,
|
|
23
23
|
* citation-specific part of the evidence-snapshot lifecycle. A citation is
|
|
24
24
|
* always a developer's *re-acknowledgment* that access happens, never a claim
|
|
25
25
|
* env-cap itself observed anything: nothing here ever folds into the
|
|
@@ -28,19 +28,18 @@
|
|
|
28
28
|
import type { EvidenceModel } from "./evidence-model.js";
|
|
29
29
|
import type { DiscoveredContract } from "./link.js";
|
|
30
30
|
import type { DynamicAccessAssertion, SourcePosition } from "./source-position.js";
|
|
31
|
-
/** Stable key {@link buildCitationSnapshots} and `dependency-graph.ts`'s consumer of it agree on
|
|
31
|
+
/** Stable key {@link buildCitationSnapshots} and `dependency-graph.ts`'s consumer of it agree on: `file` must be root-relative, POSIX-separated on both sides for a lookup to ever hit. */
|
|
32
32
|
export declare function dynamicAccessVariableIdentity(file: string, exportName: string, key: string): string;
|
|
33
33
|
/**
|
|
34
34
|
* Re-checks every current `dynamicAccess` citation against the previous
|
|
35
35
|
* evidence snapshot's committed `contentHash` baseline. Existence is always
|
|
36
|
-
* re-checked live (never trusted from either snapshot)
|
|
37
|
-
* only detectable when a previous baseline exists
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* 0037.
|
|
36
|
+
* re-checked live (never trusted from either snapshot). Content drift is
|
|
37
|
+
* only detectable when a previous baseline exists. A citation with no
|
|
38
|
+
* previous baseline (the first time it's seen) is reported `"fresh"`,
|
|
39
|
+
* because nothing contradicts it yet. See ADR 0037.
|
|
41
40
|
*/
|
|
42
41
|
export declare function buildCitationSnapshots(activeContracts: readonly DiscoveredContract[], previous: EvidenceModel | undefined, root: string, readFile: (filePath: string) => Promise<string>): Promise<ReadonlyMap<string, readonly DynamicAccessAssertion[]>>;
|
|
43
|
-
/** One `dynamicAccess` citation env-cap can no longer vouch for
|
|
42
|
+
/** One `dynamicAccess` citation env-cap can no longer vouch for: the direct input to `finding-model.ts`'s `"STALE_DYNAMIC_ACCESS_CITATION"`/`"MISSING_DYNAMIC_ACCESS_CITATION"` findings. See ADR 0037. */
|
|
44
43
|
export interface DynamicAccessCitationProblem {
|
|
45
44
|
readonly contractName: string;
|
|
46
45
|
/** Root-relative, POSIX-separated. */
|
|
@@ -48,15 +47,15 @@ export interface DynamicAccessCitationProblem {
|
|
|
48
47
|
readonly exportName: string;
|
|
49
48
|
/** The variable whose `dynamicAccess` citation this is. */
|
|
50
49
|
readonly key: string;
|
|
51
|
-
/** Where the citation points
|
|
50
|
+
/** Where the citation points: not the variable's own declaration. */
|
|
52
51
|
readonly position: SourcePosition;
|
|
53
52
|
readonly acknowledgment: "stale" | "missing";
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
55
|
* Flattens {@link buildCitationSnapshots}' result down to just the citations
|
|
57
|
-
* that need attention
|
|
56
|
+
* that need attention: every `"stale"`/`"missing"` assertion, enriched with
|
|
58
57
|
* the owning contract's display name. `"fresh"` assertions are silently
|
|
59
|
-
* omitted
|
|
58
|
+
* omitted: nothing to report about a citation that's still trustworthy.
|
|
60
59
|
*/
|
|
61
60
|
export declare function verifyDynamicAccessCitations(activeContracts: readonly DiscoveredContract[], root: string, acknowledgments: ReadonlyMap<string, readonly DynamicAccessAssertion[]>): readonly DynamicAccessCitationProblem[];
|
|
62
61
|
//# sourceMappingURL=citation-verification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citation-verification.d.ts","sourceRoot":"","sources":["../../../src/build/citation-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAOlF,
|
|
1
|
+
{"version":3,"file":"citation-verification.d.ts","sourceRoot":"","sources":["../../../src/build/citation-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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,7 @@ import type { DiscoveredContract } from "./link.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Every stable `code` a check in this file (or `exclusive-group.ts`) can
|
|
4
4
|
* emit. Documented as an enumerated union so a consumer filtering/linking on
|
|
5
|
-
* `code` has a closed list to switch over, rather than an arbitrary string
|
|
5
|
+
* `code` has a closed list to switch over, rather than an arbitrary string:
|
|
6
6
|
* see ADR 0024/0026. `exclusive-group.ts`'s check does not (yet) set one; see
|
|
7
7
|
* that file's own comment for why.
|
|
8
8
|
*/
|
|
@@ -15,11 +15,11 @@ export interface CompatibilityIssue {
|
|
|
15
15
|
readonly variable: string;
|
|
16
16
|
/**
|
|
17
17
|
* Every file declaring a conflicting definition. A pairwise comparison
|
|
18
|
-
* (compatibility.ts, exclusive-group.ts) always produces exactly two
|
|
18
|
+
* (compatibility.ts, exclusive-group.ts) always produces exactly two. A
|
|
19
19
|
* finding escalated from another family (generate-env-artifacts.ts's
|
|
20
20
|
* `escalatedFindings()`, via `findingFiles()`) can produce zero, one, or
|
|
21
|
-
* two, depending on
|
|
22
|
-
*
|
|
21
|
+
* two, depending on the location information that finding carries. So
|
|
22
|
+
* the arity varies, and this is not a tuple.
|
|
23
23
|
*/
|
|
24
24
|
readonly files: readonly string[];
|
|
25
25
|
/** Human-readable explanation of the conflict. */
|
|
@@ -27,41 +27,41 @@ export interface CompatibilityIssue {
|
|
|
27
27
|
/**
|
|
28
28
|
* Stable, machine-readable identifier for CI filtering / doc-linking /
|
|
29
29
|
* GitHub Action annotations / IDE integration. `undefined` only for checks
|
|
30
|
-
* that don't
|
|
31
|
-
*
|
|
30
|
+
* that don't set one yet. {@link CompatibilityIssueCode} lists every value
|
|
31
|
+
* a check in this file can produce.
|
|
32
32
|
*/
|
|
33
33
|
readonly code?: CompatibilityIssueCode;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Flags cases where two contracts declare the same variable name but appear to
|
|
37
|
-
* disagree about its shape
|
|
37
|
+
* disagree about its shape. A human can then confirm they're still meant to be "the same" var.
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* Duplicate variable names across contracts are not a merge problem
|
|
41
|
-
* contract
|
|
42
|
-
*
|
|
40
|
+
* Duplicate variable names across contracts are not a merge problem. Each
|
|
41
|
+
* contract processes its own copy of the raw value; there is no runtime
|
|
42
|
+
* merge at all. This is purely a build-time lint.
|
|
43
43
|
*
|
|
44
44
|
* Only one thing is treated as *provable* without executing code: two
|
|
45
45
|
* processors with explicit, differing `: T` return type annotations. That is
|
|
46
46
|
* a hard error. Everything else (differing processor/validator source text
|
|
47
|
-
* with no annotation, or none at all) is a warning
|
|
48
|
-
* semantic non-equivalence
|
|
49
|
-
*
|
|
47
|
+
* with no annotation, or none at all) is a warning. Static analysis alone
|
|
48
|
+
* cannot prove semantic non-equivalence. And the library never executes
|
|
49
|
+
* schema code to check further (see literal-eval.ts).
|
|
50
50
|
*/
|
|
51
51
|
export declare function detectCompatibilityIssues(contracts: readonly DiscoveredContract[]): CompatibilityIssue[];
|
|
52
52
|
/**
|
|
53
53
|
* Flags *differently-named* variables in different contracts that share an
|
|
54
|
-
* identical type shape
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* identical type shape. It is a soft signal that two features may model the
|
|
55
|
+
* same configuration value under two names. That is worth a human glance
|
|
56
|
+
* before they drift apart.
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
59
|
* Always `severity: "info"`, and never escalated to blocking by any flag,
|
|
60
|
-
* including `--strict
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
60
|
+
* including `--strict`. An identical shape is common and often correct. Two
|
|
61
|
+
* unrelated features can both take a `number` timeout with a validator, and
|
|
62
|
+
* that is not a defect. This is an observation for a reader, not a rule. A
|
|
63
|
+
* blockable version would be noise a team has to suppress, not a signal
|
|
64
|
+
* they can scan.
|
|
65
65
|
*
|
|
66
66
|
* Scope, deliberately narrow on every axis:
|
|
67
67
|
* - **Different keys only.** Same-key collisions across contracts are
|
|
@@ -72,11 +72,11 @@ export declare function detectCompatibilityIssues(contracts: readonly Discovered
|
|
|
72
72
|
* - **Active contracts only.** An inactive contract is wired into nothing,
|
|
73
73
|
* so an overlap with it is not a live duplication.
|
|
74
74
|
* - **No exclusive-grouped contracts.** Members of an exclusive group are
|
|
75
|
-
* interchangeable alternatives by explicit authorial declaration
|
|
75
|
+
* interchangeable alternatives by explicit authorial declaration:
|
|
76
76
|
* matching shapes there are the *point*, not a smell.
|
|
77
77
|
* - **Pairwise, never transitive.** Three mutually-matching variables emit
|
|
78
|
-
* three independent findings (A-B, A-C, B-C), never one merged "cluster"
|
|
79
|
-
*
|
|
78
|
+
* three independent findings (A-B, A-C, B-C), never one merged "cluster".
|
|
79
|
+
* Each pair is its own question a reader answers on its own. A cluster
|
|
80
80
|
* would imply a transitive relationship this check never established.
|
|
81
81
|
*/
|
|
82
82
|
export declare function detectDuplicateVariableShapes(contracts: readonly DiscoveredContract[]): CompatibilityIssue[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../src/build/compatibility.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,WAAW,CAAA;AAGvE;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAC9B,gCAAgC,GAChC,2BAA2B,GAC3B,2BAA2B,GAC3B,kCAAkC,GAClC,2CAA2C,CAAA;AAE/C,8HAA8H;AAC9H,MAAM,WAAW,kBAAkB;IACjC,uKAAuK;IACvK,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;IAC/C,iHAAiH;IACjH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CA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