@intentius/chant-lexicon-helm 0.41.15 → 0.41.17
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/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "4795ae6492987795afb538d5f6c76842cef76bd36ce90d6aa19303077d896875",
|
|
5
5
|
"meta.json": "14243c5730a07c6a6edc35ddd351438547d58df5cf345f2233a355b0c7611ccc",
|
|
6
6
|
"types/index.d.ts": "5377696ca8698cd2999e4680feb8e8e4b54a7b49fb603a87b2f27356114d1794",
|
|
7
7
|
"rules/chart-metadata.ts": "8f3377e893d5e2828460b7fe5924fca098334245a9a2fdb90f6b67e490eaf091",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"skills/chant-helm-patterns.md": "9e79e6a46391da46709d8aa57e2825a7cd9eb981cd923f02ad60836c49b2561e",
|
|
35
35
|
"skills/chant-helm-security.md": "bfc367eabceed2e84f1cf94501b407df78aeed963cec104f24a321d0962063c9"
|
|
36
36
|
},
|
|
37
|
-
"composite": "
|
|
37
|
+
"composite": "dca545fb2eb6977dfdcda4f2db213a744e2928b18b8e0c36c5da21a795929831"
|
|
38
38
|
}
|
package/dist/list-artifacts.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* lexicons' snapshots aren't blocked.
|
|
13
13
|
*/
|
|
14
14
|
import type { ArtifactMetadata } from "@intentius/chant/lexicon";
|
|
15
|
-
export declare function listArtifacts(
|
|
15
|
+
export declare function listArtifacts(options: {
|
|
16
16
|
environment: string;
|
|
17
17
|
entities: Map<string, {
|
|
18
18
|
entityType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-artifacts.d.ts","sourceRoot":"","sources":["../src/list-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"list-artifacts.d.ts","sourceRoot":"","sources":["../src/list-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwBjE,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/E,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAoD5C"}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-helm",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.17",
|
|
4
4
|
"description": "Helm chart lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/js-yaml": "^4.0.9"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@intentius/chant": "^0.41.
|
|
84
|
+
"@intentius/chant": "^0.41.17",
|
|
85
85
|
"typescript": "^5.9.3"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/src/list-artifacts.ts
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
import { exec } from "node:child_process";
|
|
16
16
|
import { promisify } from "node:util";
|
|
17
17
|
import type { ArtifactMetadata } from "@intentius/chant/lexicon";
|
|
18
|
+
import { loadChantConfigUpward } from "@intentius/chant/config";
|
|
19
|
+
import { resolveClusterTarget } from "@intentius/chant/kubectl-context";
|
|
18
20
|
|
|
19
21
|
const execAsync = promisify(exec);
|
|
20
22
|
|
|
@@ -36,15 +38,30 @@ function pruneUndefined<T extends Record<string, unknown>>(obj: T): Record<strin
|
|
|
36
38
|
return out;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
export async function listArtifacts(
|
|
41
|
+
export async function listArtifacts(options: {
|
|
40
42
|
environment: string;
|
|
41
43
|
entities: Map<string, { entityType: string; props: Record<string, unknown> }>;
|
|
42
44
|
}): Promise<Record<string, ArtifactMetadata>> {
|
|
43
45
|
const result: Record<string, ArtifactMetadata> = {};
|
|
44
46
|
|
|
47
|
+
// The same cluster binding every other helm read resolves (chant#1488 —
|
|
48
|
+
// `k8s.profiles.<env>.context`, shared with the k8s lexicon). Listing on
|
|
49
|
+
// the AMBIENT context read whichever cluster the operator's shell last
|
|
50
|
+
// pointed at: verified live on kubemicrovm-ops, whose releases came back
|
|
51
|
+
// `{}` because the shell's current-context was an unrelated EKS cluster.
|
|
52
|
+
// Unresolvable → ambient, which is chant's own fallback when no profile is
|
|
53
|
+
// declared.
|
|
54
|
+
let context: string | undefined;
|
|
55
|
+
try {
|
|
56
|
+
const { config } = await loadChantConfigUpward(process.cwd());
|
|
57
|
+
context = (await resolveClusterTarget(config as Record<string, unknown>, options.environment, "helm")).context;
|
|
58
|
+
} catch {
|
|
59
|
+
context = undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
45
62
|
let stdout: string;
|
|
46
63
|
try {
|
|
47
|
-
({ stdout } = await execAsync(
|
|
64
|
+
({ stdout } = await execAsync(`helm list -A -o json${context ? ` --kube-context '${context.replace(/'/g, "'\\''")}'` : ""}`));
|
|
48
65
|
} catch {
|
|
49
66
|
// Binary not installed, no kubeconfig, or some other error — return
|
|
50
67
|
// empty rather than blocking the whole snapshot.
|