@cdkd/cli 0.341.1 → 0.343.0
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/{ambient-client-defaults-CtGTOtn9.js → ambient-client-defaults-CPmXchp0.js} +4 -4
- package/dist/{ambient-client-defaults-CtGTOtn9.js.map → ambient-client-defaults-CPmXchp0.js.map} +1 -1
- package/dist/{asg-provider-BAtESAWA.js → asg-provider-Bppos8EY.js} +5 -5
- package/dist/{asg-provider-BAtESAWA.js.map → asg-provider-Bppos8EY.js.map} +1 -1
- package/dist/{aws-client-defaults-BLXFsfMa.js → aws-client-defaults-BayGUTJ4.js} +31 -6
- package/dist/aws-client-defaults-BayGUTJ4.js.map +1 -0
- package/dist/{aws-clients-D3Z_tFc1.js → aws-clients-C8p6sQfr.js} +39 -6
- package/dist/aws-clients-C8p6sQfr.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{db-instance-modify-retry-DWfH-8xJ.js → db-instance-modify-retry-NFYmLL_I.js} +3 -3
- package/dist/{db-instance-modify-retry-DWfH-8xJ.js.map → db-instance-modify-retry-NFYmLL_I.js.map} +1 -1
- package/dist/{deploy-engine-CGUvIYNR.js → deploy-engine-9vVOF1h_.js} +316 -47
- package/dist/deploy-engine-9vVOF1h_.js.map +1 -0
- package/dist/{ecr-uri-XErmp-WT.js → ecr-uri-NwcD6PUe.js} +3 -3
- package/dist/{ecr-uri-XErmp-WT.js.map → ecr-uri-NwcD6PUe.js.map} +1 -1
- package/dist/{iam-role-provider-D9Q0YoPK.js → iam-role-provider-D3txh4Jy.js} +5 -5
- package/dist/{iam-role-provider-D9Q0YoPK.js.map → iam-role-provider-D3txh4Jy.js.map} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-CdvFGM7h.js → neptune-provider-DZOT1xuJ.js} +6 -6
- package/dist/{neptune-provider-CdvFGM7h.js.map → neptune-provider-DZOT1xuJ.js.map} +1 -1
- package/dist/{program-DTlJetBn.js → program-DP4g5uS3.js} +222 -89
- package/dist/program-DP4g5uS3.js.map +1 -0
- package/dist/{provider-classes-BlYx16N0.js → provider-classes-CHzimhh6.js} +566 -19
- package/dist/provider-classes-CHzimhh6.js.map +1 -0
- package/dist/{rds-provider-Dexme8bI.js → rds-provider-CePynqbO.js} +246 -11
- package/dist/rds-provider-CePynqbO.js.map +1 -0
- package/dist/{read-replica-BZcBe5RN.js → read-replica-CngiOJmt.js} +3 -3
- package/dist/{read-replica-BZcBe5RN.js.map → read-replica-CngiOJmt.js.map} +1 -1
- package/dist/{update-removal-CNj3wKPR.js → update-removal-Bp0Y4QQ2.js} +3 -3
- package/dist/{update-removal-CNj3wKPR.js.map → update-removal-Bp0Y4QQ2.js.map} +1 -1
- package/dist/{version-B9pb2Csa.js → version-ZgB66ZVw.js} +2 -2
- package/dist/{version-B9pb2Csa.js.map → version-ZgB66ZVw.js.map} +1 -1
- package/package.json +2 -2
- package/dist/aws-client-defaults-BLXFsfMa.js.map +0 -1
- package/dist/aws-clients-D3Z_tFc1.js.map +0 -1
- package/dist/deploy-engine-CGUvIYNR.js.map +0 -1
- package/dist/program-DTlJetBn.js.map +0 -1
- package/dist/provider-classes-BlYx16N0.js.map +0 -1
- package/dist/rds-provider-Dexme8bI.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as getCdkdVersion } from "./version-
|
|
1
|
+
import { t as getCdkdVersion } from "./version-ZgB66ZVw.js";
|
|
2
2
|
import { $ as UNRENDERABLE, F as generateResourceName, G as isNameGeneration, J as withStackScope, M as PATTERN_B_NAME_PROPERTIES, N as PATTERN_B_RESOURCE_TYPES, P as derivesPatternBName, Q as STACK_REF_MAX_CODE_POINTS, X as SAFE_MSG_ALTERED_CHAR, Z as SECRET_REF_MAX_CODE_POINTS, _ as explicitNamePropertyFor, a as safeStringify, at as displayStackName, c as isStdoutReservedForPayload, ct as plainIdentOr, d as runStackBuffered, dt as terminalSafe, et as asIsMessage, ft as truncateCodePoints, it as displaySafe, j as PATTERN_B_NAME_OPTIONS, l as reserveStdoutForPayload, lt as safeMsg, m as getLiveRenderer, n as describeAwsFailure, nt as displayAwsMessage, ot as isPasteableIdent, q as withSkipPrefix, rt as displayIdent, s as getLogger, tt as cutMarker, ut as stringifyJsonPayload, x as coerceCfnBoolean } from "./aws-failure-text-zxW2CTmF.js";
|
|
3
|
-
import { $a as refuseUnreadableCdkCrossAccountRefs, $c as liveMatchesUnresolvedTokenFrame, $i as createPreDeleteFinalSnapshot, $l as importableOutputs, $n as updatePartialMessage, $r as DEFAULT_RESOURCE_WARN_AFTER_MS, $s as malformedOutputsRefusalMessage, $t as NESTED_PENDING_PARENT_REASON, $u as getDockerCmd, A as PROTECTION_PROPERTY_BY_TYPE, Aa as slowCcOperationTimeoutMs, Ad as refuseFailedLookups, Ai as journaledOrphanPrintingBag, An as rollbackOrphanIds, Ao as recordedOutputReferenceRegions, Ar as withNameGenerationReached, As as refuseMalformedResourceEntriesForDestroy, Au as assertAssetBucketRegion, Bc as isMarkedCoordinate, Bd as nullPrototypeRecord, Bi as extractDeploymentEventError, Bl as recordProvenPublicExpression, Bn as propertiesChangedReason, Br as secretBearing, Bs as refuseMalformedResourcePropertiesForExport, Bt as refactorMarkerRefusalMessage, Bu as describeDockerCapturedOutput, C as refusePendingMovesOut, Cc as findActionableSdkUnwired, Cd as uploadCfnTemplate, Ci as noEchoAttributeNamesOf, Cl as isUncertifiedBaselineMaskPosition, Cn as DeploymentEventsStore, Co as cfnRefValueFromPhysicalId, Cr as orphanNeedsIdentity, Cs as malformedLocalResourceEntriesWarning, Cu as buildAssetRedirectMap, D as diffSecurity, Dd as PARTITION_TABLE, Di as withAttemptedItemsMasked, Dl as inheritNestedStackParameterAssociations, Dn as findRefactorHints, Dr as retiredAfterRollback, Ds as refuseMalformedResourceAttributesForOrphan, Du as AssetModeResolver, E as serviceTokenBlockingReason, Ea as CloudControlProvider, Ec as unwrittenCreateOnlyReplacement, Ed as expectedOwnerParam, Ei as noEchoParameterNamesOf, El as identityKeyFor, En as formatDestructiveChange, Eo as refStateLookupFromResource, Er as nameScopeOf, Es as malformedScrubResourceEntriesRefusalMessage, Eu as rewriteTemplateAssetReferences, Fa as deleteSkipReason, Fd as parseFailureDebugDetail, Fi as secretNamePrintingBags, Fl as provenPublicValue, Fn as differingRemedy, Fo as isNamelessDynamicReferenceError, Fr as reachableDivergentParameters, Fs as unreadableResourceEntries, Ft as keptForRetainedRecord, Fu as validateAssetBucketName, Ga as isWaitAbandonedError, Gc as noEchoCoordinatesOf, Gd as renderAssemblyPathEscape, Gi as ATOMIC_FINAL_SNAPSHOT_TYPES, Gl as isLockInfoExpired, Gn as DELETED_RESOURCE_REMEDY, Go as withoutUnsettledProperties, Gr as exportNameSecretExposure, Gs as malformedOrphansRefusalMessage, Gu as redactDockerArgvValues, Hc as maskReadbackAtCoordinates, Hd as absoluteAssemblyPathEscape, Hl as WHOLE_DYNAMIC_REFERENCE_PATTERN, Hn as referencedLogicalIds, Ho as unsettledItemsOf, Hr as secretSafeKeyDisplay, Hs as repairMalformedResourcePropertiesForReadOnly, Ht as sameMove, Hu as describeDockerFailure, Id as utf8ByteLength, Il as recordMaskOnlyValue, In as isPairableType, Io as carriesDynamicReference, Ir as resourcesNamingDeclaredParameter, Is as malformedDriftResourcePropertiesWarning, It as recordRetainedForReadoption, Iu as validateContainerRepoName, Ja as isAlwaysLiveAttribute, Jd as injectedAwsRegionValue, Ji as ccRoutedInstanceTakesNoSnapshot, Jl as acceptedCreateOnlyDropsOf, Jn as withUnprovenUnsettled, Jo as MULTI_REGION_RECREATE_BLOCKED_TYPES, Jr as collectDeclaredOutputNames, Js as refuseMalformedOrphansForDestroy, Ju as partitionSensitiveEnv, Ka as DiffCalculator, Kc as noEchoLeavesOf, Kd as resolveAssemblyPath, Ki as PRE_DELETE_SNAPSHOT_TYPES, Kl as S3StateBackend, Kn as recordAfterRollbackUpdate, Ko as findReplacedReadersOfRecreateTargets, Kr as isWholeDynamicReferenceValue, Ks as malformedOrphansWarning, Kt as formatResourceLine, Ku as dockerSpawnEnvWithSensitive, Lc as DagBuilder, Ld as defineOwnKey, Li as secretNamedRecordNeedles, Ll as recordMaskOnlyValuesIn, Ln as looselyEqual, Lo as keepsSecretReferenceToken, Lr as WITHHELD_NAME_DISPLAY, Ls as malformedResourcePropertiesWarning, Lt as readRefactorMarker, Lu as BOOTSTRAP_MARKER_PREFIX, M as perType, Ma as UNSPECIFIED_SKIP_REASON, Md as StageLoadError, Mi as namingSecretsWithRecordedNoEcho, Ml as recordNestedStackParameterExpressions, Mn as changedReferenceInDiff, Mo as getAccountInfo, Mr as inheritProducerRegions, Ms as refuseMalformedResourceEntriesForImportSave, Mt as withResourceDeadline, Mu as getBootstrapMarkerKey, N as readProtection, Na as deleteIndeterminateGuards, Nd as processStackMessages, Ni as orphanRecordsPrintingBag, Nl as splitGetAttStringForm, Nn as changedReferencePath, No as isImpossibleEmptyStoredAttribute, Nr as computeParameterTaint, Ns as refuseMalformedResourceEntriesForOrphan, Nt as IMPLICIT_DELETE_DEPENDENCIES, Nu as parseBootstrapMarker, O as recordedProtectionEvidence, Oc as NO_CC_HANDLERS_REASON, Od as canonicalizeRegion, Oi as createReadOnlyAttributeHealerFactory, On as hintSidesOf, Oo as keepHeldTokenProvenance, Or as retiredNameGenerationsAfter, Os as refuseMalformedResourceEntries, Ou as ensureAssetStorage, Pa as deleteLeftInPlace, Pd as describeJsonParseFailure, Pi as secretNamePrintingBag, Pl as carriesSecretMask, Pn as changedReferenceReason, Po as carriesFetchableDynamicReference, Pr as namesAnyDeclaredParameter, Ps as repairMalformedResourceEntriesForReadOnly, Pt as computeImplicitDeleteEdges, Pu as readBootstrapMarkerBody, Qa as producerLookupOver, Qc as valueAtCoordinate, Qi as unsupportedFinalSnapshotError, Ql as importableOutputKeys, Qn as undeclaredEmptyObservedKeys, Qr as DEFAULT_RESOURCE_TIMEOUT_MS, Qs as malformedLocalOutputsWarning, Qt as resolvePendingCloudControlRequests, Qu as formatDockerLoginError, Rc as TemplateParser, Rd as hasOwnKey, Ri as stateSecretNameNeedles, Rl as recordNoEchoAttributeValues, Rn as mappingPairs, Ro as withSharedDrainBudget, Rr as displayTextOrWithheld, Rs as refuseMalformedResourcePropertiesForDestroy, Rt as readRefactorMarkerOnce, Ru as buildDockerImage, S as pendingMovesRefusalMessage, Sa as isCustomResourceType$1, Sc as hasReadableResources, Sd as findLargeInlineResources, Si as yellow, Sl as dynamicReferenceTokens, Sn as DeploymentEventsReader, So as AWS_NO_VALUE, Sr as removeProtectionTypeList, Ss as isReadableResourceEntry, Su as WorkGraph, T as findServiceTokenRefusals, Td as decodeListingKey, Ti as noEchoExactEchoLeavesOf, Tl as pathCrossesDottedKey, Tn as findDestructiveChanges, To as lacksRecordedTableArn, Tr as nameGenerationHighWaterOf, Ts as malformedResourceEntriesWarning, Tu as loadPublishableAssetManifest, Uc as maskWholeValue, Ud as describeFileReadFailure, Ui as secretSegmentsOfState, Ul as isSingleDynamicReferenceToken, Un as replayFailedOperations, Uo as unsettledPropertiesOf, Ur as carriedExportAliasExposure, Us as UNREADABLE_ORPHANS_CONTAINER_ROW, Ut as updateRefactorMarker, Uu as redactedCause, Vc as maskAtCoordinates, Vd as ownValue, Vl as wholeStringLeavesOf, Vn as proposeRenames, Vo as unsettledItemsField, Vr as secretBearingStateKeyWarning, Vs as refuseMalformedResourcePropertiesForOrphan, Vt as refuseRefactorMarker, Vu as describeDockerExecFailure, Wc as maskedLeafCoordinatesOf, Wd as displayAssemblyPath, Wi as withSecretPhysicalIdsMaskedInState, Wl as LockManager, Wn as replayRollback, Wo as withUnsettledProperties, Wr as exportNameNoEchoParameters, Ws as hasReadableOrphans, Wu as redactedDockerCause, Xc as readsNoEchoSource, Xd as resolveBucketRegion, Xi as isFinalSnapshotError, Xl as exportNamesCarriedFrom, Xn as equalModuloMarkedMask, Xo as isStatefulRecreateTargetSync, Xr as isExportAliasCollision, Xs as malformedExportNamesWarning, Xu as isDockerClientEnvKey, Ya as poisonRenderedSpellingsCollidingIn, Yc as readbackPathFor, Yi as effectiveDeletionPolicy, Yl as describeRegionValueKind, Yn as calculateResourceDrift, Yo as isStatefulRecreateTargetForReplace, Yr as collectPublishedOutputNames, Ys as repairMalformedOrphansForReadOnly, Yu as warnFinchArgvExposure, Za as resolveDynamicReferences, Zc as recordedNoEchoValuesOf, Zi as refusesFinalSnapshot, Zl as hasReadableExportSet, Zn as equalModuloMask, Zo as renderStatefulReason, Zr as bindingSkippedOutputs, Zs as malformedExportSourceWarning, Zt as pendingRequestCount, Zu as isMalformedEnvKey, _ as listNestedTemplateRows, _a as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, _c as withheldAccountClause, _d as warnDeprecatedNoPrefixCliFlag, _i as bold, _l as maskSecretsInText, _n as loadJournaledOrphans, _r as findNestedStackTypeChanges, _s as refuseMalformedOrphanRecordsForDestroy, _u as stackInstanceIdOf, a as scanActiveConsumers, ac as STATE_REGION_DIVERGED, ad as synthesisStatusMessage, al as createUnionSecretMasker, an as recordDisplacedSkips, ao as sendableAssumeRoleCommand, as as describeTypeWithThrottleRetry, au as hasReasonlessBaselineRefusal, b as hasPendingMovesOut, ba as TemplateNoEchoReresolver, bc as displayLogicalId, bd as CFN_TEMPLATE_URL_LIMIT, bi as green, bn as makeSiblingClaimReader, bo as isUnboundTemplateParameter, bs as unpreviewableOrphanRecords, bu as isSensitiveAttributeName, c as inheritedProvenanceForChildDiff, cc as malformedResourcesWarning, cd as loadCdkJson, ci as holdsSupersededResources, cl as logOnlyValueCount, cn as withNestedRevertRun, co as callerEnvCredentials, cr as demoteSupersededOrphans, cu as renderPhaseTimings, d as conditionInputsFrom, dc as refuseMalformedResourcesForDestroy, dd as resolveCaptureObservedState, di as supersededAfterRollback, dl as recordLogOnlyValue, dn as withNestedStackContext, do as classifyReplaySecretRegion, dr as planFailedOps, ds as isReadableOrphanRecord, du as CrossPrefixReadError, ea as buildFinalSnapshotIdentifier, ec as malformedOutputsWarning, ed as runDockerForeground, ei as maskingRetryLogger, en as displacedOpClause, eo as applyRoleArnIfSet, er as updatePartialReason, eu as isReadableBag, f as parentSuppliedValues, fa as CC_BROKEN_REASON, fc as refuseMalformedResourcesForExport, fd as resolveSkipPrefix, fi as supersededHeldByOtherTypeWarning, fl as shareLogOnlyValues, fn as deleteJournaledOrphans, fo as producerRegionsFromState, fr as recheckFailedPlan, fs as malformedOrphanRecordsRefusalMessage, fu as CrossPrefixScanCache, g as isAbsoluteAssetPath, ga as wouldReturnToSdkProvider, gc as accountArgs, gd as stateBucketExistenceConfirmed, gl as maskSecretsInError, gn as journaledOrphanLines, gr as withPreviousPolicies, gs as refuseMalformedOrphanRecords, gu as isNotImplemented, h as findNestedTemplateTreeDefect, ha as isCustomResource, hc as JSON_LISTING_HOLE_VALUE, hd as resolveUseCdkBootstrapAssets, hi as withoutSuperseded, hl as errorCauseChain, hn as isHandledOrphan, hr as resolveReplacementOldType, hs as previewableOrphanRecords, hu as isAccessDenied, i as mergeNoChangeOutputs, ic as repairMalformedOutputsForReadOnly, id as Synthesizer, ii as withStackRecords, il as carryLogOnlyValues, in as nestedChildStackName$1, io as isIamRoleArn, ir as withCreateTokenLedger, is as templateResourceTypes, iu as stackInstanceIdCarriedFrom, j as isProtectionValueActive, ja as RollbackInlinePolicyWriters, jd as AssemblyReader, ji as maskEventTextWithBoundBags, jl as recordPhysicalNameCopy, jn as withMovedTo, jo as recordedReferenceRegions, js as refuseMalformedResourceEntriesForImport, ju as isCrossRegionRedirect, k as recordedProtectionNote, ka as setResolvedResourceTimeouts, kc as hasNoCloudControlHandlers, kd as derivePartitionAndUrlSuffix, ki as completedReplayEntries, kl as physicalNameCopiesOf, kn as movedToHint, kr as retiredNameGenerationsLeaving, ks as refuseMalformedResourceEntriesForDeploy, ku as buildDenyExternalAccessPolicy, l as makeCanonicalizePropertiesFn, lc as malformedStateRefusalMessage, ld as resolveApp, li as isSupersededResourceRecord, ll as printingCorpusOf, ln as collectNestedChildUnaddressed, lo as envCredentialsAreAssumedRole, lr as isJournaledOrphan, ls as declaresNoEcho, lu as timePhase, m as childTemplateLoader, ma as ccBrokenReason, mc as repairMalformedResourcesForReadOnly, md as resolveStateBucketWithDefaultAndSource, mi as supersededResourcesOf, ml as createSecretMasker, mn as dropFailedHint, mr as replacementNeverSwapped, ms as malformedOrphanRowsKeptWarning, mu as crossPrefixDeniedWarning, n as isSecretBearingReferenceString, nc as refuseMalformedOutputs, nd as AssetManifestLoader, ni as destroyStackRecordsView, nn as dropSettledNestedJournals, no as assertSendableRoleArn, nr as ledgerForStack, nu as orphansCarriedFrom, o as inRunStackKey, oc as refuseDivergentRecordRegionForDestroy, od as getDefaultStateBucketName, oi as addSuperseded, ol as hasMaskableValues, oo as AWS_CREDENTIAL_ENV_KEYS, or as planRollback, os as withRetry, ou as hasUnverifiableParameterRefusal, p as readRecordedConditionVerdicts, pa as ProviderRegistry, pc as refuseMalformedState, pd as resolveStateBucketWithDefault, pi as supersededHolderOf, pl as unionOfSecretBags, pn as dropFailedCommands, po as regionLessSecretName, pr as recordUnderIdIsNotOwn, ps as malformedOrphanRecordsWarning, pu as applyCrossPrefixScan, qa as IntrinsicFunctionResolver, qc as noEchoOutputsComparison, qd as injectAwsRegion, qi as ccRoutedFinalSnapshotError, ql as splitImportedOps, qn as settleUnsettledPrevious, qo as shownType, qr as noEchoParameterValueSeed, qs as refuseMalformedOrphans, qu as finchSecretArgvRefusal, r as keptWholeReasonText, rc as refuseMalformedOutputsForDestroy, rd as getDockerImageBySourceHash, ro as explicitRoleArnOrThrow, rs as prefetchCreateOnlyPropertyPaths, ru as shouldRetainResource, s as crossStackOutputProvenanceSource, sc as malformedRenderedContainersWarning, sd as getLegacyStateBucketName, si as deleteSupersededEntry, sl as literalSplitDelimitersOf, sn as revertedNestedRowIds, so as applyCallerIdentityCredentials, sr as seedsDeleteFirstGuard, ss as parameterInputsFor, su as PhaseClock, t as DeployEngine, td as runDockerStreaming, tl as redactForState, tn as displacedPhysicalIdShown, to as assertFlagRoleArn, tu as orphansAfterRollback, u as conditionFingerprint, uc as refuseMalformedResourcesForDeploy, ud as resolveAutoAssetStorage, ui as removeSuperseded, ul as recordLogOnlyParameterValue, un as getCurrentNestedStackContext, uo as classifyRecordedSecretRegion, ur as isReplacementOrphan, us as deployRefusesOrphanRowsReason, uu as rebuildClientForBucketRegion, v as renderNestedTemplateTreeDefect, va as applyCustomResourceResponseExpiration, vc as STATE_RESOURCES_MALFORMED, vd as ssmResolvedValueType, vi as cyan, vl as scrubResourceRecord, vn as sameJournaledOrphans, vs as refuseMalformedOrphansForOrphan, vu as withStackInstanceIdWithheld, w as deferredServiceTokenWarning, wa as withPrintingSecrets, wc as findHandledUnwrittenCreateOnly, wd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, wi as noEchoComparisonForTemplate, wl as spelledKeysOf, wn as constructPathOf$1, wo as isStalePlaceholderArnAttribute, wr as nameGenerationCarriedFrom, ws as malformedLocalResourcesWarning, wu as createAssetRedirectResolver, x as pendingMovesOutOf, xa as readsNoEchoDeleteValues, xc as hasReadableOutputs, xd as MIGRATE_TMP_PREFIX, xi as red, xl as DYNAMIC_REFERENCE_TOKEN_SCAN, xn as planOrphanAdoption, xo as parameterTypeMayLoseSecretIdentity, xs as unreadableOrphanRecords, xu as stringifyValue, y as templateIdentity, ya as customResourceResponseExpirationWarning, yc as UNREADABLE_RESOURCES_MAP_ROW, yd as CFN_TEMPLATE_BODY_LIMIT, yi as gray, yl as withPhysicalNameCopies, yn as makeForeignHolderScan, yo as coerceParameterTypedValue, ys as repairMalformedOrphanRecordsForReadOnly, yu as AssetPublisher, zc as canonicalCoordinates, zd as hasPlainPrototype, zi as storedSecretNameNeedles, zl as recordNoEchoParameterFreshValue, zn as parseMappingFile, zo as INTRINSIC_KEYS, zr as exportAliasCollisionScrubWarning, zs as refuseMalformedResourcePropertiesForDrift, zt as refactorMarkerMovesOf, zu as resolveDockerContextDirectory } from "./deploy-engine-CGUvIYNR.js";
|
|
4
|
-
import { $ as
|
|
5
|
-
import { $t as forceQuitRecoveryClause, Dt as logicalIdShown, H as assertRegionMatch, M as VALUE_NOT_SHOWN, Qt as buildLockContentionMessage, U as isMarkedNotGone, V as RESOURCE_NOT_FOUND, Xt as UNREPRODUCIBLE_LOCK_CLAUSE, Zt as buildForceUnlockCommand, an as CUSTOM_RESOURCE_RESPONSE_PREFIX, bt as interruptWatchListenerCount, dn as setPasteableAwsProfile, en as formatLockExpiry, fn as withPasteableAwsProfile, kt as resourceTypeShown, ln as producerCoordinateKey, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mt as isAwsCliLiteral, nn as formatLockOwner, on as DEFAULT_STATE_PREFIX, p as IAM_PRINCIPAL_NAME, sn as injectiveKey, st as runDeleteAttempt, tn as formatLockOperation, un as producerRecordKey, vt as beginCommandInterruptScope, xt as isInterruptedWaitError, y as readRecordedPrincipals, yt as endCommandInterruptScope, z as remedyLogicalId } from "./update-removal-
|
|
6
|
-
import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-
|
|
7
|
-
import { a as
|
|
8
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-
|
|
3
|
+
import { $a as applyRoleArnIfSet, $i as buildFinalSnapshotIdentifier, $l as isReadableBag, $n as updatePartialMessage, $r as DEFAULT_RESOURCE_TIMEOUT_MS, $s as malformedOutputsWarning, $t as NESTED_PENDING_PARENT_REASON, $u as runDockerForeground, A as PROTECTION_PROPERTY_BY_TYPE, Aa as RollbackInlinePolicyWriters, Ad as AssemblyReader, Ai as maskEventTextWithBoundBags, Al as recordPhysicalNameCopy, An as rollbackOrphanIds, Ao as recordedReferenceRegions, Ar as retiredNameGenerationsLeaving, As as refuseMalformedResourceEntriesForImport, Au as isCrossRegionRedirect, Bc as maskAtCoordinates, Bd as ownValue, Bl as wholeStringLeavesOf, Bn as propertiesChangedReason, Bo as unsettledItemsField, Br as exportAliasCollisionScrubWarning, Bs as refuseMalformedResourcePropertiesForOrphan, Bt as refactorMarkerRefusalMessage, Bu as describeDockerExecFailure, C as refusePendingMovesOut, Ca as withPrintingSecrets, Cc as findHandledUnwrittenCreateOnly, Cd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ci as noEchoComparisonForTemplate, Cl as spelledKeysOf, Cn as DeploymentEventsStore, Co as isStalePlaceholderArnAttribute, Cr as removeProtectionTypeList, Cs as malformedLocalResourcesWarning, Cu as createAssetRedirectResolver, D as diffSecurity, Dc as NO_CC_HANDLERS_REASON, Dd as canonicalizeRegion, Di as createReadOnlyAttributeHealerFactory, Dn as findRefactorHints, Do as keepHeldTokenProvenance, Dr as nameScopeOf, Ds as refuseMalformedResourceEntries, Du as ensureAssetStorage, E as serviceTokenBlockingReason, Ed as PARTITION_TABLE, Ei as withAttemptedItemsMasked, El as inheritNestedStackParameterAssociations, En as formatDestructiveChange, Er as nameGenerationHighWaterOf, Es as refuseMalformedResourceAttributesForOrphan, Eu as AssetModeResolver, Fd as utf8ByteLength, Fl as recordMaskOnlyValue, Fn as differingRemedy, Fo as carriesDynamicReference, Fr as namesAnyDeclaredParameter, Fs as malformedDriftResourcePropertiesWarning, Ft as keptForRetainedRecord, Fu as validateContainerRepoName, Ga as DiffCalculator, Gc as noEchoLeavesOf, Gd as resolveAssemblyPath, Gi as PRE_DELETE_SNAPSHOT_TYPES, Gl as S3StateBackend, Gn as DELETED_RESOURCE_REMEDY, Go as findReplacedReadersOfRecreateTargets, Gr as exportNameNoEchoParameters, Gs as malformedOrphansWarning, Gu as dockerSpawnEnvWithSensitive, Hc as maskWholeValue, Hd as describeFileReadFailure, Hi as secretSegmentsOfState, Hl as isSingleDynamicReferenceToken, Hn as referencedLogicalIds, Ho as unsettledPropertiesOf, Hr as secretBearingStateKeyWarning, Hs as UNREADABLE_ORPHANS_CONTAINER_ROW, Ht as sameMove, Hu as redactedCause, Ic as DagBuilder, Id as defineOwnKey, Ii as secretNamedRecordNeedles, Il as recordMaskOnlyValuesIn, In as isPairableType, Io as keepsSecretReferenceToken, Ir as reachableDivergentParameters, Is as malformedResourcePropertiesWarning, It as recordRetainedForReadoption, Iu as BOOTSTRAP_MARKER_PREFIX, Ja as poisonRenderedSpellingsCollidingIn, Jc as readbackPathFor, Ji as effectiveDeletionPolicy, Jl as describeRegionValueKind, Jn as withUnprovenUnsettled, Jo as isStatefulRecreateTargetForReplace, Jr as noEchoParameterValueSeed, Js as repairMalformedOrphansForReadOnly, Ju as warnFinchArgvExposure, Ka as IntrinsicFunctionResolver, Kc as noEchoOutputsComparison, Kd as injectAwsRegion, Ki as ccRoutedFinalSnapshotError, Kl as splitImportedOps, Kn as recordAfterRollbackUpdate, Ko as shownType, Kr as exportNameSecretExposure, Ks as refuseMalformedOrphans, Kt as formatResourceLine, Ku as finchSecretArgvRefusal, Lc as TemplateParser, Ld as hasOwnKey, Li as stateSecretNameNeedles, Ll as recordNoEchoAttributeValues, Ln as looselyEqual, Lo as withSharedDrainBudget, Lr as resourcesNamingDeclaredParameter, Ls as refuseMalformedResourcePropertiesForDestroy, Lt as readRefactorMarker, Lu as buildDockerImage, M as perType, Ma as deleteIndeterminateGuards, Md as processStackMessages, Mi as orphanRecordsPrintingBag, Ml as splitGetAttStringForm, Mn as changedReferenceInDiff, Mo as isImpossibleEmptyStoredAttribute, Ms as refuseMalformedResourceEntriesForOrphan, Mt as withResourceDeadline, Mu as parseBootstrapMarker, N as readProtection, Na as deleteLeftInPlace, Nd as describeJsonParseFailure, Ni as secretNamePrintingBag, Nl as carriesSecretMask, Nn as changedReferencePath, No as carriesFetchableDynamicReference, Nr as inheritProducerRegions, Ns as repairMalformedResourceEntriesForReadOnly, Nt as IMPLICIT_DELETE_DEPENDENCIES, Nu as readBootstrapMarkerBody, O as recordedProtectionEvidence, Oa as setResolvedResourceTimeouts, Oc as hasNoCloudControlHandlers, Od as derivePartitionAndUrlSuffix, Oi as completedReplayEntries, Ol as physicalNameCopiesOf, On as hintSidesOf, Or as retiredAfterRollback, Os as refuseMalformedResourceEntriesForDeploy, Ou as buildDenyExternalAccessPolicy, Pa as deleteSkipReason, Pd as parseFailureDebugDetail, Pi as secretNamePrintingBags, Pl as provenPublicValue, Pn as changedReferenceReason, Po as isNamelessDynamicReferenceError, Pr as computeParameterTaint, Ps as unreadableResourceEntries, Pt as computeImplicitDeleteEdges, Pu as validateAssetBucketName, Qa as refuseUnreadableCdkCrossAccountRefs, Qc as liveMatchesUnresolvedTokenFrame, Qi as createPreDeleteFinalSnapshot, Ql as importableOutputs, Qn as undeclaredEmptyObservedKeys, Qr as bindingSkippedOutputs, Qs as malformedOutputsRefusalMessage, Qt as resolvePendingCloudControlRequests, Qu as getDockerCmd, Rc as canonicalCoordinates, Rd as hasPlainPrototype, Ri as storedSecretNameNeedles, Rl as recordNoEchoParameterFreshValue, Rn as mappingPairs, Ro as INTRINSIC_KEYS, Rr as WITHHELD_NAME_DISPLAY, Rs as refuseMalformedResourcePropertiesForDrift, Rt as readRefactorMarkerOnce, Ru as resolveDockerContextDirectory, S as pendingMovesRefusalMessage, Sc as findActionableSdkUnwired, Sd as uploadCfnTemplate, Si as noEchoAttributeNamesOf, Sl as isUncertifiedBaselineMaskPosition, Sn as DeploymentEventsReader, So as cfnRefValueFromPhysicalId, Sr as segmentCleanupOptions, Ss as malformedLocalResourceEntriesWarning, Su as buildAssetRedirectMap, T as findServiceTokenRefusals, Ta as CloudControlProvider, Tc as unwrittenCreateOnlyReplacement, Td as expectedOwnerParam, Ti as noEchoParameterNamesOf, Tl as identityKeyFor, Tn as findDestructiveChanges, To as refStateLookupFromResource, Tr as nameGenerationCarriedFrom, Ts as malformedScrubResourceEntriesRefusalMessage, Tu as rewriteTemplateAssetReferences, Uc as maskedLeafCoordinatesOf, Ud as displayAssemblyPath, Ui as withSecretPhysicalIdsMaskedInState, Ul as LockManager, Un as replayFailedOperations, Uo as withUnsettledProperties, Ur as secretSafeKeyDisplay, Us as hasReadableOrphans, Ut as updateRefactorMarker, Uu as redactedDockerCause, Vc as maskReadbackAtCoordinates, Vd as absoluteAssemblyPathEscape, Vl as WHOLE_DYNAMIC_REFERENCE_PATTERN, Vn as proposeRenames, Vo as unsettledItemsOf, Vr as secretBearing, Vs as repairMalformedResourcePropertiesForReadOnly, Vt as refuseRefactorMarker, Vu as describeDockerFailure, Wa as isWaitAbandonedError, Wc as noEchoCoordinatesOf, Wd as renderAssemblyPathEscape, Wi as ATOMIC_FINAL_SNAPSHOT_TYPES, Wl as isLockInfoExpired, Wn as replayRollback, Wo as withoutUnsettledProperties, Wr as carriedExportAliasExposure, Ws as malformedOrphansRefusalMessage, Wu as redactDockerArgvValues, Xa as resolveDynamicReferences, Xc as recordedNoEchoValuesOf, Xi as refusesFinalSnapshot, Xl as hasReadableExportSet, Xn as equalModuloMarkedMask, Xo as renderStatefulReason, Xr as collectPublishedOutputNames, Xs as malformedExportSourceWarning, Xu as isMalformedEnvKey, Yc as readsNoEchoSource, Yd as resolveBucketRegion, Yi as isFinalSnapshotError, Yl as exportNamesCarriedFrom, Yn as calculateResourceDrift, Yo as isStatefulRecreateTargetSync, Yr as collectDeclaredOutputNames, Ys as malformedExportNamesWarning, Yu as isDockerClientEnvKey, Za as producerLookupOver, Zc as valueAtCoordinate, Zi as unsupportedFinalSnapshotError, Zl as importableOutputKeys, Zn as equalModuloMask, Zr as isExportAliasCollision, Zs as malformedLocalOutputsWarning, Zt as pendingRequestCount, Zu as formatDockerLoginError, _ as listNestedTemplateRows, _a as applyCustomResourceResponseExpiration, _c as STATE_RESOURCES_MALFORMED, _d as ssmResolvedValueType, _i as cyan, _l as scrubResourceRecord, _n as loadJournaledOrphans, _r as findNestedStackTypeChanges, _s as refuseMalformedOrphansForOrphan, _u as withStackInstanceIdWithheld, a as scanActiveConsumers, ac as refuseDivergentRecordRegionForDestroy, ad as getDefaultStateBucketName, ai as withStackRecords, al as hasMaskableValues, an as recordDisplacedSkips, ao as AWS_CREDENTIAL_ENV_KEYS, as as withRetry, au as hasUnverifiableParameterRefusal, b as hasPendingMovesOut, ba as readsNoEchoDeleteValues, bc as hasReadableOutputs, bd as MIGRATE_TMP_PREFIX, bi as red, bl as DYNAMIC_REFERENCE_TOKEN_SCAN, bn as makeSiblingClaimReader, bo as parameterTypeMayLoseSecretIdentity, bs as unreadableOrphanRecords, bu as stringifyValue, c as inheritedProvenanceForChildDiff, cc as malformedStateRefusalMessage, cd as resolveApp, ci as holdsSupersededResources, cl as printingCorpusOf, cn as withNestedRevertRun, co as envCredentialsAreAssumedRole, cr as demoteSupersededOrphans, cs as declaresNoEcho, cu as timePhase, d as conditionInputsFrom, da as CC_BROKEN_REASON, dc as refuseMalformedResourcesForExport, dd as resolveSkipPrefix, di as supersededHeldByOtherTypeWarning, dl as shareLogOnlyValues, dn as withNestedStackContext, do as producerRegionsFromState, dr as planFailedOps, ds as malformedOrphanRecordsRefusalMessage, du as CrossPrefixScanCache, ed as runDockerStreaming, ei as DEFAULT_RESOURCE_WARN_AFTER_MS, el as redactForState, en as displacedOpClause, eo as assertFlagRoleArn, er as updatePartialReason, eu as orphansAfterRollback, f as parentSuppliedValues, fa as ProviderRegistry, fc as refuseMalformedState, fd as resolveStateBucketWithDefault, fi as supersededHolderOf, fl as unionOfSecretBags, fn as deleteJournaledOrphans, fo as regionLessSecretName, fr as recheckFailedPlan, fs as malformedOrphanRecordsWarning, fu as applyCrossPrefixScan, g as isAbsoluteAssetPath, ga as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, gc as withheldAccountClause, gd as warnDeprecatedNoPrefixCliFlag, gi as bold, gl as maskSecretsInText, gn as journaledOrphanLines, gr as withPreviousPolicies, gs as refuseMalformedOrphanRecordsForDestroy, gu as stackInstanceIdOf, h as findNestedTemplateTreeDefect, ha as wouldReturnToSdkProvider, hc as accountArgs, hd as stateBucketExistenceConfirmed, hl as maskSecretsInError, hn as isHandledOrphan, hr as resolveReplacementOldType, hs as refuseMalformedOrphanRecords, hu as isNotImplemented, i as mergeNoChangeOutputs, ic as STATE_REGION_DIVERGED, id as synthesisStatusMessage, il as createUnionSecretMasker, in as nestedChildStackName$1, io as sendableAssumeRoleCommand, ir as withCreateTokenLedger, is as describeTypeWithThrottleRetry, iu as hasReasonlessBaselineRefusal, j as isProtectionValueActive, ja as UNSPECIFIED_SKIP_REASON, jd as StageLoadError, ji as namingSecretsWithRecordedNoEcho, jl as recordNestedStackParameterExpressions, jn as withMovedTo, jo as getAccountInfo, jr as withNameGenerationReached, js as refuseMalformedResourceEntriesForImportSave, ju as getBootstrapMarkerKey, k as recordedProtectionNote, ka as slowCcOperationTimeoutMs, kd as refuseFailedLookups, ki as journaledOrphanPrintingBag, kn as movedToHint, ko as recordedOutputReferenceRegions, kr as retiredNameGenerationsAfter, ks as refuseMalformedResourceEntriesForDestroy, ku as assertAssetBucketRegion, l as makeCanonicalizePropertiesFn, lc as refuseMalformedResourcesForDeploy, ld as resolveAutoAssetStorage, li as isSupersededResourceRecord, ll as recordLogOnlyParameterValue, ln as collectNestedChildUnaddressed, lo as classifyRecordedSecretRegion, lr as isJournaledOrphan, ls as deployRefusesOrphanRowsReason, lu as rebuildClientForBucketRegion, m as childTemplateLoader, ma as isCustomResource, mc as JSON_LISTING_HOLE_VALUE, md as resolveUseCdkBootstrapAssets, mi as withoutSuperseded, ml as errorCauseChain, mn as dropFailedHint, mr as replacementNeverSwapped, ms as previewableOrphanRecords, mu as isAccessDenied, n as isSecretBearingReferenceString, nc as refuseMalformedOutputsForDestroy, nd as getDockerImageBySourceHash, nn as dropSettledNestedJournals, no as explicitRoleArnOrThrow, nr as ledgerForStack, ns as prefetchCreateOnlyPropertyPaths, nu as shouldRetainResource, o as inRunStackKey, oc as malformedRenderedContainersWarning, od as getLegacyStateBucketName, ol as literalSplitDelimitersOf, oo as applyCallerIdentityCredentials, or as planRollback, os as parameterInputsFor, ou as PhaseClock, p as readRecordedConditionVerdicts, pa as ccBrokenReason, pc as repairMalformedResourcesForReadOnly, pd as resolveStateBucketWithDefaultAndSource, pi as supersededResourcesOf, pl as createSecretMasker, pn as dropFailedCommands, pr as recordUnderIdIsNotOwn, ps as malformedOrphanRowsKeptWarning, pu as crossPrefixDeniedWarning, qa as isAlwaysLiveAttribute, qd as injectedAwsRegionValue, qi as ccRoutedInstanceTakesNoSnapshot, ql as acceptedCreateOnlyDropsOf, qn as settleUnsettledPrevious, qo as MULTI_REGION_RECREATE_BLOCKED_TYPES, qr as isWholeDynamicReferenceValue, qs as refuseMalformedOrphansForDestroy, qu as partitionSensitiveEnv, r as keptWholeReasonText, rc as repairMalformedOutputsForReadOnly, rd as Synthesizer, ri as destroyStackRecordsView, rl as carryLogOnlyValues, ro as isIamRoleArn, rs as templateResourceTypes, ru as stackInstanceIdCarriedFrom, s as crossStackOutputProvenanceSource, sc as malformedResourcesWarning, sd as loadCdkJson, si as deleteSupersededEntry, sl as logOnlyValueCount, sn as revertedNestedRowIds, so as callerEnvCredentials, sr as seedsDeleteFirstGuard, su as renderPhaseTimings, t as DeployEngine, tc as refuseMalformedOutputs, td as AssetManifestLoader, ti as maskingRetryLogger, tn as displacedPhysicalIdShown, to as assertSendableRoleArn, tu as orphansCarriedFrom, u as conditionFingerprint, uc as refuseMalformedResourcesForDestroy, ud as resolveCaptureObservedState, ui as supersededAfterRollback, ul as recordLogOnlyValue, un as getCurrentNestedStackContext, uo as classifyReplaySecretRegion, ur as isReplacementOrphan, us as isReadableOrphanRecord, uu as CrossPrefixReadError, v as renderNestedTemplateTreeDefect, va as customResourceResponseExpirationWarning, vc as UNREADABLE_RESOURCES_MAP_ROW, vd as CFN_TEMPLATE_BODY_LIMIT, vi as gray, vl as withPhysicalNameCopies, vn as sameJournaledOrphans, vo as coerceParameterTypedValue, vs as repairMalformedOrphanRecordsForReadOnly, vu as AssetPublisher, w as deferredServiceTokenWarning, wd as decodeListingKey, wi as noEchoExactEchoLeavesOf, wl as pathCrossesDottedKey, wn as constructPathOf$1, wo as lacksRecordedTableArn, wr as orphanNeedsIdentity, ws as malformedResourceEntriesWarning, wu as loadPublishableAssetManifest, x as pendingMovesOutOf, xa as isCustomResourceType$1, xc as hasReadableResources, xd as findLargeInlineResources, xi as yellow, xl as dynamicReferenceTokens, xn as planOrphanAdoption, xo as AWS_NO_VALUE, xs as isReadableResourceEntry, xu as WorkGraph, y as templateIdentity, ya as TemplateNoEchoReresolver, yc as displayLogicalId, yd as CFN_TEMPLATE_URL_LIMIT, yi as green, yn as makeForeignHolderScan, yo as isUnboundTemplateParameter, ys as unpreviewableOrphanRecords, yu as isSensitiveAttributeName, zc as isMarkedCoordinate, zd as nullPrototypeRecord, zi as extractDeploymentEventError, zl as recordProvenPublicExpression, zn as parseMappingFile, zr as displayTextOrWithheld, zs as refuseMalformedResourcePropertiesForExport, zt as refactorMarkerMovesOf, zu as describeDockerCapturedOutput } from "./deploy-engine-9vVOF1h_.js";
|
|
4
|
+
import { $ as CdkdError, A as stripControlChars, B as retryClassificationText, Ct as setPasteableRunFlags, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, R as isRetryableTransientError, St as withheldTargetClause, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as AccountIdUnavailableError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ResourceTimeoutError, bt as shellBoundedDisplay, dt as SHELL_ACTIVE_WHY, et as DeployCancelledError, g as PartialFailureError, gt as pasteableCommand, h as NestedStackChildDirectDestroyError, ht as isInertUnquoted, i as credentialFingerprint, it as ProvisioningError, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as TIMEOUT_FLAG_RESOURCE_TYPE, n as ambientCredentialConfig, nt as LocalInvokeBuildError$1, o as formatError, ot as StateError, pt as commandHole, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, s as handleError, st as SynthesisError, t as ambientClientDefaults, u as LocalStartServiceError, v as StackHasActiveImportsError, vt as plainOrDescribed, wt as setPasteableVerbFlags, xt as shellQuote, y as StackTerminationProtectionError, yt as quotedOrDescribed, z as isTransientServerError } from "./ambient-client-defaults-CPmXchp0.js";
|
|
5
|
+
import { $t as forceQuitRecoveryClause, Dt as logicalIdShown, H as assertRegionMatch, M as VALUE_NOT_SHOWN, Qt as buildLockContentionMessage, U as isMarkedNotGone, V as RESOURCE_NOT_FOUND, Xt as UNREPRODUCIBLE_LOCK_CLAUSE, Zt as buildForceUnlockCommand, an as CUSTOM_RESOURCE_RESPONSE_PREFIX, bt as interruptWatchListenerCount, dn as setPasteableAwsProfile, en as formatLockExpiry, fn as withPasteableAwsProfile, kt as resourceTypeShown, ln as producerCoordinateKey, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mt as isAwsCliLiteral, nn as formatLockOwner, on as DEFAULT_STATE_PREFIX, p as IAM_PRINCIPAL_NAME, sn as injectiveKey, st as runDeleteAttempt, tn as formatLockOperation, un as producerRecordKey, vt as beginCommandInterruptScope, xt as isInterruptedWaitError, y as readRecordedPrincipals, yt as endCommandInterruptScope, z as remedyLogicalId } from "./update-removal-Bp0Y4QQ2.js";
|
|
6
|
+
import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-C8p6sQfr.js";
|
|
7
|
+
import { a as getPreAssumeEnvCredentials, f as runInStackAwsScope, i as getAssumedRoleCredentials, n as awsClientDefaults, o as setAssumedRoleCredentials, p as formatAuthority, s as setAwsEndpointOverrideSource } from "./aws-client-defaults-BayGUTJ4.js";
|
|
8
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-NwcD6PUe.js";
|
|
9
9
|
import { t as cdkdCacheHome } from "./cli.js";
|
|
10
10
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
11
11
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -30,11 +30,11 @@ import * as readline$1 from "node:readline/promises";
|
|
|
30
30
|
import readline from "node:readline/promises";
|
|
31
31
|
import { Document, Pair, Scalar, YAMLError, YAMLMap, YAMLSeq, isScalar, parse, parseDocument, stringify, visit } from "yaml";
|
|
32
32
|
import { emitKeypressEvents } from "node:readline";
|
|
33
|
-
import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, DynamicReferenceResolver, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addImageOverrideOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, canonicalizeImageOverrideKeys, classifySourceChange, containsDynamicReference, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, describeAwsFailureForWarn, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, enforceImageOverrideOrphans, filterRoutesByApiIdentifier, firstUsableRegion, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, keysNotFromTemplate, keysOverriddenBy, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseImageOverrideFlags, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, recordAssumedRole, resolveAgentCoreTarget, resolveDynamicReferencesInEnv, resolveEnvVars, resolveHostGatewayExtraHosts, resolveImageOverrides, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, runImageOverrideBuilds, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing, withoutKeys } from "cdk-local/internal";
|
|
33
|
+
import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, DynamicReferenceResolver, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, activateWorkloadAwsWiring, addAlbSpecificOptions, addAwsEndpointOptions, addCommonEcsServiceOptions, addImageOverrideOptions, addStartServiceSpecificOptions, albStrategy, applyWorkloadAwsWiringToEnv, architectureToPlatform, attachAuthorizers, attachLoopbackForwarder, attachStageContext, availableApiIdentifiers, awsEmulatorEnvName, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, canonicalizeImageOverrideKeys, classifySourceChange, containsDynamicReference, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, describeAwsFailureForWarn, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, effectiveLoopbackPorts, enforceImageOverrideOrphans, ensureForwarderImage, filterRoutesByApiIdentifier, firstUsableRegion, getActiveWorkloadAwsWiring, getActiveWorkloadAwsWiring as getActiveWorkloadAwsWiring$1, getAwsEndpointOverride, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, keysNotFromTemplate, keysOverriddenBy, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseImageOverrideFlags, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, recordAssumedRole, resolveAgentCoreTarget, resolveAwsEmulatorOption, resolveDynamicReferencesInEnv, resolveEnvVars, resolveHostDefaultCredentials, resolveHostGatewayExtraHosts, resolveImageOverrides, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, runImageOverrideBuilds, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing, withoutKeys } from "cdk-local/internal";
|
|
34
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
34
35
|
import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStartMicrovmCommand, createLocalStartWebFunctionCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
|
|
35
36
|
import { createServer } from "node:net";
|
|
36
37
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
37
|
-
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
38
38
|
import { WebSocketServer } from "ws";
|
|
39
39
|
|
|
40
40
|
// src/cli/commands/state-file-keys.ts
|
|
@@ -1857,7 +1857,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
1857
1857
|
// src/provisioning/register-providers.ts
|
|
1858
1858
|
let providerClasses;
|
|
1859
1859
|
function loadProviderClasses() {
|
|
1860
|
-
providerClasses ??= import("./provider-classes-
|
|
1860
|
+
providerClasses ??= import("./provider-classes-CHzimhh6.js");
|
|
1861
1861
|
return providerClasses;
|
|
1862
1862
|
}
|
|
1863
1863
|
function registerAllProviders(registry, classes) {
|
|
@@ -1921,6 +1921,7 @@ function registerAllProviders(registry, classes) {
|
|
|
1921
1921
|
registry.register("AWS::ApiGateway::Deployment", apigwProvider);
|
|
1922
1922
|
registry.register("AWS::ApiGateway::Stage", apigwProvider);
|
|
1923
1923
|
registry.register("AWS::ApiGateway::Method", apigwProvider);
|
|
1924
|
+
registry.register("AWS::ApiGateway::RestApi", apigwProvider);
|
|
1924
1925
|
const apigwV2Provider = new ApiGatewayV2Provider();
|
|
1925
1926
|
registry.register("AWS::ApiGatewayV2::Api", apigwV2Provider);
|
|
1926
1927
|
registry.register("AWS::ApiGatewayV2::Stage", apigwV2Provider);
|
|
@@ -9719,7 +9720,6 @@ function incompleteRemediationMessage(reports, mode) {
|
|
|
9719
9720
|
|
|
9720
9721
|
// src/analyzer/drift-cc-api-deny-list.ts
|
|
9721
9722
|
const CC_API_FALLBACK_DENY_LIST = {
|
|
9722
|
-
"AWS::ApiGateway::RestApi": "Body / BodyS3Location are write-only inputs not returned by CC API GetResource; cdkd state preserves them",
|
|
9723
9723
|
"AWS::CloudFormation::Stack": "cdkd deploys nested stacks itself: no CloudFormation stack exists, and the physicalId is a cdkd-local placeholder ARN",
|
|
9724
9724
|
"AWS::CloudWatch::AnomalyDetector": "the physicalId is a cdkd-derived metric descriptor, not the primaryIdentifier Cloud Control's GetResource requires",
|
|
9725
9725
|
"AWS::EMR::InstanceFleetConfig": "the physicalId is the bare fleet id, not the composite primaryIdentifier Cloud Control's GetResource requires",
|
|
@@ -21065,6 +21065,7 @@ async function runRollbackReplay(ctx) {
|
|
|
21065
21065
|
const segment = journal.segments[journal.segments.length - 1];
|
|
21066
21066
|
const completedSplit = splitImportedOps(segment.operations, segment, orphanLogicalIds);
|
|
21067
21067
|
const completedOps = completedSplit.replay;
|
|
21068
|
+
const cleanup = segmentCleanupOptions(completedOps.length > 0, supersededHost, baseState);
|
|
21068
21069
|
const displaced = [...completedSplit.displaced, ...splitImportedOps(segment.failedOperations ?? [], segment).displaced];
|
|
21069
21070
|
for (const op of displaced) logger.warn(displacedOpLabel(op, segment).trim());
|
|
21070
21071
|
recordDisplacedSkips(ctx.recordEvent, stackName, displaced);
|
|
@@ -21098,6 +21099,7 @@ async function runRollbackReplay(ctx) {
|
|
|
21098
21099
|
afterOp: saveState,
|
|
21099
21100
|
isInterrupted: () => interrupted,
|
|
21100
21101
|
emitEnvelope: completedOps.length === 0,
|
|
21102
|
+
...cleanup,
|
|
21101
21103
|
onOrphan: (record) => mintedOrphans.push(record),
|
|
21102
21104
|
onRolledBackCreate: (create) => rolledBackCreates.push(create),
|
|
21103
21105
|
inlinePolicyWriters
|
|
@@ -21133,8 +21135,7 @@ async function runRollbackReplay(ctx) {
|
|
|
21133
21135
|
onRolledBackCreate: (create) => rolledBackCreates.push(create),
|
|
21134
21136
|
inlinePolicyWriters,
|
|
21135
21137
|
failedOperations: failedForGuard,
|
|
21136
|
-
|
|
21137
|
-
onSupersededSettled: (entry) => removeSuperseded(supersededHost, entry)
|
|
21138
|
+
...cleanup
|
|
21138
21139
|
}));
|
|
21139
21140
|
return {
|
|
21140
21141
|
failures: replayResult.failures + failedOpFailures,
|
|
@@ -25105,6 +25106,137 @@ async function applyRoleArnForLocal(opts) {
|
|
|
25105
25106
|
});
|
|
25106
25107
|
}
|
|
25107
25108
|
|
|
25109
|
+
// src/cli/commands/local-profile-credentials-file.ts
|
|
25110
|
+
const CONTAINER_AWS_CREDENTIALS_PATH = "/cdkd-aws/credentials";
|
|
25111
|
+
async function writeProfileCredentialsFile(profileName, creds, opts) {
|
|
25112
|
+
if (profileName === "") throw new Error("writeProfileCredentialsFile: profile name must not be empty.");
|
|
25113
|
+
if (/[\r\n[\]]/.test(profileName)) throw new Error(`writeProfileCredentialsFile: profile name ${displayIdent(profileName)} contains a forbidden character (any of CR, LF, '[', ']' would corrupt the INI file or the docker -e env var).`);
|
|
25114
|
+
const dir = await mkdtemp(path.join(tmpdir(), "cdkd-profile-creds-"));
|
|
25115
|
+
const hostPath = path.join(dir, "credentials");
|
|
25116
|
+
opts?.onDirCreated?.(hostPath);
|
|
25117
|
+
const lines = [
|
|
25118
|
+
`[${profileName}]`,
|
|
25119
|
+
`aws_access_key_id = ${creds.accessKeyId}`,
|
|
25120
|
+
`aws_secret_access_key = ${creds.secretAccessKey}`
|
|
25121
|
+
];
|
|
25122
|
+
if (creds.sessionToken) lines.push(`aws_session_token = ${creds.sessionToken}`);
|
|
25123
|
+
try {
|
|
25124
|
+
await writeFile(hostPath, lines.join("\n") + "\n", { mode: 384 });
|
|
25125
|
+
} catch (err) {
|
|
25126
|
+
let removed = true;
|
|
25127
|
+
await rm(dir, {
|
|
25128
|
+
recursive: true,
|
|
25129
|
+
force: true
|
|
25130
|
+
}).catch(() => {
|
|
25131
|
+
removed = false;
|
|
25132
|
+
});
|
|
25133
|
+
if (removed) try {
|
|
25134
|
+
opts?.onDirRemoved?.(hostPath);
|
|
25135
|
+
} catch {}
|
|
25136
|
+
throw err;
|
|
25137
|
+
}
|
|
25138
|
+
return {
|
|
25139
|
+
hostPath,
|
|
25140
|
+
containerPath: CONTAINER_AWS_CREDENTIALS_PATH,
|
|
25141
|
+
profileName,
|
|
25142
|
+
dispose: async () => {
|
|
25143
|
+
await rm(dir, {
|
|
25144
|
+
recursive: true,
|
|
25145
|
+
force: true
|
|
25146
|
+
});
|
|
25147
|
+
}
|
|
25148
|
+
};
|
|
25149
|
+
}
|
|
25150
|
+
function strandedProfileCredentialsNotice(hostPath) {
|
|
25151
|
+
if (hostPath === void 0) return void 0;
|
|
25152
|
+
return `The AWS credentials file mounted into the containers is NOT removed: delete ${displayIdent(hostPath)} once you tear them down.`;
|
|
25153
|
+
}
|
|
25154
|
+
|
|
25155
|
+
// src/local/local-aws-wiring.ts
|
|
25156
|
+
async function activateLocalAwsWiring(options) {
|
|
25157
|
+
assertAwsEmulatorValue(options.awsEmulator);
|
|
25158
|
+
try {
|
|
25159
|
+
await activateWorkloadAwsWiring({
|
|
25160
|
+
awsEmulator: options.awsEmulator,
|
|
25161
|
+
caBundle: options.caBundle,
|
|
25162
|
+
profile: options.profile,
|
|
25163
|
+
pull: options.pull
|
|
25164
|
+
});
|
|
25165
|
+
} catch (err) {
|
|
25166
|
+
throw new CdkdError(err instanceof Error ? err.message : String(err), "LOCAL_AWS_WIRING_FAILED", err instanceof Error ? err : void 0);
|
|
25167
|
+
}
|
|
25168
|
+
}
|
|
25169
|
+
async function activateLocalAwsAndRoleArn(options) {
|
|
25170
|
+
await activateLocalAwsWiring(options);
|
|
25171
|
+
await applyRoleArnForLocal({
|
|
25172
|
+
roleArn: options.roleArn,
|
|
25173
|
+
region: options.region
|
|
25174
|
+
});
|
|
25175
|
+
}
|
|
25176
|
+
function assertAwsEmulatorValue(flag) {
|
|
25177
|
+
const value = resolveAwsEmulatorOption(flag);
|
|
25178
|
+
if (typeof value !== "string") return;
|
|
25179
|
+
const where = `--aws-emulator (or ${awsEmulatorEnvName()})`;
|
|
25180
|
+
let u;
|
|
25181
|
+
try {
|
|
25182
|
+
u = new URL(value);
|
|
25183
|
+
} catch {
|
|
25184
|
+
u = void 0;
|
|
25185
|
+
}
|
|
25186
|
+
if (u === void 0 ? /^[a-z][a-z0-9+.-]*:\/\/[^/?#]*@/i.test(value) || /[?#]/.test(value) : u.username !== "" || u.password !== "" || u.search !== "" || u.hash !== "") throw new CdkdError(`${where} must be a bare scheme://host:port URL; the value carries a user name, password, query or fragment, which is not shown here. Remove it.`, "LOCAL_AWS_WIRING_FAILED");
|
|
25187
|
+
if (u === void 0 || u.protocol !== "https:" && u.protocol !== "http:") throw new CdkdError(`${where} takes an http(s) URL such as https://127.0.0.1:9297, and the value given is not one. The URL is OPTIONAL, so a value right after the flag is taken as the URL: put --aws-emulator after the target, or write --aws-emulator=<url>.`, "LOCAL_AWS_WIRING_FAILED");
|
|
25188
|
+
}
|
|
25189
|
+
async function applyLocalAwsWiring(wiring, env, extraMounts, takenContainerPaths) {
|
|
25190
|
+
const defaults = wiring.mode === "forward" && !env["AWS_ACCESS_KEY_ID"] ? await resolveHostDefaultCredentials() : void 0;
|
|
25191
|
+
const wiredEnv = applyWorkloadAwsWiringToEnv(env, wiring, defaults);
|
|
25192
|
+
const mounts = extraMounts.filter((m) => wiring.mode !== "emulator" || m.containerPath !== "/cdkd-aws/credentials");
|
|
25193
|
+
const taken = /* @__PURE__ */ new Set([...takenContainerPaths, ...mounts.map((m) => m.containerPath)]);
|
|
25194
|
+
for (const m of wiring.mounts) if (!taken.has(m.containerPath)) mounts.push({
|
|
25195
|
+
...m,
|
|
25196
|
+
readOnly: true
|
|
25197
|
+
});
|
|
25198
|
+
return {
|
|
25199
|
+
env: wiredEnv,
|
|
25200
|
+
extraMounts: mounts
|
|
25201
|
+
};
|
|
25202
|
+
}
|
|
25203
|
+
function loopbackPortsFor(wiring, env, network) {
|
|
25204
|
+
return network === "host" ? [] : effectiveLoopbackPorts(env, wiring);
|
|
25205
|
+
}
|
|
25206
|
+
async function prepareLocalLoopbackForwarder(wiring) {
|
|
25207
|
+
try {
|
|
25208
|
+
await ensureForwarderImage();
|
|
25209
|
+
} catch (err) {
|
|
25210
|
+
if (wiring.mode === "emulator") throw new CdkdError(`--aws-emulator: the loopback forwarder image could not be pulled: ${err.message}`, "LOCAL_AWS_EMULATOR_FORWARDER_PULL_FAILED");
|
|
25211
|
+
}
|
|
25212
|
+
}
|
|
25213
|
+
async function attachLocalLoopbackForwarder(containerId, ports) {
|
|
25214
|
+
const wiring = getActiveWorkloadAwsWiring$1();
|
|
25215
|
+
if (!wiring) return;
|
|
25216
|
+
try {
|
|
25217
|
+
await (ports === void 0 ? attachLoopbackForwarder(containerId, wiring) : attachLoopbackForwarder(containerId, wiring, ports));
|
|
25218
|
+
} catch (err) {
|
|
25219
|
+
throw new CdkdError(err instanceof Error ? err.message : String(err), "LOCAL_AWS_EMULATOR_FORWARDER_FAILED", err instanceof Error ? err : void 0);
|
|
25220
|
+
}
|
|
25221
|
+
}
|
|
25222
|
+
async function profileCredentialsForWorkload(profile, resolve) {
|
|
25223
|
+
if (!profile || localAwsEmulatorActive()) return void 0;
|
|
25224
|
+
return resolve(profile);
|
|
25225
|
+
}
|
|
25226
|
+
function setContainerRegion(env, region) {
|
|
25227
|
+
if (!region) return;
|
|
25228
|
+
const folded = canonicalizeRegion(region);
|
|
25229
|
+
env["AWS_REGION"] = folded;
|
|
25230
|
+
env["AWS_DEFAULT_REGION"] = folded;
|
|
25231
|
+
}
|
|
25232
|
+
function localAwsEmulatorActive() {
|
|
25233
|
+
return getActiveWorkloadAwsWiring$1()?.mode === "emulator";
|
|
25234
|
+
}
|
|
25235
|
+
function localAwsEmulatorCredentials() {
|
|
25236
|
+
const wiring = getActiveWorkloadAwsWiring$1();
|
|
25237
|
+
return wiring?.mode === "emulator" ? wiring.emulatorCredentials : void 0;
|
|
25238
|
+
}
|
|
25239
|
+
|
|
25108
25240
|
// src/utils/local-aws-failure.ts
|
|
25109
25241
|
function describeLocalAwsFailureForWarn(err, operation) {
|
|
25110
25242
|
if (err instanceof CdkdError) return withoutTrailingPeriod(displaySafe(err.message));
|
|
@@ -25501,6 +25633,21 @@ async function pullImage(image, skipPull) {
|
|
|
25501
25633
|
}
|
|
25502
25634
|
}
|
|
25503
25635
|
async function runDetached(opts) {
|
|
25636
|
+
const wiring = getActiveWorkloadAwsWiring$1();
|
|
25637
|
+
if (!wiring) return runDetachedContainer(opts);
|
|
25638
|
+
const wired = await applyLocalAwsWiring(wiring, opts.env, opts.extraMounts ?? [], opts.mounts.map((m) => m.containerPath));
|
|
25639
|
+
const wiredOpts = {
|
|
25640
|
+
...opts,
|
|
25641
|
+
env: wired.env,
|
|
25642
|
+
extraMounts: wired.extraMounts
|
|
25643
|
+
};
|
|
25644
|
+
const ports = loopbackPortsFor(wiring, wired.env, opts.network);
|
|
25645
|
+
if (ports.length > 0) await prepareLocalLoopbackForwarder(wiring);
|
|
25646
|
+
const id = await runDetachedContainer(wiredOpts);
|
|
25647
|
+
await attachLocalLoopbackForwarder(id, ports);
|
|
25648
|
+
return id;
|
|
25649
|
+
}
|
|
25650
|
+
async function runDetachedContainer(opts) {
|
|
25504
25651
|
const args = [
|
|
25505
25652
|
"run",
|
|
25506
25653
|
"-d",
|
|
@@ -26129,52 +26276,6 @@ function singleFlight(fn, onError) {
|
|
|
26129
26276
|
};
|
|
26130
26277
|
}
|
|
26131
26278
|
|
|
26132
|
-
// src/cli/commands/local-profile-credentials-file.ts
|
|
26133
|
-
const CONTAINER_AWS_CREDENTIALS_PATH = "/cdkd-aws/credentials";
|
|
26134
|
-
async function writeProfileCredentialsFile(profileName, creds, opts) {
|
|
26135
|
-
if (profileName === "") throw new Error("writeProfileCredentialsFile: profile name must not be empty.");
|
|
26136
|
-
if (/[\r\n[\]]/.test(profileName)) throw new Error(`writeProfileCredentialsFile: profile name ${displayIdent(profileName)} contains a forbidden character (any of CR, LF, '[', ']' would corrupt the INI file or the docker -e env var).`);
|
|
26137
|
-
const dir = await mkdtemp(path.join(tmpdir(), "cdkd-profile-creds-"));
|
|
26138
|
-
const hostPath = path.join(dir, "credentials");
|
|
26139
|
-
opts?.onDirCreated?.(hostPath);
|
|
26140
|
-
const lines = [
|
|
26141
|
-
`[${profileName}]`,
|
|
26142
|
-
`aws_access_key_id = ${creds.accessKeyId}`,
|
|
26143
|
-
`aws_secret_access_key = ${creds.secretAccessKey}`
|
|
26144
|
-
];
|
|
26145
|
-
if (creds.sessionToken) lines.push(`aws_session_token = ${creds.sessionToken}`);
|
|
26146
|
-
try {
|
|
26147
|
-
await writeFile(hostPath, lines.join("\n") + "\n", { mode: 384 });
|
|
26148
|
-
} catch (err) {
|
|
26149
|
-
let removed = true;
|
|
26150
|
-
await rm(dir, {
|
|
26151
|
-
recursive: true,
|
|
26152
|
-
force: true
|
|
26153
|
-
}).catch(() => {
|
|
26154
|
-
removed = false;
|
|
26155
|
-
});
|
|
26156
|
-
if (removed) try {
|
|
26157
|
-
opts?.onDirRemoved?.(hostPath);
|
|
26158
|
-
} catch {}
|
|
26159
|
-
throw err;
|
|
26160
|
-
}
|
|
26161
|
-
return {
|
|
26162
|
-
hostPath,
|
|
26163
|
-
containerPath: CONTAINER_AWS_CREDENTIALS_PATH,
|
|
26164
|
-
profileName,
|
|
26165
|
-
dispose: async () => {
|
|
26166
|
-
await rm(dir, {
|
|
26167
|
-
recursive: true,
|
|
26168
|
-
force: true
|
|
26169
|
-
});
|
|
26170
|
-
}
|
|
26171
|
-
};
|
|
26172
|
-
}
|
|
26173
|
-
function strandedProfileCredentialsNotice(hostPath) {
|
|
26174
|
-
if (hostPath === void 0) return void 0;
|
|
26175
|
-
return `The AWS credentials file mounted into the containers is NOT removed: delete ${displayIdent(hostPath)} once you tear them down.`;
|
|
26176
|
-
}
|
|
26177
|
-
|
|
26178
26279
|
// src/local/websocket-body.ts
|
|
26179
26280
|
function bufferToBody$1(raw, isBinary) {
|
|
26180
26281
|
return bufferToBody(raw, isBinary);
|
|
@@ -28101,9 +28202,11 @@ async function buildContainerSpec(args) {
|
|
|
28101
28202
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
28102
28203
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
28103
28204
|
dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
|
|
28104
|
-
|
|
28205
|
+
setContainerRegion(dockerEnv, stsRegion);
|
|
28105
28206
|
} else {
|
|
28106
28207
|
forwardAwsEnv$2(dockerEnv);
|
|
28208
|
+
const containerRegion = firstUsableRegion(stsRegion, lambda.stack.region);
|
|
28209
|
+
setContainerRegion(dockerEnv, containerRegion);
|
|
28107
28210
|
if (profileCredentials) {
|
|
28108
28211
|
dockerEnv["AWS_ACCESS_KEY_ID"] = profileCredentials.accessKeyId;
|
|
28109
28212
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = profileCredentials.secretAccessKey;
|
|
@@ -29177,10 +29280,7 @@ async function localStartApiCommand(target, options) {
|
|
|
29177
29280
|
}
|
|
29178
29281
|
warnIfDeprecatedRegion(options);
|
|
29179
29282
|
if (options.layerRoleArn !== void 0) explicitRoleArnOrThrow("--layer-role-arn", options.layerRoleArn);
|
|
29180
|
-
await
|
|
29181
|
-
roleArn: options.roleArn,
|
|
29182
|
-
region: options.region
|
|
29183
|
-
});
|
|
29283
|
+
await activateLocalAwsAndRoleArn(options);
|
|
29184
29284
|
const normalizedAssumeRole = normalizeStartApiAssumeRole(options.assumeRole, options.assumeRoleAuto ?? false);
|
|
29185
29285
|
if (normalizedAssumeRole === void 0) delete options.assumeRole;
|
|
29186
29286
|
else options.assumeRole = normalizedAssumeRole;
|
|
@@ -29247,7 +29347,7 @@ async function localStartApiCommand(target, options) {
|
|
|
29247
29347
|
});
|
|
29248
29348
|
const corsConfigByStack = buildCorsConfigByStack(targetStacks);
|
|
29249
29349
|
const stateByStack = options.fromState || isCfnFlagPresent(options) ? await loadStateForRoutedStacks(targetStacks, routes, routesWithAuth, options) : /* @__PURE__ */ new Map();
|
|
29250
|
-
const profileCredentials =
|
|
29350
|
+
const profileCredentials = await profileCredentialsForWorkload(options.profile, resolveProfileCredentials);
|
|
29251
29351
|
if (options.profile && profileCredentials && !profileCredsFile) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials, {
|
|
29252
29352
|
onDirCreated: (hostPath) => {
|
|
29253
29353
|
credsHostPath = hostPath;
|
|
@@ -29460,6 +29560,7 @@ function createLocalStartApiCommand() {
|
|
|
29460
29560
|
...stateOptions
|
|
29461
29561
|
].forEach((opt) => startApi.addOption(opt));
|
|
29462
29562
|
startApi.addOption(deprecatedRegionOption);
|
|
29563
|
+
addAwsEndpointOptions(startApi);
|
|
29463
29564
|
return startApi;
|
|
29464
29565
|
}
|
|
29465
29566
|
|
|
@@ -30028,7 +30129,10 @@ function buildDockerRunArgs(opts) {
|
|
|
30028
30129
|
const hostPort = pm.hostPort ?? pm.containerPort;
|
|
30029
30130
|
args.push("-p", `${containerHost}:${hostPort}:${pm.containerPort}/${pm.protocol}`);
|
|
30030
30131
|
}
|
|
30031
|
-
|
|
30132
|
+
const wiring = getActiveWorkloadAwsWiring();
|
|
30133
|
+
const profileCredentialsFile = wiring?.mode === "emulator" ? void 0 : opts.profileCredentialsFile;
|
|
30134
|
+
if (profileCredentialsFile) args.push("-v", `${profileCredentialsFile.hostPath}:${profileCredentialsFile.containerPath}:ro`);
|
|
30135
|
+
for (const m of wiring?.mounts ?? []) if (!container.mountPoints.some((mp) => mp.containerPath === m.containerPath)) args.push("-v", `${m.hostPath}:${m.containerPath}:ro`);
|
|
30032
30136
|
for (const mp of container.mountPoints) {
|
|
30033
30137
|
const v = volumeByName.get(mp.sourceVolume);
|
|
30034
30138
|
if (!v) continue;
|
|
@@ -30043,7 +30147,7 @@ function buildDockerRunArgs(opts) {
|
|
|
30043
30147
|
args.push("-v", `${name}:${mp.containerPath}${ro}`);
|
|
30044
30148
|
}
|
|
30045
30149
|
}
|
|
30046
|
-
|
|
30150
|
+
let finalEnv = {};
|
|
30047
30151
|
const metaEnv = buildMetadataEnv({
|
|
30048
30152
|
containerName: container.name,
|
|
30049
30153
|
...roleArn !== void 0 && { roleArn },
|
|
@@ -30051,10 +30155,11 @@ function buildDockerRunArgs(opts) {
|
|
|
30051
30155
|
...opts.sidecarIp !== void 0 && { sidecarIp: opts.sidecarIp }
|
|
30052
30156
|
});
|
|
30053
30157
|
Object.assign(finalEnv, metaEnv);
|
|
30054
|
-
if (
|
|
30055
|
-
finalEnv["AWS_SHARED_CREDENTIALS_FILE"] =
|
|
30056
|
-
finalEnv["AWS_PROFILE"] =
|
|
30158
|
+
if (profileCredentialsFile) {
|
|
30159
|
+
finalEnv["AWS_SHARED_CREDENTIALS_FILE"] = profileCredentialsFile.containerPath;
|
|
30160
|
+
finalEnv["AWS_PROFILE"] = profileCredentialsFile.profileName;
|
|
30057
30161
|
}
|
|
30162
|
+
if (wiring?.mode === "forward") for (const [k, v] of Object.entries(wiring.env)) defineOwnKey(finalEnv, k, v);
|
|
30058
30163
|
for (const [k, v] of Object.entries(container.environment)) defineOwnKey(finalEnv, k, v);
|
|
30059
30164
|
for (const s of secrets) defineOwnKey(finalEnv, s.name, s.value);
|
|
30060
30165
|
const overrides = opts.envOverrides;
|
|
@@ -30062,6 +30167,10 @@ function buildDockerRunArgs(opts) {
|
|
|
30062
30167
|
applyOverrideMap(finalEnv, overrides["Parameters"]);
|
|
30063
30168
|
applyOverrideMap(finalEnv, overrides[container.name]);
|
|
30064
30169
|
}
|
|
30170
|
+
if (wiring) finalEnv = applyWorkloadAwsWiringToEnv(finalEnv, wiring.mode === "emulator" ? wiring : {
|
|
30171
|
+
...wiring,
|
|
30172
|
+
env: {}
|
|
30173
|
+
});
|
|
30065
30174
|
const sensitiveKeys = /* @__PURE__ */ new Set([
|
|
30066
30175
|
...SENSITIVE_ENV_KEYS,
|
|
30067
30176
|
...secrets.map((s) => s.name),
|
|
@@ -30094,7 +30203,8 @@ function buildDockerRunArgs(opts) {
|
|
|
30094
30203
|
args,
|
|
30095
30204
|
dockerName,
|
|
30096
30205
|
sensitiveEnv,
|
|
30097
|
-
collisions
|
|
30206
|
+
collisions,
|
|
30207
|
+
loopbackPorts: wiring ? effectiveLoopbackPorts(finalEnv, wiring) : []
|
|
30098
30208
|
};
|
|
30099
30209
|
}
|
|
30100
30210
|
function applyOverrideMap(acc, map) {
|
|
@@ -30322,6 +30432,7 @@ async function runEcsTask(task, options, state) {
|
|
|
30322
30432
|
if (state.closing) throw interruptedError();
|
|
30323
30433
|
const mergedAddHostFlags = mergeHostGatewayAddHostFlags(options.addHostFlags, options.hostGatewayExtraHosts);
|
|
30324
30434
|
const dockerCmds = /* @__PURE__ */ new Map();
|
|
30435
|
+
const dockerLoopbackPorts = /* @__PURE__ */ new Map();
|
|
30325
30436
|
const dockerNames = /* @__PURE__ */ new Map();
|
|
30326
30437
|
const dockerEnvs = /* @__PURE__ */ new Map();
|
|
30327
30438
|
for (const container of task.containers) {
|
|
@@ -30351,6 +30462,7 @@ async function runEcsTask(task, options, state) {
|
|
|
30351
30462
|
...options.profileCredentialsFile && { profileCredentialsFile: options.profileCredentialsFile }
|
|
30352
30463
|
});
|
|
30353
30464
|
dockerCmds.set(container.name, built.args);
|
|
30465
|
+
dockerLoopbackPorts.set(container.name, built.loopbackPorts);
|
|
30354
30466
|
dockerNames.set(container.name, built.dockerName);
|
|
30355
30467
|
dockerEnvs.set(container.name, built.sensitiveEnv);
|
|
30356
30468
|
if (built.collisions.length > 0) logger.warn(`Container '${container.name}': secret(s) ${built.collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack that client; a malformed name cannot form a valid environment variable). Rename the secret if the container needs it.`);
|
|
@@ -30362,6 +30474,9 @@ async function runEcsTask(task, options, state) {
|
|
|
30362
30474
|
if (state.closing) throw interruptedError();
|
|
30363
30475
|
const args = dockerCmds.get(container.name);
|
|
30364
30476
|
const dockerName = dockerNames.get(container.name);
|
|
30477
|
+
const loopbackPorts = dockerLoopbackPorts.get(container.name) ?? [];
|
|
30478
|
+
const forwarderWiring = getActiveWorkloadAwsWiring$1();
|
|
30479
|
+
if (loopbackPorts.length > 0 && forwarderWiring) await prepareLocalLoopbackForwarder(forwarderWiring);
|
|
30365
30480
|
logger.info(`Starting container '${container.name}' (image=${imagePlan.get(container.name)})`);
|
|
30366
30481
|
const sensitiveEnv = dockerEnvs.get(container.name);
|
|
30367
30482
|
warnFinchArgvExposure(Object.keys(sensitiveEnv));
|
|
@@ -30390,6 +30505,7 @@ async function runEcsTask(task, options, state) {
|
|
|
30390
30505
|
id,
|
|
30391
30506
|
container
|
|
30392
30507
|
});
|
|
30508
|
+
if (loopbackPorts.length > 0) await attachLocalLoopbackForwarder(id, loopbackPorts);
|
|
30393
30509
|
if (!options.detach) state.logStreams.push({
|
|
30394
30510
|
containerId: id,
|
|
30395
30511
|
stream: streamContainerLogs(container.name, id)
|
|
@@ -30596,12 +30712,16 @@ function readEnvOverridesFile$2(filePath) {
|
|
|
30596
30712
|
|
|
30597
30713
|
// src/cli/commands/local-run-task/credentials.ts
|
|
30598
30714
|
async function resolveSidecarCredentials(options, assumedCredentials) {
|
|
30715
|
+
const wiring = getActiveWorkloadAwsWiring();
|
|
30716
|
+
if (wiring?.mode === "emulator") return wiring.emulatorCredentials;
|
|
30599
30717
|
if (assumedCredentials) return assumedCredentials;
|
|
30600
30718
|
if (options.profile) return resolveProfileCredentials(options.profile);
|
|
30719
|
+
return resolveHostDefaultCredentials();
|
|
30601
30720
|
}
|
|
30602
30721
|
async function resolveTaskCredentialChannels(options, assumedCredentials, opts) {
|
|
30603
30722
|
const sidecarCredentials = await resolveSidecarCredentials(options, assumedCredentials);
|
|
30604
|
-
|
|
30723
|
+
const emulator = getActiveWorkloadAwsWiring()?.mode === "emulator";
|
|
30724
|
+
if (options.profile && sidecarCredentials && !assumedCredentials && !emulator) return {
|
|
30605
30725
|
sidecarCredentials,
|
|
30606
30726
|
profileCredsFile: await writeProfileCredentialsFile(options.profile, sidecarCredentials, opts)
|
|
30607
30727
|
};
|
|
@@ -30735,10 +30855,7 @@ async function localRunTaskCommand(target, options) {
|
|
|
30735
30855
|
try {
|
|
30736
30856
|
if (typeof options.assumeTaskRole === "string") assertFlagRoleArn("--assume-task-role", options.assumeTaskRole);
|
|
30737
30857
|
if (options.ecrRoleArn !== void 0) assertFlagRoleArn("--ecr-role-arn", options.ecrRoleArn);
|
|
30738
|
-
await
|
|
30739
|
-
roleArn: options.roleArn,
|
|
30740
|
-
region: options.region
|
|
30741
|
-
});
|
|
30858
|
+
await activateLocalAwsAndRoleArn(options);
|
|
30742
30859
|
await ensureDockerAvailable();
|
|
30743
30860
|
const appCmd = resolveApp(options.app);
|
|
30744
30861
|
if (!appCmd) throw new Error("No CDK app specified. Pass --app, set CDKD_APP, or add \"app\" to cdk.json.");
|
|
@@ -30872,6 +30989,7 @@ function createLocalRunTaskCommand() {
|
|
|
30872
30989
|
...stateOptions
|
|
30873
30990
|
].forEach((opt) => cmd.addOption(opt));
|
|
30874
30991
|
cmd.addOption(deprecatedRegionOption);
|
|
30992
|
+
addAwsEndpointOptions(cmd);
|
|
30875
30993
|
return cmd;
|
|
30876
30994
|
}
|
|
30877
30995
|
|
|
@@ -31089,6 +31207,7 @@ async function softReloadAgentContainer(containerId, newAssetSourceDir) {
|
|
|
31089
31207
|
} catch (err) {
|
|
31090
31208
|
throw new CdkdError(`softReloadAgentContainer: docker restart of '${containerId}' failed: ${describeDockerExecFailure(err, restartArgs)}.`, "LOCAL_INVOKE_AGENTCORE_WATCH_SOFT_RELOAD_RESTART_FAILED");
|
|
31091
31209
|
}
|
|
31210
|
+
await attachLocalLoopbackForwarder(containerId);
|
|
31092
31211
|
}
|
|
31093
31212
|
async function loadAgentCoreAssetContext(args) {
|
|
31094
31213
|
const { resolvedTarget, resolved, stacks, cdkOutDir, assetLoader, oldAssetHash } = args;
|
|
@@ -31326,7 +31445,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
31326
31445
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
31327
31446
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
31328
31447
|
dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
|
|
31329
|
-
|
|
31448
|
+
setContainerRegion(dockerEnv, stsRegion);
|
|
31330
31449
|
assumeSucceeded = true;
|
|
31331
31450
|
} catch (err) {
|
|
31332
31451
|
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${describeLocalAwsFailureForWarn(err, "STS AssumeRole")}. Falling back to the developer's shell credentials.`);
|
|
@@ -31334,6 +31453,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
31334
31453
|
}
|
|
31335
31454
|
if (!assumeSucceeded) {
|
|
31336
31455
|
forwardAwsEnv$1(dockerEnv);
|
|
31456
|
+
setContainerRegion(dockerEnv, canonicalizeRegion(args.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"]));
|
|
31337
31457
|
applyProfileCredentialsOverlay(dockerEnv, args.profileCredentials, false);
|
|
31338
31458
|
if (args.profileCredsFile) {
|
|
31339
31459
|
dockerEnv["AWS_SHARED_CREDENTIALS_FILE"] = args.profileCredsFile.containerPath;
|
|
@@ -31781,6 +31901,12 @@ function sigv4NoCredentialsRefusal(args) {
|
|
|
31781
31901
|
}
|
|
31782
31902
|
async function resolveHostCredentialsForSigV4(options, resolved, loaded, region) {
|
|
31783
31903
|
const logger = getLogger();
|
|
31904
|
+
const emulatorKeys = localAwsEmulatorCredentials();
|
|
31905
|
+
if (emulatorKeys) return {
|
|
31906
|
+
accessKeyId: emulatorKeys.accessKeyId,
|
|
31907
|
+
secretAccessKey: emulatorKeys.secretAccessKey,
|
|
31908
|
+
...emulatorKeys.sessionToken && { sessionToken: emulatorKeys.sessionToken }
|
|
31909
|
+
};
|
|
31784
31910
|
const assumeRoleArn = resolveAssumeRoleArn(options, resolved, loaded);
|
|
31785
31911
|
if (assumeRoleArn) try {
|
|
31786
31912
|
return await assumeAgentCoreExecutionRole(assumeRoleArn, region);
|
|
@@ -31898,12 +32024,9 @@ async function localInvokeAgentCoreCommand(target, options) {
|
|
|
31898
32024
|
try {
|
|
31899
32025
|
if (typeof options.assumeRole === "string") explicitRoleArnOrThrow("--assume-role", options.assumeRole, (message) => new CdkdError(message, "LOCAL_INVOKE_AGENTCORE_ASSUME_ROLE_INVALID"));
|
|
31900
32026
|
if (options.ecrRoleArn !== void 0) assertFlagRoleArn("--ecr-role-arn", options.ecrRoleArn, (message) => new CdkdError(message, "LOCAL_INVOKE_AGENTCORE_ECR_ROLE_ARN_INVALID"));
|
|
31901
|
-
await
|
|
31902
|
-
roleArn: options.roleArn,
|
|
31903
|
-
region: options.region
|
|
31904
|
-
});
|
|
32027
|
+
await activateLocalAwsAndRoleArn(options);
|
|
31905
32028
|
await ensureDockerAvailable();
|
|
31906
|
-
const profileCredentials =
|
|
32029
|
+
const profileCredentials = await profileCredentialsForWorkload(options.profile, resolveProfileCredentials);
|
|
31907
32030
|
if (options.profile && profileCredentials) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials);
|
|
31908
32031
|
const appCmd = resolveApp(options.app);
|
|
31909
32032
|
if (!appCmd) throw new CdkdError(`No CDK app specified. Pass --app, set ${getEmbedConfig().envPrefix}_APP, or add "app" to cdk.json.`, "LOCAL_INVOKE_AGENTCORE_NO_APP");
|
|
@@ -32142,6 +32265,7 @@ function createLocalInvokeAgentCoreCommand() {
|
|
|
32142
32265
|
...stateOptions
|
|
32143
32266
|
].forEach((opt) => cmd.addOption(opt));
|
|
32144
32267
|
cmd.addOption(deprecatedRegionOption);
|
|
32268
|
+
addAwsEndpointOptions(cmd);
|
|
32145
32269
|
return cmd;
|
|
32146
32270
|
}
|
|
32147
32271
|
|
|
@@ -32220,7 +32344,7 @@ async function applyLambdaCredentialEnv(dockerEnv, args) {
|
|
|
32220
32344
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
32221
32345
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
32222
32346
|
dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
|
|
32223
|
-
|
|
32347
|
+
setContainerRegion(dockerEnv, stsRegion);
|
|
32224
32348
|
assumeSucceeded = true;
|
|
32225
32349
|
} catch (err) {
|
|
32226
32350
|
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${describeLocalAwsFailureForWarn(err, "STS AssumeRole")}. Falling back to the developer's shell credentials.`);
|
|
@@ -32233,6 +32357,8 @@ async function applyLambdaCredentialEnv(dockerEnv, args) {
|
|
|
32233
32357
|
dockerEnv["AWS_SHARED_CREDENTIALS_FILE"] = args.profileCredsFile.containerPath;
|
|
32234
32358
|
dockerEnv["AWS_PROFILE"] = args.profileCredsFile.profileName;
|
|
32235
32359
|
}
|
|
32360
|
+
const containerRegion = firstUsableRegion(args.region, process.env["AWS_REGION"], process.env["AWS_DEFAULT_REGION"], args.stackRegion);
|
|
32361
|
+
setContainerRegion(dockerEnv, containerRegion);
|
|
32236
32362
|
}
|
|
32237
32363
|
}
|
|
32238
32364
|
async function assumeLambdaExecutionRole(roleArn, region) {
|
|
@@ -32648,12 +32774,9 @@ async function localInvokeCommand(target, options) {
|
|
|
32648
32774
|
if (typeof options.assumeRole === "string") explicitRoleArnOrThrow("--assume-role", options.assumeRole);
|
|
32649
32775
|
if (options.layerRoleArn !== void 0) explicitRoleArnOrThrow("--layer-role-arn", options.layerRoleArn);
|
|
32650
32776
|
if (options.ecrRoleArn !== void 0) assertFlagRoleArn("--ecr-role-arn", options.ecrRoleArn);
|
|
32651
|
-
await
|
|
32652
|
-
roleArn: options.roleArn,
|
|
32653
|
-
region: options.region
|
|
32654
|
-
});
|
|
32777
|
+
await activateLocalAwsAndRoleArn(options);
|
|
32655
32778
|
await ensureDockerAvailable();
|
|
32656
|
-
const profileCredentials =
|
|
32779
|
+
const profileCredentials = await profileCredentialsForWorkload(options.profile, resolveProfileCredentials);
|
|
32657
32780
|
if (options.profile && profileCredentials) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials);
|
|
32658
32781
|
const appCmd = resolveApp(options.app);
|
|
32659
32782
|
if (!appCmd) throw new Error("No CDK app specified. Pass --app, set CDKD_APP, or add \"app\" to cdk.json.");
|
|
@@ -32696,6 +32819,7 @@ async function localInvokeCommand(target, options) {
|
|
|
32696
32819
|
await applyLambdaCredentialEnv(dockerEnv, {
|
|
32697
32820
|
...resolvedAssumeRoleArn && { assumeRoleArn: resolvedAssumeRoleArn },
|
|
32698
32821
|
...options.region !== void 0 && { region: options.region },
|
|
32822
|
+
...lambda.stack.region !== void 0 && { stackRegion: lambda.stack.region },
|
|
32699
32823
|
...profileCredentials && { profileCredentials },
|
|
32700
32824
|
...profileCredsFile && { profileCredsFile }
|
|
32701
32825
|
});
|
|
@@ -32905,7 +33029,15 @@ const CDKD_EMBED_CONFIG = {
|
|
|
32905
33029
|
};
|
|
32906
33030
|
function createLocalCommand() {
|
|
32907
33031
|
setEmbedConfig(CDKD_EMBED_CONFIG);
|
|
33032
|
+
setAwsEndpointOverrideSource(getAwsEndpointOverride);
|
|
32908
33033
|
const local = new Command("local").description("Local execution of Lambda functions (RIE) and ECS task definitions (Docker required)");
|
|
33034
|
+
local.hook("preAction", (_local, action) => {
|
|
33035
|
+
try {
|
|
33036
|
+
assertAwsEmulatorValue(action.opts()["awsEmulator"]);
|
|
33037
|
+
} catch (err) {
|
|
33038
|
+
handleError(err);
|
|
33039
|
+
}
|
|
33040
|
+
});
|
|
32909
33041
|
const invoke = new Command("invoke").description("Run a Lambda function locally in a Docker container (RIE-backed). Target accepts a CDK display path (MyStack/MyApi/Handler) or stack-qualified logical ID (MyStack:MyApiHandler1234ABCD). Single-stack apps may omit the stack prefix.").argument("<target>", "CDK display path or stack-qualified logical ID of the Lambda to invoke").addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}})")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for IMAGE local-build path; `docker build` does not pull base layers by default")).addOption(new Option("--no-build", "Skip docker build on the IMAGE local-build path (use the previously-built tag). Requires the deterministic tag to already be in the local registry; errors with an actionable message when missing. No-op for ZIP Lambdas and the IMAGE ECR-pull path. Compatible with --no-pull.")).addOption(new Option("--debug-port <port>", "Node --inspect-brk port (default: off)")).addOption(new Option("--container-host <host>", "Host to bind the RIE port to").default("127.0.0.1")).addOption(new Option("--assume-role [arn]", "Assume the Lambda's deployed execution role and forward STS-issued temp credentials to the container so the handler runs with the deployed function's narrow permissions (closes the \"developer admin / function narrow\" skew). Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) auto-resolves the function's execution role ARN from cdkd state (requires --from-state); (3) `--no-assume-role` explicitly opts out (forces dev creds even with --from-state). Off by default — when omitted, the developer's shell credentials are forwarded unchanged (SAM-compatible default). STS failures degrade to a warn + dev-creds fallback.")).addOption(new Option("--no-assume-role", "Explicitly opt out of assuming the deployed execution role: forward your ambient AWS credentials (or the --profile overlay) even when --from-state is set, and suppress the \"run with --assume-role\" hint. Distinct from omitting the flag, which still prints that hint.")).addOption(new Option("--layer-role-arn <arn>", "Role to sts:AssumeRole before calling lambda:GetLayerVersion on every literal-ARN entry in Properties.Layers. Use only when the dev credentials cannot read the layer — typically cross-account layers. AWS-published public layers (e.g. Lambda Powertools) are readable from every account and need no role.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Issues sts:AssumeRole via the default credential chain and uses the temporary credentials for ecr:GetAuthorizationToken + docker pull. Required when the caller does not have direct cross-account access to the target repository. A same-account pull in ANY region does not need this flag: the ECR client is built for the image URI's own region, so crossing a region costs nothing extra.")).addOption(new Option("--from-state", "Read cdkd S3 state for the target stack and substitute Ref / Fn::GetAtt / Fn::Sub in env vars with the deployed physical IDs / attributes. Off by default — keep PR 1 warn-and-drop semantics; turn on for stacks already deployed via cdkd deploy.").default(false)).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the cdkd stack name; pass an explicit value when CFn stack name differs. Mutually exclusive with --from-state. Fn::GetAtt is warn-and-dropped in v1 (CFn ListStackResources does not return per-attribute values).")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-state when the same stack name has state in multiple regions, and with --from-cfn-stack as the CFn client region (cdkd does not have a separate --cfn-stack-region flag).").argParser(parseStackRegion)).action(withErrorHandling(localInvokeCommand));
|
|
32910
33042
|
[
|
|
32911
33043
|
...commonOptions,
|
|
@@ -32914,6 +33046,7 @@ function createLocalCommand() {
|
|
|
32914
33046
|
...stateOptions
|
|
32915
33047
|
].forEach((opt) => invoke.addOption(opt));
|
|
32916
33048
|
invoke.addOption(deprecatedRegionOption);
|
|
33049
|
+
addAwsEndpointOptions(invoke);
|
|
32917
33050
|
local.addCommand(invoke);
|
|
32918
33051
|
local.addCommand(createLocalStartApiCommand());
|
|
32919
33052
|
local.addCommand(createLocalRunTaskCommand());
|
|
@@ -32983,4 +33116,4 @@ function collectVerbFlags(program) {
|
|
|
32983
33116
|
}
|
|
32984
33117
|
|
|
32985
33118
|
export { resolveSecretDerivedPrincipals as a, buildProgram, isResolvableSecretPrincipalList as i, runDestroyForStack as n, canonicalizeIpProtocolValue as o, holdsUnprovenSecretPrincipalToken as r, canonicalizeIpv4Cidr as t };
|
|
32986
|
-
//# sourceMappingURL=program-
|
|
33119
|
+
//# sourceMappingURL=program-DP4g5uS3.js.map
|