@intentius/chant-lexicon-azure 0.46.0 → 0.50.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/index.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Azure Resource Manager lexicon for chant.
5
5
  */
6
+ export { azApply, azDelete, azGroupEnsure, azGroupDelete, flociAzUp, flociAzDown } from "./op/builders.js";
6
7
  export { defaultTags, type TagEntry, type DefaultTags } from "./default-tags.js";
7
8
  export { deploymentScope, isDeploymentScope, type DeploymentScope, type DeployScope } from "./deploy-scopes.js";
8
9
  export { azureSerializer } from "./serializer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,UAAU,EAAE,mBAAmB,EAC/B,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,sBAAsB,EACrC,YAAY,EAAE,qBAAqB,EACnC,YAAY,EAAE,qBAAqB,EACnC,MAAM,EAAE,eAAe,EACvB,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,iBAAiB,GAC5B,MAAM,cAAc,CAAC;AAGt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AAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "fa47e648ba3dfe5076642c461707390387fbe003c0f68fe32fbd70b13867955a",
4
+ "manifest.json": "72f4b592231f377ccfa887c57e7a608d709ecd1ad20bd03f7b214d73510dbdd0",
5
5
  "meta.json": "8c7a1ea3cfaf39461d3e758fa2b0cbd70c7800fac736e56df8d14a3e07ef1840",
6
6
  "types/index.d.ts": "16cb7dc2f9b4f82dc974935442f294d0c88077c0f21d21a92690b19227174b59",
7
7
  "rules/hardcoded-location.ts": "a9b1d1cec93f2ca9c5206641f53fc9621cefcfd2c00b3ab89c194b30a75fa949",
@@ -37,5 +37,5 @@
37
37
  "skills/chant-azure-patterns.md": "1a3bacfac612826b77332d2692a59195638db9f1b5e8ea2eda7579621d25f603",
38
38
  "skills/chant-azure-aks.md": "2d4e0098c1a22b54ffadd410564d9df0f3a04cb4eb7c6261f20ae33106e7aca8"
39
39
  },
