@go-to-k/cdkd 0.289.0 → 0.289.1
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/README.md +6 -6
- package/dist/{asg-provider-1XVtAjhm.js → asg-provider-B3stERoz.js} +2 -2
- package/dist/{asg-provider-1XVtAjhm.js.map → asg-provider-B3stERoz.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-B6pEfNd9.js → deploy-engine-14EMrfBt.js} +3 -3
- package/dist/{deploy-engine-B6pEfNd9.js.map → deploy-engine-14EMrfBt.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-Bg60hZhr.js → program-CIn_e9xI.js} +57 -14
- package/dist/{program-Bg60hZhr.js.map → program-CIn_e9xI.js.map} +1 -1
- package/dist/{version-CCKo6fK2.js → version-BvvRGJMb.js} +2 -2
- package/dist/{version-CCKo6fK2.js.map → version-BvvRGJMb.js.map} +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as DagBuilder, Br as resolveBucketRegion, Gr as AssetError, Hr as getAwsClients, Kr as CdkdError, Lr as AssemblyReader, Nn as AssetPublisher, Q as IAMRoleProvider, Ur as resetAwsClients, Vr as AwsClients, Wr as setAwsClients, Yr as DependencyError, _n as LockManager, di as formatError, dt as CloudControlProvider, en as TemplateParser, fi as isCdkdError, ii as ProvisioningError, li as StateError, pi as normalizeAwsError, pr as Synthesizer, qr as ConfigError, qt as DiffCalculator, r as DeployEngine, ti as LockError, tt as ProviderRegistry, ui as SynthesisError, vn as S3StateBackend, zr as clearBucketRegionCache } from "./deploy-engine-
|
|
1
|
+
import { $t as DagBuilder, Br as resolveBucketRegion, Gr as AssetError, Hr as getAwsClients, Kr as CdkdError, Lr as AssemblyReader, Nn as AssetPublisher, Q as IAMRoleProvider, Ur as resetAwsClients, Vr as AwsClients, Wr as setAwsClients, Yr as DependencyError, _n as LockManager, di as formatError, dt as CloudControlProvider, en as TemplateParser, fi as isCdkdError, ii as ProvisioningError, li as StateError, pi as normalizeAwsError, pr as Synthesizer, qr as ConfigError, qt as DiffCalculator, r as DeployEngine, ti as LockError, tt as ProviderRegistry, ui as SynthesisError, vn as S3StateBackend, zr as clearBucketRegionCache } from "./deploy-engine-14EMrfBt.js";
|
|
2
2
|
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-D2Md1kTq.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,8 +1,8 @@
|
|
|
1
|
-
import { $ as collectInlinePolicyNamesManagedBySiblings, $n as describeDockerCapturedOutput, $r as LocalInvokeBuildError$1, $t as DagBuilder, A as isStatefulRecreateTargetForReplace, An as orphansAfterRollback, Ar as uploadCfnTemplate, At as coerceCfnBoolean, B as gray, Bn as AssetModeResolver, Br as resolveBucketRegion, Bt as withSharedDrainBudget, C as refusesFinalSnapshot, Cn as forceQuitRecoveryClause, Cr as resolveUseCdkBootstrapAssets, Ct as isUnboundTemplateParameter, D as makeSiblingClaimReader, Dn as exportNamesCarriedFrom, Dr as CFN_TEMPLATE_URL_LIMIT, Dt as normalizeAwsTagsToCfn, E as extractDeploymentEventError, En as DEFAULT_STATE_PREFIX, Er as CFN_TEMPLATE_BODY_LIMIT, Et as WAFv2WebACLProvider, F as isWarmThroughputDecrease, Fn as WorkGraph, Fr as canonicalizeRegion, Ft as requireConfigArray, G as collectPublishedOutputNames, Gn as isCrossRegionRedirect, Gt as s3BucketWebsiteUrl, H as red, Hn as assertAssetBucketRegion, Hr as getAwsClients, Ht as s3BucketDomainName, I as toFiniteNumber, In as buildAssetRedirectMap, Ir as derivePartitionAndUrlSuffix, It as requireConfigObject, J as secretBearing, Jn as validateAssetBucketName, Jr as CrossAccountSecretRefusalError, Jt as INTRINSIC_KEYS, K as exportAliasCollisionScrubWarning, Kn as parseBootstrapMarker, Kr as CdkdError, Kt as applyRoleArnIfSet, L as formatResourceLine, Ln as createAssetRedirectResolver, Lr as AssemblyReader, Lt as requireConfigString, M as renderStatefulReason, Mn as shouldRetainResource, Mr as displaySafe, Mt as configStringRefusal, N as WARM_THROUGHPUT_MEMBERS, Nn as AssetPublisher, Nr as expectedOwnerParam, Nt as readConfigString, O as planOrphanAdoption, On as importableOutputKeys, Or as MIGRATE_TMP_PREFIX, Ot as resolveExplicitPhysicalId, P as coerceWarmThroughput$1, Pn as stringifyValue, Pr as PARTITION_TABLE, Pt as replayWarn, Q as IAMRoleProvider, Qn as buildDockerImage, Qr as IntrinsicResolutionRefusalError, Qt as withRetry, R as bold, Rn as loadPublishableAssetManifest, Rr as processStackMessages, Rt as classifyReplaySecretRegion, S as isFinalSnapshotError, Sn as buildLockContentionMessage, Sr as resolveStateBucketWithDefaultAndSource, St as getAccountInfo, T as makeCanonicalizePropertiesFn, Tn as CUSTOM_RESOURCE_RESPONSE_PREFIX, Tr as warnDeprecatedNoPrefixCliFlag, Tt as refStateLookupFromResource, U as yellow, Un as ensureAssetStorage, Ur as resetAwsClients, Ut as s3BucketDualStackDomainName, V as green, Vn as BOOTSTRAP_MARKER_PREFIX, Vr as AwsClients, Vt as s3BucketArn, W as collectDeclaredOutputNames, Wn as getBootstrapMarkerKey, Wr as setAwsClients, Wt as s3BucketRegionalDomainName, X as secretSafeKeyDisplay, Xn as buildDenyExternalAccessPolicy, Xr as DeployCancelledError, Xt as findSilentDropProperties, Y as secretBearingStateKeyWarning, Yn as validateContainerRepoName, Yt as findActionableSilentDrops, Z as getCurrentResourceSecrets, Zn as describeAwsFailure, Zr as DynamicReferenceRegionAmbiguousError, Zt as describeTypeWithThrottleRetry, _ as ATOMIC_FINAL_SNAPSHOT_TYPES, _i as isThrottlingError, _n as LockManager, _r as resolveApp, _t as isTerminationProtectionPropagationError, a as DeploymentEventsStore, ai as ResourceTimeoutError, an as carriesSecretMask, ar as partitionSensitiveEnv, at as maskerOrIdentity, b as ccRoutedFinalSnapshotError, bi as markRedactedCause, bn as UNRENDERABLE, br as resolveSkipPrefix, bt as cfnRefValueFromPhysicalId, c as replayFailedOperations, ci as StackTerminationProtectionError, cn as errorCauseChain, cr as runDockerStreaming, ct as interruptWatchListenerCount, d as updatePartialReason, dn as maskSecretsInError, dr as AssetManifestLoader, dt as CloudControlProvider, ei as LocalStartServiceError, en as TemplateParser, er as describeDockerExecFailure, et as clearOnUpdateRemoval, f as withResourceDeadline, fn as maskSecretsInText, fr as getDockerImageBySourceHash, ft as slowCcOperationTimeoutMs, g as bindingSkippedOutputs, gi as isRetryableTransientError, gn as scrubResourceRecord, gr as getLegacyStateBucketName, gt as disableInstanceApiTermination, h as computeImplicitDeleteEdges, hi as isMarkedNonRetryable, hn as redactSecretsForState, hr as getDefaultStateBucketName, ht as deleteSkipReason, i as DeploymentEventsReader, ii as ProvisioningError, in as TEMPLATE_SOURCED_RULES, ir as getDockerCmd, it as maskDeep, j as isStatefulRecreateTargetSync, jn as orphansCarriedFrom, jr as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, jt as configBooleanRefusal, k as MULTI_REGION_RECREATE_BLOCKED_TYPES, kn as importableOutputs, kr as findLargeInlineResources, kt as assertRegionMatch, l as replayRollback, ln as identityKeyFor, lr as escapeRegExp, lt as isInterruptedWaitError, m as IMPLICIT_DELETE_DEPENDENCIES, mi as withErrorHandling, mn as recoverMaskedOutput, mr as synthesisStatusMessage, mt as deleteIndeterminateGuards, n as DEFAULT_RESOURCE_WARN_AFTER_MS, ni as NestedStackChildDirectDestroyError, nn as STATE_SOURCED_CROSS_GENERATION_RULES, nr as dockerSpawnEnvWithSensitive, nt as wouldReturnToSdkProvider, o as planFailedOps, oi as ResourceUpdateNotSupportedError, on as createSecretMasker, or as redactDockerArgvValues, ot as beginCommandInterruptScope, p as maskingRetryLogger, pi as normalizeAwsError, pn as recordMaskOnlyValue, pr as Synthesizer, pt as UNSPECIFIED_SKIP_REASON, q as isExportAliasCollision, qn as readBootstrapMarkerBody, qt as DiffCalculator, r as DeployEngine, ri as PartialFailureError, rn as STATE_SOURCED_READBACK_RULES, rr as formatDockerLoginError, rt as createMaskedRetryLogger, s as planRollback, si as StackHasActiveImportsError, sn as dynamicReferenceTokens, sr as runDockerForeground, st as endCommandInterruptScope, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as STATE_SOURCED_BASELINE_RULES, tr as describeDockerFailure, tt as ProviderRegistry, u as updatePartialMessage, un as isSingleDynamicReferenceToken, ur as stripControlChars, ut as startInterruptWatch, v as PRE_DELETE_SNAPSHOT_TYPES, vi as isTransientServerError, vn as S3StateBackend, vr as resolveAutoAssetStorage, vt as IntrinsicFunctionResolver, w as unsupportedFinalSnapshotError, wn as shellQuote, wr as stateBucketExistenceConfirmed, wt as parameterTypeMayLoseSecretIdentity, x as createPreDeleteFinalSnapshot, xi as retryClassificationText, xn as buildForceUnlockCommand, xr as resolveStateBucketWithDefault, xt as coerceParameterTypedValue, y as buildFinalSnapshotIdentifier, yi as markNonRetryable, yn as rebuildClientForBucketRegion, yr as resolveCaptureObservedState, yt as carriesDynamicReference, z as cyan, zn as rewriteTemplateAssetReferences, zt as producerRegionsFromState } from "./deploy-engine-
|
|
1
|
+
import { $ as collectInlinePolicyNamesManagedBySiblings, $n as describeDockerCapturedOutput, $r as LocalInvokeBuildError$1, $t as DagBuilder, A as isStatefulRecreateTargetForReplace, An as orphansAfterRollback, Ar as uploadCfnTemplate, At as coerceCfnBoolean, B as gray, Bn as AssetModeResolver, Br as resolveBucketRegion, Bt as withSharedDrainBudget, C as refusesFinalSnapshot, Cn as forceQuitRecoveryClause, Cr as resolveUseCdkBootstrapAssets, Ct as isUnboundTemplateParameter, D as makeSiblingClaimReader, Dn as exportNamesCarriedFrom, Dr as CFN_TEMPLATE_URL_LIMIT, Dt as normalizeAwsTagsToCfn, E as extractDeploymentEventError, En as DEFAULT_STATE_PREFIX, Er as CFN_TEMPLATE_BODY_LIMIT, Et as WAFv2WebACLProvider, F as isWarmThroughputDecrease, Fn as WorkGraph, Fr as canonicalizeRegion, Ft as requireConfigArray, G as collectPublishedOutputNames, Gn as isCrossRegionRedirect, Gt as s3BucketWebsiteUrl, H as red, Hn as assertAssetBucketRegion, Hr as getAwsClients, Ht as s3BucketDomainName, I as toFiniteNumber, In as buildAssetRedirectMap, Ir as derivePartitionAndUrlSuffix, It as requireConfigObject, J as secretBearing, Jn as validateAssetBucketName, Jr as CrossAccountSecretRefusalError, Jt as INTRINSIC_KEYS, K as exportAliasCollisionScrubWarning, Kn as parseBootstrapMarker, Kr as CdkdError, Kt as applyRoleArnIfSet, L as formatResourceLine, Ln as createAssetRedirectResolver, Lr as AssemblyReader, Lt as requireConfigString, M as renderStatefulReason, Mn as shouldRetainResource, Mr as displaySafe, Mt as configStringRefusal, N as WARM_THROUGHPUT_MEMBERS, Nn as AssetPublisher, Nr as expectedOwnerParam, Nt as readConfigString, O as planOrphanAdoption, On as importableOutputKeys, Or as MIGRATE_TMP_PREFIX, Ot as resolveExplicitPhysicalId, P as coerceWarmThroughput$1, Pn as stringifyValue, Pr as PARTITION_TABLE, Pt as replayWarn, Q as IAMRoleProvider, Qn as buildDockerImage, Qr as IntrinsicResolutionRefusalError, Qt as withRetry, R as bold, Rn as loadPublishableAssetManifest, Rr as processStackMessages, Rt as classifyReplaySecretRegion, S as isFinalSnapshotError, Sn as buildLockContentionMessage, Sr as resolveStateBucketWithDefaultAndSource, St as getAccountInfo, T as makeCanonicalizePropertiesFn, Tn as CUSTOM_RESOURCE_RESPONSE_PREFIX, Tr as warnDeprecatedNoPrefixCliFlag, Tt as refStateLookupFromResource, U as yellow, Un as ensureAssetStorage, Ur as resetAwsClients, Ut as s3BucketDualStackDomainName, V as green, Vn as BOOTSTRAP_MARKER_PREFIX, Vr as AwsClients, Vt as s3BucketArn, W as collectDeclaredOutputNames, Wn as getBootstrapMarkerKey, Wr as setAwsClients, Wt as s3BucketRegionalDomainName, X as secretSafeKeyDisplay, Xn as buildDenyExternalAccessPolicy, Xr as DeployCancelledError, Xt as findSilentDropProperties, Y as secretBearingStateKeyWarning, Yn as validateContainerRepoName, Yt as findActionableSilentDrops, Z as getCurrentResourceSecrets, Zn as describeAwsFailure, Zr as DynamicReferenceRegionAmbiguousError, Zt as describeTypeWithThrottleRetry, _ as ATOMIC_FINAL_SNAPSHOT_TYPES, _i as isThrottlingError, _n as LockManager, _r as resolveApp, _t as isTerminationProtectionPropagationError, a as DeploymentEventsStore, ai as ResourceTimeoutError, an as carriesSecretMask, ar as partitionSensitiveEnv, at as maskerOrIdentity, b as ccRoutedFinalSnapshotError, bi as markRedactedCause, bn as UNRENDERABLE, br as resolveSkipPrefix, bt as cfnRefValueFromPhysicalId, c as replayFailedOperations, ci as StackTerminationProtectionError, cn as errorCauseChain, cr as runDockerStreaming, ct as interruptWatchListenerCount, d as updatePartialReason, dn as maskSecretsInError, dr as AssetManifestLoader, dt as CloudControlProvider, ei as LocalStartServiceError, en as TemplateParser, er as describeDockerExecFailure, et as clearOnUpdateRemoval, f as withResourceDeadline, fn as maskSecretsInText, fr as getDockerImageBySourceHash, ft as slowCcOperationTimeoutMs, g as bindingSkippedOutputs, gi as isRetryableTransientError, gn as scrubResourceRecord, gr as getLegacyStateBucketName, gt as disableInstanceApiTermination, h as computeImplicitDeleteEdges, hi as isMarkedNonRetryable, hn as redactSecretsForState, hr as getDefaultStateBucketName, ht as deleteSkipReason, i as DeploymentEventsReader, ii as ProvisioningError, in as TEMPLATE_SOURCED_RULES, ir as getDockerCmd, it as maskDeep, j as isStatefulRecreateTargetSync, jn as orphansCarriedFrom, jr as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, jt as configBooleanRefusal, k as MULTI_REGION_RECREATE_BLOCKED_TYPES, kn as importableOutputs, kr as findLargeInlineResources, kt as assertRegionMatch, l as replayRollback, ln as identityKeyFor, lr as escapeRegExp, lt as isInterruptedWaitError, m as IMPLICIT_DELETE_DEPENDENCIES, mi as withErrorHandling, mn as recoverMaskedOutput, mr as synthesisStatusMessage, mt as deleteIndeterminateGuards, n as DEFAULT_RESOURCE_WARN_AFTER_MS, ni as NestedStackChildDirectDestroyError, nn as STATE_SOURCED_CROSS_GENERATION_RULES, nr as dockerSpawnEnvWithSensitive, nt as wouldReturnToSdkProvider, o as planFailedOps, oi as ResourceUpdateNotSupportedError, on as createSecretMasker, or as redactDockerArgvValues, ot as beginCommandInterruptScope, p as maskingRetryLogger, pi as normalizeAwsError, pn as recordMaskOnlyValue, pr as Synthesizer, pt as UNSPECIFIED_SKIP_REASON, q as isExportAliasCollision, qn as readBootstrapMarkerBody, qt as DiffCalculator, r as DeployEngine, ri as PartialFailureError, rn as STATE_SOURCED_READBACK_RULES, rr as formatDockerLoginError, rt as createMaskedRetryLogger, s as planRollback, si as StackHasActiveImportsError, sn as dynamicReferenceTokens, sr as runDockerForeground, st as endCommandInterruptScope, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as STATE_SOURCED_BASELINE_RULES, tr as describeDockerFailure, tt as ProviderRegistry, u as updatePartialMessage, un as isSingleDynamicReferenceToken, ur as stripControlChars, ut as startInterruptWatch, v as PRE_DELETE_SNAPSHOT_TYPES, vi as isTransientServerError, vn as S3StateBackend, vr as resolveAutoAssetStorage, vt as IntrinsicFunctionResolver, w as unsupportedFinalSnapshotError, wn as shellQuote, wr as stateBucketExistenceConfirmed, wt as parameterTypeMayLoseSecretIdentity, x as createPreDeleteFinalSnapshot, xi as retryClassificationText, xn as buildForceUnlockCommand, xr as resolveStateBucketWithDefault, xt as coerceParameterTypedValue, y as buildFinalSnapshotIdentifier, yi as markNonRetryable, yn as rebuildClientForBucketRegion, yr as resolveCaptureObservedState, yt as carriesDynamicReference, z as cyan, zn as rewriteTemplateAssetReferences, zt as producerRegionsFromState } from "./deploy-engine-14EMrfBt.js";
|
|
2
2
|
import { _ as withSkipPrefix, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName } from "./logger-D2Md1kTq.js";
|
|
3
3
|
import { t as awsClientDefaults } from "./aws-client-defaults-D-iYiIJ6.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { r as protectedReplacementAdvice, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-BvvRGJMb.js";
|
|
5
|
+
import { r as protectedReplacementAdvice, t as ASGProvider } from "./asg-provider-B3stERoz.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
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, NotFound, 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";
|
|
@@ -6682,6 +6682,21 @@ function configItemId(item) {
|
|
|
6682
6682
|
if (typeof id === "string") return id;
|
|
6683
6683
|
if (typeof id === "number" && Number.isFinite(id)) return String(id);
|
|
6684
6684
|
}
|
|
6685
|
+
/**
|
|
6686
|
+
* Whether the template asks for a bucket-level Object Lock.
|
|
6687
|
+
*
|
|
6688
|
+
* Shared on purpose by the two sites that must agree: `create()` passes
|
|
6689
|
+
* `ObjectLockEnabledForBucket` to `CreateBucket` from it, and the create-path
|
|
6690
|
+
* Object Lock skip records `{ ObjectLockEnabled: 'Enabled' }` from it. Spelled
|
|
6691
|
+
* twice, the recorded value could claim a flag the bucket does not carry.
|
|
6692
|
+
*
|
|
6693
|
+
* Note the source: the BUCKET-level `ObjectLockEnabled`, never the one nested
|
|
6694
|
+
* inside `ObjectLockConfiguration` -- only the top-level property reaches
|
|
6695
|
+
* `CreateBucket`, and it is the only one AWS can report back.
|
|
6696
|
+
*/
|
|
6697
|
+
function declaresBucketObjectLock(properties) {
|
|
6698
|
+
return properties["ObjectLockEnabled"] === true || properties["ObjectLockEnabled"] === "true";
|
|
6699
|
+
}
|
|
6685
6700
|
function isPlainObject$1(value) {
|
|
6686
6701
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6687
6702
|
}
|
|
@@ -8969,28 +8984,46 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
8969
8984
|
*
|
|
8970
8985
|
* CFn property: ObjectLockConfiguration
|
|
8971
8986
|
* - ObjectLockEnabled: 'Enabled'
|
|
8972
|
-
* - Rule.DefaultRetention (Mode, Days, Years)
|
|
8987
|
+
* - Rule.DefaultRetention (Mode, Days, Years, DefaultEventHold)
|
|
8973
8988
|
* SDK: PutObjectLockConfiguration with ObjectLockConfiguration
|
|
8974
8989
|
*
|
|
8975
8990
|
* Note: ObjectLockEnabled at bucket level must be set at creation time.
|
|
8976
8991
|
* This method only applies the rule/default retention config post-creation.
|
|
8992
|
+
*
|
|
8993
|
+
* Returns whether the Put was issued. A malformed `DefaultEventHold`
|
|
8994
|
+
* container SKIPS the whole Put (see the guard below), and the callers owe
|
|
8995
|
+
* `effectiveProperties` the previous value when it does.
|
|
8977
8996
|
*/
|
|
8978
|
-
async applyObjectLockConfiguration(bucketName, config) {
|
|
8997
|
+
async applyObjectLockConfiguration(bucketName, config, onUnusable) {
|
|
8979
8998
|
const rule = config["Rule"];
|
|
8980
8999
|
const objectLockConfig = { ObjectLockEnabled: "Enabled" };
|
|
8981
9000
|
if (rule) {
|
|
8982
9001
|
const retention = rule["DefaultRetention"];
|
|
8983
|
-
if (retention)
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
9002
|
+
if (retention) {
|
|
9003
|
+
const declaredHold = retention["DefaultEventHold"];
|
|
9004
|
+
let eventHold;
|
|
9005
|
+
if (declaredHold != null) {
|
|
9006
|
+
const path = "AWS::S3::Bucket ObjectLockConfiguration.Rule.DefaultRetention.DefaultEventHold";
|
|
9007
|
+
eventHold = onUnusable ? requireConfigObject(declaredHold, path, { onUnusable }) : requireConfigObject(declaredHold, path);
|
|
9008
|
+
if (eventHold === void 0) return false;
|
|
9009
|
+
}
|
|
9010
|
+
objectLockConfig.Rule = { DefaultRetention: {
|
|
9011
|
+
Mode: retention["Mode"],
|
|
9012
|
+
Days: retention["Days"],
|
|
9013
|
+
Years: retention["Years"],
|
|
9014
|
+
DefaultEventHold: eventHold ? {
|
|
9015
|
+
Days: eventHold["Days"],
|
|
9016
|
+
Years: eventHold["Years"]
|
|
9017
|
+
} : void 0
|
|
9018
|
+
} };
|
|
9019
|
+
}
|
|
8988
9020
|
}
|
|
8989
9021
|
await this.s3Client.send(new PutObjectLockConfigurationCommand({
|
|
8990
9022
|
Bucket: bucketName,
|
|
8991
9023
|
ObjectLockConfiguration: objectLockConfig
|
|
8992
9024
|
}));
|
|
8993
9025
|
this.logger.debug(`Applied object lock configuration to bucket ${bucketName}`);
|
|
9026
|
+
return true;
|
|
8994
9027
|
}
|
|
8995
9028
|
/**
|
|
8996
9029
|
* Apply additional bucket configuration after creation.
|
|
@@ -9526,7 +9559,9 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
9526
9559
|
await this.s3Client.send(new DeleteBucketReplicationCommand({ Bucket: bucketName }));
|
|
9527
9560
|
this.logger.debug(`Deleted replication configuration on bucket ${bucketName}`);
|
|
9528
9561
|
});
|
|
9529
|
-
await this.diffSubConfig(bucketName, previousProperties["ObjectLockConfiguration"], properties["ObjectLockConfiguration"], async (cfg) =>
|
|
9562
|
+
await this.diffSubConfig(bucketName, previousProperties["ObjectLockConfiguration"], properties["ObjectLockConfiguration"], async (cfg) => {
|
|
9563
|
+
if (!await this.applyObjectLockConfiguration(bucketName, cfg, (m) => this.logger.warn(m))) retainPrevious("ObjectLockConfiguration");
|
|
9564
|
+
}, async () => {
|
|
9530
9565
|
await this.s3Client.send(new PutObjectLockConfigurationCommand({
|
|
9531
9566
|
Bucket: bucketName,
|
|
9532
9567
|
ObjectLockConfiguration: { ObjectLockEnabled: "Enabled" }
|
|
@@ -9671,7 +9706,9 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
9671
9706
|
if (!await this.applyReplicationConfiguration(bucketName, replConfig, replayOnUnusable)) overrides.set("ReplicationConfiguration", void 0);
|
|
9672
9707
|
}
|
|
9673
9708
|
const objectLockConfig = properties["ObjectLockConfiguration"];
|
|
9674
|
-
if (objectLockConfig)
|
|
9709
|
+
if (objectLockConfig) {
|
|
9710
|
+
if (!await this.applyObjectLockConfiguration(bucketName, objectLockConfig, replayOnUnusable)) overrides.set("ObjectLockConfiguration", declaresBucketObjectLock(properties) ? { ObjectLockEnabled: "Enabled" } : void 0);
|
|
9711
|
+
}
|
|
9675
9712
|
return overrides;
|
|
9676
9713
|
}
|
|
9677
9714
|
/**
|
|
@@ -9958,7 +9995,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
9958
9995
|
const region = await this.getRegion();
|
|
9959
9996
|
const canonicalRegion = canonicalizeRegion(region);
|
|
9960
9997
|
if (canonicalRegion !== "us-east-1") createParams.CreateBucketConfiguration = { LocationConstraint: canonicalRegion };
|
|
9961
|
-
if (properties
|
|
9998
|
+
if (declaresBucketObjectLock(properties)) createParams.ObjectLockEnabledForBucket = true;
|
|
9962
9999
|
const preflight = canonicalizeRegion(region) === "us-east-1" ? await this.probeBucketRegion(bucketName) : { kind: "absent" };
|
|
9963
10000
|
let createdNewBucket = false;
|
|
9964
10001
|
try {
|
|
@@ -10583,6 +10620,12 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
10583
10620
|
if (r.Mode !== void 0) retention["Mode"] = r.Mode;
|
|
10584
10621
|
if (r.Days !== void 0) retention["Days"] = r.Days;
|
|
10585
10622
|
if (r.Years !== void 0) retention["Years"] = r.Years;
|
|
10623
|
+
if (r.DefaultEventHold !== void 0) {
|
|
10624
|
+
const eventHold = {};
|
|
10625
|
+
if (r.DefaultEventHold.Days !== void 0) eventHold["Days"] = r.DefaultEventHold.Days;
|
|
10626
|
+
if (r.DefaultEventHold.Years !== void 0) eventHold["Years"] = r.DefaultEventHold.Years;
|
|
10627
|
+
retention["DefaultEventHold"] = eventHold;
|
|
10628
|
+
}
|
|
10586
10629
|
out["Rule"] = { DefaultRetention: retention };
|
|
10587
10630
|
}
|
|
10588
10631
|
return out;
|
|
@@ -91710,4 +91753,4 @@ function buildProgram() {
|
|
|
91710
91753
|
|
|
91711
91754
|
//#endregion
|
|
91712
91755
|
export { buildProgram };
|
|
91713
|
-
//# sourceMappingURL=program-
|
|
91756
|
+
//# sourceMappingURL=program-CIn_e9xI.js.map
|