docpouch-client 1.1.3 → 1.2.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.
@@ -23,30 +23,30 @@
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
- <span class="strong">63.89% </span>
26
+ <span class="strong">56.74% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>446/698</span>
28
+ <span class='fraction'>446/786</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">48.54% </span>
33
+ <span class="strong">42.16% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>234/482</span>
35
+ <span class='fraction'>234/555</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
- <span class="strong">80.53% </span>
40
+ <span class="strong">74.59% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>91/113</span>
42
+ <span class='fraction'>91/122</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">67.08% </span>
47
+ <span class="strong">59.25% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>432/644</span>
49
+ <span class='fraction'>432/729</span>
50
50
  </div>
51
51
 
52
52
 
@@ -79,18 +79,18 @@
79
79
  </tr>
80
80
  </thead>
81
81
  <tbody><tr>
82
- <td class="file medium" data-value="src"><a href="src/index.html">src</a></td>
83
- <td data-value="53.17" class="pic medium">
84
- <div class="chart"><div class="cover-fill" style="width: 53%"></div><div class="cover-empty" style="width: 47%"></div></div>
82
+ <td class="file low" data-value="src"><a href="src/index.html">src</a></td>
83
+ <td data-value="43.13" class="pic low">
84
+ <div class="chart"><div class="cover-fill" style="width: 43%"></div><div class="cover-empty" style="width: 57%"></div></div>
85
85
  </td>
86
- <td data-value="53.17" class="pct medium">53.17%</td>
87
- <td data-value="378" class="abs medium">201/378</td>
88
- <td data-value="42.9" class="pct low">42.9%</td>
89
- <td data-value="275" class="abs low">118/275</td>
90
- <td data-value="76.19" class="pct medium">76.19%</td>
91
- <td data-value="63" class="abs medium">48/63</td>
92
- <td data-value="53.59" class="pct medium">53.59%</td>
93
- <td data-value="362" class="abs medium">194/362</td>
86
+ <td data-value="43.13" class="pct low">43.13%</td>
87
+ <td data-value="466" class="abs low">201/466</td>
88
+ <td data-value="33.9" class="pct low">33.9%</td>
89
+ <td data-value="348" class="abs low">118/348</td>
90
+ <td data-value="66.66" class="pct medium">66.66%</td>
91
+ <td data-value="72" class="abs medium">48/72</td>
92
+ <td data-value="43.4" class="pct low">43.4%</td>
93
+ <td data-value="447" class="abs low">194/447</td>
94
94
  </tr>
95
95
 
96
96
  <tr>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2026-06-08T21:00:52.221Z
119
+ at 2026-07-05T08:03:42.223Z
120
120
  </div>
121
121
  <script src="prettify.js"></script>
122
122
  <script>
@@ -36,34 +36,43 @@ FN:702,(anonymous_32)
36
36
  FN:709,(anonymous_33)
37
37
  FN:716,(anonymous_34)
38
38
  FN:726,(anonymous_35)
39
- FN:807,(anonymous_36)
40
- FN:818,(anonymous_37)
41
- FN:830,(anonymous_38)
42
- FN:841,(anonymous_39)
43
- FN:850,(anonymous_40)
44
- FN:852,(anonymous_41)
45
- FN:857,(anonymous_42)
46
- FN:862,(anonymous_43)
47
- FN:867,(anonymous_44)
48
- FN:878,(anonymous_45)
49
- FN:912,(anonymous_46)
50
- FN:926,(anonymous_47)
51
- FN:956,(anonymous_48)
52
- FN:962,(anonymous_49)
53
- FN:1004,(anonymous_50)
54
- FN:1009,(anonymous_51)
55
- FN:1018,(anonymous_52)
56
- FN:1029,(anonymous_53)
57
- FN:1041,(anonymous_54)
58
- FN:1047,(anonymous_55)
59
- FN:1078,(anonymous_56)
60
- FN:1082,(anonymous_57)
61
- FN:1085,(anonymous_58)
62
- FN:1095,(anonymous_59)
63
- FN:1098,(anonymous_60)
64
- FN:1106,(anonymous_61)
65
- FN:1113,(anonymous_62)
66
- FNF:63
39
+ FN:812,(anonymous_36)
40
+ FN:823,(anonymous_37)
41
+ FN:835,(anonymous_38)
42
+ FN:846,(anonymous_39)
43
+ FN:855,(anonymous_40)
44
+ FN:857,(anonymous_41)
45
+ FN:862,(anonymous_42)
46
+ FN:867,(anonymous_43)
47
+ FN:872,(anonymous_44)
48
+ FN:883,(anonymous_45)
49
+ FN:917,(anonymous_46)
50
+ FN:931,(anonymous_47)
51
+ FN:961,(anonymous_48)
52
+ FN:967,(anonymous_49)
53
+ FN:1009,(anonymous_50)
54
+ FN:1014,(anonymous_51)
55
+ FN:1023,(anonymous_52)
56
+ FN:1034,(anonymous_53)
57
+ FN:1046,(anonymous_54)
58
+ FN:1052,(anonymous_55)
59
+ FN:1083,(anonymous_56)
60
+ FN:1087,(anonymous_57)
61
+ FN:1090,(anonymous_58)
62
+ FN:1100,(anonymous_59)
63
+ FN:1103,(anonymous_60)
64
+ FN:1111,(anonymous_61)
65
+ FN:1118,(anonymous_62)
66
+ FN:1140,(anonymous_63)
67
+ FN:1162,(anonymous_64)
68
+ FN:1195,(anonymous_65)
69
+ FN:1254,(anonymous_66)
70
+ FN:1309,(anonymous_67)
71
+ FN:1325,(anonymous_68)
72
+ FN:1337,(anonymous_69)
73
+ FN:1361,(anonymous_70)
74
+ FN:1396,(anonymous_71)
75
+ FNF:72
67
76
  FNH:48
68
77
  FNDA:69,(anonymous_0)
69
78
  FNDA:7,(anonymous_1)
@@ -128,6 +137,15 @@ FNDA:3,(anonymous_59)
128
137
  FNDA:96,(anonymous_60)
129
138
  FNDA:0,(anonymous_61)
130
139
  FNDA:2,(anonymous_62)
140
+ FNDA:0,(anonymous_63)
141
+ FNDA:0,(anonymous_64)
142
+ FNDA:0,(anonymous_65)
143
+ FNDA:0,(anonymous_66)
144
+ FNDA:0,(anonymous_67)
145
+ FNDA:0,(anonymous_68)
146
+ FNDA:0,(anonymous_69)
147
+ FNDA:0,(anonymous_70)
148
+ FNDA:0,(anonymous_71)
131
149
  DA:45,69
