@go-to-k/cdkd 0.291.0 → 0.291.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-kDWCn_Jq.js";
2
+ import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-DREZx_Q6.js";
3
3
 
4
4
  //#region src/cli/pipe-close-handler.ts
5
5
  /**
@@ -74,7 +74,7 @@ async function main() {
74
74
  console.log(getCdkdVersion());
75
75
  return;
76
76
  }
77
- const { buildProgram } = await import("./program-Cs7N6T4j.js");
77
+ const { buildProgram } = await import("./program-B2qAWvE2.js");
78
78
  const program = buildProgram();
79
79
  const args = reorderArgs(process.argv);
80
80
  await program.parseAsync(args);
@@ -1,6 +1,6 @@
1
1
  import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, d as applyDefaultNameForFallback, f as explicitNamePropertyFor, g as looksLikeCdkdGeneratedName, h as getCurrentStackName, m as generateResourceNameWithFallback, n as getLogger, p as generateResourceName, r as isStdoutReservedForPayload, s as getLiveRenderer, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS, y as withoutGeneratedFallbackName } from "./logger-GASr9bAF.js";
2
2
  import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BoIxyCir.js";
3
- import { t as getCdkdVersion } from "./version-kDWCn_Jq.js";
3
+ import { t as getCdkdVersion } from "./version-DREZx_Q6.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { createHash, randomUUID } from "node:crypto";
6
6
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -7180,8 +7180,17 @@ function warnAbsoluteAssetPath(w) {
7180
7180
  * an accidental or legacy `..` and costs nothing, which is why it stays — but
7181
7181
  * it is no longer a boundary against anyone who chose the value. The docs say
7182
7182
  * this to users in the same words; do not soften either copy.
7183
+ *
7184
+ * **The leading positionals stay, and that is not an unfinished half of
7185
+ * [#3544](https://github.com/go-to-k/cdkd/issues/3544).** The Docker twin took
7186
+ * every parameter into its bag because `(manifestDir, directory)` were two
7187
+ * adjacent `string`s and swapping them compiled. Here the second parameter is
7188
+ * a `FileAsset`, so the same swap is a type error already. The invariant is
7189
+ * "no transposable adjacent same-typed pair", not "both twins look alike" —
7190
+ * converting this one buys nothing and costs every call site.
7183
7191
  */
