w-web-perm 1.1.3 → 1.1.5

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 (39) hide show
  1. package/README.md +1 -1
  2. package/dist/css/app.6918ec45.css +1 -0
  3. package/dist/css/{chunk-vendors.2bcfce08.css → chunk-vendors.80aa3ae8.css} +1 -1
  4. package/dist/index.tmp +2 -2
  5. package/dist/js/app-legacy.833f9566.js +1 -0
  6. package/dist/js/app.833f9566.js +1 -0
  7. package/dist/js/{chunk-vendors-legacy.77039410.js → chunk-vendors-legacy.fbf771bd.js} +16 -16
  8. package/dist/js/{chunk-vendors.77039410.js → chunk-vendors.fbf771bd.js} +16 -16
  9. package/dist/w-web-perm.umd.js +2 -2
  10. package/dist/w-web-perm.umd.js.map +1 -1
  11. package/docs/WWebPerm.html +7 -7
  12. package/docs/global.html +1545 -60
  13. package/docs/index.html +2 -2
  14. package/docs/server_WWebPerm.mjs.html +53 -30
  15. package/docs/server_maskLog.mjs.html +176 -0
  16. package/docs/server_procCore.mjs.html +2 -2
  17. package/docs/server_wrapInjected.mjs.html +163 -0
  18. package/docs/src_fetchJson.mjs.html +31 -5
  19. package/docs/src_js_legendFit.mjs.html +225 -0
  20. package/package.json +6 -6
  21. package/public/index.html +2 -0
  22. package/server/WWebPerm.mjs +51 -28
  23. package/server/maskLog.mjs +104 -0
  24. package/server/procLang.mjs +8 -0
  25. package/server/procStaInfor.mjs +32 -14
  26. package/server/wrapInjected.mjs +91 -0
  27. package/src/components/Layout.vue +566 -181
  28. package/src/components/LayoutContent.vue +1 -0
  29. package/src/components/LayoutContentStaInfor.vue +74 -5
  30. package/src/components/RelationChips.vue +11 -31
  31. package/src/fetchJson.mjs +28 -2
  32. package/src/getPerm.mjs +9 -6
  33. package/src/getPermUserInfor.mjs +12 -9
  34. package/src/js/legendFit.mjs +153 -0
  35. package/srv.mjs +20 -1
  36. package/tableTags-web-perm.json +1 -1
  37. package/dist/css/app.506ce4d8.css +0 -1
  38. package/dist/js/app-legacy.27090303.js +0 -1
  39. package/dist/js/app.27090303.js +0 -1
package/docs/global.html CHANGED
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -130,6 +130,488 @@
130
130
 
131
131
 
132
132
 
