@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
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/build/link.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAG1B,YAAY,EAEb,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAGjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,0FAA0F;AAC1F;;;;;GAKG;AACH,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,mBAAmB;IACvF,iFAAiF;IACjF,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,iFAAiF;IACjF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAA;IAChD,iFAAiF;IACjF,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9C,iFAAiF;IACjF,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,iFAAiF;IACjF,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,iFA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;IAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACxD,OAAO,GAAG,SAAS,CAErB"}
@@ -0,0 +1,35 @@
1
+ import type { DiscoveredContract, DiscoveredVariable } from "./link.js";
2
+ /**
3
+ * Every documentation field of a variable that a second declaration of it can supply. `metadata` is merged key by
4
+ * key rather than as one value, so it is handled on its own below. `evidence` is not one of them: its citations
5
+ * point at the declaring contract's own code and are re-verified there every run (ADR 0037), so they stay with the
6
+ * contract that wrote them and are never copied to, or compared with, another declaration.
7
+ */
8
+ export declare const VALUE_FIELDS: readonly ["description", "owner", "sensitivity", "expiresAt", "refreshInstructions", "authenticatorType", "rotationPeriod", "lastRotatedAt", "rotationTriggerEvents", "setupInstructions", "required", "deprecated", "deprecatedReason", "removeBy", "renamedFrom", "purpose", "legalBasis", "retention", "dataResidency", "auditRequired"];
9
+ /**
10
+ * Fills what one declaration of a variable leaves unset from the other declarations of the same variable.
11
+ *
12
+ * @remarks
13
+ * A variable can be declared in more than one contract: a package that ships its own contract (see
14
+ * {@link ../README} "Reusable packages") and the application that consumes it both name the same environment
15
+ * variable, because the process has one flat namespace. Writing the explanation twice is how the two drift, so the
16
+ * declaration that carries it can be the one place it is written, and the other adds only what is its own (the
17
+ * application's own `expiresAt`, say).
18
+ *
19
+ * Every field a declaration leaves unset is taken from another declaration that sets it, as long as one of the two
20
+ * is a package's contract; when several do, the one from a package's contract wins over the application's own, the
21
+ * first package's over a later one's, and the application's own fill a gap only when all of them that set it agree. Two of the application's own contracts never fill each
22
+ * other: they are siblings, often alternatives, and each documents the variable for itself. A field a declaration sets itself is never replaced, so two declarations that set the same field
23
+ * differently still differ afterwards, and the compatibility check can say so. `metadata` is merged key by key under
24
+ * the same rule. Pure: the contracts passed in are not changed.
25
+ */
26
+ export declare function mergeSharedDocumentation(contracts: readonly DiscoveredContract[]): readonly DiscoveredContract[];
27
+ /**
28
+ * The fields (and `metadata.<key>`s) {@link mergeSharedDocumentation} filled into `variable` from another declaration
29
+ * of it. The compatibility check skips them: a value a declaration was given is not one it wrote, so it cannot
30
+ * disagree with anyone.
31
+ * @param variable - a variable as the merge returned it; any other has been given nothing.
32
+ * @returns the given field names.
33
+ */
34
+ export declare function donatedTo(variable: DiscoveredVariable): ReadonlySet<string>;
35
+ //# sourceMappingURL=merge-documentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-documentation.d.ts","sourceRoot":"","sources":["../../../src/build/merge-documentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,6UAqBiC,CAAA;AAQ1D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GACvC,SAAS,kBAAkB,EAAE,CA6B/B;AA8DD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,WAAW,CAAC,MAAM,CAAC,CAE3E"}
@@ -1,119 +1,18 @@
1
- import type TS from "typescript";
2
- import type { ParseWarning } from "../parse.js";
1
+ import type { LoadTsconfigPathsResult } from "../../_ipc/resolve-tsconfig-paths.js";
3
2
  import type { BuildFileSystem } from "../types.js";
