@intentius/chant-lexicon-helm 0.17.0 → 0.18.0
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 +2 -2
- package/dist/manifest.json +1 -1
- package/dist/op/activities/helm.d.ts +18 -0
- package/dist/op/activities/helm.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +11 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/package.json +7 -2
- package/src/op/activities/helm.ts +41 -0
- package/src/op/activities/index.ts +10 -0
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "6fe42a935e40ffd478f06d3dd4e129eaadd925308b0e8ccee85f50263a422eb0",
|
|
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": "66032a060d3b275af4c22fac9d3d4ed6a70c008770e93dbb6d9e65ca48b00e01"
|
|
38
38
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface HelmInstallArgs {
|
|
2
|
+
/** Helm release name. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Chart reference (local path or `repo/chart`). */
|
|
5
|
+
chart: string;
|
|
6
|
+
/** Path to a values file. */
|
|
7
|
+
values?: string;
|
|
8
|
+
/** Kubernetes namespace. */
|
|
9
|
+
namespace?: string;
|
|
10
|
+
/** Additional --set arguments. */
|
|
11
|
+
set?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Run `helm upgrade --install <name> <chart>`.
|
|
15
|
+
* Uses longInfra profile — 20m timeout, heartbeat every 15s.
|
|
16
|
+
*/
|
|
17
|
+
export declare function helmInstall(args: HelmInstallArgs, signal?: AbortSignal): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=helm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm.d.ts","sourceRoot":"","sources":["../../../src/op/activities/helm.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB5F"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* helm Op activities — resolved by the core activity registry when a project's
|
|
3
|
+
* `chant.config.ts` lists the `helm` lexicon. `helmInstall` shells out to the
|
|
4
|
+
* helm CLI with heartbeat/retry semantics; relocated from the temporal lexicon
|
|
5
|
+
* (#809) so helm's imperative activity lives with its product, not in temporal.
|
|
6
|
+
* The `helmInstall` step builder stays in core (@intentius/chant/op), re-exported
|
|
7
|
+
* from the temporal Op-authoring barrel like the other core builders.
|
|
8
|
+
*/
|
|
9
|
+
export { helmInstall } from "./helm.js";
|
|
10
|
+
export type { HelmInstallArgs } from "./helm.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,YAAY,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-helm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
"types": "./dist/lint/post-synth/index.d.ts",
|
|
50
50
|
"default": "./src/lint/post-synth/index.ts"
|
|
51
51
|
},
|
|
52
|
+
"./op/activities": {
|
|
53
|
+
"development": "./src/op/activities/index.ts",
|
|
54
|
+
"types": "./dist/op/activities/index.d.ts",
|
|
55
|
+
"default": "./src/op/activities/index.ts"
|
|
56
|
+
},
|
|
52
57
|
"./manifest": "./dist/manifest.json",
|
|
53
58
|
"./meta": "./dist/meta.json",
|
|
54
59
|
"./types": "./dist/types/index.d.ts"
|
|
@@ -69,6 +74,6 @@
|
|
|
69
74
|
"typescript": "^5.9.3"
|
|
70
75
|
},
|
|
71
76
|
"peerDependencies": {
|
|
72
|
-
"@intentius/chant": "^0.
|
|
77
|
+
"@intentius/chant": "^0.18.0"
|
|
73
78
|
}
|
|
74
79
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { exec } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { safeHeartbeat } from "@intentius/chant/op";
|
|
4
|
+
|
|
5
|
+
const execAsync = promisify(exec);
|
|
6
|
+
|
|
7
|
+
export interface HelmInstallArgs {
|
|
8
|
+
/** Helm release name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Chart reference (local path or `repo/chart`). */
|
|
11
|
+
chart: string;
|
|
12
|
+
/** Path to a values file. */
|
|
13
|
+
values?: string;
|
|
14
|
+
/** Kubernetes namespace. */
|
|
15
|
+
namespace?: string;
|
|
16
|
+
/** Additional --set arguments. */
|
|
17
|
+
set?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Run `helm upgrade --install <name> <chart>`.
|
|
22
|
+
* Uses longInfra profile — 20m timeout, heartbeat every 15s.
|
|
23
|
+
*/
|
|
24
|
+
export async function helmInstall(args: HelmInstallArgs, signal?: AbortSignal): Promise<void> {
|
|
25
|
+
const parts = ["helm", "upgrade", "--install", "--wait", args.name, args.chart];
|
|
26
|
+
if (args.namespace) parts.push("--namespace", args.namespace, "--create-namespace");
|
|
27
|
+
if (args.values) parts.push("-f", args.values);
|
|
28
|
+
for (const [k, v] of Object.entries(args.set ?? {})) parts.push("--set", `${k}=${v}`);
|
|
29
|
+
|
|
30
|
+
const heartbeatInterval = setInterval(() => {
|
|
31
|
+
safeHeartbeat({ step: "helm install", release: args.name });
|
|
32
|
+
}, 15_000);
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
const { stdout, stderr } = await execAsync(parts.join(" "), { signal });
|
|
36
|
+
if (stdout) console.log(stdout);
|
|
37
|
+
if (stderr) console.error(stderr);
|
|
38
|
+
} finally {
|
|
39
|
+
clearInterval(heartbeatInterval);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* helm Op activities — resolved by the core activity registry when a project's
|
|
3
|
+
* `chant.config.ts` lists the `helm` lexicon. `helmInstall` shells out to the
|
|
4
|
+
* helm CLI with heartbeat/retry semantics; relocated from the temporal lexicon
|
|
5
|
+
* (#809) so helm's imperative activity lives with its product, not in temporal.
|
|
6
|
+
* The `helmInstall` step builder stays in core (@intentius/chant/op), re-exported
|
|
7
|
+
* from the temporal Op-authoring barrel like the other core builders.
|
|
8
|
+
*/
|
|
9
|
+
export { helmInstall } from "./helm";
|
|
10
|
+
export type { HelmInstallArgs } from "./helm";
|