basic-ftp
Advanced tools
Comparing version 3.2.0 to 3.2.1
# Changelog | ||
## 3.2.1 | ||
- Republish to (maybe) fix NPM issue. | ||
## 3.2.0 | ||
@@ -4,0 +8,0 @@ |
@@ -8,25 +8,13 @@ /// <reference types="node" /> | ||
export interface AccessOptions { | ||
/** | ||
* Host the client should connect to. Optional, default is "localhost". | ||
*/ | ||
/** Host the client should connect to. Optional, default is "localhost". */ | ||
readonly host?: string; | ||
/** | ||
* Port the client should connect to. Optional, default is 21. | ||
*/ | ||
/** Port the client should connect to. Optional, default is 21. */ | ||
readonly port?: number; | ||
/** | ||
* Username to use for login. Optional, default is "anonymous". | ||
*/ | ||
/** Username to use for login. Optional, default is "anonymous". */ | ||
readonly user?: string; | ||
/** | ||
* Password to use for login. Optional, default is "guest". | ||
*/ | ||
/** Password to use for login. Optional, default is "guest". */ | ||
readonly password?: string; | ||
/** | ||
* Use explicit FTPS over TLS. Optional, default is false. | ||
*/ | ||
/** Use explicit FTPS over TLS. Optional, default is false. */ | ||
readonly secure?: boolean; | ||
/** | ||
* TLS options as in `tls.connect(options)`, optional. | ||
*/ | ||
/** TLS options as in `tls.connect(options)`, optional. */ | ||
readonly secureOptions?: ConnectionOptions; | ||
@@ -33,0 +21,0 @@ } |
@@ -464,4 +464,4 @@ "use strict"; | ||
* | ||
* @param {((client: Client)=>Promise<PositiveResponse>)[]} strategies | ||
* @returns {(client: Client)=>Promise<PositiveResponse>} a function that will try the provided strategies. | ||
* @param strategies | ||
* @returns a function that will try the provided strategies. | ||
*/ | ||
@@ -468,0 +468,0 @@ function enterFirstCompatibleMode(...strategies) { |
@@ -51,6 +51,2 @@ "use strict"; | ||
close() { | ||
// If this context already has been closed, don't overwrite the reason. | ||
if (this.closingError) { | ||
return; | ||
} | ||
// Close with an error: If there is an active task it will receive it justifiably because the user | ||
@@ -69,2 +65,6 @@ // closed while a task was still running. If no task is running, no error will be thrown (see closeWithError) | ||
closeWithError(err) { | ||
// If this context already has been closed, don't overwrite the reason. | ||
if (this.closingError) { | ||
return; | ||
} | ||
this.closingError = err; | ||
@@ -174,3 +174,3 @@ // Before giving the user's task a chance to react, make sure we won't be bothered with any inputs. | ||
return new Promise((resolvePromise, rejectPromise) => { | ||
const stack = new Error().stack; | ||
const stack = new Error().stack || "Unknown call stack"; | ||
const resolver = { | ||
@@ -187,3 +187,3 @@ resolve: (...args) => { | ||
this.task = { | ||
stack: stack ? stack : "Unknown call stack", | ||
stack, | ||
resolver, | ||
@@ -190,0 +190,0 @@ responseHandler |
@@ -78,3 +78,2 @@ "use strict"; | ||
} | ||
// Map list entry to FileInfo instance | ||
const file = new FileInfo_1.FileInfo(name); | ||
@@ -129,11 +128,11 @@ file.size = parseInt(groups[18], 10); | ||
; | ||
function parseMode(a, b, c) { | ||
function parseMode(r, w, x) { | ||
let value = 0; | ||
if (a !== "-") { | ||
if (r !== "-") { | ||
value += FileInfo_1.FileInfo.Permission.Read; | ||
} | ||
if (b !== "-") { | ||
if (w !== "-") { | ||
value += FileInfo_1.FileInfo.Permission.Write; | ||
} | ||
const execToken = c.charAt(0); | ||
const execToken = x.charAt(0); | ||
if (execToken !== "-" && execToken.toUpperCase() !== execToken) { | ||
@@ -140,0 +139,0 @@ value += FileInfo_1.FileInfo.Permission.Execute; |
{ | ||
"name": "basic-ftp", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "FTP client for Node.js, supports explicit FTPS over TLS, IPv6, Async/Await, and Typescript.", | ||
@@ -38,3 +38,3 @@ "main": "dist/index", | ||
"devDependencies": { | ||
"@types/node": "11.9.3", | ||
"@types/node": "11.9.4", | ||
"mocha": "5.2.0", | ||
@@ -41,0 +41,0 @@ "rimraf": "2.6.3", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3
100148
1988