@go-to-k/cdkd 0.285.16 → 0.286.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/{asg-provider-DoP-32eU.js → asg-provider-D9Lc_ngz.js} +2 -2
- package/dist/{asg-provider-DoP-32eU.js.map → asg-provider-D9Lc_ngz.js.map} +1 -1
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DuFUy9D0.js → deploy-engine-DYYs56Gt.js} +42 -57
- package/dist/deploy-engine-DYYs56Gt.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-C-xfsrSP.js → program-BXXm1RTv.js} +294 -1207
- package/dist/{program-C-xfsrSP.js.map → program-BXXm1RTv.js.map} +1 -1
- package/dist/{version-C_ZRHikq.js → version-Dkd6KwPz.js} +2 -2
- package/dist/{version-C_ZRHikq.js.map → version-Dkd6KwPz.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DuFUy9D0.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as withStackName, d as applyDefaultNameForFallback, f as generateResourceName, h as looksLikeCdkdGeneratedName, m as getCurrentStackName, n as getLogger, p as generateResourceNameWithFallback, r as isStdoutReservedForPayload, s as getLiveRenderer } from "./logger-Dw-3y48G.js";
|
|
2
2
|
import { t as awsClientDefaults } from "./aws-client-defaults-D-iYiIJ6.js";
|
|
3
|
-
import { t as getCdkdVersion } from "./version-
|
|
3
|
+
import { t as getCdkdVersion } from "./version-Dkd6KwPz.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -1394,38 +1394,6 @@ var LocalStartServiceError = class LocalStartServiceError extends CdkdError {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
};
|
|
1396
1396
|
/**
|
|
1397
|
-
* Signals that the upstream `cdk` CLI is not available on PATH (or at
|
|
1398
|
-
* the override path passed via `--cdk-bin`). Surfaced from `cdkd migrate`
|
|
1399
|
-
* (#465 PR A) before any other work runs.
|
|
1400
|
-
*
|
|
1401
|
-
* The message includes the install hint `npm install -g aws-cdk@latest`
|
|
1402
|
-
* so users on a fresh machine see exactly how to recover.
|
|
1403
|
-
*/
|
|
1404
|
-
var MissingCdkCliError = class MissingCdkCliError extends CdkdError {
|
|
1405
|
-
constructor(detail, cause) {
|
|
1406
|
-
super(`${detail ?? "upstream 'cdk' CLI not found on PATH"}. 'cdkd migrate' shells out to the upstream aws-cdk CLI for L1 codegen — install it with 'npm install -g aws-cdk@latest' (or pass --cdk-bin <path>).`, "MISSING_CDK_CLI", cause);
|
|
1407
|
-
this.name = "MissingCdkCliError";
|
|
1408
|
-
Object.setPrototypeOf(this, MissingCdkCliError.prototype);
|
|
1409
|
-
}
|
|
1410
|
-
};
|
|
1411
|
-
/**
|
|
1412
|
-
* Generic local-migrate orchestration failure (#465 PR A). Used by
|
|
1413
|
-
* `cdkd migrate` for pre-flight rejections (Custom Resource / nested
|
|
1414
|
-
* stack / non-terminal CFn stack state), output-dir collisions, and
|
|
1415
|
-
* `cdk migrate` subprocess failures whose underlying stderr is folded
|
|
1416
|
-
* into the error message. Exit code 2 (partial-failure family) because
|
|
1417
|
-
* some pre-flight failures leave the user with a partially-populated
|
|
1418
|
-
* output directory that's still useful for debugging.
|
|
1419
|
-
*/
|
|
1420
|
-
var LocalMigrateError = class LocalMigrateError extends CdkdError {
|
|
1421
|
-
exitCode = 2;
|
|
1422
|
-
constructor(message, cause) {
|
|
1423
|
-
super(message, "LOCAL_MIGRATE_ERROR", cause);
|
|
1424
|
-
this.name = "LocalMigrateError";
|
|
1425
|
-
Object.setPrototypeOf(this, LocalMigrateError.prototype);
|
|
1426
|
-
}
|
|
1427
|
-
};
|
|
1428
|
-
/**
|
|
1429
1397
|
* CloudFormation macro / `Fn::Transform` expansion failure (#463).
|
|
1430
1398
|
*
|
|
1431
1399
|
* cdkd hands templates that declare `Transform: [...]` (or carry
|
|
@@ -22378,7 +22346,7 @@ var CloudControlProvider = class {
|
|
|
22378
22346
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
22379
22347
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
22380
22348
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
22381
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
22349
|
+
const { ASGProvider } = await import("./asg-provider-D9Lc_ngz.js").then((n) => n.n);
|
|
22382
22350
|
return withIndeterminateGuard(await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context), indeterminateGuard);
|
|
22383
22351
|
}
|
|
22384
22352
|
const isProtectedEc2Instance = context?.removeProtection === true && resourceType === "AWS::EC2::Instance";
|
|
@@ -29204,14 +29172,21 @@ function formatResourceLine(op, logicalId, resourceType, verbOverride) {
|
|
|
29204
29172
|
* - `AWS::S3::Bucket`: empty buckets are safe to recreate. The
|
|
29205
29173
|
* deploy engine probes `s3:ListObjectVersions` at plan time and only
|
|
29206
29174
|
* refuses when the bucket has at least one object.
|
|
29207
|
-
* - `AWS::Logs::LogGroup`:
|
|
29208
|
-
*
|
|
29209
|
-
*
|
|
29210
|
-
*
|
|
29211
|
-
* `LogsLogGroupProvider`
|
|
29212
|
-
*
|
|
29213
|
-
*
|
|
29214
|
-
*
|
|
29175
|
+
* - `AWS::Logs::LogGroup`: a log group holding no log events is safe
|
|
29176
|
+
* to recreate, and RETENTION IS NOT THE SIGNAL FOR THAT (issue
|
|
29177
|
+
* [#2558]). An unset or zero `RetentionInDays` is CloudWatch Logs'
|
|
29178
|
+
* "never expire" — the most data-bearing configuration the type
|
|
29179
|
+
* has, and what `LogsLogGroupProvider` records `0` for — so reading
|
|
29180
|
+
* it as "holds nothing" destroyed years of events on a plain
|
|
29181
|
+
* `cdkd deploy`. A recorded `RetentionInDays > 0` still answers
|
|
29182
|
+
* `has-retention` from the bag alone (a cheap positive, never
|
|
29183
|
+
* probed away); every other bag DEFERS, exactly as the bucket does.
|
|
29184
|
+
* The pre-flight resolves the deferral with a live
|
|
29185
|
+
* `logs:DescribeLogStreams` probe (a log group with no stream can
|
|
29186
|
+
* hold no event, since every event belongs to a stream); mid-deploy,
|
|
29187
|
+
* where no probe can run, it resolves to `has-log-events`.
|
|
29188
|
+
*
|
|
29189
|
+
* Both conditional checks live in {@link isStatefulRecreateTargetSync};
|
|
29215
29190
|
* the bare {@link STATEFUL_TYPES} set is the type-only first-cut.
|
|
29216
29191
|
*
|
|
29217
29192
|
* **Lower bound, enforced by a test** (issue [#2514]'s review round):
|
|
@@ -29385,14 +29360,17 @@ const STATEFUL_TYPES = /* @__PURE__ */ new Set([
|
|
|
29385
29360
|
const MULTI_REGION_RECREATE_BLOCKED_TYPES = /* @__PURE__ */ new Set(["AWS::DynamoDB::GlobalTable"]);
|
|
29386
29361
|
/**
|
|
29387
29362
|
* Cheap, synchronous read of the resource's recorded properties only.
|
|
29388
|
-
*
|
|
29389
|
-
*
|
|
29390
|
-
*
|
|
29363
|
+
* TWO types return `null` meaning DEFER rather than "not stateful":
|
|
29364
|
+
* `AWS::S3::Bucket` always, and `AWS::Logs::LogGroup` whenever the
|
|
29365
|
+
* recorded bag does not already prove `has-retention`. The live probes
|
|
29366
|
+
* that resolve both deferrals (`ListObjectVersions` for the bucket,
|
|
29367
|
+
* `DescribeLogStreams` for the log group) live in
|
|
29391
29368
|
* `src/deployment/recreate-targets.ts#probeStatefulRecreateTargetsAsync`
|
|
29392
|
-
* (
|
|
29369
|
+
* (issues [#648] / [#2558]) and run after this sync first-cut. Sync callers can
|
|
29393
29370
|
* still treat `null` as "not stateful" — the deploy command does both
|
|
29394
29371
|
* passes back-to-back; only callers that explicitly opt out of the
|
|
29395
|
-
* async probe need to assume conservative "stateful" semantics
|
|
29372
|
+
* async probe need to assume conservative "stateful" semantics, which
|
|
29373
|
+
* is what {@link isStatefulRecreateTargetForReplace} exists to do.
|
|
29396
29374
|
*
|
|
29397
29375
|
* Returns the {@link StatefulReason} when the type is stateful (or
|
|
29398
29376
|
* `null` for non-stateful types).
|
|
@@ -29422,19 +29400,25 @@ function isStatefulRecreateTargetSync(resourceType, recordedProperties) {
|
|
|
29422
29400
|
* All of them catch the rejection or classify the diff while the deploy is
|
|
29423
29401
|
* already in flight, so — unlike the `--recreate-via-*` pre-flight, which
|
|
29424
29402
|
* runs {@link probeStatefulRecreateTargetsAsync} (`s3:ListObjectVersions`) —
|
|
29425
|
-
* there is no opportunity to probe an `AWS::S3::Bucket`'s object count
|
|
29426
|
-
* sync check returns `null` for
|
|
29427
|
-
* let a NON-EMPTY bucket
|
|
29428
|
-
* `--force-stateful-recreation`. To
|
|
29429
|
-
*
|
|
29430
|
-
* ANY S3 bucket
|
|
29431
|
-
*
|
|
29432
|
-
*
|
|
29403
|
+
* there is no opportunity to probe an `AWS::S3::Bucket`'s object count, nor an
|
|
29404
|
+
* `AWS::Logs::LogGroup`'s log streams. The sync check returns `null` for both
|
|
29405
|
+
* deferrals, which would let a NON-EMPTY bucket — or a never-expiring log group
|
|
29406
|
+
* — be DELETE + CREATEd (data loss) without `--force-stateful-recreation`. To
|
|
29407
|
+
* stay fail-safe, both deferrals resolve to stateful here: the user must pass
|
|
29408
|
+
* `--force-stateful-recreation` to replace ANY S3 bucket, and any log group
|
|
29409
|
+
* whose recorded bag does not already prove `has-retention`, on any of those
|
|
29410
|
+
* paths — empty or not.
|
|
29411
|
+
*
|
|
29412
|
+
* The log group's arm is the one issue [#2558] added, and the reason it is
|
|
29413
|
+
* needed is that the old predicate treated "no retention recorded" as "holds
|
|
29414
|
+
* nothing" when it is CloudWatch Logs' never-expire. Every other type matches
|
|
29415
|
+
* {@link isStatefulRecreateTargetSync} exactly.
|
|
29433
29416
|
*/
|
|
29434
29417
|
function isStatefulRecreateTargetForReplace(resourceType, recordedProperties) {
|
|
29435
29418
|
const sync = isStatefulRecreateTargetSync(resourceType, recordedProperties);
|
|
29436
29419
|
if (sync) return sync;
|
|
29437
29420
|
if (resourceType === "AWS::S3::Bucket") return "has-objects";
|
|
29421
|
+
if (resourceType === "AWS::Logs::LogGroup") return "has-log-events";
|
|
29438
29422
|
return null;
|
|
29439
29423
|
}
|
|
29440
29424
|
/**
|
|
@@ -29447,6 +29431,7 @@ function renderStatefulReason(reason) {
|
|
|
29447
29431
|
case "always": return "destroy loses all data in the resource";
|
|
29448
29432
|
case "has-objects": return "S3 bucket is non-empty";
|
|
29449
29433
|
case "has-retention": return "log group retains data (RetentionInDays > 0)";
|
|
29434
|
+
case "has-log-events": return "log group is not provably empty";
|
|
29450
29435
|
case null: return "(not stateful)";
|
|
29451
29436
|
}
|
|
29452
29437
|
}
|
|
@@ -34622,5 +34607,5 @@ var DeployEngine = class {
|
|
|
34622
34607
|
};
|
|
34623
34608
|
|
|
34624
34609
|
//#endregion
|
|
34625
|
-
export {
|
|
34626
|
-
//# sourceMappingURL=deploy-engine-
|
|
34610
|
+
export { beginCommandInterruptScope as $, resolveAutoAssetStorage as $n, isTransientServerError as $r, maskSecretsInError as $t, formatResourceLine as A, ensureAssetStorage as An, DependencyError as Ar, requireConfigString as At, isExportAliasCollision as B, dockerSpawnEnvWithSensitive as Bn, ResourceTimeoutError as Br, INTRINSIC_KEYS as Bt, unsupportedFinalSnapshotError as C, loadPublishableAssetManifest as Cn, getAwsClients as Cr, coerceCfnBoolean as Ct, isStatefulRecreateTargetForReplace as D, AssetModeResolver as Dn, CdkdError as Dr, replayWarn as Dt, MULTI_REGION_RECREATE_BLOCKED_TYPES as E, stripControlChars as En, AssetError as Er, readConfigString as Et, red as F, validateAssetBucketName as Fn, LocalStartServiceError as Fr, s3BucketDualStackDomainName as Ft, collectInlinePolicyNamesManagedBySiblings as G, runDockerStreaming as Gn, SynthesisError as Gr, STATE_SOURCED_CROSS_GENERATION_RULES as Gt, stateKeySecretExposure as H, getDockerCmd as Hn, StackHasActiveImportsError as Hr, withRetry as Ht, yellow as I, validateContainerRepoName as In, LockError as Ir, s3BucketRegionalDomainName as It, findActionableSilentDrops as J, Synthesizer as Jn, normalizeAwsError as Jr, carriesSecretMask as Jt, clearOnUpdateRemoval as K, AssetManifestLoader as Kn, formatError as Kr, STATE_SOURCED_READBACK_RULES as Kt, collectDeclaredOutputNames as L, buildDenyExternalAccessPolicy as Ln, NestedStackChildDirectDestroyError as Lr, s3BucketWebsiteUrl as Lt, cyan as M, isCrossRegionRedirect as Mn, DynamicReferenceRegionAmbiguousError as Mr, producerRegionsFromState as Mt, gray as N, parseBootstrapMarker as Nn, IntrinsicResolutionRefusalError as Nr, s3BucketArn as Nt, isStatefulRecreateTargetSync as O, BOOTSTRAP_MARKER_PREFIX as On, ConfigError as Or, requireConfigArray as Ot, green as P, readBootstrapMarkerBody as Pn, LocalInvokeBuildError as Pr, s3BucketDomainName as Pt, maskerOrIdentity as Q, resolveApp as Qn, isThrottlingError as Qr, isSingleDynamicReferenceToken as Qt, collectPublishedOutputNames as R, describeAwsFailure as Rn, PartialFailureError as Rr, applyRoleArnIfSet as Rt, refusesFinalSnapshot as S, createAssetRedirectResolver as Sn, AwsClients as Sr, assertRegionMatch as St, extractDeploymentEventError as T, escapeRegExp$1 as Tn, setAwsClients as Tr, configStringRefusal as Tt, getCurrentResourceSecrets as U, partitionSensitiveEnv as Un, StackTerminationProtectionError as Ur, DagBuilder as Ut, secretBearingStateKeyWarning as V, formatDockerLoginError as Vn, ResourceUpdateNotSupportedError as Vr, describeTypeWithThrottleRetry as Vt, IAMRoleProvider as W, runDockerForeground as Wn, StateError as Wr, TemplateParser as Wt, createMaskedRetryLogger as X, getDefaultStateBucketName as Xn, isMarkedNonRetryable as Xr, dynamicReferenceTokens as Xt, findSilentDropProperties as Y, synthesisStatusMessage as Yn, withErrorHandling as Yr, createSecretMasker as Yt, maskDeep as Z, getLegacyStateBucketName as Zn, isRetryableTransientError as Zr, errorCauseChain as Zt, PRE_DELETE_SNAPSHOT_TYPES as _, shouldRetainResource as _n, derivePartitionAndUrlSuffix as _r, parameterTypeMayLoseSecretIdentity as _t, DeploymentEventsStore as a, LockManager as an, stateBucketExistenceConfirmed as ar, slowCcOperationTimeoutMs as at, createPreDeleteFinalSnapshot as b, WorkGraph as bn, clearBucketRegionCache as br, normalizeAwsTagsToCfn as bt, replayFailedOperations as c, UNRENDERABLE as cn, CFN_TEMPLATE_URL_LIMIT as cr, deleteSkipReason as ct, updatePartialReason as d, forceQuitRecoveryClause as dn, uploadCfnTemplate as dr, IntrinsicFunctionResolver as dt, markNonRetryable as ei, maskSecretsInText as en, resolveCaptureObservedState as er, endCommandInterruptScope as et, withResourceDeadline as f, CUSTOM_RESOURCE_RESPONSE_PREFIX as fn, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as fr, carriesDynamicReference as ft, ATOMIC_FINAL_SNAPSHOT_TYPES as g, importableOutputs as gn, canonicalizeRegion as gr, isUnboundTemplateParameter as gt, computeImplicitDeleteEdges as h, importableOutputKeys as hn, PARTITION_TABLE as hr, getAccountInfo as ht, DeploymentEventsReader as i, scrubResourceRecord as in, resolveUseCdkBootstrapAssets as ir, CloudControlProvider as it, bold as j, getBootstrapMarkerKey as jn, DeployCancelledError as jr, classifyReplaySecretRegion as jt, renderStatefulReason as k, assertAssetBucketRegion as kn, CrossAccountSecretRefusalError as kr, requireConfigObject as kt, replayRollback as l, buildForceUnlockCommand as ln, MIGRATE_TMP_PREFIX as lr, disableInstanceApiTermination as lt, IMPLICIT_DELETE_DEPENDENCIES as m, exportNamesCarriedFrom as mn, expectedOwnerParam as mr, coerceParameterTypedValue as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, retryClassificationText as ni, recoverMaskedOutput as nn, resolveStateBucketWithDefault as nr, isInterruptedWaitError as nt, planFailedOps as o, S3StateBackend as on, warnDeprecatedNoPrefixCliFlag as or, UNSPECIFIED_SKIP_REASON as ot, maskingRetryLogger as p, DEFAULT_STATE_PREFIX as pn, displaySafe as pr, cfnRefValueFromPhysicalId as pt, ProviderRegistry as q, getDockerImageBySourceHash as qn, isCdkdError as qr, TEMPLATE_SOURCED_RULES as qt, DeployEngine as r, __exportAll as ri, redactSecretsForState as rn, resolveStateBucketWithDefaultAndSource as rr, startInterruptWatch as rt, planRollback as s, rebuildClientForBucketRegion as sn, CFN_TEMPLATE_BODY_LIMIT as sr, deleteIndeterminateGuards as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, markRedactedCause as ti, recordMaskOnlyValue as tn, resolveSkipPrefix as tr, interruptWatchListenerCount as tt, updatePartialMessage as u, buildLockContentionMessage as un, findLargeInlineResources as ur, isTerminationProtectionPropagationError as ut, buildFinalSnapshotIdentifier as v, AssetPublisher as vn, AssemblyReader as vr, refStateLookupFromResource as vt, makeCanonicalizePropertiesFn as w, rewriteTemplateAssetReferences as wn, resetAwsClients as wr, configBooleanRefusal as wt, isFinalSnapshotError as x, buildAssetRedirectMap as xn, resolveBucketRegion as xr, resolveExplicitPhysicalId as xt, ccRoutedFinalSnapshotError as y, stringifyValue as yn, processStackMessages as yr, WAFv2WebACLProvider as yt, exportAliasCollisionScrubWarning as z, buildDockerImage as zn, ProvisioningError as zr, DiffCalculator as zt };
|
|
34611
|
+
//# sourceMappingURL=deploy-engine-DYYs56Gt.js.map
|