@go-to-k/cdkd 0.284.55 → 0.284.56
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-nddX-RVm.js → asg-provider-DoiQARH6.js} +2 -2
- package/dist/{asg-provider-nddX-RVm.js.map → asg-provider-DoiQARH6.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-B1tSPv8F.js → deploy-engine-CNYFUw4D.js} +3 -3
- package/dist/{deploy-engine-B1tSPv8F.js.map → deploy-engine-CNYFUw4D.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-CTreQYc-.js → program-BsvNn8Y3.js} +79 -13
- package/dist/{program-CTreQYc-.js.map → program-BsvNn8Y3.js.map} +1 -1
- package/dist/{version-DD5yHFTJ.js → version-oF2rSNET.js} +2 -2
- package/dist/{version-DD5yHFTJ.js.map → version-oF2rSNET.js.map} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as Synthesizer, Dr as formatError, Er as SynthesisError, Jt as TemplateParser, Or as isCdkdError, Qn as AssemblyReader, Tr as StateError, Ut as DiffCalculator, W as IAMRoleProvider, Yt as LockManager, Zt as S3StateBackend, ar as setAwsClients, br as ProvisioningError, cr as ConfigError, er as clearBucketRegionCache, gr as LockError, ir as resetAwsClients, kr as normalizeAwsError, nr as AwsClients, or as AssetError, q as ProviderRegistry, qt as DagBuilder, r as DeployEngine, rn as AssetPublisher, rr as getAwsClients, rt as CloudControlProvider, sr as CdkdError, tr as resolveBucketRegion, ur as DependencyError } from "./deploy-engine-
|
|
1
|
+
import { An as Synthesizer, Dr as formatError, Er as SynthesisError, Jt as TemplateParser, Or as isCdkdError, Qn as AssemblyReader, Tr as StateError, Ut as DiffCalculator, W as IAMRoleProvider, Yt as LockManager, Zt as S3StateBackend, ar as setAwsClients, br as ProvisioningError, cr as ConfigError, er as clearBucketRegionCache, gr as LockError, ir as resetAwsClients, kr as normalizeAwsError, nr as AwsClients, or as AssetError, q as ProviderRegistry, qt as DagBuilder, r as DeployEngine, rn as AssetPublisher, rr as getAwsClients, rt as CloudControlProvider, sr as CdkdError, tr as resolveBucketRegion, ur as DependencyError } from "./deploy-engine-CNYFUw4D.js";
|
|
2
2
|
import { n as getLogger, r as setLogger, t as ConsoleLogger } from "./logger-zRrlbaQt.js";
|
|
3
3
|
|
|
4
4
|
export { AssemblyReader, AssetError, AssetPublisher, AwsClients, CdkdError, CloudControlProvider, ConfigError, ConsoleLogger, DagBuilder, DependencyError, DeployEngine, DiffCalculator, IAMRoleProvider, LockError, LockManager, ProviderRegistry, ProvisioningError, S3StateBackend, StateError, SynthesisError, Synthesizer, TemplateParser, clearBucketRegionCache, formatError, getAwsClients, getLogger, isCdkdError, normalizeAwsError, resetAwsClients, resolveBucketRegion, setAwsClients, setLogger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as endCommandInterruptScope, $n as processStackMessages, $t as exportNamesCarriedFrom, A as renderStatefulReason, An as Synthesizer, Ar as withErrorHandling, At as isSingleDynamicReferenceToken, B as exportAliasCollisionScrubWarning, Bn as resolveUseCdkBootstrapAssets, Bt as s3BucketRegionalDomainName, C as isFinalSnapshotError, Cn as formatDockerLoginError, Cr as StackHasActiveImportsError, Ct as requireConfigString, D as extractDeploymentEventError, Dn as runDockerStreaming, Dt as createSecretMasker, E as makeCanonicalizePropertiesFn, En as runDockerForeground, Et as TEMPLATE_SOURCED_RULES, F as green, Fn as resolveAutoAssetStorage, Ft as classifyReplaySecretRegion, G as collectInlinePolicyNamesManagedBySiblings, Gn as MIGRATE_TMP_PREFIX, Gt as describeTypeWithThrottleRetry, H as secretBearingStateKeyWarning, Hn as warnDeprecatedNoPrefixCliFlag, Ht as applyRoleArnIfSet, I as red, In as resolveCaptureObservedState, It as producerRegionsFromState, J as findActionableSilentDrops, Jn as expectedOwnerParam, Jt as TemplateParser, K as clearOnUpdateRemoval, Kn as findLargeInlineResources, Kt as withRetry, L as yellow, Ln as resolveSkipPrefix, Lt as s3BucketArn, M as bold, Mn as getDefaultStateBucketName, Mr as isRetryableTransientError, Mt as maskSecretsInText, N as cyan, Nn as getLegacyStateBucketName, Nr as isThrottlingError, Nt as redactSecretsForState, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as AssetManifestLoader, Ot as dynamicReferenceTokens, P as gray, Pn as resolveApp, Pr as markNonRetryable, Pt as scrubResourceRecord, Q as beginCommandInterruptScope, Qn as AssemblyReader, Qt as rebuildClientForBucketRegion, R as collectDeclaredOutputNames, Rn as resolveStateBucketWithDefault, Rt as s3BucketDomainName, S as createPreDeleteFinalSnapshot, Sn as dockerSpawnEnvWithSensitive, Sr as ResourceUpdateNotSupportedError, St as requireConfigObject, T as unsupportedFinalSnapshotError, Tn as partitionSensitiveEnv, Tt as STATE_SOURCED_READBACK_RULES, U as stateKeySecretExposure, Un as CFN_TEMPLATE_BODY_LIMIT, Ut as DiffCalculator, V as isExportAliasCollision, Vn as stateBucketExistenceConfirmed, Vt as s3BucketWebsiteUrl, W as IAMRoleProvider, Wn as CFN_TEMPLATE_URL_LIMIT, Wt as INTRINSIC_KEYS, X as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as canonicalizeRegion, Xt as displaySafe, Y as findSilentDropProperties, Yn as PARTITION_TABLE, Yt as LockManager, Z as DEFAULT_STATE_PREFIX, Zn as derivePartitionAndUrlSuffix, Zt as S3StateBackend, _ as computeImplicitDeleteEdges, _n as readBootstrapMarkerBody, _r as MissingCdkCliError, _t as configBooleanRefusal, a as DeploymentEventsStore, an as WorkGraph, ar as setAwsClients, at as disableInstanceApiTermination, b as buildFinalSnapshotIdentifier, bn as buildDenyExternalAccessPolicy, br as ProvisioningError, bt as replayWarn, c as replayFailedOperations, cn as loadPublishableAssetManifest, ct as carriesDynamicReference, d as updatePartialReason, dn as stripControlChars, dr as DeployCancelledError, dt as refStateLookupFromResource, en as importableOutputKeys, et as interruptWatchListenerCount, f as UNSPECIFIED_SKIP_REASON, fn as AssetModeResolver, fr as DynamicReferenceRegionAmbiguousError, ft as WAFv2WebACLProvider, g as IMPLICIT_DELETE_DEPENDENCIES, gn as parseBootstrapMarker, gt as coerceCfnBoolean, h as maskingRetryLogger, hn as getBootstrapMarkerKey, hr as LocalStartServiceError, ht as assertRegionMatch, i as DeploymentEventsReader, in as stringifyValue, ir as resetAwsClients, it as slowCcOperationTimeoutMs, j as formatResourceLine, jn as synthesisStatusMessage, jr as isMarkedNonRetryable, jt as maskSecretsInError, k as isStatefulRecreateTargetSync, kn as getDockerImageBySourceHash, kr as normalizeAwsError, kt as errorCauseChain, l as replayRollback, ln as rewriteTemplateAssetReferences, lr as CrossAccountSecretRefusalError, lt as cfnRefValueFromPhysicalId, m as withResourceDeadline, mn as ensureAssetStorage, mr as LocalMigrateError, mt as resolveExplicitPhysicalId, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as shouldRetainResource, nr as AwsClients, nt as startInterruptWatch, o as planFailedOps, on as buildAssetRedirectMap, ot as isTerminationProtectionPropagationError, p as deleteSkipReason, pn as BOOTSTRAP_MARKER_PREFIX, pr as LocalInvokeBuildError$1, pt as normalizeAwsTagsToCfn, q as ProviderRegistry, qn as uploadCfnTemplate, qt as DagBuilder, r as DeployEngine, rn as AssetPublisher, rr as getAwsClients, rt as CloudControlProvider, s as planRollback, sn as createAssetRedirectResolver, sr as CdkdError, st as IntrinsicFunctionResolver, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as importableOutputs, tr as resolveBucketRegion, tt as isInterruptedWaitError, u as updatePartialMessage, un as escapeRegExp, ut as getAccountInfo, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as validateAssetBucketName, vr as NestedStackChildDirectDestroyError, vt as configStringRefusal, w as refusesFinalSnapshot, wn as getDockerCmd, wr as StackTerminationProtectionError, wt as STATE_SOURCED_CROSS_GENERATION_RULES, x as ccRoutedFinalSnapshotError, xn as buildDockerImage, xr as ResourceTimeoutError, xt as requireConfigArray, y as PRE_DELETE_SNAPSHOT_TYPES, yn as validateContainerRepoName, yr as PartialFailureError, yt as readConfigString, z as collectPublishedOutputNames, zn as resolveStateBucketWithDefaultAndSource, zt as s3BucketDualStackDomainName } from "./deploy-engine-
|
|
1
|
+
import { $ as endCommandInterruptScope, $n as processStackMessages, $t as exportNamesCarriedFrom, A as renderStatefulReason, An as Synthesizer, Ar as withErrorHandling, At as isSingleDynamicReferenceToken, B as exportAliasCollisionScrubWarning, Bn as resolveUseCdkBootstrapAssets, Bt as s3BucketRegionalDomainName, C as isFinalSnapshotError, Cn as formatDockerLoginError, Cr as StackHasActiveImportsError, Ct as requireConfigString, D as extractDeploymentEventError, Dn as runDockerStreaming, Dt as createSecretMasker, E as makeCanonicalizePropertiesFn, En as runDockerForeground, Et as TEMPLATE_SOURCED_RULES, F as green, Fn as resolveAutoAssetStorage, Ft as classifyReplaySecretRegion, G as collectInlinePolicyNamesManagedBySiblings, Gn as MIGRATE_TMP_PREFIX, Gt as describeTypeWithThrottleRetry, H as secretBearingStateKeyWarning, Hn as warnDeprecatedNoPrefixCliFlag, Ht as applyRoleArnIfSet, I as red, In as resolveCaptureObservedState, It as producerRegionsFromState, J as findActionableSilentDrops, Jn as expectedOwnerParam, Jt as TemplateParser, K as clearOnUpdateRemoval, Kn as findLargeInlineResources, Kt as withRetry, L as yellow, Ln as resolveSkipPrefix, Lt as s3BucketArn, M as bold, Mn as getDefaultStateBucketName, Mr as isRetryableTransientError, Mt as maskSecretsInText, N as cyan, Nn as getLegacyStateBucketName, Nr as isThrottlingError, Nt as redactSecretsForState, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as AssetManifestLoader, Ot as dynamicReferenceTokens, P as gray, Pn as resolveApp, Pr as markNonRetryable, Pt as scrubResourceRecord, Q as beginCommandInterruptScope, Qn as AssemblyReader, Qt as rebuildClientForBucketRegion, R as collectDeclaredOutputNames, Rn as resolveStateBucketWithDefault, Rt as s3BucketDomainName, S as createPreDeleteFinalSnapshot, Sn as dockerSpawnEnvWithSensitive, Sr as ResourceUpdateNotSupportedError, St as requireConfigObject, T as unsupportedFinalSnapshotError, Tn as partitionSensitiveEnv, Tt as STATE_SOURCED_READBACK_RULES, U as stateKeySecretExposure, Un as CFN_TEMPLATE_BODY_LIMIT, Ut as DiffCalculator, V as isExportAliasCollision, Vn as stateBucketExistenceConfirmed, Vt as s3BucketWebsiteUrl, W as IAMRoleProvider, Wn as CFN_TEMPLATE_URL_LIMIT, Wt as INTRINSIC_KEYS, X as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as canonicalizeRegion, Xt as displaySafe, Y as findSilentDropProperties, Yn as PARTITION_TABLE, Yt as LockManager, Z as DEFAULT_STATE_PREFIX, Zn as derivePartitionAndUrlSuffix, Zt as S3StateBackend, _ as computeImplicitDeleteEdges, _n as readBootstrapMarkerBody, _r as MissingCdkCliError, _t as configBooleanRefusal, a as DeploymentEventsStore, an as WorkGraph, ar as setAwsClients, at as disableInstanceApiTermination, b as buildFinalSnapshotIdentifier, bn as buildDenyExternalAccessPolicy, br as ProvisioningError, bt as replayWarn, c as replayFailedOperations, cn as loadPublishableAssetManifest, ct as carriesDynamicReference, d as updatePartialReason, dn as stripControlChars, dr as DeployCancelledError, dt as refStateLookupFromResource, en as importableOutputKeys, et as interruptWatchListenerCount, f as UNSPECIFIED_SKIP_REASON, fn as AssetModeResolver, fr as DynamicReferenceRegionAmbiguousError, ft as WAFv2WebACLProvider, g as IMPLICIT_DELETE_DEPENDENCIES, gn as parseBootstrapMarker, gt as coerceCfnBoolean, h as maskingRetryLogger, hn as getBootstrapMarkerKey, hr as LocalStartServiceError, ht as assertRegionMatch, i as DeploymentEventsReader, in as stringifyValue, ir as resetAwsClients, it as slowCcOperationTimeoutMs, j as formatResourceLine, jn as synthesisStatusMessage, jr as isMarkedNonRetryable, jt as maskSecretsInError, k as isStatefulRecreateTargetSync, kn as getDockerImageBySourceHash, kr as normalizeAwsError, kt as errorCauseChain, l as replayRollback, ln as rewriteTemplateAssetReferences, lr as CrossAccountSecretRefusalError, lt as cfnRefValueFromPhysicalId, m as withResourceDeadline, mn as ensureAssetStorage, mr as LocalMigrateError, mt as resolveExplicitPhysicalId, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as shouldRetainResource, nr as AwsClients, nt as startInterruptWatch, o as planFailedOps, on as buildAssetRedirectMap, ot as isTerminationProtectionPropagationError, p as deleteSkipReason, pn as BOOTSTRAP_MARKER_PREFIX, pr as LocalInvokeBuildError$1, pt as normalizeAwsTagsToCfn, q as ProviderRegistry, qn as uploadCfnTemplate, qt as DagBuilder, r as DeployEngine, rn as AssetPublisher, rr as getAwsClients, rt as CloudControlProvider, s as planRollback, sn as createAssetRedirectResolver, sr as CdkdError, st as IntrinsicFunctionResolver, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as importableOutputs, tr as resolveBucketRegion, tt as isInterruptedWaitError, u as updatePartialMessage, un as escapeRegExp, ut as getAccountInfo, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as validateAssetBucketName, vr as NestedStackChildDirectDestroyError, vt as configStringRefusal, w as refusesFinalSnapshot, wn as getDockerCmd, wr as StackTerminationProtectionError, wt as STATE_SOURCED_CROSS_GENERATION_RULES, x as ccRoutedFinalSnapshotError, xn as buildDockerImage, xr as ResourceTimeoutError, xt as requireConfigArray, y as PRE_DELETE_SNAPSHOT_TYPES, yn as validateContainerRepoName, yr as PartialFailureError, yt as readConfigString, z as collectPublishedOutputNames, zn as resolveStateBucketWithDefaultAndSource, zt as s3BucketDualStackDomainName } from "./deploy-engine-CNYFUw4D.js";
|
|
2
2
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as getCurrentStackName, 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";
|
|
3
|
-
import { t as getCdkdVersion } from "./version-
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
3
|
+
import { t as getCdkdVersion } from "./version-oF2rSNET.js";
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-DoiQARH6.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";
|
|
@@ -16047,17 +16047,60 @@ var ProtectionFlipRegistry = class {
|
|
|
16047
16047
|
/**
|
|
16048
16048
|
* The record for `key`, creating it on first use and REUSING it on re-entry.
|
|
16049
16049
|
*
|
|
16050
|
-
* `reuseWithinMs` bounds how long an entry may
|
|
16051
|
-
*
|
|
16052
|
-
*
|
|
16053
|
-
*
|
|
16054
|
-
*
|
|
16055
|
-
*
|
|
16050
|
+
* `reuseWithinMs` bounds how long an entry may sit UNUSED, and the window
|
|
16051
|
+
* SLIDES: every reuse restarts the stopwatch, so what is bounded is the idle
|
|
16052
|
+
* time since the last `acquire` rather than the entry's total lifetime. It is
|
|
16053
|
+
* passed the same `DELETE_BUDGET_REUSE_WINDOW_MS` the allowance uses, and it
|
|
16054
|
+
* is still needed for the reason it was introduced: entries are RETAINED on a
|
|
16055
|
+
* throw, so without any bound a retained record would let a much LATER
|
|
16056
|
+
* destroy of the same table re-enable a guard it never touched — the inverse
|
|
16057
|
+
* hazard of the one this record exists for.
|
|
16058
|
+
*
|
|
16059
|
+
* Measuring from FIRST acquisition instead is what issue #2211 reported, and
|
|
16060
|
+
* it re-creates issue #1978's residue through this very mechanism. The retry
|
|
16061
|
+
* sequence is unbounded while the window is a wall clock, so a
|
|
16062
|
+
* `--resource-timeout` overshoot past `DELETE_BUDGET_REUSE_WINDOW_MS` lets a
|
|
16063
|
+
* LIVE sequence age out MID-flight: `acquire` drops the entry and hands the
|
|
16064
|
+
* next attempt a fresh `{ flippedOffByThisRun: false }`, whose pre-flip
|
|
16065
|
+
* `DescribeTable` then observes the guard already OFF — because attempt 1
|
|
16066
|
+
* turned it off — so the latch stays `false` and a terminal failure
|
|
16067
|
+
* compensates nothing.
|
|
16068
|
+
*
|
|
16069
|
+
* KNOWN BOUND, stated because the obvious reading overclaims it. `acquire` is
|
|
16070
|
+
* called ONCE per `delete()`, at the top, and nothing touches the entry's
|
|
16071
|
+
* idle STOPWATCH again (the record's fields are mutated throughout, and
|
|
16072
|
+
* `release` drops it) — so the interval this measures is not a gap BETWEEN
|
|
16073
|
+
* operations, it is the previous ATTEMPT's own duration plus the outer loop's
|
|
16074
|
+
* backoff.
|
|
16075
|
+
*
|
|
16076
|
+
* That is normally comfortable, and the arithmetic is worth having right.
|
|
16077
|
+
* `DELETE_BUDGET_REUSE_WINDOW_MS` is `DYNAMODB_DELETE_BUDGET_MS` (26 min)
|
|
16078
|
+
* plus `DYNAMODB_DELETE_DEADLINE_MARGIN_MS` (4 min). The 26 minutes is the
|
|
16079
|
+
* allowance for the WHOLE retry sequence, not for one attempt —
|
|
16080
|
+
* `ElapsedBudgetRegistry.acquire` hands back the SAME budget on re-entry — so
|
|
16081
|
+
* a budget-conforming attempt plus one backoff is at most ~26m20s against a
|
|
16082
|
+
* 30-minute window, and the margin exists precisely to price that backoff.
|
|
16083
|
+
*
|
|
16084
|
+
* What can still age out a successor is therefore an attempt that OVERRUNS
|
|
16085
|
+
* the allowance rather than one that merely spends it: `attemptsWithin` keeps
|
|
16086
|
+
* a `minAttempts` floor poll even at zero remaining, and the auto-scaling
|
|
16087
|
+
* teardown is unpriced (see `src/utils/elapsed-budget.ts`). The slide removes
|
|
16088
|
+
* the ACCUMULATION case — many attempts summing past the window, the common
|
|
16089
|
+
* shape and the one issue #2211 reported — not the overrun one.
|
|
16090
|
+
*
|
|
16091
|
+
* Closing the remainder means sliding at attempt END too (a `touch(key)` in
|
|
16092
|
+
* `delete()`'s catch, making the measured gap the loop backoff rather than
|
|
16093
|
+
* the attempt), or sizing this window independently of the delete budget.
|
|
16094
|
+
* Both are behaviour changes to the delete path and belong in their own
|
|
16095
|
+
* change rather than riding this one.
|
|
16056
16096
|
*/
|
|
16057
16097
|
acquire(key, reuseWithinMs, clock = monotonicNowMs) {
|
|
16058
16098
|
const existing = this.records.get(key);
|
|
16059
16099
|
if (existing) {
|
|
16060
|
-
if (existing.
|
|
16100
|
+
if (existing.idle.elapsedMs() <= reuseWithinMs) {
|
|
16101
|
+
existing.idle = new ElapsedBudget(reuseWithinMs, clock);
|
|
16102
|
+
return existing.record;
|
|
16103
|
+
}
|
|
16061
16104
|
this.records.delete(key);
|
|
16062
16105
|
}
|
|
16063
16106
|
const created = {
|
|
@@ -16065,7 +16108,7 @@ var ProtectionFlipRegistry = class {
|
|
|
16065
16108
|
flippedOffByThisRun: false,
|
|
16066
16109
|
deleteAccepted: false
|
|
16067
16110
|
},
|
|
16068
|
-
|
|
16111
|
+
idle: new ElapsedBudget(reuseWithinMs, clock)
|
|
16069
16112
|
};
|
|
16070
16113
|
this.records.set(key, created);
|
|
16071
16114
|
return created.record;
|
|
@@ -16164,9 +16207,30 @@ async function compensateRemovedDeletionProtection(opts) {
|
|
|
16164
16207
|
await opts.reEnable();
|
|
16165
16208
|
opts.logger.warn(`DynamoDB ${opts.typeLabel} ${opts.logicalId}: the delete failed after --remove-protection had turned DeletionProtectionEnabled off, so it was re-enabled on ${opts.physicalId}. The delete failure below is the outcome.`);
|
|
16166
16209
|
} catch (reEnableError) {
|
|
16167
|
-
|
|
16210
|
+
const detail = reEnableError instanceof Error ? reEnableError.message : String(reEnableError);
|
|
16211
|
+
if (isResourceNotFoundError(reEnableError)) {
|
|
16212
|
+
const regionArg = opts.region ? ` --region ${opts.region}` : "";
|
|
16213
|
+
opts.logger.warn(`DynamoDB ${opts.typeLabel} ${opts.logicalId}: could not re-enable DeletionProtectionEnabled on ${opts.physicalId} after the delete failed — DynamoDB answered ResourceNotFound. That most commonly means the table is gone or its status is not ACTIVE, and it can also mean the table is not in this region or account. If it still exists, its deletion protection is OFF. Check with: aws dynamodb describe-table --table-name ${opts.physicalId}${regionArg} and if it is there, restore it with: aws dynamodb update-table --table-name ${opts.physicalId}${regionArg} --deletion-protection-enabled. (${detail})`);
|
|
16214
|
+
return;
|
|
16215
|
+
}
|
|
16216
|
+
opts.logger.error(`DynamoDB ${opts.typeLabel} ${opts.logicalId}: could NOT re-enable DeletionProtectionEnabled on ${opts.physicalId} after the delete failed — that table is LIVE with its deletion protection still off. Restore it with: aws dynamodb update-table --table-name ${opts.physicalId} --deletion-protection-enabled. (${detail})`);
|
|
16168
16217
|
}
|
|
16169
16218
|
}
|
|
16219
|
+
/**
|
|
16220
|
+
* Whether `error` is DynamoDB's `ResourceNotFoundException`.
|
|
16221
|
+
*
|
|
16222
|
+
* Keyed on the SDK's `name` rather than on `instanceof`, so this module keeps
|
|
16223
|
+
* its (deliberate) freedom from an `@aws-sdk/client-dynamodb` import and so a
|
|
16224
|
+
* second client instance of the class still matches.
|
|
16225
|
+
*
|
|
16226
|
+
* Deliberately NOT a `cause`-chain walk: every `reEnable` callback handed to
|
|
16227
|
+
* {@link compensateRemovedDeletionProtection} is a bare `UpdateTable` send, so
|
|
16228
|
+
* the SDK error arrives unwrapped. If one ever wraps its call, this answers
|
|
16229
|
+
* `false` and the compensation keeps the LOUD error line — the safe direction.
|
|
16230
|
+
*/
|
|
16231
|
+
function isResourceNotFoundError(error) {
|
|
16232
|
+
return typeof error === "object" && error !== null && error.name === "ResourceNotFoundException";
|
|
16233
|
+
}
|
|
16170
16234
|
|
|
16171
16235
|
//#endregion
|
|
16172
16236
|
//#region src/provisioning/providers/dynamodb-table-provider.ts
|
|
@@ -17127,6 +17191,7 @@ var DynamoDBTableProvider = class {
|
|
|
17127
17191
|
physicalId,
|
|
17128
17192
|
typeLabel: "table",
|
|
17129
17193
|
logger: this.logger,
|
|
17194
|
+
...context?.expectedRegion ? { region: context.expectedRegion } : {},
|
|
17130
17195
|
reEnable: async () => {
|
|
17131
17196
|
await this.dynamoDBClient.send(new UpdateTableCommand({
|
|
17132
17197
|
TableName: physicalId,
|
|
@@ -19693,6 +19758,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
19693
19758
|
physicalId,
|
|
19694
19759
|
typeLabel: "GlobalTable",
|
|
19695
19760
|
logger: this.logger,
|
|
19761
|
+
...context?.expectedRegion ? { region: context.expectedRegion } : {},
|
|
19696
19762
|
reEnable: async () => {
|
|
19697
19763
|
await this.dynamoDBClient.send(new UpdateTableCommand({
|
|
19698
19764
|
TableName: physicalId,
|
|
@@ -87504,4 +87570,4 @@ function buildProgram() {
|
|
|
87504
87570
|
|
|
87505
87571
|
//#endregion
|
|
87506
87572
|
export { buildProgram };
|
|
87507
|
-
//# sourceMappingURL=program-
|
|
87573
|
+
//# sourceMappingURL=program-BsvNn8Y3.js.map
|