132
150
  DA:52,69
133
151
  DA:53,69
@@ -345,57 +363,56 @@ DA:717,1
345
363
  DA:728,0
346
364
  DA:732,0
347
365
  DA:733,0
348
- DA:737,0
349
366
  DA:738,0
350
- DA:741,0
367
+ DA:739,0
368
+ DA:742,0
351
369
  DA:743,0
352
- DA:744,0
353
370
  DA:746,0
354
- DA:750,0
355
- DA:752,0
356
- DA:753,0
357
- DA:756,0
371
+ DA:748,0
372
+ DA:749,0
373
+ DA:751,0
374
+ DA:755,0
358
375
  DA:757,0
359
376
  DA:758,0
360
- DA:759,0
361
- DA:760,0
362
- DA:766,0
363
- DA:769,0
364
- DA:770,0
365
- DA:772,0
366
- DA:773,0
367
- DA:776,0
377
+ DA:761,0
378
+ DA:762,0
379
+ DA:763,0
380
+ DA:764,0
381
+ DA:765,0
382
+ DA:771,0
383
+ DA:774,0
384
+ DA:775,0
368
385
  DA:777,0
369
386
  DA:778,0
370
- DA:779,0
371
- DA:780,0
387
+ DA:781,0
388
+ DA:782,0
389
+ DA:783,0
372
390
  DA:784,0
373
391
  DA:785,0
374
- DA:787,0
392
+ DA:789,0
393
+ DA:790,0
375
394
  DA:792,0
376
- DA:793,0
377
- DA:795,0
378
- DA:808,10
379
- DA:819,3
380
- DA:831,1
381
- DA:842,2
382
- DA:852,69
383
- DA:853,0
384
- DA:854,0
395
+ DA:797,0
396
+ DA:798,0
397
+ DA:800,0
398
+ DA:813,10
399
+ DA:824,3
400
+ DA:836,1
401
+ DA:847,2
385
402
  DA:857,69
386
- DA:858,5
387
- DA:859,5
403
+ DA:858,0
404
+ DA:859,0
388
405
  DA:862,69
389
406
  DA:863,5
390
407
  DA:864,5
391
408
  DA:867,69
392
- DA:868,0
393
- DA:869,0
394
- DA:879,5
395
- DA:880,5
409
+ DA:868,5
410
+ DA:869,5
411
+ DA:872,69
412
+ DA:873,0
413
+ DA:874,0
414
+ DA:884,5
396
415
  DA:885,5
397
- DA:886,0
398
- DA:887,0
399
416
  DA:890,5
400
417
  DA:891,0
401
418
  DA:892,0
@@ -403,94 +420,180 @@ DA:895,5
403
420
  DA:896,0
404
421
  DA:897,0
405
422
  DA:900,5
406
- DA:902,5
407
- DA:903,5
408
- DA:906,5
409
- DA:909,5
410
- DA:912,5
411
- DA:913,2
412
- DA:914,1
413
- DA:915,1
414
- DA:916,1
415
- DA:917,1
416
- DA:922,5
417
- DA:923,5
418
- DA:926,5
419
- DA:927,0
420
- DA:928,0
421
- DA:929,0
423
+ DA:901,0
424
+ DA:902,0
425
+ DA:905,5
426
+ DA:907,5
427
+ DA:908,5
428
+ DA:911,5
429
+ DA:914,5
430
+ DA:917,5
431
+ DA:918,2
432
+ DA:919,1
433
+ DA:920,1
434
+ DA:921,1
435
+ DA:922,1
436
+ DA:927,5
437
+ DA:928,5
438
+ DA:931,5
422
439
  DA:932,0
423
440
  DA:933,0
424
441
  DA:934,0
425
- DA:935,0
442
+ DA:937,0
443
+ DA:938,0
444
+ DA:939,0
426
445
  DA:940,0
427
- DA:941,0
428
- DA:957,99
429
- DA:961,99
430
- DA:962,0
431
- DA:965,99
432
- DA:966,59
433
- DA:967,99
434
- DA:968,0
446
+ DA:945,0
447
+ DA:946,0
448
+ DA:962,99
449
+ DA:966,99
450
+ DA:967,0
435
451
  DA:970,99
436
- DA:976,99
437
- DA:977,99
438
- DA:983,99
439
- DA:984,99
440
- DA:987,99
452
+ DA:971,59
453
+ DA:972,99
454
+ DA:973,0
455
+ DA:975,99
456
+ DA:981,99
457
+ DA:982,99
441
458
  DA:988,99
442
- DA:990,98
443
- DA:991,14
444
- DA:992,7
445
- DA:994,14
446
- DA:997,84
447
- DA:999,83
448
- DA:1005,1
449
- DA:1006,1
459
+ DA:989,99
460
+ DA:992,99
461
+ DA:993,99
462
+ DA:995,98
463
+ DA:996,14
464
+ DA:997,7
465
+ DA:999,14
466
+ DA:1002,84
467
+ DA:1004,83
450
468
  DA:1010,1
451
469
  DA:1011,1
452
- DA:1012,1
453
- DA:1013,1
454
- DA:1014,1
455
470
  DA:1015,1
456
- DA:1019,2
457
- DA:1020,2
458
- DA:1021,2
459
- DA:1022,2
460
- DA:1023,2
471
+ DA:1016,1
472
+ DA:1017,1
473
+ DA:1018,1
474
+ DA:1019,1
475
+ DA:1020,1
461
476
  DA:1024,2
462
477
  DA:1025,2
463
478
  DA:1026,2
464
- DA:1030,1
465
- DA:1031,0
466
- DA:1037,0
467
- DA:1042,2
468
- DA:1043,0
479
+ DA:1027,2
480
+ DA:1028,2
481
+ DA:1029,2
482
+ DA:1030,2
483
+ DA:1031,2
484
+ DA:1035,1
485
+ DA:1036,0
486
+ DA:1042,0
487
+ DA:1047,2
469
488
  DA:1048,0
470
- DA:1049,0
471
- DA:1050,0
472
- DA:1056,0
473
- DA:1062,0
474
- DA:1063,0
475
- DA:1064,0
476
- DA:1066,0
489
+ DA:1053,0
490
+ DA:1054,0
491
+ DA:1055,0
492
+ DA:1061,0
477
493
  DA:1067,0
