w-web-api 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 (78) 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 +62 -0
  7. package/SECURITY.md +5 -0
  8. package/babel.config.js +14 -0
  9. package/dist/w-web-api.umd.js +7 -0
  10. package/dist/w-web-api.umd.js.map +1 -0
  11. package/docs/WWebApi.html +551 -0
  12. package/docs/WWebApi.mjs.html +335 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  18. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  19. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  20. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  28. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  29. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  30. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  31. package/docs/index.html +81 -0
  32. package/docs/scripts/collapse.js +20 -0
  33. package/docs/scripts/linenumber.js +25 -0
  34. package/docs/scripts/nav.js +12 -0
  35. package/docs/scripts/polyfill.js +4 -0
  36. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  37. package/docs/scripts/prettify/lang-css.js +2 -0
  38. package/docs/scripts/prettify/prettify.js +28 -0
  39. package/docs/scripts/search.js +83 -0
  40. package/docs/styles/jsdoc.css +765 -0
  41. package/docs/styles/prettify.css +79 -0
  42. package/package.json +81 -0
  43. package/public/connecting.svg +10 -0
  44. package/public/deny.png +0 -0
  45. package/public/disconnect.png +0 -0
  46. package/public/index.html +23 -0
  47. package/public/logout.png +0 -0
  48. package/server/WWebApi.mjs +283 -0
  49. package/server/getSettings.mjs +17 -0
  50. package/server/mDb.mjs +76 -0
  51. package/server/mInitialTestData.mjs +40 -0
  52. package/server/mOrm.mjs +22 -0
  53. package/src/App.vue +91 -0
  54. package/src/components/Layout.vue +131 -0
  55. package/src/components/LayoutContent.vue +67 -0
  56. package/src/components/LayoutContentList.vue +573 -0
  57. package/src/components/MdPanel.vue +152 -0
  58. package/src/main.js +98 -0
  59. package/src/plugins/mDataSelectorSchema.mjs +30 -0
  60. package/src/plugins/mDataSupport.mjs +78 -0
  61. package/src/plugins/mShare.mjs +235 -0
  62. package/src/plugins/mUI.mjs +141 -0
  63. package/src/plugins/mVuetify.mjs +12 -0
  64. package/src/schema/gi.mjs +8 -0
  65. package/src/schema/index.mjs +16 -0
  66. package/src/schema/tables/apis.mjs +918 -0
  67. package/src/store/actions.mjs +1 -0
  68. package/src/store/getters.mjs +1 -0
  69. package/src/store/index.mjs +25 -0
  70. package/src/store/mutations.mjs +185 -0
  71. package/src/store/types.mjs +14 -0
  72. package/srv.mjs +33 -0
  73. package/tableTags.json +1 -0
  74. package/toolg/addVersion.mjs +4 -0
  75. package/toolg/cleanFolder.mjs +4 -0
  76. package/toolg/gDistRollup.mjs +34 -0
  77. package/toolg/modifyReadme.mjs +4 -0
  78. package/vue.config.js +15 -0
