@intentius/chant-lexicon-aws 0.102.0 → 0.104.1
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-delivery.d.ts","sourceRoot":"","sources":["../../src/components/host-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"host-delivery.d.ts","sourceRoot":"","sources":["../../src/components/host-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAK5E,MAAM,WAAW,eAAe;IAC9B,oKAAoK;IACpK,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4HAA4H;IAC5H,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;IAC1G,gDAAgD;IAChD,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACrC,oLAAoL;IACpL,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;CAChB;AAsBD;;;;;;;;;;;GAWG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ED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "a705533192ee0dfa88b950121915117f0e2115b40a04fff68b33ab0480c67395",
|
|
5
5
|
"meta.json": "31795ba62a1da7503a8d55192c212ac44c56a56cdb2d4fde47966a1abc8b021b",
|
|
6
6
|
"types/index.d.ts": "1038589dccfc1e690e3373014bff4d319e4ed3b421db2448ed4e70d51eb9d1f2",
|
|
7
7
|
"rules/hardcoded-region.ts": "5a0eaf7ab391231fe6cd51426ece29539cb4b36f31c8dd060956638fed55722a",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe",
|
|
74
74
|
"skills/chant-aws-carve-terraform.md": "8780b94ce60aded935938d5ef20ea667738354051da1bf9ca6d70d9886f65d21"
|
|
75
75
|
},
|
|
76
|
-
"composite": "
|
|
76
|
+
"composite": "ee9b7197c9f276f5c344e9cc3db6920458ae7dc8d8c18d4363bb8f98522e2d35"
|
|
77
77
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.1",
|
|
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.
|
|
83
|
+
"@intentius/chant": "^0.104.1",
|
|
84
84
|
"typescript": "^5.9.3"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -118,4 +118,24 @@ describe("copy-to-host (#557 — SSM Run Command)", () => {
|
|
|
118
118
|
const out = await createCopyToHostCapability(mock.executor).run(hostCtx, { from: "s3://b/x", host: "i", to: "/x" });
|
|
119
119
|
expect(out).toEqual({ bytesCopied: 0 });
|
|
120
120
|
});
|
|
121
|
+
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
describe("remote-exec with a release (#3061)", () => {
|
|
125
|
+
it("exports the release attributes before the command, so docker compose up fills the Compose file's reference", async () => {
|
|
126
|
+
const mock = createMockCloudExecutor();
|
|
127
|
+
await createRemoteExecCapability(mock.executor).run(
|
|
128
|
+
{ ...hostCtx, release: { version: "sha256:abc", revision: "0123abc" } },
|
|
129
|
+
{ host: "i-1", command: "docker compose -f /srv/app/compose.yaml up -d" },
|
|
130
|
+
);
|
|
131
|
+
expect(mock.calls[0]!.args).toMatchObject({
|
|
132
|
+
command: "export CHANT_RELEASE_ATTRIBUTES=',service.version=sha256%3Aabc,vcs.ref.head.revision=0123abc'; docker compose -f /srv/app/compose.yaml up -d",
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it("leaves the command as it is without a release", async () => {
|
|
137
|
+
const mock = createMockCloudExecutor();
|
|
138
|
+
await createRemoteExecCapability(mock.executor).run({ ...hostCtx, release: {} }, { host: "i-1", command: "ls" });
|
|
139
|
+
expect(mock.calls[0]!.args).toMatchObject({ command: "ls" });
|
|
140
|
+
});
|
|
121
141
|
});
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import type { Capability } from "@intentius/chant/components/capability";
|
|
24
24
|
import { defaultCloudExecutor, type CloudExecutor } from "./cloud-executor";
|
|
25
|
+
import { releaseEnvironment } from "@intentius/chant/telemetry-attribution";
|
|
25
26
|
|
|
26
27
|
// ── code-deploy (AWS CodeDeploy) ─────────────────────────────────────────────
|
|
27
28
|
|
|
@@ -181,11 +182,15 @@ export function createRemoteExecCapability(executor: CloudExecutor = defaultClou
|
|
|
181
182
|
return {
|
|
182
183
|
kind: "remote-exec",
|
|
183
184
|
rollbackPolicy: "needs-opt-out",
|
|
184
|
-
async run(
|
|
185
|
+
async run(ctx, input) {
|
|
185
186
|
if (input.via === "ssh") {
|
|
186
187
|
throw new Error(`remote-exec: ssh transport not yet supported for host "${input.host}" — use the default ssm transport`);
|
|
187
188
|
}
|
|
188
|
-
|
|
189
|
+
// A release run exports its attributes on the host (#3061, ws-081), so a `docker compose up`
|
|
190
|
+
// fills the Compose file's `${CHANT_RELEASE_ATTRIBUTES:-}`. The value is percent-encoded, so
|
|
191
|
+
// single quotes hold it.
|
|
192
|
+
const exports = Object.entries(releaseEnvironment(ctx.release)).map(([k, v]) => `export ${k}='${v}'; `).join("");
|
|
193
|
+
return executor.host.exec({ host: input.host, command: `${exports}${input.command}`, cwd: input.cwd });
|
|
189
194
|
},
|
|
190
195
|
};
|
|
191
196
|
}
|