478
- DA:1075,0
479
- DA:1079,3
480
- DA:1080,3
481
- DA:1081,3
482
- DA:1082,192
494
+ DA:1068,0
495
+ DA:1069,0
496
+ DA:1071,0
497
+ DA:1072,0
498
+ DA:1080,0
499
+ DA:1084,3
500
+ DA:1085,3
483
501
  DA:1086,3
484
- DA:1087,3
485
- DA:1088,3
486
- DA:1089,3
487
- DA:1096,3
488
- DA:1097,3
489
- DA:1098,96
490
- DA:1107,0
491
- DA:1114,2
492
- DA:1115,0
493
- LF:362
502
+ DA:1087,192
503
+ DA:1091,3
504
+ DA:1092,3
505
+ DA:1093,3
506
+ DA:1094,3
507
+ DA:1101,3
508
+ DA:1102,3
509
+ DA:1103,96
510
+ DA:1112,0
511
+ DA:1119,2
512
+ DA:1120,0
513
+ DA:1141,0
514
+ DA:1142,0
515
+ DA:1143,0
516
+ DA:1146,0
517
+ DA:1147,0
518
+ DA:1148,0
519
+ DA:1150,0
520
+ DA:1163,0
521
+ DA:1164,0
522
+ DA:1166,0
523
+ DA:1199,0
524
+ DA:1200,0
525
+ DA:1202,0
526
+ DA:1206,0
527
+ DA:1210,0
528
+ DA:1220,0
529
+ DA:1221,0
530
+ DA:1222,0
531
+ DA:1223,0
532
+ DA:1229,0
533
+ DA:1230,0
534
+ DA:1231,0
535
+ DA:1233,0
536
+ DA:1234,0
537
+ DA:1236,0
538
+ DA:1256,0
539
+ DA:1257,0
540
+ DA:1258,0
541
+ DA:1259,0
542
+ DA:1260,0
543
+ DA:1261,0
544
+ DA:1265,0
545
+ DA:1266,0
546
+ DA:1267,0
547
+ DA:1268,0
548
+ DA:1269,0
549
+ DA:1270,0
550
+ DA:1271,0
551
+ DA:1275,0
552
+ DA:1279,0
553
+ DA:1280,0
554
+ DA:1281,0
555
+ DA:1282,0
556
+ DA:1283,0
557
+ DA:1288,0
558
+ DA:1289,0
559
+ DA:1290,0
560
+ DA:1291,0
561
+ DA:1292,0
562
+ DA:1293,0
563
+ DA:1297,0
564
+ DA:1310,0
565
+ DA:1311,0
566
+ DA:1312,0
567
+ DA:1313,0
568
+ DA:1314,0
569
+ DA:1316,0
570
+ DA:1326,0
571
+ DA:1327,0
572
+ DA:1338,0
573
+ DA:1339,0
574
+ DA:1340,0
575
+ DA:1341,0
576
+ DA:1342,0
577
+ DA:1343,0
578
+ DA:1344,0
579
+ DA:1345,0
580
+ DA:1362,0
581
+ DA:1363,0
582
+ DA:1364,0
583
+ DA:1366,0
584
+ DA:1367,0
585
+ DA:1370,0
586
+ DA:1373,0
587
+ DA:1374,0
588
+ DA:1382,0
589
+ DA:1383,0
590
+ DA:1385,0
591
+ DA:1386,0
592
+ DA:1397,0
593
+ DA:1398,0
594
+ DA:1399,0
595
+ DA:1402,0
596
+ LF:447
494
597
  LH:194
495
598
  BRDA:89,0,0,64
496
599
  BRDA:92,1,0,69
@@ -668,106 +771,179 @@ BRDA:728,81,0,0
668
771
  BRDA:728,81,1,0
669
772
  BRDA:732,82,0,0
670
773
  BRDA:732,82,1,0
671
- BRDA:741,83,0,0
672
- BRDA:741,83,1,0
774
+ BRDA:739,83,0,0
775
+ BRDA:739,83,1,0
673
776
  BRDA:743,84,0,0
674
777
  BRDA:743,84,1,0
