@maverickcer/env-cap 0.6.0 → 0.7.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.
Files changed (136) hide show
  1. package/ADOPTION.md +144 -0
  2. package/AGENTS.md +146 -0
  3. package/CHANGELOG.md +438 -0
  4. package/CODE_OF_CONDUCT.md +124 -0
  5. package/CODE_REVIEW.md +200 -0
  6. package/CONTRIBUTING.md +131 -0
  7. package/GUIDE.md +1214 -0
  8. package/PROMPT.md +89 -0
  9. package/README.md +92 -200
  10. package/RELEASING.md +160 -0
  11. package/SECURITY.md +270 -0
  12. package/SUPPORT.md +76 -0
  13. package/VERSIONING.md +118 -0
  14. package/benchmarks/READING-BENCHMARKS.md +197 -0
  15. package/benchmarks/README.md +126 -0
  16. package/benchmarks/WRITING-BENCHMARKS.md +252 -0
  17. package/benchmarks/performance-buildtime/BENCHMARKS.md +889 -0
  18. package/benchmarks/performance-runtime/BENCHMARKS.md +1988 -0
  19. package/dist/.dts/_ipc/build-fs.d.ts +53 -0
  20. package/dist/.dts/_ipc/build-fs.d.ts.map +1 -0
  21. package/dist/.dts/_ipc/compiler-api.d.ts +17 -0
  22. package/dist/.dts/_ipc/compiler-api.d.ts.map +1 -0
  23. package/dist/.dts/_ipc/display-path.d.ts +27 -0
  24. package/dist/.dts/_ipc/display-path.d.ts.map +1 -0
  25. package/dist/.dts/_ipc/generated-banner.d.ts +58 -0
  26. package/dist/.dts/_ipc/generated-banner.d.ts.map +1 -0
  27. package/dist/.dts/_ipc/glob.d.ts +22 -0
  28. package/dist/.dts/_ipc/glob.d.ts.map +1 -0
  29. package/dist/.dts/_ipc/no-node-fs.d.ts +34 -0
  30. package/dist/.dts/_ipc/no-node-fs.d.ts.map +1 -0
  31. package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +134 -0
  32. package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -0
  33. package/dist/.dts/_ipc/typescript.d.ts +20 -0
  34. package/dist/.dts/_ipc/typescript.d.ts.map +1 -0
  35. package/dist/.dts/build/compatibility.d.ts.map +1 -1
  36. package/dist/.dts/build/compiler-api.d.ts +3 -6
  37. package/dist/.dts/build/compiler-api.d.ts.map +1 -1
  38. package/dist/.dts/build/display-path.d.ts +3 -21
  39. package/dist/.dts/build/display-path.d.ts.map +1 -1
  40. package/dist/.dts/build/generated-banner.d.ts +21 -42
  41. package/dist/.dts/build/generated-banner.d.ts.map +1 -1
  42. package/dist/.dts/build/glob.d.ts +3 -15
  43. package/dist/.dts/build/glob.d.ts.map +1 -1
  44. package/dist/.dts/build/link.d.ts.map +1 -1
  45. package/dist/.dts/build/merge-documentation.d.ts +35 -0
  46. package/dist/.dts/build/merge-documentation.d.ts.map +1 -0
  47. package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts +11 -112
  48. package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts.map +1 -1
  49. package/dist/.dts/build/types.d.ts +4 -53
  50. package/dist/.dts/build/types.d.ts.map +1 -1
  51. package/dist/.dts/build/typescript.d.ts +3 -17
  52. package/dist/.dts/build/typescript.d.ts.map +1 -1
  53. package/dist/.dts/eslint-plugin/glob.d.ts +4 -15
  54. package/dist/.dts/eslint-plugin/glob.d.ts.map +1 -1
  55. package/dist/.dts/eslint-plugin/index.d.ts +1 -1
  56. package/dist/.dts/eslint-plugin/no-node-fs.d.ts +8 -18
  57. package/dist/.dts/eslint-plugin/no-node-fs.d.ts.map +1 -1
  58. package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts.map +1 -1
  59. package/dist/{build-H4KFV44Z.js → build-WKDIAWF7.js} +198 -60
  60. package/dist/build-WKDIAWF7.js.map +1 -0
  61. package/dist/build.cjs +194 -56
  62. package/dist/build.cjs.map +1 -1
  63. package/dist/build.js +194 -56
  64. package/dist/build.js.map +1 -1
  65. package/dist/{chunk-7GVPOHDU.js → chunk-KEGYUHBU.js} +2 -2
  66. package/dist/cli/index.js +36 -29
  67. package/dist/cli/index.js.map +1 -1
  68. package/dist/eslint-plugin/index.cjs +84 -54
  69. package/dist/eslint-plugin/index.cjs.map +1 -1
  70. package/dist/eslint-plugin/index.js +83 -53
  71. package/dist/eslint-plugin/index.js.map +1 -1
  72. package/examples/README.md +95 -0
  73. package/package.json +48 -14
  74. package/skills/env-cap/SKILL.md +91 -0
  75. package/skills/env-cap/references/api.md +220 -0
  76. package/specs/architecture.md +634 -0
  77. package/specs/decisions/0001-runtime-documentation-separation.md +197 -0
  78. package/specs/decisions/0002-static-analysis-never-execution.md +233 -0
  79. package/specs/decisions/0003-no-global-env-object.md +172 -0
  80. package/specs/decisions/0004-no-client-server-package-split.md +116 -0
  81. package/specs/decisions/0005-warn-not-throw-by-default.md +93 -0
  82. package/specs/decisions/0006-self-redacting-contracts.md +124 -0
  83. package/specs/decisions/0007-processor-not-transformer.md +109 -0
  84. package/specs/decisions/0008-gzip-size-budget.md +173 -0
  85. package/specs/decisions/0009-exclusive-groups-are-always-errors.md +139 -0
  86. package/specs/decisions/0010-dependency-ownership-engine-scope-boundary.md +100 -0
  87. package/specs/decisions/0011-shared-discovery-compute-atomic-write-non-atomic.md +104 -0
  88. package/specs/decisions/0012-live-expiration-overrides-not-ast-functions.md +145 -0
  89. package/specs/decisions/0013-json-output-is-a-versioned-mirror.md +136 -0
  90. package/specs/decisions/0014-cross-package-schema-discovery.md +206 -0
  91. package/specs/decisions/0015-security-backport-window.md +60 -0
  92. package/specs/decisions/0016-check-mode-compute-before-compare-never-partial-write.md +113 -0
  93. package/specs/decisions/0017-eslint-plugin-entry-point.md +113 -0
  94. package/specs/decisions/0018-rotation-alert-issue-on-non-pr-runs.md +104 -0
  95. package/specs/decisions/0019-published-json-schema-generated-from-types.md +100 -0
  96. package/specs/decisions/0020-declaration-maps-via-separate-tsc-pass.md +101 -0
  97. package/specs/decisions/0021-manifest-change-report-persisted-snapshot.md +177 -0
  98. package/specs/decisions/0022-validation-contexts.md +267 -0
  99. package/specs/decisions/0023-tsconfig-path-alias-resolution.md +182 -0
  100. package/specs/decisions/0024-fact-model-architecture.md +144 -0
  101. package/specs/decisions/0025-contract-model-json-projection.md +105 -0
  102. package/specs/decisions/0026-finding-model-unifies-four-families.md +109 -0
  103. package/specs/decisions/0027-dependency-model-fact-shape-not-engine-access.md +98 -0
  104. package/specs/decisions/0028-ownership-model-shared-effective-owner.md +85 -0
  105. package/specs/decisions/0029-lifecycle-model-deprecation-rename-fields.md +98 -0
  106. package/specs/decisions/0030-change-model-wraps-manifest-change-report.md +97 -0
  107. package/specs/decisions/0031-evidence-entry-point.md +85 -0
  108. package/specs/decisions/0032-evidence-projection-provenance-mechanism.md +120 -0
  109. package/specs/decisions/0033-reference-projections-live-in-examples.md +81 -0
  110. package/specs/decisions/0034-three-tier-examples-restructuring.md +85 -0
  111. package/specs/decisions/0035-documentenv-metadata-generalization-and-compliance-fields.md +85 -0
  112. package/specs/decisions/0036-exact-source-position-evidence.md +122 -0
  113. package/specs/decisions/0037-developer-declared-dynamic-access-citations.md +114 -0
  114. package/specs/decisions/0038-always-computed-evidence-model-backs-generate-check-docs.md +244 -0
  115. package/specs/decisions/0039-scanner-local-dataflow-boundary.md +160 -0
  116. package/specs/decisions/0040-library-surfaces-do-not-acquire-node-fs.md +156 -0
  117. package/specs/decisions/0041-dual-package-hazard-checked-documented.md +75 -0
  118. package/specs/decisions/0042-init-cli-subcommand-scaffolds-only.md +95 -0
  119. package/specs/decisions/0043-env-cap-resolver-relocated-and-duplicated.md +71 -0
  120. package/specs/decisions/0044-strict-escalates-every-warning-family.md +88 -0
  121. package/specs/decisions/0045-promote-experimental-surfaces-to-stable.md +103 -0
  122. package/specs/decisions/0046-cli-restricted-to-runtime-and-evidence-output.md +177 -0
  123. package/specs/decisions/0047-supported-toolchain-node-22-and-typescript-5-6.md +30 -0
  124. package/specs/decisions/0048-eslint-plugin-does-not-vendor-typescript-eslint.md +25 -0
  125. package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +87 -0
  126. package/specs/decisions/0050-a-variable-declared-twice-is-documented-once.md +55 -0
  127. package/specs/generated-artifacts.md +104 -0
  128. package/specs/migrations/README.md +30 -0
  129. package/specs/migrations/from-centralized-schema.md +503 -0
  130. package/specs/migrations/from-dotenv.md +352 -0
  131. package/specs/migrations/from-envalid.md +482 -0
  132. package/specs/migrations/from-process-env.md +398 -0
  133. package/specs/migrations/from-t3-env.md +416 -0
  134. package/specs/migrations/from-zod.md +303 -0
  135. package/dist/build-H4KFV44Z.js.map +0 -1
  136. /package/dist/{chunk-7GVPOHDU.js.map → chunk-KEGYUHBU.js.map} +0 -0
