cdk-local 0.166.2 → 0.166.3
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/{aws-proxy-D9ll_XO6.js → aws-proxy-Cml7xM3y.js} +34 -2
- package/dist/{aws-proxy-D9ll_XO6.js.map → aws-proxy-Cml7xM3y.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +7 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +3 -3
- package/dist/{local-studio-B42CkNWX.d.ts → local-studio-D6Qd0GIc.d.ts} +10 -3
- package/dist/{local-studio-B42CkNWX.d.ts.map → local-studio-D6Qd0GIc.d.ts.map} +1 -1
- package/dist/{local-studio-BK2wPCoQ.js → local-studio-WcBeAdbl.js} +281 -25
- package/dist/local-studio-WcBeAdbl.js.map +1 -0
- package/package.json +1 -1
- package/dist/local-studio-BK2wPCoQ.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as displayIdent, c as getEmbedConfig, i as STACK_REF_MAX_CODE_POINTS, o as displayStackName, s as displayToolOutput, t as getLogger, u as setEmbedConfig } from "./logger-pRhBzMui.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as formatAuthority, B as describeAwsFailureForWarn, C as isLegacyAwsEmulatorSentinel, D as realAwsEndpointFor, E as readAwsEmulatorEnvVarsFile, F as isPasteableCommandArg, G as stringifyThrown, H as flattenToOneLine, I as namesTheSameDirectory, J as readEnvVarsFileText, L as renderAssemblyPathEscape, M as absoluteAssemblyPathEscape, N as assemblyPathEscape, P as displayUntrustedValue, Q as isWildcardHostname, R as resolveAssemblyPath, T as legacyAwsEmulatorSentinelMessage, U as isAwsServiceException, V as describeCredentialLoadFailure, W as sanitizeServiceExceptionMessage, X as defineOwnKey, Y as resolveEnvVars$1, Z as isLoopbackHostname, _ as MIXED_MODE_RESIGN_PORT, a as buildProxyRequestHandler, b as describeRealAwsExceptions, c as getAwsEmulatorServiceRouting, et as formatHostForAuthority, h as setAwsEndpointOverride, i as buildProxyClientConfig, j as validateAwsEmulatorEnvVars, k as realAwsServicesOf, m as setAwsEmulatorServiceRouting, n as awsEmulatorRealServices, o as deployArtifactClientConfig, p as proxyAwareFetch, q as applyEnvOverrideMap, r as awsEndpointOverrideClientConfig, s as deployArtifactsReadEmulator, tt as hostFromAuthority, u as isAwsServiceRoutedToEmulator, v as REAL_AWS_SENTINEL, w as isRealAwsSentinel, y as createMixedModeStateProvider, z as clampErrorName } from "./aws-proxy-Cml7xM3y.js";
|
|
3
3
|
import { chmodSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { Command, InvalidArgumentError, Option } from "commander";
|
|
5
5
|
import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
@@ -293,6 +293,116 @@ function buildJavaTrustStore(pems, aliasPrefix = "cdk-local") {
|
|
|
293
293
|
return seq(integer(Buffer.from([3])), seq(oid(OID_PKCS7_DATA), explicit(0, octets(authSafe))));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
+
// src/local/aws-emulator-sqs-routing.ts
|
|
297
|
+
const REAL_SQS_QUEUE_URL = /^https?:\/\/(?:sqs\.[a-z0-9-]+|[a-z0-9-]+\.queue|queue)\.amazonaws\.com(?:\.cn)?\/([0-9]{12}\/[A-Za-z0-9_-]{1,80}(?:\.fifo)?)$/;
|
|
298
|
+
const SQS_BLOCKED_REGIONS = [
|
|
299
|
+
"af-south-1",
|
|
300
|
+
"ap-east-1",
|
|
301
|
+
"ap-east-2",
|
|
302
|
+
"ap-northeast-1",
|
|
303
|
+
"ap-northeast-2",
|
|
304
|
+
"ap-northeast-3",
|
|
305
|
+
"ap-south-1",
|
|
306
|
+
"ap-south-2",
|
|
307
|
+
"ap-southeast-1",
|
|
308
|
+
"ap-southeast-2",
|
|
309
|
+
"ap-southeast-3",
|
|
310
|
+
"ap-southeast-4",
|
|
311
|
+
"ap-southeast-5",
|
|
312
|
+
"ap-southeast-6",
|
|
313
|
+
"ap-southeast-7",
|
|
314
|
+
"ca-central-1",
|
|
315
|
+
"ca-west-1",
|
|
316
|
+
"cn-north-1",
|
|
317
|
+
"cn-northwest-1",
|
|
318
|
+
"eu-central-1",
|
|
319
|
+
"eu-central-2",
|
|
320
|
+
"eu-north-1",
|
|
321
|
+
"eu-south-1",
|
|
322
|
+
"eu-south-2",
|
|
323
|
+
"eu-west-1",
|
|
324
|
+
"eu-west-2",
|
|
325
|
+
"eu-west-3",
|
|
326
|
+
"il-central-1",
|
|
327
|
+
"me-central-1",
|
|
328
|
+
"me-south-1",
|
|
329
|
+
"mx-central-1",
|
|
330
|
+
"sa-east-1",
|
|
331
|
+
"us-east-1",
|
|
332
|
+
"us-east-2",
|
|
333
|
+
"us-gov-east-1",
|
|
334
|
+
"us-gov-west-1",
|
|
335
|
+
"us-west-1",
|
|
336
|
+
"us-west-2"
|
|
337
|
+
];
|
|
338
|
+
const REGION_SHAPE$1 = /^[a-z]{2}(-[a-z]+)+-\d+$/;
|
|
339
|
+
function isRealAwsHost(hostname) {
|
|
340
|
+
const h = hostname.toLowerCase().replace(/\.$/, "");
|
|
341
|
+
return /(^|\.)amazonaws\.com(\.cn)?$/.test(h) || /(^|\.)api\.aws$/.test(h);
|
|
342
|
+
}
|
|
343
|
+
function sqsEmulatorOriginOf(env) {
|
|
344
|
+
const endpoint = env["AWS_ENDPOINT_URL_SQS"] || env["AWS_ENDPOINT_URL"];
|
|
345
|
+
if (!endpoint) return void 0;
|
|
346
|
+
let url;
|
|
347
|
+
try {
|
|
348
|
+
url = new URL(endpoint.trim());
|
|
349
|
+
} catch {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (url.protocol !== "https:" && url.protocol !== "http:") return void 0;
|
|
353
|
+
if (isRealAwsHost(url.hostname)) return void 0;
|
|
354
|
+
return url.origin;
|
|
355
|
+
}
|
|
356
|
+
function rewriteSqsQueueUrlsInEnv(env, origin) {
|
|
357
|
+
const keys = [];
|
|
358
|
+
for (const [k, v] of Object.entries(env)) {
|
|
359
|
+
if (typeof v !== "string") continue;
|
|
360
|
+
const m = REAL_SQS_QUEUE_URL.exec(v.trim());
|
|
361
|
+
if (!m) continue;
|
|
362
|
+
env[k] = `${origin}/${m[1]}`;
|
|
363
|
+
keys.push(k);
|
|
364
|
+
}
|
|
365
|
+
return keys;
|
|
366
|
+
}
|
|
367
|
+
function repointLocalSqsQueueUrlsInEnv(env, fromOrigin, toOrigin) {
|
|
368
|
+
const from = new URL(fromOrigin).origin;
|
|
369
|
+
for (const [k, v] of Object.entries(env)) {
|
|
370
|
+
if (typeof v !== "string" || !v.startsWith(`${from}/`)) continue;
|
|
371
|
+
const rest = v.slice(from.length + 1);
|
|
372
|
+
if (/^[0-9]{12}\/[A-Za-z0-9_-]{1,80}(?:\.fifo)?$/.test(rest)) env[k] = `${toOrigin}/${rest}`;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function regionOfSqsHost(hostname) {
|
|
376
|
+
const m = /^(?:sqs\.([a-z0-9-]+)|([a-z0-9-]+)\.queue)\.amazonaws\.com(?:\.cn)?$/.exec(hostname);
|
|
377
|
+
const region = m?.[1] ?? m?.[2];
|
|
378
|
+
return region && REGION_SHAPE$1.test(region) ? region : void 0;
|
|
379
|
+
}
|
|
380
|
+
function realSqsHostnames(regions) {
|
|
381
|
+
const out = /* @__PURE__ */ new Set(["queue.amazonaws.com"]);
|
|
382
|
+
for (const r of regions) {
|
|
383
|
+
if (!REGION_SHAPE$1.test(r)) continue;
|
|
384
|
+
const suffix = r.startsWith("cn-") ? "amazonaws.com.cn" : "amazonaws.com";
|
|
385
|
+
out.add(`sqs.${r}.${suffix}`);
|
|
386
|
+
out.add(`${r}.queue.${suffix}`);
|
|
387
|
+
}
|
|
388
|
+
return [...out].sort();
|
|
389
|
+
}
|
|
390
|
+
function sqsBlockedRegionsFor(env) {
|
|
391
|
+
const regions = new Set(SQS_BLOCKED_REGIONS);
|
|
392
|
+
for (const k of ["AWS_REGION", "AWS_DEFAULT_REGION"]) {
|
|
393
|
+
const r = env[k]?.trim();
|
|
394
|
+
if (r && REGION_SHAPE$1.test(r)) regions.add(r);
|
|
395
|
+
}
|
|
396
|
+
for (const v of Object.values(env)) {
|
|
397
|
+
if (typeof v !== "string") continue;
|
|
398
|
+
for (const m of v.matchAll(/https?:\/\/([a-z0-9.-]+)\//gi)) {
|
|
399
|
+
const r = regionOfSqsHost(m[1].toLowerCase());
|
|
400
|
+
if (r) regions.add(r);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return [...regions];
|
|
404
|
+
}
|
|
405
|
+
|
|
296
406
|
// src/local/emulator-resign-sidecar.ts
|
|
297
407
|
const MIXED_MODE_RESIGN_BODY_CAP_BYTES = 104857600;
|
|
298
408
|
const RESIGN_SIDECAR_CORE = String.raw`
|
|
@@ -458,7 +568,7 @@ function passthroughHeaders(incoming){
|
|
|
458
568
|
// Only a real SQS queue URL is rewritten: an AWS SQS host (either form, any
|
|
459
569
|
// partition suffix), no port, user info, query or fragment, and a path of a
|
|
460
570
|
// 12-digit account and a queue name.
|
|
461
|
-
var SQS_QUEUE_URL
|
|
571
|
+
var SQS_QUEUE_URL=/${REAL_SQS_QUEUE_URL.source}/;
|
|
462
572
|
function localQueueUrl(u,origin){var m=SQS_QUEUE_URL.exec(String(u));return m?origin+'/'+m[1]:u;}
|
|
463
573
|
var SQS_QUEUE_URL_OPERATIONS=new Set(['CreateQueue','GetQueueUrl','ListQueues','ListDeadLetterSourceQueues']);
|
|
464
574
|
// An unsigned request (an emulator run with --auth off and an SDK that signs
|
|
@@ -1252,8 +1362,24 @@ function applyWorkloadAwsWiringToEnv(env, wiring, defaultCredentials) {
|
|
|
1252
1362
|
if (defaultCredentials && !out["AWS_ACCESS_KEY_ID"]) setCreds(defaultCredentials);
|
|
1253
1363
|
}
|
|
1254
1364
|
if (out["AWS_REGION"] && !out["AWS_DEFAULT_REGION"]) out["AWS_DEFAULT_REGION"] = out["AWS_REGION"];
|
|
1365
|
+
const sqsOrigin = awsEmulatorSqsOriginFor(out, wiring);
|
|
1366
|
+
if (sqsOrigin !== void 0) {
|
|
1367
|
+
const keys = rewriteSqsQueueUrlsInEnv(out, sqsOrigin);
|
|
1368
|
+
if (keys.length > 0) getLogger().debug(`--aws-emulator: SQS queue URLs in ${keys.join(", ")} now point at ${sqsOrigin} (SQS is on AWS Emulator).`);
|
|
1369
|
+
}
|
|
1255
1370
|
return out;
|
|
1256
1371
|
}
|
|
1372
|
+
function awsEmulatorSqsOriginFor(env, wiring) {
|
|
1373
|
+
if (wiring.mode !== "emulator" && !wiring.mixed) return void 0;
|
|
1374
|
+
return sqsEmulatorOriginOf(env);
|
|
1375
|
+
}
|
|
1376
|
+
function awsEmulatorSqsHostBlocks(finalEnv, wiring) {
|
|
1377
|
+
if (!wiring || awsEmulatorSqsOriginFor(finalEnv, wiring) === void 0) return [];
|
|
1378
|
+
return realSqsHostnames(sqsBlockedRegionsFor(finalEnv)).map((host) => ({
|
|
1379
|
+
host,
|
|
1380
|
+
ip: "127.0.0.1"
|
|
1381
|
+
}));
|
|
1382
|
+
}
|
|
1257
1383
|
function envKeepsRealAwsException(env) {
|
|
1258
1384
|
return Object.entries(env).some(([k, v]) => k !== "AWS_ENDPOINT_URL" && isRealAwsSentinel(k, v));
|
|
1259
1385
|
}
|
|
@@ -1337,7 +1463,7 @@ async function activateWorkloadAwsWiring(options) {
|
|
|
1337
1463
|
override: wiring.mixed.emulatorClientOverride,
|
|
1338
1464
|
envOverrides: overrides
|
|
1339
1465
|
});
|
|
1340
|
-
getLogger().info(`Mixed mode: every AWS call goes to AWS Emulator at ${wiring.mixed.emulatorEndpoint.url} (signed with its keys) except ${
|
|
1466
|
+
if (!options.singleWorkload) getLogger().info(`Mixed mode: every AWS call goes to AWS Emulator at ${wiring.mixed.emulatorEndpoint.url} (signed with its keys), except the services --env-vars marks "${REAL_AWS_SENTINEL}" for a workload, which go to real AWS with your real credentials, for that workload and for ${getEmbedConfig().productName}'s own calls for it: ${describeRealAwsExceptions(scan.exceptions)}. A workload with no exception gets AWS Emulator's keys only.`);
|
|
1341
1467
|
} else if (wiring.mode === "emulator" && wiring.emulatorEndpoint) {
|
|
1342
1468
|
setAwsEmulatorServiceRouting(void 0);
|
|
1343
1469
|
setAwsEndpointOverride({
|
|
@@ -1352,6 +1478,17 @@ async function activateWorkloadAwsWiring(options) {
|
|
|
1352
1478
|
}
|
|
1353
1479
|
return wiring;
|
|
1354
1480
|
}
|
|
1481
|
+
function logMixedModeForWorkload(workload, label) {
|
|
1482
|
+
const mixed = active?.mixed;
|
|
1483
|
+
if (!mixed) return;
|
|
1484
|
+
const services = awsEmulatorRealServices(workload) ?? [];
|
|
1485
|
+
const at = `AWS Emulator at ${mixed.emulatorEndpoint.url}`;
|
|
1486
|
+
if (services.length === 0) {
|
|
1487
|
+
getLogger().info(`Mixed mode: ${label} keeps no "${REAL_AWS_SENTINEL}" exception in --env-vars, so every AWS call it makes goes to ${at}, with its keys only.`);
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
getLogger().info(`Mixed mode: every AWS call of ${label} goes to ${at} (signed with its keys) except ${services.join(", ")}, which go to real AWS with your real credentials, for the workload and for ${getEmbedConfig().productName}'s own calls for it.`);
|
|
1491
|
+
}
|
|
1355
1492
|
let stateSourceHintShown = false;
|
|
1356
1493
|
function takeAwsEmulatorStateSourceHint() {
|
|
1357
1494
|
const wiring = active;
|
|
@@ -8889,7 +9026,13 @@ async function runDetached(opts) {
|
|
|
8889
9026
|
async function withWorkloadAwsWiring(opts, wiring) {
|
|
8890
9027
|
const defaults = wiring.mode === "forward" && !opts.env["AWS_ACCESS_KEY_ID"] ? await resolveHostDefaultCredentials() : void 0;
|
|
8891
9028
|
const env = applyWorkloadAwsWiringToEnv(opts.env, wiring, defaults);
|
|
8892
|
-
if (opts.network === "host" && wiring.sidecar?.passthrough && env["AWS_ENDPOINT_URL_SQS"] === wiring.sidecar.endpoint)
|
|
9029
|
+
if (opts.network === "host" && wiring.sidecar?.passthrough && env["AWS_ENDPOINT_URL_SQS"] === wiring.sidecar.endpoint) {
|
|
9030
|
+
delete env["AWS_ENDPOINT_URL_SQS"];
|
|
9031
|
+
const emulator = sqsEmulatorOriginOf(env);
|
|
9032
|
+
if (emulator) repointLocalSqsQueueUrlsInEnv(env, wiring.sidecar.endpoint, emulator);
|
|
9033
|
+
}
|
|
9034
|
+
const sqsBlocks = awsEmulatorSqsHostBlocks(env, wiring);
|
|
9035
|
+
const extraHosts = sqsBlocks.length > 0 ? [...opts.extraHosts ?? [], ...sqsBlocks] : opts.extraHosts;
|
|
8893
9036
|
const credsPath = `${getEmbedConfig().awsBindMountPath}/credentials`;
|
|
8894
9037
|
const emulatorOnly = workloadGetsEmulatorKeysOnly(opts.env, wiring);
|
|
8895
9038
|
const extra = (opts.extraMounts ?? []).filter((m) => !emulatorOnly || m.containerPath !== credsPath);
|
|
@@ -8901,7 +9044,8 @@ async function withWorkloadAwsWiring(opts, wiring) {
|
|
|
8901
9044
|
return {
|
|
8902
9045
|
...opts,
|
|
8903
9046
|
env,
|
|
8904
|
-
extraMounts: extra
|
|
9047
|
+
extraMounts: extra,
|
|
9048
|
+
...extraHosts ? { extraHosts } : {}
|
|
8905
9049
|
};
|
|
8906
9050
|
}
|
|
8907
9051
|
async function prepareLoopbackForwarder(wiring) {
|
|
@@ -9265,6 +9409,19 @@ function execEnvForSecrets(passthrough) {
|
|
|
9265
9409
|
return { env };
|
|
9266
9410
|
}
|
|
9267
9411
|
|
|
9412
|
+
// src/local/debug-timeout.ts
|
|
9413
|
+
const DEBUG_FUNCTION_TIMEOUT_SEC = 36e3;
|
|
9414
|
+
function applyDebuggerEnv(dockerEnv, debugPort) {
|
|
9415
|
+
dockerEnv["NODE_OPTIONS"] = `--inspect-brk=0.0.0.0:${debugPort}`;
|
|
9416
|
+
dockerEnv["AWS_LAMBDA_FUNCTION_TIMEOUT"] = String(DEBUG_FUNCTION_TIMEOUT_SEC);
|
|
9417
|
+
}
|
|
9418
|
+
function rieInvokeTimeoutMs(timeoutSec, debugging) {
|
|
9419
|
+
return Math.max(3e4, (debugging ? Math.max(timeoutSec, DEBUG_FUNCTION_TIMEOUT_SEC) : timeoutSec) * 2 * 1e3);
|
|
9420
|
+
}
|
|
9421
|
+
function debugTimeoutNotice(flag) {
|
|
9422
|
+
return `${flag}: the function Timeout is lifted to ${DEBUG_FUNCTION_TIMEOUT_SEC} seconds while debugging, so the handler waits for a debugger to attach.`;
|
|
9423
|
+
}
|
|
9424
|
+
|
|
9268
9425
|
// src/local/docker-version.ts
|
|
9269
9426
|
const HOST_GATEWAY_MIN_VERSION = {
|
|
9270
9427
|
major: 20,
|
|
@@ -9372,7 +9529,7 @@ async function invokeRie(host, port, event, timeoutMs) {
|
|
|
9372
9529
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
9373
9530
|
let response;
|
|
9374
9531
|
try {
|
|
9375
|
-
response = await fetchWithStartupRetry(url, body, controller.signal);
|
|
9532
|
+
response = await fetchWithStartupRetry(url, body, controller.signal, void 0, timeoutMs);
|
|
9376
9533
|
} catch (err) {
|
|
9377
9534
|
if (err.name === "AbortError") throw new Error(`RIE invoke at ${url} timed out after ${timeoutMs}ms. The handler may be hung; check container logs.`);
|
|
9378
9535
|
throw err;
|
|
@@ -9390,16 +9547,19 @@ async function invokeRie(host, port, event, timeoutMs) {
|
|
|
9390
9547
|
raw
|
|
9391
9548
|
};
|
|
9392
9549
|
}
|
|
9393
|
-
async function fetchWithStartupRetry(url, body, signal, extraHeaders) {
|
|
9550
|
+
async function fetchWithStartupRetry(url, body, signal, extraHeaders, timeoutMs) {
|
|
9394
9551
|
const maxAttempts = 3;
|
|
9552
|
+
const headers = {
|
|
9553
|
+
"Content-Type": "application/json",
|
|
9554
|
+
...extraHeaders
|
|
9555
|
+
};
|
|
9556
|
+
const longWait = timeoutMs !== void 0 && timeoutMs > UNDICI_DEFAULT_TIMEOUT_MS;
|
|
9395
9557
|
let lastError;
|
|
9396
9558
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
|
|
9559
|
+
if (longWait) return await postWithoutClientTimeout(url, body, headers, signal);
|
|
9397
9560
|
return await fetch(url, {
|
|
9398
9561
|
method: "POST",
|
|
9399
|
-
headers
|
|
9400
|
-
"Content-Type": "application/json",
|
|
9401
|
-
...extraHeaders
|
|
9402
|
-
},
|
|
9562
|
+
headers,
|
|
9403
9563
|
body,
|
|
9404
9564
|
signal
|
|
9405
9565
|
});
|
|
@@ -9411,6 +9571,34 @@ async function fetchWithStartupRetry(url, body, signal, extraHeaders) {
|
|
|
9411
9571
|
}
|
|
9412
9572
|
throw lastError;
|
|
9413
9573
|
}
|
|
9574
|
+
const UNDICI_DEFAULT_TIMEOUT_MS = 3e5;
|
|
9575
|
+
function postWithoutClientTimeout(url, body, headers, signal) {
|
|
9576
|
+
return new Promise((resolve, reject) => {
|
|
9577
|
+
const req = request(url, {
|
|
9578
|
+
method: "POST",
|
|
9579
|
+
headers: {
|
|
9580
|
+
...headers,
|
|
9581
|
+
"Content-Length": String(Buffer.byteLength(body))
|
|
9582
|
+
},
|
|
9583
|
+
signal
|
|
9584
|
+
}, (res) => {
|
|
9585
|
+
const responseHeaders = new Headers();
|
|
9586
|
+
for (const [k, v] of Object.entries(res.headers)) {
|
|
9587
|
+
if (v === void 0) continue;
|
|
9588
|
+
for (const one of Array.isArray(v) ? v : [v]) responseHeaders.append(k, one);
|
|
9589
|
+
}
|
|
9590
|
+
const status = res.statusCode ?? 502;
|
|
9591
|
+
const nullBody = status === 204 || status === 205 || status === 304;
|
|
9592
|
+
if (nullBody) res.resume();
|
|
9593
|
+
resolve(new Response(nullBody ? null : Readable.toWeb(res), {
|
|
9594
|
+
status,
|
|
9595
|
+
headers: responseHeaders
|
|
9596
|
+
}));
|
|
9597
|
+
});
|
|
9598
|
+
req.on("error", reject);
|
|
9599
|
+
req.end(body);
|
|
9600
|
+
});
|
|
9601
|
+
}
|
|
9414
9602
|
var StreamingPreludeLimitError = class StreamingPreludeLimitError extends Error {
|
|
9415
9603
|
constructor(message) {
|
|
9416
9604
|
super(message);
|
|
@@ -9438,7 +9626,7 @@ async function invokeRieStreaming(host, port, event, timeoutMs, options = {}) {
|
|
|
9438
9626
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
9439
9627
|
let response;
|
|
9440
9628
|
try {
|
|
9441
|
-
response = await fetchWithStartupRetry(url, body, controller.signal, { "Lambda-Runtime-Function-Response-Mode": "streaming" });
|
|
9629
|
+
response = await fetchWithStartupRetry(url, body, controller.signal, { "Lambda-Runtime-Function-Response-Mode": "streaming" }, timeoutMs);
|
|
9442
9630
|
} catch (err) {
|
|
9443
9631
|
clearTimeout(timer);
|
|
9444
9632
|
if (err.name === "AbortError") throw new Error(`RIE streaming invoke at ${url} timed out after ${timeoutMs}ms. The handler may be hung; check container logs.`);
|
|
@@ -9844,12 +10032,60 @@ function getDockerImageBySourceHash(manifest, imageUri) {
|
|
|
9844
10032
|
}
|
|
9845
10033
|
if (entries.length === 1) {
|
|
9846
10034
|
const [singleHash, singleAsset] = entries[0];
|
|
9847
|
-
return {
|
|
10035
|
+
if (imageUriTargetsAssetRepository(imageUri, singleAsset)) return {
|
|
9848
10036
|
hash: singleHash,
|
|
9849
10037
|
asset: singleAsset
|
|
9850
10038
|
};
|
|
9851
10039
|
}
|
|
9852
10040
|
}
|
|
10041
|
+
function imageUriTargetsAssetRepository(imageUri, asset) {
|
|
10042
|
+
const repo = extractRepositoryFromImageUri(imageUri);
|
|
10043
|
+
if (repo === void 0) return false;
|
|
10044
|
+
for (const dest of Object.values(asset.destinations ?? {})) {
|
|
10045
|
+
const name = dest?.repositoryName;
|
|
10046
|
+
if (typeof name !== "string" || name.length === 0) continue;
|
|
10047
|
+
if (pseudoParameterPatternsOverlap(name, repo)) return true;
|
|
10048
|
+
}
|
|
10049
|
+
return false;
|
|
10050
|
+
}
|
|
10051
|
+
function extractRepositoryFromImageUri(imageUri) {
|
|
10052
|
+
const slash = imageUri.indexOf("/");
|
|
10053
|
+
if (slash < 0) return void 0;
|
|
10054
|
+
let path = imageUri.slice(slash + 1);
|
|
10055
|
+
const at = path.indexOf("@");
|
|
10056
|
+
if (at >= 0) path = path.slice(0, at);
|
|
10057
|
+
const lastSlash = path.lastIndexOf("/");
|
|
10058
|
+
const colon = path.lastIndexOf(":");
|
|
10059
|
+
if (colon > lastSlash && !path.slice(colon).includes("}")) path = path.slice(0, colon);
|
|
10060
|
+
return path.length > 0 ? path : void 0;
|
|
10061
|
+
}
|
|
10062
|
+
const PSEUDO_PARAMETER = Symbol("pseudo-parameter");
|
|
10063
|
+
function pseudoParameterPatternsOverlap(a, b) {
|
|
10064
|
+
const ta = tokenizePseudoParameters(a);
|
|
10065
|
+
const tb = tokenizePseudoParameters(b);
|
|
10066
|
+
const memo = /* @__PURE__ */ new Map();
|
|
10067
|
+
const match = (i, j) => {
|
|
10068
|
+
if (i === ta.length || j === tb.length) return i === ta.length && j === tb.length;
|
|
10069
|
+
const key = i * (tb.length + 1) + j;
|
|
10070
|
+
const cached = memo.get(key);
|
|
10071
|
+
if (cached !== void 0) return cached;
|
|
10072
|
+
let result = false;
|
|
10073
|
+
if (ta[i] === PSEUDO_PARAMETER) for (let k = j; k < tb.length && tb[k] !== "/" && !result; k++) result = match(i + 1, k + 1);
|
|
10074
|
+
else if (tb[j] === PSEUDO_PARAMETER) for (let k = i; k < ta.length && ta[k] !== "/" && !result; k++) result = match(k + 1, j + 1);
|
|
10075
|
+
else result = ta[i] === tb[j] && match(i + 1, j + 1);
|
|
10076
|
+
memo.set(key, result);
|
|
10077
|
+
return result;
|
|
10078
|
+
};
|
|
10079
|
+
return match(0, 0);
|
|
10080
|
+
}
|
|
10081
|
+
function tokenizePseudoParameters(value) {
|
|
10082
|
+
const tokens = [];
|
|
10083
|
+
value.split(/\$\{AWS::[^}]*\}/).forEach((part, index) => {
|
|
10084
|
+
if (index > 0) tokens.push(PSEUDO_PARAMETER);
|
|
10085
|
+
tokens.push(...Array.from(part));
|
|
10086
|
+
});
|
|
10087
|
+
return tokens;
|
|
10088
|
+
}
|
|
9853
10089
|
function extractHashFromImageUri(imageUri) {
|
|
9854
10090
|
if (imageUri.includes("@sha256:")) return void 0;
|
|
9855
10091
|
return /:([a-f0-9]{8,})$/.exec(imageUri)?.[1];
|
|
@@ -9960,7 +10196,10 @@ async function localInvokeCommand(target, options, extraStateProviders) {
|
|
|
9960
10196
|
getLogger().debug(`cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
9961
10197
|
});
|
|
9962
10198
|
try {
|
|
9963
|
-
await activateWorkloadAwsWiring(
|
|
10199
|
+
await activateWorkloadAwsWiring({
|
|
10200
|
+
...options,
|
|
10201
|
+
singleWorkload: true
|
|
10202
|
+
});
|
|
9964
10203
|
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
9965
10204
|
roleFlag: "--assume-role",
|
|
9966
10205
|
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
@@ -9995,6 +10234,7 @@ async function localInvokeCommand(target, options, extraStateProviders) {
|
|
|
9995
10234
|
const lambda = resolveLambdaTarget(resolvedTarget, stacks);
|
|
9996
10235
|
const targetLabel = lambda.kind === "zip" ? lambda.runtime : "container image";
|
|
9997
10236
|
logger.info(`Target: ${displayStackName(`${lambda.stack.stackName}/${lambda.logicalId}`)} (${targetLabel})`);
|
|
10237
|
+
logMixedModeForWorkload(lambdaWorkload(lambda), `Lambda ${displayStackName(`${lambda.stack.stackName}/${lambda.logicalId}`)}`);
|
|
9998
10238
|
imagePlan = await resolveImagePlan(lambda, options);
|
|
9999
10239
|
const containerEnv = await resolveLambdaContainerEnv(lambda, options, profileCredentials, extraStateProviders);
|
|
10000
10240
|
const dockerEnv = containerEnv.env;
|
|
@@ -10008,7 +10248,8 @@ async function localInvokeCommand(target, options, extraStateProviders) {
|
|
|
10008
10248
|
if (options.debugPort) {
|
|
10009
10249
|
debugPort = Number(options.debugPort);
|
|
10010
10250
|
if (!Number.isInteger(debugPort) || debugPort <= 0 || debugPort > 65535) throw new Error(`--debug-port must be an integer in 1..65535, got '${options.debugPort}'`);
|
|
10011
|
-
dockerEnv
|
|
10251
|
+
applyDebuggerEnv(dockerEnv, debugPort);
|
|
10252
|
+
logger.info(debugTimeoutNotice("--debug-port"));
|
|
10012
10253
|
if (lambda.kind === "image") logger.warn("--debug-port sets NODE_OPTIONS unconditionally on container Lambdas. If the image's runtime is not Node.js, this flag is a no-op.");
|
|
10013
10254
|
}
|
|
10014
10255
|
const hostPort = await pickFreePort();
|
|
@@ -10045,7 +10286,7 @@ async function localInvokeCommand(target, options, extraStateProviders) {
|
|
|
10045
10286
|
};
|
|
10046
10287
|
process.on("SIGINT", sigintHandler);
|
|
10047
10288
|
await waitForRieReady(containerHost, hostPort, 5e3);
|
|
10048
|
-
const invokeTimeoutMs =
|
|
10289
|
+
const invokeTimeoutMs = rieInvokeTimeoutMs(lambda.timeoutSec, debugPort !== void 0);
|
|
10049
10290
|
const result = await invokeRie(containerHost, hostPort, event, invokeTimeoutMs);
|
|
10050
10291
|
await new Promise((resolveDelay) => setTimeout(resolveDelay, 250));
|
|
10051
10292
|
process.stdout.write(`${result.raw}\n`);
|
|
@@ -15925,7 +16166,8 @@ async function localStartApiCommand(targets, options, extraStateProviders) {
|
|
|
15925
16166
|
warnIamRoutes(initialMaterial.routes);
|
|
15926
16167
|
let maxTimeoutSec = 0;
|
|
15927
16168
|
for (const spec of initialMaterial.specs.values()) if (spec.lambda.timeoutSec > maxTimeoutSec) maxTimeoutSec = spec.lambda.timeoutSec;
|
|
15928
|
-
const rieTimeoutMs =
|
|
16169
|
+
const rieTimeoutMs = rieInvokeTimeoutMs(maxTimeoutSec, debugPortBase !== void 0);
|
|
16170
|
+
if (debugPortBase !== void 0) logger.info(debugTimeoutNotice("--debug-port-base"));
|
|
15929
16171
|
const basePort = parseInt(options.port, 10);
|
|
15930
16172
|
if (!Number.isFinite(basePort) || basePort < 0 || basePort > 65535) throw new Error(`--port must be 0..65535 (got ${options.port}).`);
|
|
15931
16173
|
const mtlsConfig = resolveMtlsConfig(options);
|
|
@@ -16540,7 +16782,7 @@ async function buildContainerSpec(args) {
|
|
|
16540
16782
|
}
|
|
16541
16783
|
}
|
|
16542
16784
|
setContainerRegion(dockerEnv, containerRegion);
|
|
16543
|
-
if (debugPort !== void 0) dockerEnv
|
|
16785
|
+
if (debugPort !== void 0) applyDebuggerEnv(dockerEnv, debugPort);
|
|
16544
16786
|
const tmpfs = lambda.ephemeralStorageMb !== void 0 ? {
|
|
16545
16787
|
target: "/tmp",
|
|
16546
16788
|
sizeMb: lambda.ephemeralStorageMb
|
|
@@ -17897,7 +18139,10 @@ async function localInvokeAgentCoreCommand(target, options, extraStateProviders)
|
|
|
17897
18139
|
getLogger().debug(`cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
17898
18140
|
});
|
|
17899
18141
|
try {
|
|
17900
|
-
await activateWorkloadAwsWiring(
|
|
18142
|
+
await activateWorkloadAwsWiring({
|
|
18143
|
+
...options,
|
|
18144
|
+
singleWorkload: true
|
|
18145
|
+
});
|
|
17901
18146
|
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
17902
18147
|
roleFlag: "--assume-role",
|
|
17903
18148
|
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
@@ -17937,6 +18182,10 @@ async function localInvokeAgentCoreCommand(target, options, extraStateProviders)
|
|
|
17937
18182
|
};
|
|
17938
18183
|
const resolved = resolveAgentCoreTarget(resolvedTarget, stacks, imageContext);
|
|
17939
18184
|
logger.info(`Target: ${displayStackName(`${resolved.stack.stackName}/${resolved.logicalId}`)} (${resolved.protocol})`);
|
|
18185
|
+
logMixedModeForWorkload({
|
|
18186
|
+
logicalId: resolved.logicalId,
|
|
18187
|
+
cdkPath: readCdkPathOrUndefined(resolved.resource)
|
|
18188
|
+
}, `AgentCore runtime ${displayStackName(`${resolved.stack.stackName}/${resolved.logicalId}`)}`);
|
|
17940
18189
|
const isMcp = resolved.protocol === "MCP";
|
|
17941
18190
|
const isA2a = resolved.protocol === "A2A";
|
|
17942
18191
|
if (resolved.protocol === "AGUI") logger.info("AGUI runtime: routing through the HTTP /invocations + /ws path (AG-UI wire is SSE / WebSocket on port 8080).");
|
|
@@ -20167,10 +20416,17 @@ function buildDockerRunArgs(opts) {
|
|
|
20167
20416
|
finalEnv["AWS_SECRET_ACCESS_KEY"] = defaultCredentials.secretAccessKey;
|
|
20168
20417
|
if (defaultCredentials.sessionToken) finalEnv["AWS_SESSION_TOKEN"] = defaultCredentials.sessionToken;
|
|
20169
20418
|
}
|
|
20170
|
-
if (wiring)
|
|
20171
|
-
|
|
20172
|
-
|
|
20173
|
-
|
|
20419
|
+
if (wiring) {
|
|
20420
|
+
finalEnv = applyWorkloadAwsWiringToEnv(finalEnv, wiring.mode === "emulator" ? wiring : {
|
|
20421
|
+
...wiring,
|
|
20422
|
+
env: {}
|
|
20423
|
+
});
|
|
20424
|
+
for (const h of awsEmulatorSqsHostBlocks(finalEnv, wiring)) {
|
|
20425
|
+
const mapping = `${h.host}:${h.ip}`;
|
|
20426
|
+
args.push("--add-host", mapping);
|
|
20427
|
+
ownerAddHosts.push(mapping);
|
|
20428
|
+
}
|
|
20429
|
+
}
|
|
20174
20430
|
const sensitiveEnvKeys = new Set(SENSITIVE_ENV_KEYS);
|
|
20175
20431
|
for (const s of secrets) sensitiveEnvKeys.add(s.name);
|
|
20176
20432
|
for (const s of container.secrets) sensitiveEnvKeys.add(s.name);
|
|
@@ -36484,5 +36740,5 @@ function addStudioSpecificOptions(cmd) {
|
|
|
36484
36740
|
return cmd;
|
|
36485
36741
|
}
|
|
36486
36742
|
|
|
36487
|
-
export { postHook as $, AGENTCORE_HTTP_PROTOCOL as $a, probeHostGatewaySupport as $i, addImageOverrideOptions as $n, resolveHostDefaultCredentials as $o, resolveApiTargetSubset as $r, classifyS3Error as $t, microvmFidelityWarnings as A, isCfnFlagPresent as Aa, translateLambdaResponse as Ai, stripCloudFrontImport as An, AUTH_OFF_PLACEHOLDER_CREDENTIALS as Ao, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, countTargets as Ba, ConnectionRegistry as Bi, createLocalStartAlbCommand as Bn, displayEndpointValue as Bo, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, substituteEnvVarsFromState as Ca, attachAuthorizers as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, assumedRoleRecorded as Co, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, UNNAMED_WORKLOAD as Da, isFunctionUrlOacFronted as Di, compileCloudFrontFunction as Dn, resetWorkloadIdentity as Do, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, LocalStateSourceError as Ea, buildCorsConfigFromCloudFrontChain as Ei, resolveWebFunctionTarget as En, recordAssumedRole as Eo, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, CfnLocalStateProvider as Fa, pickResponseTemplate as Fi, findFileAssetForObjectKey as Fn, HOST_DEFAULT_CREDENTIALS_MISS_TTL_MS as Fo, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, filterWebSocketApisByIdentifiers as Ga, buildDisconnectEvent as Gi, addStartServiceSpecificOptions as Gn, javaTruststoreToolOptions as Go, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, availableWebSocketApiIdentifiers as Ha, handleConnectionsRequest as Hi, resolveAlbTarget as Hn, getActiveWorkloadAwsWiring as Ho, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, collectSsmParameterRefs as Ia, selectIntegrationResponse as Ii, isBucketDeploymentResource as In, activateWorkloadAwsWiring as Io, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, discoverRoutes as Ja, createFileWatcher as Ji, addRunTaskSpecificOptions as Jn, parseAwsEndpoint as Jo, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, parseSelectionExpressionPath as Ka, buildMessageEvent as Ki, createLocalStartServiceCommand as Kn, loopbackForwarderPlan as Ko, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, resolveSsmParameters as La, tryParseStatus as Li, resolveBucketDeploymentObjectKey as Ln, applyWorkloadAwsWiringToEnv as Lo, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, resolveCfnFallbackRegion as Ma, buildHttpApiV2Event as Mi, createLocalFileKvsDataSource as Mn, DEFAULT_AWS_EMULATOR_URL as Mo, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, resolveCfnRegion as Na, buildRestV1Event as Ni, createUnboundCloudFrontModule as Nn, EMULATOR_SCRUBBED_ENV_KEYS as No, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, createLocalStateProvider as Oa, matchPreflight as Oi, runViewerRequest as On, workloadClientConfig as Oo, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, resolveCfnStackName as Pa, evaluateResponseParameters as Pi, bucketDeploymentSourceObjectKeys as Pn, HOST_CA_TRUST_ENV_KEYS as Po, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, AGENTCORE_AGUI_PROTOCOL as Qa, HOST_GATEWAY_MIN_VERSION as Qi, addEcsAssumeRoleOptions as Qn, resolveAwsEmulatorOption as Qo, createWatchPredicates as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, resolveWatchConfig as Ra, VtlEvaluationError as Ri, addAlbSpecificOptions as Rn, awsEmulatorEnvName as Ro, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, substituteAgainstStateAsync as Sa, invokeTokenAuthorizer as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, SECOND_ASSUME_MESSAGE as So, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, materializeLayerFromArn as Ta, buildCorsConfigByApiId as Ti, WebFunctionResolutionError as Tn, readEnvCallerCredentials as To, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, discoverWebSocketApis as Ua, parseConnectionsPath as Ui, isApplicationLoadBalancer as Un, getContainerCaBundlePath as Uo, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, listTargets as Va, buildMgmtEndpointEnvUrl as Vi, parseLbPortOverrides as Vn, effectiveLoopbackPorts as Vo, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, discoverWebSocketApisOrThrow as Wa, buildConnectEvent as Wi, resolveAlbFrontDoor as Wn, getContainerJavaTruststorePath as Wo, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, resolveLambdaArnIntrinsic as Xa, createLocalInvokeCommand as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, readEmulatorRunFiles as Xo, addStartApiSpecificOptions as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, pickRefLogicalId as Ya, addInvokeSpecificOptions as Yi, createLocalRunTaskCommand as Yn, probeAwsEmulatorHealth as Yo, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, AGENTCORE_A2A_PROTOCOL as Za, HOST_DOCKER_INTERNAL_GATEWAY as Zi, addCommonEcsServiceOptions as Zn, readProfileEndpointSettings as Zo, createLocalStartApiCommand as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, resolveRuntimeFileExtension as _a, verifyJwtViaDiscovery as _i, pickKvsLogicalIdFromArn as _n, parseDynamicReference as _o, isLocalCdkAssetImage as _r, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, buildLoopbackForwarderDockerArgs as aa, filterRoutesByApiIdentifiers as ai, serveLambdaUrlOrigin as an, derivePseudoParametersFromRegion as ao, resolveSharedSidecarCredentials as ar, buildJavaTrustStore as as, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, assertEcsTaskImagesResolvable as ba, evaluateCachedLambdaPolicy as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, addAwsEndpointOptions as bo, CloudMapRegistry as br, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, ensureForwarderImage as ca, startApiServer as ci, buildEdgeRequestEvent as cn, tryResolveImageFnJoin as co, buildImageOverrideTag as cr, resolveProfileCredentials as cs, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, buildContainerImage as da, defaultCredentialsLoader as di, httpHeadersToEdge as dn, DynamicReferenceResolver as do, mergeForService as dr, createLocalStartWebFunctionCommand as dt, resolveHostGatewayExtraHosts as ea, createAuthorizerCache as ei, createS3OriginReader as en, AGENTCORE_MCP_PROTOCOL as eo, buildEcsImageResolutionContext$1 as er, resolveWorkloadAwsWiring as es, runHookBody as et, filterStudioCustomResources as f, dockerRegistryEnv as fa, buildCognitoJwksUrl as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, containsDynamicReference as fo, parseImageOverrideFlags as fr, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, resolveRuntimeCodeMountPath as ga, verifyJwtAuthorizer as gi, pickFunctionUrlLogicalIdFromOrigin as gn, keysOverriddenBy as go, imageOverrideKeyAliases as gr, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, stripEcrCredentials as ha, verifyCognitoJwt as hi, isCloudFrontDistribution as hn, keysNotFromTemplate as ho, describePinnedImageUri as hr, selectServeInboundAuth as ht, coerceStopRequest as i, awaitLoopbackForwarderStatus as ia, filterRoutesByApiIdentifier as ii, serveFromStaticOrigin as in, resolveAgentCoreTarget as io, resolveEcsAssumeRoleOption as ir, MIXED_MODE_RESIGN_BODY_CAP_BYTES as is, MicrovmResolutionError as it, readRunHookPayload as j, rejectExplicitCfnStackWithMultipleStacks as ja, applyAuthorizerOverlay as ji, createCloudFrontModule as jn, CA_TRUST_ENV_KEYS as jo, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, groupWorkloadsRoutedApart as ka, matchRoute as ki, runViewerResponse as kn, workloadStsClientConfig as ko, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, startLoopbackForwarder as la, resolveSelectionExpression as li, buildEdgeResponseEvent as ln, LocalInvokeBuildError as lo, canonicalizeImageOverrideKeys as lr, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, noImplicitEcrPullArgs as ma, createJwksCache as mi, extractKvsAssociations as mn, firstUsableRegion as mo, runImageOverrideBuilds as mr, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, withWorkloadAwsWiring as na, buildStageMap as ni, startCloudFrontServer as nn, AgentCoreResolutionError as no, parseMaxTasks as nr, takeAwsEmulatorStateSourceHint as ns, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, buildNamespaceOwnerForwarderDockerArgs as oa, groupRoutesByServer as oi, applyEdgeRequestResult as on, formatStateRemedy as oo, runEcsServiceEmulator as or, createMixedModeTlsMaterials as os, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, isEcrRegistryConfigKey as pa, buildJwksUrlFromIssuer as pi, describeS3OriginDomain as pn, deployedFillMayBeSecret as po, resolveImageOverrides as pr, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, webSocketApiMatchesIdentifier as qa, classifySourceChange as qi, serviceStrategy as qn, mergeJavaToolOptions as qo, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, LOOPBACK_FORWARDER_IMAGE as ra, availableApiIdentifiers as ri, resolveErrorResponseCandidates as rn, pickAgentCoreCandidateStack as ro, parseRestartPolicy as rr, writeCaBundleFile as rs, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, describeForwarderFailure as sa, readMtlsMaterialsFromDisk as si, applyEdgeResponseResult as sn, substituteImagePlaceholders as so, ImageOverrideError as sr, buildStsClientConfig as ss, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, attachLoopbackForwarder as ta, attachStageContext as ti, matchBehavior as tn, AGENTCORE_RUNTIME_TYPE as to, ecsClusterOption as tr, setActiveWorkloadAwsWiring as ts, waitForAppAnswer as tt, reinvoke as u, architectureToPlatform as ua, resolveServiceIntegrationParameters as ui, edgeHeadersToHttp as un, DynamicReferenceResolutionError as uo, enforceImageOverrideOrphans as ur, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveRuntimeImage as va, buildMethodArn as vi, pickLambdaEdgeFunctionLogicalId as vn, resolveDynamicReferencesInEnv as vo, listPinnedTargets as vr, startAgentCoreWsBridge as vt, createLocalListCommand as w, substituteEnvVarsFromStateAsync as wa, applyCorsResponseHeaders as wi, WEB_FUNCTION_TYPE as wn, deployAccountStsClientConfig as wo, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, substituteAgainstState as xa, invokeRequestAuthorizer as xi, resolveCloudFrontDistribution as xn, awsEndpointOptions as xo, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, EcsTaskResolutionError as ya, computeRequestIdentityHash as yi, pickTargetFunctionLogicalId as yn, withoutKeys as yo, buildCloudMapIndex as yr, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, resolveSingleTarget as za, bufferToBody as zi, albStrategy as zn, collectHostEndpointOverrides as zo, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
|
|
36488
|
-
//# sourceMappingURL=local-studio-
|
|
36743
|
+
export { postHook as $, AGENTCORE_HTTP_PROTOCOL as $a, probeHostGatewaySupport as $i, addImageOverrideOptions as $n, readProfileEndpointSettings as $o, resolveApiTargetSubset as $r, classifyS3Error as $t, microvmFidelityWarnings as A, isCfnFlagPresent as Aa, translateLambdaResponse as Ai, stripCloudFrontImport as An, AUTH_OFF_PLACEHOLDER_CREDENTIALS as Ao, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, countTargets as Ba, ConnectionRegistry as Bi, createLocalStartAlbCommand as Bn, collectHostEndpointOverrides as Bo, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, substituteEnvVarsFromState as Ca, attachAuthorizers as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, assumedRoleRecorded as Co, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, UNNAMED_WORKLOAD as Da, isFunctionUrlOacFronted as Di, compileCloudFrontFunction as Dn, resetWorkloadIdentity as Do, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, LocalStateSourceError as Ea, buildCorsConfigFromCloudFrontChain as Ei, resolveWebFunctionTarget as En, recordAssumedRole as Eo, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, CfnLocalStateProvider as Fa, pickResponseTemplate as Fi, findFileAssetForObjectKey as Fn, HOST_DEFAULT_CREDENTIALS_MISS_TTL_MS as Fo, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, filterWebSocketApisByIdentifiers as Ga, buildDisconnectEvent as Gi, addStartServiceSpecificOptions as Gn, getContainerJavaTruststorePath as Go, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, availableWebSocketApiIdentifiers as Ha, handleConnectionsRequest as Hi, resolveAlbTarget as Hn, effectiveLoopbackPorts as Ho, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, collectSsmParameterRefs as Ia, selectIntegrationResponse as Ii, isBucketDeploymentResource as In, activateWorkloadAwsWiring as Io, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, discoverRoutes as Ja, createFileWatcher as Ji, addRunTaskSpecificOptions as Jn, loopbackForwarderPlan as Jo, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, parseSelectionExpressionPath as Ka, buildMessageEvent as Ki, createLocalStartServiceCommand as Kn, javaTruststoreToolOptions as Ko, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, resolveSsmParameters as La, tryParseStatus as Li, resolveBucketDeploymentObjectKey as Ln, applyWorkloadAwsWiringToEnv as Lo, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, resolveCfnFallbackRegion as Ma, buildHttpApiV2Event as Mi, createLocalFileKvsDataSource as Mn, DEFAULT_AWS_EMULATOR_URL as Mo, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, resolveCfnRegion as Na, buildRestV1Event as Ni, createUnboundCloudFrontModule as Nn, EMULATOR_SCRUBBED_ENV_KEYS as No, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, createLocalStateProvider as Oa, matchPreflight as Oi, runViewerRequest as On, workloadClientConfig as Oo, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, resolveCfnStackName as Pa, evaluateResponseParameters as Pi, bucketDeploymentSourceObjectKeys as Pn, HOST_CA_TRUST_ENV_KEYS as Po, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, AGENTCORE_AGUI_PROTOCOL as Qa, HOST_GATEWAY_MIN_VERSION as Qi, addEcsAssumeRoleOptions as Qn, readEmulatorRunFiles as Qo, createWatchPredicates as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, resolveWatchConfig as Ra, VtlEvaluationError as Ri, addAlbSpecificOptions as Rn, awsEmulatorEnvName as Ro, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, substituteAgainstStateAsync as Sa, invokeTokenAuthorizer as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, SECOND_ASSUME_MESSAGE as So, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, materializeLayerFromArn as Ta, buildCorsConfigByApiId as Ti, WebFunctionResolutionError as Tn, readEnvCallerCredentials as To, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, discoverWebSocketApis as Ua, parseConnectionsPath as Ui, isApplicationLoadBalancer as Un, getActiveWorkloadAwsWiring as Uo, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, listTargets as Va, buildMgmtEndpointEnvUrl as Vi, parseLbPortOverrides as Vn, displayEndpointValue as Vo, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, discoverWebSocketApisOrThrow as Wa, buildConnectEvent as Wi, resolveAlbFrontDoor as Wn, getContainerCaBundlePath as Wo, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, resolveLambdaArnIntrinsic as Xa, createLocalInvokeCommand as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, parseAwsEndpoint as Xo, addStartApiSpecificOptions as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, pickRefLogicalId as Ya, addInvokeSpecificOptions as Yi, createLocalRunTaskCommand as Yn, mergeJavaToolOptions as Yo, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, AGENTCORE_A2A_PROTOCOL as Za, HOST_DOCKER_INTERNAL_GATEWAY as Zi, addCommonEcsServiceOptions as Zn, probeAwsEmulatorHealth as Zo, createLocalStartApiCommand as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, resolveRuntimeFileExtension as _a, verifyJwtViaDiscovery as _i, pickKvsLogicalIdFromArn as _n, parseDynamicReference as _o, isLocalCdkAssetImage as _r, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, buildLoopbackForwarderDockerArgs as aa, filterRoutesByApiIdentifiers as ai, serveLambdaUrlOrigin as an, derivePseudoParametersFromRegion as ao, resolveSharedSidecarCredentials as ar, writeCaBundleFile as as, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, assertEcsTaskImagesResolvable as ba, evaluateCachedLambdaPolicy as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, addAwsEndpointOptions as bo, CloudMapRegistry as br, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, ensureForwarderImage as ca, startApiServer as ci, buildEdgeRequestEvent as cn, tryResolveImageFnJoin as co, buildImageOverrideTag as cr, isRealAwsHost as cs, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, buildContainerImage as da, defaultCredentialsLoader as di, httpHeadersToEdge as dn, DynamicReferenceResolver as do, mergeForService as dr, sqsEmulatorOriginOf as ds, createLocalStartWebFunctionCommand as dt, resolveHostGatewayExtraHosts as ea, createAuthorizerCache as ei, createS3OriginReader as en, AGENTCORE_MCP_PROTOCOL as eo, buildEcsImageResolutionContext$1 as er, resolveAwsEmulatorOption as es, runHookBody as et, filterStudioCustomResources as f, dockerRegistryEnv as fa, buildCognitoJwksUrl as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, containsDynamicReference as fo, parseImageOverrideFlags as fr, buildJavaTrustStore as fs, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, resolveRuntimeCodeMountPath as ga, verifyJwtAuthorizer as gi, pickFunctionUrlLogicalIdFromOrigin as gn, keysOverriddenBy as go, imageOverrideKeyAliases as gr, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, stripEcrCredentials as ha, verifyCognitoJwt as hi, isCloudFrontDistribution as hn, keysNotFromTemplate as ho, describePinnedImageUri as hr, resolveProfileCredentials as hs, selectServeInboundAuth as ht, coerceStopRequest as i, awaitLoopbackForwarderStatus as ia, filterRoutesByApiIdentifier as ii, serveFromStaticOrigin as in, resolveAgentCoreTarget as io, resolveEcsAssumeRoleOption as ir, takeAwsEmulatorStateSourceHint as is, MicrovmResolutionError as it, readRunHookPayload as j, rejectExplicitCfnStackWithMultipleStacks as ja, applyAuthorizerOverlay as ji, createCloudFrontModule as jn, CA_TRUST_ENV_KEYS as jo, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, groupWorkloadsRoutedApart as ka, matchRoute as ki, runViewerResponse as kn, workloadStsClientConfig as ko, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, startLoopbackForwarder as la, resolveSelectionExpression as li, buildEdgeResponseEvent as ln, LocalInvokeBuildError as lo, canonicalizeImageOverrideKeys as lr, realSqsHostnames as ls, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, noImplicitEcrPullArgs as ma, createJwksCache as mi, extractKvsAssociations as mn, firstUsableRegion as mo, runImageOverrideBuilds as mr, buildStsClientConfig as ms, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, withWorkloadAwsWiring as na, buildStageMap as ni, startCloudFrontServer as nn, AgentCoreResolutionError as no, parseMaxTasks as nr, resolveWorkloadAwsWiring as ns, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, buildNamespaceOwnerForwarderDockerArgs as oa, groupRoutesByServer as oi, applyEdgeRequestResult as on, formatStateRemedy as oo, runEcsServiceEmulator as or, MIXED_MODE_RESIGN_BODY_CAP_BYTES as os, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, isEcrRegistryConfigKey as pa, buildJwksUrlFromIssuer as pi, describeS3OriginDomain as pn, deployedFillMayBeSecret as po, resolveImageOverrides as pr, createMixedModeTlsMaterials as ps, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, webSocketApiMatchesIdentifier as qa, classifySourceChange as qi, serviceStrategy as qn, logMixedModeForWorkload as qo, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, LOOPBACK_FORWARDER_IMAGE as ra, availableApiIdentifiers as ri, resolveErrorResponseCandidates as rn, pickAgentCoreCandidateStack as ro, parseRestartPolicy as rr, setActiveWorkloadAwsWiring as rs, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, describeForwarderFailure as sa, readMtlsMaterialsFromDisk as si, applyEdgeResponseResult as sn, substituteImagePlaceholders as so, ImageOverrideError as sr, REAL_SQS_QUEUE_URL as ss, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, attachLoopbackForwarder as ta, attachStageContext as ti, matchBehavior as tn, AGENTCORE_RUNTIME_TYPE as to, ecsClusterOption as tr, resolveHostDefaultCredentials as ts, waitForAppAnswer as tt, reinvoke as u, architectureToPlatform as ua, resolveServiceIntegrationParameters as ui, edgeHeadersToHttp as un, DynamicReferenceResolutionError as uo, enforceImageOverrideOrphans as ur, rewriteSqsQueueUrlsInEnv as us, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveRuntimeImage as va, buildMethodArn as vi, pickLambdaEdgeFunctionLogicalId as vn, resolveDynamicReferencesInEnv as vo, listPinnedTargets as vr, startAgentCoreWsBridge as vt, createLocalListCommand as w, substituteEnvVarsFromStateAsync as wa, applyCorsResponseHeaders as wi, WEB_FUNCTION_TYPE as wn, deployAccountStsClientConfig as wo, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, substituteAgainstState as xa, invokeRequestAuthorizer as xi, resolveCloudFrontDistribution as xn, awsEndpointOptions as xo, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, EcsTaskResolutionError as ya, computeRequestIdentityHash as yi, pickTargetFunctionLogicalId as yn, withoutKeys as yo, buildCloudMapIndex as yr, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, resolveSingleTarget as za, bufferToBody as zi, albStrategy as zn, awsEmulatorSqsHostBlocks as zo, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
|
|
36744
|
+
//# sourceMappingURL=local-studio-WcBeAdbl.js.map
|