Skip to content

Commit

Permalink
modify: supp. ls for some serv. err.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuda-lyu committed Oct 3, 2023
1 parent 12ef0ac commit 6f57031
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 53 deletions.
4 changes: 2 additions & 2 deletions dist/w-ftp.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/w-ftp.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/WFtp.mjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ <h1 class="page-title">WFtp.mjs</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Aug 22 2023 16:52:01 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Oct 03 2023 10:24:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -2895,7 +2895,7 @@ <h5 class="h5-returns">Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Aug 22 2023 16:52:01 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Oct 03 2023 10:24:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h3> </h3>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Aug 22 2023 16:52:01 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Oct 03 2023 10:24:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsftp.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ <h1 class="page-title">jsftp.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Aug 22 2023 16:52:01 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Oct 03 2023 10:24:57 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
104 changes: 63 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "w-ftp",
"version": "1.0.11",
"version": "1.0.12",
"main": "dist/w-ftp.umd.js",
"dependencies": {
"dayjs": "^1.11.9",
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"ftp-response-parser": "^1.0.1",
"lodash": "^4.17.21",
Expand All @@ -12,10 +12,10 @@
"ssh2-sftp-client": "^9.1.0",
"stream-combiner": "^0.2.2",
"unorm": "^1.6.0",
"wsemi": "^1.7.27"
"wsemi": "^1.7.38"
},
"devDependencies": {
"w-package-tools": "^1.0.69"
"w-package-tools": "^1.0.70"
},
"scripts": {
"test": "mocha --parallel --timeout 60000 --experimental-modules --es-module-specifier-resolution=node",
Expand Down
8 changes: 7 additions & 1 deletion src/CoreFTP.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ function CoreFTP(opt = {}) {
clearTimeout(t)

if (err) {
pm.reject(err)
//有些伺服器會回傳empty string(由jsftp.js提示), 故可能無法進行ls列舉, 且其回傳: Could not retrieve a file listing for ooo
if (get(err, 'code') === 451) {
pm.resolve([]) //視為資料夾內無任何資料夾與檔案
}
else {
pm.reject(err)
}
}
else {
res = map(res, (v) => {
Expand Down

0 comments on commit 6f57031

Please sign in to comment.