@go-to-k/cdkd 0.291.16 → 0.291.17
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-DAvRcbyS.js → asg-provider-CHM7_WdJ.js} +2 -2
- package/dist/{asg-provider-DAvRcbyS.js.map → asg-provider-CHM7_WdJ.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-yukC8N_f.js → deploy-engine-xxVOQPPr.js} +11 -9
- package/dist/deploy-engine-xxVOQPPr.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{program-DjkAPWi0.js → program-hXXls0hg.js} +144 -87
- package/dist/{program-DjkAPWi0.js.map → program-hXXls0hg.js.map} +1 -1
- package/dist/{version-Qigb_6I0.js → version-DMRkEtU2.js} +2 -2
- package/dist/{version-Qigb_6I0.js.map → version-DMRkEtU2.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-yukC8N_f.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $a as
|
|
1
|
+
import { $a as isCdkdError, Aa as setAwsClients, Ct as CloudControlProvider, Da as getAwsClients, Ea as AwsClients, Fa as DependencyError, Ga as ProvisioningError, Ii as Synthesizer, Ma as CdkdError, Mr as S3StateBackend, Na as ConfigError, Oa as resetAwsClients, Qa as formatError, Ta as resolveBucketRegion, Va as LockError, Xa as StateError, Za as SynthesisError, Zr as AssetPublisher, ct as IAMRoleProvider, da as AssemblyReader, eo as normalizeAwsError, gn as DiffCalculator, ja as AssetError, jr as LockManager, lr as DagBuilder, pt as ProviderRegistry, r as DeployEngine, ur as TemplateParser, wa as clearBucketRegionCache } from "./deploy-engine-xxVOQPPr.js";
|
|
2
2
|
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-GASr9bAF.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 yellow, $i as
|
|
1
|
+
import { $ as yellow, $i as findLargeInlineResources, $n as repairMalformedOutputsForReadOnly, $r as WorkGraph, $t as replayWarn, A as createPreDeleteFinalSnapshot, Aa as setAwsClients, Ai as runDockerStreaming, An as malformedOrphansRefusalMessage, Ar as scrubResourceRecord, At as isTerminationProtectionPropagationError, B as isStatefulRecreateTargetSync, Ba as LocalStartServiceError, Bi as resolveApp, Bn as refuseMalformedNestedChildOutputs, Br as DEFAULT_STATE_PREFIX, Bt as parameterTypeMayLoseSecretIdentity, C as namesAnyDeclaredParameter, Ca as resolveAssemblyPath, Ci as formatDockerLoginError, Cn as hasReadableOutputs, Cr as maskSecretsInError, Ct as CloudControlProvider, D as PRE_DELETE_SNAPSHOT_TYPES, Da as getAwsClients, Di as partitionSensitiveEnv, Dn as malformedExportSourceWarning, Dr as recordMaskOnlyValuesIn, Dt as deleteSkipReason, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as AwsClients, Ei as isMalformedEnvKey, En as malformedExportNamesWarning, Er as recordMaskOnlyValue, Et as deleteIndeterminateGuards, F as extractDeploymentEventError, Fi as getDockerImageBySourceHash, Fn as malformedResourceEntriesWarning, Fr as buildForceUnlockCommand, Ft as coerceParameterTypedValue, G as toCfnInteger, Ga as ProvisioningError, Gi as resolveStateBucketWithDefaultAndSource, Gn as refuseMalformedOutputsForDestroy, Gr as importableOutputKeys, Gt as resolveExplicitPhysicalId, H as WARM_THROUGHPUT_MEMBERS, Ha as MalformedProducerRecordRefusalError, Hi as resolveCaptureObservedState, Hn as refuseMalformedOrphansForDestroy, Hr as hasReadableExportSet, Ht as isSettledInstanceState, I as makeSiblingClaimReader, Ia as DeployCancelledError, Ii as Synthesizer, In as malformedResourcePropertiesWarning, Ir as buildLockContentionMessage, It as getAccountInfo, J as bold, Ja as StackHasActiveImportsError, Ji as warnDeprecatedNoPrefixCliFlag, Jn as refuseMalformedResourceEntriesForOrphan, Jr as orphansAfterRollback, Jt as coerceCfnInteger, K as toFiniteNumber, Ka as ResourceTimeoutError, Ki as resolveUseCdkBootstrapAssets, Kn as refuseMalformedResourceAttributesForOrphan, Kr as importableOutputs, Kt as assertRegionMatch, L as planOrphanAdoption, La as DynamicReferenceRegionAmbiguousError, Li as synthesisStatusMessage, Ln as malformedResourcesWarning, Lr as forceQuitRecoveryClause, Lt as isImpossibleEmptyStoredAttribute, M as refusesFinalSnapshot, Ma as CdkdError, Mi as escapeRegExp, Mn as malformedOutputsRefusalMessage, Mr as S3StateBackend, Mt as carriesDynamicReference, N as unsupportedFinalSnapshotError, Ni as stripControlChars, Nn as malformedOutputsWarning, Nr as rebuildClientForBucketRegion, Nt as carriesFetchableDynamicReference, O as buildFinalSnapshotIdentifier, Oa as resetAwsClients, Oi as redactDockerArgvValues, On as malformedLocalOutputsWarning, Or as recoverMaskedOutput, Ot as isWaitAbandonedError, P as makeCanonicalizePropertiesFn, Pa as CrossAccountSecretRefusalError, Pi as AssetManifestLoader, Pn as malformedRenderedContainersWarning, Pr as UNREPRODUCIBLE_LOCK_CLAUSE, Pt as cfnRefValueFromPhysicalId, Q as red, Qi as MIGRATE_TMP_PREFIX, Qn as repairMalformedOrphansForReadOnly, Qr as stringifyValue, Qt as readConfigString, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as IntrinsicResolutionRefusalError, Ri as getDefaultStateBucketName, Rn as malformedStateRefusalMessage, Rr as formatLockExpiry, Rt as isNamelessDynamicReferenceError, S as computeParameterTaint, Sa as renderAssemblyPathEscape, Si as finchSecretArgvRefusal, Sn as hasReadableOrphans, Sr as markSameGenerationBag, St as startInterruptWatch, T as resourcesNamingDeclaredParameter, Ta as resolveBucketRegion, Ti as isDockerClientEnvKey, Tn as isReadableResourceEntry, Tr as pathCrossesDottedKey, Tt as UNSPECIFIED_SKIP_REASON, U as coerceWarmThroughput$1, Ua as NestedStackChildDirectDestroyError, Ui as resolveSkipPrefix, Un as refuseMalformedOrphansForOrphan, Ur as hasReasonlessBaselineRefusal, Ut as WAFv2WebACLProvider, V as renderStatefulReason, Vi as resolveAutoAssetStorage, Vn as refuseMalformedOrphans, Vr as exportNamesCarriedFrom, Vt as refStateLookupFromResource, W as isWarmThroughputDecrease, Wa as PartialFailureError, Wi as resolveStateBucketWithDefault, Wn as refuseMalformedOutputs, Wr as hasUnverifiableParameterRefusal, Wt as normalizeAwsTagsToCfn, X as gray, Xi as CFN_TEMPLATE_BODY_LIMIT, Xn as refuseMalformedResourcesForDestroy, Xr as shouldRetainResource, Xt as configIntegerRefusal, Y as cyan, Ya as StackTerminationProtectionError, Yi as ssmResolvedValueType, Yn as refuseMalformedResourcePropertiesForOrphan, Yr as orphansCarriedFrom, Yt as configBooleanRefusal, Z as green, Za as SynthesisError, Zi as CFN_TEMPLATE_URL_LIMIT, Zn as refuseMalformedState, Zr as AssetPublisher, Zt as configStringRefusal, _ as bagHoldsSecretExpression, _a as hasPlainPrototype, _i as resolveDockerContextDirectory, _n as INTRINSIC_KEYS, _r as dynamicReferenceTokens, _t as maskerOrIdentity, a as DeploymentEventsStore, aa as producerRecordKey, ai as BOOTSTRAP_MARKER_PREFIX, an as withSharedDrainBudget, ao as isRetryableTransientError, ar as findActionableSilentDrops, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as absoluteAssemblyPathEscape, bi as describeDockerFailure, bn as UNREADABLE_RESOURCES_MAP_ROW, br as isSingleDynamicReferenceToken, bt as interruptWatchListenerCount, c as replayFailedOperations, ca as PARTITION_TABLE, ci as getBootstrapMarkerKey, cn as s3BucketDualStackDomainName, co as markNonRetryable, cr as withRetry, ct as IAMRoleProvider, d as updatePartialMessage, da as AssemblyReader, di as readBootstrapMarkerBody, dn as applyRoleArnIfSet, do as describeAwsFailure, dr as STATE_SOURCED_BASELINE_RULES, dt as definedAttributes, ea as uploadCfnTemplate, ei as buildAssetRedirectMap, en as requireConfigArray, eo as normalizeAwsError, er as repairMalformedResourceEntriesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as failedStageNote, fi as validateAssetBucketName, fn as AWS_CREDENTIAL_ENV_KEYS, fo as safeStringify, fr as STATE_SOURCED_CROSS_GENERATION_RULES, ft as stringifyIfAssigned, g as computeImplicitDeleteEdges, ga as hasOwnKey, gi as buildDockerImage, gn as DiffCalculator, gr as createSecretMasker, gt as maskDeep, h as IMPLICIT_DELETE_DEPENDENCIES, ha as defineOwnKey, hi as assertCdkLocalDockerContextContained, hn as envCredentialsAreAssumedRole, hr as carriesSecretMask, ht as createMaskedRetryLogger, i as DeploymentEventsReader, ia as producerCoordinateKey, ii as AssetModeResolver, in as producerRegionsFromState, io as isMarkedNonRetryable, ir as safeStackName, it as secretBearing, j as isFinalSnapshotError, ji as warnFinchArgvExposure, jn as malformedOrphansWarning, jr as LockManager, jt as IntrinsicFunctionResolver, k as ccRoutedFinalSnapshotError, ka as runWithStackAwsClients, ki as runDockerForeground, kn as malformedOrphanRecordsWarning, kr as redactSecretsForState, kt as disableInstanceApiTermination, l as replayRollback, la as canonicalizeRegion, li as isCrossRegionRedirect, ln as s3BucketRegionalDomainName, lo as markRedactedCause, lr as DagBuilder, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as processStackMessages, mi as buildDenyExternalAccessPolicy, mn as callerEnvCredentials, mr as TEMPLATE_SOURCED_RULES, mt as wouldReturnToSdkProvider, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as injectiveKey, ni as loadPublishableAssetManifest, nn as requireConfigString, no as pasteableCommand, nr as repairMalformedResourcesForReadOnly, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as decodeListingKey, oi as assertAssetBucketRegion, on as s3BucketArn, oo as isThrottlingError, or as findSilentDropProperties, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as globMatches, pi as validateContainerRepoName, pn as applyCallerIdentityCredentials, pr as STATE_SOURCED_READBACK_RULES, pt as ProviderRegistry, q as formatResourceLine, qa as ResourceUpdateNotSupportedError, qi as stateBucketExistenceConfirmed, qn as refuseMalformedResourceEntries, qr as isReadableBag, qt as coerceCfnBoolean, r as DeployEngine, ra as injectiveKeyPrefix, ri as rewriteTemplateAssetReferences, rn as classifyReplaySecretRegion, ro as shellQuote, rr as safeRegion, rt as isExportAliasCollision, s as planRollback, sa as expectedOwnerParam, si as ensureAssetStorage, sn as s3BucketDomainName, so as isTransientServerError, sr as describeTypeWithThrottleRetry, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, ti as createAssetRedirectResolver, tn as requireConfigObject, to as withErrorHandling, tr as repairMalformedResourcePropertiesForReadOnly, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as derivePartitionAndUrlSuffix, ui as parseBootstrapMarker, un as s3BucketWebsiteUrl, uo as retryClassificationText, ur as TemplateParser, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as nullPrototypeRecord, vi as describeDockerCapturedOutput, vn as STATE_RESOURCES_MALFORMED, vr as errorCauseChain, vt as beginCommandInterruptScope, w as reachableDivergentParameters, wi as getDockerCmd, wn as hasReadableResources, wr as maskSecretsInText, wt as slowCcOperationTimeoutMs, x as bindingSkippedOutputs, xa as displayAssemblyPath, xi as dockerSpawnEnvWithSensitive, xn as displayLogicalId, xr as isUncertifiedBaselineMaskPosition, xt as isInterruptedWaitError, y as keptWholeReasonText, ya as ownValue, yi as describeDockerExecFailure, yn as UNREADABLE_ORPHANS_CONTAINER_ROW, yr as identityKeyFor, yt as endCommandInterruptScope, z as isStatefulRecreateTargetForReplace, za as LocalInvokeBuildError$1, zi as getLegacyStateBucketName, zn as refuseDivergentRecordRegionForDestroy, zr as CUSTOM_RESOURCE_RESPONSE_PREFIX, zt as isUnboundTemplateParameter } from "./deploy-engine-xxVOQPPr.js";
|
|
2
2
|
import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, 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, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-GASr9bAF.js";
|
|
3
3
|
import { n as awsClientDefaults, s as ambientRegion } from "./aws-client-defaults-jISU4PHo.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-DMRkEtU2.js";
|
|
5
|
+
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-CHM7_WdJ.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";
|
|
@@ -43367,6 +43367,39 @@ var RDSDBProxyTargetGroupProvider = class {
|
|
|
43367
43367
|
//#endregion
|
|
43368
43368
|
//#region src/provisioning/providers/docdb-provider.ts
|
|
43369
43369
|
/**
|
|
43370
|
+
* The attribute map a DocumentDB DB cluster records (issue #3650), under
|
|
43371
|
+
* CloudFormation's `Fn::GetAtt` names (`Endpoint`, `Port`, `ReadEndpoint`,
|
|
43372
|
+
* `ClusterResourceId`). The RDS-style dotted keys (`Endpoint.Address`, ...)
|
|
43373
|
+
* are kept for records and readers that already use them; no
|
|
43374
|
+
* `Fn::GetAtt` names them for this service, so on their own they left
|
|
43375
|
+
* `Fn::GetAtt [Cluster, Endpoint]` resolving to the cluster identifier.
|
|
43376
|
+
*/
|
|
43377
|
+
function clusterAttributes$1(cluster) {
|
|
43378
|
+
return definedAttributes({
|
|
43379
|
+
Endpoint: cluster?.Endpoint,
|
|
43380
|
+
Port: stringifyIfAssigned(cluster?.Port),
|
|
43381
|
+
ReadEndpoint: cluster?.ReaderEndpoint,
|
|
43382
|
+
"Endpoint.Address": cluster?.Endpoint,
|
|
43383
|
+
"Endpoint.Port": stringifyIfAssigned(cluster?.Port),
|
|
43384
|
+
"ReadEndpoint.Address": cluster?.ReaderEndpoint,
|
|
43385
|
+
Arn: cluster?.DBClusterArn,
|
|
43386
|
+
ClusterResourceId: cluster?.DbClusterResourceId
|
|
43387
|
+
});
|
|
43388
|
+
}
|
|
43389
|
+
/**
|
|
43390
|
+
* The attribute map a DocumentDB DB instance records (issue #3650): `Endpoint` /
|
|
43391
|
+
* `Port` are CloudFormation's `Fn::GetAtt` names, the dotted keys are kept.
|
|
43392
|
+
*/
|
|
43393
|
+
function instanceAttributes$1(instance) {
|
|
43394
|
+
return definedAttributes({
|
|
43395
|
+
Endpoint: instance?.Endpoint?.Address,
|
|
43396
|
+
Port: stringifyIfAssigned(instance?.Endpoint?.Port),
|
|
43397
|
+
"Endpoint.Address": instance?.Endpoint?.Address,
|
|
43398
|
+
"Endpoint.Port": stringifyIfAssigned(instance?.Endpoint?.Port),
|
|
43399
|
+
Arn: instance?.DBInstanceArn
|
|
43400
|
+
});
|
|
43401
|
+
}
|
|
43402
|
+
/**
|
|
43370
43403
|
* AWS DocumentDB Provider
|
|
43371
43404
|
*
|
|
43372
43405
|
* Implements resource provisioning for DocumentDB resources:
|
|
@@ -43549,16 +43582,9 @@ var DocDBProvider = class {
|
|
|
43549
43582
|
}))).DBCluster) throw new Error("CreateDBCluster did not return DBCluster");
|
|
43550
43583
|
this.logger.debug(`Successfully created DocDB DBCluster ${logicalId}: ${dbClusterIdentifier}`);
|
|
43551
43584
|
if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(dbClusterIdentifier);
|
|
43552
|
-
const described = await this.describeDBCluster(dbClusterIdentifier);
|
|
43553
43585
|
return {
|
|
43554
43586
|
physicalId: dbClusterIdentifier,
|
|
43555
|
-
attributes:
|
|
43556
|
-
"Endpoint.Address": described?.Endpoint,
|
|
43557
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Port),
|
|
43558
|
-
"ReadEndpoint.Address": described?.ReaderEndpoint,
|
|
43559
|
-
Arn: described?.DBClusterArn,
|
|
43560
|
-
ClusterResourceId: described?.DbClusterResourceId
|
|
43561
|
-
})
|
|
43587
|
+
attributes: clusterAttributes$1(await this.describeDBCluster(dbClusterIdentifier))
|
|
43562
43588
|
};
|
|
43563
43589
|
} catch (error) {
|
|
43564
43590
|
if (error instanceof ProvisioningError) throw error;
|
|
@@ -43590,13 +43616,7 @@ var DocDBProvider = class {
|
|
|
43590
43616
|
return {
|
|
43591
43617
|
physicalId,
|
|
43592
43618
|
wasReplaced: false,
|
|
43593
|
-
attributes:
|
|
43594
|
-
"Endpoint.Address": described?.Endpoint,
|
|
43595
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Port),
|
|
43596
|
-
"ReadEndpoint.Address": described?.ReaderEndpoint,
|
|
43597
|
-
Arn: described?.DBClusterArn,
|
|
43598
|
-
ClusterResourceId: described?.DbClusterResourceId
|
|
43599
|
-
})
|
|
43619
|
+
attributes: clusterAttributes$1(described)
|
|
43600
43620
|
};
|
|
43601
43621
|
} catch (error) {
|
|
43602
43622
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -43658,14 +43678,9 @@ var DocDBProvider = class {
|
|
|
43658
43678
|
}))).DBInstance) throw new Error("CreateDBInstance did not return DBInstance");
|
|
43659
43679
|
this.logger.debug(`Successfully created DocDB DBInstance ${logicalId}: ${dbInstanceIdentifier}`);
|
|
43660
43680
|
if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForInstanceAvailable(dbInstanceIdentifier);
|
|
43661
|
-
const described = await this.describeDBInstance(dbInstanceIdentifier);
|
|
43662
43681
|
return {
|
|
43663
43682
|
physicalId: dbInstanceIdentifier,
|
|
43664
|
-
attributes:
|
|
43665
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
43666
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port),
|
|
43667
|
-
Arn: described?.DBInstanceArn
|
|
43668
|
-
})
|
|
43683
|
+
attributes: instanceAttributes$1(await this.describeDBInstance(dbInstanceIdentifier))
|
|
43669
43684
|
};
|
|
43670
43685
|
} catch (error) {
|
|
43671
43686
|
if (error instanceof ProvisioningError) throw error;
|
|
@@ -43689,11 +43704,7 @@ var DocDBProvider = class {
|
|
|
43689
43704
|
return {
|
|
43690
43705
|
physicalId,
|
|
43691
43706
|
wasReplaced: false,
|
|
43692
|
-
attributes:
|
|
43693
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
43694
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port),
|
|
43695
|
-
Arn: described?.DBInstanceArn
|
|
43696
|
-
})
|
|
43707
|
+
attributes: instanceAttributes$1(described)
|
|
43697
43708
|
};
|
|
43698
43709
|
} catch (error) {
|
|
43699
43710
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -43962,11 +43973,7 @@ var DocDBProvider = class {
|
|
|
43962
43973
|
const described = (await this.getClient().send(new DescribeDBInstancesCommand$1({ DBInstanceIdentifier: explicit }))).DBInstances?.[0];
|
|
43963
43974
|
return {
|
|
43964
43975
|
physicalId: explicit,
|
|
43965
|
-
attributes:
|
|
43966
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
43967
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port),
|
|
43968
|
-
Arn: described?.DBInstanceArn
|
|
43969
|
-
})
|
|
43976
|
+
attributes: instanceAttributes$1(described)
|
|
43970
43977
|
};
|
|
43971
43978
|
} catch (err) {
|
|
43972
43979
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
@@ -43977,10 +43984,9 @@ var DocDBProvider = class {
|
|
|
43977
43984
|
async importDBCluster(input) {
|
|
43978
43985
|
const explicit = resolveExplicitPhysicalId(input, "DBClusterIdentifier");
|
|
43979
43986
|
if (explicit) try {
|
|
43980
|
-
await this.getClient().send(new DescribeDBClustersCommand$1({ DBClusterIdentifier: explicit }));
|
|
43981
43987
|
return {
|
|
43982
43988
|
physicalId: explicit,
|
|
43983
|
-
attributes: {}
|
|
43989
|
+
attributes: clusterAttributes$1((await this.getClient().send(new DescribeDBClustersCommand$1({ DBClusterIdentifier: explicit }))).DBClusters?.[0])
|
|
43984
43990
|
};
|
|
43985
43991
|
} catch (err) {
|
|
43986
43992
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
@@ -44007,6 +44013,38 @@ var DocDBProvider = class {
|
|
|
44007
44013
|
//#endregion
|
|
44008
44014
|
//#region src/provisioning/providers/neptune-provider.ts
|
|
44009
44015
|
/**
|
|
44016
|
+
* The attribute map a Neptune DB cluster records (issue #3650), under
|
|
44017
|
+
* CloudFormation's `Fn::GetAtt` names (`Endpoint`, `Port`, `ReadEndpoint`,
|
|
44018
|
+
* `ClusterResourceId`). The RDS-style dotted keys (`Endpoint.Address`, ...)
|
|
44019
|
+
* are kept for records and readers that already use them; no
|
|
44020
|
+
* `Fn::GetAtt` names them for this service, so on their own they left
|
|
44021
|
+
* `Fn::GetAtt [Cluster, Endpoint]` resolving to the cluster identifier.
|
|
44022
|
+
*/
|
|
44023
|
+
function clusterAttributes(cluster) {
|
|
44024
|
+
return definedAttributes({
|
|
44025
|
+
Endpoint: cluster?.Endpoint,
|
|
44026
|
+
Port: stringifyIfAssigned(cluster?.Port),
|
|
44027
|
+
ReadEndpoint: cluster?.ReaderEndpoint,
|
|
44028
|
+
"Endpoint.Address": cluster?.Endpoint,
|
|
44029
|
+
"Endpoint.Port": stringifyIfAssigned(cluster?.Port),
|
|
44030
|
+
"ReadEndpoint.Address": cluster?.ReaderEndpoint,
|
|
44031
|
+
ClusterResourceId: cluster?.DbClusterResourceId
|
|
44032
|
+
});
|
|
44033
|
+
}
|
|
44034
|
+
/**
|
|
44035
|
+
* The attribute map a Neptune DB instance records (issue #3650): `Endpoint` /
|
|
44036
|
+
* `Port` are CloudFormation's `Fn::GetAtt` names, the dotted keys are kept.
|
|
44037
|
+
*/
|
|
44038
|
+
function instanceAttributes(instance) {
|
|
44039
|
+
return definedAttributes({
|
|
44040
|
+
Endpoint: instance?.Endpoint?.Address,
|
|
44041
|
+
Port: stringifyIfAssigned(instance?.Endpoint?.Port),
|
|
44042
|
+
"Endpoint.Address": instance?.Endpoint?.Address,
|
|
44043
|
+
"Endpoint.Port": stringifyIfAssigned(instance?.Endpoint?.Port),
|
|
44044
|
+
Arn: instance?.DBInstanceArn
|
|
44045
|
+
});
|
|
44046
|
+
}
|
|
44047
|
+
/**
|
|
44010
44048
|
* AWS Neptune Provider
|
|
44011
44049
|
*
|
|
44012
44050
|
* Implements resource provisioning for Neptune resources:
|
|
@@ -44192,15 +44230,9 @@ var NeptuneProvider = class {
|
|
|
44192
44230
|
}))).DBCluster) throw new Error("CreateDBCluster did not return DBCluster");
|
|
44193
44231
|
this.logger.debug(`Successfully created Neptune DBCluster ${logicalId}: ${dbClusterIdentifier}`);
|
|
44194
44232
|
if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(dbClusterIdentifier);
|
|
44195
|
-
const described = await this.describeDBCluster(dbClusterIdentifier);
|
|
44196
44233
|
return {
|
|
44197
44234
|
physicalId: dbClusterIdentifier,
|
|
44198
|
-
attributes:
|
|
44199
|
-
"Endpoint.Address": described?.Endpoint,
|
|
44200
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Port),
|
|
44201
|
-
"ReadEndpoint.Address": described?.ReaderEndpoint,
|
|
44202
|
-
ClusterResourceId: described?.DbClusterResourceId
|
|
44203
|
-
})
|
|
44235
|
+
attributes: clusterAttributes(await this.describeDBCluster(dbClusterIdentifier))
|
|
44204
44236
|
};
|
|
44205
44237
|
} catch (error) {
|
|
44206
44238
|
if (error instanceof ProvisioningError) throw error;
|
|
@@ -44232,12 +44264,7 @@ var NeptuneProvider = class {
|
|
|
44232
44264
|
return {
|
|
44233
44265
|
physicalId,
|
|
44234
44266
|
wasReplaced: false,
|
|
44235
|
-
attributes:
|
|
44236
|
-
"Endpoint.Address": described?.Endpoint,
|
|
44237
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Port),
|
|
44238
|
-
"ReadEndpoint.Address": described?.ReaderEndpoint,
|
|
44239
|
-
ClusterResourceId: described?.DbClusterResourceId
|
|
44240
|
-
})
|
|
44267
|
+
attributes: clusterAttributes(described)
|
|
44241
44268
|
};
|
|
44242
44269
|
} catch (error) {
|
|
44243
44270
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -44302,13 +44329,9 @@ var NeptuneProvider = class {
|
|
|
44302
44329
|
}))).DBInstance) throw new Error("CreateDBInstance did not return DBInstance");
|
|
44303
44330
|
this.logger.debug(`Successfully created Neptune DBInstance ${logicalId}: ${dbInstanceIdentifier}`);
|
|
44304
44331
|
if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForInstanceAvailable(dbInstanceIdentifier);
|
|
44305
|
-
const described = await this.describeDBInstance(dbInstanceIdentifier);
|
|
44306
44332
|
return {
|
|
44307
44333
|
physicalId: dbInstanceIdentifier,
|
|
44308
|
-
attributes:
|
|
44309
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
44310
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port)
|
|
44311
|
-
})
|
|
44334
|
+
attributes: instanceAttributes(await this.describeDBInstance(dbInstanceIdentifier))
|
|
44312
44335
|
};
|
|
44313
44336
|
} catch (error) {
|
|
44314
44337
|
if (error instanceof ProvisioningError) throw error;
|
|
@@ -44334,10 +44357,7 @@ var NeptuneProvider = class {
|
|
|
44334
44357
|
return {
|
|
44335
44358
|
physicalId,
|
|
44336
44359
|
wasReplaced: false,
|
|
44337
|
-
attributes:
|
|
44338
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
44339
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port)
|
|
44340
|
-
})
|
|
44360
|
+
attributes: instanceAttributes(described)
|
|
44341
44361
|
};
|
|
44342
44362
|
} catch (error) {
|
|
44343
44363
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -44609,11 +44629,7 @@ var NeptuneProvider = class {
|
|
|
44609
44629
|
const described = (await this.getClient().send(new DescribeDBInstancesCommand$2({ DBInstanceIdentifier: explicit }))).DBInstances?.[0];
|
|
44610
44630
|
return {
|
|
44611
44631
|
physicalId: explicit,
|
|
44612
|
-
attributes:
|
|
44613
|
-
"Endpoint.Address": described?.Endpoint?.Address,
|
|
44614
|
-
"Endpoint.Port": stringifyIfAssigned(described?.Endpoint?.Port),
|
|
44615
|
-
Arn: described?.DBInstanceArn
|
|
44616
|
-
})
|
|
44632
|
+
attributes: instanceAttributes(described)
|
|
44617
44633
|
};
|
|
44618
44634
|
} catch (err) {
|
|
44619
44635
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
@@ -44624,10 +44640,9 @@ var NeptuneProvider = class {
|
|
|
44624
44640
|
async importDBCluster(input) {
|
|
44625
44641
|
const explicit = resolveExplicitPhysicalId(input, "DBClusterIdentifier");
|
|
44626
44642
|
if (explicit) try {
|
|
44627
|
-
await this.getClient().send(new DescribeDBClustersCommand$2({ DBClusterIdentifier: explicit }));
|
|
44628
44643
|
return {
|
|
44629
44644
|
physicalId: explicit,
|
|
44630
|
-
attributes: {}
|
|
44645
|
+
attributes: clusterAttributes((await this.getClient().send(new DescribeDBClustersCommand$2({ DBClusterIdentifier: explicit }))).DBClusters?.[0])
|
|
44631
44646
|
};
|
|
44632
44647
|
} catch (err) {
|
|
44633
44648
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
@@ -91319,24 +91334,26 @@ const SENSITIVE_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
|
91319
91334
|
* boundary, so a local-invoke build failure still surfaces with cdkd's exit code
|
|
91320
91335
|
* / branding. `architectureToPlatform` is a pure helper (re-exported directly).
|
|
91321
91336
|
*
|
|
91322
|
-
*
|
|
91323
|
-
*
|
|
91324
|
-
*
|
|
91325
|
-
*
|
|
91337
|
+
* The build context is CONTAINED twice, against one REQUIRED `assetOutdir`
|
|
91338
|
+
* bound (issue [#3503](https://github.com/go-to-k/cdkd/issues/3503)). The
|
|
91339
|
+
* engine refuses an escaping `source.directory` itself since cdk-local 0.149.3,
|
|
91340
|
+
* and the bound is FORWARDED to it: without one the engine narrows to the
|
|
91341
|
+
* manifest directory and refuses a `cdk.Stage` image's `../asset.<hash>`
|
|
91342
|
+
* (issue [#3597](https://github.com/go-to-k/cdkd/issues/3597)). cdkd still
|
|
91343
|
+
* refuses first, because the engine's refusal quotes the manifest value in a
|
|
91344
|
+
* boundary the value itself can close (go-to-k/cdk-local#758); once that
|
|
91345
|
+
* ships, go-to-k/cdkd#3652 drops cdkd's copy.
|
|
91326
91346
|
* See cdk-local's `src/local/docker-image-builder.ts`.
|
|
91327
91347
|
*/
|
|
91328
91348
|
async function buildContainerImage$1(asset, cdkOutDir, options) {
|
|
91329
|
-
const executable = asset?.source?.executable;
|
|
91330
|
-
if (executable && executable.length > 0) warnManifestExecutable(executable);
|
|
91331
|
-
const { assetOutdir, ...implOptions } = options;
|
|
91332
91349
|
assertCdkLocalDockerContextContained({
|
|
91333
91350
|
manifestDir: cdkOutDir,
|
|
91334
91351
|
source: asset.source,
|
|
91335
|
-
assetOutdir,
|
|
91352
|
+
assetOutdir: options.assetOutdir,
|
|
91336
91353
|
wrapError: (message) => new LocalInvokeBuildError$1(`Refusing to build the container image: ${message}`)
|
|
91337
91354
|
});
|
|
91338
91355
|
try {
|
|
91339
|
-
return await buildContainerImage(asset, cdkOutDir,
|
|
91356
|
+
return await buildContainerImage(asset, cdkOutDir, options);
|
|
91340
91357
|
} catch (e) {
|
|
91341
91358
|
if (e instanceof LocalInvokeBuildError) throw new LocalInvokeBuildError$1(e.message);
|
|
91342
91359
|
throw e;
|
|
@@ -91380,7 +91397,25 @@ function canonicalizeImageUriHost(imageUri) {
|
|
|
91380
91397
|
if (slash < 0) return imageUri;
|
|
91381
91398
|
const host = imageUri.slice(0, slash);
|
|
91382
91399
|
if (!isRegistryHostComponent(host)) return imageUri;
|
|
91383
|
-
return host
|
|
91400
|
+
return foldAsciiUpperCase(host) + imageUri.slice(slash);
|
|
91401
|
+
}
|
|
91402
|
+
/**
|
|
91403
|
+
* Lower-case ONLY the ASCII letters `A`-`Z`, leaving every other code point
|
|
91404
|
+
* as written.
|
|
91405
|
+
*
|
|
91406
|
+
* `String.prototype.toLowerCase` performs full Unicode case folding, so the
|
|
91407
|
+
* Kelvin sign U+212A folds to a plain ASCII `k`. Folding with it here, BEFORE
|
|
91408
|
+
* `parseEcrRegistryHost`, handed that parser an already-ASCII host and defeated
|
|
91409
|
+
* the raw-capture charset guard it applies to the region and suffix (see
|
|
91410
|
+
* `CANONICAL_REGION_SEGMENT` in `src/utils/ecr-uri.ts`):
|
|
91411
|
+
* `<acct>.dkr.ecr-fips.us-<U+212A>east-1.amazonaws.com/...` parsed as the
|
|
91412
|
+
* region `us-keast-1`, a region the host does not name, and a Kelvin sign in
|
|
91413
|
+
* the LABELS resolved to the plain form. An ASCII-only fold keeps the case
|
|
91414
|
+
* fold the #1801 login / pull agreement needs (DNS case-insensitivity is
|
|
91415
|
+
* ASCII-only) while leaving any other code point for that guard to refuse.
|
|
91416
|
+
*/
|
|
91417
|
+
function foldAsciiUpperCase(value) {
|
|
91418
|
+
return value.replace(/[A-Z]+/g, (run) => run.toLowerCase());
|
|
91384
91419
|
}
|
|
91385
91420
|
/** Docker's rule for "component 1 is a registry, not a repository segment". */
|
|
91386
91421
|
function isRegistryHostComponent(component) {
|
|
@@ -91453,7 +91488,9 @@ function isCredentialFresh(creds) {
|
|
|
91453
91488
|
* the same one the DERIVED `docker login` endpoint names — an
|
|
91454
91489
|
* AWS-reported `proxyEndpoint` still wins over that fallback (it can be
|
|
91455
91490
|
* a VPC-endpoint host), which is correct: AWS names the endpoint its own
|
|
91456
|
-
* token authenticates, and it reports it lower-cased.
|
|
91491
|
+
* token authenticates, and it reports it lower-cased. That precedence holds
|
|
91492
|
+
* only for the PLAIN host form: a FIPS or dual-stack pull logs in to its own
|
|
91493
|
+
* host, since `proxyEndpoint` always names the plain one (issue #1855).
|
|
91457
91494
|
*/
|
|
91458
91495
|
async function pullEcrImage(imageUri, options) {
|
|
91459
91496
|
const logger = getLogger().child("ecr-puller");
|
|
@@ -91504,7 +91541,11 @@ async function pullEcrImage(imageUri, options) {
|
|
|
91504
91541
|
...assumed && { credentials: assumed }
|
|
91505
91542
|
});
|
|
91506
91543
|
try {
|
|
91507
|
-
await ecrLogin(ecr,
|
|
91544
|
+
await ecrLogin(ecr, {
|
|
91545
|
+
accountId: parsed.accountId,
|
|
91546
|
+
region: parsed.region,
|
|
91547
|
+
registryHost: canonicalUri.slice(0, canonicalUri.indexOf("/"))
|
|
91548
|
+
});
|
|
91508
91549
|
} finally {
|
|
91509
91550
|
ecr.destroy();
|
|
91510
91551
|
}
|
|
@@ -91555,14 +91596,26 @@ async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
|
91555
91596
|
* Authenticate the local docker daemon against the target ECR registry.
|
|
91556
91597
|
* Mirrors `DockerAssetPublisher.ecrLogin` but stays in this module so the
|
|
91557
91598
|
* local-invoke path doesn't depend on the publisher's larger surface area.
|
|
91558
|
-
|
|
91559
|
-
|
|
91560
|
-
|
|
91599
|
+
*
|
|
91600
|
+
* The login endpoint must name the host the PULL targets (issue #1855):
|
|
91601
|
+
* docker's credential store is keyed on the hostname verbatim, so a login to
|
|
91602
|
+
* the plain host followed by a pull from a FIPS or dual-stack host sends no
|
|
91603
|
+
* credentials (`no basic auth credentials`). `GetAuthorizationToken` reports
|
|
91604
|
+
* the PLAIN host as its `proxyEndpoint`, so that value, and the derived
|
|
91605
|
+
* fallback, are used only when the pull targets the plain form; every other
|
|
91606
|
+
* form logs in to `registryHost` itself. The token is registry-scoped, not
|
|
91607
|
+
* host-scoped: measured against real ECR, one token authenticated `/v2/` on
|
|
91608
|
+
* all four host forms `ECR_REGISTRY_HOST_FORMS` lists.
|
|
91609
|
+
*/
|
|
91610
|
+
async function ecrLogin(client, target) {
|
|
91611
|
+
const { accountId, region, registryHost } = target;
|
|
91612
|
+
getLogger().child("ecr-puller").debug(`ECR login (account=${accountId}, region=${region}, host=${registryHost})`);
|
|
91561
91613
|
const authData = (await client.send(new GetAuthorizationTokenCommand({}))).authorizationData?.[0];
|
|
91562
91614
|
if (!authData?.authorizationToken) throw new LocalInvokeBuildError$1("Failed to get ECR authorization token");
|
|
91563
91615
|
const [username, password] = Buffer.from(authData.authorizationToken, "base64").toString().split(":");
|
|
91564
91616
|
if (!username || password === void 0) throw new LocalInvokeBuildError$1("ECR authorization token has unexpected shape (missing username/password)");
|
|
91565
|
-
const
|
|
91617
|
+
const plainHost = `${accountId}.dkr.ecr.${region}.${ecrUrlSuffix(region)}`;
|
|
91618
|
+
const endpoint = registryHost === plainHost ? authData.proxyEndpoint || `https://${plainHost}` : `https://${registryHost}`;
|
|
91566
91619
|
const loginArgs = [
|
|
91567
91620
|
"login",
|
|
91568
91621
|
"--username",
|
|
@@ -95748,10 +95801,14 @@ function createLocalRunTaskCommand() {
|
|
|
95748
95801
|
* (issue [#3503](https://github.com/go-to-k/cdkd/issues/3503)).
|
|
95749
95802
|
*
|
|
95750
95803
|
* `cdkd local start-service` / `start-alb` hand the whole run to cdk-local's
|
|
95751
|
-
* `runEcsServiceEmulator`, which reads each stack's asset manifest itself
|
|
95752
|
-
*
|
|
95753
|
-
*
|
|
95754
|
-
*
|
|
95804
|
+
* `runEcsServiceEmulator`, which reads each stack's asset manifest itself —
|
|
95805
|
+
* for an ECS container image and for an ALB Lambda target's container image
|
|
95806
|
+
* alike. Since cdk-local 0.149.3 the engine refuses an escaping
|
|
95807
|
+
* `source.directory` at each build and each `--watch` soft reload
|
|
95808
|
+
* (go-to-k/cdkd#3597). This check stays in front of it, for the whole
|
|
95809
|
+
* assembly at once, because the engine's refusal quotes the assembly-chosen
|
|
95810
|
+
* value in a boundary the value can close (go-to-k/cdk-local#758);
|
|
95811
|
+
* go-to-k/cdkd#3652 removes it once that ships.
|
|
95755
95812
|
*
|
|
95756
95813
|
* `resolveBoots` is the seam because the engine calls it after every synth —
|
|
95757
95814
|
* at boot, and again on every `--watch` reload — and before any image is
|
|
@@ -95821,7 +95878,7 @@ function assertEmulatorDockerContextsContained(stacks) {
|
|
|
95821
95878
|
* only while the directory is named `assembly-*` AND its parent's
|
|
95822
95879
|
* `manifest.json` declares it as a `cdk:cloud-assembly` artifact, and WARN
|
|
95823
95880
|
* whenever a climb happens, since the predicate is read from the tree being
|
|
95824
|
-
* judged.
|
|
95881
|
+
* judged. Deleted with this module by go-to-k/cdkd#3652.
|
|
95825
95882
|
*/
|
|
95826
95883
|
function engineAssemblyRoot(outdir) {
|
|
95827
95884
|
let dir = resolve(outdir);
|
|
@@ -98762,4 +98819,4 @@ function buildProgram() {
|
|
|
98762
98819
|
|
|
98763
98820
|
//#endregion
|
|
98764
98821
|
export { buildProgram };
|
|
98765
|
-
//# sourceMappingURL=program-
|
|
98822
|
+
//# sourceMappingURL=program-hXXls0hg.js.map
|