675
- BRDA:743,85,0,0
676
- BRDA:743,85,1,0
677
- BRDA:750,86,0,0
678
- BRDA:750,86,1,0
679
- BRDA:750,87,0,0
680
- BRDA:750,87,1,0
681
- BRDA:752,88,0,0
682
- BRDA:752,88,1,0
683
- BRDA:752,89,0,0
684
- BRDA:752,89,1,0
685
- BRDA:759,90,0,0
686
- BRDA:759,90,1,0
687
- BRDA:766,91,0,0
688
- BRDA:766,91,1,0
689
- BRDA:770,92,0,0
690
- BRDA:770,92,1,0
691
- BRDA:772,93,0,0
692
- BRDA:772,93,1,0
693
- BRDA:772,94,0,0
694
- BRDA:772,94,1,0
695
- BRDA:779,95,0,0
696
- BRDA:779,95,1,0
697
- BRDA:784,96,0,0
698
- BRDA:784,96,1,0
699
- BRDA:784,97,0,0
700
- BRDA:784,97,1,0
701
- BRDA:792,98,0,0
702
- BRDA:792,98,1,0
703
- BRDA:792,99,0,0
704
- BRDA:792,99,1,0
705
- BRDA:879,100,0,0
706
- BRDA:879,100,1,5
707
- BRDA:885,101,0,0
708
- BRDA:885,101,1,5
709
- BRDA:890,102,0,0
710
- BRDA:890,102,1,5
711
- BRDA:895,103,0,0
712
- BRDA:895,103,1,5
713
- BRDA:913,104,0,1
714
- BRDA:913,104,1,1
715
- BRDA:916,105,0,1
716
- BRDA:916,105,1,0
717
- BRDA:927,106,0,0
718
- BRDA:927,106,1,0
719
- BRDA:932,107,0,0
720
- BRDA:932,107,1,0
721
- BRDA:956,108,0,45
722
- BRDA:961,109,0,99
723
- BRDA:961,109,1,84
724
- BRDA:961,110,0,0
725
- BRDA:961,110,1,84
726
- BRDA:965,111,0,59
727
- BRDA:965,111,1,40
728
- BRDA:965,112,0,99
729
- BRDA:965,112,1,61
730
- BRDA:967,113,0,0
731
- BRDA:967,113,1,99
732
- BRDA:973,114,0,71
733
- BRDA:973,114,1,28
734
- BRDA:976,115,0,99
735
- BRDA:976,115,1,0
736
- BRDA:977,116,0,1
737
- BRDA:977,116,1,98
738
- BRDA:984,117,0,2
739
- BRDA:984,117,1,97
740
- BRDA:984,118,0,99
741
- BRDA:984,118,1,2
742
- BRDA:990,119,0,14
743
- BRDA:990,119,1,84
744
- BRDA:991,120,0,7
745
- BRDA:991,120,1,7
746
- BRDA:991,121,0,14
747
- BRDA:991,121,1,7
748
- BRDA:997,122,0,1
749
- BRDA:997,122,1,83
750
- BRDA:1012,123,0,1
751
- BRDA:1012,123,1,0
752
- BRDA:1013,124,0,1
753
- BRDA:1013,124,1,0
754
- BRDA:1025,125,0,0
755
- BRDA:1025,125,1,2
756
- BRDA:1030,126,0,0
757
- BRDA:1030,126,1,1
758
- BRDA:1030,127,0,1
759
- BRDA:1030,127,1,1
760
- BRDA:1042,128,0,0
761
- BRDA:1042,128,1,2
762
- BRDA:1042,129,0,2
763
- BRDA:1042,129,1,2
764
- BRDA:1048,130,0,0
765
- BRDA:1048,130,1,0
766
- BRDA:1062,131,0,0
767
- BRDA:1062,131,1,0
768
- BRDA:1114,132,0,0
769
- BRDA:1114,132,1,2
770
- BRF:275
778
+ BRDA:746,85,0,0
779
+ BRDA:746,85,1,0
780
+ BRDA:748,86,0,0
781
+ BRDA:748,86,1,0
782
+ BRDA:748,87,0,0
783
+ BRDA:748,87,1,0
784
+ BRDA:755,88,0,0
785
+ BRDA:755,88,1,0
786
+ BRDA:755,89,0,0
787
+ BRDA:755,89,1,0
788
+ BRDA:757,90,0,0
789
+ BRDA:757,90,1,0
790
+ BRDA:757,91,0,0
791
+ BRDA:757,91,1,0
792
+ BRDA:764,92,0,0
793
+ BRDA:764,92,1,0
794
+ BRDA:771,93,0,0
795
+ BRDA:771,93,1,0
796
+ BRDA:774,94,0,0
797
+ BRDA:774,94,1,0
798
+ BRDA:775,95,0,0
799
+ BRDA:775,95,1,0
800
+ BRDA:777,96,0,0
801
+ BRDA:777,96,1,0
802
+ BRDA:777,97,0,0
803
+ BRDA:777,97,1,0
804
+ BRDA:784,98,0,0
805
+ BRDA:784,98,1,0
806
+ BRDA:789,99,0,0
807
+ BRDA:789,99,1,0
808
+ BRDA:789,100,0,0
809
+ BRDA:789,100,1,0
810
+ BRDA:797,101,0,0
811
+ BRDA:797,101,1,0
812
+ BRDA:797,102,0,0
813
+ BRDA:797,102,1,0
814
+ BRDA:884,103,0,0
815
+ BRDA:884,103,1,5
816
+ BRDA:890,104,0,0
817
+ BRDA:890,104,1,5
818
+ BRDA:895,105,0,0
819
+ BRDA:895,105,1,5
820
+ BRDA:900,106,0,0
821
+ BRDA:900,106,1,5
822
+ BRDA:918,107,0,1
823
+ BRDA:918,107,1,1
824
+ BRDA:921,108,0,1
825
+ BRDA:921,108,1,0
826
+ BRDA:932,109,0,0
827
+ BRDA:932,109,1,0
828
+ BRDA:937,110,0,0
829
+ BRDA:937,110,1,0
830
+ BRDA:961,111,0,45
831
+ BRDA:966,112,0,99
832
+ BRDA:966,112,1,84
833
+ BRDA:966,113,0,0
834
+ BRDA:966,113,1,84
835
+ BRDA:970,114,0,59
836
+ BRDA:970,114,1,40
837
+ BRDA:970,115,0,99
838
+ BRDA:970,115,1,61
839
+ BRDA:972,116,0,0
840
+ BRDA:972,116,1,99
841
+ BRDA:978,117,0,71
842
+ BRDA:978,117,1,28
843
+ BRDA:981,118,0,99
844
+ BRDA:981,118,1,0
845
+ BRDA:982,119,0,1
846
+ BRDA:982,119,1,98
847
+ BRDA:989,120,0,2
848
+ BRDA:989,120,1,97
849
+ BRDA:989,121,0,99
850
+ BRDA:989,121,1,2
851
+ BRDA:995,122,0,14
852
+ BRDA:995,122,1,84
853
+ BRDA:996,123,0,7
854
+ BRDA:996,123,1,7
855
+ BRDA:996,124,0,14
856
+ BRDA:996,124,1,7
857
+ BRDA:1002,125,0,1
858
+ BRDA:1002,125,1,83
859
+ BRDA:1017,126,0,1
860
+ BRDA:1017,126,1,0
861
+ BRDA:1018,127,0,1
862
+ BRDA:1018,127,1,0
863
+ BRDA:1030,128,0,0
864
+ BRDA:1030,128,1,2
865
+ BRDA:1035,129,0,0
866
+ BRDA:1035,129,1,1
867
+ BRDA:1035,130,0,1
868
+ BRDA:1035,130,1,1
869
+ BRDA:1047,131,0,0
870
+ BRDA:1047,131,1,2
871
+ BRDA:1047,132,0,2
872
+ BRDA:1047,132,1,2
873
+ BRDA:1053,133,0,0
874
+ BRDA:1053,133,1,0
875
+ BRDA:1067,134,0,0
876
+ BRDA:1067,134,1,0
877
+ BRDA:1119,135,0,0
878
+ BRDA:1119,135,1,2
879
+ BRDA:1143,136,0,0
880
+ BRDA:1143,136,1,0
881
+ BRDA:1146,137,0,0
882
+ BRDA:1146,137,1,0
883
+ BRDA:1147,138,0,0
884
+ BRDA:1147,138,1,0
885
+ BRDA:1199,139,0,0
886
+ BRDA:1199,139,1,0
887
+ BRDA:1202,140,0,0
888
+ BRDA:1202,140,1,0
889
+ BRDA:1202,141,0,0
890
+ BRDA:1202,141,1,0
891
+ BRDA:1206,142,0,0
892
+ BRDA:1206,142,1,0
893
+ BRDA:1220,143,0,0
894
+ BRDA:1220,143,1,0
895
+ BRDA:1230,144,0,0
896
+ BRDA:1230,144,1,0
897
+ BRDA:1230,145,0,0
898
+ BRDA:1230,145,1,0
899
+ BRDA:1233,146,0,0
900
+ BRDA:1233,146,1,0
901
+ BRDA:1233,147,0,0
902
+ BRDA:1233,147,1,0
903
+ BRDA:1233,147,2,0
904
+ BRDA:1256,148,0,0
905
+ BRDA:1256,148,1,0
906
+ BRDA:1267,149,0,0
907
+ BRDA:1267,149,1,0
908
+ BRDA:1269,150,0,0
909
+ BRDA:1269,150,1,0
910
+ BRDA:1279,151,0,0
911
+ BRDA:1279,151,1,0
912
+ BRDA:1281,152,0,0
913
+ BRDA:1281,152,1,0
914
+ BRDA:1288,153,0,0
915
+ BRDA:1288,153,1,0
916
+ BRDA:1288,154,0,0
917
+ BRDA:1288,154,1,0
918
+ BRDA:1290,155,0,0
919
+ BRDA:1290,155,1,0
920
+ BRDA:1313,156,0,0
921
+ BRDA:1313,156,1,0
922
+ BRDA:1326,157,0,0
923
+ BRDA:1326,157,1,0
924
+ BRDA:1326,158,0,0
925
+ BRDA:1326,158,1,0
926
+ BRDA:1338,159,0,0
927
+ BRDA:1338,159,1,0
928
+ BRDA:1338,160,0,0
929
+ BRDA:1338,160,1,0
930
+ BRDA:1363,161,0,0
931
+ BRDA:1363,161,1,0
932
+ BRDA:1366,162,0,0
933
+ BRDA:1366,162,1,0
934
+ BRDA:1366,163,0,0
935
+ BRDA:1366,163,1,0
936
+ BRDA:1367,164,0,0
937
+ BRDA:1367,164,1,0
938
+ BRDA:1382,165,0,0
939
+ BRDA:1382,165,1,0
940
+ BRDA:1397,166,0,0
941
+ BRDA:1397,166,1,0
942
+ BRDA:1399,167,0,0
943
+ BRDA:1399,167,1,0
944
+ BRDA:1399,168,0,0
945
+ BRDA:1399,168,1,0
946
+ BRF:348
771
947
  BRH:118
