@maverickcer/env-cap 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADOPTION.md +4 -4
- package/AGENTS.md +2 -3
- package/CHANGELOG.md +27 -0
- package/CODE_REVIEW.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/GUIDE.md +12 -12
- package/README.md +11 -12
- package/VERSIONING.md +2 -1
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +3 -4
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts/build/assemble-project.d.ts +3 -3
- package/dist/.dts/build/change-model.d.ts +9 -11
- package/dist/.dts/build/change-model.d.ts.map +1 -1
- package/dist/.dts/build/check-artifacts.d.ts +5 -6
- package/dist/.dts/build/check-artifacts.d.ts.map +1 -1
- package/dist/.dts/build/citation-verification.d.ts +6 -7
- package/dist/.dts/build/citation-verification.d.ts.map +1 -1
- package/dist/.dts/build/contract-model.d.ts +7 -8
- package/dist/.dts/build/contract-model.d.ts.map +1 -1
- package/dist/.dts/build/deep-equal.d.ts +3 -3
- package/dist/.dts/build/deep-freeze.d.ts +5 -7
- package/dist/.dts/build/deep-freeze.d.ts.map +1 -1
- package/dist/.dts/build/dependency-model.d.ts +2 -2
- package/dist/.dts/build/dependency-model.d.ts.map +1 -1
- package/dist/.dts/build/discover.d.ts +6 -6
- package/dist/.dts/build/discover.d.ts.map +1 -1
- package/dist/.dts/build/env-example.d.ts +6 -7
- package/dist/.dts/build/env-example.d.ts.map +1 -1
- package/dist/.dts/build/errors.d.ts +4 -4
- package/dist/.dts/build/evidence-cache.d.ts +12 -14
- package/dist/.dts/build/evidence-cache.d.ts.map +1 -1
- package/dist/.dts/build/evidence-model.d.ts +6 -7
- package/dist/.dts/build/evidence-model.d.ts.map +1 -1
- package/dist/.dts/build/evidence-reference.d.ts +6 -6
- package/dist/.dts/build/evidence-reference.d.ts.map +1 -1
- package/dist/.dts/build/exclusive-group.d.ts +3 -3
- package/dist/.dts/build/finding-model.d.ts +12 -13
- package/dist/.dts/build/finding-model.d.ts.map +1 -1
- package/dist/.dts/build/generate-documentation.d.ts +6 -7
- package/dist/.dts/build/generate-documentation.d.ts.map +1 -1
- package/dist/.dts/build/generate-evidence.d.ts +13 -15
- package/dist/.dts/build/generate-evidence.d.ts.map +1 -1
- package/dist/.dts/build/generate-manifest.d.ts +14 -16
- package/dist/.dts/build/generate-manifest.d.ts.map +1 -1
- package/dist/.dts/build/generated-banner.d.ts +3 -3
- package/dist/.dts/build/governance-fields.d.ts +3 -3
- package/dist/.dts/build/humanize-key.d.ts +3 -3
- package/dist/.dts/build/lifecycle-model.d.ts +3 -3
- 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 +9 -9
- package/dist/.dts/build/manifest.d.ts +7 -8
- package/dist/.dts/build/manifest.d.ts.map +1 -1
- package/dist/.dts/build/merge-documentation.d.ts +4 -5
- package/dist/.dts/build/merge-documentation.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-import.d.ts +8 -9
- package/dist/.dts/build/resolution/resolve-import.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-within-root.d.ts +4 -4
- package/dist/.dts/build/sarif.d.ts +9 -11
- package/dist/.dts/build/sarif.d.ts.map +1 -1
- package/dist/.dts/build/source-position.d.ts +14 -17
- package/dist/.dts/build/source-position.d.ts.map +1 -1
- package/dist/.dts/build/usage-report.d.ts +16 -17
- package/dist/.dts/build/usage-report.d.ts.map +1 -1
- package/dist/.dts/cli/filesystem.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/glob.d.ts +2 -2
- package/dist/.dts/eslint-plugin/index.d.ts +2 -1
- package/dist/.dts/eslint-plugin/index.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/no-node-fs.d.ts +5 -5
- package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts +4 -4
- package/dist/.dts/evidence/define-projection.d.ts +6 -6
- package/dist/.dts/runtime/create.d.ts +2 -3
- package/dist/.dts/runtime/create.d.ts.map +1 -1
- package/dist/.dts/runtime/errors.d.ts +7 -8
- package/dist/.dts/runtime/errors.d.ts.map +1 -1
- package/dist/.dts/runtime/index.d.ts +2 -2
- package/dist/.dts/runtime/types.d.ts +18 -20
- package/dist/.dts/runtime/types.d.ts.map +1 -1
- package/dist/.dts/runtime/validate.d.ts +2 -2
- package/dist/.dts/runtime/validate.d.ts.map +1 -1
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts +3 -4
- package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts7/build/assemble-project.d.ts +3 -3
- package/dist/.dts7/build/change-model.d.ts +9 -11
- package/dist/.dts7/build/change-model.d.ts.map +1 -1
- package/dist/.dts7/build/check-artifacts.d.ts +5 -6
- package/dist/.dts7/build/check-artifacts.d.ts.map +1 -1
- package/dist/.dts7/build/citation-verification.d.ts +6 -7
- package/dist/.dts7/build/citation-verification.d.ts.map +1 -1
- package/dist/.dts7/build/contract-model.d.ts +7 -8
- package/dist/.dts7/build/contract-model.d.ts.map +1 -1
- package/dist/.dts7/build/deep-equal.d.ts +3 -3
- package/dist/.dts7/build/deep-freeze.d.ts +5 -7
- package/dist/.dts7/build/deep-freeze.d.ts.map +1 -1
- package/dist/.dts7/build/dependency-model.d.ts +2 -2
- package/dist/.dts7/build/dependency-model.d.ts.map +1 -1
- package/dist/.dts7/build/discover.d.ts +6 -6
- package/dist/.dts7/build/discover.d.ts.map +1 -1
- package/dist/.dts7/build/env-example.d.ts +6 -7
- package/dist/.dts7/build/env-example.d.ts.map +1 -1
- package/dist/.dts7/build/errors.d.ts +4 -4
- package/dist/.dts7/build/evidence-cache.d.ts +12 -14
- package/dist/.dts7/build/evidence-cache.d.ts.map +1 -1
- package/dist/.dts7/build/evidence-model.d.ts +6 -7
- package/dist/.dts7/build/evidence-model.d.ts.map +1 -1
- package/dist/.dts7/build/evidence-reference.d.ts +6 -6
- package/dist/.dts7/build/evidence-reference.d.ts.map +1 -1
- package/dist/.dts7/build/exclusive-group.d.ts +3 -3
- package/dist/.dts7/build/finding-model.d.ts +12 -13
- package/dist/.dts7/build/finding-model.d.ts.map +1 -1
- package/dist/.dts7/build/generate-documentation.d.ts +6 -7
- package/dist/.dts7/build/generate-documentation.d.ts.map +1 -1
- package/dist/.dts7/build/generate-evidence.d.ts +13 -15
- package/dist/.dts7/build/generate-evidence.d.ts.map +1 -1
- package/dist/.dts7/build/generate-manifest.d.ts +14 -16
- package/dist/.dts7/build/generate-manifest.d.ts.map +1 -1
- package/dist/.dts7/build/generated-banner.d.ts +3 -3
- package/dist/.dts7/build/governance-fields.d.ts +3 -3
- package/dist/.dts7/build/humanize-key.d.ts +3 -3
- package/dist/.dts7/build/lifecycle-model.d.ts +3 -3
- 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 +9 -9
- package/dist/.dts7/build/manifest.d.ts +7 -8
- package/dist/.dts7/build/manifest.d.ts.map +1 -1
- package/dist/.dts7/build/merge-documentation.d.ts +4 -5
- package/dist/.dts7/build/merge-documentation.d.ts.map +1 -1
- package/dist/.dts7/build/resolution/resolve-import.d.ts +8 -9
- package/dist/.dts7/build/resolution/resolve-import.d.ts.map +1 -1
- package/dist/.dts7/build/resolution/resolve-within-root.d.ts +4 -4
- package/dist/.dts7/build/sarif.d.ts +9 -11
- package/dist/.dts7/build/sarif.d.ts.map +1 -1
- package/dist/.dts7/build/source-position.d.ts +14 -17
- package/dist/.dts7/build/source-position.d.ts.map +1 -1
- package/dist/.dts7/build/usage-report.d.ts +16 -17
- package/dist/.dts7/build/usage-report.d.ts.map +1 -1
- package/dist/.dts7/cli/filesystem.d.ts.map +1 -1
- package/dist/.dts7/eslint-plugin/glob.d.ts +2 -2
- package/dist/.dts7/eslint-plugin/index.d.ts +2 -1
- package/dist/.dts7/eslint-plugin/index.d.ts.map +1 -1
- package/dist/.dts7/eslint-plugin/no-node-fs.d.ts +5 -5
- package/dist/.dts7/eslint-plugin/no-raw-process-env.d.ts +4 -4
- package/dist/.dts7/evidence/define-projection.d.ts +6 -6
- package/dist/.dts7/runtime/create.d.ts +2 -3
- package/dist/.dts7/runtime/create.d.ts.map +1 -1
- package/dist/.dts7/runtime/errors.d.ts +7 -8
- package/dist/.dts7/runtime/errors.d.ts.map +1 -1
- package/dist/.dts7/runtime/index.d.ts +2 -2
- package/dist/.dts7/runtime/types.d.ts +18 -20
- package/dist/.dts7/runtime/types.d.ts.map +1 -1
- package/dist/.dts7/runtime/validate.d.ts +2 -2
- package/dist/.dts7/runtime/validate.d.ts.map +1 -1
- package/dist/{build-33O5SDTC.js → build-Z76NCC65.js} +7 -10
- package/dist/build-Z76NCC65.js.map +1 -0
- package/dist/build.cjs +6 -9
- package/dist/build.cjs.map +1 -1
- package/dist/build.js +6 -9
- package/dist/build.js.map +1 -1
- package/dist/{chunk-4D67AQFY.js → chunk-JRCMG4FQ.js} +2 -2
- package/dist/cli/index.js +3 -3
- 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.map +1 -1
- package/dist/evidence.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.js.map +1 -1
- package/package.json +6 -4
- package/schemas/env-cap-report.schema.json +11 -11
- package/skills/env-cap/SKILL.md +1 -1
- package/skills/env-cap/references/api.md +1 -1
- package/specs/architecture.md +6 -6
- package/specs/migrations/README.md +9 -9
- package/specs/migrations/from-centralized-schema.md +28 -28
- package/specs/migrations/from-dotenv.md +11 -11
- package/specs/migrations/from-envalid.md +16 -16
- package/specs/migrations/from-process-env.md +19 -19
- package/specs/migrations/from-t3-env.md +24 -24
- package/specs/migrations/from-zod.md +21 -21
- package/dist/build-33O5SDTC.js.map +0 -1
- /package/dist/{chunk-4D67AQFY.js.map → chunk-JRCMG4FQ.js.map} +0 -0
|
@@ -7,10 +7,9 @@ import type { BuildFileSystem } from "./types.js";
|
|
|
7
7
|
* current `EvidenceModel` without silently-stale data. Such a consumer
|
|
8
8
|
* avoids a full `generateEvidenceModel()` recompute on every invocation
|
|
9
9
|
* (schema parsing, cross-file linking, the dependency-graph AST scan, all six
|
|
10
|
-
* model builds).
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* was last written" before trusting it.
|
|
10
|
+
* model builds). A content fingerprint over raw file bytes costs no AST work.
|
|
11
|
+
* It lets the caller prove that nothing relevant to evidence generation
|
|
12
|
+
* changed since the file was written, before trusting it.
|
|
14
13
|
*/
|
|
15
14
|
/** Options for {@link computeSourceFingerprint}. */
|
|
16
15
|
export interface ComputeSourceFingerprintOptions {
|
|
@@ -22,9 +21,9 @@ export interface ComputeSourceFingerprintOptions {
|
|
|
22
21
|
readonly packages?: readonly string[] | undefined;
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
|
-
* SHA-256 over the raw bytes of every schema file and every usage-scan
|
|
26
|
-
* surface file
|
|
27
|
-
*
|
|
24
|
+
* SHA-256 over the raw bytes of every schema file and every usage-scan
|
|
25
|
+
* surface file, plus the installed env-cap version. Those are the file sets
|
|
26
|
+
* `assembleProject()`/`computeScanSurface()` touch. It does no AST parsing or
|
|
28
27
|
* linking. Still requires the discovery/glob walk itself (fingerprinting has
|
|
29
28
|
* to know which files matter), but skips everything after it. Deterministic:
|
|
30
29
|
* file paths are deduplicated and sorted before hashing, so the result never
|
|
@@ -37,7 +36,7 @@ export interface ComputeSourceFingerprintOptions {
|
|
|
37
36
|
* evidence artifact.
|
|
38
37
|
*/
|
|
39
38
|
export declare function computeSourceFingerprint(options: ComputeSourceFingerprintOptions): Promise<string>;
|
|
40
|
-
/** Writes `fingerprint`'s paired sidecar for `evidencePath
|
|
39
|
+
/** Writes `fingerprint`'s paired sidecar for `evidencePath`. Call it right after writing the evidence artifact, so both files describe the same moment in the source tree. */
|
|
41
40
|
export declare function writeEvidenceFingerprint(evidencePath: string, fingerprint: string, fs: BuildFileSystem): Promise<void>;
|
|
42
41
|
/** Options for {@link getEvidenceModel}: every `generateEvidenceModel()` option, plus where the cached artifact lives. */
|
|
43
42
|
export interface GetEvidenceModelOptions extends GenerateEvidenceModelOptions {
|
|
@@ -54,12 +53,11 @@ export interface GetEvidenceModelResult {
|
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
55
|
* Trusts the committed evidence artifact at `options.location` only when its
|
|
57
|
-
* paired `.fingerprint` sidecar matches a
|
|
58
|
-
*
|
|
59
|
-
* a
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* data that might be stale.
|
|
56
|
+
* paired `.fingerprint` sidecar matches a fresh {@link computeSourceFingerprint}.
|
|
57
|
+
* File presence or a timestamp never earns that trust. On any mismatch (a
|
|
58
|
+
* stale fingerprint, a missing or corrupt evidence file, no sidecar), it falls
|
|
59
|
+
* back to a real `generateEvidenceModel()` call. So it never fails hard and
|
|
60
|
+
* never serves stale data.
|
|
63
61
|
*
|
|
64
62
|
* @remarks
|
|
65
63
|
* Never writes anything. A cache miss here does not self-heal the cache.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-cache.d.ts","sourceRoot":"","sources":["../../../src/build/evidence-cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAKxD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAO1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD
|
|
1
|
+
{"version":3,"file":"evidence-cache.d.ts","sourceRoot":"","sources":["../../../src/build/evidence-cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBA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
@@ -6,8 +6,8 @@ import type { LifecycleModel } from "./lifecycle-model.js";
|
|
|
6
6
|
import type { OwnershipModel } from "./ownership-model.js";
|
|
7
7
|
/**
|
|
8
8
|
* Bump only when a reader could misinterpret the new shape of `EvidenceModel`
|
|
9
|
-
* itself
|
|
10
|
-
*
|
|
9
|
+
* itself. Each sub-model's `<MODEL>_SCHEMA_VERSION` is versioned separately.
|
|
10
|
+
* Every other canonical model follows the same rule.
|
|
11
11
|
*/
|
|
12
12
|
export declare const EVIDENCE_MODEL_SCHEMA_VERSION = 1;
|
|
13
13
|
/**
|
|
@@ -27,11 +27,10 @@ export interface EvidenceProvenance {
|
|
|
27
27
|
* ADR 0031).
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
* This type is the one
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `specs/architecture.md`. `src/evidence/` never imports a *value* from
|
|
30
|
+
* This type is the one exception to the rule that nothing imports across
|
|
31
|
+
* `src/build/`. `src/evidence/` imports it with `import type` only, which
|
|
32
|
+
* `verbatimModuleSyntax` erases at compile time. The sanctioned edge from
|
|
33
|
+
* `helpers` onto `runtime` has the same shape (see `specs/architecture.md`). `src/evidence/` never imports a *value* from
|
|
35
34
|
* here, only this shape, so it stays isomorphic and Node-free. An actual
|
|
36
35
|
* `EvidenceModel` instance is produced by {@link generateEvidenceModel}
|
|
37
36
|
* (`@maverickcer/env-cap/build`, Node-only), which runs discovery once,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-model.d.ts","sourceRoot":"","sources":["../../../src/build/evidence-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,M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AQ,EAAE,aAAa,CAAA;IAChC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;IACpC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B"}
|
|
@@ -15,7 +15,7 @@ import type { SourcePosition } from "./source-position.js";
|
|
|
15
15
|
export type EvidenceReference = ContractEvidenceReference | OwnershipEvidenceReference | ChangeEvidenceReference;
|
|
16
16
|
/**
|
|
17
17
|
* The one shape every model in this package uses to point at a declared
|
|
18
|
-
* contract:
|
|
18
|
+
* contract: its file and its exported binding.
|
|
19
19
|
* Nothing else: see ADR 0039.
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
@@ -23,10 +23,10 @@ export type EvidenceReference = ContractEvidenceReference | OwnershipEvidenceRef
|
|
|
23
23
|
* concern. A renderer that needs prose resolves it on demand from
|
|
24
24
|
* `ContractModel`, the one model that owns it. A copy on every reference
|
|
25
25
|
* would go stale independently, since the name can change under a
|
|
26
|
-
* `documentEnv()` edit.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* `documentEnv()` edit. It carries no pre-formatted
|
|
27
|
+
* `identity` string either, since `${file}#${exportName}` is derivable. A
|
|
28
|
+
* stored copy could disagree with the two fields it was built from. Code that
|
|
29
|
+
* needs a map key
|
|
30
30
|
* builds that string locally, at the point of use.
|
|
31
31
|
*/
|
|
32
32
|
export interface ContractRef {
|
|
@@ -44,7 +44,7 @@ export interface ContractEvidenceReference {
|
|
|
44
44
|
readonly exportName: string | undefined;
|
|
45
45
|
/** The environment variable name, when the finding is variable-level rather than contract-level. */
|
|
46
46
|
readonly variable: string | undefined;
|
|
47
|
-
/** Exact file:line:column this finding is about
|
|
47
|
+
/** Exact file:line:column this finding is about. It is the contract's `createEnv()` declaration, its `documentEnv()` declaration or the variable's declaration, whichever is most relevant. `undefined` only when no single position is more relevant than another. An `indeterminate-ownership` finding is one: `IndeterminateOwnershipFinding.dynamicAccessSites` lists its candidate sites. See ADR 0036. */
|
|
48
48
|
readonly position: SourcePosition | undefined;
|
|
49
49
|
}
|
|
50
50
|
/** Points at a contract by name for an ownership/usage finding: `usage-report.ts`'s finding types don't consistently carry `file`/`exportName` together, only `contractName`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-reference.d.ts","sourceRoot":"","sources":["../../../src/build/evidence-reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iBAAiB,GAC3B,yBAAyB,GAAG,0BAA0B,GAAG,uBAAuB,CAAA;AAElF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IAC1B,mGAAmG;IACnG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,+TAA+T;AAC/T,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,+GAA+G;IAC/G,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,
|
|
1
|
+
{"version":3,"file":"evidence-reference.d.ts","sourceRoot":"","sources":["../../../src/build/evidence-reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iBAAiB,GAC3B,yBAAyB,GAAG,0BAA0B,GAAG,uBAAuB,CAAA;AAElF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IAC1B,mGAAmG;IACnG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,+TAA+T;AAC/T,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,+GAA+G;IAC/G,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,gZAAgZ;IAChZ,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CAC9C;AAED,iLAAiL;AACjL,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CAC9C;AAED,gJAAgJ;AAChJ,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAA;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -5,9 +5,9 @@ import type { DiscoveredContract } from "./link.js";
|
|
|
5
5
|
* e.g. two interchangeable database backends both left enabled at once.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Unlike `detectCompatibilityIssues`, this is never a heuristic warning
|
|
9
|
-
* author
|
|
10
|
-
*
|
|
8
|
+
* Unlike `detectCompatibilityIssues`, this is never a heuristic warning. An
|
|
9
|
+
* author declared these contracts mutually exclusive, so a violation is
|
|
10
|
+
* always a hard error, whatever `onIncompatibility` says. See
|
|
11
11
|
* ADR 0009 for why this doesn't follow 0005's warn-by-default policy.
|
|
12
12
|
*
|
|
13
13
|
* Inactive contracts are ignored entirely here (filtered internally, not by
|
|
@@ -6,9 +6,9 @@ import type { DynamicAccessCitationProblem } from "./citation-verification.js";
|
|
|
6
6
|
import type { AbandonedContractFinding, IndeterminateOwnershipFinding, UnconsumedOwnedVariableFinding, UnresolvedConsumerFinding } from "./usage-report.js";
|
|
7
7
|
/**
|
|
8
8
|
* The fourth of env-cap's seven canonical fact models (ADR 0024): every
|
|
9
|
-
* rule violation and derived risk signal
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* rule violation and derived risk signal behind one shape. Each has a stable
|
|
10
|
+
* `code` and a structured {@link EvidenceReference}, replacing four
|
|
11
|
+
* differently shaped finding families. See ADR 0026.
|
|
12
12
|
*/
|
|
13
13
|
/** Every stable `code` a {@link Finding} can carry. A superset of {@link CompatibilityIssueCode} plus one code per non-compatibility source family this model adapts. */
|
|
14
14
|
export type FindingCode = CompatibilityIssueCode | "EXCLUSIVE_GROUP_VIOLATION" | "ARTIFACT_STALE" | "ARTIFACT_MISSING" | "UNDOCUMENTED_CONTRACT" | "UNDOCUMENTED_VARIABLE" | "STALE_DOC_ENTRY" | "EXPIRED" | "EXPIRING_SOON" | "UNRESOLVED_DOCUMENTENV_LINK" | "ABANDONED_CONTRACT" | "UNRESOLVED_CONSUMER" | "UNCONSUMED_OWNED_VARIABLE" | "INDETERMINATE_OWNERSHIP" | "MISSING_DYNAMIC_ACCESS_CITATION" | "STALE_DYNAMIC_ACCESS_CITATION" | "NONSTANDARD_SENSITIVITY_LEVEL";
|
|
@@ -17,12 +17,11 @@ export type FindingFamily = "compatibility" | "drift" | "documentation" | "owner
|
|
|
17
17
|
/** One rule violation or derived signal, in the Finding Model's canonical shape. */
|
|
18
18
|
export interface Finding {
|
|
19
19
|
/**
|
|
20
|
-
* `"error"` for a provable, always-blocking violation
|
|
21
|
-
* exclusive-group conflict
|
|
22
|
-
* `onIncompatibility`/`onUndocumented`/`onOwnershipIssue
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `generate-env-artifacts.ts`.
|
|
20
|
+
* `"error"` for a provable, always-blocking violation, such as an
|
|
21
|
+
* exclusive-group conflict. `"warning"` for everything gated by the default
|
|
22
|
+
* "warn" of `onIncompatibility`/`onUndocumented`/`onOwnershipIssue`.
|
|
23
|
+
* `"info"` for an observation that never blocks, even under `--strict` (see
|
|
24
|
+
* `INFO_ONLY_CODES` in `generate-env-artifacts.ts`).
|
|
26
25
|
*/
|
|
27
26
|
readonly severity: "error" | "warning" | "info";
|
|
28
27
|
/** Stable, machine-readable identifier: always set, unlike {@link CompatibilityIssue.code} which stays optional on that narrower, pre-existing type. */
|
|
@@ -42,10 +41,10 @@ export interface FindingModel {
|
|
|
42
41
|
readonly findings: readonly Finding[];
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
|
-
* Every source a {@link buildFindingModel} call can adapt, all optional
|
|
46
|
-
*
|
|
47
|
-
* `
|
|
48
|
-
*
|
|
44
|
+
* Every source a {@link buildFindingModel} call can adapt, all optional. A
|
|
45
|
+
* caller passes whichever `manifest`/`docs`/`usage` results of
|
|
46
|
+
* `generateEnvArtifacts()` it requested. Those top-level result fields are
|
|
47
|
+
* optional in the same way.
|
|
49
48
|
*/
|
|
50
49
|
export interface BuildFindingModelInput {
|
|
51
50
|
/** Every `EvidenceReference.file` below is rendered relative to this, matching every other rendered path in this package's output: see `displayPath()`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finding-model.d.ts","sourceRoot":"","sources":["../../../src/build/finding-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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mB,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAC5D,kNAAkN;IAClN,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAC7D,mIAAmI;IACnI,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAChE,+CAA+C;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAA;IAC9C,6CAA6C;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAA;IACjE,6CAA6C;IAC7C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,yBAAyB,EAAE,CAAA;IACnE,6CAA6C;IAC7C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,SAAS,8BAA8B,EAAE,CAAA;IAC7E,6CAA6C;IAC7C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,6BAA6B,EAAE,CAAA;IAC1E,kKAAkK;IAClK,QAAQ,CAAC,6BAA6B,CAAC,EAAE,SAAS,4BAA4B,EAAE,GAAG,SAAS,CAAA;CAC7F;AAoCD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAwN7E"}
|
|
@@ -43,7 +43,7 @@ export interface GenerateDocumentationOptions {
|
|
|
43
43
|
*/
|
|
44
44
|
liveExpirationDates?: LiveExpirationDates | undefined;
|
|
45
45
|
}
|
|
46
|
-
/** Everything {@link generateDocumentation} found that isn't fully documented or up to date
|
|
46
|
+
/** Everything {@link generateDocumentation} found that isn't fully documented or up to date. It never blocks generation. To gate CI on it, read the "documentation" family of `Finding[]` from the persisted evidence artifact. See ADR 0038. */
|
|
47
47
|
export interface DocumentationFindings {
|
|
48
48
|
/** Contracts with no linked `documentEnv()` call at all. */
|
|
49
49
|
readonly undocumentedContracts: readonly {
|
|
@@ -128,10 +128,9 @@ export interface NonstandardSensitivityEntry {
|
|
|
128
128
|
*
|
|
129
129
|
* @remarks
|
|
130
130
|
* A variable's *own* declared level only: never the contract-inherited one
|
|
131
|
-
* `effectiveSensitivity()` would resolve to.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* question into N duplicates of it.
|
|
131
|
+
* `effectiveSensitivity()` would resolve to. The contract already has its
|
|
132
|
+
* own contract-level entry. Reporting the inherited value would repeat that
|
|
133
|
+
* one vocabulary question once per variable.
|
|
135
134
|
*/
|
|
136
135
|
export declare function findNonstandardSensitivityLevels(contracts: readonly DiscoveredContract[]): NonstandardSensitivityEntry[];
|
|
137
136
|
export interface DocumentationComputation {
|
|
@@ -160,8 +159,8 @@ export declare function writeDocumentation(docsPath: string, envExamplePath: str
|
|
|
160
159
|
envExample: EnvExampleResult | undefined;
|
|
161
160
|
}>;
|
|
162
161
|
/**
|
|
163
|
-
* Build-time only. Discovers and links `env.schema.ts` files
|
|
164
|
-
* analysis
|
|
162
|
+
* Build-time only. Discovers and links `env.schema.ts` files, with the static
|
|
163
|
+
* analysis of {@link generateEnvManifest}. Then it writes the Markdown
|
|
165
164
|
* "Catalog": every variable, its description, default, processor/validator
|
|
166
165
|
* flags, owner, and expiry. Application developers use it as the single
|
|
167
166
|
* onboarding reference for what configuration a feature needs and how to set
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-documentation.d.ts","sourceRoot":"","sources":["../../../src/build/generate-documentation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAA2B,MAAM,WAAW,CAAA;AAExF,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAI9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,iDAAiD;AACjD,MAAM,WAAW,4BAA4B;IAC3C,+EAA+E;IAC/E,EAAE,EAAE,eAAe,CAAA;IACnB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IACxC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACrC,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EACP;QACE,yEAAyE;QACzE,QAAQ,EAAE,MAAM,CAAA;QAChB,yFAAyF;QACzF,UAAU,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAA;KAC9C,GACD,SAAS,CAAA;IACb;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;CACtD;AAED,
|
|
1
|
+
{"version":3,"file":"generate-documentation.d.ts","sourceRoot":"","sources":["../../../src/build/generate-documentation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAA2B,MAAM,WAAW,CAAA;AAExF,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAI9E,OAAO,KAAK,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ACnK,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,EACxD,aAAa,EAAE,qBAAqB,EACpC,kBAAkB,EAAE,MAAM,EAC1B,WAAW,EAAE,IAAI,EACjB,EAAE,EAAE,eAAe,EACnB,oBAAoB,CAAC,EAAE,oBAAoB,GAC1C,OAAO,CAAC;IAAE,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAA;CAAE,CAAC,CA+BvD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,2BAA2B,CAAC,CAqEtC"}
|
|
@@ -16,10 +16,10 @@ export interface GenerateEvidenceModelOptions {
|
|
|
16
16
|
/** See `GenerateEnvManifestOptions.tsconfig`. See ADR 0023. */
|
|
17
17
|
tsconfig?: string | false | undefined;
|
|
18
18
|
/**
|
|
19
|
-
* Where a previously
|
|
20
|
-
* `root
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* Where a previously persisted evidence artifact lives, relative to
|
|
20
|
+
* `root`. It is read, never written. Change Model diffs against it, and
|
|
21
|
+
* dynamic-access citation freshness (ADR 0037) compares content hashes
|
|
22
|
+
* with it. Independent of any `.ts` manifest a project may or
|
|
23
23
|
* may not also generate: there is no derivation from a manifest's own
|
|
24
24
|
* location. Omitted: treated as the normal first-run state (everything
|
|
25
25
|
* reads as added, no citation-freshness baseline to compare against),
|
|
@@ -30,9 +30,9 @@ export interface GenerateEvidenceModelOptions {
|
|
|
30
30
|
expiringWithinDays?: number | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* Supplies expiration metadata from a live source as a post-discovery
|
|
33
|
-
* override
|
|
34
|
-
* `expiring-soon` findings
|
|
35
|
-
*
|
|
33
|
+
* override. It applies only to Lifecycle Model and Finding Model's
|
|
34
|
+
* `expiring-soon` findings. Contract Model still reflects the schema's
|
|
35
|
+
* static `expiresAt`. See `live-expirations.ts` and ADR 0012.
|
|
36
36
|
*/
|
|
37
37
|
liveExpirationDates?: LiveExpirationDates | undefined;
|
|
38
38
|
/**
|
|
@@ -53,10 +53,9 @@ export interface GenerateEvidenceModelOptions {
|
|
|
53
53
|
* before being returned.
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* instead. This differs from `generateEnvManifest()`, which throws by
|
|
56
|
+
* Never throws on a data-quality finding, such as a compatibility issue,
|
|
57
|
+
* an undocumented variable or an abandoned contract. Each becomes a
|
|
58
|
+
* `Finding` in the returned model's `finding` field instead. This differs from `generateEnvManifest()`, which throws by
|
|
60
59
|
* default, because that is a "should I write this artifact" gate. Evidence
|
|
61
60
|
* Model assembly is a read-only snapshot. Its purpose is to represent such
|
|
62
61
|
* issues as data for a consumer's own projection to act on (see ADR 0024's
|
|
@@ -64,10 +63,9 @@ export interface GenerateEvidenceModelOptions {
|
|
|
64
63
|
* `EnvProjectGenerationError` for a genuine configuration error:
|
|
65
64
|
* `previousSnapshotLocation` escaping `root`.
|
|
66
65
|
*
|
|
67
|
-
*
|
|
68
|
-
* `
|
|
69
|
-
*
|
|
70
|
-
* independent pass over the repository. That cost is accepted: each half's
|
|
66
|
+
* Dependency Model (via `buildDependencyModel()`) and Finding Model's
|
|
67
|
+
* ownership findings (via `computeUsage()`) each run a dependency-graph scan.
|
|
68
|
+
* The two scans are separate passes over the repository. That cost is accepted: each half's
|
|
71
69
|
* already-tested public building block is called directly, rather than a
|
|
72
70
|
* second copy of either's logic being hand-derived here. Both are Node-only,
|
|
73
71
|
* dev/CI-time-only work (never a runtime hot path), so the redundant I/O is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-evidence.d.ts","sourceRoot":"","sources":["../../../src/build/generate-evidence.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,iDAAiD;AACjD,MAAM,WAAW,4BAA4B;IAC3C,+EAA+E;IAC/E,EAAE,EAAE,eAAe,CAAA;IACnB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IACxC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACrC;;;;;;;;;OASG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7C,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;IACrD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,CAAA;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,aAAa,CAAC,CAyHxB"}
|
|
@@ -15,11 +15,10 @@ export interface GenerateEnvManifestOptions {
|
|
|
15
15
|
/** Glob patterns to exclude. Defaults to node_modules/dist/.git. */
|
|
16
16
|
exclude?: string[] | undefined;
|
|
17
17
|
/**
|
|
18
|
-
* Explicit allowlist of installed
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* the manifest. Opt-in only: a package is never considered unless its
|
|
18
|
+
* Explicit allowlist of installed package names whose declared
|
|
19
|
+
* `"envCap": { "schema": "<path>" }` entry point is also discovered. It lets
|
|
20
|
+
* the manifest include a contract published as a separate package, with no
|
|
21
|
+
* monorepo required. Opt-in only: a package is never considered unless its
|
|
23
22
|
* exact name appears here. See ADR 0014.
|
|
24
23
|
*/
|
|
25
24
|
packages?: readonly string[] | undefined;
|
|
@@ -28,9 +27,9 @@ export interface GenerateEnvManifestOptions {
|
|
|
28
27
|
* whose `compilerOptions.paths`/`baseUrl` resolve aliased import specifiers (e.g.
|
|
29
28
|
* `"@/lib/env.schema.js"`) encountered during static analysis, so a contract or consumer
|
|
30
29
|
* reached only through an alias isn't misreported as abandoned/unresolved. Defaults to
|
|
31
|
-
* `"tsconfig.json"` at `root
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* `"tsconfig.json"` at `root`, so it is on with no opt-in. Unlike `packages`, it never
|
|
31
|
+
* crosses a trust or versioning boundary: every resolved file is local, trusted project
|
|
32
|
+
* source. Pass `false` to disable entirely. See
|
|
34
33
|
* ADR 0023.
|
|
35
34
|
*/
|
|
36
35
|
tsconfig?: string | false | undefined;
|
|
@@ -83,16 +82,15 @@ export declare function computeManifest(root: string, linkResult: LinkResult, on
|
|
|
83
82
|
/** Writes the manifest file. Callers must have already confirmed `outputPath` is safe and nothing is blocking. */
|
|
84
83
|
export declare function writeManifest(outputPath: string, activeContracts: readonly DiscoveredContract[], fs: BuildFileSystem): Promise<void>;
|
|
85
84
|
/**
|
|
86
|
-
* Build-time only. Discovers `env.schema.ts` files
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* active contract.
|
|
85
|
+
* Build-time only. Discovers `env.schema.ts` files and analyzes them
|
|
86
|
+
* statically, never executing them, to link `createEnv()`/`documentEnv()`
|
|
87
|
+
* calls. It checks duplicate variable declarations for provable
|
|
88
|
+
* incompatibilities. Then it writes a deterministic manifest file that
|
|
89
|
+
* re-exports every discovered active contract.
|
|
91
90
|
*
|
|
92
91
|
* @remarks
|
|
93
|
-
*
|
|
94
|
-
* runtime code
|
|
95
|
-
* step instead.
|
|
92
|
+
* Run it from an npm script, a bundler plugin or a CI step. Application
|
|
93
|
+
* startup and runtime code never call or import it.
|
|
96
94
|
*
|
|
97
95
|
* @throws {EnvManifestGenerationError} If `location` escapes `root`, or if a blocking compatibility/exclusive-group issue is found.
|
|
98
96
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-manifest.d.ts","sourceRoot":"","sources":["../../../src/build/generate-manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAG5D,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAChB,MAAM,WAAW,CAAA;AAElB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAG9C,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,+EAA+E;IAC/E,EAAE,EAAE,eAAe,CAAA;IACnB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,yGAAyG;IACzG,QAAQ,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B
|
|
1
|
+
{"version":3,"file":"generate-manifest.d.ts","sourceRoot":"","sources":["../../../src/build/generate-manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAG5D,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAChB,MAAM,WAAW,CAAA;AAElB,OAAO,KAAK,EAAE,YAA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,kBAAkB,EAAE,CAAA;IAChD,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAA;CACjD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAC9C,mBAAmB,CAwBrB;AAED,kHAAkH;AAClH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,SAAS,kBAAkB,EAAE,EAC9C,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,yBAAyB,CAAC,CAoCpC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Regeneration instruction for a report the CLI does not write (ADR 0046)
|
|
3
|
-
*
|
|
4
|
-
* cannot regenerate it.
|
|
2
|
+
* Regeneration instruction for a report the CLI does not write (ADR 0046). The project's script produces it
|
|
3
|
+
* with the `@maverickcer/env-cap/build` generators. Naming `npx env-cap` would send a reader to a command
|
|
4
|
+
* that cannot regenerate it.
|
|
5
5
|
* @returns The instruction, as a sentence.
|
|
6
6
|
*/
|
|
7
7
|
export declare function reportRegenerateHint(): string;
|
|
@@ -26,9 +26,9 @@ export interface EnvGovernanceFields {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Copies exactly the `EnvGovernanceFields` out of a value that carries
|
|
29
|
-
* them
|
|
30
|
-
*
|
|
31
|
-
* nine fields
|
|
29
|
+
* them. Each pipeline stage (`link` -> `contract-model` -> `docs` catalog,
|
|
30
|
+
* ...) projects its contract or variable into the next without re-listing
|
|
31
|
+
* all nine fields.
|
|
32
32
|
*/
|
|
33
33
|
export declare function governanceFieldsOf(source: EnvGovernanceFields): EnvGovernanceFields;
|
|
34
34
|
//# sourceMappingURL=governance-fields.d.ts.map
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function humanizeKey(key: string): string;
|
|
7
7
|
/**
|
|
8
|
-
* Formats a `metadata`/`dataResidency` value for display in generated docs/examples
|
|
9
|
-
* renders as-is
|
|
10
|
-
*
|
|
8
|
+
* Formats a `metadata`/`dataResidency` value for display in generated docs/examples. A string
|
|
9
|
+
* renders as-is. Anything else renders as its JSON text, since ADR 0035 widened `metadata` to
|
|
10
|
+
* any value. So an object or array never prints `[object Object]`. Shared by `docs.ts` and
|
|
11
11
|
* `env-example.ts`, same rationale as {@link humanizeKey}.
|
|
12
12
|
*/
|
|
13
13
|
export declare function renderMetadataValue(value: unknown): string;
|
|
@@ -158,9 +158,9 @@ export declare function parseRotationPeriodDays(value: string): number | undefin
|
|
|
158
158
|
* `lastRotatedAt` and/or `rotationTriggerEvents`), with no `rotationPeriod` and no past-due
|
|
159
159
|
* `expiresAt`. Nothing states a time-based obligation this variable could be failing to meet.
|
|
160
160
|
*
|
|
161
|
-
* `rotationTriggerEvents` (the event-based trigger)
|
|
162
|
-
*
|
|
163
|
-
*
|
|
161
|
+
* `rotationTriggerEvents` (the event-based trigger) never changes the returned status by itself.
|
|
162
|
+
* Nothing in env-cap can observe whether a listed event occurred, such as a suspected compromise or
|
|
163
|
+
* a personnel change. Treating its mere presence as either compliant or overdue would
|
|
164
164
|
* fabricate a signal. It's presence-only evidence that the event-based half of IA-5's
|
|
165
165
|
* two-trigger model was at least *declared*. A generator should still surface it, but never fold
|
|
166
166
|
* it into this computed status.
|
|
@@ -11,8 +11,8 @@ export type LiteralEvalResult = {
|
|
|
11
11
|
value?: undefined;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Structurally evaluates a *literal* AST expression
|
|
15
|
-
*
|
|
14
|
+
* Structurally evaluates a *literal* AST expression into a real JS value, without executing code.
|
|
15
|
+
* Literals are strings, numbers, booleans, null, and arrays and object literals of those.
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
18
|
* Anything that isn't a literal (identifiers, calls, imports, template expressions with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal-eval.d.ts","sourceRoot":"","sources":["../../../src/build/literal-eval.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAE/F;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"literal-eval.d.ts","sourceRoot":"","sources":["../../../src/build/literal-eval.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAE/F;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,iBAAiB,CA2CtE;AAED,8KAA8K;AAC9K,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,GAAG,MAAM,GAAG,SAAS,CAK/E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DiscoveredContract } from "./link.js";
|
|
2
2
|
/**
|
|
3
|
-
* Supplies expiration metadata from a live source
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Supplies expiration metadata from a live source, such as a secrets manager
|
|
4
|
+
* or an inventory API, as a post-discovery override. It is the one sanctioned
|
|
5
|
+
* 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/
|
|
@@ -25,9 +25,9 @@ export declare function collectVariableNames(contracts: readonly DiscoveredContr
|
|
|
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
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* ISO-8601 string, leaves that variable's static `expiresAt` untouched. The
|
|
29
|
+
* rest of the generator treats malformed data the same way: warn or skip,
|
|
30
|
+
* never guess. 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[];
|
|
@@ -35,9 +35,9 @@ export declare function applyLiveExpirationOverrides(contracts: readonly Discove
|
|
|
35
35
|
* Orchestration entry point: the only place `liveExpirationDates` is ever invoked.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* When `liveExpirationDates` is undefined it does nothing: it returns the same
|
|
39
|
+
* array reference and invokes nothing. That keeps behavior unchanged when the
|
|
40
|
+
* option is omitted. Otherwise it collects the unique discovered variable
|
|
41
41
|
* names, invokes the callback exactly once and applies the result. It
|
|
42
42
|
* deep-freezes the returned structure so no mutation of it can reach
|
|
43
43
|
* `contracts` or anything else downstream. `contracts` is used elsewhere too,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { DiscoveredContract } from "./link.js";
|
|
2
2
|
/**
|
|
3
3
|
* Every validation context declared by any variable in an *active* contract
|
|
4
|
-
* in `contracts
|
|
5
|
-
* false` never contributes
|
|
6
|
-
* already applies), sorted and deduplicated. What {@link renderManifest}
|
|
4
|
+
* in `contracts`, sorted and deduplicated. A contract documented
|
|
5
|
+
* `active: false` never contributes, as in the `manifest` array. What {@link renderManifest}
|
|
7
6
|
* surfaces as the generated `activeContexts` export. Exported for reuse by
|
|
8
7
|
* anything that needs the same computation (currently just `renderManifest`
|
|
9
8
|
* itself).
|
|
@@ -11,8 +10,8 @@ import type { DiscoveredContract } from "./link.js";
|
|
|
11
10
|
export declare function discoverValidationContexts(contracts: readonly DiscoveredContract[]): readonly string[];
|
|
12
11
|
/**
|
|
13
12
|
* Renders the deterministic manifest source: sorted imports (aliased on name
|
|
14
|
-
* collision) plus a `contracts` array
|
|
15
|
-
*
|
|
13
|
+
* collision) plus a `contracts` array. The banner marks the file as generated
|
|
14
|
+
* for schema authors. No timestamps, no randomness: same
|
|
16
15
|
* input files always produce byte-identical output.
|
|
17
16
|
*
|
|
18
17
|
* @remarks
|
|
@@ -23,9 +22,9 @@ export declare function discoverValidationContexts(contracts: readonly Discovere
|
|
|
23
22
|
* `manifest` and pass it straight through: `validateEnv({ manifest, values, activeContexts })`.
|
|
24
23
|
* It's every context this manifest has, meant as a starting point to narrow
|
|
25
24
|
* per process/deployment, not a pre-scoped default: see the README's
|
|
26
|
-
* "Validation contexts" section.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* "Validation contexts" section. It is omitted, not even an empty array, when
|
|
26
|
+
* no variable declares a `context`. So projects that don't use contexts get
|
|
27
|
+
* unchanged output.
|
|
29
28
|
*/
|
|
30
29
|
export declare function renderManifest(contracts: readonly DiscoveredContract[], outputFile: string): string;
|
|
31
30
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/build/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/build/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GACvC,SAAS,MAAM,EAAE,CASnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,UAAU,EAAE,MAAM,GACjB,MAAM,CAiER"}
|
|
@@ -10,11 +10,10 @@ export declare const VALUE_FIELDS: readonly ["description", "owner", "sensitivit
|
|
|
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. A package that ships
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* application's own `expiresAt`, say).
|
|
13
|
+
* A variable can be declared in more than one contract. A package that ships a contract (see {@link ../README}
|
|
14
|
+
* "Reusable packages") and the application that consumes it can name the same environment variable. The process
|
|
15
|
+
* has one flat namespace. Writing the explanation twice is how the two drift. So one declaration carries it, and
|
|
16
|
+
* the other adds only its own fields (the application's `expiresAt`, say).
|
|
18
17
|
*
|
|
19
18
|
* Every field a declaration leaves unset is taken from another declaration that sets it, as long as one of the two
|
|
20
19
|
* is a package's contract. When several set it, a package's contract wins over the application's own, and the
|
|
@@ -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;;;;;;;;;;;;;;;;GAgBG;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"}
|