4
3
  /**
5
- * TypeScript path-alias resolution (ADR 0023).
6
- *
7
- * Resolves a bare import specifier (`"@/lib/env.schema.js"`) against a project's own
8
- * `tsconfig.json` `compilerOptions.paths`/`baseUrl`, so a schema or consumer reached only
9
- * through an alias isn't misreported by `link.ts`/`dependency-graph.ts` as unresolved or
10
- * abandoned. Unlike `resolve-package-schema.ts` (ADR 0014), this never crosses a
11
- * trust/versioning boundary -- every resolved file is already local, already-trusted
12
- * project source -- so it is on by default (auto-detecting `root/tsconfig.json`) rather
13
- * than requiring an explicit allowlist.
14
- *
15
- * The actual `paths`/`baseUrl` matching algorithm (longest-prefix matching, `*` wildcard
16
- * substitution, multiple fallback targets, `extends`-chain merging, JSONC parsing) is
17
- * delegated entirely to the TypeScript compiler via `ts.resolveModuleName()` and
18
- * `ts.parseJsonConfigFileContent()` -- the same functions `tsc`/`tsserver` themselves use --
19
- * rather than reimplemented here. This module's own logic is limited to loading the config,
20
- * caching resolutions, and enforcing the `node_modules` safety boundary below.
4
+ * TypeScript path-alias resolution. The behavior lives in `../../_ipc/resolve-tsconfig-paths.ts`, a managed copy of
5
+ * internal-package-contract's `runtime/resolve-tsconfig-paths.ts`; this binds the one package-specific input, the
6
+ * name used when no usable compiler resolved.
21
7
  */
8
+ export { createAliasResolutionCache, resolveAliasImport, } from "../../_ipc/resolve-tsconfig-paths.js";
9
+ export type { AliasResolutionCache, LoadTsconfigPathsResult, TsconfigPathsResolution, } from "../../_ipc/resolve-tsconfig-paths.js";
22
10
  /**
23
- * The `paths`/`baseUrl` view of parsed compiler options.
24
- *
25
- * TypeScript 6 marks `baseUrl` deprecated in its own typings. A project's tsconfig can still set it and
26
- * TypeScript still honours it, so path resolution has to keep reading it to resolve the way the project's own
27
- * compiler does. Reading it through this view, which does not carry that deprecation, states that on purpose.
28
- * @internal
29
- */
30
- export interface PathMappingOptions {
31
- readonly paths?: TS.MapLike<string[]>;
32
- readonly baseUrl?: string;
33
- }
34
- /**
35
- * @param options - Parsed compiler options.
36
- * @returns The same options, typed as the `paths`/`baseUrl` view.
37
- * @internal
38
- */
39
- export declare function pathMappingOptions(options: TS.CompilerOptions): PathMappingOptions;
40
- /** Parsed `tsconfig.json` `paths`/`baseUrl` configuration, immutable for the life of one generate*() run. See {@link loadTsconfigPaths}. */
41
- export interface TsconfigPathsResolution {
42
- /** The subset of `compilerOptions` `ts.resolveModuleName()` needs -- at minimum `paths` and/or `baseUrl`. */
43
- readonly compilerOptions: TS.CompilerOptions;
44
- /** Absolute path of the tsconfig.json this was loaded from, for diagnostics. */
45
- readonly configFile: string;
46
- }
47
- /**
48
- * Opaque memoization for {@link resolveAliasImport}, created once per generate*() run via
49
- * {@link createAliasResolutionCache} and threaded through `ImportResolutionContext`. Kept
50
- * distinct from `TsconfigPathsResolution` (immutable config) so the cache's internal
51
- * representation stays free to change without touching that type's shape.
52
- */
53
- export interface AliasResolutionCache {
54
- /**
55
- * Keyed by `` `${importingFile}\0${specifier}` ``, not by `specifier` alone. With one
56
- * fixed `compilerOptions` object and no project-reference support, `paths`-pattern
57
- * substitution itself doesn't depend on the importing file -- but `ts.resolveModuleName()`'s
58
- * fallback behavior when `paths` doesn't match a real file (classic-mode ancestor search,
59
- * extension-preference edge cases) legitimately can. A `Map`, not a network call, so
60
- * keying defensively by both costs nothing.
61
- */
62
- readonly resolutions: Map<string, string | undefined>;
63
- }
64
- /** Creates a fresh, empty {@link AliasResolutionCache} for one generate*()/computeArtifacts() run. */
65
- export declare function createAliasResolutionCache(): AliasResolutionCache;
66
- export interface LoadTsconfigPathsResult {
67
- readonly resolution: TsconfigPathsResolution | undefined;
68
- readonly warning: ParseWarning | undefined;
69
- }
70
- /**
71
- * Loads and parses a `tsconfig.json` for alias resolution. Called exactly once per
72
- * `generate*()`/`computeArtifacts()` invocation, at the same point
73
- * `resolveAllowlistedPackages()` is already called once -- so at most one tsconfig-related
74
- * warning is ever produced per run, never once per file scanned.
75
- *
76
- * @remarks
77
- * `tsconfigOption === false` disables alias resolution entirely.
78
- * `tsconfigOption === undefined` (the default) looks for `root/tsconfig.json` exactly --
79
- * deliberately not `ts.findConfigFile()`'s upward directory walk, since every other
80
- * root-relative mechanism in this codebase (schema discovery, `packages` resolution)
81
- * treats `root` as a hard boundary. A missing default tsconfig is silent (most projects
82
- * don't use aliases); a missing *explicit* `tsconfigOption` is a real misconfiguration and
83
- * warns. `jsconfig.json` is intentionally not auto-detected -- pass `tsconfig:
84
- * "jsconfig.json"` explicitly if needed; this loader only cares about the file's JSON
85
- * shape, not its name.
86
- *
87
- * The gate for building a resolution is "`paths` non-empty OR `baseUrl` set", not `paths`
88
- * alone -- a `baseUrl`-only tsconfig (no `paths` at all) still makes TypeScript resolve
89
- * bare specifiers relative to `baseUrl`, and `ts.resolveModuleName()` already handles that
90
- * once `compilerOptions.baseUrl` is passed through.
11
+ * Loads and parses a `tsconfig.json` for alias resolution, once per run.
12
+ * @param root - The project root; a missing default `tsconfig.json` there is silent.
13
+ * @param tsconfigOption - `false` disables alias resolution, a path overrides the default file.
14
+ * @param fs - The filesystem capability.
15
+ * @returns The resolution and at most one warning.
91
16
  */
