@go-to-k/cdkd 0.290.1 → 0.290.2
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-e05iqtU_.js → asg-provider-BsC_XndT.js} +2 -2
- package/dist/{asg-provider-e05iqtU_.js.map → asg-provider-BsC_XndT.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-aYUEGRRl.js → deploy-engine-Nn9j2GPK.js} +3 -3
- package/dist/{deploy-engine-aYUEGRRl.js.map → deploy-engine-Nn9j2GPK.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-CnTfNj2k.js → program-z-ESK5sd.js} +133 -19
- package/dist/{program-CnTfNj2k.js.map → program-z-ESK5sd.js.map} +1 -1
- package/dist/{version-DTli1mA9.js → version-7XwrjRzX.js} +2 -2
- package/dist/{version-DTli1mA9.js.map → version-7XwrjRzX.js.map} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as DependencyError, Cn as S3StateBackend, Gr as AwsClients, Jr as setAwsClients, Kr as getAwsClients, Rn as AssetPublisher, Sn as LockManager, Ur as clearBucketRegionCache, Vr as AssemblyReader, Wr as resolveBucketRegion, Xr as CdkdError, Yr as AssetError, Zr as ConfigError, Zt as DiffCalculator, _i as normalizeAwsError, ai as LockError, ci as ProvisioningError, et as IAMRoleProvider, gi as isCdkdError, hi as formatError, in as TemplateParser, mi as SynthesisError, pi as StateError, pt as CloudControlProvider, qr as resetAwsClients, r as DeployEngine, rn as DagBuilder, rt as ProviderRegistry, vr as Synthesizer } from "./deploy-engine-
|
|
1
|
+
import { $r as DependencyError, Cn as S3StateBackend, Gr as AwsClients, Jr as setAwsClients, Kr as getAwsClients, Rn as AssetPublisher, Sn as LockManager, Ur as clearBucketRegionCache, Vr as AssemblyReader, Wr as resolveBucketRegion, Xr as CdkdError, Yr as AssetError, Zr as ConfigError, Zt as DiffCalculator, _i as normalizeAwsError, ai as LockError, ci as ProvisioningError, et as IAMRoleProvider, gi as isCdkdError, hi as formatError, in as TemplateParser, mi as SynthesisError, pi as StateError, pt as CloudControlProvider, qr as resetAwsClients, r as DeployEngine, rn as DagBuilder, rt as ProviderRegistry, vr as Synthesizer } from "./deploy-engine-Nn9j2GPK.js";
|
|
2
2
|
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-DTEUzYP_.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 getCurrentResourceSecrets, $n as validateAssetBucketName, $t as findActionableSilentDrops, A as planOrphanAdoption, An as CUSTOM_RESOURCE_RESPONSE_PREFIX, Ar as warnDeprecatedNoPrefixCliFlag, At as resolveExplicitPhysicalId, B as bold, Bn as WorkGraph, Br as derivePartitionAndUrlSuffix, Bt as requireConfigObject, C as createPreDeleteFinalSnapshot, Ci as markNonRetryable, Cn as S3StateBackend, Cr as resolveAutoAssetStorage, Ct as coerceParameterTypedValue, D as makeCanonicalizePropertiesFn, Dn as forceQuitRecoveryClause, Dr as resolveStateBucketWithDefaultAndSource, Dt as refStateLookupFromResource, E as unsupportedFinalSnapshotError, En as buildLockContentionMessage, Er as resolveStateBucketWithDefault, Et as parameterTypeMayLoseSecretIdentity, F as WARM_THROUGHPUT_MEMBERS, Fn as orphansAfterRollback, Fr as uploadCfnTemplate, Ft as configIntegerRefusal, G as yellow, Gn as AssetModeResolver, Gr as AwsClients, Gt as s3BucketArn, H as gray, Hn as createAssetRedirectResolver, Hr as processStackMessages, Ht as classifyReplaySecretRegion, I as coerceWarmThroughput$1, In as orphansCarriedFrom, Ir as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, It as configStringRefusal, J as exportAliasCollisionScrubWarning, Jn as ensureAssetStorage, Jr as setAwsClients, Jt as s3BucketRegionalDomainName, K as collectDeclaredOutputNames, Kn as BOOTSTRAP_MARKER_PREFIX, Kr as getAwsClients, Kt as s3BucketDomainName, L as isWarmThroughputDecrease, Ln as shouldRetainResource, Lr as expectedOwnerParam, Lt as readConfigString, M as isStatefulRecreateTargetForReplace, Mn as exportNamesCarriedFrom, Mr as CFN_TEMPLATE_URL_LIMIT, Mt as coerceCfnBoolean, N as isStatefulRecreateTargetSync, Nn as importableOutputKeys, Nr as MIGRATE_TMP_PREFIX, Nt as coerceCfnInteger, O as extractDeploymentEventError, On as formatLockExpiry, Or as resolveUseCdkBootstrapAssets, Ot as WAFv2WebACLProvider, P as renderStatefulReason, Pn as importableOutputs, Pr as findLargeInlineResources, Pt as configBooleanRefusal, Q as secretSafeKeyDisplay, Qn as readBootstrapMarkerBody, Qr as CrossAccountSecretRefusalError, Qt as INTRINSIC_KEYS, R as toFiniteNumber, Rn as AssetPublisher, Rr as PARTITION_TABLE, Rt as replayWarn, S as ccRoutedFinalSnapshotError, Si as isTransientServerError, Sn as LockManager, Sr as resolveApp, St as cfnRefValueFromPhysicalId, T as refusesFinalSnapshot, Ti as retryClassificationText, Tn as buildForceUnlockCommand, Tr as resolveSkipPrefix, Tt as isUnboundTemplateParameter, U as green, Un as loadPublishableAssetManifest, Ut as producerRegionsFromState, V as cyan, Vn as buildAssetRedirectMap, Vr as AssemblyReader, Vt as requireConfigString, W as red, Wn as rewriteTemplateAssetReferences, Wr as resolveBucketRegion, Wt as withSharedDrainBudget, X as secretBearing, Xn as isCrossRegionRedirect, Xr as CdkdError, Xt as applyRoleArnIfSet, Y as isExportAliasCollision, Yn as getBootstrapMarkerKey, Yt as s3BucketWebsiteUrl, Z as secretBearingStateKeyWarning, Zn as parseBootstrapMarker, Zt as DiffCalculator, _ as isSecretBearingReferenceString, _i as normalizeAwsError, _n as maskSecretsInText, _r as getDockerImageBySourceHash, _t as deleteSkipReason, a as DeploymentEventsStore, an as STATE_SOURCED_BASELINE_RULES, ar as describeDockerExecFailure, at as createMaskedRetryLogger, b as PRE_DELETE_SNAPSHOT_TYPES, bi as isRetryableTransientError, bn as redactSecretsForState, br as getDefaultStateBucketName, bt as IntrinsicFunctionResolver, c as replayFailedOperations, ci as ProvisioningError, cn as TEMPLATE_SOURCED_RULES, cr as formatDockerLoginError, ct as beginCommandInterruptScope, d as updatePartialReason, di as StackHasActiveImportsError, dn as dynamicReferenceTokens, dr as redactDockerArgvValues, dt as isInterruptedWaitError, ei as DeployCancelledError, en as findSilentDropProperties, er as validateContainerRepoName, et as IAMRoleProvider, f as withResourceDeadline, fi as StackTerminationProtectionError, fn as errorCauseChain, fr as runDockerForeground, ft as startInterruptWatch, g as bagHoldsSecretExpression, gn as maskSecretsInError, gr as AssetManifestLoader, gt as deleteIndeterminateGuards, h as computeImplicitDeleteEdges, hn as markSameGenerationBag, hr as stripControlChars, ht as UNSPECIFIED_SKIP_REASON, i as DeploymentEventsReader, ii as LocalStartServiceError, in as TemplateParser, ir as describeDockerCapturedOutput, it as wouldReturnToSdkProvider, j as MULTI_REGION_RECREATE_BLOCKED_TYPES, jn as DEFAULT_STATE_PREFIX, jr as CFN_TEMPLATE_BODY_LIMIT, jt as assertRegionMatch, k as makeSiblingClaimReader, kn as shellQuote, kr as stateBucketExistenceConfirmed, kt as normalizeAwsTagsToCfn, l as replayRollback, li as ResourceTimeoutError, ln as carriesSecretMask, lr as getDockerCmd, lt as endCommandInterruptScope, m as IMPLICIT_DELETE_DEPENDENCIES, mn as isSingleDynamicReferenceToken, mr as escapeRegExp, mt as slowCcOperationTimeoutMs, n as DEFAULT_RESOURCE_WARN_AFTER_MS, ni as IntrinsicResolutionRefusalError, nn as withRetry, nr as describeAwsFailure, nt as clearOnUpdateRemoval, o as planFailedOps, oi as NestedStackChildDirectDestroyError, on as STATE_SOURCED_CROSS_GENERATION_RULES, or as describeDockerFailure, ot as maskDeep, p as maskingRetryLogger, pn as identityKeyFor, pr as runDockerStreaming, pt as CloudControlProvider, q as collectPublishedOutputNames, qn as assertAssetBucketRegion, qr as resetAwsClients, qt as s3BucketDualStackDomainName, r as DeployEngine, ri as LocalInvokeBuildError$1, rn as DagBuilder, rr as buildDockerImage, rt as ProviderRegistry, s as planRollback, si as PartialFailureError, sn as STATE_SOURCED_READBACK_RULES, sr as dockerSpawnEnvWithSensitive, st as maskerOrIdentity, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as DynamicReferenceRegionAmbiguousError, tn as describeTypeWithThrottleRetry, tr as buildDenyExternalAccessPolicy, tt as collectInlinePolicyNamesManagedBySiblings, u as updatePartialMessage, ui as ResourceUpdateNotSupportedError, un as createSecretMasker, ur as partitionSensitiveEnv, ut as interruptWatchListenerCount, v as bindingSkippedOutputs, vi as withErrorHandling, vn as recordMaskOnlyValue, vr as Synthesizer, vt as disableInstanceApiTermination, w as isFinalSnapshotError, wi as markRedactedCause, wn as rebuildClientForBucketRegion, wr as resolveCaptureObservedState, wt as getAccountInfo, x as buildFinalSnapshotIdentifier, xi as isThrottlingError, xn as scrubResourceRecord, xr as getLegacyStateBucketName, xt as carriesDynamicReference, y as ATOMIC_FINAL_SNAPSHOT_TYPES, yi as isMarkedNonRetryable, yn as recoverMaskedOutput, yr as synthesisStatusMessage, yt as isTerminationProtectionPropagationError, z as formatResourceLine, zn as stringifyValue, zr as canonicalizeRegion, zt as requireConfigArray } from "./deploy-engine-
|
|
1
|
+
import { $ as getCurrentResourceSecrets, $n as validateAssetBucketName, $t as findActionableSilentDrops, A as planOrphanAdoption, An as CUSTOM_RESOURCE_RESPONSE_PREFIX, Ar as warnDeprecatedNoPrefixCliFlag, At as resolveExplicitPhysicalId, B as bold, Bn as WorkGraph, Br as derivePartitionAndUrlSuffix, Bt as requireConfigObject, C as createPreDeleteFinalSnapshot, Ci as markNonRetryable, Cn as S3StateBackend, Cr as resolveAutoAssetStorage, Ct as coerceParameterTypedValue, D as makeCanonicalizePropertiesFn, Dn as forceQuitRecoveryClause, Dr as resolveStateBucketWithDefaultAndSource, Dt as refStateLookupFromResource, E as unsupportedFinalSnapshotError, En as buildLockContentionMessage, Er as resolveStateBucketWithDefault, Et as parameterTypeMayLoseSecretIdentity, F as WARM_THROUGHPUT_MEMBERS, Fn as orphansAfterRollback, Fr as uploadCfnTemplate, Ft as configIntegerRefusal, G as yellow, Gn as AssetModeResolver, Gr as AwsClients, Gt as s3BucketArn, H as gray, Hn as createAssetRedirectResolver, Hr as processStackMessages, Ht as classifyReplaySecretRegion, I as coerceWarmThroughput$1, In as orphansCarriedFrom, Ir as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, It as configStringRefusal, J as exportAliasCollisionScrubWarning, Jn as ensureAssetStorage, Jr as setAwsClients, Jt as s3BucketRegionalDomainName, K as collectDeclaredOutputNames, Kn as BOOTSTRAP_MARKER_PREFIX, Kr as getAwsClients, Kt as s3BucketDomainName, L as isWarmThroughputDecrease, Ln as shouldRetainResource, Lr as expectedOwnerParam, Lt as readConfigString, M as isStatefulRecreateTargetForReplace, Mn as exportNamesCarriedFrom, Mr as CFN_TEMPLATE_URL_LIMIT, Mt as coerceCfnBoolean, N as isStatefulRecreateTargetSync, Nn as importableOutputKeys, Nr as MIGRATE_TMP_PREFIX, Nt as coerceCfnInteger, O as extractDeploymentEventError, On as formatLockExpiry, Or as resolveUseCdkBootstrapAssets, Ot as WAFv2WebACLProvider, P as renderStatefulReason, Pn as importableOutputs, Pr as findLargeInlineResources, Pt as configBooleanRefusal, Q as secretSafeKeyDisplay, Qn as readBootstrapMarkerBody, Qr as CrossAccountSecretRefusalError, Qt as INTRINSIC_KEYS, R as toFiniteNumber, Rn as AssetPublisher, Rr as PARTITION_TABLE, Rt as replayWarn, S as ccRoutedFinalSnapshotError, Si as isTransientServerError, Sn as LockManager, Sr as resolveApp, St as cfnRefValueFromPhysicalId, T as refusesFinalSnapshot, Ti as retryClassificationText, Tn as buildForceUnlockCommand, Tr as resolveSkipPrefix, Tt as isUnboundTemplateParameter, U as green, Un as loadPublishableAssetManifest, Ut as producerRegionsFromState, V as cyan, Vn as buildAssetRedirectMap, Vr as AssemblyReader, Vt as requireConfigString, W as red, Wn as rewriteTemplateAssetReferences, Wr as resolveBucketRegion, Wt as withSharedDrainBudget, X as secretBearing, Xn as isCrossRegionRedirect, Xr as CdkdError, Xt as applyRoleArnIfSet, Y as isExportAliasCollision, Yn as getBootstrapMarkerKey, Yt as s3BucketWebsiteUrl, Z as secretBearingStateKeyWarning, Zn as parseBootstrapMarker, Zt as DiffCalculator, _ as isSecretBearingReferenceString, _i as normalizeAwsError, _n as maskSecretsInText, _r as getDockerImageBySourceHash, _t as deleteSkipReason, a as DeploymentEventsStore, an as STATE_SOURCED_BASELINE_RULES, ar as describeDockerExecFailure, at as createMaskedRetryLogger, b as PRE_DELETE_SNAPSHOT_TYPES, bi as isRetryableTransientError, bn as redactSecretsForState, br as getDefaultStateBucketName, bt as IntrinsicFunctionResolver, c as replayFailedOperations, ci as ProvisioningError, cn as TEMPLATE_SOURCED_RULES, cr as formatDockerLoginError, ct as beginCommandInterruptScope, d as updatePartialReason, di as StackHasActiveImportsError, dn as dynamicReferenceTokens, dr as redactDockerArgvValues, dt as isInterruptedWaitError, ei as DeployCancelledError, en as findSilentDropProperties, er as validateContainerRepoName, et as IAMRoleProvider, f as withResourceDeadline, fi as StackTerminationProtectionError, fn as errorCauseChain, fr as runDockerForeground, ft as startInterruptWatch, g as bagHoldsSecretExpression, gn as maskSecretsInError, gr as AssetManifestLoader, gt as deleteIndeterminateGuards, h as computeImplicitDeleteEdges, hn as markSameGenerationBag, hr as stripControlChars, ht as UNSPECIFIED_SKIP_REASON, i as DeploymentEventsReader, ii as LocalStartServiceError, in as TemplateParser, ir as describeDockerCapturedOutput, it as wouldReturnToSdkProvider, j as MULTI_REGION_RECREATE_BLOCKED_TYPES, jn as DEFAULT_STATE_PREFIX, jr as CFN_TEMPLATE_BODY_LIMIT, jt as assertRegionMatch, k as makeSiblingClaimReader, kn as shellQuote, kr as stateBucketExistenceConfirmed, kt as normalizeAwsTagsToCfn, l as replayRollback, li as ResourceTimeoutError, ln as carriesSecretMask, lr as getDockerCmd, lt as endCommandInterruptScope, m as IMPLICIT_DELETE_DEPENDENCIES, mn as isSingleDynamicReferenceToken, mr as escapeRegExp, mt as slowCcOperationTimeoutMs, n as DEFAULT_RESOURCE_WARN_AFTER_MS, ni as IntrinsicResolutionRefusalError, nn as withRetry, nr as describeAwsFailure, nt as clearOnUpdateRemoval, o as planFailedOps, oi as NestedStackChildDirectDestroyError, on as STATE_SOURCED_CROSS_GENERATION_RULES, or as describeDockerFailure, ot as maskDeep, p as maskingRetryLogger, pn as identityKeyFor, pr as runDockerStreaming, pt as CloudControlProvider, q as collectPublishedOutputNames, qn as assertAssetBucketRegion, qr as resetAwsClients, qt as s3BucketDualStackDomainName, r as DeployEngine, ri as LocalInvokeBuildError$1, rn as DagBuilder, rr as buildDockerImage, rt as ProviderRegistry, s as planRollback, si as PartialFailureError, sn as STATE_SOURCED_READBACK_RULES, sr as dockerSpawnEnvWithSensitive, st as maskerOrIdentity, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as DynamicReferenceRegionAmbiguousError, tn as describeTypeWithThrottleRetry, tr as buildDenyExternalAccessPolicy, tt as collectInlinePolicyNamesManagedBySiblings, u as updatePartialMessage, ui as ResourceUpdateNotSupportedError, un as createSecretMasker, ur as partitionSensitiveEnv, ut as interruptWatchListenerCount, v as bindingSkippedOutputs, vi as withErrorHandling, vn as recordMaskOnlyValue, vr as Synthesizer, vt as disableInstanceApiTermination, w as isFinalSnapshotError, wi as markRedactedCause, wn as rebuildClientForBucketRegion, wr as resolveCaptureObservedState, wt as getAccountInfo, x as buildFinalSnapshotIdentifier, xi as isThrottlingError, xn as scrubResourceRecord, xr as getLegacyStateBucketName, xt as carriesDynamicReference, y as ATOMIC_FINAL_SNAPSHOT_TYPES, yi as isMarkedNonRetryable, yn as recoverMaskedOutput, yr as synthesisStatusMessage, yt as isTerminationProtectionPropagationError, z as formatResourceLine, zn as stringifyValue, zr as canonicalizeRegion, zt as requireConfigArray } from "./deploy-engine-Nn9j2GPK.js";
|
|
2
2
|
import { _ as withSkipPrefix, b as displaySafe, 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, x as truncateCodePoints, y as UNRENDERABLE } from "./logger-DTEUzYP_.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-7XwrjRzX.js";
|
|
5
|
+
import { r as protectedReplacementAdvice, t as ASGProvider } from "./asg-provider-BsC_XndT.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";
|
|
@@ -26,9 +26,9 @@ import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateCacheClus
|
|
|
26
26
|
import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$7, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
|
|
27
27
|
import { CreateMicrovmImageCommand, DeleteMicrovmImageCommand, GetMicrovmImageCommand, LambdaMicrovmsClient, ListTagsCommand as ListTagsCommand$1, ResourceNotFoundException as ResourceNotFoundException$8, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateMicrovmImageCommand } from "@aws-sdk/client-lambda-microvms";
|
|
28
28
|
import * as fs from "node:fs";
|
|
29
|
-
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
29
|
+
import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
|
|
30
30
|
import * as path from "node:path";
|
|
31
|
-
import { basename, dirname, isAbsolute, resolve } from "node:path";
|
|
31
|
+
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
32
32
|
import { execFile, spawn } from "node:child_process";
|
|
33
33
|
import { tmpdir } from "node:os";
|
|
34
34
|
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, HostedZoneAlreadyExists, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$8, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
|
|
@@ -83846,7 +83846,7 @@ function resolveAssetCodePath$1(stack, logicalId, resource) {
|
|
|
83846
83846
|
* **Order is preserved**: `Properties.Layers` is iterated left-to-right
|
|
83847
83847
|
* and the resulting `ResolvedLambdaLayer[]` carries the same order. The
|
|
83848
83848
|
* caller (`local-invoke.ts`'s `materializeLambdaLayers` and
|
|
83849
|
-
* `local-start-api.ts`'s server-boot pre-merge)
|
|
83849
|
+
* `local-start-api.ts`'s server-boot pre-merge) merges every
|
|
83850
83850
|
* entry into one host tmpdir in template order to honor AWS's
|
|
83851
83851
|
* "last-layer-wins" file-collision semantics — Docker rejects multiple
|
|
83852
83852
|
* bind mounts at the same target so cdkd cannot rely on overlay
|
|
@@ -84117,6 +84117,110 @@ function notFoundError$1(target, stack, resources) {
|
|
|
84117
84117
|
return new LocalInvokeResolutionError(msg.trimEnd());
|
|
84118
84118
|
}
|
|
84119
84119
|
|
|
84120
|
+
//#endregion
|
|
84121
|
+
//#region src/local/layer-tree-copy.ts
|
|
84122
|
+
/**
|
|
84123
|
+
* Merge one Lambda Layer's asset tree into the directory that will be
|
|
84124
|
+
* bind-mounted at `/opt`, with AWS's "last layer wins" semantic and with
|
|
84125
|
+
* symlinks kept VERBATIM (issue #3106).
|
|
84126
|
+
*
|
|
84127
|
+
* Why this is a hand-written walk and not `cpSync`. The merge used to be
|
|
84128
|
+
* `cpSync(src, dest, { recursive: true, force: true })`, and every
|
|
84129
|
+
* `cpSync`-shaped repair of it was measured wrong in some direction:
|
|
84130
|
+
*
|
|
84131
|
+
* - Without `verbatimSymlinks: true` (the default), `cpSync` rewrites a
|
|
84132
|
+
* RELATIVE link target to the ABSOLUTE path of the source on the host —
|
|
84133
|
+
* `bin/rel-link -> real.sh` arrives as `-> <cdk.out>/asset.<hash>/bin/
|
|
84134
|
+
* real.sh`, which is dangling inside the container, where only `dest`
|
|
84135
|
+
* is mounted. Measured on Node 22.12 / 24.21.
|
|
84136
|
+
* - WITH `verbatimSymlinks: true`, Node's C++ `cpSync` (every release
|
|
84137
|
+
* after 22.12) throws `EEXIST` when a later layer carries a symlink at a
|
|
84138
|
+
* path an earlier layer already placed one — `nodejs/node_modules/.bin/
|
|
84139
|
+
* <tool>` in two layers built from the same dependency is the ordinary
|
|
84140
|
+
* case. Measured by the go-to-k/cdkd#3118 review on 22.23 / 24.15 /
|
|
84141
|
+
* 24.21; the JS implementation on 22.12 does not throw, which is why
|
|
84142
|
+
* the floor alone did not show it.
|
|
84143
|
+
* - A `cpSync` + `readdirSync({ recursive: true })` pair was worse:
|
|
84144
|
+
* the recursive readdir DESCENDS INTO directory symlinks on every Node
|
|
84145
|
+
* after 22.12 (not on 22.12), so a cyclic link (`sub/up -> ..`, or a
|
|
84146
|
+
* pnpm-style `node_modules`) hung the merge, and an absolute link to a
|
|
84147
|
+
* host directory made the walk delete and write INSIDE that host
|
|
84148
|
+
* directory. And `cpSync`'s `force` writes THROUGH a destination that
|
|
84149
|
+
* is already a directory symlink, so a later layer's real directory
|
|
84150
|
+
* landed in the earlier layer's link target — on the host, when the
|
|
84151
|
+
* link was absolute. Same review, same versions.
|
|
84152
|
+
*
|
|
84153
|
+
* So the walk is explicit and recurses only on a real directory (`d_type`,
|
|
84154
|
+
* via `Dirent.isDirectory()`, which reports a directory symlink as a
|
|
84155
|
+
* symlink on 22.12 and 24.21 alike). Per entry, "last layer wins" is applied
|
|
84156
|
+
* the same way for every kind: whatever sits at the destination path that is
|
|
84157
|
+
* not of the same kind is removed first — a link, a file, or a whole
|
|
84158
|
+
* directory an earlier layer placed — then the entry lands. A symlink is
|
|
84159
|
+
* recreated with the SOURCE's own target string and never resolved, so an
|
|
84160
|
+
* absolute link stays absolute and a dangling one stays dangling, exactly as
|
|
84161
|
+
* AWS extracts the layer ZIP into `/opt`; nothing is ever written through a
|
|
84162
|
+
* link. A file is copied with `cpSync` (single file, `force`), which is what
|
|
84163
|
+
* preserves the mode bits, so a layer's `bin/<script>` keeps its `+x` — the
|
|
84164
|
+
* property the `local-invoke-layers` fixture executes through.
|
|
84165
|
+
*
|
|
84166
|
+
* The ROOT may itself be a symlink (an asset dir handed over through a link
|
|
84167
|
+
* passes `resolveAssetCodePath`'s `statSync`). `readdirSync` follows a root
|
|
84168
|
+
* link by itself, so the `realpathSync` is not what makes that case work,
|
|
84169
|
+
* and it does not move where a dangling or looping root fails either (the
|
|
84170
|
+
* first `readdirSync` raises the same `ENOENT` / `ELOOP` naming the asset
|
|
84171
|
+
* path); it only keeps every path the walk joins real.
|
|
84172
|
+
*
|
|
84173
|
+
* Bound, stated rather than handled: a FIFO or a socket inside a layer
|
|
84174
|
+
* makes the single-file `cpSync` throw (`ERR_FS_CP_FIFO_PIPE` /
|
|
84175
|
+
* `ERR_FS_CP_SOCKET`, immediately, never blocking) where the old recursive
|
|
84176
|
+
* copy skipped it in silence on some releases. CDK's own asset staging
|
|
84177
|
+
* cannot stage such an entry, so no real layer carries one.
|
|
84178
|
+
*
|
|
84179
|
+
* Both layer merges (`cdkd local invoke` and `cdkd local start-api`) call
|
|
84180
|
+
* this; keep them on the one helper rather than re-spelling copy options.
|
|
84181
|
+
*/
|
|
84182
|
+
function copyLayerTreeLastWins(src, dest) {
|
|
84183
|
+
mkdirSync(dest, { recursive: true });
|
|
84184
|
+
copyDirLastWins(realpathSync(src), dest);
|
|
84185
|
+
}
|
|
84186
|
+
function copyDirLastWins(fromDir, toDir) {
|
|
84187
|
+
for (const entry of readdirSync(fromDir, { withFileTypes: true })) {
|
|
84188
|
+
const from = join(fromDir, entry.name);
|
|
84189
|
+
const to = join(toDir, entry.name);
|
|
84190
|
+
if (entry.isSymbolicLink()) {
|
|
84191
|
+
removeUnless(to, "symlink");
|
|
84192
|
+
symlinkSync(readlinkSync(from), to);
|
|
84193
|
+
} else if (entry.isDirectory()) {
|
|
84194
|
+
removeUnless(to, "directory");
|
|
84195
|
+
mkdirSync(to, { recursive: true });
|
|
84196
|
+
copyDirLastWins(from, to);
|
|
84197
|
+
} else {
|
|
84198
|
+
removeUnless(to, "file");
|
|
84199
|
+
cpSync(from, to, { force: true });
|
|
84200
|
+
}
|
|
84201
|
+
}
|
|
84202
|
+
}
|
|
84203
|
+
/**
|
|
84204
|
+
* Clear the destination path unless what is there is already of `kind`. A
|
|
84205
|
+
* directory is kept so a later layer MERGES into it; a file is kept because
|
|
84206
|
+
* `cpSync` overwrites it in place; a symlink is always replaced (its target
|
|
84207
|
+
* string comes from the later layer).
|
|
84208
|
+
*/
|
|
84209
|
+
function removeUnless(to, kind) {
|
|
84210
|
+
let st;
|
|
84211
|
+
try {
|
|
84212
|
+
st = lstatSync(to);
|
|
84213
|
+
} catch {
|
|
84214
|
+
return;
|
|
84215
|
+
}
|
|
84216
|
+
if (kind === "directory" && st.isDirectory()) return;
|
|
84217
|
+
if (kind === "file" && st.isFile()) return;
|
|
84218
|
+
rmSync(to, {
|
|
84219
|
+
recursive: true,
|
|
84220
|
+
force: true
|
|
84221
|
+
});
|
|
84222
|
+
}
|
|
84223
|
+
|
|
84120
84224
|
//#endregion
|
|
84121
84225
|
//#region src/local/ecs-task-resolver.ts
|
|
84122
84226
|
function detectEcsImageResolutionNeeds(stack) {
|
|
@@ -87533,12 +87637,12 @@ async function resolveLocalBuildPlan$1(lambda) {
|
|
|
87533
87637
|
* when the entry is a same-stack asset. Literal-ARN entries always
|
|
87534
87638
|
* pre-materialize first.
|
|
87535
87639
|
* - 2+ layers → copy each into a fresh tmpdir IN ORDER (later
|
|
87536
|
-
* layers overwrite earlier files via `
|
|
87640
|
+
* layers overwrite earlier files via `copyLayerTreeLastWins`),
|
|
87537
87641
|
* bind-mount the tmpdir at `/opt`. Records the tmpdir in
|
|
87538
87642
|
* `layerTmpDirs` so `shutdown(...)` removes it.
|
|
87539
87643
|
*
|
|
87540
87644
|
* Issue #448: literal-ARN entries (`{kind: 'arn', ...}`) are downloaded
|
|
87541
|
-
* + unzipped via `lambda:GetLayerVersion` BEFORE the
|
|
87645
|
+
* + unzipped via `lambda:GetLayerVersion` BEFORE the merge
|
|
87542
87646
|
* branches run. Every per-ARN tmpdir is also recorded in `layerTmpDirs`
|
|
87543
87647
|
* so the same shutdown path cleans it up — even for the single-layer
|
|
87544
87648
|
* fast path that bind-mounts the dir directly.
|
|
@@ -87568,10 +87672,15 @@ async function materializeLambdaLayers$1(layers, layerTmpDirs, layerRoleArn) {
|
|
|
87568
87672
|
}
|
|
87569
87673
|
if (flat.length === 1) return flat[0].assetPath;
|
|
87570
87674
|
const dir = mkdtempSync(path.join(tmpdir(), "cdkd-local-start-api-layers-"));
|
|
87571
|
-
|
|
87572
|
-
|
|
87573
|
-
|
|
87574
|
-
|
|
87675
|
+
try {
|
|
87676
|
+
for (const layer of flat) copyLayerTreeLastWins(layer.assetPath, dir);
|
|
87677
|
+
} catch (error) {
|
|
87678
|
+
rmSync(dir, {
|
|
87679
|
+
recursive: true,
|
|
87680
|
+
force: true
|
|
87681
|
+
});
|
|
87682
|
+
throw error;
|
|
87683
|
+
}
|
|
87575
87684
|
layerTmpDirs.add(dir);
|
|
87576
87685
|
return dir;
|
|
87577
87686
|
}
|
|
@@ -91522,7 +91631,7 @@ async function resolveZipImagePlan(lambda, options) {
|
|
|
91522
91631
|
* - Stage 2: the resulting `{logicalId, assetPath}[]` list (in
|
|
91523
91632
|
* template order — ARN entries surface their `arn` as the
|
|
91524
91633
|
* `logicalId` for log lines) is handed to the existing
|
|
91525
|
-
* `materializeLambdaLayers`
|
|
91634
|
+
* `materializeLambdaLayers` merge path. AWS's "last layer
|
|
91526
91635
|
* wins" file-collision semantic is preserved across both layer
|
|
91527
91636
|
* kinds because the merge step is unchanged.
|
|
91528
91637
|
*/
|
|
@@ -91590,7 +91699,7 @@ function resolveTmpfsForLambda(lambda) {
|
|
|
91590
91699
|
* than copying since CDK has already unzipped the asset.
|
|
91591
91700
|
* 3. **Multiple layers**: copies each layer's contents into a fresh
|
|
91592
91701
|
* tmpdir IN ORDER (later layers overwrite earlier files via
|
|
91593
|
-
* `
|
|
91702
|
+
* `copyLayerTreeLastWins`), then bind-mounts the merged tmpdir at
|
|
91594
91703
|
* `/opt`. Returns `{ mount, tmpDir: <path> }` so the caller can
|
|
91595
91704
|
* `rmSync` the tmpdir on cleanup.
|
|
91596
91705
|
*
|
|
@@ -91607,10 +91716,15 @@ function materializeLambdaLayers(layers) {
|
|
|
91607
91716
|
readOnly: true
|
|
91608
91717
|
} };
|
|
91609
91718
|
const tmpDir = mkdtempSync(path.join(tmpdir(), "cdkd-local-invoke-layers-"));
|
|
91610
|
-
|
|
91611
|
-
|
|
91612
|
-
|
|
91613
|
-
|
|
91719
|
+
try {
|
|
91720
|
+
for (const layer of layers) copyLayerTreeLastWins(layer.assetPath, tmpDir);
|
|
91721
|
+
} catch (error) {
|
|
91722
|
+
rmSync(tmpDir, {
|
|
91723
|
+
recursive: true,
|
|
91724
|
+
force: true
|
|
91725
|
+
});
|
|
91726
|
+
throw error;
|
|
91727
|
+
}
|
|
91614
91728
|
return {
|
|
91615
91729
|
mount: {
|
|
91616
91730
|
hostPath: tmpDir,
|
|
@@ -92177,4 +92291,4 @@ function buildProgram() {
|
|
|
92177
92291
|
|
|
92178
92292
|
//#endregion
|
|
92179
92293
|
export { buildProgram };
|
|
92180
|
-
//# sourceMappingURL=program-
|
|
92294
|
+
//# sourceMappingURL=program-z-ESK5sd.js.map
|