772
948
  end_of_record
773
949
  TN:
package/dist/index.d.ts CHANGED
@@ -364,6 +364,120 @@ export default class docPouchClient {
364
364
  * Emit an event
365
365
  */
366
366
  private emit;
367
+ /**
368
+ * Fetches the OIDC client configuration from the server's
369
+ * `/api/oidc-client-config` endpoint. This is the first step in any
370
+ * OIDC flow: call this method to discover whether OIDC is configured
371
+ * and, if so, obtain the issuer, clientId, redirectUri, etc.
372
+ *
373
+ * The returned object matches the {@link I_OidcClientConfig} shape which
374
+ * can be passed directly to {@link setOidcConfig} or
375
+ * {@link loginWithOidc}.
376
+ *
377
+ * @returns {Promise<I_OidcClientConfig | null>} The client config if
378
+ * OIDC is configured, or null if the server reports OIDC is not
379
+ * available.
380
+ */
381
+ fetchOidcClientConfig(): Promise<I_OidcClientConfig | null>;
382
+ /**
383
+ * Fetches the currently authenticated user's profile from the
384
+ * `/users/whoami` endpoint. Works with both JWT and OIDC
385
+ * authentication — the correct token is sent automatically.
386
+ *
387
+ * @returns {Promise<I_UserEntry | null>} The user profile, or null
388
+ * if the request fails or the user is not authenticated.
389
+ */
390
+ getCurrentUser(): Promise<I_UserEntry | null>;
391
+ /**
392
+ * Ensures an OIDC client is registered with the DocPouch server
393
+ * (dynamic client registration). If a `clientId` is found in
394
+ * localStorage under `docpouch_oidc_client_id`, it attempts to
395
+ * update the existing registration. If that fails (or no stored ID
396
+ * exists), a new client is registered via
397
+ * {@link registerOidcClient}.
398
+ *
399
+ * This method manages the `docpouch_oidc_client_id` localStorage
400
+ * key automatically. Call it before {@link loginWithOidc} when
401
+ * acting as a third-party relying party (i.e. not the built-in
402
+ * admin UI).
403
+ *
404
+ * @param {string} redirectUri - The URI the IdP should redirect to
405
+ * after login.
406
+ * @param {string} [registrationToken] - Initial access token for
407
+ * the `/oidc/reg` endpoint. If omitted the current auth token is
408
+ * used.
409
+ * @param {object} [options] - Additional options.
410
+ * @param {string} [options.clientName] - Display name for the
411
+ * client registration (default `'DocPouch Client'`).
412
+ * @param {string} [options.postLogoutRedirectUri] - If provided,
413
+ * also registers this URI as a post-logout redirect.
414
+ * @returns {Promise<string>} The resolved clientId.
415
+ */
416
+ ensureOidcClient(redirectUri: string, registrationToken?: string, options?: {
417
+ clientName?: string;
418
+ postLogoutRedirectUri?: string;
419
+ }): Promise<string>;
420
+ /**
421
+ * Attempts to restore an existing authentication session (JWT or
422
+ * OIDC) from browser storage. This is the recommended entry point
423
+ * on page load:
424
+ *
425
+ * 1. If an OIDC logout redirect was just completed, clears local
426
+ * state and returns `{method: 'none'}`.
427
+ * 2. If the URL contains `code` and `state` params, exchanges them
428
+ * for OIDC tokens via {@link handleOidcCallback}.
429
+ * 3. If a persisted OIDC session exists, restores it.
430
+ * 4. Falls back to a JWT token in localStorage.
431
+ *
432
+ * @returns {Promise<I_AuthState>} The authentication state after
433
+ * attempting restoration.
434
+ */
435
+ initAuth(): Promise<I_AuthState>;
436
+ /**
437
+ * Clears all local authentication state — JWT token, OIDC tokens,
438
+ * persisted sessions, and localStorage keys managed by this library.
439
+ * Disconnects the WebSocket if connected.
440
+ *
441
+ * This does NOT redirect to an OIDC end-session endpoint. For a
442
+ * full RP-initiated logout use {@link logout} or
443
+ * {@link logoutOidc}.
444
+ */
445
+ clearAuth(): void;
446
+ /**
447
+ * Persists the current authentication method to localStorage so it
448
+ * can be restored after a page reload.
449
+ *
450
+ * @param {'jwt' | 'oidc'} method - The auth method to persist.
451
+ */
452
+ persistAuthMethod(method: 'jwt' | 'oidc'): void;
453
+ /**
454
+ * Removes all localStorage keys managed by docpouch-client:
455
+ * `authToken`, `authMethod`, `docpouch_oidc_session`,
456
+ * `docpouch_oidc_client_id`, `docpouch_registration_token`,
457
+ * `isAdmin`, and `postLogoutRedirectUri`.
458
+ */
459
+ clearPersistedAuthState(): void;
460
+ /**
461
+ * Convenience method to fetch the OIDC client config from the server
462
+ * and immediately initiate the OIDC login redirect. This combines
463
+ * {@link fetchOidcClientConfig} and {@link loginWithOidc} into a
464
+ * single call.
465
+ *
466
+ * @param {string} [registrationToken] - Optional initial access
467
+ * token for dynamic client registration. If provided and no
468
+ * client config is available from the server, the method attempts
469
+ * dynamic registration via {@link ensureOidcClient}.
470
+ * @returns {Promise<void>}
471
+ */
472
+ startOidcLogin(registrationToken?: string): Promise<void>;
473
+ /**
474
+ * Derives the OIDC issuer URL from the client's baseUrl. By
475
+ * convention the DocPouch OIDC provider is mounted at
476
+ * `${baseUrl}/oidc`.
477
+ *
478
+ * @returns {string} The issuer URL.
479
+ */
480
+ getOidcIssuer(): string;
367
481
  }
