cdk-local 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -3
- package/dist/{cloud-map-resolver-CW4Paz5K.js → cloud-map-resolver-BvhnCkSe.js} +36 -9
- package/dist/cloud-map-resolver-BvhnCkSe.js.map +1 -0
- package/dist/{error-handler-GsADCf-H.d.ts → error-handler-Chucd8C_.d.ts} +3 -2
- package/dist/error-handler-Chucd8C_.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{local-list-BovxL7PC.js → local-list-C6xuYlRB.js} +50 -3
- package/dist/local-list-C6xuYlRB.js.map +1 -0
- package/package.json +1 -1
- package/dist/cloud-map-resolver-CW4Paz5K.js.map +0 -1
- package/dist/error-handler-GsADCf-H.d.ts.map +0 -1
- package/dist/local-list-BovxL7PC.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as createLocalStartApiCommand } from "./cloud-map-resolver-
|
|
3
|
-
import { a as createLocalRunTaskCommand, i as createLocalStartServiceCommand, o as createLocalInvokeAgentCoreCommand, r as createLocalStartAlbCommand, s as createLocalInvokeCommand, t as createLocalListCommand } from "./local-list-
|
|
2
|
+
import { a as createLocalStartApiCommand } from "./cloud-map-resolver-BvhnCkSe.js";
|
|
3
|
+
import { a as createLocalRunTaskCommand, i as createLocalStartServiceCommand, o as createLocalInvokeAgentCoreCommand, r as createLocalStartAlbCommand, s as createLocalInvokeCommand, t as createLocalListCommand } from "./local-list-C6xuYlRB.js";
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/index.ts
|
|
7
7
|
const program = new Command();
|
|
8
|
-
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.
|
|
8
|
+
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.50.0");
|
|
9
9
|
program.addCommand(createLocalInvokeCommand());
|
|
10
10
|
program.addCommand(createLocalInvokeAgentCoreCommand());
|
|
11
11
|
program.addCommand(createLocalStartApiCommand());
|
|
@@ -1370,11 +1370,18 @@ function extractArtifact(artifact, logicalId, stackName, resources, region, imag
|
|
|
1370
1370
|
* Extract a `CodeConfiguration` (managed-runtime) artifact. Reads `Runtime`,
|
|
1371
1371
|
* `EntryPoint`, and the `Code.S3` location. `Code.S3.Prefix` must be a literal
|
|
1372
1372
|
* string (the object key) — it doubles as the cdk.out file-asset hash for the
|
|
1373
|
-
* `fromCodeAsset` shape (`<hash>.zip`).
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1377
|
-
* `
|
|
1373
|
+
* `fromCodeAsset` shape (`<hash>.zip`).
|
|
1374
|
+
*
|
|
1375
|
+
* - `Code.S3.Bucket` literal string → fromS3 bundle, `s3Source.bucket` set.
|
|
1376
|
+
* - `Code.S3.Bucket` intrinsic (`Ref` / `Fn::ImportValue` / `Fn::GetStackOutput`
|
|
1377
|
+
* / `Fn::Sub`) → fromS3 bundle, `s3Source.bucketIntrinsic` set (the command
|
|
1378
|
+
* resolves it against `--from-cfn-stack` state via the same machinery env
|
|
1379
|
+
* vars use).
|
|
1380
|
+
* - `Code.S3.Bucket` missing → fromCodeAsset shape (the staging bucket renders
|
|
1381
|
+
* as an `Fn::Sub` intrinsic for fromCodeAsset, but the cdk.out lookup
|
|
1382
|
+
* short-circuits that — no `s3Source` needed).
|
|
1383
|
+
*
|
|
1384
|
+
* A non-literal `Code.S3.Prefix` (an unresolved intrinsic) hard-errors.
|
|
1378
1385
|
*/
|
|
1379
1386
|
function extractCodeArtifact(codeConfig, logicalId, stackName) {
|
|
1380
1387
|
const cfg = codeConfig && typeof codeConfig === "object" && !Array.isArray(codeConfig) ? codeConfig : {};
|
|
@@ -1390,11 +1397,18 @@ function extractCodeArtifact(codeConfig, logicalId, stackName) {
|
|
|
1390
1397
|
const codeAssetHash = prefix.replace(/^.*\//, "").replace(/\.zip$/, "");
|
|
1391
1398
|
const bucket = s3Obj["Bucket"];
|
|
1392
1399
|
const versionId = s3Obj["VersionId"];
|
|
1393
|
-
const
|
|
1400
|
+
const versionIdField = typeof versionId === "string" && versionId.length > 0 ? { versionId } : {};
|
|
1401
|
+
let s3Source;
|
|
1402
|
+
if (typeof bucket === "string" && bucket.length > 0) s3Source = {
|
|
1394
1403
|
bucket,
|
|
1395
1404
|
key: prefix,
|
|
1396
|
-
...
|
|
1397
|
-
}
|
|
1405
|
+
...versionIdField
|
|
1406
|
+
};
|
|
1407
|
+
else if (isFromS3BucketIntrinsic(bucket)) s3Source = {
|
|
1408
|
+
bucketIntrinsic: bucket,
|
|
1409
|
+
key: prefix,
|
|
1410
|
+
...versionIdField
|
|
1411
|
+
};
|
|
1398
1412
|
return {
|
|
1399
1413
|
runtime,
|
|
1400
1414
|
entryPoint,
|
|
@@ -1403,6 +1417,19 @@ function extractCodeArtifact(codeConfig, logicalId, stackName) {
|
|
|
1403
1417
|
};
|
|
1404
1418
|
}
|
|
1405
1419
|
/**
|
|
1420
|
+
* Whitelist the intrinsic shapes the command can resolve for a fromS3
|
|
1421
|
+
* `Code.S3.Bucket` against `--from-cfn-stack` state — `Ref` (same-stack
|
|
1422
|
+
* resource), `Fn::ImportValue` (CloudFormation export), `Fn::GetStackOutput`
|
|
1423
|
+
* (cdk-local cross-stack output). Crucially excludes `Fn::Sub`, which is the
|
|
1424
|
+
* fromCodeAsset staging-bucket shape: that one stays unmarked so fromCodeAsset
|
|
1425
|
+
* routes through the cdk.out asset path unchanged.
|
|
1426
|
+
*/
|
|
1427
|
+
function isFromS3BucketIntrinsic(value) {
|
|
1428
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1429
|
+
const obj = value;
|
|
1430
|
+
return "Ref" in obj || "Fn::ImportValue" in obj || "Fn::GetStackOutput" in obj;
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1406
1433
|
* Resolve a `ContainerUri` value to a string. Handles a literal string,
|
|
1407
1434
|
* an `Fn::Sub` (the template returned verbatim — `${AWS::*}` placeholders
|
|
1408
1435
|
* are kept for asset-hash matching / later ECR substitution), and the
|
|
@@ -17572,4 +17599,4 @@ function extractDnsRecords(serviceProps) {
|
|
|
17572
17599
|
|
|
17573
17600
|
//#endregion
|
|
17574
17601
|
export { attachAuthorizers as $, substituteAgainstState as $t, buildHttpApiV2Event as A, AGENTCORE_RUNTIME_TYPE as An, buildDockerImage as At, ConnectionRegistry as B, readCdkPathOrUndefined as Bn, streamLogs as Bt, computeRequestIdentityHash as C, discoverWebSocketApisOrThrow as Cn, getDockerImageBySourceHash as Ct, matchRoute as D, resolveLambdaArnIntrinsic as Dn, buildContainerImage as Dt, invokeTokenAuthorizer as E, pickRefLogicalId as En, architectureToPlatform as Et, tryParseStatus as F, derivePseudoParametersFromRegion as Fn, execEnvForSecrets as Ft, buildDisconnectEvent as G, withErrorHandling as Gn, TASK_ROLE_ACCOUNT_PLACEHOLDER as Gt, handleConnectionsRequest as H, CdkLocalError as Hn, resolveRuntimeFileExtension as Ht, VtlEvaluationError as I, substituteImagePlaceholders as In, pickFreePort as It, buildJwksUrlFromIssuer as J, commonOptions as Jn, derivePartitionAndUrlSuffix as Jt, buildMessageEvent as K, applyRoleArnIfSet as Kn, applyCrossStackResolverToTask as Kt, HOST_GATEWAY_MIN_VERSION as L, tryResolveImageFnJoin as Ln, pullImage as Lt, evaluateResponseParameters as M, pickAgentCoreCandidateStack as Mn, SENSITIVE_ENV_KEYS as Mt, pickResponseTemplate as N, resolveAgentCoreTarget as Nn, appendEnvFlags as Nt, translateLambdaResponse as O, AGENTCORE_HTTP_PROTOCOL as On, parseEcrUri as Ot, selectIntegrationResponse as P, resolveLambdaTarget as Pn, ensureDockerAvailable as Pt, verifyJwtViaDiscovery as Q, warnIfDeprecatedRegion as Qn, applyDeployedEnvFallback as Qt, probeHostGatewaySupport as R, matchStacks as Rn, removeContainer as Rt, buildMethodArn as S, discoverWebSocketApis as Sn, AssetManifestLoader as St, invokeRequestAuthorizer as T, discoverRoutes as Tn, waitForRieReady as Tt, parseConnectionsPath as U, LocalInvokeBuildError as Un, resolveRuntimeImage as Ut, buildMgmtEndpointEnvUrl as V, resolveCdkPathToLogicalIds as Vn, resolveRuntimeCodeMountPath as Vt, buildConnectEvent as W, LocalStartServiceError as Wn, EcsTaskResolutionError as Wt, verifyCognitoJwt as X, deprecatedRegionOption as Xn, parseEcsTarget as Xt, createJwksCache as Y, contextOptions as Yn, detectEcsImageResolutionNeeds as Yt, verifyJwtAuthorizer as Z, parseContextOptions as Zn, resolveEcsTaskTarget as Zt, readMtlsMaterialsFromDisk as _, Synthesizer as _n, computeCodeImageTag as _t, createLocalStartApiCommand as a, LocalStateSourceError as an, invokeAgentCoreWs as at, resolveServiceIntegrationParameters as b, countTargets as bn, writeProfileCredentialsFile as bt, resolveProfileCredentials as c, rejectExplicitCfnStackWithMultipleStacks as cn, MCP_PROTOCOL_VERSION as ct, attachStageContext as d, resolveCfnStackName as dn, AGENTCORE_SESSION_ID_HEADER as dt, substituteAgainstStateAsync as en, applyCorsResponseHeaders as et, buildStageMap as f, CfnLocalStateProvider as fn, invokeAgentCore as ft, groupRoutesByServer as g, resolveWatchConfig as gn, buildAgentCoreCodeImage as gt, filterRoutesByApiIdentifiers as h, resolveApp as hn, SUPPORTED_CODE_RUNTIMES as ht, getPublishedHostPort as i, materializeLayerFromArn as in, matchPreflight as it, buildRestV1Event as j, AgentCoreResolutionError as jn, DockerRunnerError as jt, applyAuthorizerOverlay as k, AGENTCORE_MCP_PROTOCOL as kn, pullEcrImage as kt, createAuthorizerCache as l, resolveCfnFallbackRegion as ln, mcpInvokeOnce as lt, filterRoutesByApiIdentifier as m, resolveSsmParameters as mn, downloadAndExtractS3Bundle as mt, CloudMapRegistry as n, substituteEnvVarsFromStateAsync as nn, buildCorsConfigFromCloudFrontChain as nt, createWatchPredicates as o, createLocalStateProvider as on, MCP_CONTAINER_PORT as ot, availableApiIdentifiers as p, collectSsmParameterRefs as pn, waitForAgentCorePing as pt, buildCognitoJwksUrl as q, appOptions as qn, checkVolumeHostPath as qt, getContainerNetworkIp as r, resolveEnvVars as rn, isFunctionUrlOacFronted as rt, resolveApiTargetSubset as s, isCfnFlagPresent as sn, MCP_PATH as st, buildCloudMapIndex as t, substituteEnvVarsFromState as tn, buildCorsConfigByApiId as tt, createFileWatcher as u, resolveCfnRegion as un, parseSseForJsonRpc as ut, startApiServer as v, resolveMultiTarget as vn, renderCodeDockerfile as vt, evaluateCachedLambdaPolicy as w, parseSelectionExpressionPath as wn, invokeRie as wt, defaultCredentialsLoader as x, listTargets as xn, singleFlight as xt, resolveSelectionExpression as y, resolveSingleTarget as yn, toCmdArgv as yt, bufferToBody as z, buildCdkPathIndex as zn, runDetached as zt };
|
|
17575
|
-
//# sourceMappingURL=cloud-map-resolver-
|
|
17602
|
+
//# sourceMappingURL=cloud-map-resolver-BvhnCkSe.js.map
|