92
17
  export declare function loadTsconfigPaths(root: string, tsconfigOption: string | false | undefined, fs: BuildFileSystem): Promise<LoadTsconfigPathsResult>;
93
- /**
94
- * Resolves one bare import specifier against a project's `tsconfig.json` `paths`/`baseUrl`,
95
- * or returns `undefined` if it doesn't resolve through this mechanism.
96
- *
97
- * @remarks
98
- * Necessarily synchronous -- `ts.resolveModuleName()` has no async form, matching how
99
- * `tsc`/`tsserver` themselves always call it. `ts.sys` is used directly as the resolution
100
- * host (an existing Node-backed singleton the `typescript` package exports; nothing to
101
- * construct).
102
- *
103
- * Two safety/scope filters apply to any candidate `ts.resolveModuleName()` returns,
104
- * independent of its own internal fallback behavior:
105
- * - **Never resolves into `node_modules`.** `ts.resolveModuleName()` can, in principle,
106
- * fall through to classic Node resolution and land inside `node_modules`; any resolved
107
- * path containing a `node_modules` path segment (checked after `path.normalize()`, so
108
- * mixed separators can't slip past it on Windows) is discarded here. Bare package
109
- * specifiers continue to be handled exclusively by `resolvePackageImport()`
110
- * (ADR 0014) -- this mechanism never overlaps with that trust boundary.
111
- * - **`.ts`/`.tsx` only.** Matches `resolveRelativeImport()`'s own existing candidate set
112
- * and `resolve-package-schema.ts`'s `SCHEMA_FILE_EXTENSIONS` -- this codebase's static-
113
- * analysis pipeline is `.ts`/`.tsx` only today. A resolved non-`.ts`/`.tsx` file is a
114
- * real risk, not just a gap: feeding it straight into `ts.createSourceFile()` wouldn't
115
- * error, it would silently parse garbage -- exactly the "guess" this codebase's
116
- * warn-don't-guess philosophy exists to avoid.
117
- */
118
- export declare function resolveAliasImport(specifier: string, importingFile: string, resolution: TsconfigPathsResolution, cache: AliasResolutionCache): string | undefined;
119
18
  //# sourceMappingURL=resolve-tsconfig-paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../../src/build/resolution/resolve-tsconfig-paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,GAAG,kBAAkB,CAElF;AAED,4IAA4I;AAC5I,MAAM,WAAW,uBAAuB;IACtC,6GAA6G;IAC7G,QAAQ,CAAC,eAAe,EAAE,EAAE,CAAC,eAAe,CAAA;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACtD;AAED,sGAAsG;AACtG,wBAAgB,0BAA0B,IAAI,oBAAoB,CAEjE;AAcD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,CAAA;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,EAC1C,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,uBAAuB,CAAC,CAyDlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,uBAAuB,EACnC,KAAK,EAAE,oBAAoB,GAC1B,MAAM,GAAG,SAAS,CAiBpB"}
