cdk-local 0.164.1 → 0.164.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-CtjweaLu.js +1614 -0
- package/dist/aws-proxy-CtjweaLu.js.map +1 -0
- package/dist/{cdkl-io-host-b34gsrHs.js → cdkl-io-host-DHcFlfj1.js} +2 -2
- package/dist/{cdkl-io-host-b34gsrHs.js.map → cdkl-io-host-DHcFlfj1.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{docker-cmd-C_Hfs3eo.js → docker-cmd-6JZnWXBN.js} +168 -7
- package/dist/docker-cmd-6JZnWXBN.js.map +1 -0
- package/dist/{docker-runner-C0Igd4LD.js → docker-runner-3CL99fDP.js} +34 -17
- package/dist/{docker-runner-C0Igd4LD.js.map → docker-runner-3CL99fDP.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/internal.d.ts +4 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +4 -4
- package/dist/{local-studio-Bo1NL6UK.js → local-studio-CMq3n7mt.js} +91 -41
- package/dist/local-studio-CMq3n7mt.js.map +1 -0
- package/dist/{local-studio-B6fnvxp2.d.ts → local-studio-DAafqqRv.d.ts} +6 -2
- package/dist/local-studio-DAafqqRv.d.ts.map +1 -0
- package/dist/{logger-25be7ULc.js → logger-uzapot2X.js} +3 -2
- package/dist/logger-uzapot2X.js.map +1 -0
- package/dist/{workload-identity-BQBoBgdT.js → workload-identity-BONcukjU.js} +9 -1412
- package/dist/workload-identity-BONcukjU.js.map +1 -0
- package/package.json +1 -1
- package/dist/assembly-path-4qK96UfP.js +0 -208
- package/dist/assembly-path-4qK96UfP.js.map +0 -1
- package/dist/docker-cmd-C_Hfs3eo.js.map +0 -1
- package/dist/local-studio-B6fnvxp2.d.ts.map +0 -1
- package/dist/local-studio-Bo1NL6UK.js.map +0 -1
- package/dist/logger-25be7ULc.js.map +0 -1
- package/dist/workload-identity-BQBoBgdT.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { a as isDockerClientEnvKey, c as runDockerStreaming, i as getDockerCmd, n as finchSecretArgvRefusal, o as isMalformedEnvKey, u as warnFinchArgvExposure } from "./docker-cmd-
|
|
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-uzapot2X.js";
|
|
2
|
+
import { $ as formatHostForAuthority, B as describeCredentialLoadFailure, H as isAwsServiceException, I as renderAssemblyPathEscape, J as resolveEnvVars$1, K as applyEnvOverrideMap, L as resolveAssemblyPath, N as displayUntrustedValue, Q as formatAuthority, R as clampErrorName, U as sanitizeServiceExceptionMessage, V as flattenToOneLine, W as stringifyThrown, X as isLoopbackHostname, Y as defineOwnKey, Z as isWildcardHostname, et as hostFromAuthority, j as absoluteAssemblyPathEscape, n as awsEmulatorRealServices, o as deployArtifactClientConfig, p as proxyAwareFetch, q as readEnvVarsFileText, r as awsEndpointOverrideClientConfig, s as deployArtifactsReadEmulator, u as isAwsServiceRoutedToEmulator, y as createMixedModeStateProvider, z as describeAwsFailureForWarn } from "./aws-proxy-CtjweaLu.js";
|
|
3
|
+
import { $ as isIamRoleArn, A as buildDockerImage, B as substituteImagePlaceholders, D as isImageInLocalCache, E as warnIfEmulatedPlatform, F as parseEcrRegistryHost, G as LocalStartServiceError, H as CdkLocalError, I as contextForContainer, J as withErrorHandling, K as RouteDiscoveryError, L as derivePartitionAndUrlSuffix, M as createShutdownSignalHandler, N as signalExitCode, O as parseEcrUri, P as describeExitWithoutArgv, Q as describeRejectedRoleArn, R as derivePseudoParametersFromRegion, T as buildContainerImage, U as InteractiveTtyRequiredError, V as tryResolveImageFnJoin, W as LocalInvokeBuildError, X as applyRoleArnIfSet, Y as AssumeRoleFailure, Z as assumeRoleCredentials, a as describeRefusedSensitiveEnvKeys, c as execEnvForSecrets, d as rememberForwardedPorts, et as refusedRoleArnMessage, f as removeContainer, h as streamLogs, i as attachLoopbackForwarder, j as resolveAssetSourcePath, k as pullEcrImage, l as pickFreePort, m as startNamespaceOwnerForwarder, n as SENSITIVE_ENV_KEYS, nt as resolveProfileCredentials, p as runDetached, q as TargetSelectionCancelledError, r as appendEnvFlags, s as ensureDockerAvailable, t as DockerRunnerError, tt as buildStsClientConfig, u as pullImage, w as architectureToPlatform, z as formatStateRemedy } from "./docker-runner-3CL99fDP.js";
|
|
4
|
+
import { C as effectiveLoopbackPorts, F as resolveHostDefaultCredentials, R as takeAwsEmulatorStateSourceHint, b as awsEmulatorEnvName, d as workloadStsClientConfig, l as warnWorkloadCredentialsStripped, n as accountLookupStsClientConfig, r as applyWorkloadEnvCredentials, u as workloadClientConfig, v as activateWorkloadAwsWiring, w as getActiveWorkloadAwsWiring, y as applyWorkloadAwsWiringToEnv, z as workloadGetsEmulatorKeysOnly } from "./workload-identity-BONcukjU.js";
|
|
5
|
+
import { a as isDockerClientEnvKey, c as runDockerStreaming, f as noImplicitEcrPullArgs, i as getDockerCmd, n as finchSecretArgvRefusal, o as isMalformedEnvKey, u as warnFinchArgvExposure } from "./docker-cmd-6JZnWXBN.js";
|
|
6
6
|
import { chmodSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { Command, InvalidArgumentError, Option } from "commander";
|
|
8
8
|
import { STSClient } from "@aws-sdk/client-sts";
|
|
@@ -2767,7 +2767,7 @@ async function resolveMultiTarget(provided, params) {
|
|
|
2767
2767
|
async function loadSynthDeps() {
|
|
2768
2768
|
const [toolkitLib, { CdklIoHost }, { AssetManifestArtifact }] = await Promise.all([
|
|
2769
2769
|
import("@aws-cdk/toolkit-lib"),
|
|
2770
|
-
import("./cdkl-io-host-
|
|
2770
|
+
import("./cdkl-io-host-DHcFlfj1.js"),
|
|
2771
2771
|
import("@aws-cdk/cloud-assembly-api")
|
|
2772
2772
|
]);
|
|
2773
2773
|
return {
|
|
@@ -10269,7 +10269,8 @@ function layerFailureDetail(err, operation) {
|
|
|
10269
10269
|
async function materializeLayerFromArn(layer, options = {}) {
|
|
10270
10270
|
const logger = getLogger();
|
|
10271
10271
|
let credentials;
|
|
10272
|
-
if (options.roleArn)
|
|
10272
|
+
if (options.roleArn && deployArtifactsReadEmulator("LAMBDA", options.workload)) logger.debug("--layer-role-arn is not assumed under --aws-emulator: the layer is read from AWS Emulator.");
|
|
10273
|
+
else if (options.roleArn) try {
|
|
10273
10274
|
credentials = await assumeRoleForLayer(options.roleArn, layer.region, options);
|
|
10274
10275
|
logger.debug(`Layer ${displayUntrustedValue(layer.arn)}: assumed role ${options.roleArn} for GetLayerVersion`);
|
|
10275
10276
|
} catch (err) {
|
|
@@ -10305,7 +10306,7 @@ async function materializeLayerFromArn(layer, options = {}) {
|
|
|
10305
10306
|
return dir;
|
|
10306
10307
|
}
|
|
10307
10308
|
async function fetchLayerContentUrl(layer, credentials, options) {
|
|
10308
|
-
const client = (options.lambdaClientFactory ?? await defaultLambdaClientFactory())(layer.region, credentials);
|
|
10309
|
+
const client = (options.lambdaClientFactory ?? await defaultLambdaClientFactory(options.workload))(layer.region, credentials);
|
|
10309
10310
|
try {
|
|
10310
10311
|
const versionSuffix = /^(.*):(\d+)$/.exec(layer.arn);
|
|
10311
10312
|
if (!versionSuffix) throw new LayerMaterializationError(`Layer ${displayUntrustedValue(layer.arn)}: not a layer-version ARN (no ':<version>' suffix to strip). Expected arn:<partition>:lambda:<region>:<account>:layer:<name>:<version>.`);
|
|
@@ -10334,12 +10335,15 @@ async function assumeRoleForLayer(roleArn, region, options) {
|
|
|
10334
10335
|
client.destroy?.();
|
|
10335
10336
|
}
|
|
10336
10337
|
}
|
|
10337
|
-
async function defaultLambdaClientFactory() {
|
|
10338
|
+
async function defaultLambdaClientFactory(workload) {
|
|
10338
10339
|
const { LambdaClient } = await import("@aws-sdk/client-lambda");
|
|
10339
10340
|
return (region, credentials) => new LambdaClient({
|
|
10340
|
-
...
|
|
10341
|
+
...workloadClientConfig({
|
|
10342
|
+
service: "LAMBDA",
|
|
10343
|
+
workload
|
|
10344
|
+
}),
|
|
10341
10345
|
region,
|
|
10342
|
-
...credentials && !deployArtifactsReadEmulator() && { credentials: {
|
|
10346
|
+
...credentials && !deployArtifactsReadEmulator("LAMBDA", workload) && { credentials: {
|
|
10343
10347
|
accessKeyId: credentials.accessKeyId,
|
|
10344
10348
|
secretAccessKey: credentials.secretAccessKey,
|
|
10345
10349
|
...credentials.sessionToken !== void 0 && { sessionToken: credentials.sessionToken }
|
|
@@ -11443,7 +11447,10 @@ async function buildContainerSpec(args) {
|
|
|
11443
11447
|
codeDir = materialized.dir;
|
|
11444
11448
|
if (materialized.tmpDir) inlineTmpDirs.add(materialized.tmpDir);
|
|
11445
11449
|
} else codeDir = materializeInlineCode$2(lambda.handler, lambda.inlineCode ?? "", resolveRuntimeFileExtension(lambda.runtime), inlineTmpDirs);
|
|
11446
|
-
optDir = await materializeLambdaLayers$1(lambda.layers, layerTmpDirs, layerRoleArn
|
|
11450
|
+
optDir = await materializeLambdaLayers$1(lambda.layers, layerTmpDirs, layerRoleArn, {
|
|
11451
|
+
logicalId: lambda.logicalId,
|
|
11452
|
+
cdkPath: readCdkPathOrUndefined(lambda.resource)
|
|
11453
|
+
});
|
|
11447
11454
|
} else {
|
|
11448
11455
|
imageRef = (await resolveContainerImageForStartApi(lambda, skipPull, args.profile, {
|
|
11449
11456
|
...args.skipBuild !== void 0 && { noBuild: args.skipBuild },
|
|
@@ -11611,12 +11618,20 @@ async function resolveContainerImageForStartApi(lambda, skipPull, profile, optio
|
|
|
11611
11618
|
if (localBuild) return { imageRef: await buildContainerImage(localBuild.asset, localBuild.cdkOutDir, {
|
|
11612
11619
|
architecture: lambda.architecture,
|
|
11613
11620
|
assetOutdir: localBuild.assetOutdir,
|
|
11621
|
+
workload: {
|
|
11622
|
+
logicalId: lambda.logicalId,
|
|
11623
|
+
cdkPath: readCdkPathOrUndefined(lambda.resource)
|
|
11624
|
+
},
|
|
11614
11625
|
...options?.noBuild !== void 0 && { noBuild: options.noBuild }
|
|
11615
11626
|
}) };
|
|
11616
11627
|
if (!parseEcrUri(lambda.imageUri)) throw new Error(`Container Lambda ${displayIdent(lambda.logicalId)} has no matching asset in cdk.out, and Code.ImageUri ${displayUntrustedValue(String(lambda.imageUri))} is not an ECR URI ${getEmbedConfig().binaryName} can authenticate against. Re-synthesize the CDK app (so cdk.out includes the build context) or deploy the image to ECR first.`);
|
|
11617
11628
|
logger.info(`No matching cdk.out asset for ${lambda.imageUri}; falling back to ECR pull...`);
|
|
11618
11629
|
return { imageRef: await pullEcrImage(lambda.imageUri, {
|
|
11619
11630
|
skipPull,
|
|
11631
|
+
workload: {
|
|
11632
|
+
logicalId: lambda.logicalId,
|
|
11633
|
+
cdkPath: readCdkPathOrUndefined(lambda.resource)
|
|
11634
|
+
},
|
|
11620
11635
|
...profile !== void 0 && { profile },
|
|
11621
11636
|
...options?.ecrRoleArn !== void 0 && { ecrRoleArn: options.ecrRoleArn },
|
|
11622
11637
|
...options?.region !== void 0 && { region: options.region }
|
|
@@ -11636,7 +11651,7 @@ async function resolveLocalBuildPlan$1(lambda) {
|
|
|
11636
11651
|
assetOutdir: assetPathDirs(lambda.stack).assetOutdir
|
|
11637
11652
|
};
|
|
11638
11653
|
}
|
|
11639
|
-
async function materializeLambdaLayers$1(layers, layerTmpDirs, layerRoleArn) {
|
|
11654
|
+
async function materializeLambdaLayers$1(layers, layerTmpDirs, layerRoleArn, workload) {
|
|
11640
11655
|
if (layers.length === 0) return void 0;
|
|
11641
11656
|
const flat = [];
|
|
11642
11657
|
for (const layer of layers) {
|
|
@@ -11647,7 +11662,10 @@ async function materializeLambdaLayers$1(layers, layerTmpDirs, layerRoleArn) {
|
|
|
11647
11662
|
});
|
|
11648
11663
|
continue;
|
|
11649
11664
|
}
|
|
11650
|
-
const dir = await materializeLayerFromArn(layer, {
|
|
11665
|
+
const dir = await materializeLayerFromArn(layer, {
|
|
11666
|
+
...layerRoleArn !== void 0 && { roleArn: layerRoleArn },
|
|
11667
|
+
...workload !== void 0 && { workload }
|
|
11668
|
+
});
|
|
11651
11669
|
layerTmpDirs.add(dir);
|
|
11652
11670
|
flat.push({
|
|
11653
11671
|
logicalId: layer.arn,
|
|
@@ -12302,7 +12320,7 @@ async function resolveZipImagePlan$1(lambda, options) {
|
|
|
12302
12320
|
const image = resolveRuntimeImage(lambda.runtime);
|
|
12303
12321
|
const platform = architectureToPlatform(lambda.architecture);
|
|
12304
12322
|
await pullImage(image, options.pull === false, platform);
|
|
12305
|
-
const layerPlan = await materializeLambdaLayersIncludingArns(lambda.layers, options);
|
|
12323
|
+
const layerPlan = await materializeLambdaLayersIncludingArns(lambda.layers, options, lambdaWorkload(lambda));
|
|
12306
12324
|
const containerCodePath = resolveRuntimeCodeMountPath(lambda.runtime);
|
|
12307
12325
|
const tmpfs = resolveTmpfsForLambda(lambda);
|
|
12308
12326
|
return {
|
|
@@ -12325,7 +12343,7 @@ async function resolveZipImagePlan$1(lambda, options) {
|
|
|
12325
12343
|
function assumeRoleDetail(err, op) {
|
|
12326
12344
|
return err instanceof AssumeRoleFailure ? err.detail : describeAwsFailureForWarn(err, op);
|
|
12327
12345
|
}
|
|
12328
|
-
async function materializeLambdaLayersIncludingArns(layers, options) {
|
|
12346
|
+
async function materializeLambdaLayersIncludingArns(layers, options, workload) {
|
|
12329
12347
|
const extraTmpDirs = [];
|
|
12330
12348
|
const flat = [];
|
|
12331
12349
|
for (const layer of layers) {
|
|
@@ -12336,7 +12354,10 @@ async function materializeLambdaLayersIncludingArns(layers, options) {
|
|
|
12336
12354
|
});
|
|
12337
12355
|
continue;
|
|
12338
12356
|
}
|
|
12339
|
-
const dir = await materializeLayerFromArn(layer, {
|
|
12357
|
+
const dir = await materializeLayerFromArn(layer, {
|
|
12358
|
+
...options.layerRoleArn !== void 0 && { roleArn: options.layerRoleArn },
|
|
12359
|
+
...workload !== void 0 && { workload }
|
|
12360
|
+
});
|
|
12340
12361
|
extraTmpDirs.push(dir);
|
|
12341
12362
|
flat.push({
|
|
12342
12363
|
logicalId: layer.arn,
|
|
@@ -12392,7 +12413,8 @@ async function resolveContainerImagePlan$1(lambda, options) {
|
|
|
12392
12413
|
if (localBuild) imageRef = await buildContainerImage(localBuild.asset, localBuild.cdkOutDir, {
|
|
12393
12414
|
architecture: lambda.architecture,
|
|
12394
12415
|
noBuild: options.build === false,
|
|
12395
|
-
assetOutdir: localBuild.assetOutdir
|
|
12416
|
+
assetOutdir: localBuild.assetOutdir,
|
|
12417
|
+
workload: lambdaWorkload(lambda)
|
|
12396
12418
|
});
|
|
12397
12419
|
else {
|
|
12398
12420
|
if (!parseEcrUri(lambda.imageUri)) throw new Error(`Container Lambda ${displayIdent(lambda.logicalId)} has no matching asset in cdk.out, and Code.ImageUri ${displayUntrustedValue(String(lambda.imageUri))} is not an ECR URI ${getEmbedConfig().binaryName} can authenticate against. Re-synthesize the CDK app (so cdk.out includes the build context) or deploy the image to ECR first.`);
|
|
@@ -12401,7 +12423,8 @@ async function resolveContainerImagePlan$1(lambda, options) {
|
|
|
12401
12423
|
skipPull: options.pull === false,
|
|
12402
12424
|
...options.region !== void 0 && { region: options.region },
|
|
12403
12425
|
...options.ecrRoleArn !== void 0 && { ecrRoleArn: options.ecrRoleArn },
|
|
12404
|
-
...options.profile !== void 0 && { profile: options.profile }
|
|
12426
|
+
...options.profile !== void 0 && { profile: options.profile },
|
|
12427
|
+
workload: lambdaWorkload(lambda)
|
|
12405
12428
|
});
|
|
12406
12429
|
}
|
|
12407
12430
|
const tmpfs = resolveTmpfsForLambda(lambda);
|
|
@@ -13082,11 +13105,16 @@ function resolveSafeEntryPath(root, entry) {
|
|
|
13082
13105
|
function defaultFetchObject$1(options) {
|
|
13083
13106
|
return async (location) => {
|
|
13084
13107
|
const { S3Client, GetObjectCommand } = await import("@aws-sdk/client-s3");
|
|
13108
|
+
const fromEmulator = deployArtifactsReadEmulator("S3", options.workload);
|
|
13085
13109
|
const client = new S3Client({
|
|
13086
|
-
...deployArtifactClientConfig({
|
|
13110
|
+
...deployArtifactClientConfig({
|
|
13111
|
+
service: "S3",
|
|
13112
|
+
profile: options.profile,
|
|
13113
|
+
workload: options.workload
|
|
13114
|
+
}),
|
|
13087
13115
|
...options.region && { region: options.region },
|
|
13088
|
-
...options.profile && !options.credentials && !
|
|
13089
|
-
...options.credentials && !
|
|
13116
|
+
...options.profile && !options.credentials && !fromEmulator && { profile: options.profile },
|
|
13117
|
+
...options.credentials && !fromEmulator && { credentials: {
|
|
13090
13118
|
accessKeyId: options.credentials.accessKeyId,
|
|
13091
13119
|
secretAccessKey: options.credentials.secretAccessKey,
|
|
13092
13120
|
...options.credentials.sessionToken && { sessionToken: options.credentials.sessionToken }
|
|
@@ -13999,7 +14027,11 @@ async function resolveAgentCoreImage(resolved, options, loaded, stateProvider) {
|
|
|
13999
14027
|
if (entry) return buildContainerImage(entry.asset, cdkOutDir, {
|
|
14000
14028
|
architecture,
|
|
14001
14029
|
noBuild: options.build === false,
|
|
14002
|
-
assetOutdir: assetPathDirs(resolved.stack).assetOutdir
|
|
14030
|
+
assetOutdir: assetPathDirs(resolved.stack).assetOutdir,
|
|
14031
|
+
workload: {
|
|
14032
|
+
logicalId: resolved.logicalId,
|
|
14033
|
+
cdkPath: readCdkPathOrUndefined(resolved.resource)
|
|
14034
|
+
}
|
|
14003
14035
|
});
|
|
14004
14036
|
}
|
|
14005
14037
|
}
|
|
@@ -14009,7 +14041,11 @@ async function resolveAgentCoreImage(resolved, options, loaded, stateProvider) {
|
|
|
14009
14041
|
skipPull: options.pull === false,
|
|
14010
14042
|
...options.region !== void 0 && { region: options.region },
|
|
14011
14043
|
...options.ecrRoleArn !== void 0 && { ecrRoleArn: options.ecrRoleArn },
|
|
14012
|
-
...options.profile !== void 0 && { profile: options.profile }
|
|
14044
|
+
...options.profile !== void 0 && { profile: options.profile },
|
|
14045
|
+
workload: {
|
|
14046
|
+
logicalId: resolved.logicalId,
|
|
14047
|
+
cdkPath: readCdkPathOrUndefined(resolved.resource)
|
|
14048
|
+
}
|
|
14013
14049
|
});
|
|
14014
14050
|
}
|
|
14015
14051
|
await pullImage(containerUri, options.pull === false);
|
|
@@ -14059,7 +14095,11 @@ async function resolveAgentCoreCodeImageFromS3(resolved, code, s3Source, options
|
|
|
14059
14095
|
const bundle = await downloadAndExtractS3Bundle(location, {
|
|
14060
14096
|
...region !== void 0 && { region },
|
|
14061
14097
|
...options.profile !== void 0 && { profile: options.profile },
|
|
14062
|
-
...credentials !== void 0 && { credentials }
|
|
14098
|
+
...credentials !== void 0 && { credentials },
|
|
14099
|
+
workload: {
|
|
14100
|
+
logicalId: resolved.logicalId,
|
|
14101
|
+
cdkPath: readCdkPathOrUndefined(resolved.resource)
|
|
14102
|
+
}
|
|
14063
14103
|
});
|
|
14064
14104
|
try {
|
|
14065
14105
|
return await buildAgentCoreCodeImage({
|
|
@@ -15647,6 +15687,7 @@ async function prepareOneImage(task, container, options) {
|
|
|
15647
15687
|
return image.uri;
|
|
15648
15688
|
case "ecr": return pullEcrImage(image.uri, {
|
|
15649
15689
|
skipPull: options.skipPull,
|
|
15690
|
+
workload: { containerName: container.name },
|
|
15650
15691
|
...options.region !== void 0 && { region: options.region },
|
|
15651
15692
|
...options.ecrRoleArn !== void 0 && { ecrRoleArn: options.ecrRoleArn },
|
|
15652
15693
|
...options.profile !== void 0 && { profile: options.profile }
|
|
@@ -15676,7 +15717,8 @@ async function prepareOneImage(task, container, options) {
|
|
|
15676
15717
|
assetOutdir: assetPathDirs(task.stack).assetOutdir,
|
|
15677
15718
|
...options.platformOverride !== void 0 && { platform: options.platformOverride },
|
|
15678
15719
|
wrapError: (stderr) => new LocalInvokeBuildError(`docker build failed for ECS container ${displayIdent(container.name)} (${displayUntrustedValue(asset.source.directory ?? asset.source.executable?.[0] ?? "")}): ${stderr}`),
|
|
15679
|
-
progressLabel: `Building container image for ${displayIdent(container.name)}
|
|
15720
|
+
progressLabel: `Building container image for ${displayIdent(container.name)}`,
|
|
15721
|
+
workload: { containerName: container.name }
|
|
15680
15722
|
});
|
|
15681
15723
|
if (actualTag !== tag) try {
|
|
15682
15724
|
await runDockerStreaming([
|
|
@@ -15950,7 +15992,7 @@ function buildDockerRunArgs(opts) {
|
|
|
15950
15992
|
both("--entrypoint", container.entryPoint[0]);
|
|
15951
15993
|
entryPointTail = container.entryPoint.slice(1);
|
|
15952
15994
|
}
|
|
15953
|
-
both(image, ...entryPointTail, ...container.command ?? []);
|
|
15995
|
+
both(...noImplicitEcrPullArgs(image), image, ...entryPointTail, ...container.command ?? []);
|
|
15954
15996
|
const loopbackPorts = wiring ? effectiveLoopbackPorts(finalEnv, wiring) : [];
|
|
15955
15997
|
return {
|
|
15956
15998
|
args,
|
|
@@ -16790,7 +16832,7 @@ async function softReloadReplica(args) {
|
|
|
16790
16832
|
const defaultDockerInspectWorkdirImpl = async (containerId) => {
|
|
16791
16833
|
const { execFile } = await import("node:child_process");
|
|
16792
16834
|
const { promisify } = await import("node:util");
|
|
16793
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16835
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16794
16836
|
const { stdout } = await promisify(execFile)(getDockerCmd(), [
|
|
16795
16837
|
"inspect",
|
|
16796
16838
|
"--format",
|
|
@@ -16803,7 +16845,7 @@ let dockerInspectWorkdirImpl = defaultDockerInspectWorkdirImpl;
|
|
|
16803
16845
|
const defaultDockerCpImpl = async (src, dst) => {
|
|
16804
16846
|
const { execFile } = await import("node:child_process");
|
|
16805
16847
|
const { promisify } = await import("node:util");
|
|
16806
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16848
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16807
16849
|
await promisify(execFile)(getDockerCmd(), [
|
|
16808
16850
|
"cp",
|
|
16809
16851
|
src,
|
|
@@ -16814,19 +16856,19 @@ let dockerCpImpl = defaultDockerCpImpl;
|
|
|
16814
16856
|
const defaultDockerStopImpl = async (containerId) => {
|
|
16815
16857
|
const { execFile } = await import("node:child_process");
|
|
16816
16858
|
const { promisify } = await import("node:util");
|
|
16817
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16859
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16818
16860
|
await promisify(execFile)(getDockerCmd(), ["stop", containerId]);
|
|
16819
16861
|
};
|
|
16820
16862
|
const defaultDockerStartImpl = async (containerId, opts = {}) => {
|
|
16821
16863
|
const { execFile } = await import("node:child_process");
|
|
16822
16864
|
const { promisify } = await import("node:util");
|
|
16823
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16865
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16824
16866
|
await promisify(execFile)(getDockerCmd(), ["start", containerId]);
|
|
16825
16867
|
if (opts.joinedForwarder) return;
|
|
16826
|
-
const { getActiveWorkloadAwsWiring } = await import("./workload-identity-
|
|
16868
|
+
const { getActiveWorkloadAwsWiring } = await import("./workload-identity-BONcukjU.js").then((n) => n.B);
|
|
16827
16869
|
const wiring = getActiveWorkloadAwsWiring();
|
|
16828
16870
|
if (wiring) {
|
|
16829
|
-
const { attachLoopbackForwarder } = await import("./docker-runner-
|
|
16871
|
+
const { attachLoopbackForwarder } = await import("./docker-runner-3CL99fDP.js").then((n) => n.o);
|
|
16830
16872
|
await attachLoopbackForwarder(containerId, wiring);
|
|
16831
16873
|
}
|
|
16832
16874
|
};
|
|
@@ -16896,7 +16938,7 @@ async function attachToSharedNetwork(plan, withAliases) {
|
|
|
16896
16938
|
const defaultDockerNetworkConnectImpl = async (networkName, containerId, opts) => {
|
|
16897
16939
|
const { execFile } = await import("node:child_process");
|
|
16898
16940
|
const { promisify } = await import("node:util");
|
|
16899
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16941
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16900
16942
|
const args = ["network", "connect"];
|
|
16901
16943
|
if (opts.ip) args.push("--ip", opts.ip);
|
|
16902
16944
|
for (const a of opts.aliases) args.push("--alias", a);
|
|
@@ -16907,7 +16949,7 @@ let dockerNetworkConnectImpl = defaultDockerNetworkConnectImpl;
|
|
|
16907
16949
|
const defaultDockerInspectPublishesHostPortsImpl = async (containerId) => {
|
|
16908
16950
|
const { execFile } = await import("node:child_process");
|
|
16909
16951
|
const { promisify } = await import("node:util");
|
|
16910
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16952
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16911
16953
|
const { stdout } = await promisify(execFile)(getDockerCmd(), [
|
|
16912
16954
|
"inspect",
|
|
16913
16955
|
"--format",
|
|
@@ -16946,7 +16988,7 @@ async function disconnectOldFromSharedNetwork(oldInstance, opts = {}) {
|
|
|
16946
16988
|
const defaultDockerNetworkDisconnectImpl = async (networkName, containerId) => {
|
|
16947
16989
|
const { execFile } = await import("node:child_process");
|
|
16948
16990
|
const { promisify } = await import("node:util");
|
|
16949
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
16991
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
16950
16992
|
await promisify(execFile)(getDockerCmd(), [
|
|
16951
16993
|
"network",
|
|
16952
16994
|
"disconnect",
|
|
@@ -17037,7 +17079,7 @@ const LISTEN_PROBE_SCRIPT = [
|
|
|
17037
17079
|
async function dockerExecListenProbe(containerId, port, timeoutMs = 1e4) {
|
|
17038
17080
|
const { execFile } = await import("node:child_process");
|
|
17039
17081
|
const { promisify } = await import("node:util");
|
|
17040
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
17082
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
17041
17083
|
try {
|
|
17042
17084
|
await promisify(execFile)(getDockerCmd(), [
|
|
17043
17085
|
"exec",
|
|
@@ -17191,7 +17233,7 @@ function pickEssentialContainerId(instance, service) {
|
|
|
17191
17233
|
const defaultWaitForExitImpl = async (containerId) => {
|
|
17192
17234
|
const { execFile } = await import("node:child_process");
|
|
17193
17235
|
const { promisify } = await import("node:util");
|
|
17194
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
17236
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
17195
17237
|
const { stdout } = await promisify(execFile)(getDockerCmd(), ["wait", containerId], { maxBuffer: 1024 * 1024 });
|
|
17196
17238
|
const code = parseInt(stdout.trim(), 10);
|
|
17197
17239
|
return Number.isFinite(code) ? code : -1;
|
|
@@ -17201,7 +17243,7 @@ const EXIT_LOG_TAIL_LINES = 50;
|
|
|
17201
17243
|
const defaultReadContainerLogsImpl = async (containerId) => {
|
|
17202
17244
|
const { execFile } = await import("node:child_process");
|
|
17203
17245
|
const { promisify } = await import("node:util");
|
|
17204
|
-
const { getDockerCmd } = await import("./docker-cmd-
|
|
17246
|
+
const { getDockerCmd } = await import("./docker-cmd-6JZnWXBN.js").then((n) => n.t);
|
|
17205
17247
|
const { stdout, stderr } = await promisify(execFile)(getDockerCmd(), [
|
|
17206
17248
|
"logs",
|
|
17207
17249
|
"--tail",
|
|
@@ -18605,7 +18647,11 @@ async function resolveContainerImagePlan(lambda, opts) {
|
|
|
18605
18647
|
if (entry) {
|
|
18606
18648
|
imageRef = await buildContainerImage(entry.asset, cdkOutDir, {
|
|
18607
18649
|
architecture: lambda.architecture,
|
|
18608
|
-
assetOutdir: assetPathDirs(lambda.stack).assetOutdir
|
|
18650
|
+
assetOutdir: assetPathDirs(lambda.stack).assetOutdir,
|
|
18651
|
+
workload: {
|
|
18652
|
+
logicalId: lambda.logicalId,
|
|
18653
|
+
cdkPath: readCdkPathOrUndefined(lambda.resource)
|
|
18654
|
+
}
|
|
18609
18655
|
});
|
|
18610
18656
|
localBuilt = true;
|
|
18611
18657
|
}
|
|
@@ -18615,6 +18661,10 @@ async function resolveContainerImagePlan(lambda, opts) {
|
|
|
18615
18661
|
logger.info(`No matching cdk.out asset for ${displayUntrustedValue(lambda.imageUri)}; falling back to ECR pull...`);
|
|
18616
18662
|
imageRef = await pullEcrImage(lambda.imageUri, {
|
|
18617
18663
|
skipPull: opts.skipPull === true,
|
|
18664
|
+
workload: {
|
|
18665
|
+
logicalId: lambda.logicalId,
|
|
18666
|
+
cdkPath: readCdkPathOrUndefined(lambda.resource)
|
|
18667
|
+
},
|
|
18618
18668
|
...opts.region !== void 0 && { region: opts.region },
|
|
18619
18669
|
...opts.ecrRoleArn !== void 0 && { ecrRoleArn: opts.ecrRoleArn }
|
|
18620
18670
|
});
|
|
@@ -32193,4 +32243,4 @@ function addStudioSpecificOptions(cmd) {
|
|
|
32193
32243
|
|
|
32194
32244
|
//#endregion
|
|
32195
32245
|
export { postHook as $, withoutKeys as $a, buildConnectEvent as $i, addImageOverrideOptions as $n, addStartApiSpecificOptions as $r, classifyS3Error as $t, microvmFidelityWarnings as A, filterWebSocketApisByIdentifiers as Aa, buildCorsConfigByApiId as Ai, stripCloudFrontImport as An, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, AGENTCORE_RUNTIME_TYPE as Ba, pickResponseTemplate as Bi, createLocalStartAlbCommand as Bn, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, resolveWatchConfig as Ca, buildMethodArn as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, availableWebSocketApiIdentifiers as Da, invokeTokenAuthorizer as Di, compileCloudFrontFunction as Dn, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, listTargets as Ea, invokeRequestAuthorizer as Ei, resolveWebFunctionTarget as En, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, resolveLambdaArnIntrinsic as Fa, translateLambdaResponse as Fi, findFileAssetForObjectKey as Fn, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, DynamicReferenceResolver as Ga, HOST_GATEWAY_MIN_VERSION as Gi, addStartServiceSpecificOptions as Gn, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, pickAgentCoreCandidateStack as Ha, tryParseStatus as Hi, resolveAlbTarget as Hn, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, AGENTCORE_A2A_PROTOCOL as Ia, applyAuthorizerOverlay as Ii, isBucketDeploymentResource as In, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, firstUsableRegion as Ja, bufferToBody as Ji, addRunTaskSpecificOptions as Jn, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, containsDynamicReference as Ka, probeHostGatewaySupport as Ki, createLocalStartServiceCommand as Kn, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, AGENTCORE_AGUI_PROTOCOL as La, buildHttpApiV2Event as Li, resolveBucketDeploymentObjectKey as Ln, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, webSocketApiMatchesIdentifier as Ma, isFunctionUrlOacFronted as Mi, createLocalFileKvsDataSource as Mn, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, discoverRoutes as Na, matchPreflight as Ni, createUnboundCloudFrontModule as Nn, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, discoverWebSocketApis as Oa, attachAuthorizers as Oi, runViewerRequest as On, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, pickRefLogicalId as Pa, matchRoute as Pi, bucketDeploymentSourceObjectKeys as Pn, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, resolveDynamicReferencesInEnv as Qa, parseConnectionsPath as Qi, addEcsAssumeRoleOptions as Qn, createLocalInvokeCommand as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, AGENTCORE_HTTP_PROTOCOL as Ra, buildRestV1Event as Ri, addAlbSpecificOptions as Rn, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, resolveSsmParameters as Sa, verifyJwtViaDiscovery as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, countTargets as Ta, evaluateCachedLambdaPolicy as Ti, WebFunctionResolutionError as Tn, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, resolveAgentCoreTarget as Ua, VtlEvaluationError as Ui, isApplicationLoadBalancer as Un, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, AgentCoreResolutionError as Va, selectIntegrationResponse as Vi, parseLbPortOverrides as Vn, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, DynamicReferenceResolutionError as Wa, HOST_DOCKER_INTERNAL_GATEWAY as Wi, resolveAlbFrontDoor as Wn, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, keysOverriddenBy as Xa, buildMgmtEndpointEnvUrl as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, classifySourceChange as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, keysNotFromTemplate as Ya, ConnectionRegistry as Yi, createLocalRunTaskCommand as Yn, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, parseDynamicReference as Za, handleConnectionsRequest as Zi, addCommonEcsServiceOptions as Zn, addInvokeSpecificOptions as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, resolveCfnFallbackRegion as _a, buildCognitoJwksUrl as _i, pickKvsLogicalIdFromArn as _n, isLocalCdkAssetImage as _r, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, EcsTaskResolutionError as aa, attachStageContext as ai, serveLambdaUrlOrigin as an, resolveSharedSidecarCredentials as ar, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, CfnLocalStateProvider as ba, verifyCognitoJwt as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, CloudMapRegistry as br, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, substituteAgainstStateAsync as ca, availableApiIdentifiers as ci, buildEdgeRequestEvent as cn, buildImageOverrideTag as cr, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, LocalStateSourceError as da, groupRoutesByServer as di, httpHeadersToEdge as dn, mergeForService as dr, createLocalStartWebFunctionCommand as dt, buildDisconnectEvent as ea, createLocalStartApiCommand as ei, createS3OriginReader as en, addAwsEndpointOptions as eo, buildEcsImageResolutionContext$1 as er, runHookBody as et, filterStudioCustomResources as f, UNNAMED_WORKLOAD as fa, readMtlsMaterialsFromDisk as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, parseImageOverrideFlags as fr, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, rejectExplicitCfnStackWithMultipleStacks as ga, defaultCredentialsLoader as gi, pickFunctionUrlLogicalIdFromOrigin as gn, imageOverrideKeyAliases as gr, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, isCfnFlagPresent as ha, resolveServiceIntegrationParameters as hi, isCloudFrontDistribution as hn, describePinnedImageUri as hr, selectServeInboundAuth as ht, coerceStopRequest as i, resolveRuntimeImage as ia, createFileWatcher as ii, serveFromStaticOrigin as in, resolveEcsAssumeRoleOption as ir, MicrovmResolutionError as it, readRunHookPayload as j, parseSelectionExpressionPath as ja, buildCorsConfigFromCloudFrontChain as ji, createCloudFrontModule as jn, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, discoverWebSocketApisOrThrow as ka, applyCorsResponseHeaders as ki, runViewerResponse as kn, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, substituteEnvVarsFromState as la, filterRoutesByApiIdentifier as li, buildEdgeResponseEvent as ln, canonicalizeImageOverrideKeys as lr, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, groupWorkloadsRoutedApart as ma, resolveSelectionExpression as mi, extractKvsAssociations as mn, runImageOverrideBuilds as mr, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, resolveRuntimeCodeMountPath as na, resolveApiTargetSubset as ni, startCloudFrontServer as nn, parseMaxTasks as nr, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, assertEcsTaskImagesResolvable as oa, buildStageMap as oi, applyEdgeRequestResult as on, runEcsServiceEmulator as or, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, createLocalStateProvider as pa, startApiServer as pi, describeS3OriginDomain as pn, resolveImageOverrides as pr, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, deployedFillMayBeSecret as qa, resolveHostGatewayExtraHosts as qi, serviceStrategy as qn, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, resolveRuntimeFileExtension as ra, createAuthorizerCache as ri, resolveErrorResponseCandidates as rn, parseRestartPolicy as rr, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, substituteAgainstState as sa, materializeLayerFromArn as si, applyEdgeResponseResult as sn, ImageOverrideError as sr, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, buildMessageEvent as ta, createWatchPredicates as ti, matchBehavior as tn, awsEndpointOptions as to, ecsClusterOption as tr, waitForAppAnswer as tt, reinvoke as u, substituteEnvVarsFromStateAsync as ua, filterRoutesByApiIdentifiers as ui, edgeHeadersToHttp as un, enforceImageOverrideOrphans as ur, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveCfnRegion as va, buildJwksUrlFromIssuer as vi, pickLambdaEdgeFunctionLogicalId as vn, listPinnedTargets as vr, startAgentCoreWsBridge as vt, createLocalListCommand as w, resolveSingleTarget as wa, computeRequestIdentityHash as wi, WEB_FUNCTION_TYPE as wn, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, collectSsmParameterRefs as xa, verifyJwtAuthorizer as xi, resolveCloudFrontDistribution as xn, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, resolveCfnStackName as ya, createJwksCache as yi, pickTargetFunctionLogicalId as yn, buildCloudMapIndex as yr, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, AGENTCORE_MCP_PROTOCOL as za, evaluateResponseParameters as zi, albStrategy as zn, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
|
|
32196
|
-
//# sourceMappingURL=local-studio-
|
|
32246
|
+
//# sourceMappingURL=local-studio-CMq3n7mt.js.map
|