@furystack/rest-service 4.0.21 → 4.1.3

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.
@@ -361,6 +361,23 @@
361
361
  "RestApi": {
362
362
  "additionalProperties": false,
363
363
  "properties": {
364
+ "CONNECT": {
365
+ "additionalProperties": {
366
+ "additionalProperties": false,
367
+ "properties": {
368
+ "body": {},
369
+ "headers": {},
370
+ "query": {},
371
+ "result": {},
372
+ "url": {}
373
+ },
374
+ "required": [
375
+ "result"
376
+ ],
377
+ "type": "object"
378
+ },
379
+ "type": "object"
380
+ },
364
381
  "DELETE": {
365
382
  "additionalProperties": {
366
383
  "additionalProperties": false,
@@ -395,6 +412,23 @@
395
412
  },
396
413
  "type": "object"
397
414
  },
415
+ "HEAD": {
416
+ "additionalProperties": {
417
+ "additionalProperties": false,
418
+ "properties": {
419
+ "body": {},
420
+ "headers": {},
421
+ "query": {},
422
+ "result": {},
423
+ "url": {}
424
+ },
425
+ "required": [
426
+ "result"
427
+ ],
428
+ "type": "object"
429
+ },
430
+ "type": "object"
431
+ },
398
432
  "PATCH": {
399
433
  "additionalProperties": {
400
434
  "additionalProperties": false,
@@ -445,6 +479,23 @@
445
479
  "type": "object"
446
480
  },
447
481
  "type": "object"
482
+ },
483
+ "TRACE": {
484
+ "additionalProperties": {
485
+ "additionalProperties": false,
486
+ "properties": {
487
+ "body": {},
488
+ "headers": {},
489
+ "query": {},
490
+ "result": {},
491
+ "url": {}
492
+ },
493
+ "required": [
494
+ "result"
495
+ ],
496
+ "type": "object"
497
+ },
498
+ "type": "object"
448
499
  }
449
500
  },
450
501
  "type": "object"
@@ -636,6 +687,23 @@
636
687
  "ValidationApi": {
637
688
  "additionalProperties": false,
638
689
  "properties": {
690
+ "CONNECT": {
691
+ "additionalProperties": {
692
+ "additionalProperties": false,
693
+ "properties": {
694
+ "body": {},
695
+ "headers": {},
696
+ "query": {},
697
+ "result": {},
698
+ "url": {}
699
+ },
700
+ "required": [
701
+ "result"
702
+ ],
703
+ "type": "object"
704
+ },
705
+ "type": "object"
706
+ },
639
707
  "DELETE": {
640
708
  "additionalProperties": false,
641
709
  "properties": {
@@ -676,6 +744,23 @@
676
744
  ],
677
745
  "type": "object"
678
746
  },
747
+ "HEAD": {
748
+ "additionalProperties": {
749
+ "additionalProperties": false,
750
+ "properties": {
751
+ "body": {},
752
+ "headers": {},
753
+ "query": {},
754
+ "result": {},
755
+ "url": {}
756
+ },
757
+ "required": [
758
+ "result"
759
+ ],
760
+ "type": "object"
761
+ },
762
+ "type": "object"
763
+ },
679
764
  "PATCH": {
680
765
  "additionalProperties": false,
681
766
  "properties": {
@@ -720,6 +805,23 @@
720
805
  "type": "object"
721
806
  },
722
807
  "type": "object"
808
+ },
809
+ "TRACE": {
810
+ "additionalProperties": {
811
+ "additionalProperties": false,
812
+ "properties": {
813
+ "body": {},
814
+ "headers": {},
815
+ "query": {},
816
+ "result": {},
817
+ "url": {}
818
+ },
819
+ "required": [
820
+ "result"
821
+ ],
822
+ "type": "object"
823
+ },
824
+ "type": "object"
723
825
  }
724
826
  },
725
827
  "required": [
package/dist/validate.js CHANGED
@@ -14,7 +14,7 @@ const Validate = (validationOptions) => (action) => {
14
14
  definition.properties.headers.additionalProperties = true;
15
15
  }
16
16
  });
17
- const validator = new schema_validator_1.SchemaValidator(schema, { coerceTypes: true });
17
+ const validator = new schema_validator_1.SchemaValidator(schema, { coerceTypes: true, strict: false });
18
18
  return async (args) => {
19
19
  var _a, _b, _c;
20
20
  const anyArgs = args;
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":";;;AACA,yDAAoD;AAE7C,MAAM,QAAQ,GACnB,CAAkF,iBASjF,EAAE,EAAE,CACL,CAA4B,MAAwB,EAAoB,EAAE;IACxE,MAAM,MAAM,GAAG,EAAE,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAA;IAE9C,MAAM,CAAC,MAAM,CAAC,M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,MAAM,CAAC;YAClB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO;YACP,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;YACrB,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG;YACvB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;SAC9B,CAAC,CAAA;IACX,CAAC,CAAA;AACH,CAAC,CAAA;AAxDU,QAAA,QAAQ,YAwDlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@furystack/rest-service",
3
- "version": "4.0.21",
3
+ "version": "4.1.3",
4
4
  "description": "Repository implementation for FuryStack",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -31,13 +31,13 @@
31
31
  },
32
32
  "homepage": "https://github.com/furystack/furystack",
33
33
  "dependencies": {
34
- "@furystack/core": "^10.3.5",
35
- "@furystack/inject": "^4.0.75",
36
- "@furystack/logging": "^2.0.82",
37
- "@furystack/repository": "^5.0.20",
38
- "@furystack/rest": "^3.0.20",
39
- "@furystack/utils": "^1.2.45",
40
- "ajv": "^8.6.3",
34
+ "@furystack/core": "^10.3.8",
35
+ "@furystack/inject": "^4.0.76",
36
+ "@furystack/logging": "^2.0.83",
37
+ "@furystack/repository": "^5.0.23",
38
+ "@furystack/rest": "^3.1.1",
39
+ "@furystack/utils": "^1.2.46",
40
+ "ajv": "^8.8.2",
41
41
  "ajv-formats": "^2.1.1",
42
42
  "hash.js": "^1.1.7",
43
43
  "path-to-regexp": "^6.2.0",
@@ -46,11 +46,11 @@
46
46
  "uuid": "^8.3.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/jest": "^27.0.2",
50
- "@types/node": "^16.11.0",
51
- "@types/uuid": "^8.3.1",
52
- "got": "^11.8.2"
49
+ "@types/jest": "^27.0.3",
50
+ "@types/node": "^16.11.10",
51
+ "@types/uuid": "^8.3.3",
52
+ "got": "^11.8.3"
53
53
  },
54
54
  "typings": "./dist/index.d.ts",
55
- "gitHead": "f90695d7fc1587f41149cc56a1e9827069ff3ef3"
55
+ "gitHead": "eb6838696fb3ffc072321b0d5ee8583b82b7cb07"
56
56
  }
