A big commit with a bunch of node modules so I could run puppeteer for Walmart. Added some todos and Headway's templates.
This commit is contained in:
8
Scripts/node_modules/basic-ftp/dist/Client.js
generated
vendored
8
Scripts/node_modules/basic-ftp/dist/Client.js
generated
vendored
@ -20,8 +20,8 @@ const fsStat = (0, util_1.promisify)(fs_1.stat);
|
||||
const fsOpen = (0, util_1.promisify)(fs_1.open);
|
||||
const fsClose = (0, util_1.promisify)(fs_1.close);
|
||||
const fsUnlink = (0, util_1.promisify)(fs_1.unlink);
|
||||
const LIST_COMMANDS_DEFAULT = ["LIST -a", "LIST"];
|
||||
const LIST_COMMANDS_MLSD = ["MLSD", "LIST -a", "LIST"];
|
||||
const LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"];
|
||||
const LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"];
|
||||
/**
|
||||
* High-level API to interact with an FTP server.
|
||||
*/
|
||||
@ -32,7 +32,7 @@ class Client {
|
||||
* @param timeout Timeout in milliseconds, use 0 for no timeout. Optional, default is 30 seconds.
|
||||
*/
|
||||
constructor(timeout = 30000) {
|
||||
this.availableListCommands = LIST_COMMANDS_DEFAULT;
|
||||
this.availableListCommands = LIST_COMMANDS_DEFAULT();
|
||||
this.ftp = new FtpContext_1.FTPContext(timeout);
|
||||
this.prepareTransfer = this._enterFirstCompatibleMode([transfer_1.enterPassiveModeIPv6, transfer_1.enterPassiveModeIPv4]);
|
||||
this.parseList = parseList_1.parseList;
|
||||
@ -182,7 +182,7 @@ class Client {
|
||||
// Use MLSD directory listing if possible. See https://tools.ietf.org/html/rfc3659#section-7.8:
|
||||
// "The presence of the MLST feature indicates that both MLST and MLSD are supported."
|
||||
const supportsMLSD = features.has("MLST");
|
||||
this.availableListCommands = supportsMLSD ? LIST_COMMANDS_MLSD : LIST_COMMANDS_DEFAULT;
|
||||
this.availableListCommands = supportsMLSD ? LIST_COMMANDS_MLSD() : LIST_COMMANDS_DEFAULT();
|
||||
await this.send("TYPE I"); // Binary mode
|
||||
await this.sendIgnoringError("STRU F"); // Use file structure
|
||||
await this.sendIgnoringError("OPTS UTF8 ON"); // Some servers expect UTF-8 to be enabled explicitly and setting before login might not have worked.
|
||||
|
||||
Reference in New Issue
Block a user