cdk-local 0.123.0 → 0.123.2

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,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { $t as createLocalInvokeAgentCoreCommand, Ct as createLocalRunTaskCommand, O as createLocalStartCloudFrontCommand, Sn as createLocalInvokeCommand, a as createLocalStudioCommand, bt as createLocalStartServiceCommand, mt as createLocalStartAlbCommand, w as createLocalListCommand, wn as createLocalStartApiCommand } from "./local-studio-Cg47A0QX.js";
2
+ import { $t as createLocalInvokeAgentCoreCommand, Ct as createLocalRunTaskCommand, O as createLocalStartCloudFrontCommand, Sn as createLocalInvokeCommand, a as createLocalStudioCommand, bt as createLocalStartServiceCommand, mt as createLocalStartAlbCommand, w as createLocalListCommand, wn as createLocalStartApiCommand } from "./local-studio-D5rKurbp.js";
3
3
  import { Command } from "commander";
4
4
 
5
5
  //#region src/cli/index.ts
6
6
  const program = new Command();
7
- program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.123.0");
7
+ program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.123.2");
8
8
  program.addCommand(createLocalInvokeCommand());
9
9
  program.addCommand(createLocalInvokeAgentCoreCommand());
10
10
  program.addCommand(createLocalStartApiCommand());
@@ -80,6 +80,34 @@ function formatTimestamp() {
80
80
  return (/* @__PURE__ */ new Date()).toISOString();
81
81
  }
