@maverickcer/env-cap 0.7.5 → 0.7.7

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 (279) hide show
  1. package/ADOPTION.md +12 -12
  2. package/AGENTS.md +85 -120
  3. package/CHANGELOG.md +36 -0
  4. package/CODE_REVIEW.md +5 -5
  5. package/CONTRIBUTING.md +5 -5
  6. package/GUIDE.md +42 -24
  7. package/README.md +52 -34
  8. package/RELEASING.md +78 -64
  9. package/SECURITY.md +15 -15
  10. package/VERSIONING.md +16 -15
  11. package/benchmarks/READING-BENCHMARKS.md +101 -85
  12. package/benchmarks/README.md +12 -9
  13. package/benchmarks/WRITING-BENCHMARKS.md +89 -79
  14. package/benchmarks/performance-buildtime/BENCHMARKS.md +20 -20
  15. package/benchmarks/performance-runtime/BENCHMARKS.md +107 -107
  16. package/dist/.dts/_ipc/build-fs.d.ts +3 -3
  17. package/dist/.dts/_ipc/build-fs.d.ts.map +1 -1
  18. package/dist/.dts/_ipc/display-path.d.ts +1 -1
  19. package/dist/.dts/_ipc/glob.d.ts +3 -2
  20. package/dist/.dts/_ipc/glob.d.ts.map +1 -1
  21. package/dist/.dts/_ipc/no-node-fs.d.ts +2 -2
  22. package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +16 -16
  23. package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
  24. package/dist/.dts/_ipc/typescript.d.ts +4 -4
  25. package/dist/.dts/build/assemble-project.d.ts +14 -15
  26. package/dist/.dts/build/assemble-project.d.ts.map +1 -1
  27. package/dist/.dts/build/change-model.d.ts +14 -14
  28. package/dist/.dts/build/change-model.d.ts.map +1 -1
  29. package/dist/.dts/build/check-artifacts.d.ts +4 -4
  30. package/dist/.dts/build/check-artifacts.d.ts.map +1 -1
  31. package/dist/.dts/build/citation-verification.d.ts +13 -14
  32. package/dist/.dts/build/citation-verification.d.ts.map +1 -1
  33. package/dist/.dts/build/compatibility.d.ts +24 -24
  34. package/dist/.dts/build/compatibility.d.ts.map +1 -1
  35. package/dist/.dts/build/contract-model.d.ts +10 -10
  36. package/dist/.dts/build/contract-model.d.ts.map +1 -1
  37. package/dist/.dts/build/deep-equal.d.ts +2 -2
  38. package/dist/.dts/build/deep-freeze.d.ts +2 -2
  39. package/dist/.dts/build/dependency-graph.d.ts +48 -55
  40. package/dist/.dts/build/dependency-graph.d.ts.map +1 -1
  41. package/dist/.dts/build/dependency-model.d.ts +18 -18
  42. package/dist/.dts/build/dependency-model.d.ts.map +1 -1
  43. package/dist/.dts/build/discover.d.ts +11 -11
  44. package/dist/.dts/build/discover.d.ts.map +1 -1
  45. package/dist/.dts/build/docs.d.ts +34 -38
  46. package/dist/.dts/build/docs.d.ts.map +1 -1
  47. package/dist/.dts/build/env-example.d.ts +13 -13
  48. package/dist/.dts/build/env-example.d.ts.map +1 -1
  49. package/dist/.dts/build/errors.d.ts +8 -8
  50. package/dist/.dts/build/evidence-cache.d.ts +23 -23
  51. package/dist/.dts/build/evidence-cache.d.ts.map +1 -1
  52. package/dist/.dts/build/evidence-model.d.ts +3 -3
  53. package/dist/.dts/build/evidence-reference.d.ts +15 -15
  54. package/dist/.dts/build/evidence-reference.d.ts.map +1 -1
  55. package/dist/.dts/build/evidence-snapshot.d.ts +47 -53
  56. package/dist/.dts/build/evidence-snapshot.d.ts.map +1 -1
  57. package/dist/.dts/build/exclusive-group.d.ts +4 -4
  58. package/dist/.dts/build/exclusive-group.d.ts.map +1 -1
  59. package/dist/.dts/build/finding-model.d.ts +12 -12
  60. package/dist/.dts/build/finding-model.d.ts.map +1 -1
  61. package/dist/.dts/build/generate-documentation.d.ts +19 -19
  62. package/dist/.dts/build/generate-documentation.d.ts.map +1 -1
  63. package/dist/.dts/build/generate-env-artifacts.d.ts +43 -43
  64. package/dist/.dts/build/generate-env-artifacts.d.ts.map +1 -1
  65. package/dist/.dts/build/generate-evidence.d.ts +19 -19
  66. package/dist/.dts/build/generate-evidence.d.ts.map +1 -1
  67. package/dist/.dts/build/generate-manifest.d.ts +11 -12
  68. package/dist/.dts/build/generate-manifest.d.ts.map +1 -1
  69. package/dist/.dts/build/generate-usage.d.ts +23 -24
  70. package/dist/.dts/build/generate-usage.d.ts.map +1 -1
  71. package/dist/.dts/build/generated-banner.d.ts +5 -5
  72. package/dist/.dts/build/governance-fields.d.ts +7 -7
  73. package/dist/.dts/build/humanize-key.d.ts +1 -1
  74. package/dist/.dts/build/humanize-key.d.ts.map +1 -1
  75. package/dist/.dts/build/index.d.ts +20 -36
  76. package/dist/.dts/build/index.d.ts.map +1 -1
  77. package/dist/.dts/build/lifecycle-model.d.ts +87 -85
  78. package/dist/.dts/build/lifecycle-model.d.ts.map +1 -1
  79. package/dist/.dts/build/link.d.ts +38 -39
  80. package/dist/.dts/build/link.d.ts.map +1 -1
  81. package/dist/.dts/build/literal-eval.d.ts +2 -2
  82. package/dist/.dts/build/literal-eval.d.ts.map +1 -1
  83. package/dist/.dts/build/live-expirations.d.ts +14 -13
  84. package/dist/.dts/build/live-expirations.d.ts.map +1 -1
  85. package/dist/.dts/build/manifest.d.ts +6 -6
  86. package/dist/.dts/build/map-utils.d.ts +4 -4
  87. package/dist/.dts/build/merge-documentation.d.ts +9 -8
  88. package/dist/.dts/build/merge-documentation.d.ts.map +1 -1
  89. package/dist/.dts/build/ownership-model.d.ts +14 -15
  90. package/dist/.dts/build/ownership-model.d.ts.map +1 -1
  91. package/dist/.dts/build/parse.d.ts +20 -21
  92. package/dist/.dts/build/parse.d.ts.map +1 -1
  93. package/dist/.dts/build/reference-projections.d.ts +36 -38
  94. package/dist/.dts/build/reference-projections.d.ts.map +1 -1
  95. package/dist/.dts/build/resolution/resolve-import.d.ts +18 -14
  96. package/dist/.dts/build/resolution/resolve-import.d.ts.map +1 -1
  97. package/dist/.dts/build/resolution/resolve-package-schema.d.ts +26 -26
  98. package/dist/.dts/build/resolution/resolve-package-schema.d.ts.map +1 -1
  99. package/dist/.dts/build/resolution/resolve-within-root.d.ts +9 -9
  100. package/dist/.dts/build/sarif.d.ts +5 -5
  101. package/dist/.dts/build/sarif.d.ts.map +1 -1
  102. package/dist/.dts/build/scan-dependencies.d.ts +17 -16
  103. package/dist/.dts/build/scan-dependencies.d.ts.map +1 -1
  104. package/dist/.dts/build/sort-by-identity.d.ts +1 -1
  105. package/dist/.dts/build/source-position.d.ts +13 -13
  106. package/dist/.dts/build/tool-version.d.ts +1 -1
  107. package/dist/.dts/build/usage-report.d.ts +19 -19
  108. package/dist/.dts/build/usage-report.d.ts.map +1 -1
  109. package/dist/.dts/eslint-plugin/index.d.ts +16 -5
  110. package/dist/.dts/eslint-plugin/index.d.ts.map +1 -1
  111. package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts +4 -4
  112. package/dist/.dts/evidence/define-projection.d.ts +15 -16
  113. package/dist/.dts/evidence/define-projection.d.ts.map +1 -1
  114. package/dist/.dts/evidence/index.d.ts +11 -15
  115. package/dist/.dts/evidence/index.d.ts.map +1 -1
  116. package/dist/.dts/helpers/index.d.ts +15 -18
  117. package/dist/.dts/helpers/index.d.ts.map +1 -1
  118. package/dist/.dts/helpers/validators.d.ts +2 -2
  119. package/dist/.dts/helpers/validators.d.ts.map +1 -1
  120. package/dist/.dts/node/index.d.ts +19 -0
  121. package/dist/.dts/node/index.d.ts.map +1 -1
  122. package/dist/.dts/runtime/create.d.ts +3 -3
  123. package/dist/.dts/runtime/document.d.ts +90 -99
  124. package/dist/.dts/runtime/document.d.ts.map +1 -1
  125. package/dist/.dts/runtime/errors.d.ts +5 -5
  126. package/dist/.dts/runtime/reset.d.ts +1 -1
  127. package/dist/.dts/runtime/types.d.ts +23 -24
  128. package/dist/.dts/runtime/types.d.ts.map +1 -1
  129. package/dist/.dts/runtime/validate.d.ts +1 -1
  130. package/dist/.dts7/_ipc/build-fs.d.ts +3 -3
  131. package/dist/.dts7/_ipc/build-fs.d.ts.map +1 -1
  132. package/dist/.dts7/_ipc/display-path.d.ts +1 -1
  133. package/dist/.dts7/_ipc/glob.d.ts +3 -2
  134. package/dist/.dts7/_ipc/glob.d.ts.map +1 -1
  135. package/dist/.dts7/_ipc/no-node-fs.d.ts +2 -2
  136. package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts +16 -16
  137. package/dist/.dts7/_ipc/resolve-tsconfig-paths.d.ts.map +1 -1
  138. package/dist/.dts7/_ipc/typescript.d.ts +4 -4
  139. package/dist/.dts7/build/assemble-project.d.ts +14 -15
  140. package/dist/.dts7/build/assemble-project.d.ts.map +1 -1
  141. package/dist/.dts7/build/change-model.d.ts +14 -14
  142. package/dist/.dts7/build/change-model.d.ts.map +1 -1
  143. package/dist/.dts7/build/check-artifacts.d.ts +4 -4
  144. package/dist/.dts7/build/check-artifacts.d.ts.map +1 -1
  145. package/dist/.dts7/build/citation-verification.d.ts +13 -14
  146. package/dist/.dts7/build/citation-verification.d.ts.map +1 -1
  147. package/dist/.dts7/build/compatibility.d.ts +24 -24
  148. package/dist/.dts7/build/compatibility.d.ts.map +1 -1
  149. package/dist/.dts7/build/contract-model.d.ts +10 -10
  150. package/dist/.dts7/build/contract-model.d.ts.map +1 -1
  151. package/dist/.dts7/build/deep-equal.d.ts +2 -2
  152. package/dist/.dts7/build/deep-freeze.d.ts +2 -2
  153. package/dist/.dts7/build/dependency-graph.d.ts +48 -55
  154. package/dist/.dts7/build/dependency-graph.d.ts.map +1 -1
  155. package/dist/.dts7/build/dependency-model.d.ts +18 -18
  156. package/dist/.dts7/build/dependency-model.d.ts.map +1 -1
  157. package/dist/.dts7/build/discover.d.ts +11 -11
  158. package/dist/.dts7/build/discover.d.ts.map +1 -1
  159. package/dist/.dts7/build/docs.d.ts +34 -38
  160. package/dist/.dts7/build/docs.d.ts.map +1 -1
  161. package/dist/.dts7/build/env-example.d.ts +13 -13
  162. package/dist/.dts7/build/env-example.d.ts.map +1 -1
  163. package/dist/.dts7/build/errors.d.ts +8 -8
  164. package/dist/.dts7/build/evidence-cache.d.ts +23 -23
  165. package/dist/.dts7/build/evidence-cache.d.ts.map +1 -1
  166. package/dist/.dts7/build/evidence-model.d.ts +3 -3
  167. package/dist/.dts7/build/evidence-reference.d.ts +15 -15
  168. package/dist/.dts7/build/evidence-reference.d.ts.map +1 -1
  169. package/dist/.dts7/build/evidence-snapshot.d.ts +47 -53
  170. package/dist/.dts7/build/evidence-snapshot.d.ts.map +1 -1
  171. package/dist/.dts7/build/exclusive-group.d.ts +4 -4
  172. package/dist/.dts7/build/exclusive-group.d.ts.map +1 -1
  173. package/dist/.dts7/build/finding-model.d.ts +12 -12
  174. package/dist/.dts7/build/finding-model.d.ts.map +1 -1
  175. package/dist/.dts7/build/generate-documentation.d.ts +19 -19
  176. package/dist/.dts7/build/generate-documentation.d.ts.map +1 -1
  177. package/dist/.dts7/build/generate-env-artifacts.d.ts +43 -43
  178. package/dist/.dts7/build/generate-env-artifacts.d.ts.map +1 -1
  179. package/dist/.dts7/build/generate-evidence.d.ts +19 -19
  180. package/dist/.dts7/build/generate-evidence.d.ts.map +1 -1
  181. package/dist/.dts7/build/generate-manifest.d.ts +11 -12
  182. package/dist/.dts7/build/generate-manifest.d.ts.map +1 -1
  183. package/dist/.dts7/build/generate-usage.d.ts +23 -24
  184. package/dist/.dts7/build/generate-usage.d.ts.map +1 -1
  185. package/dist/.dts7/build/generated-banner.d.ts +5 -5
  186. package/dist/.dts7/build/governance-fields.d.ts +7 -7
  187. package/dist/.dts7/build/humanize-key.d.ts +1 -1
  188. package/dist/.dts7/build/humanize-key.d.ts.map +1 -1
  189. package/dist/.dts7/build/index.d.ts +20 -36
  190. package/dist/.dts7/build/index.d.ts.map +1 -1
  191. package/dist/.dts7/build/lifecycle-model.d.ts +87 -85
  192. package/dist/.dts7/build/lifecycle-model.d.ts.map +1 -1
  193. package/dist/.dts7/build/link.d.ts +38 -39
  194. package/dist/.dts7/build/link.d.ts.map +1 -1
  195. package/dist/.dts7/build/literal-eval.d.ts +2 -2
  196. package/dist/.dts7/build/literal-eval.d.ts.map +1 -1
  197. package/dist/.dts7/build/live-expirations.d.ts +14 -13
  198. package/dist/.dts7/build/live-expirations.d.ts.map +1 -1
  199. package/dist/.dts7/build/manifest.d.ts +6 -6
  200. package/dist/.dts7/build/map-utils.d.ts +4 -4
  201. package/dist/.dts7/build/merge-documentation.d.ts +9 -8
  202. package/dist/.dts7/build/merge-documentation.d.ts.map +1 -1
  203. package/dist/.dts7/build/ownership-model.d.ts +14 -15
  204. package/dist/.dts7/build/ownership-model.d.ts.map +1 -1
  205. package/dist/.dts7/build/parse.d.ts +20 -21
  206. package/dist/.dts7/build/parse.d.ts.map +1 -1
  207. package/dist/.dts7/build/reference-projections.d.ts +36 -38
  208. package/dist/.dts7/build/reference-projections.d.ts.map +1 -1
  209. package/dist/.dts7/build/resolution/resolve-import.d.ts +18 -14
  210. package/dist/.dts7/build/resolution/resolve-import.d.ts.map +1 -1
  211. package/dist/.dts7/build/resolution/resolve-package-schema.d.ts +26 -26
  212. package/dist/.dts7/build/resolution/resolve-package-schema.d.ts.map +1 -1
  213. package/dist/.dts7/build/resolution/resolve-within-root.d.ts +9 -9
  214. package/dist/.dts7/build/sarif.d.ts +5 -5
  215. package/dist/.dts7/build/sarif.d.ts.map +1 -1
  216. package/dist/.dts7/build/scan-dependencies.d.ts +17 -16
  217. package/dist/.dts7/build/scan-dependencies.d.ts.map +1 -1
  218. package/dist/.dts7/build/sort-by-identity.d.ts +1 -1
  219. package/dist/.dts7/build/source-position.d.ts +13 -13
  220. package/dist/.dts7/build/tool-version.d.ts +1 -1
  221. package/dist/.dts7/build/usage-report.d.ts +19 -19
  222. package/dist/.dts7/build/usage-report.d.ts.map +1 -1
  223. package/dist/.dts7/eslint-plugin/index.d.ts +16 -5
  224. package/dist/.dts7/eslint-plugin/index.d.ts.map +1 -1
  225. package/dist/.dts7/eslint-plugin/no-raw-process-env.d.ts +4 -4
  226. package/dist/.dts7/evidence/define-projection.d.ts +15 -16
  227. package/dist/.dts7/evidence/define-projection.d.ts.map +1 -1
  228. package/dist/.dts7/evidence/index.d.ts +11 -15
  229. package/dist/.dts7/evidence/index.d.ts.map +1 -1
  230. package/dist/.dts7/helpers/index.d.ts +15 -18
  231. package/dist/.dts7/helpers/index.d.ts.map +1 -1
  232. package/dist/.dts7/helpers/validators.d.ts +2 -2
  233. package/dist/.dts7/helpers/validators.d.ts.map +1 -1
  234. package/dist/.dts7/node/index.d.ts +19 -0
  235. package/dist/.dts7/node/index.d.ts.map +1 -1
  236. package/dist/.dts7/runtime/create.d.ts +3 -3
  237. package/dist/.dts7/runtime/document.d.ts +90 -99
  238. package/dist/.dts7/runtime/document.d.ts.map +1 -1
  239. package/dist/.dts7/runtime/errors.d.ts +5 -5
  240. package/dist/.dts7/runtime/reset.d.ts +1 -1
  241. package/dist/.dts7/runtime/types.d.ts +23 -24
  242. package/dist/.dts7/runtime/types.d.ts.map +1 -1
  243. package/dist/.dts7/runtime/validate.d.ts +1 -1
  244. package/dist/{build-DNAYWD2B.js → build-33O5SDTC.js} +37 -39
  245. package/dist/build-33O5SDTC.js.map +1 -0
  246. package/dist/build.cjs +36 -38
  247. package/dist/build.cjs.map +1 -1
  248. package/dist/build.js +36 -38
  249. package/dist/build.js.map +1 -1
  250. package/dist/{chunk-HAGMVMN5.js → chunk-4D67AQFY.js} +2 -2
  251. package/dist/cli/index.js +29 -28
  252. package/dist/cli/index.js.map +1 -1
  253. package/dist/eslint-plugin/index.cjs.map +1 -1
  254. package/dist/eslint-plugin/index.js.map +1 -1
  255. package/dist/evidence.cjs +1 -1
  256. package/dist/evidence.cjs.map +1 -1
  257. package/dist/evidence.js +1 -1
  258. package/dist/evidence.js.map +1 -1
  259. package/dist/helpers.cjs +4 -4
  260. package/dist/helpers.cjs.map +1 -1
  261. package/dist/helpers.js +4 -4
  262. package/dist/helpers.js.map +1 -1
  263. package/dist/index.cjs.map +1 -1
  264. package/dist/index.js.map +1 -1
  265. package/examples/README.md +1 -1
  266. package/package.json +20 -13
  267. package/schemas/contract-model.schema.json +7 -7
  268. package/schemas/env-cap-report.schema.json +88 -88
  269. package/skills/env-cap/SKILL.md +12 -13
  270. package/skills/env-cap/references/api.md +1 -1
  271. package/specs/architecture.md +145 -120
  272. package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +9 -0
  273. package/specs/generated-artifacts.md +78 -70
  274. package/specs/migrations/README.md +6 -6
  275. package/specs/migrations/from-centralized-schema.md +1 -1
  276. package/specs/migrations/from-t3-env.md +9 -9
  277. package/PROMPT.md +0 -89
  278. package/dist/build-DNAYWD2B.js.map +0 -1
  279. /package/dist/{chunk-HAGMVMN5.js.map → chunk-4D67AQFY.js.map} +0 -0
