@go-to-k/cdkd 0.233.0 → 0.234.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/cli.js +26 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1500,7 +1500,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1500
1500
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1501
1501
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1502
1502
|
function getCdkdVersion() {
|
|
1503
|
-
return "0.
|
|
1503
|
+
return "0.234.0";
|
|
1504
1504
|
}
|
|
1505
1505
|
/**
|
|
1506
1506
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -47876,6 +47876,28 @@ function buildSubstitutionContextFromImageContext(context) {
|
|
|
47876
47876
|
return subContext;
|
|
47877
47877
|
}
|
|
47878
47878
|
/**
|
|
47879
|
+
* A container-image URI that points at a CDK-bootstrap OR cdkd-owned assets
|
|
47880
|
+
* ECR repository:
|
|
47881
|
+
*
|
|
47882
|
+
* - `cdk-<qualifier>-container-assets-<acct>-<region>` — the CDK bootstrap
|
|
47883
|
+
* repo (default qualifier `hnb659fds`, or a custom `cdk bootstrap
|
|
47884
|
+
* --qualifier` value);
|
|
47885
|
+
* - `cdkd-container-assets-<acct>-<region>` — the repo `cdkd bootstrap`
|
|
47886
|
+
* creates and `cdkd deploy` publishes into once a bootstrap marker exists
|
|
47887
|
+
* (issue #1002; a migrated stack's template / `--from-state` state carries
|
|
47888
|
+
* this shape).
|
|
47889
|
+
*
|
|
47890
|
+
* Either is a CDK asset image the ECS runner resolves back to the on-disk
|
|
47891
|
+
* `cdk.out` build, so both must classify as `kind: 'cdk-asset'`. The `cdk-`
|
|
47892
|
+
* qualifier is generalized to `[a-z0-9]+` so a custom-qualifier bootstrap is
|
|
47893
|
+
* matched too (previously only the hardcoded `hnb659fds` default was).
|
|
47894
|
+
*/
|
|
47895
|
+
const CDK_ASSET_IMAGE_REPO_RE = /(?:cdk-[a-z0-9]+|cdkd)-container-assets-/;
|
|
47896
|
+
/** True when `uri` embeds a CDK-bootstrap or cdkd-owned container-assets repo. */
|
|
47897
|
+
function isCdkAssetImageUri(uri) {
|
|
47898
|
+
return CDK_ASSET_IMAGE_REPO_RE.test(uri);
|
|
47899
|
+
}
|
|
47900
|
+
/**
|
|
47879
47901
|
* Parse the `Image` field of an ECS container definition.
|
|
47880
47902
|
*
|
|
47881
47903
|
* Three shapes:
|
|
@@ -47915,7 +47937,7 @@ function parseContainerImage(raw, containerName, taskLogicalId, resources, _stac
|
|
|
47915
47937
|
if (joinResolved.kind === "unsupported-join") throw new EcsTaskResolutionError(`Container '${containerName}' in task '${taskLogicalId}' has an unsupported Fn::Join Image shape: ${joinResolved.reason}. cdkd local run-task recognizes the canonical CDK 2.x ContainerImage.fromEcrRepository Fn::Join shape (delimiter "" with nested Fn::Select/Fn::Split over an ECR Repository Arn GetAtt + Ref to the repo).`);
|
|
47916
47938
|
const flat = extractImageString(raw);
|
|
47917
47939
|
if (!flat) throw new EcsTaskResolutionError(`Container '${containerName}' in task '${taskLogicalId}' has an unparseable Image property. cdkd local run-task v1 supports flat string images, single-key Fn::Sub bodies, and CDK-asset Image references.`);
|
|
47918
|
-
if (flat
|
|
47940
|
+
if (isCdkAssetImageUri(flat)) {
|
|
47919
47941
|
const hashMatch = /:([a-f0-9]{8,})$/.exec(flat);
|
|
47920
47942
|
const out = { kind: "cdk-asset" };
|
|
47921
47943
|
if (hashMatch) out.assetHash = hashMatch[1];
|
|
@@ -47963,7 +47985,7 @@ function findUnresolvedEcrRepositoryRef(substituted, resources) {
|
|
|
47963
47985
|
* `Fn::GetAtt` path can share the regex-match branches.
|
|
47964
47986
|
*/
|
|
47965
47987
|
function classifyResolvedImage(uri) {
|
|
47966
|
-
if (uri
|
|
47988
|
+
if (isCdkAssetImageUri(uri)) {
|
|
47967
47989
|
const hashMatch = /:([a-f0-9]{8,})$/.exec(uri);
|
|
47968
47990
|
const out = { kind: "cdk-asset" };
|
|
47969
47991
|
if (hashMatch) out.assetHash = hashMatch[1];
|
|
@@ -55989,7 +56011,7 @@ function reorderArgs(argv) {
|
|
|
55989
56011
|
async function main() {
|
|
55990
56012
|
installPipeCloseHandler();
|
|
55991
56013
|
const program = new Command();
|
|
55992
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
56014
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.234.0");
|
|
55993
56015
|
program.addCommand(createBootstrapCommand());
|
|
55994
56016
|
program.addCommand(createSynthCommand());
|
|
55995
56017
|
program.addCommand(createListCommand());
|