1
+ {"version":3,"file":"resolve-tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../../src/build/resolution/resolve-tsconfig-paths.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD;;;;GAIG;AACH,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,sCAAsC,CAAA;AAC7C,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sCAAsC,CAAA;AAE7C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,EAC1C,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
@@ -1,56 +1,7 @@
1
1
  /**
2
- * The filesystem capability `@maverickcer/env-cap/build` requires from its caller.
3
- *
4
- * `./build` is a **library surface**: it must not acquire filesystem access
5
- * implicitly (no `node:fs` import anywhere under `src/` outside `src/cli/`).
6
- * Every public options object in `build/index.ts` carries a required `fs`
7
- * field of this type, and the caller supplies a concrete adapter -- the
8
- * `env-cap` CLI builds one over `node:fs/promises` (`src/cli/filesystem.ts`);
9
- * a test builds either that same real adapter or an in-memory fake. See ADR
10
- * 0040.
11
- *
12
- * "Ambient-fs-free" means specifically: `./build` never reaches for
13
- * `node:fs` itself. It still performs real filesystem operations -- the
14
- * capability is always handed in.
15
- *
16
- * The shape is modeled on `node:fs/promises`'s own signatures so a thin
17
- * adapter is a drop-in value, but uses minimal structural types
18
- * ({@link BuildDirent}/{@link BuildStats}) rather than Node's `Dirent`/
19
- * `Stats` -- the capability boundary shouldn't leak Node's type surface just
20
- * because the concrete adapter happens to be Node-backed. Only the
21
- * operations `src/build/**` actually calls are here.
2
+ * The filesystem capability `./build` requires from its caller, and the two small structural types it returns.
3
+ * Defined once in `../_ipc/build-fs.ts`, a managed copy of internal-package-contract's `runtime/build-fs.ts`, and
4
+ * re-exported here so the public `build` entry keeps exporting them. See ADR 0040.
22
5
  */
23
- export interface BuildFileSystem {
24
- /** Read a UTF-8 text file. Rejects if the path doesn't exist or isn't readable. */
25
- readonly readFile: (path: string, encoding: "utf8") => Promise<string>;
26
- /** Write a UTF-8 text file, creating or truncating it. The parent directory must already exist. */
27
- readonly writeFile: (path: string, data: string, encoding: "utf8") => Promise<void>;
28
- /** Create a directory and every missing parent. A no-op if it already exists. */
29
- readonly mkdir: (path: string, options: {
30
- readonly recursive: true;
31
- }) => Promise<void>;
32
- /** List a directory's entries with their file-type info. */
33
- readonly readdir: (path: string, options: {
34
- readonly withFileTypes: true;
35
- }) => Promise<readonly BuildDirent[]>;
36
- /** Stat a path (following symlinks). Rejects if the path doesn't exist. */
37
- readonly stat: (path: string) => Promise<BuildStats>;
38
- /** Resolve a path to its canonical, symlink-free absolute form. */
39
- readonly realpath: (path: string) => Promise<string>;
40
- }
41
- /** One directory entry from {@link BuildFileSystem.readdir} -- the subset of Node's `Dirent` `src/build/**` reads. */
42
- export interface BuildDirent {
43
- readonly name: string;
44
- /** Same contract as Node's `Dirent.isDirectory()`. */
45
- readonly isDirectory: () => boolean;
46
- /** Same contract as Node's `Dirent.isFile()`. */
47
- readonly isFile: () => boolean;
48
- }
49
- /** A path's stat info from {@link BuildFileSystem.stat} -- the subset of Node's `Stats` `src/build/**` reads. */
50
- export interface BuildStats {
51
- /** Same contract as Node's `Stats.isFile()`. */
52
- readonly isFile: () => boolean;
53
- /** Size in bytes -- read by the package-schema resolver to enforce a size ceiling. */
54
- readonly size: number;
55
- }
6
+ export type { BuildDirent, BuildFileSystem, BuildStats } from "../_ipc/build-fs.js";
56
7
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/build/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACtE,mGAAmG;IACnG,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnF,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACtF,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAA;KAAE,KACtC,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAA;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IACpD,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACrD;AAED,sHAAsH;AACtH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAA;IACnC,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAA;CAC/B;AAED,iHAAiH;AACjH,MAAM,WAAW,UAAU;IACzB,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAA;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/build/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,20 +1,6 @@
1
- import type TS from "typescript";
2
- /** The compiler namespace the build-time scanner is written against. */
3
- export type TypeScript = typeof TS;
4
1
  /**
5
- * Picks the compiler the scanner parses with: the consumer's `typescript` when it exposes the
6
- * classic compiler API (TypeScript 5 and 6), otherwise the bundled `@typescript/typescript6` --
7
- * Microsoft's side-by-side TypeScript 6 package, a dependency of this one so the scanner keeps working
8
- * for a consumer whose own `typescript` is 7+, which ships no programmatic API. Chosen by capability, never by version,
9
- * so a future `typescript` that regains the API is used as-is.
10
- *
11
- * When neither has the API (the bundled dependency was stripped from an install), it returns the
12
- * consumer's module anyway so `assertCompilerApi` -- called at every scanner entry point -- fails
13
- * with its readable message instead of a bare "is not a function".
14
- * @param load - How a module id is resolved (a parameter so a test can hand in stand-ins).
15
- * @throws Whatever `load` throws for a reason other than the module not being installed.
2
+ * The TypeScript compiler the build-time scanner parses with. The behavior lives in `../_ipc/typescript.ts`, a
3
+ * managed copy of internal-package-contract's `runtime/typescript.ts`.
16
4
  */
17
- export declare function pickCompiler(load: (id: string) => unknown): TypeScript;
18
- /** The compiler every scanner module parses with. Resolved once, synchronously, at import. */
19
- export declare const ts: TypeScript;
5
+ export { ts } from "../_ipc/typescript.js";
20
6
  //# sourceMappingURL=typescript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/build/typescript.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,OAAO,EAAE,CAAA;AAqClC;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,UAAU,CAMtE;AAED,8FAA8F;AAC9F,eAAO,MAAM,EAAE,EAAE,UAAyD,CAAA"}
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/build/typescript.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA"}
@@ -1,18 +1,7 @@
1
1
  /**
2
- * Converts one glob pattern to a RegExp. Handles `**` as "any number of path
3
- * segments, including zero" (so `**\/node_modules/**` matches a root-level
4
- * `node_modules`, and `**\/env.schema.ts` matches a root-level file, not just
5
- * nested ones) -- a plain `**` -> `.*` substitution gets both of those wrong.
6
- *
7
- * Used by no-raw-process-env.ts's `allow` option.
8
- *
9
- * Deliberately duplicated (not shared) with
10
- * src/build/glob.ts, which needs the exact same matching behavior for its
11
- * own schema-discovery walk -- keeps this eslint-plugin-only module free of
12
- * any import reaching outside src/eslint-plugin, so `src/eslint-plugin`
13
- * stays independently splittable into its own package with zero
14
- * source-level cross-folder dependency. Not re-exported from `./index.js` --
15
- * Private tier per VERSIONING.md.
2
+ * Matching of the plugin's `allow` options against the file a rule is checking. The behavior lives in
3
+ * `../_ipc/glob.ts`, a managed copy of internal-package-contract's `runtime/glob.ts`: a pattern written relative to
4
+ * the working directory (`src/cli/**`) matches the absolute path ESLint passes, on Windows too.
16
5
  */
17
- export declare function globToRegExp(pattern: string): RegExp;
6
+ export { matchesAllowList } from "../_ipc/glob.js";
18
7
  //# sourceMappingURL=glob.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/glob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4BpD"}
1
+ {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/glob.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -17,7 +17,7 @@ declare const plugin: {
17
17
  name: string;
18
18
  };
19
19
  /** See {@link noNodeFs}. */
20
- "no-node-fs": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNodeFs", [import("./no-node-fs.js").RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
20
+ "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> & {
21
21
  name: string;
22
22
  };
23
23
  };