@@ -11,7 +11,7 @@ import { type AliasResolutionCache, type TsconfigPathsResolution } from "./resol
11
11
  * Deliberately narrow: only handles a direct relative specifier resolving to
12
12
  * a real `.ts`/`.tsx` file on disk. Bare/package specifiers, namespace
13
13
  * imports, and anything requiring real module resolution (re-export chains,
14
- * `exports` map lookups, etc.) return `undefined` -- the caller treats that
14
+ * `exports` map lookups, etc.) return `undefined`: the caller treats that
15
15
  * as "couldn't statically link" and warns rather than guesses, the same
16
16
  * philosophy `evaluateLiteral` already uses for non-literal expressions.
17
17
  *
@@ -25,17 +25,17 @@ export declare function resolveRelativeImport(importingFile: string, specifier:
25
25
  export declare function fileExists(filePath: string, fs: BuildFileSystem): Promise<boolean>;
26
26
  /** Shared inputs threaded through every call to {@link resolveImportSpecifier} for one discovery/link run. */
27
27
  export interface ImportResolutionContext {
28
- /** The filesystem capability -- `./build` never imports `node:fs` (ADR 0040). */
28
+ /** The filesystem capability: `./build` never imports `node:fs` (ADR 0040). */
29
29
  readonly fs: BuildFileSystem;
30
30
  /** Absolute path of the project root, used to resolve package specifiers. */
31
31
  readonly root: string;
32
- /** Explicit allowlist -- see ADR 0014. Empty/omitted means package resolution never fires, identical to today's behavior. */
32
+ /** Explicit allowlist: see ADR 0014. Empty/omitted means package resolution never fires, identical to today's behavior. */
33
33
  readonly packages: readonly string[];
34
- /** Memoizes package resolution per specifier across the whole run -- see `resolvePackageImport`'s own doc comment for why. */
34
+ /** Memoizes package resolution per specifier across the whole run: see `resolvePackageImport`'s own doc comment for why. */
35
35
  readonly cache: Map<string, Promise<PackageSchemaResolutionResult>>;
36
- /** Parsed `tsconfig.json` `paths`/`baseUrl`, or `undefined` when alias resolution found nothing to do or was disabled -- see ADR 0023. */
36
+ /** Parsed `tsconfig.json` `paths`/`baseUrl`, or `undefined` when alias resolution found nothing to do or was disabled: see ADR 0023. */
37
37
  readonly tsconfigPaths: TsconfigPathsResolution | undefined;
38
- /** Memoizes alias resolution across the whole run -- see `resolveAliasImport`'s own doc comment for why. Always allocated, even when `tsconfigPaths` is `undefined`, mirroring `cache` above. */
38
+ /** Memoizes alias resolution across the whole run: see `resolveAliasImport`'s own doc comment for why. Always allocated, even when `tsconfigPaths` is `undefined`, mirroring `cache` above. */
39
39
  readonly aliasCache: AliasResolutionCache;
40
40
  }
41
41
  /**
@@ -45,14 +45,18 @@ export interface ImportResolutionContext {
45
45
  * chain at every call site.
46
46
  *
47
47
  * @remarks
48
- * Purely a composition point -- no new resolution logic lives here. Tries, in order: the
49
- * relative resolver (cheap, no `fs.stat` beyond the local filesystem check it already
50
- * does); tsconfig path-alias resolution (ADR 0023, on by default) for a bare specifier
51
- * matching the project's own `tsconfig.json` `paths`/`baseUrl`; then package resolution
52
- * (ADR 0014) for a bare specifier matching an allow-listed package name. Alias resolution
53
- * runs before package resolution because it resolves the consuming project's own local
54
- * source (already-trusted, no versioning boundary), the same precedence relative
55
- * resolution already has over package resolution.
48
+ * Purely a composition point: no new resolution logic lives here. It tries, in order:
49
+ *
50
+ * 1. The relative resolver (cheap, no `fs.stat` beyond the local filesystem check it
51
+ * already does).
52
+ * 2. tsconfig path-alias resolution (ADR 0023, on by default), for a bare specifier
53
+ * matching the project's own `tsconfig.json` `paths`/`baseUrl`.
54
+ * 3. Package resolution (ADR 0014), for a bare specifier matching an allow-listed
55
+ * package name.
56
+ *
57
+ * Alias resolution runs before package resolution because it resolves the consuming
58
+ * project's own local source (already-trusted, no versioning boundary). Relative
59
+ * resolution has the same precedence over package resolution.
56
60
  */
57
61
  export declare function resolveImportSpecifier(importingFile: string, specifier: string, context: ImportResolutionContext): Promise<string | undefined>;
58
62
  //# sourceMappingURL=resolve-import.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-import.d.ts","sourceRoot":"","sources":["../../../../src/build/resolution/resolve-import.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,6BAA6B,CAAA;AAEpC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CACzC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe7B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAKlF;AAED,8GAA8G;AAC9G,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAA;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,6HAA6H;IAC7H,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,8HAA8H;IAC9H,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,CAAA;IACnE,0IAA0I;IAC1I,QAAQ,CAAC,aAAa,EAAE,uBAAuB,GAAG,SAAS,CAAA;IAC3D,iMAAiM;IACjM,QAAQ,CAAC,UAAU,EAAE,oBAAoB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,CAAA;CAC1C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe7B"}
@@ -1,12 +1,12 @@
1
1
  import type { ParseWarning } from "../parse.js";
2
2
  import type { BuildFileSystem } from "../types.js";
3
- /** 1 MiB. New hardening specific to this trust tier -- a package crosses a
4
- * real versioning/trust boundary that locally-discovered source doesn't,
5
- * so this caps the cost of parsing an oversized or adversarial file before
6
- * any of its content is even read into memory. See ADR 0014. */
3
+ /** 1 MiB. Hardening specific to this trust tier. A package crosses a real
4
+ * versioning/trust boundary that locally-discovered source doesn't. So this
5
+ * caps the cost of an oversized or adversarial file before any of its
6
+ * content is read into memory. See ADR 0014. */
7
7
  export declare const MAX_PACKAGE_SCHEMA_FILE_BYTES = 1048576;
8
8
  type PackageResolutionFailureCode = "PACKAGE_NOT_FOUND" | "MALFORMED_PACKAGE_JSON" | "FIELD_MISSING" | "INVALID_EXTENSION" | "OUTSIDE_PACKAGE" | "FILE_TOO_LARGE";
9
- /** Both the authored and resolved forms are kept -- diagnostics benefit from
9
+ /** Both the authored and resolved forms are kept: diagnostics benefit from
10
10
  * showing exactly what a package author wrote versus what it resolved to. */
11
11
  export interface PackageOrigin {
12
12
  /** The allow-listed package name that declared this schema. */
@@ -28,12 +28,12 @@ export type PackageSchemaResolutionResult = {
28
28
  };
29
29
  /**
30
30
  * Resolves one allow-listed package name. Memoized in a caller-owned
31
- * `cache` (one per `generate*()` invocation, shared with linking/dependency-
32
- * graph resolution) so a name referenced from multiple places -- multiple
33
- * scanned files bare-importing the same package, or a duplicate entry in
34
- * `packages` -- is only ever resolved once. The cache is populated with the
35
- * in-flight promise before it settles, so concurrent callers await the same
36
- * resolution rather than racing duplicate work.
31
+ * `cache`: one per `generate*()` invocation, shared with linking/dependency-
32
+ * graph resolution. So a name referenced from multiple places is resolved
33
+ * only once (e.g. several scanned files bare-import the same package, or
34
+ * `packages` has a duplicate entry). The cache holds the in-flight promise
35
+ * before it settles. So concurrent callers await the same resolution rather
36
+ * than racing duplicate work.
37
37
  */
38
38
  export declare function resolvePackageSchemaFile(packageName: string, root: string, cache: Map<string, Promise<PackageSchemaResolutionResult>>, fs: BuildFileSystem): Promise<PackageSchemaResolutionResult>;
39
39
  interface ResolvedPackageFile {
@@ -47,24 +47,25 @@ export interface ResolvePackagesResult {
47
47
  readonly warnings: readonly ParseWarning[];
48
48
  }
49
49
  /**
50
- * Resolves every allow-listed package name. Input is deduplicated first, so
51
- * a duplicate entry in `packages` (accidental or defensive) produces exactly
52
- * one resolution attempt and, on failure, exactly one warning -- never two.
50
+ * Resolves every allow-listed package name. Input is deduplicated first. So
51
+ * a duplicate entry in `packages` (accidental or defensive) produces one
52
+ * resolution attempt and, on failure, one warning: never two.
53
53
  * Never throws: every failure becomes one `ParseWarning`, consistent with
54
54
  * every other static-analysis boundary in this codebase.
55
55
  */
56
56
  export declare function resolveAllowlistedPackages(packages: readonly string[] | undefined, root: string, cache: Map<string, Promise<PackageSchemaResolutionResult>>, fs: BuildFileSystem): Promise<ResolvePackagesResult>;
57
57
  /**
58
58
  * Combines local schema-discovery hits with package-resolved files into one
59
- * deduplicated list, keyed by realpath rather than lexical absolute path --
60
- * package-resolved files are already realpath-canonicalized (see
61
- * `resolveUncached` above), but local `discoverSchemaFiles()` hits are plain
59
+ * deduplicated list, keyed by realpath rather than lexical absolute path.
60
+ * Package-resolved files are already realpath-canonicalized (see
61
+ * `resolveUncached` above). Local `discoverSchemaFiles()` hits are plain
62
62
  * `readdir`-derived absolute paths that may themselves traverse a symlink (a
63
- * symlinked `root`, or an included path reached through one). Deduplicating
64
- * on the lexical path alone would miss the case where the same physical file
65
- * is reached twice through two different symlinked routes -- one via local
66
- * glob discovery, one via package resolution -- and silently double-count it
67
- * into two identical contracts, including the more mundane case of a package
63
+ * symlinked `root`, or an included path reached through one).
64
+ *
65
+ * Deduplicating on the lexical path alone would miss one physical file
66
+ * reached by two symlinked routes: local glob discovery and package
67
+ * resolution. That file would be silently
68
+ * double-counted into two identical contracts. A common case: a package
68
69
  * that's both locally glob-reachable (e.g. during a monorepo migration) and
69
70
  * explicitly allow-listed. On a collision, the local path string identity
70
71
  * wins (the package-resolved duplicate is dropped).
@@ -72,11 +73,10 @@ export declare function resolveAllowlistedPackages(packages: readonly string[] |
72
73
  export declare function mergeLocalAndPackageFiles(localFiles: readonly string[], packageFiles: readonly string[], fs: BuildFileSystem): Promise<string[]>;
73
74
  /**
74
75
  * Bare-specifier-to-allowlist matching, used by `resolve-import.ts`'s
75
- * `resolveImportSpecifier()` as its package-resolution fallback. Only ever
76
+ * `resolveImportSpecifier()` as its package-resolution fallback. It only
76
77
  * attempts resolution for a specifier that is (or is a subpath of) an
77
- * allow-listed package name -- any other bare specifier is not this
78
- * mechanism's concern and returns `undefined` immediately, identical to
79
- * `resolveRelativeImport()`'s existing bare-specifier no-op.
78
+ * allow-listed package name. Any other bare specifier returns `undefined`
79
+ * immediately, like `resolveRelativeImport()`'s bare-specifier no-op.
80
80
  */
81
81
  export declare function resolvePackageImport(specifier: string, allowedPackages: readonly string[], root: string, cache: Map<string, Promise<PackageSchemaResolutionResult>>, fs: BuildFileSystem): Promise<string | undefined>;
82
82
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-package-schema.d.ts","sourceRoot":"","sources":["../../../../src/build/resolution/resolve-package-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAuBlD;;;iEAGiE;AACjE,eAAO,MAAM,6BAA6B,UAAY,CAAA;AAItD,KAAK,4BAA4B,GAC7B,mBAAmB,GACnB,wBAAwB,GACxB,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,CA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SAAS,EACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,EAC1D,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,qBAAqB,CAAC,CAgChC;AAED;;;;;;;;;;;;;;GAcG;AASH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,EAC1D,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA0B7B"}
1
+ {"version":3,"file":"resolve-package-schema.d.ts","sourceRoot":"","sources":["../../../../src/build/resolution/resolve-package-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAsBlD;;;iDAGiD;AACjD,eAAO,MAAM,6BAA6B,UAAY,CAAA;AAItD,KAAK,4BAA4B,GAC7B,mBAAmB,GACnB,wBAAwB,GACxB,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,CAAA;AAEpB;8EAC8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IA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C,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,EAC1D,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe7B"}
@@ -7,12 +7,12 @@ export type ResolveWithinRootResult = {
7
7
  readonly issue: CompatibilityIssue;
8
8
  };
9
9
  /**
10
- * Plain lexical bounds-check: is `targetPath` inside `baseDir`? Shared by
11
- * `resolveWithinRoot()` below (output paths, checked lexically since they
12
- * usually don't exist on disk yet) and `resolve-package-schema.ts` (which
13
- * additionally re-checks this against `fs.realpath`-resolved paths, since a
14
- * package-declared schema path both exists on disk and crosses a real trust
15
- * boundary -- see ADR 0014). Boundary-agnostic on purpose: neither caller's
10
+ * Plain lexical bounds-check: is `targetPath` inside `baseDir`? Two callers
11
+ * share it. `resolveWithinRoot()` below checks output paths lexically, since
12
+ * they usually don't exist on disk yet. `resolve-package-schema.ts` also
13
+ * re-checks against `fs.realpath`-resolved paths, since a package-declared
14
+ * schema path both exists on disk and crosses a real trust boundary (see
15
+ * ADR 0014). Boundary-agnostic on purpose: neither caller's
16
16
  * notion of "root" is baked in here.
17
17
  */
18
18
  export declare function isWithinDirectory(baseDir: string, targetPath: string): boolean;
@@ -20,14 +20,14 @@ export declare function isWithinDirectory(baseDir: string, targetPath: string):
20
20
  * Resolves `location` against `root` and checks the result doesn't escape it
21
21
  * (e.g. `location: "../../malicious.ts"`, or an absolute path on another
22
22
  * branch of the filesystem entirely). Discovery (`include`/`exclude`) is
23
- * already safe by construction -- it only ever walks *down* from `root` via
23
+ * already safe by construction: it only ever walks *down* from `root` via
24
24
  * `readdir`, so a pattern can't make it read outside `root`. Output
25
25
  * locations have no such structural guarantee, since `path.resolve` happily
26
26
  * walks back out via `..` segments, so this is a plain lexical bounds-check
27
- * (not a symlink-aware `realpath` check -- these are *output* paths that
27
+ * (not a symlink-aware `realpath` check: these are *output* paths that
28
28
  * usually don't exist yet).
29
29
  *
30
- * Never throws itself -- returns a `CompatibilityIssue`-shaped finding on
30
+ * Never throws itself: returns a `CompatibilityIssue`-shaped finding on
31
31
  * escape so each generator function (`generateEnvManifest`, `generateDocumentation`,
32
32
  * `generateUsageReport`, `generateEnvArtifacts`) can wrap it in its own error type.
33
33
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * SARIF export -- an adapter over Finding Model, not a new fact source.
2
+ * SARIF export: an adapter over Finding Model, not a new fact source.
3
3
  * Produces a minimal, spec-conformant SARIF 2.1.0 log
4
4
  * (https://docs.oasis-open.org/sarif/sarif/v2.1.0/) so env-cap's findings can
5
5
  * be consumed by any SARIF-aware tool (GitHub code scanning, most CI security
@@ -7,11 +7,11 @@
7
7
  *
8
8
  * Pure and synchronous: every input is already computed by the time this
9
9
  * runs, so this never re-derives a finding, never reads the filesystem, and
10
- * never decides what is or isn't a problem -- it only re-shapes what
10
+ * never decides what is or isn't a problem; it only re-shapes what
11
11
  * `buildFindingModel()` already concluded.
12
12
  */
13
13
  import type { FindingModel } from "./finding-model.js";
14
- /** SARIF's `level` enum -- see the SARIF 2.1.0 spec, section 3.27.10. */
14
+ /** SARIF's `level` enum: see the SARIF 2.1.0 spec, section 3.27.10. */
15
15
  type SarifLevel = "none" | "note" | "warning" | "error";
16
16
  interface SarifLocation {
17
17
  readonly physicalLocation: {
@@ -32,7 +32,7 @@ interface SarifResult {
32
32
  };
33
33
  readonly locations?: readonly SarifLocation[];
34
34
  }
35
- /** A minimal SARIF 2.1.0 log -- only the properties this adapter actually populates, not the full spec surface. */
35
+ /** A minimal SARIF 2.1.0 log: only the properties this adapter actually populates, not the full spec surface. */
36
36
  export interface SarifLog {
37
37
  readonly $schema: string;
38
38
  readonly version: "2.1.0";
@@ -55,7 +55,7 @@ export interface SarifLog {
55
55
  *
56
56
  * @remarks
57
57
  * `rules` lists every distinct `FindingCode` actually present in this run,
58
- * sorted -- not the full `FindingCode` union. A SARIF consumer treats the
58
+ * sorted: not the full `FindingCode` union. A SARIF consumer treats the
59
59
  * rules array as "what this tool reported", and advertising rules that
60
60
  * produced no result makes a clean run look like it has unexplained silent
61
61
  * rules. `results` preserves Finding Model's own order, which a caller wanting
@@ -1 +1 @@
1
- {"version":3,"file":"sarif.d.ts","sourceRoot":"","sources":["../../../src/build/sarif.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAI/D,yEAAyE;AACzE,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAOvD,UAAU,aAAa;IACrB,QAAQ,CAAC,gBAAgB,EAAE;QACzB,QAAQ,CAAC,gBAAgB,EAAE;YAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;QACnD,QAAQ,CAAC,MAAM,CAAC,EAAE;YAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;KAC/E,CAAA;CACF;AAuCD,UAAU,WAAW;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;CAC9C;AAED,mHAAmH;AACnH,MAAM,WAAW,QAAQ;IACvB,QAA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,UAAU,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;CAC9C;AAED,iHAAiH;AACjH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS;QACtB,QAAQ,CAAC,IAAI,EAAE;YACb,QAAQ,CAAC,MAAM,EAAE;gBACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;gBACrB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;gBAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;gBACxB,QAAQ,CAAC,KAAK,EAAE,SAAS;oBAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;iBAAE,EAAE,CAAA;aACnD,CAAA;SACF,CAAA;QACD,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAA;KACzC,EAAE,CAAA;CACJ;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAgClE"}
@@ -2,20 +2,20 @@ import type TS from "@typescript/typescript6";
2
2
  import type { ImportBinding } from "./parse.js";
3
3
  /**
4
4
  * Why a tracked binding's value flowed somewhere this single-file, syntactic
5
- * walk cannot follow -- see ADR 0039. Each reason names the exact construct
6
- * so a downstream "cannot determine whether X is read" message can cite it,
7
- * rather than a single opaque "escape" label.
5
+ * walk cannot follow: see ADR 0039. Each reason names the exact construct.
6
+ * So a downstream "cannot determine whether X is read" message can cite it,
7
+ * not a single opaque "escape" label.
8
8
  */
9
9
  export type EscapeReason =
10
- /** `const { ...rest } = contract` -- a rest element captures every remaining key at once. */
10
+ /** `const { ...rest } = contract`: a rest element captures every remaining key at once. */
11
11
  "rest"
12
- /** `const { X: { Y } } = contract` -- the bound value itself gets destructured again, one level too deep for this pass. */
12
+ /** `const { X: { Y } } = contract`: the bound value itself gets destructured again, one level too deep for this pass. */
13
13
  | "nested-pattern"
14
- /** `const { [expr]: v } = contract` where `expr` isn't a string literal -- the bound key can't be read without evaluating `expr`. */
14
+ /** `const { [expr]: v } = contract` where `expr` isn't a string literal: the bound key can't be read without evaluating `expr`. */
15
15
  | "computed-key"
16
- /** `const e = contract` where `e` isn't file-unique/never-assigned (see `resolveAliasTargets`) -- the read is real, but this pass declines to follow `e` any further. */
16
+ /** `const e = contract` where `e` isn't file-unique/never-assigned (see `resolveAliasTargets`): the read is real, but this pass declines to follow `e` any further. */
17
17
  | "reassignment";
18
- /** One observed use of a tracked contract binding in a consumer file -- see ADR 0039. Consumed by `dependency-graph.ts`. */
18
+ /** One observed use of a tracked contract binding in a consumer file: see ADR 0039. Consumed by `dependency-graph.ts`. */
19
19
  export type AccessSite = {
20
20
  readonly kind: "member";
21
21
  readonly member: string;
@@ -39,12 +39,12 @@ export interface FileScanResult {
39
39
  readonly file: string;
40
40
  readonly imports: ReadonlyMap<string, ImportBinding>;
41
41
  readonly accessesByLocalName: ReadonlyMap<string, readonly AccessSite[]>;
42
- /** True if this file contains a bare `export * from "..."` -- used only to
42
+ /** True if this file contains a bare `export * from "..."`. Used only to
43
43
  * flag ambiguous barrel forwarding elsewhere as "unresolved", never to
44
44
  * follow it (see ADR 0010's scope boundary). */
45
45
  readonly hasWildcardReExport: boolean;
46
46
  }
47
- /** One `const <name> = <identifier>` declaration -- a candidate one-level alias of `<identifier>`, before file-uniqueness/never-assigned checks (see `resolveAliasTargets`). */
47
+ /** One `const <name> = <identifier>` declaration: a candidate one-level alias of `<identifier>`, before file-uniqueness/never-assigned checks (see `resolveAliasTargets`). */
48
48
  interface AliasCandidate {
49
49
  readonly aliasName: string;
50
50
  readonly baseName: string;
@@ -52,12 +52,13 @@ interface AliasCandidate {
52
52
  }
53
53
  /**
54
54
  * One whole-file pass collecting the three facts `resolveAliasTargets` needs:
55
- * how many times each name is introduced as *any* kind of binding (a same
56
- * name declared twice anywhere -- including inside a nested scope, since
57
- * this pass is deliberately not scope-aware, matching every other check in
58
- * this file -- disqualifies it as a trackable alias), which names are ever
59
- * assigned to after their declaration, and every plain `const <name> =
60
- * <identifier>` declaration as a raw candidate.
55
+ *
56
+ * - How many times each name is introduced as *any* kind of binding. A name
57
+ * declared twice anywhere, even inside a nested scope, is not a trackable
58
+ * alias. Like every other check in this file, this pass is deliberately not
59
+ * scope-aware.
60
+ * - Which names are ever assigned to after their declaration.
61
+ * - Every plain `const <name> = <identifier>` declaration, as a raw candidate.
61
62
  */
62
63
  /** @internal Exported for direct unit coverage. */
63
64
  export declare function collectDeclarationFacts(sourceFile: TS.SourceFile): {
@@ -1 +1 @@
1
- {"version":3,"file":"scan-dependencies.d.ts","sourceRoot":"","sources":["../../../src/build/scan-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAGhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C;;;;;GAKG;AACH,MAAM,MAAM,YAAY;AACtB,6FAA6F;AAC3F,MAAM;AACR,2HAA2H;GACzH,gBAAgB;AAClB,qIAAqI;GACnI,cAAc;AAChB,yKAAyK;GACvK,cAAc,CAAA;AAElB,4HAA4H;AAC5H,MAAM,MAAM,UAAU,GAClB;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5E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AAU,EAAE,CAAC,CAAA;IACxE;;qDAEiD;IACjD,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAA;CACtC;AAYD,8KAA8K;AAC9K,UAAU,cAAc;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,mBAAmB,CAAA;CAC7C;AAqGD;;;;;;;;;GASG;AACH,mDAAmD;AACnD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG;IAClE,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,cAAc,EAAE,CAAA;CACzD,CAiBA;AA4ED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAgK5F"}
@@ -2,7 +2,7 @@
2
2
  * The canonical ordering every fact model's contract list is sorted by: `file`
3
3
  * (root-relative, POSIX) then `exportName`. One definition so `JSON.stringify`
4
4
  * output is stable and diffs cleanly across Contract / Ownership / Lifecycle /
5
- * Dependency Models. Internal -- not re-exported from the public `.` barrel.
5
+ * Dependency Models. Internal: not re-exported from the public `.` barrel.
6
6
  */
7
7
  export declare function byContractIdentity(a: {
8
8
  readonly file: string;
@@ -1,7 +1,7 @@
1
1
  import type ts from "@typescript/typescript6";
2
2
  /**
3
- * A precise pointer into a source file -- the shared shape every exact-position fact in the
4
- * build pipeline (declaration sites, usage sites, dynamic-access sites) uses, so a consumer never
3
+ * A precise pointer into a source file. Every exact-position fact in the build pipeline
4
+ * (declaration sites, usage sites, dynamic-access sites) shares this shape. So a consumer never
5
5
  * has to reconcile three ad hoc `{ file; line; column }` shapes that happen to mean the same
6
6
  * thing. See ADR 0036.
7
7
  */
@@ -14,7 +14,7 @@ export interface SourcePosition {
14
14
  readonly column: number;
15
15
  }
16
16
  /**
17
- * `node`'s starting line/column within `sourceFile`, both 1-indexed -- TypeScript's own
17
+ * `node`'s starting line/column within `sourceFile`, both 1-indexed: TypeScript's own
18
18
  * `getLineAndCharacterOfPosition()` returns 0-indexed values for both. Callers combine this with
19
19
  * the file path they already have in scope to build a full {@link SourcePosition}; this returns
20
20
  * only the two numbers so it's usable identically whether the caller's `file` is already
@@ -28,16 +28,16 @@ export declare function positionOf(sourceFile: ts.SourceFile, node: ts.Node): {
28
28
  * Parses a developer-supplied `"<relative-path>:<line>:<column>"` citation
29
29
  * (a {@link runtime.VariableEvidenceDocs.dynamicAccess} entry) into a
30
30
  * {@link SourcePosition}. Splits on the *last* two colons so a path
31
- * containing colons of its own (rare, but not impossible) still parses --
31
+ * containing colons of its own (rare, but not impossible) still parses:
32
32
  * only the trailing `:<line>:<column>` is treated as position syntax.
33
33
  * Returns `undefined` for anything that isn't exactly that shape (missing
34
- * segments, a non-positive-integer line/column, an empty path) -- callers
34
+ * segments, a non-positive-integer line/column, an empty path): callers
35
35
  * treat that as a malformed citation, never a thrown error. See ADR 0037.
36
36
  */
37
37
  export declare function parsePositionCitation(citation: string): SourcePosition | undefined;
38
38
  /**
39
39
  * One developer-declared {@link runtime.VariableEvidenceDocs.dynamicAccess} citation's
40
- * current acknowledgment state -- a claim, never an observation. Kept fully
40
+ * current acknowledgment state: a claim, never an observation. Kept fully
41
41
  * separate from `VariableAccessStatus` (which stays exactly 3-valued and
42
42
  * purely AST-derived) so a developer's assertion can never make env-cap
43
43
  * claim it observed something it didn't. See
@@ -46,21 +46,21 @@ export declare function parsePositionCitation(citation: string): SourcePosition
46
46
  */
47
47
  export interface DynamicAccessAssertion extends SourcePosition {
48
48
  /**
49
- * `"fresh"` -- the cited file currently exists and either matches the
49
+ * `"fresh"`: the cited file currently exists and either matches the
50
50
  * committed baseline hash or has no baseline yet (a brand-new citation,
51
- * nothing to contradict it yet). `"stale"` -- the cited file exists but its
52
- * content has changed since the committed baseline. `"missing"` -- the
51
+ * nothing to contradict it yet). `"stale"`: the cited file exists but its
52
+ * content has changed since the committed baseline. `"missing"`: the
53
53
  * cited file no longer exists at all. Re-derived from scratch every run;
54
54
  * never cached across runs.
55
55
  */
56
56
  readonly acknowledgment: "fresh" | "stale" | "missing";
57
57
  /**
58
- * SHA-256 hex digest of the cited file's content *as observed this run* --
58
+ * SHA-256 hex digest of the cited file's content *as observed this run*:
59
59
  * `undefined` iff `acknowledgment === "missing"` (nothing to hash). This is
60
60
  * the one field that makes freshness checking possible without a
61
- * snapshot-only shadow type: the live `EvidenceModel.dependency` a caller
62
- * gets back and the persisted evidence snapshot a later run reads back as
63
- * its baseline are the exact same shape -- this run's `contentHash` becomes
61
+ * snapshot-only shadow type. The live `EvidenceModel.dependency` a caller
62
+ * gets back has the exact same shape as the persisted evidence snapshot a
63
+ * later run reads back as its baseline. So this run's `contentHash` becomes
64
64
  * next run's comparison target directly. See `evidence-snapshot.ts` and
65
65
  * ADR 0037.
66
66
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * env-cap's own installed version -- stamped onto
2
+ * env-cap's own installed version: stamped onto
3
3
  * `EvidenceModel.provenance.toolVersion` and mixed into
4
4
  * `computeSourceFingerprint()`. `./build` never reads its own manifest from
5
5
  * disk (ADR 0040).
@@ -13,7 +13,7 @@ export interface OwnershipDependencyEntry {
13
13
  /** Number of variables declared in this contract's schema. */
14
14
  readonly variableCount: number;
15
15
  /** Files coupled to this contract (imported it, referenced it, or read a
16
- * member from it) -- contract-level "who depends on this," NOT proof any
16
+ * member from it): contract-level "who depends on this," NOT proof any
17
17
  * specific variable was read. Blast radius if this contract changes is
18
18
  * `consumers.length`, computed by callers/renderers on demand rather than
19
19
  * stored redundantly here. */
@@ -28,7 +28,7 @@ export interface AbandonedContractFinding {
28
28
  /** Contract-level default owner, if set. */
29
29
  readonly owner: string | undefined;
30
30
  }
31
- /** A contract reachable only through an unresolved barrel re-export -- can't be proven abandoned or consumed. */
31
+ /** A contract reachable only through an unresolved barrel re-export: can't be proven abandoned or consumed. */
32
32
  export interface UnresolvedConsumerFinding {
33
33
  /** Resolved display name (see {@link DiscoveredContract.contractName}). */
34
34
  readonly contractName: string;
@@ -47,19 +47,19 @@ export interface UnconsumedOwnedVariableFinding {
47
47
  readonly key: string;
48
48
  /**
49
49
  * Every `dynamicAccess` citation for this variable that's currently
50
- * `"stale"` or `"missing"` (empty when none exist -- see ADR 0037).
51
- * Empty is the *strongest* "looks genuinely unused" signal: no developer
52
- * has ever claimed otherwise. A non-empty list means someone specifically
53
- * claimed dynamic access here once and that claim can no longer be
54
- * verified -- worth a human check before deleting, not a stronger reason
55
- * to trust "unconsumed." Exposed as the raw citations, not a collapsed
50
+ * `"stale"` or `"missing"` (empty when none exist: see ADR 0037).
51
+ * Empty is the *strongest* "looks unused" signal: no developer has ever
52
+ * claimed otherwise. A non-empty list means someone specifically claimed
53
+ * dynamic access here once, and that claim can no longer be verified. That
54
+ * is worth a human check before deleting, not a stronger reason to trust
55
+ * "unconsumed." The list holds the raw citations, not a collapsed
56
56
  * `high`/`low` label, matching this codebase's "show the receipt" pattern
57
- * (ADR 0036/0037) -- a reader can judge confidence from the actual
58
- * evidence rather than trusting a derived summary. See ADR 0038.
57
+ * (ADR 0036/0037). A reader can judge confidence from the actual evidence
58
+ * rather than trusting a derived summary. See ADR 0038.
59
59
  */
60
60
  readonly staleOrMissingCitations: readonly DynamicAccessCitationProblem[];
61
61
  }
62
- /** A variable accessed only via dynamic (computed) property access -- usage cannot be determined statically. */
62
+ /** A variable accessed only via dynamic (computed) property access: usage cannot be determined statically. */
63
63
  export interface IndeterminateOwnershipFinding {
64
64
  /** Resolved display name (see {@link DiscoveredContract.contractName}). */
65
65
  readonly contractName: string;
@@ -67,12 +67,12 @@ export interface IndeterminateOwnershipFinding {
67
67
  readonly key: string;
68
68
  /** Human-readable explanation of why usage couldn't be determined. */
69
69
  readonly reason: string;
70
- /** Every AST-observed dynamic-access site backing `reason`, structured -- see ADR 0036. */
70
+ /** Every AST-observed dynamic-access site backing `reason`, structured: see ADR 0036. */
71
71
  readonly dynamicAccessSites: readonly SourcePosition[];
72
72
  /** See {@link UnconsumedOwnedVariableFinding.staleOrMissingCitations}. */
73
73
  readonly staleOrMissingCitations: readonly DynamicAccessCitationProblem[];
74
74
  }
75
- /** A variable that would otherwise be reported `unconsumedOwnedVariables`/`indeterminate`, but has at least one `"fresh"` developer-declared `dynamicAccess` citation -- the raw static status is always shown alongside the assertion, never replaced by it. See ADR 0037. */
75
+ /** A variable that would otherwise be reported `unconsumedOwnedVariables`/`indeterminate`, but has at least one `"fresh"` developer-declared `dynamicAccess` citation: the raw static status is always shown alongside the assertion, never replaced by it. See ADR 0037. */
76
76
  export interface AssertedDynamicAccessFinding {
77
77
  /** Resolved display name (see {@link DiscoveredContract.contractName}). */
78
78
  readonly contractName: string;
@@ -84,7 +84,7 @@ export interface AssertedDynamicAccessFinding {
84
84
  readonly dynamicAccessAssertions: readonly DynamicAccessAssertion[];
85
85
  }
86
86
  /** Everything {@link renderUsageReport} needs to render the Dependency &
87
- * Ownership Report -- deliberately independent of (not derived from)
87
+ * Ownership Report: deliberately independent of (not derived from)
88
88
  * `GenerateUsageReportResult` in `generate-usage.js`, the same way
89
89
  * `RenderDocsOptions` in `docs.ts` doesn't derive from
90
90
  * `GenerateDocumentationResult`. `generate-usage.ts` composes its own
@@ -95,7 +95,7 @@ export interface RenderUsageReportOptions {
95
95
  readonly dependencyOwnership: readonly OwnershipDependencyEntry[];
96
96
  /** Contracts never imported anywhere in the scanned repository. */
97
97
  readonly abandonedContracts: readonly AbandonedContractFinding[];
98
- /** Advisory only, never gates `onOwnershipIssue` -- a contract only
98
+ /** Advisory only, never gates `onOwnershipIssue`: a contract only
99
99
  * reaches here when an ambiguous barrel re-export makes "abandoned" or
100
100
  * "consumed" both unprovable. */
101
101
  readonly unresolvedConsumers: readonly UnresolvedConsumerFinding[];
@@ -103,21 +103,21 @@ export interface RenderUsageReportOptions {
103
103
  readonly unconsumedOwnedVariables: readonly UnconsumedOwnedVariableFinding[];
104
104
  /** Variables accessed only via dynamic (computed) property access. */
105
105
  readonly indeterminate: readonly IndeterminateOwnershipFinding[];
106
- /** Variables a developer has re-acknowledged via `dynamicAccess`, freshly -- see ADR 0037. */
106
+ /** Variables a developer has re-acknowledged via `dynamicAccess`, freshly: see ADR 0037. */
107
107
  readonly asserted: readonly AssertedDynamicAccessFinding[];
108
108
  /** Schema-discovery parse warnings plus, since ADR 0014, any `packages`
109
- * resolution failures -- surfaced here too (not just from
109
+ * resolution failures: surfaced here too (not just from
110
110
  * `generateEnvManifest`/`generateDocumentation`) so a team relying only
111
111
  * on `--ownership` output still learns when a cross-package contract
112
112
  * failed to resolve. */
113
113
  readonly parseWarnings: readonly ParseWarning[];
114
- /** Every surface actually scanned for usage -- see ADR 0036. Named explicitly next to `unconsumedOwnedVariables` so "no consumer found" is never read as a stronger claim than what was actually searched. */
114
+ /** Every surface actually scanned for usage: see ADR 0036. Named explicitly next to `unconsumedOwnedVariables` so "no consumer found" is never read as a stronger claim than what was actually searched. */
115
115
  readonly scannedSurfaces: readonly ScannedSurface[];
116
116
  }
117
117
  /**
118
118
  * Renders the Dependency & Ownership Report: who owns each variable, which
119
119
  * features consume each contract, and what the blast radius is if it
120
- * changes -- structured around exactly those three questions, never generic
120
+ * changes; structured around exactly those three questions, never generic
121
121
  * "dead code"/"unused symbol" language.
122
122
  */
123
123
  export declare function renderUsageReport(computed: RenderUsageReportOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"usage-report.d.ts","sourceRoot":"","sources":["../../../src/build/usage-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AAO9E,OAAO,KAAK,EAAE,YAAY,E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wBAAwB,EAAE,CAAA;IACjE,mEAAmE;IACnE,QAAQ,CAAC,kBAAkB,EAAE,SAAS,wBAAwB,EAAE,CAAA;IAChE;;sCAEkC;IAClC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,yBAAyB,EAAE,CAAA;IAClE,wEAAwE;IACxE,QAAQ,CAAC,wBAAwB,EAAE,SAAS,8BAA8B,EAAE,CAAA;IAC5E,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,SAAS,6BAA6B,EAAE,CAAA;IAChE,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,EAAE,SAAS,4BAA4B,EAAE,CAAA;IAC1D;;;;6BAIyB;IACzB,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAA;IAC/C,4MAA4M;IAC5M,QAAQ,CAAC,eAAe,EAAE,SAAS,cAAc,EAAE,CAAA;CACpD;AAsJD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,CAuB5E"}
@@ -1,13 +1,24 @@
1
+ /**
2
+ * Lint rules that keep environment reads inside contracts (`@maverickcer/env-cap/eslint-plugin`).
3
+ *
4
+ * `no-raw-process-env` flags direct `process.env` reads outside `env.schema.ts` files. `no-node-fs` flags
5
+ * `node:fs` imports in library code, which should take its file system from the caller. The plugin runs
6
+ * inside the project's own ESLint; CI runs the rules on ESLint 10 only.
7
+ *
8
+ * @packageDocumentation
9
+ */
1
10
  import { noNodeFs } from "./no-node-fs.js";
2
11
  import { noRawProcessEnv } from "./no-raw-process-env.js";
3
12
  /**
4
- * `@maverickcer/env-cap/eslint-plugin` -- a flat-config-shaped plugin object
5
- * ({ rules: { ... } }), consumed as:
13
+ * The ESLint plugin, as a flat-config plugin object (`{ rules }`). Register it under the `env-cap`
14
+ * prefix:
6
15
  *
7
- * import envCapPlugin from "@maverickcer/env-cap/eslint-plugin";
8
- * export default [{ plugins: { "env-cap": envCapPlugin }, rules: { "env-cap/no-raw-process-env": "error" } }];
16
+ * ```js
17
+ * import envCapPlugin from "@maverickcer/env-cap/eslint-plugin"
18
+ * export default [{ plugins: { "env-cap": envCapPlugin }, rules: { "env-cap/no-raw-process-env": "error" } }]
19
+ * ```
9
20
  *
10
- * A 4th public entry point alongside `.`, `./build`, `./helpers` -- see ADR 0017.
21
+ * ADR 0017 explains why the rules ship as their own entry point.
11
22
  */
12
23
  declare const plugin: {
13
24
  /** Every rule this plugin ships, keyed by its flat-config rule name. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD;;;;;;;;GAQG;AACH,QAAA,MAAM,MAAM;IACV,wEAAwE;;QAEtE,mCAAmC;;;;QAEnC,4BAA4B;;;;;CAG/B,CAAA;AACD,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eslint-plugin/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,MAAM;IACV,wEAAwE;;QAEtE,mCAAmC;;;;QAEnC,4BAA4B;;;;;CAG/B,CAAA;AACD,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA"}
@@ -1,9 +1,9 @@
1
1
  export interface RuleOptions {
2
2
  /** Glob-array of files this rule doesn't apply to, beyond the built-in
3
- * env.schema.ts allowance below -- for a consuming project's own
4
- * Node-only, build-time bootstrap code (see the README section this
5
- * rule ships with for the canonical worked example: a live-expiration
6
- * resolver authenticating to a secrets manager). Empty by default --
3
+ * env.schema.ts allowance below. It is for a consuming project's own
4
+ * Node-only, build-time bootstrap code. The README section this rule
5
+ * ships with has the canonical worked example: a live-expiration
6
+ * resolver authenticating to a secrets manager. Empty by default:
7
7
  * MUST be populated explicitly by the consuming project; env-cap never
8
8
  * guesses at what counts as "trusted bootstrap code." */
9
9
  allow?: string[];