40
- "composite": "8f9dff45c7b216d7d632331e7ed939ecd049ab36298c9056c2f22d55fc983f54"
40
+ "composite": "129991e9a84b5eb1c2b351ea7e3fb8c290d856c7f8a3ee53c10398f377f9fbc3"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure",
3
- "version": "0.46.0",
3
+ "version": "0.50.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Azure",
6
6
  "intrinsics": [
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Typed step-builder wrappers for this lexicon's activities (chant #1288
3
+ * Stage 2). See `lexicons/k8s/src/op/builders.ts`'s module doc for why these
4
+ * live beside their `*Args` interfaces rather than in core or the temporal
5
+ * barrel. `opts`'s type in each wrapper below IS the activity's own `*Args`
6
+ * interface (via `Omit`/`WithStepRefs`) — never restated. `core`'s own
7
+ * `azApply`/`azDelete`/`azGroupEnsure`/`azGroupDelete`/`flociAzUp`/
8
+ * `flociAzDown` are unchanged and produce byte-identical `ActivityStep`
9
+ * output; these are purely additive.
10
+ */
11
+ import { type ActivityStep, type NamedActivityStep, type WithStepRefs } from "@intentius/chant/op";
12
+ import type { AzApplyArgs } from "./activities/az-apply.js";
13
+ import type { AzGroupEnsureArgs, AzGroupDeleteArgs } from "./activities/azure.js";
14
+ import type { FlociAzUpArgs, FlociAzDownArgs } from "./activities/floci-az.js";
15
+ /** Extra opts every wrapper below accepts alongside its activity's own fields. */
16
+ type StepOpts = {
17
+ profile?: ActivityStep["profile"];
18
+ id?: string;
19
+ };
20
+ /**
21
+ * Ensure an Azure resource group exists before an ARM apply — the fully
22
+ * typed twin of core's `azGroupEnsure`. `opts` is {@link AzGroupEnsureArgs}
23
+ * itself, minus the positional `resourceGroup`. Defaults to the
24
+ * `fastIdempotent` profile.
25
+ */
26
+ export declare const azGroupEnsure: (resourceGroup: string, opts?: WithStepRefs<Omit<AzGroupEnsureArgs, "resourceGroup">> & StepOpts) => NamedActivityStep;
27
+ /**
28
+ * Delete an Azure resource group and its contents — the fully typed twin of
29
+ * core's `azGroupDelete`. `opts` is {@link AzGroupDeleteArgs} itself, minus
30
+ * the positional `resourceGroup`. Defaults to the `fastIdempotent` profile.
31
+ */
32
+ export declare const azGroupDelete: (resourceGroup: string, opts?: WithStepRefs<Omit<AzGroupDeleteArgs, "resourceGroup">> & StepOpts) => NamedActivityStep;
33
+ /**
34
+ * Apply a built ARM template directly to the ARM resource API — the fully
35
+ * typed twin of core's `azApply`. `opts` is {@link AzApplyArgs} itself,
36
+ * minus the positional `templatePath` (`resourceGroup` remains required).
37
+ * Defaults to the `longInfra` profile.
38
+ */
39
+ export declare const azApply: (templatePath: string, opts: WithStepRefs<Omit<AzApplyArgs, "templatePath">> & StepOpts) => NamedActivityStep;
40
+ /**
41
+ * Delete the Azure (ARM) resources in a built template — the inverse of
42
+ * {@link azApply}, fully typed twin of core's `azDelete`. `opts` is
43
+ * {@link AzApplyArgs} itself (the activity reuses it), minus the positional
44
+ * `templatePath`. Defaults to the `longInfra` profile.
45
+ */
46
+ export declare const azDelete: (templatePath: string, opts: WithStepRefs<Omit<AzApplyArgs, "templatePath">> & StepOpts) => NamedActivityStep;
47
+ /**
48
+ * Boot a local floci-az (Azure emulator) — the fully typed twin of core's
49
+ * `flociAzUp`. `opts` is {@link FlociAzUpArgs} itself. Defaults to the
50
+ * `longInfra` profile.
51
+ */
52
+ export declare const flociAzUp: (opts?: WithStepRefs<FlociAzUpArgs> & StepOpts) => NamedActivityStep;
53
+ /**
54
+ * Stop and remove the local floci-az container — the fully typed twin of
55
+ * core's `flociAzDown`. `opts` is {@link FlociAzDownArgs} itself. Defaults
56
+ * to the `fastIdempotent` profile.
57
+ */
58
+ export declare const flociAzDown: (opts?: WithStepRefs<FlociAzDownArgs> & StepOpts) => NamedActivityStep;
59
+ export {};
60
+ //# sourceMappingURL=builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/op/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5E,kFAAkF;AAClF,KAAK,QAAQ,GAAG;IAAE,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,MAAM,EACrB,OAAO,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,GAAG,QAAQ,KACvE,iBAGF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,MAAM,EACrB,OAAO,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,GAAG,QAAQ,KACvE,iBAGF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAClB,cAAc,MAAM,EACpB,MAAM,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,GAAG,QAAQ,KAC/D,iBAGF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GACnB,cAAc,MAAM,EACpB,MAAM,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,GAAG,QAAQ,KAC/D,iBAGF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,YAAY,CAAC,aAAa,CAAC,GAAG,QAAQ,KAAG,iBAGzE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,YAAY,CAAC,eAAe,CAAC,GAAG,QAAQ,KAAG,iBAG7E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-azure",
3
- "version": "0.46.0",
3
+ "version": "0.50.0",
4
4
  "description": "Azure lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -74,7 +74,7 @@
74
74
  "typescript": "^5.9.3"
75
75
  },
76
76
  "peerDependencies": {
77
- "@intentius/chant": "^0.46.0",
77
+ "@intentius/chant": "^0.50.0",
78
78
  "typescript": "^5.9.3"
79
79
  }
80
80
  }
package/src/index.ts CHANGED
@@ -4,6 +4,14 @@
4
4
  * Azure Resource Manager lexicon for chant.
5
5
  */
6
6
 
7
+ // Typed Op step-builder wrappers (chant #1288 Stage 2) — azApply/azDelete/
8
+ // azGroupEnsure/azGroupDelete/flociAzUp/flociAzDown with authoring-time
9
+ // types derived from this lexicon's own *Args interfaces (see
10
+ // ./op/builders.ts's module doc for why these live here rather than in core
11
+ // or the temporal barrel). Opt-in: `@intentius/chant-lexicon-temporal`'s
12
+ // same-named exports are core's original untyped builders, unchanged.
13
+ export { azApply, azDelete, azGroupEnsure, azGroupDelete, flociAzUp, flociAzDown } from "./op/builders";
14
+
7
15
  // --- Core ---
8
16
  export { defaultTags, type TagEntry, type DefaultTags } from "./default-tags";
