@intentius/chant 0.44.13 → 0.45.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/dist/audit/discover.d.ts +26 -2
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +10 -0
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/cli/build-params-cli.d.ts +16 -7
- package/dist/cli/build-params-cli.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +20 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts +9 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-docs.d.ts +13 -0
- package/dist/cli/commands/check-lexicon-docs.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-examples.d.ts +24 -14
- package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +5 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts +28 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/search.d.ts +27 -0
- package/dist/cli/handlers/search.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/codegen/docs-pages.d.ts +39 -0
- package/dist/codegen/docs-pages.d.ts.map +1 -0
- package/dist/codegen/docs-sections.d.ts.map +1 -1
- package/dist/codegen/docs-sidebar.d.ts +13 -2
- package/dist/codegen/docs-sidebar.d.ts.map +1 -1
- package/dist/codegen/docs-types.d.ts +30 -10
- package/dist/codegen/docs-types.d.ts.map +1 -1
- package/dist/codegen/docs.d.ts +14 -2
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/codegen/surface-snapshot.d.ts +27 -3
- package/dist/codegen/surface-snapshot.d.ts.map +1 -1
- package/dist/codegen/validate.d.ts +11 -3
- package/dist/codegen/validate.d.ts.map +1 -1
- package/dist/components/capability-plugin.d.ts +13 -2
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/driver.d.ts +38 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/config.d.ts +57 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/fold/fold.d.ts +100 -1
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/graph-ir.d.ts +12 -0
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ops.d.ts +17 -0
- package/dist/graph-ops.d.ts.map +1 -0
- package/dist/lifecycle/change-set.d.ts +23 -2
- package/dist/lifecycle/change-set.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts +8 -0
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/replay.d.ts.map +1 -1
- package/dist/lifecycle/snapshot.d.ts.map +1 -1
- package/dist/lifecycle/types.d.ts +7 -0
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/lint/policy.d.ts.map +1 -1
- package/dist/managed-fields.d.ts +33 -21
- package/dist/managed-fields.d.ts.map +1 -1
- package/dist/observation.d.ts +23 -1
- package/dist/observation.d.ts.map +1 -1
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/yaml.d.ts +0 -8
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__snapshots__/okf.test.ts.snap +20 -0
- package/src/audit/discover.test.ts +55 -1
- package/src/audit/discover.ts +70 -2
- package/src/audit/edge-init-safety.test.ts +149 -18
- package/src/audit/report-model.ts +12 -1
- package/src/audit/rules-doc.ts +1 -0
- package/src/build-params.test.ts +52 -0
- package/src/cli/build-params-cli.test.ts +25 -8
- package/src/cli/build-params-cli.ts +37 -23
- package/src/cli/commands/__fixtures__/audit-coverage/.github/workflows/ci.yml +5 -0
- package/src/cli/commands/__fixtures__/audit-coverage/Dockerfile +2 -0
- package/src/cli/commands/__fixtures__/audit-coverage/infra/main.tf +3 -0
- package/src/cli/commands/__fixtures__/audit-coverage/infra/stack.json +6 -0
- package/src/cli/commands/__fixtures__/audit-coverage/k8s/deploy.yaml +12 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/pages/getting-started.mdx +16 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content.config.ts +10 -2
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/generate-cli.ts +3 -1
- package/src/cli/commands/__fixtures__/init-lexicon-output/src/codegen/generate.ts +2 -1
- package/src/cli/commands/__snapshots__/init-lexicon.test.ts.snap +2 -1
- package/src/cli/commands/audit.test.ts +83 -1
- package/src/cli/commands/audit.ts +121 -28
- package/src/cli/commands/build.test.ts +144 -5
- package/src/cli/commands/build.ts +66 -14
- package/src/cli/commands/check-lexicon-docs.ts +30 -0
- package/src/cli/commands/check-lexicon-examples.test.ts +73 -7
- package/src/cli/commands/check-lexicon-examples.ts +66 -17
- package/src/cli/commands/check-lexicon.test.ts +1 -1
- package/src/cli/commands/check-lexicon.ts +19 -4
- package/src/cli/commands/init-lexicon/templates/codegen.ts +5 -2
- package/src/cli/commands/init-lexicon/templates/docs.ts +35 -2
- package/src/cli/commands/init-lexicon.test.ts +42 -1
- package/src/cli/commands/init-lexicon.ts +3 -1
- package/src/cli/commands/lexicon-rolling-upgrade.ts +1 -1
- package/src/cli/commands/lexicon-surface-diff.test.ts +1 -1
- package/src/cli/commands/lexicon-surface-diff.ts +1 -1
- package/src/cli/commands/onboard.test.ts +319 -225
- package/src/cli/commands/onboard.ts +144 -58
- package/src/cli/handlers/build.test.ts +3 -3
- package/src/cli/handlers/build.ts +2 -0
- package/src/cli/handlers/components.ts +2 -2
- package/src/cli/handlers/graph.test.ts +44 -0
- package/src/cli/handlers/graph.ts +22 -2
- package/src/cli/handlers/lifecycle.test.ts +117 -0
- package/src/cli/handlers/lifecycle.ts +16 -0
- package/src/cli/handlers/run.test.ts +5 -5
- package/src/cli/handlers/run.ts +1 -0
- package/src/cli/handlers/search-live.test.ts +217 -0
- package/src/cli/handlers/search.test.ts +41 -1
- package/src/cli/handlers/search.ts +55 -6
- package/src/cli/main.ts +5 -3
- package/src/cli/security-boundary.test.ts +2 -1
- package/src/codegen/docs-pages.test.ts +194 -0
- package/src/codegen/docs-pages.ts +138 -0
- package/src/codegen/docs-sections.ts +0 -8
- package/src/codegen/docs-sidebar.ts +50 -37
- package/src/codegen/docs-types.ts +32 -4
- package/src/codegen/docs.ts +78 -40
- package/src/codegen/lexicon-regen.ts +3 -1
- package/src/codegen/rolling-upgrade.test.ts +1 -1
- package/src/codegen/rolling-upgrade.ts +1 -1
- package/src/codegen/surface-snapshot.test.ts +139 -0
- package/src/codegen/surface-snapshot.ts +297 -122
- package/src/codegen/validate.test.ts +16 -3
- package/src/codegen/validate.ts +17 -7
- package/src/components/auto-release.ts +1 -1
- package/src/components/capability-plugin.ts +23 -2
- package/src/components/driver.test.ts +45 -0
- package/src/components/driver.ts +64 -27
- package/src/components/index.ts +2 -0
- package/src/components/starter-plugin.ts +5 -2
- package/src/config.test.ts +56 -1
- package/src/config.ts +152 -8
- package/src/discovery/fold-import.test.ts +427 -2
- package/src/discovery/fold-import.ts +163 -7
- package/src/discovery/sandbox/driver.test.ts +11 -0
- package/src/fold/fold.test.ts +41 -0
- package/src/fold/fold.ts +372 -2
- package/src/graph-ir-live.test.ts +42 -0
- package/src/graph-ir.ts +42 -2
- package/src/graph-ops.test.ts +69 -0
- package/src/graph-ops.ts +42 -0
- package/src/lifecycle/change-set.test.ts +41 -0
- package/src/lifecycle/change-set.ts +30 -2
- package/src/lifecycle/deep-observe.ts +4 -0
- package/src/lifecycle/observe.ts +29 -2
- package/src/lifecycle/replay.ts +3 -0
- package/src/lifecycle/snapshot.ts +3 -0
- package/src/lifecycle/types.ts +7 -0
- package/src/lint/policy.ts +14 -3
- package/src/managed-fields.test.ts +15 -42
- package/src/managed-fields.ts +43 -26
- package/src/observation.test.ts +24 -8
- package/src/observation.ts +48 -4
- package/src/op/builders-exports.test.ts +60 -0
- package/src/op/index.ts +1 -1
- package/src/ownership.test.ts +63 -1
- package/src/yaml.test.ts +15 -0
- package/src/yaml.ts +19 -2
|
@@ -12,6 +12,12 @@ export interface DocsConfig {
|
|
|
12
12
|
distDir: string;
|
|
13
13
|
/** Output directory for generated .mdx files */
|
|
14
14
|
outDir: string;
|
|
15
|
+
/**
|
|
16
|
+
* The lexicon's package.json, read for the version rendered into the docs
|
|
17
|
+
* (chant #1377). Defaults to `<distDir>/../package.json`. The manifest's
|
|
18
|
+
* version is only a fallback; it goes stale between bundles.
|
|
19
|
+
*/
|
|
20
|
+
packageJsonPath?: string;
|
|
15
21
|
/** Lexicon-specific overview content (markdown) */
|
|
16
22
|
overview?: string;
|
|
17
23
|
/** Output format description (e.g. "CloudFormation JSON template") */
|
|
@@ -23,14 +29,6 @@ export interface DocsConfig {
|
|
|
23
29
|
title: string;
|
|
24
30
|
content: string;
|
|
25
31
|
}>;
|
|
26
|
-
/** Standalone pages added to the sidebar after Overview */
|
|
27
|
-
extraPages?: Array<{
|
|
28
|
-
slug: string;
|
|
29
|
-
title: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
content: string;
|
|
32
|
-
sidebar?: boolean;
|
|
33
|
-
}>;
|
|
34
32
|
/** Slugs of auto-generated pages to suppress (e.g. "pseudo-parameters") */
|
|
35
33
|
suppressPages?: string[];
|
|
36
34
|
/** Source directory for scanning rule files (defaults to srcDir sibling of distDir) */
|
|
@@ -39,11 +37,33 @@ export interface DocsConfig {
|
|
|
39
37
|
basePath?: string;
|
|
40
38
|
/** Root directory for resolving {{file:...}} markers in extra page content */
|
|
41
39
|
examplesDir?: string;
|
|
42
|
-
/**
|
|
43
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Directory of authored `.mdx` pages, each tagged with a Diátaxis quadrant
|
|
42
|
+
* (chant #1733). Defaults to `<outDir>/pages`. See docs-pages.ts. This is
|
|
43
|
+
* the only way a lexicon adds prose pages; `extraPages` (prose in docs.ts
|
|
44
|
+
* template literals) and `sidebarExtra` (hand-listed content files) were
|
|
45
|
+
* removed in chant #1757.
|
|
46
|
+
*/
|
|
47
|
+
pagesDir?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Diátaxis quadrant (https://diataxis.fr). */
|
|
50
|
+
export type Quadrant = "tutorial" | "how-to" | "reference" | "explanation";
|
|
51
|
+
/** One sidebar entry, as the quadrant-grouped sidebar builder sees it. */
|
|
52
|
+
export interface SidebarPage {
|
|
53
|
+
slug: string;
|
|
54
|
+
label: string;
|
|
55
|
+
quadrant: Quadrant;
|
|
56
|
+
/** Nested subgroup label inside the quadrant. */
|
|
57
|
+
group?: string;
|
|
58
|
+
/** Lower sorts first within its group; unordered pages follow, by label. */
|
|
59
|
+
order?: number;
|
|
60
|
+
/** Keep out of the sidebar. */
|
|
61
|
+
hidden?: boolean;
|
|
44
62
|
}
|
|
45
63
|
export interface DocsResult {
|
|
46
64
|
pages: Map<string, string>;
|
|
65
|
+
/** Every page the sidebar should list, authored and generated, by quadrant. */
|
|
66
|
+
sidebarPages: SidebarPage[];
|
|
47
67
|
stats: {
|
|
48
68
|
resources: number;
|
|
49
69
|
properties: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-types.d.ts","sourceRoot":"","sources":["../../src/codegen/docs-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,iDAAiD;IACjD,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D,
|
|
1
|
+
{"version":3,"file":"docs-types.d.ts","sourceRoot":"","sources":["../../src/codegen/docs-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,iDAAiD;IACjD,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,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ACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,0KAA0K;QAC1K,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC,CAAC;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B"}
|
package/dist/codegen/docs.d.ts
CHANGED
|
@@ -6,9 +6,21 @@
|
|
|
6
6
|
* pages. Individual lexicons supply callbacks for provider-specific formatting
|
|
7
7
|
* (service grouping, resource type URLs, custom overview content).
|
|
8
8
|
*/
|
|
9
|
-
import type { DocsConfig, DocsResult } from "./docs-types.js";
|
|
9
|
+
import type { DocsConfig, DocsResult, ManifestJSON } from "./docs-types.js";
|
|
10
10
|
export { expandFileMarkers } from "./docs-file-markers.js";
|
|
11
|
-
export type { DocsConfig, DocsResult } from "./docs-types.js";
|
|
11
|
+
export type { DocsConfig, DocsResult, Quadrant, SidebarPage } from "./docs-types.js";
|
|
12
|
+
export { QUADRANTS, QUADRANT_LABELS, readAuthoredPages } from "./docs-pages.js";
|
|
13
|
+
/**
|
|
14
|
+
* The version rendered into the docs (chant #1377).
|
|
15
|
+
*
|
|
16
|
+
* `dist/manifest.json` is written by `npm run bundle`, which runs only under
|
|
17
|
+
* `prepack`, so its `version` is whatever was last bundled on this machine
|
|
18
|
+
* and can trail `package.json` by several releases. `package.json` is the
|
|
19
|
+
* source of truth and is never stale, so it wins whenever it is present.
|
|
20
|
+
* The manifest's own version is the fallback for a dist with no package
|
|
21
|
+
* beside it (test fixtures, relocated dist directories).
|
|
22
|
+
*/
|
|
23
|
+
export declare function lexiconVersion(config: DocsConfig, manifest: ManifestJSON): string;
|
|
12
24
|
/**
|
|
13
25
|
* Run the documentation pipeline with the supplied config.
|
|
14
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAC;AAGjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI7E;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAOjF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAuI3D;AAyBD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAIf;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAUtF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACtC,MAAM,EAAE,CAQV;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQvE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA2I1E"}
|
|
@@ -62,8 +62,8 @@ export interface RemovedEntry {
|
|
|
62
62
|
name: string;
|
|
63
63
|
entry: SurfaceEntry;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
/** Structural differences between two versions of one entry. */
|
|
66
|
+
export interface EntryChanges {
|
|
67
67
|
/** New resourceType (breaking). */
|
|
68
68
|
resourceTypeChanged?: {
|
|
69
69
|
before: string;
|
|
@@ -97,14 +97,38 @@ export interface ChangedEntry {
|
|
|
97
97
|
after?: boolean;
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
+
export interface ChangedEntry extends EntryChanges {
|
|
101
|
+
name: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* An entry whose TS export name changed while its kind and resourceType
|
|
105
|
+
* stayed the same (#1460). Paired from one removal and one addition.
|
|
106
|
+
*/
|
|
107
|
+
export interface RenamedEntry {
|
|
108
|
+
/** TS export name in the baseline. */
|
|
109
|
+
from: string;
|
|
110
|
+
/** TS export name in the fresh surface. */
|
|
111
|
+
to: string;
|
|
112
|
+
/** The entry as it now appears. */
|
|
113
|
+
entry: SurfaceEntry;
|
|
114
|
+
/** Structural differences between the two, when any. */
|
|
115
|
+
changes?: EntryChanges;
|
|
116
|
+
}
|
|
100
117
|
export interface SurfaceDelta {
|
|
101
118
|
added: AddedEntry[];
|
|
102
119
|
changed: ChangedEntry[];
|
|
103
120
|
removed: RemovedEntry[];
|
|
121
|
+
/**
|
|
122
|
+
* Removals and additions paired by kind + resourceType. A rename still
|
|
123
|
+
* breaks the old import, so it counts as breaking; it is reported apart
|
|
124
|
+
* from removals so a reader can tell the two kinds of break apart.
|
|
125
|
+
*/
|
|
126
|
+
renamed: RenamedEntry[];
|
|
104
127
|
/**
|
|
105
128
|
* Rolled-up severity. "none" means no surface changes at all.
|
|
106
129
|
* "additive" means only new resources / new optional props / new attrs.
|
|
107
|
-
* "breaking" means any removal or change that could break
|
|
130
|
+
* "breaking" means any removal, rename, or change that could break
|
|
131
|
+
* existing consumers.
|
|
108
132
|
*/
|
|
109
133
|
severity: ChangeSeverity;
|
|
110
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-snapshot.d.ts","sourceRoot":"","sources":["../../src/codegen/surface-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC;IACjB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACvC;AAID,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,
|
|
1
|
+
{"version":3,"file":"surface-snapshot.d.ts","sourceRoot":"","sources":["../../src/codegen/surface-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC;IACjB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACvC;AAID,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;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CAAC;IACX,mCAAmC;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB;;;;OAIG;IACH,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAcD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CA4CrF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAiGtE;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,GAAG,YAAY,CAyE3F;AAwMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAEnE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAE3D;AAID;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAyCvD"}
|
|
@@ -54,10 +54,18 @@ export interface LexiconValidationConfig {
|
|
|
54
54
|
* What must never happen is *publishing* a surface nobody reviewed. That is
|
|
55
55
|
* a release-time property, so it is checked at release time.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* `"always"` drops the env half (#1475). It is for a lexicon whose upstream
|
|
58
|
+
* is pinned to an immutable ref — k8s generates from a kubernetes release
|
|
59
|
+
* tag plus vendored CRDs, azure from a commit sha of the
|
|
60
|
+
* resource-manager-schemas repo — so a fresh `generate` on a PR is
|
|
61
|
+
* deterministic and the only way the surface can move is a change in this
|
|
62
|
+
* repo. For those, drift on a PR is exactly the thing to fail on: the CRD
|
|
63
|
+
* batches #1319/#1320/#1321 left the k8s baseline 393 entries behind, and
|
|
64
|
+
* the #1144 pin left azure 483 behind, because nothing compared the two
|
|
65
|
+
* until a release was attempted. Never use `"always"` for a lexicon that
|
|
66
|
+
* fetches a moving upstream.
|
|
59
67
|
*/
|
|
60
|
-
checkSurfaceSnapshot?: boolean;
|
|
68
|
+
checkSurfaceSnapshot?: boolean | "always";
|
|
61
69
|
/** Environment to read {@link RELEASE_GATE_ENV} from. Defaults to `process.env`; overridden in tests. */
|
|
62
70
|
env?: NodeJS.ProcessEnv;
|
|
63
71
|
/** Path to the generated directory (defaults to basePath/src/generated) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/codegen/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGvF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/codegen/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGvF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,yGAAyG;IACzG,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CAuJvG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAWlE"}
|
|
@@ -39,7 +39,7 @@ import type { Capability } from "./capability.js";
|
|
|
39
39
|
export interface CapabilityManifest {
|
|
40
40
|
/** Package/plugin name (e.g. "aws", "gcp"), not a capability `kind`. */
|
|
41
41
|
name: string;
|
|
42
|
-
/**
|
|
42
|
+
/** The plugin package's version (semver), read from its `package.json`. */
|
|
43
43
|
version: string;
|
|
44
44
|
/** Minimum/compatible chant core version, checked the same way as `LexiconManifest.chantVersion` (see ../lexicon-manifest.ts's `checkVersionCompatibility`). */
|
|
45
45
|
chantVersion?: string;
|
|
@@ -61,7 +61,13 @@ export interface CapabilityManifest {
|
|
|
61
61
|
export interface CapabilityPlugin {
|
|
62
62
|
/** Human-readable plugin/package name (e.g. "aws", "gcp"), not a capability `kind`. */
|
|
63
63
|
readonly name: string;
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* The plugin package's version (semver), read from its `package.json`
|
|
66
|
+
* (chant #1505). Mirrors `LexiconManifest.version`. Informational — nothing
|
|
67
|
+
* gates on it. The built-in plugins expose it as a lazy getter over
|
|
68
|
+
* `ownPackageVersion`, so the read happens on first access and never at
|
|
69
|
+
* module scope.
|
|
70
|
+
*/
|
|
65
71
|
readonly version: string;
|
|
66
72
|
/** Return every `Capability` this plugin contributes, keyed for registration by its own `kind`. */
|
|
67
73
|
capabilities(): Array<Capability<never, unknown>>;
|
|
@@ -96,6 +102,11 @@ export declare function isCapabilityPlugin(value: unknown): value is CapabilityP
|
|
|
96
102
|
*
|
|
97
103
|
* Returns `"0.0.0"` when no versioned `package.json` is found — a visible
|
|
98
104
|
* sentinel rather than a guess; nothing gates on the field.
|
|
105
|
+
*
|
|
106
|
+
* Call it lazily (from a `get version()` accessor, as the built-in plugins
|
|
107
|
+
* do), not at module scope: the read touches the filesystem, and a plugin
|
|
108
|
+
* module must stay importable where `fs` is absent (workerd, chant #1081).
|
|
109
|
+
* The result is cached per module URL, so the walk happens once.
|
|
99
110
|
*/
|
|
100
111
|
export declare function ownPackageVersion(moduleUrl: string): string;
|
|
101
112
|
//# sourceMappingURL=capability-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-plugin.d.ts","sourceRoot":"","sources":["../../src/components/capability-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"capability-plugin.d.ts","sourceRoot":"","sources":["../../src/components/capability-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,gKAAgK;IAChK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yIAAyI;IACzI,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAE/B,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,mGAAmG;IACnG,YAAY,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAGlD,qIAAqI;IACrI,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B,gLAAgL;IAChL,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;IAE/C,2FAA2F;IAC3F,IAAI,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAa5E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM3D"}
|
|
@@ -194,6 +194,44 @@ export declare function resolveStepInput(input: Record<string, unknown>, phaseOu
|
|
|
194
194
|
* map onto the `step` event's `running`/`ok`/`failed` shape.
|
|
195
195
|
*/
|
|
196
196
|
export declare function runComponentDeploy(component: DriverComponent, ctx: DeployContext, registry: CapabilityRegistry, componentOutputs: Record<string, Record<string, unknown>>, onProgress?: (event: RunProgressEvent) => void): Promise<DriverComponentResult>;
|
|
197
|
+
/**
|
|
198
|
+
* Collect the cross-component outputs one finished component exposes to its
|
|
199
|
+
* downstream consumers, from every phase output it produced:
|
|
200
|
+
*
|
|
201
|
+
* - publish-family outputs (publish-image / publish-artifact /
|
|
202
|
+
* load-image-on-host all return at least one of uri/digest/key — see
|
|
203
|
+
* ./verbs/publish.ts) are namespaced under `publish`, so downstream
|
|
204
|
+
* `@<name>.publish.*` references resolve;
|
|
205
|
+
* - stack outputs from an apply step (cfn-deploy returns
|
|
206
|
+
* `CfnDeployOutput.outputs`) are merged at the top level, peer to
|
|
207
|
+
* `publish`, so `resolveWiring`'s stackOutput branch —
|
|
208
|
+
* `resolvePath(componentOutputs[stack], name)` — finds each output by
|
|
209
|
+
* name (the cross-stack apply-order integration deferred in #556, closed
|
|
210
|
+
* in #699). The entry is keyed by the component's own name, which by
|
|
211
|
+
* convention is the stack name a `stackOutput` reference targets (see the
|
|
212
|
+
* pilots and composition-and-wiring.mdx).
|
|
213
|
+
*
|
|
214
|
+
* Both halves are generic by output *shape*, not by capability `kind`, keeping
|
|
215
|
+
* the driver free of per-capability branching. Returns `undefined` when the
|
|
216
|
+
* component exposed nothing.
|
|
217
|
+
*
|
|
218
|
+
* Exported, like `resolveStepInput`, so the durable Temporal path
|
|
219
|
+
* (lexicons/temporal/src/component-op/activities.ts) accumulates outputs via
|
|
220
|
+
* this exact function rather than re-deriving it (#700). The resolver and the
|
|
221
|
+
* accumulator are the two halves of one contract; sharing only the resolver
|
|
222
|
+
* is how the cross-stack gap #699 closed locally could reopen durably.
|
|
223
|
+
*/
|
|
224
|
+
export declare function collectComponentOutputs(phaseOutputs: Record<string, Record<string, unknown>>): Record<string, unknown> | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* Record a finished component's outputs (`collectComponentOutputs`) into the
|
|
227
|
+
* shared `componentOutputs` map under the component's own name, merging over
|
|
228
|
+
* any seeded entry (`--seed-outputs`, or a durable parent workflow's
|
|
229
|
+
* thread-through). Mutates and returns `componentOutputs`, so a Temporal
|
|
230
|
+
* activity can hand the updated map back to its workflow over the JSON
|
|
231
|
+
* boundary — every value in it is plain activity-result data, so the map is
|
|
232
|
+
* serializable by construction. A no-op when the component exposed nothing.
|
|
233
|
+
*/
|
|
234
|
+
export declare function accumulateComponentOutputs(componentOutputs: Record<string, Record<string, unknown>>, componentName: string, phaseOutputs: Record<string, Record<string, unknown>>): Record<string, Record<string, unknown>>;
|
|
197
235
|
export interface InterpretRunOptions {
|
|
198
236
|
/** Target environment name, threaded into every capability's `DeployContext`. */
|
|
199
237
|
env: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/components/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,oGAAoG;AACpG,MAAM,MAAM,WAAW,GACnB,MAAM,GACN;IAAE,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KA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AAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACpD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAMzC;AA4CD,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,iIAAiI;IACjI,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,qKAAqK;IACrK,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CA2C1B"}
|
|
@@ -16,7 +16,7 @@ export { loadCapabilityPlugin, loadCapabilityPlugins, registerCapabilityPlugins,
|
|
|
16
16
|
export { starterCapabilityPlugin } from "./starter-plugin.js";
|
|
17
17
|
export * from "./verbs/index.js";
|
|
18
18
|
export * from "./builders.js";
|
|
19
|
-
export { type DriverStep, type DriverGate, type DriverPhase, type DriverComponent, type DriverStepRecord, type DriverComponentResult, type DriverRunResult, type ComponentGraph, type InterpretRunOptions, type WiringValue, resolveComponentGraph, resolveWiring, resolveStepInput, runComponentDeploy, runInterpretDriver, DriverGateUnsupportedError, DependencyCycleError, UnknownDependencyError, DriverRunFailure, } from "./driver.js";
|
|
19
|
+
export { type DriverStep, type DriverGate, type DriverPhase, type DriverComponent, type DriverStepRecord, type DriverComponentResult, type DriverRunResult, type ComponentGraph, type InterpretRunOptions, type WiringValue, resolveComponentGraph, resolveWiring, resolveStepInput, collectComponentOutputs, accumulateComponentOutputs, runComponentDeploy, runInterpretDriver, DriverGateUnsupportedError, DependencyCycleError, UnknownDependencyError, DriverRunFailure, } from "./driver.js";
|
|
20
20
|
export { EcsFargateComponent, type EcsFargateComponentConfig, LambdaComponent, type LambdaComponentConfig, SingleHostComposeComponent, type SingleHostComposeComponentConfig, } from "./presets/index.js";
|
|
21
21
|
export { type ComponentTemporalCodegen, type ComponentTemporalCodegenOptions, loadComponentTemporalCodegen, } from "./temporal-codegen-loader.js";
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,EACL,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK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8BAA8B,EACnC,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,eAAe,EACf,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,KAAK,gCAAgC,GACtC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter-plugin.d.ts","sourceRoot":"","sources":["../../src/components/starter-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE/E;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAaxB,CAAC;AA2BX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"starter-plugin.d.ts","sourceRoot":"","sources":["../../src/components/starter-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE/E;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAaxB,CAAC;AA2BX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAUrC,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type SbomFormat } from "./components/verbs/sbom-generator.js";
|
|
|
5
5
|
import type { Severity } from "./components/verbs/vuln-scan.js";
|
|
6
6
|
import type { VulnPolicy } from "./components/verbs/vuln-gate.js";
|
|
7
7
|
import type { BuildParamsConfig } from "./build-params.js";
|
|
8
|
+
import type { BuildParamProvenance } from "./provenance.js";
|
|
8
9
|
/**
|
|
9
10
|
* One project-declared environment (chant #1166). Historically always a bare
|
|
10
11
|
* name (`"floci"`); an entry can now instead carry the endpoint that
|
|
@@ -19,6 +20,13 @@ export type EnvironmentDeclaration = string | {
|
|
|
19
20
|
name: string;
|
|
20
21
|
endpoint?: string;
|
|
21
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* `ownership.env`: a literal environment identity, or a reference to a
|
|
25
|
+
* declared build parameter whose resolved value becomes the identity (#1396).
|
|
26
|
+
*/
|
|
27
|
+
export type OwnershipEnv = string | {
|
|
28
|
+
param: string;
|
|
29
|
+
};
|
|
22
30
|
/** The declared name of one `environments` entry, whichever form it takes. */
|
|
23
31
|
export declare function environmentName(entry: EnvironmentDeclaration): string;
|
|
24
32
|
/**
|
|
@@ -48,7 +56,9 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
48
56
|
lint: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
57
|
ownership: z.ZodOptional<z.ZodObject<{
|
|
50
58
|
stack: z.ZodOptional<z.ZodString>;
|
|
51
|
-
env: z.ZodOptional<z.ZodString
|
|
59
|
+
env: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
60
|
+
param: z.ZodString;
|
|
61
|
+
}, z.core.$strip>]>>;
|
|
52
62
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
53
63
|
}, z.core.$strip>>;
|
|
54
64
|
build: z.ZodOptional<z.ZodObject<{
|
|
@@ -186,8 +196,17 @@ export interface ChantConfig {
|
|
|
186
196
|
ownership?: {
|
|
187
197
|
/** Stack identity stamped onto resources (required to enable stamping). */
|
|
188
198
|
stack?: string;
|
|
189
|
-
/**
|
|
190
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Optional environment identity. Either a literal, or a reference to one
|
|
201
|
+
* of this project's declared `buildParams` (`{ param: "env" }`), in which
|
|
202
|
+
* case the marker takes whatever value that parameter resolves to for the
|
|
203
|
+
* build — the same value `params.env` reads in source (#1396). A
|
|
204
|
+
* reference is the only way to make the marker follow `--param env=prod`:
|
|
205
|
+
* the config is evaluated before build parameters exist, so a literal
|
|
206
|
+
* computed from `process.env` here and a parameter mapped to the same
|
|
207
|
+
* variable are two sources of truth that nothing keeps in step.
|
|
208
|
+
*/
|
|
209
|
+
env?: OwnershipEnv;
|
|
191
210
|
/** Set false to disable stamping even when `stack` is present. */
|
|
192
211
|
enabled?: boolean;
|
|
193
212
|
};
|
|
@@ -374,11 +393,44 @@ export declare function loadChantConfig(dir: string): Promise<ResolvedConfig>;
|
|
|
374
393
|
* config declaring any project-level key still wins where it stands.
|
|
375
394
|
*/
|
|
376
395
|
export declare function loadChantConfigUpward(startDir: string): Promise<ResolvedConfig>;
|
|
396
|
+
/** Whether an `ownership.env` entry is a build-parameter reference rather than a literal. */
|
|
397
|
+
export declare function isOwnershipParamRef(env: OwnershipEnv | undefined): env is {
|
|
398
|
+
param: string;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* The ownership stack identity alone — `ownership.stack` when marking is on
|
|
402
|
+
* (no `stack`, or `enabled: false`, means off). For callers that need the
|
|
403
|
+
* stack and nothing else (a field manager, a prune selector) and so have no
|
|
404
|
+
* build parameters to resolve `env` against.
|
|
405
|
+
*/
|
|
406
|
+
export declare function resolveOwnershipStack(config: ChantConfig): string | undefined;
|
|
407
|
+
/**
|
|
408
|
+
* Resolve the `env` half of the ownership marker (#1396). A literal is
|
|
409
|
+
* returned as-is. A `{ param }` reference is looked up in this build's resolved
|
|
410
|
+
* build parameters and must find one: a reference to a parameter that was
|
|
411
|
+
* never declared, or that resolved to no value, throws rather than quietly
|
|
412
|
+
* stamping a marker without an env — an env-less marker is exactly what lets
|
|
413
|
+
* a prod deployment go unseen by `--owned` filtering scoped to prod.
|
|
414
|
+
*/
|
|
415
|
+
export declare function resolveOwnershipEnv(config: ChantConfig, buildParams: readonly BuildParamProvenance[] | undefined): string | undefined;
|
|
377
416
|
/**
|
|
378
417
|
* Resolve the ownership marker to stamp from project config, or undefined when
|
|
379
|
-
* ownership marking is off (no `stack`, or `enabled: false`).
|
|
418
|
+
* ownership marking is off (no `stack`, or `enabled: false`). `buildParams` is
|
|
419
|
+
* this build's resolved parameters (`resolveBuildParams`'s provenance), which
|
|
420
|
+
* an `ownership.env: { param }` reference resolves against — see {@link
|
|
421
|
+
* resolveOwnershipEnv}; it throws when the reference cannot be satisfied.
|
|
422
|
+
*/
|
|
423
|
+
export declare function resolveOwnershipMarker(config: ChantConfig, buildParams?: readonly BuildParamProvenance[]): OwnershipMarker | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* The divergence #1396 is about, made loud when it cannot be removed: a
|
|
426
|
+
* project whose `ownership.env` is a literal while it also declares a build
|
|
427
|
+
* parameter named `env` has two answers to "which environment is this", and
|
|
428
|
+
* the manifest carries both (the ownership marker from config, the labels
|
|
429
|
+
* from the parameter). Returns a warning naming both values when they differ;
|
|
430
|
+
* undefined when there is nothing to say (no literal, no `env` parameter, or
|
|
431
|
+
* the two agree). The fix is the `{ param: "env" }` reference.
|
|
380
432
|
*/
|
|
381
|
-
export declare function
|
|
433
|
+
export declare function ownershipEnvDisagreement(config: ChantConfig, buildParams: readonly BuildParamProvenance[] | undefined): string | undefined;
|
|
382
434
|
/**
|
|
383
435
|
* Whether auto-emitting a release-ledger record after a successful `chant
|
|
384
436
|
* run --components` deploy should be skipped (#597). Opt-out, not opt-in:
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzD;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAAE,IAAI,E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AMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,uBAAuB,CAanF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAiB1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fold-import.d.ts","sourceRoot":"","sources":["../../src/discovery/fold-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAkC,KAAK,iBAAiB,EAAyB,MAAM,cAAc,CAAC;AAgC7G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,mGAAmG;AACnG,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC,CAAC;AAElF,MAAM,MAAM,cAAc,GACtB;IACE,EAAE,EAAE,IAAI,CAAC;IACT;;;;;;;;OAQG;IACH,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB;;;;;;;;;;;;;OAaG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;;;;;;;;OAYG;IACH,WAAW,EAA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AAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF;AA+KD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,EAAE,CAAC,aAAa,GAAG,EAAE,CAAC,kBAAkB,GAAG,MAAM,GAAG,SAAS,CA0D3G;AAqgDD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,SAAS,YAAY,EAAO,EACxC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,cAAc,CAAC,CAEzB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,GACrD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CA8EtB"}
|
package/dist/fold/fold.d.ts
CHANGED
|
@@ -42,7 +42,15 @@ import { type SubsetRuleId } from "./subset.js";
|
|
|
42
42
|
* #1044) → {@link FoldedIntrinsicCall}, the same `{__intrinsic}` family
|
|
43
43
|
* the tagged-template form already reduces to.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
45
|
+
* chant #1373 adds a third, the only one that evaluates rather than
|
|
46
|
+
* enveloping: a call to a PROJECT-LOCAL function — declared in this file or
|
|
47
|
+
* imported from a sibling project file — whose body is itself inside the
|
|
48
|
+
* fold subset. ../discovery/fold-import.ts hands such a function in through
|
|
49
|
+
* `externals` as a {@link FoldableFunction}, and {@link callFoldableFunction}
|
|
50
|
+
* folds its body against the defining module's scope with the folded
|
|
51
|
+
* arguments bound. Still nothing is imported or run.
|
|
52
|
+
*
|
|
53
|
+
* Everything else — a package's function, a method call, an array `.map`, a
|
|
46
54
|
* registered name shadowed by a local binding — still throws.
|
|
47
55
|
*
|
|
48
56
|
* Cross-file identifier resolution (chant #1020): `consts` alone is always
|
|
@@ -249,6 +257,97 @@ export declare class FoldError extends Error {
|
|
|
249
257
|
readonly ruleId: SubsetRuleId;
|
|
250
258
|
constructor(message: string, line: number, column: number, ruleId?: SubsetRuleId);
|
|
251
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* A project-local function `fold()` can CALL — chant #1373.
|
|
262
|
+
*
|
|
263
|
+
* Produced by ../discovery/fold-import.ts for every top-level function a
|
|
264
|
+
* project file declares (`export function f(...) {...}`, `export const f =
|
|
265
|
+
* (...) => ...`, and their non-exported siblings) and placed in the folding
|
|
266
|
+
* file's `externals` under the function's name, so a call through a bare
|
|
267
|
+
* identifier bound to one evaluates STATICALLY: the arguments fold in the
|
|
268
|
+
* caller's scope, the parameters are bound, and the body folds in the
|
|
269
|
+
* DEFINING module's scope (`consts`/`externals` here are that module's, not
|
|
270
|
+
* the caller's). Nothing is imported and nothing runs — this is the same
|
|
271
|
+
* "evaluate the source instead of the module" move #1023 makes for a
|
|
272
|
+
* composite factory body, applied to a plain function.
|
|
273
|
+
*
|
|
274
|
+
* Why this exists: the advice every chant project gets is to read build
|
|
275
|
+
* parameters through a small helper (`optionalAccountId(params.accountId)`)
|
|
276
|
+
* so defaulting and validation live in one place. Before #1373 a call to
|
|
277
|
+
* that helper was "a function call as a value" and unfoldable, and because
|
|
278
|
+
* fallback is per file and taint propagates along imports, ONE helper call
|
|
279
|
+
* at the top of a parameter file demoted every stack that imported it.
|
|
280
|
+
*
|
|
281
|
+
* The value is a marker, never a real function: a folded file's export
|
|
282
|
+
* namespace may carry one (an importer's `buildExternals` picks it up by
|
|
283
|
+
* name), and `fold()` refuses it anywhere a VALUE is expected — a function
|
|
284
|
+
* object cannot be serialized, and the run path's export namespace holds the
|
|
285
|
+
* real function the collector ignores, so ignoring the marker matches.
|
|
286
|
+
*
|
|
287
|
+
* Not a `FoldedValue`: it never appears inside a folded tree.
|
|
288
|
+
*/
|
|
289
|
+
export declare class FoldableFunction {
|
|
290
|
+
/** The binding name, for diagnostics. */
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly fn: ts.FunctionDeclaration | ts.ArrowFunction | ts.FunctionExpression;
|
|
293
|
+
/** Absolute path of the defining module, for diagnostics. */
|
|
294
|
+
readonly file: string;
|
|
295
|
+
/**
|
|
296
|
+
* The defining module's top-level `const` initializers, with every
|
|
297
|
+
* `new`-bound one already REMOVED — a body that mentions one reads the
|
|
298
|
+
* live instance out of `externals` instead (the same object the module's
|
|
299
|
+
* own fold registered), never a by-name `{__attrRef}` that would name an
|
|
300
|
+
* entity of the wrong file once revived in the caller.
|
|
301
|
+
*/
|
|
302
|
+
readonly consts: Map<string, ts.Expression>;
|
|
303
|
+
/** The defining module's resolved imports, its own pre-built resources, and its own sibling functions. Read live, never copied, so a function declared before a const it reads still sees that const's value. */
|
|
304
|
+
readonly externals: ReadonlyMap<string, unknown>;
|
|
305
|
+
/** Why an import of the defining module did NOT resolve, by local name — enriches an "unresolved identifier" inside the body. */
|
|
306
|
+
readonly failures?: ReadonlyMap<string, string> | undefined;
|
|
307
|
+
constructor(
|
|
308
|
+
/** The binding name, for diagnostics. */
|
|
309
|
+
name: string, fn: ts.FunctionDeclaration | ts.ArrowFunction | ts.FunctionExpression,
|
|
310
|
+
/** Absolute path of the defining module, for diagnostics. */
|
|
311
|
+
file: string,
|
|
312
|
+
/**
|
|
313
|
+
* The defining module's top-level `const` initializers, with every
|
|
314
|
+
* `new`-bound one already REMOVED — a body that mentions one reads the
|
|
315
|
+
* live instance out of `externals` instead (the same object the module's
|
|
316
|
+
* own fold registered), never a by-name `{__attrRef}` that would name an
|
|
317
|
+
* entity of the wrong file once revived in the caller.
|
|
318
|
+
*/
|
|
319
|
+
consts: Map<string, ts.Expression>,
|
|
320
|
+
/** The defining module's resolved imports, its own pre-built resources, and its own sibling functions. Read live, never copied, so a function declared before a const it reads still sees that const's value. */
|
|
321
|
+
externals: ReadonlyMap<string, unknown>,
|
|
322
|
+
/** Why an import of the defining module did NOT resolve, by local name — enriches an "unresolved identifier" inside the body. */
|
|
323
|
+
failures?: ReadonlyMap<string, string> | undefined);
|
|
324
|
+
/**
|
|
325
|
+
* Set once a call to this function has RETURNED a live object (a value
|
|
326
|
+
* with a prototype — a pre-built resource instance of the defining module,
|
|
327
|
+
* say) into a caller. The caller then shares that object's identity with
|
|
328
|
+
* the defining module exactly as an imported resource binding would, and
|
|
329
|
+
* fold-import.ts records the same `liveSources` edge for it so the two
|
|
330
|
+
* files fold or run together. A function that returns only plain data never
|
|
331
|
+
* sets this, which is what keeps a parameter helper from tainting anything.
|
|
332
|
+
*/
|
|
333
|
+
leakedIdentity: boolean;
|
|
334
|
+
}
|
|
335
|
+
export declare function isFoldableFunction(value: unknown): value is FoldableFunction;
|
|
336
|
+
/**
|
|
337
|
+
* The SHAPE half of what makes a project-local function foldable (chant
|
|
338
|
+
* #1373) — a reason string, or `undefined` when the function is admissible.
|
|
339
|
+
* Deliberately the same statement-level contract #1023 gives a composite
|
|
340
|
+
* factory body: parameters bound plainly (an identifier, optionally
|
|
341
|
+
* defaulted, or a flat object pattern), and a body that is either a single
|
|
342
|
+
* expression or `const` declarations followed by one `return`. Every
|
|
343
|
+
* expression inside is then folded by {@link fold} itself, so the expression
|
|
344
|
+
* subset is defined exactly once — with the additions {@link fold} refuses
|
|
345
|
+
* INSIDE a function body (a `new`, a tagged template, a registered helper or
|
|
346
|
+
* intrinsic call), because each of those reduces to an envelope revived
|
|
347
|
+
* against the CALLER's imports, which are not the scope the body was written
|
|
348
|
+
* in.
|
|
349
|
+
*/
|
|
350
|
+
export declare function findFunctionSubsetViolation(fn: ts.FunctionDeclaration | ts.ArrowFunction | ts.FunctionExpression): string | undefined;
|
|
252
351
|
/**
|
|
253
352
|
* Resolve a node's 1-based line/column via its owning `SourceFile`. Exported
|
|
254
353
|
* (chant #1020) so fold-import.ts can build its own located `FoldError`s
|