cdk-local 0.69.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +24 -41
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -2
- package/dist/{local-list-l2_7oGHF.js → local-list-C-wXKogn.js} +163 -7
- package/dist/{local-list-l2_7oGHF.js.map → local-list-C-wXKogn.js.map} +1 -1
- package/dist/{local-list-9jAE7ClA.d.ts → local-list-D6VYjdj1.d.ts} +22 -2
- package/dist/local-list-D6VYjdj1.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/local-list-9jAE7ClA.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -31,7 +31,10 @@ cdkl invoke MyStack/Fn --from-cfn-stack # one Lambda against real DynamoDB /
|
|
|
31
31
|
|
|
32
32
|
## Why cdk-local
|
|
33
33
|
|
|
34
|
-
- **Zero-friction local execution** — run standalone
|
|
34
|
+
- **Zero-friction local execution** — run standalone with just Docker and your CDK app, no AWS account or deploy needed. Verify the parts of your app that don't touch AWS in seconds — handy as a zero-setup first run, or in CI where no credentials are available:
|
|
35
|
+
- API Gateway routing and request shaping
|
|
36
|
+
- Lambda authorizers, running in real local containers
|
|
37
|
+
- pure handler logic — validation, transforms, branching
|
|
35
38
|
- **Iterate against your real deployed stack — including its data.** `--from-cfn-stack` reads the deployed CloudFormation stack and injects its real ARNs, Secret values, and IAM credentials into the container — no `.env` file to maintain, no manual ARN copy-paste — so you stay on the real DynamoDB rows, S3 objects, Cognito users, and Secret values your IAM credentials reach. An offline emulator can fake the API surface, but you'd still own the cost of seeding it:
|
|
36
39
|
- dumping production data into a local DB
|
|
37
40
|
- mirroring Secret values into local Secrets Manager
|
|
@@ -68,11 +71,61 @@ cdkl list # every runnable target, grouped
|
|
|
68
71
|
|
|
69
72
|
Full flags, precedence, and `--from-cfn-stack` resolution: [docs/cli-reference.md](docs/cli-reference.md) and [docs/local-emulation.md](docs/local-emulation.md).
|
|
70
73
|
|
|
74
|
+
### Deployed stack binding — `--from-cfn-stack`
|
|
75
|
+
|
|
76
|
+
`--from-cfn-stack` binds to the deployed CloudFormation stack whose name matches your CDK stack. The bare form resolves the stack name from the target; pass an explicit name only when the deployed CFn stack name differs (e.g. CDK's `stackName` prop was overridden):
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cdkl invoke MyStack/Fn --from-cfn-stack # bare: uses resolved stack name
|
|
80
|
+
cdkl invoke MyStack/Fn --from-cfn-stack MyExplicitCfnName # explicit when names differ
|
|
81
|
+
cdkl invoke MyStack/Fn --from-cfn-stack --stack-region eu-west-1 # cross-region CFn client
|
|
82
|
+
cdkl invoke MyStack/Fn --from-cfn-stack --assume-role # auto-assume deployed execution role
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Substitutes `Ref` / `Fn::ImportValue` / `Fn::GetStackOutput` in env vars with the deployed physical IDs / exports, decrypts `AWS::SSM::Parameter::Value` entries (kept off the `docker run` argv), and resolves same-stack ECR `ContainerUri` to the deployed image. `Fn::GetAtt` in the Lambda's own env is recovered from the deployed function's resolved `Environment.Variables` via `lambda:GetFunctionConfiguration`. Full resolution rules: [docs/cli-reference.md#cloudformation-driven-env-recovery---from-cfn-stack](docs/cli-reference.md#cloudformation-driven-env-recovery---from-cfn-stack).
|
|
86
|
+
|
|
87
|
+
### Environment variables — `--env-vars`
|
|
88
|
+
|
|
89
|
+
Every command accepts `--env-vars <file>`, a SAM-shape JSON file that overlays the container's environment — point a Lambda function or ECS container at a different backend for a local run, or supply a value the synthesized template only knows as an intrinsic:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
cdkl invoke MyStack/Fn --env-vars ./env.json
|
|
93
|
+
cdkl start-service MyStack/MyService --env-vars ./env.json
|
|
94
|
+
cdkl start-alb MyStack/MyAlb --env-vars ./env.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"Parameters": { "LOG_LEVEL": "debug" },
|
|
100
|
+
"MyStack/Fn": { "TABLE_ENDPOINT": "http://localhost:8000" },
|
|
101
|
+
"AppContainer": { "DB_HOST": "host.docker.internal", "DB_PORT": "13306" }
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Each top-level JSON key picks which target to overlay:
|
|
106
|
+
|
|
107
|
+
| Target | Key shape | Notes |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| Every target | `Parameters` | Reserved literal; applied first to every container |
|
|
110
|
+
| Lambda / AgentCore Runtime | CDK construct path (e.g. `MyStack/Fn`) | From `Metadata['aws:cdk:path']` of the resource; prefix-matched (`MyStack/Fn` also catches `MyStack/Fn/Resource`) |
|
|
111
|
+
| Lambda / AgentCore Runtime | CloudFormation logical ID (e.g. `MyStackFn1A2B3C`) | Top-level resource key in the synthesized template; exact match |
|
|
112
|
+
| ECS container | Container Name (e.g. `AppContainer`) | The `containerName` set in CDK (= `ContainerDefinitions[].Name`). The TaskDefinition's CDK path / logical ID is NOT accepted as a key — it would identify the TaskDef but not which container's env block to overlay |
|
|
113
|
+
|
|
114
|
+
Precedence is template literals < ECS `Secrets` < `Parameters` < target-specific, so a value sourced from Secrets Manager / SSM via a TaskDefinition `Secrets[]` entry is overridable here (the secret is still fetched first, then replaced). A `null` value clears a variable. Running standalone, env vars whose template value is an intrinsic (`Ref` / `Fn::GetAtt`) can't be resolved without a deployed stack and are dropped with a warning — `--env-vars` is how you supply a concrete value for them.
|
|
115
|
+
|
|
116
|
+
When pointing a container at a tunneled VPC resource (e.g. an Aurora cluster reached via a local port forward), use `host.docker.internal` instead of `127.0.0.1` — `127.0.0.1` inside the container is the container itself, not the host where the tunnel listens.
|
|
117
|
+
|
|
71
118
|
### Hot reload — `--watch`
|
|
72
119
|
|
|
120
|
+
```bash
|
|
121
|
+
cdkl start-api --watch # reload API routes on save
|
|
122
|
+
cdkl start-service --watch # roll ECS replicas on save
|
|
123
|
+
cdkl start-alb --watch # roll ALB-fronted ECS replicas on save
|
|
124
|
+
```
|
|
125
|
+
|
|
73
126
|
`cdkl start-api --watch` re-synths your CDK app and reloads routes when the source changes, so editing a handler is reflected on the next request without restarting the server. Synth failures keep the previous version serving (warn-and-continue). Honors `cdk.json`'s `watch.include` / `watch.exclude` globs, so no separate `cdk watch` process is needed.
|
|
74
127
|
|
|
75
|
-
`cdkl start-service --watch` and `cdkl start-alb --watch` bring the same edit-and-go loop to ECS services
|
|
128
|
+
`cdkl start-service --watch` and `cdkl start-alb --watch` bring the same edit-and-go loop to ECS services. A source-only edit on an interpreted-language handler (Node / Python / Ruby / shell) takes a sub-second fast path; a Dockerfile / dependency / compiled-source change triggers a rolling rebuild. Either way replicas roll one at a time, so the service stays available — an external request stream against the ALB listener port sees zero connection refusals, even on multi-replica services. Synth failures keep the previous replica(s) serving.
|
|
76
129
|
|
|
77
130
|
Full reload pipeline + glob defaults: [docs/local-emulation.md#hot-reload---watch](docs/local-emulation.md#hot-reload---watch).
|
|
78
131
|
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { D as createLocalRunTaskCommand, Zt as createLocalInvokeCommand, f as createLocalStartServiceCommand, j as createLocalStartApiCommand, k as createLocalInvokeAgentCoreCommand, n as createLocalListCommand, o as createLocalStartAlbCommand } from "./local-list-C-wXKogn.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/index.ts
|
|
6
6
|
const program = new Command();
|
|
7
|
-
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.
|
|
7
|
+
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.70.0");
|
|
8
8
|
program.addCommand(createLocalInvokeCommand());
|
|
9
9
|
program.addCommand(createLocalInvokeAgentCoreCommand());
|
|
10
10
|
program.addCommand(createLocalStartApiCommand());
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $ as CreateLocalRunTaskCommandOptions, $n as LocalStateSourceError, Hn as CreateLocalInvokeCommandOptions, J as TargetListing, Jn as getEmbedConfig, Qn as LocalStateProviderFactory, Qt as CreateLocalInvokeAgentCoreCommandOptions, Wn as createLocalInvokeCommand, X as listTargets, Xn as setEmbedConfig, Y as countTargets, Yn as resetEmbedConfig, Zn as ExtraStateProviders, _r as substituteAgainstState, a as formatTargetListing, ar as resolveCfnRegion, br as substituteEnvVarsFromStateAsync, cr as LocalStateRecord, dr as collectSsmParameterRefs, en as createLocalInvokeAgentCoreCommand, er as LocalStateSourceOptions, f as CreateLocalStartServiceCommandOptions, fr as resolveSsmParameters, gr as SubstitutionContext, hr as StateEnvSubstitutionAudit, i as createLocalListCommand, ir as resolveCfnFallbackRegion, it as CreateLocalStartApiCommandOptions, l as createLocalStartAlbCommand, lr as ResolvedSsmParameters, m as createLocalStartServiceCommand, mr as PseudoParameters, n as FormatTargetListingOptions, nr as isCfnFlagPresent, o as CreateLocalStartAlbCommandOptions, or as resolveCfnStackName, pr as CrossStackResolver, q as TargetEntry, qn as CdkLocalEmbedConfig, rr as rejectExplicitCfnStackWithMultipleStacks, sr as LocalStateProvider, st as createLocalStartApiCommand, t as CreateLocalListCommandOptions, tr as createLocalStateProvider, tt as createLocalRunTaskCommand, ur as SsmParameterRef, vr as substituteAgainstStateAsync, xr as CloudFormationTemplate, yr as substituteEnvVarsFromState } from "./local-list-D6VYjdj1.js";
|
|
2
2
|
import { CloudFormationClient } from "@aws-sdk/client-cloudformation";
|
|
3
3
|
|
|
4
4
|
//#region src/local/cfn-local-state-provider.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as getEmbedConfig, l as resetEmbedConfig, u as setEmbedConfig } from "./docker-cmd-voNPrcRh.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Cn as listTargets, D as createLocalRunTaskCommand, Sn as countTargets, Zt as createLocalInvokeCommand, _n as CfnLocalStateProvider, an as substituteAgainstStateAsync, dn as createLocalStateProvider, f as createLocalStartServiceCommand, fn as isCfnFlagPresent, gn as resolveCfnStackName, hn as resolveCfnRegion, in as substituteAgainstState, j as createLocalStartApiCommand, k as createLocalInvokeAgentCoreCommand, mn as resolveCfnFallbackRegion, n as createLocalListCommand, o as createLocalStartAlbCommand, on as substituteEnvVarsFromState, pn as rejectExplicitCfnStackWithMultipleStacks, r as formatTargetListing, sn as substituteEnvVarsFromStateAsync, un as LocalStateSourceError, vn as collectSsmParameterRefs, yn as resolveSsmParameters } from "./local-list-C-wXKogn.js";
|
|
3
3
|
|
|
4
4
|
export { CfnLocalStateProvider, LocalStateSourceError, collectSsmParameterRefs, countTargets, createLocalInvokeAgentCoreCommand, createLocalInvokeCommand, createLocalListCommand, createLocalRunTaskCommand, createLocalStartAlbCommand, createLocalStartApiCommand, createLocalStartServiceCommand, createLocalStateProvider, formatTargetListing, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resetEmbedConfig, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveSsmParameters, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $t as addInvokeAgentCoreSpecificOptions, A as buildEcsImageResolutionContext, An as AgentCoreCodeArtifact, At as LambdaRequestAuthorizer, B as ReloadVerdict, Bn as substituteImagePlaceholders, Bt as DiscoveredRoute, C as PlannedForwardAction, Cn as invokeAgentCore, Ct as verifyCognitoJwt, D as PlannedRedirectAction, Dn as AGENTCORE_HTTP_PROTOCOL, Dt as CachedAuthorizerResult, E as PlannedLambdaForwardTarget, En as AGENTCORE_AGUI_PROTOCOL, Et as AuthorizerCache, F as FrontDoorForwardTarget, Fn as pickAgentCoreCandidateStack, Ft as applyCorsResponseHeaders, G as CloudMapRegistry, Gn as ResolvedArnLambdaLayer, Gt as pickResponseTemplate, H as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, Ht as discoverRoutes, I as ResolvedListenerAction, In as resolveAgentCoreTarget, It as buildCorsConfigByApiId, Jt as VtlEvaluationError, K as RegistrationHandle, Kn as StackInfo, Kt as selectIntegrationResponse, L as isApplicationLoadBalancer, Ln as ImageResolutionContext, Lt as buildCorsConfigFromCloudFrontChain, M as parseRestartPolicy, Mn as AgentCoreJwtAuthorizer, Mt as RouteWithAuth, N as resolveSharedSidecarCredentials, Nn as AgentCoreResolutionError, Nt as attachAuthorizers, O as ServiceBoot, On as AGENTCORE_MCP_PROTOCOL, Ot as createAuthorizerCache, P as runEcsServiceEmulator, Pn as ResolvedAgentCoreRuntime, Pt as CorsConfig, Q as LocalInvokeBuildError, R as resolveAlbFrontDoor, Rn as derivePseudoParametersFromRegion, Rt as isFunctionUrlOacFronted, S as PlannedFixedResponseAction, Sn as InvokeAgentCoreOptions, St as createJwksCache, T as PlannedFrontDoorListener, Tn as AGENTCORE_A2A_PROTOCOL, Tt as verifyJwtViaDiscovery, U as CloudMapIndex, Un as addInvokeSpecificOptions, Ut as IntegrationResponseEntry, V as classifySourceChange, Vn as tryResolveImageFnJoin, Vt as RestV1IntegrationConfig, W as buildCloudMapIndex, Wt as evaluateResponseParameters, Xt as CdkWatchConfig, Yt as ContainerPool, Z as CdkLocalError, Zt as resolveWatchConfig, _ as EmulatorStrategy, _n as McpJsonRpcRequest, _t as DiscoveryJwtAuthorizer, an as invokeAgentCoreWs, at as WatchPredicates, b as PlannedAction, bn as AGENTCORE_SESSION_ID_HEADER, bt as buildCognitoJwksUrl, c as albStrategy, cn as A2aInvokeOptions, ct as createWatchPredicates, d as resolveAlbTarget, dn as a2aInvokeOnce, dt as ServerState, et as addRunTaskSpecificOptions, fn as MCP_CONTAINER_PORT, ft as StartedApiServer, g as EcsServiceEmulatorOptions, gn as McpInvokeResult, gt as defaultCredentialsLoader, h as serviceStrategy, hn as McpInvokeOptions, ht as CredentialsLoader, in as InvokeAgentCoreWsOptions, j as parseMaxTasks, jn as AgentCoreCustomClaim, jt as LambdaTokenAuthorizer, k as addCommonEcsServiceOptions, kn as AGENTCORE_RUNTIME_TYPE, kt as AuthorizerInfo, ln as A2aInvokeResult, lt as resolveApiTargetSubset, mn as MCP_PROTOCOL_VERSION, mt as startApiServer, nn as resolveEnvVars, nt as EcsTaskResolutionError, on as A2A_CONTAINER_PORT, ot as addStartApiSpecificOptions, p as addStartServiceSpecificOptions, pn as MCP_PATH, pt as readMtlsMaterialsFromDisk, q as TargetEntry, qt as tryParseStatus, r as addListSpecificOptions, rn as AgentCoreWsResult, rt as ApiTargetSubset, s as addAlbSpecificOptions, sn as A2A_PATH, tn as EnvOverrideFile, u as parseLbPortOverrides, un as A2aJsonRpcRequest, ut as MtlsServerConfig, v as FrontDoorPlan, vn as mcpInvokeOnce, vt as JwksCache, w as PlannedForwardTarget, wn as waitForAgentCorePing, wt as verifyJwtAuthorizer, x as PlannedEcsForwardTarget, xn as AgentCoreInvokeResult, xr as CloudFormationTemplate, xt as buildJwksUrlFromIssuer, y as MAX_TASKS_SUBNET_RANGE_CAP, yn as parseSseForJsonRpc, yt as JwtCustomClaim, z as ReloadAssetContext, zn as formatStateRemedy, zt as matchPreflight } from "./local-list-D6VYjdj1.js";
|
|
2
2
|
import { WebSocket } from "ws";
|
|
3
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
4
|
|
|
5
|
+
//#region src/types/assets.d.ts
|
|
6
|
+
interface DockerImageAssetSource {
|
|
7
|
+
directory?: string;
|
|
8
|
+
executable?: string[];
|
|
9
|
+
dockerFile?: string;
|
|
10
|
+
dockerBuildTarget?: string;
|
|
11
|
+
dockerBuildArgs?: Record<string, string>;
|
|
12
|
+
dockerBuildContexts?: Record<string, string>;
|
|
13
|
+
dockerBuildSsh?: string;
|
|
14
|
+
dockerBuildSecrets?: Record<string, string>;
|
|
15
|
+
networkMode?: string;
|
|
16
|
+
platform?: string;
|
|
17
|
+
dockerOutputs?: string[];
|
|
18
|
+
cacheFrom?: DockerCacheOption[];
|
|
19
|
+
cacheTo?: DockerCacheOption;
|
|
20
|
+
cacheDisabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface DockerCacheOption {
|
|
23
|
+
type: string;
|
|
24
|
+
params?: Record<string, string>;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
5
27
|
//#region src/local/intrinsic-utils.d.ts
|
|
6
28
|
declare function pickRefLogicalId(value: unknown): string | null;
|
|
7
29
|
//#endregion
|
|
@@ -388,28 +410,6 @@ interface SignedAgentCoreHeaders {
|
|
|
388
410
|
}
|
|
389
411
|
declare function signAgentCoreInvocation(opts: SignAgentCoreInvocationOptions): Promise<SignedAgentCoreHeaders>;
|
|
390
412
|
//#endregion
|
|
391
|
-
//#region src/types/assets.d.ts
|
|
392
|
-
interface DockerImageAssetSource {
|
|
393
|
-
directory?: string;
|
|
394
|
-
executable?: string[];
|
|
395
|
-
dockerFile?: string;
|
|
396
|
-
dockerBuildTarget?: string;
|
|
397
|
-
dockerBuildArgs?: Record<string, string>;
|
|
398
|
-
dockerBuildContexts?: Record<string, string>;
|
|
399
|
-
dockerBuildSsh?: string;
|
|
400
|
-
dockerBuildSecrets?: Record<string, string>;
|
|
401
|
-
networkMode?: string;
|
|
402
|
-
platform?: string;
|
|
403
|
-
dockerOutputs?: string[];
|
|
404
|
-
cacheFrom?: DockerCacheOption[];
|
|
405
|
-
cacheTo?: DockerCacheOption;
|
|
406
|
-
cacheDisabled?: boolean;
|
|
407
|
-
}
|
|
408
|
-
interface DockerCacheOption {
|
|
409
|
-
type: string;
|
|
410
|
-
params?: Record<string, string>;
|
|
411
|
-
}
|
|
412
|
-
//#endregion
|
|
413
413
|
//#region src/local/docker-image-builder.d.ts
|
|
414
414
|
interface BuildContainerImageOptions {
|
|
415
415
|
architecture: 'x86_64' | 'arm64';
|
|
@@ -434,23 +434,6 @@ interface FileWatcherOptions {
|
|
|
434
434
|
}
|
|
435
435
|
declare function createFileWatcher(options: FileWatcherOptions): FileWatcher;
|
|
436
436
|
//#endregion
|
|
437
|
-
//#region src/local/source-change-classifier.d.ts
|
|
438
|
-
interface ReloadAssetContext {
|
|
439
|
-
oldAssetHash?: string;
|
|
440
|
-
newAssetHash: string;
|
|
441
|
-
newAssetSourceDir: string;
|
|
442
|
-
dockerFile: string;
|
|
443
|
-
}
|
|
444
|
-
type ReloadVerdict = {
|
|
445
|
-
kind: 'rebuild';
|
|
446
|
-
reason: string;
|
|
447
|
-
} | {
|
|
448
|
-
kind: 'soft-reload';
|
|
449
|
-
reason: string;
|
|
450
|
-
newAssetSourceDir: string;
|
|
451
|
-
};
|
|
452
|
-
declare function classifySourceChange(changedPaths: readonly string[], ctx: ReloadAssetContext | undefined): ReloadVerdict;
|
|
453
|
-
//#endregion
|
|
454
437
|
//#region src/local/target-picker.d.ts
|
|
455
438
|
interface ResolveParams {
|
|
456
439
|
entries: TargetEntry[];
|
|
@@ -460,5 +443,5 @@ interface ResolveParams {
|
|
|
460
443
|
}
|
|
461
444
|
declare function resolveSingleTarget(provided: string | undefined, params: ResolveParams): Promise<string>;
|
|
462
445
|
//#endregion
|
|
463
|
-
export { A2A_CONTAINER_PORT, A2A_PATH, type A2aInvokeOptions, type A2aInvokeResult, type A2aJsonRpcRequest, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, type AgentCoreCodeArtifact, type AgentCoreCustomClaim, type AgentCoreInvokeResult, type AgentCoreJwtAuthorizer, AgentCoreResolutionError, type AgentCoreWsResult, type ApiServerGroup, type ApiTargetSubset, type AuthorizerCache, type AuthorizerEventOverlay, type AuthorizerInfo, type BuildAgentCoreCodeImageOptions, type BuildContainerImageOptions, type CachedAuthorizerResult, type CdkWatchConfig, type CloudMapIndex, CloudMapRegistry, ConnectionRegistry, type ConnectionRegistryEntry, type CorsConfig, type CredentialsLoader, type DiscoveredRoute, type DiscoveredWebSocketApi, type DiscoveryJwtAuthorizer, type DownloadS3BundleOptions, type EcsServiceEmulatorOptions, EcsTaskResolutionError, type EmulatorStrategy, type EnvOverrideFile, type ExtractedS3Bundle, type FileWatcher, type FileWatcherOptions, type FrontDoorForwardTarget, type FrontDoorPlan, HOST_GATEWAY_MIN_VERSION, type HttpRequestSnapshot, type ImageResolutionContext, type IntegrationResponseEntry, type InvokeAgentCoreOptions, type InvokeAgentCoreWsOptions, type JwksCache, type JwtCustomClaim, type LambdaArnResolveOutcome, LocalInvokeBuildError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, type MatchedRouteContext, type McpInvokeOptions, type McpInvokeResult, type McpJsonRpcRequest, type MtlsServerConfig, type PlannedAction, type PlannedEcsForwardTarget, type PlannedFixedResponseAction, type PlannedForwardAction, type PlannedForwardTarget, type PlannedFrontDoorListener, type PlannedLambdaForwardTarget, type PlannedRedirectAction, type RegistrationHandle, type ReloadAssetContext, type ReloadVerdict, type RequestParameterContext, type ResolveParametersOutcome, type ResolvedAgentCoreRuntime, type ResolvedListenerAction, type ResolvedStage, type RestV1IntegrationConfig, type RouteMatchResult, type RouteWithAuth, type S3BundleCredentials, type S3BundleLocation, SUPPORTED_CODE_RUNTIMES, type ServerState, type ServiceBoot, type SigV4Credentials, type SignAgentCoreInvocationOptions, type SignedAgentCoreHeaders, type StartedApiServer, type TranslatedHttpResponse, VtlEvaluationError, type WatchPredicates, type WebSocketHandshakeSnapshot, type WebSocketLambdaEvent, type WebSocketRouteEntry, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartApiSpecificOptions, addStartServiceSpecificOptions, albStrategy, applyAuthorizerOverlay, applyCorsResponseHeaders, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, classifySourceChange, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createFileWatcher, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, evaluateCachedLambdaPolicy, evaluateResponseParameters, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isFunctionUrlOacFronted, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseLbPortOverrides, parseMaxTasks, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickRefLogicalId, pickResponseTemplate, probeHostGatewaySupport, readMtlsMaterialsFromDisk, renderCodeDockerfile, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, selectIntegrationResponse, serviceStrategy, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, toCmdArgv, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCorePing };
|
|
446
|
+
export { A2A_CONTAINER_PORT, A2A_PATH, type A2aInvokeOptions, type A2aInvokeResult, type A2aJsonRpcRequest, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, type AgentCoreCodeArtifact, type AgentCoreCustomClaim, type AgentCoreInvokeResult, type AgentCoreJwtAuthorizer, AgentCoreResolutionError, type AgentCoreWsResult, type ApiServerGroup, type ApiTargetSubset, type AuthorizerCache, type AuthorizerEventOverlay, type AuthorizerInfo, type BuildAgentCoreCodeImageOptions, type BuildContainerImageOptions, type CachedAuthorizerResult, type CdkWatchConfig, type CloudMapIndex, CloudMapRegistry, ConnectionRegistry, type ConnectionRegistryEntry, type CorsConfig, type CredentialsLoader, type DiscoveredRoute, type DiscoveredWebSocketApi, type DiscoveryJwtAuthorizer, type DownloadS3BundleOptions, type EcsServiceEmulatorOptions, EcsTaskResolutionError, type EmulatorStrategy, type EnvOverrideFile, type ExtractedS3Bundle, type FileWatcher, type FileWatcherOptions, type FrontDoorForwardTarget, type FrontDoorPlan, HOST_GATEWAY_MIN_VERSION, type HttpRequestSnapshot, type ImageResolutionContext, type IntegrationResponseEntry, type InvokeAgentCoreOptions, type InvokeAgentCoreWsOptions, type JwksCache, type JwtCustomClaim, type LambdaArnResolveOutcome, LocalInvokeBuildError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, type MatchedRouteContext, type McpInvokeOptions, type McpInvokeResult, type McpJsonRpcRequest, type MtlsServerConfig, type PlannedAction, type PlannedEcsForwardTarget, type PlannedFixedResponseAction, type PlannedForwardAction, type PlannedForwardTarget, type PlannedFrontDoorListener, type PlannedLambdaForwardTarget, type PlannedRedirectAction, type RegistrationHandle, type ReloadAssetContext, type ReloadVerdict, type RequestParameterContext, type ResolveParametersOutcome, type ResolvedAgentCoreRuntime, type ResolvedListenerAction, type ResolvedStage, type RestV1IntegrationConfig, type RouteMatchResult, type RouteWithAuth, type S3BundleCredentials, type S3BundleLocation, SOFT_RELOAD_COMPLETION_LOG_SUFFIX, SUPPORTED_CODE_RUNTIMES, type ServerState, type ServiceBoot, type SigV4Credentials, type SignAgentCoreInvocationOptions, type SignedAgentCoreHeaders, type StartedApiServer, type TranslatedHttpResponse, VtlEvaluationError, type WatchPredicates, type WebSocketHandshakeSnapshot, type WebSocketLambdaEvent, type WebSocketRouteEntry, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartApiSpecificOptions, addStartServiceSpecificOptions, albStrategy, applyAuthorizerOverlay, applyCorsResponseHeaders, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, classifySourceChange, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createFileWatcher, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, evaluateCachedLambdaPolicy, evaluateResponseParameters, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isFunctionUrlOacFronted, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseLbPortOverrides, parseMaxTasks, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickRefLogicalId, pickResponseTemplate, probeHostGatewaySupport, readMtlsMaterialsFromDisk, renderCodeDockerfile, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, selectIntegrationResponse, serviceStrategy, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, toCmdArgv, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCorePing };
|
|
464
447
|
//# sourceMappingURL=internal.d.ts.map
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/local/intrinsic-utils.ts","../src/local/intrinsic-lambda-arn.ts","../src/local/parameter-mapping.ts","../src/local/api-gateway-response.ts","../src/local/docker-inspect.ts","../src/local/route-matcher.ts","../src/local/api-gateway-event.ts","../src/local/websocket-route-discovery.ts","../src/local/lambda-authorizer.ts","../src/local/stage-resolver.ts","../src/local/runtime-image.ts","../src/local/websocket-event.ts","../src/local/websocket-mgmt-api.ts","../src/local/websocket-body.ts","../src/local/docker-version.ts","../src/local/api-server-grouping.ts","../src/local/layer-arn-materializer.ts","../src/local/agentcore-code-build.ts","../src/local/agentcore-s3-bundle.ts","../src/local/agentcore-sigv4-sign.ts","../src/
|
|
1
|
+
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/types/assets.ts","../src/local/intrinsic-utils.ts","../src/local/intrinsic-lambda-arn.ts","../src/local/parameter-mapping.ts","../src/local/api-gateway-response.ts","../src/local/docker-inspect.ts","../src/local/route-matcher.ts","../src/local/api-gateway-event.ts","../src/local/websocket-route-discovery.ts","../src/local/lambda-authorizer.ts","../src/local/stage-resolver.ts","../src/local/runtime-image.ts","../src/local/websocket-event.ts","../src/local/websocket-mgmt-api.ts","../src/local/websocket-body.ts","../src/local/docker-version.ts","../src/local/api-server-grouping.ts","../src/local/layer-arn-materializer.ts","../src/local/agentcore-code-build.ts","../src/local/agentcore-s3-bundle.ts","../src/local/agentcore-sigv4-sign.ts","../src/local/docker-image-builder.ts","../src/local/file-watcher.ts","../src/local/target-picker.ts"],"mappings":";;;;;UAmEiB,sBAAA;EAKf,SAAA;EAOA,UAAA;EAEA,UAAA;EAEA,iBAAA;EAEA,eAAA,GAAkB,MAAA;EAElB,mBAAA,GAAsB,MAAA;EAEtB,cAAA;EAEA,kBAAA,GAAqB,MAAA;EAErB,WAAA;EAEA,QAAA;EAEA,aAAA;EAEA,SAAA,GAAY,iBAAA;EAEZ,OAAA,GAAU,iBAAA;EAEV,aAAA;AAAA;AAAA,UAOe,iBAAA;EAMf,IAAA;EAKA,MAAA,GAAS,MAAA;AAAA;;;iBChHK,gBAAA,CAAiB,KAAA;;;KCmCrB,uBAAA;EACN,IAAA;EAAkB,SAAA;AAAA;EAClB,IAAA;EAAqB,MAAA;AAAA;AAAA,iBAuBX,yBAAA,CAA0B,KAAA,YAAiB,uBAAA;;;UCpB1C,uBAAA;EAEf,OAAA,EAAS,QAAA,CAAS,MAAA;EAElB,WAAA,EAAa,QAAA,CAAS,MAAA;EAEtB,cAAA,EAAgB,QAAA,CAAS,MAAA;EAEzB,WAAA;EAEA,IAAA;EAEA,OAAA,EAAS,QAAA,CAAS,MAAA;EAElB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AET,OAAA;EAEA,IAAA;EAEA,SAAA,QAAiB,aAAA;AAAA;AAAA,iBAyBG,mBAAA,CACpB,QAAA,sBACA,MAAA,EAAQ,aAAA,GACP,OAAA"}
|
package/dist/internal.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as translateLambdaResponse, $t as buildContainerImage, A as addStartApiSpecificOptions, An as AGENTCORE_A2A_PROTOCOL, At as invokeAgentCoreWs, B as filterRoutesByApiIdentifiers, Bn as substituteImagePlaceholders, Bt as signAgentCoreInvocation, C as classifySourceChange, Ct as verifyJwtViaDiscovery, Dn as discoverRoutes, Dt as buildCorsConfigFromCloudFrontChain, E as addRunTaskSpecificOptions, En as parseSelectionExpressionPath, Et as buildCorsConfigByApiId, F as createFileWatcher, Fn as AgentCoreResolutionError, Ft as MCP_PATH, G as resolveServiceIntegrationParameters, Gt as SUPPORTED_CODE_RUNTIMES, H as readMtlsMaterialsFromDisk, Hn as LocalInvokeBuildError, Ht as invokeAgentCore, I as attachStageContext, In as pickAgentCoreCandidateStack, It as MCP_PROTOCOL_VERSION, J as computeRequestIdentityHash, Jt as renderCodeDockerfile, K as defaultCredentialsLoader, Kt as buildAgentCoreCodeImage, L as buildStageMap, Ln as resolveAgentCoreTarget, Lt as mcpInvokeOnce, M as createWatchPredicates, Mn as AGENTCORE_HTTP_PROTOCOL, Mt as A2A_PATH, N as resolveApiTargetSubset, Nn as AGENTCORE_MCP_PROTOCOL, Nt as a2aInvokeOnce, O as addInvokeAgentCoreSpecificOptions, On as pickRefLogicalId, Ot as isFunctionUrlOacFronted, P as createAuthorizerCache, Pn as AGENTCORE_RUNTIME_TYPE, Pt as MCP_CONTAINER_PORT, Q as matchRoute, Qt as architectureToPlatform, R as availableApiIdentifiers, Rn as derivePseudoParametersFromRegion, Rt as parseSseForJsonRpc, S as CloudMapRegistry, St as verifyJwtAuthorizer, T as getContainerNetworkIp, Tn as discoverWebSocketApisOrThrow, Tt as applyCorsResponseHeaders, U as startApiServer, Ut as waitForAgentCorePing, V as groupRoutesByServer, Vn as tryResolveImageFnJoin, Vt as AGENTCORE_SESSION_ID_HEADER, W as resolveSelectionExpression, Wt as downloadAndExtractS3Bundle, X as invokeRequestAuthorizer, Xt as addInvokeSpecificOptions, Y as evaluateCachedLambdaPolicy, Yt as toCmdArgv, Z as invokeTokenAuthorizer, _ as parseMaxTasks, _t as buildMessageEvent, a as albStrategy, at as selectIntegrationResponse, b as runEcsServiceEmulator, bn as resolveWatchConfig, bt as createJwksCache, c as resolveAlbTarget, cn as resolveEnvVars, ct as HOST_GATEWAY_MIN_VERSION, d as addStartServiceSpecificOptions, dt as ConnectionRegistry, en as resolveRuntimeCodeMountPath, et as applyAuthorizerOverlay, ft as buildMgmtEndpointEnvUrl, g as buildEcsImageResolutionContext, gt as buildDisconnectEvent, h as addCommonEcsServiceOptions, ht as buildConnectEvent, i as addAlbSpecificOptions, it as pickResponseTemplate, jn as AGENTCORE_AGUI_PROTOCOL, jt as A2A_CONTAINER_PORT, kn as resolveLambdaArnIntrinsic, kt as matchPreflight, l as isApplicationLoadBalancer, ln as materializeLayerFromArn, lt as probeHostGatewaySupport, m as MAX_TASKS_SUBNET_RANGE_CAP, mt as parseConnectionsPath, nn as resolveRuntimeImage, nt as buildRestV1Event, ot as tryParseStatus, p as serviceStrategy, pt as handleConnectionsRequest, q as buildMethodArn, qt as computeCodeImageTag, rn as EcsTaskResolutionError, rt as evaluateResponseParameters, s as parseLbPortOverrides, st as VtlEvaluationError, t as addListSpecificOptions, tn as resolveRuntimeFileExtension, tt as buildHttpApiV2Event, u as resolveAlbFrontDoor, ut as bufferToBody, v as parseRestartPolicy, vt as buildCognitoJwksUrl, w as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, wn as discoverWebSocketApis, wt as attachAuthorizers, x as buildCloudMapIndex, xn as resolveSingleTarget, xt as verifyCognitoJwt, y as resolveSharedSidecarCredentials, yt as buildJwksUrlFromIssuer, z as filterRoutesByApiIdentifier, zn as formatStateRemedy, zt as AGENTCORE_SIGV4_SERVICE } from "./local-list-C-wXKogn.js";
|
|
2
2
|
|
|
3
|
-
export { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, AgentCoreResolutionError, CloudMapRegistry, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, SUPPORTED_CODE_RUNTIMES, VtlEvaluationError, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartApiSpecificOptions, addStartServiceSpecificOptions, albStrategy, applyAuthorizerOverlay, applyCorsResponseHeaders, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, classifySourceChange, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createFileWatcher, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, evaluateCachedLambdaPolicy, evaluateResponseParameters, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isFunctionUrlOacFronted, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseLbPortOverrides, parseMaxTasks, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickRefLogicalId, pickResponseTemplate, probeHostGatewaySupport, readMtlsMaterialsFromDisk, renderCodeDockerfile, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, selectIntegrationResponse, serviceStrategy, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, toCmdArgv, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCorePing };
|
|
3
|
+
export { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, AgentCoreResolutionError, CloudMapRegistry, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, SOFT_RELOAD_COMPLETION_LOG_SUFFIX, SUPPORTED_CODE_RUNTIMES, VtlEvaluationError, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartApiSpecificOptions, addStartServiceSpecificOptions, albStrategy, applyAuthorizerOverlay, applyCorsResponseHeaders, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildHttpApiV2Event, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, classifySourceChange, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createFileWatcher, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, evaluateCachedLambdaPolicy, evaluateResponseParameters, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isFunctionUrlOacFronted, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseLbPortOverrides, parseMaxTasks, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickRefLogicalId, pickResponseTemplate, probeHostGatewaySupport, readMtlsMaterialsFromDisk, renderCodeDockerfile, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveEnvVars, resolveLambdaArnIntrinsic, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, selectIntegrationResponse, serviceStrategy, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, toCmdArgv, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCorePing };
|
|
@@ -20887,6 +20887,22 @@ var EcsServiceRunnerError = class EcsServiceRunnerError extends Error {
|
|
|
20887
20887
|
Object.setPrototypeOf(this, EcsServiceRunnerError.prototype);
|
|
20888
20888
|
}
|
|
20889
20889
|
};
|
|
20890
|
+
/**
|
|
20891
|
+
* Phase 4 (#214) — completion-log suffix the soft-reload primitive
|
|
20892
|
+
* emits AFTER `Soft-reloaded replica r<i> (gen <g>): ` to confirm
|
|
20893
|
+
* the docker restart + TCP-ready probe + Cloud Map / front-door
|
|
20894
|
+
* re-publish round trip is done.
|
|
20895
|
+
*
|
|
20896
|
+
* Exported so integ fixtures + unit tests can grep against the
|
|
20897
|
+
* canonical text instead of hand-copying the wording — a future
|
|
20898
|
+
* refactor that rewords this line stays detectable via the symbol
|
|
20899
|
+
* import instead of silently breaking every test's regex.
|
|
20900
|
+
*
|
|
20901
|
+
* Per-repo memory (#218 / test reviewer N4): log-line text is part
|
|
20902
|
+
* of the public contract for `--watch` integ scripts, so it earns a
|
|
20903
|
+
* constant.
|
|
20904
|
+
*/
|
|
20905
|
+
const SOFT_RELOAD_COMPLETION_LOG_SUFFIX = "restart + TCP-ready probe complete; Cloud Map + front-door re-published.";
|
|
20890
20906
|
function createServiceRunState() {
|
|
20891
20907
|
return {
|
|
20892
20908
|
replicas: [],
|
|
@@ -21141,6 +21157,27 @@ async function bootReplica(service, options, instance) {
|
|
|
21141
21157
|
await runEcsTask(service.task, perReplicaTaskOptions, instance.state);
|
|
21142
21158
|
if (options.discovery) await publishReplicaToCloudMap(service, instance, options.discovery, ownerKeyPrefix);
|
|
21143
21159
|
if (options.frontDoor) await publishReplicaToFrontDoor(service, instance, options.frontDoor, options.taskOptions.containerHost, ownerKeyPrefix);
|
|
21160
|
+
instance.lastDeployedAssetHash = pickEssentialAssetHash(service);
|
|
21161
|
+
}
|
|
21162
|
+
/**
|
|
21163
|
+
* Phase 4 follow-up (#218) — extract the CDK asset hash from a
|
|
21164
|
+
* resolved service's first essential container (with the same
|
|
21165
|
+
* fallback the watcher uses: first essential, else first container).
|
|
21166
|
+
* Returns `undefined` when the image isn't a CDK asset OR carries
|
|
21167
|
+
* no hash. Pure helper so the boot + rolling + soft-reload paths
|
|
21168
|
+
* share one source of truth for "what's running right now".
|
|
21169
|
+
*
|
|
21170
|
+
* Exported for unit tests; not part of the semver-covered public
|
|
21171
|
+
* surface.
|
|
21172
|
+
*
|
|
21173
|
+
* @internal
|
|
21174
|
+
*/
|
|
21175
|
+
function pickEssentialAssetHash(service) {
|
|
21176
|
+
const essential = service.task.containers.find((c) => c.essential) ?? service.task.containers[0];
|
|
21177
|
+
if (!essential) return void 0;
|
|
21178
|
+
const image = essential.image;
|
|
21179
|
+
if (image?.kind !== "cdk-asset") return void 0;
|
|
21180
|
+
return image.assetHash;
|
|
21144
21181
|
}
|
|
21145
21182
|
/**
|
|
21146
21183
|
* After the replica's main container is up, discover its docker
|
|
@@ -21515,6 +21552,7 @@ async function softReloadReplica(args) {
|
|
|
21515
21552
|
}
|
|
21516
21553
|
unregisterReplicaFromFrontDoor(instance, controllerOptions.frontDoor);
|
|
21517
21554
|
instance.softReloadInProgress = true;
|
|
21555
|
+
instance.softReloadGeneration = (instance.softReloadGeneration ?? 0) + 1;
|
|
21518
21556
|
try {
|
|
21519
21557
|
logger.info(`Soft-reloading replica r${instance.index} (gen ${instance.generation}): docker cp ${sourceDirToCopy} -> ${targets.length} essential container(s); restart.`);
|
|
21520
21558
|
for (const target of targets) {
|
|
@@ -21545,7 +21583,8 @@ async function softReloadReplica(args) {
|
|
|
21545
21583
|
const ownerKeyPrefix = `${newService.serviceLogicalId}:r${instance.index}${ownerKeyGenSuffix}`;
|
|
21546
21584
|
if (controllerOptions.discovery) await publishReplicaToCloudMap(newService, instance, controllerOptions.discovery, ownerKeyPrefix);
|
|
21547
21585
|
if (controllerOptions.frontDoor) await publishReplicaToFrontDoor(newService, instance, controllerOptions.frontDoor, controllerOptions.taskOptions.containerHost, ownerKeyPrefix);
|
|
21548
|
-
|
|
21586
|
+
instance.lastDeployedAssetHash = pickEssentialAssetHash(newService);
|
|
21587
|
+
logger.info(`Soft-reloaded replica r${instance.index} (gen ${instance.generation}): ${SOFT_RELOAD_COMPLETION_LOG_SUFFIX}`);
|
|
21549
21588
|
} finally {
|
|
21550
21589
|
instance.softReloadInProgress = false;
|
|
21551
21590
|
}
|
|
@@ -21740,6 +21779,7 @@ async function watchReplica(service, options, instance, runState) {
|
|
|
21740
21779
|
await sleep(500);
|
|
21741
21780
|
continue;
|
|
21742
21781
|
}
|
|
21782
|
+
const softReloadGenBeforeWait = instance.softReloadGeneration ?? 0;
|
|
21743
21783
|
let exitCode;
|
|
21744
21784
|
try {
|
|
21745
21785
|
exitCode = await waitForExitImpl(essentialId);
|
|
@@ -21748,7 +21788,8 @@ async function watchReplica(service, options, instance, runState) {
|
|
|
21748
21788
|
exitCode = -1;
|
|
21749
21789
|
}
|
|
21750
21790
|
if (instance.shuttingDown || runState.shuttingDown) return;
|
|
21751
|
-
|
|
21791
|
+
const softReloadHappenedMidWait = (instance.softReloadGeneration ?? 0) !== softReloadGenBeforeWait;
|
|
21792
|
+
if (instance.softReloadInProgress || softReloadHappenedMidWait) {
|
|
21752
21793
|
while (instance.softReloadInProgress && !instance.shuttingDown && !runState.shuttingDown) await sleep(100);
|
|
21753
21794
|
if (instance.shuttingDown || runState.shuttingDown) return;
|
|
21754
21795
|
continue;
|
|
@@ -22729,9 +22770,51 @@ function escapeRealmQuotes(realm) {
|
|
|
22729
22770
|
}
|
|
22730
22771
|
/** Reply 404 — an ALB listener with no matching rule and no default action. */
|
|
22731
22772
|
function reply404(req, res, opts) {
|
|
22732
|
-
writeError(res, 404,
|
|
22773
|
+
writeError(res, 404, buildNoRuleMatched404Body(req, opts));
|
|
22733
22774
|
return Promise.resolve();
|
|
22734
22775
|
}
|
|
22776
|
+
/**
|
|
22777
|
+
* Build the no-rule-matched 404 body. When the call site supplied a
|
|
22778
|
+
* {@link StartFrontDoorServerOptions.rulesSummary}, the body lists every
|
|
22779
|
+
* ALB condition field that WAS evaluated (method, host, path) plus every
|
|
22780
|
+
* configured rule's priority + conditions + action target — so a user
|
|
22781
|
+
* whose request missed on, say, the Host header can spot the mismatch
|
|
22782
|
+
* without inspecting the synthesized template. Header conditions are
|
|
22783
|
+
* NOT spelled out in the evaluated section (too noisy) but ARE listed
|
|
22784
|
+
* in each rule's condition row when the rule constrains them. Without a
|
|
22785
|
+
* summary the body falls back to the original path-only shape (preserves
|
|
22786
|
+
* the behavior for direct callers that wire the proxy with just a
|
|
22787
|
+
* `selectPool` / `selectTarget`).
|
|
22788
|
+
*/
|
|
22789
|
+
function buildNoRuleMatched404Body(req, opts) {
|
|
22790
|
+
const requestPath = req.url ?? "/";
|
|
22791
|
+
const summary = opts.rulesSummary;
|
|
22792
|
+
if (!summary) return `No listener rule matched '${requestPath}' on ${opts.label}, and the listener has no default action forwarding to a local target.`;
|
|
22793
|
+
const rawHost = req.headers.host;
|
|
22794
|
+
const hostValue = Array.isArray(rawHost) ? rawHost[0] : rawHost;
|
|
22795
|
+
const lines = [];
|
|
22796
|
+
lines.push(`No listener rule matched the request on ${opts.label}, and the listener has no default action forwarding to a local target.`);
|
|
22797
|
+
lines.push("");
|
|
22798
|
+
lines.push(" Evaluated:");
|
|
22799
|
+
lines.push(` Method: ${req.method ?? "(unknown)"}`);
|
|
22800
|
+
lines.push(` Host: ${hostValue ?? "(no Host header)"}`);
|
|
22801
|
+
lines.push(` Path: ${requestPath}`);
|
|
22802
|
+
lines.push("");
|
|
22803
|
+
if (summary.length === 0) lines.push(" Listener has 0 rule(s).");
|
|
22804
|
+
else {
|
|
22805
|
+
lines.push(` Listener has ${summary.length} rule(s):`);
|
|
22806
|
+
const ordered = [...summary].sort((a, b) => a.priority - b.priority);
|
|
22807
|
+
for (const rule of ordered) {
|
|
22808
|
+
const conditions = rule.conditions.length === 0 ? "(no condition)" : rule.conditions.map(formatRuleConditionSummary).join(" AND ");
|
|
22809
|
+
lines.push(` [priority=${rule.priority}] ${conditions} -> ${rule.action}`);
|
|
22810
|
+
}
|
|
22811
|
+
}
|
|
22812
|
+
return lines.join("\n");
|
|
22813
|
+
}
|
|
22814
|
+
/** Format one condition row of a {@link FrontDoorRuleSummary} for the 404 body. */
|
|
22815
|
+
function formatRuleConditionSummary(c) {
|
|
22816
|
+
return `${c.field} in [${c.values.join(", ")}]`;
|
|
22817
|
+
}
|
|
22735
22818
|
function handlePoolRequest(req, res, pool, opts) {
|
|
22736
22819
|
return new Promise((resolve) => {
|
|
22737
22820
|
const endpoint = pool.next();
|
|
@@ -24239,6 +24322,13 @@ async function reloadAllServices(args) {
|
|
|
24239
24322
|
* {@link AssetManifestLoader}) so the caller can fall back to rebuild
|
|
24240
24323
|
* with a warn line that explains why the classifier couldn't run.
|
|
24241
24324
|
*/
|
|
24325
|
+
/**
|
|
24326
|
+
* @internal — exported for unit tests of the fall-through branches
|
|
24327
|
+
* (the 6 `return undefined` paths + the catch arm on
|
|
24328
|
+
* `resolveEcsServiceTarget` throw). Not part of the semver-covered
|
|
24329
|
+
* public surface; the only legitimate caller is `reloadAllServices`
|
|
24330
|
+
* inside this file.
|
|
24331
|
+
*/
|
|
24242
24332
|
async function loadAssetContextForTarget(args) {
|
|
24243
24333
|
const { target, controller, stacks, cdkOutDir, assetLoader, logger } = args;
|
|
24244
24334
|
const candidate = pickCandidateStack(parseEcsTarget(target).stackPattern, stacks);
|
|
@@ -24261,8 +24351,12 @@ async function loadAssetContextForTarget(args) {
|
|
|
24261
24351
|
if (!newDockerImage.source.directory) return;
|
|
24262
24352
|
const newAssetSourceDir = path.resolve(cdkOutDir, newDockerImage.source.directory);
|
|
24263
24353
|
let oldAssetHash;
|
|
24264
|
-
const
|
|
24265
|
-
if (
|
|
24354
|
+
const liveReplica = controller.runState.replicas.find((r) => !r.shuttingDown);
|
|
24355
|
+
if (liveReplica?.lastDeployedAssetHash !== void 0) oldAssetHash = liveReplica.lastDeployedAssetHash;
|
|
24356
|
+
else {
|
|
24357
|
+
const oldEssential = controller.service.task.containers.find((c) => c.essential) ?? controller.service.task.containers[0];
|
|
24358
|
+
if (oldEssential?.image.kind === "cdk-asset") oldAssetHash = oldEssential.image.assetHash;
|
|
24359
|
+
}
|
|
24266
24360
|
return {
|
|
24267
24361
|
...oldAssetHash !== void 0 && { oldAssetHash },
|
|
24268
24362
|
newAssetHash,
|
|
@@ -24558,6 +24652,7 @@ async function buildFrontDoor(plan, options, logger) {
|
|
|
24558
24652
|
const tls = listener.protocol === "HTTPS" && wantTls ? tlsMaterials : void 0;
|
|
24559
24653
|
const forwardedProto = listener.protocol === "HTTPS" ? "https" : "http";
|
|
24560
24654
|
const degradedHttps = listener.protocol === "HTTPS" && !wantTls;
|
|
24655
|
+
const rulesSummary = listener.rules.map(buildRuleSummary);
|
|
24561
24656
|
const server = await startFrontDoorServer({
|
|
24562
24657
|
route,
|
|
24563
24658
|
port: listener.hostPort,
|
|
@@ -24565,6 +24660,7 @@ async function buildFrontDoor(plan, options, logger) {
|
|
|
24565
24660
|
listenerPort: listener.listenerPort,
|
|
24566
24661
|
label: `listener port ${listener.listenerPort}`,
|
|
24567
24662
|
forwardedProto,
|
|
24663
|
+
rulesSummary,
|
|
24568
24664
|
...tls ? { tls } : {}
|
|
24569
24665
|
});
|
|
24570
24666
|
servers.push(server);
|
|
@@ -24629,6 +24725,66 @@ function describeTarget(t) {
|
|
|
24629
24725
|
function describeTargetShort(t) {
|
|
24630
24726
|
return t.kind === "lambda" ? `Lambda ${t.lambda.logicalId}` : t.serviceTarget;
|
|
24631
24727
|
}
|
|
24728
|
+
/**
|
|
24729
|
+
* Build the per-rule summary the front-door surfaces in its no-rule-matched
|
|
24730
|
+
* 404 body (issue #228). One condition row per constrained ALB field, plus a
|
|
24731
|
+
* pre-formatted action target. Distinct from {@link describeConditions} /
|
|
24732
|
+
* {@link describeAction} (which produce a single-line boot-banner string) —
|
|
24733
|
+
* the 404 body needs the rule decomposed into its constituent fields so the
|
|
24734
|
+
* formatter can render `field in [values]` rows.
|
|
24735
|
+
*/
|
|
24736
|
+
function buildRuleSummary(rule) {
|
|
24737
|
+
const conditions = [];
|
|
24738
|
+
if (rule.pathPatterns.length > 0) conditions.push({
|
|
24739
|
+
field: "path-pattern",
|
|
24740
|
+
values: rule.pathPatterns
|
|
24741
|
+
});
|
|
24742
|
+
if (rule.hostPatterns.length > 0) conditions.push({
|
|
24743
|
+
field: "host-header",
|
|
24744
|
+
values: rule.hostPatterns
|
|
24745
|
+
});
|
|
24746
|
+
for (const h of rule.httpHeaderConditions) conditions.push({
|
|
24747
|
+
field: "http-header",
|
|
24748
|
+
values: [`${h.name}: ${h.values.join(", ")}`]
|
|
24749
|
+
});
|
|
24750
|
+
if (rule.httpRequestMethods.length > 0) conditions.push({
|
|
24751
|
+
field: "http-request-method",
|
|
24752
|
+
values: rule.httpRequestMethods
|
|
24753
|
+
});
|
|
24754
|
+
if (rule.queryStringConditions.length > 0) conditions.push({
|
|
24755
|
+
field: "query-string",
|
|
24756
|
+
values: rule.queryStringConditions.map(describeQueryStringCondition)
|
|
24757
|
+
});
|
|
24758
|
+
if (rule.sourceIpCidrs.length > 0) conditions.push({
|
|
24759
|
+
field: "source-ip",
|
|
24760
|
+
values: rule.sourceIpCidrs
|
|
24761
|
+
});
|
|
24762
|
+
return {
|
|
24763
|
+
priority: rule.priority,
|
|
24764
|
+
conditions,
|
|
24765
|
+
action: describeRuleActionForSummary(rule.action)
|
|
24766
|
+
};
|
|
24767
|
+
}
|
|
24768
|
+
/**
|
|
24769
|
+
* Describe a planned action for the no-rule-matched 404 body (issue #228).
|
|
24770
|
+
* Uses the `<ECS: ...>` / `<Lambda: ...>` shape the issue body proposes so a
|
|
24771
|
+
* user can read each rule's target at a glance.
|
|
24772
|
+
*/
|
|
24773
|
+
function describeRuleActionForSummary(action) {
|
|
24774
|
+
if (action.kind === "redirect") return `redirect ${action.statusCode}`;
|
|
24775
|
+
if (action.kind === "fixed-response") return `fixed-response ${action.statusCode}`;
|
|
24776
|
+
if (action.targets.length === 1) return `forward to ${describeForwardTargetForSummary(action.targets[0])}`;
|
|
24777
|
+
return `forward weighted [${action.targets.map((t) => `${describeForwardTargetForSummary(t)}@${t.weight}`).join(", ")}]`;
|
|
24778
|
+
}
|
|
24779
|
+
/**
|
|
24780
|
+
* One forward target named the way the 404 body shows it: `<ECS: Service>` or
|
|
24781
|
+
* `<Lambda: LogicalId>` — distinct from the boot-banner format (which also
|
|
24782
|
+
* prints the container / port / round-robin hint) so the 404 body stays
|
|
24783
|
+
* scannable.
|
|
24784
|
+
*/
|
|
24785
|
+
function describeForwardTargetForSummary(t) {
|
|
24786
|
+
return t.kind === "lambda" ? `<Lambda: ${t.lambda.logicalId}>` : `<ECS: ${t.serviceTarget}>`;
|
|
24787
|
+
}
|
|
24632
24788
|
async function resolvePlaceholderAccount(arn, region) {
|
|
24633
24789
|
if (!arn.includes("${AWS::AccountId}")) return arn;
|
|
24634
24790
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
@@ -25849,5 +26005,5 @@ function addListSpecificOptions(cmd) {
|
|
|
25849
26005
|
}
|
|
25850
26006
|
|
|
25851
26007
|
//#endregion
|
|
25852
|
-
export {
|
|
25853
|
-
//# sourceMappingURL=local-list-
|
|
26008
|
+
export { translateLambdaResponse as $, buildContainerImage as $t, addStartApiSpecificOptions as A, AGENTCORE_A2A_PROTOCOL as An, invokeAgentCoreWs as At, filterRoutesByApiIdentifiers as B, substituteImagePlaceholders as Bn, signAgentCoreInvocation as Bt, classifySourceChange as C, listTargets as Cn, verifyJwtViaDiscovery as Ct, createLocalRunTaskCommand as D, discoverRoutes as Dn, buildCorsConfigFromCloudFrontChain as Dt, addRunTaskSpecificOptions as E, parseSelectionExpressionPath as En, buildCorsConfigByApiId as Et, createFileWatcher as F, AgentCoreResolutionError as Fn, MCP_PATH as Ft, resolveServiceIntegrationParameters as G, SUPPORTED_CODE_RUNTIMES as Gt, readMtlsMaterialsFromDisk as H, LocalInvokeBuildError as Hn, invokeAgentCore as Ht, attachStageContext as I, pickAgentCoreCandidateStack as In, MCP_PROTOCOL_VERSION as It, computeRequestIdentityHash as J, renderCodeDockerfile as Jt, defaultCredentialsLoader as K, buildAgentCoreCodeImage as Kt, buildStageMap as L, resolveAgentCoreTarget as Ln, mcpInvokeOnce as Lt, createWatchPredicates as M, AGENTCORE_HTTP_PROTOCOL as Mn, A2A_PATH as Mt, resolveApiTargetSubset as N, AGENTCORE_MCP_PROTOCOL as Nn, a2aInvokeOnce as Nt, addInvokeAgentCoreSpecificOptions as O, pickRefLogicalId as On, isFunctionUrlOacFronted as Ot, createAuthorizerCache as P, AGENTCORE_RUNTIME_TYPE as Pn, MCP_CONTAINER_PORT as Pt, matchRoute as Q, architectureToPlatform as Qt, availableApiIdentifiers as R, derivePseudoParametersFromRegion as Rn, parseSseForJsonRpc as Rt, CloudMapRegistry as S, countTargets as Sn, verifyJwtAuthorizer as St, getContainerNetworkIp as T, discoverWebSocketApisOrThrow as Tn, applyCorsResponseHeaders as Tt, startApiServer as U, waitForAgentCorePing as Ut, groupRoutesByServer as V, tryResolveImageFnJoin as Vn, AGENTCORE_SESSION_ID_HEADER as Vt, resolveSelectionExpression as W, downloadAndExtractS3Bundle as Wt, invokeRequestAuthorizer as X, addInvokeSpecificOptions as Xt, evaluateCachedLambdaPolicy as Y, toCmdArgv as Yt, invokeTokenAuthorizer as Z, createLocalInvokeCommand as Zt, parseMaxTasks as _, CfnLocalStateProvider as _n, buildMessageEvent as _t, albStrategy as a, substituteAgainstStateAsync as an, selectIntegrationResponse as at, runEcsServiceEmulator as b, resolveWatchConfig as bn, createJwksCache as bt, resolveAlbTarget as c, resolveEnvVars as cn, HOST_GATEWAY_MIN_VERSION as ct, addStartServiceSpecificOptions as d, createLocalStateProvider as dn, ConnectionRegistry as dt, resolveRuntimeCodeMountPath as en, applyAuthorizerOverlay as et, createLocalStartServiceCommand as f, isCfnFlagPresent as fn, buildMgmtEndpointEnvUrl as ft, buildEcsImageResolutionContext as g, resolveCfnStackName as gn, buildDisconnectEvent as gt, addCommonEcsServiceOptions as h, resolveCfnRegion as hn, buildConnectEvent as ht, addAlbSpecificOptions as i, substituteAgainstState as in, pickResponseTemplate as it, createLocalStartApiCommand as j, AGENTCORE_AGUI_PROTOCOL as jn, A2A_CONTAINER_PORT as jt, createLocalInvokeAgentCoreCommand as k, resolveLambdaArnIntrinsic as kn, matchPreflight as kt, isApplicationLoadBalancer as l, materializeLayerFromArn as ln, probeHostGatewaySupport as lt, MAX_TASKS_SUBNET_RANGE_CAP as m, resolveCfnFallbackRegion as mn, parseConnectionsPath as mt, createLocalListCommand as n, resolveRuntimeImage as nn, buildRestV1Event as nt, createLocalStartAlbCommand as o, substituteEnvVarsFromState as on, tryParseStatus as ot, serviceStrategy as p, rejectExplicitCfnStackWithMultipleStacks as pn, handleConnectionsRequest as pt, buildMethodArn as q, computeCodeImageTag as qt, formatTargetListing as r, EcsTaskResolutionError as rn, evaluateResponseParameters as rt, parseLbPortOverrides as s, substituteEnvVarsFromStateAsync as sn, VtlEvaluationError as st, addListSpecificOptions as t, resolveRuntimeFileExtension as tn, buildHttpApiV2Event as tt, resolveAlbFrontDoor as u, LocalStateSourceError as un, bufferToBody as ut, parseRestartPolicy as v, collectSsmParameterRefs as vn, buildCognitoJwksUrl as vt, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as w, discoverWebSocketApis as wn, attachAuthorizers as wt, buildCloudMapIndex as x, resolveSingleTarget as xn, verifyCognitoJwt as xt, resolveSharedSidecarCredentials as y, resolveSsmParameters as yn, buildJwksUrlFromIssuer as yt, filterRoutesByApiIdentifier as z, formatStateRemedy as zn, AGENTCORE_SIGV4_SERVICE as zt };
|
|
26009
|
+
//# sourceMappingURL=local-list-C-wXKogn.js.map
|