@intentius/chant-lexicon-helm 0.41.5 → 0.41.6

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.
@@ -15,6 +15,18 @@ export interface HelmUpgradeInput {
15
15
  createNamespace?: boolean;
16
16
  /** Values files, passed as `-f` in order (later files win, Helm's rule). */
17
17
  values?: string[];
18
+ /**
19
+ * Inline value overrides, passed as `--set key=value` in sorted-key order
20
+ * (deterministic argv for the same input). Helm applies these after every
21
+ * values file — its own precedence, unchanged.
22
+ */
23
+ set?: Record<string, string>;
24
+ /**
25
+ * Chart repository URL (`--repo`), for a chart named bare rather than as a
26
+ * local path or OCI ref — `{ chart: "cert-manager", repo:
27
+ * "https://charts.jetstack.io" }` needs no prior `helm repo add`.
28
+ */
29
+ repo?: string;
18
30
  /** Chart version constraint (`--version`). Omitted takes the latest. */
19
31
  version?: string;
20
32
  /** Wait for resources to become ready before returning (`--wait`). */
@@ -1 +1 @@
1
- {"version":3,"file":"helm-upgrade.d.ts","sourceRoot":"","sources":["../../src/components/helm-upgrade.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,wCAAwC,CAAC;AAMxF,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,OAA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AAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oGAAoG;AACpG,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAgC1E,6FAA6F;AAC7F,wBAAgB,2BAA2B,CACzC,GAAG,GAAE,UAAsB,GAC1B,UAAU,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CA+BlD;AAED,eAAO,MAAM,qBAAqB,kDAAgC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "0512e5bf71bbc2af393f201a22524ab869eb7e360e8bcf3aec24a3f39f381667",
4
+ "manifest.json": "cb24fe613ff94f034f09f0cdadc92862343ceabb8f948a825182bf1f715a76ff",
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": "43154d62e8f2d12a5798cb6fc107c2b5cf271e9f376195dbd9e76c5f5c22cad8"
37
+ "composite": "86e1b71b6d7aa2036d57bbf531792076bbabca2e38e4b5c0519fecdd8dfe640a"
38
38
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helm",
3
- "version": "0.41.5",
3
+ "version": "0.41.6",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Helm",
6
6
  "intrinsics": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-helm",
3
- "version": "0.41.5",
3
+ "version": "0.41.6",
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.5",
84
+ "@intentius/chant": "^0.41.6",
85
85
  "typescript": "^5.9.3"
86
86
  }
87
87
  }
@@ -45,6 +45,31 @@ describe("helm-upgrade capability (#1495 piece 4)", () => {
45
45
  expect(out).toEqual({ release: "api", namespace: "prod", revision: 3, status: "deployed" });
46
46
  });
47
47
 
48
+ test("--repo and sorted --set ride the argv — no prior repo add, deterministic order", async () => {
49
+ let seen = "";
50
+ const cap = createHelmUpgradeCapability(async (cmd) => {
51
+ seen = cmd;
52
+ return { stdout: "{}" };
53
+ });
54
+
55
+ await cap.run(ctx, {
56
+ release: "cert-manager",
57
+ chart: "cert-manager",
58
+ repo: "https://charts.jetstack.io",
59
+ namespace: "cert-manager",
60
+ createNamespace: true,
61
+ set: { "app.envs.AWS_REGION": "us-east-1", "crds.enabled": "true" },
62
+ version: "v1.16.1",
63
+ context: "k3d-test",
64
+ });
65
+
66
+ expect(seen).toBe(
67
+ "helm upgrade --install 'cert-manager' 'cert-manager' -o json -n 'cert-manager' --create-namespace " +
68
+ "--repo 'https://charts.jetstack.io' --set 'app.envs.AWS_REGION=us-east-1' --set 'crds.enabled=true' " +
69
+ "--version 'v1.16.1' --kube-context 'k3d-test'",
70
+ );
71
+ });
72
+
48
73
  test("non-JSON helm output still reports the release — the deploy already succeeded", async () => {
49
74
  const cap = createHelmUpgradeCapability(async () => ({ stdout: "Release \"api\" has been upgraded.\n" }));
50
75
  const out = await cap.run(ctx, { release: "api", chart: "repo/api", namespace: "prod" });
@@ -45,6 +45,18 @@ export interface HelmUpgradeInput {
45
45
  createNamespace?: boolean;
46
46
  /** Values files, passed as `-f` in order (later files win, Helm's rule). */
47
47
  values?: string[];
48
+ /**
49
+ * Inline value overrides, passed as `--set key=value` in sorted-key order
50
+ * (deterministic argv for the same input). Helm applies these after every
51
+ * values file — its own precedence, unchanged.
52
+ */
53
+ set?: Record<string, string>;
54
+ /**
55
+ * Chart repository URL (`--repo`), for a chart named bare rather than as a
56
+ * local path or OCI ref — `{ chart: "cert-manager", repo:
57
+ * "https://charts.jetstack.io" }` needs no prior `helm repo add`.
58
+ */
59
+ repo?: string;
48
60
  /** Chart version constraint (`--version`). Omitted takes the latest. */
49
61
  version?: string;
50
62
  /** Wait for resources to become ready before returning (`--wait`). */
@@ -87,7 +99,9 @@ function upgradeCommand(input: HelmUpgradeInput, context: string | undefined): s
87
99
  const parts = ["helm", "upgrade", "--install", q(input.release), q(input.chart), "-o", "json"];
88
100
  if (input.namespace) parts.push("-n", q(input.namespace));
89
101
  if (input.createNamespace) parts.push("--create-namespace");
102
+ if (input.repo) parts.push("--repo", q(input.repo));
90
103
  for (const f of input.values ?? []) parts.push("-f", q(f));
104
+ for (const key of Object.keys(input.set ?? {}).sort()) parts.push("--set", q(`${key}=${input.set![key]}`));
91
105
  if (input.version) parts.push("--version", q(input.version));
92
106
  if (input.wait) parts.push("--wait");
93
107
  if (context) parts.push("--kube-context", q(context));