@intentius/chant-lexicon-azure 0.44.14 → 0.46.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.
Files changed (58) hide show
  1. package/dist/codegen/docs.d.ts.map +1 -1
  2. package/dist/deploy-scopes.d.ts.map +1 -1
  3. package/dist/describe-resources.d.ts.map +1 -1
  4. package/dist/generated/index.d.ts +328 -87
  5. package/dist/generated/index.d.ts.map +1 -1
  6. package/dist/integrity.json +4 -4
  7. package/dist/manifest.json +1 -1
  8. package/dist/meta.json +1923 -427
  9. package/dist/okf/index.md +22 -5
  10. package/dist/okf/rules/AZR028.md +1 -0
  11. package/dist/okf/types/{snapshots.md → Akssnapshots.md} +3 -3
  12. package/dist/okf/types/AzureStackHCIloadBalancers.md +21 -0
  13. package/dist/okf/types/AzureStackHCInatGateways.md +22 -0
  14. package/dist/okf/types/AzureStackHCInetworkSecurityGroups_securityRules.md +19 -0
  15. package/dist/okf/types/AzureStackHCIsnapshots.md +21 -0
  16. package/dist/okf/types/AzureStackHCIstorageContainers.md +21 -0
  17. package/dist/okf/types/AzureStackHCIvirtualMachineInstances.md +21 -0
  18. package/dist/okf/types/AzureStackHCIvirtualMachineInstances_guestAgents.md +18 -0
  19. package/dist/okf/types/AzureStackHCIvirtualNetworks.md +22 -0
  20. package/dist/okf/types/{storageContainers.md → DiscoverystorageContainers.md} +3 -3
  21. package/dist/okf/types/{loadBalancers.md → KubernetesRuntimeloadBalancers.md} +3 -3
  22. package/dist/okf/types/{natGateways.md → NetworknatGateways.md} +4 -4
  23. package/dist/okf/types/{networkSecurityGroups_securityRules.md → NetworknetworkSecurityGroups_securityRules.md} +3 -3
  24. package/dist/okf/types/galleryImages.md +21 -0
  25. package/dist/okf/types/logicalNetworks.md +21 -0
  26. package/dist/okf/types/marketplaceGalleryImages.md +21 -0
  27. package/dist/okf/types/natGateways_inboundRules.md +19 -0
  28. package/dist/okf/types/networkInterfaces.md +25 -0
  29. package/dist/okf/types/networkSecurityGroups.md +22 -0
  30. package/dist/okf/types/publicIPAddresses.md +21 -0
  31. package/dist/okf/types/virtualHardDisks.md +21 -0
  32. package/dist/okf/types/virtualNetworks_subnets.md +19 -0
  33. package/dist/op/activities/az-apply.d.ts +37 -23
  34. package/dist/op/activities/az-apply.d.ts.map +1 -1
  35. package/dist/op/activities/index.d.ts +1 -1
  36. package/dist/op/activities/index.d.ts.map +1 -1
  37. package/dist/serializer.d.ts +14 -0
  38. package/dist/serializer.d.ts.map +1 -1
  39. package/dist/spec/api-versions.d.ts +12 -0
  40. package/dist/spec/api-versions.d.ts.map +1 -1
  41. package/dist/types/index.d.ts +3682 -946
  42. package/dist/validate.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. package/src/codegen/docs.ts +0 -16
  45. package/src/deploy-scopes.ts +19 -5
  46. package/src/describe-resources.ts +8 -0
  47. package/src/generated/index.d.ts +3682 -946
  48. package/src/generated/index.ts +328 -87
  49. package/src/generated/lexicon-azure.json +1923 -427
  50. package/src/lifecycle-integration.test.ts +40 -0
  51. package/src/op/activities/az-apply.test.ts +187 -21
  52. package/src/op/activities/az-apply.ts +104 -29
  53. package/src/op/activities/index.ts +1 -0
  54. package/src/serializer-api-versions.test.ts +94 -0
  55. package/src/serializer.ts +69 -32
  56. package/src/spec/api-versions.test.ts +16 -0
  57. package/src/spec/api-versions.ts +13 -0
  58. package/src/validate.ts +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGlG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AA2BvF,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAgBpF"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGlG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AA2BvF,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAsBpF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-azure",
3
- "version": "0.44.14",
3
+ "version": "0.46.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.44.14",
77
+ "@intentius/chant": "^0.46.0",
78
78
  "typescript": "^5.9.3"
79
79
  }
80
80
  }