133
+ <h4 class="name" id="createLegendMeasurer"><span class="type-signature"></span>createLegendMeasurer<span class="signature">(echarts)</span><span class="type-signature"> &rarr; {Object}</span></h4>
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <dl class="details">
141
+
142
+ <dt class="tag-description">Description:</dt>
143
+ <dd class="tag-description"><ul class="dummy"><li><p>建立離屏量測器: 以未掛入DOM之echarts實例, 計算一般式圖例於指定寬度之排版</p>
144
+ <p>量測實例僅含圖例、隱藏之座標軸與同名空系列, 故顯示列表中「文字等於系列名」之元素即圖例項目(不會與軸刻度文字撞名)</p></li></ul></dd>
145
+
146
+
147
+
148
+ <dt class="tag-source">Source:</dt>
149
+ <dd class="tag-source"><ul class="dummy"><li>
150
+ <a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line59">line 59</a>
151
+ </li></ul></dd>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ </dl>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <h5 class="h5-parameters">Parameters:</h5>
198
+
199
+
200
+ <table class="params">
201
+ <thead>
202
+ <tr>
203
+
204
+ <th>Name</th>
205
+
206
+
207
+ <th>Type</th>
208
+
209
+
210
+
211
+
212
+
213
+ <th class="last">Description</th>
214
+ </tr>
215
+ </thead>
216
+
217
+ <tbody>
218
+
219
+
220
+ <tr>
221
+
222
+ <td class="name"><code>echarts</code></td>
223
+
224
+
225
+ <td class="type">
226
+
227
+
228
+ <span class="param-type">Object</span>
229
+
230
+
231
+
232
+
233
+ </td>
234
+
235
+
236
+
237
+
238
+
239
+ <td class="description last"><p>輸入echarts命名空間物件, 須與圖表同一份(例如w-echarts-vue之iniEcharts()), 字型與版面規則方能一致</p></td>
240
+ </tr>
241
+
242
+
243
+ </tbody>
244
+ </table>
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <h5 class="h5-returns">Returns:</h5>
262
+
263
+
264
+ <div class="param-desc">
265
+ <p>回傳物件, 含measure(names,width,height)與dispose(); measure回傳{rows,bottom}(bottom為圖例底緣距圖表頂之px), 量不到回null</p>
266
+ </div>
267
+
268
+
269
+
270
+ <dl class="param-type">
271
+ <dt>
272
+ Type
273
+ </dt>
274
+ <dd>
275
+
276
+ <span class="param-type">Object</span>
277
+
278
+
279
+
280
+ </dd>
281
+ </dl>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <h4 class="name" id="decideLegendType"><span class="type-signature"></span>decideLegendType<span class="signature">(m)</span><span class="type-signature"> &rarr; {String}</span></h4>
293
+
294
+
295
+
296
+
297
+
298
+
299
+ <dl class="details">
300
+
301
+ <dt class="tag-description">Description:</dt>
302
+ <dd class="tag-description"><ul class="dummy"><li><p>依量測結果決定圖例類型</p></li></ul></dd>
303
+
304
+
305
+
306
+ <dt class="tag-source">Source:</dt>
307
+ <dd class="tag-source"><ul class="dummy"><li>
308
+ <a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line43">line 43</a>
309
+ </li></ul></dd>
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+ </dl>
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+ <h5 class="h5-parameters">Parameters:</h5>
356
+
357
+
358
+ <table class="params">
359
+ <thead>
360
+ <tr>
361
+
362
+ <th>Name</th>
363
+
364
+
365
+ <th>Type</th>
366
+
367
+
368
+
369
+
370
+
371
+ <th class="last">Description</th>
372
+ </tr>
373
+ </thead>
374
+
375
+ <tbody>
376
+
377
+
378
+ <tr>
379
+
380
+ <td class="name"><code>m</code></td>
381
+
382
+
383
+ <td class="type">
384
+
385
+
386
+ <span class="param-type">Object</span>
387
+ |
388
+
389
+ <span class="param-type">null</span>
390
+
391
+
392
+
393
+
394
+ </td>
395
+
396
+
397
+
398
+
399
+
400
+ <td class="description last"><p>輸入量測結果物件{rows,bottom}, 量測失敗為null</p></td>
401
+ </tr>
402
+
403
+
404
+ </tbody>
405
+ </table>
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <h5 class="h5-returns">Returns:</h5>
423
+
424
+
425
+ <div class="param-desc">
426
+ <p>回傳'plain'或'scroll', 量測失敗回'scroll'(單列, 不會重疊)</p>
427
+ </div>
428
+
429
+
430
+
431
+ <dl class="param-type">
432
+ <dt>
433
+ Type
434
+ </dt>
435
+ <dd>
436
+
437
+ <span class="param-type">String</span>
438
+
439
+
440
+
441
+ </dd>
442
+ </dl>
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+ <h4 class="name" id="describeUpstream"><span class="type-signature"></span>describeUpstream<span class="signature">(err)</span><span class="type-signature"> &rarr; {Object}</span></h4>
454
+
455
+
456
+
457
+
458
+
459
+
460
+ <dl class="details">
461
+
462
+ <dt class="tag-description">Description:</dt>
463
+ <dd class="tag-description"><ul class="dummy"><li><p>描述上游失敗, 供寫入 log: 絕不含上游原文</p>
464
+ <ul>
465
+ <li>reject 值(字串)或其 message 屬白名單 key → { upstream: key }</li>
466
+ <li>其餘 → { upstreamType, upstreamName }: 型別(null / array / typeof)與名稱形狀之 Error.name(無則 '')</li>
467
+ </ul></li></ul></dd>
468
+
469
+
470
+
471
+ <dt class="tag-source">Source:</dt>
472
+ <dd class="tag-source"><ul class="dummy"><li>
473
+ <a href="server_wrapInjected.mjs.html">server/wrapInjected.mjs</a>, <a href="server_wrapInjected.mjs.html#line45">line 45</a>
474
+ </li></ul></dd>
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+ </dl>
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+ <h5 class="h5-parameters">Parameters:</h5>
521
+
522
+
523
+ <table class="params">
524
+ <thead>
525
+ <tr>
526
+
527
+ <th>Name</th>
528
+
529
+
530
+ <th>Type</th>
531
+
532
+
533
+
534
+
535
+
536
+ <th class="last">Description</th>
537
+ </tr>
538
+ </thead>
539
+
540
+ <tbody>
541
+
542
+
543
+ <tr>
544
+
545
+ <td class="name"><code>err</code></td>
546
+
547
+
548
+ <td class="type">
549
+
550
+
551
+ <span class="param-type">*</span>
552
+
553
+
554
+
555
+
556
+ </td>
557
+
558
+
559
+
560
+
561
+
562
+ <td class="description last"><p>輸入注入函數拋出或 reject 之值</p></td>
563
+ </tr>
564
+
565
+
566
+ </tbody>
567
+ </table>
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+ <h5 class="h5-returns">Returns:</h5>
585
+
586
+
587
+ <div class="param-desc">
588
+ <p>回傳描述物件</p>
589
+ </div>
590
+
591
+
592
+
593
+ <dl class="param-type">
594
+ <dt>
595
+ Type
596
+ </dt>
597
+ <dd>
598
+
599
+ <span class="param-type">Object</span>
600
+
601
+
602
+
603
+ </dd>
604
+ </dl>
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
133
615
  <h4 class="name" id="fetchJson"><span class="type-signature type-signature-async">(async) </span>fetchJson<span class="signature">(url, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
134
616
 
135
617
 
@@ -140,20 +622,913 @@
140
622
  <dl class="details">
141
623
 
142
624
  <dt class="tag-description">Description:</dt>
143
- <dd class="tag-description"><ul class="dummy"><li><p>以瀏覽器與 node(18+) 內建之 fetch 取得 JSON 回應, 取代 axios(2026-09-07 起本套件不再依賴 axios)</p>
144
- <p>與 axios 之語意對齊:</p>
145
- <ul>
146
- <li>網路錯誤或非 2xx: axios 會 reject, fetch 只在網路錯誤 reject, 故此處對 !res.ok 亦 reject, 統一為 { kind: 'request', status, message }</li>
147
- <li>回應非 JSON: axios 回原字串(呼叫端判 state 失敗), 此處 res.json() 失敗 reject { kind: 'parse', status, message }</li>
148
- <li>成功: resolve 解析後之 JSON(對應 axios 之 res.data)
149
- 注意: node 端 fetch(undici) 不讀 HTTP_PROXY / HTTPS_PROXY 環境變數(axios 會), 需走 proxy 之部署須自行以 opt.dispatcher 注入 undici Agent</li>
150
- </ul></li></ul></dd>
625
+ <dd class="tag-description"><ul class="dummy"><li><p>以瀏覽器與 node(18+) 內建之 fetch 取得 JSON 回應, 取代 axios(2026-09-07 起本套件不再依賴 axios)</p>
626
+ <p>與 axios 之語意對齊:</p>
627
+ <ul>
628
+ <li>網路錯誤或非 2xx: axios 會 reject, fetch 只在網路錯誤 reject, 故此處對 !res.ok 亦 reject, 統一為 { kind: 'request', status, message }</li>
629
+ <li>回應非 JSON: axios 回原字串(呼叫端判 state 失敗), 此處 res.json() 失敗 reject { kind: 'parse', status, message }</li>
630
+ <li>成功: resolve 解析後之 JSON(對應 axios 之 res.data)
631
+ reject 之 message 只含例外名稱與代碼(如 'TypeError ECONNREFUSED'、'SyntaxError')或 'HTTP <status>', 不含網址與回應本體(網址常帶權杖)
632
+ 注意: node 端 fetch(undici) 不讀 HTTP_PROXY / HTTPS_PROXY 環境變數(axios 會), 需走 proxy 之部署須自行以 opt.dispatcher 注入 undici Agent</li>
633
+ </ul></li></ul></dd>
634
+
635
+
636
+
637
+ <dt class="tag-source">Source:</dt>
638
+ <dd class="tag-source"><ul class="dummy"><li>
639
+ <a href="src_fetchJson.mjs.html">src/fetchJson.mjs</a>, <a href="src_fetchJson.mjs.html#line40">line 40</a>
640
+ </li></ul></dd>
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+ </dl>
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+ <h5 class="h5-parameters">Parameters:</h5>
687
+
688
+
689
+ <table class="params">
690
+ <thead>
691
+ <tr>
692
+
693
+ <th>Name</th>
694
+
695
+
696
+ <th>Type</th>
697
+
698
+
699
+ <th>Attributes</th>
700
+
701
+
702
+
703
+ <th>Default</th>
704
+
705
+
706
+ <th class="last">Description</th>
707
+ </tr>
708
+ </thead>
709
+
710
+ <tbody>
711
+
712
+
713
+ <tr>
714
+
715
+ <td class="name"><code>url</code></td>
716
+
717
+
718
+ <td class="type">
719
+
720
+
721
+ <span class="param-type">String</span>
722
+
723
+
724
+
725
+
726
+ </td>
727
+
728
+
729
+ <td class="attributes">
730
+
731
+
732
+
733
+
734
+
735
+ </td>
736
+
737
+
738
+
739
+ <td class="default">
740
+
741
+ </td>
742
+
743
+
744
+ <td class="description last"><p>輸入請求網址字串</p></td>
745
+ </tr>
746
+
747
+
748
+
749
+ <tr>
750
+
751
+ <td class="name"><code>opt</code></td>
752
+
753
+
754
+ <td class="type">
755
+
756
+
757
+ <span class="param-type">Object</span>
758
+
759
+
760
+
761
+
762
+ </td>
763
+
764
+
765
+ <td class="attributes">
766
+
767
+ &lt;optional><br>
768
+
769
+
770
+
771
+
772
+
773
+ </td>
774
+
775
+
776
+
777
+ <td class="default">
778
+
779
+ <code>{}</code>
780
+
781
+ </td>
782
+
783
+
784
+ <td class="description last"><p>輸入 fetch 選項物件(method / headers / body / signal / dispatcher 等原樣傳給 fetch), 預設 {}</p></td>
785
+ </tr>
786
+
787
+
788
+ </tbody>
789
+ </table>
790
+
791
+
792
+
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+ <h5 class="h5-returns">Returns:</h5>
807
+
808
+
809
+ <div class="param-desc">
810
+ <p>回傳 Promise, resolve 為 JSON 物件, reject 為 { kind: 'request'|'parse', status, message }</p>
811
+ </div>
812
+
813
+
814
+
815
+ <dl class="param-type">
816
+ <dt>
817
+ Type
818
+ </dt>
819
+ <dd>
820
+
821
+ <span class="param-type">Promise</span>
822
+
823
+
824
+
825
+ </dd>
826
+ </dl>
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+ <h4 class="name" id="genLegend"><span class="type-signature"></span>genLegend<span class="signature">(type<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
838
+
839
+
840
+
841
+
842
+
843
+
844
+ <dl class="details">
845
+
846
+ <dt class="tag-description">Description:</dt>
847
+ <dd class="tag-description"><ul class="dummy"><li><p>產生圖例設定(單一來源), genOpt 與執行期切換類型共用</p>
848
+ <p>切換類型(plain↔scroll)時 echarts 以新傳入之選項重建圖例模型(Global.js:322-344), 未帶之設定一律回到預設, 故每次都須帶齊</p></li></ul></dd>
849
+
850
+
851
+
852
+ <dt class="tag-source">Source:</dt>
853
+ <dd class="tag-source"><ul class="dummy"><li>
854
+ <a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line24">line 24</a>
855
+ </li></ul></dd>
856
+
857
+
858
+
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+ </dl>
888
+
889
+
890
+
891
+
892
+
893
+
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+ <h5 class="h5-parameters">Parameters:</h5>
902
+
903
+
904
+ <table class="params">
905
+ <thead>
906
+ <tr>
907
+
908
+ <th>Name</th>
909
+
910
+
911
+ <th>Type</th>
912
+
913
+
914
+ <th>Attributes</th>
915
+
916
+
917
+
918
+ <th>Default</th>
919
+
920
+
921
+ <th class="last">Description</th>
922
+ </tr>
923
+ </thead>
924
+
925
+ <tbody>
926
+
927
+
928
+ <tr>
929
+
930
+ <td class="name"><code>type</code></td>
931
+
932
+
933
+ <td class="type">
934
+
935
+
936
+ <span class="param-type">String</span>
937
+
938
+
939
+
940
+
941
+ </td>
942
+
943
+
944
+ <td class="attributes">
945
+
946
+ &lt;optional><br>
947
+
948
+
949
+
950
+
951
+
952
+ </td>
953
+
954
+
955
+
956
+ <td class="default">
957
+
958
+ <code>'plain'</code>
959
+
960
+ </td>
961
+
962
+
963
+ <td class="description last"><p>輸入圖例類型字串, 'plain'或'scroll', 預設'plain'</p></td>
964
+ </tr>
965
+
966
+
967
+ </tbody>
968
+ </table>
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+ <h5 class="h5-returns">Returns:</h5>
986
+
987
+
988
+ <div class="param-desc">
989
+ <p>回傳echarts之legend設定物件</p>
990
+ </div>
991
+
992
+
993
+
994
+ <dl class="param-type">
995
+ <dt>
996
+ Type
997
+ </dt>
998
+ <dd>
999
+
1000
+ <span class="param-type">Object</span>
1001
+
1002
+
1003
+
1004
+ </dd>
1005
+ </dl>
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ <h4 class="name" id="maskQuery"><span class="type-signature"></span>maskQuery<span class="signature">(q)</span><span class="type-signature"> &rarr; {Object|String|Array}</span></h4>
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+ <dl class="details">
1024
+
1025
+ <dt class="tag-description">Description:</dt>
1026
+ <dd class="tag-description"><ul class="dummy"><li><p>查詢參數遮罩: 淺拷貝, 鍵名小寫為 token 者以 maskTok 處理, 其餘原樣(供印出 req.query)
1027
+ 非物件輸入依 maskTok 處理</p></li></ul></dd>
1028
+
1029
+
1030
+
1031
+ <dt class="tag-source">Source:</dt>
1032
+ <dd class="tag-source"><ul class="dummy"><li>
1033
+ <a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line55">line 55</a>
1034
+ </li></ul></dd>
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+ </dl>
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+ <h5 class="h5-parameters">Parameters:</h5>
1081
+
1082
+
1083
+ <table class="params">
1084
+ <thead>
1085
+ <tr>
1086
+
1087
+ <th>Name</th>
1088
+
1089
+
1090
+ <th>Type</th>
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+ <th class="last">Description</th>
1097
+ </tr>
1098
+ </thead>
1099
+
1100
+ <tbody>
1101
+
1102
+
1103
+ <tr>
1104
+
1105
+ <td class="name"><code>q</code></td>
1106
+
1107
+
1108
+ <td class="type">
1109
+
1110
+
1111
+ <span class="param-type">*</span>
1112
+
1113
+
1114
+
1115
+
1116
+ </td>
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+ <td class="description last"><p>輸入查詢參數物件(Hapi 之 req.query 為 null-prototype 物件)</p></td>
1123
+ </tr>
1124
+
1125
+
1126
+ </tbody>
1127
+ </table>
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ <h5 class="h5-returns">Returns:</h5>
1145
+
1146
+
1147
+ <div class="param-desc">
1148
+ <p>回傳遮罩後之淺拷貝</p>
1149
+ </div>
1150
+
1151
+
1152
+
1153
+ <dl class="param-type">
1154
+ <dt>
1155
+ Type
1156
+ </dt>
1157
+ <dd>
1158
+
1159
+ <span class="param-type">Object</span>
1160
+ |
1161
+
1162
+ <span class="param-type">String</span>
1163
+ |
1164
+
1165
+ <span class="param-type">Array</span>
1166
+
1167
+
1168
+
1169
+ </dd>
1170
+ </dl>
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ <h4 class="name" id="maskTok"><span class="type-signature"></span>maskTok<span class="signature">(token)</span><span class="type-signature"> &rarr; {String|Array}</span></h4>
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+ <dl class="details">
1189
+
1190
+ <dt class="tag-description">Description:</dt>
1191
+ <dd class="tag-description"><ul class="dummy"><li><p>權杖遮罩</p>
1192
+ <ul>
1193
+ <li>空值(undefined / null / '')回 ''</li>
1194
+ <li>陣列逐元素遮罩</li>
1195
+ <li>字串(長度 n)露出前後各 k=min(4, floor(n/8)) 字: k=0 只回 '(len=n)', 否則 '前k...後k(len=n)'; 36 字元之 session token 為前 4 後 4(與 w-web-sso 格式相同)</li>
1196
+ <li>其他型別只回 '(typeof)', 絕不輸出原值</li>
1197
+ </ul></li></ul></dd>
1198
+
1199
+
1200
+
1201
+ <dt class="tag-source">Source:</dt>
1202
+ <dd class="tag-source"><ul class="dummy"><li>
1203
+ <a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line29">line 29</a>
1204
+ </li></ul></dd>
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ </dl>
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+ <h5 class="h5-parameters">Parameters:</h5>
1251
+
1252
+
1253
+ <table class="params">
1254
+ <thead>
1255
+ <tr>
1256
+
1257
+ <th>Name</th>
1258
+
1259
+
1260
+ <th>Type</th>
1261
+
1262
+
1263
+
1264
+
1265
+
1266
+ <th class="last">Description</th>
1267
+ </tr>
1268
+ </thead>
1269
+
1270
+ <tbody>
1271
+
1272
+
1273
+ <tr>
1274
+
1275
+ <td class="name"><code>token</code></td>
1276
+
1277
+
1278
+ <td class="type">
1279
+
1280
+
1281
+ <span class="param-type">*</span>
1282
+
1283
+
1284
+
1285
+
1286
+ </td>
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+ <td class="description last"><p>輸入權杖</p></td>
1293
+ </tr>
1294
+
1295
+
1296
+ </tbody>
1297
+ </table>
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+ <h5 class="h5-returns">Returns:</h5>
1315
+
1316
+
1317
+ <div class="param-desc">
1318
+ <p>回傳遮罩後字串, 輸入陣列時回傳陣列</p>
1319
+ </div>
1320
+
1321
+
1322
+
1323
+ <dl class="param-type">
1324
+ <dt>
1325
+ Type
1326
+ </dt>
1327
+ <dd>
1328
+
1329
+ <span class="param-type">String</span>
1330
+ |
1331
+
1332
+ <span class="param-type">Array</span>
1333
+
1334
+
1335
+
1336
+ </dd>
1337
+ </dl>
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+ <h4 class="name" id="maskUrl"><span class="type-signature"></span>maskUrl<span class="signature">(u)</span><span class="type-signature"> &rarr; {String|Array}</span></h4>
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+ <dl class="details">
1356
+
1357
+ <dt class="tag-description">Description:</dt>
1358
+ <dd class="tag-description"><ul class="dummy"><li><p>網址遮罩: http(s) 只留 origin + pathname, 捨棄 query / fragment / userinfo(其內常含權杖, 如 ?token=)</p>
1359
+ <ul>
1360
+ <li>陣列逐元素處理; 空值回 ''; 其他非字串只回 '(typeof)'</li>
1361
+ <li>非 http(s) 之網址(如 data:、javascript:)路徑即全部內容, 只回 protocol(同 w-web-sso src/maskUrl.mjs)</li>
1362
+ <li>無法解析回 '(invalid-url)'</li>
1363
+ </ul></li></ul></dd>
1364
+
1365
+
1366
+
1367
+ <dt class="tag-source">Source:</dt>
1368
+ <dd class="tag-source"><ul class="dummy"><li>
1369
+ <a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line76">line 76</a>
1370
+ </li></ul></dd>
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+ </dl>
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+ <h5 class="h5-parameters">Parameters:</h5>
1417
+
1418
+
1419
+ <table class="params">
1420
+ <thead>
1421
+ <tr>
1422
+
1423
+ <th>Name</th>
1424
+
1425
+
1426
+ <th>Type</th>
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+ <th class="last">Description</th>
1433
+ </tr>
1434
+ </thead>
1435
+
1436
+ <tbody>
1437
+
1438
+
1439
+ <tr>
1440
+
1441
+ <td class="name"><code>u</code></td>
1442
+
1443
+
1444
+ <td class="type">
1445
+
1446
+
1447
+ <span class="param-type">*</span>
1448
+
1449
+
1450
+
1451
+
1452
+ </td>
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+ <td class="description last"><p>輸入網址</p></td>
1459
+ </tr>
1460
+
1461
+
1462
+ </tbody>
1463
+ </table>
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+ <h5 class="h5-returns">Returns:</h5>
1481
+
1482
+
1483
+ <div class="param-desc">
1484
+ <p>回傳可寫入 log 之字串, 輸入陣列時回傳陣列</p>
1485
+ </div>
1486
+
1487
+
1488
+
1489
+ <dl class="param-type">
1490
+ <dt>
1491
+ Type
1492
+ </dt>
1493
+ <dd>
1494
+
1495
+ <span class="param-type">String</span>
1496
+ |
1497
+
1498
+ <span class="param-type">Array</span>
1499
+
1500
+
1501
+
1502
+ </dd>
1503
+ </dl>
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+ <h4 class="name" id="mergePickKeysOnly"><span class="type-signature"></span>mergePickKeysOnly<span class="signature">(ltdtDb, rowsIn, keyDetect, pickKeys)</span><span class="type-signature"> &rarr; {Array}</span></h4>
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+ <dl class="details">
1522
+
1523
+ <dt class="tag-description">Description:</dt>
1524
+ <dd class="tag-description"><ul class="dummy"><li><p>僅採納既有列之指定欄位變更, 其餘欄位、新增列、缺列(刪除)與順序一律以資料庫現值為準</p>
1525
+ <p>用於 modeEditUsers='for:grups': 使用者身分由外部單一登入系統同步, 本系統只擁有群組指派(cgrups), 故 API 層須與 UI 一致只接受 cgrups 變更</p></li></ul></dd>
151
1526
 
152
1527
 
153
1528
 
154
1529
  <dt class="tag-source">Source:</dt>
155
1530
  <dd class="tag-source"><ul class="dummy"><li>
156
- <a href="src_fetchJson.mjs.html">src/fetchJson.mjs</a>, <a href="src_fetchJson.mjs.html#line14">line 14</a>
1531
+ <a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line26">line 26</a>
157
1532
  </li></ul></dd>
158
1533
 
159
1534
 
@@ -213,12 +1588,8 @@
213
1588
  <th>Type</th>
214
1589
 
215
1590
 
216
- <th>Attributes</th>
217
-
218
1591
 
219
1592
 
220
- <th>Default</th>
221
-
222
1593
 
223
1594
  <th class="last">Description</th>
224
1595
  </tr>
@@ -229,13 +1600,13 @@
229
1600
 
230
1601
  <tr>
231
1602
 
232
- <td class="name"><code>url</code></td>
1603
+ <td class="name"><code>ltdtDb</code></td>
233
1604
 
234
1605
 
235
1606
  <td class="type">
236
1607
 
237
1608
 
238
- <span class="param-type">String</span>
1609
+ <span class="param-type">Array</span>
239
1610
 
240
1611
 
241
1612
 
@@ -243,35 +1614,47 @@
243
1614
  </td>
244
1615
 
245
1616
 
246
- <td class="attributes">
247
-
248
1617
 
249
-
1618
+
250
1619
 
251
-
252
- </td>
1620
+ <td class="description last"><p>資料庫現有列(select 結果, 依 order 排序後為基底)</p></td>
1621
+ </tr>
1622
+
1623
+
1624
+
1625
+ <tr>
1626
+
1627
+ <td class="name"><code>rowsIn</code></td>
253
1628
 
254
1629
 
1630
+ <td class="type">
255
1631
 
256
- <td class="default">
257
1632
 
258
- </td>
1633
+ <span class="param-type">Array</span>
1634
+
1635
+
1636
+
259
1637
 
1638
+ </td>
260
1639
 
261
- <td class="description last"><p>輸入請求網址字串</p></td>
1640
+
1641
+
1642
+
1643
+
1644
+ <td class="description last"><p>前端/外部送入之整表列</p></td>
262
1645
  </tr>
263
1646
 
264
1647
 
265
1648
 
266
1649
  <tr>
267
1650
 
268
- <td class="name"><code>opt</code></td>
1651
+ <td class="name"><code>keyDetect</code></td>
269
1652
 
270
1653
 
271
1654
  <td class="type">
272
1655
 
273
1656
 
274
- <span class="param-type">Object</span>
1657
+ <span class="param-type">String</span>
275
1658
 
276
1659
 
277
1660
 
@@ -279,26 +1662,34 @@
279
1662
  </td>
280
1663
 
281
1664
 
282
- <td class="attributes">
283
-
284
- &lt;optional><br>
285
-
286
1665
 
287
-
1666
+
288
1667
 
289
-
290
- </td>
1668
+ <td class="description last"><p>對應列之鍵欄位(如 'id')</p></td>
1669
+ </tr>
1670
+
1671
+
1672
+
1673
+ <tr>
1674
+
1675
+ <td class="name"><code>pickKeys</code></td>
291
1676
 
292
1677
 
1678
+ <td class="type">
293
1679
 
294
- <td class="default">
295
-
296
- <code>{}</code>
297
1680
 
298
- </td>
1681
+ <span class="param-type">Array</span>
1682
+
1683
+
1684
+
299
1685
 
1686
+ </td>
300
1687
 
301
- <td class="description last"><p>輸入 fetch 選項物件(method / headers / body / signal / dispatcher 等原樣傳給 fetch), 預設 {}</p></td>
1688
+
1689
+
1690
+
1691
+
1692
+ <td class="description last"><p>允許採納之欄位名陣列(如 ['cgrups'])</p></td>
302
1693
  </tr>
303
1694
 
304
1695
 
@@ -324,7 +1715,7 @@
324
1715
 
325
1716
 
326
1717
  <div class="param-desc">
327
- <p>回傳 Promise, resolve 為 JSON 物件, reject 為 { kind: 'request'|'parse', status, message }</p>
1718
+ <p>以資料庫列為基底、僅覆蓋 pickKeys 之新列陣列(順序同資料庫)</p>
328
1719
  </div>
329
1720
 
330
1721
 
@@ -335,7 +1726,7 @@
335
1726
  </dt>
336
1727
  <dd>
337
1728
 
338
- <span class="param-type">Promise</span>
1729
+ <span class="param-type">Array</span>
339
1730
 
340
1731
 
341
1732
 
@@ -351,7 +1742,7 @@
351
1742
 
352
1743
 
353
1744
 
354
- <h4 class="name" id="mergePickKeysOnly"><span class="type-signature"></span>mergePickKeysOnly<span class="signature">(ltdtDb, rowsIn, keyDetect, pickKeys)</span><span class="type-signature"> &rarr; {Array}</span></h4>
1745
+ <h4 class="name" id="wrapInjected"><span class="type-signature"></span>wrapInjected<span class="signature">(fn, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
355
1746
 
356
1747
 
357
1748
 
@@ -361,14 +1752,14 @@
361
1752
  <dl class="details">
362
1753
 
363
1754
  <dt class="tag-description">Description:</dt>
364
- <dd class="tag-description"><ul class="dummy"><li><p>僅採納既有列之指定欄位變更, 其餘欄位、新增列、缺列(刪除)與順序一律以資料庫現值為準</p>
365
- <p>用於 modeEditUsers='for:grups': 使用者身分由外部單一登入系統同步, 本系統只擁有群組指派(cgrups), 故 API 層須與 UI 一致只接受 cgrups 變更</p></li></ul></dd>
1755
+ <dd class="tag-description"><ul class="dummy"><li><p>包裝注入函數: 回傳(同步或 Promise)原樣回傳; 同步拋錯或 reject 回 failValue, 並以 describeUpstream(err) 呼叫 onFail
1756
+ 包裝後一律回 Promise(呼叫端既有之 ispm 判斷照常)</p></li></ul></dd>
366
1757
 
367
1758
 
368
1759
 
369
1760
  <dt class="tag-source">Source:</dt>
370
1761
  <dd class="tag-source"><ul class="dummy"><li>
371
- <a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line26">line 26</a>
1762
+ <a href="server_wrapInjected.mjs.html">server/wrapInjected.mjs</a>, <a href="server_wrapInjected.mjs.html#line67">line 67</a>
372
1763
  </li></ul></dd>
373
1764
 
374
1765
 
@@ -428,8 +1819,12 @@
428
1819
  <th>Type</th>
429
1820
 
430
1821
 
1822
+ <th>Attributes</th>
1823
+
431
1824
 
432
1825
 
1826
+ <th>Default</th>
1827
+
433
1828
 
434
1829
  <th class="last">Description</th>
435
1830
  </tr>
@@ -440,13 +1835,13 @@
440
1835
 
441
1836
  <tr>
442
1837
 
443
- <td class="name"><code>ltdtDb</code></td>
1838
+ <td class="name"><code>fn</code></td>
444
1839
 
445
1840
 
446
1841
  <td class="type">
447
1842
 
448
1843
 
449
- <span class="param-type">Array</span>
1844
+ <span class="param-type">function</span>
450
1845
 
451
1846
 
452
1847
 
@@ -454,23 +1849,35 @@
454
1849
  </td>
455
1850
 
456
1851
 
1852
+ <td class="attributes">
1853
+
1854
+
1855
+
457
1856
 
1857
+
1858
+ </td>
458
1859
 
459
1860
 
460
- <td class="description last"><p>資料庫現有列(select 結果, 依 order 排序後為基底)</p></td>
1861
+
1862
+ <td class="default">
1863
+
1864
+ </td>
1865
+
1866
+
1867
+ <td class="description last"><p>輸入注入函數</p></td>
461
1868
  </tr>
462
1869
 
463
1870
 
464
1871
 
465
1872
  <tr>
466
1873
 
467
- <td class="name"><code>rowsIn</code></td>
1874
+ <td class="name"><code>opt</code></td>
468
1875
 
469
1876
 
470
1877
  <td class="type">
471
1878
 
472
1879
 
473
- <span class="param-type">Array</span>
1880
+ <span class="param-type">Object</span>
474
1881
 
475
1882
 
476
1883
 
@@ -478,23 +1885,62 @@
478
1885
  </td>
479
1886
 
480
1887
 
1888
+ <td class="attributes">
1889
+
1890
+ &lt;optional><br>
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+ </td>
1897
+
481
1898
 
482
1899
 
1900
+ <td class="default">
1901
+
1902
+ <code>{}</code>
1903
+
1904
+ </td>
1905
+
483
1906
 
484
- <td class="description last"><p>前端/外部送入之整表列</p></td>
485
- </tr>
1907
+ <td class="description last"><p>輸入設定物件</p>
1908
+ <h6>Properties</h6>
1909
+
1910
+
1911
+ <table class="params">
1912
+ <thead>
1913
+ <tr>
1914
+
1915
+ <th>Name</th>
1916
+
1917
+
1918
+ <th>Type</th>
1919
+
1920
+
1921
+ <th>Attributes</th>
1922
+
1923
+
1924
+
1925
+ <th>Default</th>
1926
+
1927
+
1928
+ <th class="last">Description</th>
1929
+ </tr>
1930
+ </thead>
486
1931
 
1932
+ <tbody>
487
1933
 
488
1934
 
489
1935
  <tr>
490
1936
 
491
- <td class="name"><code>keyDetect</code></td>
1937
+ <td class="name"><code>failValue</code></td>
492
1938
 
493
1939
 
494
1940
  <td class="type">
495
1941
 
496
1942
 
497
- <span class="param-type">String</span>
1943
+ <span class="param-type">*</span>
498
1944
 
499
1945
 
500
1946
 
@@ -502,23 +1948,39 @@
502
1948
  </td>
503
1949
 
504
1950
 
1951
+ <td class="attributes">
1952
+
1953
+ &lt;optional><br>
1954
+
1955
+
1956
+
505
1957
 
1958
+
1959
+ </td>
506
1960
 
507
1961
 
508
- <td class="description last"><p>對應列之鍵欄位(如 'id')</p></td>
1962
+
1963
+ <td class="default">
1964
+
1965
+ <code>null</code>
1966
+
1967
+ </td>
1968
+
1969
+
1970
+ <td class="description last"><p>輸入失敗時之回傳值(getUserByToken 為 null 等同查無, verify* 為 false 等同無權限)</p></td>
509
1971
  </tr>
510
1972
 
511
1973
 
512
1974
 
513
1975
  <tr>
514
1976
 
515
- <td class="name"><code>pickKeys</code></td>
1977
+ <td class="name"><code>onFail</code></td>
516
1978
 
517
1979
 
518
1980
  <td class="type">
519
1981
 
520
1982
 
521
- <span class="param-type">Array</span>
1983
+ <span class="param-type">function</span>
522
1984
 
523
1985
 
524
1986
 
@@ -526,10 +1988,33 @@
526
1988
  </td>
527
1989
 
528
1990
 
1991
+ <td class="attributes">
1992
+
1993
+ &lt;optional><br>
1994
+
1995
+
1996
+
529
1997
 
1998
+
1999
+ </td>
530
2000
 
531
2001
 
532
- <td class="description last"><p>允許採納之欄位名陣列(如 ['cgrups'])</p></td>
2002
+
2003
+ <td class="default">
2004
+
2005
+ <code>null</code>
2006
+
2007
+ </td>
2008
+
2009
+
2010
+ <td class="description last"><p>輸入失敗時之紀錄函數, 只收到 describeUpstream 之結果(收不到上游原文); 其自身拋錯不影響回傳</p></td>
2011
+ </tr>
2012
+
2013
+
2014
+ </tbody>
2015
+ </table>
2016
+
2017
+ </td>
533
2018
  </tr>
534
2019
 
535
2020
 
@@ -555,7 +2040,7 @@
555
2040
 
556
2041
 
557
2042
  <div class="param-desc">
558
- <p>以資料庫列為基底、僅覆蓋 pickKeys 之新列陣列(順序同資料庫)</p>
2043
+ <p>回傳包裝後之函數</p>
559
2044
  </div>
560
2045
 
561
2046
 
@@ -566,7 +2051,7 @@
566
2051
  </dt>
567
2052
  <dd>
568
2053
 
569
- <span class="param-type">Array</span>
2054
+ <span class="param-type">function</span>
570
2055
 
571
2056
 
572
2057
 
@@ -597,7 +2082,7 @@
597
2082
  <br class="clear">
598
2083
 
599
2084
  <footer>
600
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Sep 22 2026 22:36:22 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2085
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 27 2026 16:30:14 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
601
2086
  </footer>
602
2087
 
603
2088
  <script>prettyPrint();</script>