@go-to-k/cdkd 0.290.28 → 0.290.29
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-DiZsq-4k.js → asg-provider-Dwnb3CES.js} +2 -2
- package/dist/{asg-provider-DiZsq-4k.js.map → asg-provider-Dwnb3CES.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CcFbq2q8.js → deploy-engine-Bcwb9_mO.js} +59 -4
- package/dist/{deploy-engine-CcFbq2q8.js.map → deploy-engine-Bcwb9_mO.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-C1iVGcxJ.js → program-PCCyP9-O.js} +131 -13
- package/dist/{program-C1iVGcxJ.js.map → program-PCCyP9-O.js.map} +1 -1
- package/dist/{version-B2-UuEte.js → version-snXN__f1.js} +2 -2
- package/dist/{version-B2-UuEte.js.map → version-snXN__f1.js.map} +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-
|
|
2
|
+
import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-snXN__f1.js";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/pipe-close-handler.ts
|
|
5
5
|
/**
|
|
@@ -74,7 +74,7 @@ async function main() {
|
|
|
74
74
|
console.log(getCdkdVersion());
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
const { buildProgram } = await import("./program-
|
|
77
|
+
const { buildProgram } = await import("./program-PCCyP9-O.js");
|
|
78
78
|
const program = buildProgram();
|
|
79
79
|
const args = reorderArgs(process.argv);
|
|
80
80
|
await program.parseAsync(args);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as displayIdent, S as UNRENDERABLE, T as truncateCodePoints, d as applyDefaultNameForFallback, f as explicitNamePropertyFor, g as looksLikeCdkdGeneratedName, h as getCurrentStackName, m as generateResourceNameWithFallback, n as getLogger, p as generateResourceName, r as isStdoutReservedForPayload, s as getLiveRenderer, v as withStackName, w as displaySafe, x as STACK_REF_MAX_CODE_POINTS, y as withoutGeneratedFallbackName } from "./logger-6LP1UiFA.js";
|
|
2
2
|
import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BoIxyCir.js";
|
|
3
|
-
import { t as getCdkdVersion } from "./version-
|
|
3
|
+
import { t as getCdkdVersion } from "./version-snXN__f1.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -20586,7 +20586,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
20586
20586
|
"TopicName",
|
|
20587
20587
|
"TracingConfig"
|
|
20588
20588
|
]),
|
|
20589
|
-
silentDrop: /* @__PURE__ */ new Map(),
|
|
20589
|
+
silentDrop: /* @__PURE__ */ new Map([["MaximumMessageSize", "not yet implemented by cdkd"]]),
|
|
20590
20590
|
createOnlyDrops: /* @__PURE__ */ new Set()
|
|
20591
20591
|
}],
|
|
20592
20592
|
["AWS::SNS::TopicPolicy", {
|
|
@@ -32476,7 +32476,7 @@ var CloudControlProvider = class {
|
|
|
32476
32476
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
32477
32477
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
32478
32478
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
32479
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
32479
|
+
const { ASGProvider } = await import("./asg-provider-Dwnb3CES.js").then((n) => n.n);
|
|
32480
32480
|
const asgProvider = new ASGProvider();
|
|
32481
32481
|
return withIndeterminateGuard(await asgProvider.delete(logicalId, physicalId, resourceType, _properties, context), indeterminateGuard);
|
|
32482
32482
|
}
|
|
@@ -40443,6 +40443,34 @@ function retainedSurvivorMessages(logicalId, resourceType, survivorPhysicalId, s
|
|
|
40443
40443
|
reason: `UpdateReplacePolicy: Retain kept the replacement's new ${resourceType} (${survivorPhysicalId}); it is live, still billing, and no longer tracked by cdkd. ${stateClause}`
|
|
40444
40444
|
};
|
|
40445
40445
|
}
|
|
40446
|
+
function requireRestorableBaseline(bag, logger, { logicalId, consequence, remedy, retry }) {
|
|
40447
|
+
if (isRestorableBag(bag)) return true;
|
|
40448
|
+
if (bag === void 0) {
|
|
40449
|
+
logger.warn(` Rollback: Cannot restore ${safe(logicalId)} \u2014 its recorded previous state has no \`properties\` bag, so there is nothing to restore it to. An empty desired state would ${consequence}. The resource is therefore left exactly as it is. ${remedy}`);
|
|
40450
|
+
return false;
|
|
40451
|
+
}
|
|
40452
|
+
const shape = bag === null ? "null" : Array.isArray(bag) ? "an array" : `a ${typeof bag}`;
|
|
40453
|
+
throw new CdkdError(`Cannot roll ${safe(logicalId)} back: its recorded previous state has a \`properties\` field that is not a property bag (${shape}), so cdkd cannot tell what to restore it to. Replaying it would do one of two things, and cdkd does neither: send the malformed value to the provider as-is, or send an empty desired state (which would ${consequence}). The rollback JOURNAL record is kept: once that record holds a property bag again, ${retry}. Otherwise fix forward with \`cdkd deploy\`, or remove the stack with \`cdkd destroy\`.`, "ROLLBACK_UNUSABLE_BASELINE");
|
|
40454
|
+
}
|
|
40455
|
+
/**
|
|
40456
|
+
* Is this a desired bag a replay can actually restore TO?
|
|
40457
|
+
*
|
|
40458
|
+
* Absent is the shape issue #3203 started from, but `=== undefined` is the
|
|
40459
|
+
* WRONG test and a 0-red mutation row is what said so: `null ?? {}` is `{}`,
|
|
40460
|
+
* so a `null` bag reaches the provider as an empty desired state exactly as an
|
|
40461
|
+
* absent one does. A non-object bag (`"abc"`, `[]`) is worse still -- it goes
|
|
40462
|
+
* to the provider VERBATIM. go-to-k/cdkd#3149 refuses those shapes for a
|
|
40463
|
+
* JOURNAL-sourced record at the parser, but `previousState` is equally often
|
|
40464
|
+
* STATE-sourced, and `parseStateBody` deliberately validates no inner shape
|
|
40465
|
+
* (go-to-k/cdkd#2947's placement decision), so this is the only boundary that
|
|
40466
|
+
* sees them on that path.
|
|
40467
|
+
*
|
|
40468
|
+
* A PRESENT but empty `{}` is restorable and must pass: the operator recorded
|
|
40469
|
+
* a resource that really has no properties. Only "no usable bag" is refused.
|
|
40470
|
+
*/
|
|
40471
|
+
function isRestorableBag(bag) {
|
|
40472
|
+
return typeof bag === "object" && bag !== null && !Array.isArray(bag);
|
|
40473
|
+
}
|
|
40446
40474
|
/**
|
|
40447
40475
|
* `DeletionPolicy: Snapshot` on a rolled-back CREATE (issue #1358) — the
|
|
40448
40476
|
* executor's copy of the deploy engine's `prepareFinalSnapshotForDelete`
|
|
@@ -41331,6 +41359,15 @@ async function replaySingle(op, stateResources, stackName, ctx, resolver, orphan
|
|
|
41331
41359
|
case "reverse-replacement": {
|
|
41332
41360
|
const current = stateResources[op.logicalId];
|
|
41333
41361
|
const prev = op.previousState;
|
|
41362
|
+
if (!requireRestorableBaseline(prev.properties, logger, {
|
|
41363
|
+
logicalId: op.logicalId,
|
|
41364
|
+
consequence: "create a default-configured resource and then delete the live one",
|
|
41365
|
+
remedy: "Re-run `cdkd deploy` to re-converge it.",
|
|
41366
|
+
retry: "re-running `cdkd rollback` retries this op"
|
|
41367
|
+
})) {
|
|
41368
|
+
result.warnings++;
|
|
41369
|
+
return;
|
|
41370
|
+
}
|
|
41334
41371
|
const resolvedPrevProps = await resolveReplayProps(prev.properties, resolver, secrets, ctx, op.logicalId) ?? {};
|
|
41335
41372
|
refuseMaskedReplayBaseline(resolvedPrevProps, op.logicalId);
|
|
41336
41373
|
recordNestedStackParameterExpressions(secrets, op.resourceType, resolvedPrevProps, prev.properties, STATE_DERIVED_RULES);
|
|
@@ -41436,6 +41473,15 @@ async function replaySingle(op, stateResources, stackName, ctx, resolver, orphan
|
|
|
41436
41473
|
result.warnings++;
|
|
41437
41474
|
return;
|
|
41438
41475
|
}
|
|
41476
|
+
if (!requireRestorableBaseline(previousState.properties, logger, {
|
|
41477
|
+
logicalId: op.logicalId,
|
|
41478
|
+
consequence: "be applied as a complete desired state: a patch provider removes every property, and an SDK provider may reset a subset or replace the resource",
|
|
41479
|
+
remedy: "Re-run `cdkd deploy` to re-converge it.",
|
|
41480
|
+
retry: "re-running `cdkd rollback` retries this op"
|
|
41481
|
+
})) {
|
|
41482
|
+
result.warnings++;
|
|
41483
|
+
return;
|
|
41484
|
+
}
|
|
41439
41485
|
logger.info(` Rollback: Restoring ${safe(op.logicalId)} (${safe(op.resourceType)}) to previous state`);
|
|
41440
41486
|
const { provider } = ctx.providerRegistry.getProviderFor({
|
|
41441
41487
|
resourceType: op.resourceType,
|
|
@@ -41605,6 +41651,15 @@ async function replayFailedOperations(failedOps, stateResources, stackName, ctx,
|
|
|
41605
41651
|
case "revert-failed-update": {
|
|
41606
41652
|
const current = stateResources[op.logicalId];
|
|
41607
41653
|
const prev = op.previousState;
|
|
41654
|
+
if (!requireRestorableBaseline(prev.properties, logger, {
|
|
41655
|
+
logicalId: op.logicalId,
|
|
41656
|
+
consequence: "be applied as a complete desired state: a patch provider removes every property, and an SDK provider may reset a subset or replace the resource",
|
|
41657
|
+
remedy: "Inspect it with `cdkd drift` (this op died mid-flight, so its remote state is unknown) and re-converge with `cdkd drift --revert` or `cdkd deploy`.",
|
|
41658
|
+
retry: "re-running `cdkd rollback --revert-failed` retries this op (a plain `cdkd rollback` replays only the COMPLETED ops and then pops the whole segment, discarding this record)"
|
|
41659
|
+
})) {
|
|
41660
|
+
result.warnings++;
|
|
41661
|
+
break;
|
|
41662
|
+
}
|
|
41608
41663
|
logger.info(` Rollback: force-reverting failed UPDATE of ${safe(op.logicalId)} (${safe(op.resourceType)}) to its pre-deploy properties (--revert-failed; remote state is unknown)`);
|
|
41609
41664
|
const { provider } = ctx.providerRegistry.getProviderFor({
|
|
41610
41665
|
resourceType: op.resourceType,
|
|
@@ -45488,4 +45543,4 @@ var DeployEngine = class DeployEngine {
|
|
|
45488
45543
|
|
|
45489
45544
|
//#endregion
|
|
45490
45545
|
export { secretBearing as $, SynthesisError as $i, recordMaskOnlyValue as $n, AssetManifestLoader as $r, s3BucketArn as $t, extractDeploymentEventError as A, getAwsClients as Ai, refuseMalformedState as An, BOOTSTRAP_MARKER_PREFIX as Ar, isImpossibleEmptyStoredAttribute as At, toCfnInteger as B, IntrinsicResolutionRefusalError as Bi, STATE_SOURCED_BASELINE_RULES as Bn, buildDockerImage as Br, coerceCfnBoolean as Bt, buildFinalSnapshotIdentifier as C, canonicalizeRegion as Ci, producerRecordKey as Cn, stringifyValue as Cr, isTerminationProtectionPropagationError as Ct, refusesFinalSnapshot as D, clearBucketRegionCache as Di, refuseMalformedOutputsForDestroy as Dn, loadPublishableAssetManifest as Dr, cfnRefValueFromPhysicalId as Dt, isFinalSnapshotError as E, processStackMessages as Ei, refuseMalformedOutputs as En, createAssetRedirectResolver as Er, carriesFetchableDynamicReference as Et, isStatefulRecreateTargetSync as F, ConfigError as Fi, findSilentDropProperties as Fn, parseBootstrapMarker as Fr, isSettledInstanceState as Ft, gray as G, NestedStackChildDirectDestroyError as Gi, createSecretMasker as Gn, formatDockerLoginError as Gr, readConfigString as Gt, formatResourceLine as H, LocalStartServiceError as Hi, STATE_SOURCED_READBACK_RULES as Hn, describeDockerExecFailure as Hr, configBooleanRefusal as Ht, renderStatefulReason as I, CrossAccountSecretRefusalError as Ii, describeTypeWithThrottleRetry as In, readBootstrapMarkerBody as Ir, WAFv2WebACLProvider as It, yellow as J, ResourceTimeoutError as Ji, identityKeyFor as Jn, redactDockerArgvValues as Jr, requireConfigObject as Jt, green as K, PartialFailureError as Ki, dynamicReferenceTokens as Kn, getDockerCmd as Kr, replayWarn as Kt, WARM_THROUGHPUT_MEMBERS as L, DependencyError as Li, withRetry as Ln, validateAssetBucketName as Lr, normalizeAwsTagsToCfn as Lt, planOrphanAdoption as M, setAwsClients as Mi, repairMalformedResourcePropertiesForReadOnly as Mn, ensureAssetStorage as Mr, isUnboundTemplateParameter as Mt, MULTI_REGION_RECREATE_BLOCKED_TYPES as N, AssetError as Ni, repairMalformedResourcesForReadOnly as Nn, getBootstrapMarkerKey as Nr, parameterTypeMayLoseSecretIdentity as Nt, unsupportedFinalSnapshotError as O, resolveBucketRegion as Oi, refuseMalformedResourcePropertiesForOrphan as On, rewriteTemplateAssetReferences as Or, coerceParameterTypedValue as Ot, isStatefulRecreateTargetForReplace as P, CdkdError as Pi, findActionableSilentDrops as Pn, isCrossRegionRedirect as Pr, refStateLookupFromResource as Pt, isExportAliasCollision as Q, StateError as Qi, maskSecretsInText as Qn, stripControlChars as Qr, withSharedDrainBudget as Qt, coerceWarmThroughput as R, DeployCancelledError as Ri, DagBuilder as Rn, validateContainerRepoName as Rr, resolveExplicitPhysicalId as Rt, PRE_DELETE_SNAPSHOT_TYPES as S, PARTITION_TABLE as Si, malformedStateRefusalMessage as Sn, AssetPublisher as Sr, disableInstanceApiTermination as St, createPreDeleteFinalSnapshot as T, AssemblyReader as Ti, refuseMalformedNestedChildOutputs as Tn, buildAssetRedirectMap as Tr, carriesDynamicReference as Tt, bold as U, LockError as Ui, TEMPLATE_SOURCED_RULES as Un, describeDockerFailure as Ur, configIntegerRefusal as Ut, toFiniteNumber as V, LocalInvokeBuildError as Vi, STATE_SOURCED_CROSS_GENERATION_RULES as Vn, describeDockerCapturedOutput as Vr, coerceCfnInteger as Vt, cyan as W, MalformedProducerRecordRefusalError as Wi, carriesSecretMask as Wn, dockerSpawnEnvWithSensitive as Wr, configStringRefusal as Wt, collectPublishedOutputNames as X, StackHasActiveImportsError as Xi, markSameGenerationBag as Xn, runDockerStreaming as Xr, classifyReplaySecretRegion as Xt, collectDeclaredOutputNames as Y, ResourceUpdateNotSupportedError as Yi, isSingleDynamicReferenceToken as Yn, runDockerForeground as Yr, requireConfigString as Yt, exportAliasCollisionScrubWarning as Z, StackTerminationProtectionError as Zi, maskSecretsInError as Zn, escapeRegExp$1 as Zr, producerRegionsFromState as Zt, isSecretBearingReferenceString as _, findLargeInlineResources as _i, malformedOutputsRefusalMessage as _n, importableOutputs as _r, isWaitAbandonedError as _t, DeploymentEventsStore as a, isRetryableTransientError as aa, resolveApp as ai, AWS_CREDENTIAL_ENV_KEYS as an, rebuildClientForBucketRegion as ar, clearOnUpdateRemoval as at, bindingSkippedOutputs as b, decodeListingKey as bi, malformedResourcePropertiesWarning as bn, orphansCarriedFrom as br, deleteIndeterminateGuards as bt, replayFailedOperations as c, markNonRetryable as ca, resolveSkipPrefix as ci, envCredentialsAreAssumedRole as cn, buildLockContentionMessage as cr, createMaskedRetryLogger as ct, updatePartialReason as d, describeAwsFailure as da, resolveUseCdkBootstrapAssets as di, STATE_RESOURCES_MALFORMED as dn, shellQuote as dr, beginCommandInterruptScope as dt, formatError as ea, getDockerImageBySourceHash as ei, s3BucketDomainName as en, recoverMaskedOutput as er, secretBearingStateKeyWarning as et, withResourceDeadline as f, safeStringify$1 as fa, stateBucketExistenceConfirmed as fi, hasReadableOutputs as fn, CUSTOM_RESOURCE_RESPONSE_PREFIX as fr, endCommandInterruptScope as ft, bagHoldsSecretExpression as g, MIGRATE_TMP_PREFIX as gi, malformedLocalOutputsWarning as gn, importableOutputKeys as gr, CloudControlProvider as gt, computeImplicitDeleteEdges as h, CFN_TEMPLATE_URL_LIMIT as hi, malformedExportSourceWarning as hn, hasReadableExportSet as hr, startInterruptWatch as ht, DeploymentEventsReader as i, isMarkedNonRetryable as ia, getLegacyStateBucketName as ii, applyRoleArnIfSet as in, S3StateBackend as ir, collectInlinePolicyNamesManagedBySiblings as it, makeSiblingClaimReader as j, resetAwsClients as ji, repairMalformedOutputsForReadOnly as jn, assertAssetBucketRegion as jr, isNamelessDynamicReferenceError as jt, makeCanonicalizePropertiesFn as k, AwsClients as ki, refuseMalformedResourcesForDestroy as kn, AssetModeResolver as kr, getAccountInfo as kt, replayRollback as l, markRedactedCause as la, resolveStateBucketWithDefault as li, DiffCalculator as ln, forceQuitRecoveryClause as lr, maskDeep as lt, IMPLICIT_DELETE_DEPENDENCIES as m, CFN_TEMPLATE_BODY_LIMIT as mi, malformedExportNamesWarning as mn, exportNamesCarriedFrom as mr, isInterruptedWaitError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, normalizeAwsError as na, synthesisStatusMessage as ni, s3BucketRegionalDomainName as nn, scrubResourceRecord as nr, getCurrentResourceSecrets as nt, planFailedOps as o, isThrottlingError as oa, resolveAutoAssetStorage as oi, applyCallerIdentityCredentials as on, UNREPRODUCIBLE_LOCK_CLAUSE as or, ProviderRegistry as ot, maskingRetryLogger as p, __exportAll as pa, warnDeprecatedNoPrefixCliFlag as pi, hasReadableResources as pn, DEFAULT_STATE_PREFIX as pr, interruptWatchListenerCount as pt, red as q, ProvisioningError as qi, errorCauseChain as qn, partitionSensitiveEnv as qr, requireConfigArray as qt, DeployEngine as r, withErrorHandling as ra, getDefaultStateBucketName as ri, s3BucketWebsiteUrl as rn, LockManager as rr, IAMRoleProvider as rt, planRollback as s, isTransientServerError as sa, resolveCaptureObservedState as si, callerEnvCredentials as sn, buildForceUnlockCommand as sr, wouldReturnToSdkProvider as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, isCdkdError as ta, Synthesizer as ti, s3BucketDualStackDomainName as tn, redactSecretsForState as tr, secretSafeKeyDisplay as tt, updatePartialMessage as u, retryClassificationText as ua, resolveStateBucketWithDefaultAndSource as ui, INTRINSIC_KEYS as un, formatLockExpiry as ur, maskerOrIdentity as ut, keptWholeReasonText as v, uploadCfnTemplate as vi, malformedOutputsWarning as vn, isReadableBag as vr, slowCcOperationTimeoutMs as vt, ccRoutedFinalSnapshotError as w, derivePartitionAndUrlSuffix as wi, refuseDivergentRecordRegionForDestroy as wn, WorkGraph as wr, IntrinsicFunctionResolver as wt, ATOMIC_FINAL_SNAPSHOT_TYPES as x, expectedOwnerParam as xi, malformedResourcesWarning as xn, shouldRetainResource as xr, deleteSkipReason as xt, mergeNoChangeOutputs as y, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as yi, malformedRenderedContainersWarning as yn, orphansAfterRollback as yr, UNSPECIFIED_SKIP_REASON as yt, isWarmThroughputDecrease as z, DynamicReferenceRegionAmbiguousError as zi, TemplateParser as zn, buildDenyExternalAccessPolicy as zr, assertRegionMatch as zt };
|
|
45491
|
-
//# sourceMappingURL=deploy-engine-
|
|
45546
|
+
//# sourceMappingURL=deploy-engine-Bcwb9_mO.js.map
|