@@ -75,22 +75,6 @@ const docsConfig: DocsConfig = {
75
75
  // `lint-rules` below is the rules documentation; the generated `rules` table
76
76
  // would duplicate it and land in no sidebar (#1312). aws, k8s, gitlab and
77
77
  // github already suppress it for the same reason.
78
- // These pages are hand-written files under docs/src/content/docs/. The
79
- // pipeline preserves pages it did not emit, but Starlight has no
80
- // auto-discovery, so without an entry here they are reachable only by URL —
81
- // which is what had happened to all ten of them.
82
- sidebarExtra: [
83
- { label: "Getting Started", slug: "getting-started" },
84
- { label: "Resources", slug: "resources" },
85
- { label: "Parameters & Outputs", slug: "parameters-outputs" },
86
- { label: "Composites", slug: "composites" },
87
- { label: "Linked Templates", slug: "linked-templates" },
88
- { label: "Lint Rules", slug: "lint-rules" },
89
- { label: "Importing ARM Templates", slug: "importing" },
90
- { label: "Deploying to AKS", slug: "aks-kubernetes" },
91
- { label: "Examples", slug: "examples" },
92
- { label: "AI Skills", slug: "skills" },
93
- ],
94
78
  };
95
79
 
96
80
  /**
@@ -85,7 +85,20 @@ interface LexiconEntry {
85
85
 
86
86
  let _cached: Map<string, DeployScope[]> | undefined;
87
87
 
88
- const __dirname_ = dirname(fileURLToPath(import.meta.url));
88
+ /**
89
+ * Directory of this module, resolved lazily. On workerd `import.meta.url`
90
+ * is undefined and `fileURLToPath` throws, so this must never run at module
91
+ * scope (#1621): the post-synth barrel imports this file and a module-scope
92
+ * throw kills the worker at startup. Returns undefined when unresolvable;
93
+ * callers then take the documented resource-group-only fallback.
94
+ */
95
+ function moduleDir(): string | undefined {
96
+ try {
97
+ return dirname(fileURLToPath(import.meta.url));
98
+ } catch {
99
+ return undefined;
100
+ }
101
+ }
89
102
 
90
103
  /**
91
104
  * Load per-resource deployment scopes from the lexicon JSON.
@@ -98,11 +111,12 @@ export function loadDeployScopes(): Map<string, DeployScope[]> {
98
111
  const map = new Map<string, DeployScope[]>();
99
112
  try {
100
113
  let content: string | undefined;
114
+ const dir = moduleDir();
101
115
  // Try generated/ (dev) first, then dist/meta.json (installed package)
102
- for (const candidate of [
103
- join(__dirname_, "generated", "lexicon-azure.json"),
104
- join(__dirname_, "..", "dist", "meta.json"),
105
- ]) {
116
+ for (const candidate of dir ? [
117
+ join(dir, "generated", "lexicon-azure.json"),
118
+ join(dir, "..", "dist", "meta.json"),
119
+ ] : []) {
106
120
  try { content = readFileSync(candidate, "utf-8"); break; } catch {}
107
121
  }
108
122
  if (content) {
@@ -27,6 +27,8 @@
27
27
 
28
28
  import type { ObservationResult, ResourceMetadata, UnobservedEntity, UnobservedReason } from "@intentius/chant/lexicon";
29
29
  import { boundedConcurrently, observation } from "@intentius/chant/observation";
30
+ import { readOwnership } from "@intentius/chant/ownership";
31
+ import { AZURE_TAG_OWNERSHIP_KEYS } from "./ownership";
30
32
  import { AzureReadError, getResource, isNotFound, type AzureReadClientOptions } from "./api/read-client";
31
33
  import type { AzHttp } from "./op/activities/az-apply";
32
34
 
@@ -187,6 +189,12 @@ export async function describeResources(options: {
187
189
  type: entityType,
188
190
  physicalId: body.id,
189
191
  status: (body.properties?.provisioningState as string | undefined) ?? "PRESENT",
192
+ // Marker identity (#1222): the ARM envelope carries the resource's
193
+ // tags, so the stamped stack/env identity is readable here even though
194
+ // this path declares no ownership channel (the verdict stays out —
195
+ // floci-az drops tags, so a verdict here would misreport under the
196
+ // emulator; the identity, when the tags are present, is verbatim).
197
+ marker: readOwnership(body.tags, AZURE_TAG_OWNERSHIP_KEYS),
190
198
  attributes: pruneUndefined({
191
199
  location: body.location,
192
200
  tags: body.tags,