cdk-local 0.158.2 → 0.160.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.
@@ -18923,6 +18923,7 @@ const DEFAULT_UPSTREAM_TIMEOUT_MS = 3e4;
18923
18923
  async function startFrontDoorServer(opts) {
18924
18924
  const logger = getLogger().child("front-door");
18925
18925
  const host = opts.host ?? "127.0.0.1";
18926
+ if (opts.assumeHost !== void 0 && !/^[\x21-\x7e]+$/.test(opts.assumeHost)) throw new Error(`assumeHost must be a non-empty host name without blanks or control characters (got ${JSON.stringify(opts.assumeHost)}).`);
18926
18927
  const forwardedProto = opts.forwardedProto ?? (opts.tls ? "https" : "http");
18927
18928
  const effectiveOpts = {
18928
18929
  ...opts,
@@ -18988,7 +18989,7 @@ function handleProxyRequest(req, res, opts) {
18988
18989
  if (opts.route) {
18989
18990
  const action = opts.route({
18990
18991
  path: url,
18991
- ...hostHeader(req),
18992
+ ...routeHost(req, opts),
18992
18993
  headers: req.headers,
18993
18994
  ...req.method !== void 0 && { method: req.method },
18994
18995
  ...req.socket.remoteAddress !== void 0 && { sourceIp: req.socket.remoteAddress }
@@ -19052,7 +19053,8 @@ function buildNoRuleMatched404Body(req, opts) {
19052
19053
  const summary = opts.rulesSummary;
19053
19054
  if (!summary) return `No listener rule matched '${requestPath}' on ${opts.label}, and the listener has no default action forwarding to a local target.`;
19054
19055
  const rawHost = req.headers.host;
19055
- const hostValue = Array.isArray(rawHost) ? rawHost[0] : rawHost;
19056
+ const requestHost = Array.isArray(rawHost) ? rawHost[0] : rawHost;
19057
+ const hostValue = opts.assumeHost !== void 0 ? `${opts.assumeHost} (--assume-host; the request sent ${requestHost ?? "no Host header"})` : requestHost;
19056
19058
  const lines = [];
19057
19059
  lines.push(`No listener rule matched the request on ${opts.label}, and the listener has no default action forwarding to a local target.`);
19058
19060
  lines.push("");
@@ -19091,7 +19093,7 @@ function handlePoolRequest(req, res, pool, opts) {
19091
19093
  };
19092
19094
  const headers = { ...req.headers };
19093
19095
  stripHopByHopHeaders(headers);
19094
- appendForwardedHeaders(headers, req, opts.listenerPort, resolveForwardedProto(opts));
19096
+ appendForwardedHeaders(headers, req, opts);
19095
19097
  const proxyReq = request({
19096
19098
  host: endpoint.host,
19097
19099
  port: endpoint.port,
@@ -19126,7 +19128,8 @@ function handlePoolRequest(req, res, pool, opts) {
19126
19128
  req.pipe(proxyReq);
19127
19129
  });
19128
19130
  }
19129
- function hostHeader(req) {
19131
+ function routeHost(req, opts) {
19132
+ if (opts.assumeHost !== void 0) return { host: opts.assumeHost };
19130
19133
  const raw = req.headers.host;
19131
19134
  const host = Array.isArray(raw) ? raw[0] : raw;
19132
19135
  return host ? { host } : {};
@@ -19219,7 +19222,7 @@ function handleLambdaRequest(req, res, lambda, opts) {
19219
19222
  const body = Buffer.concat(chunks);
19220
19223
  const forwardHeaders = { ...req.headers };
19221
19224
  stripHopByHopHeaders(forwardHeaders);
19222
- appendForwardedHeaders(forwardHeaders, req, opts.listenerPort, resolveForwardedProto(opts));
19225
+ appendForwardedHeaders(forwardHeaders, req, opts);
19223
19226
  const snapshot = snapshotFromIncoming(req, body);
19224
19227
  for (const [name, value] of Object.entries(forwardHeaders)) {
19225
19228
  if (value === void 0) continue;
@@ -19273,13 +19276,14 @@ function stripHopByHopHeaders(headers) {
19273
19276
  function resolveForwardedProto(opts) {
19274
19277
  return opts.forwardedProto ?? (opts.tls ? "https" : "http");
19275
19278
  }
19276
- function appendForwardedHeaders(headers, req, listenerPort, scheme) {
19279
+ function appendForwardedHeaders(headers, req, opts) {
19277
19280
  const clientIp = req.socket.remoteAddress ?? "";
19278
19281
  const existing = headers["x-forwarded-for"];
19279
19282
  const chain = Array.isArray(existing) ? existing.join(", ") : existing;
19280
19283
  headers["x-forwarded-for"] = chain ? `${chain}, ${clientIp}` : clientIp;
19281
- headers["x-forwarded-proto"] = scheme;
19282
- headers["x-forwarded-port"] = String(listenerPort);
19284
+ headers["x-forwarded-proto"] = resolveForwardedProto(opts);
19285
+ headers["x-forwarded-port"] = String(opts.listenerPort);
19286
+ if (opts.assumeHost !== void 0) headers["host"] = opts.assumeHost;
19283
19287
  }
19284
19288
  function writeError(res, statusCode, message) {
19285
19289
  res.writeHead(statusCode, { "content-type": "text/plain; charset=utf-8" });
@@ -19293,7 +19297,7 @@ function handleUpgrade$1(req, clientSocket, head, opts) {
19293
19297
  }
19294
19298
  const action = opts.route({
19295
19299
  path: req.url ?? "/",
19296
- ...hostHeader(req),
19300
+ ...routeHost(req, opts),
19297
19301
  headers: req.headers,
19298
19302
  ...req.method !== void 0 && { method: req.method },
19299
19303
  ...req.socket.remoteAddress !== void 0 && { sourceIp: req.socket.remoteAddress }
@@ -19361,7 +19365,7 @@ function bridgeWebSocket(req, clientSocket, head, pool, opts) {
19361
19365
  upstream.on("connect", () => {
19362
19366
  upstreamConnected = true;
19363
19367
  const headers = { ...req.headers };
19364
- appendForwardedHeaders(headers, req, opts.listenerPort, resolveForwardedProto(opts));
19368
+ appendForwardedHeaders(headers, req, opts);
19365
19369
  const lines = [`${req.method ?? "GET"} ${req.url ?? "/"} HTTP/${req.httpVersion}`];
19366
19370
  for (const [name, value] of Object.entries(headers)) {
19367
19371
  if (value === void 0) continue;
@@ -20697,7 +20701,7 @@ async function runEcsServiceEmulator(targets, options, strategy, extraStateProvi
20697
20701
  ...options.profile && { profile: options.profile },
20698
20702
  ...Object.keys(context).length > 0 && { context }
20699
20703
  };
20700
- const { stacks } = await synthesizer.synthesize(synthOpts);
20704
+ const { stacks, checkSelectedStacks } = await synthesizer.synthesize(synthOpts);
20701
20705
  const resolvedTargets = await resolveMultiTarget(targets, {
20702
20706
  entries: strategy.pickEntries(stacks),
20703
20707
  message: strategy.pickerMessage,
@@ -20706,6 +20710,7 @@ async function runEcsServiceEmulator(targets, options, strategy, extraStateProvi
20706
20710
  });
20707
20711
  const { boots, frontDoor, warnings } = strategy.resolveBoots(stacks, resolvedTargets);
20708
20712
  for (const w of warnings) logger.warn(w);
20713
+ checkSelectedStacks?.(servedStackNames(stacks, resolvedTargets, boots));
20709
20714
  const hasFrontDoorListeners = !!frontDoor && frontDoor.listeners.length > 0;
20710
20715
  if (boots.length === 0 && !hasFrontDoorListeners) throw new LocalStartServiceError(`No runnable target resolved from ${resolvedTargets.join(", ")}.`);
20711
20716
  rejectExplicitCfnStackWithMultipleStacks(options, boots.length);
@@ -20832,7 +20837,9 @@ async function reloadAllServices(args) {
20832
20837
  const { perTarget, synthesizer, synthOpts, strategy, resolvedTargets, cloudMapIndexByStack, options, discovery, skipPull, extraStateProviders, profileCredsFile, frontDoorByService, changedPaths, imageOverrideTags: boottimeImageOverrideTags, imageOverrideMap, logger } = args;
20833
20838
  let stacks;
20834
20839
  try {
20835
- ({stacks} = await synthesizer.synthesize(synthOpts));
20840
+ let checkSelectedStacks;
20841
+ ({stacks, checkSelectedStacks} = await synthesizer.synthesize(synthOpts));
20842
+ checkSelectedStacks?.(servedStackNames(stacks, resolvedTargets, perTarget.map((pt) => pt.boot)));
20836
20843
  } catch (err) {
20837
20844
  logger.warn(`cdk synth failed during reload; keeping previous version. (${err instanceof Error ? err.message : String(err)})`);
20838
20845
  return;
@@ -21290,7 +21297,8 @@ async function buildFrontDoor(plan, options, logger, extraStateProviders) {
21290
21297
  label: `listener port ${listener.listenerPort}`,
21291
21298
  forwardedProto,
21292
21299
  rulesSummary,
21293
- ...tls ? { tls } : {}
21300
+ ...tls ? { tls } : {},
21301
+ ...listener.assumeHost !== void 0 && { assumeHost: listener.assumeHost }
21294
21302
  };
21295
21303
  let server;
21296
21304
  try {
@@ -21309,6 +21317,7 @@ async function buildFrontDoor(plan, options, logger, extraStateProviders) {
21309
21317
  }
21310
21318
  servers.push(server);
21311
21319
  logger.info(`ALB front-door: ${server.scheme}://${formatAuthority(server.host, server.port)} (listener port ${listener.listenerPort})`);
21320
+ if (listener.assumeHost !== void 0) logger.info(` assumed host: ${displayUntrustedValue(listener.assumeHost)} (--assume-host; host-header rules see it and the target receives it as Host)`);
21312
21321
  if (degradedHttps) logger.warn(`listener port ${listener.listenerPort} is HTTPS in the cloud but serving HTTP locally (X-Forwarded-Proto: https preserved). Pass --tls to terminate TLS locally with a self-signed or user-supplied cert.`);
21313
21322
  if (listener.defaultAction) logger.info(` default -> ${describeAction(listener.defaultAction)}`);
21314
21323
  for (const r of [...listener.rules].sort((a, b) => a.priority - b.priority)) logger.info(` ${describeConditions(r)} (priority ${r.priority}) -> ${describeAction(r.action)}`);
@@ -21493,6 +21502,14 @@ async function buildEcsImageResolutionContext$1(target, stacks, options, statePr
21493
21502
  function pickCandidateStack$1(target, stacks) {
21494
21503
  return candidateTargetStack(parseEcsTarget(target), target, stacks);
21495
21504
  }
21505
+ function servedStackNames(stacks, chosenTargets, boots) {
21506
+ const names = /* @__PURE__ */ new Set();
21507
+ for (const target of [...chosenTargets, ...boots.map((boot) => boot.target)]) {
21508
+ const stack = pickCandidateStack$1(target, stacks);
21509
+ if (stack) names.add(stack.stackName);
21510
+ }
21511
+ return [...names];
21512
+ }
21496
21513
  async function resolveCallerAccountId$1(region, profile, readFromCfnStack) {
21497
21514
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
21498
21515
  const sts = new STSClient(accountLookupStsClientConfig({
@@ -22601,6 +22618,31 @@ function parseLbPortOverrides(values) {
22601
22618
  }
22602
22619
  return out;
22603
22620
  }
22621
+ const ASSUME_HOST_PATTERN = /^(?:[A-Za-z0-9_](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?|\[[0-9A-Fa-f:.]+\])(?::\d{1,5})?$/;
22622
+ function parseAssumeHostOverrides(values) {
22623
+ const out = { byListenerPort: {} };
22624
+ const usage = "Expected <host> or <listenerPort>=<host> (e.g. api.example.com or 443=api.example.com).";
22625
+ for (const raw of values ?? []) {
22626
+ const value = raw.trim();
22627
+ const eq = value.indexOf("=");
22628
+ const portPart = eq === -1 ? void 0 : value.slice(0, eq);
22629
+ const host = eq === -1 ? value : value.slice(eq + 1);
22630
+ const hostPort = /:(\d+)$/.exec(host)?.[1];
22631
+ if (!ASSUME_HOST_PATTERN.test(host) || hostPort !== void 0 && !(Number(hostPort) >= 1 && Number(hostPort) <= 65535)) throw new LocalStartServiceError(`Invalid --assume-host ${JSON.stringify(raw)}: ${host === "" ? "the host is empty" : `${JSON.stringify(host)} is not a host name`}. ${usage}`);
22632
+ if (portPart === void 0) {
22633
+ if (/^\d+$/.test(host)) throw new LocalStartServiceError(`Invalid --assume-host ${JSON.stringify(raw)}: a bare number is not a host name (did you mean ${host}=<host>?). ${usage}`);
22634
+ if (out.all !== void 0) throw new LocalStartServiceError(`--assume-host was given two hosts for every listener (${out.all} and ${host}). Pass one, or name each listener as <listenerPort>=<host>.`);
22635
+ out.all = host;
22636
+ continue;
22637
+ }
22638
+ const port = /^\d+$/.test(portPart) ? Number(portPart) : NaN;
22639
+ if (!(port >= 1 && port <= 65535)) throw new LocalStartServiceError(`Invalid --assume-host ${JSON.stringify(raw)}: the listener port must be 1-65535. ${usage}`);
22640
+ const prior = out.byListenerPort[port];
22641
+ if (prior !== void 0) throw new LocalStartServiceError(`--assume-host was given two hosts for listener port ${port} (${prior} and ${host}).`);
22642
+ out.byListenerPort[port] = host;
22643
+ }
22644
+ return out;
22645
+ }
22604
22646
  function resolveAlbTarget(target, stacks) {
22605
22647
  if (stacks.length === 0) throw new LocalStartServiceError("No stacks found in the synthesized assembly.");
22606
22648
  const parsed = parseEcsTarget(target);
@@ -22642,6 +22684,7 @@ function notFound$1(target, stack, resources) {
22642
22684
  }
22643
22685
  function albStrategy(options) {
22644
22686
  const lbPortOverrides = parseLbPortOverrides(options.lbPort);
22687
+ const assumeHosts = parseAssumeHostOverrides(options.assumeHost);
22645
22688
  return {
22646
22689
  pickEntries: (stacks) => listTargets(stacks).loadBalancers,
22647
22690
  pickerMessage: "Select one or more Application Load Balancers to run",
@@ -22703,10 +22746,12 @@ function albStrategy(options) {
22703
22746
  continue;
22704
22747
  }
22705
22748
  claimedHostPorts.set(hostPort, listener.listenerPort);
22749
+ const assumeHost = assumeHosts.byListenerPort[listener.listenerPort] ?? assumeHosts.all;
22706
22750
  listeners.push({
22707
22751
  listenerPort: listener.listenerPort,
22708
22752
  hostPort,
22709
22753
  protocol: listener.listenerProtocol,
22754
+ ...assumeHost !== void 0 && { assumeHost },
22710
22755
  ...listener.defaultAction ? { defaultAction: qualify(listener.defaultAction) } : {},
22711
22756
  ...listener.defaultAuthGuard ? { defaultAuthGuard: listener.defaultAuthGuard } : {},
22712
22757
  rules: listener.rules.map((r) => ({
@@ -22729,6 +22774,10 @@ function albStrategy(options) {
22729
22774
  const port = Number(portStr);
22730
22775
  if (!resolvedPorts.has(port)) warnings.push(`--lb-port override for listener port ${port} matched no ALB listener resolved for the named target(s); it was ignored.`);
22731
22776
  }
22777
+ for (const portStr of Object.keys(assumeHosts.byListenerPort)) {
22778
+ const port = Number(portStr);
22779
+ if (!resolvedPorts.has(port)) warnings.push(`--assume-host for listener port ${port} matched no ALB listener resolved for the named target(s); it was ignored.`);
22780
+ }
22732
22781
  return {
22733
22782
  boots,
22734
22783
  ...listeners.length > 0 ? { frontDoor: { listeners } } : {},
@@ -22750,7 +22799,7 @@ function createLocalStartAlbCommand(opts = {}) {
22750
22799
  }
22751
22800
  function addAlbSpecificOptions(cmd) {
22752
22801
  addImageOverrideOptions(cmd);
22753
- return cmd.addOption(new Option("--lb-port <listenerPort=hostPort...>", "Bind the local front-door on a specific host port (e.g. 80=8080); repeatable. Default: host port == ALB listener port. Use this on macOS to remap a privileged listener port (< 1024) to a non-privileged host port.")).addOption(new Option("--tls", "Terminate TLS locally for cloud-HTTPS listeners. Default: a cloud-HTTPS listener is served over plain HTTP locally (X-Forwarded-Proto: https is preserved so the upstream app still sees the deployed listener protocol). Implied by --tls-cert / --tls-key. Use this when local-dev cookies need Secure / SameSite=None, when the upstream app inspects TLS metadata, or for mTLS / SNI testing — otherwise plain HTTP is friendlier (no self-signed cert warnings in curl / browser).")).addOption(new Option("--tls-cert <path>", "PEM-encoded server certificate for HTTPS front-door listeners. Implies --tls. Must be set together with --tls-key. Pass --tls alone (without --tls-cert / --tls-key) to auto-generate a self-signed cert (cached under $XDG_CACHE_HOME/cdk-local/alb-https/, default ~/.cache/cdk-local/alb-https/); requires openssl on PATH. The deployed Listener Certificates[] are NOT fetched (ACM private keys are not retrievable by design). The auto-generated cert lists DNS:localhost,IP:127.0.0.1 as SubjectAltName, so a client validating a non-loopback --container-host will fail the SAN check — pass --tls-cert / --tls-key with a SAN covering that host instead.")).addOption(new Option("--tls-key <path>", "PEM-encoded server private key matching --tls-cert. Implies --tls. Must be set together with --tls-cert.")).addOption(new Option("--no-verify-auth", "Disable local enforcement of authenticate-cognito / authenticate-oidc actions. Every request is served as if the auth check passed. Useful for local dev where you do not want to mint a Bearer token at all.")).addOption(new Option("--bearer-token <jwt>", "Default Bearer JWT this command INJECTS only when an inbound request has none (the default-when-missing role) — `cdkl start-alb` is the local ALB front-door RECEIVING outside-in requests, so this token is the fallback the front-door slots in as Authorization: Bearer <jwt> if the caller did not already supply one. Verified against the same JWKS / OIDC discovery URL the deployed ALB would (signature + iss + aud + exp). Cookie pass-through (AWSELBAuthSessionCookie-*) also bypasses the guard. Contrast with `cdkl invoke-agentcore --bearer-token`, where the role is reversed — that command is the outbound client and ALWAYS presents this token (the supplier).")).addOption(new Option("--watch", "Hot-reload: re-synth + per-replica reload of every ECS service behind the ALB when the CDK source changes (honors cdk.json watch.include/exclude; cdk.out, node_modules, .git are always excluded). A per-firing classifier picks the per-replica primitive: source-only edits on interpreted-language handlers (Node/Python/Ruby/shell) take a bind-mount FAST PATH (`docker cp` the new source into each replica + restart it; no rebuild, its front-door pool entry is drained and re-published once it listens again). Dockerfile / dependency manifest / compiled-language source / ambiguous edits fall through to the rebuild rolling primitive — boot a shadow under a bumped generation suffix, wait for its container port to accept a TCP connection, atomically register it in the front-door pool, then drop the old entry and retire the old container. Either path rolls one replica at a time, so a continuous external request stream against the listener port sees zero connection refusals across the reload. The host front-door (TLS, JWKS cache, Lambda-target containers, listener sockets) stays up across the reload. Lambda target groups behind the ALB are a no-op on reload (the warm RIE container keeps its boot-time image). Off by default; existing replica(s) keep serving when synth fails mid-reload.").default(false));
22802
+ return cmd.addOption(new Option("--lb-port <listenerPort=hostPort...>", "Bind the local front-door on a specific host port (e.g. 80=8080); repeatable. Default: host port == ALB listener port. Use this on macOS to remap a privileged listener port (< 1024) to a non-privileged host port.")).addOption(new Option("--assume-host <host>", "Treat every inbound request as if it carried this Host: host-header rule conditions see <host>, and the target (ECS replica or Lambda) receives it as the Host header, as behind the deployed ALB on its own domain name. Use it to reach a listener rule that matches only a production host name (host-header: api.example.com) from a browser or a client that sends Host: localhost. <listenerPort>=<host> (e.g. 443=api.example.com) applies to one listener and wins over a bare <host>; repeatable. Other rule conditions are unaffected, and a redirect action keeps the request Host so the browser stays on the local front-door. Default: the request Host is used as sent.").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--tls", "Terminate TLS locally for cloud-HTTPS listeners. Default: a cloud-HTTPS listener is served over plain HTTP locally (X-Forwarded-Proto: https is preserved so the upstream app still sees the deployed listener protocol). Implied by --tls-cert / --tls-key. Use this when local-dev cookies need Secure / SameSite=None, when the upstream app inspects TLS metadata, or for mTLS / SNI testing — otherwise plain HTTP is friendlier (no self-signed cert warnings in curl / browser).")).addOption(new Option("--tls-cert <path>", "PEM-encoded server certificate for HTTPS front-door listeners. Implies --tls. Must be set together with --tls-key. Pass --tls alone (without --tls-cert / --tls-key) to auto-generate a self-signed cert (cached under $XDG_CACHE_HOME/cdk-local/alb-https/, default ~/.cache/cdk-local/alb-https/); requires openssl on PATH. The deployed Listener Certificates[] are NOT fetched (ACM private keys are not retrievable by design). The auto-generated cert lists DNS:localhost,IP:127.0.0.1 as SubjectAltName, so a client validating a non-loopback --container-host will fail the SAN check — pass --tls-cert / --tls-key with a SAN covering that host instead.")).addOption(new Option("--tls-key <path>", "PEM-encoded server private key matching --tls-cert. Implies --tls. Must be set together with --tls-cert.")).addOption(new Option("--no-verify-auth", "Disable local enforcement of authenticate-cognito / authenticate-oidc actions. Every request is served as if the auth check passed. Useful for local dev where you do not want to mint a Bearer token at all.")).addOption(new Option("--bearer-token <jwt>", "Default Bearer JWT this command INJECTS only when an inbound request has none (the default-when-missing role) — `cdkl start-alb` is the local ALB front-door RECEIVING outside-in requests, so this token is the fallback the front-door slots in as Authorization: Bearer <jwt> if the caller did not already supply one. Verified against the same JWKS / OIDC discovery URL the deployed ALB would (signature + iss + aud + exp). Cookie pass-through (AWSELBAuthSessionCookie-*) also bypasses the guard. Contrast with `cdkl invoke-agentcore --bearer-token`, where the role is reversed — that command is the outbound client and ALWAYS presents this token (the supplier).")).addOption(new Option("--watch", "Hot-reload: re-synth + per-replica reload of every ECS service behind the ALB when the CDK source changes (honors cdk.json watch.include/exclude; cdk.out, node_modules, .git are always excluded). A per-firing classifier picks the per-replica primitive: source-only edits on interpreted-language handlers (Node/Python/Ruby/shell) take a bind-mount FAST PATH (`docker cp` the new source into each replica + restart it; no rebuild, its front-door pool entry is drained and re-published once it listens again). Dockerfile / dependency manifest / compiled-language source / ambiguous edits fall through to the rebuild rolling primitive — boot a shadow under a bumped generation suffix, wait for its container port to accept a TCP connection, atomically register it in the front-door pool, then drop the old entry and retire the old container. Either path rolls one replica at a time, so a continuous external request stream against the listener port sees zero connection refusals across the reload. The host front-door (TLS, JWKS cache, Lambda-target containers, listener sockets) stays up across the reload. Lambda target groups behind the ALB are a no-op on reload (the warm RIE container keeps its boot-time image). Off by default; existing replica(s) keep serving when synth fails mid-reload.").default(false));
22754
22803
  }
22755
22804
 
22756
22805
  //#endregion
@@ -25744,7 +25793,7 @@ async function bootLambdaEdgeFunctions(distribution, stacks, opts) {
25744
25793
  }
25745
25794
  for (const functionLogicalId of functionLogicalIds) try {
25746
25795
  const lambda = resolveLambdaTarget(`${distribution.stackName}:${functionLogicalId}`, stacks);
25747
- const containerEnv = await resolveLambdaContainerEnv(lambda, opts.envOptions, opts.profileCredentials, opts.extraStateProviders);
25796
+ const containerEnv = await resolveLambdaContainerEnv(lambda, lambdaEdgeEnvOptions(opts.envOptions), opts.profileCredentials, opts.extraStateProviders);
25748
25797
  const runner = createFrontDoorLambdaRunner(lambda, {
25749
25798
  containerHost: opts.containerHost,
25750
25799
  skipPull: opts.skipPull,
@@ -25771,9 +25820,15 @@ function buildLambdaEnvOptions(options, extraStateProviders) {
25771
25820
  ...options.assumeRole !== void 0 && { assumeRole: options.assumeRole },
25772
25821
  ...options.region !== void 0 && { region: options.region },
25773
25822
  ...options.profile !== void 0 && { profile: options.profile },
25774
- ...options.stackRegion !== void 0 && { stackRegion: options.stackRegion }
25823
+ ...options.stackRegion !== void 0 && { stackRegion: options.stackRegion },
25824
+ ...options.envVars !== void 0 && { envVars: options.envVars }
25775
25825
  };
25776
25826
  }
25827
+ function lambdaEdgeEnvOptions(envOptions) {
25828
+ const out = { ...envOptions };
25829
+ delete out.envVars;
25830
+ return out;
25831
+ }
25777
25832
  function buildLambdaBootOptions(options, profileCredentials, extraStateProviders) {
25778
25833
  return {
25779
25834
  containerHost: options.host,
@@ -25794,6 +25849,10 @@ function warnUnusedCacheOrigin(options, extraStateProviders) {
25794
25849
  getLogger().warn(`--cache-origin has no effect without ${flags}: it caches a deployed-S3 read-through origin, which is only built under a state source. A local BucketDeployment / --origin <id>=<dir> origin serves from disk and is not cached. Pass ${flags} to enable the deployed-S3 origin (then --cache-origin applies), or drop --cache-origin.`);
25795
25850
  }
25796
25851
  }
25852
+ function warnUnusedEnvVars(distribution, options) {
25853
+ if (options.envVars === void 0) return;
25854
+ if (![...distribution.origins.values()].some((o) => o.kind === "lambda-url" || o.kind === "web-function")) getLogger().warn("--env-vars has no effect: the distribution has no Lambda Function URL or Lambda Web Function endpoint origin (CloudFront Functions and Lambda@Edge take no environment variables).");
25855
+ }
25797
25856
  async function resolveDeployedS3Origins(distribution, stacks, options, profileCredentials, logger, extraStateProviders) {
25798
25857
  const readers = /* @__PURE__ */ new Map();
25799
25858
  const buckets = /* @__PURE__ */ new Map();
@@ -25884,7 +25943,7 @@ async function localStartCloudFrontCommand(target, options, extraStateProviders,
25884
25943
  ...options.profile && { profile: options.profile },
25885
25944
  ...Object.keys(context).length > 0 && { context }
25886
25945
  };
25887
- const { stacks } = await synthesizer.synthesize(synthOpts);
25946
+ const { stacks, checkSelectedStacks } = await synthesizer.synthesize(synthOpts);
25888
25947
  const chosen = await resolveSingleTarget(target, {
25889
25948
  entries: listTargets(stacks).cloudFrontDistributions,
25890
25949
  message: "Select a CloudFront distribution to serve",
@@ -25893,6 +25952,7 @@ async function localStartCloudFrontCommand(target, options, extraStateProviders,
25893
25952
  });
25894
25953
  target = chosen;
25895
25954
  const { stack, logicalId } = resolveCloudFrontTarget(chosen, stacks);
25955
+ checkSelectedStacks?.([stack.stackName]);
25896
25956
  return {
25897
25957
  distribution: resolveCloudFrontDistribution({
25898
25958
  stack,
@@ -25907,6 +25967,7 @@ async function localStartCloudFrontCommand(target, options, extraStateProviders,
25907
25967
  const deployedS3 = await resolveDeployedS3Origins(initial.distribution, initial.stacks, options, profileCredentials, logger, extraStateProviders);
25908
25968
  warnUnsupported(initial.distribution, extraStateProviders);
25909
25969
  warnUnusedCacheOrigin(options, extraStateProviders);
25970
+ warnUnusedEnvVars(initial.distribution, options);
25910
25971
  await attachKvsModules(initial.distribution, initial.stacks, options, profileCredentials, logger, extraStateProviders);
25911
25972
  const bootOpts = buildLambdaBootOptions(options, profileCredentials, extraStateProviders);
25912
25973
  const webFunctionServes = [];
@@ -26030,7 +26091,7 @@ function createLocalStartCloudFrontCommand(opts = {}) {
26030
26091
  return cmd;
26031
26092
  }
26032
26093
  function addStartCloudFrontSpecificOptions(cmd) {
26033
- return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--origin <originId=dir>", "Point a distribution origin at a local directory (repeatable). Use when cdk-local cannot resolve the origin's BucketDeployment source automatically (content uploaded out of band, or a non-CDK bucket).").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--kvs-file <key=file.json>", "Back a CloudFront Function's KeyValueStore reads (cf.kvs().get()) with a local JSON map (repeatable). The key is a KeyValueStore handle — its AWS::CloudFront::KeyValueStore resource logical id, its construct path, or its bare construct id; the file is a flat { \"key\": \"value\" } object. The AWS-free alternative to --from-cfn-stack, which instead reads the deployed store via the GetKey API.").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--tls", "Terminate real TLS (HTTPS). Uses --tls-cert / --tls-key when supplied, else an auto-generated self-signed cert.").default(false)).addOption(new Option("--tls-cert <path>", "PEM server certificate for --tls (implies --tls).")).addOption(new Option("--tls-key <path>", "PEM server private key for --tls (implies --tls).")).addOption(new Option("--no-pull", "Skip 'docker pull' for a Lambda Function URL / Web Function origin's base image (use the locally cached image).")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Bind to a deployed CloudFormation stack (ListStackResources). Resolves an S3 origin that has no local BucketDeployment source to its deployed bucket and serves it from real S3 on demand (the front/back-split case: files uploaded out of band), and resolves a Lambda Function URL / Lambda@Edge function's or a Web Function origin revision's env vars to the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass a value when the CFn stack name differs.")).addOption(new Option("--cache-origin", "For a deployed-S3 origin (served from real S3 under --from-cfn-stack): keep fetched objects in memory for the session instead of re-reading on every request. Faster repeat reads / fewer S3 GETs, but an out-of-band S3 content change is not reflected until a --watch reload (which clears the cache) or a restart. Off by default (every request re-reads, always current). Not CloudFront CDN caching.").default(false)).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--assume-role [arn]", "Assume a Lambda Function URL origin's (or a Web Function origin revision's) execution role and forward STS-issued temp credentials into its container so the handler runs with the deployed permissions. Three forms: `--assume-role <arn>` (explicit ARN); `--assume-role` (bare, auto-resolves from state — requires --from-cfn-stack); `--no-assume-role` (opt out). Off by default (the dev shell credentials are forwarded).")).addOption(new Option("--watch", "Hot-reload: re-synth + re-resolve the distribution when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, node_modules, .git are always excluded). The server keeps the previous version serving when synth fails mid-reload.").default(false));
26094
+ return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--origin <originId=dir>", "Point a distribution origin at a local directory (repeatable). Use when cdk-local cannot resolve the origin's BucketDeployment source automatically (content uploaded out of band, or a non-CDK bucket).").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--kvs-file <key=file.json>", "Back a CloudFront Function's KeyValueStore reads (cf.kvs().get()) with a local JSON map (repeatable). The key is a KeyValueStore handle — its AWS::CloudFront::KeyValueStore resource logical id, its construct path, or its bare construct id; the file is a flat { \"key\": \"value\" } object. The AWS-free alternative to --from-cfn-stack, which instead reads the deployed store via the GetKey API.").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--tls", "Terminate real TLS (HTTPS). Uses --tls-cert / --tls-key when supplied, else an auto-generated self-signed cert.").default(false)).addOption(new Option("--tls-cert <path>", "PEM server certificate for --tls (implies --tls).")).addOption(new Option("--tls-key <path>", "PEM server private key for --tls (implies --tls).")).addOption(new Option("--no-pull", "Skip 'docker pull' for a Lambda Function URL / Web Function origin's base image (use the locally cached image).")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Bind to a deployed CloudFormation stack (ListStackResources). Resolves an S3 origin that has no local BucketDeployment source to its deployed bucket and serves it from real S3 on demand (the front/back-split case: files uploaded out of band), and resolves a Lambda Function URL / Lambda@Edge function's or a Web Function origin revision's env vars to the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass a value when the CFn stack name differs.")).addOption(new Option("--cache-origin", "For a deployed-S3 origin (served from real S3 under --from-cfn-stack): keep fetched objects in memory for the session instead of re-reading on every request. Faster repeat reads / fewer S3 GETs, but an out-of-band S3 content change is not reflected until a --watch reload (which clears the cache) or a restart. Off by default (every request re-reads, always current). Not CloudFront CDN caching.").default(false)).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--assume-role [arn]", "Assume a Lambda Function URL origin's (or a Web Function origin revision's) execution role and forward STS-issued temp credentials into its container so the handler runs with the deployed permissions. Three forms: `--assume-role <arn>` (explicit ARN); `--assume-role` (bare, auto-resolves from state — requires --from-cfn-stack); `--no-assume-role` (opt out). Off by default (the dev shell credentials are forwarded).")).addOption(new Option("--env-vars <file>", "JSON env-var overrides for the Lambda Function URL and Lambda Web Function endpoint origins (SAM-compatible, the same file as the other commands: {\"Parameters\": {...}} for every origin, {\"<LogicalId or construct path>\": {\"KEY\": \"VALUE\"}} for one — the backing function, or the Web Function revision the endpoint serves; a null value removes the variable). Not applied to Lambda@Edge functions, which cannot carry environment variables in AWS.")).addOption(new Option("--watch", "Hot-reload: re-synth + re-resolve the distribution when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, node_modules, .git are always excluded). The server keeps the previous version serving when synth fails mid-reload.").default(false));
26034
26095
  }
26035
26096
 
26036
26097
  //#endregion
@@ -26438,7 +26499,7 @@ async function localStartAgentCoreCommand(target, options, extraStateProviders,
26438
26499
  ...options.profile && { profile: options.profile },
26439
26500
  ...Object.keys(context).length > 0 && { context }
26440
26501
  };
26441
- const { stacks } = await synthesizer.synthesize(synthOpts);
26502
+ const { stacks, checkSelectedStacks } = await synthesizer.synthesize(synthOpts);
26442
26503
  const resolvedTarget = await resolveSingleTarget(target, {
26443
26504
  entries: listTargets(stacks).agentCoreRuntimes,
26444
26505
  message: "Select an AgentCore Runtime to serve",
@@ -26446,12 +26507,14 @@ async function localStartAgentCoreCommand(target, options, extraStateProviders,
26446
26507
  onMissing: () => new CdkLocalError(`${getEmbedConfig().cliName} start-agentcore requires a <target> (an AgentCore Runtime display path or logical ID). Run \`${getEmbedConfig().cliName} list\` to see them, or run it in a TTY to pick interactively.`, "LOCAL_START_AGENTCORE_TARGET_REQUIRED")
26447
26508
  });
26448
26509
  const candidate = pickAgentCoreCandidateStack(resolvedTarget, stacks);
26510
+ if (candidate) checkSelectedStacks?.([candidate.stackName]);
26449
26511
  stateProvider = createLocalStateProvider(options, candidate?.stackName ?? "", await resolveCfnFallbackRegion(options, candidate?.region), extraStateProviders);
26450
26512
  const { context: imageContext, loaded: loadedState } = stateProvider && candidate ? await buildAgentCoreImageContext(candidate, stateProvider, options) : {
26451
26513
  context: void 0,
26452
26514
  loaded: void 0
26453
26515
  };
26454
26516
  const resolved = resolveAgentCoreTarget(resolvedTarget, stacks, imageContext);
26517
+ if (resolved.stack.stackName !== candidate?.stackName) checkSelectedStacks?.([resolved.stack.stackName]);
26455
26518
  logger.info(`Target: ${displayStackName(`${resolved.stack.stackName}/${resolved.logicalId}`)} (${resolved.protocol})`);
26456
26519
  const plan = resolveAgentCoreServePlan(resolved.protocol);
26457
26520
  const sigv4Context = await resolveAgentCoreSigV4Context(options, resolved, loadedState, stateProvider);
@@ -26569,7 +26632,9 @@ async function localStartAgentCoreCommand(target, options, extraStateProviders,
26569
26632
  let verdict;
26570
26633
  let nextAssetHash = currentAssetHash;
26571
26634
  try {
26572
- freshStacks = (await synthesizer.synthesize(synthOpts)).stacks;
26635
+ const synthRes = await synthesizer.synthesize(synthOpts);
26636
+ freshStacks = synthRes.stacks;
26637
+ synthRes.checkSelectedStacks?.([resolved.stack.stackName]);
26573
26638
  const freshCandidate = pickAgentCoreCandidateStack(resolvedTarget, freshStacks);
26574
26639
  const ctx = stateProvider && freshCandidate ? await buildAgentCoreImageContext(freshCandidate, stateProvider, options) : {
26575
26640
  context: void 0,
@@ -26694,13 +26759,14 @@ async function localStartWebFunctionCommand(target, options, extraStateProviders
26694
26759
  ...options.profile && { profile: options.profile },
26695
26760
  ...Object.keys(context).length > 0 && { context }
26696
26761
  };
26697
- const { stacks } = await synthesizer.synthesize(synthOpts);
26762
+ const { stacks, checkSelectedStacks } = await synthesizer.synthesize(synthOpts);
26698
26763
  const resolved = resolveWebFunctionTarget(await resolveSingleTarget(target, {
26699
26764
  entries: listTargets(stacks).webFunctions,
26700
26765
  message: "Select a Lambda web function to serve",
26701
26766
  noun: "Lambda web functions",
26702
26767
  onMissing: () => new CdkLocalError(`${getEmbedConfig().cliName} start-web-function requires a <target> (a WebFunction, WebFunctionEndpoint or WebFunctionRevision display path or logical ID). Run \`${getEmbedConfig().cliName} list\` to see them, or run it in a TTY to pick interactively.`, "LOCAL_START_WEB_FUNCTION_TARGET_REQUIRED")
26703
26768
  }), stacks, options.revision);
26769
+ checkSelectedStacks?.([resolved.stack.stackName]);
26704
26770
  const prepared = prepareWebFunctionServe(resolved);
26705
26771
  const selectionNote = {
26706
26772
  "target-revision": "the target revision",
@@ -27801,13 +27867,14 @@ async function localStartMicrovmCommand(target, options, extraStateProviders, ho
27801
27867
  ...options.profile && { profile: options.profile },
27802
27868
  ...Object.keys(context).length > 0 && { context }
27803
27869
  };
27804
- const { stacks } = await synthesizer.synthesize(synthOpts);
27870
+ const { stacks, checkSelectedStacks } = await synthesizer.synthesize(synthOpts);
27805
27871
  const resolved = resolveMicrovmImageTarget(await resolveSingleTarget(target, {
27806
27872
  entries: listTargets(stacks).microvmImages,
27807
27873
  message: "Select a Lambda MicroVM image to run",
27808
27874
  noun: "Lambda MicroVM images",
27809
27875
  onMissing: () => new CdkLocalError(`${getEmbedConfig().cliName} start-microvm requires a <target> (a MicrovmImage display path or logical ID). Run \`${getEmbedConfig().cliName} list\` to see them, or run it in a TTY to pick interactively.`, "LOCAL_START_MICROVM_TARGET_REQUIRED")
27810
27876
  }), stacks);
27877
+ checkSelectedStacks?.([resolved.stack.stackName]);
27811
27878
  const config = readMicrovmImageConfig(resolved.logicalId, resolved.resource);
27812
27879
  const platform = options.platform ?? (config.architecture !== void 0 ? architectureToPlatform(config.architecture) : void 0);
27813
27880
  logger.info(`Target: ${displayStackName(`${resolved.stack.stackName}/${resolved.logicalId}`)} (MicroVM image ${displayIdent(config.name)}; hooks: ${Object.keys(config.hooks).join(", ") || "none"}${platform ? `; ${platform}` : ""})`);
@@ -28154,6 +28221,13 @@ const OPTION_SPECS = {
28154
28221
  leftPlaceholder: "listenerPort",
28155
28222
  rightPlaceholder: "hostPort"
28156
28223
  },
28224
+ {
28225
+ flag: "--assume-host",
28226
+ kind: "scalar",
28227
+ label: "Assume host",
28228
+ placeholder: "api.example.com",
28229
+ help: "Route and forward every request as if it carried this Host (host-header rules see it; the target receives it). <listenerPort>=<host> limits it to one listener. One value per run here; the CLI flag is repeatable."
28230
+ },
28157
28231
  {
28158
28232
  flag: "--bearer-token",
28159
28233
  kind: "scalar",
@@ -28314,6 +28388,15 @@ const OPTION_SPECS = {
28314
28388
  leftPlaceholder: "originId",
28315
28389
  rightPlaceholder: "./dist",
28316
28390
  help: "Point a distribution origin at a local directory when cdk-local can't resolve its BucketDeployment source."
28391
+ },
28392
+ {
28393
+ flag: "--env-vars",
28394
+ kind: "env-kv",
28395
+ label: "Env vars",
28396
+ sep: "=",
28397
+ leftPlaceholder: "KEY",
28398
+ rightPlaceholder: "value",
28399
+ help: "Overlay the Lambda Function URL / Web Function endpoint origin container env vars — add KEY=VALUE rows or paste a JSON object."
28317
28400
  }
28318
28401
  ]
28319
28402
  };
@@ -33277,4 +33360,4 @@ function addStudioSpecificOptions(cmd) {
33277
33360
 
33278
33361
  //#endregion
33279
33362
  export { postHook as $, deployedFillMayBeSecret as $a, parseConnectionsPath as $i, addImageOverrideOptions as $n, addStartApiSpecificOptions as $r, classifyS3Error as $t, microvmFidelityWarnings as A, discoverWebSocketApisOrThrow as Aa, applyCorsResponseHeaders as Ai, stripCloudFrontImport as An, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, AGENTCORE_MCP_PROTOCOL as Ba, evaluateResponseParameters as Bi, createLocalStartAlbCommand as Bn, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, resolveSsmParameters as Ca, verifyJwtViaDiscovery as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, listTargets as Da, invokeRequestAuthorizer as Di, compileCloudFrontFunction as Dn, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, countTargets as Ea, evaluateCachedLambdaPolicy as Ei, resolveWebFunctionTarget as En, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, pickRefLogicalId as Fa, matchRoute as Fi, findFileAssetForObjectKey as Fn, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, derivePseudoParametersFromRegion as Ga, HOST_DOCKER_INTERNAL_GATEWAY as Gi, addStartServiceSpecificOptions as Gn, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, AgentCoreResolutionError as Ha, selectIntegrationResponse as Hi, resolveAlbTarget as Hn, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, resolveLambdaArnIntrinsic as Ia, translateLambdaResponse as Ii, isBucketDeploymentResource as In, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, tryResolveImageFnJoin as Ja, resolveHostGatewayExtraHosts as Ji, addRunTaskSpecificOptions as Jn, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, formatStateRemedy as Ka, HOST_GATEWAY_MIN_VERSION as Ki, createLocalStartServiceCommand as Kn, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, AGENTCORE_A2A_PROTOCOL as La, applyAuthorizerOverlay as Li, resolveBucketDeploymentObjectKey as Ln, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, parseSelectionExpressionPath as Ma, buildCorsConfigFromCloudFrontChain as Mi, createLocalFileKvsDataSource as Mn, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, webSocketApiMatchesIdentifier as Na, isFunctionUrlOacFronted as Ni, createUnboundCloudFrontModule as Nn, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, availableWebSocketApiIdentifiers as Oa, invokeTokenAuthorizer as Oi, runViewerRequest as On, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, discoverRoutes as Pa, matchPreflight as Pi, bucketDeploymentSourceObjectKeys as Pn, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, containsDynamicReference as Qa, handleConnectionsRequest as Qi, addEcsAssumeRoleOptions as Qn, createLocalInvokeCommand as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, AGENTCORE_AGUI_PROTOCOL as Ra, buildHttpApiV2Event as Ri, addAlbSpecificOptions as Rn, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, collectSsmParameterRefs as Sa, verifyJwtAuthorizer as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, resolveSingleTarget as Ta, computeRequestIdentityHash as Ti, WebFunctionResolutionError as Tn, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, pickAgentCoreCandidateStack as Ua, tryParseStatus as Ui, isApplicationLoadBalancer as Un, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, AGENTCORE_RUNTIME_TYPE as Va, pickResponseTemplate as Vi, parseLbPortOverrides as Vn, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, resolveAgentCoreTarget as Wa, VtlEvaluationError as Wi, resolveAlbFrontDoor as Wn, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, DynamicReferenceResolutionError as Xa, ConnectionRegistry as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, classifySourceChange as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, LocalInvokeBuildError as Ya, bufferToBody as Yi, createLocalRunTaskCommand as Yn, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, DynamicReferenceResolver as Za, buildMgmtEndpointEnvUrl as Zi, addCommonEcsServiceOptions as Zn, addInvokeSpecificOptions as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, rejectExplicitCfnStackWithMultipleStacks as _a, defaultCredentialsLoader as _i, pickKvsLogicalIdFromArn as _n, isProxyEnvConfigured as _o, isLocalCdkAssetImage as _r, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, resolveRuntimeCodeMountPath as aa, attachStageContext as ai, serveLambdaUrlOrigin as an, withoutKeys as ao, resolveSharedSidecarCredentials as ar, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, resolveCfnStackName as ba, createJwksCache as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, CloudMapRegistry as br, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, EcsTaskResolutionError as ca, resolveEnvVars$1 as ci, buildEdgeRequestEvent as cn, deployAccountStsClientConfig as co, buildImageOverrideTag as cr, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, substituteAgainstStateAsync as da, filterRoutesByApiIdentifiers as di, httpHeadersToEdge as dn, resetWorkloadIdentity as do, mergeForService as dr, createLocalStartWebFunctionCommand as dt, buildConnectEvent as ea, createLocalStartApiCommand as ei, createS3OriginReader as en, firstUsableRegion as eo, buildEcsImageResolutionContext$1 as er, runHookBody as et, filterStudioCustomResources as f, substituteEnvVarsFromState as fa, groupRoutesByServer as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, workloadClientConfig as fo, parseImageOverrideFlags as fr, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, isCfnFlagPresent as ga, resolveServiceIntegrationParameters as gi, pickFunctionUrlLogicalIdFromOrigin as gn, buildProxyClientConfig as go, imageOverrideKeyAliases as gr, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, createLocalStateProvider as ha, resolveSelectionExpression as hi, isCloudFrontDistribution as hn, resolveProfileCredentials as ho, describePinnedImageUri as hr, selectServeInboundAuth as ht, coerceStopRequest as i, buildContainerImage as ia, createFileWatcher as ii, serveFromStaticOrigin as in, resolveDynamicReferencesInEnv as io, resolveEcsAssumeRoleOption as ir, MicrovmResolutionError as it, readRunHookPayload as j, filterWebSocketApisByIdentifiers as ja, buildCorsConfigByApiId as ji, createCloudFrontModule as jn, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, discoverWebSocketApis as ka, attachAuthorizers as ki, runViewerResponse as kn, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, assertEcsTaskImagesResolvable as la, availableApiIdentifiers as li, buildEdgeResponseEvent as ln, readEnvCallerCredentials as lo, canonicalizeImageOverrideKeys as lr, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, LocalStateSourceError as ma, startApiServer as mi, extractKvsAssociations as mn, buildStsClientConfig as mo, runImageOverrideBuilds as mr, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, buildMessageEvent as na, resolveApiTargetSubset as ni, startCloudFrontServer as nn, keysOverriddenBy as no, parseMaxTasks as nr, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, resolveRuntimeFileExtension as oa, buildStageMap as oi, applyEdgeRequestResult as on, SECOND_ASSUME_MESSAGE as oo, runEcsServiceEmulator as or, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, substituteEnvVarsFromStateAsync as pa, readMtlsMaterialsFromDisk as pi, describeS3OriginDomain as pn, workloadStsClientConfig as po, resolveImageOverrides as pr, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, substituteImagePlaceholders as qa, probeHostGatewaySupport as qi, serviceStrategy as qn, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, architectureToPlatform as ra, createAuthorizerCache as ri, resolveErrorResponseCandidates as rn, parseDynamicReference as ro, parseRestartPolicy as rr, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, resolveRuntimeImage as sa, materializeLayerFromArn as si, applyEdgeResponseResult as sn, assumedRoleRecorded as so, ImageOverrideError as sr, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, buildDisconnectEvent as ta, createWatchPredicates as ti, matchBehavior as tn, keysNotFromTemplate as to, ecsClusterOption as tr, waitForAppAnswer as tt, reinvoke as u, substituteAgainstState as ua, filterRoutesByApiIdentifier as ui, edgeHeadersToHttp as un, recordAssumedRole as uo, enforceImageOverrideOrphans as ur, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveCfnFallbackRegion as va, buildCognitoJwksUrl as vi, pickLambdaEdgeFunctionLogicalId as vn, listPinnedTargets as vr, startAgentCoreWsBridge as vt, createLocalListCommand as w, resolveWatchConfig as wa, buildMethodArn as wi, WEB_FUNCTION_TYPE as wn, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, CfnLocalStateProvider as xa, verifyCognitoJwt as xi, resolveCloudFrontDistribution as xn, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, resolveCfnRegion as ya, buildJwksUrlFromIssuer as yi, pickTargetFunctionLogicalId as yn, buildCloudMapIndex as yr, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, AGENTCORE_HTTP_PROTOCOL as za, buildRestV1Event as zi, albStrategy as zn, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
33280
- //# sourceMappingURL=local-studio-DKhMiVll.js.map
33363
+ //# sourceMappingURL=local-studio-D1XHJoJZ.js.map