@maverickcer/env-cap 0.7.4 → 0.7.6
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 +106 -124
- package/AGENTS.md +94 -128
- package/CHANGELOG.md +42 -0
- package/CODE_REVIEW.md +69 -173
- package/CONTRIBUTING.md +57 -74
- package/GUIDE.md +405 -866
- package/README.md +112 -89
- package/RELEASING.md +81 -65
- package/SECURITY.md +76 -227
- package/SUPPORT.md +21 -45
- package/VERSIONING.md +69 -105
- package/benchmarks/READING-BENCHMARKS.md +103 -81
- package/benchmarks/README.md +12 -9
- package/benchmarks/WRITING-BENCHMARKS.md +90 -80
- package/benchmarks/performance-buildtime/BENCHMARKS.md +20 -20
- package/benchmarks/performance-runtime/BENCHMARKS.md +107 -107
- package/dist/.dts/_ipc/build-fs.d.ts +12 -17
- package/dist/.dts/_ipc/build-fs.d.ts.map +1 -1
- package/dist/.dts/_ipc/compiler-api.d.ts +6 -6
- package/dist/.dts/_ipc/display-path.d.ts +1 -1
- package/dist/.dts/_ipc/display-path.d.ts.map +1 -1
- package/dist/.dts/_ipc/generated-banner.d.ts +8 -8
- package/dist/.dts/_ipc/glob.d.ts +9 -8
- 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/no-node-fs.d.ts.map +1 -1
- 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 +90 -83
- 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 +6 -3
- package/dist/.dts/runtime/create.d.ts.map +1 -1
- package/dist/.dts/runtime/document.d.ts +91 -97
- package/dist/.dts/runtime/document.d.ts.map +1 -1
- package/dist/.dts/runtime/errors.d.ts +5 -5
- package/dist/.dts/runtime/index.d.ts +11 -10
- package/dist/.dts/runtime/index.d.ts.map +1 -1
- package/dist/.dts/runtime/reset.d.ts +1 -1
- package/dist/.dts/runtime/types.d.ts +39 -24
- package/dist/.dts/runtime/types.d.ts.map +1 -1
- package/dist/.dts/runtime/validate.d.ts +15 -2
- package/dist/.dts/runtime/validate.d.ts.map +1 -1
- package/dist/.dts7/_ipc/build-fs.d.ts +48 -0
- package/dist/.dts7/_ipc/build-fs.d.ts.map +1 -0
- package/dist/.dts7/_ipc/compiler-api.d.ts +17 -0
- package/dist/.dts7/_ipc/compiler-api.d.ts.map +1 -0
- package/dist/.dts7/_ipc/display-path.d.ts +27 -0
- package/dist/.dts7/_ipc/display-path.d.ts.map +1 -0
- package/dist/.dts7/_ipc/generated-banner.d.ts +58 -0
- package/dist/.dts7/_ipc/generated-banner.d.ts.map +1 -0
- package/dist/.dts7/_ipc/glob.d.ts +23 -0
- package/dist/.dts7/_ipc/glob.d.ts.map +1 -0
- package/dist/.dts7/_ipc/no-node-fs.d.ts +21 -0
- package/dist/.dts7/_ipc/no-node-fs.d.ts.map +1 -0
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts +134 -0
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts.map +1 -0
- package/dist/.dts7/_ipc/typescript.d.ts +20 -0
- package/dist/.dts7/_ipc/typescript.d.ts.map +1 -0
- package/dist/.dts7/build/assemble-project.d.ts +46 -0
- package/dist/.dts7/build/assemble-project.d.ts.map +1 -0
- package/dist/.dts7/build/change-model.d.ts +63 -0
- package/dist/.dts7/build/change-model.d.ts.map +1 -0
- package/dist/.dts7/build/check-artifacts.d.ts +48 -0
- package/dist/.dts7/build/check-artifacts.d.ts.map +1 -0
- package/dist/.dts7/build/citation-verification.d.ts +61 -0
- package/dist/.dts7/build/citation-verification.d.ts.map +1 -0
- package/dist/.dts7/build/compatibility.d.ts +83 -0
- package/dist/.dts7/build/compatibility.d.ts.map +1 -0
- package/dist/.dts7/build/compiler-api.d.ts +12 -0
- package/dist/.dts7/build/compiler-api.d.ts.map +1 -0
- package/dist/.dts7/build/contract-model.d.ts +93 -0
- package/dist/.dts7/build/contract-model.d.ts.map +1 -0
- package/dist/.dts7/build/deep-equal.d.ts +9 -0
- package/dist/.dts7/build/deep-equal.d.ts.map +1 -0
- package/dist/.dts7/build/deep-freeze.d.ts +20 -0
- package/dist/.dts7/build/deep-freeze.d.ts.map +1 -0
- package/dist/.dts7/build/dependency-graph.d.ts +163 -0
- package/dist/.dts7/build/dependency-graph.d.ts.map +1 -0
- package/dist/.dts7/build/dependency-model.d.ts +81 -0
- package/dist/.dts7/build/dependency-model.d.ts.map +1 -0
- package/dist/.dts7/build/discover.d.ts +41 -0
- package/dist/.dts7/build/discover.d.ts.map +1 -0
- package/dist/.dts7/build/display-path.d.ts +6 -0
- package/dist/.dts7/build/display-path.d.ts.map +1 -0
- package/dist/.dts7/build/docs.d.ts +172 -0
- package/dist/.dts7/build/docs.d.ts.map +1 -0
- package/dist/.dts7/build/env-example.d.ts +85 -0
- package/dist/.dts7/build/env-example.d.ts.map +1 -0
- package/dist/.dts7/build/errors.d.ts +78 -0
- package/dist/.dts7/build/errors.d.ts.map +1 -0
- package/dist/.dts7/build/evidence-cache.d.ts +74 -0
- package/dist/.dts7/build/evidence-cache.d.ts.map +1 -0
- package/dist/.dts7/build/evidence-model.d.ts +50 -0
- package/dist/.dts7/build/evidence-model.d.ts.map +1 -0
- package/dist/.dts7/build/evidence-reference.d.ts +67 -0
- package/dist/.dts7/build/evidence-reference.d.ts.map +1 -0
- package/dist/.dts7/build/evidence-snapshot.d.ts +142 -0
- package/dist/.dts7/build/evidence-snapshot.d.ts.map +1 -0
- package/dist/.dts7/build/exclusive-group.d.ts +19 -0
- package/dist/.dts7/build/exclusive-group.d.ts.map +1 -0
- package/dist/.dts7/build/finding-model.d.ts +80 -0
- package/dist/.dts7/build/finding-model.d.ts.map +1 -0
- package/dist/.dts7/build/generate-documentation.d.ts +176 -0
- package/dist/.dts7/build/generate-documentation.d.ts.map +1 -0
- package/dist/.dts7/build/generate-env-artifacts.d.ts +191 -0
- package/dist/.dts7/build/generate-env-artifacts.d.ts.map +1 -0
- package/dist/.dts7/build/generate-evidence.d.ts +77 -0
- package/dist/.dts7/build/generate-evidence.d.ts.map +1 -0
- package/dist/.dts7/build/generate-manifest.d.ts +100 -0
- package/dist/.dts7/build/generate-manifest.d.ts.map +1 -0
- package/dist/.dts7/build/generate-usage.d.ts +94 -0
- package/dist/.dts7/build/generate-usage.d.ts.map +1 -0
- package/dist/.dts7/build/generated-banner.d.ts +43 -0
- package/dist/.dts7/build/generated-banner.d.ts.map +1 -0
- package/dist/.dts7/build/glob.d.ts +6 -0
- package/dist/.dts7/build/glob.d.ts.map +1 -0
- package/dist/.dts7/build/governance-fields.d.ts +34 -0
- package/dist/.dts7/build/governance-fields.d.ts.map +1 -0
- package/dist/.dts7/build/humanize-key.d.ts +14 -0
- package/dist/.dts7/build/humanize-key.d.ts.map +1 -0
- package/dist/.dts7/build/index.d.ts +89 -0
- package/dist/.dts7/build/index.d.ts.map +1 -0
- package/dist/.dts7/build/lifecycle-model.d.ts +181 -0
- package/dist/.dts7/build/lifecycle-model.d.ts.map +1 -0
- package/dist/.dts7/build/link.d.ts +222 -0
- package/dist/.dts7/build/link.d.ts.map +1 -0
- package/dist/.dts7/build/literal-eval.d.ts +24 -0
- package/dist/.dts7/build/literal-eval.d.ts.map +1 -0
- package/dist/.dts7/build/live-expirations.d.ts +48 -0
- package/dist/.dts7/build/live-expirations.d.ts.map +1 -0
- package/dist/.dts7/build/manifest.d.ts +31 -0
- package/dist/.dts7/build/manifest.d.ts.map +1 -0
- package/dist/.dts7/build/map-utils.d.ts +8 -0
- package/dist/.dts7/build/map-utils.d.ts.map +1 -0
- package/dist/.dts7/build/merge-documentation.d.ts +36 -0
- package/dist/.dts7/build/merge-documentation.d.ts.map +1 -0
- package/dist/.dts7/build/ownership-model.d.ts +58 -0
- package/dist/.dts7/build/ownership-model.d.ts.map +1 -0
- package/dist/.dts7/build/parse.d.ts +206 -0
- package/dist/.dts7/build/parse.d.ts.map +1 -0
- package/dist/.dts7/build/reference-projections.d.ts +168 -0
- package/dist/.dts7/build/reference-projections.d.ts.map +1 -0
- package/dist/.dts7/build/resolution/resolve-import.d.ts +62 -0
- package/dist/.dts7/build/resolution/resolve-import.d.ts.map +1 -0
- package/dist/.dts7/build/resolution/resolve-package-schema.d.ts +83 -0
- package/dist/.dts7/build/resolution/resolve-package-schema.d.ts.map +1 -0
- package/dist/.dts7/build/resolution/resolve-tsconfig-paths.d.ts +18 -0
- package/dist/.dts7/build/resolution/resolve-tsconfig-paths.d.ts.map +1 -0
- package/dist/.dts7/build/resolution/resolve-within-root.d.ts +35 -0
- package/dist/.dts7/build/resolution/resolve-within-root.d.ts.map +1 -0
- package/dist/.dts7/build/sarif.d.ts +66 -0
- package/dist/.dts7/build/sarif.d.ts.map +1 -0
- package/dist/.dts7/build/scan-dependencies.d.ts +71 -0
- package/dist/.dts7/build/scan-dependencies.d.ts.map +1 -0
- package/dist/.dts7/build/sort-by-identity.d.ts +14 -0
- package/dist/.dts7/build/sort-by-identity.d.ts.map +1 -0
- package/dist/.dts7/build/source-position.d.ts +69 -0
- package/dist/.dts7/build/source-position.d.ts.map +1 -0
- package/dist/.dts7/build/tool-version.d.ts +8 -0
- package/dist/.dts7/build/tool-version.d.ts.map +1 -0
- package/dist/.dts7/build/types.d.ts +7 -0
- package/dist/.dts7/build/types.d.ts.map +1 -0
- package/dist/.dts7/build/typescript.d.ts +6 -0
- package/dist/.dts7/build/typescript.d.ts.map +1 -0
- package/dist/.dts7/build/usage-report.d.ts +124 -0
- package/dist/.dts7/build/usage-report.d.ts.map +1 -0
- package/dist/.dts7/cli/filesystem.d.ts +7 -0
- package/dist/.dts7/cli/filesystem.d.ts.map +1 -0
- package/dist/.dts7/eslint-plugin/glob.d.ts +7 -0
- package/dist/.dts7/eslint-plugin/glob.d.ts.map +1 -0
- package/dist/.dts7/eslint-plugin/index.d.ts +38 -0
- package/dist/.dts7/eslint-plugin/index.d.ts.map +1 -0
- package/dist/.dts7/eslint-plugin/no-node-fs.d.ts +15 -0
- package/dist/.dts7/eslint-plugin/no-node-fs.d.ts.map +1 -0
- package/dist/.dts7/eslint-plugin/no-raw-process-env.d.ts +23 -0
- package/dist/.dts7/eslint-plugin/no-raw-process-env.d.ts.map +1 -0
- package/dist/.dts7/evidence/define-projection.d.ts +51 -0
- package/dist/.dts7/evidence/define-projection.d.ts.map +1 -0
- package/dist/.dts7/evidence/index.d.ts +19 -0
- package/dist/.dts7/evidence/index.d.ts.map +1 -0
- package/dist/.dts7/helpers/index.d.ts +132 -0
- package/dist/.dts7/helpers/index.d.ts.map +1 -0
- package/dist/.dts7/helpers/processors.d.ts +32 -0
- package/dist/.dts7/helpers/processors.d.ts.map +1 -0
- package/dist/.dts7/helpers/validators.d.ts +68 -0
- package/dist/.dts7/helpers/validators.d.ts.map +1 -0
- package/dist/.dts7/node/index.d.ts +21 -0
- package/dist/.dts7/node/index.d.ts.map +1 -0
- package/dist/.dts7/runtime/cache.d.ts +17 -0
- package/dist/.dts7/runtime/cache.d.ts.map +1 -0
- package/dist/.dts7/runtime/create.d.ts +23 -0
- package/dist/.dts7/runtime/create.d.ts.map +1 -0
- package/dist/.dts7/runtime/document.d.ts +214 -0
- package/dist/.dts7/runtime/document.d.ts.map +1 -0
- package/dist/.dts7/runtime/errors.d.ts +55 -0
- package/dist/.dts7/runtime/errors.d.ts.map +1 -0
- package/dist/.dts7/runtime/index.d.ts +25 -0
- package/dist/.dts7/runtime/index.d.ts.map +1 -0
- package/dist/.dts7/runtime/registry.d.ts +12 -0
- package/dist/.dts7/runtime/registry.d.ts.map +1 -0
- package/dist/.dts7/runtime/reset.d.ts +8 -0
- package/dist/.dts7/runtime/reset.d.ts.map +1 -0
- package/dist/.dts7/runtime/types.d.ts +190 -0
- package/dist/.dts7/runtime/types.d.ts.map +1 -0
- package/dist/.dts7/runtime/validate.d.ts +27 -0
- package/dist/.dts7/runtime/validate.d.ts.map +1 -0
- package/dist/{build-6XFHJFQK.js → build-UEENZEUX.js} +43 -42
- package/dist/build-UEENZEUX.js.map +1 -0
- package/dist/build.cjs +42 -41
- package/dist/build.cjs.map +1 -1
- package/dist/build.js +42 -41
- package/dist/build.js.map +1 -1
- package/dist/build.ts7.d.cts +1 -0
- package/dist/build.ts7.d.ts +1 -0
- package/dist/{chunk-RL5KFVUT.js → chunk-TBL3O7IG.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/eslint-plugin/index.ts7.d.cts +1 -0
- package/dist/eslint-plugin/index.ts7.d.ts +1 -0
- 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/evidence.ts7.d.cts +1 -0
- package/dist/evidence.ts7.d.ts +1 -0
- 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/helpers.ts7.d.cts +1 -0
- package/dist/helpers.ts7.d.ts +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.ts7.d.cts +1 -0
- package/dist/index.ts7.d.ts +1 -0
- package/dist/node.ts7.d.cts +1 -0
- package/dist/node.ts7.d.ts +1 -0
- package/examples/README.md +46 -80
- package/package.json +43 -12
- 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 +147 -122
- package/specs/decisions/0001-runtime-documentation-separation.md +1 -1
- package/specs/decisions/0014-cross-package-schema-discovery.md +4 -1
- package/specs/decisions/0023-tsconfig-path-alias-resolution.md +4 -1
- package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +13 -8
- package/specs/generated-artifacts.md +91 -71
- 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-6XFHJFQK.js.map +0 -1
- /package/dist/{chunk-RL5KFVUT.js.map → chunk-TBL3O7IG.js.map} +0 -0
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import type { DiscoveredContract } from "./link.js";
|
|
2
2
|
/**
|
|
3
3
|
* Supplies expiration metadata from a live source (a secrets manager, an
|
|
4
|
-
* internal inventory API, ...) as a post-discovery override
|
|
4
|
+
* internal inventory API, ...) as a post-discovery override: the one
|
|
5
5
|
* sanctioned escape hatch from static-only `expiresAt`.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Invoked exactly once per generation run, from the orchestration layer, after AST discovery/
|
|
9
9
|
* linking completes and before documentation is rendered. Never invoked
|
|
10
|
-
* during AST parsing or runtime validation
|
|
10
|
+
* during AST parsing or runtime validation: see ADR 0012 for why a
|
|
11
11
|
* function embedded in a schema file itself was rejected instead.
|
|
12
12
|
*/
|
|
13
13
|
export type LiveExpirationDates = (variableNames: readonly string[]) => Promise<Readonly<Record<string, string>>>;
|
|
14
14
|
/**
|
|
15
15
|
* Every unique variable key across every linked contract's `variables`.
|
|
16
|
-
* Contract-level `expiresAt` is out of scope for override
|
|
16
|
+
* Contract-level `expiresAt` is out of scope for override: the callback is
|
|
17
17
|
* keyed by variable name, not contract name.
|
|
18
18
|
*/
|
|
19
19
|
export declare function collectVariableNames(contracts: readonly DiscoveredContract[]): string[];
|
|
20
20
|
/**
|
|
21
|
-
* Applies `overrides` onto a fresh copy of `contracts
|
|
21
|
+
* Applies `overrides` onto a fresh copy of `contracts`. Every contract and
|
|
22
22
|
* every variable (and their nested `metadata`/`extra` records) is rebuilt
|
|
23
|
-
* into a new object, never the original reference
|
|
24
|
-
* shares no mutable object identity with `contracts` at any depth.
|
|
23
|
+
* into a new object, never the original reference. The returned structure
|
|
24
|
+
* therefore shares no mutable object identity with `contracts` at any depth.
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
27
|
* A key absent from `overrides`, or present but not a `parseIsoDate`-parseable
|
|
28
|
-
* ISO-8601 string, leaves that variable's static `expiresAt` untouched
|
|
28
|
+
* ISO-8601 string, leaves that variable's static `expiresAt` untouched:
|
|
29
29
|
* same "warn/skip, never guess" policy the rest of the generator uses for
|
|
30
30
|
* malformed data. Contract-level `expiresAt` is never touched; only
|
|
31
31
|
* variable-level `expiresAt` is in scope for override.
|
|
32
32
|
*/
|
|
33
33
|
export declare function applyLiveExpirationOverrides(contracts: readonly DiscoveredContract[], overrides: Readonly<Record<string, string>>): readonly DiscoveredContract[];
|
|
34
34
|
/**
|
|
35
|
-
* Orchestration entry point
|
|
35
|
+
* Orchestration entry point: the only place `liveExpirationDates` is ever invoked.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
38
|
* No-ops (returns the exact same array reference, zero invocations)
|
|
39
39
|
* when `liveExpirationDates` is undefined, which is what guarantees "omitted ->
|
|
40
|
-
* behavior unchanged." Otherwise collects the unique discovered variable
|
|
41
|
-
* names, invokes the callback exactly once
|
|
42
|
-
* deep-freezes the returned structure so
|
|
43
|
-
*
|
|
44
|
-
* the
|
|
40
|
+
* behavior unchanged." Otherwise it collects the unique discovered variable
|
|
41
|
+
* names, invokes the callback exactly once and applies the result. It
|
|
42
|
+
* deep-freezes the returned structure so no mutation of it can reach
|
|
43
|
+
* `contracts` or anything else downstream. `contracts` is used elsewhere too,
|
|
44
|
+
* e.g. by the manifest and usage passes in the same
|
|
45
|
+
* {@link generateEnvArtifacts} run.
|
|
45
46
|
*/
|
|
46
47
|
export declare function resolveLiveExpirationDates(contracts: readonly DiscoveredContract[], liveExpirationDates: LiveExpirationDates | undefined): Promise<readonly DiscoveredContract[]>;
|
|
47
48
|
//# sourceMappingURL=live-expirations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-expirations.d.ts","sourceRoot":"","sources":["../../../src/build/live-expirations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,WAAW,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,aAAa,EAAE,SAAS,MAAM,EAAE,KAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAMvF;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,SAAS,kBAAkB,EAAE,CAM/B;AAED
|
|
1
|
+
{"version":3,"file":"live-expirations.d.ts","sourceRoot":"","sources":["../../../src/build/live-expirations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,WAAW,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,aAAa,EAAE,SAAS,MAAM,EAAE,KAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAMvF;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,SAAS,kBAAkB,EAAE,CAM/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,GACnD,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAIxC"}
|
|
@@ -2,7 +2,7 @@ import type { DiscoveredContract } from "./link.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Every validation context declared by any variable in an *active* contract
|
|
4
4
|
* in `contracts` (a variable belonging to a contract documented `active:
|
|
5
|
-
* false` never contributes
|
|
5
|
+
* false` never contributes: same exclusion the `manifest` array itself
|
|
6
6
|
* already applies), sorted and deduplicated. What {@link renderManifest}
|
|
7
7
|
* surfaces as the generated `activeContexts` export. Exported for reuse by
|
|
8
8
|
* anything that needs the same computation (currently just `renderManifest`
|
|
@@ -12,17 +12,17 @@ export declare function discoverValidationContexts(contracts: readonly Discovere
|
|
|
12
12
|
/**
|
|
13
13
|
* Renders the deterministic manifest source: sorted imports (aliased on name
|
|
14
14
|
* collision) plus a `contracts` array, in the exact banner format schema
|
|
15
|
-
* authors will recognize as generated. No timestamps, no randomness
|
|
15
|
+
* authors will recognize as generated. No timestamps, no randomness: same
|
|
16
16
|
* input files always produce byte-identical output.
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* When at least one discovered variable declares a `context` (ADR 0022),
|
|
20
|
-
* this also emits `activeContexts
|
|
21
|
-
* `contracts`, as a plain array
|
|
22
|
-
* own `activeContexts` field
|
|
20
|
+
* this also emits `activeContexts`: every validation context found across
|
|
21
|
+
* `contracts`, as a plain array. Its name matches {@link runtime.validateEnvOptions}'s
|
|
22
|
+
* own `activeContexts` field, so application code can import it alongside
|
|
23
23
|
* `manifest` and pass it straight through: `validateEnv({ manifest, values, activeContexts })`.
|
|
24
24
|
* It's every context this manifest has, meant as a starting point to narrow
|
|
25
|
-
* per process/deployment, not a pre-scoped default
|
|
25
|
+
* per process/deployment, not a pre-scoped default: see the README's
|
|
26
26
|
* "Validation contexts" section. Omitted entirely (not even an empty array)
|
|
27
27
|
* when no variable declares a `context` at all, so generated output for
|
|
28
28
|
* projects that don't use this feature is untouched.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `map.get(key)` after iterating `map`'s own `.keys()` is always defined
|
|
3
|
-
*
|
|
4
|
-
* `!` non-null assertion at each call site
|
|
5
|
-
*
|
|
2
|
+
* `map.get(key)` after iterating `map`'s own `.keys()` is always defined.
|
|
3
|
+
* This makes that invariant an explicit, named operation instead of a bare
|
|
4
|
+
* `!` non-null assertion at each call site. A future bug that violates it
|
|
5
|
+
* gets a real error, not a silent `undefined`.
|
|
6
6
|
*/
|
|
7
7
|
export declare function mustGet<K, V>(map: ReadonlyMap<K, V>, key: K): V;
|
|
8
8
|
//# sourceMappingURL=map-utils.d.ts.map
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import type { DiscoveredContract, DiscoveredVariable } from "./link.js";
|
|
2
2
|
/**
|
|
3
3
|
* Every documentation field of a variable that a second declaration of it can supply. `metadata` is merged key by
|
|
4
|
-
* key rather than as one value, so it is handled on its own below. `evidence` is not one of them
|
|
5
|
-
* point at the declaring contract's own code and are re-verified there every run (ADR 0037)
|
|
6
|
-
* contract that wrote them and are never copied to, or compared with, another declaration.
|
|
4
|
+
* key rather than as one value, so it is handled on its own below. `evidence` is not one of them. Its citations
|
|
5
|
+
* point at the declaring contract's own code and are re-verified there every run (ADR 0037). So they stay with the
|
|
6
|
+
* contract that wrote them, and are never copied to, or compared with, another declaration.
|
|
7
7
|
*/
|
|
8
8
|
export declare const VALUE_FIELDS: readonly ["description", "owner", "sensitivity", "expiresAt", "refreshInstructions", "authenticatorType", "rotationPeriod", "lastRotatedAt", "rotationTriggerEvents", "setupInstructions", "required", "deprecated", "deprecatedReason", "removeBy", "renamedFrom", "purpose", "legalBasis", "retention", "dataResidency", "auditRequired"];
|
|
9
9
|
/**
|
|
10
10
|
* Fills what one declaration of a variable leaves unset from the other declarations of the same variable.
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* A variable can be declared in more than one contract
|
|
13
|
+
* A variable can be declared in more than one contract. A package that ships its own contract (see
|
|
14
14
|
* {@link ../README} "Reusable packages") and the application that consumes it both name the same environment
|
|
15
15
|
* variable, because the process has one flat namespace. Writing the explanation twice is how the two drift, so the
|
|
16
16
|
* declaration that carries it can be the one place it is written, and the other adds only what is its own (the
|
|
17
17
|
* application's own `expiresAt`, say).
|
|
18
18
|
*
|
|
19
19
|
* Every field a declaration leaves unset is taken from another declaration that sets it, as long as one of the two
|
|
20
|
-
* is a package's contract
|
|
21
|
-
* first package's over a later one's
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* is a package's contract. When several set it, a package's contract wins over the application's own, and the
|
|
21
|
+
* first package's wins over a later one's. The application's own contracts fill a gap only when all of them that set
|
|
22
|
+
* it agree. Two of the application's own contracts never fill each other: they are siblings, often alternatives,
|
|
23
|
+
* and each documents the variable for itself. A field a declaration sets itself is never replaced. So two
|
|
24
|
+
* declarations that set the same field differently still differ afterwards, and the compatibility check can say so. `metadata` is merged key by key under
|
|
24
25
|
* the same rule. Pure: the contracts passed in are not changed.
|
|
25
26
|
*/
|
|
26
27
|
export declare function mergeSharedDocumentation(contracts: readonly DiscoveredContract[]): readonly DiscoveredContract[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-documentation.d.ts","sourceRoot":"","sources":["../../../src/build/merge-documentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,6UAqBiC,CAAA;AAQ1D
|
|
1
|
+
{"version":3,"file":"merge-documentation.d.ts","sourceRoot":"","sources":["../../../src/build/merge-documentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,6UAqBiC,CAAA;AAQ1D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GACvC,SAAS,kBAAkB,EAAE,CA6B/B;AA8DD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,WAAW,CAAC,MAAM,CAAC,CAE3E"}
|
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import type { ContractRef } from "./evidence-reference.js";
|
|
2
2
|
import type { DiscoveredContract } from "./link.js";
|
|
3
3
|
/**
|
|
4
|
-
* The third of env-cap's seven canonical fact models (ADR 0024)
|
|
4
|
+
* The third of env-cap's seven canonical fact models (ADR 0024): every
|
|
5
5
|
* contract and variable's effective owner, plus first-class
|
|
6
6
|
* `unownedContracts`/`unownedVariables` arrays. See ADR 0028.
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* "
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* owns a variable.
|
|
9
|
+
* `docs.ts`'s security review holds "unowned" only as a count
|
|
10
|
+
* (`noOwnerCount`); this model itemizes it as data. It uses the same
|
|
11
|
+
* `effectiveOwner()` rule (variable overrides contract) as `docs.ts` and
|
|
12
|
+
* `usage-report.ts`'s ownership findings (ADR 0028). So this model can never
|
|
13
|
+
* disagree with either of them about who owns a variable.
|
|
15
14
|
*/
|
|
16
|
-
/** Bump only when a reader could misinterpret the new shape
|
|
15
|
+
/** Bump only when a reader could misinterpret the new shape: same discipline every other canonical model's `schemaVersion` follows. */
|
|
17
16
|
export declare const OWNERSHIP_MODEL_SCHEMA_VERSION = 1;
|
|
18
17
|
/**
|
|
19
18
|
* One variable's effective owner (its own, falling back to the contract's).
|
|
20
19
|
*
|
|
21
|
-
* @see {@link ContractModelVariable}
|
|
20
|
+
* @see {@link ContractModelVariable}: this same declared variable's canonical starting point.
|
|
22
21
|
*/
|
|
23
22
|
export interface OwnershipModelVariable {
|
|
24
23
|
readonly key: string;
|
|
25
|
-
/** The variable's own `owner`, falling back to the contract's
|
|
24
|
+
/** The variable's own `owner`, falling back to the contract's: see `effectiveOwner()`. */
|
|
26
25
|
readonly owner: string | undefined;
|
|
27
26
|
}
|
|
28
27
|
/** One contract's own default owner plus every variable's effective owner. See {@link OwnershipModelVariable} for the per-variable shape. */
|
|
29
28
|
export interface OwnershipModelContract {
|
|
30
|
-
/** Root-relative, POSIX-separated
|
|
29
|
+
/** Root-relative, POSIX-separated: matches `ContractModelContract.file`. */
|
|
31
30
|
readonly file: string;
|
|
32
31
|
readonly exportName: string;
|
|
33
32
|
readonly contractName: string;
|
|
34
|
-
/** The contract's own default owner
|
|
33
|
+
/** The contract's own default owner: not "effective" the way a variable's is, since there's no level above a contract to fall back to. */
|
|
35
34
|
readonly owner: string | undefined;
|
|
36
35
|
readonly variables: readonly OwnershipModelVariable[];
|
|
37
36
|
}
|
|
38
|
-
/** One contract, referenced by identity only
|
|
37
|
+
/** One contract, referenced by identity only: see {@link ContractRef} for why no `contractName` is carried here. Resolve one from `ContractModel` when a renderer needs display text. */
|
|
39
38
|
export type OwnershipModelContractRef = ContractRef;
|
|
40
|
-
/** One variable, referenced by its owning contract's identity plus its own key
|
|
39
|
+
/** One variable, referenced by its owning contract's identity plus its own key: see {@link ContractRef}. */
|
|
41
40
|
export interface OwnershipModelVariableRef extends ContractRef {
|
|
42
41
|
readonly key: string;
|
|
43
42
|
}
|
|
44
|
-
/** The versioned, JSON-serializable root of the Ownership Model
|
|
43
|
+
/** The versioned, JSON-serializable root of the Ownership Model: see this module's own doc comment for the full picture. */
|
|
45
44
|
export interface OwnershipModel {
|
|
46
45
|
readonly schemaVersion: typeof OWNERSHIP_MODEL_SCHEMA_VERSION;
|
|
47
46
|
readonly contracts: readonly OwnershipModelContract[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownership-model.d.ts","sourceRoot":"","sources":["../../../src/build/ownership-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD
|
|
1
|
+
{"version":3,"file":"ownership-model.d.ts","sourceRoot":"","sources":["../../../src/build/ownership-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MA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|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type TS from "typescript";
|
|
2
2
|
import type { EnvGovernanceFields } from "./governance-fields.js";
|
|
3
3
|
import type { SourcePosition } from "./source-position.js";
|
|
4
|
-
/** A recoverable issue found while statically parsing or linking one schema file
|
|
4
|
+
/** A recoverable issue found while statically parsing or linking one schema file: never fatal, always surfaced to the caller as data. */
|
|
5
5
|
export interface ParseWarning {
|
|
6
6
|
/** Absolute path of the file the warning applies to. */
|
|
7
7
|
readonly file: string;
|
|
@@ -10,8 +10,8 @@ export interface ParseWarning {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* How a `createEnv`/`documentEnv` call's first argument resolves, before any
|
|
13
|
-
* cross-file linking is attempted
|
|
14
|
-
*
|
|
13
|
+
* cross-file linking is attempted. Linking is `link.ts`'s job; this module
|
|
14
|
+
* only ever looks at one file's own AST.
|
|
15
15
|
*/
|
|
16
16
|
export type SchemaRef = {
|
|
17
17
|
/** Discriminant: the schema argument is an inline object literal. */
|
|
@@ -29,7 +29,7 @@ export type SchemaRef = {
|
|
|
29
29
|
};
|
|
30
30
|
/** One `createEnv(...)` call site, as found by {@link parseSchemaFile}, before cross-file linking. */
|
|
31
31
|
interface RawCreateEnvCall {
|
|
32
|
-
/** The binding name the call result is assigned to (must be exported to be usable
|
|
32
|
+
/** The binding name the call result is assigned to (must be exported to be usable: see {@link parseSchemaFile}). */
|
|
33
33
|
readonly exportName: string;
|
|
34
34
|
/** How the first (schema) argument resolves within this file. */
|
|
35
35
|
readonly schemaRef: SchemaRef;
|
|
@@ -51,7 +51,7 @@ interface RawDocumentEnvCall {
|
|
|
51
51
|
export interface ImportBinding {
|
|
52
52
|
/** The raw module specifier as written in the import (e.g. `"./payments.schema.js"`). */
|
|
53
53
|
readonly specifier: string;
|
|
54
|
-
/** The name as exported by the source module
|
|
54
|
+
/** The name as exported by the source module: accounts for `import { real as local }`. */
|
|
55
55
|
readonly importedName: string;
|
|
56
56
|
}
|
|
57
57
|
/** The raw, single-file facts extracted by {@link parseSchemaFile}. */
|
|
@@ -74,13 +74,13 @@ export interface FileParseResult {
|
|
|
74
74
|
readonly warnings: readonly ParseWarning[];
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Structurally parses one file's AST for everything the generator needs
|
|
78
|
-
* `createEnv(...)`/`documentEnv(...)` call sites, the local
|
|
79
|
-
* declarations and imports
|
|
80
|
-
*
|
|
77
|
+
* Structurally parses one file's AST for everything the generator needs. That
|
|
78
|
+
* is the `createEnv(...)`/`documentEnv(...)` call sites, plus the local
|
|
79
|
+
* `const` declarations and imports that resolve an identifier passed to
|
|
80
|
+
* either.
|
|
81
81
|
*
|
|
82
82
|
* @remarks
|
|
83
|
-
* Never type-checks or executes the file
|
|
83
|
+
* Never type-checks or executes the file: see `link.ts` for how
|
|
84
84
|
* these raw facts get resolved into actual schema/docs data, including
|
|
85
85
|
* across files.
|
|
86
86
|
*/
|
|
@@ -89,21 +89,20 @@ export declare function parseSchemaFile(filePath: string, sourceText: string): F
|
|
|
89
89
|
* Collects named import bindings from one `import` statement into `imports`, keyed by local name.
|
|
90
90
|
*
|
|
91
91
|
* @remarks
|
|
92
|
-
* Exported for reuse by `scan-dependencies.ts
|
|
93
|
-
* alias-aware named-import tracking this file
|
|
94
|
-
*
|
|
95
|
-
* files.
|
|
92
|
+
* Exported for reuse by `scan-dependencies.ts`. It needs the same
|
|
93
|
+
* alias-aware named-import tracking this file does for schema linking. It
|
|
94
|
+
* applies it to arbitrary application source instead of schema files.
|
|
96
95
|
*
|
|
97
96
|
* @param imports - Mutated in place; a binding re-collected under the same local name overwrites the previous entry.
|
|
98
97
|
*/
|
|
99
98
|
export declare function collectImportBindings(statement: TS.ImportDeclaration, imports: Map<string, ImportBinding>): void;
|
|
100
|
-
/** One schema entry's statically-discoverable shape
|
|
99
|
+
/** One schema entry's statically-discoverable shape: presence facts, never evaluated/executed values. */
|
|
101
100
|
export interface DiscoveredSchemaVariable {
|
|
102
101
|
/** The environment variable name (the schema's object key). */
|
|
103
102
|
readonly key: string;
|
|
104
103
|
/** Whether the entry declares a `default`. */
|
|
105
104
|
readonly hasDefault: boolean;
|
|
106
|
-
/** The default's statically-evaluated literal value, if `hasDefault` and it was a literal we could evaluate
|
|
105
|
+
/** The default's statically-evaluated literal value, if `hasDefault` and it was a literal we could evaluate: `{ ok: false }` when present but not statically resolvable, `undefined` when absent. */
|
|
107
106
|
readonly defaultValue: {
|
|
108
107
|
/** Always `true` in this branch. */
|
|
109
108
|
ok: true;
|
|
@@ -117,7 +116,7 @@ export interface DiscoveredSchemaVariable {
|
|
|
117
116
|
readonly hasProcessor: boolean;
|
|
118
117
|
/** The processor function's source text, normalized to single-line, if `hasProcessor`. */
|
|
119
118
|
readonly processorSource: string | undefined;
|
|
120
|
-
/** Only present when the processor has an explicit `: T` return type annotation
|
|
119
|
+
/** Only present when the processor has an explicit `: T` return type annotation: the one thing we treat as provable. */
|
|
121
120
|
readonly processorReturnType: string | undefined;
|
|
122
121
|
/** Whether the entry declares a `validator`. */
|
|
123
122
|
readonly hasValidator: boolean;
|
|
@@ -125,7 +124,7 @@ export interface DiscoveredSchemaVariable {
|
|
|
125
124
|
readonly validatorSource: string | undefined;
|
|
126
125
|
/** The variable's statically-resolved `context`, if set to a non-empty string literal (see ADR 0022). `undefined` when absent, non-literal, or empty. */
|
|
127
126
|
readonly context: string | undefined;
|
|
128
|
-
/** Where this variable's own schema property (e.g. `SESSION_SECRET: z.string()`) is declared
|
|
127
|
+
/** Where this variable's own schema property (e.g. `SESSION_SECRET: z.string()`) is declared: distinct from the *contract's* `declaration`/`documentation` (`link.ts`); every variable has exactly one of these, always. See ADR 0036. */
|
|
129
128
|
readonly declaration: SourcePosition;
|
|
130
129
|
}
|
|
131
130
|
/**
|
|
@@ -136,7 +135,7 @@ export interface DiscoveredSchemaVariable {
|
|
|
136
135
|
* @param warnings - Mutated in place: one entry is pushed per skipped (non-static, invalid-key, or non-literal) property.
|
|
137
136
|
*/
|
|
138
137
|
export declare function extractSchemaVariables(schemaLiteral: TS.ObjectLiteralExpression, filePath: string, contextLabel: string, warnings: ParseWarning[], sourceFile: TS.SourceFile): DiscoveredSchemaVariable[];
|
|
139
|
-
/** One variable's statically-extracted `documentEnv()` documentation, as declared in that call's `variables` entry for this key
|
|
138
|
+
/** One variable's statically-extracted `documentEnv()` documentation, as declared in that call's `variables` entry for this key: governance fields (`owner` .. `metadata`) are `EnvGovernanceFields`, resolved from static literals. */
|
|
140
139
|
export interface DiscoveredVariableDocs extends EnvGovernanceFields {
|
|
141
140
|
/** The environment variable name this documentation applies to. */
|
|
142
141
|
readonly key: string;
|
|
@@ -164,12 +163,12 @@ export interface DiscoveredVariableDocs extends EnvGovernanceFields {
|
|
|
164
163
|
readonly removeBy: string | undefined;
|
|
165
164
|
/** Statically-resolved `renamedFrom`, if set to a string literal. */
|
|
166
165
|
readonly renamedFrom: string | undefined;
|
|
167
|
-
/** Statically-extracted `evidence` sub-object
|
|
166
|
+
/** Statically-extracted `evidence` sub-object: the re-verified-every-run half of a variable's documentation, kept structurally apart from the declared-only fields above. `undefined` when the declaration has no `evidence` key at all. See {@link runtime.VariableEvidenceDocs} and ADR 0037. */
|
|
168
167
|
readonly evidence: DiscoveredVariableEvidence | undefined;
|
|
169
168
|
}
|
|
170
169
|
/** The statically-extracted contents of one variable's `evidence` sub-object. See {@link runtime.VariableEvidenceDocs}. */
|
|
171
170
|
export interface DiscoveredVariableEvidence {
|
|
172
|
-
/** Well-formed `"path:line:column"` entries from `evidence.dynamicAccess`, if set to an array of string literals
|
|
171
|
+
/** Well-formed `"path:line:column"` entries from `evidence.dynamicAccess`, if set to an array of string literals: a malformed entry warns and is dropped, never included here. See ADR 0037. */
|
|
173
172
|
readonly dynamicAccess: readonly string[] | undefined;
|
|
174
173
|
}
|
|
175
174
|
/** A contract's statically-extracted `documentEnv()` documentation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/build/parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAiB1D,
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/build/parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAiB1D,yIAAyI;AACzI,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB;IACE,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAuB,CAAA;CAC1C,GACD;IACE,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,GACD;IACE,mGAAmG;IACnG,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAC9B,CAAA;AAEL,sGAAsG;AACtG,UAAU,gBAAgB;IACxB,oHAAoH;IACpH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,CAAA;IAC9C,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vE,mLAAmL;AACnL,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,wEAAwE;IACxE,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,gGAAgG;IAChG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;IACxC,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7C,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAA;CAChE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,EAClC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,YAAY,EAAE,GACvB,sBAAsB,CAwLxB;AAiKD,kRAAkR;AAClR,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,GACpC,MAAM,GAAG,SAAS,CASpB"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* env-cap's own built-in reference projections
|
|
3
|
-
* same public `defineEvidenceProjection()` a consumer would use (ADR
|
|
4
|
-
* 0031/0032)
|
|
5
|
-
* Evidence Model.
|
|
2
|
+
* env-cap's own built-in reference projections. They are declared through
|
|
3
|
+
* the same public `defineEvidenceProjection()` a consumer would use (ADR
|
|
4
|
+
* 0031/0032). There is no privileged internal path, and no second way of
|
|
5
|
+
* reading the Evidence Model.
|
|
6
6
|
*
|
|
7
|
-
* This is deliberate dogfooding, not a convenience layer
|
|
7
|
+
* This is deliberate dogfooding, not a convenience layer. `renderDocs()`'s
|
|
8
8
|
* Catalog/ownership/lifecycle sections and `renderUsageReport()`'s ownership
|
|
9
|
-
* table
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* reporting it.
|
|
9
|
+
* table source their data through these projections. So env-cap's own
|
|
10
|
+
* generated output exercises the extensibility API on every run. If a
|
|
11
|
+
* projector here can't express something, that's a real gap in the public
|
|
12
|
+
* API. It shows up in env-cap's own output, before a consumer has to report it.
|
|
14
13
|
*
|
|
15
14
|
* Every projection is pure and derives *only* from `EvidenceModel`. None
|
|
16
|
-
* reads the filesystem, and none reaches back into `DiscoveredContract
|
|
15
|
+
* reads the filesystem, and none reaches back into `DiscoveredContract`:
|
|
17
16
|
* that would defeat the point, since a consumer only ever has the model.
|
|
18
17
|
*/
|
|
19
18
|
import type { EvidenceProjectionResult } from "../evidence/define-projection.js";
|
|
@@ -23,7 +22,7 @@ export interface ConfigurationReferenceEntry {
|
|
|
23
22
|
/** Root-relative, POSIX-separated path of the declaring contract. */
|
|
24
23
|
readonly file: string;
|
|
25
24
|
readonly exportName: string;
|
|
26
|
-
/** The declaring contract's display name, resolved from Contract Model
|
|
25
|
+
/** The declaring contract's display name, resolved from Contract Model: the one model that owns it. */
|
|
27
26
|
readonly contractName: string;
|
|
28
27
|
readonly key: string;
|
|
29
28
|
readonly description: string | undefined;
|
|
@@ -36,17 +35,17 @@ export interface ConfigurationReferenceEntry {
|
|
|
36
35
|
readonly hasProcessor: boolean;
|
|
37
36
|
readonly hasValidator: boolean;
|
|
38
37
|
readonly expiresAt: string | undefined;
|
|
39
|
-
/** Whether the declaring contract is active. Inactive contracts are included
|
|
38
|
+
/** Whether the declaring contract is active. Inactive contracts are included: the reference documents everything discovered, same scope the Catalog always had. */
|
|
40
39
|
readonly active: boolean;
|
|
41
40
|
}
|
|
42
41
|
/** The Configuration Reference projection's output shape. */
|
|
43
42
|
export interface ConfigurationReference extends Record<string, unknown> {
|
|
44
|
-
/** The standing "declared, not verified" notice
|
|
43
|
+
/** The standing "declared, not verified" notice: see `evidenceDisclaimer()`. Carried in the data, not only in a renderer, so a consumer projecting this to their own format can't accidentally drop it. */
|
|
45
44
|
readonly disclaimer: string;
|
|
46
45
|
/** Every declared variable across every discovered contract, sorted by contract file, then export name, then key. */
|
|
47
46
|
readonly entries: readonly ConfigurationReferenceEntry[];
|
|
48
47
|
}
|
|
49
|
-
/** The minimal shape {@link groupVariablesByOwner} needs
|
|
48
|
+
/** The minimal shape {@link groupVariablesByOwner} needs. It is structural, not pinned to one model. So one grouping serves `OwnershipModel`'s already-resolved owners and `ContractModel`'s raw ones alike. */
|
|
50
49
|
export interface OwnerBearingContract {
|
|
51
50
|
readonly owner: string | undefined;
|
|
52
51
|
readonly variables: readonly unknown[];
|
|
@@ -60,18 +59,18 @@ type VariableOf<C> = C extends {
|
|
|
60
59
|
* its contract's), preserving input order within each owner.
|
|
61
60
|
*
|
|
62
61
|
* @remarks
|
|
63
|
-
* The single implementation of "who owns what, rolled up per owner"
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
62
|
+
* The single implementation of "who owns what, rolled up per owner". The
|
|
63
|
+
* {@link ownershipSummary} projection and `docs.ts`'s rendered ownership
|
|
64
|
+
* matrix share it. One function means env-cap's generated Markdown and the
|
|
65
|
+
* projection a consumer reads can never disagree about the grouping. That is
|
|
66
|
+
* also why `effectiveOwner()` is the single resolution rule (ADR 0028).
|
|
67
|
+
* Variables with no effective owner are omitted entirely. A synthetic
|
|
68
|
+
* `"unowned"` bucket would read as a real team name. Callers that need them
|
|
69
|
+
* ask for them separately.
|
|
71
70
|
*
|
|
72
|
-
*
|
|
71
|
+
* The caller supplies `ownerOf`. So a model whose owners are already
|
|
73
72
|
* resolved (`OwnershipModel`) and one whose aren't (`ContractModel`) both
|
|
74
|
-
* work without this function guessing which it was handed.
|
|
73
|
+
* work, without this function guessing which it was handed.
|
|
75
74
|
*/
|
|
76
75
|
export declare function groupVariablesByOwner<C extends OwnerBearingContract>(contracts: readonly C[], ownerOf: (contract: C, variable: VariableOf<C>) => string | undefined): ReadonlyMap<string, readonly {
|
|
77
76
|
contract: C;
|
|
@@ -83,9 +82,9 @@ export declare function groupVariablesByOwner<C extends OwnerBearingContract>(co
|
|
|
83
82
|
*
|
|
84
83
|
* @remarks
|
|
85
84
|
* Resolution (variable's own value falling back to its contract's) happens
|
|
86
|
-
* here rather than being left to each consumer
|
|
87
|
-
* projection can never disagree about who owns a variable
|
|
88
|
-
* `effectiveOwner()` exists on the generator side (ADR 0028).
|
|
85
|
+
* here rather than being left to each consumer. So two readers of this
|
|
86
|
+
* projection can never disagree about who owns a variable. That is the same
|
|
87
|
+
* reason `effectiveOwner()` exists on the generator side (ADR 0028).
|
|
89
88
|
*/
|
|
90
89
|
export declare function configurationReference(evidence: EvidenceModel): ConfigurationReference;
|
|
91
90
|
export declare namespace configurationReference {
|
|
@@ -111,7 +110,7 @@ export interface OwnershipSummary extends Record<string, unknown> {
|
|
|
111
110
|
readonly unowned: readonly string[];
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
114
|
-
* Ownership summary: the inverse of Ownership Model's per-contract view
|
|
113
|
+
* Ownership summary: the inverse of Ownership Model's per-contract view;
|
|
115
114
|
* who owns what, rolled up per owner, plus an explicit unowned list.
|
|
116
115
|
*/
|
|
117
116
|
export declare function ownershipSummary(evidence: EvidenceModel): OwnershipSummary;
|
|
@@ -128,11 +127,11 @@ export interface ExpiringSoonEntry {
|
|
|
128
127
|
readonly contractName: string;
|
|
129
128
|
/** `undefined` for a contract-level expiry, set for a per-variable one. */
|
|
130
129
|
readonly key: string | undefined;
|
|
131
|
-
/** The raw ISO date string, exactly as declared
|
|
130
|
+
/** The raw ISO date string, exactly as declared: never reformatted. */
|
|
132
131
|
readonly expiresAt: string;
|
|
133
132
|
/** Days remaining as of the run that produced this evidence; negative when already expired. */
|
|
134
133
|
readonly daysRemaining: number;
|
|
135
|
-
/** `true` when `daysRemaining` is negative
|
|
134
|
+
/** `true` when `daysRemaining` is negative: the deadline has already passed. */
|
|
136
135
|
readonly expired: boolean;
|
|
137
136
|
/** How to obtain a replacement value, if the declaration says. */
|
|
138
137
|
readonly refreshInstructions: string | undefined;
|
|
@@ -150,16 +149,15 @@ export interface ExpiringSoonReport extends Record<string, unknown> {
|
|
|
150
149
|
}
|
|
151
150
|
/**
|
|
152
151
|
* Expiring-Soon report: Lifecycle Model's `expiring` view, joined with
|
|
153
|
-
* ownership and refresh instructions
|
|
152
|
+
* ownership and refresh instructions. A reader can act on a row without
|
|
154
153
|
* cross-referencing three other models by hand.
|
|
155
154
|
*
|
|
156
155
|
* @remarks
|
|
157
|
-
* The window itself was applied upstream, when Lifecycle Model was built
|
|
158
|
-
*
|
|
159
|
-
* Recomputing "soon" here would
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* preserve.
|
|
156
|
+
* The window itself was applied upstream, when Lifecycle Model was built.
|
|
157
|
+
* This projection deliberately does not re-filter by a date of its own.
|
|
158
|
+
* Recomputing "soon" here would tie the answer to when it was *read*, not
|
|
159
|
+
* when the evidence was *generated*. The Evidence Model exists to preserve
|
|
160
|
+
* exactly that reproducibility.
|
|
163
161
|
*/
|
|
164
162
|
export declare function expiringSoonReport(evidence: EvidenceModel): ExpiringSoonReport;
|
|
165
163
|
export declare namespace expiringSoonReport {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-projections.d.ts","sourceRoot":"","sources":["../../../src/build/reference-projections.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reference-projections.d.ts","sourceRoot":"","sources":["../../../src/build/reference-projections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,kCAAkC,CAAA;AAGzC,O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