@intentius/chant 0.41.0 → 0.41.2

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 (37) hide show
  1. package/dist/cli/build-params-cli.d.ts +24 -0
  2. package/dist/cli/build-params-cli.d.ts.map +1 -1
  3. package/dist/cli/handlers/components.d.ts.map +1 -1
  4. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  5. package/dist/components/capability-plugin.d.ts +16 -0
  6. package/dist/components/capability-plugin.d.ts.map +1 -1
  7. package/dist/components/cli-support.d.ts +5 -0
  8. package/dist/components/cli-support.d.ts.map +1 -1
  9. package/dist/components/deploy-units.d.ts +49 -0
  10. package/dist/components/deploy-units.d.ts.map +1 -0
  11. package/dist/components/starter-plugin.d.ts +1 -1
  12. package/dist/components/starter-plugin.d.ts.map +1 -1
  13. package/dist/config.d.ts +10 -0
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/graph-detail.d.ts +16 -0
  16. package/dist/graph-detail.d.ts.map +1 -1
  17. package/dist/kubectl-context.d.ts +22 -14
  18. package/dist/kubectl-context.d.ts.map +1 -1
  19. package/package.json +1 -1
  20. package/src/cli/build-params-cli.ts +35 -0
  21. package/src/cli/handlers/components.ts +29 -23
  22. package/src/cli/handlers/graph.test.ts +51 -1
  23. package/src/cli/handlers/graph.ts +40 -5
  24. package/src/cli/handlers/lifecycle.ts +18 -3
  25. package/src/components/capability-plugin.test.ts +21 -0
  26. package/src/components/capability-plugin.ts +33 -0
  27. package/src/components/cli-support.test.ts +17 -0
  28. package/src/components/cli-support.ts +11 -1
  29. package/src/components/deploy-units.test.ts +42 -0
  30. package/src/components/deploy-units.ts +82 -0
  31. package/src/components/starter-plugin.ts +4 -2
  32. package/src/config.test.ts +53 -0
  33. package/src/config.ts +41 -3
  34. package/src/graph-detail.test.ts +37 -1
  35. package/src/graph-detail.ts +28 -0
  36. package/src/kubectl-context.test.ts +16 -24
  37. package/src/kubectl-context.ts +22 -19
