@intentius/chant-lexicon-helm 0.41.5 → 0.41.7

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,10 +15,24 @@ 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`). */
21
33
  wait?: boolean;
34
+ /** Wait ceiling (`--timeout`), Helm duration syntax (`6m`). Helm's default is 5m. */
35
+ timeout?: string;
22
36
  /** Explicit kube context, overriding the environment's declared binding. */
23
37
  context?: string;
24
38
  }
@@ -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,sEAAs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AAI,CAAC,EAAE,OAAO,CAAC;IACf,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,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;AAiC1E,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": "6b4a5f06612f7937d732986008864120f7cee69d2ee97e11d6d4c0202d88b12f",
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": "ce6a37c3d330ddc80915888820742765fa67641794696a55331aa06c6eef8755"
38
38
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helm",
3
- "version": "0.41.5",
3
+ "version": "0.41.7",
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.7",
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.7",
85
85
  "typescript": "^5.9.3"
86
86
  }
87
87
  }
@@ -45,6 +45,32 @@ 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
+ timeout: "6m",
64
+ context: "k3d-test",
65
+ });
66
+
67
+ expect(seen).toBe(
68
+ "helm upgrade --install 'cert-manager' 'cert-manager' -o json -n 'cert-manager' --create-namespace " +
69
+ "--repo 'https://charts.jetstack.io' --set 'app.envs.AWS_REGION=us-east-1' --set 'crds.enabled=true' " +
70
+ "--version 'v1.16.1' --timeout '6m' --kube-context 'k3d-test'",
71
+ );
72
+ });
73
+
48
74
  test("non-JSON helm output still reports the release — the deploy already succeeded", async () => {
49
75
  const cap = createHelmUpgradeCapability(async () => ({ stdout: "Release \"api\" has been upgraded.\n" }));
50
76
  const out = await cap.run(ctx, { release: "api", chart: "repo/api", namespace: "prod" });
@@ -45,10 +45,24 @@ 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`). */
51
63
  wait?: boolean;
64
+ /** Wait ceiling (`--timeout`), Helm duration syntax (`6m`). Helm's default is 5m. */
65
+ timeout?: string;
52
66
  /** Explicit kube context, overriding the environment's declared binding. */
53
67
  context?: string;
54
68
  }
@@ -87,9 +101,12 @@ function upgradeCommand(input: HelmUpgradeInput, context: string | undefined): s
87
101
  const parts = ["helm", "upgrade", "--install", q(input.release), q(input.chart), "-o", "json"];
88
102
  if (input.namespace) parts.push("-n", q(input.namespace));
89
103
  if (input.createNamespace) parts.push("--create-namespace");
104
+ if (input.repo) parts.push("--repo", q(input.repo));
90
105
  for (const f of input.values ?? []) parts.push("-f", q(f));
106
+ for (const key of Object.keys(input.set ?? {}).sort()) parts.push("--set", q(`${key}=${input.set![key]}`));
91
107
  if (input.version) parts.push("--version", q(input.version));
92
108
  if (input.wait) parts.push("--wait");
109
+ if (input.timeout) parts.push("--timeout", q(input.timeout));
93
110
  if (context) parts.push("--kube-context", q(context));
94
111
  return parts.join(" ");
95
112
  }