82
82
  /**
83
+ * Resolve whether ANSI color should be emitted by default.
84
+ *
85
+ * Color is appropriate for an interactive terminal but is noise (literal
86
+ * `\x1b[31m...` escapes) when the output is a pipe — e.g. when `cdkl studio`
87
+ * spawns `cdkl invoke` / a serve command as a child and captures its output to
88
+ * render in the browser, where the raw escapes leak as visible text. So the
89
+ * default tracks the stdout TTY-ness, with the two standard env overrides:
90
+ *
91
+ * - `NO_COLOR` (any non-empty value) forces colors OFF (https://no-color.org).
92
+ * - `FORCE_COLOR` (non-empty, not `'0'` / `'false'`) forces colors ON, even
93
+ * when not a TTY (the convention many CLIs honor for CI / log capture).
94
+ * - otherwise: on when `process.stdout.isTTY`.
95
+ *
96
+ * We gate on `process.stdout.isTTY` even though warn / error go to stderr via
97
+ * `console.error` / `console.warn`. In the case this fix targets — a piped
98
+ * child (e.g. studio) — NEITHER stdout nor stderr is a TTY, so gating on stdout
99
+ * still yields colorless output. Tracking stdout matches common CLI tooling and
100
+ * keeps a single, predictable signal; an explicit `useColors` argument (passed
101
+ * by child loggers) always overrides this default.
102
+ */
103
+ function resolveDefaultUseColors() {
104
+ const noColor = process.env["NO_COLOR"];
105
+ if (noColor !== void 0 && noColor !== "") return false;
106
+ const forceColor = process.env["FORCE_COLOR"];
107
+ if (forceColor !== void 0 && forceColor !== "" && forceColor !== "0" && forceColor !== "false") return true;
108
+ return !!process.stdout.isTTY;
109
+ }
110
+ /**
83
111
  * Console logger implementation
84
112
  *
85
113
  * Supports two output modes:
@@ -89,7 +117,7 @@ function formatTimestamp() {
89
117
  var ConsoleLogger = class {
90
118
  level;
91
119
  useColors;
92
- constructor(level = "info", useColors = true) {
120
+ constructor(level = "info", useColors = resolveDefaultUseColors()) {
93
121
  this.level = level;
94
122
  this.useColors = useColors;
95
123
  }
@@ -442,4 +470,4 @@ function mergeEnv(overrides) {
442
470
 
443
471
  //#endregion
444
472
  export { runDockerStreaming as a, resolveConfiguredLogLevel as c, setEmbedConfig as d, runDockerForeground as i, getEmbedConfig as l, formatDockerLoginError as n, spawnStreaming as o, getDockerCmd as r, getLogger as s, docker_cmd_exports as t, resetEmbedConfig as u };
445
- //# sourceMappingURL=docker-cmd-Bo60SLE3.js.map
473
+ //# sourceMappingURL=docker-cmd-DQyeV02S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docker-cmd-DQyeV02S.js","names":["createSpinner"],"sources":["../src/local/embed-config.ts","../src/utils/logger.ts","../src/utils/docker-cmd.ts"],"sourcesContent":["/**\n * Embed-time branding configuration.\n *\n * cdk-local hardcodes its own branding (`cdkl` binary, `cdk-local`\n * product name, `cdkl-*` Docker / AWS resource names, `/cdk-local-aws`\n * credential bind-mount) into user-visible error messages and resource\n * identifiers. A host that embeds cdk-local's Commander factories (e.g.\n * cdkd, whose binary is `cdkd` and whose subcommand group is\n * `cdkd local`) passes a {@link CdkLocalEmbedConfig} so those strings\n * read in the host's own branding instead.\n *\n * The four command factories call {@link setEmbedConfig} before building\n * their Commander option tree, so both construction-time strings (option\n * descriptions / defaults) and action-time strings (errors, resource\n * names) read the resolved config via {@link getEmbedConfig}. When no\n * config is supplied every field falls back to cdk-local's own defaults,\n * leaving native `cdkl` behavior byte-identical.\n */\nexport interface CdkLocalEmbedConfig {\n /**\n * Command prefix for subcommand references in user-facing strings, e.g.\n * `${cliName} invoke` / `${cliName} start-api`. Default `'cdkl'`; cdkd\n * passes `'cdkd local'`.\n */\n cliName?: string;\n /**\n * Bare executable / process name for standalone references, e.g.\n * `${binaryName} is exiting` / `${binaryName} could not determine ...`,\n * the local request id, and the hyphen-free Cognito user-pool\n * placeholder id. Default `'cdkl'`; cdkd passes `'cdkd'`.\n */\n binaryName?: string;\n /**\n * Product name for prose references, e.g. `${productName} supports ...`.\n * Also seeds the profile-credentials tmpdir prefix. Default\n * `'cdk-local'`; cdkd passes `'cdkd'`.\n */\n productName?: string;\n /**\n * Prefix for generated Docker / AWS resource identifiers — container,\n * volume, network, image-tag, tmpdir names, STS `RoleSessionName`s, and\n * the example Cloud Map namespace. Default `'cdkl'`; cdkd passes\n * `'cdkd-local'`.\n */\n resourceNamePrefix?: string;\n /**\n * Container directory the host AWS shared-credentials file is\n * bind-mounted under. Default `'/cdk-local-aws'`; cdkd passes\n * `'/cdkd-aws'`.\n */\n awsBindMountPath?: string;\n /**\n * Prefix for the environment variables this CLI reads — `${envPrefix}_APP`\n * (the `--app` fallback) and `${envPrefix}_ROLE_ARN` (the `--role-arn`\n * fallback). Default `'CDKL'`; cdkd passes `'CDKD'`.\n */\n envPrefix?: string;\n /**\n * Whether this host fails-closed by default on unverifiable AWS_IAM SigV4\n * requests. cdk-local's default is warn-and-pass (`false`); a host like\n * cdkd that ships fail-closed-by-default passes `true`. Drives the polarity\n * of the SigV4 warn-message advice (whether the strictness flag reads as an\n * opt-IN or opt-OUT). Default `false`.\n */\n sigV4StrictByDefault?: boolean;\n /**\n * The CLI flag a user toggles to change SigV4 strictness. With\n * `sigV4StrictByDefault: false` it is an opt-IN flag (`'--strict-sigv4'`,\n * the default); with `sigV4StrictByDefault: true` it is the host's opt-OUT\n * flag (cdkd passes `'--allow-unverified-sigv4'`). Default `'--strict-sigv4'`.\n */\n sigV4OptFlag?: string;\n}\n\nexport interface ResolvedEmbedConfig {\n cliName: string;\n binaryName: string;\n productName: string;\n resourceNamePrefix: string;\n awsBindMountPath: string;\n envPrefix: string;\n sigV4StrictByDefault: boolean;\n sigV4OptFlag: string;\n}\n\nconst DEFAULTS: ResolvedEmbedConfig = {\n cliName: 'cdkl',\n binaryName: 'cdkl',\n productName: 'cdk-local',\n resourceNamePrefix: 'cdkl',\n awsBindMountPath: '/cdk-local-aws',\n envPrefix: 'CDKL',\n sigV4StrictByDefault: false,\n sigV4OptFlag: '--strict-sigv4',\n};\n\nlet current: ResolvedEmbedConfig = DEFAULTS;\n\n/**\n * Resolve and install the active embed config. Called once per command\n * factory with the host's overrides (or `undefined` for native cdkl\n * behavior). Idempotent: re-calling with the same overrides is a no-op,\n * which is why all four factories may safely set the same config.\n */\nexport function setEmbedConfig(config?: CdkLocalEmbedConfig): void {\n current = {\n cliName: config?.cliName ?? DEFAULTS.cliName,\n binaryName: config?.binaryName ?? DEFAULTS.binaryName,\n productName: config?.productName ?? DEFAULTS.productName,\n resourceNamePrefix: config?.resourceNamePrefix ?? DEFAULTS.resourceNamePrefix,\n awsBindMountPath: config?.awsBindMountPath ?? DEFAULTS.awsBindMountPath,\n envPrefix: config?.envPrefix ?? DEFAULTS.envPrefix,\n sigV4StrictByDefault: config?.sigV4StrictByDefault ?? DEFAULTS.sigV4StrictByDefault,\n sigV4OptFlag: config?.sigV4OptFlag ?? DEFAULTS.sigV4OptFlag,\n };\n}\n\n/** The active resolved embed config. */\nexport function getEmbedConfig(): ResolvedEmbedConfig {\n return current;\n}\n\n/** Restore cdk-local defaults. Primarily a test-isolation helper. */\nexport function resetEmbedConfig(): void {\n current = DEFAULTS;\n}\n","/**\n * Logger interface and console implementation for cdk-local.\n *\n * A minimal `Logger` / `LogLevel` interface with a `ConsoleLogger`\n * (`getLogger()` / `setLogger()` exports, `child(prefix)` for prefixed\n * sub-loggers). cdk-local invokes a single Lambda / API / task at a time,\n * so there is no parallel multi-stack output to interleave — a plain\n * console logger with no output buffer or live progress renderer suffices.\n */\n\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error';\n\nexport interface Logger {\n debug(message: string, ...args: unknown[]): void;\n info(message: string, ...args: unknown[]): void;\n warn(message: string, ...args: unknown[]): void;\n error(message: string, ...args: unknown[]): void;\n setLevel(level: LogLevel): void;\n getLevel(): LogLevel;\n child(prefix: string): Logger;\n}\n\n/**\n * ANSI color codes\n *\n * Kept internal — `ConsoleLogger.formatMessage` references these for the\n * verbose/compact mode level prefixes.\n */\nconst colors = {\n reset: '\\x1b[0m',\n bright: '\\x1b[1m',\n dim: '\\x1b[2m',\n red: '\\x1b[31m',\n green: '\\x1b[32m',\n yellow: '\\x1b[33m',\n blue: '\\x1b[34m',\n cyan: '\\x1b[36m',\n gray: '\\x1b[90m',\n} as const;\n\nfunction formatTimestamp(): string {\n const now = new Date();\n return now.toISOString();\n}\n\n/**\n * Resolve whether ANSI color should be emitted by default.\n *\n * Color is appropriate for an interactive terminal but is noise (literal\n * `\\x1b[31m...` escapes) when the output is a pipe — e.g. when `cdkl studio`\n * spawns `cdkl invoke` / a serve command as a child and captures its output to\n * render in the browser, where the raw escapes leak as visible text. So the\n * default tracks the stdout TTY-ness, with the two standard env overrides:\n *\n * - `NO_COLOR` (any non-empty value) forces colors OFF (https://no-color.org).\n * - `FORCE_COLOR` (non-empty, not `'0'` / `'false'`) forces colors ON, even\n * when not a TTY (the convention many CLIs honor for CI / log capture).\n * - otherwise: on when `process.stdout.isTTY`.\n *\n * We gate on `process.stdout.isTTY` even though warn / error go to stderr via\n * `console.error` / `console.warn`. In the case this fix targets — a piped\n * child (e.g. studio) — NEITHER stdout nor stderr is a TTY, so gating on stdout\n * still yields colorless output. Tracking stdout matches common CLI tooling and\n * keeps a single, predictable signal; an explicit `useColors` argument (passed\n * by child loggers) always overrides this default.\n */\nexport function resolveDefaultUseColors(): boolean {\n const noColor = process.env['NO_COLOR'];\n if (noColor !== undefined && noColor !== '') {\n return false;\n }\n const forceColor = process.env['FORCE_COLOR'];\n if (\n forceColor !== undefined &&\n forceColor !== '' &&\n forceColor !== '0' &&\n forceColor !== 'false'\n ) {\n return true;\n }\n return !!process.stdout.isTTY;\n}\n\n/**\n * Console logger implementation\n *\n * Supports two output modes:\n * - verbose (debug level): timestamps, module prefixes, all details\n * - compact (info level): clean output without timestamps or prefixes\n */\nexport class ConsoleLogger implements Logger {\n private level: LogLevel;\n private useColors: boolean;\n\n constructor(level: LogLevel = 'info', useColors: boolean = resolveDefaultUseColors()) {\n this.level = level;\n this.useColors = useColors;\n }\n\n private shouldLog(level: LogLevel): boolean {\n const levels: LogLevel[] = ['debug', 'info', 'warn', 'error'];\n const currentLevelIndex = levels.indexOf(this.level);\n const messageLevelIndex = levels.indexOf(level);\n return messageLevelIndex >= currentLevelIndex;\n }\n\n private formatMessage(level: LogLevel, message: string, ...args: unknown[]): string {\n const formattedArgs = args.length > 0 ? ' ' + args.map((a) => JSON.stringify(a)).join(' ') : '';\n\n if (this.level === 'debug') {\n const timestamp = formatTimestamp();\n const levelStr = level.toUpperCase().padEnd(5);\n\n if (this.useColors) {\n const levelColorMap: Record<LogLevel, string> = {\n debug: colors.gray,\n info: colors.blue,\n warn: colors.yellow,\n error: colors.red,\n };\n const levelColor = levelColorMap[level];\n\n return `${colors.dim}${timestamp}${colors.reset} ${levelColor}${levelStr}${colors.reset} ${message}${formattedArgs}`;\n }\n\n return `${timestamp} ${levelStr} ${message}${formattedArgs}`;\n }\n\n if (this.useColors) {\n if (level === 'error') {\n return `${colors.red}${message}${formattedArgs}${colors.reset}`;\n }\n if (level === 'warn') {\n return `${colors.yellow}${message}${formattedArgs}${colors.reset}`;\n }\n return `${message}${formattedArgs}`;\n }\n\n return `${message}${formattedArgs}`;\n }\n\n private emit(level: LogLevel, formatted: string): void {\n // `cdkl studio` sets `CDKL_LOG_STREAM=stdout` on its spawned serve children\n // (issue #403) so EVERY level routes to stdout instead of the default\n // warn/error -> stderr split. studio captures a child's stdout and stderr\n // via two separate OS pipes, and Node does NOT guarantee cross-pipe\n // delivery order — a warn written just before a stdout banner can surface\n // AFTER it in the studio LOG panel (e.g. the pinned-image WARN landing\n // below \"Press ^C to shut down.\"). Emitting one stream preserves emission\n // order for that consumer. Direct CLI use never sets the var, so the\n // warn/error -> stderr split is unchanged there.\n if (process.env['CDKL_LOG_STREAM'] === 'stdout') {\n console.log(formatted);\n return;\n }\n if (level === 'error') console.error(formatted);\n else if (level === 'warn') console.warn(formatted);\n else if (level === 'info') console.info(formatted);\n else console.debug(formatted);\n }\n\n debug(message: string, ...args: unknown[]): void {\n if (this.shouldLog('debug')) {\n this.emit('debug', this.formatMessage('debug', message, ...args));\n }\n }\n\n info(message: string, ...args: unknown[]): void {\n if (this.shouldLog('info')) {\n this.emit('info', this.formatMessage('info', message, ...args));\n }\n }\n\n warn(message: string, ...args: unknown[]): void {\n if (this.shouldLog('warn')) {\n this.emit('warn', this.formatMessage('warn', message, ...args));\n }\n }\n\n error(message: string, ...args: unknown[]): void {\n if (this.shouldLog('error')) {\n this.emit('error', this.formatMessage('error', message, ...args));\n }\n }\n\n setLevel(level: LogLevel): void {\n this.level = level;\n }\n\n getLevel(): LogLevel {\n return this.level;\n }\n\n child(prefix: string): ChildLogger {\n return new ChildLogger(prefix, this.useColors);\n }\n}\n\n/**\n * Child logger that always syncs level from global logger\n */\nclass ChildLogger extends ConsoleLogger {\n private readonly prefix: string;\n\n constructor(prefix: string, useColors: boolean) {\n super('info', useColors);\n this.prefix = prefix;\n }\n\n private syncLevel(): void {\n if (globalLogger) {\n this.setLevel(globalLogger.getLevel());\n }\n }\n\n override debug(message: string, ...args: unknown[]): void {\n this.syncLevel();\n super.debug(`[${this.prefix}] ${message}`, ...args);\n }\n\n override info(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.info(msg, ...args);\n }\n\n override warn(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.warn(msg, ...args);\n }\n\n override error(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.error(msg, ...args);\n }\n}\n\n/**\n * Resolve the initial log level from the `CDKL_LOG_LEVEL` env var, falling\n * back to `'info'`. This is primarily an internal contract: `cdkl studio`\n * spawns its single-shot `cdkl invoke` child with `CDKL_LOG_LEVEL=warn` so\n * cdk-local's OWN synth / orchestration progress (toolkit \"Successfully\n * synthesized to ...\", asset-bundling lines, info-level status) is silenced\n * in the child — leaving the studio LOGS panel showing only the Lambda\n * container's runtime logs (which stream straight from `docker logs` and are\n * unaffected by this level) plus the response. `--verbose` still overrides to\n * `debug` at the command layer. An invalid value is ignored.\n */\nexport function resolveConfiguredLogLevel(): LogLevel {\n const env = process.env['CDKL_LOG_LEVEL'];\n if (env === 'debug' || env === 'info' || env === 'warn' || env === 'error') {\n return env;\n }\n return 'info';\n}\n\nlet globalLogger: ConsoleLogger | null = null;\n\nexport function getLogger(): ConsoleLogger {\n if (!globalLogger) {\n globalLogger = new ConsoleLogger(resolveConfiguredLogLevel());\n }\n return globalLogger;\n}\n\nexport function setLogger(logger: ConsoleLogger): void {\n globalLogger = logger;\n}\n","import { spawn } from 'node:child_process';\nimport { spinner as createSpinner } from '@clack/prompts';\nimport { getLogger } from './logger.js';\nimport { getEmbedConfig } from '../local/embed-config.js';\n\n/**\n * Shared helpers for invoking the docker-compatible CLI binary across cdk-local.\n *\n * Two parity decisions with `aws-cdk-cli`'s `cdk-assets-lib`:\n * 1. `CDK_DOCKER` env var swaps the binary so podman / finch users can\n * run cdk-local without code changes (`CDK_DOCKER=podman cdkl invoke`).\n * 2. `runDockerStreaming` uses streaming spawn rather than `execFile`'s\n * buffered `maxBuffer` ceiling. BuildKit's progress output can run to\n * tens of MB on multi-stage builds with `# syntax=docker/dockerfile:1`\n * frontend downloads + heredoc / `RUN --mount=...` features; the 50 MB\n * `execFile` ceiling cdk-local used to set silently killed those builds\n * with `ERR_CHILD_PROCESS_STDIO_MAXBUFFER`.\n *\n * Output handling: stdout/stderr are collected in memory unconditionally so\n * `runDockerStreaming` can return them to the caller for error wrapping.\n * When the logger is at debug level (i.e. the user passed `--verbose`),\n * the chunks are ALSO mirrored to `process.stdout` / `process.stderr` so\n * the user sees live build progress.\n */\n\n/**\n * Return the docker-compatible CLI binary to invoke. Matches CDK CLI:\n * `CDK_DOCKER` env var overrides the default `docker` so users on\n * podman / finch / nerdctl can swap without changing cdk-local code.\n */\nexport function getDockerCmd(): string {\n const override = process.env['CDK_DOCKER'];\n return override && override.length > 0 ? override : 'docker';\n}\n\nexport interface SpawnResult {\n stdout: string;\n stderr: string;\n}\n\nexport interface SpawnError extends Error {\n /** Captured stderr at the time of failure. */\n stderr: string;\n /** Captured stdout at the time of failure. */\n stdout: string;\n /** Process exit code (null when the process was killed by signal). */\n exitCode: number | null;\n}\n\nexport interface RunDockerOptions {\n /** Optional working directory for the subprocess. */\n cwd?: string;\n /**\n * Additional environment variables to set. Merged on top of `process.env`\n * (so the user's `DOCKER_BUILDKIT=1` and friends propagate through).\n */\n env?: Record<string, string | undefined>;\n /** When set, written to stdin (used by `docker login --password-stdin`). */\n input?: string;\n /**\n * When true, mirror stdout/stderr chunks to `process.stdout` / `process.stderr`\n * as they arrive. Useful for `docker pull` / `docker build` where live\n * progress is desirable. Defaults to \"true when the logger is at debug\n * level\" — matches the existing `--verbose` UX.\n */\n streamLive?: boolean;\n /**\n * When set, show an interactive {@link createSpinner | clack spinner}\n * with this label for the duration of the spawn — so a long-running\n * `docker build` / `docker pull` against a real-world image doesn't\n * look like cdk-local hung. The spinner only renders when:\n *\n * - `streamLive` is false (live BuildKit output already shows motion;\n * overlaying a spinner on top would visually clash and the line\n * overwriting would mangle the build log), AND\n * - `process.stdout` is a TTY (non-TTY callers such as integ-test\n * fixtures or CI runs already log linearly; a spinner there would\n * emit raw ANSI escapes into the captured log).\n *\n * In either skipped case the spawn proceeds as if `progressLabel` were\n * undefined — the caller's pre-spawn `logger.info(...)` \"Building X...\"\n * line continues to be the only progress signal, which is the\n * pre-spinner behavior and matches what scripts / CI expect.\n *\n * On exit code 0 the spinner stops with the same label and a check\n * mark; on non-zero exit it stops with an error mark before the\n * rejection propagates, so the caller's `try {} catch {}` wrap still\n * sees a clean spinner-less stderr.\n *\n * Concurrency: each `@clack/prompts` spinner instance registers its own\n * `SIGINT` / `SIGTERM` / `exit` / `uncaughtExceptionMonitor` /\n * `unhandledRejection` listeners against `process`. Callers must\n * serialize concurrent spinner-bearing `spawnStreaming` invocations on\n * the same `process.stdout` — two simultaneous spinners overwrite each\n * other's frame line AND accumulate listeners (Node trips its default\n * 10-listener warning at ~3 concurrent spinners). Every cdk-local call\n * site as of this PR is strictly sequential\n * (`runImageOverrideBuilds` for-of, `prepareImages` for-of, ECS\n * Lambda asset builds are one-per-invoke); the future parallel-build\n * path should either drop the label or memoize a single shared spinner.\n */\n progressLabel?: string;\n}\n\n/**\n * Spawn a docker-compatible CLI binary (resolved via `getDockerCmd`) with\n * streaming I/O. Collects stdout/stderr in memory and resolves with both\n * on exit code 0; rejects with a `SpawnError` carrying both streams on any\n * non-zero exit so the caller can wrap with its own error class without\n * losing the upstream output.\n *\n * No `maxBuffer` ceiling: BuildKit progress output frequently exceeds the\n * `child_process.execFile` default of 1 MB (cdk-local previously bumped to 50 MB\n * but BuildKit + frontend pulls can still exceed that on first-time builds).\n */\nexport async function runDockerStreaming(\n args: string[],\n options: RunDockerOptions = {}\n): Promise<SpawnResult> {\n return spawnStreaming(getDockerCmd(), args, options);\n}\n\n/**\n * Generic streaming spawn — used by `runDockerStreaming` AND by the\n * `executable` source mode in `docker-build.ts` (which runs an arbitrary\n * user-supplied build command, not docker).\n */\nexport async function spawnStreaming(\n cmd: string,\n args: string[],\n options: RunDockerOptions = {}\n): Promise<SpawnResult> {\n const streamLive = options.streamLive ?? getLogger().getLevel() === 'debug';\n const env = options.env ? mergeEnv(options.env) : undefined;\n const spin = startProgressSpinner(options.progressLabel, streamLive);\n\n return new Promise<SpawnResult>((resolve, reject) => {\n // Defensive: a synchronous throw from `spawn` (e.g. Node's\n // `ERR_INVALID_ARG_TYPE` on a non-string `cmd`) bypasses the close /\n // error handlers below — without this try/catch the spinner would be\n // left animating until process exit. Today unreachable\n // (`getDockerCmd()` always returns a string + all call-site `args`\n // are `string[]`), but the wrap is free defense-in-depth on a\n // process-launch helper.\n let child;\n try {\n child = spawn(cmd, args, {\n cwd: options.cwd,\n env,\n stdio: [options.input ? 'pipe' : 'ignore', 'pipe', 'pipe'],\n });\n } catch (err) {\n stopProgressSpinner(spin, options.progressLabel);\n reject(err as Error);\n return;\n }\n\n const stdoutChunks: Buffer[] = [];\n const stderrChunks: Buffer[] = [];\n\n child.stdout!.on('data', (chunk: Buffer) => {\n stdoutChunks.push(chunk);\n if (streamLive) process.stdout.write(chunk);\n });\n child.stderr!.on('data', (chunk: Buffer) => {\n stderrChunks.push(chunk);\n if (streamLive) process.stderr.write(chunk);\n });\n\n child.once('error', (err: NodeJS.ErrnoException) => {\n stopProgressSpinner(spin, options.progressLabel);\n if (err.code === 'ENOENT') {\n const usingOverride = process.env['CDK_DOCKER'] === cmd && cmd !== 'docker';\n reject(\n new Error(\n usingOverride\n ? `Failed to find and execute '${cmd}' (resolved via CDK_DOCKER). ` +\n `Install '${cmd}' or unset CDK_DOCKER to fall back to 'docker'.`\n : `Failed to find and execute '${cmd}'. Install Docker (or set the ` +\n `'CDK_DOCKER' environment variable to a compatible binary such as podman / finch).`\n )\n );\n } else {\n reject(err);\n }\n });\n\n child.once('close', (code) => {\n const stdout = Buffer.concat(stdoutChunks).toString('utf-8');\n const stderr = Buffer.concat(stderrChunks).toString('utf-8');\n if (code === 0) {\n stopProgressSpinner(spin, options.progressLabel);\n resolve({ stdout, stderr });\n } else {\n stopProgressSpinner(spin, options.progressLabel);\n const message =\n stderr.trim() || stdout.trim() || `${cmd} ${args[0] ?? ''} exited with code ${code}`;\n const err = new Error(message) as SpawnError;\n err.stderr = stderr;\n err.stdout = stdout;\n err.exitCode = code;\n reject(err);\n }\n });\n\n if (options.input !== undefined) {\n // Defensive: when spawn() fails (e.g. ENOENT race), the synchronous\n // write below could emit a stream 'error' event before the close /\n // error handlers above fire. Without a listener, Node escalates that\n // to \"Unhandled 'error' event\" on some versions. cdk-local's only `input`\n // call site is `docker login --password-stdin` with short payloads\n // that complete well within the syscall, so this is unlikely to fire\n // in practice — but the no-op listener is free.\n child.stdin!.on('error', () => {\n /* surfaced via the outer error/close handlers above */\n });\n child.stdin!.write(options.input);\n child.stdin!.end();\n }\n });\n}\n\ntype ClackSpinner = ReturnType<typeof createSpinner>;\n\n/**\n * Start an interactive clack spinner for the spawn, but only when the\n * current shell would actually render it (TTY) and the caller isn't\n * already streaming live output. Returns `undefined` when either\n * precondition fails — `stopProgressSpinner` then is a no-op.\n *\n * Test seam: the integration with `@clack/prompts` is mocked in\n * `tests/unit/utils/docker-cmd-progress-spinner.test.ts`.\n */\nfunction startProgressSpinner(\n label: string | undefined,\n streamLive: boolean\n): ClackSpinner | undefined {\n if (label === undefined || streamLive || process.stdout.isTTY !== true) return undefined;\n const spin = createSpinner();\n spin.start(label);\n return spin;\n}\n\nfunction stopProgressSpinner(spin: ClackSpinner | undefined, label: string | undefined): void {\n // `@clack/prompts`' `spinner().stop(message?)` only takes the message at\n // the TS-level signature (the runtime impl ignores the optional `code`\n // second arg, hard-coding success), so we mirror its public API. The\n // upstream caller's wrapped error / rejection still surfaces the\n // failure detail; the spinner's only job here is to stop animating\n // cleanly so the error stderr renders on its own fresh line.\n if (spin === undefined) return;\n spin.stop(label ?? '');\n}\n\n/**\n * Spawn a docker-compatible CLI binary (resolved via `getDockerCmd`) attached\n * to the parent process's stdio so the user sees live output (`docker pull`\n * layer progress, `docker login` interactive prompts that should never fire\n * with `--password-stdin` but still safe to inherit, etc.). Resolves on exit\n * code 0; rejects with a plain `Error` carrying the exit code on any non-zero\n * exit, so the caller can wrap with its own error class.\n *\n * Differs from {@link runDockerStreaming} in two ways:\n * 1. `stdio: 'inherit'` — output is NOT captured, so terminal control codes\n * (color, progress bar overwrites) flow through unchanged. This is the\n * load-bearing reason for the split: `docker pull`'s progress bars only\n * animate properly when stdout is a real TTY connected to the parent.\n * 2. No `input` / `streamLive` options — inherit-mode has nothing to\n * capture and nothing to mirror.\n *\n * Used by the `--verbose`-mode `docker pull` plumbing in `docker-runner.ts`\n * and `ecr-puller.ts` (visible layer progress). Non-verbose pulls go through\n * {@link runDockerStreaming} so stderr can be folded into the error message.\n */\nexport async function runDockerForeground(\n args: string[],\n options: ForegroundOptions = {}\n): Promise<void> {\n return spawnForeground(getDockerCmd(), args, options);\n}\n\nexport interface ForegroundOptions {\n /** Optional working directory for the subprocess. */\n cwd?: string;\n /**\n * Additional environment variables to set. Merged on top of `process.env`\n * (same semantics as {@link RunDockerOptions.env}).\n */\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Foreground (stdio-inherit) spawn — the inherit-mode counterpart to\n * {@link spawnStreaming}. Used by {@link runDockerForeground} for docker-CLI\n * subprocesses.\n *\n * The ENOENT branch crafts a docker-specific install hint (\"Install Docker\n * (or set CDK_DOCKER ...)\"), so non-docker callers reusing this helper\n * would see a misleading error on missing-binary failures. Keep the binary\n * docker-shaped, or update the ENOENT message before adding a non-docker\n * call site.\n */\nexport async function spawnForeground(\n cmd: string,\n args: string[],\n options: ForegroundOptions = {}\n): Promise<void> {\n const env = options.env ? mergeEnv(options.env) : undefined;\n return new Promise<void>((resolve, reject) => {\n const child = spawn(cmd, args, {\n cwd: options.cwd,\n env,\n stdio: 'inherit',\n });\n child.once('error', (err: NodeJS.ErrnoException) => {\n if (err.code === 'ENOENT') {\n const usingOverride = process.env['CDK_DOCKER'] === cmd && cmd !== 'docker';\n reject(\n new Error(\n usingOverride\n ? `Failed to find and execute '${cmd}' (resolved via CDK_DOCKER). ` +\n `Install '${cmd}' or unset CDK_DOCKER to fall back to 'docker'.`\n : `Failed to find and execute '${cmd}'. Install Docker (or set the ` +\n `'CDK_DOCKER' environment variable to a compatible binary such as podman / finch).`\n )\n );\n } else {\n reject(new Error(`${cmd} failed: ${err.message}`));\n }\n });\n child.once('close', (code) => {\n if (code === 0) {\n resolve();\n } else {\n reject(new Error(`${cmd} exited with code ${code}`));\n }\n });\n });\n}\n\n/**\n * Format the stderr from a failed `docker login` so the surfaced cdk-local\n * error gives the user an actionable workaround when the underlying\n * failure is a credential-helper persistence bug (which has nothing to\n * do with cdk-local, AWS, or IAM perms — the docker CLI itself fails to\n * save the auth token to the platform's credential store). The most\n * common shape is `osxkeychain` on macOS rejecting an overwrite for\n * an existing entry, but `wincred` (Windows), `pass` (Linux), and\n * `secretservice` (Linux) hit the same class of `Error saving\n * credentials` failure, so the rewritten message stays platform-\n * agnostic — `docker logout <endpoint>` is the correct recovery on\n * every backend.\n *\n * Detected docker / docker-credential-* output patterns:\n * - `error storing credentials - err: exit status 1, out: \\`The\n * specified item already exists in the keychain.\\`` (osxkeychain)\n * - `Error saving credentials: ...` (any backend)\n *\n * Non-matching failures (genuine IAM / network / endpoint problems)\n * pass through with just the stderr trimmed — the original message\n * stays load-bearing for diagnosis.\n */\nexport function formatDockerLoginError(stderr: string, endpoint: string): string {\n const trimmed = stderr.trim();\n const isCredentialHelperFailure =\n trimmed.includes('already exists in the keychain') ||\n trimmed.includes('Error saving credentials');\n if (isCredentialHelperFailure) {\n return (\n `docker's credential helper (osxkeychain on macOS / wincred on Windows / pass / secretservice on Linux) ` +\n `failed to persist the ECR auth token. The \"already exists in the keychain\" / \"Error saving credentials\" ` +\n `output is a known docker-credential-helpers issue — unrelated to ${getEmbedConfig().productName}, AWS credentials, or IAM perms. ` +\n `Quick fix: run \\`docker logout ${endpoint}\\` to clear the stale entry, then retry the ${getEmbedConfig().productName} command. ` +\n `Permanent fix: edit ~/.docker/config.json and remove (or empty) the platform-specific \"credsStore\" entry ` +\n `(e.g. \"osxkeychain\" → \"\" or \"desktop\" on macOS Docker Desktop). ` +\n `Original docker stderr: ${trimmed}`\n );\n }\n return trimmed;\n}\n\nfunction mergeEnv(overrides: Record<string, string | undefined>): NodeJS.ProcessEnv {\n const merged: NodeJS.ProcessEnv = { ...process.env };\n for (const [k, v] of Object.entries(overrides)) {\n if (v === undefined) {\n delete merged[k];\n } else {\n merged[k] = v;\n }\n }\n return merged;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqFA,MAAM,WAAgC;CACpC,SAAS;CACT,YAAY;CACZ,aAAa;CACb,oBAAoB;CACpB,kBAAkB;CAClB,WAAW;CACX,sBAAsB;CACtB,cAAc;CACf;AAED,IAAI,UAA+B;;;;;;;AAQnC,SAAgB,eAAe,QAAoC;CACjE,UAAU;EACR,SAAS,QAAQ,WAAW,SAAS;EACrC,YAAY,QAAQ,cAAc,SAAS;EAC3C,aAAa,QAAQ,eAAe,SAAS;EAC7C,oBAAoB,QAAQ,sBAAsB,SAAS;EAC3D,kBAAkB,QAAQ,oBAAoB,SAAS;EACvD,WAAW,QAAQ,aAAa,SAAS;EACzC,sBAAsB,QAAQ,wBAAwB,SAAS;EAC/D,cAAc,QAAQ,gBAAgB,SAAS;EAChD;;;AAIH,SAAgB,iBAAsC;CACpD,OAAO;;;AAIT,SAAgB,mBAAyB;CACvC,UAAU;;;;;;;;;;;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E,IAAI,MACF,gBACI,+BAA+B,IAAI,wCACrB,IAAI,mDAClB,+BAA+B,IAAI,iHAExC,CACF;UAED,uBAAO,IAAI,MAAM,GAAG,IAAI,WAAW,IAAI,UAAU,CAAC;IAEpD;EACF,MAAM,KAAK,UAAU,SAAS;GAC5B,IAAI,SAAS,GACX,SAAS;QAET,uBAAO,IAAI,MAAM,GAAG,IAAI,oBAAoB,OAAO,CAAC;IAEtD;GACF;;;;;;;;;;;;;;;;;;;;;;;;AAyBJ,SAAgB,uBAAuB,QAAgB,UAA0B;CAC/E,MAAM,UAAU,OAAO,MAAM;CAI7B,IAFE,QAAQ,SAAS,iCAAiC,IAClD,QAAQ,SAAS,2BAA2B,EAE5C,OACE,mRAEoE,gBAAgB,CAAC,YAAY,kEAC/D,SAAS,8CAA8C,gBAAgB,CAAC,YAAY,6MAG3F;CAG/B,OAAO;;AAGT,SAAS,SAAS,WAAkE;CAClF,MAAM,SAA4B,EAAE,GAAG,QAAQ,KAAK;CACpD,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,UAAU,EAC5C,IAAI,MAAM,QACR,OAAO,OAAO;MAEd,OAAO,KAAK;CAGhB,OAAO"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { d as setEmbedConfig, l as getEmbedConfig, u as resetEmbedConfig } from "./docker-cmd-Bo60SLE3.js";
2
- import { $t as createLocalInvokeAgentCoreCommand, Br as resolveCfnRegion, Ct as createLocalRunTaskCommand, Fr as LocalStateSourceError, Hr as CfnLocalStateProvider, Ir as createLocalStateProvider, Jr as listTargets, Lr as isCfnFlagPresent, Mr as substituteAgainstStateAsync, Nr as substituteEnvVarsFromState, O as createLocalStartCloudFrontCommand, Pr as substituteEnvVarsFromStateAsync, Rr as rejectExplicitCfnStackWithMultipleStacks, Sn as createLocalInvokeCommand, T as formatTargetListing, Ur as collectSsmParameterRefs, Vr as resolveCfnStackName, Wr as resolveSsmParameters, a as createLocalStudioCommand, bt as createLocalStartServiceCommand, jr as substituteAgainstState, mt as createLocalStartAlbCommand, qr as countTargets, w as createLocalListCommand, wn as createLocalStartApiCommand, zr as resolveCfnFallbackRegion } from "./local-studio-Cg47A0QX.js";
1
+ import { d as setEmbedConfig, l as getEmbedConfig, u as resetEmbedConfig } from "./docker-cmd-DQyeV02S.js";
2
+ import { $t as createLocalInvokeAgentCoreCommand, Br as resolveCfnRegion, Ct as createLocalRunTaskCommand, Fr as LocalStateSourceError, Hr as CfnLocalStateProvider, Ir as createLocalStateProvider, Jr as listTargets, Lr as isCfnFlagPresent, Mr as substituteAgainstStateAsync, Nr as substituteEnvVarsFromState, O as createLocalStartCloudFrontCommand, Pr as substituteEnvVarsFromStateAsync, Rr as rejectExplicitCfnStackWithMultipleStacks, Sn as createLocalInvokeCommand, T as formatTargetListing, Ur as collectSsmParameterRefs, Vr as resolveCfnStackName, Wr as resolveSsmParameters, a as createLocalStudioCommand, bt as createLocalStartServiceCommand, jr as substituteAgainstState, mt as createLocalStartAlbCommand, qr as countTargets, w as createLocalListCommand, wn as createLocalStartApiCommand, zr as resolveCfnFallbackRegion } from "./local-studio-D5rKurbp.js";
3
3
 
4
4
  export { CfnLocalStateProvider, LocalStateSourceError, collectSsmParameterRefs, countTargets, createLocalInvokeAgentCoreCommand, createLocalInvokeCommand, createLocalListCommand, createLocalRunTaskCommand, createLocalStartAlbCommand, createLocalStartApiCommand, createLocalStartCloudFrontCommand, createLocalStartServiceCommand, createLocalStateProvider, createLocalStudioCommand, formatTargetListing, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resetEmbedConfig, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveSsmParameters, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync };
package/dist/internal.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as isCloudFrontDistribution, $n as attachAuthorizers, $r as parseSelectionExpressionPath, A as parseOriginOverrides, An as buildStageMap, Ar as EcsTaskResolutionError, At as parseMaxTasks, B as startCloudFrontServer, Bn as resolveServiceIntegrationParameters, Bt as resolveImageOverrides, C as addListSpecificOptions, Cn as addStartApiSpecificOptions, Cr as buildDisconnectEvent, D as addStartCloudFrontSpecificOptions, Dn as createAuthorizerCache, Dr as resolveRuntimeCodeMountPath, Dt as addImageOverrideOptions, E as LocalStartCloudFrontError, En as resolveApiTargetSubset, Er as buildContainerImage, Et as addEcsAssumeRoleOptions, F as resolveDeployedKvsArnByName, Fn as filterRoutesByApiIdentifiers, Ft as ImageOverrideError, G as applyEdgeResponseResult, Gn as verifyCognitoJwt, Gr as resolveWatchConfig, Gt as buildCloudMapIndex, H as serveFromStaticOrigin, Hn as buildCognitoJwksUrl, Ht as describePinnedImageUri, I as resolveDeployedOriginBucket, In as groupRoutesByServer, It as buildImageOverrideTag, J as edgeHeadersToHttp, Jn as buildMethodArn, Jt as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, K as buildEdgeRequestEvent, Kn as verifyJwtAuthorizer, Kr as resolveSingleTarget, Kt as CloudMapRegistry, L as classifyS3Error, Ln as readMtlsMaterialsFromDisk, Lt as enforceImageOverrideOrphans, M as idFromArn, Mn as resolveEnvVars, Mt as resolveEcsAssumeRoleOption, N as resolveKvsModulesForDistribution, Nn as availableApiIdentifiers, Nt as resolveSharedSidecarCredentials, On as createFileWatcher, Or as resolveRuntimeFileExtension, Ot as buildEcsImageResolutionContext, P as createDeployedKvsDataSource, Pn as filterRoutesByApiIdentifier, Pt as runEcsServiceEmulator, Q as extractKvsAssociations, Qn as invokeTokenAuthorizer, Qr as filterWebSocketApisByIdentifiers, Qt as addInvokeAgentCoreSpecificOptions, R as createS3OriginReader, Rn as startApiServer, Rt as mergeForService, S as StudioEventBus, Sr as buildConnectEvent, St as addRunTaskSpecificOptions, Tn as createWatchPredicates, Tr as architectureToPlatform, Tt as addCommonEcsServiceOptions, U as serveLambdaUrlOrigin, Un as buildJwksUrlFromIssuer, Ut as isLocalCdkAssetImage, V as resolveErrorResponseCandidates, Vn as defaultCredentialsLoader, Vt as runImageOverrideBuilds, W as applyEdgeRequestResult, Wn as createJwksCache, Wt as listPinnedTargets, X as CLOUDFRONT_DISTRIBUTION_TYPE, Xn as evaluateCachedLambdaPolicy, Xr as discoverWebSocketApis, Xt as getContainerNetworkIp, Y as httpHeadersToEdge, Yn as computeRequestIdentityHash, Yr as availableWebSocketApiIdentifiers, Yt as setShadowReadyTimeoutMs, Z as describeS3OriginDomain, Zn as invokeRequestAuthorizer, Zr as discoverWebSocketApisOrThrow, Zt as attachContainerLogStreamer, _ as filterStudioTargetGroups, _i as buildStsClientConfig, _n as computeCodeImageTag, _r as bufferToBody, _t as isApplicationLoadBalancer, ai as AGENTCORE_AGUI_PROTOCOL, an as MCP_PATH, ar as matchRoute, at as compileCloudFrontFunction, b as renderStudioHtml, bn as classifySourceChange, br as handleConnectionsRequest, c as startStudioProxy, ci as AGENTCORE_RUNTIME_TYPE, cn as parseSseForJsonRpc, cr as buildHttpApiV2Event, ct as stripCloudFrontImport, d as createStudioDispatcher, di as resolveAgentCoreTarget, dn as AGENTCORE_SESSION_ID_HEADER, dr as pickResponseTemplate, dt as createUnboundCloudFrontModule, ei as webSocketApiMatchesIdentifier, en as invokeAgentCoreWs, er as applyCorsResponseHeaders, et as pickFunctionUrlLogicalIdFromOrigin, f as filterStudioCustomResources, fi as derivePseudoParametersFromRegion, fn as invokeAgentCore, fr as selectIntegrationResponse, ft as addAlbSpecificOptions, g as annotatePinnedEcsTargets, gi as LocalInvokeBuildError, gn as buildAgentCoreCodeImage, gr as probeHostGatewaySupport, gt as resolveAlbTarget, h as annotateEcsTaskPinnedTargets, hi as tryResolveImageFnJoin, hn as SUPPORTED_CODE_RUNTIMES, hr as HOST_GATEWAY_MIN_VERSION, ht as parseLbPortOverrides, i as coerceStopRequest, ii as AGENTCORE_A2A_PROTOCOL, in as MCP_CONTAINER_PORT, ir as matchPreflight, it as resolveCloudFrontDistribution, j as resolveCloudFrontTarget, jn as materializeLayerFromArn, jt as parseRestartPolicy, k as parseKvsFileOverrides, kn as attachStageContext, kr as resolveRuntimeImage, kt as ecsClusterOption, l as relayServeRequest, li as AgentCoreResolutionError, ln as AGENTCORE_SIGV4_SERVICE, lr as buildRestV1Event, lt as createCloudFrontModule, m as annotateAlbPinnedBackingServices, mi as substituteImagePlaceholders, mn as downloadAndExtractS3Bundle, mr as VtlEvaluationError, n as coerceRunRequest, ni as pickRefLogicalId, nn as A2A_PATH, nr as buildCorsConfigFromCloudFrontChain, nt as pickLambdaEdgeFunctionLogicalId, o as resolveServeBaseUrl, oi as AGENTCORE_HTTP_PROTOCOL, on as MCP_PROTOCOL_VERSION, or as translateLambdaResponse, ot as runViewerRequest, p as isCustomResourceLambdaTarget, pi as formatStateRemedy, pn as waitForAgentCorePing, pr as tryParseStatus, pt as albStrategy, q as buildEdgeResponseEvent, qn as verifyJwtViaDiscovery, qt as DEFAULT_SHADOW_READY_TIMEOUT_MS, r as coerceServeRequest, ri as resolveLambdaArnIntrinsic, rn as a2aInvokeOnce, rr as isFunctionUrlOacFronted, rt as pickTargetFunctionLogicalId, s as createStudioServeManager, si as AGENTCORE_MCP_PROTOCOL, sn as mcpInvokeOnce, sr as applyAuthorizerOverlay, st as runViewerResponse, t as addStudioSpecificOptions, ti as discoverRoutes, tn as A2A_CONTAINER_PORT, tr as buildCorsConfigByApiId, tt as pickKvsLogicalIdFromArn, u as reinvoke, ui as pickAgentCoreCandidateStack, un as signAgentCoreInvocation, ur as evaluateResponseParameters, ut as createLocalFileKvsDataSource, v as startStudioServer, vi as resolveProfileCredentials, vn as renderCodeDockerfile, vr as ConnectionRegistry, vt as resolveAlbFrontDoor, wr as buildMessageEvent, wt as MAX_TASKS_SUBNET_RANGE_CAP, x as createStudioStore, xn as addInvokeSpecificOptions, xr as parseConnectionsPath, xt as serviceStrategy, y as toStudioTargetGroups, yn as toCmdArgv, yr as buildMgmtEndpointEnvUrl, yt as addStartServiceSpecificOptions, z as matchBehavior, zn as resolveSelectionExpression, zt as parseImageOverrideFlags } from "./local-studio-Cg47A0QX.js";
1
+ import { $ as isCloudFrontDistribution, $n as attachAuthorizers, $r as parseSelectionExpressionPath, A as parseOriginOverrides, An as buildStageMap, Ar as EcsTaskResolutionError, At as parseMaxTasks, B as startCloudFrontServer, Bn as resolveServiceIntegrationParameters, Bt as resolveImageOverrides, C as addListSpecificOptions, Cn as addStartApiSpecificOptions, Cr as buildDisconnectEvent, D as addStartCloudFrontSpecificOptions, Dn as createAuthorizerCache, Dr as resolveRuntimeCodeMountPath, Dt as addImageOverrideOptions, E as LocalStartCloudFrontError, En as resolveApiTargetSubset, Er as buildContainerImage, Et as addEcsAssumeRoleOptions, F as resolveDeployedKvsArnByName, Fn as filterRoutesByApiIdentifiers, Ft as ImageOverrideError, G as applyEdgeResponseResult, Gn as verifyCognitoJwt, Gr as resolveWatchConfig, Gt as buildCloudMapIndex, H as serveFromStaticOrigin, Hn as buildCognitoJwksUrl, Ht as describePinnedImageUri, I as resolveDeployedOriginBucket, In as groupRoutesByServer, It as buildImageOverrideTag, J as edgeHeadersToHttp, Jn as buildMethodArn, Jt as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, K as buildEdgeRequestEvent, Kn as verifyJwtAuthorizer, Kr as resolveSingleTarget, Kt as CloudMapRegistry, L as classifyS3Error, Ln as readMtlsMaterialsFromDisk, Lt as enforceImageOverrideOrphans, M as idFromArn, Mn as resolveEnvVars, Mt as resolveEcsAssumeRoleOption, N as resolveKvsModulesForDistribution, Nn as availableApiIdentifiers, Nt as resolveSharedSidecarCredentials, On as createFileWatcher, Or as resolveRuntimeFileExtension, Ot as buildEcsImageResolutionContext, P as createDeployedKvsDataSource, Pn as filterRoutesByApiIdentifier, Pt as runEcsServiceEmulator, Q as extractKvsAssociations, Qn as invokeTokenAuthorizer, Qr as filterWebSocketApisByIdentifiers, Qt as addInvokeAgentCoreSpecificOptions, R as createS3OriginReader, Rn as startApiServer, Rt as mergeForService, S as StudioEventBus, Sr as buildConnectEvent, St as addRunTaskSpecificOptions, Tn as createWatchPredicates, Tr as architectureToPlatform, Tt as addCommonEcsServiceOptions, U as serveLambdaUrlOrigin, Un as buildJwksUrlFromIssuer, Ut as isLocalCdkAssetImage, V as resolveErrorResponseCandidates, Vn as defaultCredentialsLoader, Vt as runImageOverrideBuilds, W as applyEdgeRequestResult, Wn as createJwksCache, Wt as listPinnedTargets, X as CLOUDFRONT_DISTRIBUTION_TYPE, Xn as evaluateCachedLambdaPolicy, Xr as discoverWebSocketApis, Xt as getContainerNetworkIp, Y as httpHeadersToEdge, Yn as computeRequestIdentityHash, Yr as availableWebSocketApiIdentifiers, Yt as setShadowReadyTimeoutMs, Z as describeS3OriginDomain, Zn as invokeRequestAuthorizer, Zr as discoverWebSocketApisOrThrow, Zt as attachContainerLogStreamer, _ as filterStudioTargetGroups, _i as buildStsClientConfig, _n as computeCodeImageTag, _r as bufferToBody, _t as isApplicationLoadBalancer, ai as AGENTCORE_AGUI_PROTOCOL, an as MCP_PATH, ar as matchRoute, at as compileCloudFrontFunction, b as renderStudioHtml, bn as classifySourceChange, br as handleConnectionsRequest, c as startStudioProxy, ci as AGENTCORE_RUNTIME_TYPE, cn as parseSseForJsonRpc, cr as buildHttpApiV2Event, ct as stripCloudFrontImport, d as createStudioDispatcher, di as resolveAgentCoreTarget, dn as AGENTCORE_SESSION_ID_HEADER, dr as pickResponseTemplate, dt as createUnboundCloudFrontModule, ei as webSocketApiMatchesIdentifier, en as invokeAgentCoreWs, er as applyCorsResponseHeaders, et as pickFunctionUrlLogicalIdFromOrigin, f as filterStudioCustomResources, fi as derivePseudoParametersFromRegion, fn as invokeAgentCore, fr as selectIntegrationResponse, ft as addAlbSpecificOptions, g as annotatePinnedEcsTargets, gi as LocalInvokeBuildError, gn as buildAgentCoreCodeImage, gr as probeHostGatewaySupport, gt as resolveAlbTarget, h as annotateEcsTaskPinnedTargets, hi as tryResolveImageFnJoin, hn as SUPPORTED_CODE_RUNTIMES, hr as HOST_GATEWAY_MIN_VERSION, ht as parseLbPortOverrides, i as coerceStopRequest, ii as AGENTCORE_A2A_PROTOCOL, in as MCP_CONTAINER_PORT, ir as matchPreflight, it as resolveCloudFrontDistribution, j as resolveCloudFrontTarget, jn as materializeLayerFromArn, jt as parseRestartPolicy, k as parseKvsFileOverrides, kn as attachStageContext, kr as resolveRuntimeImage, kt as ecsClusterOption, l as relayServeRequest, li as AgentCoreResolutionError, ln as AGENTCORE_SIGV4_SERVICE, lr as buildRestV1Event, lt as createCloudFrontModule, m as annotateAlbPinnedBackingServices, mi as substituteImagePlaceholders, mn as downloadAndExtractS3Bundle, mr as VtlEvaluationError, n as coerceRunRequest, ni as pickRefLogicalId, nn as A2A_PATH, nr as buildCorsConfigFromCloudFrontChain, nt as pickLambdaEdgeFunctionLogicalId, o as resolveServeBaseUrl, oi as AGENTCORE_HTTP_PROTOCOL, on as MCP_PROTOCOL_VERSION, or as translateLambdaResponse, ot as runViewerRequest, p as isCustomResourceLambdaTarget, pi as formatStateRemedy, pn as waitForAgentCorePing, pr as tryParseStatus, pt as albStrategy, q as buildEdgeResponseEvent, qn as verifyJwtViaDiscovery, qt as DEFAULT_SHADOW_READY_TIMEOUT_MS, r as coerceServeRequest, ri as resolveLambdaArnIntrinsic, rn as a2aInvokeOnce, rr as isFunctionUrlOacFronted, rt as pickTargetFunctionLogicalId, s as createStudioServeManager, si as AGENTCORE_MCP_PROTOCOL, sn as mcpInvokeOnce, sr as applyAuthorizerOverlay, st as runViewerResponse, t as addStudioSpecificOptions, ti as discoverRoutes, tn as A2A_CONTAINER_PORT, tr as buildCorsConfigByApiId, tt as pickKvsLogicalIdFromArn, u as reinvoke, ui as pickAgentCoreCandidateStack, un as signAgentCoreInvocation, ur as evaluateResponseParameters, ut as createLocalFileKvsDataSource, v as startStudioServer, vi as resolveProfileCredentials, vn as renderCodeDockerfile, vr as ConnectionRegistry, vt as resolveAlbFrontDoor, wr as buildMessageEvent, wt as MAX_TASKS_SUBNET_RANGE_CAP, x as createStudioStore, xn as addInvokeSpecificOptions, xr as parseConnectionsPath, xt as serviceStrategy, y as toStudioTargetGroups, yn as toCmdArgv, yr as buildMgmtEndpointEnvUrl, yt as addStartServiceSpecificOptions, z as matchBehavior, zn as resolveSelectionExpression, zt as parseImageOverrideFlags } from "./local-studio-D5rKurbp.js";
2
2
 
3
3
  export { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, AgentCoreResolutionError, CLOUDFRONT_DISTRIBUTION_TYPE, CloudMapRegistry, ConnectionRegistry, DEFAULT_SHADOW_READY_TIMEOUT_MS, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, ImageOverrideError, LocalInvokeBuildError, LocalStartCloudFrontError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, SOFT_RELOAD_COMPLETION_LOG_SUFFIX, SUPPORTED_CODE_RUNTIMES, StudioEventBus, VtlEvaluationError, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addEcsAssumeRoleOptions, addImageOverrideOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartApiSpecificOptions, addStartCloudFrontSpecificOptions, addStartServiceSpecificOptions, addStudioSpecificOptions, albStrategy, annotateAlbPinnedBackingServices, annotateEcsTaskPinnedTargets, annotatePinnedEcsTargets, applyAuthorizerOverlay, applyCorsResponseHeaders, applyEdgeRequestResult, applyEdgeResponseResult, architectureToPlatform, attachAuthorizers, attachContainerLogStreamer, attachStageContext, availableApiIdentifiers, availableWebSocketApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildEdgeRequestEvent, buildEdgeResponseEvent, buildHttpApiV2Event, buildImageOverrideTag, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, buildStsClientConfig, classifyS3Error, classifySourceChange, coerceRunRequest, coerceServeRequest, coerceStopRequest, compileCloudFrontFunction, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createCloudFrontModule, createDeployedKvsDataSource, createFileWatcher, createJwksCache, createLocalFileKvsDataSource, createS3OriginReader, createStudioDispatcher, createStudioServeManager, createStudioStore, createUnboundCloudFrontModule, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, describePinnedImageUri, describeS3OriginDomain, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, ecsClusterOption, edgeHeadersToHttp, enforceImageOverrideOrphans, evaluateCachedLambdaPolicy, evaluateResponseParameters, extractKvsAssociations, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, filterStudioCustomResources, filterStudioTargetGroups, filterWebSocketApisByIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, httpHeadersToEdge, idFromArn, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isCloudFrontDistribution, isCustomResourceLambdaTarget, isFunctionUrlOacFronted, isLocalCdkAssetImage, listPinnedTargets, matchBehavior, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, mergeForService, parseConnectionsPath, parseImageOverrideFlags, parseKvsFileOverrides, parseLbPortOverrides, parseMaxTasks, parseOriginOverrides, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickFunctionUrlLogicalIdFromOrigin, pickKvsLogicalIdFromArn, pickLambdaEdgeFunctionLogicalId, pickRefLogicalId, pickResponseTemplate, pickTargetFunctionLogicalId, probeHostGatewaySupport, readMtlsMaterialsFromDisk, reinvoke, relayServeRequest, renderCodeDockerfile, renderStudioHtml, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveCloudFrontDistribution, resolveCloudFrontTarget, resolveDeployedKvsArnByName, resolveDeployedOriginBucket, resolveEcsAssumeRoleOption, resolveEnvVars, resolveErrorResponseCandidates, resolveImageOverrides, resolveKvsModulesForDistribution, resolveLambdaArnIntrinsic, resolveProfileCredentials, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServeBaseUrl, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, runImageOverrideBuilds, runViewerRequest, runViewerResponse, selectIntegrationResponse, serveFromStaticOrigin, serveLambdaUrlOrigin, serviceStrategy, setShadowReadyTimeoutMs, signAgentCoreInvocation, startApiServer, startCloudFrontServer, startStudioProxy, startStudioServer, stripCloudFrontImport, substituteImagePlaceholders, toCmdArgv, toStudioTargetGroups, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCorePing, webSocketApiMatchesIdentifier };
@@ -1,10 +1,11 @@
1
- import { a as runDockerStreaming, c as resolveConfiguredLogLevel, d as setEmbedConfig, i as runDockerForeground, l as getEmbedConfig, n as formatDockerLoginError, o as spawnStreaming, r as getDockerCmd, s as getLogger } from "./docker-cmd-Bo60SLE3.js";
1
+ import { a as runDockerStreaming, c as resolveConfiguredLogLevel, d as setEmbedConfig, i as runDockerForeground, l as getEmbedConfig, n as formatDockerLoginError, o as spawnStreaming, r as getDockerCmd, s as getLogger } from "./docker-cmd-DQyeV02S.js";
2
2
  import { cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
3
3
  import { homedir, tmpdir } from "node:os";
4
4
  import * as path$1 from "node:path";
5
5
  import path, { dirname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
6
6
  import { Command, Option } from "commander";
7
7
  import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
8
+ import { unzipSync } from "fflate";
8
9
  import { MultiSelectPrompt } from "@clack/core";
9
10
  import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_ACTIVE, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED, confirm, isCancel, multiselect, select, text } from "@clack/prompts";
10
11
  import { AssetManifestArtifact } from "@aws-cdk/cloud-assembly-api";
@@ -29,7 +30,6 @@ import { createServer as createServer$2 } from "node:https";
29
30
  import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
30
31
  import { pipeline } from "node:stream/promises";
31
32
  import * as chokidar from "chokidar";
32
- import { unzipSync } from "fflate";
33
33
  import { Sha256 } from "@aws-crypto/sha256-js";
34
34
  import { SignatureV4 } from "@smithy/signature-v4";
35
35
  import graphlib from "graphlib";
@@ -1011,7 +1011,7 @@ function extractLambdaProperties(stack, logicalId, resource, resources) {
1011
1011
  if (!handler) throw new LocalInvokeResolutionError(`Lambda '${logicalId}' has no Handler property.`);
1012
1012
  const inlineCode = typeof code["ZipFile"] === "string" ? code["ZipFile"] : void 0;
1013
1013
  let codePath = null;
1014
- if (!inlineCode) codePath = resolveAssetCodePath$1(stack, logicalId, resource);
1014
+ if (!inlineCode) codePath = resolveAssetCodePath$1(stack, logicalId, resource, { allowZip: true });
1015
1015
  const layers = resolveLambdaLayers(stack, logicalId, props);
1016
1016
  return {
1017
1017
  kind: "zip",
@@ -1155,13 +1155,63 @@ function extractImageLambdaProperties(args) {
1155
1155
  * Lambdas; absence usually means the user pre-synthesized with a different
1156
1156
  * cdk.out and pointed `--output` at a stale one).
1157
1157
  */
1158
- function resolveAssetCodePath$1(stack, logicalId, resource) {
1158
+ function resolveAssetCodePath$1(stack, logicalId, resource, options = {}) {
1159
1159
  const assetPath = resource.Metadata?.["aws:asset:path"];
1160
1160
  if (typeof assetPath !== "string" || assetPath.length === 0) throw new LocalInvokeResolutionError(`Lambda '${logicalId}' has no Metadata['aws:asset:path']. ${getEmbedConfig().cliName} invoke needs this hint to find the local asset directory. Re-synthesize the app (without \`--output <stale-dir>\`) and retry.`);
1161
1161
  const cdkOutDir = stack.assetManifestPath ? dirname(stack.assetManifestPath) : process.cwd();
1162
1162
  const abs = isAbsolute(assetPath) ? assetPath : resolve(cdkOutDir, assetPath);
1163
- if (!existsSync(abs) || !statSync(abs).isDirectory()) throw new LocalInvokeResolutionError(`Lambda '${logicalId}' asset directory '${abs}' does not exist or is not a directory. Re-synthesize the app and retry.`);
1164
- return abs;
1163
+ if (!existsSync(abs)) throw new LocalInvokeResolutionError(`Lambda '${logicalId}' asset path '${abs}' does not exist. Re-synthesize the app and retry.`);
1164
+ const stat = statSync(abs);
1165
+ if (stat.isDirectory()) return abs;
1166
+ if (options.allowZip && stat.isFile() && abs.toLowerCase().endsWith(".zip")) return abs;
1167
+ throw new LocalInvokeResolutionError(`Lambda '${logicalId}' asset path '${abs}' is not a directory` + (options.allowZip ? " or a .zip archive" : "") + ". Re-synthesize the app and retry.");
1168
+ }
1169
+ /**
1170
+ * Turn a resolved function-code asset path into a directory ready to
1171
+ * bind-mount into the Lambda container.
1172
+ *
1173
+ * Most CDK Lambda assets are already-unzipped directories (`asset.<hash>/`)
1174
+ * that bind-mount directly — those pass through untouched. But a
1175
+ * ZIP-packaged asset (`Code.fromAsset('bundle.zip')`, or a bundling that
1176
+ * emits a zip) is staged as `asset.<hash>.zip` and `aws:asset:path` points at
1177
+ * the zip FILE. Docker cannot bind-mount a zip file as a directory, so we
1178
+ * extract it to a fresh temp dir on demand and return that for the mount.
1179
+ *
1180
+ * Used by `cdkl invoke`, `cdkl start-api`, and the front-door Lambda runner —
1181
+ * the three places that bind-mount a ZIP Lambda's code — so all agree on the
1182
+ * zip handling. The returned `tmpDir` (when set) is threaded into the caller's
1183
+ * existing tmpdir cleanup.
1184
+ */
1185
+ function materializeAssetCodeDir(codePath) {
1186
+ if (!existsSync(codePath)) throw new LocalInvokeResolutionError(`Lambda asset path '${codePath}' does not exist. Re-synthesize the app and retry.`);
1187
+ if (statSync(codePath).isDirectory()) return { dir: codePath };
1188
+ let files;
1189
+ try {
1190
+ files = unzipSync(readFileSync(codePath));
1191
+ } catch (err) {
1192
+ throw new LocalInvokeResolutionError(`Lambda asset '${codePath}' is a file but could not be read as a ZIP archive: ${err instanceof Error ? err.message : String(err)}. Re-synthesize the app and retry.`);
1193
+ }
1194
+ const dir = mkdtempSync(join(tmpdir(), `${getEmbedConfig().resourceNamePrefix}-lambda-zip-`));
1195
+ for (const [name, content] of Object.entries(files)) {
1196
+ if (name.endsWith("/")) continue;
1197
+ const dest = resolveSafeZipEntryPath(dir, name);
1198
+ mkdirSync(dirname(dest), { recursive: true });
1199
+ writeFileSync(dest, content);
1200
+ }
1201
+ return {
1202
+ dir,
1203
+ tmpDir: dir
1204
+ };
1205
+ }
1206
+ /**
1207
+ * Guard against zip-slip: reject an entry whose normalized path escapes the
1208
+ * extraction root (e.g. `../../etc/passwd`).
1209
+ */
1210
+ function resolveSafeZipEntryPath(root, entry) {
1211
+ const dest = normalize(join(root, entry));
1212
+ const rootWithSep = root.endsWith(sep) ? root : root + sep;
1213
+ if (dest !== root && !dest.startsWith(rootWithSep)) throw new LocalInvokeResolutionError(`Refusing to extract a Lambda ZIP asset entry that escapes the target dir: '${entry}'.`);
1214
+ return dest;
1165
1215
  }
1166
1216
  /**
1167
1217
  * Resolve a Lambda's `Properties.Layers` references to local asset
@@ -16269,7 +16319,11 @@ async function buildContainerSpec(args) {
16269
16319
  let imageRef;
16270
16320
  let platform;
16271
16321
  if (lambda.kind === "zip") {
16272
- codeDir = lambda.codePath ?? materializeInlineCode$2(lambda.handler, lambda.inlineCode ?? "", resolveRuntimeFileExtension(lambda.runtime), inlineTmpDirs);
16322
+ if (lambda.codePath) {
16323
+ const materialized = materializeAssetCodeDir(lambda.codePath);
16324
+ codeDir = materialized.dir;
16325
+ if (materialized.tmpDir) inlineTmpDirs.add(materialized.tmpDir);
16326
+ } else codeDir = materializeInlineCode$2(lambda.handler, lambda.inlineCode ?? "", resolveRuntimeFileExtension(lambda.runtime), inlineTmpDirs);
16273
16327
  optDir = await materializeLambdaLayers$1(lambda.layers, layerTmpDirs, layerRoleArn);
16274
16328
  } else {
16275
16329
  imageRef = (await resolveContainerImageForStartApi(lambda, skipPull, args.profile, {
@@ -17205,6 +17259,14 @@ async function localInvokeCommand(target, options, extraStateProviders) {
17205
17259
  } catch (err) {
17206
17260
  getLogger().debug(`Failed to remove inline-code tmpdir ${imagePlan.inlineTmpDir}: ${err instanceof Error ? err.message : String(err)}`);
17207
17261
  }
17262
+ if (imagePlan?.assetTmpDir) try {
17263
+ rmSync(imagePlan.assetTmpDir, {
17264
+ recursive: true,
17265
+ force: true
17266
+ });
17267
+ } catch (err) {
17268
+ getLogger().debug(`Failed to remove zip-asset tmpdir ${imagePlan.assetTmpDir}: ${err instanceof Error ? err.message : String(err)}`);
17269
+ }
17208
17270
  if (imagePlan?.layersTmpDir) try {
17209
17271
  rmSync(imagePlan.layersTmpDir, {
17210
17272
  recursive: true,
@@ -17322,10 +17384,15 @@ async function resolveImagePlan(lambda, options) {
17322
17384
  }
17323
17385
  async function resolveZipImagePlan$1(lambda, options) {
17324
17386
  let inlineTmpDir;
17387
+ let assetTmpDir;
17325
17388
  let codeDir = lambda.codePath;
17326
17389
  if (codeDir === null) {
17327
17390
  inlineTmpDir = materializeInlineCode$1(lambda.handler, lambda.inlineCode ?? "", resolveRuntimeFileExtension(lambda.runtime));
17328
17391
  codeDir = inlineTmpDir;
17392
+ } else {
17393
+ const materialized = materializeAssetCodeDir(codeDir);
17394
+ codeDir = materialized.dir;
17395
+ assetTmpDir = materialized.tmpDir;
17329
17396
  }
17330
17397
  const image = resolveRuntimeImage(lambda.runtime);
17331
17398
  await pullImage(image, options.pull === false);
@@ -17342,6 +17409,7 @@ async function resolveZipImagePlan$1(lambda, options) {
17342
17409
  extraMounts: layerPlan.mount ? [layerPlan.mount] : [],
17343
17410
  cmd: [lambda.handler],
17344
17411
  ...inlineTmpDir !== void 0 && { inlineTmpDir },
17412
+ ...assetTmpDir !== void 0 && { assetTmpDir },
17345
17413
  ...layerPlan.tmpDir !== void 0 && { layersTmpDir: layerPlan.tmpDir },
17346
17414
  ...layerPlan.extraTmpDirs.length > 0 && { layerArnTmpDirs: layerPlan.extraTmpDirs },
17347
17415
  ...tmpfs !== void 0 && { tmpfs }
@@ -22428,7 +22496,7 @@ async function softReloadReplica(args) {
22428
22496
  const defaultDockerInspectWorkdirImpl = async (containerId) => {
22429
22497
  const { execFile } = await import("node:child_process");
22430
22498
  const { promisify } = await import("node:util");
22431
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22499
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22432
22500
  const { stdout } = await promisify(execFile)(getDockerCmd(), [
22433
22501
  "inspect",
22434
22502
  "--format",
@@ -22447,7 +22515,7 @@ let dockerInspectWorkdirImpl = defaultDockerInspectWorkdirImpl;
22447
22515
  const defaultDockerCpImpl = async (src, dst) => {
22448
22516
  const { execFile } = await import("node:child_process");
22449
22517
  const { promisify } = await import("node:util");
22450
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22518
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22451
22519
  await promisify(execFile)(getDockerCmd(), [
22452
22520
  "cp",
22453
22521
  src,
@@ -22462,7 +22530,7 @@ let dockerCpImpl = defaultDockerCpImpl;
22462
22530
  const defaultDockerRestartImpl = async (containerId) => {
22463
22531
  const { execFile } = await import("node:child_process");
22464
22532
  const { promisify } = await import("node:util");
22465
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22533
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22466
22534
  await promisify(execFile)(getDockerCmd(), ["restart", containerId]);
22467
22535
  };
22468
22536
  let dockerRestartImpl = defaultDockerRestartImpl;
@@ -22502,7 +22570,7 @@ async function disconnectOldFromSharedNetwork(oldInstance) {
22502
22570
  const defaultDockerNetworkDisconnectImpl = async (networkName, containerId) => {
22503
22571
  const { execFile } = await import("node:child_process");
22504
22572
  const { promisify } = await import("node:util");
22505
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22573
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22506
22574
  await promisify(execFile)(getDockerCmd(), [
22507
22575
  "network",
22508
22576
  "disconnect",
@@ -22679,7 +22747,7 @@ function pickEssentialContainerId(instance, service) {
22679
22747
  const defaultWaitForExitImpl = async (containerId) => {
22680
22748
  const { execFile } = await import("node:child_process");
22681
22749
  const { promisify } = await import("node:util");
22682
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22750
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22683
22751
  const { stdout } = await promisify(execFile)(getDockerCmd(), ["wait", containerId], { maxBuffer: 1024 * 1024 });
22684
22752
  const code = parseInt(stdout.trim(), 10);
22685
22753
  return Number.isFinite(code) ? code : -1;
@@ -22699,7 +22767,7 @@ const EXIT_LOG_TAIL_LINES = 50;
22699
22767
  const defaultReadContainerLogsImpl = async (containerId) => {
22700
22768
  const { execFile } = await import("node:child_process");
22701
22769
  const { promisify } = await import("node:util");
22702
- const { getDockerCmd } = await import("./docker-cmd-Bo60SLE3.js").then((n) => n.t);
22770
+ const { getDockerCmd } = await import("./docker-cmd-DQyeV02S.js").then((n) => n.t);
22703
22771
  const { stdout, stderr } = await promisify(execFile)(getDockerCmd(), [
22704
22772
  "logs",
22705
22773
  "--tail",
@@ -24449,10 +24517,15 @@ function materializeInlineCode(handler, source, fileExtension) {
24449
24517
  }
24450
24518
  async function resolveZipImagePlan(lambda, opts) {
24451
24519
  let inlineTmpDir;
24520
+ let assetTmpDir;
24452
24521
  let codeDir = lambda.codePath;
24453
24522
  if (codeDir === null) {
24454
24523
  inlineTmpDir = materializeInlineCode(lambda.handler, lambda.inlineCode ?? "", resolveRuntimeFileExtension(lambda.runtime));
24455
24524
  codeDir = inlineTmpDir;
24525
+ } else {
24526
+ const materialized = materializeAssetCodeDir(codeDir);
24527
+ codeDir = materialized.dir;
24528
+ assetTmpDir = materialized.tmpDir;
24456
24529
  }
24457
24530
  const image = resolveRuntimeImage(lambda.runtime);
24458
24531
  await pullImage(image, opts.skipPull === true);
@@ -24465,7 +24538,8 @@ async function resolveZipImagePlan(lambda, opts) {
24465
24538
  readOnly: true
24466
24539
  }],
24467
24540
  cmd: [lambda.handler],
24468
- ...inlineTmpDir !== void 0 && { inlineTmpDir }
24541
+ ...inlineTmpDir !== void 0 && { inlineTmpDir },
24542
+ ...assetTmpDir !== void 0 && { assetTmpDir }
24469
24543
  };
24470
24544
  }
24471
24545
  async function resolveContainerImagePlan(lambda, opts) {
@@ -24592,6 +24666,14 @@ function createFrontDoorLambdaRunner(lambda, opts) {
24592
24666
  } catch (err) {
24593
24667
  logger.debug(`Failed to remove inline-code tmpdir ${plan.inlineTmpDir}: ${err instanceof Error ? err.message : String(err)}`);
24594
24668
  }
24669
+ if (plan?.assetTmpDir) try {
24670
+ rmSync(plan.assetTmpDir, {
24671
+ recursive: true,
24672
+ force: true
24673
+ });
24674
+ } catch (err) {
24675
+ logger.debug(`Failed to remove zip-asset tmpdir ${plan.assetTmpDir}: ${err instanceof Error ? err.message : String(err)}`);
24676
+ }
24595
24677
  }
24596
24678
  };
24597
24679
  }
@@ -35562,4 +35644,4 @@ function addStudioSpecificOptions(cmd) {
35562
35644
 
35563
35645
  //#endregion
35564
35646
  export { isCloudFrontDistribution as $, attachAuthorizers as $n, parseSelectionExpressionPath as $r, createLocalInvokeAgentCoreCommand as $t, parseOriginOverrides as A, buildStageMap as An, EcsTaskResolutionError as Ar, parseMaxTasks as At, startCloudFrontServer as B, resolveServiceIntegrationParameters as Bn, resolveCfnRegion as Br, resolveImageOverrides as Bt, addListSpecificOptions as C, addStartApiSpecificOptions as Cn, buildDisconnectEvent as Cr, createLocalRunTaskCommand as Ct, addStartCloudFrontSpecificOptions as D, createAuthorizerCache as Dn, resolveRuntimeCodeMountPath as Dr, addImageOverrideOptions as Dt, LocalStartCloudFrontError as E, resolveApiTargetSubset as En, buildContainerImage as Er, addEcsAssumeRoleOptions as Et, resolveDeployedKvsArnByName as F, filterRoutesByApiIdentifiers as Fn, LocalStateSourceError as Fr, ImageOverrideError as Ft, applyEdgeResponseResult as G, verifyCognitoJwt as Gn, resolveWatchConfig as Gr, buildCloudMapIndex as Gt, serveFromStaticOrigin as H, buildCognitoJwksUrl as Hn, CfnLocalStateProvider as Hr, describePinnedImageUri as Ht, resolveDeployedOriginBucket as I, groupRoutesByServer as In, createLocalStateProvider as Ir, buildImageOverrideTag as It, edgeHeadersToHttp as J, buildMethodArn as Jn, listTargets as Jr, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Jt, buildEdgeRequestEvent as K, verifyJwtAuthorizer as Kn, resolveSingleTarget as Kr, CloudMapRegistry as Kt, classifyS3Error as L, readMtlsMaterialsFromDisk as Ln, isCfnFlagPresent as Lr, enforceImageOverrideOrphans as Lt, idFromArn as M, resolveEnvVars$1 as Mn, substituteAgainstStateAsync as Mr, resolveEcsAssumeRoleOption as Mt, resolveKvsModulesForDistribution as N, availableApiIdentifiers as Nn, substituteEnvVarsFromState as Nr, resolveSharedSidecarCredentials as Nt, createLocalStartCloudFrontCommand as O, createFileWatcher as On, resolveRuntimeFileExtension as Or, buildEcsImageResolutionContext$1 as Ot, createDeployedKvsDataSource as P, filterRoutesByApiIdentifier as Pn, substituteEnvVarsFromStateAsync as Pr, runEcsServiceEmulator as Pt, extractKvsAssociations as Q, invokeTokenAuthorizer as Qn, filterWebSocketApisByIdentifiers as Qr, addInvokeAgentCoreSpecificOptions as Qt, createS3OriginReader as R, startApiServer as Rn, rejectExplicitCfnStackWithMultipleStacks as Rr, mergeForService as Rt, StudioEventBus as S, createLocalInvokeCommand as Sn, buildConnectEvent as Sr, addRunTaskSpecificOptions as St, formatTargetListing as T, createWatchPredicates as Tn, architectureToPlatform as Tr, addCommonEcsServiceOptions as Tt, serveLambdaUrlOrigin as U, buildJwksUrlFromIssuer as Un, collectSsmParameterRefs as Ur, isLocalCdkAssetImage as Ut, resolveErrorResponseCandidates as V, defaultCredentialsLoader as Vn, resolveCfnStackName as Vr, runImageOverrideBuilds as Vt, applyEdgeRequestResult as W, createJwksCache as Wn, resolveSsmParameters as Wr, listPinnedTargets as Wt, CLOUDFRONT_DISTRIBUTION_TYPE as X, evaluateCachedLambdaPolicy as Xn, discoverWebSocketApis as Xr, getContainerNetworkIp as Xt, httpHeadersToEdge as Y, computeRequestIdentityHash as Yn, availableWebSocketApiIdentifiers as Yr, setShadowReadyTimeoutMs as Yt, describeS3OriginDomain as Z, invokeRequestAuthorizer as Zn, discoverWebSocketApisOrThrow as Zr, attachContainerLogStreamer as Zt, filterStudioTargetGroups as _, buildStsClientConfig as _i, computeCodeImageTag as _n, bufferToBody as _r, isApplicationLoadBalancer as _t, createLocalStudioCommand as a, AGENTCORE_AGUI_PROTOCOL as ai, MCP_PATH as an, matchRoute as ar, compileCloudFrontFunction as at, renderStudioHtml as b, classifySourceChange as bn, handleConnectionsRequest as br, createLocalStartServiceCommand as bt, startStudioProxy as c, AGENTCORE_RUNTIME_TYPE as ci, parseSseForJsonRpc as cn, buildHttpApiV2Event as cr, stripCloudFrontImport as ct, createStudioDispatcher as d, resolveAgentCoreTarget as di, AGENTCORE_SESSION_ID_HEADER as dn, pickResponseTemplate as dr, createUnboundCloudFrontModule as dt, webSocketApiMatchesIdentifier as ei, invokeAgentCoreWs as en, applyCorsResponseHeaders as er, pickFunctionUrlLogicalIdFromOrigin as et, filterStudioCustomResources as f, derivePseudoParametersFromRegion as fi, invokeAgentCore as fn, selectIntegrationResponse as fr, addAlbSpecificOptions as ft, annotatePinnedEcsTargets as g, LocalInvokeBuildError as gi, buildAgentCoreCodeImage as gn, probeHostGatewaySupport as gr, resolveAlbTarget as gt, annotateEcsTaskPinnedTargets as h, tryResolveImageFnJoin as hi, SUPPORTED_CODE_RUNTIMES as hn, HOST_GATEWAY_MIN_VERSION as hr, parseLbPortOverrides as ht, coerceStopRequest as i, AGENTCORE_A2A_PROTOCOL as ii, MCP_CONTAINER_PORT as in, matchPreflight as ir, resolveCloudFrontDistribution as it, resolveCloudFrontTarget as j, materializeLayerFromArn as jn, substituteAgainstState as jr, parseRestartPolicy as jt, parseKvsFileOverrides as k, attachStageContext as kn, resolveRuntimeImage as kr, ecsClusterOption as kt, relayServeRequest as l, AgentCoreResolutionError as li, AGENTCORE_SIGV4_SERVICE as ln, buildRestV1Event as lr, createCloudFrontModule as lt, annotateAlbPinnedBackingServices as m, substituteImagePlaceholders as mi, downloadAndExtractS3Bundle as mn, VtlEvaluationError as mr, createLocalStartAlbCommand as mt, coerceRunRequest as n, pickRefLogicalId as ni, A2A_PATH as nn, buildCorsConfigFromCloudFrontChain as nr, pickLambdaEdgeFunctionLogicalId as nt, resolveServeBaseUrl as o, AGENTCORE_HTTP_PROTOCOL as oi, MCP_PROTOCOL_VERSION as on, translateLambdaResponse as or, runViewerRequest as ot, isCustomResourceLambdaTarget as p, formatStateRemedy as pi, waitForAgentCorePing as pn, tryParseStatus as pr, albStrategy as pt, buildEdgeResponseEvent as q, verifyJwtViaDiscovery as qn, countTargets as qr, DEFAULT_SHADOW_READY_TIMEOUT_MS as qt, coerceServeRequest as r, resolveLambdaArnIntrinsic as ri, a2aInvokeOnce as rn, isFunctionUrlOacFronted as rr, pickTargetFunctionLogicalId as rt, createStudioServeManager as s, AGENTCORE_MCP_PROTOCOL as si, mcpInvokeOnce as sn, applyAuthorizerOverlay as sr, runViewerResponse as st, addStudioSpecificOptions as t, discoverRoutes as ti, A2A_CONTAINER_PORT as tn, buildCorsConfigByApiId as tr, pickKvsLogicalIdFromArn as tt, reinvoke as u, pickAgentCoreCandidateStack as ui, signAgentCoreInvocation as un, evaluateResponseParameters as ur, createLocalFileKvsDataSource as ut, startStudioServer as v, resolveProfileCredentials as vi, renderCodeDockerfile as vn, ConnectionRegistry as vr, resolveAlbFrontDoor as vt, createLocalListCommand as w, createLocalStartApiCommand as wn, buildMessageEvent as wr, MAX_TASKS_SUBNET_RANGE_CAP as wt, createStudioStore as x, addInvokeSpecificOptions as xn, parseConnectionsPath as xr, serviceStrategy as xt, toStudioTargetGroups as y, toCmdArgv as yn, buildMgmtEndpointEnvUrl as yr, addStartServiceSpecificOptions as yt, matchBehavior as z, resolveSelectionExpression as zn, resolveCfnFallbackRegion as zr, parseImageOverrideFlags as zt };
35565
- //# sourceMappingURL=local-studio-Cg47A0QX.js.map
35647
+ //# sourceMappingURL=local-studio-D5rKurbp.js.map