cdk-local 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -2
- package/dist/{docker-cmd-o4ovyAhR.js → docker-cmd-DvoehoBl.js} +6 -2
- package/dist/{docker-cmd-o4ovyAhR.js.map → docker-cmd-DvoehoBl.js.map} +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/{local-start-service-BnTZsZ8F.js → local-start-service-CDKfcDyV.js} +4 -5
- package/dist/{local-start-service-BnTZsZ8F.js.map → local-start-service-CDKfcDyV.js.map} +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as createLocalStartApiCommand, i as createLocalRunTaskCommand, t as createLocalStartServiceCommand, z as createLocalInvokeCommand } from "./local-start-service-
|
|
2
|
+
import { a as createLocalStartApiCommand, i as createLocalRunTaskCommand, t as createLocalStartServiceCommand, z as createLocalInvokeCommand } from "./local-start-service-CDKfcDyV.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.
|
|
7
|
+
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.20.0");
|
|
8
8
|
program.addCommand(createLocalInvokeCommand());
|
|
9
9
|
program.addCommand(createLocalStartApiCommand());
|
|
10
10
|
program.addCommand(createLocalRunTaskCommand());
|
|
@@ -47,6 +47,10 @@ function setEmbedConfig(config) {
|
|
|
47
47
|
function getEmbedConfig() {
|
|
48
48
|
return current;
|
|
49
49
|
}
|
|
50
|
+
/** Restore cdk-local defaults. Primarily a test-isolation helper. */
|
|
51
|
+
function resetEmbedConfig() {
|
|
52
|
+
current = DEFAULTS;
|
|
53
|
+
}
|
|
50
54
|
|
|
51
55
|
//#endregion
|
|
52
56
|
//#region src/utils/logger.ts
|
|
@@ -381,5 +385,5 @@ function mergeEnv(overrides) {
|
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
//#endregion
|
|
384
|
-
export { runDockerStreaming as a, getEmbedConfig as c, runDockerForeground as i,
|
|
385
|
-
//# sourceMappingURL=docker-cmd-
|
|
388
|
+
export { runDockerStreaming as a, getEmbedConfig as c, runDockerForeground as i, resetEmbedConfig as l, formatDockerLoginError as n, spawnStreaming as o, getDockerCmd as r, getLogger as s, docker_cmd_exports as t, setEmbedConfig as u };
|
|
389
|
+
//# sourceMappingURL=docker-cmd-DvoehoBl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-cmd-o4ovyAhR.js","names":[],"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\nexport interface ResolvedEmbedConfig {\n cliName: string;\n binaryName: string;\n productName: string;\n resourceNamePrefix: string;\n awsBindMountPath: string;\n envPrefix: 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};\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 };\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 * API-compatible with cdkd's logger (same `Logger` / `LogLevel` shape, same\n * `getLogger()` / `setLogger()` exports, same `ConsoleLogger` class with\n * `child(prefix)`). The cdk-local variant drops cdkd's multi-stack output\n * buffer (`stack-context`) and live progress renderer (`live-renderer`)\n * because cdk-local invokes a single Lambda / API / task at a time — there\n * is no parallel multi-stack output to interleave.\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 * 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 = true) {\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 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\nlet globalLogger: ConsoleLogger | null = null;\n\nexport function getLogger(): ConsoleLogger {\n if (!globalLogger) {\n globalLogger = new ConsoleLogger();\n }\n return globalLogger;\n}\n\nexport function setLogger(logger: ConsoleLogger): void {\n globalLogger = logger;\n}\n","import { spawn } from 'node:child_process';\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 cdkd deploy`).\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\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\n return new Promise<SpawnResult>((resolve, reject) => {\n const child = spawn(cmd, args, {\n cwd: options.cwd,\n env,\n stdio: [options.input ? 'pipe' : 'ignore', 'pipe', 'pipe'],\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 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 resolve({ stdout, stderr });\n } else {\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\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":";;;;;;;;;;;;;;;;;;;;AAoEA,MAAM,WAAgC;CACpC,SAAS;CACT,YAAY;CACZ,aAAa;CACb,oBAAoB;CACpB,kBAAkB;CAClB,WAAW;CACZ;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;EAC1C;;;AAIH,SAAgB,iBAAsC;CACpD,OAAO;;;;;;;;;;;ACrET,MAAM,SAAS;CACb,OAAO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AAM,QAAQ,MAAM,KAAK,MAAM;GAC7B,KAAK,QAAQ;GACb;GACA,OAAO;GACR,CAAC;EACF,MAAM,KAAK,UAAU,QAA+B;GAClD,IAAI,IAAI,SAAS,UAAU;IACzB,MAAM,gBAAgB,QAAQ,IAAI,kBAAkB,OAAO,QAAQ;IACnE,uBACE,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"}
|
|
1
|
+
{"version":3,"file":"docker-cmd-DvoehoBl.js","names":[],"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\nexport interface ResolvedEmbedConfig {\n cliName: string;\n binaryName: string;\n productName: string;\n resourceNamePrefix: string;\n awsBindMountPath: string;\n envPrefix: 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};\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 };\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 * API-compatible with cdkd's logger (same `Logger` / `LogLevel` shape, same\n * `getLogger()` / `setLogger()` exports, same `ConsoleLogger` class with\n * `child(prefix)`). The cdk-local variant drops cdkd's multi-stack output\n * buffer (`stack-context`) and live progress renderer (`live-renderer`)\n * because cdk-local invokes a single Lambda / API / task at a time — there\n * is no parallel multi-stack output to interleave.\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 * 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 = true) {\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 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\nlet globalLogger: ConsoleLogger | null = null;\n\nexport function getLogger(): ConsoleLogger {\n if (!globalLogger) {\n globalLogger = new ConsoleLogger();\n }\n return globalLogger;\n}\n\nexport function setLogger(logger: ConsoleLogger): void {\n globalLogger = logger;\n}\n","import { spawn } from 'node:child_process';\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 cdkd deploy`).\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\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\n return new Promise<SpawnResult>((resolve, reject) => {\n const child = spawn(cmd, args, {\n cwd: options.cwd,\n env,\n stdio: [options.input ? 'pipe' : 'ignore', 'pipe', 'pipe'],\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 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 resolve({ stdout, stderr });\n } else {\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\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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Y,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.d.ts
CHANGED
|
@@ -78,6 +78,17 @@ interface CdkLocalEmbedConfig {
|
|
|
78
78
|
awsBindMountPath?: string;
|
|
79
79
|
envPrefix?: string;
|
|
80
80
|
}
|
|
81
|
+
interface ResolvedEmbedConfig {
|
|
82
|
+
cliName: string;
|
|
83
|
+
binaryName: string;
|
|
84
|
+
productName: string;
|
|
85
|
+
resourceNamePrefix: string;
|
|
86
|
+
awsBindMountPath: string;
|
|
87
|
+
envPrefix: string;
|
|
88
|
+
}
|
|
89
|
+
declare function setEmbedConfig(config?: CdkLocalEmbedConfig): void;
|
|
90
|
+
declare function getEmbedConfig(): ResolvedEmbedConfig;
|
|
91
|
+
declare function resetEmbedConfig(): void;
|
|
81
92
|
//#endregion
|
|
82
93
|
//#region src/types/resource.d.ts
|
|
83
94
|
interface CloudFormationTemplate {
|
|
@@ -686,5 +697,5 @@ declare function handleConnectionsRequest(opts: {
|
|
|
686
697
|
registry: ConnectionRegistry;
|
|
687
698
|
}): Promise<void>;
|
|
688
699
|
//#endregion
|
|
689
|
-
export { type AuthorizerCache, type AuthorizerEventOverlay, type CachedAuthorizerResult, type CdkLocalEmbedConfig, CfnLocalStateProvider, type CfnLocalStateProviderOptions, CloudMapRegistry, ConnectionRegistry, type ConnectionRegistryEntry, type CreateLocalInvokeCommandOptions, type CreateLocalRunTaskCommandOptions, type CreateLocalStartApiCommandOptions, type CreateLocalStartServiceCommandOptions, type CrossStackResolver, type DiscoveredRoute, type DiscoveredWebSocketApi, type EnvOverrideFile, type ExtraStateProviders, type HttpRequestSnapshot, type JwksCache, type LambdaArnResolveOutcome, type LocalStateProvider, type LocalStateProviderFactory, type LocalStateRecord, LocalStateSourceError, type LocalStateSourceOptions, type MatchedRouteContext, type RegistrationHandle, type RequestParameterContext, type ResolveParametersOutcome, type ResolvedStage, type RestV1IntegrationConfig, type RouteMatchResult, type SubstitutionContext, type TranslatedHttpResponse, type WebSocketHandshakeSnapshot, type WebSocketLambdaEvent, type WebSocketRouteEntry, applyAuthorizerOverlay, attachStageContext, buildCognitoJwksUrl, buildConnectEvent, buildDisconnectEvent, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, computeRequestIdentityHash, createAuthorizerCache, createJwksCache, createLocalInvokeCommand, createLocalRunTaskCommand, createLocalStartApiCommand, createLocalStartServiceCommand, createLocalStateProvider, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, evaluateCachedLambdaPolicy, getContainerNetworkIp, handleConnectionsRequest, invokeRequestAuthorizer, invokeTokenAuthorizer, isCfnFlagPresent, matchRoute, parseConnectionsPath, parseSelectionExpressionPath, pickRefLogicalId, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, translateLambdaResponse, verifyCognitoJwt, verifyJwtAuthorizer };
|
|
700
|
+
export { type AuthorizerCache, type AuthorizerEventOverlay, type CachedAuthorizerResult, type CdkLocalEmbedConfig, CfnLocalStateProvider, type CfnLocalStateProviderOptions, CloudMapRegistry, ConnectionRegistry, type ConnectionRegistryEntry, type CreateLocalInvokeCommandOptions, type CreateLocalRunTaskCommandOptions, type CreateLocalStartApiCommandOptions, type CreateLocalStartServiceCommandOptions, type CrossStackResolver, type DiscoveredRoute, type DiscoveredWebSocketApi, type EnvOverrideFile, type ExtraStateProviders, type HttpRequestSnapshot, type JwksCache, type LambdaArnResolveOutcome, type LocalStateProvider, type LocalStateProviderFactory, type LocalStateRecord, LocalStateSourceError, type LocalStateSourceOptions, type MatchedRouteContext, type RegistrationHandle, type RequestParameterContext, type ResolveParametersOutcome, type ResolvedStage, type RestV1IntegrationConfig, type RouteMatchResult, type SubstitutionContext, type TranslatedHttpResponse, type WebSocketHandshakeSnapshot, type WebSocketLambdaEvent, type WebSocketRouteEntry, applyAuthorizerOverlay, attachStageContext, buildCognitoJwksUrl, buildConnectEvent, buildDisconnectEvent, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, computeRequestIdentityHash, createAuthorizerCache, createJwksCache, createLocalInvokeCommand, createLocalRunTaskCommand, createLocalStartApiCommand, createLocalStartServiceCommand, createLocalStateProvider, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, evaluateCachedLambdaPolicy, getContainerNetworkIp, getEmbedConfig, handleConnectionsRequest, invokeRequestAuthorizer, invokeTokenAuthorizer, isCfnFlagPresent, matchRoute, parseConnectionsPath, parseSelectionExpressionPath, pickRefLogicalId, rejectExplicitCfnStackWithMultipleStacks, resetEmbedConfig, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, setEmbedConfig, translateLambdaResponse, verifyCognitoJwt, verifyJwtAuthorizer };
|
|
690
701
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/state.ts","../src/local/state-resolver.ts","../src/local/local-state-provider.ts","../src/cli/commands/local-state-source.ts","../src/local/embed-config.ts","../src/types/resource.ts","../src/synthesis/assembly-reader.ts","../src/cli/commands/local-invoke.ts","../src/local/httpv2-service-integration.ts","../src/local/container-pool.ts","../src/local/integration-response-selector.ts","../src/local/rest-v1-integrations.ts","../src/local/route-discovery.ts","../src/local/authorizer-resolver.ts","../src/local/authorizer-cache.ts","../src/local/cognito-jwt.ts","../src/cli/commands/local-start-api.ts","../src/cli/commands/local-run-task.ts","../src/cli/commands/local-start-service.ts","../src/local/cfn-local-state-provider.ts","../src/local/intrinsic-utils.ts","../src/local/intrinsic-lambda-arn.ts","../src/local/parameter-mapping.ts","../src/local/api-gateway-response.ts","../src/local/docker-inspect.ts","../src/local/route-matcher.ts","../src/local/api-gateway-event.ts","../src/local/websocket-route-discovery.ts","../src/local/lambda-authorizer.ts","../src/local/env-resolver.ts","../src/local/stage-resolver.ts","../src/local/cloud-map-registry.ts","../src/local/runtime-image.ts","../src/local/websocket-event.ts","../src/local/websocket-mgmt-api.ts"],"mappings":";;;;;;UAuLiB,aAAA;EAEf,UAAA;EAGA,YAAA;EAGA,UAAA,EAAY,MAAA;EAcZ,kBAAA,GAAqB,MAAA;EAGrB,UAAA,GAAa,MAAA;EAGb,YAAA;EAGA,QAAA,GAAW,MAAA;EAmBX,cAAA;EAMA,mBAAA;EAyBA,aAAA;AAAA;;;UCxIe,gBAAA;EACf,SAAA;EACA,MAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAqBe,kBAAA;EAOf,aAAA,CAAc,UAAA,WAAqB,OAAA;EAQnC,qBAAA,CACE,aAAA,UACA,cAAA,UACA,UAAA,WACC,OAAA;AAAA;AAAA,UAGY,mBAAA;EAEf,SAAA,EAAW,MAAA,SAAe,aAAA;EAE1B,gBAAA,GAAmB,gBAAA;EAOnB,kBAAA,GAAqB,kBAAA;EAOrB,cAAA;AAAA;;;UCrJe,gBAAA;EAWf,SAAA,EAAW,MAAA,SAAe,aAAA;EAO1B,OAAA,EAAS,MAAA;EAOT,MAAA;AAAA;AAAA,UAsBe,kBAAA;EAAA,SAMN,KAAA;EAQT,IAAA,CAAK,SAAA,UAAmB,WAAA,uBAAkC,OAA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A;EASA,eAAA;AAAA,IACE,oBAAA;AAAA,iBA4BY,oBAAA,CAAqB,IAAA;EACnC,YAAA;EACA,WAAA;EACA,KAAA;EACA,QAAA,EAAU,0BAAA;EACV,oBAAA;EACA,gBAAA;AAAA,IACE,oBAAA;;;UChNa,uBAAA;EAEf,YAAA;EAEA,MAAA,EAAQ,SAAA;EAER,WAAA;EAEA,YAAA;EAEA,KAAA;AAAA;AAAA,cAOW,kBAAA;EAAA,iBACM,OAAA;EAEjB,QAAA,CAAS,KAAA,EAAO,uBAAA;EAIhB,UAAA,CAAW,YAAA,WAAuB,uBAAA;EAMlC,GAAA,CAAI,YAAA,WAAuB,uBAAA;EAI3B,IAAA,CAAA;EASA,IAAA,CAAA,GAAQ,uBAAA;EAIR,KAAA,CAAA;AAAA;AAAA,iBA4Bc,oBAAA,CAAqB,GAAA;EACnC,YAAA;AAAA;AAAA,iBA0Bc,uBAAA,CAAwB,IAAA,UAAc,IAAA,UAAc,KAAA;AAAA,iBAkE9C,wBAAA,CAAyB,IAAA;EAC7C,GAAA,EAAK,eAAA;EACL,GAAA,EAAK,cAAA;EACL,QAAA,EAAU,kBAAA;AAAA,IACR,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/state.ts","../src/local/state-resolver.ts","../src/local/local-state-provider.ts","../src/cli/commands/local-state-source.ts","../src/local/embed-config.ts","../src/types/resource.ts","../src/synthesis/assembly-reader.ts","../src/cli/commands/local-invoke.ts","../src/local/httpv2-service-integration.ts","../src/local/container-pool.ts","../src/local/integration-response-selector.ts","../src/local/rest-v1-integrations.ts","../src/local/route-discovery.ts","../src/local/authorizer-resolver.ts","../src/local/authorizer-cache.ts","../src/local/cognito-jwt.ts","../src/cli/commands/local-start-api.ts","../src/cli/commands/local-run-task.ts","../src/cli/commands/local-start-service.ts","../src/local/cfn-local-state-provider.ts","../src/local/intrinsic-utils.ts","../src/local/intrinsic-lambda-arn.ts","../src/local/parameter-mapping.ts","../src/local/api-gateway-response.ts","../src/local/docker-inspect.ts","../src/local/route-matcher.ts","../src/local/api-gateway-event.ts","../src/local/websocket-route-discovery.ts","../src/local/lambda-authorizer.ts","../src/local/env-resolver.ts","../src/local/stage-resolver.ts","../src/local/cloud-map-registry.ts","../src/local/runtime-image.ts","../src/local/websocket-event.ts","../src/local/websocket-mgmt-api.ts"],"mappings":";;;;;;UAuLiB,aAAA;EAEf,UAAA;EAGA,YAAA;EAGA,UAAA,EAAY,MAAA;EAcZ,kBAAA,GAAqB,MAAA;EAGrB,UAAA,GAAa,MAAA;EAGb,YAAA;EAGA,QAAA,GAAW,MAAA;EAmBX,cAAA;EAMA,mBAAA;EAyBA,aAAA;AAAA;;;UCxIe,gBAAA;EACf,SAAA;EACA,MAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAqBe,kBAAA;EAOf,aAAA,CAAc,UAAA,WAAqB,OAAA;EAQnC,qBAAA,CACE,aAAA,UACA,cAAA,UACA,UAAA,WACC,OAAA;AAAA;AAAA,UAGY,mBAAA;EAEf,SAAA,EAAW,MAAA,SAAe,aAAA;EAE1B,gBAAA,GAAmB,gBAAA;EAOnB,kBAAA,GAAqB,kBAAA;EAOrB,cAAA;AAAA;;;UCrJe,gBAAA;EAWf,SAAA,EAAW,MAAA,SAAe,aAAA;EAO1B,OAAA,EAAS,MAAA;EAOT,MAAA;AAAA;AAAA,UAsBe,kBAAA;EAAA,SAMN,KAAA;EAQT,IAAA,CAAK,SAAA,UAAmB,WAAA,uBAAkC,OAAA,CAAQ,gBAAA;EAalE,uBAAA,CAAwB,cAAA,WAAyB,OAAA,CAAQ,kBAAA;EA4BzD,0BAAA,EACE,kBAAA,WACC,OAAA,CAAQ,MAAA;EAKX,OAAA;AAAA;;;UC7Ge,uBAAA;EAOf,YAAA;EAEA,MAAA;EAEA,OAAA;EAMA,WAAA;EAAA,CAEC,GAAA;AAAA;AAAA,KAQS,yBAAA,IAA6B,OAAA,EAAS,uBAAA,KAA4B,kBAAA;AAAA,K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A,KAAA;EACA,QAAA,EAAU,0BAAA;EACV,oBAAA;EACA,gBAAA;AAAA,IACE,oBAAA;;;UChNa,uBAAA;EAEf,YAAA;EAEA,MAAA,EAAQ,SAAA;EAER,WAAA;EAEA,YAAA;EAEA,KAAA;AAAA;AAAA,cAOW,kBAAA;EAAA,iBACM,OAAA;EAEjB,QAAA,CAAS,KAAA,EAAO,uBAAA;EAIhB,UAAA,CAAW,YAAA,WAAuB,uBAAA;EAMlC,GAAA,CAAI,YAAA,WAAuB,uBAAA;EAI3B,IAAA,CAAA;EASA,IAAA,CAAA,GAAQ,uBAAA;EAIR,KAAA,CAAA;AAAA;AAAA,iBA4Bc,oBAAA,CAAqB,GAAA;EACnC,YAAA;AAAA;AAAA,iBA0Bc,uBAAA,CAAwB,IAAA,UAAc,IAAA,UAAc,KAAA;AAAA,iBAkE9C,wBAAA,CAAyB,IAAA;EAC7C,GAAA,EAAK,eAAA;EACL,GAAA,EAAK,cAAA;EACL,QAAA,EAAU,kBAAA;AAAA,IACR,OAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as getEmbedConfig, l as resetEmbedConfig, u as setEmbedConfig } from "./docker-cmd-DvoehoBl.js";
|
|
2
|
+
import { A as buildConnectEvent, B as resolveRuntimeCodeMountPath, C as applyAuthorizerOverlay, D as buildMgmtEndpointEnvUrl, E as ConnectionRegistry, F as parseSelectionExpressionPath, G as createLocalStateProvider, H as resolveRuntimeImage, I as discoverRoutes, J as resolveCfnFallbackRegion, K as isCfnFlagPresent, L as pickRefLogicalId, M as buildMessageEvent, N as discoverWebSocketApis, O as handleConnectionsRequest, P as discoverWebSocketApisOrThrow, R as resolveLambdaArnIntrinsic, S as translateLambdaResponse, T as buildRestV1Event, U as resolveEnvVars, V as resolveRuntimeFileExtension, W as LocalStateSourceError, X as resolveCfnStackName, Y as resolveCfnRegion, Z as CfnLocalStateProvider, _ as computeRequestIdentityHash, a as createLocalStartApiCommand, b as invokeTokenAuthorizer, c as buildStageMap, d as buildCognitoJwksUrl, f as buildJwksUrlFromIssuer, g as buildMethodArn, h as verifyJwtAuthorizer, i as createLocalRunTaskCommand, j as buildDisconnectEvent, k as parseConnectionsPath, l as resolveSelectionExpression, m as verifyCognitoJwt, n as CloudMapRegistry, o as createAuthorizerCache, p as createJwksCache, q as rejectExplicitCfnStackWithMultipleStacks, r as getContainerNetworkIp, s as attachStageContext, t as createLocalStartServiceCommand, u as resolveServiceIntegrationParameters, v as evaluateCachedLambdaPolicy, w as buildHttpApiV2Event, x as matchRoute, y as invokeRequestAuthorizer, z as createLocalInvokeCommand } from "./local-start-service-CDKfcDyV.js";
|
|
2
3
|
|
|
3
|
-
export { CfnLocalStateProvider, CloudMapRegistry, ConnectionRegistry, LocalStateSourceError, applyAuthorizerOverlay, attachStageContext, buildCognitoJwksUrl, buildConnectEvent, buildDisconnectEvent, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, computeRequestIdentityHash, createAuthorizerCache, createJwksCache, createLocalInvokeCommand, createLocalRunTaskCommand, createLocalStartApiCommand, createLocalStartServiceCommand, createLocalStateProvider, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, evaluateCachedLambdaPolicy, getContainerNetworkIp, handleConnectionsRequest, invokeRequestAuthorizer, invokeTokenAuthorizer, isCfnFlagPresent, matchRoute, parseConnectionsPath, parseSelectionExpressionPath, pickRefLogicalId, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, translateLambdaResponse, verifyCognitoJwt, verifyJwtAuthorizer };
|
|
4
|
+
export { CfnLocalStateProvider, CloudMapRegistry, ConnectionRegistry, LocalStateSourceError, applyAuthorizerOverlay, attachStageContext, buildCognitoJwksUrl, buildConnectEvent, buildDisconnectEvent, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, computeRequestIdentityHash, createAuthorizerCache, createJwksCache, createLocalInvokeCommand, createLocalRunTaskCommand, createLocalStartApiCommand, createLocalStartServiceCommand, createLocalStateProvider, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, evaluateCachedLambdaPolicy, getContainerNetworkIp, getEmbedConfig, handleConnectionsRequest, invokeRequestAuthorizer, invokeTokenAuthorizer, isCfnFlagPresent, matchRoute, parseConnectionsPath, parseSelectionExpressionPath, pickRefLogicalId, rejectExplicitCfnStackWithMultipleStacks, resetEmbedConfig, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, setEmbedConfig, translateLambdaResponse, verifyCognitoJwt, verifyJwtAuthorizer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runDockerStreaming, c as getEmbedConfig, i as runDockerForeground,
|
|
1
|
+
import { a as runDockerStreaming, c as getEmbedConfig, i as runDockerForeground, n as formatDockerLoginError, o as spawnStreaming, r as getDockerCmd, s as getLogger, u as setEmbedConfig } from "./docker-cmd-DvoehoBl.js";
|
|
2
2
|
import { cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import * as path from "node:path";
|
|
@@ -18052,7 +18052,7 @@ function pickEssentialContainerId(instance, service) {
|
|
|
18052
18052
|
const defaultWaitForExitImpl = async (containerId) => {
|
|
18053
18053
|
const { execFile } = await import("node:child_process");
|
|
18054
18054
|
const { promisify } = await import("node:util");
|
|
18055
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
18055
|
+
const { getDockerCmd } = await import("./docker-cmd-DvoehoBl.js").then((n) => n.t);
|
|
18056
18056
|
const { stdout } = await promisify(execFile)(getDockerCmd(), ["wait", containerId], { maxBuffer: 1024 * 1024 });
|
|
18057
18057
|
const code = parseInt(stdout.trim(), 10);
|
|
18058
18058
|
return Number.isFinite(code) ? code : -1;
|
|
@@ -18072,7 +18072,7 @@ const EXIT_LOG_TAIL_LINES = 50;
|
|
|
18072
18072
|
const defaultReadContainerLogsImpl = async (containerId) => {
|
|
18073
18073
|
const { execFile } = await import("node:child_process");
|
|
18074
18074
|
const { promisify } = await import("node:util");
|
|
18075
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
18075
|
+
const { getDockerCmd } = await import("./docker-cmd-DvoehoBl.js").then((n) => n.t);
|
|
18076
18076
|
const { stdout, stderr } = await promisify(execFile)(getDockerCmd(), [
|
|
18077
18077
|
"logs",
|
|
18078
18078
|
"--tail",
|
|
@@ -18557,7 +18557,6 @@ async function runOneTarget(target, runState, stacks, options, discovery, skipPu
|
|
|
18557
18557
|
const imageContext = await buildEcsImageResolutionContext(target, stacks, options, stateProvider);
|
|
18558
18558
|
const service = resolveEcsServiceTarget(target, stacks, imageContext);
|
|
18559
18559
|
logger.info(`Target: ${service.stack.stackName}/${service.serviceLogicalId} (service=${service.serviceName}, desiredCount=${service.desiredCount}, task=${service.task.taskDefinitionLogicalId})`);
|
|
18560
|
-
for (const w of service.warnings) logger.warn(w);
|
|
18561
18560
|
if (service.serviceConnect) logger.info(`Service Connect: namespace='${service.serviceConnect.namespaceName}', ${service.serviceConnect.services.length} service(s) registered for peer discovery.`);
|
|
18562
18561
|
if (service.serviceRegistries.length > 0) logger.info(`Cloud Map: ${service.serviceRegistries.length} ServiceRegistry binding(s).`);
|
|
18563
18562
|
const taskNeeds = detectEcsImageResolutionNeeds(stacks.find((s) => s.stackName === service.stack.stackName) ?? service.stack);
|
|
@@ -18782,4 +18781,4 @@ function createLocalStartServiceCommand(opts = {}) {
|
|
|
18782
18781
|
|
|
18783
18782
|
//#endregion
|
|
18784
18783
|
export { buildConnectEvent as A, resolveRuntimeCodeMountPath as B, applyAuthorizerOverlay as C, buildMgmtEndpointEnvUrl as D, ConnectionRegistry as E, parseSelectionExpressionPath as F, createLocalStateProvider as G, resolveRuntimeImage as H, discoverRoutes as I, resolveCfnFallbackRegion as J, isCfnFlagPresent as K, pickRefLogicalId as L, buildMessageEvent as M, discoverWebSocketApis as N, handleConnectionsRequest as O, discoverWebSocketApisOrThrow as P, resolveLambdaArnIntrinsic as R, translateLambdaResponse as S, buildRestV1Event as T, resolveEnvVars as U, resolveRuntimeFileExtension as V, LocalStateSourceError as W, resolveCfnStackName as X, resolveCfnRegion as Y, CfnLocalStateProvider as Z, computeRequestIdentityHash as _, createLocalStartApiCommand as a, invokeTokenAuthorizer as b, buildStageMap as c, buildCognitoJwksUrl as d, buildJwksUrlFromIssuer as f, buildMethodArn as g, verifyJwtAuthorizer as h, createLocalRunTaskCommand as i, buildDisconnectEvent as j, parseConnectionsPath as k, resolveSelectionExpression as l, verifyCognitoJwt as m, CloudMapRegistry as n, createAuthorizerCache as o, createJwksCache as p, rejectExplicitCfnStackWithMultipleStacks as q, getContainerNetworkIp as r, attachStageContext as s, createLocalStartServiceCommand as t, resolveServiceIntegrationParameters as u, evaluateCachedLambdaPolicy as v, buildHttpApiV2Event as w, matchRoute as x, invokeRequestAuthorizer as y, createLocalInvokeCommand as z };
|
|
18785
|
-
//# sourceMappingURL=local-start-service-
|
|
18784
|
+
//# sourceMappingURL=local-start-service-CDKfcDyV.js.map
|