@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.
- package/ADOPTION.md +144 -0
- package/AGENTS.md +146 -0
- package/CHANGELOG.md +438 -0
- package/CODE_OF_CONDUCT.md +124 -0
- package/CODE_REVIEW.md +200 -0
- package/CONTRIBUTING.md +131 -0
- package/GUIDE.md +1214 -0
- package/PROMPT.md +89 -0
- package/README.md +92 -200
- package/RELEASING.md +160 -0
- package/SECURITY.md +270 -0
- package/SUPPORT.md +76 -0
- package/VERSIONING.md +118 -0
- package/benchmarks/READING-BENCHMARKS.md +197 -0
- package/benchmarks/README.md +126 -0
- package/benchmarks/WRITING-BENCHMARKS.md +252 -0
- package/benchmarks/performance-buildtime/BENCHMARKS.md +889 -0
- package/benchmarks/performance-runtime/BENCHMARKS.md +1988 -0
- package/dist/.dts/_ipc/build-fs.d.ts +53 -0
- package/dist/.dts/_ipc/build-fs.d.ts.map +1 -0
- package/dist/.dts/_ipc/compiler-api.d.ts +17 -0
- package/dist/.dts/_ipc/compiler-api.d.ts.map +1 -0
- package/dist/.dts/_ipc/display-path.d.ts +27 -0
- package/dist/.dts/_ipc/display-path.d.ts.map +1 -0
- package/dist/.dts/_ipc/generated-banner.d.ts +58 -0
- package/dist/.dts/_ipc/generated-banner.d.ts.map +1 -0
- package/dist/.dts/_ipc/glob.d.ts +22 -0
- package/dist/.dts/_ipc/glob.d.ts.map +1 -0
- package/dist/.dts/_ipc/no-node-fs.d.ts +34 -0
- package/dist/.dts/_ipc/no-node-fs.d.ts.map +1 -0
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts +134 -0
- package/dist/.dts/_ipc/resolve-tsconfig-paths.d.ts.map +1 -0
- package/dist/.dts/_ipc/typescript.d.ts +20 -0
- package/dist/.dts/_ipc/typescript.d.ts.map +1 -0
- package/dist/.dts/build/compatibility.d.ts.map +1 -1
- package/dist/.dts/build/compiler-api.d.ts +3 -6
- package/dist/.dts/build/compiler-api.d.ts.map +1 -1
- package/dist/.dts/build/display-path.d.ts +3 -21
- package/dist/.dts/build/display-path.d.ts.map +1 -1
- package/dist/.dts/build/generated-banner.d.ts +21 -42
- package/dist/.dts/build/generated-banner.d.ts.map +1 -1
- package/dist/.dts/build/glob.d.ts +3 -15
- package/dist/.dts/build/glob.d.ts.map +1 -1
- package/dist/.dts/build/link.d.ts.map +1 -1
- package/dist/.dts/build/merge-documentation.d.ts +35 -0
- package/dist/.dts/build/merge-documentation.d.ts.map +1 -0
- package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts +11 -112
- package/dist/.dts/build/resolution/resolve-tsconfig-paths.d.ts.map +1 -1
- package/dist/.dts/build/types.d.ts +4 -53
- package/dist/.dts/build/types.d.ts.map +1 -1
- package/dist/.dts/build/typescript.d.ts +3 -17
- package/dist/.dts/build/typescript.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/glob.d.ts +4 -15
- package/dist/.dts/eslint-plugin/glob.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/index.d.ts +1 -1
- package/dist/.dts/eslint-plugin/no-node-fs.d.ts +8 -18
- package/dist/.dts/eslint-plugin/no-node-fs.d.ts.map +1 -1
- package/dist/.dts/eslint-plugin/no-raw-process-env.d.ts.map +1 -1
- package/dist/{build-H4KFV44Z.js → build-WKDIAWF7.js} +198 -60
- package/dist/build-WKDIAWF7.js.map +1 -0
- package/dist/build.cjs +194 -56
- package/dist/build.cjs.map +1 -1
- package/dist/build.js +194 -56
- package/dist/build.js.map +1 -1
- package/dist/{chunk-7GVPOHDU.js → chunk-KEGYUHBU.js} +2 -2
- package/dist/cli/index.js +36 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/eslint-plugin/index.cjs +84 -54
- package/dist/eslint-plugin/index.cjs.map +1 -1
- package/dist/eslint-plugin/index.js +83 -53
- package/dist/eslint-plugin/index.js.map +1 -1
- package/examples/README.md +95 -0
- package/package.json +48 -14
- package/skills/env-cap/SKILL.md +91 -0
- package/skills/env-cap/references/api.md +220 -0
- package/specs/architecture.md +634 -0
- package/specs/decisions/0001-runtime-documentation-separation.md +197 -0
- package/specs/decisions/0002-static-analysis-never-execution.md +233 -0
- package/specs/decisions/0003-no-global-env-object.md +172 -0
- package/specs/decisions/0004-no-client-server-package-split.md +116 -0
- package/specs/decisions/0005-warn-not-throw-by-default.md +93 -0
- package/specs/decisions/0006-self-redacting-contracts.md +124 -0
- package/specs/decisions/0007-processor-not-transformer.md +109 -0
- package/specs/decisions/0008-gzip-size-budget.md +173 -0
- package/specs/decisions/0009-exclusive-groups-are-always-errors.md +139 -0
- package/specs/decisions/0010-dependency-ownership-engine-scope-boundary.md +100 -0
- package/specs/decisions/0011-shared-discovery-compute-atomic-write-non-atomic.md +104 -0
- package/specs/decisions/0012-live-expiration-overrides-not-ast-functions.md +145 -0
- package/specs/decisions/0013-json-output-is-a-versioned-mirror.md +136 -0
- package/specs/decisions/0014-cross-package-schema-discovery.md +206 -0
- package/specs/decisions/0015-security-backport-window.md +60 -0
- package/specs/decisions/0016-check-mode-compute-before-compare-never-partial-write.md +113 -0
- package/specs/decisions/0017-eslint-plugin-entry-point.md +113 -0
- package/specs/decisions/0018-rotation-alert-issue-on-non-pr-runs.md +104 -0
- package/specs/decisions/0019-published-json-schema-generated-from-types.md +100 -0
- package/specs/decisions/0020-declaration-maps-via-separate-tsc-pass.md +101 -0
- package/specs/decisions/0021-manifest-change-report-persisted-snapshot.md +177 -0
- package/specs/decisions/0022-validation-contexts.md +267 -0
- package/specs/decisions/0023-tsconfig-path-alias-resolution.md +182 -0
- package/specs/decisions/0024-fact-model-architecture.md +144 -0
- package/specs/decisions/0025-contract-model-json-projection.md +105 -0
- package/specs/decisions/0026-finding-model-unifies-four-families.md +109 -0
- package/specs/decisions/0027-dependency-model-fact-shape-not-engine-access.md +98 -0
- package/specs/decisions/0028-ownership-model-shared-effective-owner.md +85 -0
- package/specs/decisions/0029-lifecycle-model-deprecation-rename-fields.md +98 -0
- package/specs/decisions/0030-change-model-wraps-manifest-change-report.md +97 -0
- package/specs/decisions/0031-evidence-entry-point.md +85 -0
- package/specs/decisions/0032-evidence-projection-provenance-mechanism.md +120 -0
- package/specs/decisions/0033-reference-projections-live-in-examples.md +81 -0
- package/specs/decisions/0034-three-tier-examples-restructuring.md +85 -0
- package/specs/decisions/0035-documentenv-metadata-generalization-and-compliance-fields.md +85 -0
- package/specs/decisions/0036-exact-source-position-evidence.md +122 -0
- package/specs/decisions/0037-developer-declared-dynamic-access-citations.md +114 -0
- package/specs/decisions/0038-always-computed-evidence-model-backs-generate-check-docs.md +244 -0
- package/specs/decisions/0039-scanner-local-dataflow-boundary.md +160 -0
- package/specs/decisions/0040-library-surfaces-do-not-acquire-node-fs.md +156 -0
- package/specs/decisions/0041-dual-package-hazard-checked-documented.md +75 -0
- package/specs/decisions/0042-init-cli-subcommand-scaffolds-only.md +95 -0
- package/specs/decisions/0043-env-cap-resolver-relocated-and-duplicated.md +71 -0
- package/specs/decisions/0044-strict-escalates-every-warning-family.md +88 -0
- package/specs/decisions/0045-promote-experimental-surfaces-to-stable.md +103 -0
- package/specs/decisions/0046-cli-restricted-to-runtime-and-evidence-output.md +177 -0
- package/specs/decisions/0047-supported-toolchain-node-22-and-typescript-5-6.md +30 -0
- package/specs/decisions/0048-eslint-plugin-does-not-vendor-typescript-eslint.md +25 -0
- package/specs/decisions/0049-typescript-7-scanner-uses-a-bundled-typescript-6.md +87 -0
- package/specs/decisions/0050-a-variable-declared-twice-is-documented-once.md +55 -0
- package/specs/generated-artifacts.md +104 -0
- package/specs/migrations/README.md +30 -0
- package/specs/migrations/from-centralized-schema.md +503 -0
- package/specs/migrations/from-dotenv.md +352 -0
- package/specs/migrations/from-envalid.md +482 -0
- package/specs/migrations/from-process-env.md +398 -0
- package/specs/migrations/from-t3-env.md +416 -0
- package/specs/migrations/from-zod.md +303 -0
- package/dist/build-H4KFV44Z.js.map +0 -1
- /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;
|
|
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;AAIjE,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,iFAAiF;IACjF,QAAQ,CAAC,qBAAqB,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IAC7D,iFAAiF;IACjF,QAAQ,CAA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AG,SAAS,CAAA;CAAE,EACzD,QAAQ,EAAE;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
|
|
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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
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":"
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
6
|
-
*
|
|
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
|
|
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":"
|
|
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
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
|
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
|
|
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("
|
|
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
|
-
*
|
|
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.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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":"
|
|
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;;
|
|
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"}
|