@intentius/chant 0.44.7 → 0.44.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqDlD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyH/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,CA2K3E;AA+jBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8J3E;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"}
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqDlD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyH/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,CA2K3E;AA+jBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiK3E;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.44.7",
3
+ "version": "0.44.9",
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",
@@ -677,6 +677,33 @@ describe("runLifecyclePlan", () => {
677
677
  expect(stdoutBuf.join("\n")).toContain("bucket");
678
678
  });
679
679
 
680
+ // #1620 — the resolved read address rides plan entries the same way it rides
681
+ // the live diff. Regression: the plan path dropped the observation's queried
682
+ // map, so only unobserved rows ever carried an address while the docs
683
+ // promised it per-entry.
684
+ test("--json carries the observation's queried address on observed entries", async () => {
685
+ buildMock.mockResolvedValue(makeBuildResult({ k8s: ["web"] }));
686
+ const plugins: LexiconPlugin[] = [
687
+ createMockPlugin({
688
+ name: "k8s",
689
+ describeResources: async () => ({
690
+ observation: "v1" as const,
691
+ resources: { web: meta({ type: "K8s::Apps::Deployment" }) },
692
+ queried: { web: "/apis/apps/v1/namespaces/default/deployments/web" },
693
+ }),
694
+ }),
695
+ ];
696
+ const exit = await runLifecyclePlan({
697
+ args: makeArgs({ path: "plan", extraPositional: "prod", json: true }),
698
+ plugins,
699
+ serializers: plugins.map((p) => p.serializer),
700
+ });
701
+ expect(exit).toBe(0);
702
+ const plan = JSON.parse(stdoutBuf.join("\n"));
703
+ const web = plan.entries.find((e: { name: string }) => e.name === "web");
704
+ expect(web.queried).toBe("/apis/apps/v1/namespaces/default/deployments/web");
705
+ });
706
+
680
707
  // #1166 — plan is always a live read (no `--live` flag of its own), so a
681
708
  // declared environment endpoint applies here exactly as it does for
682
709
  // `chant graph --live` / `chant lifecycle diff --live`.
@@ -1178,6 +1178,9 @@ export async function runLifecyclePlan(ctx: CommandContext): Promise<number> {
1178
1178
  observedNow: observed.resources,
1179
1179
  observedThen,
1180
1180
  unobserved: observed.unobserved,
1181
+ // The resolved read address rides every entry, not just unobserved
1182
+ // ones — the diff path already passes it (#1620); plan lost it.
1183
+ queried: observed.queried,
1181
1184
  });
1182
1185
  merged.entries.push(...cs.entries);
1183
1186
  checked++;