@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,482 @@
|
|
|
1
|
+
# Migrating from envalid
|
|
2
|
+
|
|
3
|
+
This guide explains how to migrate an application using
|
|
4
|
+
[`envalid`](https://github.com/af/envalid) to `env-cap`.
|
|
5
|
+
|
|
6
|
+
The migration is not a replacement of validation capabilities. `envalid` and
|
|
7
|
+
`env-cap` solve different problems:
|
|
8
|
+
|
|
9
|
+
- `envalid` focuses on validating environment variables and producing a typed
|
|
10
|
+
configuration object.
|
|
11
|
+
- `env-cap` focuses on configuration ownership, lifecycle visibility,
|
|
12
|
+
modular architecture, and runtime access boundaries.
|
|
13
|
+
|
|
14
|
+
`env-cap` can use the same validation approach you already have today,
|
|
15
|
+
including custom validators and processors. The primary change is moving
|
|
16
|
+
from a centralized configuration object to capability-owned environment
|
|
17
|
+
contracts.
|
|
18
|
+
|
|
19
|
+
## Before: centralized environment validation
|
|
20
|
+
|
|
21
|
+
A typical `envalid` setup looks like:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { cleanEnv, str, num } from "envalid"
|
|
25
|
+
|
|
26
|
+
export const env = cleanEnv(process.env, {
|
|
27
|
+
DATABASE_URL: str(),
|
|
28
|
+
PORT: num(),
|
|
29
|
+
STRIPE_SECRET_KEY: str(),
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Application code accesses everything through one shared object:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
env.DATABASE_URL
|
|
37
|
+
env.PORT
|
|
38
|
+
env.STRIPE_SECRET_KEY
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This works well for small applications. As applications grow, the environment
|
|
42
|
+
configuration becomes a shared ownership boundary:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
src/
|
|
46
|
+
├── env.ts
|
|
47
|
+
├── payments/
|
|
48
|
+
├── database/
|
|
49
|
+
├── reports/
|
|
50
|
+
└── notifications/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Every capability that requires configuration modifies the same file.
|
|
54
|
+
|
|
55
|
+
Common consequences:
|
|
56
|
+
|
|
57
|
+
- configuration ownership becomes unclear
|
|
58
|
+
- unrelated capabilities modify the same schema
|
|
59
|
+
- removing capabilities requires cleaning up centralized variables
|
|
60
|
+
- platform teams need separate tooling to understand ownership
|
|
61
|
+
|
|
62
|
+
## After: capability-owned contracts
|
|
63
|
+
|
|
64
|
+
With `env-cap`, move configuration ownership into the capability that uses
|
|
65
|
+
it.
|
|
66
|
+
|
|
67
|
+
Example:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
src/
|
|
71
|
+
├── database/
|
|
72
|
+
│ └── env.schema.ts
|
|
73
|
+
├── payments/
|
|
74
|
+
│ └── env.schema.ts
|
|
75
|
+
└── reports/
|
|
76
|
+
└── env.schema.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The database capability owns database configuration:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
// database/env.schema.ts
|
|
83
|
+
|
|
84
|
+
import { createEnv } from "@maverickcer/env-cap"
|
|
85
|
+
|
|
86
|
+
const databaseSchema = {
|
|
87
|
+
DATABASE_URL: {
|
|
88
|
+
validator(value: string) {
|
|
89
|
+
return value.startsWith("postgres://") || 'Expected a value starting with "postgres://".'
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const databaseEnv = createEnv(databaseSchema, {
|
|
95
|
+
name: "database",
|
|
96
|
+
})
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The payments capability owns payment configuration:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
// payments/env.schema.ts
|
|
103
|
+
|
|
104
|
+
import { createEnv } from "@maverickcer/env-cap"
|
|
105
|
+
|
|
106
|
+
const paymentsSchema = {
|
|
107
|
+
STRIPE_SECRET_KEY: {
|
|
108
|
+
validator(value: string) {
|
|
109
|
+
return value.startsWith("sk_") || 'Expected a value starting with "sk_".'
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const paymentsEnv = createEnv(paymentsSchema, {
|
|
115
|
+
name: "payments",
|
|
116
|
+
})
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Application code imports configuration from the capability that owns it:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import { databaseEnv } from "./database/env.schema"
|
|
123
|
+
|
|
124
|
+
databaseEnv.DATABASE_URL
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
There is no global:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
env.DATABASE_URL
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The import relationship becomes the ownership relationship.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Migration strategy
|
|
138
|
+
|
|
139
|
+
The migration can happen incrementally.
|
|
140
|
+
|
|
141
|
+
You do not need to convert every environment variable at once.
|
|
142
|
+
|
|
143
|
+
### Step 1: Keep your existing environment loading
|
|
144
|
+
|
|
145
|
+
`env-cap` does not replace dotenv, deployment secrets, or your existing
|
|
146
|
+
environment provider.
|
|
147
|
+
|
|
148
|
+
Continue loading values however your application currently does:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
dotenv.config()
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
or:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
process.env
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The package only validates and exposes configuration.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### Step 2: Identify capability ownership
|
|
165
|
+
|
|
166
|
+
Start by grouping existing variables by the code that consumes them.
|
|
167
|
+
|
|
168
|
+
Example existing configuration:
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
DATABASE_URL
|
|
172
|
+
PORT
|
|
173
|
+
STRIPE_SECRET_KEY
|
|
174
|
+
REDIS_URL
|
|
175
|
+
SMTP_HOST
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Move toward:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
database/
|
|
182
|
+
DATABASE_URL
|
|
183
|
+
|
|
184
|
+
server/
|
|
185
|
+
PORT
|
|
186
|
+
|
|
187
|
+
payments/
|
|
188
|
+
STRIPE_SECRET_KEY
|
|
189
|
+
|
|
190
|
+
cache/
|
|
191
|
+
REDIS_URL
|
|
192
|
+
|
|
193
|
+
email/
|
|
194
|
+
SMTP_HOST
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The goal is not fewer environment variables.
|
|
198
|
+
|
|
199
|
+
The goal is clear ownership.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### Step 3: Convert validators
|
|
204
|
+
|
|
205
|
+
Most `envalid` validators map directly to `env-cap` processors and
|
|
206
|
+
validators.
|
|
207
|
+
|
|
208
|
+
#### String validation
|
|
209
|
+
|
|
210
|
+
Before:
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
import { str } from "envalid"
|
|
214
|
+
|
|
215
|
+
STRIPE_SECRET_KEY: str()
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
After:
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
STRIPE_SECRET_KEY: {
|
|
222
|
+
validator(value: string) {
|
|
223
|
+
return value.length > 0 || "This variable is required.";
|
|
224
|
+
},
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
#### Number conversion
|
|
231
|
+
|
|
232
|
+
Before:
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
import { num } from "envalid"
|
|
236
|
+
|
|
237
|
+
PORT: num()
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
After:
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
PORT: {
|
|
244
|
+
processor(value: string) {
|
|
245
|
+
return Number(value);
|
|
246
|
+
},
|
|
247
|
+
validator(value: number) {
|
|
248
|
+
return Number.isInteger(value) || "Expected an integer.";
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
The important distinction is that transformation and validation are explicit.
|
|
254
|
+
|
|
255
|
+
The runtime contract defines how the capability consumes the value.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
#### Default values
|
|
260
|
+
|
|
261
|
+
Before:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
PORT: num({
|
|
265
|
+
default: 3000,
|
|
266
|
+
})
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
After:
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
PORT: {
|
|
273
|
+
default: 3000,
|
|
274
|
+
processor(value: string) {
|
|
275
|
+
return Number(value);
|
|
276
|
+
},
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### Step 4: Add documentation metadata
|
|
283
|
+
|
|
284
|
+
`envalid` validates configuration, but it does not create an ownership model.
|
|
285
|
+
|
|
286
|
+
Add operational metadata separately:
|
|
287
|
+
|
|
288
|
+
```ts
|
|
289
|
+
import { documentEnv } from "@maverickcer/env-cap"
|
|
290
|
+
|
|
291
|
+
documentEnv(databaseSchema, {
|
|
292
|
+
owner: "platform",
|
|
293
|
+
variables: {
|
|
294
|
+
DATABASE_URL: {
|
|
295
|
+
description: "Primary PostgreSQL connection string",
|
|
296
|
+
expiresAt: "2027-01-01T00:00:00Z",
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
})
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
This enables generated documentation without adding metadata to runtime
|
|
303
|
+
configuration.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### Step 5: Replace centralized imports gradually
|
|
308
|
+
|
|
309
|
+
Before:
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
import { env } from "./env"
|
|
313
|
+
|
|
314
|
+
export function createPayment() {
|
|
315
|
+
return stripe(env.STRIPE_SECRET_KEY)
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
After:
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
import { paymentsEnv } from "./payments/env.schema"
|
|
323
|
+
|
|
324
|
+
export function createPayment() {
|
|
325
|
+
return stripe(paymentsEnv.STRIPE_SECRET_KEY)
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Continue migrating capability by capability until the centralized environment object
|
|
330
|
+
is no longer needed.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Differences from envalid
|
|
335
|
+
|
|
336
|
+
### Environment validation
|
|
337
|
+
|
|
338
|
+
Both packages support:
|
|
339
|
+
|
|
340
|
+
- required variables
|
|
341
|
+
- defaults
|
|
342
|
+
- transformations
|
|
343
|
+
- custom validation
|
|
344
|
+
- startup validation
|
|
345
|
+
|
|
346
|
+
The difference is the ownership model.
|
|
347
|
+
|
|
348
|
+
`envalid` answers:
|
|
349
|
+
|
|
350
|
+
> "Are all environment variables valid?"
|
|
351
|
+
|
|
352
|
+
`env-cap` answers:
|
|
353
|
+
|
|
354
|
+
> "Which capability owns this configuration, how is it validated, and how is it
|
|
355
|
+
> operated over time?"
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### Multiple consumers with different requirements
|
|
360
|
+
|
|
361
|
+
A centralized environment object often requires choosing one representation:
|
|
362
|
+
|
|
363
|
+
```ts
|
|
364
|
+
env.TIMEOUT
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Should `TIMEOUT` be:
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
string
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
or:
|
|
374
|
+
|
|
375
|
+
```ts
|
|
376
|
+
number
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Different consumers may have different needs.
|
|
380
|
+
|
|
381
|
+
Example:
|
|
382
|
+
|
|
383
|
+
```ts
|
|
384
|
+
// HTTP client configuration
|
|
385
|
+
timeout: "5000"
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
A library integration may require a string because it serializes directly into
|
|
389
|
+
headers or configuration.
|
|
390
|
+
|
|
391
|
+
Another capability may require:
|
|
392
|
+
|
|
393
|
+
```ts
|
|
394
|
+
timeout: 5000
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
for arithmetic:
|
|
398
|
+
|
|
399
|
+
```ts
|
|
400
|
+
timeout + retryDelay
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
The environment value is the same. The consumer requirement is different.
|
|
404
|
+
|
|
405
|
+
`env-cap` allows each owning capability to define its own processing boundary:
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
apiClientEnv.TIMEOUT
|
|
409
|
+
// string
|
|
410
|
+
|
|
411
|
+
jobRunnerEnv.TIMEOUT
|
|
412
|
+
// number
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
The build system can identify these situations for review without assuming
|
|
416
|
+
that one interpretation is universally correct.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## What stays the same
|
|
421
|
+
|
|
422
|
+
Migrating from envalid does not require changing:
|
|
423
|
+
|
|
424
|
+
- deployment secrets
|
|
425
|
+
- Docker configuration
|
|
426
|
+
- CI environment variables
|
|
427
|
+
- hosting provider configuration
|
|
428
|
+
- secret managers
|
|
429
|
+
- `.env` loading
|
|
430
|
+
|
|
431
|
+
The same environment values continue entering the application.
|
|
432
|
+
|
|
433
|
+
The change is where configuration ownership and validation logic live.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## When not to migrate
|
|
438
|
+
|
|
439
|
+
`envalid` may be the better choice when:
|
|
440
|
+
|
|
441
|
+
- the application is small
|
|
442
|
+
- one team owns all configuration
|
|
443
|
+
- a centralized config object is desirable
|
|
444
|
+
- operational documentation is managed elsewhere
|
|
445
|
+
|
|
446
|
+
`env-cap` is designed for applications where configuration ownership
|
|
447
|
+
becomes a scaling concern:
|
|
448
|
+
|
|
449
|
+
- large applications
|
|
450
|
+
- multiple teams
|
|
451
|
+
- monorepos
|
|
452
|
+
- platform engineering workflows
|
|
453
|
+
- long-lived services
|
|
454
|
+
- environments with operational lifecycle requirements
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## Related approaches
|
|
459
|
+
|
|
460
|
+
`env-cap` is designed as a modular complement to validation libraries, not
|
|
461
|
+
as a replacement for every environment solution.
|
|
462
|
+
|
|
463
|
+
Similar centralized approaches include:
|
|
464
|
+
|
|
465
|
+
- `envalid`
|
|
466
|
+
- `t3-env`
|
|
467
|
+
- `zod`-based environment wrappers
|
|
468
|
+
- `dotenv` + custom configuration objects
|
|
469
|
+
|
|
470
|
+
These tools solve environment parsing and validation.
|
|
471
|
+
|
|
472
|
+
`env-cap` adds the organizational layer:
|
|
473
|
+
|
|
474
|
+
- capability ownership
|
|
475
|
+
- static discovery
|
|
476
|
+
- generated documentation
|
|
477
|
+
- lifecycle visibility
|
|
478
|
+
- configuration dependency mapping
|
|
479
|
+
|
|
480
|
+
The validation library answers whether a value is valid.
|
|
481
|
+
|
|
482
|
+
The contract system answers who owns that value and how it is maintained.
|