@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/runtime/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/runtime/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3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AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Every error type here is constructed only from: the variable name, the
|
|
3
3
|
* declaring contract's name, the failure kind, and a message string that the
|
|
4
4
|
* *developer's own* processor/validator produced. Raw or processed environment
|
|
5
|
-
* values are never read into an error
|
|
5
|
+
* values are never read into an error: see the Security section in the README.
|
|
6
6
|
*
|
|
7
7
|
* Documentation (description, owner, etc.) never appears here, even when a
|
|
8
|
-
* {@link documentEnv} call exists for this variable
|
|
8
|
+
* {@link documentEnv} call exists for this variable: `documentEnv` is
|
|
9
9
|
* build-time-only and its data is never retained anywhere {@link validateEnv}
|
|
10
10
|
* could read it back out. This is a deliberate consequence of keeping the
|
|
11
11
|
* runtime minimal, not an oversight.
|
|
@@ -25,11 +25,11 @@ export interface VariableFailure {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Thrown by {@link validateEnv} when one or more variables fail processing or
|
|
28
|
-
* validation. Aggregates every failure across every contract in the batch
|
|
28
|
+
* validation. Aggregates every failure across every contract in the batch:
|
|
29
29
|
* the caller sees the whole picture in one error, not one-at-a-time.
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* `code` is a stable, Stable-tier discriminant for programmatic handling
|
|
32
|
+
* `code` is a stable, Stable-tier discriminant for programmatic handling:
|
|
33
33
|
* prefer it over `.name`/`instanceof` when a message-independent switch is needed.
|
|
34
34
|
*/
|
|
35
35
|
export declare class EnvValidationError extends Error {
|
|
@@ -44,7 +44,7 @@ export declare class EnvValidationError extends Error {
|
|
|
44
44
|
* {@link validateEnv} has completed successfully for it.
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* `code` is a stable, Stable-tier discriminant for programmatic handling
|
|
47
|
+
* `code` is a stable, Stable-tier discriminant for programmatic handling:
|
|
48
48
|
* prefer it over `.name`/`instanceof` when a message-independent switch is needed.
|
|
49
49
|
*/
|
|
50
50
|
export declare class EnvNotReadyError extends Error {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Clears cached validation state. Intended for tests and dev tooling (e.g.
|
|
3
3
|
* `beforeEach(() => resetEnvCache())` in a test suite that re-validates with
|
|
4
|
-
* different fixture values per test)
|
|
4
|
+
* different fixture values per test): production applications validate
|
|
5
5
|
* once at startup and should not normally call this.
|
|
6
6
|
*/
|
|
7
7
|
export declare function resetEnvCache(): void;
|
|
@@ -3,19 +3,18 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These types are intentionally minimal: an `EnvDefinition` describes how to
|
|
5
5
|
* turn one raw environment value into one typed, validated application
|
|
6
|
-
* value. There is no `optional`/`required` flag anywhere in this file
|
|
6
|
+
* value. There is no `optional`/`required` flag anywhere in this file:
|
|
7
7
|
* requiredness is just a validator that rejects `undefined`/empty values.
|
|
8
8
|
*
|
|
9
9
|
* Documentation fields (description, owner, expiresAt, category, ...) live
|
|
10
|
-
* entirely in {@link documentEnv} (see `document.ts`), not here
|
|
10
|
+
* entirely in {@link documentEnv} (see `document.ts`), not here: this file is
|
|
11
11
|
* the runtime's whole vocabulary, and every field in it is read by
|
|
12
12
|
* `validate.ts`/`create.ts`/`errors.ts` at runtime. If a field is only ever
|
|
13
13
|
* read by the generator, it belongs in `document.ts`, not here. `context` is
|
|
14
|
-
* the one exception
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* clear.
|
|
14
|
+
* the one exception. The build package also reads it for documentation
|
|
15
|
+
* display (see ADR 0022). It belongs here rather than in `documentEnv()`
|
|
16
|
+
* because `validate.ts` reads it too, to decide pipeline participation: the
|
|
17
|
+
* same bar `default`/`processor`/`validator` already clear.
|
|
19
18
|
*/
|
|
20
19
|
/** The raw, unprocessed source of environment values (e.g. `process.env`, a resolved secrets bag). */
|
|
21
20
|
export type RawEnv = Readonly<Record<string, unknown>>;
|
|
@@ -35,7 +34,7 @@ export type Validator<T> = (value: T, rawEnv: RawEnv) => true | string;
|
|
|
35
34
|
*
|
|
36
35
|
* @remarks
|
|
37
36
|
* The union is redundant at the type level (`unknown` alone already accepts a
|
|
38
|
-
* function)
|
|
37
|
+
* function). It's kept because this type is public API: collapsing it to bare `unknown`
|
|
39
38
|
* would erase the one thing a reader of the generated `.d.ts` needs to learn here.
|
|
40
39
|
*/
|
|
41
40
|
export type DefaultValue = unknown | (() => unknown);
|
|
@@ -49,17 +48,17 @@ export interface EnvDefinition<T> {
|
|
|
49
48
|
validator?: Validator<T>;
|
|
50
49
|
/**
|
|
51
50
|
* The validation context this variable belongs to (e.g. `"server"`,
|
|
52
|
-
* `"production"`, `"worker"`)
|
|
51
|
+
* `"production"`, `"worker"`): entirely application-defined; env-cap
|
|
53
52
|
* never interprets, detects, or infers this string. Omitted (the
|
|
54
53
|
* default) means the variable participates in every {@link validateEnv}
|
|
55
54
|
* run regardless of `activeContexts`. A variable belongs to at most one
|
|
56
|
-
* validation context
|
|
57
|
-
* and not `string[]
|
|
58
|
-
* join multiple contexts
|
|
55
|
+
* validation context: see ADR 0022 for why this is a single `string`
|
|
56
|
+
* and not `string[]`. Do not widen it to an array to let one variable
|
|
57
|
+
* join multiple contexts. That reintroduces the AND/OR ambiguity this
|
|
59
58
|
* design deliberately avoids.
|
|
60
59
|
*
|
|
61
60
|
* @remarks
|
|
62
|
-
* Validation contexts are a participation filter only
|
|
61
|
+
* Validation contexts are a participation filter only: not
|
|
63
62
|
* authentication, authorization, or a bundling/security boundary. See
|
|
64
63
|
* ADR 0022's Formal Invariants.
|
|
65
64
|
*/
|
|
@@ -84,7 +83,7 @@ type UnwrapDefault<D> = D extends {
|
|
|
84
83
|
* default's type, else `string` (the shape raw process.env values naturally arrive in).
|
|
85
84
|
*
|
|
86
85
|
* @remarks
|
|
87
|
-
* Same documented generic-bound variance workaround as {@link EnvSchema} above
|
|
86
|
+
* Same documented generic-bound variance workaround as {@link EnvSchema} above:
|
|
88
87
|
* `any` here is never surfaced to a consumer's inferred type.
|
|
89
88
|
*/
|
|
90
89
|
export type InferEnvValue<D extends EnvDefinition<any>> = D extends {
|
|
@@ -100,18 +99,18 @@ export interface ContractInternals<S extends EnvSchema = EnvSchema> {
|
|
|
100
99
|
}
|
|
101
100
|
/**
|
|
102
101
|
* The object returned by {@link createEnv}. Each key is a lazily-resolved getter backed by the
|
|
103
|
-
* runtime cache
|
|
102
|
+
* runtime cache: there is no global env object, only per-feature contracts like this one.
|
|
104
103
|
*
|
|
105
104
|
* @remarks
|
|
106
105
|
* `toString()` is intersected in (rather than left to the ambient `Object.prototype`
|
|
107
106
|
* declaration) because `create.ts` genuinely overrides it to return a redacted
|
|
108
|
-
* `EnvContract("name")` representation, never resolved values
|
|
107
|
+
* `EnvContract("name")` representation, never resolved values: see ADR 0006. Declaring
|
|
109
108
|
* it here means the type accurately describes what calling `String(contract)` returns.
|
|
110
109
|
*/
|
|
111
110
|
export type EnvContract<S extends EnvSchema> = {
|
|
112
111
|
readonly [K in keyof S]: InferEnvValue<S[K]>;
|
|
113
112
|
} & {
|
|
114
|
-
/** Returns the redacted `EnvContract("name")` representation, never resolved values
|
|
113
|
+
/** Returns the redacted `EnvContract("name")` representation, never resolved values: see ADR 0006. */
|
|
115
114
|
toString(): string;
|
|
116
115
|
};
|
|
117
116
|
/**
|
|
@@ -126,7 +125,7 @@ export interface validateEnvOptions {
|
|
|
126
125
|
/** The raw source of environment values, e.g. `process.env` or a resolved secrets bag. */
|
|
127
126
|
values: RawEnv;
|
|
128
127
|
/**
|
|
129
|
-
* Every contract to validate
|
|
128
|
+
* Every contract to validate: typically the `contracts` array imported
|
|
130
129
|
* from a generated manifest (see {@link build.generateEnvManifest}). Pass all of them
|
|
131
130
|
* in one call: {@link validateEnv} only ever initializes once per process, so
|
|
132
131
|
* a second call returns the first call's cached result without
|
|
@@ -135,18 +134,18 @@ export interface validateEnvOptions {
|
|
|
135
134
|
manifest: readonly EnvContract<any>[];
|
|
136
135
|
/**
|
|
137
136
|
* The validation contexts active for this run (e.g. `["server",
|
|
138
|
-
* "production"]`)
|
|
137
|
+
* "production"]`): entirely application-defined; env-cap never
|
|
139
138
|
* detects or infers these, the caller always computes and passes them
|
|
140
139
|
* explicitly. A variable whose `context` isn't in this list is skipped
|
|
141
140
|
* entirely (no default/processor/validator runs for it, and it stays in
|
|
142
141
|
* its not-ready state, exactly as if this run had never happened for
|
|
143
|
-
* it)
|
|
142
|
+
* it): see ADR 0022. A variable with no `context` always participates,
|
|
144
143
|
* regardless of what's passed here. Omitted (the default) behaves as an
|
|
145
144
|
* empty list: only variables with no `context` participate.
|
|
146
145
|
*
|
|
147
146
|
* @remarks
|
|
148
|
-
* Not part of the validation cache's identity
|
|
149
|
-
* remains one-shot per process
|
|
147
|
+
* Not part of the validation cache's identity: {@link validateEnv}
|
|
148
|
+
* remains one-shot per process whatever this option holds. A
|
|
150
149
|
* second call does not re-evaluate `activeContexts`; it returns the
|
|
151
150
|
* first call's result outright. Different active contexts belong to
|
|
152
151
|
* different processes (e.g. a server process and a browser bundle),
|
|
@@ -173,7 +172,7 @@ export interface CreateEnvOptions {
|
|
|
173
172
|
/**
|
|
174
173
|
* A short, stable label for this contract (e.g. "payments", "database").
|
|
175
174
|
* Used in error messages. Defaults to an auto-generated anonymous label if
|
|
176
|
-
* omitted
|
|
175
|
+
* omitted: providing one is strongly recommended for readable validation
|
|
177
176
|
* errors.
|
|
178
177
|
*/
|
|
179
178
|
name?: string;
|
|
@@ -181,7 +180,7 @@ export interface CreateEnvOptions {
|
|
|
181
180
|
* Pass `import.meta.url` here so validation errors point at the file that
|
|
182
181
|
* declared the failing variable (e.g. "features/payments/env.schema.ts")
|
|
183
182
|
* instead of just the short `name` label. There is no portable way for
|
|
184
|
-
* `createEnv` to discover its caller's module URL on its own
|
|
183
|
+
* `createEnv` to discover its caller's module URL on its own: this is
|
|
185
184
|
* always correct and never goes stale, since it's supplied by the JS
|
|
186
185
|
* engine rather than hand-typed.
|
|
187
186
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/runtime/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/runtime/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,sGAAsG;AACtG,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAEtD,uGAAuG;AACvG,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAA;AAEtE;;;;;;;;GAQG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAA;AAEpD,gHAAgH;AAChH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,6EAA6E;IAC7E,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACxB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;GASG;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE1D,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,GAAG,CAAA;CAAE,GACp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AC9B,gEAAgE;IAChE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -5,7 +5,7 @@ import type { validateEnvOptions, validateEnvResult } from "./types.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
7
|
* Idempotent: the first successful (or failed) call is authoritative for the life of the
|
|
8
|
-
* process
|
|
8
|
+
* process; later calls return (or re-throw) that same outcome without re-running any
|
|
9
9
|
* processor or validator. Concurrent in-flight calls share one underlying run. Call
|
|
10
10
|
* `resetEnvCache()` to validate again, for example between test scenarios.
|
|
11
11
|
*
|
|
@@ -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,CAAC,aAAa,EAAE,IAAI,CAAA;KAAE,KACtC,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAA;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IACpD,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACrD;AAED,
|
|
1
|
+
{"version":3,"file":"build-fs.d.ts","sourceRoot":"","sources":["../../../src/_ipc/build-fs.ts"],"names":[],"mappings":"AAEA;;;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9B,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`.
|
|
@@ -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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AOG;IACH,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACtD;AAED,sGAAsG;AACtG,wBAAgB,0BAA0B,IAAI,oBAAoB,CAEjE;AAYD,iIAAiI;AACjI,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,EAC1C,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,uBAAuB,CAAC,CAuElC;AAED;;;;;;;;;;;;;;;;;;;;;;;;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/typescript6";
|
|
|
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":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAU9E;;;;GAIG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,CAAA;IAC5E,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wHAAwH;IACxH,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,CAAA;IAC3C,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;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