368
482
  export interface I_UserEntry extends I_UserCreation {
369
483
  _id: string;
@@ -416,6 +530,10 @@ export interface I_OidcConfig {
416
530
  clientSecret?: string;
417
531
  postLogoutRedirectUri?: string;
418
532
  }
533
+ export interface I_OidcClientConfig extends I_OidcConfig {
534
+ configured?: boolean;
535
+ apiBaseUrl?: string;
536
+ }
419
537
  export interface I_OidcTokenResponse {
420
538
  accessToken: string;
421
539
  refreshToken?: string;
package/dist/index.js CHANGED
@@ -626,8 +626,13 @@ export default class docPouchClient {
626
626
  return false;
627
627
  }
628
628
  // Check URL query parameters for logout confirmation
629
- const urlParams = new URLSearchParams(window.location.search);
630
- const logoutParam = urlParams.get('logout');
629
+ // Also check hash parameters for hash-mode routing compatibility
630
+ const searchParams = new URLSearchParams(window.location.search);
631
+ const hashQuery = window.location.hash.includes('?')
632
+ ? window.location.hash.split('?')[1]
633
+ : window.location.hash.replace(/^#\/?/, '');
634
+ const hashParams = new URLSearchParams(hashQuery);
635
+ const logoutParam = searchParams.get('logout') || hashParams.get('logout');
631
636
  // If logout parameter is explicitly 'no', user cancelled
632
637
  if (logoutParam === 'no') {
633
638
  // Clear the logout in progress flag
@@ -656,7 +661,7 @@ export default class docPouchClient {
656
661
  if (logoutParam === null) {
657
662
  // Check if this is a post-logout redirect - assume logout was successful
658
663
  // unless there's an error parameter
659
- const errorParam = urlParams.get('error');
664
+ const errorParam = searchParams.get('error') || hashParams.get('error');
660
665
  if (!errorParam) {
661
666
  // Clear the logout in progress flag
662
667
  if (typeof window !== 'undefined' && window.sessionStorage) {
@@ -965,4 +970,270 @@ export default class docPouchClient {
965
970
  this.events[event]();
966
971
  }
967
972
  }
973
+ // Convenience OIDC methods
974
+ /**
975
+ * Fetches the OIDC client configuration from the server's
976
+ * `/api/oidc-client-config` endpoint. This is the first step in any
977
+ * OIDC flow: call this method to discover whether OIDC is configured
978
+ * and, if so, obtain the issuer, clientId, redirectUri, etc.
979
+ *
980
+ * The returned object matches the {@link I_OidcClientConfig} shape which
981
+ * can be passed directly to {@link setOidcConfig} or
982
+ * {@link loginWithOidc}.
983
+ *
984
+ * @returns {Promise<I_OidcClientConfig | null>} The client config if
985
+ * OIDC is configured, or null if the server reports OIDC is not
986
+ * available.
987
+ */
988
+ async fetchOidcClientConfig() {
989
+ try {
990
+ const data = await this.request('/api/oidc-client-config', 'GET', undefined, false);
991
+ if (!data)
992
+ return null;
993
+ // The server may or may not include `configured`. If it has an
994
+ // `issuer` field we consider it valid regardless.
995
+ if (data.configured === false)
996
+ return null;
997
+ if (!data.issuer)
998
+ return null;
999
+ return data;
1000
+ }
1001
+ catch {
1002
+ return null;
1003
+ }
1004
+ }
1005
+ /**
1006
+ * Fetches the currently authenticated user's profile from the
1007
+ * `/users/whoami` endpoint. Works with both JWT and OIDC
1008
+ * authentication — the correct token is sent automatically.
1009
+ *
1010
+ * @returns {Promise<I_UserEntry | null>} The user profile, or null
1011
+ * if the request fails or the user is not authenticated.
1012
+ */
1013
+ async getCurrentUser() {
1014
+ try {
1015
+ return await this.request('/users/whoami', 'GET');
1016
+ }
1017
+ catch {
1018
+ return null;
1019
+ }
1020
+ }
1021
+ /**
1022
+ * Ensures an OIDC client is registered with the DocPouch server
1023
+ * (dynamic client registration). If a `clientId` is found in
1024
+ * localStorage under `docpouch_oidc_client_id`, it attempts to
1025
+ * update the existing registration. If that fails (or no stored ID
1026
+ * exists), a new client is registered via
1027
+ * {@link registerOidcClient}.
1028
+ *
1029
+ * This method manages the `docpouch_oidc_client_id` localStorage
1030
+ * key automatically. Call it before {@link loginWithOidc} when
1031
+ * acting as a third-party relying party (i.e. not the built-in
1032
+ * admin UI).
1033
+ *
1034
+ * @param {string} redirectUri - The URI the IdP should redirect to
1035
+ * after login.
1036
+ * @param {string} [registrationToken] - Initial access token for
1037
+ * the `/oidc/reg` endpoint. If omitted the current auth token is
1038
+ * used.
1039
+ * @param {object} [options] - Additional options.
1040
+ * @param {string} [options.clientName] - Display name for the
1041
+ * client registration (default `'DocPouch Client'`).
1042
+ * @param {string} [options.postLogoutRedirectUri] - If provided,
1043
+ * also registers this URI as a post-logout redirect.
1044
+ * @returns {Promise<string>} The resolved clientId.
1045
+ */
1046
+ async ensureOidcClient(redirectUri, registrationToken, options) {
1047
+ const clientName = options?.clientName || 'DocPouch Client';
1048
+ const postLogoutRedirectUri = options?.postLogoutRedirectUri;
1049
+ const storedClientId = typeof window !== 'undefined' && window.localStorage
1050
+ ? localStorage.getItem('docpouch_oidc_client_id')
1051
+ : null;
1052
+ const postLogoutUris = postLogoutRedirectUri
1053
+ ? [redirectUri, postLogoutRedirectUri]
1054
+ : [redirectUri];
1055
+ const payload = {
1056
+ client_name: clientName,
1057
+ redirect_uris: [redirectUri],
1058
+ post_logout_redirect_uris: postLogoutUris,
1059
+ grant_types: ['authorization_code', 'refresh_token'],
1060
+ response_types: ['code'],
1061
+ token_endpoint_auth_method: 'none',
1062
+ application_type: 'web',
1063
+ };
1064
+ if (storedClientId) {
1065
+ try {
1066
+ await this.updateOidcClient(storedClientId, payload, registrationToken);
1067
+ return storedClientId;
1068
+ }
1069
+ catch {
1070
+ // Update failed, will re-register below
1071
+ }
1072
+ }
1073
+ const response = await this.registerOidcClient(payload, registrationToken);
1074
+ if (typeof window !== 'undefined' && window.localStorage) {
1075
+ localStorage.setItem('docpouch_oidc_client_id', response.client_id);
1076
+ }
1077
+ if (response.registration_access_token && typeof window !== 'undefined' && window.localStorage) {
1078
+ localStorage.setItem('docpouch_registration_token', response.registration_access_token);
1079
+ }
1080
+ return response.client_id;
1081
+ }
1082
+ /**
1083
+ * Attempts to restore an existing authentication session (JWT or
1084
+ * OIDC) from browser storage. This is the recommended entry point
1085
+ * on page load:
1086
+ *
1087
+ * 1. If an OIDC logout redirect was just completed, clears local
1088
+ * state and returns `{method: 'none'}`.
1089
+ * 2. If the URL contains `code` and `state` params, exchanges them
1090
+ * for OIDC tokens via {@link handleOidcCallback}.
1091
+ * 3. If a persisted OIDC session exists, restores it.
1092
+ * 4. Falls back to a JWT token in localStorage.
1093
+ *
1094
+ * @returns {Promise<I_AuthState>} The authentication state after
1095
+ * attempting restoration.
1096
+ */
1097
+ async initAuth() {
1098
+ // 1. Check for logout redirect
1099
+ if (this.wasJustLoggedOut()) {
1100
+ this.authToken = null;
1101
+ this.clearOidcTokens();
1102
+ this.authMethod = 'none';
1103
+ this.clearPersistedAuthState();
1104
+ return { method: 'none', token: null, isAdmin: false, userName: '' };
1105
+ }
1106
+ // 2. Try OIDC callback (code/state in URL)
1107
+ try {
1108
+ const handled = await this.handleOidcCallback();
1109
+ if (handled) {
1110
+ const token = this.getToken();
1111
+ if (token) {
1112
+ this.persistAuthMethod('oidc');
1113
+ return { method: 'oidc', token, isAdmin: false, userName: '' };
1114
+ }
1115
+ }
1116
+ }
1117
+ catch (e) {
1118
+ console.error('OIDC callback error:', e);
1119
+ }
1120
+ // 3. Try OIDC session restore
1121
+ if (this.restoreOidcSession()) {
1122
+ const token = this.getToken();
1123
+ if (token) {
1124
+ this.persistAuthMethod('oidc');
1125
+ return { method: 'oidc', token, isAdmin: false, userName: '' };
1126
+ }
1127
+ }
1128
+ // 4. Fallback to JWT token
1129
+ if (typeof window !== 'undefined' && window.localStorage) {
1130
+ const storedToken = localStorage.getItem('authToken');
1131
+ if (storedToken) {
1132
+ this.authToken = storedToken;
1133
+ this.authMethod = 'jwt';
1134
+ return { method: 'jwt', token: storedToken, isAdmin: false, userName: '' };
1135
+ }
1136
+ }
1137
+ return { method: 'none', token: null, isAdmin: false, userName: '' };
1138
+ }
1139
+ /**
1140
+ * Clears all local authentication state — JWT token, OIDC tokens,
1141
+ * persisted sessions, and localStorage keys managed by this library.
1142
+ * Disconnects the WebSocket if connected.
1143
+ *
1144
+ * This does NOT redirect to an OIDC end-session endpoint. For a
1145
+ * full RP-initiated logout use {@link logout} or
1146
+ * {@link logoutOidc}.
1147
+ */
1148
+ clearAuth() {
1149
+ this.authToken = null;
1150
+ this.clearOidcTokens();
1151
+ this.authMethod = 'none';
1152
+ if (this.socket.connected) {
1153
+ this.socket.disconnect();
1154
+ }
1155
+ this.clearPersistedAuthState();
1156
+ }
1157
+ /**
1158
+ * Persists the current authentication method to localStorage so it
1159
+ * can be restored after a page reload.
1160
+ *
1161
+ * @param {'jwt' | 'oidc'} method - The auth method to persist.
1162
+ */
1163
+ persistAuthMethod(method) {
1164
+ if (typeof window !== 'undefined' && window.localStorage) {
1165
+ localStorage.setItem('authMethod', method);
1166
+ }
1167
+ }
1168
+ /**
1169
+ * Removes all localStorage keys managed by docpouch-client:
1170
+ * `authToken`, `authMethod`, `docpouch_oidc_session`,
1171
+ * `docpouch_oidc_client_id`, `docpouch_registration_token`,
1172
+ * `isAdmin`, and `postLogoutRedirectUri`.
1173
+ */
1174
+ clearPersistedAuthState() {
1175
+ if (typeof window !== 'undefined' && window.localStorage) {
1176
+ localStorage.removeItem('authToken');
1177
+ localStorage.removeItem('authMethod');
1178
+ localStorage.removeItem('docpouch_oidc_session');
1179
+ localStorage.removeItem('docpouch_oidc_client_id');
1180
+ localStorage.removeItem('docpouch_registration_token');
1181
+ localStorage.removeItem('isAdmin');
1182
+ localStorage.removeItem('postLogoutRedirectUri');
1183
+ }
1184
+ }
1185
+ /**
1186
+ * Convenience method to fetch the OIDC client config from the server
1187
+ * and immediately initiate the OIDC login redirect. This combines
1188
+ * {@link fetchOidcClientConfig} and {@link loginWithOidc} into a
1189
+ * single call.
1190
+ *
1191
+ * @param {string} [registrationToken] - Optional initial access
1192
+ * token for dynamic client registration. If provided and no
1193
+ * client config is available from the server, the method attempts
1194
+ * dynamic registration via {@link ensureOidcClient}.
1195
+ * @returns {Promise<void>}
1196
+ */
1197
+ async startOidcLogin(registrationToken) {
1198
+ let config = this.oidcConfig;
1199
+ if (!config) {
1200
+ config = await this.fetchOidcClientConfig();
1201
+ }
1202
+ if (!config && registrationToken) {
1203
+ const redirectUri = typeof window !== 'undefined'
1204
+ ? window.location.origin + window.location.pathname
1205
+ : '';
1206
+ const clientId = await this.ensureOidcClient(redirectUri, registrationToken, {
1207
+ postLogoutRedirectUri: redirectUri,
1208
+ });
1209
+ const issuer = this.getOidcIssuer();
1210
+ config = {
1211
+ issuer,
1212
+ clientId,
1213
+ redirectUri,
1214
+ postLogoutRedirectUri: redirectUri,
1215
+ scope: 'openid profile email offline_access',
1216
+ };
1217
+ }
1218
+ if (!config) {
1219
+ throw new Error('OIDC is not configured on this server');
1220
+ }
1221
+ this.setOidcConfig(config);
1222
+ await this.loginWithOidc(config);
1223
+ }
1224
+ /**
1225
+ * Derives the OIDC issuer URL from the client's baseUrl. By
1226
+ * convention the DocPouch OIDC provider is mounted at
1227
+ * `${baseUrl}/oidc`.
1228
+ *
1229
+ * @returns {string} The issuer URL.
1230
+ */
1231
+ getOidcIssuer() {
1232
+ const trimmedBaseUrl = this.baseUrl.endsWith('/') ? this.baseUrl.slice(0, -1) : this.baseUrl;
1233
+ const hasExplicitPort = /:\d+(?=\/|$)/.test(trimmedBaseUrl);
1234
+ const normalizedBaseUrl = !hasExplicitPort && this.port
1235
+ ? `${trimmedBaseUrl}:${this.port}`
1236
+ : trimmedBaseUrl;
1237
+ return `${normalizedBaseUrl}/oidc`;
1238
+ }
968
1239
  }
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "docpouch-client",
3
- "version": "1.1.3",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "exports": {
7
- ".": {
8
- "import": "./dist/index.js",
9
- "require": "./dist/index.js"
10
- }
11
- },
12
- "type": "module",
13
- "scripts": {
14
- "build": "tsc -p tsconfig.build.json",
15
- "test": "node --experimental-vm-modules --no-warnings ./node_modules/jest/bin/jest.js --forceExit --silent"
16
- },
17
- "keywords": [
18
- "docPouch",
19
- "API"
20
- ],
21
- "author": "Jan Frecè",
22
- "license": "MIT",
23
- "description": "Client SDK for DocPouch API - supports JWT and OIDC authentication",
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/BFH-JTF/docpouch-client.git"
27
- },
28
- "devDependencies": {
29
- "@types/express": "^5.0.6",
30
- "@types/jest": "^30.0.0",
31
- "@types/node": "^25.9.1",
32
- "express": "^5.2.1",
33
- "jest": "^30.4.2",
34
- "socket.io": "^4.8.3",
35
- "ts-jest": "^29.4.10",
36
- "typescript": "^6.0.3"
37
- },
38
- "dependencies": {
39
- "socket.io-client": "^4.8.3"
40
- }
41
- }
1
+ {
2
+ "name": "docpouch-client",
3
+ "version": "1.2.0",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.js"
10
+ }
11
+ },
12
+ "type": "module",
13
+ "scripts": {
14
+ "build": "tsc -p tsconfig.build.json",
15
+ "test": "node --experimental-vm-modules --no-warnings ./node_modules/jest/bin/jest.js --forceExit --silent"
16
+ },
17
+ "keywords": [
18
+ "docPouch",
19
+ "API"
20
+ ],
21
+ "author": "Jan Frecè",
22
+ "license": "MIT",
23
+ "description": "Client SDK for DocPouch API - supports JWT and OIDC authentication",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/BFH-JTF/docpouch-client.git"
27
+ },
28
+ "devDependencies": {
29
+ "@types/express": "^5.0.6",
30
+ "@types/jest": "^30.0.0",
31
+ "@types/node": "^25.9.1",
32
+ "express": "^5.2.1",
33
+ "jest": "^30.4.2",
34
+ "socket.io": "^4.8.3",
35
+ "ts-jest": "^29.4.10",
36
+ "typescript": "^6.0.3"
37
+ },
38
+ "dependencies": {
39
+ "socket.io-client": "^4.8.3"
40
+ }
41
+ }
@@ -1,24 +0,0 @@
1
- // Test script to verify post_logout_redirect_uris functionality
2
- const fs = require('fs');
3
-
4
- // Read the built client to verify the changes
5
- const clientCode = fs.readFileSync('dist/index.js', 'utf8');
6
-
7
- console.log('Checking for post_logout_redirect_uris support...');
8
-
9
- // Check if the interfaces include post_logout_redirect_uris
10
- const hasRegistrationInterface = clientCode.includes('post_logout_redirect_uris?: string[]');
11
- const hasResponseInterface = clientCode.includes('post_logout_redirect_uris?: string[]');
12
-
13
- // Check if logout methods use postLogoutRedirectUri
14
- const usesPostLogoutUri = clientCode.includes('this.oidcConfig.postLogoutRedirectUri');
15
-
16
- console.log('I_OidcClientRegistration has post_logout_redirect_uris:', hasRegistrationInterface);
17
- console.log('I_OidcClientResponse has post_logout_redirect_uris:', hasResponseInterface);
18
- console.log('Logout methods use postLogoutRedirectUri:', usesPostLogoutUri);
19
-
20
- if (hasRegistrationInterface && hasResponseInterface && usesPostLogoutUri) {
21
- console.log('✅ All post_logout_redirect_uris functionality is properly implemented!');
22
- } else {
23
- console.log('❌ Some post_logout_redirect_uris functionality is missing');
24
- }