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/README.md
generated
vendored
8
Scripts/node_modules/basic-ftp/README.md
generated
vendored
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.com/package/basic-ftp)
|
||||
[](https://github.com/patrickjuchli/basic-ftp/actions/workflows/nodejs.yml)
|
||||
|
||||
This is an FTP client library for Node.js. It supports FTPS over TLS, Passive Mode over IPv6, has a Promise-based API, and offers methods to operate on whole directories.
|
||||
This is an FTP client library for Node.js. It supports FTPS over TLS, Passive Mode over IPv6, has a Promise-based API, and offers methods to operate on whole directories. Active Mode is not supported.
|
||||
|
||||
## Advisory
|
||||
|
||||
@ -23,13 +23,13 @@ Node 10.0 or later is the only dependency.
|
||||
The first example will connect to an FTP server using TLS (FTPS), get a directory listing, upload a file and download it as a copy. Note that the FTP protocol doesn't allow multiple requests running in parallel.
|
||||
|
||||
```js
|
||||
const ftp = require("basic-ftp")
|
||||
// ESM: import * as ftp from "basic-ftp"
|
||||
const { Client } = require("basic-ftp")
|
||||
// ESM: import { Client } from "basic-ftp"
|
||||
|
||||
example()
|
||||
|
||||
async function example() {
|
||||
const client = new ftp.Client()
|
||||
const client = new Client()
|
||||
client.ftp.verbose = true
|
||||
try {
|
||||
await client.access({
|
||||
|
||||
2
Scripts/node_modules/basic-ftp/dist/Client.d.ts
generated
vendored
2
Scripts/node_modules/basic-ftp/dist/Client.d.ts
generated
vendored
@ -36,7 +36,7 @@ export interface UploadOptions {
|
||||
export declare class Client {
|
||||
prepareTransfer: TransferStrategy;
|
||||
parseList: RawListParser;
|
||||
availableListCommands: readonly string[];
|
||||
availableListCommands: string[];
|
||||
/** Low-level API to interact with FTP server. */
|
||||
readonly ftp: FTPContext;
|
||||
/** Tracks progress of data transfers. */
|
||||
|
||||
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.
|
||||
|
||||
2
Scripts/node_modules/basic-ftp/dist/FtpContext.d.ts
generated
vendored
2
Scripts/node_modules/basic-ftp/dist/FtpContext.d.ts
generated
vendored
@ -159,7 +159,7 @@ export declare class FTPContext {
|
||||
*/
|
||||
protected _closeControlSocket(): void;
|
||||
/**
|
||||
* Close a socket. Sends FIN and ignores any error.
|
||||
* Close a socket, ignores any error.
|
||||
* @protected
|
||||
*/
|
||||
protected _closeSocket(socket: Socket | undefined): void;
|
||||
|
||||
6
Scripts/node_modules/basic-ftp/dist/FtpContext.js
generated
vendored
6
Scripts/node_modules/basic-ftp/dist/FtpContext.js
generated
vendored
@ -329,16 +329,14 @@ class FTPContext {
|
||||
this._closeSocket(this._socket);
|
||||
}
|
||||
/**
|
||||
* Close a socket. Sends FIN and ignores any error.
|
||||
* Close a socket, ignores any error.
|
||||
* @protected
|
||||
*/
|
||||
_closeSocket(socket) {
|
||||
if (socket) {
|
||||
this._removeSocketListeners(socket);
|
||||
socket.on("error", doNothing);
|
||||
socket.on("timeout", () => socket.destroy());
|
||||
socket.setTimeout(this.timeout);
|
||||
socket.end();
|
||||
socket.destroy();
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
6
Scripts/node_modules/basic-ftp/package.json
generated
vendored
6
Scripts/node_modules/basic-ftp/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "basic-ftp",
|
||||
"version": "5.0.4",
|
||||
"version": "5.0.5",
|
||||
"description": "FTP client for Node.js, supports FTPS over TLS, IPv6, Async/Await, and Typescript.",
|
||||
"main": "dist/index",
|
||||
"types": "dist/index",
|
||||
@ -9,8 +9,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run clean && npm run lint && tsc && mocha",
|
||||
"prepare": "tsc",
|
||||
"test": "npm run prepublishOnly",
|
||||
"clean": "rimraf dist",
|
||||
"clean": "rm -rf dist",
|
||||
"lint": "eslint \"./src/**/*.ts\"",
|
||||
"lint-fix": "eslint --fix \"./src/**/*.ts\"",
|
||||
"dev": "npm run clean && tsc --watch",
|
||||
@ -43,7 +44,6 @@
|
||||
"@typescript-eslint/parser": "6.14.0",
|
||||
"eslint": "8.55.0",
|
||||
"mocha": "10.2.0",
|
||||
"rimraf": "5.0.5",
|
||||
"typescript": "5.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user