@feathersjs/client 5.0.0-pre.0 → 5.0.0-pre.15

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 (86) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/README.md +2 -2
  3. package/dist/core.d.ts +1 -0
  4. package/dist/core.js +1861 -3627
  5. package/dist/core.js.map +1 -1
  6. package/dist/core.min.js +1 -1
  7. package/dist/feathers.d.ts +8 -0
  8. package/dist/feathers.js +5106 -5755
  9. package/dist/feathers.js.map +1 -1
  10. package/dist/feathers.min.js +1 -1
  11. package/package.json +44 -38
  12. package/src/core.ts +1 -0
  13. package/src/feathers.ts +13 -0
  14. package/.babelrc +0 -8
  15. package/.cache/lasso/default/6a3076a5/dependencyFingerprints/cache +0 -0
  16. package/.cache/lasso/default/6a3076a5/key +0 -1
  17. package/.cache/lasso/default/6a3076a5/lasso-require/inspect-/5d47a286cdceb98f64bf9128488dd355fde40e81/cache +0 -0
  18. package/.cache/lasso/default/7be4a25c/dependencyFingerprints/cache +0 -0
  19. package/.cache/lasso/default/7be4a25c/key +0 -1
  20. package/.cache/lasso/default/7be4a25c/lasso-require/inspect/cache +0 -0
  21. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/filter-query.js +0 -1998
  22. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/index.js +0 -694
  23. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/service.js +0 -1636
  24. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.0/lib/sort.js +0 -2259
  25. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/filter-query.js +0 -98
  26. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/index.js +0 -37
  27. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/service.js +0 -94
  28. package/.mocha-puppeteer/test-page/@feathersjs/adapter-commons$4.5.1/lib/sort.js +0 -112
  29. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/browser/test-run.js +0 -1
  30. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/browser/test.js +0 -1037
  31. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.0/dist/feathers.js +0 -78377
  32. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/browser/test-run.js +0 -1
  33. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/browser/test.js +0 -102
  34. package/.mocha-puppeteer/test-page/@feathersjs/client$4.5.1/dist/feathers.js +0 -5231
  35. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/hooks.js +0 -2626
  36. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/index.js +0 -540
  37. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.0/lib/utils.js +0 -1991
  38. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/hooks.js +0 -170
  39. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/index.js +0 -17
  40. package/.mocha-puppeteer/test-page/@feathersjs/commons$4.5.1/lib/utils.js +0 -102
  41. package/.mocha-puppeteer/test-page/@feathersjs/errors$4.5.0/lib/index.js +0 -2262
  42. package/.mocha-puppeteer/test-page/@feathersjs/errors$4.5.1/lib/index.js +0 -251
  43. package/.mocha-puppeteer/test-page/@feathersjs/tests$4.5.0/lib/client.js +0 -1506
  44. package/.mocha-puppeteer/test-page/@feathersjs/tests$4.5.1/lib/client.js +0 -83
  45. package/.mocha-puppeteer/test-page/assert$1.5.0/assert.js +0 -508
  46. package/.mocha-puppeteer/test-page/debug$4.1.1/src/browser.js +0 -266
  47. package/.mocha-puppeteer/test-page/debug$4.1.1/src/common.js +0 -268
  48. package/.mocha-puppeteer/test-page/feathers-memory$4.1.0/lib/index.js +0 -143
  49. package/.mocha-puppeteer/test-page/inherits$2.0.1/inherits_browser.js +0 -25
  50. package/.mocha-puppeteer/test-page/lasso-modules-client$2.0.5/src/index.js +0 -592
  51. package/.mocha-puppeteer/test-page/lasso-modules-meta.js +0 -28
  52. package/.mocha-puppeteer/test-page/marko$4.18.35/src/runtime/components/boot-run.js +0 -1
  53. package/.mocha-puppeteer/test-page/marko$4.18.35/src/runtime/components/boot.js +0 -95
  54. package/.mocha-puppeteer/test-page/marko$4.18.42/src/runtime/components/boot-run.js +0 -1
  55. package/.mocha-puppeteer/test-page/marko$4.18.42/src/runtime/components/boot.js +0 -95
  56. package/.mocha-puppeteer/test-page/marko$4.19.0/src/runtime/components/boot-run.js +0 -1
  57. package/.mocha-puppeteer/test-page/marko$4.19.0/src/runtime/components/boot.js +0 -3
  58. package/.mocha-puppeteer/test-page/mocha$3.5.3/mocha.css +0 -326
  59. package/.mocha-puppeteer/test-page/mocha$3.5.3/mocha.js +0 -16590
  60. package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/run-tests-run.js +0 -1
  61. package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/run-tests.js +0 -53
  62. package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/setup-run.js +0 -1
  63. package/.mocha-puppeteer/test-page/mocha-puppeteer$0.14.0/lib/pages/test-page/setup.js +0 -10
  64. package/.mocha-puppeteer/test-page/ms$2.1.2/index.js +0 -164
  65. package/.mocha-puppeteer/test-page/object-assign$4.1.1/index.js +0 -92
  66. package/.mocha-puppeteer/test-page/process$0.11.10/browser.js +0 -186
  67. package/.mocha-puppeteer/test-page/sift$8.5.1/lib/index.js +0 -738
  68. package/.mocha-puppeteer/test-page/superagent$3.8.3/superagent.js +0 -2035
  69. package/.mocha-puppeteer/test-page/util$0.10.3/support/isBufferBrowser.js +0 -7
  70. package/.mocha-puppeteer/test-page/util$0.10.3/util.js +0 -588
  71. package/.nyc_output/coverage.json +0 -1
  72. package/authentication.js +0 -1
  73. package/dist/authentication.js +0 -2242
  74. package/dist/authentication.js.map +0 -1
  75. package/dist/authentication.min.js +0 -1
  76. package/dist/rest.js +0 -3287
  77. package/dist/rest.js.map +0 -1
  78. package/dist/rest.min.js +0 -1
  79. package/dist/socketio.js +0 -2384
  80. package/dist/socketio.js.map +0 -1
  81. package/dist/socketio.min.js +0 -1
  82. package/index.d.ts +0 -23
  83. package/index.js +0 -1
  84. package/rest.js +0 -1
  85. package/socketio.js +0 -1
  86. package/webpack.config.js +0 -69
