w-ftp 1.0.0

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.
Files changed (50) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +54 -0
  4. package/.jsdoc +25 -0
  5. package/LICENSE +21 -0
  6. package/README.md +163 -0
  7. package/SECURITY.md +5 -0
  8. package/babel.config.js +14 -0
  9. package/docs/WFtp.mjs.html +665 -0
  10. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  28. package/docs/global.html +439 -0
  29. package/docs/index.html +81 -0
  30. package/docs/jsftp.js.html +925 -0
  31. package/docs/scripts/collapse.js +20 -0
  32. package/docs/scripts/linenumber.js +25 -0
  33. package/docs/scripts/nav.js +12 -0
  34. package/docs/scripts/polyfill.js +4 -0
  35. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  36. package/docs/scripts/prettify/lang-css.js +2 -0
  37. package/docs/scripts/prettify/prettify.js +28 -0
  38. package/docs/scripts/search.js +83 -0
  39. package/docs/styles/jsdoc.css +765 -0
  40. package/docs/styles/prettify.css +79 -0
  41. package/g-download.mjs +84 -0
  42. package/g-upload.mjs +65 -0
  43. package/package.json +30 -0
  44. package/src/WFtp.mjs +596 -0
  45. package/src/jsftp.js +856 -0
  46. package/test/all.test.mjs +10 -0
  47. package/toolg/addVersion.mjs +4 -0
  48. package/toolg/cleanFolder.mjs +4 -0
  49. package/toolg/gDistRollup.mjs +27 -0
  50. package/toolg/modifyReadme.mjs +4 -0
