@maverickcer/env-cap 0.5.3 → 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.
- package/ADOPTION.md +144 -0
- package/AGENTS.md +146 -0
- package/CHANGELOG.md +438 -0
- package/CODE_OF_CONDUCT.md +124 -0
- package/CODE_REVIEW.md +200 -0
- package/CONTRIBUTING.md +131 -0
- package/GUIDE.md +1214 -0
- package/PROMPT.md +89 -0
- package/README.md +97 -199
- package/RELEASING.md +160 -0
- package/SECURITY.md +270 -0
- package/SUPPORT.md +76 -0
- package/VERSIONING.md +118 -0
- package/benchmarks/READING-BENCHMARKS.md +197 -0
- package/benchmarks/README.md +126 -0
- package/benchmarks/WRITING-BENCHMARKS.md +252 -0
- package/benchmarks/performance-buildtime/BENCHMARKS.md +889 -0
- package/benchmarks/performance-runtime/BENCHMARKS.md +1988 -0
- package/dist/.dts/_ipc/build-fs.d.ts +53 -0
- package/dist/.dts/_ipc/build-fs.d.ts.map +1 -0
- package/dist/.dts/_ipc/compiler-api.d.ts +17 -0
- package/dist/.dts/_ipc/compiler-api.d.ts.map +1 -0
- package/dist/.dts/_ipc/display-path.d.ts +27 -0
- package/dist/.dts/_ipc/display-path.d.ts.map +1 -0
- package/dist/.dts/_ipc/generated-banner.d.ts +58 -0
- package/dist/.dts/_ipc/generated-banner.d.ts.map +1 -0
- package/dist/.dts/_ipc/glob.d.ts +22 -0
- package/dist/.dts/_ipc/glob.d.ts.map +1 -0
- package/dist/.dts/_ipc/no-node-fs.d.ts +34 -0
- package/dist/.dts/_ipc/no-node-fs.d.ts.map +1 -0
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +134 -0
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -0
- package/dist/.dts/_ipc/typescript.d.ts +20 -0
- package/dist/.dts/_ipc/typescript.d.ts.map +1 -0
- package/dist/.dts/build/assemble-project.d.ts +1 -1
- package/dist/.dts/build/assemble-project.d.ts.map +1 -1
- package/dist/.dts/build/change-model.d.ts.map +1 -1
- package/dist/.dts/build/check-artifacts.d.ts.map +1 -1
- package/dist/.dts/build/citation-verification.d.ts.map +1 -1
- package/dist/.dts/build/compatibility.d.ts.map +1 -1
- package/dist/.dts/build/compiler-api.d.ts +12 -0
- package/dist/.dts/build/compiler-api.d.ts.map +1 -0
- package/dist/.dts/build/dependency-graph.d.ts +3 -1
- package/dist/.dts/build/dependency-graph.d.ts.map +1 -1
- package/dist/.dts/build/dependency-model.d.ts.map +1 -1
- package/dist/.dts/build/discover.d.ts.map +1 -1
- package/dist/.dts/build/display-path.d.ts +3 -21
- package/dist/.dts/build/display-path.d.ts.map +1 -1
- package/dist/.dts/build/docs.d.ts +1 -1
- package/dist/.dts/build/docs.d.ts.map +1 -1
- package/dist/.dts/build/env-example.d.ts.map +1 -1
- package/dist/.dts/build/evidence-cache.d.ts +1 -1
- package/dist/.dts/build/evidence-cache.d.ts.map +1 -1
- package/dist/.dts/build/evidence-model.d.ts +2 -2
- package/dist/.dts/build/evidence-snapshot.d.ts +25 -0
- package/dist/.dts/build/evidence-snapshot.d.ts.map +1 -1
- package/dist/.dts/build/finding-model.d.ts +1 -1
- package/dist/.dts/build/finding-model.d.ts.map +1 -1
- package/dist/.dts/build/generate-documentation.d.ts.map +1 -1
- package/dist/.dts/build/generate-env-artifacts.d.ts +23 -8
- package/dist/.dts/build/generate-env-artifacts.d.ts.map +1 -1
- package/dist/.dts/build/generate-evidence.d.ts.map +1 -1
- package/dist/.dts/build/generate-manifest.d.ts +1 -1
- package/dist/.dts/build/generate-manifest.d.ts.map +1 -1
- package/dist/.dts/build/generate-usage.d.ts +3 -3
- package/dist/.dts/build/generate-usage.d.ts.map +1 -1
- package/dist/.dts/build/generated-banner.d.ts +29 -38
- package/dist/.dts/build/generated-banner.d.ts.map +1 -1
- package/dist/.dts/build/glob.d.ts +3 -15
- package/dist/.dts/build/glob.d.ts.map +1 -1
- package/dist/.dts/build/index.d.ts +2 -2
- package/dist/.dts/build/lifecycle-model.d.ts.map +1 -1
- package/dist/.dts/build/link.d.ts.map +1 -1
- package/dist/.dts/build/literal-eval.d.ts +4 -3
- package/dist/.dts/build/literal-eval.d.ts.map +1 -1
- package/dist/.dts/build/live-expirations.d.ts.map +1 -1
- package/dist/.dts/build/manifest.d.ts.map +1 -1
- package/dist/.dts/build/merge-documentation.d.ts +35 -0
- package/dist/.dts/build/merge-documentation.d.ts.map +1 -0
- package/dist/.dts/build/parse.d.ts +12 -12
- package/dist/.dts/build/parse.d.ts.map +1 -1
- package/dist/.dts/build/reference-projections.d.ts +17 -3
- package/dist/.dts/build/reference-projections.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-import.d.ts +5 -0
- package/dist/.dts/build/resolution/resolve-import.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-package-schema.d.ts +1 -1
- package/dist/.dts/build/resolution/resolve-package-schema.d.ts.map +1 -1
- package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts +11 -94
- package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts/build/sarif.d.ts.map +1 -1
- package/dist/.dts/build/scan-dependencies.d.ts +23 -0
- package/dist/.dts/build/scan-dependencies.d.ts.map +1 -1
- package/dist/.dts/build/types.d.ts +4 -53
- package/dist/.dts/build/types.d.ts.map +1 -1
- package/dist/.dts/build/typescript.d.ts +6 -0
- package/dist/.dts/build/typescript.d.ts.map +1 -0
- package/dist/.dts/build/usage-report.d.ts.map +1 -1
- package/dist/.dts/cli/filesystem.d.ts +4 -0
- package/dist/.dts/cli/filesystem.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/glob.d.ts +4 -15
- package/dist/.dts/eslint-plugin/glob.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/index.d.ts +3 -3
- package/dist/.dts/eslint-plugin/no-node-fs.d.ts +8 -18
- package/dist/.dts/eslint-plugin/no-node-fs.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts.map +1 -1
- package/dist/.dts/evidence/index.d.ts +2 -2
- package/dist/.dts/helpers/index.d.ts +2 -2
- package/dist/.dts/helpers/processors.d.ts.map +1 -1
- package/dist/.dts/helpers/validators.d.ts.map +1 -1
- package/dist/.dts/runtime/cache.d.ts +0 -3
- package/dist/.dts/runtime/cache.d.ts.map +1 -1
- package/dist/.dts/runtime/create.d.ts.map +1 -1
- package/dist/.dts/runtime/document.d.ts.map +1 -1
- package/dist/.dts/runtime/index.d.ts +2 -2
- package/dist/.dts/runtime/registry.d.ts.map +1 -1
- package/dist/.dts/runtime/validate.d.ts.map +1 -1
- package/dist/{build-U326PI5A.js → build-WKDIAWF7.js} +685 -645
- package/dist/build-WKDIAWF7.js.map +1 -0
- package/dist/build.cjs +698 -651
- package/dist/build.cjs.map +1 -1
- package/dist/build.js +695 -649
- package/dist/build.js.map +1 -1
- package/dist/{chunk-BSTLSR2R.js → chunk-KEGYUHBU.js} +2 -2
- package/dist/chunk-KEGYUHBU.js.map +1 -0
- package/dist/cli/index.js +64 -63
- package/dist/cli/index.js.map +1 -1
- package/dist/eslint-plugin/index.cjs +95 -626
- package/dist/eslint-plugin/index.cjs.map +1 -1
- package/dist/eslint-plugin/index.js +94 -625
- 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/helpers.cjs +4 -9
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.js +4 -9
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +11 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -25
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +10 -8
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +10 -8
- package/dist/node.js.map +1 -1
- package/examples/README.md +95 -0
- package/node_modules/@typescript/old/LICENSE.txt +55 -0
- package/node_modules/@typescript/old/README.md +50 -0
- package/node_modules/@typescript/old/SECURITY.md +39 -0
- package/node_modules/@typescript/old/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/@typescript/old/bin/tsc +2 -0
- package/node_modules/@typescript/old/bin/tsserver +2 -0
- package/node_modules/@typescript/old/lib/_tsc.js +134465 -0
- package/node_modules/@typescript/old/lib/_tsserver.js +659 -0
- package/node_modules/@typescript/old/lib/_typingsInstaller.js +222 -0
- package/node_modules/@typescript/old/lib/cs/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/de/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/es/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/fr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/it/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/ja/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/ko/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/lib.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.decorators.d.ts +382 -0
- package/node_modules/@typescript/old/lib/lib.decorators.legacy.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.dom.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.dom.d.ts +45125 -0
- package/node_modules/@typescript/old/lib/lib.dom.iterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.es2015.collection.d.ts +150 -0
- package/node_modules/@typescript/old/lib/lib.es2015.core.d.ts +595 -0
- package/node_modules/@typescript/old/lib/lib.es2015.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.es2015.generator.d.ts +75 -0
- package/node_modules/@typescript/old/lib/lib.es2015.iterable.d.ts +603 -0
- package/node_modules/@typescript/old/lib/lib.es2015.promise.d.ts +79 -0
- package/node_modules/@typescript/old/lib/lib.es2015.proxy.d.ts +126 -0
- package/node_modules/@typescript/old/lib/lib.es2015.reflect.d.ts +142 -0
- package/node_modules/@typescript/old/lib/lib.es2015.symbol.d.ts +44 -0
- package/node_modules/@typescript/old/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/node_modules/@typescript/old/lib/lib.es2016.array.include.d.ts +114 -0
- package/node_modules/@typescript/old/lib/lib.es2016.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2016.full.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2016.intl.d.ts +29 -0
- package/node_modules/@typescript/old/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2017.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2017.date.d.ts +29 -0
- package/node_modules/@typescript/old/lib/lib.es2017.full.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2017.intl.d.ts +42 -0
- package/node_modules/@typescript/old/lib/lib.es2017.object.d.ts +47 -0
- package/node_modules/@typescript/old/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/node_modules/@typescript/old/lib/lib.es2017.string.d.ts +43 -0
- package/node_modules/@typescript/old/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/node_modules/@typescript/old/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/node_modules/@typescript/old/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/node_modules/@typescript/old/lib/lib.es2018.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2018.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2018.intl.d.ts +81 -0
- package/node_modules/@typescript/old/lib/lib.es2018.promise.d.ts +28 -0
- package/node_modules/@typescript/old/lib/lib.es2018.regexp.d.ts +35 -0
- package/node_modules/@typescript/old/lib/lib.es2019.array.d.ts +77 -0
- package/node_modules/@typescript/old/lib/lib.es2019.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2019.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2019.intl.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2019.object.d.ts +31 -0
- package/node_modules/@typescript/old/lib/lib.es2019.string.d.ts +35 -0
- package/node_modules/@typescript/old/lib/lib.es2019.symbol.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2020.bigint.d.ts +763 -0
- package/node_modules/@typescript/old/lib/lib.es2020.d.ts +25 -0
- package/node_modules/@typescript/old/lib/lib.es2020.date.d.ts +40 -0
- package/node_modules/@typescript/old/lib/lib.es2020.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2020.intl.d.ts +472 -0
- package/node_modules/@typescript/old/lib/lib.es2020.number.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.es2020.promise.d.ts +45 -0
- package/node_modules/@typescript/old/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/@typescript/old/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/@typescript/old/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/node_modules/@typescript/old/lib/lib.es2021.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2021.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2021.intl.d.ts +164 -0
- package/node_modules/@typescript/old/lib/lib.es2021.promise.d.ts +46 -0
- package/node_modules/@typescript/old/lib/lib.es2021.string.d.ts +31 -0
- package/node_modules/@typescript/old/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/@typescript/old/lib/lib.es2022.array.d.ts +119 -0
- package/node_modules/@typescript/old/lib/lib.es2022.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/@typescript/old/lib/lib.es2022.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2022.intl.d.ts +143 -0
- package/node_modules/@typescript/old/lib/lib.es2022.object.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2022.regexp.d.ts +37 -0
- package/node_modules/@typescript/old/lib/lib.es2022.string.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2023.array.d.ts +922 -0
- package/node_modules/@typescript/old/lib/lib.es2023.collection.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2023.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.es2023.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2023.intl.d.ts +62 -0
- package/node_modules/@typescript/old/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/node_modules/@typescript/old/lib/lib.es2024.collection.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2024.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2024.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2024.object.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2024.promise.d.ts +33 -0
- package/node_modules/@typescript/old/lib/lib.es2024.regexp.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/node_modules/@typescript/old/lib/lib.es2024.string.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2025.collection.d.ts +94 -0
- package/node_modules/@typescript/old/lib/lib.es2025.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2025.float16.d.ts +443 -0
- package/node_modules/@typescript/old/lib/lib.es2025.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2025.intl.d.ts +200 -0
- package/node_modules/@typescript/old/lib/lib.es2025.iterator.d.ts +146 -0
- package/node_modules/@typescript/old/lib/lib.es2025.promise.d.ts +32 -0
- package/node_modules/@typescript/old/lib/lib.es2025.regexp.d.ts +30 -0
- package/node_modules/@typescript/old/lib/lib.es5.d.ts +4599 -0
- package/node_modules/@typescript/old/lib/lib.es6.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.esnext.array.d.ts +33 -0
- package/node_modules/@typescript/old/lib/lib.esnext.collection.d.ts +47 -0
- package/node_modules/@typescript/old/lib/lib.esnext.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.esnext.date.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.esnext.decorators.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.esnext.disposable.d.ts +191 -0
- package/node_modules/@typescript/old/lib/lib.esnext.error.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.esnext.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.esnext.intl.d.ts +107 -0
- package/node_modules/@typescript/old/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.esnext.temporal.d.ts +485 -0
- package/node_modules/@typescript/old/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/node_modules/@typescript/old/lib/lib.scripthost.d.ts +320 -0
- package/node_modules/@typescript/old/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.webworker.d.ts +15606 -0
- package/node_modules/@typescript/old/lib/lib.webworker.importscripts.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.webworker.iterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/pl/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/pt-br/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/ru/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/tr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/tsc.js +8 -0
- package/node_modules/@typescript/old/lib/tsserver.js +8 -0
- package/node_modules/@typescript/old/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/@typescript/old/lib/tsserverlibrary.js +21 -0
- package/node_modules/@typescript/old/lib/typesMap.json +497 -0
- package/node_modules/@typescript/old/lib/typescript.d.ts +11448 -0
- package/node_modules/@typescript/old/lib/typescript.js +201039 -0
- package/node_modules/@typescript/old/lib/typingsInstaller.js +8 -0
- package/node_modules/@typescript/old/lib/watchGuard.js +53 -0
- package/node_modules/@typescript/old/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/package.json +118 -0
- package/node_modules/@typescript/typescript6/LICENSE.txt +55 -0
- package/node_modules/@typescript/typescript6/README.md +9 -0
- package/node_modules/@typescript/typescript6/bin/tsc6 +2 -0
- package/node_modules/@typescript/typescript6/lib/tsc.js +1 -0
- package/node_modules/@typescript/typescript6/lib/tsserverlibrary.d.ts +2 -0
- package/node_modules/@typescript/typescript6/lib/tsserverlibrary.js +1 -0
- package/node_modules/@typescript/typescript6/lib/typescript.d.ts +2 -0
- package/node_modules/@typescript/typescript6/lib/typescript.js +1 -0
- package/node_modules/@typescript/typescript6/package.json +39 -0
- package/package.json +74 -22
- package/schemas/env-cap-report.schema.json +1 -1
- package/skills/env-cap/SKILL.md +91 -0
- package/skills/env-cap/references/api.md +220 -0
- package/specs/architecture.md +634 -0
- package/specs/decisions/0001-runtime-documentation-separation.md +197 -0
- package/specs/decisions/0002-static-analysis-never-execution.md +233 -0
- package/specs/decisions/0003-no-global-env-object.md +172 -0
- package/specs/decisions/0004-no-client-server-package-split.md +116 -0
- package/specs/decisions/0005-warn-not-throw-by-default.md +93 -0
- package/specs/decisions/0006-self-redacting-contracts.md +124 -0
- package/specs/decisions/0007-processor-not-transformer.md +109 -0
- package/specs/decisions/0008-gzip-size-budget.md +173 -0
- package/specs/decisions/0009-exclusive-groups-are-always-errors.md +139 -0
- package/specs/decisions/0010-dependency-ownership-engine-scope-boundary.md +100 -0
- package/specs/decisions/0011-shared-discovery-compute-atomic-write-non-atomic.md +104 -0
- package/specs/decisions/0012-live-expiration-overrides-not-ast-functions.md +145 -0
- package/specs/decisions/0013-json-output-is-a-versioned-mirror.md +136 -0
- package/specs/decisions/0014-cross-package-schema-discovery.md +206 -0
- package/specs/decisions/0015-security-backport-window.md +60 -0
- package/specs/decisions/0016-check-mode-compute-before-compare-never-partial-write.md +113 -0
- package/specs/decisions/0017-eslint-plugin-entry-point.md +113 -0
- package/specs/decisions/0018-rotation-alert-issue-on-non-pr-runs.md +104 -0
- package/specs/decisions/0019-published-json-schema-generated-from-types.md +100 -0
- package/specs/decisions/0020-declaration-maps-via-separate-tsc-pass.md +101 -0
- package/specs/decisions/0021-manifest-change-report-persisted-snapshot.md +177 -0
- package/specs/decisions/0022-validation-contexts.md +267 -0
- package/specs/decisions/0023-tsconfig-path-alias-resolution.md +182 -0
- package/specs/decisions/0024-fact-model-architecture.md +144 -0
- package/specs/decisions/0025-contract-model-json-projection.md +105 -0
- package/specs/decisions/0026-finding-model-unifies-four-families.md +109 -0
- package/specs/decisions/0027-dependency-model-fact-shape-not-engine-access.md +98 -0
- package/specs/decisions/0028-ownership-model-shared-effective-owner.md +85 -0
- package/specs/decisions/0029-lifecycle-model-deprecation-rename-fields.md +98 -0
- package/specs/decisions/0030-change-model-wraps-manifest-change-report.md +97 -0
- package/specs/decisions/0031-evidence-entry-point.md +85 -0
- package/specs/decisions/0032-evidence-projection-provenance-mechanism.md +120 -0
- package/specs/decisions/0033-reference-projections-live-in-examples.md +81 -0
- package/specs/decisions/0034-three-tier-examples-restructuring.md +85 -0
- package/specs/decisions/0035-documentenv-metadata-generalization-and-compliance-fields.md +85 -0
- package/specs/decisions/0036-exact-source-position-evidence.md +122 -0
- package/specs/decisions/0037-developer-declared-dynamic-access-citations.md +114 -0
- package/specs/decisions/0038-always-computed-evidence-model-backs-generate-check-docs.md +244 -0
- package/specs/decisions/0039-scanner-local-dataflow-boundary.md +160 -0
- package/specs/decisions/0040-library-surfaces-do-not-acquire-node-fs.md +156 -0
- package/specs/decisions/0041-dual-package-hazard-checked-documented.md +75 -0
- package/specs/decisions/0042-init-cli-subcommand-scaffolds-only.md +95 -0
- package/specs/decisions/0043-env-cap-resolver-relocated-and-duplicated.md +71 -0
- package/specs/decisions/0044-strict-escalates-every-warning-family.md +88 -0
- package/specs/decisions/0045-promote-experimental-surfaces-to-stable.md +103 -0
- package/specs/decisions/0046-cli-restricted-to-runtime-and-evidence-output.md +177 -0
- package/specs/decisions/0047-supported-toolchain-node-22-and-typescript-5-6.md +30 -0
- package/specs/decisions/0048-eslint-plugin-does-not-vendor-typescript-eslint.md +25 -0
- package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +87 -0
- package/specs/decisions/0050-a-variable-declared-twice-is-documented-once.md +55 -0
- package/specs/generated-artifacts.md +104 -0
- package/specs/migrations/README.md +30 -0
- package/specs/migrations/from-centralized-schema.md +503 -0
- package/specs/migrations/from-dotenv.md +352 -0
- package/specs/migrations/from-envalid.md +482 -0
- package/specs/migrations/from-process-env.md +398 -0
- package/specs/migrations/from-t3-env.md +416 -0
- package/specs/migrations/from-zod.md +303 -0
- package/dist/build-U326PI5A.js.map +0 -1
- package/dist/chunk-BSTLSR2R.js.map +0 -1
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
# Migrating from a Centralized Environment Schema
|
|
2
|
+
|
|
3
|
+
This guide explains how to migrate from a centralized environment configuration model into capability-owned environment contracts.
|
|
4
|
+
|
|
5
|
+
Examples of centralized schemas include:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
src/config/env.ts
|
|
9
|
+
src/env/schema.ts
|
|
10
|
+
src/config/environment.ts
|
|
11
|
+
src/config/settings.ts
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
where one file defines every environment variable used by the application:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
export const env = createConfig({
|
|
18
|
+
DATABASE_URL: ...,
|
|
19
|
+
STRIPE_SECRET_KEY: ...,
|
|
20
|
+
REDIS_URL: ...,
|
|
21
|
+
API_TIMEOUT: ...,
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Centralized schemas are a reasonable starting point. They provide a clear location for configuration and make small applications easy to understand.
|
|
26
|
+
|
|
27
|
+
As applications grow, however, the centralized file becomes a shared ownership boundary:
|
|
28
|
+
|
|
29
|
+
- Every capability change modifies the same file.
|
|
30
|
+
- Teams become dependent on whoever owns the schema.
|
|
31
|
+
- Removing capabilities requires finding unused configuration manually.
|
|
32
|
+
- Configuration ownership becomes separated from capability ownership.
|
|
33
|
+
- Merge conflicts increase as the application grows.
|
|
34
|
+
|
|
35
|
+
`env-cap` does not replace your validation system. It changes where environment ownership lives.
|
|
36
|
+
|
|
37
|
+
You can continue using Zod, Valibot, Joi, custom validators, or simple functions inside capability contracts.
|
|
38
|
+
|
|
39
|
+
The migration goal is:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
centralized configuration
|
|
43
|
+
|
|
|
44
|
+
v
|
|
45
|
+
capability-owned contracts
|
|
46
|
+
|
|
|
47
|
+
v
|
|
48
|
+
generated project-wide visibility
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The runtime becomes modular while build tooling provides the centralized view when needed.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Before migration
|
|
56
|
+
|
|
57
|
+
A centralized schema commonly looks like:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
// env.ts
|
|
61
|
+
|
|
62
|
+
export const env = {
|
|
63
|
+
DATABASE_URL: process.env.DATABASE_URL,
|
|
64
|
+
STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
|
|
65
|
+
REDIS_URL: process.env.REDIS_URL,
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
or:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
// env.schema.ts
|
|
73
|
+
|
|
74
|
+
export const env = createConfig({
|
|
75
|
+
DATABASE_URL: z.string().url(),
|
|
76
|
+
STRIPE_SECRET_KEY: z.string(),
|
|
77
|
+
REDIS_URL: z.string(),
|
|
78
|
+
})
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Every capability imports the same object:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { env } from "./env"
|
|
85
|
+
|
|
86
|
+
await connectDatabase(env.DATABASE_URL)
|
|
87
|
+
|
|
88
|
+
stripe.configure(env.STRIPE_SECRET_KEY)
|
|
89
|
+
|
|
90
|
+
redis.connect(env.REDIS_URL)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The problem is not the validation.
|
|
94
|
+
|
|
95
|
+
The problem is ownership.
|
|
96
|
+
|
|
97
|
+
The database capability owns `DATABASE_URL`, but the database configuration lives somewhere else.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Migration strategy
|
|
102
|
+
|
|
103
|
+
Migrate one capability at a time.
|
|
104
|
+
|
|
105
|
+
Do not move every variable into `env-cap` immediately.
|
|
106
|
+
|
|
107
|
+
A gradual migration works best:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
Before:
|
|
111
|
+
|
|
112
|
+
src/
|
|
113
|
+
├── env.ts
|
|
114
|
+
├── payments/
|
|
115
|
+
├── database/
|
|
116
|
+
└── reports/
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
After:
|
|
120
|
+
|
|
121
|
+
src/
|
|
122
|
+
├── env.ts (remaining legacy variables)
|
|
123
|
+
├── payments/
|
|
124
|
+
│ └── env.schema.ts
|
|
125
|
+
├── database/
|
|
126
|
+
│ └── env.schema.ts
|
|
127
|
+
└── reports/
|
|
128
|
+
└── env.schema.ts
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The application can temporarily support both approaches.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Step 1: Identify ownership
|
|
136
|
+
|
|
137
|
+
For each variable, determine which capability requires it.
|
|
138
|
+
|
|
139
|
+
Example centralized schema:
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
{
|
|
143
|
+
DATABASE_URL,
|
|
144
|
+
STRIPE_SECRET_KEY,
|
|
145
|
+
REPORT_TIMEOUT,
|
|
146
|
+
CACHE_TTL,
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Move ownership:
|
|
151
|
+
|
|
152
|
+
| Variable | New owner |
|
|
153
|
+
| ----------------- | --------- |
|
|
154
|
+
| DATABASE_URL | database |
|
|
155
|
+
| STRIPE_SECRET_KEY | payments |
|
|
156
|
+
| REPORT_TIMEOUT | reports |
|
|
157
|
+
| CACHE_TTL | cache |
|
|
158
|
+
|
|
159
|
+
Ownership should follow usage, not technical category.
|
|
160
|
+
|
|
161
|
+
A variable is not "database configuration" because it contains `DATABASE`.
|
|
162
|
+
|
|
163
|
+
It belongs to the capability that defines how it is consumed.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Step 2: Create capability schemas
|
|
168
|
+
|
|
169
|
+
Create a schema next to the capability.
|
|
170
|
+
|
|
171
|
+
Example:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
features/
|
|
175
|
+
└── payments/
|
|
176
|
+
├── env.schema.ts
|
|
177
|
+
└── stripe.ts
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Move the relevant variable:
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
import { createEnv, documentEnv } from "@maverickcer/env-cap"
|
|
184
|
+
|
|
185
|
+
const paymentsSchema = {
|
|
186
|
+
STRIPE_SECRET_KEY: {
|
|
187
|
+
validator(value: string) {
|
|
188
|
+
return value.startsWith("sk_") || 'Expected a value starting with "sk_".'
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export const paymentsEnv = createEnv(paymentsSchema, {
|
|
194
|
+
name: "payments",
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
documentEnv(paymentsSchema, {
|
|
198
|
+
owner: "payments-team",
|
|
199
|
+
})
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The capability now owns its configuration.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Step 3: Replace global imports
|
|
207
|
+
|
|
208
|
+
Before:
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
import { env } from "../env"
|
|
212
|
+
|
|
213
|
+
stripe.configure(env.STRIPE_SECRET_KEY)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
After:
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import { paymentsEnv } from "./env.schema"
|
|
220
|
+
|
|
221
|
+
stripe.configure(paymentsEnv.STRIPE_SECRET_KEY)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The dependency becomes explicit:
|
|
225
|
+
|
|
226
|
+
```text
|
|
227
|
+
payment code
|
|
228
|
+
|
|
|
229
|
+
v
|
|
230
|
+
paymentsEnv
|
|
231
|
+
|
|
|
232
|
+
v
|
|
233
|
+
payments schema
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
The capability no longer depends on a global configuration object.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Step 4: Preserve existing validators
|
|
241
|
+
|
|
242
|
+
`env-cap` does not require replacing your validation library.
|
|
243
|
+
|
|
244
|
+
Existing logic can be moved directly.
|
|
245
|
+
|
|
246
|
+
### Zod example
|
|
247
|
+
|
|
248
|
+
Before:
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
export const env = z
|
|
252
|
+
.object({
|
|
253
|
+
STRIPE_SECRET_KEY: z.string().startsWith("sk_"),
|
|
254
|
+
})
|
|
255
|
+
.parse(process.env)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
After:
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
import { z } from "zod"
|
|
262
|
+
|
|
263
|
+
const stripeKey = z.string().startsWith("sk_")
|
|
264
|
+
|
|
265
|
+
const paymentsSchema = {
|
|
266
|
+
STRIPE_SECRET_KEY: {
|
|
267
|
+
validator(value: string) {
|
|
268
|
+
return stripeKey.safeParse(value).success || 'Expected a value starting with "sk_".'
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The validation implementation is still yours.
|
|
275
|
+
|
|
276
|
+
`env-cap` provides:
|
|
277
|
+
|
|
278
|
+
- ownership boundaries
|
|
279
|
+
- lifecycle metadata
|
|
280
|
+
- static discovery
|
|
281
|
+
- generated artifacts
|
|
282
|
+
- runtime access patterns
|
|
283
|
+
|
|
284
|
+
It is not intended to replace schema validation libraries.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Step 5: Generate project visibility
|
|
289
|
+
|
|
290
|
+
A centralized schema gave visibility because everything existed in one file.
|
|
291
|
+
|
|
292
|
+
Replace that visibility with generated artifacts.
|
|
293
|
+
|
|
294
|
+
Example:
|
|
295
|
+
|
|
296
|
+
```ts
|
|
297
|
+
await generateEnvManifest({
|
|
298
|
+
location: "src/generated/env.manifest.ts",
|
|
299
|
+
})
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
This allows tooling to answer:
|
|
303
|
+
|
|
304
|
+
- Which variables exist?
|
|
305
|
+
- Which capability owns them?
|
|
306
|
+
- Which variables are undocumented?
|
|
307
|
+
- Which variables are expiring?
|
|
308
|
+
- Which variables have possible conflicts?
|
|
309
|
+
|
|
310
|
+
The runtime stays modular.
|
|
311
|
+
|
|
312
|
+
The platform view remains centralized.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Handling shared variables
|
|
317
|
+
|
|
318
|
+
A common migration concern is:
|
|
319
|
+
|
|
320
|
+
> "What happens if multiple capabilities use the same environment variable?"
|
|
321
|
+
|
|
322
|
+
The answer depends on whether the value has the same meaning.
|
|
323
|
+
|
|
324
|
+
If multiple capabilities consume the same value with identical requirements, create a shared ownership module:
|
|
325
|
+
|
|
326
|
+
```text
|
|
327
|
+
features/
|
|
328
|
+
└── database/
|
|
329
|
+
└── env.schema.ts
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Other capabilities import the database contract:
|
|
333
|
+
|
|
334
|
+
```ts
|
|
335
|
+
import { databaseEnv } from "../database/env.schema"
|
|
336
|
+
|
|
337
|
+
databaseEnv.DATABASE_URL
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
If different capabilities interpret the same raw value differently, keep those interpretations local.
|
|
341
|
+
|
|
342
|
+
Example:
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
// metrics capability
|
|
346
|
+
REPORT_INTERVAL_MS -> number
|
|
347
|
+
|
|
348
|
+
// logging capability
|
|
349
|
+
REPORT_INTERVAL_MS -> string identifier
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Both consume the same underlying environment value, but their application requirements differ.
|
|
353
|
+
|
|
354
|
+
A centralized schema must choose one global representation.
|
|
355
|
+
|
|
356
|
+
Capability contracts allow each consumer to define its own validated view.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Removing the centralized schema
|
|
361
|
+
|
|
362
|
+
After migration:
|
|
363
|
+
|
|
364
|
+
```text
|
|
365
|
+
src/
|
|
366
|
+
├── env.ts remove
|
|
367
|
+
├── payments/
|
|
368
|
+
│ └── env.schema.ts
|
|
369
|
+
├── database/
|
|
370
|
+
│ └── env.schema.ts
|
|
371
|
+
└── reports/
|
|
372
|
+
└── env.schema.ts
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Remove:
|
|
376
|
+
|
|
377
|
+
- global exports
|
|
378
|
+
- centralized validation calls
|
|
379
|
+
- unused configuration helpers
|
|
380
|
+
|
|
381
|
+
The generated contract becomes the project-wide configuration inventory.
|
|
382
|
+
|
|
383
|
+
The application runtime no longer depends on a global environment object.
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Common migration mistakes
|
|
388
|
+
|
|
389
|
+
### Moving variables by technical category
|
|
390
|
+
|
|
391
|
+
Avoid:
|
|
392
|
+
|
|
393
|
+
```text
|
|
394
|
+
config/
|
|
395
|
+
├── database.env.ts
|
|
396
|
+
├── payments.env.ts
|
|
397
|
+
└── cache.env.ts
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
These recreate centralized ownership.
|
|
401
|
+
|
|
402
|
+
Prefer:
|
|
403
|
+
|
|
404
|
+
```text
|
|
405
|
+
features/
|
|
406
|
+
├── checkout/
|
|
407
|
+
│ └── env.schema.ts
|
|
408
|
+
├── reporting/
|
|
409
|
+
│ └── env.schema.ts
|
|
410
|
+
└── notifications/
|
|
411
|
+
└── env.schema.ts
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
Configuration should follow capability ownership.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
### Creating a new global wrapper
|
|
419
|
+
|
|
420
|
+
Avoid recreating:
|
|
421
|
+
|
|
422
|
+
```ts
|
|
423
|
+
export const env = {
|
|
424
|
+
payments: paymentsEnv,
|
|
425
|
+
database: databaseEnv,
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
This recreates the same coupling:
|
|
430
|
+
|
|
431
|
+
```ts
|
|
432
|
+
env.payments.STRIPE_SECRET_KEY
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
The capability import itself should define the dependency.
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
### Migrating documentation separately
|
|
440
|
+
|
|
441
|
+
Avoid creating:
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
docs/
|
|
445
|
+
└── environment.md
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
as the only source of configuration information.
|
|
449
|
+
|
|
450
|
+
Documentation becomes stale when it is disconnected from code.
|
|
451
|
+
|
|
452
|
+
Use:
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
documentEnv(schema, {
|
|
456
|
+
owner: "payments-team",
|
|
457
|
+
})
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
so tooling can verify documentation coverage.
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## When not to migrate
|
|
465
|
+
|
|
466
|
+
`env-cap` may not provide significant value for:
|
|
467
|
+
|
|
468
|
+
- small applications with few variables
|
|
469
|
+
- single-team projects with no ownership boundaries
|
|
470
|
+
- applications where all configuration truly belongs to one module
|
|
471
|
+
|
|
472
|
+
A centralized schema is not inherently wrong.
|
|
473
|
+
|
|
474
|
+
The value appears when configuration ownership becomes difficult to maintain.
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Migration complete
|
|
479
|
+
|
|
480
|
+
After migration:
|
|
481
|
+
|
|
482
|
+
| Responsibility | Location |
|
|
483
|
+
| ------------------ | ------------------- |
|
|
484
|
+
| Variable ownership | Capability schema |
|
|
485
|
+
| Validation logic | Capability schema |
|
|
486
|
+
| Runtime access | Capability contract |
|
|
487
|
+
| Documentation | `documentEnv()` |
|
|
488
|
+
| Project visibility | Generated artifacts |
|
|
489
|
+
| Platform reporting | Build tooling |
|
|
490
|
+
|
|
491
|
+
The application moves from:
|
|
492
|
+
|
|
493
|
+
```text
|
|
494
|
+
one configuration object shared everywhere
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
to:
|
|
498
|
+
|
|
499
|
+
```text
|
|
500
|
+
many owned contracts with a generated system view
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
without requiring a rewrite of existing validation logic.
|