@intentius/chant 0.41.17 → 0.41.19
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":"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,
|
|
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,CAwK3E;AAgjBD;;;;;;;;;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"}
|
package/package.json
CHANGED
|
@@ -398,6 +398,40 @@ describe("runLifecycleDiff --live", () => {
|
|
|
398
398
|
expect(seen?.attributes?.chart).toBe("web-1.2.3");
|
|
399
399
|
});
|
|
400
400
|
|
|
401
|
+
test("--live lists artifacts for a configured lexicon with NO built entities — the deploy-step estate shape", async () => {
|
|
402
|
+
// kubemicrovm-ops: helm is a configured lexicon whose releases exist only
|
|
403
|
+
// as component helm-upgrade steps, so the built manifest carries no helm
|
|
404
|
+
// key at all. Keying the walk on the manifest alone silently dropped the
|
|
405
|
+
// artifact axis — four live releases, observedArtifacts absent.
|
|
406
|
+
buildMock.mockResolvedValue(makeBuildResult({ aws: ["bucket"] }));
|
|
407
|
+
fetchLifecycleMock.mockResolvedValue(undefined);
|
|
408
|
+
readSnapshotMock.mockResolvedValue(null);
|
|
409
|
+
|
|
410
|
+
const plugins: LexiconPlugin[] = [
|
|
411
|
+
createMockPlugin({ name: "aws" }),
|
|
412
|
+
createMockPlugin({
|
|
413
|
+
name: "helm",
|
|
414
|
+
listArtifacts: staticListArtifacts({
|
|
415
|
+
"release/cert-manager/cert-manager": { type: "Helm::Release", physicalId: "cert-manager/cert-manager", status: "deployed" },
|
|
416
|
+
}),
|
|
417
|
+
}),
|
|
418
|
+
];
|
|
419
|
+
|
|
420
|
+
const ctx = {
|
|
421
|
+
args: makeArgs({ command: "state", path: "diff", extraPositional: "prod", live: true, json: true }),
|
|
422
|
+
plugins,
|
|
423
|
+
serializers: plugins.map((p) => p.serializer),
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const exit = await runLifecycleDiff(ctx);
|
|
427
|
+
|
|
428
|
+
expect(exit).toBe(0);
|
|
429
|
+
const payload = JSON.parse(stdoutBuf.join("\n")) as {
|
|
430
|
+
lexicons: Record<string, { observedArtifacts?: Record<string, { status?: string }> }>;
|
|
431
|
+
};
|
|
432
|
+
expect(payload.lexicons.helm?.observedArtifacts?.["release/cert-manager/cert-manager"]?.status).toBe("deployed");
|
|
433
|
+
});
|
|
434
|
+
|
|
401
435
|
test("legacy digest mode still works without --live", async () => {
|
|
402
436
|
buildMock.mockResolvedValue(makeBuildResult({ aws: ["bucket"] }));
|
|
403
437
|
fetchLifecycleMock.mockResolvedValue(undefined);
|
|
@@ -372,9 +372,22 @@ export async function runLifecycleDiff(ctx: CommandContext): Promise<number> {
|
|
|
372
372
|
continue;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
// The lexicons the diff walks. Keyed on the BUILT manifest — which is
|
|
376
|
+
// right for the resource axis (a lexicon with no declared entities has
|
|
377
|
+
// nothing to diff) but drops the artifact axis whole: artifacts are
|
|
378
|
+
// context-keyed with no declared side at all (that is their defining
|
|
379
|
+
// property), so an estate that uses helm purely as component deploy
|
|
380
|
+
// steps builds zero helm entities and its releases were never listed —
|
|
381
|
+
// `observedArtifacts` silently absent for exactly the estates behold#146
|
|
382
|
+
// exists for (found live on kubemicrovm-ops, four releases invisible).
|
|
383
|
+
// On the live path, artifact-capable configured lexicons join the walk;
|
|
384
|
+
// their resource half stays gated on `describeResources` + declared
|
|
385
|
+
// entities as before.
|
|
386
|
+
const builtLexicons = Array.from(buildResult.manifest.lexicons);
|
|
387
|
+
const artifactLexicons = args.live ? plugins.filter((p) => p.listArtifacts).map((p) => p.name) : [];
|
|
375
388
|
const lexicons = lexiconFilter
|
|
376
389
|
? [lexiconFilter]
|
|
377
|
-
:
|
|
390
|
+
: [...new Set([...builtLexicons, ...artifactLexicons])];
|
|
378
391
|
|
|
379
392
|
if (args.live) {
|
|
380
393
|
// Multi-stack component projects: observe each component's own cfn stack
|