9
17
  export { deploymentScope, isDeploymentScope, type DeploymentScope, type DeployScope } from "./deploy-scopes";
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Typed step-builder wrappers (chant #1288 Stage 2) — see
3
+ * `lexicons/k8s/src/op/builders.test.ts`'s module doc for what's asserted
4
+ * and why.
5
+ */
6
+
7
+ import { describe, test, expect } from "vitest";
8
+ import {
9
+ azApply as azApplyOld,
10
+ azDelete as azDeleteOld,
11
+ azGroupEnsure as azGroupEnsureOld,
12
+ azGroupDelete as azGroupDeleteOld,
13
+ flociAzUp as flociAzUpOld,
14
+ flociAzDown as flociAzDownOld,
15
+ stepOutput,
16
+ type StepOutputRef,
17
+ } from "@intentius/chant/op";
18
+ import { azApply, azDelete, azGroupEnsure, azGroupDelete, flociAzUp, flociAzDown } from "./builders";
19
+
20
+ describe("azure typed step builders (#1288 Stage 2)", () => {
21
+ test("azGroupEnsure: identical ActivityStep to core's original", () => {
22
+ expect(azGroupEnsure("my-rg")).toEqual(azGroupEnsureOld("my-rg"));
23
+ expect(azGroupEnsure("my-rg", { location: "westus" })).toEqual(azGroupEnsureOld("my-rg", { location: "westus" }));
24
+ });
25
+
26
+ test("azGroupDelete: identical ActivityStep to core's original", () => {
27
+ expect(azGroupDelete("my-rg")).toEqual(azGroupDeleteOld("my-rg"));
28
+ });
29
+
30
+ test("azApply: identical ActivityStep to core's original", () => {
31
+ const opts = { resourceGroup: "my-rg" };
32
+ expect(azApply("dist/template.json", opts)).toEqual(azApplyOld("dist/template.json", opts));
33
+ });
34
+
35
+ test("azDelete: identical ActivityStep to core's original", () => {
36
+ const opts = { resourceGroup: "my-rg" };
37
+ expect(azDelete("dist/template.json", opts)).toEqual(azDeleteOld("dist/template.json", opts));
38
+ });
39
+
40
+ test("flociAzUp/flociAzDown: identical ActivityStep to core's original", () => {
41
+ expect(flociAzUp()).toEqual(flociAzUpOld());
42
+ expect(flociAzDown({ name: "custom" })).toEqual(flociAzDownOld({ name: "custom" }));
43
+ });
44
+
45
+ test("azApply: accepts a StepOutputRef in a typed slot", () => {
46
+ const ref = stepOutput("resolve-rg", "resourceGroup");
47
+ const step = azApply("dist/template.json", { resourceGroup: ref });
48
+ expect(step.args?.resourceGroup).toBe(ref);
49
+ });
50
+
51
+ test("azGroupEnsure: .out is reachable when an id is given", () => {
52
+ const step = azGroupEnsure("my-rg", { id: "ensure-rg" });
53
+ const ref: StepOutputRef = step.out.location;
54
+ expect(ref.step).toBe("ensure-rg");
55
+ });
56
+ });
57
+
58
+ // ── Compile-time-only: authoring-time type errors (never executed) ──────────
59
+ function _typeChecksOnly(): void {
60
+ // @ts-expect-error — resourceGroup is required for azApply (the activity
61
+ // fails without it); omitting opts entirely is no longer a way around that.
62
+ azApply("dist/template.json");
63
+
64
+ // @ts-expect-error — "resourcegroup" (wrong case) is not a key of AzApplyArgs.
65
+ azApply("dist/template.json", { resourcegroup: "my-rg" });
66
+
67
+ // @ts-expect-error — prune must be a boolean.
68
+ azApply("dist/template.json", { resourceGroup: "my-rg", prune: "yes" });
69
+
70
+ // @ts-expect-error — location must be a string.
71
+ azGroupEnsure("my-rg", { location: 1 });
72
+ }
73
+ void _typeChecksOnly;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Typed step-builder wrappers for this lexicon's activities (chant #1288
3
+ * Stage 2). See `lexicons/k8s/src/op/builders.ts`'s module doc for why these
4
+ * live beside their `*Args` interfaces rather than in core or the temporal
5
+ * barrel. `opts`'s type in each wrapper below IS the activity's own `*Args`
6
+ * interface (via `Omit`/`WithStepRefs`) — never restated. `core`'s own
7
+ * `azApply`/`azDelete`/`azGroupEnsure`/`azGroupDelete`/`flociAzUp`/
8
+ * `flociAzDown` are unchanged and produce byte-identical `ActivityStep`
9
+ * output; these are purely additive.
10
+ */
11
+
12
+ import {
13
+ activity,
14
+ takeProfileAndId,
15
+ type ActivityStep,
16
+ type NamedActivityStep,
17
+ type WithStepRefs,
18
+ } from "@intentius/chant/op";
19
+ import type { AzApplyArgs } from "./activities/az-apply";
20
+ import type { AzGroupEnsureArgs, AzGroupDeleteArgs } from "./activities/azure";
21
+ import type { FlociAzUpArgs, FlociAzDownArgs } from "./activities/floci-az";
22
+
23
+ /** Extra opts every wrapper below accepts alongside its activity's own fields. */
24
+ type StepOpts = { profile?: ActivityStep["profile"]; id?: string };
25
+
26
+ /**
27
+ * Ensure an Azure resource group exists before an ARM apply — the fully
28
+ * typed twin of core's `azGroupEnsure`. `opts` is {@link AzGroupEnsureArgs}
29
+ * itself, minus the positional `resourceGroup`. Defaults to the
30
+ * `fastIdempotent` profile.
31
+ */
32
+ export const azGroupEnsure = (
33
+ resourceGroup: string,
34
+ opts?: WithStepRefs<Omit<AzGroupEnsureArgs, "resourceGroup">> & StepOpts,
35
+ ): NamedActivityStep => {
36
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
37
+ return activity("azGroupEnsure", { resourceGroup, ...args }, { profile: profile ?? "fastIdempotent", ...(id ? { id } : {}) });
38
+ };
39
+
40
+ /**
41
+ * Delete an Azure resource group and its contents — the fully typed twin of
42
+ * core's `azGroupDelete`. `opts` is {@link AzGroupDeleteArgs} itself, minus
43
+ * the positional `resourceGroup`. Defaults to the `fastIdempotent` profile.
44
+ */
45
+ export const azGroupDelete = (
46
+ resourceGroup: string,
47
+ opts?: WithStepRefs<Omit<AzGroupDeleteArgs, "resourceGroup">> & StepOpts,
48
+ ): NamedActivityStep => {
49
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
50
+ return activity("azGroupDelete", { resourceGroup, ...args }, { profile: profile ?? "fastIdempotent", ...(id ? { id } : {}) });
51
+ };
52
+
53
+ /**
54
+ * Apply a built ARM template directly to the ARM resource API — the fully
55
+ * typed twin of core's `azApply`. `opts` is {@link AzApplyArgs} itself,
56
+ * minus the positional `templatePath` (`resourceGroup` remains required).
57
+ * Defaults to the `longInfra` profile.
58
+ */
59
+ export const azApply = (
60
+ templatePath: string,
61
+ opts: WithStepRefs<Omit<AzApplyArgs, "templatePath">> & StepOpts,
62
+ ): NamedActivityStep => {
63
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
64
+ return activity("azApply", { templatePath, ...args }, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
65
+ };
66
+
67
+ /**
68
+ * Delete the Azure (ARM) resources in a built template — the inverse of
69
+ * {@link azApply}, fully typed twin of core's `azDelete`. `opts` is
70
+ * {@link AzApplyArgs} itself (the activity reuses it), minus the positional
71
+ * `templatePath`. Defaults to the `longInfra` profile.
72
+ */
73
+ export const azDelete = (
74
+ templatePath: string,
75
+ opts: WithStepRefs<Omit<AzApplyArgs, "templatePath">> & StepOpts,
76
+ ): NamedActivityStep => {
77
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
78
+ return activity("azDelete", { templatePath, ...args }, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
79
+ };
80
+
81
+ /**
82
+ * Boot a local floci-az (Azure emulator) — the fully typed twin of core's
83
+ * `flociAzUp`. `opts` is {@link FlociAzUpArgs} itself. Defaults to the
84
+ * `longInfra` profile.
85
+ */
86
+ export const flociAzUp = (opts?: WithStepRefs<FlociAzUpArgs> & StepOpts): NamedActivityStep => {
87
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
88
+ return activity("flociAzUp", args, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
89
+ };
90
+
91
+ /**
92
+ * Stop and remove the local floci-az container — the fully typed twin of
93
+ * core's `flociAzDown`. `opts` is {@link FlociAzDownArgs} itself. Defaults
94
+ * to the `fastIdempotent` profile.
95
+ */
96
+ export const flociAzDown = (opts?: WithStepRefs<FlociAzDownArgs> & StepOpts): NamedActivityStep => {
97
+ const { args, profile, id } = takeProfileAndId(opts as Record<string, unknown> | undefined);
98
+ return activity("flociAzDown", args, { profile: profile ?? "fastIdempotent", ...(id ? { id } : {}) });
99
+ };