@@ -1,25 +1,15 @@
1
- export interface RuleOptions {
2
- /** Glob-array of files this rule doesn't apply to -- a project's own
3
- * executable entry points (a CLI, a script) that legitimately construct
4
- * the concrete filesystem adapter. Empty by default -- populate it
5
- * explicitly; the rule never guesses at what counts as an executable
6
- * capability boundary. */
7
- allow?: string[];
8
- }
9
1
  /**
10
- * Flags any `import`/`require`/dynamic `import()` of `node:fs` in library
11
- * code, so a library surface acquires its filesystem capability from the
12
- * caller instead of reaching for `node:fs` itself (the same discipline
13
- * `repo-contract`'s ADR-0011 established for `child_process`/`process.env`).
14
- * See ADR 0040.
2
+ * Flags any `import`/`require`/dynamic `import()` of `node:fs` in library code, so a library surface acquires
3
+ * its filesystem capability from the caller instead of reaching for `node:fs` itself.
15
4
  *
16
5
  * @remarks
17
- * Nothing is exempt by default. env-cap's own config allows `src/cli/**`
18
- * (the executable capability boundary that builds the `node:fs/promises`
19
- * adapter); a consuming project sets its own `allow` for its own entry
20
- * points.
6
+ * Nothing is exempt by default. A package's own config allows its CLI folder (for example `src/cli/**`),
7
+ * which builds the `node:fs/promises` adapter, and a consuming project sets the `allow` option for its own CLI
8
+ * or script entry points. The rule itself lives in `../_ipc/no-node-fs.ts`, a managed copy of
9
+ * internal-package-contract's `runtime/no-node-fs.ts`; this supplies env-cap's documentation link and the decision
10
+ * record the message cites.
21
11
  */
22
- export declare const noNodeFs: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNodeFs", [RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
12
+ export declare const noNodeFs: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noNodeFs", [import("../_ipc/no-node-fs.js").RuleOptions], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
23
13
  name: string;
24
14
  };
25
15
  //# sourceMappingURL=no-node-fs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-node-fs.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/no-node-fs.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,WAAW;IAC1B;;;;+BAI2B;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAWD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ;;CAwDnB,CAAA"}
1
+ {"version":3,"file":"no-node-fs.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/no-node-fs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ;;CAInB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"no-raw-process-env.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/no-raw-process-env.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,WAAW;IAC1B;;;;;;8DAM0D;IAC1D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;CA4C1B,CAAA"}
1
+ {"version":3,"file":"no-raw-process-env.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/no-raw-process-env.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,WAAW;IAC1B;;;;;;8DAM0D;IAC1D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;CA2C1B,CAAA"}