7184
- function resolveFileAssetSourcePath(manifestDir, asset, assetOutdir, sink) {
7192
+ function resolveFileAssetSourcePath(manifestDir, asset, opts) {
7193
+ const { assetOutdir, sink } = opts;
7185
7194
  if (isAbsolute$1(asset.source.path)) {
7186
7195
  const absolute = resolve$1(asset.source.path);
7187
7196
  const escape = absoluteAssemblyPathEscape(assetOutdir, absolute);
@@ -7295,14 +7304,14 @@ var AssetManifestLoader = class {
7295
7304
  *
7296
7305
  * @param cdkOutputDir CDK output directory
7297
7306
  * @param asset File asset
7298
- * @param assetOutdir The app's outdir — the containment / warning bound.
7299
- * REQUIRED for the reason {@link resolveFileAssetSourcePath}'s own
7300
- * parameter is: a dropped bound narrows to the manifest directory and
7301
- * silently refuses every Stage asset.
7307
+ * @param opts The app's outdir and the sink clause; see
7308
+ * {@link FileAssetResolveOptions}. A bag rather than positionals because
7309
+ * both are `string` and a transposition otherwise compiled
7310
+ * (go-to-k/cdkd#3537).
7302
7311
  * @returns Absolute path to asset source
7303
7312
  */
7304
- getAssetSourcePath(cdkOutputDir, asset, assetOutdir, sink) {
7305
- return resolveFileAssetSourcePath(cdkOutputDir, asset, assetOutdir, sink);
7313
+ getAssetSourcePath(cdkOutputDir, asset, opts) {
7314
+ return resolveFileAssetSourcePath(cdkOutputDir, asset, opts);
7306
7315
  }
7307
7316
  /**
7308
7317
  * Resolve asset destination values (replace ${AWS::AccountId}, ${AWS::Region}, etc.)
@@ -7401,7 +7410,10 @@ var FileAssetPublisher = class {
7401
7410
  */
7402
7411
  async publish(assetHash, asset, cdkOutputDir, accountId, region, assetOutdir) {
7403
7412
  const destinations = Object.values(asset.destinations).map((d) => `s3://${this.resolvePlaceholders(d.bucketName, accountId, region)}/${this.resolvePlaceholders(d.objectKey, accountId, region)}`).map((u) => displaySafe(u));
7404
- const sourcePath = resolveFileAssetSourcePath(cdkOutputDir, asset, assetOutdir, destinations.length > 0 ? `package that path and upload it to ${destinations.join(", ")}` : "package that path, though this manifest names no destination for it");
7413
+ const sourcePath = resolveFileAssetSourcePath(cdkOutputDir, asset, {
7414
+ assetOutdir,
7415
+ sink: destinations.length > 0 ? `package that path and upload it to ${destinations.join(", ")}` : "package that path, though this manifest names no destination for it"
7416
+ });
7405
7417
  for (const [, dest] of Object.entries(asset.destinations)) {
7406
7418
  const bucketName = this.resolvePlaceholders(dest.bucketName, accountId, region);
7407
7419
  const objectKey = this.resolvePlaceholders(dest.objectKey, accountId, region);
@@ -8999,7 +9011,8 @@ function warnUnrecognizedAssetDestination(opts) {
8999
9011
  * Twin of `resolveFileAssetSourcePath` and `resolveVerboseTemplatePath`.
9000
9012
  * Exported for unit testing.
9001
9013
  */
9002
- function resolveDockerContextDirectory(manifestDir, directory, wrapError, assetOutdir, sink, assetId) {
9014
+ function resolveDockerContextDirectory(opts) {
9015
+ const { manifestDir, directory, wrapError, assetOutdir, sink, assetId } = opts;
9003
9016
  if (isAbsolute$1(directory)) {
9004
9017
  const absolute = resolve$1(directory);
9005
9018
  const escape = absoluteAssemblyPathEscape(assetOutdir, absolute);
@@ -9053,12 +9066,22 @@ function dockerSubject(assetId) {
9053
9066
  async function buildDockerImage(asset, cdkOutDir, options) {
9054
9067
  const source = asset.source;
9055
9068
  const logger = getLogger().child("docker-build");
9056
- const contextDirectory = (directory, sink) => resolveDockerContextDirectory(cdkOutDir, directory, options.wrapError, options.assetOutdir ?? cdkOutDir, sink, options.tag);
9069
+ const contextDirectory = (args) => resolveDockerContextDirectory({
9070
+ manifestDir: cdkOutDir,
9071
+ directory: args.directory,
9072
+ wrapError: options.wrapError,
9073
+ assetOutdir: options.assetOutdir ?? cdkOutDir,
9074
+ sink: args.sink,
9075
+ ...options.tag !== void 0 && { assetId: options.tag }
9076
+ });
9057
9077
  if (source.executable && source.executable.length > 0) {
9058
9078
  const [cmd, ...args] = source.executable;
9059
9079
  if (!cmd) throw options.wrapError("asset source.executable[] is empty");
9060
9080
  warnManifestExecutable(source.executable);
9061
- const cwd = source.directory ? contextDirectory(source.directory, "run this asset's source.executable with that directory as its working directory") : cdkOutDir;
9081
+ const cwd = source.directory ? contextDirectory({
9082
+ directory: source.directory,
9083
+ sink: "run this asset's source.executable with that directory as its working directory"
9084
+ }) : cdkOutDir;
9062
9085
  const shownExecutable = redactDockerArgvValues(source.executable).join(" ");
9063
9086
  logger.debug(`Building Docker image via executable: ${shownExecutable} (cwd=${cwd})`);
9064
9087
  let result;
@@ -9082,7 +9105,10 @@ async function buildDockerImage(asset, cdkOutDir, options) {
9082
9105
  }
9083
9106
  if (!options.tag) throw options.wrapError("buildDockerImage(directory mode) requires options.tag");
9084
9107
  const buildArgs = buildDockerBuildCommand(source, options.tag, options.platform);
9085
- const contextDir = contextDirectory(source.directory, "send that directory to BuildKit as the build context and bake it into the image pushed to the repository this manifest names");
9108
+ const contextDir = contextDirectory({
9109
+ directory: source.directory,
9110
+ sink: "send that directory to BuildKit as the build context and bake it into the image pushed to the repository this manifest names"
9111
+ });
9086
9112
  buildArgs.push(".");
9087
9113
  warnEscapingBuildKitPaths(source, contextDir, options.assetOutdir ?? cdkOutDir);
9088
9114
  logger.debug(`${getDockerCmd()} ${redactDockerArgvValues(buildArgs).join(" ")} (cwd=${displaySafe(contextDir)})`);
@@ -35149,7 +35175,7 @@ var CloudControlProvider = class {
35149
35175
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
35150
35176
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
35151
35177
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
35152
- const { ASGProvider } = await import("./asg-provider-CZ5keDoC.js").then((n) => n.n);
35178
+ const { ASGProvider } = await import("./asg-provider-IJRO7-KI.js").then((n) => n.n);
35153
35179
  const asgProvider = new ASGProvider();
35154
35180
  return withIndeterminateGuard(await asgProvider.delete(logicalId, physicalId, resourceType, _properties, context), indeterminateGuard);
35155
35181
  }
@@ -48859,4 +48885,4 @@ var DeployEngine = class DeployEngine {
48859
48885
 
48860
48886
  //#endregion
48861
48887
  export { yellow as $, derivePartitionAndUrlSuffix as $i, safeStackName as $n, assertAssetBucketRegion as $r, requireConfigObject as $t, createPreDeleteFinalSnapshot as A, PartialFailureError as Aa, resolveAutoAssetStorage as Ai, malformedOutputsRefusalMessage as An, formatLockExpiry as Ar, carriesDynamicReference as At, isStatefulRecreateTargetSync as B, normalizeAwsError as Ba, CFN_TEMPLATE_URL_LIMIT as Bi, refuseMalformedOrphansForDestroy as Bn, isReadableBag as Br, isSettledInstanceState as Bt, namesAnyDeclaredParameter as C, DynamicReferenceRegionAmbiguousError as Ca, AssetManifestLoader as Ci, isReadableResourceEntry as Cn, LockManager as Cr, slowCcOperationTimeoutMs as Ct, PRE_DELETE_SNAPSHOT_TYPES as D, LockError as Da, getDefaultStateBucketName as Di, malformedOrphanRecordsWarning as Dn, buildForceUnlockCommand as Dr, disableInstanceApiTermination as Dt, ATOMIC_FINAL_SNAPSHOT_TYPES as E, LocalStartServiceError as Ea, synthesisStatusMessage as Ei, malformedLocalOutputsWarning as En, UNREPRODUCIBLE_LOCK_CLAUSE as Er, deleteSkipReason as Et, extractDeploymentEventError as F, StackTerminationProtectionError as Fa, resolveUseCdkBootstrapAssets as Fi, malformedResourcesWarning as Fn, hasReadableExportSet as Fr, isImpossibleEmptyStoredAttribute as Ft, toCfnInteger as G, isTransientServerError as Ga, injectiveKey as Gi, refuseMalformedResourcesForDestroy as Gn, stringifyValue as Gr, coerceCfnBoolean as Gt, WARM_THROUGHPUT_MEMBERS as H, isMarkedNonRetryable as Ha, findLargeInlineResources as Hi, refuseMalformedOutputsForDestroy as Hn, orphansCarriedFrom as Hr, normalizeAwsTagsToCfn as Ht, makeSiblingClaimReader as I, StateError as Ia, stateBucketExistenceConfirmed as Ii, malformedStateRefusalMessage as In, hasReasonlessBaselineRefusal as Ir, isNamelessDynamicReferenceError as It, bold as J, retryClassificationText as Ja, producerRecordKey as Ji, repairMalformedOutputsForReadOnly as Jn, createAssetRedirectResolver as Jr, configIntegerRefusal as Jt, toFiniteNumber as K, markNonRetryable as Ka, injectiveKeyPrefix as Ki, refuseMalformedState as Kn, WorkGraph as Kr, coerceCfnInteger as Kt, planOrphanAdoption as L, SynthesisError as La, warnDeprecatedNoPrefixCliFlag as Li, refuseDivergentRecordRegionForDestroy as Ln, hasUnverifiableParameterRefusal as Lr, isUnboundTemplateParameter as Lt, refusesFinalSnapshot as M, ResourceTimeoutError as Ma, resolveSkipPrefix as Mi, malformedRenderedContainersWarning as Mn, CUSTOM_RESOURCE_RESPONSE_PREFIX as Mr, cfnRefValueFromPhysicalId as Mt, unsupportedFinalSnapshotError as N, ResourceUpdateNotSupportedError as Na, resolveStateBucketWithDefault as Ni, malformedResourceEntriesWarning as Nn, DEFAULT_STATE_PREFIX as Nr, coerceParameterTypedValue as Nt, buildFinalSnapshotIdentifier as O, MalformedProducerRecordRefusalError as Oa, getLegacyStateBucketName as Oi, malformedOrphansRefusalMessage as On, buildLockContentionMessage as Or, isTerminationProtectionPropagationError as Ot, makeCanonicalizePropertiesFn as P, StackHasActiveImportsError as Pa, resolveStateBucketWithDefaultAndSource as Pi, malformedResourcePropertiesWarning as Pn, exportNamesCarriedFrom as Pr, getAccountInfo as Pt, red as Q, canonicalizeRegion as Qi, safeRegion as Qn, BOOTSTRAP_MARKER_PREFIX as Qr, requireConfigArray as Qt, MULTI_REGION_RECREATE_BLOCKED_TYPES as R, formatError as Ra, ssmResolvedValueType as Ri, refuseMalformedNestedChildOutputs as Rn, importableOutputKeys as Rr, parameterTypeMayLoseSecretIdentity as Rt, computeParameterTaint as S, DeployCancelledError as Sa, stripControlChars as Si, hasReadableResources as Sn, scrubResourceRecord as Sr, isWaitAbandonedError as St, resourcesNamingDeclaredParameter as T, LocalInvokeBuildError as Ta, Synthesizer as Ti, malformedExportSourceWarning as Tn, rebuildClientForBucketRegion as Tr, deleteIndeterminateGuards as Tt, coerceWarmThroughput as U, isRetryableTransientError as Ua, uploadCfnTemplate as Ui, refuseMalformedResourceEntries as Un, shouldRetainResource as Ur, resolveExplicitPhysicalId as Ut, renderStatefulReason as V, withErrorHandling as Va, MIGRATE_TMP_PREFIX as Vi, refuseMalformedOutputs as Vn, orphansAfterRollback as Vr, WAFv2WebACLProvider as Vt, isWarmThroughputDecrease as W, isThrottlingError as Wa, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Wi, refuseMalformedResourcePropertiesForOrphan as Wn, AssetPublisher as Wr, assertRegionMatch as Wt, gray as X, safeStringify$1 as Xa, expectedOwnerParam as Xi, repairMalformedResourcePropertiesForReadOnly as Xn, rewriteTemplateAssetReferences as Xr, readConfigString as Xt, cyan as Y, describeAwsFailure as Ya, decodeListingKey as Yi, repairMalformedResourceEntriesForReadOnly as Yn, loadPublishableAssetManifest as Yr, configStringRefusal as Yt, green as Z, __exportAll as Za, PARTITION_TABLE as Zi, repairMalformedResourcesForReadOnly as Zn, AssetModeResolver as Zr, replayWarn as Zt, bagHoldsSecretExpression as _, AssetError as _a, partitionSensitiveEnv as _i, UNREADABLE_ORPHANS_CONTAINER_ROW as _n, maskSecretsInError as _r, endCommandInterruptScope as _t, DeploymentEventsStore as a, hasPlainPrototype$1 as aa, validateAssetBucketName as ai, s3BucketDomainName as an, TemplateParser as ar, secretBearingStateKeyWarning as at, mergeNoChangeOutputs as b, CrossAccountSecretRefusalError as ba, runDockerStreaming as bi, hasReadableOrphans as bn, recoverMaskedOutput as br, startInterruptWatch as bt, replayFailedOperations as c, absoluteAssemblyPathEscape as ca, buildDockerImage as ci, s3BucketWebsiteUrl as cn, STATE_SOURCED_READBACK_RULES as cr, IAMRoleProvider as ct, updatePartialMessage as d, clearBucketRegionCache as da, describeDockerCapturedOutput as di, applyCallerIdentityCredentials as dn, createSecretMasker as dr, ProviderRegistry as dt, AssemblyReader as ea, ensureAssetStorage as ei, requireConfigString as en, findActionableSilentDrops as er, collectDeclaredOutputNames as et, updatePartialReason as f, resolveBucketRegion as fa, describeDockerExecFailure as fi, callerEnvCredentials as fn, dynamicReferenceTokens as fr, wouldReturnToSdkProvider as ft, computeImplicitDeleteEdges as g, setAwsClients as ga, getDockerCmd as gi, STATE_RESOURCES_MALFORMED as gn, markSameGenerationBag as gr, beginCommandInterruptScope as gt, IMPLICIT_DELETE_DEPENDENCIES as h, resetAwsClients as ha, formatDockerLoginError as hi, INTRINSIC_KEYS as hn, isSingleDynamicReferenceToken as hr, maskerOrIdentity as ht, DeploymentEventsReader as i, hasOwnKey as ia, readBootstrapMarkerBody as ii, s3BucketArn as in, DagBuilder as ir, secretBearing as it, isFinalSnapshotError as j, ProvisioningError as ja, resolveCaptureObservedState as ji, malformedOutputsWarning as jn, shellQuote as jr, carriesFetchableDynamicReference as jt, ccRoutedFinalSnapshotError as k, NestedStackChildDirectDestroyError as ka, resolveApp as ki, malformedOrphansWarning as kn, forceQuitRecoveryClause as kr, IntrinsicFunctionResolver as kt, replayRollback as l, renderAssemblyPathEscape as la, resolveDockerContextDirectory as li, applyRoleArnIfSet as ln, TEMPLATE_SOURCED_RULES as lr, collectInlinePolicyNamesManagedBySiblings as lt, maskingRetryLogger as m, getAwsClients as ma, dockerSpawnEnvWithSensitive as mi, DiffCalculator as mn, identityKeyFor as mr, maskDeep as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, processStackMessages as na, isCrossRegionRedirect as ni, producerRegionsFromState as nn, describeTypeWithThrottleRetry as nr, exportAliasCollisionScrubWarning as nt, planFailedOps as o, nullPrototypeRecord as oa, validateContainerRepoName as oi, s3BucketDualStackDomainName as on, STATE_SOURCED_BASELINE_RULES as or, secretSafeKeyDisplay as ot, withResourceDeadline as p, AwsClients as pa, describeDockerFailure as pi, envCredentialsAreAssumedRole as pn, errorCauseChain as pr, createMaskedRetryLogger as pt, formatResourceLine as q, markRedactedCause as qa, producerCoordinateKey as qi, repairMalformedOrphansForReadOnly as qn, buildAssetRedirectMap as qr, configBooleanRefusal as qt, DeployEngine as r, defineOwnKey as ra, parseBootstrapMarker as ri, withSharedDrainBudget as rn, withRetry as rr, isExportAliasCollision as rt, planRollback as s, ownValue as sa, buildDenyExternalAccessPolicy as si, s3BucketRegionalDomainName as sn, STATE_SOURCED_CROSS_GENERATION_RULES as sr, getCurrentResourceSecrets as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, failedStageNote as ta, getBootstrapMarkerKey as ti, classifyReplaySecretRegion as tn, findSilentDropProperties as tr, collectPublishedOutputNames as tt, resolveReplacementOldType as u, resolveAssemblyPath as ua, warnManifestExecutable as ui, AWS_CREDENTIAL_ENV_KEYS as un, carriesSecretMask as ur, clearOnUpdateRemoval as ut, isSecretBearingReferenceString as v, CdkdError as va, redactDockerArgvValues as vi, UNREADABLE_RESOURCES_MAP_ROW as vn, maskSecretsInText as vr, interruptWatchListenerCount as vt, reachableDivergentParameters as w, IntrinsicResolutionRefusalError as wa, getDockerImageBySourceHash as wi, malformedExportNamesWarning as wn, S3StateBackend as wr, UNSPECIFIED_SKIP_REASON as wt, bindingSkippedOutputs as x, DependencyError as xa, escapeRegExp$1 as xi, hasReadableOutputs as xn, redactSecretsForState as xr, CloudControlProvider as xt, keptWholeReasonText as y, ConfigError as ya, runDockerForeground as yi, displayLogicalId as yn, recordMaskOnlyValue as yr, isInterruptedWaitError as yt, isStatefulRecreateTargetForReplace as z, isCdkdError as za, CFN_TEMPLATE_BODY_LIMIT as zi, refuseMalformedOrphans as zn, importableOutputs as zr, refStateLookupFromResource as zt };
48862
- //# sourceMappingURL=deploy-engine-9CxYEFh_.js.map
48888
+ //# sourceMappingURL=deploy-engine-BZtFQu2S.js.map