@go-to-k/cdkd 0.283.13 → 0.283.15
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-CrVgG0Pj.js → asg-provider-Dl2MK3if.js} +2 -2
- package/dist/{asg-provider-CrVgG0Pj.js.map → asg-provider-Dl2MK3if.js.map} +1 -1
- package/dist/cli.js +352 -74
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BdKa1DA4.js → deploy-engine-D-4ZvtGc.js} +58 -8
- package/dist/{deploy-engine-BdKa1DA4.js.map → deploy-engine-D-4ZvtGc.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -14018,7 +14018,7 @@ var CloudControlProvider = class {
|
|
|
14018
14018
|
if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
|
|
14019
14019
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
14020
14020
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
14021
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
14021
|
+
const { ASGProvider } = await import("./asg-provider-Dl2MK3if.js").then((n) => n.n);
|
|
14022
14022
|
return await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
14023
14023
|
}
|
|
14024
14024
|
const isProtectedEc2Instance = context?.removeProtection === true && resourceType === "AWS::EC2::Instance";
|
|
@@ -14840,6 +14840,47 @@ const CR_LOG_TAIL_WARN_MAX_CHARS = 2e3;
|
|
|
14840
14840
|
*/
|
|
14841
14841
|
const CR_LOG_TAIL_BOILERPLATE = /^(START|END|REPORT|XRAY|INIT_START|INIT_REPORT|RESTORE_START|RESTORE_REPORT|EXTENSION) /;
|
|
14842
14842
|
/**
|
|
14843
|
+
* Matches an SNS topic ARN in ANY AWS partition (issue #1815).
|
|
14844
|
+
*
|
|
14845
|
+
* The partition segment is read OFF THE ARN rather than derived from a region
|
|
14846
|
+
* through `derivePartitionAndUrlSuffix` (`src/utils/aws-partition.ts`), which
|
|
14847
|
+
* is the right tool for the seven sites PR #1834 fixed but the wrong one here.
|
|
14848
|
+
* That helper answers "given a region, which partition am I in"; this is a
|
|
14849
|
+
* CLASSIFIER over an ARN the caller already holds, so the partition is present
|
|
14850
|
+
* in the input and needs no derivation — and there is no region in hand at
|
|
14851
|
+
* this call site to derive from anyway.
|
|
14852
|
+
*
|
|
14853
|
+
* `aws[a-z0-9-]*` deliberately accepts any partition name rather than
|
|
14854
|
+
* enumerating today's (`aws` / `aws-cn` / `aws-us-gov` / `aws-iso*` /
|
|
14855
|
+
* `aws-eusc`), matching `IAM_ROLE_ARN_RE` in `src/utils/role-arn.ts`. A closed
|
|
14856
|
+
* list is exactly the failure this issue is about: it goes stale the moment
|
|
14857
|
+
* AWS adds a partition. Being loose is safe for a routing predicate — the
|
|
14858
|
+
* service segment (`:sns:`) is what discriminates, and a string that is not a
|
|
14859
|
+
* real ARN cannot be a valid ServiceToken in the first place.
|
|
14860
|
+
*/
|
|
14861
|
+
const SNS_SERVICE_TOKEN_ARN_RE = /^arn:aws[a-z0-9-]*:sns:/;
|
|
14862
|
+
/**
|
|
14863
|
+
* The synthetic `StackId` handed to a custom-resource handler in place of the
|
|
14864
|
+
* CloudFormation stack ARN cdkd does not have.
|
|
14865
|
+
*
|
|
14866
|
+
* **Its `arn:aws:` prefix is deliberately NOT partition-derived** (issue
|
|
14867
|
+
* #1815, which fixed the SNS routing predicate above). Every segment of this
|
|
14868
|
+
* value is fabricated — the region is a fixed `us-east-1` rather than the
|
|
14869
|
+
* deploy region, and the account is the all-zero placeholder — so it addresses
|
|
14870
|
+
* nothing and cannot be made to. Deriving ONLY the partition would produce a
|
|
14871
|
+
* strictly LESS coherent ARN (`arn:aws-cn:cloudformation:us-east-1:0000...`,
|
|
14872
|
+
* a China partition carrying a commercial region) while fixing nothing a
|
|
14873
|
+
* handler could rely on. The coherent fix is to synthesize the real
|
|
14874
|
+
* partition / region / account together, which changes what every handler
|
|
14875
|
+
* observes and belongs in its own change.
|
|
14876
|
+
*
|
|
14877
|
+
* Factored into one place so the rationale cannot go stale against two other
|
|
14878
|
+
* copies: the create / update / delete request builders all use it.
|
|
14879
|
+
*/
|
|
14880
|
+
function syntheticStackId(logicalId) {
|
|
14881
|
+
return `arn:aws:cloudformation:us-east-1:000000000000:stack/cdkd-${logicalId}/cdkd`;
|
|
14882
|
+
}
|
|
14883
|
+
/**
|
|
14843
14884
|
* `true` when the tail contains at least one line the HANDLER produced.
|
|
14844
14885
|
*
|
|
14845
14886
|
* Deliberately a positive test for handler output rather than a length check:
|
|
@@ -15072,7 +15113,7 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
15072
15113
|
ResponseURL: invocation.responseURL,
|
|
15073
15114
|
ResourceType: resourceType,
|
|
15074
15115
|
LogicalResourceId: logicalId,
|
|
15075
|
-
StackId:
|
|
15116
|
+
StackId: syntheticStackId(logicalId),
|
|
15076
15117
|
ResourceProperties: this.stringifyProperties(properties)
|
|
15077
15118
|
}));
|
|
15078
15119
|
if (cfnResponse.Status === "FAILED") throw new Error(`Custom resource handler returned FAILED: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
@@ -15104,7 +15145,7 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
15104
15145
|
ResourceType: resourceType,
|
|
15105
15146
|
LogicalResourceId: logicalId,
|
|
15106
15147
|
PhysicalResourceId: physicalId,
|
|
15107
|
-
StackId:
|
|
15148
|
+
StackId: syntheticStackId(logicalId),
|
|
15108
15149
|
ResourceProperties: this.stringifyProperties(properties),
|
|
15109
15150
|
OldResourceProperties: this.stringifyProperties(previousProperties)
|
|
15110
15151
|
}));
|
|
@@ -15156,7 +15197,7 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
15156
15197
|
ResourceType: resourceType,
|
|
15157
15198
|
LogicalResourceId: logicalId,
|
|
15158
15199
|
PhysicalResourceId: physicalId,
|
|
15159
|
-
StackId:
|
|
15200
|
+
StackId: syntheticStackId(logicalId),
|
|
15160
15201
|
ResourceProperties: this.stringifyProperties(properties)
|
|
15161
15202
|
}));
|
|
15162
15203
|
if (cfnResponse.Status === "FAILED") this.logger.warn(`Custom resource delete handler returned FAILED for ${logicalId}: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
@@ -15166,10 +15207,19 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
15166
15207
|
}
|
|
15167
15208
|
}
|
|
15168
15209
|
/**
|
|
15169
|
-
* Check if a ServiceToken is an SNS topic ARN
|
|
15210
|
+
* Check if a ServiceToken is an SNS topic ARN.
|
|
15211
|
+
*
|
|
15212
|
+
* This is the SNS-vs-Lambda routing decision for the whole provider — it
|
|
15213
|
+
* gates `sendRequest` (publish to SNS + poll S3 vs synchronous Invoke), the
|
|
15214
|
+
* delete path's backing-Lambda pre-check, and `recycleBackingFunctionExecEnv`.
|
|
15215
|
+
* A hardcoded `arn:aws:` prefix therefore did not merely record a wrong
|
|
15216
|
+
* string outside the commercial partition: an `arn:aws-cn:sns:` /
|
|
15217
|
+
* `arn:aws-us-gov:sns:` ServiceToken was classified Lambda-backed and every
|
|
15218
|
+
* one of those paths took the wrong branch (issue #1815). See
|
|
15219
|
+
* {@link SNS_SERVICE_TOKEN_ARN_RE} for why the partition is read off the ARN.
|
|
15170
15220
|
*/
|
|
15171
15221
|
isSnsServiceToken(serviceToken) {
|
|
15172
|
-
return
|
|
15222
|
+
return SNS_SERVICE_TOKEN_ARN_RE.test(serviceToken);
|
|
15173
15223
|
}
|
|
15174
15224
|
/**
|
|
15175
15225
|
* Single GetFunction probe used by the delete path's fail-fast pre-check
|
|
@@ -21072,7 +21122,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
21072
21122
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
21073
21123
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
21074
21124
|
function getCdkdVersion() {
|
|
21075
|
-
return "0.283.
|
|
21125
|
+
return "0.283.15";
|
|
21076
21126
|
}
|
|
21077
21127
|
/**
|
|
21078
21128
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -23289,4 +23339,4 @@ var DeployEngine = class {
|
|
|
23289
23339
|
|
|
23290
23340
|
//#endregion
|
|
23291
23341
|
export { coerceCfnBoolean as $, resolveStateBucketWithDefault as $t, cyan as A, MissingCdkCliError as An, AssetModeResolver as At, findSilentDropProperties as B, formatError as Bn, getDockerCmd as Bt, makeCanonicalizePropertiesFn as C, ConfigError as Cn, stringifyValue as Ct, renderStatefulReason as D, LocalMigrateError as Dn, loadPublishableAssetManifest as Dt, isStatefulRecreateTargetSync as E, LocalInvokeBuildError as En, createAssetRedirectResolver as Et, IAMRoleProvider as F, ResourceUpdateNotSupportedError as Fn, validateAssetBucketName as Ft, IntrinsicFunctionResolver as G, isRetryableTransientError as Gn, Synthesizer as Gt, slowCcOperationTimeoutMs as H, normalizeAwsError as Hn, runDockerStreaming as Ht, collectInlinePolicyNamesManagedBySiblings as I, StackHasActiveImportsError as In, validateContainerRepoName as It, refStateLookupFromResource as J, __exportAll as Jn, getLegacyStateBucketName as Jt, cfnRefValueFromPhysicalId as K, isThrottlingError as Kn, synthesisStatusMessage as Kt, clearOnUpdateRemoval as L, StackTerminationProtectionError as Ln, buildDenyExternalAccessPolicy as Lt, green as M, PartialFailureError as Mn, ensureAssetStorage as Mt, red as N, ProvisioningError as Nn, getBootstrapMarkerKey as Nt, formatResourceLine as O, LocalStartServiceError as On, rewriteTemplateAssetReferences as Ot, yellow as P, ResourceTimeoutError as Pn, parseBootstrapMarker as Pt, assertRegionMatch as Q, resolveSkipPrefix as Qt, ProviderRegistry as R, StateError as Rn, buildDockerImage as Rt, unsupportedFinalSnapshotError as S, CdkdError as Sn, AssetPublisher as St, MULTI_REGION_RECREATE_BLOCKED_TYPES as T, DeployCancelledError as Tn, buildAssetRedirectMap as Tt, disableInstanceApiTermination as U, withErrorHandling as Un, AssetManifestLoader as Ut, CloudControlProvider as V, isCdkdError as Vn, runDockerForeground as Vt, isTerminationProtectionPropagationError as W, isMarkedNonRetryable as Wn, getDockerImageBySourceHash as Wt, normalizeAwsTagsToCfn as X, resolveAutoAssetStorage as Xt, WAFv2WebACLProvider as Y, resolveApp as Yt, resolveExplicitPhysicalId as Z, resolveCaptureObservedState as Zt, buildFinalSnapshotIdentifier as _, AwsClients as _n, TemplateParser as _t, DeploymentEventsStore as a, CFN_TEMPLATE_URL_LIMIT as an, requireConfigObject as at, isFinalSnapshotError as b, setAwsClients as bn, rebuildClientForBucketRegion as bt, replayFailedOperations as c, uploadCfnTemplate as cn, s3BucketDomainName as ct, deleteSkipReason as d, canonicalizeRegion as dn, s3BucketWebsiteUrl as dt, resolveStateBucketWithDefaultAndSource as en, configBooleanRefusal as et, withResourceDeadline as f, derivePartitionAndUrlSuffix as fn, applyRoleArnIfSet as ft, PRE_DELETE_SNAPSHOT_TYPES as g, resolveBucketRegion as gn, DagBuilder as gt, ATOMIC_FINAL_SNAPSHOT_TYPES as h, clearBucketRegionCache as hn, withRetry as ht, DeploymentEventsReader as i, CFN_TEMPLATE_BODY_LIMIT as in, requireConfigArray as it, gray as j, NestedStackChildDirectDestroyError as jn, BOOTSTRAP_MARKER_PREFIX as jt, bold as k, LockError as kn, escapeRegExp as kt, replayRollback as l, expectedOwnerParam as ln, s3BucketDualStackDomainName as lt, computeImplicitDeleteEdges as m, processStackMessages as mn, describeTypeWithThrottleRetry as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, stateBucketExistenceConfirmed as nn, readConfigString as nt, planFailedOps as o, MIGRATE_TMP_PREFIX as on, requireConfigString as ot, IMPLICIT_DELETE_DEPENDENCIES as p, AssemblyReader as pn, DiffCalculator as pt, getAccountInfo as q, markNonRetryable as qn, getDefaultStateBucketName as qt, DeployEngine as r, warnDeprecatedNoPrefixCliFlag as rn, replayWarn as rt, planRollback as s, findLargeInlineResources as sn, s3BucketArn as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveUseCdkBootstrapAssets as tn, configStringRefusal as tt, UNSPECIFIED_SKIP_REASON as u, PARTITION_TABLE as un, s3BucketRegionalDomainName as ut, ccRoutedFinalSnapshotError as v, getAwsClients as vn, LockManager as vt, extractDeploymentEventError as w, DependencyError as wn, WorkGraph as wt, refusesFinalSnapshot as x, AssetError as xn, shouldRetainResource as xt, createPreDeleteFinalSnapshot as y, resetAwsClients as yn, S3StateBackend as yt, findActionableSilentDrops as z, SynthesisError as zn, formatDockerLoginError as zt };
|
|
23292
|
-
//# sourceMappingURL=deploy-engine-
|
|
23342
|
+
//# sourceMappingURL=deploy-engine-D-4ZvtGc.js.map
|