@@ -1,2262 +0,0 @@
1
- $_mod.def("/@feathersjs/errors$4.5.0/lib/index", function(require, exports, module, __filename, __dirname) { var cov_w3vwktd8z = function () {
2
- var path = '/Users/daffl/Development/feathersjs/feathers/packages/client/index.js',
3
- hash = '734a644a83309e5ab071289cabe61e8cbba56333',
4
- Function = function () {}.constructor,
5
- global = new Function('return this')(),
6
- gcv = '__coverage__',
7
- coverageData = {
8
- path: '/Users/daffl/Development/feathersjs/feathers/packages/client/index.js',
9
- statementMap: {
10
- '0': {
11
- start: {
12
- line: 1,
13
- column: 14
14
- },
15
- end: {
16
- line: 1,
17
- column: 52
18
- }
19
- },
20
- '1': {
21
- start: {
22
- line: 4,
23
- column: 2
24
- },
25
- end: {
26
- line: 4,
27
- column: 23
28
- }
29
- },
30
- '2': {
31
- start: {
32
- line: 10,
33
- column: 2
34
- },
35
- end: {
36
- line: 22,
37
- column: 3
38
- }
39
- },
40
- '3': {
41
- start: {
42
- line: 11,
43
- column: 4
44
- },
45
- end: {
46
- line: 11,
47
- column: 37
48
- }
49
- },
50
- '4': {
51
- start: {
52
- line: 14,
53
- column: 4
54
- },
55
- end: {
56
- line: 16,
57
- column: 5
58
- }
59
- },
60
- '5': {
61
- start: {
62
- line: 15,
63
- column: 6
64
- },
65
- end: {
66
- line: 15,
67
- column: 26
68
- }
69
- },
70
- '6': {
71
- start: {
72
- line: 17,
73
- column: 9
74
- },
75
- end: {
76
- line: 22,
77
- column: 3
78
- }
79
- },
80
- '7': {
81
- start: {
82
- line: 18,
83
- column: 4
84
- },
85
- end: {
86
- line: 18,
87
- column: 37
88
- }
89
- },
90
- '8': {
91
- start: {
92
- line: 19,
93
- column: 4
94
- },
95
- end: {
96
- line: 19,
97
- column: 15
98
- }
99
- },
100
- '9': {
101
- start: {
102
- line: 21,
103
- column: 4
104
- },
105
- end: {
106
- line: 21,
107
- column: 18
108
- }
109
- },
110
- '10': {
111
- start: {
112
- line: 24,
113
- column: 2
114
- },
115
- end: {
116
- line: 39,
117
- column: 3
118
- }
119
- },
120
- '11': {
121
- start: {
122
- line: 28,
123
- column: 4
124
- },
125
- end: {
126
- line: 28,
127
- column: 47
128
- }
129
- },
130
- '12': {
131
- start: {
132
- line: 30,
133
- column: 4
134
- },
135
- end: {
136
- line: 38,
137
- column: 5
138
- }
139
- },
140
- '13': {
141
- start: {
142
- line: 31,
143
- column: 6
144
- },
145
- end: {
146
- line: 31,
147
- column: 30
148
- }
149
- },
150
- '14': {
151
- start: {
152
- line: 32,
153
- column: 6
154
- },
155
- end: {
156
- line: 32,
157
- column: 28
158
- }
159
- },
160
- '15': {
161
- start: {
162
- line: 33,
163
- column: 11
164
- },
165
- end: {
166
- line: 38,
167
- column: 5
168
- }
169
- },
170
- '16': {
171
- start: {
172
- line: 37,
173
- column: 6
174
- },
175
- end: {
176
- line: 37,
177
- column: 55
178
- }
179
- },
180
- '17': {
181
- start: {
182
- line: 44,
183
- column: 2
184
- },
185
- end: {
186
- line: 44,
187
- column: 30
188
- }
189
- },
190
- '18': {
191
- start: {
192
- line: 45,
193
- column: 2
194
- },
195
- end: {
196
- line: 45,
197
- column: 19
198
- }
199
- },
200
- '19': {
201
- start: {
202
- line: 46,
203
- column: 2
204
- },
205
- end: {
206
- line: 46,
207
- column: 25
208
- }
209
- },
210
- '20': {
211
- start: {
212
- line: 47,
213
- column: 2
214
- },
215
- end: {
216
- line: 47,
217
- column: 19
218
- }
219
- },
220
- '21': {
221
- start: {
222
- line: 48,
223
- column: 2
224
- },
225
- end: {
226
- line: 48,
227
- column: 29
228
- }
229
- },
230
- '22': {
231
- start: {
232
- line: 49,
233
- column: 2
234
- },
235
- end: {
236
- line: 49,
237
- column: 22
238
- }
239
- },
240
- '23': {
241
- start: {
242
- line: 50,
243
- column: 2
244
- },
245
- end: {
246
- line: 50,
247
- column: 29
248
- }
249
- },
250
- '24': {
251
- start: {
252
- line: 52,
253
- column: 2
254
- },
255
- end: {
256
- line: 52,
257
- column: 55
258
- }
259
- },
260
- '25': {
261
- start: {
262
- line: 53,
263
- column: 2
264
- },
265
- end: {
266
- line: 53,
267
- column: 21
268
- }
269
- },
270
- '26': {
271
- start: {
272
- line: 55,
273
- column: 2
274
- },
275
- end: {
276
- line: 59,
277
- column: 3
278
- }
279
- },
280
- '27': {
281
- start: {
282
- line: 56,
283
- column: 4
284
- },
285
- end: {
286
- line: 56,
287
- column: 49
288
- }
289
- },
290
- '28': {
291
- start: {
292
- line: 58,
293
- column: 4
294
- },
295
- end: {
296
- line: 58,
297
- column: 37
298
- }
299
- },
300
- '29': {
301
- start: {
302
- line: 63,
303
- column: 2
304
- },
305
- end: {
306
- line: 63,
307
- column: 52
308
- }
309
- },
310
- '30': {
311
- start: {
312
- line: 64,
313
- column: 2
314
- },
315
- end: {
316
- line: 64,
317
- column: 38
318
- }
319
- },
320
- '31': {
321
- start: {
322
- line: 67,
323
- column: 0
324
- },
325
- end: {
326
- line: 67,
327
- column: 35
328
- }
329
- },
330
- '32': {
331
- start: {
332
- line: 71,
333
- column: 0
334
- },
335
- end: {
336
- line: 82,
337
- column: 3
338
- }
339
- },
340
- '33': {
341
- start: {
342
- line: 73,
343
- column: 4
344
- },
345
- end: {
346
- line: 80,
347
- column: 6
348
- }
349
- },
350
- '34': {
351
- start: {
352
- line: 86,
353
- column: 2
354
- },
355
- end: {
356
- line: 86,
357
- column: 76
358
- }
359
- },
360
- '35': {
361
- start: {
362
- line: 89,
363
- column: 0
364
- },
365
- end: {
366
- line: 89,
367
- column: 40
368
- }
369
- },
370
- '36': {
371
- start: {
372
- line: 93,
373
- column: 2
374
- },
375
- end: {
376
- line: 93,
377
- column: 88
378
- }
379
- },
380
- '37': {
381
- start: {
382
- line: 96,
383
- column: 0
384
- },
385
- end: {
386
- line: 96,
387
- column: 46
388
- }
389
- },
390
- '38': {
391
- start: {
392
- line: 100,
393
- column: 2
394
- },
395
- end: {
396
- line: 100,
397
- column: 80
398
- }
399
- },
400
- '39': {
401
- start: {
402
- line: 103,
403
- column: 0
404
- },
405
- end: {
406
- line: 103,
407
- column: 42
408
- }
409
- },
410
- '40': {
411
- start: {
412
- line: 107,
413
- column: 2
414
- },
415
- end: {
416
- line: 107,
417
- column: 73
418
- }
419
- },
420
- '41': {
421
- start: {
422
- line: 110,
423
- column: 0
424
- },
425
- end: {
426
- line: 110,
427
- column: 39
428
- }
429
- },
430
- '42': {
431
- start: {
432
- line: 114,
433
- column: 2
434
- },
435
- end: {
436
- line: 114,
437
- column: 72
438
- }
439
- },
440
- '43': {
441
- start: {
442
- line: 117,
443
- column: 0
444
- },
445
- end: {
446
- line: 117,
447
- column: 38
448
- }
449
- },
450
- '44': {
451
- start: {
452
- line: 121,
453
- column: 2
454
- },
455
- end: {
456
- line: 121,
457
- column: 89
458
- }
459
- },
460
- '45': {
461
- start: {
462
- line: 124,
463
- column: 0
464
- },
465
- end: {
466
- line: 124,
467
- column: 46
468
- }
469
- },
470
- '46': {
471
- start: {
472
- line: 128,
473
- column: 2
474
- },
475
- end: {
476
- line: 128,
477
- column: 82
478
- }
479
- },
480
- '47': {
481
- start: {
482
- line: 131,
483
- column: 0
484
- },
485
- end: {
486
- line: 131,
487
- column: 43
488
- }
489
- },
490
- '48': {
491
- start: {
492
- line: 135,
493
- column: 2
494
- },
495
- end: {
496
- line: 135,
497
- column: 69
498
- }
499
- },
500
- '49': {
501
- start: {
502
- line: 138,
503
- column: 0
504
- },
505
- end: {
506
- line: 138,
507
- column: 37
508
- }
509
- },
510
- '50': {
511
- start: {
512
- line: 142,
513
- column: 2
514
- },
515
- end: {
516
- line: 142,
517
- column: 71
518
- }
519
- },
520
- '51': {
521
- start: {
522
- line: 145,
523
- column: 0
524
- },
525
- end: {
526
- line: 145,
527
- column: 38
528
- }
529
- },
530
- '52': {
531
- start: {
532
- line: 149,
533
- column: 2
534
- },
535
- end: {
536
- line: 149,
537
- column: 84
538
- }
539
- },
540
- '53': {
541
- start: {
542
- line: 152,
543
- column: 0
544
- },
545
- end: {
546
- line: 152,
547
- column: 44
548
- }
549
- },
550
- '54': {
551
- start: {
552
- line: 156,
553
- column: 2
554
- },
555
- end: {
556
- line: 156,
557
- column: 81
558
- }
559
- },
560
- '55': {
561
- start: {
562
- line: 159,
563
- column: 0
564
- },
565
- end: {
566
- line: 159,
567
- column: 43
568
- }
569
- },
570
- '56': {
571
- start: {
572
- line: 163,
573
- column: 2
574
- },
575
- end: {
576
- line: 163,
577
- column: 87
578
- }
579
- },
580
- '57': {
581
- start: {
582
- line: 166,
583
- column: 0
584
- },
585
- end: {
586
- line: 166,
587
- column: 45
588
- }
589
- },
590
- '58': {
591
- start: {
592
- line: 170,
593
- column: 2
594
- },
595
- end: {
596
- line: 170,
597
- column: 80
598
- }
599
- },
600
- '59': {
601
- start: {
602
- line: 173,
603
- column: 0
604
- },
605
- end: {
606
- line: 173,
607
- column: 42
608
- }
609
- },
610
- '60': {
611
- start: {
612
- line: 177,
613
- column: 2
614
- },
615
- end: {
616
- line: 177,
617
- column: 84
618
- }
619
- },
620
- '61': {
621
- start: {
622
- line: 180,
623
- column: 0
624
- },
625
- end: {
626
- line: 180,
627
- column: 44
628
- }
629
- },
630
- '62': {
631
- start: {
632
- line: 184,
633
- column: 2
634
- },
635
- end: {
636
- line: 184,
637
- column: 76
638
- }
639
- },
640
- '63': {
641
- start: {
642
- line: 187,
643
- column: 0
644
- },
645
- end: {
646
- line: 187,
647
- column: 40
648
- }
649
- },
650
- '64': {
651
- start: {
652
- line: 191,
653
- column: 2
654
- },
655
- end: {
656
- line: 191,
657
- column: 77
658
- }
659
- },
660
- '65': {
661
- start: {
662
- line: 194,
663
- column: 0
664
- },
665
- end: {
666
- line: 194,
667
- column: 41
668
- }
669
- },
670
- '66': {
671
- start: {
672
- line: 196,
673
- column: 15
674
- },
675
- end: {
676
- line: 230,
677
- column: 1
678
- }
679
- },
680
- '67': {
681
- start: {
682
- line: 233,
683
- column: 2
684
- },
685
- end: {
686
- line: 235,
687
- column: 3
688
- }
689
- },
690
- '68': {
691
- start: {
692
- line: 234,
693
- column: 4
694
- },
695
- end: {
696
- line: 234,
697
- column: 17
698
- }
699
- },
700
- '69': {
701
- start: {
702
- line: 237,
703
- column: 24
704
- },
705
- end: {
706
- line: 237,
707
- column: 42
708
- }
709
- },
710
- '70': {
711
- start: {
712
- line: 238,
713
- column: 17
714
- },
715
- end: {
716
- line: 240,
717
- column: 39
718
- }
719
- },
720
- '71': {
721
- start: {
722
- line: 242,
723
- column: 2
724
- },
725
- end: {
726
- line: 244,
727
- column: 3
728
- }
729
- },
730
- '72': {
731
- start: {
732
- line: 243,
733
- column: 4
734
- },
735
- end: {
736
- line: 243,
737
- column: 33
738
- }
739
- },
740
- '73': {
741
- start: {
742
- line: 246,
743
- column: 2
744
- },
745
- end: {
746
- line: 246,
747
- column: 16
748
- }
749
- },
750
- '74': {
751
- start: {
752
- line: 249,
753
- column: 0
754
- },
755
- end: {
756
- line: 249,
757
- column: 52
758
- }
759
- }
760
- },
761
- fnMap: {
762
- '0': {
763
- name: 'FeathersError',
764
- decl: {
765
- start: {
766
- line: 3,
767
- column: 9
768
- },
769
- end: {
770
- line: 3,
771
- column: 22
772
- }
773
- },
774
- loc: {
775
- start: {
776
- line: 3,
777
- column: 58
778
- },
779
- end: {
780
- line: 60,
781
- column: 1
782
- }
783
- },
784
- line: 3
785
- },
786
- '1': {
787
- name: 'inheritsFrom',
788
- decl: {
789
- start: {
790
- line: 62,
791
- column: 9
792
- },
793
- end: {
794
- line: 62,
795
- column: 21
796
- }
797
- },
798
- loc: {
799
- start: {
800
- line: 62,
801
- column: 38
802
- },
803
- end: {
804
- line: 65,
805
- column: 1
806
- }
807
- },
808
- line: 62
809
- },
810
- '2': {
811
- name: '(anonymous_2)',
812
- decl: {
813
- start: {
814
- line: 72,
815
- column: 9
816
- },
817
- end: {
818
- line: 72,
819
- column: 10
820
- }
821
- },
822
- loc: {
823
- start: {
824
- line: 72,
825
- column: 21
826
- },
827
- end: {
828
- line: 81,
829
- column: 3
830
- }
831
- },
832
- line: 72
833
- },
834
- '3': {
835
- name: 'BadRequest',
836
- decl: {
837
- start: {
838
- line: 85,
839
- column: 9
840
- },
841
- end: {
842
- line: 85,
843
- column: 19
844
- }
845
- },
846
- loc: {
847
- start: {
848
- line: 85,
849
- column: 36
850
- },
851
- end: {
852
- line: 87,
853
- column: 1
854
- }
855
- },
856
- line: 85
857
- },
858
- '4': {
859
- name: 'NotAuthenticated',
860
- decl: {
861
- start: {
862
- line: 92,
863
- column: 9
864
- },
865
- end: {
866
- line: 92,
867
- column: 25
868
- }
869
- },
870
- loc: {
871
- start: {
872
- line: 92,
873
- column: 42
874
- },
875
- end: {
876
- line: 94,
877
- column: 1
878
- }
879
- },
880
- line: 92
881
- },
882
- '5': {
883
- name: 'PaymentError',
884
- decl: {
885
- start: {
886
- line: 99,
887
- column: 9
888
- },
889
- end: {
890
- line: 99,
891
- column: 21
892
- }
893
- },
894
- loc: {
895
- start: {
896
- line: 99,
897
- column: 38
898
- },
899
- end: {
900
- line: 101,
901
- column: 1
902
- }
903
- },
904
- line: 99
905
- },
906
- '6': {
907
- name: 'Forbidden',
908
- decl: {
909
- start: {
910
- line: 106,
911
- column: 9
912
- },
913
- end: {
914
- line: 106,
915
- column: 18
916
- }
917
- },
918
- loc: {
919
- start: {
920
- line: 106,
921
- column: 35
922
- },
923
- end: {
924
- line: 108,
925
- column: 1
926
- }
927
- },
928
- line: 106
929
- },
930
- '7': {
931
- name: 'NotFound',
932
- decl: {
933
- start: {
934
- line: 113,
935
- column: 9
936
- },
937
- end: {
938
- line: 113,
939
- column: 17
940
- }
941
- },
942
- loc: {
943
- start: {
944
- line: 113,
945
- column: 34
946
- },
947
- end: {
948
- line: 115,
949
- column: 1
950
- }
951
- },
952
- line: 113
953
- },
954
- '8': {
955
- name: 'MethodNotAllowed',
956
- decl: {
957
- start: {
958
- line: 120,
959
- column: 9
960
- },
961
- end: {
962
- line: 120,
963
- column: 25
964
- }
965
- },
966
- loc: {
967
- start: {
968
- line: 120,
969
- column: 42
970
- },
971
- end: {
972
- line: 122,
973
- column: 1
974
- }
975
- },
976
- line: 120
977
- },
978
- '9': {
979
- name: 'NotAcceptable',
980
- decl: {
981
- start: {
982
- line: 127,
983
- column: 9
984
- },
985
- end: {
986
- line: 127,
987
- column: 22
988
- }
989
- },
990
- loc: {
991
- start: {
992
- line: 127,
993
- column: 39
994
- },
995
- end: {
996
- line: 129,
997
- column: 1
998
- }
999
- },
1000
- line: 127
1001
- },
1002
- '10': {
1003
- name: 'Timeout',
1004
- decl: {
1005
- start: {
1006
- line: 134,
1007
- column: 9
1008
- },
1009
- end: {
1010
- line: 134,
1011
- column: 16
1012
- }
1013
- },
1014
- loc: {
1015
- start: {
1016
- line: 134,
1017
- column: 33
1018
- },
1019
- end: {
1020
- line: 136,
1021
- column: 1
1022
- }
1023
- },
1024
- line: 134
1025
- },
1026
- '11': {
1027
- name: 'Conflict',
1028
- decl: {
1029
- start: {
1030
- line: 141,
1031
- column: 9
1032
- },
1033
- end: {
1034
- line: 141,
1035
- column: 17
1036
- }
1037
- },
1038
- loc: {
1039
- start: {
1040
- line: 141,
1041
- column: 34
1042
- },
1043
- end: {
1044
- line: 143,
1045
- column: 1
1046
- }
1047
- },
1048
- line: 141
1049
- },
1050
- '12': {
1051
- name: 'LengthRequired',
1052
- decl: {
1053
- start: {
1054
- line: 148,
1055
- column: 9
1056
- },
1057
- end: {
1058
- line: 148,
1059
- column: 23
1060
- }
1061
- },
1062
- loc: {
1063
- start: {
1064
- line: 148,
1065
- column: 40
1066
- },
1067
- end: {
1068
- line: 150,
1069
- column: 1
1070
- }
1071
- },
1072
- line: 148
1073
- },
1074
- '13': {
1075
- name: 'Unprocessable',
1076
- decl: {
1077
- start: {
1078
- line: 155,
1079
- column: 9
1080
- },
1081
- end: {
1082
- line: 155,
1083
- column: 22
1084
- }
1085
- },
1086
- loc: {
1087
- start: {
1088
- line: 155,
1089
- column: 39
1090
- },
1091
- end: {
1092
- line: 157,
1093
- column: 1
1094
- }
1095
- },
1096
- line: 155
1097
- },
1098
- '14': {
1099
- name: 'TooManyRequests',
1100
- decl: {
1101
- start: {
1102
- line: 162,
1103
- column: 9
1104
- },
1105
- end: {
1106
- line: 162,
1107
- column: 24
1108
- }
1109
- },
1110
- loc: {
1111
- start: {
1112
- line: 162,
1113
- column: 41
1114
- },
1115
- end: {
1116
- line: 164,
1117
- column: 1
1118
- }
1119
- },
1120
- line: 162
1121
- },
1122
- '15': {
1123
- name: 'GeneralError',
1124
- decl: {
1125
- start: {
1126
- line: 169,
1127
- column: 9
1128
- },
1129
- end: {
1130
- line: 169,
1131
- column: 21
1132
- }
1133
- },
1134
- loc: {
1135
- start: {
1136
- line: 169,
1137
- column: 38
1138
- },
1139
- end: {
1140
- line: 171,
1141
- column: 1
1142
- }
1143
- },
1144
- line: 169
1145
- },
1146
- '16': {
1147
- name: 'NotImplemented',
1148
- decl: {
1149
- start: {
1150
- line: 176,
1151
- column: 9
1152
- },
1153
- end: {
1154
- line: 176,
1155
- column: 23
1156
- }
1157
- },
1158
- loc: {
1159
- start: {
1160
- line: 176,
1161
- column: 40
1162
- },
1163
- end: {
1164
- line: 178,
1165
- column: 1
1166
- }
1167
- },
1168
- line: 176
1169
- },
1170
- '17': {
1171
- name: 'BadGateway',
1172
- decl: {
1173
- start: {
1174
- line: 183,
1175
- column: 9
1176
- },
1177
- end: {
1178
- line: 183,
1179
- column: 19
1180
- }
1181
- },
1182
- loc: {
1183
- start: {
1184
- line: 183,
1185
- column: 36
1186
- },
1187
- end: {
1188
- line: 185,
1189
- column: 1
1190
- }
1191
- },
1192
- line: 183
1193
- },
1194
- '18': {
1195
- name: 'Unavailable',
1196
- decl: {
1197
- start: {
1198
- line: 190,
1199
- column: 9
1200
- },
1201
- end: {
1202
- line: 190,
1203
- column: 20
1204
- }
1205
- },
1206
- loc: {
1207
- start: {
1208
- line: 190,
1209
- column: 37
1210
- },
1211
- end: {
1212
- line: 192,
1213
- column: 1
1214
- }
1215
- },
1216
- line: 190
1217
- },
1218
- '19': {
1219
- name: 'convert',
1220
- decl: {
1221
- start: {
1222
- line: 232,
1223
- column: 9
1224
- },
1225
- end: {
1226
- line: 232,
1227
- column: 16
1228
- }
1229
- },
1230
- loc: {
1231
- start: {
1232
- line: 232,
1233
- column: 25
1234
- },
1235
- end: {
1236
- line: 247,
1237
- column: 1
1238
- }
1239
- },
1240
- line: 232
1241
- }
1242
- },
1243
- branchMap: {
1244
- '0': {
1245
- loc: {
1246
- start: {
1247
- line: 4,
1248
- column: 8
1249
- },
1250
- end: {
1251
- line: 4,
1252
- column: 22
1253
- }
1254
- },
1255
- type: 'binary-expr',
1256
- locations: [{
1257
- start: {
1258
- line: 4,
1259
- column: 8
1260
- },
1261
- end: {
1262
- line: 4,
1263
- column: 11
1264
- }
1265
- }, {
1266
- start: {
1267
- line: 4,
1268
- column: 15
1269
- },
1270
- end: {
1271
- line: 4,
1272
- column: 22
1273
- }
1274
- }],
1275
- line: 4
1276
- },
1277
- '1': {
1278
- loc: {
1279
- start: {
1280
- line: 10,
1281
- column: 2
1282
- },
1283
- end: {
1284
- line: 22,
1285
- column: 3
1286
- }
1287
- },
1288
- type: 'if',
1289
- locations: [{
1290
- start: {
1291
- line: 10,
1292
- column: 2
1293
- },
1294
- end: {
1295
- line: 22,
1296
- column: 3
1297
- }
1298
- }, {
1299
- start: {
1300
- line: 10,
1301
- column: 2
1302
- },
1303
- end: {
1304
- line: 22,
1305
- column: 3
1306
- }
1307
- }],
1308
- line: 10
1309
- },
1310
- '2': {
1311
- loc: {
1312
- start: {
1313
- line: 11,
1314
- column: 14
1315
- },
1316
- end: {
1317
- line: 11,
1318
- column: 36
1319
- }
1320
- },
1321
- type: 'binary-expr',
1322
- locations: [{
1323
- start: {
1324
- line: 11,
1325
- column: 14
1326
- },
1327
- end: {
1328
- line: 11,
1329
- column: 25
1330
- }
1331
- }, {
1332
- start: {
1333
- line: 11,
1334
- column: 29
1335
- },
1336
- end: {
1337
- line: 11,
1338
- column: 36
1339
- }
1340
- }],
1341
- line: 11
1342
- },
1343
- '3': {
1344
- loc: {
1345
- start: {
1346
- line: 14,
1347
- column: 4
1348
- },
1349
- end: {
1350
- line: 16,
1351
- column: 5
1352
- }
1353
- },
1354
- type: 'if',
1355
- locations: [{
1356
- start: {
1357
- line: 14,
1358
- column: 4
1359
- },
1360
- end: {
1361
- line: 16,
1362
- column: 5
1363
- }
1364
- }, {
1365
- start: {
1366
- line: 14,
1367
- column: 4
1368
- },
1369
- end: {
1370
- line: 16,
1371
- column: 5
1372
- }
1373
- }],
1374
- line: 14
1375
- },
1376
- '4': {
1377
- loc: {
1378
- start: {
1379
- line: 17,
1380
- column: 9
1381
- },
1382
- end: {
1383
- line: 22,
1384
- column: 3
1385
- }
1386
- },
1387
- type: 'if',
1388
- locations: [{
1389
- start: {
1390
- line: 17,
1391
- column: 9
1392
- },
1393
- end: {
1394
- line: 22,
1395
- column: 3
1396
- }
1397
- }, {
1398
- start: {
1399
- line: 17,
1400
- column: 9
1401
- },
1402
- end: {
1403
- line: 22,
1404
- column: 3
1405
- }
1406
- }],
1407
- line: 17
1408
- },
1409
- '5': {
1410
- loc: {
1411
- start: {
1412
- line: 18,
1413
- column: 14
1414
- },
1415
- end: {
1416
- line: 18,
1417
- column: 36
1418
- }
1419
- },
1420
- type: 'binary-expr',
1421
- locations: [{
1422
- start: {
1423
- line: 18,
1424
- column: 14
1425
- },
1426
- end: {
1427
- line: 18,
1428
- column: 25
1429
- }
1430
- }, {
1431
- start: {
1432
- line: 18,
1433
- column: 29
1434
- },
1435
- end: {
1436
- line: 18,
1437
- column: 36
1438
- }
1439
- }],
1440
- line: 18
1441
- },
1442
- '6': {
1443
- loc: {
1444
- start: {
1445
- line: 24,
1446
- column: 2
1447
- },
1448
- end: {
1449
- line: 39,
1450
- column: 3
1451
- }
1452
- },
1453
- type: 'if',
1454
- locations: [{
1455
- start: {
1456
- line: 24,
1457
- column: 2
1458
- },
1459
- end: {
1460
- line: 39,
1461
- column: 3
1462
- }
1463
- }, {
1464
- start: {
1465
- line: 24,
1466
- column: 2
1467
- },
1468
- end: {
1469
- line: 39,
1470
- column: 3
1471
- }
1472
- }],
1473
- line: 24
1474
- },
1475
- '7': {
1476
- loc: {
1477
- start: {
1478
- line: 30,
1479
- column: 4
1480
- },
1481
- end: {
1482
- line: 38,
1483
- column: 5
1484
- }
1485
- },
1486
- type: 'if',
1487
- locations: [{
1488
- start: {
1489
- line: 30,
1490
- column: 4
1491
- },
1492
- end: {
1493
- line: 38,
1494
- column: 5
1495
- }
1496
- }, {
1497
- start: {
1498
- line: 30,
1499
- column: 4
1500
- },
1501
- end: {
1502
- line: 38,
1503
- column: 5
1504
- }
1505
- }],
1506
- line: 30
1507
- },
1508
- '8': {
1509
- loc: {
1510
- start: {
1511
- line: 33,
1512
- column: 11
1513
- },
1514
- end: {
1515
- line: 38,
1516
- column: 5
1517
- }
1518
- },
1519
- type: 'if',
1520
- locations: [{
1521
- start: {
1522
- line: 33,
1523
- column: 11
1524
- },
1525
- end: {
1526
- line: 38,
1527
- column: 5
1528
- }
1529
- }, {
1530
- start: {
1531
- line: 33,
1532
- column: 11
1533
- },
1534
- end: {
1535
- line: 38,
1536
- column: 5
1537
- }
1538
- }],
1539
- line: 33
1540
- },
1541
- '9': {
1542
- loc: {
1543
- start: {
1544
- line: 50,
1545
- column: 16
1546
- },
1547
- end: {
1548
- line: 50,
1549
- column: 28
1550
- }
1551
- },
1552
- type: 'binary-expr',
1553
- locations: [{
1554
- start: {
1555
- line: 50,
1556
- column: 16
1557
- },
1558
- end: {
1559
- line: 50,
1560
- column: 22
1561
- }
1562
- }, {
1563
- start: {
1564
- line: 50,
1565
- column: 26
1566
- },
1567
- end: {
1568
- line: 50,
1569
- column: 28
1570
- }
1571
- }],
1572
- line: 50
1573
- },
1574
- '10': {
1575
- loc: {
1576
- start: {
1577
- line: 55,
1578
- column: 2
1579
- },
1580
- end: {
1581
- line: 59,
1582
- column: 3
1583
- }
1584
- },
1585
- type: 'if',
1586
- locations: [{
1587
- start: {
1588
- line: 55,
1589
- column: 2
1590
- },
1591
- end: {
1592
- line: 59,
1593
- column: 3
1594
- }
1595
- }, {
1596
- start: {
1597
- line: 55,
1598
- column: 2
1599
- },
1600
- end: {
1601
- line: 59,
1602
- column: 3
1603
- }
1604
- }],
1605
- line: 55
1606
- },
1607
- '11': {
1608
- loc: {
1609
- start: {
1610
- line: 233,
1611
- column: 2
1612
- },
1613
- end: {
1614
- line: 235,
1615
- column: 3
1616
- }
1617
- },
1618
- type: 'if',
1619
- locations: [{
1620
- start: {
1621
- line: 233,
1622
- column: 2
1623
- },
1624
- end: {
1625
- line: 235,
1626
- column: 3
1627
- }
1628
- }, {
1629
- start: {
1630
- line: 233,
1631
- column: 2
1632
- },
1633
- end: {
1634
- line: 235,
1635
- column: 3
1636
- }
1637
- }],
1638
- line: 233
1639
- },
1640
- '12': {
1641
- loc: {
1642
- start: {
1643
- line: 238,
1644
- column: 17
1645
- },
1646
- end: {
1647
- line: 240,
1648
- column: 39
1649
- }
1650
- },
1651
- type: 'cond-expr',
1652
- locations: [{
1653
- start: {
1654
- line: 239,
1655
- column: 6
1656
- },
1657
- end: {
1658
- line: 239,
1659
- column: 50
1660
- }
1661
- }, {
1662
- start: {
1663
- line: 240,
1664
- column: 6
1665
- },
1666
- end: {
1667
- line: 240,
1668
- column: 39
1669
- }
1670
- }],
1671
- line: 238
1672
- },
1673
- '13': {
1674
- loc: {
1675
- start: {
1676
- line: 240,
1677
- column: 16
1678
- },
1679
- end: {
1680
- line: 240,
1681
- column: 38
1682
- }
1683
- },
1684
- type: 'binary-expr',
1685
- locations: [{
1686
- start: {
1687
- line: 240,
1688
- column: 16
1689
- },
1690
- end: {
1691
- line: 240,
1692
- column: 29
1693
- }
1694
- }, {
1695
- start: {
1696
- line: 240,
1697
- column: 33
1698
- },
1699
- end: {
1700
- line: 240,
1701
- column: 38
1702
- }
1703
- }],
1704
- line: 240
1705
- },
1706
- '14': {
1707
- loc: {
1708
- start: {
1709
- line: 242,
1710
- column: 2
1711
- },
1712
- end: {
1713
- line: 244,
1714
- column: 3
1715
- }
1716
- },
1717
- type: 'if',
1718
- locations: [{
1719
- start: {
1720
- line: 242,
1721
- column: 2
1722
- },
1723
- end: {
1724
- line: 244,
1725
- column: 3
1726
- }
1727
- }, {
1728
- start: {
1729
- line: 242,
1730
- column: 2
1731
- },
1732
- end: {
1733
- line: 244,
1734
- column: 3
1735
- }
1736
- }],
1737
- line: 242
1738
- }
1739
- },
1740
- s: {
1741
- '0': 0,
1742
- '1': 0,
1743
- '2': 0,
1744
- '3': 0,
1745
- '4': 0,
1746
- '5': 0,
1747
- '6': 0,
1748
- '7': 0,
1749
- '8': 0,
1750
- '9': 0,
1751
- '10': 0,
1752
- '11': 0,
1753
- '12': 0,
1754
- '13': 0,
1755
- '14': 0,
1756
- '15': 0,
1757
- '16': 0,
1758
- '17': 0,
1759
- '18': 0,
1760
- '19': 0,
1761
- '20': 0,
1762
- '21': 0,
1763
- '22': 0,
1764
- '23': 0,
1765
- '24': 0,
1766
- '25': 0,
1767
- '26': 0,
1768
- '27': 0,
1769
- '28': 0,
1770
- '29': 0,
1771
- '30': 0,
1772
- '31': 0,
1773
- '32': 0,
1774
- '33': 0,
1775
- '34': 0,
1776
- '35': 0,
1777
- '36': 0,
1778
- '37': 0,
1779
- '38': 0,
1780
- '39': 0,
1781
- '40': 0,
1782
- '41': 0,
1783
- '42': 0,
1784
- '43': 0,
1785
- '44': 0,
1786
- '45': 0,
1787
- '46': 0,
1788
- '47': 0,
1789
- '48': 0,
1790
- '49': 0,
1791
- '50': 0,
1792
- '51': 0,
1793
- '52': 0,
1794
- '53': 0,
1795
- '54': 0,
1796
- '55': 0,
1797
- '56': 0,
1798
- '57': 0,
1799
- '58': 0,
1800
- '59': 0,
1801
- '60': 0,
1802
- '61': 0,
1803
- '62': 0,
1804
- '63': 0,
1805
- '64': 0,
1806
- '65': 0,
1807
- '66': 0,
1808
- '67': 0,
1809
- '68': 0,
1810
- '69': 0,
1811
- '70': 0,
1812
- '71': 0,
1813
- '72': 0,
1814
- '73': 0,
1815
- '74': 0
1816
- },
1817
- f: {
1818
- '0': 0,
1819
- '1': 0,
1820
- '2': 0,
1821
- '3': 0,
1822
- '4': 0,
1823
- '5': 0,
1824
- '6': 0,
1825
- '7': 0,
1826
- '8': 0,
1827
- '9': 0,
1828
- '10': 0,
1829
- '11': 0,
1830
- '12': 0,
1831
- '13': 0,
1832
- '14': 0,
1833
- '15': 0,
1834
- '16': 0,
1835
- '17': 0,
1836
- '18': 0,
1837
- '19': 0
1838
- },
1839
- b: {
1840
- '0': [0, 0],
1841
- '1': [0, 0],
1842
- '2': [0, 0],
1843
- '3': [0, 0],
1844
- '4': [0, 0],
1845
- '5': [0, 0],
1846
- '6': [0, 0],
1847
- '7': [0, 0],
1848
- '8': [0, 0],
1849
- '9': [0, 0],
1850
- '10': [0, 0],
1851
- '11': [0, 0],
1852
- '12': [0, 0],
1853
- '13': [0, 0],
1854
- '14': [0, 0]
1855
- },
1856
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
1857
- },
1858
- coverage = global[gcv] || (global[gcv] = {});
1859
-
1860
- if (coverage[path] && coverage[path].hash === hash) {
1861
- return coverage[path];
1862
- }
1863
-
1864
- coverageData.hash = hash;
1865
- return coverage[path] = coverageData;
1866
- }();
1867
-
1868
- const debug = (cov_w3vwktd8z.s[0]++, require('/debug$4.1.1/src/browser'/*'debug'*/)('@feathersjs/errors'));
1869
-
1870
- function FeathersError(msg, name, code, className, data) {
1871
- cov_w3vwktd8z.f[0]++;
1872
- cov_w3vwktd8z.s[1]++;
1873
-
1874
- msg = (cov_w3vwktd8z.b[0][0]++, msg) || (cov_w3vwktd8z.b[0][1]++, 'Error');
1875
-
1876
- let errors;
1877
- let message;
1878
- let newData;
1879
-
1880
- cov_w3vwktd8z.s[2]++;
1881
- if (msg instanceof Error) {
1882
- cov_w3vwktd8z.b[1][0]++;
1883
- cov_w3vwktd8z.s[3]++;
1884
-
1885
- message = (cov_w3vwktd8z.b[2][0]++, msg.message) || (cov_w3vwktd8z.b[2][1]++, 'Error');
1886
-
1887
- // NOTE (EK): This is typically to handle validation errors
1888
- cov_w3vwktd8z.s[4]++;
1889
- if (msg.errors) {
1890
- cov_w3vwktd8z.b[3][0]++;
1891
- cov_w3vwktd8z.s[5]++;
1892
-
1893
- errors = msg.errors;
1894
- } else {
1895
- cov_w3vwktd8z.b[3][1]++;
1896
- }
1897
- } else {
1898
- cov_w3vwktd8z.b[1][1]++;
1899
- cov_w3vwktd8z.s[6]++;
1900
- if (typeof msg === 'object') {
1901
- cov_w3vwktd8z.b[4][0]++;
1902
- cov_w3vwktd8z.s[7]++;
1903
- // Support plain old objects
1904
- message = (cov_w3vwktd8z.b[5][0]++, msg.message) || (cov_w3vwktd8z.b[5][1]++, 'Error');
1905
- cov_w3vwktd8z.s[8]++;
1906
- data = msg;
1907
- } else {
1908
- cov_w3vwktd8z.b[4][1]++;
1909
- cov_w3vwktd8z.s[9]++;
1910
- // message is just a string
1911
- message = msg;
1912
- }
1913
- }cov_w3vwktd8z.s[10]++;
1914
- if (data) {
1915
- cov_w3vwktd8z.b[6][0]++;
1916
- cov_w3vwktd8z.s[11]++;
1917
-
1918
- // NOTE(EK): To make sure that we are not messing
1919
- // with immutable data, just make a copy.
1920
- // https://github.com/feathersjs/errors/issues/19
1921
- newData = JSON.parse(JSON.stringify(data));
1922
-
1923
- cov_w3vwktd8z.s[12]++;
1924
- if (newData.errors) {
1925
- cov_w3vwktd8z.b[7][0]++;
1926
- cov_w3vwktd8z.s[13]++;
1927
-
1928
- errors = newData.errors;
1929
- cov_w3vwktd8z.s[14]++;
1930
- delete newData.errors;
1931
- } else {
1932
- cov_w3vwktd8z.b[7][1]++;
1933
- cov_w3vwktd8z.s[15]++;
1934
- if (data.errors) {
1935
- cov_w3vwktd8z.b[8][0]++;
1936
- cov_w3vwktd8z.s[16]++;
1937
-
1938
- // The errors property from data could be
1939
- // stripped away while cloning resulting newData not to have it
1940
- // For example: when cloning arrays this property
1941
- errors = JSON.parse(JSON.stringify(data.errors));
1942
- } else {
1943
- cov_w3vwktd8z.b[8][1]++;
1944
- }
1945
- }
1946
- } else {
1947
- cov_w3vwktd8z.b[6][1]++;
1948
- }
1949
-
1950
- // NOTE (EK): Babel doesn't support this so
1951
- // we have to pass in the class name manually.
1952
- // this.name = this.constructor.name;
1953
- cov_w3vwktd8z.s[17]++;
1954
- this.type = 'FeathersError';
1955
- cov_w3vwktd8z.s[18]++;
1956
- this.name = name;
1957
- cov_w3vwktd8z.s[19]++;
1958
- this.message = message;
1959
- cov_w3vwktd8z.s[20]++;
1960
- this.code = code;
1961
- cov_w3vwktd8z.s[21]++;
1962
- this.className = className;
1963
- cov_w3vwktd8z.s[22]++;
1964
- this.data = newData;
1965
- cov_w3vwktd8z.s[23]++;
1966
- this.errors = (cov_w3vwktd8z.b[9][0]++, errors) || (cov_w3vwktd8z.b[9][1]++, {});
1967
-
1968
- cov_w3vwktd8z.s[24]++;
1969
- debug(`${this.name}(${this.code}): ${this.message}`);
1970
- cov_w3vwktd8z.s[25]++;
1971
- debug(this.errors);
1972
-
1973
- cov_w3vwktd8z.s[26]++;
1974
- if (Error.captureStackTrace) {
1975
- cov_w3vwktd8z.b[10][0]++;
1976
- cov_w3vwktd8z.s[27]++;
1977
-
1978
- Error.captureStackTrace(this, FeathersError);
1979
- } else {
1980
- cov_w3vwktd8z.b[10][1]++;
1981
- cov_w3vwktd8z.s[28]++;
1982
-
1983
- this.stack = new Error().stack;
1984
- }
1985
- }
1986
-
1987
- function inheritsFrom(Child, Parent) {
1988
- cov_w3vwktd8z.f[1]++;
1989
- cov_w3vwktd8z.s[29]++;
1990
-
1991
- Child.prototype = Object.create(Parent.prototype);
1992
- cov_w3vwktd8z.s[30]++;
1993
- Child.prototype.constructor = Child;
1994
- }
1995
-
1996
- cov_w3vwktd8z.s[31]++;
1997
- inheritsFrom(FeathersError, Error);
1998
-
1999
- // NOTE (EK): A little hack to get around `message` not
2000
- // being included in the default toJSON call.
2001
- cov_w3vwktd8z.s[32]++;
2002
- Object.defineProperty(FeathersError.prototype, 'toJSON', {
2003
- value: function () {
2004
- cov_w3vwktd8z.f[2]++;
2005
- cov_w3vwktd8z.s[33]++;
2006
-
2007
- return {
2008
- name: this.name,
2009
- message: this.message,
2010
- code: this.code,
2011
- className: this.className,
2012
- data: this.data,
2013
- errors: this.errors
2014
- };
2015
- }
2016
- });
2017
-
2018
- // 400 - Bad Request
2019
- function BadRequest(message, data) {
2020
- cov_w3vwktd8z.f[3]++;
2021
- cov_w3vwktd8z.s[34]++;
2022
-
2023
- FeathersError.call(this, message, 'BadRequest', 400, 'bad-request', data);
2024
- }
2025
-
2026
- cov_w3vwktd8z.s[35]++;
2027
- inheritsFrom(BadRequest, FeathersError);
2028
-
2029
- // 401 - Not Authenticated
2030
- function NotAuthenticated(message, data) {
2031
- cov_w3vwktd8z.f[4]++;
2032
- cov_w3vwktd8z.s[36]++;
2033
-
2034
- FeathersError.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);
2035
- }
2036
-
2037
- cov_w3vwktd8z.s[37]++;
2038
- inheritsFrom(NotAuthenticated, FeathersError);
2039
-
2040
- // 402 - Payment Error
2041
- function PaymentError(message, data) {
2042
- cov_w3vwktd8z.f[5]++;
2043
- cov_w3vwktd8z.s[38]++;
2044
-
2045
- FeathersError.call(this, message, 'PaymentError', 402, 'payment-error', data);
2046
- }
2047
-
2048
- cov_w3vwktd8z.s[39]++;
2049
- inheritsFrom(PaymentError, FeathersError);
2050
-
2051
- // 403 - Forbidden
2052
- function Forbidden(message, data) {
2053
- cov_w3vwktd8z.f[6]++;
2054
- cov_w3vwktd8z.s[40]++;
2055
-
2056
- FeathersError.call(this, message, 'Forbidden', 403, 'forbidden', data);
2057
- }
2058
-
2059
- cov_w3vwktd8z.s[41]++;
2060
- inheritsFrom(Forbidden, FeathersError);
2061
-
2062
- // 404 - Not Found
2063
- function NotFound(message, data) {
2064
- cov_w3vwktd8z.f[7]++;
2065
- cov_w3vwktd8z.s[42]++;
2066
-
2067
- FeathersError.call(this, message, 'NotFound', 404, 'not-found', data);
2068
- }
2069
-
2070
- cov_w3vwktd8z.s[43]++;
2071
- inheritsFrom(NotFound, FeathersError);
2072
-
2073
- // 405 - Method Not Allowed
2074
- function MethodNotAllowed(message, data) {
2075
- cov_w3vwktd8z.f[8]++;
2076
- cov_w3vwktd8z.s[44]++;
2077
-
2078
- FeathersError.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);
2079
- }
2080
-
2081
- cov_w3vwktd8z.s[45]++;
2082
- inheritsFrom(MethodNotAllowed, FeathersError);
2083
-
2084
- // 406 - Not Acceptable
2085
- function NotAcceptable(message, data) {
2086
- cov_w3vwktd8z.f[9]++;
2087
- cov_w3vwktd8z.s[46]++;
2088
-
2089
- FeathersError.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);
2090
- }
2091
-
2092
- cov_w3vwktd8z.s[47]++;
2093
- inheritsFrom(NotAcceptable, FeathersError);
2094
-
2095
- // 408 - Timeout
2096
- function Timeout(message, data) {
2097
- cov_w3vwktd8z.f[10]++;
2098
- cov_w3vwktd8z.s[48]++;
2099
-
2100
- FeathersError.call(this, message, 'Timeout', 408, 'timeout', data);
2101
- }
2102
-
2103
- cov_w3vwktd8z.s[49]++;
2104
- inheritsFrom(Timeout, FeathersError);
2105
-
2106
- // 409 - Conflict
2107
- function Conflict(message, data) {
2108
- cov_w3vwktd8z.f[11]++;
2109
- cov_w3vwktd8z.s[50]++;
2110
-
2111
- FeathersError.call(this, message, 'Conflict', 409, 'conflict', data);
2112
- }
2113
-
2114
- cov_w3vwktd8z.s[51]++;
2115
- inheritsFrom(Conflict, FeathersError);
2116
-
2117
- // 411 - Length Required
2118
- function LengthRequired(message, data) {
2119
- cov_w3vwktd8z.f[12]++;
2120
- cov_w3vwktd8z.s[52]++;
2121
-
2122
- FeathersError.call(this, message, 'LengthRequired', 411, 'length-required', data);
2123
- }
2124
-
2125
- cov_w3vwktd8z.s[53]++;
2126
- inheritsFrom(LengthRequired, FeathersError);
2127
-
2128
- // 422 Unprocessable
2129
- function Unprocessable(message, data) {
2130
- cov_w3vwktd8z.f[13]++;
2131
- cov_w3vwktd8z.s[54]++;
2132
-
2133
- FeathersError.call(this, message, 'Unprocessable', 422, 'unprocessable', data);
2134
- }
2135
-
2136
- cov_w3vwktd8z.s[55]++;
2137
- inheritsFrom(Unprocessable, FeathersError);
2138
-
2139
- // 429 Too Many Requests
2140
- function TooManyRequests(message, data) {
2141
- cov_w3vwktd8z.f[14]++;
2142
- cov_w3vwktd8z.s[56]++;
2143
-
2144
- FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);
2145
- }
2146
-
2147
- cov_w3vwktd8z.s[57]++;
2148
- inheritsFrom(TooManyRequests, FeathersError);
2149
-
2150
- // 500 - General Error
2151
- function GeneralError(message, data) {
2152
- cov_w3vwktd8z.f[15]++;
2153
- cov_w3vwktd8z.s[58]++;
2154
-
2155
- FeathersError.call(this, message, 'GeneralError', 500, 'general-error', data);
2156
- }
2157
-
2158
- cov_w3vwktd8z.s[59]++;
2159
- inheritsFrom(GeneralError, FeathersError);
2160
-
2161
- // 501 - Not Implemented
2162
- function NotImplemented(message, data) {
2163
- cov_w3vwktd8z.f[16]++;
2164
- cov_w3vwktd8z.s[60]++;
2165
-
2166
- FeathersError.call(this, message, 'NotImplemented', 501, 'not-implemented', data);
2167
- }
2168
-
2169
- cov_w3vwktd8z.s[61]++;
2170
- inheritsFrom(NotImplemented, FeathersError);
2171
-
2172
- // 502 - Bad Gateway
2173
- function BadGateway(message, data) {
2174
- cov_w3vwktd8z.f[17]++;
2175
- cov_w3vwktd8z.s[62]++;
2176
-
2177
- FeathersError.call(this, message, 'BadGateway', 502, 'bad-gateway', data);
2178
- }
2179
-
2180
- cov_w3vwktd8z.s[63]++;
2181
- inheritsFrom(BadGateway, FeathersError);
2182
-
2183
- // 503 - Unavailable
2184
- function Unavailable(message, data) {
2185
- cov_w3vwktd8z.f[18]++;
2186
- cov_w3vwktd8z.s[64]++;
2187
-
2188
- FeathersError.call(this, message, 'Unavailable', 503, 'unavailable', data);
2189
- }
2190
-
2191
- cov_w3vwktd8z.s[65]++;
2192
- inheritsFrom(Unavailable, FeathersError);
2193
-
2194
- const errors = (cov_w3vwktd8z.s[66]++, {
2195
- FeathersError,
2196
- BadRequest,
2197
- NotAuthenticated,
2198
- PaymentError,
2199
- Forbidden,
2200
- NotFound,
2201
- MethodNotAllowed,
2202
- NotAcceptable,
2203
- Timeout,
2204
- Conflict,
2205
- LengthRequired,
2206
- Unprocessable,
2207
- TooManyRequests,
2208
- GeneralError,
2209
- NotImplemented,
2210
- BadGateway,
2211
- Unavailable,
2212
- 400: BadRequest,
2213
- 401: NotAuthenticated,
2214
- 402: PaymentError,
2215
- 403: Forbidden,
2216
- 404: NotFound,
2217
- 405: MethodNotAllowed,
2218
- 406: NotAcceptable,
2219
- 408: Timeout,
2220
- 409: Conflict,
2221
- 411: LengthRequired,
2222
- 422: Unprocessable,
2223
- 429: TooManyRequests,
2224
- 500: GeneralError,
2225
- 501: NotImplemented,
2226
- 502: BadGateway,
2227
- 503: Unavailable
2228
- });
2229
-
2230
- function convert(error) {
2231
- cov_w3vwktd8z.f[19]++;
2232
- cov_w3vwktd8z.s[67]++;
2233
-
2234
- if (!error) {
2235
- cov_w3vwktd8z.b[11][0]++;
2236
- cov_w3vwktd8z.s[68]++;
2237
-
2238
- return error;
2239
- } else {
2240
- cov_w3vwktd8z.b[11][1]++;
2241
- }
2242
-
2243
- const FeathersError = (cov_w3vwktd8z.s[69]++, errors[error.name]);
2244
- const result = (cov_w3vwktd8z.s[70]++, FeathersError ? (cov_w3vwktd8z.b[12][0]++, new FeathersError(error.message, error.data)) : (cov_w3vwktd8z.b[12][1]++, new Error((cov_w3vwktd8z.b[13][0]++, error.message) || (cov_w3vwktd8z.b[13][1]++, error))));
2245
-
2246
- cov_w3vwktd8z.s[71]++;
2247
- if (typeof error === 'object') {
2248
- cov_w3vwktd8z.b[14][0]++;
2249
- cov_w3vwktd8z.s[72]++;
2250
-
2251
- Object.assign(result, error);
2252
- } else {
2253
- cov_w3vwktd8z.b[14][1]++;
2254
- }
2255
-
2256
- cov_w3vwktd8z.s[73]++;
2257
- return result;
2258
- }
2259
-
2260
- cov_w3vwktd8z.s[74]++;
2261
- module.exports = Object.assign({ convert }, errors);
2262
- });