@@ -0,0 +1,439 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Global - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ </head>
19
+ <body>
20
+
21
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
+ <label for="nav-trigger" class="navicon-button x">
23
+ <div class="navicon"></div>
24
+ </label>
25
+
26
+ <label for="nav-trigger" class="overlay"></label>
27
+
28
+ <nav >
29
+
30
+ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#WFtp">WFtp</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+ <h1 class="page-title">Global</h1>
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section>
44
+
45
+ <header>
46
+
47
+ <h2>
48
+
49
+ </h2>
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+ <div class="container-overview">
57
+
58
+
59
+
60
+ <dl class="details">
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h3 class="subsection-title">Methods</h3>
121
+
122
+
123
+
124
+
125
+
126
+
127
+ <h4 class="name" id="WFtp"><span class="type-signature"></span>WFtp<span class="signature">(fp, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <dl class="details">
135
+
136
+
137
+ <dt class="tag-source">Source:</dt>
138
+ <dd class="tag-source"><ul class="dummy"><li>
139
+ <a href="WFtp.mjs.html">WFtp.mjs</a>, <a href="WFtp.mjs.html#line71">line 71</a>
140
+ </li></ul></dd>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+ </dl>
173
+
174
+
175
+
176
+
177
+
178
+ <div class="description usertext">
179
+ <p>指定FTP伺服器資料夾內檔案並自動同步至本機,只能用於Windows作業系統</p>
180
+ </div>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <h5>Example</h5>
191
+
192
+ <pre class="prettyprint"><code>import WFtp from './src/WFtp.mjs'
193
  //fp
1
194
  let fp = './g.mseed'
2
195
  //WFtp
3
196
  let r = await WFtp(fp)
4
197
  console.log(r)
5
198
  // [
6
199
  // {
7
200
  // name: 'SE.RST01.00.HNE.D.2020-09-17T013552.000000.csv',
8
201
  // path: null,
9
202
  // data: { heads: [Object], records: [Array] }
10
203
  // },
11
204
  // {
12
205
  // name: 'SE.RST01.00.HNN.D.2020-09-17T013552.000000.csv',
13
206
  // path: null,
14
207
  // data: { heads: [Object], records: [Array] }
15
208
  // },
16
209
  // {
17
210
  // name: 'SE.RST01.00.HNZ.D.2020-09-17T013552.000000.csv',
18
211
  // path: null,
19
212
  // data: { heads: [Object], records: [Array] }
20
213
  // }
21
214
  // ]
22
215
  .catch((err) => {
23
216
  console.log('catch', err)
24
217
  })</code></pre>
218
+
219
+
220
+
221
+
222
+ <h5>Parameters:</h5>
223
+
224
+
225
+ <table class="params">
226
+ <thead>
227
+ <tr>
228
+
229
+ <th>Name</th>
230
+
231
+
232
+ <th>Type</th>
233
+
234
+
235
+ <th>Attributes</th>
236
+
237
+
238
+
239
+ <th>Default</th>
240
+
241
+
242
+ <th class="last">Description</th>
243
+ </tr>
244
+ </thead>
245
+
246
+ <tbody>
247
+
248
+
249
+ <tr>
250
+
251
+ <td class="name"><code>fp</code></td>
252
+
253
+
254
+ <td class="type">
255
+
256
+
257
+ <span class="param-type">String</span>
258
+
259
+
260
+
261
+ </td>
262
+
263
+
264
+ <td class="attributes">
265
+
266
+
267
+
268
+
269
+
270
+ </td>
271
+
272
+
273
+
274
+ <td class="default">
275
+
276
+ </td>
277
+
278
+
279
+ <td class="description last"><p>輸入檔案路徑字串</p></td>
280
+ </tr>
281
+
282
+
283
+
284
+ <tr>
285
+
286
+ <td class="name"><code>opt</code></td>
287
+
288
+
289
+ <td class="type">
290
+
291
+
292
+ <span class="param-type">Object</span>
293
+
294
+
295
+
296
+ </td>
297
+
298
+
299
+ <td class="attributes">
300
+
301
+ &lt;optional><br>
302
+
303
+
304
+
305
+
306
+
307
+ </td>
308
+
309
+
310
+
311
+ <td class="default">
312
+
313
+ <code>{}</code>
314
+
315
+ </td>
316
+
317
+
318
+ <td class="description last"><p>輸入設定物件,預設{}</p>
319
+ <h6>Properties</h6>
320
+
321
+
322
+ <table class="params">
323
+ <thead>
324
+ <tr>
325
+
326
+ <th>Name</th>
327
+
328
+
329
+ <th>Type</th>
330
+
331
+
332
+ <th>Attributes</th>
333
+
334
+
335
+
336
+ <th>Default</th>
337
+
338
+
339
+ <th class="last">Description</th>
340
+ </tr>
341
+ </thead>
342
+
343
+ <tbody>
344
+
345
+
346
+ <tr>
347
+
348
+ <td class="name"><code>ver</code></td>
349
+
350
+
351
+ <td class="type">
352
+
353
+
354
+ <span class="param-type">String</span>
355
+
356
+
357
+
358
+ </td>
359
+
360
+
361
+ <td class="attributes">
362
+
363
+ &lt;optional><br>
364
+
365
+
366
+
367
+
368
+
369
+ </td>
370
+
371
+
372
+
373
+ <td class="default">
374
+
375
+ <code>'4.8'</code>
376
+
377
+ </td>
378
+
379
+
380
+ <td class="description last"><p>輸入調用windows程序之Net Framework版本字串,可有'4.5'、'4.6'、'4.7.2'與'4.8',預設'4.8'</p></td>
381
+ </tr>
382
+
383
+
384
+ </tbody>
385
+ </table>
386
+
387
+ </td>
388
+ </tr>
389
+
390
+
391
+ </tbody>
392
+ </table>
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ <h5>Returns:</h5>
410
+
411
+
412
+ <div class="param-desc">
413
+ <p>回傳Promise,resolve回傳成功訊息,reject回傳錯誤訊息</p>
414
+ </div>
415
+
416
+
417
+
418
+ <dl class="param-type">
419
+ <dt>
420
+ Type
421
+ </dt>
422
+ <dd>
423
+
424
+ <span class="param-type">Promise</span>
425
+
426
+
427
+ </dd>
428
+ </dl>
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+ </article>
441
+
442
+ </section>
443
+
444
+
445
+
446
+
447
+
448
+
449
+ </div>
450
+
451
+ <br class="clear">
452
+
453
+ <footer>
454
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Sat Jul 23 2022 13:03:06 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
455
+ </footer>
456
+
457
+ <script>prettyPrint();</script>
458
+ <script src="scripts/polyfill.js"></script>
459
+ <script src="scripts/linenumber.js"></script>
460
+
461
+
462
+
463
+ </body>
464
+ </html>
@@ -0,0 +1,81 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Home - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ </head>
19
+ <body>
20
+
21
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
+ <label for="nav-trigger" class="navicon-button x">
23
+ <div class="navicon"></div>
24
+ </label>
25
+
26
+ <label for="nav-trigger" class="overlay"></label>
27
+
28
+ <nav >
29
+
30
+ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#WFtp">WFtp</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section class="package">
44
+ <h3> </h3>
45
+ </section>
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ </div>
67
+
68
+ <br class="clear">
69
+
70
+ <footer>
71
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Sat Jul 23 2022 13:03:06 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
72
+ </footer>
73
+
74
+ <script>prettyPrint();</script>
75
+ <script src="scripts/polyfill.js"></script>
76
+ <script src="scripts/linenumber.js"></script>
77
+
78
+
79
+
80
+ </body>
81
+ </html>