@@ -52,4 +52,28 @@ export interface CliBuildParamsResolution {
52
52
  * the same way #1022's fold decisions are.
53
53
  */
54
54
  export declare function resolveCliBuildParams(buildParamsConfig: BuildParamsConfig | undefined, args: CliBuildParamsArgs): CliBuildParamsResolution;
55
+ /**
56
+ * Resolve a command's declared build-time parameters, the same way `chant
57
+ * build` does, so a `build()`/`discover()` on the declared side sees the values
58
+ * the source will actually read.
59
+ *
60
+ * Every command that reads declared source needs this and only `chant build`
61
+ * had it. `chant graph` was fixed in #1483; the lifecycle family — `diff`,
62
+ * `snapshot`, `plan`, and `components status --live` — built the declared side
63
+ * on parameter *defaults* while the live side was whatever is really deployed.
64
+ *
65
+ * For a project whose parameters choose which resources *exist* that is not a
66
+ * near miss. `chant lifecycle diff dev --live` on kubemicrovm-ops returned
67
+ * byte-identical output at `KMV_TIER=minimal` and `KMV_TIER=prod-ha`, and
68
+ * reported the tier label itself as drift — `minimal → prod-ha`, declared
69
+ * against live — which is the comparison announcing it is against the wrong
70
+ * declaration.
71
+ *
72
+ * Returns `undefined` when resolution failed, having printed why: the caller
73
+ * should stop rather than compare against source that will not build.
74
+ */
75
+ export declare function commandBuildParams(buildParamsConfig: BuildParamsConfig | undefined, args: {
76
+ param?: string[];
77
+ paramsFile?: string;
78
+ }): Promise<BuildParamProvenance[] | undefined>;
55
79
  //# sourceMappingURL=build-params-cli.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-params-cli.d.ts","sourceRoot":"","sources":["../../src/cli/build-params-cli.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAG1D;;;;;;;;;;;;;;;GAeG;AAEH,4SAA4S;AAC5S,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAQtF;AAED,qOA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gB,qBAAqB,CACnC,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,EAChD,IAAI,EAAE,kBAAkB,GACvB,wBAAwB,CAkC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,kBAAkB,CACtC,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,EAChD,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C,OAAO,CAAC,oBAAoB,EAAE,GAAG,SAAS,CAAC,CAU7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ErF;AA4DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAiBzD;AAqDD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAqR9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAGnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB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E;AAkBD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+C/E"}
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqDlD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwH/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2J3E;AAoiBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0J3E;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1E;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+C/E"}
@@ -82,4 +82,20 @@ export interface CapabilityPlugin {
82
82
  * descriptive error rather than registered half-working.
83
83
  */
84
84
  export declare function isCapabilityPlugin(value: unknown): value is CapabilityPlugin;
85
+ /**
86
+ * The calling module's own package version, read from the nearest
87
+ * `package.json` above it (chant #1505).
88
+ *
89
+ * `CapabilityPlugin.version` documents itself as the plugin package's semver,
90
+ * but chant's packages release in lockstep, so a hardcoded literal goes stale
91
+ * on every `just release` — the aws plugin shipped `"1.0.0"` from the day it
92
+ * was extracted from the starter set (#681), and the k8s plugin's authoring-
93
+ * time `"0.41.0"` was stale one release later. Walking up from the module's
94
+ * own URL survives both the `src/` (development condition) and `dist/`
95
+ * layouts, and an npm install, without any build-time stamping.
96
+ *
97
+ * Returns `"0.0.0"` when no versioned `package.json` is found — a visible
98
+ * sentinel rather than a guess; nothing gates on the field.
99
+ */
100
+ export declare function ownPackageVersion(moduleUrl: string): string;
85
101
  //# 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;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,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,0EAA0E;IAC1E,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,M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AO,GAAG,KAAK,IAAI,gBAAgB,CAa5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAa3D"}
@@ -72,6 +72,11 @@ export interface ComponentGraphResult {
72
72
  * so a renderer can deep-link a component node to source (`chant graph
73
73
  * --components --format ir` sets `sourceLoc` from this). */
74
74
  files?: Record<string, string>;
75
+ /** Component name → the live resource names it owns (#1491): the declared
76
+ * `liveNames`, or `[name]` when undeclared — the identity-join fallback the
77
+ * `Component` contract already specifies. This is what lets a consumer join
78
+ * the component DAG to the resource graph without guessing at kinds. */
79
+ liveNames?: Record<string, string[]>;
75
80
  error?: string;
76
81
  }
77
82
  /** Compute the components' dependency graph under `path`, for `chant graph --components`. */
@@ -1 +1 @@
1
- {"version":3,"file":"cli-support.d.ts","sourceRoot":"","sources":["../../src/components/cli-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAQL,KAAK,eAAe,EAEpB,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9D,yDAAyD;AACzD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;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mB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gIAAgI;IAChI,eAAe,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wSAAwS;IACxS,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,0KAA0K;AAC1K,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,OAAO;AACjB,4RAA4R;AAC5R,WAAW,CAAC,EAAE,oBAAoB,EAAE,GACnC,OAAO,CAAC,wBAAwB,CAAC,CAsBnC;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAuG9B"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Deploy units — which live unit(s) a component's composition targets (#1495).
3
+ *
4
+ * `chant components status --live` (and `chant graph --live`) need to know
5
+ * what a component deployed in order to observe it. That answer used to be a
6
+ * string literal in the walk — `kind === "cfn-deploy"` — which made the whole
7
+ * chain CloudFormation-shaped: a component whose deploy phase is a server-side
8
+ * apply or a Helm upgrade contributed nothing and was skipped, not
9
+ * "unobserved", simply absent from the result.
10
+ *
11
+ * This module is the seam that fixes the walk (piece 1 of #1495's
12
+ * decomposition): a registry mapping a deploy-family step `kind` to the field
13
+ * naming its unit and the lexicon whose `describeStackStatus` can observe it.
14
+ * The registry is data, not a rule about what steps look like — a kind not
15
+ * listed here contributes no unit, exactly as before.
16
+ */
17
+ import type { Phase } from "./component.js";
18
+ /** A deploy-family step kind that names a live unit, and who observes it. */
19
+ export interface DeployUnitRule {
20
+ /** The step `kind` (the capability's registered name). */
21
+ kind: string;
22
+ /** The step field carrying the unit's name (`stack`, `release`). */
23
+ field: string;
24
+ /** The lexicon whose `describeStackStatus` reads this kind of unit. */
25
+ lexicon: string;
26
+ }
27
+ /**
28
+ * The deploy-family kinds that name a unit. cfn-deploy's unit is its stack;
29
+ * kubectl-apply's is the ownership stack its labels carry (#1495 piece 2);
30
+ * helm-upgrade's is its release (#1495 piece 4). Listing a kind here is safe
31
+ * before its lexicon implements `describeStackStatus` — units whose lexicon
32
+ * has no observer are skipped by the caller, the same absent-observer path as
33
+ * before.
34
+ */
35
+ export declare const DEPLOY_UNIT_RULES: readonly DeployUnitRule[];
36
+ /** One resolved unit a component's deploy composition targets. */
37
+ export interface DeployUnit {
38
+ /** The unit's name — a stack, a release. */
39
+ unit: string;
40
+ /** The lexicon that observes this kind of unit. */
41
+ lexicon: string;
42
+ }
43
+ /**
44
+ * Every distinct deploy unit a component's phases target, in declaration
45
+ * order. A step may itself be a nested `Phase`, so the walk recurses; a
46
+ * resolved component carries the unit as a concrete string. Pure.
47
+ */
48
+ export declare function deployUnits(deploy: Phase[]): DeployUnit[];
49
+ //# sourceMappingURL=deploy-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy-units.d.ts","sourceRoot":"","sources":["../../src/components/deploy-units.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAItD,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CA0BzD"}
@@ -25,7 +25,7 @@
25
25
  * from verb modules, so neither needed to change for this migration —
26
26
  * the compatibility guarantee #559 asks for.
27
27
  */
28
- import type { CapabilityPlugin } from "./capability-plugin.js";
28
+ import { type CapabilityPlugin } from "./capability-plugin.js";
29
29
  /**
30
30
  * Every `kind` in the starter verb set, grouped by family, per epic #551 and
31
31
  * docs/components/capabilities.mdx. Source of truth (moved here from
@@ -1 +1 @@
1
- {"version":3,"file":"starter-plugin.d.ts","sourceRoot":"","sources":["../../src/components/starter-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAaxB,CAAC;AA2BX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAKrC,CAAC"}
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,gBAOrC,CAAC"}
package/dist/config.d.ts CHANGED
@@ -350,6 +350,16 @@ export declare function loadChantConfig(dir: string): Promise<ResolvedConfig>;
350
350
  * same walk `chant lint`/`chant graph` already used ({@link findProjectConfig},
351
351
  * shared with `./lint/config.ts`'s `findProjectRoot`) — one config-discovery
352
352
  * contract for the whole CLI.
353
+ *
354
+ * chant #1502 — a lint-scoping fragment does not end the walk. The convention
355
+ * of a `src/chant.config.json` holding only `extends`/`rules` (cc-aws-canonical
356
+ * and most of examples/) sits BETWEEN the build directory and the real
357
+ * `chant.config.ts`, and stopping there re-introduced the exact silent
358
+ * fallback this walk exists to prevent: `chant build src` resolved the
359
+ * fragment, found no `ownership`, and built unstamped manifests that every
360
+ * owned-scoped live read then withheld. A fragment is skipped, not merged —
361
+ * lint resolution keeps its own nearest-wins walk untouched, and a JSON
362
+ * config declaring any project-level key still wins where it stands.
353
363
  */
354
364
  export declare function loadChantConfigUpward(startDir: string): Promise<ResolvedConfig>;
355
365
  /**
@@ -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;AAIxD;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAA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AE,OAAO,CAAC;QAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,uBAAuB,CAanF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAW1E"}
@@ -18,4 +18,20 @@ export declare const DETAIL: {
18
18
  };
19
19
  /** Apply a detail tier to the base (declarable-level) IR. */
20
20
  export declare function applyDetail(ir: GraphIR, level: DetailLevel): GraphIR;
21
+ /**
22
+ * chant #1489 — the message to print when `--detail 3` changed nothing.
23
+ *
24
+ * T3's only addition over T2 is the producer attribute on `$ref`-derived
25
+ * edges. A graph whose resources link by name or label convention instead of
26
+ * attribute references (the k8s lexicon end to end) has nothing to annotate,
27
+ * so levels 2 and 3 come out byte-identical — which reads as a broken dial
28
+ * from any consumer stepping through the levels (behold#131 was filed over
29
+ * exactly this). Accepting a value that changes nothing without saying so is
30
+ * the bug; this names it.
31
+ *
32
+ * Returns the warning text, or undefined when detail 3 did add something.
33
+ * Callers print it through their own sink; the compare is over the two IRs
34
+ * the caller already holds, so this stays a pure function.
35
+ */
36
+ export declare function detailInertNotice(base: GraphIR, detailed: GraphIR): string | undefined;
21
37
  //# sourceMappingURL=graph-detail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAEX,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAYpE"}
1
+ {"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAEX,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAYpE;AA+HD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWtF"}
@@ -30,11 +30,13 @@ export interface K8sConfigShape {
30
30
  profiles?: Record<string, K8sClusterProfile>;
31
31
  }
32
32
  /**
33
- * Thrown when an environment declares a cluster binding but the ambient
34
- * kubectl context disagrees with it. Refusing here instead of silently
35
- * observing whichever cluster is ambient — is the fix for #1100: a
36
- * wrong-cluster read reports every declared resource as missing, which #1089
37
- * then classifies as a confident (and wrong) list of `create` actions.
33
+ * Historically thrown when an environment declared a cluster binding but the
34
+ * ambient kubectl context disagreed with it (#1100/#1155). As of #1488 the
35
+ * resolver no longer polices ambient at all a declared binding is USED, not
36
+ * checked so {@link resolveClusterTarget} never throws this anymore. The
37
+ * class stays exported because the k8s lexicon's read/write paths still catch
38
+ * it (converting a refusal into NOT-OBSERVED), and a custom connector may
39
+ * still throw it to get that classification.
38
40
  */
39
41
  export declare class ClusterBindingMismatchError extends Error {
40
42
  readonly environment: string;
@@ -57,8 +59,11 @@ export interface ResolvedClusterTarget {
57
59
  * `kubectl config current-context`; the k8s lexicon's typed API client
58
60
  * (chant #1074) supplies one that reads the parsed kubeconfig instead, so a
59
61
  * client that never needs the `kubectl` binary does not acquire a dependency
60
- * on it just to check the binding. Both answer the same question, so the
61
- * refusal semantics below are identical either way.
62
+ * on it just to check the binding.
63
+ *
64
+ * As of #1488 the resolver itself no longer reads ambient (a declared binding
65
+ * is used directly), so this hook only matters to callers that surface the
66
+ * ambient context in their own messages.
62
67
  */
63
68
  export type AmbientContextReader = () => Promise<string | undefined>;
64
69
  /** Options for {@link resolveClusterTarget}. */
@@ -79,13 +84,16 @@ export interface ResolveClusterTargetOptions {
79
84
  * - No binding declared: returns `{ source: "ambient" }` — unchanged
80
85
  * behavior — but logs a visible warning identifying the caller and
81
86
  * environment, so the fallback is never silent (#1100 acceptance).
82
- * - Binding declared and the ambient context agrees (or ambient can't be
83
- * determined): returns `{ context: bound, source: "bound" }`. Callers
84
- * should pass this context explicitly on every kubectl invocation rather
85
- * than relying on it also being ambient.
86
- * - Binding declared and the ambient context disagrees: throws
87
- * {@link ClusterBindingMismatchError} a loud refusal instead of quietly
88
- * reading the wrong cluster.
87
+ * - Binding declared: returns `{ context: bound, source: "bound" }`,
88
+ * regardless of what is ambient (#1488). The declared binding is the
89
+ * selection, not a check: callers pass this context explicitly on every
90
+ * read and write, so whichever cluster `kubectl` happens to be pointed at
91
+ * is irrelevant. Any k3d cluster another project creates mid-session used
92
+ * to steal the ambient context and turn a healthy estate grey with
93
+ * `read-failed` as the only explanation; now it cannot. A bound context
94
+ * that is absent from the kubeconfig fails downstream in the typed client
95
+ * with an error naming the context and the `k8s.profiles.<env>.context`
96
+ * binding — never by falling back to ambient.
89
97
  */
90
98
  export declare function resolveClusterTarget(config: Record<string, unknown>, environment: string, lexiconName: string, options?: ResolveClusterTargetOptions): Promise<ResolvedClusterTarget>;
91
99
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"kubectl-context.d.ts","sourceRoot":"","sources":["../src/kubectl-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAItD,wFAAwF;AACxF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AAC5B,kFAAkF;AAChF;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE;AACpB,4DAA4D;GAC1D;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBrE;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,CAuCvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.41.0",
3
+ "version": "0.41.2",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -105,3 +105,38 @@ export function resolveCliBuildParams(
105
105
 
106
106
  return { success: true, provenance: resolution.provenance, errors: [] };
107
107
  }
108
+
109
+ /**
110
+ * Resolve a command's declared build-time parameters, the same way `chant
111
+ * build` does, so a `build()`/`discover()` on the declared side sees the values
112
+ * the source will actually read.
113
+ *
114
+ * Every command that reads declared source needs this and only `chant build`
115
+ * had it. `chant graph` was fixed in #1483; the lifecycle family — `diff`,
116
+ * `snapshot`, `plan`, and `components status --live` — built the declared side
117
+ * on parameter *defaults* while the live side was whatever is really deployed.
118
+ *
119
+ * For a project whose parameters choose which resources *exist* that is not a
120
+ * near miss. `chant lifecycle diff dev --live` on kubemicrovm-ops returned
121
+ * byte-identical output at `KMV_TIER=minimal` and `KMV_TIER=prod-ha`, and
122
+ * reported the tier label itself as drift — `minimal → prod-ha`, declared
123
+ * against live — which is the comparison announcing it is against the wrong
124
+ * declaration.
125
+ *
126
+ * Returns `undefined` when resolution failed, having printed why: the caller
127
+ * should stop rather than compare against source that will not build.
128
+ */
129
+ export async function commandBuildParams(
130
+ buildParamsConfig: BuildParamsConfig | undefined,
131
+ args: { param?: string[]; paramsFile?: string },
132
+ ): Promise<BuildParamProvenance[] | undefined> {
133
+ const resolution = resolveCliBuildParams(buildParamsConfig, {
134
+ cli: parseParamFlags(args.param),
135
+ paramsFile: args.paramsFile,
136
+ });
137
+ if (!resolution.success) {
138
+ for (const message of resolution.errors) console.error(message);
139
+ return undefined;
140
+ }
141
+ return resolution.provenance;
142
+ }
@@ -35,6 +35,7 @@ import {
35
35
  InvalidReleaseRecordError,
36
36
  } from "../../lifecycle/release-ledger";
37
37
  import { reconcileStatus, liveEvidenceFromChangeSet, compareAcrossEnvironments, mergeLiveEvidence, type LiveComponentEvidence } from "../../lifecycle/status";
38
+ import { commandBuildParams } from "../build-params-cli";
38
39
  import { buildChangeSet } from "../../lifecycle/change-set";
39
40
  import { buildLedgerEntries, componentBomSummary, type BuildLedgerEntry } from "../../lifecycle/build-ledger";
40
41
  import { findBuildManifestByArtifactDigest } from "../../lifecycle/build-ledger-store";
@@ -48,6 +49,7 @@ import type { CommandContext } from "../registry";
48
49
  import type { LexiconPlugin } from "../../lexicon";
49
50
  import { normalizeObservation, mergeObservations, unobservedAll, type NormalizedObservation } from "../../observation";
50
51
  import type { Phase, Component } from "../../components/component";
52
+ import { deployUnits } from "../../components/deploy-units";
51
53
 
52
54
  /**
53
55
  * chant components release <env> --component <name> --digest <sha256:...>
@@ -228,22 +230,11 @@ interface StatusJsonRow {
228
230
  * observe on a multi-stack, per-component project (`describeResources`'s
229
231
  * single-stack-named-after-the-environment convention never matches one). */
230
232
  export function cfnDeployStacks(deploy: Phase[]): string[] {
231
- const stacks = new Set<string>();
232
- const walkSteps = (steps: Phase["steps"]): void => {
233
- for (const step of steps) {
234
- // A step may itself be a nested Phase (it carries its own `steps`). Step is
235
- // open-typed (capability inputs), so discriminate structurally on `steps`.
236
- const nested = (step as { steps?: unknown }).steps;
237
- if (Array.isArray(nested)) {
238
- walkSteps(nested as Phase["steps"]);
239
- continue;
240
- }
241
- const s = step as { kind?: string; stack?: unknown };
242
- if (s.kind === "cfn-deploy" && typeof s.stack === "string") stacks.add(s.stack);
243
- }
244
- };
245
- for (const phase of deploy) walkSteps(phase.steps);
246
- return [...stacks];
233
+ // The CloudFormation slice of the generic deploy-unit walk (#1495) — kept
234
+ // because `chant graph --live`'s stack enrichment is genuinely CFN-shaped.
235
+ return deployUnits(deploy)
236
+ .filter((u) => u.lexicon === "aws")
237
+ .map((u) => u.unit);
247
238
  }
248
239
 
249
240
  /**
@@ -258,15 +249,22 @@ export function cfnDeployStacks(deploy: Phase[]): string[] {
258
249
  */
259
250
  async function observeComponentStacks(
260
251
  components: Map<string, { component: Component }>,
261
- observer: LexiconPlugin,
252
+ plugins: LexiconPlugin[],
262
253
  environment: string,
263
254
  ): Promise<Map<string, LiveComponentEvidence>> {
255
+ // Observer per unit's own lexicon (#1495): a component's kubectl-apply unit
256
+ // is read by the k8s lexicon, its cfn-deploy stack by aws. A unit whose
257
+ // lexicon ships no describeStackStatus is skipped — the same absent-observer
258
+ // degradation as before, per unit instead of per project.
259
+ const observerFor = (lexicon: string) =>
260
+ plugins.find((p) => p.name === lexicon && p.describeStackStatus);
264
261
  const evidence = new Map<string, LiveComponentEvidence>();
265
262
  for (const [name, { component }] of components) {
266
- const stacks = cfnDeployStacks(component.deploy);
263
+ const units = deployUnits(component.deploy).filter((u) => observerFor(u.lexicon));
264
+ const stacks = units.map((u) => u.unit);
267
265
  if (stacks.length === 0) continue;
268
266
  const observed = await Promise.all(
269
- stacks.map((stack) => observer.describeStackStatus!({ environment, stack }).catch(() => null)),
267
+ units.map((u) => observerFor(u.lexicon)!.describeStackStatus!({ environment, stack: u.unit }).catch(() => null)),
270
268
  );
271
269
  const determinate = observed.filter((o): o is NonNullable<typeof o> => o !== null);
272
270
  if (determinate.length === 0) {
@@ -355,7 +353,15 @@ export async function runComponentsStatus(ctx: CommandContext): Promise<number>
355
353
  if (endpointResult.notice) console.error(formatWarning({ message: endpointResult.notice }));
356
354
  try {
357
355
  const targetSerializers = serializers;
358
- const buildResult = await build(resolve(args.src ?? config.sourceDir ?? "."), targetSerializers);
356
+ // With this invocation's parameters (#1483). Built on defaults, the
357
+ // declared half of the comparison is a different estate from the one
358
+ // deployed, and every resource the real parameter declares reads as
359
+ // absent.
360
+ const statusParams = await commandBuildParams(config.buildParams, args);
361
+ if (!statusParams) return 1;
362
+ const buildResult = await build(resolve(args.src ?? config.sourceDir ?? "."), targetSerializers, undefined, {
363
+ buildParams: statusParams,
364
+ });
359
365
  // Which deployed stack(s) to read the change set from (behold#100).
360
366
  //
361
367
  // `describeResources` defaults to the single-stack convention — the
@@ -431,9 +437,9 @@ export async function runComponentsStatus(ctx: CommandContext): Promise<number>
431
437
  // invisible to the entity-keyed, single-stack `describeResources` above —
432
438
  // observe each component's own cfn-deploy stack directly and overlay it as
433
439
  // the authoritative presence signal (#57).
434
- const stackObserver = plugins.find((p) => p.describeStackStatus);
435
- if (stackObserver) {
436
- const stackEvidence = await observeComponentStacks(discovery.components, stackObserver, environment);
440
+ const anyObserver = plugins.some((p) => p.describeStackStatus);
441
+ if (anyObserver) {
442
+ const stackEvidence = await observeComponentStacks(discovery.components, plugins, environment);
437
443
  liveEvidence = mergeLiveEvidence(liveEvidence, stackEvidence);
438
444
  }
439
445
  } finally {
@@ -85,8 +85,15 @@ vi.mock("../../config", async () => {
85
85
  loadChantConfigUpward: (...a: unknown[]) => loadChantConfigUpwardMock(...a),
86
86
  };
87
87
  });
88
+ const buildMock = vi.fn();
88
89
  vi.mock("../../build", () => ({
89
- build: () => Promise.resolve({ errors: [] }),
90
+ // Forwards its arguments so a test can assert what the live path passed —
91
+ // `buildParams` in particular (#1483), the same reason `discover` above
92
+ // forwards for #1359.
93
+ build: (...a: unknown[]) => {
94
+ buildMock(...a);
95
+ return Promise.resolve({ errors: [] });
96
+ },
90
97
  partitionByLexicon: () => ({}),
91
98
  computeStackGraph: () => ({}),
92
99
  }));
@@ -136,6 +143,7 @@ describe("runGraph", () => {
136
143
  // Default: no components — the single-stack --live path most tests exercise.
137
144
  discoverComponentsMock.mockResolvedValue({ components: new Map(), sourceFiles: [], errors: [] });
138
145
  observeMock.mockReset();
146
+ buildMock.mockReset();
139
147
  loadPluginsMock.mockReset();
140
148
  resolveLexMock.mockReset();
141
149
  loadChantConfigMock.mockReset();
@@ -480,6 +488,48 @@ describe("runGraph", () => {
480
488
  });
481
489
 
482
490
  describe("live graph (--live)", () => {
491
+ // #1483 — the live path builds the source to learn which entities to
492
+ // observe, and did so on default parameters while the declared overlay
493
+ // resolved the caller's. For a project whose parameters choose *which
494
+ // resources exist* — a tier, a size, a profile — that observed one estate
495
+ // and compared it against another, so every resource the real parameter
496
+ // declares read as absent and every resource the default declares read as
497
+ // pending. A confidently wrong overlay, not an empty one.
498
+ describe("build-time parameters reach the observed build (#1483)", () => {
499
+ const liveWithTier = async (param?: string[]) => {
500
+ loadChantConfigUpwardMock.mockResolvedValue({
501
+ config: { buildParams: { tier: { type: "string", enum: ["light", "prod"], default: "light" } } },
502
+ });
503
+ resolveLexMock.mockResolvedValue(["aws"]);
504
+ loadPluginsMock.mockResolvedValue([
505
+ { name: "aws", serializer: {}, emulator: awsEmulatorStub, describeResources: () => Promise.resolve({}) },
506
+ ]);
507
+ observeMock.mockResolvedValue({ observations: [], errors: [], warnings: [] });
508
+ return runGraph({
509
+ args: makeArgs({ format: "ir", live: true, env: "prod", ...(param ? { param } : {}) }),
510
+ plugins: [],
511
+ serializers: [],
512
+ });
513
+ };
514
+
515
+ const paramsOf = (call: unknown[]) =>
516
+ (call[3] as { buildParams?: Array<{ name: string; value: unknown }> } | undefined)?.buildParams;
517
+
518
+ test("--param reaches the build the observation is scoped from", async () => {
519
+ expect(await liveWithTier(["tier=prod"])).toBe(0);
520
+ expect(paramsOf(buildMock.mock.calls[0]!)).toContainEqual(
521
+ expect.objectContaining({ name: "tier", value: "prod" }),
522
+ );
523
+ });
524
+
525
+ test("a declared default reaches it too, rather than nothing at all", async () => {
526
+ expect(await liveWithTier()).toBe(0);
527
+ expect(paramsOf(buildMock.mock.calls[0]!)).toContainEqual(
528
+ expect.objectContaining({ name: "tier", value: "light" }),
529
+ );
530
+ });
531
+ });
532
+
483
533
  // Regression: `graph` is not `requiresPlugins`, so `ctx.plugins` is empty. The
484
534
  // live path must load the project's plugins itself — otherwise it wrongly
485
535
  // reports "No lexicons implement describeResources" and observes nothing.
@@ -9,7 +9,7 @@ import { observeResources } from "../../lifecycle/observe";
9
9
  import { replaySnapshots, hasSnapshot } from "../../lifecycle/replay";
10
10
  import { loadChantConfig, environmentNames, loadChantConfigUpward, type ChantConfig } from "../../config";
11
11
  import { applyLiveEndpoint } from "../../live-endpoint";
12
- import { applyDetail, type DetailLevel } from "../../graph-detail";
12
+ import { applyDetail, detailInertNotice, type DetailLevel } from "../../graph-detail";
13
13
  import { applyLens, parseLens } from "../../graph-lens";
14
14
  import { toMermaid } from "../../graph-mermaid";
15
15
  import { toDot } from "../../graph-dot";
@@ -144,7 +144,22 @@ async function runGraphLive(
144
144
 
145
145
  // Build to get each lexicon's entity names + output (the scope
146
146
  // describeResources needs), mirroring `chant lifecycle snapshot`.
147
- const buildResult = await build(resolve(args.src ?? config.sourceDir ?? "."), plugins.map((p) => p.serializer));
147
+ //
148
+ // With the same build params the source graph resolves (#1483). Without
149
+ // them this build ran on defaults while the declared overlay below ran on
150
+ // the caller's, so a project whose parameters choose *which resources
151
+ // exist* — a tier, a size, a profile — observed one estate and compared it
152
+ // against another. Every resource the real parameter declares read as
153
+ // absent and every resource the default declares read as pending, which is
154
+ // a confidently wrong overlay rather than an empty one.
155
+ const liveBuildParams = await graphBuildParams(ctx, projectPath);
156
+ if (!liveBuildParams) return 1;
157
+ const buildResult = await build(
158
+ resolve(args.src ?? config.sourceDir ?? "."),
159
+ plugins.map((p) => p.serializer),
160
+ undefined,
161
+ { buildParams: liveBuildParams },
162
+ );
148
163
  if (buildResult.errors.length > 0) {
149
164
  console.error(formatError({ message: "Build failed — fix errors before graphing live state" }));
150
165
  return 1;
@@ -328,7 +343,16 @@ async function runGraphLive(
328
343
  return 1;
329
344
  }
330
345
  }
331
- ir = applyDetail(ir, (args.detail ?? 2) as DetailLevel);
346
+ {
347
+ const base = ir;
348
+ ir = applyDetail(ir, (args.detail ?? 2) as DetailLevel);
349
+ // #1489 — a --detail 3 that changed nothing says so instead of silently
350
+ // emitting the same bytes as --detail 2.
351
+ if (args.detail === 3) {
352
+ const notice = detailInertNotice(base, ir);
353
+ if (notice) console.error(formatWarning({ message: notice }));
354
+ }
355
+ }
332
356
 
333
357
  // Containment grouping (#779) → boundary boxes. Built after lens/detail and
334
358
  // filtered to surviving nodes, so a lens can't leave dangling group refs.
@@ -437,7 +461,10 @@ async function runComponentGraphView(
437
461
  id: name,
438
462
  kind: "Component",
439
463
  lexicon: "chant",
440
- attrs: { wave: waveOf.get(name) ?? null },
464
+ // `liveNames` (#1491): the resources this component owns — declared, or
465
+ // the contract's `[name]` identity fallback — so a consumer can join
466
+ // the component DAG to the resource graph instead of guessing at kinds.
467
+ attrs: { wave: waveOf.get(name) ?? null, liveNames: graph.liveNames?.[name] ?? [name] },
441
468
  // Deep-link the node to its `*.component.ts` (behold's inspect panel).
442
469
  ...(graph.files?.[name] ? { sourceLoc: { file: graph.files[name] } } : {}),
443
470
  })),
@@ -543,7 +570,15 @@ async function runGraphView(
543
570
  return 1;
544
571
  }
545
572
  }
546
- ir = applyDetail(ir, level as DetailLevel);
573
+ {
574
+ const base = ir;
575
+ ir = applyDetail(ir, level as DetailLevel);
576
+ // #1489 — same say-so as the live path: an inert --detail 3 names itself.
577
+ if (level === 3) {
578
+ const notice = detailInertNotice(base, ir);
579
+ if (notice) console.error(formatWarning({ message: notice }));
580
+ }
581
+ }
547
582
  return emitIr(ir, ctx, format);
548
583
  }
549
584