@intentius/chant-lexicon-aws 0.37.2 → 0.38.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "c6468d6639f01c0afe1105f53ce7d05121629752b31a484e422ee9b2670a7b89",
4
+ "manifest.json": "95bf7ddba781fb01df8e17f73ff1c8d8beae128136f3458fb83b4757f44f2cf1",
5
5
  "meta.json": "f430880414df1288383dc91c313e50ecab26d8e7bcce520bf894eeb89b220e9f",
6
6
  "types/index.d.ts": "4d6f07139586f3d7fc4d9ea0756161587709a39e21f20fbdb05e31f32a44f1c1",
7
7
  "rules/hardcoded-region.ts": "5a0eaf7ab391231fe6cd51426ece29539cb4b36f31c8dd060956638fed55722a",
@@ -59,5 +59,5 @@
59
59
  "skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe",
60
60
  "skills/chant-aws-carve-terraform.md": "f4c6fe1c702250665f90d82b3bdaba5ea50ae75e380a8ae321dad6eb1c39683e"
61
61
  },
62
- "composite": "7bd9080acc70b06b4fd367638fd585ec6f27d93872085ebe74ac8132eb7a6b72"
62
+ "composite": "5a99ab85d8ba103ccf99396616ea95d3df082a490cc5076429f4b2633ddf9ec9"
63
63
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "AWS",
6
6
  "intrinsics": [
@@ -1 +1 @@
1
- {"version":3,"file":"floci.d.ts","sourceRoot":"","sources":["../../../src/op/activities/floci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AASpG,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,IAAI,CAAC,EAAE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AgB,eAAe,CAAC,IAAI,GAAE,WAAgB,GAAG,MAAM,CAO9D;AAED;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,IAAI,GAAE,WAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBzG;AAED,kFAAkF;AAClF,wBAAsB,SAAS,CAAC,IAAI,GAAE,aAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgL,MAAM,0BAA0B,CAAC;AAoC5O;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnD,eAAO,MAAM,SAAS,EAAE,aAu5BvB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgL,MAAM,0BAA0B,CAAC;AAqC5O;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnD,eAAO,MAAM,SAAS,EAAE,aA05BvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-aws",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "description": "AWS CloudFormation lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -80,7 +80,7 @@
80
80
  "typescript": "^5.9.3"
81
81
  },
82
82
  "peerDependencies": {
83
- "@intentius/chant": "^0.37.2",
83
+ "@intentius/chant": "^0.38.0",
84
84
  "typescript": "^5.9.3"
85
85
  }
86
86
  }
@@ -239,6 +239,7 @@ describe("aws lifecycle integration (#163)", () => {
239
239
  // The shared conformance suite (#1089).
240
240
  describeObservationConformance({
241
241
  lexicon: "aws",
242
+ ownershipChannel: awsPlugin.ownershipChannel,
242
243
  scenarios: [
243
244
  {
244
245
  name: "a stack read that fails on credentials",
@@ -286,5 +287,29 @@ describeObservationConformance({
286
287
  });
287
288
  },
288
289
  },
290
+ {
291
+ // aws declares a marker channel on the deep read and on live export, but
292
+ // not here: describe-stack-resources returns no tags, so the filter has
293
+ // nothing to filter on. The suite holds it to that — an `owned` verdict
294
+ // from this path would be a claim the transport cannot support (#1348).
295
+ name: "an owned read on a path with no marker channel",
296
+ declared: ["MyBucket"],
297
+ expectPresent: ["MyBucket"],
298
+ owned: true,
299
+ run: () => {
300
+ stubCfn((action) =>
301
+ action === "DescribeStackResources"
302
+ ? { text: stackResourcesXml([{ logicalId: "MyBucket", type: "AWS::S3::Bucket", physicalId: "my-bucket" }]) }
303
+ : { text: stackOutputsXml() },
304
+ );
305
+ return awsPlugin.describeResources!({
306
+ environment: "prod",
307
+ buildOutput: "",
308
+ entityNames: ["MyBucket"],
309
+ entities: new Map(),
310
+ owned: true,
311
+ });
312
+ },
313
+ },
289
314
  ],
290
315
  });
@@ -13,7 +13,7 @@ import {
13
13
  describe("flociRunCommand (#704)", () => {
14
14
  test("minimal — defaults name/port/image, no docker socket", () => {
15
15
  expect(flociRunCommand({})).toBe(
16
- "docker run -d --rm --name chant-floci -p 4566:4566 floci/floci:latest",
16
+ "docker run -d --rm --name chant-floci -p 4566:4566 floci/floci:1.5.34",
17
17
  );
18
18
  });
19
19
 
@@ -60,7 +60,7 @@ describe("flociHealthUrl / flociEnv (#704)", () => {
60
60
  describe("FLOCI_SPEC / FLOCI_EMULATOR — the aws plugin's emulator capability (#920)", () => {
61
61
  test("spec pins the Floci container identity the shared lifecycle boots", () => {
62
62
  expect(FLOCI_SPEC.name).toBe("chant-floci");
63
- expect(FLOCI_SPEC.image).toBe("floci/floci:latest");
63
+ expect(FLOCI_SPEC.image).toBe("floci/floci:1.5.34");
64
64
  expect(FLOCI_SPEC.containerPort).toBe(4566);
65
65
  expect(FLOCI_SPEC.healthPath).toBe("/_localstack/health");
66
66
  });
@@ -2,7 +2,11 @@ import { emulatorLifecycle, type EmulatorSpec, type EmulatorCapability } from "@
2
2
 
3
3
  const DEFAULT_NAME = "chant-floci";
4
4
  const DEFAULT_PORT = 4566;
5
- const DEFAULT_IMAGE = "floci/floci:latest";
5
+ // Pinned, not `:latest` (#1345). An image that moves underneath a passing
6
+ // local suite is the drift a pin exists to stop, and the freshness check in
7
+ // core reports how far behind this is rather than bumping it — the tag moves
8
+ // when a consuming test needs the newer emulator (#808).
9
+ const DEFAULT_IMAGE = "floci/floci:1.5.34";
6
10
  const DEFAULT_REGION = "us-east-1";
7
11
  const DEFAULT_READY_SERVICE = "cloudformation";
8
12
  const DOCKER_SOCK = ["-v", "/var/run/docker.sock:/var/run/docker.sock"] as const;
@@ -55,6 +59,7 @@ const flociSpecFor = (readyService: string): EmulatorSpec => ({
55
59
  containerPort: DEFAULT_PORT,
56
60
  healthPath: "/_localstack/health",
57
61
  ready: (body) => isFlociReady(body, readyService),
62
+ upstream: { repo: "floci-io/floci" },
58
63
  });
59
64
 
60
65
  /** The Floci emulator spec — the aws plugin's `emulator` capability (#920). */
package/src/plugin.ts CHANGED
@@ -35,6 +35,7 @@ import { CFGenerator } from "./import/generator";
35
35
  import { parseStackTemplate } from "./import/live-export";
36
36
  import { awsCompletions } from "./lsp/completions";
37
37
  import { awsHover } from "./lsp/hover";
38
+ import { AWS_TAG_OWNERSHIP_KEYS } from "./ownership";
38
39
 
39
40
  /** Re-exported from ./stack-errors so the long-standing import path (and its
40
41
  * tests) keep working now that the deep reader shares the classifier. */
@@ -51,6 +52,9 @@ let warnedOwnership = false;
51
52
 
52
53
  export const awsPlugin: LexiconPlugin = {
53
54
  name: "aws",
55
+ // The thin read is sourced from describe-stack-resources, which returns no
56
+ // tags — so `owned` on that path can only answer `unknown`, and does (#1348).
57
+ ownershipChannel: { keys: AWS_TAG_OWNERSHIP_KEYS, reads: ["observeResourcesDeep", "exportResources"] },
54
58
  serializer: awsSerializer,
55
59
  // Local emulator (#920): Floci + the AWS env that redirects the SDK / observe.
56
60
  emulator: FLOCI_EMULATOR,