@go-to-k/cdkd 0.151.0 → 0.152.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.
@@ -15,7 +15,7 @@ import { GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
15
15
  import { GetParameterCommand, SSMClient } from "@aws-sdk/client-ssm";
16
16
  import { GetCloudFrontOriginAccessIdentityCommand } from "@aws-sdk/client-cloudfront";
17
17
  import { createReadStream, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
18
- import { basename, join, resolve } from "node:path";
18
+ import { basename, isAbsolute, join, resolve } from "node:path";
19
19
  import { spawn } from "node:child_process";
20
20
  import { homedir, tmpdir } from "node:os";
21
21
  import { GetHostedZoneCommand, ListHostedZonesByNameCommand, Route53Client } from "@aws-sdk/client-route-53";
@@ -909,7 +909,9 @@ var AssemblyReader = class {
909
909
  for (const [logicalId, resource] of Object.entries(template.Resources ?? {})) {
910
910
  if (resource?.Type !== "AWS::CloudFormation::Stack") continue;
911
911
  const assetPath = resource.Metadata?.["aws:asset:path"];
912
- if (typeof assetPath === "string" && assetPath.length > 0) nestedTemplates[logicalId] = join(assemblyDir, assetPath);
912
+ if (typeof assetPath !== "string" || assetPath.length === 0) continue;
913
+ if (isAbsolute(assetPath) || /^[a-zA-Z]:[\\/]/.test(assetPath) || assetPath.startsWith("\\\\")) throw new SynthesisError(`Stack '${stackName}' nested-stack '${logicalId}' has Metadata['aws:asset:path']='${assetPath}' which is absolute. CDK emits relative asset paths for nested templates; an absolute path indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to load.`);
914
+ nestedTemplates[logicalId] = join(assemblyDir, assetPath);
913
915
  }
914
916
  return {
915
917
  stackName,
@@ -9970,4 +9972,4 @@ var DeployEngine = class {
9970
9972
 
9971
9973
  //#endregion
9972
9974
  export { ConfigError as $, AssetPublisher as A, resolveStateBucketWithDefault as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, getDefaultStateBucketName as F, MIGRATE_TMP_PREFIX as G, warnDeprecatedNoPrefixCliFlag as H, getLegacyStateBucketName as I, AssemblyReader as J, findLargeInlineResources as K, resolveApp as L, WorkGraph as M, buildDockerImage as N, S3StateBackend as O, Synthesizer as P, CdkdError as Q, resolveCaptureObservedState as R, IntrinsicFunctionResolver as S, DagBuilder as T, CFN_TEMPLATE_BODY_LIMIT as U, resolveStateBucketWithDefaultAndSource as V, CFN_TEMPLATE_URL_LIMIT as W, resolveBucketRegion as X, clearBucketRegionCache as Y, AssetError as Z, normalizeAwsTagsToCfn as _, isCdkdError as _t, withRetry as a, MissingCdkCliError as at, CloudControlProvider as b, cyan as c, ProvisioningError as ct, red as d, RouteDiscoveryError as dt, DependencyError as et, yellow as f, StackHasActiveImportsError as ft, matchesCdkPath as g, formatError as gt, CDK_PATH_TAG as h, SynthesisError as ht, withResourceDeadline as i, LockError as it, stringifyValue as j, shouldRetainResource as k, gray as l, ResourceTimeoutError as lt, collectInlinePolicyNamesManagedBySiblings as m, StateError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalMigrateError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, NestedStackChildDirectDestroyError as ot, IAMRoleProvider as p, StackTerminationProtectionError as pt, uploadCfnTemplate as q, DeployEngine as r, LocalStartServiceError as rt, bold as s, PartialFailureError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, LocalInvokeBuildError as tt, green as u, ResourceUpdateNotSupportedError as ut, resolveExplicitPhysicalId as v, normalizeAwsError as vt, DiffCalculator as w, assertRegionMatch as x, ProviderRegistry as y, withErrorHandling as yt, resolveSkipPrefix as z };
9973
- //# sourceMappingURL=deploy-engine-CRxNgcqJ.js.map
9975
+ //# sourceMappingURL=deploy-engine-CV51PIkg.js.map