@@ -0,0 +1,95 @@
1
+ # Examples
2
+
3
+ Three flagship examples, each answering a different question — read them in order, since each
4
+ assumes the concepts the previous one already covered:
5
+
6
+ 1. **[application](https://github.com/MaverickCER/env-cap/tree/main/examples/application)** — *"How does this make my code better?"* The simplest
7
+ possible starting point: one centralized `createEnv()` contract for a whole small app, still
8
+ getting fail-fast startup validation, generated docs, a generated `.env.example`, and an
9
+ ownership report. For an individual developer adopting `env-cap` in their own project.
10
+
11
+ 2. **[team-service](https://github.com/MaverickCER/env-cap/tree/main/examples/team-service)** — *"How does this help my team?"* Multiple
12
+ capability-owned contracts spanning two real teams (`data-platform-team`, `security-team`),
13
+ including two mutually-exclusive database alternatives (`postgres`/`mongodb`) gated by
14
+ `exclusiveGroup`, a `classification: "secret"` variable that gives the generated security
15
+ review something real to enumerate, and a `check` script demonstrating the `--check`
16
+ CI-gate pattern (see [ADR 0016](../specs/decisions/0016-check-mode-compute-before-compare-never-partial-write.md))
17
+ a real PR check would run.
18
+
19
+ 3. **[enterprise-platform](https://github.com/MaverickCER/env-cap/tree/main/examples/enterprise-platform)** — *"How does this help my organization?"* A
20
+ real, running application — reports, manifests, evidence generation, and a configuration-governance
21
+ evidence document built with `defineEvidenceProjection()` — showing what `env-cap` deliberately
22
+ doesn't own (a database, auth, external services) alongside what it does.
23
+
24
+ Every flagship's own README documents exactly how to run it. All three are validated in CI (see
25
+ `.github/workflows/ci.yml`'s `examples` job and
26
+ [`test/examples/`](https://github.com/MaverickCER/env-cap/tree/main/test/examples)) against the real,
27
+ currently-built `env-cap` package, so they stay in sync with the API rather than
28
+ drifting silently.
29
+
30
+ ## Framework integration
31
+
32
+ [**nextjs-app**](https://github.com/MaverickCER/env-cap/tree/main/examples/nextjs-app) — a deliberately minimal Next.js todo app, not a fourth flagship in
33
+ the above progression. Where the three flagships above grow one plain Node/TypeScript app from an
34
+ individual developer's project to an organization's, this one proves the fail-fast contract
35
+ mechanism inside a real framework's build/request lifecycle — a real `NEXT_PUBLIC_*` (client) vs.
36
+ server-only environment variable boundary, and what it actually took to make `validateEnv()`'s
37
+ module-level "ready" state survive a bundler that code-splits the app into multiple chunks. See its
38
+ own README for what that took.
39
+
40
+ ## Looking for something specific?
41
+
42
+ The three flagships above are for humans exploring `env-cap` for the first time — they're not
43
+ meant to be an exhaustive catalog of every scenario the library handles. Every other behavior
44
+ (the packaged CLI binary, cross-package schema discovery, tsconfig path-alias resolution, the
45
+ `liveExpirationDates` callback, per-variable validation contexts, and more) is still fully tested,
46
+ just relocated to [`test/integration/`](https://github.com/MaverickCER/env-cap/tree/main/test/integration) as a behavioral fixture rather than
47
+ presented as a fourteenth (or fifteenth) example to read through. Each fixture directory still
48
+ has its own runnable `package.json`, the same as a flagship does — see its own `package.json`
49
+ `description` field for what it proves, or the corresponding test file under
50
+ `test/integration/positive/` / `test/integration/negative/`. Examples are for humans; integration
51
+ fixtures are for correctness — zero coverage was dropped in that split, only what's presented as
52
+ "start here" reading.
53
+
54
+ ## Golden regression testing
55
+
56
+ The three flagships have **no `expected/` mirror**. Their committed
57
+ `docs/ENVIRONMENT.md`, `docs/OWNERSHIP.md`, `docs/env.evidence.json`,
58
+ `.env.example`, and `src/generated/env.manifest.ts` *are* the golden — a reader
59
+ opening the example sees exactly the bytes CI asserts on. `test/examples/*.test.ts`
60
+ verifies each one by running that example's own `check` script (`env-cap --check`),
61
+ the same command its README tells you to run in CI, so a drifted artifact fails
62
+ the build and the drift guard itself gets exercised at the same time.
63
+
64
+ A parallel `expected/` tree used to duplicate every artifact here. It was
65
+ removed: each file existed twice with nothing marking which copy was
66
+ authoritative, so a stale mirror could sit next to correct output indefinitely.
67
+ (`enterprise-platform/expected/output.json` remains — that's the example's own
68
+ runtime self-check, not a copy of anything `env-cap` generates.)
69
+
70
+ The integration fixtures under `test/integration/positive/` and
71
+ `test/integration/negative/` **do** keep `expected/` mirrors
72
+ (`multiple-active-exclusive-capabilities` excepted, which by design never
73
+ successfully generates anything). Those have no human reader, and an explicit
74
+ side-by-side diff of generator output is exactly their point. CI regenerates
75
+ each for real and compares byte-for-byte, after normalizing the wall-clock-relative
76
+ parts (the docs Markdown's generation timestamp and any "expiring soon"/"expired"
77
+ annotations). This is what actually catches a regression in the library's output
78
+ formatting, ordering, or serialization — not just "does it still typecheck."
79
+
80
+ When a change to `env-cap` intentionally changes generated output (a new field, a
81
+ reordered section, a wording change), regenerate everything and review the diff:
82
+
83
+ ```bash
84
+ npm run examples:update-golden
85
+ ```
86
+
87
+ This is deliberately **not** part of `npm run verify` or CI — it's a human-invoked "I meant to
88
+ change the output, here's the new baseline" step, not something that should ever run silently.
89
+
90
+ ## Looking for the performance benchmarks?
91
+
92
+ They've moved to [`/benchmarks`](../benchmarks/) — project confidence tooling, not an adoption
93
+ sample like the three flagships above, so it lives as a top-level sibling of `examples/` rather
94
+ than inside it. See [`benchmarks/README.md`](../benchmarks/README.md) for methodology, tier
95
+ definitions, and what's deliberately not measured and why.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maverickcer/env-cap",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Secure, type-safe, framework-agnostic environment contracts. Contracts own the environment variables they consume; the package provides runtime validation and build-time contract discovery.",
5
5
  "keywords": [
6
6
  "environment",
@@ -103,39 +103,43 @@
103
103
  "files": [
104
104
  "dist",
105
105
  "schemas",
106
- "README.md",
107
- "LICENSE"
106
+ "LICENSE",
107
+ "/*.md",
108
+ "specs/**/*.md",
109
+ "skills/**/*.md",
110
+ "benchmarks/**/*.md",
111
+ "examples/README.md"
108
112
  ],
109
113
  "scripts": {
110
114
  "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
111
- "build": "npm run clean && tsup && tsc -p tsconfig.build.json && node scripts/emit-dts-shims.mjs && node scripts/fix-eslint-plugin-cjs-interop.mjs",
115
+ "build": "npm run clean && tsup && tsc -p tsconfig.build.json && node scripts/emit-dts-shims.mjs && internal-package-contract tool cjs-interop",
112
116
  "prepare": "npm run build",
113
117
  "dev": "tsup --watch",
114
118
  "typecheck": "tsc --noEmit -p tsconfig.json",
115
119
  "typescript-compat": "node scripts/typescript-compat.mjs",
116
- "verify:compiler-isolation": "node scripts/verify-compiler-isolation.mjs",
120
+ "verify:compiler-isolation": "internal-package-contract tool compiler-isolation",
117
121
  "test": "vitest run",
118
122
  "test:coverage": "vitest run --coverage",
119
123
  "test:watch": "vitest",
120
- "contract": "npm run docs:benchmarks && internal-package-contract",
124
+ "contract": "internal-package-contract",
121
125
  "lint": "eslint .",
122
126
  "format": "prettier --write .",
123
127
  "format:check": "prettier --check .",
124
128
  "setup": "npm install && npm run build && npm run schema",
125
- "size": "node scripts/check-size.mjs",
126
- "verify:no-ambient-fs": "node scripts/verify-no-ambient-fs.mjs",
127
- "verify:no-ambient-child-process": "node scripts/verify-no-ambient-child-process.mjs",
129
+ "size": "internal-package-contract tool size",
128
130
  "schema": "node scripts/generate-json-schema.mjs",
129
131
  "examples:update-golden": "node scripts/update-example-goldens.mjs",
130
132
  "benchmark": "node scripts/run-benchmarks.mjs",
131
133
  "docs:api": "typedoc",
134
+ "docs:env": "internal-package-contract env",
132
135
  "docs:api:report": "typedoc --options typedoc.markdown.json",
133
- "docs:api:report:check": "node scripts/check-api-report.mjs",
136
+ "docs:api:report:check": "internal-package-contract tool api-report",
134
137
  "docs:benchmarks": "node node_modules/internal-package-contract/scripts/benchmark/render-page.mjs --out docs/benchmarks/index.html --readme https://github.com/maverickcer/env-cap/blob/main/benchmarks/README.md --history \"Runtime|benchmarks/history/runtime.json\" --history \"Build-time|benchmarks/history/buildtime.json\"",
138
+ "verify:ambient": "internal-package-contract tool ambient",
135
139
  "verify:readme-example": "node scripts/check-readme-example-fresh.mjs",
136
140
  "stage": "npm run typecheck && npm run build && npm run test && npm run size",
137
- "precommit": "npm run typecheck && npm run lint && npm run format && npm run build && npm run schema && npm run test:coverage && npm run size && npm run verify:no-ambient-fs && npm run verify:no-ambient-child-process && npm run verify:compiler-isolation && npm run docs:api:report:check && npm run verify:readme-example",
138
- "verify": "npm run typecheck && npm run lint && npm run format:check && npm run build && npm run schema && npm run test:coverage && npm run size && npm run verify:no-ambient-fs && npm run verify:no-ambient-child-process && npm run verify:compiler-isolation && npm run docs:api:report:check && npm run verify:readme-example",
141
+ "precommit": "npm run typecheck && npm run lint && npm run format && npm run build && npm run schema && npm run test:coverage && npm run size && npm run verify:ambient && npm run verify:compiler-isolation && npm run docs:api:report:check && npm run verify:readme-example",
142
+ "verify": "npm run typecheck && npm run lint && npm run format:check && npm run build && npm run schema && npm run test:coverage && npm run size && npm run verify:ambient && npm run verify:compiler-isolation && npm run docs:api:report:check && npm run verify:readme-example",
139
143
  "prepublishOnly": "npm run verify",
140
144
  "version": "changeset version && npm run build && npm run examples:update-golden",
141
145
  "release": "changeset publish",
@@ -165,7 +169,7 @@
165
169
  }
166
170
  },
167
171
  "devDependencies": {
168
- "@changesets/cli": "^2.31.1",
172
+ "@changesets/cli": "^3.0.3",
169
173
  "@eslint/js": "^10.0.1",
170
174
  "@types/node": "^22.0.0",
171
175
  "@typescript-eslint/utils": "^8.65.0",
@@ -175,7 +179,7 @@
175
179
  "eslint": "^10.9.0",
176
180
  "eslint-config-prettier": "10.1.8",
177
181
  "globals": "^17.9.0",
178
- "internal-package-contract": "github:MaverickCER/internal-package-contract#v0.10.0",
182
+ "internal-package-contract": "github:MaverickCER/internal-package-contract#v0.13.0",
179
183
  "prettier": "3.9.9",
180
184
  "ts-json-schema-generator": "^2.9.0",
181
185
  "tsup": "^8.0.0",
@@ -206,6 +210,36 @@
206
210
  "internal-package-contract": {
207
211
  "apiTargets": {
208
212
  ".": "src/runtime/index.ts"
213
+ },
214
+ "copies": [
215
+ "benchmark-budgets",
216
+ "build-fs",
217
+ "code-of-conduct",
218
+ "compiler-api",
219
+ "display-path",
220
+ "editorconfig",
221
+ "generated-banner",
222
+ "glob",
223
+ "no-node-fs",
224
+ "reading-benchmarks",
225
+ "releasing",
226
+ "resolve-tsconfig-paths",
227
+ "support",
228
+ "typedoc-markdown",
229
+ "typescript",
230
+ "writing-benchmarks"
231
+ ],
232
+ "checks": [
233
+ "AgentSkill",
234
+ "AmbientCapabilities"
235
+ ],
236
+ "ambientCapabilities": {
237
+ "child_process": [],
238
+ "fs": [
239
+ "bin",
240
+ "./eslint-plugin",
241
+ "./node"
242
+ ]
209
243
  }
210
244
  }
211
245
  }
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: env-cap
3
+ description: Load when a task creates or edits an env.schema.ts, calls createEnv, documentEnv or validateEnv, or generates env-cap manifests, docs or reports. Skip it for other environment work.
4
+ ---
5
+
6
+ # @maverickcer/env-cap
7
+
8
+ env-cap gives each capability (a feature, service or package) its own environment contract: declared once as a static schema, validated at startup, and documented and aggregated at build time.
9
+
10
+ Not for: loading .env files, storing secrets, or a single global env object.
11
+
12
+ ## Use it
13
+
14
+ ```ts
15
+ const prismaSchema = {
16
+ DATABASE_PROVIDER: {
17
+ validator: (value: string) =>
18
+ ["postgresql", "mongodb"].includes(value) || "Unsupported provider.",
19
+ },
20
+ };
21
+
22
+ export const prismaEnv = createEnv(prismaSchema, { name: "prisma", source: import.meta.url });
23
+
24
+ documentEnv(prismaSchema, {
25
+ category: "orm",
26
+ owner: "data-platform-team",
27
+ metadata: {
28
+ docs: "https://www.prisma.io/docs/orm/reference/connection-urls",
29
+ },
30
+ variables: {
31
+ DATABASE_PROVIDER: { description: "Which database provider Prisma should target." },
32
+ },
33
+ });
34
+ ```
35
+
36
+ From `examples/team-service/features/prisma/env.schema.ts`.
37
+
38
+ ## Import from
39
+
40
+ | Import | For |
41
+ | --- | --- |
42
+ | `@maverickcer/env-cap` | `createEnv`, `documentEnv`, `validateEnv`, `resetEnvCache`, the error types |
43
+ | `@maverickcer/env-cap/build` | Node only: discovery, analysis and generating the manifest, docs and reports |
44
+ | `@maverickcer/env-cap/helpers` | `processors` and `validators` |
45
+ | `@maverickcer/env-cap/node` | Node only: `nodeBuildFileSystem`, the file system a build script hands to `/build` |
46
+ | `@maverickcer/env-cap/evidence` | `defineEvidenceProjection`, pure transforms over the evidence model |
47
+ | `@maverickcer/env-cap/eslint-plugin` | Node only: the `no-raw-process-env` and `no-node-fs` lint rules |
48
+ | `@maverickcer/env-cap/schema` | The JSON Schema for `env-cap --json` output |
49
+
50
+ ## Rules
51
+
52
+ - Write each schema as a static literal in the module that owns it: schemas are parsed as source, never executed, so spreads, factories and re-exports are not understood.
53
+ - Put `description`, `owner`, `expiresAt` and `category` in `documentEnv`. `createEnv` entries take `default`, `processor`, `validator`, `context`; its options `name` and `source: import.meta.url`.
54
+ - Read a value through its owning contract (`paymentsEnv.STRIPE_KEY`). Never build a merged env object.
55
+ - Call `validateEnv` once at startup, directly. Run the `generate*` functions only in a build script or CI.
56
+ - Import only from package.json exports; `/build`, `/node` and `/eslint-plugin` are Node-only, never in browser code.
57
+
58
+ ## Rely on
59
+
60
+ - Reading a contract before `validateEnv` has run throws `EnvNotReadyError`.
61
+ - Errors never contain values. Keep raw values out of your own processor and validator messages, and do not spread a contract.
62
+ - `required: true` in `documentEnv` only documents a variable as required. Enforcement is the validator rejecting an empty value.
63
+ - `context` is a plain string your application activates, not a security boundary.
64
+ - Two contracts may declare one variable name. Conflicting processor return types and exclusive-group violations are errors; differing processor or validator sources warn, and block under `onIncompatibility: "throw"`.
65
+
66
+ ## Common mistakes
67
+
68
+ | Instead of | Do this |
69
+ | --- | --- |
70
+ | `createEnv({ ...base })`, or a schema built by a function | Declare the schema as a literal object in the module that owns it, then pass that one binding to `createEnv` and `documentEnv`. |
71
+ | `transformer` | `processor`. There is no alias. |
72
+ | A live expiry fetched inside `env.schema.ts` | Keep a static `expiresAt`; pass `liveExpirationDates` to the generator. |
73
+
74
+ ## Verify
75
+
76
+ 1. Run the project's type check and tests.
77
+ 2. After changing an `env.schema.ts`, update its `documentEnv()` entry and run `generate:env`. Commit generated files only if the project does; never hand-edit one.
78
+ 3. Check imports against package.json exports.
79
+
80
+ Report any check you could not run, and any assumption you made.
81
+
82
+ ## Go deeper
83
+
84
+ - [Every option of the generators and the CLI](https://github.com/MaverickCER/env-cap/blob/main/GUIDE.md)
85
+ - [Moving off dotenv, raw process.env, Zod, envalid or t3-env](https://github.com/MaverickCER/env-cap/blob/main/specs/migrations)
86
+ - [Why each rule exists](https://github.com/MaverickCER/env-cap/blob/main/specs/decisions)
87
+ - [Every public signature](https://github.com/MaverickCER/env-cap/blob/main/skills/env-cap/references/api.md)
88
+
89
+ ## Authority
90
+
91
+ Target `@maverickcer/env-cap@0.7.0`. The installed package's exports and type declarations are the API: do not invent exports, options or return values. Behaviour is established by its tests and examples. If this skill and the code disagree, say so rather than guessing.
@@ -0,0 +1,220 @@
1
+ # @maverickcer/env-cap public API
2
+
3
+ Every export a consumer can import, by entry point, for version 0.7.0. Generated from the package's committed API baselines; the type declarations in the installed package are the authority.
4
+
5
+ ## `@maverickcer/env-cap`
6
+
7
+ - `ContractDocs` (interface): `interface ContractDocs<S extends EnvSchema = EnvSchema>`
8
+ - `createEnv` (function): `function createEnv<S extends EnvSchema>(schema: S, options?: CreateEnvOptions): EnvContract<S>`
9
+ - `CreateEnvOptions` (interface): `interface CreateEnvOptions`
10
+ - `DefaultValue` (typealias): `type DefaultValue = unknown | (() => unknown)`
11
+ - `documentEnv` (function): `function documentEnv<S extends EnvSchema>(schema: S, docs: ContractDocs<S>): void`
12
+ - `EnvContract` (typealias): `type EnvContract<S extends EnvSchema> = { readonly [K in keyof S]: InferEnvValue<S[K]>; } & { toString(): string; }`
13
+ - `EnvDefinition` (interface): `interface EnvDefinition<T>`
14
+ - `EnvNotReadyError` (class): `class EnvNotReadyError extends Error`
15
+ - `EnvSchema` (typealias): `type EnvSchema = Record<string, EnvDefinition<any>>`
16
+ - `EnvValidationError` (class): `class EnvValidationError extends Error`
17
+ - `InferEnvValue` (typealias): `type InferEnvValue<D extends EnvDefinition<any>> = D extends { processor: Processor<infer P>; } ? P : [UnwrapDefault<D>] extends [never] ? string : UnwrapDefault<D>`
18
+ - `isEnvContract` (function): `function isEnvContract(value: unknown): value is object`
19
+ - `Processor` (typealias): `type Processor<T> = (value: unknown) => T`
20
+ - `RawEnv` (typealias): `type RawEnv = Readonly<Record<string, unknown>>`
21
+ - `resetEnvCache` (function): `function resetEnvCache(): void`
22
+ - `validateEnv` (function): `function validateEnv(options: validateEnvOptions): Promise<validateEnvResult>`
23
+ - `validateEnvOptions` (interface): `interface validateEnvOptions`
24
+ - `validateEnvResult` (interface): `interface validateEnvResult`
25
+ - `Validator` (typealias): `type Validator<T> = (value: T, rawEnv: RawEnv) => true | string`
26
+ - `VariableDocs` (interface): `interface VariableDocs`
27
+ - `VariableEvidenceDocs` (interface): `interface VariableEvidenceDocs`
28
+ - `VariableFailure` (interface): `interface VariableFailure`
29
+
30
+ ## `@maverickcer/env-cap/build`
31
+
32
+ - `AbandonedContractFinding` (interface): `interface AbandonedContractFinding`
33
+ - `applyLiveExpirationOverrides` (function): `function applyLiveExpirationOverrides(contracts: readonly DiscoveredContract[], overrides: Readonly<Record<string, string>>): readonly DiscoveredContract[]`
34
+ - `ArtifactCheckFinding` (interface): `interface ArtifactCheckFinding`
35
+ - `AssertedDynamicAccessFinding` (interface): `interface AssertedDynamicAccessFinding`
36
+ - `buildChangeModel` (function): `function buildChangeModel(manifest: ManifestChangeReport, currentContracts: readonly DiscoveredContract[], root: string): ChangeModel`
37
+ - `buildContractModel` (function): `function buildContractModel(contracts: readonly DiscoveredContract[], root: string): ContractModel`
38
+ - `buildDependencyModel` (function): `function buildDependencyModel(contracts: readonly DiscoveredContract[], scanFiles: readonly string[], readFile: (filePath: string) => Promise<string>, context: ImportResolutionContext, root: string, scannedSurfaces?: readonly ScannedSurface[], dynamicAccessAcknowledgments?: ReadonlyMap<string, readonly DynamicAccessAssertion[]>): Promise<DependencyModel>`
39
+ - `BuildDirent` (interface): `interface BuildDirent`
40
+ - `BuildFileSystem` (interface): `interface BuildFileSystem`
41
+ - `buildFindingModel` (function): `function buildFindingModel(input: BuildFindingModelInput): FindingModel`
42
+ - `BuildFindingModelInput` (interface): `interface BuildFindingModelInput`
43
+ - `buildLifecycleModel` (function): `function buildLifecycleModel(contracts: readonly DiscoveredContract[], expiringWithinDays: number, now: Date, root: string): LifecycleModel`
44
+ - `buildOwnershipModel` (function): `function buildOwnershipModel(contracts: readonly DiscoveredContract[], root: string): OwnershipModel`
45
+ - `buildSarifLog` (function): `function buildSarifLog(findingModel: FindingModel): SarifLog`
46
+ - `BuildStats` (interface): `interface BuildStats`
47
+ - `CHANGE_MODEL_SCHEMA_VERSION` (variable): `CHANGE_MODEL_SCHEMA_VERSION = 1`
48
+ - `ChangeEvidenceReference` (interface): `interface ChangeEvidenceReference`
49
+ - `ChangeModel` (interface): `interface ChangeModel`
50
+ - `checkEnvArtifacts` (function): `function checkEnvArtifacts(options: GenerateEnvArtifactsOptions): Promise<CheckEnvArtifactsResult>`
51
+ - `CheckEnvArtifactsResult` (interface): `interface CheckEnvArtifactsResult`
52
+ - `collectVariableNames` (function): `function collectVariableNames(contracts: readonly DiscoveredContract[]): string[]`
53
+ - `CompatibilityIssue` (interface): `interface CompatibilityIssue`
54
+ - `CompatibilityIssueCode` (typealias): `type CompatibilityIssueCode = "PROCESSOR_RETURN_TYPE_CONFLICT" | "PROCESSOR_SOURCE_CONFLICT" | "VALIDATOR_SOURCE_CONFLICT" | "DUPLICATE_VARIABLE_DOCUMENTATION" | "DUPLICATE_VARIABLE_SHAPE_ACROSS_CONTRACTS"`
55
+ - `computeExpiringEntries` (function): `function computeExpiringEntries(contracts: readonly ExpiryBearingContract[], expiringWithinDays: number, now: Date): ExpiringEntry[]`
56
+ - `computeReconciliation` (function): `function computeReconciliation(contracts: readonly DiscoveredContract[], existingContent: string): Reconciliation`
57
+ - `computeRotationStatus` (function): `function computeRotationStatus(variable: { readonly expiresAt: string | undefined; readonly authenticatorType: string | undefined; readonly rotationPeriod: string | undefined; readonly lastRotatedAt: string | undefined; readonly rotationTriggerEvents: readonly string[] | undefined; }, now: Date): RotationComplianceStatus`
58
+ - `computeSecurityReviewCounters` (function): `function computeSecurityReviewCounters(contracts: readonly ContractModelContract[], expiringWithinDays: number, now: Date, undocumentedContractCount: number, undocumentedVariableCount: number): SecurityReviewCounters`
59
+ - `computeSourceFingerprint` (function): `function computeSourceFingerprint(options: ComputeSourceFingerprintOptions): Promise<string>`
60
+ - `ComputeSourceFingerprintOptions` (interface): `interface ComputeSourceFingerprintOptions`
61
+ - `configurationReference` (function): `function configurationReference(evidence: EvidenceModel): ConfigurationReference`
62
+ - `ConfigurationReference` (interface): `interface ConfigurationReference extends Record<string, unknown>`
63
+ - `configurationReference` (namespace): `namespace configurationReference`
64
+ - `ConfigurationReferenceEntry` (interface): `interface ConfigurationReferenceEntry`
65
+ - `CONTRACT_MODEL_SCHEMA_VERSION` (variable): `CONTRACT_MODEL_SCHEMA_VERSION = 3`
66
+ - `ContractEvidenceReference` (interface): `interface ContractEvidenceReference`
67
+ - `ContractModel` (interface): `interface ContractModel`
68
+ - `ContractModelContract` (interface): `interface ContractModelContract extends EnvGovernanceFields`
69
+ - `ContractModelVariable` (interface): `interface ContractModelVariable extends EnvGovernanceFields`
70
+ - `ContractRef` (interface): `interface ContractRef`
71
+ - `deepFreeze` (function): `function deepFreeze<T>(value: T): T`
72
+ - `DEPENDENCY_MODEL_SCHEMA_VERSION` (variable): `DEPENDENCY_MODEL_SCHEMA_VERSION = 2`
73
+ - `DependencyModel` (interface): `interface DependencyModel`
74
+ - `DependencyModelConsumer` (interface): `interface DependencyModelConsumer`
75
+ - `DependencyModelContract` (interface): `interface DependencyModelContract`
76
+ - `DependencyModelContractRef` (typealias): `type DependencyModelContractRef = ContractRef`
77
+ - `DependencyModelVariable` (interface): `interface DependencyModelVariable`
78
+ - `detectCompatibilityIssues` (function): `function detectCompatibilityIssues(contracts: readonly DiscoveredContract[]): CompatibilityIssue[]`
79
+ - `detectDuplicateVariableShapes` (function): `function detectDuplicateVariableShapes(contracts: readonly DiscoveredContract[]): CompatibilityIssue[]`
80
+ - `detectExclusiveGroupIssues` (function): `function detectExclusiveGroupIssues(contracts: readonly DiscoveredContract[]): CompatibilityIssue[]`
81
+ - `DiscoveredContract` (interface): `interface DiscoveredContract extends EnvGovernanceFields`
82
+ - `DiscoveredContractDocs` (interface): `interface DiscoveredContractDocs extends EnvGovernanceFields`
83
+ - `DiscoveredContractSummary` (interface): `interface DiscoveredContractSummary`
84
+ - `DiscoveredSchemaVariable` (interface): `interface DiscoveredSchemaVariable`
85
+ - `DiscoveredVariable` (interface): `interface DiscoveredVariable extends DiscoveredSchemaVariable, EnvGovernanceFields`
86
+ - `DiscoveredVariableDocs` (interface): `interface DiscoveredVariableDocs extends EnvGovernanceFields`
87
+ - `DiscoveredVariableEvidence` (interface): `interface DiscoveredVariableEvidence`
88
+ - `discoverSchemaFiles` (function): `function discoverSchemaFiles(options: DiscoverOptions): Promise<string[]>`
89
+ - `displayPath` (function): `function displayPath(root: string, filePath: string): string`
90
+ - `DocumentationFindings` (interface): `interface DocumentationFindings`
91
+ - `DynamicAccessAssertion` (interface): `interface DynamicAccessAssertion extends SourcePosition`
92
+ - `DynamicAccessCitationProblem` (interface): `interface DynamicAccessCitationProblem`
93
+ - `effectiveOwner` (function): `function effectiveOwner(contract: { readonly owner: string | undefined; }, variable: { readonly owner: string | undefined; }): string | undefined`
94
+ - `EnvDocumentationGenerationError` (class): `class EnvDocumentationGenerationError extends Error`
95
+ - `EnvExampleOnExisting` (typealias): `type EnvExampleOnExisting = "keep-sibling" | "overwrite" | "skip"`
96
+ - `EnvExampleResult` (interface): `interface EnvExampleResult`
97
+ - `EnvManifestGenerationError` (class): `class EnvManifestGenerationError extends Error`
98
+ - `EnvProjectGenerationError` (class): `class EnvProjectGenerationError extends Error`
99
+ - `EnvUsageAnalysisError` (class): `class EnvUsageAnalysisError extends Error`
100
+ - `EVIDENCE_MODEL_SCHEMA_VERSION` (variable): `EVIDENCE_MODEL_SCHEMA_VERSION = 1`
101
+ - `EvidenceModel` (interface): `interface EvidenceModel`
102
+ - `EvidenceProvenance` (interface): `interface EvidenceProvenance`
103
+ - `EvidenceReference` (typealias): `type EvidenceReference = ContractEvidenceReference | OwnershipEvidenceReference | ChangeEvidenceReference`
104
+ - `ExpiringEntry` (interface): `interface ExpiringEntry`
105
+ - `ExpiringSoonEntry` (interface): `interface ExpiringSoonEntry`
106
+ - `expiringSoonReport` (function): `function expiringSoonReport(evidence: EvidenceModel): ExpiringSoonReport`
107
+ - `ExpiringSoonReport` (interface): `interface ExpiringSoonReport extends Record<string, unknown>`
108
+ - `expiringSoonReport` (namespace): `namespace expiringSoonReport`
109
+ - `extractCommentedVariables` (function): `function extractCommentedVariables(source: string): string[]`
110
+ - `extractContractDocs` (function): `function extractContractDocs(docsArg: TS.Expression | undefined, filePath: string, contextLabel: string, warnings: ParseWarning[]): DiscoveredContractDocs`
111
+ - `extractDeclaredVariables` (function): `function extractDeclaredVariables(source: string): string[]`
112
+ - `extractPreviouslyDocumentedKeys` (function): `function extractPreviouslyDocumentedKeys(previousContent: string): Set<string>`
113
+ - `extractSchemaVariables` (function): `function extractSchemaVariables(schemaLiteral: TS.ObjectLiteralExpression, filePath: string, contextLabel: string, warnings: ParseWarning[], sourceFile: TS.SourceFile): DiscoveredSchemaVariable[]`
114
+ - `FileParseResult` (interface): `interface FileParseResult`
115
+ - `FINDING_MODEL_SCHEMA_VERSION` (variable): `FINDING_MODEL_SCHEMA_VERSION = 3`
116
+ - `Finding` (interface): `interface Finding`
117
+ - `FindingCode` (typealias): `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"`
118
+ - `FindingFamily` (typealias): `type FindingFamily = "compatibility" | "drift" | "documentation" | "ownership"`
119
+ - `FindingModel` (interface): `interface FindingModel`
120
+ - `generateDocumentation` (function): `function generateDocumentation(options: GenerateDocumentationOptions): Promise<GenerateDocumentationResult>`
121
+ - `GenerateDocumentationOptions` (interface): `interface GenerateDocumentationOptions`
122
+ - `GenerateDocumentationResult` (interface): `interface GenerateDocumentationResult`
123
+ - `generateEnvArtifacts` (function): `function generateEnvArtifacts(options: GenerateEnvArtifactsOptions): Promise<GenerateEnvArtifactsResult>`
124
+ - `GenerateEnvArtifactsOptions` (interface): `interface GenerateEnvArtifactsOptions`
125
+ - `GenerateEnvArtifactsResult` (interface): `interface GenerateEnvArtifactsResult`
126
+ - `generateEnvManifest` (function): `function generateEnvManifest(options: GenerateEnvManifestOptions): Promise<GenerateEnvManifestResult>`
127
+ - `GenerateEnvManifestOptions` (interface): `interface GenerateEnvManifestOptions`
128
+ - `GenerateEnvManifestResult` (interface): `interface GenerateEnvManifestResult`
129
+ - `generateEvidenceModel` (function): `function generateEvidenceModel(options: GenerateEvidenceModelOptions): Promise<EvidenceModel>`
130
+ - `GenerateEvidenceModelOptions` (interface): `interface GenerateEvidenceModelOptions`
131
+ - `generateUsageReport` (function): `function generateUsageReport(options: GenerateUsageReportOptions): Promise<GenerateUsageReportResult>`
132
+ - `GenerateUsageReportOptions` (interface): `interface GenerateUsageReportOptions`
133
+ - `GenerateUsageReportResult` (interface): `interface GenerateUsageReportResult extends RenderUsageReportOptions`
134
+ - `getEvidenceModel` (function): `function getEvidenceModel(options: GetEvidenceModelOptions): Promise<GetEvidenceModelResult>`
135
+ - `GetEvidenceModelOptions` (interface): `interface GetEvidenceModelOptions extends GenerateEvidenceModelOptions`
136
+ - `GetEvidenceModelResult` (interface): `interface GetEvidenceModelResult`
137
+ - `groupVariablesByOwner` (function): `function groupVariablesByOwner<C extends OwnerBearingContract>(contracts: readonly C[], ownerOf: (contract: C, variable: VariableOf<C>) => string | undefined): ReadonlyMap<string, readonly { contract: C; variable: VariableOf<C>; }[]>`
138
+ - `ImportBinding` (interface): `interface ImportBinding`
139
+ - `IndeterminateOwnershipFinding` (interface): `interface IndeterminateOwnershipFinding`
140
+ - `LIFECYCLE_MODEL_SCHEMA_VERSION` (variable): `LIFECYCLE_MODEL_SCHEMA_VERSION = 3`
141
+ - `LifecycleModel` (interface): `interface LifecycleModel`
142
+ - `LifecycleModelContract` (interface): `interface LifecycleModelContract`
143
+ - `LifecycleModelVariable` (interface): `interface LifecycleModelVariable`
144
+ - `linkFiles` (function): `function linkFiles(discoveredFiles: readonly string[], readFile: (filePath: string) => Promise<string>, context: ImportResolutionContext, packageOrigins?: ReadonlyMap<string, PackageOrigin>): Promise<LinkResult>`
145
+ - `LinkResult` (interface): `interface LinkResult`
146
+ - `LiveExpirationDates` (typealias): `type LiveExpirationDates = (variableNames: readonly string[]) => Promise<Readonly<Record<string, string>>>`
147
+ - `ManifestChangeReport` (interface): `interface ManifestChangeReport`
148
+ - `ManifestContractRef` (typealias): `type ManifestContractRef = ContractRef`
149
+ - `ManifestContractUpdate` (interface): `interface ManifestContractUpdate extends ManifestContractRef`
150
+ - `ManifestFieldChange` (interface): `interface ManifestFieldChange`
151
+ - `ManifestVariableRef` (interface): `interface ManifestVariableRef extends ContractRef`
152
+ - `ManifestVariableUpdate` (interface): `interface ManifestVariableUpdate extends ManifestVariableRef`
153
+ - `NonstandardSensitivityEntry` (interface): `interface NonstandardSensitivityEntry`
154
+ - `OwnerBearingContract` (interface): `interface OwnerBearingContract`
155
+ - `OWNERSHIP_MODEL_SCHEMA_VERSION` (variable): `OWNERSHIP_MODEL_SCHEMA_VERSION = 1`
156
+ - `OwnershipDependencyEntry` (interface): `interface OwnershipDependencyEntry`
157
+ - `OwnershipEvidenceReference` (interface): `interface OwnershipEvidenceReference`
158
+ - `OwnershipModel` (interface): `interface OwnershipModel`
159
+ - `OwnershipModelContract` (interface): `interface OwnershipModelContract`
160
+ - `OwnershipModelContractRef` (typealias): `type OwnershipModelContractRef = ContractRef`
161
+ - `OwnershipModelVariable` (interface): `interface OwnershipModelVariable`
162
+ - `OwnershipModelVariableRef` (interface): `interface OwnershipModelVariableRef extends ContractRef`
163
+ - `ownershipSummary` (function): `function ownershipSummary(evidence: EvidenceModel): OwnershipSummary`
164
+ - `OwnershipSummary` (interface): `interface OwnershipSummary extends Record<string, unknown>`
165
+ - `ownershipSummary` (namespace): `namespace ownershipSummary`
166
+ - `OwnershipSummaryEntry` (interface): `interface OwnershipSummaryEntry`
167
+ - `PackageOrigin` (interface): `interface PackageOrigin`
168
+ - `parseRotationPeriodDays` (function): `function parseRotationPeriodDays(value: string): number | undefined`
169
+ - `parseSchemaFile` (function): `function parseSchemaFile(filePath: string, sourceText: string): FileParseResult`
170
+ - `ParseWarning` (interface): `interface ParseWarning`
171
+ - `readToolVersion` (function): `function readToolVersion(): string`
172
+ - `Reconciliation` (interface): `interface Reconciliation`
173
+ - `RenamedVariable` (interface): `interface RenamedVariable`
174
+ - `renderDocs` (function): `function renderDocs(contracts: readonly ContractModelContract[], options: RenderDocsOptions): string`
175
+ - `RenderDocsOptions` (interface): `interface RenderDocsOptions`
176
+ - `renderEnvExample` (function): `function renderEnvExample(contracts: readonly DiscoveredContract[], reconciliationHeader?: readonly string[]): string`
177
+ - `renderManifest` (function): `function renderManifest(contracts: readonly DiscoveredContract[], outputFile: string): string`
178
+ - `renderUsageReport` (function): `function renderUsageReport(computed: RenderUsageReportOptions): string`
179
+ - `RenderUsageReportOptions` (interface): `interface RenderUsageReportOptions`
180
+ - `resolveLiveExpirationDates` (function): `function resolveLiveExpirationDates(contracts: readonly DiscoveredContract[], liveExpirationDates: LiveExpirationDates | undefined): Promise<readonly DiscoveredContract[]>`
181
+ - `resolveRelativeImport` (function): `function resolveRelativeImport(importingFile: string, specifier: string, fs: BuildFileSystem): Promise<string | undefined>`
182
+ - `RotationComplianceStatus` (typealias): `type RotationComplianceStatus = "compliant" | "overdue" | "expired" | "undeclared"`
183
+ - `SarifLog` (interface): `interface SarifLog`
184
+ - `ScannedSurface` (interface): `interface ScannedSurface`
185
+ - `SchemaRef` (typealias): `type SchemaRef = { readonly kind: "literal"; readonly node: TS.ObjectLiteralExpression; } | { readonly kind: "identifier"; readonly name: string; } | { readonly kind: "unresolvable"; }`
186
+ - `SecurityReviewCounters` (interface): `interface SecurityReviewCounters`
187
+ - `SourcePosition` (interface): `interface SourcePosition`
188
+ - `STANDARD_SENSITIVITY_LEVELS` (variable): `STANDARD_SENSITIVITY_LEVELS: ReadonlySet<string>`
189
+ - `UnconsumedOwnedVariableFinding` (interface): `interface UnconsumedOwnedVariableFinding`
190
+ - `UndocumentedContractRef` (interface): `interface UndocumentedContractRef`
191
+ - `UndocumentedVariableRef` (interface): `interface UndocumentedVariableRef`
192
+ - `UnresolvedConsumerFinding` (interface): `interface UnresolvedConsumerFinding`
193
+ - `UnresolvedLink` (interface): `interface UnresolvedLink`
194
+ - `VariableAccessStatus` (typealias): `type VariableAccessStatus = "used" | "unconsumed" | "indeterminate"`
195
+ - `writeEnvExample` (function): `function writeEnvExample(contracts: readonly DiscoveredContract[], location: string, fs: BuildFileSystem, options?: { onExisting?: EnvExampleOnExisting; }): Promise<EnvExampleResult>`
196
+
197
+ ## `@maverickcer/env-cap/helpers`
198
+
199
+ - `processors` (variable): `processors: { base64: typeof base64; parseJSON: typeof parseJSON; split: typeof split; toArray: typeof toArray; toBigInt: typeof toBigInt; toBoolean: typeof toBoolean; toDate: typeof toDate; toInteger: typeof toInteger; toLowerCase: typeof toLowerCase; toNumber: typeof toNumber; toRegExp: typeof toRegExp; toString: typeof toString; toURL: typeof toURL; toUpperCase: typeof toUpperCase; trim: typeof trim; }`
200
+ - `validators` (variable): `validators: { after: typeof after; all: typeof all; any: typeof any; before: typeof before; custom: typeof custom; email: typeof email; endsWith: typeof endsWith; enum: typeof oneOf; finite: typeof finite; future: typeof future; includes: typeof includes; integer: typeof integerValidator; length: typeof length; matches: typeof matches; max: typeof max; maxItems: typeof maxItems; maxLength: typeof maxLength; min: typeof min; minItems: typeof minItems; minLength: typeof minLength; negative: typeof negative; not: typeof not; oneOf: typeof oneOf; optional: typeof optional; past: typeof past; positive: typeof positive; range: typeof range; refine: typeof refine; regex: typeof matches; required: typeof required; safeInteger: typeof safeInteger; unique: typeof unique; url: typeof urlValidator; uuid: typeof uuid; uuidVersion: typeof uuidVersion; }`
201
+
202
+ ## `@maverickcer/env-cap/node`
203
+
204
+ - `nodeBuildFileSystem` (variable): `nodeBuildFileSystem: BuildFileSystem`
205
+
206
+ ## `@maverickcer/env-cap/evidence`
207
+
208
+ - `defineEvidenceProjection` (function): `function defineEvidenceProjection<T extends Record<string, unknown>>(schema: EvidenceProjectionSchema<T>): EvidenceProjection<T>`
209
+ - `EvidenceModel` (interface): `interface EvidenceModel`
210
+ - `EvidenceProjection` (interface): `interface EvidenceProjection<T extends Record<string, unknown>>`
211
+ - `EvidenceProjectionResult` (interface): `interface EvidenceProjectionResult<T extends Record<string, unknown>>`
212
+ - `EvidenceProjectionSchema` (typealias): `type EvidenceProjectionSchema<T extends Record<string, unknown>> = { readonly [K in keyof T]: EvidenceProjector<T[K]>; }`
213
+ - `EvidenceProjector` (typealias): `type EvidenceProjector<T> = (evidence: EvidenceModel) => T`
214
+ - `EvidenceProvenance` (interface): `interface EvidenceProvenance`
215
+
216
+ ## `@maverickcer/env-cap/eslint-plugin`
217
+
218
+ - `noNodeFs` (variable): `noNodeFs: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNodeFs", [import("../_ipc/no-node-fs.js").RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & { name: string; }`
219
+ - `noRawProcessEnv` (variable): `noRawProcessEnv: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noRawProcessEnv", [RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & { name: string; }`
220
+ - `plugin` (variable): `plugin: { rules: { "no-raw-process-env": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noRawProcessEnv", [import("./no-raw-process-env.js").RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & { name: string; }; "no-node-fs": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNodeFs", [import("../_ipc/no-node-fs.js").RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & { name: string; }; }; }`