@go-to-k/cdkd 0.281.6 → 0.281.7
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/{asg-provider-bIEhcjVs.js → asg-provider-Lj_P_wtb.js} +2 -2
- package/dist/{asg-provider-bIEhcjVs.js.map → asg-provider-Lj_P_wtb.js.map} +1 -1
- package/dist/cli.js +113 -10
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BadwP9FL.js → deploy-engine-B8Qo1vPU.js} +3 -3
- package/dist/{deploy-engine-BadwP9FL.js.map → deploy-engine-B8Qo1vPU.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-
|
|
2
|
+
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-B8Qo1vPU.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-Lj_P_wtb.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -57068,14 +57068,49 @@ const COMPOSITE_ID_SPLITTERS = {
|
|
|
57068
57068
|
propertiesOverlay: { RestApiId: restApiId }
|
|
57069
57069
|
};
|
|
57070
57070
|
},
|
|
57071
|
-
"AWS::EC2::VPCGatewayAttachment": (
|
|
57072
|
-
const parts =
|
|
57073
|
-
if (parts.length !== 2) throw new Error(`expected 2 parts (
|
|
57074
|
-
|
|
57075
|
-
|
|
57076
|
-
|
|
57077
|
-
|
|
57071
|
+
"AWS::EC2::VPCGatewayAttachment": (physicalId, properties) => {
|
|
57072
|
+
const parts = physicalId.split("|");
|
|
57073
|
+
if (parts.length !== 2) throw new Error(`expected 2 parts ('<gatewayId>|<vpcId>' or '<AttachmentType>|<vpcId>'), got ${parts.length}: '${physicalId}'`);
|
|
57074
|
+
const [first, vpcId] = parts;
|
|
57075
|
+
if (!first || !vpcId) throw new Error(`empty part in composite physical id: '${physicalId}'`);
|
|
57076
|
+
return {
|
|
57077
|
+
resourceIdentifier: {
|
|
57078
|
+
AttachmentType: resolveGatewayAttachmentType(first, properties),
|
|
57079
|
+
VpcId: vpcId
|
|
57080
|
+
},
|
|
57081
|
+
propertiesOverlay: { VpcId: vpcId }
|
|
57082
|
+
};
|
|
57078
57083
|
},
|
|
57084
|
+
"AWS::ApiGateway::Deployment": restApiChildSplitter({
|
|
57085
|
+
resourceType: "AWS::ApiGateway::Deployment",
|
|
57086
|
+
childField: "DeploymentId",
|
|
57087
|
+
childFirstInCompositeId: true,
|
|
57088
|
+
narrowOverlayToRestApiId: true
|
|
57089
|
+
}),
|
|
57090
|
+
"AWS::ApiGateway::Stage": restApiChildSplitter({
|
|
57091
|
+
resourceType: "AWS::ApiGateway::Stage",
|
|
57092
|
+
childField: "StageName",
|
|
57093
|
+
childFirstInCompositeId: false,
|
|
57094
|
+
narrowOverlayToRestApiId: false
|
|
57095
|
+
}),
|
|
57096
|
+
"AWS::ApiGateway::Authorizer": restApiChildSplitter({
|
|
57097
|
+
resourceType: "AWS::ApiGateway::Authorizer",
|
|
57098
|
+
childField: "AuthorizerId",
|
|
57099
|
+
childFirstInCompositeId: false,
|
|
57100
|
+
narrowOverlayToRestApiId: true
|
|
57101
|
+
}),
|
|
57102
|
+
"AWS::ApiGateway::Model": restApiChildSplitter({
|
|
57103
|
+
resourceType: "AWS::ApiGateway::Model",
|
|
57104
|
+
childField: "Name",
|
|
57105
|
+
childFirstInCompositeId: false,
|
|
57106
|
+
narrowOverlayToRestApiId: false
|
|
57107
|
+
}),
|
|
57108
|
+
"AWS::ApiGateway::RequestValidator": restApiChildSplitter({
|
|
57109
|
+
resourceType: "AWS::ApiGateway::RequestValidator",
|
|
57110
|
+
childField: "RequestValidatorId",
|
|
57111
|
+
childFirstInCompositeId: false,
|
|
57112
|
+
narrowOverlayToRestApiId: true
|
|
57113
|
+
}),
|
|
57079
57114
|
"AWS::ApiGatewayV2::Integration": (physicalId, properties) => {
|
|
57080
57115
|
const apiId = readStringProperty(properties, "ApiId", "AWS::ApiGatewayV2::Integration");
|
|
57081
57116
|
return {
|
|
@@ -57107,6 +57142,74 @@ const COMPOSITE_ID_SPLITTERS = {
|
|
|
57107
57142
|
};
|
|
57108
57143
|
}
|
|
57109
57144
|
};
|
|
57145
|
+
/**
|
|
57146
|
+
* The two values CFn's `AWS::EC2::VPCGatewayAttachment.AttachmentType` takes.
|
|
57147
|
+
* The field is `readOnlyProperties`, so cdkd never sends it — it only has to
|
|
57148
|
+
* be reproduced for the IMPORT identifier map.
|
|
57149
|
+
*/
|
|
57150
|
+
const GATEWAY_ATTACHMENT_TYPES = ["InternetGateway", "VPN"];
|
|
57151
|
+
/**
|
|
57152
|
+
* Resolve `AttachmentType` for an `AWS::EC2::VPCGatewayAttachment` from the
|
|
57153
|
+
* first segment of cdkd's composite physicalId plus the recorded properties.
|
|
57154
|
+
*
|
|
57155
|
+
* The Cloud-Control-written shape already carries the attachment type verbatim
|
|
57156
|
+
* (it is the CFn primaryIdentifier's first field). The SDK-written shape
|
|
57157
|
+
* carries the gateway id instead, so the type is derived from WHICH gateway
|
|
57158
|
+
* property cdkd recorded — never hardcoded to `InternetGateway`, which would
|
|
57159
|
+
* ship a wrong identifier for a VPN attachment and make CFn's identifier-match
|
|
57160
|
+
* reject the import.
|
|
57161
|
+
*/
|
|
57162
|
+
function resolveGatewayAttachmentType(firstSegment, properties) {
|
|
57163
|
+
if (GATEWAY_ATTACHMENT_TYPES.includes(firstSegment)) return firstSegment;
|
|
57164
|
+
if (typeof properties["InternetGatewayId"] === "string" && properties["InternetGatewayId"]) return "InternetGateway";
|
|
57165
|
+
if (typeof properties["VpnGatewayId"] === "string" && properties["VpnGatewayId"]) return "VPN";
|
|
57166
|
+
if (firstSegment.startsWith("igw-")) return "InternetGateway";
|
|
57167
|
+
if (firstSegment.startsWith("vgw-")) return "VPN";
|
|
57168
|
+
throw new Error(`cannot determine AttachmentType for AWS::EC2::VPCGatewayAttachment: cdkd state's properties carry neither 'InternetGatewayId' nor 'VpnGatewayId', and the physical id segment '${firstSegment}' is not a recognized gateway id. State entry may be corrupt or written by an older cdkd binary; re-deploy the resource to refresh state.`);
|
|
57169
|
+
}
|
|
57170
|
+
/**
|
|
57171
|
+
* Build a splitter for an `AWS::ApiGateway::*` child type whose CFn primary
|
|
57172
|
+
* identifier is the parent `RestApiId` plus one child field.
|
|
57173
|
+
*
|
|
57174
|
+
* Two stored shapes are accepted, because both exist in state in the wild:
|
|
57175
|
+
* the SDK providers store the BARE child value and read the parent from the
|
|
57176
|
+
* recorded properties, while a type routed through Cloud Control by the #614
|
|
57177
|
+
* silent-drop rule stores CC's `|`-joined composite — in CFn
|
|
57178
|
+
* primaryIdentifier order, which is why `childFirstInCompositeId` exists
|
|
57179
|
+
* (`AWS::ApiGateway::Deployment` declares `[DeploymentId, RestApiId]`, every
|
|
57180
|
+
* other member of the family declares `RestApiId` first).
|
|
57181
|
+
*
|
|
57182
|
+
* `narrowOverlayToRestApiId` is set for the types whose child field is
|
|
57183
|
+
* `readOnlyProperties` — writing one into the synth template's `Properties`
|
|
57184
|
+
* is rejected by CFn at changeset-create.
|
|
57185
|
+
*/
|
|
57186
|
+
function restApiChildSplitter(options) {
|
|
57187
|
+
const { resourceType, childField, childFirstInCompositeId, narrowOverlayToRestApiId } = options;
|
|
57188
|
+
const compositeShape = childFirstInCompositeId ? `<${childField}>|<restApiId>` : `<restApiId>|<${childField}>`;
|
|
57189
|
+
return (physicalId, properties) => {
|
|
57190
|
+
if (!physicalId.trim()) throw new Error(`empty physical id for ${resourceType} (expected a ${childField})`);
|
|
57191
|
+
const parts = physicalId.split("|");
|
|
57192
|
+
if (parts.length > 2) throw new Error(`expected a bare ${childField} or '${compositeShape}', got ${parts.length} parts: '${physicalId}'`);
|
|
57193
|
+
let restApiId;
|
|
57194
|
+
let childValue;
|
|
57195
|
+
if (parts.length === 2) {
|
|
57196
|
+
const [a, b] = parts;
|
|
57197
|
+
if (!a || !b) throw new Error(`empty part in '${compositeShape}': '${physicalId}'`);
|
|
57198
|
+
[restApiId, childValue] = childFirstInCompositeId ? [b, a] : [a, b];
|
|
57199
|
+
} else {
|
|
57200
|
+
restApiId = readStringProperty(properties, "RestApiId", resourceType);
|
|
57201
|
+
childValue = physicalId;
|
|
57202
|
+
}
|
|
57203
|
+
const resourceIdentifier = {
|
|
57204
|
+
RestApiId: restApiId,
|
|
57205
|
+
[childField]: childValue
|
|
57206
|
+
};
|
|
57207
|
+
return narrowOverlayToRestApiId ? {
|
|
57208
|
+
resourceIdentifier,
|
|
57209
|
+
propertiesOverlay: { RestApiId: restApiId }
|
|
57210
|
+
} : { resourceIdentifier };
|
|
57211
|
+
};
|
|
57212
|
+
}
|
|
57110
57213
|
function readStringProperty(properties, key, resourceType) {
|
|
57111
57214
|
const v = properties[key];
|
|
57112
57215
|
if (typeof v !== "string" || !v) throw new Error(`cdkd state's properties for ${resourceType} is missing '${key}' (the parent identifier required to build the CFn ResourceIdentifier map). State entry may be corrupt or written by an older cdkd binary; re-deploy the resource to refresh state.`);
|
|
@@ -73104,7 +73207,7 @@ function createMigrateCommand() {
|
|
|
73104
73207
|
*/
|
|
73105
73208
|
function buildProgram() {
|
|
73106
73209
|
const program = new Command();
|
|
73107
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.
|
|
73210
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.7");
|
|
73108
73211
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
73109
73212
|
const { profile } = actionCommand.optsWithGlobals();
|
|
73110
73213
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|