@@ -0,0 +1,551 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>WWebApi - 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>Classes</h3><ul><li><a href="WWebApi.html">WWebApi</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+ <h1 class="page-title">WWebApi</h1>
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section>
44
+
45
+ <header>
46
+
47
+ <h2>
48
+ WWebApi
49
+ </h2>
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+ <div class="container-overview">
57
+
58
+
59
+
60
+
61
+
62
+ <h4 class="name" id="WWebApi"><span class="type-signature">(async) </span>new WWebApi<span class="signature">(opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
63
+
64
+
65
+
66
+
67
+
68
+
69
+ <dl class="details">
70
+
71
+
72
+ <dt class="tag-source">Source:</dt>
73
+ <dd class="tag-source"><ul class="dummy"><li>
74
+ <a href="WWebApi.mjs.html">WWebApi.mjs</a>, <a href="WWebApi.mjs.html#line34">line 34</a>
75
+ </li></ul></dd>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </dl>
108
+
109
+
110
+
111
+
112
+
113
+ <div class="description usertext">
114
+ <p>基於hapi之API伺服器</p>
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h5>Example</h5>
126
+
127
+ <pre class="prettyprint"><code></code></pre>
128
+
129
+
130
+
131
+
132
+ <h5>Parameters:</h5>
133
+
134
+
135
+ <table class="params">
136
+ <thead>
137
+ <tr>
138
+
139
+ <th>Name</th>
140
+
141
+
142
+ <th>Type</th>
143
+
144
+
145
+ <th>Attributes</th>
146
+
147
+
148
+
149
+ <th>Default</th>
150
+
151
+
152
+ <th class="last">Description</th>
153
+ </tr>
154
+ </thead>
155
+
156
+ <tbody>
157
+
158
+
159
+ <tr>
160
+
161
+ <td class="name"><code>opt</code></td>
162
+
163
+
164
+ <td class="type">
165
+
166
+
167
+ <span class="param-type">Object</span>
168
+
169
+
170
+
171
+ </td>
172
+
173
+
174
+ <td class="attributes">
175
+
176
+ &lt;optional><br>
177
+
178
+
179
+
180
+
181
+
182
+ </td>
183
+
184
+
185
+
186
+ <td class="default">
187
+
188
+ <code>{}</code>
189
+
190
+ </td>
191
+
192
+
193
+ <td class="description last"><p>輸入設定物件,預設{}</p>
194
+ <h6>Properties</h6>
195
+
196
+
197
+ <table class="params">
198
+ <thead>
199
+ <tr>
200
+
201
+ <th>Name</th>
202
+
203
+
204
+ <th>Type</th>
205
+
206
+
207
+ <th>Attributes</th>
208
+
209
+
210
+
211
+ <th>Default</th>
212
+
213
+
214
+ <th class="last">Description</th>
215
+ </tr>
216
+ </thead>
217
+
218
+ <tbody>
219
+
220
+
221
+ <tr>
222
+
223
+ <td class="name"><code>url</code></td>
224
+
225
+
226
+ <td class="type">
227
+
228
+
229
+ <span class="param-type">String</span>
230
+
231
+
232
+
233
+ </td>
234
+
235
+
236
+ <td class="attributes">
237
+
238
+ &lt;optional><br>
239
+
240
+
241
+
242
+
243
+
244
+ </td>
245
+
246
+
247
+
248
+ <td class="default">
249
+
250
+ <code>''</code>
251
+
252
+ </td>
253
+
254
+
255
+ <td class="description last"><p>輸入資料庫連線字串,例如'mongodb://sername:password@$127.0.0.1:27017'</p></td>
256
+ </tr>
257
+
258
+
259
+
260
+ <tr>
261
+
262
+ <td class="name"><code>db</code></td>
263
+
264
+
265
+ <td class="type">
266
+
267
+
268
+ <span class="param-type">String</span>
269
+
270
+
271
+
272
+ </td>
273
+
274
+
275
+ <td class="attributes">
276
+
277
+ &lt;optional><br>
278
+
279
+
280
+
281
+
282
+
283
+ </td>
284
+
285
+
286
+
287
+ <td class="default">
288
+
289
+ <code>''</code>
290
+
291
+ </td>
292
+
293
+
294
+ <td class="description last"><p>輸入資料庫名稱字串,預設''</p></td>
295
+ </tr>
296
+
297
+
298
+
299
+ <tr>
300
+
301
+ <td class="name"><code>serverPort</code></td>
302
+
303
+
304
+ <td class="type">
305
+
306
+
307
+ <span class="param-type">Integer</span>
308
+
309
+
310
+
311
+ </td>
312
+
313
+
314
+ <td class="attributes">
315
+
316
+ &lt;optional><br>
317
+
318
+
319
+
320
+
321
+
322
+ </td>
323
+
324
+
325
+
326
+ <td class="default">
327
+
328
+ <code>8080</code>
329
+
330
+ </td>
331
+
332
+
333
+ <td class="description last"><p>輸入伺服器通訊port,預設8080</p></td>
334
+ </tr>
335
+
336
+
337
+
338
+ <tr>
339
+
340
+ <td class="name"><code>getUserById</code></td>
341
+
342
+
343
+ <td class="type">
344
+
345
+
346
+ <span class="param-type">function</span>
347
+
348
+
349
+
350
+ </td>
351
+
352
+
353
+ <td class="attributes">
354
+
355
+ &lt;optional><br>
356
+
357
+
358
+
359
+
360
+
361
+ </td>
362
+
363
+
364
+
365
+ <td class="default">
366
+
367
+ <code>null</code>
368
+
369
+ </td>
370
+
371
+
372
+ <td class="description last"><p>輸入當bCheckUser=true時依照使用者ID取得使用者資訊物件函數,預設null</p></td>
373
+ </tr>
374
+
375
+
376
+
377
+ <tr>
378
+
379
+ <td class="name"><code>bCheckUser</code></td>
380
+
381
+
382
+ <td class="type">
383
+
384
+
385
+ <span class="param-type">Boolean</span>
386
+
387
+
388
+
389
+ </td>
390
+
391
+
392
+ <td class="attributes">
393
+
394
+ &lt;optional><br>
395
+
396
+
397
+
398
+
399
+
400
+ </td>
401
+
402
+
403
+
404
+ <td class="default">
405
+
406
+ <code>true</code>
407
+
408
+ </td>
409
+
410
+
411
+ <td class="description last"><p>輸入是否檢查使用者資訊布林值,預設true</p></td>
412
+ </tr>
413
+
414
+
415
+
416
+ <tr>
417
+
418
+ <td class="name"><code>bExcludeWhenNotAdmin</code></td>
419
+
420
+
421
+ <td class="type">
422
+
423
+
424
+ <span class="param-type">Boolean</span>
425
+
426
+
427
+
428
+ </td>
429
+
430
+
431
+ <td class="attributes">
432
+
433
+ &lt;optional><br>
434
+
435
+
436
+
437
+
438
+
439
+ </td>
440
+
441
+
442
+
443
+ <td class="default">
444
+
445
+ <code>true</code>
446
+
447
+ </td>
448
+
449
+
450
+ <td class="description last"><p>輸入使用ORM的select方法時是否自動刪除數據內isActive欄位之布林值,預設true</p></td>
451
+ </tr>
452
+
453
+
454
+ </tbody>
455
+ </table>
456
+
457
+ </td>
458
+ </tr>
459
+
460
+
461
+ </tbody>
462
+ </table>
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+ <h5>Returns:</h5>
480
+
481
+
482
+ <div class="param-desc">
483
+ <p>回傳物件,其內server為hapi伺服器實體,wsrv為w-converhp的伺服器事件物件,wsds為w-serv-webdata的伺服器事件物件,可監聽error事件</p>
484
+ </div>
485
+
486
+
487
+
488
+ <dl class="param-type">
489
+ <dt>
490
+ Type
491
+ </dt>
492
+ <dd>
493
+
494
+ <span class="param-type">Object</span>
495
+
496
+
497
+ </dd>
498
+ </dl>
499
+
500
+
501
+
502
+
503
+
504
+
505
+ </div>
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+ </article>
528
+
529
+ </section>
530
+
531
+
532
+
533
+
534
+
535
+
536
+ </div>
537
+
538
+ <br class="clear">
539
+
540
+ <footer>
541
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Thu Apr 14 2022 12:34:37 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
542
+ </footer>
543
+
544
+ <script>prettyPrint();</script>
545
+ <script src="scripts/polyfill.js"></script>
546
+ <script src="scripts/linenumber.js"></script>
547
+
548
+
549
+
550
+ </body>
551
+ </html>