aws-cdk 2.1118.2 → 2.1118.4
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/THIRD_PARTY_LICENSES +1 -1
- package/build-info.json +2 -2
- package/lib/cli/cdk-toolkit.js +5 -8
- package/lib/index.js +150 -101
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -216,6 +216,8 @@ var init_metadata_schema = __esm({
|
|
|
216
216
|
ArtifactMetadataEntryType7["LOGICAL_ID"] = "aws:cdk:logicalId";
|
|
217
217
|
ArtifactMetadataEntryType7["STACK_TAGS"] = "aws:cdk:stack-tags";
|
|
218
218
|
ArtifactMetadataEntryType7["DO_NOT_REFACTOR"] = "aws:cdk:do-not-refactor";
|
|
219
|
+
ArtifactMetadataEntryType7["CREATION_STACK"] = "aws:cdk:creationStack";
|
|
220
|
+
ArtifactMetadataEntryType7["PROPERTY_ASSIGNMENT"] = "aws:cdk:propertyAssignment";
|
|
219
221
|
return ArtifactMetadataEntryType7;
|
|
220
222
|
})(ArtifactMetadataEntryType || {});
|
|
221
223
|
}
|
|
@@ -3599,7 +3601,7 @@ var require_semver2 = __commonJS({
|
|
|
3599
3601
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
3600
3602
|
var require_cli_version = __commonJS({
|
|
3601
3603
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
3602
|
-
module2.exports = { version: "2.1118.
|
|
3604
|
+
module2.exports = { version: "2.1118.4" };
|
|
3603
3605
|
}
|
|
3604
3606
|
});
|
|
3605
3607
|
|
|
@@ -4024,10 +4026,20 @@ have a unique display name. (Default - no display name)`,
|
|
|
4024
4026
|
{
|
|
4025
4027
|
$ref: "#/definitions/ContainerImageAssetMetadataEntry"
|
|
4026
4028
|
},
|
|
4029
|
+
{
|
|
4030
|
+
$ref: "#/definitions/PropertyMutationMetadataEntry"
|
|
4031
|
+
},
|
|
4027
4032
|
{
|
|
4028
4033
|
type: "array",
|
|
4029
4034
|
items: {
|
|
4030
|
-
|
|
4035
|
+
anyOf: [
|
|
4036
|
+
{
|
|
4037
|
+
$ref: "#/definitions/Tag"
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
type: "string"
|
|
4041
|
+
}
|
|
4042
|
+
]
|
|
4031
4043
|
}
|
|
4032
4044
|
},
|
|
4033
4045
|
{
|
|
@@ -4225,6 +4237,27 @@ have a unique display name. (Default - no display name)`,
|
|
|
4225
4237
|
"type"
|
|
4226
4238
|
]
|
|
4227
4239
|
},
|
|
4240
|
+
PropertyMutationMetadataEntry: {
|
|
4241
|
+
description: "Metadata type of a PropertyMutation",
|
|
4242
|
+
type: "object",
|
|
4243
|
+
properties: {
|
|
4244
|
+
propertyName: {
|
|
4245
|
+
description: "Name of the property",
|
|
4246
|
+
type: "string"
|
|
4247
|
+
},
|
|
4248
|
+
stackTrace: {
|
|
4249
|
+
description: "Stack trace of the mutation",
|
|
4250
|
+
type: "array",
|
|
4251
|
+
items: {
|
|
4252
|
+
type: "string"
|
|
4253
|
+
}
|
|
4254
|
+
}
|
|
4255
|
+
},
|
|
4256
|
+
required: [
|
|
4257
|
+
"propertyName",
|
|
4258
|
+
"stackTrace"
|
|
4259
|
+
]
|
|
4260
|
+
},
|
|
4228
4261
|
Tag: {
|
|
4229
4262
|
description: "Metadata Entry spec for stack tag.",
|
|
4230
4263
|
type: "object",
|
|
@@ -5605,7 +5638,7 @@ var require_integ_schema = __commonJS({
|
|
|
5605
5638
|
var require_version = __commonJS({
|
|
5606
5639
|
"../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
|
|
5607
5640
|
module2.exports = {
|
|
5608
|
-
schemaHash: "
|
|
5641
|
+
schemaHash: "cf2452236640f556f1b81778515335af1c6bbdb54c7ef12dad43f8cf6a56ddee",
|
|
5609
5642
|
$comment: "Do not hold back the version on additions: jsonschema validation of the manifest by the consumer will trigger errors on unexpected fields.",
|
|
5610
5643
|
revision: 53
|
|
5611
5644
|
};
|
|
@@ -128971,7 +129004,7 @@ var init_filter = __esm({
|
|
|
128971
129004
|
const matched = ands.map((affected) => actualComponents.filter((actual) => this.componentNameMatches(affected, actual) && semver3.satisfies(actual.version, affected.version, { includePrerelease: true })));
|
|
128972
129005
|
if (matched.every((xs) => xs.length > 0)) {
|
|
128973
129006
|
const ret = new FilteredNotice(notice);
|
|
128974
|
-
this.addDynamicValues(matched.flatMap((x6) => x6), ret);
|
|
129007
|
+
this.addDynamicValues(matched.flatMap((x6) => x6), ret, notice.dynamicValues);
|
|
128975
129008
|
return [ret];
|
|
128976
129009
|
}
|
|
128977
129010
|
}
|
|
@@ -128991,9 +129024,9 @@ var init_filter = __esm({
|
|
|
128991
129024
|
* Adds dynamic values from the given ActualComponents
|
|
128992
129025
|
*
|
|
128993
129026
|
* If there are multiple components with the same dynamic name, they are joined
|
|
128994
|
-
* by
|
|
129027
|
+
* by the separator declared in `specs[name].separator`, defaulting to `','`.
|
|
128995
129028
|
*/
|
|
128996
|
-
addDynamicValues(comps, notice) {
|
|
129029
|
+
addDynamicValues(comps, notice, specs) {
|
|
128997
129030
|
const dynamicValues = {};
|
|
128998
129031
|
for (const comp of comps) {
|
|
128999
129032
|
if (comp.dynamicName) {
|
|
@@ -129002,7 +129035,7 @@ var init_filter = __esm({
|
|
|
129002
129035
|
}
|
|
129003
129036
|
}
|
|
129004
129037
|
for (const [key, values] of Object.entries(dynamicValues)) {
|
|
129005
|
-
notice.addDynamicValue(key, values.join(","));
|
|
129038
|
+
notice.addDynamicValue(key, values.join(specs?.[key]?.separator ?? ","));
|
|
129006
129039
|
}
|
|
129007
129040
|
}
|
|
129008
129041
|
/**
|
|
@@ -311422,6 +311455,7 @@ var init_stack_refresh = __esm({
|
|
|
311422
311455
|
timeout;
|
|
311423
311456
|
lastRefreshTime;
|
|
311424
311457
|
queuedPromises = [];
|
|
311458
|
+
stopped = false;
|
|
311425
311459
|
start() {
|
|
311426
311460
|
this.timeout = setTimeout(() => this.refresh(), 3e5);
|
|
311427
311461
|
}
|
|
@@ -311434,6 +311468,9 @@ var init_stack_refresh = __esm({
|
|
|
311434
311468
|
qualifier: this.props.qualifier
|
|
311435
311469
|
});
|
|
311436
311470
|
this.justRefreshedStacks();
|
|
311471
|
+
if (this.stopped) {
|
|
311472
|
+
return;
|
|
311473
|
+
}
|
|
311437
311474
|
this.timeout = setTimeout(() => this.refresh(), Math.max(startTime + 3e5 - Date.now(), 0));
|
|
311438
311475
|
}
|
|
311439
311476
|
justRefreshedStacks() {
|
|
@@ -311458,6 +311495,7 @@ var init_stack_refresh = __esm({
|
|
|
311458
311495
|
]);
|
|
311459
311496
|
}
|
|
311460
311497
|
stop() {
|
|
311498
|
+
this.stopped = true;
|
|
311461
311499
|
clearTimeout(this.timeout);
|
|
311462
311500
|
}
|
|
311463
311501
|
};
|
|
@@ -315350,12 +315388,19 @@ function resourceMoves(before, after, direction = "direct", ignoreModifications
|
|
|
315350
315388
|
const digestsAfter = resourceDigests(after, direction);
|
|
315351
315389
|
if (!(ignoreModifications || isomorphic(digestsBefore, digestsAfter))) {
|
|
315352
315390
|
const message2 = ["A refactor operation cannot add, remove or update resources. Only resource moves and renames are allowed."];
|
|
315353
|
-
const
|
|
315354
|
-
return Array.from(setDiff(new Set(Object.keys(a6)), new Set(Object.keys(b6)))).flatMap((k6) => a6[k6])
|
|
315355
|
-
}, "
|
|
315391
|
+
const locationsForDigests = /* @__PURE__ */ __name((a6, b6) => {
|
|
315392
|
+
return Array.from(setDiff(new Set(Object.keys(a6)), new Set(Object.keys(b6)))).flatMap((k6) => a6[k6]);
|
|
315393
|
+
}, "locationsForDigests");
|
|
315394
|
+
const formatList = /* @__PURE__ */ __name((locs, icon) => locs.map((x6) => ` [${icon}] ${x6.toPath()}`).sort().join("\n"), "formatList");
|
|
315356
315395
|
const stackNames = /* @__PURE__ */ __name((stacks) => stacks.length === 0 ? "NONE" : stacks.map((s6) => s6.stackName).sort().join(", "), "stackNames");
|
|
315357
|
-
const
|
|
315358
|
-
const
|
|
315396
|
+
const onlyDeployedLocs = locationsForDigests(digestsBefore, digestsAfter);
|
|
315397
|
+
const onlyLocalLocs = locationsForDigests(digestsAfter, digestsBefore);
|
|
315398
|
+
const onlyDeployedPaths = new Set(onlyDeployedLocs.map((l6) => l6.toPath()));
|
|
315399
|
+
const onlyLocalPaths = new Set(onlyLocalLocs.map((l6) => l6.toPath()));
|
|
315400
|
+
const differentPaths = new Set(Array.from(onlyDeployedPaths).filter((p6) => onlyLocalPaths.has(p6)));
|
|
315401
|
+
const onlyDeployed = formatList(onlyDeployedLocs.filter((l6) => !differentPaths.has(l6.toPath())), "-");
|
|
315402
|
+
const onlyLocal = formatList(onlyLocalLocs.filter((l6) => !differentPaths.has(l6.toPath())), "+");
|
|
315403
|
+
const different = formatList([...onlyDeployedLocs, ...onlyLocalLocs].filter((l6) => differentPaths.has(l6.toPath())), "~");
|
|
315359
315404
|
if (onlyDeployed.length > 0) {
|
|
315360
315405
|
message2.push(`The following resources are present only in the AWS environment:
|
|
315361
315406
|
${onlyDeployed}`);
|
|
@@ -315364,6 +315409,11 @@ ${onlyDeployed}`);
|
|
|
315364
315409
|
message2.push(`
|
|
315365
315410
|
The following resources are present only in your CDK application:
|
|
315366
315411
|
${onlyLocal}`);
|
|
315412
|
+
}
|
|
315413
|
+
if (different.length > 0) {
|
|
315414
|
+
message2.push(`
|
|
315415
|
+
The following resources are different in your CDK application and the AWS environment:
|
|
315416
|
+
${different}`);
|
|
315367
315417
|
}
|
|
315368
315418
|
message2.push("");
|
|
315369
315419
|
message2.push("The following stacks were used in the comparison:");
|
|
@@ -316952,11 +317002,6 @@ var init_toolkit = __esm({
|
|
|
316952
317002
|
deploymentMethod: options.deploymentMethod,
|
|
316953
317003
|
cleanupOnNoOp: isExecutingChangeSetDeployment(options.deploymentMethod)
|
|
316954
317004
|
}) : void 0;
|
|
316955
|
-
if (prepareResult?.noOp === true) {
|
|
316956
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I5900.msg(chalk25.green(`
|
|
316957
|
-
\u2705 ${stack.displayName} (no changes)`), prepareResult));
|
|
316958
|
-
return;
|
|
316959
|
-
}
|
|
316960
317005
|
const formatter = new DiffFormatter({
|
|
316961
317006
|
templateInfo: {
|
|
316962
317007
|
oldTemplate: currentTemplate,
|
|
@@ -316994,7 +317039,7 @@ Do you wish to deploy these changes`;
|
|
|
316994
317039
|
deploySpan.incCounter("resources", resourceCount);
|
|
316995
317040
|
let deployDuration;
|
|
316996
317041
|
try {
|
|
316997
|
-
const prepareIsFinal = isNonExecutingChangeSetDeployment(options.deploymentMethod);
|
|
317042
|
+
const prepareIsFinal = prepareResult && (prepareResult.noOp || isNonExecutingChangeSetDeployment(options.deploymentMethod));
|
|
316998
317043
|
let deployResult = prepareIsFinal ? prepareResult : void 0;
|
|
316999
317044
|
let rollback = options.rollback;
|
|
317000
317045
|
let iteration = 0;
|
|
@@ -317075,10 +317120,9 @@ ${deployResult.stackArn}`));
|
|
|
317075
317120
|
hierarchicalId: stack.hierarchicalId
|
|
317076
317121
|
});
|
|
317077
317122
|
} catch (e6) {
|
|
317078
|
-
|
|
317079
|
-
|
|
317080
|
-
|
|
317081
|
-
);
|
|
317123
|
+
const code = ToolkitError.isToolkitError(e6) ? e6.name : "DeployStackFailed";
|
|
317124
|
+
const newMessage = [`\u274C ${chalk25.bold(stack.stackName)} failed:`, ...e6.name ? [`${e6.name}:`] : [], e6.message].join(" ");
|
|
317125
|
+
throw new ToolkitError(code, newMessage);
|
|
317082
317126
|
} finally {
|
|
317083
317127
|
if (options.traceLogs) {
|
|
317084
317128
|
const cloudWatchLogMonitor = options.cloudWatchLogMonitor ?? new CloudWatchLogEventMonitor({ ioHelper });
|
|
@@ -324603,10 +324647,6 @@ var init_cdk_toolkit = __esm({
|
|
|
324603
324647
|
deploymentMethod: options.deploymentMethod,
|
|
324604
324648
|
cleanupOnNoOp: isExecutingChangeSetDeployment(options.deploymentMethod)
|
|
324605
324649
|
}) : void 0;
|
|
324606
|
-
if (prepareResult?.noOp === true) {
|
|
324607
|
-
await this.ioHost.asIoHelper().defaults.info(" \u2705 %s (no changes)", chalk31.bold(stack.displayName));
|
|
324608
|
-
return;
|
|
324609
|
-
}
|
|
324610
324650
|
if (requireApproval !== import_cloud_assembly_schema7.RequireApproval.NEVER) {
|
|
324611
324651
|
const currentTemplate = await this.props.deployments.readCurrentTemplate(stack);
|
|
324612
324652
|
const formatter = new DiffFormatter({
|
|
@@ -324648,7 +324688,7 @@ var init_cdk_toolkit = __esm({
|
|
|
324648
324688
|
let error4;
|
|
324649
324689
|
let elapsedDeployTime = 0;
|
|
324650
324690
|
try {
|
|
324651
|
-
const prepareIsFinal = prepareResult && isNonExecutingChangeSetDeployment(options.deploymentMethod);
|
|
324691
|
+
const prepareIsFinal = prepareResult && (prepareResult.noOp || isNonExecutingChangeSetDeployment(options.deploymentMethod));
|
|
324652
324692
|
let deployResult = prepareIsFinal ? prepareResult : void 0;
|
|
324653
324693
|
let rollback = options.rollback;
|
|
324654
324694
|
let iteration = 0;
|
|
@@ -324725,10 +324765,9 @@ var init_cdk_toolkit = __esm({
|
|
|
324725
324765
|
await this.ioHost.asIoHelper().defaults.info("Stack ARN:");
|
|
324726
324766
|
await this.ioHost.asIoHelper().defaults.result(deployResult.stackArn);
|
|
324727
324767
|
} catch (e6) {
|
|
324728
|
-
const
|
|
324729
|
-
|
|
324730
|
-
|
|
324731
|
-
);
|
|
324768
|
+
const code = import_toolkit_lib18.ToolkitError.isToolkitError(e6) ? e6.name : "DeployStackFailed";
|
|
324769
|
+
const newMessage = [`\u274C ${chalk31.bold(stack.stackName)} failed:`, ...e6.name ? [`${e6.name}:`] : [], e6.message].join(" ");
|
|
324770
|
+
const wrappedError = new import_toolkit_lib18.ToolkitError(code, newMessage);
|
|
324732
324771
|
error4 = {
|
|
324733
324772
|
name: cdkCliErrorName(wrappedError)
|
|
324734
324773
|
};
|
|
@@ -338418,6 +338457,61 @@ Closing reason: ${this._closingError.stack}`;
|
|
|
338418
338457
|
}
|
|
338419
338458
|
});
|
|
338420
338459
|
|
|
338460
|
+
// ../../node_modules/basic-ftp/dist/netUtils.js
|
|
338461
|
+
var require_netUtils = __commonJS({
|
|
338462
|
+
"../../node_modules/basic-ftp/dist/netUtils.js"(exports2) {
|
|
338463
|
+
"use strict";
|
|
338464
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
338465
|
+
exports2.describeTLS = describeTLS;
|
|
338466
|
+
exports2.describeAddress = describeAddress;
|
|
338467
|
+
exports2.upgradeSocket = upgradeSocket;
|
|
338468
|
+
exports2.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
338469
|
+
var tls_1 = require("tls");
|
|
338470
|
+
function describeTLS(socket) {
|
|
338471
|
+
if (socket instanceof tls_1.TLSSocket) {
|
|
338472
|
+
const protocol = socket.getProtocol();
|
|
338473
|
+
return protocol ? protocol : "Server socket or disconnected client socket";
|
|
338474
|
+
}
|
|
338475
|
+
return "No encryption";
|
|
338476
|
+
}
|
|
338477
|
+
__name(describeTLS, "describeTLS");
|
|
338478
|
+
function describeAddress(socket) {
|
|
338479
|
+
if (socket.remoteFamily === "IPv6") {
|
|
338480
|
+
return `[${socket.remoteAddress}]:${socket.remotePort}`;
|
|
338481
|
+
}
|
|
338482
|
+
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
338483
|
+
}
|
|
338484
|
+
__name(describeAddress, "describeAddress");
|
|
338485
|
+
function upgradeSocket(socket, options) {
|
|
338486
|
+
return new Promise((resolve15, reject) => {
|
|
338487
|
+
const tlsOptions = Object.assign({}, options, {
|
|
338488
|
+
socket
|
|
338489
|
+
});
|
|
338490
|
+
const tlsSocket = (0, tls_1.connect)(tlsOptions, () => {
|
|
338491
|
+
const expectCertificate = tlsOptions.rejectUnauthorized !== false;
|
|
338492
|
+
if (expectCertificate && !tlsSocket.authorized) {
|
|
338493
|
+
reject(tlsSocket.authorizationError);
|
|
338494
|
+
} else {
|
|
338495
|
+
tlsSocket.removeAllListeners("error");
|
|
338496
|
+
resolve15(tlsSocket);
|
|
338497
|
+
}
|
|
338498
|
+
}).once("error", (error4) => {
|
|
338499
|
+
reject(error4);
|
|
338500
|
+
});
|
|
338501
|
+
});
|
|
338502
|
+
}
|
|
338503
|
+
__name(upgradeSocket, "upgradeSocket");
|
|
338504
|
+
function ipIsPrivateV4Address(ip = "") {
|
|
338505
|
+
if (ip.startsWith("::ffff:")) {
|
|
338506
|
+
ip = ip.substr(7);
|
|
338507
|
+
}
|
|
338508
|
+
const octets = ip.split(".").map((o6) => parseInt(o6, 10));
|
|
338509
|
+
return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip === "127.0.0.1";
|
|
338510
|
+
}
|
|
338511
|
+
__name(ipIsPrivateV4Address, "ipIsPrivateV4Address");
|
|
338512
|
+
}
|
|
338513
|
+
});
|
|
338514
|
+
|
|
338421
338515
|
// ../../node_modules/basic-ftp/dist/FileInfo.js
|
|
338422
338516
|
var require_FileInfo = __commonJS({
|
|
338423
338517
|
"../../node_modules/basic-ftp/dist/FileInfo.js"(exports2) {
|
|
@@ -338954,81 +339048,33 @@ var require_StringWriter = __commonJS({
|
|
|
338954
339048
|
static {
|
|
338955
339049
|
__name(this, "StringWriter");
|
|
338956
339050
|
}
|
|
338957
|
-
constructor() {
|
|
338958
|
-
super(
|
|
338959
|
-
this.
|
|
339051
|
+
constructor(maxByteLength = 1 * 1024 * 1024) {
|
|
339052
|
+
super();
|
|
339053
|
+
this.maxByteLength = maxByteLength;
|
|
339054
|
+
this.byteLength = 0;
|
|
339055
|
+
this.bufs = [];
|
|
338960
339056
|
}
|
|
338961
339057
|
_write(chunk, _2, callback) {
|
|
338962
|
-
if (chunk instanceof Buffer) {
|
|
338963
|
-
|
|
338964
|
-
|
|
338965
|
-
}
|
|
338966
|
-
|
|
339058
|
+
if (!(chunk instanceof Buffer)) {
|
|
339059
|
+
callback(new Error("StringWriter: expects chunks of type 'Buffer'."));
|
|
339060
|
+
return;
|
|
339061
|
+
}
|
|
339062
|
+
if (this.byteLength + chunk.byteLength > this.maxByteLength) {
|
|
339063
|
+
callback(new Error(`StringWriter: Maximum bytes exceeded, maxByteLength=${this.maxByteLength}.`));
|
|
339064
|
+
return;
|
|
338967
339065
|
}
|
|
339066
|
+
this.byteLength += chunk.byteLength;
|
|
339067
|
+
this.bufs.push(chunk);
|
|
339068
|
+
callback(null);
|
|
338968
339069
|
}
|
|
338969
339070
|
getText(encoding) {
|
|
338970
|
-
return this.
|
|
339071
|
+
return Buffer.concat(this.bufs).toString(encoding);
|
|
338971
339072
|
}
|
|
338972
339073
|
};
|
|
338973
339074
|
exports2.StringWriter = StringWriter;
|
|
338974
339075
|
}
|
|
338975
339076
|
});
|
|
338976
339077
|
|
|
338977
|
-
// ../../node_modules/basic-ftp/dist/netUtils.js
|
|
338978
|
-
var require_netUtils = __commonJS({
|
|
338979
|
-
"../../node_modules/basic-ftp/dist/netUtils.js"(exports2) {
|
|
338980
|
-
"use strict";
|
|
338981
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
338982
|
-
exports2.describeTLS = describeTLS;
|
|
338983
|
-
exports2.describeAddress = describeAddress;
|
|
338984
|
-
exports2.upgradeSocket = upgradeSocket;
|
|
338985
|
-
exports2.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
338986
|
-
var tls_1 = require("tls");
|
|
338987
|
-
function describeTLS(socket) {
|
|
338988
|
-
if (socket instanceof tls_1.TLSSocket) {
|
|
338989
|
-
const protocol = socket.getProtocol();
|
|
338990
|
-
return protocol ? protocol : "Server socket or disconnected client socket";
|
|
338991
|
-
}
|
|
338992
|
-
return "No encryption";
|
|
338993
|
-
}
|
|
338994
|
-
__name(describeTLS, "describeTLS");
|
|
338995
|
-
function describeAddress(socket) {
|
|
338996
|
-
if (socket.remoteFamily === "IPv6") {
|
|
338997
|
-
return `[${socket.remoteAddress}]:${socket.remotePort}`;
|
|
338998
|
-
}
|
|
338999
|
-
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
339000
|
-
}
|
|
339001
|
-
__name(describeAddress, "describeAddress");
|
|
339002
|
-
function upgradeSocket(socket, options) {
|
|
339003
|
-
return new Promise((resolve15, reject) => {
|
|
339004
|
-
const tlsOptions = Object.assign({}, options, {
|
|
339005
|
-
socket
|
|
339006
|
-
});
|
|
339007
|
-
const tlsSocket = (0, tls_1.connect)(tlsOptions, () => {
|
|
339008
|
-
const expectCertificate = tlsOptions.rejectUnauthorized !== false;
|
|
339009
|
-
if (expectCertificate && !tlsSocket.authorized) {
|
|
339010
|
-
reject(tlsSocket.authorizationError);
|
|
339011
|
-
} else {
|
|
339012
|
-
tlsSocket.removeAllListeners("error");
|
|
339013
|
-
resolve15(tlsSocket);
|
|
339014
|
-
}
|
|
339015
|
-
}).once("error", (error4) => {
|
|
339016
|
-
reject(error4);
|
|
339017
|
-
});
|
|
339018
|
-
});
|
|
339019
|
-
}
|
|
339020
|
-
__name(upgradeSocket, "upgradeSocket");
|
|
339021
|
-
function ipIsPrivateV4Address(ip = "") {
|
|
339022
|
-
if (ip.startsWith("::ffff:")) {
|
|
339023
|
-
ip = ip.substr(7);
|
|
339024
|
-
}
|
|
339025
|
-
const octets = ip.split(".").map((o6) => parseInt(o6, 10));
|
|
339026
|
-
return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip === "127.0.0.1";
|
|
339027
|
-
}
|
|
339028
|
-
__name(ipIsPrivateV4Address, "ipIsPrivateV4Address");
|
|
339029
|
-
}
|
|
339030
|
-
});
|
|
339031
|
-
|
|
339032
339078
|
// ../../node_modules/basic-ftp/dist/transfer.js
|
|
339033
339079
|
var require_transfer = __commonJS({
|
|
339034
339080
|
"../../node_modules/basic-ftp/dist/transfer.js"(exports2) {
|
|
@@ -339304,13 +339350,13 @@ var require_Client = __commonJS({
|
|
|
339304
339350
|
var tls_1 = require("tls");
|
|
339305
339351
|
var util_1 = require("util");
|
|
339306
339352
|
var FtpContext_1 = require_FtpContext();
|
|
339353
|
+
var netUtils_1 = require_netUtils();
|
|
339354
|
+
var parseControlResponse_1 = require_parseControlResponse();
|
|
339307
339355
|
var parseList_1 = require_parseList();
|
|
339356
|
+
var parseListMLSD_1 = require_parseListMLSD();
|
|
339308
339357
|
var ProgressTracker_1 = require_ProgressTracker();
|
|
339309
339358
|
var StringWriter_1 = require_StringWriter();
|
|
339310
|
-
var parseListMLSD_1 = require_parseListMLSD();
|
|
339311
|
-
var netUtils_1 = require_netUtils();
|
|
339312
339359
|
var transfer_1 = require_transfer();
|
|
339313
|
-
var parseControlResponse_1 = require_parseControlResponse();
|
|
339314
339360
|
var fsReadDir = (0, util_1.promisify)(fs_1.readdir);
|
|
339315
339361
|
var fsMkDir = (0, util_1.promisify)(fs_1.mkdir);
|
|
339316
339362
|
var fsStat = (0, util_1.promisify)(fs_1.stat);
|
|
@@ -339318,7 +339364,8 @@ var require_Client = __commonJS({
|
|
|
339318
339364
|
var fsClose = (0, util_1.promisify)(fs_1.close);
|
|
339319
339365
|
var fsUnlink = (0, util_1.promisify)(fs_1.unlink);
|
|
339320
339366
|
var defaultClientOptions = {
|
|
339321
|
-
allowSeparateTransferHost: true
|
|
339367
|
+
allowSeparateTransferHost: true,
|
|
339368
|
+
maxListingBytes: 40 * 1024 * 1024
|
|
339322
339369
|
};
|
|
339323
339370
|
var LIST_COMMANDS_DEFAULT = /* @__PURE__ */ __name(() => ["LIST -a", "LIST"], "LIST_COMMANDS_DEFAULT");
|
|
339324
339371
|
var LIST_COMMANDS_MLSD = /* @__PURE__ */ __name(() => ["MLSD", "LIST -a", "LIST"], "LIST_COMMANDS_MLSD");
|
|
@@ -339331,13 +339378,15 @@ var require_Client = __commonJS({
|
|
|
339331
339378
|
*
|
|
339332
339379
|
* @param timeout Timeout in milliseconds, use 0 for no timeout. Optional, default is 30 seconds.
|
|
339333
339380
|
*/
|
|
339334
|
-
constructor(timeout = 3e4,
|
|
339381
|
+
constructor(timeout = 3e4, userOptions = defaultClientOptions) {
|
|
339335
339382
|
this.availableListCommands = LIST_COMMANDS_DEFAULT();
|
|
339383
|
+
const options = { ...defaultClientOptions, ...userOptions };
|
|
339336
339384
|
this.ftp = new FtpContext_1.FTPContext(timeout);
|
|
339337
339385
|
this.prepareTransfer = this._enterFirstCompatibleMode([
|
|
339338
339386
|
transfer_1.enterPassiveModeIPv6,
|
|
339339
339387
|
options.allowSeparateTransferHost ? transfer_1.enterPassiveModeIPv4 : transfer_1.enterPassiveModeIPv4_forceControlHostIP
|
|
339340
339388
|
]);
|
|
339389
|
+
this.options = options;
|
|
339341
339390
|
this.parseList = parseList_1.parseList;
|
|
339342
339391
|
this._progressTracker = new ProgressTracker_1.ProgressTracker();
|
|
339343
339392
|
}
|
|
@@ -339774,7 +339823,7 @@ var require_Client = __commonJS({
|
|
|
339774
339823
|
* @protected
|
|
339775
339824
|
*/
|
|
339776
339825
|
async _requestListWithCommand(command) {
|
|
339777
|
-
const buffer = new StringWriter_1.StringWriter();
|
|
339826
|
+
const buffer = new StringWriter_1.StringWriter(this.options.maxListingBytes);
|
|
339778
339827
|
await (0, transfer_1.downloadTo)(buffer, {
|
|
339779
339828
|
ftp: this.ftp,
|
|
339780
339829
|
tracker: this._progressTracker,
|
package/package.json
CHANGED
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"ts-mock-imports": "^1.3.19",
|
|
81
81
|
"tsx": "^4.21.0",
|
|
82
82
|
"typescript": "5.9",
|
|
83
|
-
"@aws-cdk/cdk-assets-lib": "^1.4.
|
|
83
|
+
"@aws-cdk/cdk-assets-lib": "^1.4.5",
|
|
84
84
|
"@aws-cdk/cloud-assembly-api": "2.2.2",
|
|
85
|
-
"@aws-cdk/cloud-assembly-schema": ">=53.
|
|
85
|
+
"@aws-cdk/cloud-assembly-schema": ">=53.17.0",
|
|
86
86
|
"@aws-cdk/cloudformation-diff": "2.187.1",
|
|
87
87
|
"@aws-cdk/cx-api": "^2",
|
|
88
|
-
"@aws-cdk/toolkit-lib": "^1.
|
|
88
|
+
"@aws-cdk/toolkit-lib": "^1.23.0",
|
|
89
89
|
"@aws-sdk/client-appsync": "^3",
|
|
90
90
|
"@aws-sdk/client-bedrock-agentcore-control": "^3",
|
|
91
91
|
"@aws-sdk/client-cloudcontrol": "^3",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"publishConfig": {
|
|
158
158
|
"access": "public"
|
|
159
159
|
},
|
|
160
|
-
"version": "2.1118.
|
|
160
|
+
"version": "2.1118.4",
|
|
161
161
|
"packageManager": "yarn@4.13.0",
|
|
162
162
|
"types": "lib/index.d.ts",
|
|
163
163
|
"exports": {
|