w-ftp 1.0.17 → 1.0.18

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/dist/w-ftp.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * w-ftp v1.0.17
2
+ * w-ftp v1.0.18
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -777,7 +777,7 @@ export default WFtp
777
777
  <br class="clear">
778
778
 
779
779
  <footer>
780
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Jul 17 2026 09:28:56 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
780
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Jul 22 2026 19:09:22 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
781
781
  </footer>
782
782
 
783
783
  <script>prettyPrint();</script>
package/docs/global.html CHANGED
@@ -2895,7 +2895,7 @@
2895
2895
  <br class="clear">
2896
2896
 
2897
2897
  <footer>
2898
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Jul 17 2026 09:28:56 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2898
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Jul 22 2026 19:09:22 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2899
2899
  </footer>
2900
2900
 
2901
2901
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Jul 17 2026 09:28:56 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Wed Jul 22 2026 19:09:22 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "w-ftp",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "dist/w-ftp.umd.js",
5
5
  "dependencies": {
6
6
  "dayjs": "^1.11.21",
7
7
  "jsftp": "^2.1.3",
8
8
  "lodash-es": "^4.18.1",
9
9
  "ssh2-sftp-client": "^12.1.1",
10
- "wsemi": "^1.8.65"
10
+ "wsemi": "^1.8.66"
11
11
  },
12
12
  "devDependencies": {
13
13
  "ssh2": "^1.17.0",
14
- "w-package-tools": "^1.1.10"
14
+ "w-package-tools": "^1.1.11"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "mocha --parallel --timeout 60000",
@@ -56,11 +56,11 @@ describe('api-ftp-flow', function() {
56
56
  it('ls: 列舉根目錄之檔案與資料夾', async function() {
57
57
  let rs = await ftp.ls('.')
58
58
  rs = rs.map((v) => {
59
- return { name: v.name, size: v.size, isFolder: v.isFolder }
59
+ return { name: v.name, size: v.isFolder ? null : v.size, isFolder: v.isFolder } //資料夾之size隨平台而異(ext4為4096, NTFS為0), 無語義不列入比對
60
60
  })
61
61
  rs.sort((a, b) => a.name.localeCompare(b.name))
62
62
  assert.strict.deepEqual(rs, [
63
- { name: 'sub', size: 0, isFolder: true },
63
+ { name: 'sub', size: null, isFolder: true },
64
64
  { name: 't1.txt', size: 7, isFolder: false },
65
65
  { name: 't2.txt', size: 9, isFolder: false },
66
66
  ])
@@ -55,11 +55,11 @@ describe('api-sftp-flow', function() {
55
55
  it('ls: 列舉根目錄之檔案與資料夾', async function() {
56
56
  let rs = await ftp.ls('.')
57
57
  rs = rs.map((v) => {
58
- return { name: v.name, size: v.size, isFolder: v.isFolder }
58
+ return { name: v.name, size: v.isFolder ? null : v.size, isFolder: v.isFolder } //資料夾之size隨平台而異(ext4為4096, NTFS為0), 無語義不列入比對
59
59
  })
60
60
  rs.sort((a, b) => a.name.localeCompare(b.name))
61
61
  assert.strict.deepEqual(rs, [
62
- { name: 'sub', size: 0, isFolder: true },
62
+ { name: 'sub', size: null, isFolder: true },
63
63
  { name: 't1.txt', size: 7, isFolder: false },
64
64
  { name: 't2.txt', size: 9, isFolder: false },
65
65
  ])