@bf6mods/cli 1.6.0 → 1.7.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 +9 -51
- package/dist/cli/index.js +215 -20
- package/dist/cli/index.js.map +1 -1
- package/dist/{puppeteer-u5zMrFnK.js → puppeteer-BzRJX4NM.js} +72 -48
- package/dist/puppeteer-BzRJX4NM.js.map +1 -0
- package/dist/resources/prepare/types/config.ts +17 -0
- package/dist/resources/templates/All/README.md +22 -0
- package/dist/resources/templates/All/placeholder.jpg +0 -0
- package/dist/resources/templates/Basic/bf6.config.ts +1 -0
- package/dist/resources/templates/Complete/bf6.config.ts +1 -0
- package/package.json +2 -1
- package/dist/puppeteer-u5zMrFnK.js.map +0 -1
- package/dist/resources/templates/BombSquad.json +0 -1
|
@@ -15595,7 +15595,11 @@ var require_file = /* @__PURE__ */ __commonJS({ "../../node_modules/get-uri/dist
|
|
|
15595
15595
|
//#region ../../node_modules/basic-ftp/dist/parseControlResponse.js
|
|
15596
15596
|
var require_parseControlResponse = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/parseControlResponse.js": ((exports) => {
|
|
15597
15597
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15598
|
-
exports.
|
|
15598
|
+
exports.parseControlResponse = parseControlResponse;
|
|
15599
|
+
exports.isSingleLine = isSingleLine;
|
|
15600
|
+
exports.isMultiline = isMultiline;
|
|
15601
|
+
exports.positiveCompletion = positiveCompletion;
|
|
15602
|
+
exports.positiveIntermediate = positiveIntermediate;
|
|
15599
15603
|
const LF$1 = "\n";
|
|
15600
15604
|
/**
|
|
15601
15605
|
* Parse an FTP control response as a collection of messages. A message is a complete
|
|
@@ -15627,29 +15631,24 @@ var require_parseControlResponse = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
15627
15631
|
rest: tokenRegex ? lines.slice(startAt).join(LF$1) + LF$1 : ""
|
|
15628
15632
|
};
|
|
15629
15633
|
}
|
|
15630
|
-
exports.parseControlResponse = parseControlResponse;
|
|
15631
15634
|
function isSingleLine(line) {
|
|
15632
15635
|
return /^\d\d\d(?:$| )/.test(line);
|
|
15633
15636
|
}
|
|
15634
|
-
exports.isSingleLine = isSingleLine;
|
|
15635
15637
|
function isMultiline(line) {
|
|
15636
15638
|
return /^\d\d\d-/.test(line);
|
|
15637
15639
|
}
|
|
15638
|
-
exports.isMultiline = isMultiline;
|
|
15639
15640
|
/**
|
|
15640
15641
|
* Return true if an FTP return code describes a positive completion.
|
|
15641
15642
|
*/
|
|
15642
15643
|
function positiveCompletion(code) {
|
|
15643
15644
|
return code >= 200 && code < 300;
|
|
15644
15645
|
}
|
|
15645
|
-
exports.positiveCompletion = positiveCompletion;
|
|
15646
15646
|
/**
|
|
15647
15647
|
* Return true if an FTP return code describes a positive intermediate response.
|
|
15648
15648
|
*/
|
|
15649
15649
|
function positiveIntermediate(code) {
|
|
15650
15650
|
return code >= 300 && code < 400;
|
|
15651
15651
|
}
|
|
15652
|
-
exports.positiveIntermediate = positiveIntermediate;
|
|
15653
15652
|
function isNotBlank$1(str) {
|
|
15654
15653
|
return str.trim() !== "";
|
|
15655
15654
|
}
|
|
@@ -16063,7 +16062,9 @@ var require_FileInfo = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16063
16062
|
//#region ../../node_modules/basic-ftp/dist/parseListDOS.js
|
|
16064
16063
|
var require_parseListDOS = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/parseListDOS.js": ((exports) => {
|
|
16065
16064
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16066
|
-
exports.
|
|
16065
|
+
exports.testLine = testLine$2;
|
|
16066
|
+
exports.parseLine = parseLine$2;
|
|
16067
|
+
exports.transformList = transformList$2;
|
|
16067
16068
|
const FileInfo_1$2 = require_FileInfo();
|
|
16068
16069
|
/**
|
|
16069
16070
|
* This parser is based on the FTP client library source code in Apache Commons Net provided
|
|
@@ -16080,7 +16081,6 @@ var require_parseListDOS = /* @__PURE__ */ __commonJS({ "../../node_modules/basi
|
|
|
16080
16081
|
function testLine$2(line) {
|
|
16081
16082
|
return /^\d{2}/.test(line) && RE_LINE$1.test(line);
|
|
16082
16083
|
}
|
|
16083
|
-
exports.testLine = testLine$2;
|
|
16084
16084
|
/**
|
|
16085
16085
|
* Parse a single line of a DOS-style directory listing.
|
|
16086
16086
|
*/
|
|
@@ -16100,18 +16100,18 @@ var require_parseListDOS = /* @__PURE__ */ __commonJS({ "../../node_modules/basi
|
|
|
16100
16100
|
file$1.rawModifiedAt = groups[1] + " " + groups[2];
|
|
16101
16101
|
return file$1;
|
|
16102
16102
|
}
|
|
16103
|
-
exports.parseLine = parseLine$2;
|
|
16104
16103
|
function transformList$2(files) {
|
|
16105
16104
|
return files;
|
|
16106
16105
|
}
|
|
16107
|
-
exports.transformList = transformList$2;
|
|
16108
16106
|
}) });
|
|
16109
16107
|
|
|
16110
16108
|
//#endregion
|
|
16111
16109
|
//#region ../../node_modules/basic-ftp/dist/parseListUnix.js
|
|
16112
16110
|
var require_parseListUnix = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/parseListUnix.js": ((exports) => {
|
|
16113
16111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16114
|
-
exports.
|
|
16112
|
+
exports.testLine = testLine$1;
|
|
16113
|
+
exports.parseLine = parseLine$1;
|
|
16114
|
+
exports.transformList = transformList$1;
|
|
16115
16115
|
const FileInfo_1$1 = require_FileInfo();
|
|
16116
16116
|
/**
|
|
16117
16117
|
* This parser is based on the FTP client library source code in Apache Commons Net provided
|
|
@@ -16152,7 +16152,6 @@ var require_parseListUnix = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16152
16152
|
function testLine$1(line) {
|
|
16153
16153
|
return RE_LINE.test(line);
|
|
16154
16154
|
}
|
|
16155
|
-
exports.testLine = testLine$1;
|
|
16156
16155
|
/**
|
|
16157
16156
|
* Parse a single line of a Unix-style directory listing.
|
|
16158
16157
|
*/
|
|
@@ -16201,11 +16200,9 @@ var require_parseListUnix = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16201
16200
|
}
|
|
16202
16201
|
return file$1;
|
|
16203
16202
|
}
|
|
16204
|
-
exports.parseLine = parseLine$1;
|
|
16205
16203
|
function transformList$1(files) {
|
|
16206
16204
|
return files;
|
|
16207
16205
|
}
|
|
16208
|
-
exports.transformList = transformList$1;
|
|
16209
16206
|
function parseMode(r, w, x) {
|
|
16210
16207
|
let value = 0;
|
|
16211
16208
|
if (r !== "-") value += FileInfo_1$1.FileInfo.UnixPermission.Read;
|
|
@@ -16220,7 +16217,10 @@ var require_parseListUnix = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16220
16217
|
//#region ../../node_modules/basic-ftp/dist/parseListMLSD.js
|
|
16221
16218
|
var require_parseListMLSD = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/parseListMLSD.js": ((exports) => {
|
|
16222
16219
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16223
|
-
exports.
|
|
16220
|
+
exports.testLine = testLine;
|
|
16221
|
+
exports.parseLine = parseLine;
|
|
16222
|
+
exports.transformList = transformList;
|
|
16223
|
+
exports.parseMLSxDate = parseMLSxDate;
|
|
16224
16224
|
const FileInfo_1 = require_FileInfo();
|
|
16225
16225
|
function parseSize(value, info) {
|
|
16226
16226
|
info.size = parseInt(value, 10);
|
|
@@ -16304,7 +16304,6 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16304
16304
|
function testLine(line) {
|
|
16305
16305
|
return /^\S+=\S+;/.test(line) || line.startsWith(" ");
|
|
16306
16306
|
}
|
|
16307
|
-
exports.testLine = testLine;
|
|
16308
16307
|
/**
|
|
16309
16308
|
* Parse single line as MLSD listing, see specification at https://tools.ietf.org/html/rfc3659#section-7.
|
|
16310
16309
|
*/
|
|
@@ -16322,7 +16321,6 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16322
16321
|
}
|
|
16323
16322
|
return info;
|
|
16324
16323
|
}
|
|
16325
|
-
exports.parseLine = parseLine;
|
|
16326
16324
|
function transformList(files) {
|
|
16327
16325
|
const nonLinksByID = /* @__PURE__ */ new Map();
|
|
16328
16326
|
for (const file$1 of files) if (!file$1.isSymbolicLink && file$1.uniqueID !== void 0) nonLinksByID.set(file$1.uniqueID, file$1);
|
|
@@ -16336,7 +16334,6 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16336
16334
|
}
|
|
16337
16335
|
return resolvedFiles;
|
|
16338
16336
|
}
|
|
16339
|
-
exports.transformList = transformList;
|
|
16340
16337
|
/**
|
|
16341
16338
|
* Parse date as specified in https://tools.ietf.org/html/rfc3659#section-2.3.
|
|
16342
16339
|
*
|
|
@@ -16346,7 +16343,6 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJS({ "../../node_modules/bas
|
|
|
16346
16343
|
function parseMLSxDate(fact) {
|
|
16347
16344
|
return new Date(Date.UTC(+fact.slice(0, 4), +fact.slice(4, 6) - 1, +fact.slice(6, 8), +fact.slice(8, 10), +fact.slice(10, 12), +fact.slice(12, 14), +fact.slice(15, 18)));
|
|
16348
16345
|
}
|
|
16349
|
-
exports.parseMLSxDate = parseMLSxDate;
|
|
16350
16346
|
}) });
|
|
16351
16347
|
|
|
16352
16348
|
//#endregion
|
|
@@ -16374,17 +16370,27 @@ var require_parseList = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-f
|
|
|
16374
16370
|
}) : function(o, v) {
|
|
16375
16371
|
o["default"] = v;
|
|
16376
16372
|
});
|
|
16377
|
-
var __importStar$6 = exports && exports.__importStar || function(
|
|
16378
|
-
|
|
16379
|
-
|
|
16380
|
-
|
|
16381
|
-
|
|
16382
|
-
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
|
|
16373
|
+
var __importStar$6 = exports && exports.__importStar || (function() {
|
|
16374
|
+
var ownKeys$1 = function(o) {
|
|
16375
|
+
ownKeys$1 = Object.getOwnPropertyNames || function(o$1) {
|
|
16376
|
+
var ar = [];
|
|
16377
|
+
for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
|
|
16378
|
+
return ar;
|
|
16379
|
+
};
|
|
16380
|
+
return ownKeys$1(o);
|
|
16381
|
+
};
|
|
16382
|
+
return function(mod) {
|
|
16383
|
+
if (mod && mod.__esModule) return mod;
|
|
16384
|
+
var result = {};
|
|
16385
|
+
if (mod != null) {
|
|
16386
|
+
for (var k = ownKeys$1(mod), i$1 = 0; i$1 < k.length; i$1++) if (k[i$1] !== "default") __createBinding$8(result, mod, k[i$1]);
|
|
16387
|
+
}
|
|
16388
|
+
__setModuleDefault$6(result, mod);
|
|
16389
|
+
return result;
|
|
16390
|
+
};
|
|
16391
|
+
})();
|
|
16386
16392
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16387
|
-
exports.parseList =
|
|
16393
|
+
exports.parseList = parseList;
|
|
16388
16394
|
/**
|
|
16389
16395
|
* Available directory listing parsers. These are candidates that will be tested
|
|
16390
16396
|
* in the order presented. The first candidate will be used to parse the whole list.
|
|
@@ -16416,7 +16422,6 @@ var require_parseList = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-f
|
|
|
16416
16422
|
const files = lines.map(parser.parseLine).filter((info) => info !== void 0);
|
|
16417
16423
|
return parser.transformList(files);
|
|
16418
16424
|
}
|
|
16419
|
-
exports.parseList = parseList;
|
|
16420
16425
|
}) });
|
|
16421
16426
|
|
|
16422
16427
|
//#endregion
|
|
@@ -16520,7 +16525,10 @@ var require_StringWriter = /* @__PURE__ */ __commonJS({ "../../node_modules/basi
|
|
|
16520
16525
|
//#region ../../node_modules/basic-ftp/dist/netUtils.js
|
|
16521
16526
|
var require_netUtils = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/netUtils.js": ((exports) => {
|
|
16522
16527
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16523
|
-
exports.
|
|
16528
|
+
exports.describeTLS = describeTLS;
|
|
16529
|
+
exports.describeAddress = describeAddress;
|
|
16530
|
+
exports.upgradeSocket = upgradeSocket;
|
|
16531
|
+
exports.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
16524
16532
|
const tls_1$2 = __require("tls");
|
|
16525
16533
|
/**
|
|
16526
16534
|
* Returns a string describing the encryption on a given socket instance.
|
|
@@ -16532,7 +16540,6 @@ var require_netUtils = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16532
16540
|
}
|
|
16533
16541
|
return "No encryption";
|
|
16534
16542
|
}
|
|
16535
|
-
exports.describeTLS = describeTLS;
|
|
16536
16543
|
/**
|
|
16537
16544
|
* Returns a string describing the remote address of a socket.
|
|
16538
16545
|
*/
|
|
@@ -16540,7 +16547,6 @@ var require_netUtils = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16540
16547
|
if (socket.remoteFamily === "IPv6") return `[${socket.remoteAddress}]:${socket.remotePort}`;
|
|
16541
16548
|
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
16542
16549
|
}
|
|
16543
|
-
exports.describeAddress = describeAddress;
|
|
16544
16550
|
/**
|
|
16545
16551
|
* Upgrade a socket connection with TLS.
|
|
16546
16552
|
*/
|
|
@@ -16558,7 +16564,6 @@ var require_netUtils = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16558
16564
|
});
|
|
16559
16565
|
});
|
|
16560
16566
|
}
|
|
16561
|
-
exports.upgradeSocket = upgradeSocket;
|
|
16562
16567
|
/**
|
|
16563
16568
|
* Returns true if an IP is a private address according to https://tools.ietf.org/html/rfc1918#section-3.
|
|
16564
16569
|
* This will handle IPv4-mapped IPv6 addresses correctly but return false for all other IPv6 addresses.
|
|
@@ -16570,14 +16575,20 @@ var require_netUtils = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16570
16575
|
const octets = ip.split(".").map((o) => parseInt(o, 10));
|
|
16571
16576
|
return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip === "127.0.0.1";
|
|
16572
16577
|
}
|
|
16573
|
-
exports.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
16574
16578
|
}) });
|
|
16575
16579
|
|
|
16576
16580
|
//#endregion
|
|
16577
16581
|
//#region ../../node_modules/basic-ftp/dist/transfer.js
|
|
16578
16582
|
var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/dist/transfer.js": ((exports) => {
|
|
16579
16583
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16580
|
-
exports.
|
|
16584
|
+
exports.enterPassiveModeIPv6 = enterPassiveModeIPv6;
|
|
16585
|
+
exports.parseEpsvResponse = parseEpsvResponse;
|
|
16586
|
+
exports.enterPassiveModeIPv4 = enterPassiveModeIPv4;
|
|
16587
|
+
exports.enterPassiveModeIPv4_forceControlHostIP = enterPassiveModeIPv4_forceControlHostIP;
|
|
16588
|
+
exports.parsePasvResponse = parsePasvResponse;
|
|
16589
|
+
exports.connectForPassiveTransfer = connectForPassiveTransfer;
|
|
16590
|
+
exports.uploadFrom = uploadFrom;
|
|
16591
|
+
exports.downloadTo = downloadTo;
|
|
16581
16592
|
const netUtils_1$1 = require_netUtils();
|
|
16582
16593
|
const stream_1$1 = __require("stream");
|
|
16583
16594
|
const tls_1$1 = __require("tls");
|
|
@@ -16594,7 +16605,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16594
16605
|
await connectForPassiveTransfer(controlHost, port, ftp$1);
|
|
16595
16606
|
return res;
|
|
16596
16607
|
}
|
|
16597
|
-
exports.enterPassiveModeIPv6 = enterPassiveModeIPv6;
|
|
16598
16608
|
/**
|
|
16599
16609
|
* Parse an EPSV response. Returns only the port as in EPSV the host of the control connection is used.
|
|
16600
16610
|
*/
|
|
@@ -16605,7 +16615,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16605
16615
|
if (Number.isNaN(port)) throw new Error(`Can't parse response to 'EPSV', port is not a number: ${message}`);
|
|
16606
16616
|
return port;
|
|
16607
16617
|
}
|
|
16608
|
-
exports.parseEpsvResponse = parseEpsvResponse;
|
|
16609
16618
|
/**
|
|
16610
16619
|
* Prepare a data socket using passive mode over IPv4.
|
|
16611
16620
|
*/
|
|
@@ -16618,7 +16627,20 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16618
16627
|
await connectForPassiveTransfer(target.host, target.port, ftp$1);
|
|
16619
16628
|
return res;
|
|
16620
16629
|
}
|
|
16621
|
-
|
|
16630
|
+
/**
|
|
16631
|
+
* Prepare a data socket using passive mode over IPv4. Ignore the IP provided by the PASV response,
|
|
16632
|
+
* and use the control host IP. This is the same behaviour as with the more modern variant EPSV. Use
|
|
16633
|
+
* this to fix issues around NAT or provide more security by preventing FTP bounce attacks.
|
|
16634
|
+
*/
|
|
16635
|
+
async function enterPassiveModeIPv4_forceControlHostIP(ftp$1) {
|
|
16636
|
+
const res = await ftp$1.request("PASV");
|
|
16637
|
+
const target = parsePasvResponse(res.message);
|
|
16638
|
+
if (!target) throw new Error("Can't parse PASV response: " + res.message);
|
|
16639
|
+
const controlHost = ftp$1.socket.remoteAddress;
|
|
16640
|
+
if (controlHost === void 0) throw new Error("Control socket is disconnected, can't get remote address.");
|
|
16641
|
+
await connectForPassiveTransfer(controlHost, target.port, ftp$1);
|
|
16642
|
+
return res;
|
|
16643
|
+
}
|
|
16622
16644
|
/**
|
|
16623
16645
|
* Parse a PASV response.
|
|
16624
16646
|
*/
|
|
@@ -16630,7 +16652,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16630
16652
|
port: (parseInt(groups[2], 10) & 255) * 256 + (parseInt(groups[3], 10) & 255)
|
|
16631
16653
|
};
|
|
16632
16654
|
}
|
|
16633
|
-
exports.parsePasvResponse = parsePasvResponse;
|
|
16634
16655
|
function connectForPassiveTransfer(host, port, ftp$1) {
|
|
16635
16656
|
return new Promise((resolve, reject) => {
|
|
16636
16657
|
let socket = ftp$1._newSocket();
|
|
@@ -16661,7 +16682,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16661
16682
|
});
|
|
16662
16683
|
});
|
|
16663
16684
|
}
|
|
16664
|
-
exports.connectForPassiveTransfer = connectForPassiveTransfer;
|
|
16665
16685
|
/**
|
|
16666
16686
|
* Helps resolving/rejecting transfers.
|
|
16667
16687
|
*
|
|
@@ -16757,7 +16777,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16757
16777
|
else if ((0, parseControlResponse_1$1.positiveIntermediate)(res.code)) resolver.onUnexpectedRequest(res);
|
|
16758
16778
|
});
|
|
16759
16779
|
}
|
|
16760
|
-
exports.uploadFrom = uploadFrom;
|
|
16761
16780
|
function downloadTo(destination, config) {
|
|
16762
16781
|
if (!config.ftp.dataSocket) throw new Error("Download will be initiated but no data connection is available.");
|
|
16763
16782
|
const resolver = new TransferResolver(config.ftp, config.tracker);
|
|
@@ -16780,7 +16799,6 @@ var require_transfer = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ft
|
|
|
16780
16799
|
else if ((0, parseControlResponse_1$1.positiveIntermediate)(res.code)) resolver.onUnexpectedRequest(res);
|
|
16781
16800
|
});
|
|
16782
16801
|
}
|
|
16783
|
-
exports.downloadTo = downloadTo;
|
|
16784
16802
|
/**
|
|
16785
16803
|
* Calls a function immediately if a condition is met or subscribes to an event and calls
|
|
16786
16804
|
* it once the event is emitted.
|
|
@@ -16819,6 +16837,7 @@ var require_Client = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/
|
|
|
16819
16837
|
const fsOpen = (0, util_1$7.promisify)(fs_1$3.open);
|
|
16820
16838
|
const fsClose = (0, util_1$7.promisify)(fs_1$3.close);
|
|
16821
16839
|
const fsUnlink = (0, util_1$7.promisify)(fs_1$3.unlink);
|
|
16840
|
+
const defaultClientOptions = { allowSeparateTransferHost: true };
|
|
16822
16841
|
const LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"];
|
|
16823
16842
|
const LIST_COMMANDS_MLSD = () => [
|
|
16824
16843
|
"MLSD",
|
|
@@ -16834,10 +16853,10 @@ var require_Client = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/
|
|
|
16834
16853
|
*
|
|
16835
16854
|
* @param timeout Timeout in milliseconds, use 0 for no timeout. Optional, default is 30 seconds.
|
|
16836
16855
|
*/
|
|
16837
|
-
constructor(timeout$1 = 3e4) {
|
|
16856
|
+
constructor(timeout$1 = 3e4, options = defaultClientOptions) {
|
|
16838
16857
|
this.availableListCommands = LIST_COMMANDS_DEFAULT();
|
|
16839
16858
|
this.ftp = new FtpContext_1.FTPContext(timeout$1);
|
|
16840
|
-
this.prepareTransfer = this._enterFirstCompatibleMode([transfer_1$1.enterPassiveModeIPv6, transfer_1$1.enterPassiveModeIPv4]);
|
|
16859
|
+
this.prepareTransfer = this._enterFirstCompatibleMode([transfer_1$1.enterPassiveModeIPv6, options.allowSeparateTransferHost ? transfer_1$1.enterPassiveModeIPv4 : transfer_1$1.enterPassiveModeIPv4_forceControlHostIP]);
|
|
16841
16860
|
this.parseList = parseList_1.parseList;
|
|
16842
16861
|
this._progressTracker = new ProgressTracker_1.ProgressTracker();
|
|
16843
16862
|
}
|
|
@@ -17333,6 +17352,11 @@ var require_Client = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/
|
|
|
17333
17352
|
async _downloadFromWorkingDir(localDirPath) {
|
|
17334
17353
|
await ensureLocalDirectory(localDirPath);
|
|
17335
17354
|
for (const file$1 of await this.list()) {
|
|
17355
|
+
if (!file$1.name || (0, path_1$7.basename)(file$1.name) !== file$1.name) {
|
|
17356
|
+
const safeName = JSON.stringify(file$1.name);
|
|
17357
|
+
this.ftp.log(`Invalid filename from server listing, will skip file. (${safeName})`);
|
|
17358
|
+
continue;
|
|
17359
|
+
}
|
|
17336
17360
|
const localPath = (0, path_1$7.join)(localDirPath, file$1.name);
|
|
17337
17361
|
if (file$1.isDirectory) {
|
|
17338
17362
|
await this.cd(file$1.name);
|
|
@@ -17449,14 +17473,14 @@ var require_Client = /* @__PURE__ */ __commonJS({ "../../node_modules/basic-ftp/
|
|
|
17449
17473
|
async function ensureLocalDirectory(path$4) {
|
|
17450
17474
|
try {
|
|
17451
17475
|
await fsStat(path$4);
|
|
17452
|
-
} catch (
|
|
17476
|
+
} catch (_a$1) {
|
|
17453
17477
|
await fsMkDir(path$4, { recursive: true });
|
|
17454
17478
|
}
|
|
17455
17479
|
}
|
|
17456
17480
|
async function ignoreError(func) {
|
|
17457
17481
|
try {
|
|
17458
17482
|
return await func();
|
|
17459
|
-
} catch (
|
|
17483
|
+
} catch (_a$1) {
|
|
17460
17484
|
return;
|
|
17461
17485
|
}
|
|
17462
17486
|
}
|
|
@@ -42436,4 +42460,4 @@ var puppeteer_default = puppeteer;
|
|
|
42436
42460
|
|
|
42437
42461
|
//#endregion
|
|
42438
42462
|
export { ARIAQueryHandler, Accessibility, AsyncDisposableStack, AsyncDisposableStackPolyfill, AsyncIterableUtil, Binding, Browser, BrowserContext, BrowserLauncher, BrowserWebSocketTransport, CDPSession, CDPSessionEvent, CDP_BINDING_PREFIX, CSSCoverage, Callback, CallbackRegistry, CdpBrowser, CdpBrowserContext, CdpCDPSession, CdpDialog, CdpElementHandle, CdpFrame, CdpHTTPRequest, CdpHTTPResponse, CdpJSHandle, CdpKeyboard, CdpMouse, CdpPage, CdpPreloadScript, CdpTarget, CdpTouchHandle, CdpTouchscreen, CdpWebWorker, ChromeLauncher, Connection, ConnectionClosedError, ConsoleMessage, Coverage, CustomQueryHandlerRegistry, DEFAULT_INTERCEPT_RESOLUTION_PRIORITY, DEFAULT_VIEWPORT, Deferred, DelegatedLocator, DevToolsTarget, DeviceRequestPrompt, DeviceRequestPromptDevice, DeviceRequestPromptManager, Dialog, DisposableStack, DisposableStackPolyfill, ElementHandle, EmulatedState, EmulationManager, EventEmitter, ExecutionContext, ExtensionTransport, FileChooser, FilteredLocator, FirefoxLauncher, Frame, FrameEvent, FrameManager, FrameManagerEvent, FrameTree, FunctionLocator, HTTPRequest, HTTPResponse, InitializationStatus, InterceptResolutionAction, IsolatedWorld, JSCoverage, JSHandle, Keyboard, KnownDevices, LazyArg, LifecycleWatcher, Locator, LocatorEvent, MAIN_WORLD, MappedLocator, Mouse, MouseButton, Mutex, NETWORK_IDLE_TIME, NetworkEventManager, NetworkManager, NetworkManagerEvent, NodeLocator, OtherTarget, PQueryHandler, PUPPETEER_REVISIONS, PUPPETEER_WORLD, Page, PageTarget, PierceQueryHandler, PipeTransport, PredefinedNetworkConditions, ProtocolError, Puppeteer, PuppeteerError, PuppeteerNode, PuppeteerURL, QueryHandler, RETRY_DELAY, RaceLocator, Realm, SOURCE_URL_REGEX, STATUS_TEXTS, ScreenRecorder, ScriptInjector, SecurityDetails, SuppressedError$1 as SuppressedError, Target, TargetCloseError, TargetManager, TargetType, TaskManager, TaskQueue, TextQueryHandler, TimeoutError, TimeoutSettings, TouchError, Touchscreen, Tracing, UTILITY_WORLD_NAME, UnsupportedOperation, WEB_PERMISSION_TO_PROTOCOL_PERMISSION, WaitTask, WebWorker, WorkerTarget, XPathQueryHandler, _connectToCdpBrowser, _keyDefinitions, addPageBinding, assert, asyncDisposeSymbol, bindIsolatedHandle, connect, convertCookiesPartitionKeyFromPuppeteerToCdp, createClientError, createEvaluationError, createIncrementalIdGenerator, createProtocolErrorMessage, customQueryHandlers, debug, debugError, puppeteer_default as default, defaultArgs, disposeSymbol, evaluationString, executablePath, filterAsync, fromAbortSignal, fromEmitterEvent, getCapturedLogs, getFeatures, getQueryHandlerAndSelector, getReadableAsTypedArray, getReadableFromProtocolStream, getSourcePuppeteerURLIfAvailable, getSourceUrlComment, handleError, headersArray, importDebug, isDate, isErrnoException, isErrorLike, isNumber, isPlainObject, isRegExp, isString, isTargetClosedError, launch, pageBindingInitString, paperFormats, parsePDFOptions, parsePSelectors, referrerPolicyToProtocol, releaseObject, removeMatchingFlags, rewriteError, scriptInjector, setDefaultScreenshotOptions, setLogCapture, supportedMetrics, throwIfDetached, timeout, transposeIterableHandle, trimCache, unitToPixels, validateDialogType, valueFromRemoteObject, withSourcePuppeteerURLIfNone };
|
|
42439
|
-
//# sourceMappingURL=puppeteer-
|
|
42463
|
+
//# sourceMappingURL=puppeteer-BzRJX4NM.js.map
|