@go-to-k/cdkd 0.146.0 → 0.146.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
@@ -31721,6 +31721,18 @@ function getCurrentNestedStackContext() {
31721
31721
  //#endregion
31722
31722
  //#region src/provisioning/providers/nested-stack-provider.ts
31723
31723
  /**
31724
+ * Returns `true` when `p` is absolute on the current platform OR begins
31725
+ * with a forward slash. The `startsWith('/')` arm covers the cross-platform
31726
+ * leak where `path.isAbsolute('/abs/foo')` returns `true` on POSIX but
31727
+ * `false` on Windows (Windows absolute paths require a drive letter or
31728
+ * UNC root) — a POSIX-style absolute path embedded in a synth template
31729
+ * generated on Linux and consumed on a Windows host would slip past
31730
+ * `path.isAbsolute()` alone. Exported for unit testing.
31731
+ */
31732
+ function isAbsoluteCrossPlatform(p) {
31733
+ return path.isAbsolute(p) || p.startsWith("/");
31734
+ }
31735
+ /**
31724
31736
  * Provider for `AWS::CloudFormation::Stack` — cdkd's recursive nested-stack
31725
31737
  * adapter. Issue [#459](https://github.com/go-to-k/cdkd/issues/459); see
31726
31738
  * [docs/design/459-nested-stacks.md](../../../docs/design/459-nested-stacks.md)
@@ -31940,7 +31952,7 @@ var NestedStackProvider = class {
31940
31952
  if (resource?.Type !== "AWS::CloudFormation::Stack") continue;
31941
31953
  const assetPath = resource.Metadata?.["aws:asset:path"];
31942
31954
  if (typeof assetPath !== "string" || assetPath.length === 0) continue;
31943
- if (path.isAbsolute(assetPath)) throw new Error(`NestedStackProvider: nested-stack '${grandLogicalId}' 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.`);
31955
+ if (isAbsoluteCrossPlatform(assetPath)) throw new Error(`NestedStackProvider: nested-stack '${grandLogicalId}' 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.`);
31944
31956
  result[grandLogicalId] = path.join(dir, assetPath);
31945
31957
  }
31946
31958
  return result;
@@ -56460,7 +56472,7 @@ function reorderArgs(argv) {
56460
56472
  */
56461
56473
  async function main() {
56462
56474
  const program = new Command();
56463
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.146.0");
56475
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.146.1");
56464
56476
  program.addCommand(createBootstrapCommand());
56465
56477
  program.addCommand(createSynthCommand());
56466
56478
  program.addCommand(createListCommand());