@@ -361,20 +361,32 @@
361
361
  "RestApi": {
362
362
  "additionalProperties": false,
363
363
  "properties": {
364
+ "CONNECT": {
365
+ "additionalProperties": {
366
+ "additionalProperties": false,
367
+ "properties": {
368
+ "body": {},
369
+ "headers": {},
370
+ "query": {},
371
+ "result": {},
372
+ "url": {}
373
+ },
374
+ "required": [
375
+ "result"
376
+ ],
377
+ "type": "object"
378
+ },
379
+ "type": "object"
380
+ },
364
381
  "DELETE": {
365
382
  "additionalProperties": {
366
383
  "additionalProperties": false,
367
384
  "properties": {
368
- "body": {
369
- },
370
- "headers": {
371
- },
372
- "query": {
373
- },
374
- "result": {
375
- },
376
- "url": {
377
- }
385
+ "body": {},
386
+ "headers": {},
387
+ "query": {},
388
+ "result": {},
389
+ "url": {}
378
390
  },
379
391
  "required": [
380
392
  "result"
@@ -387,16 +399,28 @@
387
399
  "additionalProperties": {
388
400
  "additionalProperties": false,
389
401
  "properties": {
390
- "body": {
391
- },
392
- "headers": {
393
- },
394
- "query": {
395
- },
396
- "result": {
397
- },
398
- "url": {
399
- }
402
+ "body": {},
403
+ "headers": {},
404
+ "query": {},
405
+ "result": {},
406
+ "url": {}
407
+ },
408
+ "required": [
409
+ "result"
410
+ ],
411
+ "type": "object"
412
+ },
413
+ "type": "object"
414
+ },
415
+ "HEAD": {
416
+ "additionalProperties": {
417
+ "additionalProperties": false,
418
+ "properties": {
419
+ "body": {},
420
+ "headers": {},
421
+ "query": {},
422
+ "result": {},
423
+ "url": {}
400
424
  },
401
425
  "required": [
402
426
  "result"
@@ -409,16 +433,11 @@
409
433
  "additionalProperties": {
410
434
  "additionalProperties": false,
411
435
  "properties": {
412
- "body": {
413
- },
414
- "headers": {
415
- },
416
- "query": {
417
- },
418
- "result": {
419
- },
420
- "url": {
421
- }
436
+ "body": {},
437
+ "headers": {},
438
+ "query": {},
439
+ "result": {},
440
+ "url": {}
422
441
  },
423
442
  "required": [
424
443
  "result"
@@ -431,16 +450,11 @@
431
450
  "additionalProperties": {
432
451
  "additionalProperties": false,
433
452
  "properties": {
434
- "body": {
435
- },
436
- "headers": {
437
- },
438
- "query": {
439
- },
440
- "result": {
441
- },
442
- "url": {
443
- }
453
+ "body": {},
454
+ "headers": {},
455
+ "query": {},
456
+ "result": {},
457
+ "url": {}
444
458
  },
445
459
  "required": [
446
460
  "result"
@@ -453,16 +467,28 @@
453
467
  "additionalProperties": {
454
468
  "additionalProperties": false,
455
469
  "properties": {
456
- "body": {
457
- },
458
- "headers": {
459
- },
460
- "query": {
461
- },
462
- "result": {
463
- },
464
- "url": {
465
- }
470
+ "body": {},
471
+ "headers": {},
472
+ "query": {},
473
+ "result": {},
474
+ "url": {}
475
+ },
476
+ "required": [
477
+ "result"
478
+ ],
479
+ "type": "object"
480
+ },
481
+ "type": "object"
482
+ },
483
+ "TRACE": {
484
+ "additionalProperties": {
485
+ "additionalProperties": false,
486
+ "properties": {
487
+ "body": {},
488
+ "headers": {},
489
+ "query": {},
490
+ "result": {},
491
+ "url": {}
466
492
  },
467
493
  "required": [
468
494
  "result"
@@ -661,6 +687,23 @@
661
687
  "ValidationApi": {
662
688
  "additionalProperties": false,
663
689
  "properties": {
690
+ "CONNECT": {
691
+ "additionalProperties": {
692
+ "additionalProperties": false,
693
+ "properties": {
694
+ "body": {},
695
+ "headers": {},
696
+ "query": {},
697
+ "result": {},
698
+ "url": {}
699
+ },
700
+ "required": [
701
+ "result"
702
+ ],
703
+ "type": "object"
704
+ },
705
+ "type": "object"
706
+ },
664
707
  "DELETE": {
665
708
  "additionalProperties": false,
666
709
  "properties": {
@@ -701,6 +744,23 @@
701
744
  ],
702
745
  "type": "object"
703
746
  },
747
+ "HEAD": {
748
+ "additionalProperties": {
749
+ "additionalProperties": false,
750
+ "properties": {
751
+ "body": {},
752
+ "headers": {},
753
+ "query": {},
754
+ "result": {},
755
+ "url": {}
756
+ },
757
+ "required": [
758
+ "result"
759
+ ],
760
+ "type": "object"
761
+ },
762
+ "type": "object"
763
+ },
704
764
  "PATCH": {
705
765
  "additionalProperties": false,
706
766
  "properties": {
@@ -733,16 +793,28 @@
733
793
  "additionalProperties": {
734
794
  "additionalProperties": false,
735
795
  "properties": {
736
- "body": {
737
- },
738
- "headers": {
739
- },
740
- "query": {
741
- },
742
- "result": {
743
- },
744
- "url": {
745
- }
796
+ "body": {},
797
+ "headers": {},
798
+ "query": {},
799
+ "result": {},
800
+ "url": {}
801
+ },
802
+ "required": [
803
+ "result"
804
+ ],
805
+ "type": "object"
806
+ },
807
+ "type": "object"
808
+ },
809
+ "TRACE": {
810
+ "additionalProperties": {
811
+ "additionalProperties": false,
812
+ "properties": {
813
+ "body": {},
814
+ "headers": {},
815
+ "query": {},
816
+ "result": {},
817
+ "url": {}
746
818
  },
747
819
  "required": [
748
820
  "result"
package/src/validate.ts CHANGED
@@ -25,7 +25,7 @@ export const Validate =
25
25
  }
26
26
  })
27
27
 
28
- const validator = new SchemaValidator(schema, { coerceTypes: true })
28
+ const validator = new SchemaValidator(schema, { coerceTypes: true, strict: false })
29
29
 
30
30
  return async (args: RequestActionOptions<T>): Promise<ActionResult<T>> => {
31
31
  const anyArgs = args as any