fastify 5.11.3 → 6.0.0-alpha.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.
- package/README.md +2 -2
- package/SPONSORS.md +1 -0
- package/build/build-validation.js +20 -34
- package/docs/Guides/Getting-Started.md +2 -2
- package/docs/Guides/Serverless.md +34 -2
- package/docs/Reference/Errors.md +5 -3
- package/docs/Reference/Hooks.md +0 -4
- package/docs/Reference/LTS.md +6 -5
- package/docs/Reference/Server.md +8 -88
- package/docs/Reference/TypeScript.md +3 -49
- package/docs/Reference/Warnings.md +4 -11
- package/fastify.d.ts +10 -24
- package/fastify.js +17 -34
- package/lib/config-validator.js +368 -475
- package/lib/errors.js +9 -3
- package/lib/log-controller.js +2 -4
- package/lib/logger-factory.js +1 -1
- package/lib/route.js +4 -9
- package/lib/server.js +2 -3
- package/lib/warnings.js +2 -46
- package/package.json +2 -3
- package/test/404s.test.js +0 -49
- package/test/allow-unsafe-regex.test.js +12 -4
- package/test/case-insensitive.test.js +12 -4
- package/test/custom-querystring-parser.test.js +0 -16
- package/test/hooks.test.js +6 -1
- package/test/http-methods/custom-http-methods.test.js +12 -17
- package/test/http-methods/trace.test.js +1 -1
- package/test/https/custom-https-server.test.js +1 -1
- package/test/internals/errors.test.js +15 -5
- package/test/internals/initial-config.test.js +56 -38
- package/test/internals/logger.test.js +17 -4
- package/test/internals/reply.test.js +1 -1
- package/test/internals/request.test.js +8 -24
- package/test/logger/logging.test.js +2 -121
- package/test/logger/request.test.js +1 -36
- package/test/plugin.4.test.js +5 -4
- package/test/route-prefix.test.js +46 -18
- package/test/route.1.test.js +2 -2
- package/test/router-options.test.js +25 -523
- package/test/set-error-handler.test.js +7 -9
- package/test/types/errors.tst.ts +2 -1
- package/test/types/fastify.tst.ts +44 -48
- package/test/types/instance.tst.ts +4 -5
- package/test/types/logger.tst.ts +3 -7
- package/test/use-semicolon-delimiter.test.js +0 -60
- package/types/context.d.ts +0 -20
- package/types/errors.d.ts +2 -1
- package/types/instance.d.ts +0 -4
- package/types/logger.d.ts +1 -16
- package/types/plugin.d.ts +0 -9
- package/types/request.d.ts +0 -4
- package/lib/promise.js +0 -23
- package/test/internals/promise.test.js +0 -63
package/lib/config-validator.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
module.exports = validate10;
|
|
5
5
|
module.exports.default = validate10;
|
|
6
|
-
const schema11 = {"type":"object","additionalProperties":false,"properties":{"connectionTimeout":{"type":"integer","default":0},"keepAliveTimeout":{"type":"integer","default":72000},"forceCloseConnections":{"oneOf":[{"type":"string","pattern":"idle"},{"type":"boolean"}]},"maxRequestsPerSocket":{"type":"integer","default":0,"nullable":true},"requestTimeout":{"type":"integer","default":0},"handlerTimeout":{"type":"integer","default":0},"bodyLimit":{"type":"integer","default":1048576},"
|
|
6
|
+
const schema11 = {"type":"object","additionalProperties":false,"properties":{"connectionTimeout":{"type":"integer","default":0},"keepAliveTimeout":{"type":"integer","default":72000},"forceCloseConnections":{"oneOf":[{"type":"string","pattern":"idle"},{"type":"boolean"}]},"maxRequestsPerSocket":{"type":"integer","default":0,"nullable":true},"requestTimeout":{"type":"integer","default":0},"handlerTimeout":{"type":"integer","default":0},"bodyLimit":{"type":"integer","default":1048576},"http2":{"type":"boolean"},"https":{"if":{"not":{"oneOf":[{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":false,"required":["allowHTTP1"],"properties":{"allowHTTP1":{"type":"boolean"}}}]}},"then":{"setDefaultValue":true}},"ignoreTrailingSlash":{"type":"boolean"},"ignoreDuplicateSlashes":{"type":"boolean"},"onProtoPoisoning":{"type":"string","default":"error"},"onConstructorPoisoning":{"type":"string","default":"error"},"pluginTimeout":{"type":"integer","default":10000},"requestIdHeader":{"anyOf":[{"type":"boolean"},{"type":"string"}],"default":false},"http2SessionTimeout":{"type":"integer","default":72000},"exposeHeadRoutes":{"type":"boolean","default":true},"routerOptions":{"type":"object","additionalProperties":false,"properties":{"allowUnsafeRegex":{"type":"boolean","default":false},"caseSensitive":{"type":"boolean","default":true},"constraints":{"type":"object","additionalProperties":{"type":"object","required":["name","storage","validate","deriveConstraint"],"additionalProperties":true,"properties":{"name":{"type":"string"},"storage":{},"validate":{},"deriveConstraint":{}}}},"ignoreTrailingSlash":{"type":"boolean","default":false},"ignoreDuplicateSlashes":{"type":"boolean","default":false},"maxParamLength":{"type":"integer","default":100},"useSemicolonDelimiter":{"type":"boolean","default":false}}}}};
|
|
7
7
|
const func2 = Object.prototype.hasOwnProperty;
|
|
8
8
|
const pattern0 = new RegExp("idle", "u");
|
|
9
9
|
|
|
@@ -30,24 +30,6 @@ data.handlerTimeout = 0;
|
|
|
30
30
|
if(data.bodyLimit === undefined){
|
|
31
31
|
data.bodyLimit = 1048576;
|
|
32
32
|
}
|
|
33
|
-
if(data.caseSensitive === undefined){
|
|
34
|
-
data.caseSensitive = true;
|
|
35
|
-
}
|
|
36
|
-
if(data.allowUnsafeRegex === undefined){
|
|
37
|
-
data.allowUnsafeRegex = false;
|
|
38
|
-
}
|
|
39
|
-
if(data.ignoreTrailingSlash === undefined){
|
|
40
|
-
data.ignoreTrailingSlash = false;
|
|
41
|
-
}
|
|
42
|
-
if(data.ignoreDuplicateSlashes === undefined){
|
|
43
|
-
data.ignoreDuplicateSlashes = false;
|
|
44
|
-
}
|
|
45
|
-
if(data.disableRequestLogging === undefined){
|
|
46
|
-
data.disableRequestLogging = false;
|
|
47
|
-
}
|
|
48
|
-
if(data.maxParamLength === undefined){
|
|
49
|
-
data.maxParamLength = 100;
|
|
50
|
-
}
|
|
51
33
|
if(data.onProtoPoisoning === undefined){
|
|
52
34
|
data.onProtoPoisoning = "error";
|
|
53
35
|
}
|
|
@@ -60,18 +42,12 @@ data.pluginTimeout = 10000;
|
|
|
60
42
|
if(data.requestIdHeader === undefined){
|
|
61
43
|
data.requestIdHeader = false;
|
|
62
44
|
}
|
|
63
|
-
if(data.requestIdLogLabel === undefined){
|
|
64
|
-
data.requestIdLogLabel = "reqId";
|
|
65
|
-
}
|
|
66
45
|
if(data.http2SessionTimeout === undefined){
|
|
67
46
|
data.http2SessionTimeout = 72000;
|
|
68
47
|
}
|
|
69
48
|
if(data.exposeHeadRoutes === undefined){
|
|
70
49
|
data.exposeHeadRoutes = true;
|
|
71
50
|
}
|
|
72
|
-
if(data.useSemicolonDelimiter === undefined){
|
|
73
|
-
data.useSemicolonDelimiter = false;
|
|
74
|
-
}
|
|
75
51
|
const _errs1 = errors;
|
|
76
52
|
for(const key0 in data){
|
|
77
53
|
if(!(func2.call(schema11.properties, key0))){
|
|
@@ -348,7 +324,8 @@ data["bodyLimit"] = coerced7;
|
|
|
348
324
|
}
|
|
349
325
|
var valid0 = _errs19 === errors;
|
|
350
326
|
if(valid0){
|
|
351
|
-
|
|
327
|
+
if(data.http2 !== undefined){
|
|
328
|
+
let data7 = data.http2;
|
|
352
329
|
const _errs21 = errors;
|
|
353
330
|
if(typeof data7 !== "boolean"){
|
|
354
331
|
let coerced8 = undefined;
|
|
@@ -360,94 +337,43 @@ else if(data7 === "true" || data7 === 1){
|
|
|
360
337
|
coerced8 = true;
|
|
361
338
|
}
|
|
362
339
|
else {
|
|
363
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
340
|
+
validate10.errors = [{instancePath:instancePath+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
364
341
|
return false;
|
|
365
342
|
}
|
|
366
343
|
}
|
|
367
344
|
if(coerced8 !== undefined){
|
|
368
345
|
data7 = coerced8;
|
|
369
346
|
if(data !== undefined){
|
|
370
|
-
data["
|
|
347
|
+
data["http2"] = coerced8;
|
|
371
348
|
}
|
|
372
349
|
}
|
|
373
350
|
}
|
|
374
351
|
var valid0 = _errs21 === errors;
|
|
375
|
-
if(valid0){
|
|
376
|
-
let data8 = data.allowUnsafeRegex;
|
|
377
|
-
const _errs23 = errors;
|
|
378
|
-
if(typeof data8 !== "boolean"){
|
|
379
|
-
let coerced9 = undefined;
|
|
380
|
-
if(!(coerced9 !== undefined)){
|
|
381
|
-
if(data8 === "false" || data8 === 0 || data8 === null){
|
|
382
|
-
coerced9 = false;
|
|
383
|
-
}
|
|
384
|
-
else if(data8 === "true" || data8 === 1){
|
|
385
|
-
coerced9 = true;
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
validate10.errors = [{instancePath:instancePath+"/allowUnsafeRegex",schemaPath:"#/properties/allowUnsafeRegex/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
389
|
-
return false;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
if(coerced9 !== undefined){
|
|
393
|
-
data8 = coerced9;
|
|
394
|
-
if(data !== undefined){
|
|
395
|
-
data["allowUnsafeRegex"] = coerced9;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
var valid0 = _errs23 === errors;
|
|
400
|
-
if(valid0){
|
|
401
|
-
if(data.http2 !== undefined){
|
|
402
|
-
let data9 = data.http2;
|
|
403
|
-
const _errs25 = errors;
|
|
404
|
-
if(typeof data9 !== "boolean"){
|
|
405
|
-
let coerced10 = undefined;
|
|
406
|
-
if(!(coerced10 !== undefined)){
|
|
407
|
-
if(data9 === "false" || data9 === 0 || data9 === null){
|
|
408
|
-
coerced10 = false;
|
|
409
|
-
}
|
|
410
|
-
else if(data9 === "true" || data9 === 1){
|
|
411
|
-
coerced10 = true;
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
validate10.errors = [{instancePath:instancePath+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
415
|
-
return false;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
if(coerced10 !== undefined){
|
|
419
|
-
data9 = coerced10;
|
|
420
|
-
if(data !== undefined){
|
|
421
|
-
data["http2"] = coerced10;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
var valid0 = _errs25 === errors;
|
|
426
352
|
}
|
|
427
353
|
else {
|
|
428
354
|
var valid0 = true;
|
|
429
355
|
}
|
|
430
356
|
if(valid0){
|
|
431
357
|
if(data.https !== undefined){
|
|
432
|
-
let
|
|
358
|
+
let data8 = data.https;
|
|
359
|
+
const _errs23 = errors;
|
|
360
|
+
const _errs24 = errors;
|
|
361
|
+
let valid2 = true;
|
|
362
|
+
const _errs25 = errors;
|
|
363
|
+
const _errs26 = errors;
|
|
433
364
|
const _errs27 = errors;
|
|
434
365
|
const _errs28 = errors;
|
|
435
|
-
let valid2 = true;
|
|
436
|
-
const _errs29 = errors;
|
|
437
|
-
const _errs30 = errors;
|
|
438
|
-
const _errs31 = errors;
|
|
439
|
-
const _errs32 = errors;
|
|
440
366
|
let valid4 = false;
|
|
441
367
|
let passing1 = null;
|
|
442
|
-
const
|
|
443
|
-
if(typeof
|
|
444
|
-
let
|
|
445
|
-
if(!(
|
|
446
|
-
if(
|
|
447
|
-
|
|
368
|
+
const _errs29 = errors;
|
|
369
|
+
if(typeof data8 !== "boolean"){
|
|
370
|
+
let coerced9 = undefined;
|
|
371
|
+
if(!(coerced9 !== undefined)){
|
|
372
|
+
if(data8 === "false" || data8 === 0 || data8 === null){
|
|
373
|
+
coerced9 = false;
|
|
448
374
|
}
|
|
449
|
-
else if(
|
|
450
|
-
|
|
375
|
+
else if(data8 === "true" || data8 === 1){
|
|
376
|
+
coerced9 = true;
|
|
451
377
|
}
|
|
452
378
|
else {
|
|
453
379
|
const err4 = {};
|
|
@@ -460,24 +386,24 @@ vErrors.push(err4);
|
|
|
460
386
|
errors++;
|
|
461
387
|
}
|
|
462
388
|
}
|
|
463
|
-
if(
|
|
464
|
-
|
|
389
|
+
if(coerced9 !== undefined){
|
|
390
|
+
data8 = coerced9;
|
|
465
391
|
if(data !== undefined){
|
|
466
|
-
data["https"] =
|
|
392
|
+
data["https"] = coerced9;
|
|
467
393
|
}
|
|
468
394
|
}
|
|
469
395
|
}
|
|
470
|
-
var _valid2 =
|
|
396
|
+
var _valid2 = _errs29 === errors;
|
|
471
397
|
if(_valid2){
|
|
472
398
|
valid4 = true;
|
|
473
399
|
passing1 = 0;
|
|
474
400
|
}
|
|
475
|
-
const
|
|
476
|
-
if(
|
|
477
|
-
let
|
|
478
|
-
if(!(
|
|
479
|
-
if(
|
|
480
|
-
|
|
401
|
+
const _errs31 = errors;
|
|
402
|
+
if(data8 !== null){
|
|
403
|
+
let coerced10 = undefined;
|
|
404
|
+
if(!(coerced10 !== undefined)){
|
|
405
|
+
if(data8 === "" || data8 === 0 || data8 === false){
|
|
406
|
+
coerced10 = null;
|
|
481
407
|
}
|
|
482
408
|
else {
|
|
483
409
|
const err5 = {};
|
|
@@ -490,14 +416,14 @@ vErrors.push(err5);
|
|
|
490
416
|
errors++;
|
|
491
417
|
}
|
|
492
418
|
}
|
|
493
|
-
if(
|
|
494
|
-
|
|
419
|
+
if(coerced10 !== undefined){
|
|
420
|
+
data8 = coerced10;
|
|
495
421
|
if(data !== undefined){
|
|
496
|
-
data["https"] =
|
|
422
|
+
data["https"] = coerced10;
|
|
497
423
|
}
|
|
498
424
|
}
|
|
499
425
|
}
|
|
500
|
-
var _valid2 =
|
|
426
|
+
var _valid2 = _errs31 === errors;
|
|
501
427
|
if(_valid2 && valid4){
|
|
502
428
|
valid4 = false;
|
|
503
429
|
passing1 = [passing1, 1];
|
|
@@ -507,11 +433,11 @@ if(_valid2){
|
|
|
507
433
|
valid4 = true;
|
|
508
434
|
passing1 = 1;
|
|
509
435
|
}
|
|
510
|
-
const
|
|
511
|
-
if(errors ===
|
|
512
|
-
if(
|
|
436
|
+
const _errs33 = errors;
|
|
437
|
+
if(errors === _errs33){
|
|
438
|
+
if(data8 && typeof data8 == "object" && !Array.isArray(data8)){
|
|
513
439
|
let missing0;
|
|
514
|
-
if((
|
|
440
|
+
if((data8.allowHTTP1 === undefined) && (missing0 = "allowHTTP1")){
|
|
515
441
|
const err6 = {};
|
|
516
442
|
if(vErrors === null){
|
|
517
443
|
vErrors = [err6];
|
|
@@ -522,23 +448,23 @@ vErrors.push(err6);
|
|
|
522
448
|
errors++;
|
|
523
449
|
}
|
|
524
450
|
else {
|
|
525
|
-
const
|
|
526
|
-
for(const key1 in
|
|
451
|
+
const _errs35 = errors;
|
|
452
|
+
for(const key1 in data8){
|
|
527
453
|
if(!(key1 === "allowHTTP1")){
|
|
528
|
-
delete
|
|
454
|
+
delete data8[key1];
|
|
529
455
|
}
|
|
530
456
|
}
|
|
531
|
-
if(
|
|
532
|
-
if(
|
|
533
|
-
let
|
|
534
|
-
if(typeof
|
|
535
|
-
let
|
|
536
|
-
if(!(
|
|
537
|
-
if(
|
|
538
|
-
|
|
457
|
+
if(_errs35 === errors){
|
|
458
|
+
if(data8.allowHTTP1 !== undefined){
|
|
459
|
+
let data9 = data8.allowHTTP1;
|
|
460
|
+
if(typeof data9 !== "boolean"){
|
|
461
|
+
let coerced11 = undefined;
|
|
462
|
+
if(!(coerced11 !== undefined)){
|
|
463
|
+
if(data9 === "false" || data9 === 0 || data9 === null){
|
|
464
|
+
coerced11 = false;
|
|
539
465
|
}
|
|
540
|
-
else if(
|
|
541
|
-
|
|
466
|
+
else if(data9 === "true" || data9 === 1){
|
|
467
|
+
coerced11 = true;
|
|
542
468
|
}
|
|
543
469
|
else {
|
|
544
470
|
const err7 = {};
|
|
@@ -551,10 +477,10 @@ vErrors.push(err7);
|
|
|
551
477
|
errors++;
|
|
552
478
|
}
|
|
553
479
|
}
|
|
554
|
-
if(
|
|
555
|
-
|
|
556
|
-
if(
|
|
557
|
-
|
|
480
|
+
if(coerced11 !== undefined){
|
|
481
|
+
data9 = coerced11;
|
|
482
|
+
if(data8 !== undefined){
|
|
483
|
+
data8["allowHTTP1"] = coerced11;
|
|
558
484
|
}
|
|
559
485
|
}
|
|
560
486
|
}
|
|
@@ -573,7 +499,7 @@ vErrors.push(err8);
|
|
|
573
499
|
errors++;
|
|
574
500
|
}
|
|
575
501
|
}
|
|
576
|
-
var _valid2 =
|
|
502
|
+
var _valid2 = _errs33 === errors;
|
|
577
503
|
if(_valid2 && valid4){
|
|
578
504
|
valid4 = false;
|
|
579
505
|
passing1 = [passing1, 2];
|
|
@@ -596,17 +522,17 @@ vErrors.push(err9);
|
|
|
596
522
|
errors++;
|
|
597
523
|
}
|
|
598
524
|
else {
|
|
599
|
-
errors =
|
|
525
|
+
errors = _errs28;
|
|
600
526
|
if(vErrors !== null){
|
|
601
|
-
if(
|
|
602
|
-
vErrors.length =
|
|
527
|
+
if(_errs28){
|
|
528
|
+
vErrors.length = _errs28;
|
|
603
529
|
}
|
|
604
530
|
else {
|
|
605
531
|
vErrors = null;
|
|
606
532
|
}
|
|
607
533
|
}
|
|
608
534
|
}
|
|
609
|
-
var valid3 =
|
|
535
|
+
var valid3 = _errs27 === errors;
|
|
610
536
|
if(valid3){
|
|
611
537
|
const err10 = {};
|
|
612
538
|
if(vErrors === null){
|
|
@@ -618,30 +544,30 @@ vErrors.push(err10);
|
|
|
618
544
|
errors++;
|
|
619
545
|
}
|
|
620
546
|
else {
|
|
621
|
-
errors =
|
|
547
|
+
errors = _errs26;
|
|
622
548
|
if(vErrors !== null){
|
|
623
|
-
if(
|
|
624
|
-
vErrors.length =
|
|
549
|
+
if(_errs26){
|
|
550
|
+
vErrors.length = _errs26;
|
|
625
551
|
}
|
|
626
552
|
else {
|
|
627
553
|
vErrors = null;
|
|
628
554
|
}
|
|
629
555
|
}
|
|
630
556
|
}
|
|
631
|
-
var _valid1 =
|
|
632
|
-
errors =
|
|
557
|
+
var _valid1 = _errs25 === errors;
|
|
558
|
+
errors = _errs24;
|
|
633
559
|
if(vErrors !== null){
|
|
634
|
-
if(
|
|
635
|
-
vErrors.length =
|
|
560
|
+
if(_errs24){
|
|
561
|
+
vErrors.length = _errs24;
|
|
636
562
|
}
|
|
637
563
|
else {
|
|
638
564
|
vErrors = null;
|
|
639
565
|
}
|
|
640
566
|
}
|
|
641
567
|
if(_valid1){
|
|
642
|
-
const
|
|
568
|
+
const _errs38 = errors;
|
|
643
569
|
data["https"] = true;
|
|
644
|
-
var _valid1 =
|
|
570
|
+
var _valid1 = _errs38 === errors;
|
|
645
571
|
valid2 = _valid1;
|
|
646
572
|
}
|
|
647
573
|
if(!valid2){
|
|
@@ -656,175 +582,161 @@ errors++;
|
|
|
656
582
|
validate10.errors = vErrors;
|
|
657
583
|
return false;
|
|
658
584
|
}
|
|
659
|
-
var valid0 =
|
|
585
|
+
var valid0 = _errs23 === errors;
|
|
660
586
|
}
|
|
661
587
|
else {
|
|
662
588
|
var valid0 = true;
|
|
663
589
|
}
|
|
664
590
|
if(valid0){
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
if(
|
|
671
|
-
|
|
591
|
+
if(data.ignoreTrailingSlash !== undefined){
|
|
592
|
+
let data10 = data.ignoreTrailingSlash;
|
|
593
|
+
const _errs39 = errors;
|
|
594
|
+
if(typeof data10 !== "boolean"){
|
|
595
|
+
let coerced12 = undefined;
|
|
596
|
+
if(!(coerced12 !== undefined)){
|
|
597
|
+
if(data10 === "false" || data10 === 0 || data10 === null){
|
|
598
|
+
coerced12 = false;
|
|
672
599
|
}
|
|
673
|
-
else if(
|
|
674
|
-
|
|
600
|
+
else if(data10 === "true" || data10 === 1){
|
|
601
|
+
coerced12 = true;
|
|
675
602
|
}
|
|
676
603
|
else {
|
|
677
604
|
validate10.errors = [{instancePath:instancePath+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
678
605
|
return false;
|
|
679
606
|
}
|
|
680
607
|
}
|
|
681
|
-
if(
|
|
682
|
-
|
|
608
|
+
if(coerced12 !== undefined){
|
|
609
|
+
data10 = coerced12;
|
|
683
610
|
if(data !== undefined){
|
|
684
|
-
data["ignoreTrailingSlash"] =
|
|
611
|
+
data["ignoreTrailingSlash"] = coerced12;
|
|
685
612
|
}
|
|
686
613
|
}
|
|
687
614
|
}
|
|
688
|
-
var valid0 =
|
|
615
|
+
var valid0 = _errs39 === errors;
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
var valid0 = true;
|
|
619
|
+
}
|
|
689
620
|
if(valid0){
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
if(
|
|
696
|
-
|
|
621
|
+
if(data.ignoreDuplicateSlashes !== undefined){
|
|
622
|
+
let data11 = data.ignoreDuplicateSlashes;
|
|
623
|
+
const _errs41 = errors;
|
|
624
|
+
if(typeof data11 !== "boolean"){
|
|
625
|
+
let coerced13 = undefined;
|
|
626
|
+
if(!(coerced13 !== undefined)){
|
|
627
|
+
if(data11 === "false" || data11 === 0 || data11 === null){
|
|
628
|
+
coerced13 = false;
|
|
697
629
|
}
|
|
698
|
-
else if(
|
|
699
|
-
|
|
630
|
+
else if(data11 === "true" || data11 === 1){
|
|
631
|
+
coerced13 = true;
|
|
700
632
|
}
|
|
701
633
|
else {
|
|
702
634
|
validate10.errors = [{instancePath:instancePath+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
703
635
|
return false;
|
|
704
636
|
}
|
|
705
637
|
}
|
|
706
|
-
if(
|
|
707
|
-
|
|
638
|
+
if(coerced13 !== undefined){
|
|
639
|
+
data11 = coerced13;
|
|
708
640
|
if(data !== undefined){
|
|
709
|
-
data["ignoreDuplicateSlashes"] =
|
|
641
|
+
data["ignoreDuplicateSlashes"] = coerced13;
|
|
710
642
|
}
|
|
711
643
|
}
|
|
712
644
|
}
|
|
713
|
-
var valid0 =
|
|
714
|
-
if(valid0){
|
|
715
|
-
let data14 = data.maxParamLength;
|
|
716
|
-
const _errs47 = errors;
|
|
717
|
-
if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){
|
|
718
|
-
let dataType16 = typeof data14;
|
|
719
|
-
let coerced16 = undefined;
|
|
720
|
-
if(!(coerced16 !== undefined)){
|
|
721
|
-
if(dataType16 === "boolean" || data14 === null
|
|
722
|
-
|| (dataType16 === "string" && data14 && data14 == +data14 && !(data14 % 1))){
|
|
723
|
-
coerced16 = +data14;
|
|
645
|
+
var valid0 = _errs41 === errors;
|
|
724
646
|
}
|
|
725
647
|
else {
|
|
726
|
-
|
|
727
|
-
return false;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
if(coerced16 !== undefined){
|
|
731
|
-
data14 = coerced16;
|
|
732
|
-
if(data !== undefined){
|
|
733
|
-
data["maxParamLength"] = coerced16;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
648
|
+
var valid0 = true;
|
|
736
649
|
}
|
|
737
|
-
var valid0 = _errs47 === errors;
|
|
738
650
|
if(valid0){
|
|
739
|
-
let
|
|
740
|
-
const
|
|
741
|
-
if(typeof
|
|
742
|
-
let
|
|
743
|
-
let
|
|
744
|
-
if(!(
|
|
745
|
-
if(
|
|
746
|
-
|
|
651
|
+
let data12 = data.onProtoPoisoning;
|
|
652
|
+
const _errs43 = errors;
|
|
653
|
+
if(typeof data12 !== "string"){
|
|
654
|
+
let dataType14 = typeof data12;
|
|
655
|
+
let coerced14 = undefined;
|
|
656
|
+
if(!(coerced14 !== undefined)){
|
|
657
|
+
if(dataType14 == "number" || dataType14 == "boolean"){
|
|
658
|
+
coerced14 = "" + data12;
|
|
747
659
|
}
|
|
748
|
-
else if(
|
|
749
|
-
|
|
660
|
+
else if(data12 === null){
|
|
661
|
+
coerced14 = "";
|
|
750
662
|
}
|
|
751
663
|
else {
|
|
752
664
|
validate10.errors = [{instancePath:instancePath+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
|
|
753
665
|
return false;
|
|
754
666
|
}
|
|
755
667
|
}
|
|
756
|
-
if(
|
|
757
|
-
|
|
668
|
+
if(coerced14 !== undefined){
|
|
669
|
+
data12 = coerced14;
|
|
758
670
|
if(data !== undefined){
|
|
759
|
-
data["onProtoPoisoning"] =
|
|
671
|
+
data["onProtoPoisoning"] = coerced14;
|
|
760
672
|
}
|
|
761
673
|
}
|
|
762
674
|
}
|
|
763
|
-
var valid0 =
|
|
675
|
+
var valid0 = _errs43 === errors;
|
|
764
676
|
if(valid0){
|
|
765
|
-
let
|
|
766
|
-
const
|
|
767
|
-
if(typeof
|
|
768
|
-
let
|
|
769
|
-
let
|
|
770
|
-
if(!(
|
|
771
|
-
if(
|
|
772
|
-
|
|
677
|
+
let data13 = data.onConstructorPoisoning;
|
|
678
|
+
const _errs45 = errors;
|
|
679
|
+
if(typeof data13 !== "string"){
|
|
680
|
+
let dataType15 = typeof data13;
|
|
681
|
+
let coerced15 = undefined;
|
|
682
|
+
if(!(coerced15 !== undefined)){
|
|
683
|
+
if(dataType15 == "number" || dataType15 == "boolean"){
|
|
684
|
+
coerced15 = "" + data13;
|
|
773
685
|
}
|
|
774
|
-
else if(
|
|
775
|
-
|
|
686
|
+
else if(data13 === null){
|
|
687
|
+
coerced15 = "";
|
|
776
688
|
}
|
|
777
689
|
else {
|
|
778
690
|
validate10.errors = [{instancePath:instancePath+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
|
|
779
691
|
return false;
|
|
780
692
|
}
|
|
781
693
|
}
|
|
782
|
-
if(
|
|
783
|
-
|
|
694
|
+
if(coerced15 !== undefined){
|
|
695
|
+
data13 = coerced15;
|
|
784
696
|
if(data !== undefined){
|
|
785
|
-
data["onConstructorPoisoning"] =
|
|
697
|
+
data["onConstructorPoisoning"] = coerced15;
|
|
786
698
|
}
|
|
787
699
|
}
|
|
788
700
|
}
|
|
789
|
-
var valid0 =
|
|
701
|
+
var valid0 = _errs45 === errors;
|
|
790
702
|
if(valid0){
|
|
791
|
-
let
|
|
792
|
-
const
|
|
793
|
-
if(!(((typeof
|
|
794
|
-
let
|
|
795
|
-
let
|
|
796
|
-
if(!(
|
|
797
|
-
if(
|
|
798
|
-
|| (
|
|
799
|
-
|
|
703
|
+
let data14 = data.pluginTimeout;
|
|
704
|
+
const _errs47 = errors;
|
|
705
|
+
if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){
|
|
706
|
+
let dataType16 = typeof data14;
|
|
707
|
+
let coerced16 = undefined;
|
|
708
|
+
if(!(coerced16 !== undefined)){
|
|
709
|
+
if(dataType16 === "boolean" || data14 === null
|
|
710
|
+
|| (dataType16 === "string" && data14 && data14 == +data14 && !(data14 % 1))){
|
|
711
|
+
coerced16 = +data14;
|
|
800
712
|
}
|
|
801
713
|
else {
|
|
802
714
|
validate10.errors = [{instancePath:instancePath+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
|
|
803
715
|
return false;
|
|
804
716
|
}
|
|
805
717
|
}
|
|
806
|
-
if(
|
|
807
|
-
|
|
718
|
+
if(coerced16 !== undefined){
|
|
719
|
+
data14 = coerced16;
|
|
808
720
|
if(data !== undefined){
|
|
809
|
-
data["pluginTimeout"] =
|
|
721
|
+
data["pluginTimeout"] = coerced16;
|
|
810
722
|
}
|
|
811
723
|
}
|
|
812
724
|
}
|
|
813
|
-
var valid0 =
|
|
725
|
+
var valid0 = _errs47 === errors;
|
|
814
726
|
if(valid0){
|
|
815
|
-
let
|
|
816
|
-
const
|
|
817
|
-
const
|
|
727
|
+
let data15 = data.requestIdHeader;
|
|
728
|
+
const _errs49 = errors;
|
|
729
|
+
const _errs50 = errors;
|
|
818
730
|
let valid6 = false;
|
|
819
|
-
const
|
|
820
|
-
if(typeof
|
|
821
|
-
let
|
|
822
|
-
if(!(
|
|
823
|
-
if(
|
|
824
|
-
|
|
731
|
+
const _errs51 = errors;
|
|
732
|
+
if(typeof data15 !== "boolean"){
|
|
733
|
+
let coerced17 = undefined;
|
|
734
|
+
if(!(coerced17 !== undefined)){
|
|
735
|
+
if(data15 === "false" || data15 === 0 || data15 === null){
|
|
736
|
+
coerced17 = false;
|
|
825
737
|
}
|
|
826
|
-
else if(
|
|
827
|
-
|
|
738
|
+
else if(data15 === "true" || data15 === 1){
|
|
739
|
+
coerced17 = true;
|
|
828
740
|
}
|
|
829
741
|
else {
|
|
830
742
|
const err12 = {instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
|
|
@@ -837,26 +749,26 @@ vErrors.push(err12);
|
|
|
837
749
|
errors++;
|
|
838
750
|
}
|
|
839
751
|
}
|
|
840
|
-
if(
|
|
841
|
-
|
|
752
|
+
if(coerced17 !== undefined){
|
|
753
|
+
data15 = coerced17;
|
|
842
754
|
if(data !== undefined){
|
|
843
|
-
data["requestIdHeader"] =
|
|
755
|
+
data["requestIdHeader"] = coerced17;
|
|
844
756
|
}
|
|
845
757
|
}
|
|
846
758
|
}
|
|
847
|
-
var _valid3 =
|
|
759
|
+
var _valid3 = _errs51 === errors;
|
|
848
760
|
valid6 = valid6 || _valid3;
|
|
849
761
|
if(!valid6){
|
|
850
|
-
const
|
|
851
|
-
if(typeof
|
|
852
|
-
let
|
|
853
|
-
let
|
|
854
|
-
if(!(
|
|
855
|
-
if(
|
|
856
|
-
|
|
762
|
+
const _errs53 = errors;
|
|
763
|
+
if(typeof data15 !== "string"){
|
|
764
|
+
let dataType18 = typeof data15;
|
|
765
|
+
let coerced18 = undefined;
|
|
766
|
+
if(!(coerced18 !== undefined)){
|
|
767
|
+
if(dataType18 == "number" || dataType18 == "boolean"){
|
|
768
|
+
coerced18 = "" + data15;
|
|
857
769
|
}
|
|
858
|
-
else if(
|
|
859
|
-
|
|
770
|
+
else if(data15 === null){
|
|
771
|
+
coerced18 = "";
|
|
860
772
|
}
|
|
861
773
|
else {
|
|
862
774
|
const err13 = {instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
@@ -869,14 +781,14 @@ vErrors.push(err13);
|
|
|
869
781
|
errors++;
|
|
870
782
|
}
|
|
871
783
|
}
|
|
872
|
-
if(
|
|
873
|
-
|
|
784
|
+
if(coerced18 !== undefined){
|
|
785
|
+
data15 = coerced18;
|
|
874
786
|
if(data !== undefined){
|
|
875
|
-
data["requestIdHeader"] =
|
|
787
|
+
data["requestIdHeader"] = coerced18;
|
|
876
788
|
}
|
|
877
789
|
}
|
|
878
790
|
}
|
|
879
|
-
var _valid3 =
|
|
791
|
+
var _valid3 = _errs53 === errors;
|
|
880
792
|
valid6 = valid6 || _valid3;
|
|
881
793
|
}
|
|
882
794
|
if(!valid6){
|
|
@@ -892,337 +804,324 @@ validate10.errors = vErrors;
|
|
|
892
804
|
return false;
|
|
893
805
|
}
|
|
894
806
|
else {
|
|
895
|
-
errors =
|
|
807
|
+
errors = _errs50;
|
|
896
808
|
if(vErrors !== null){
|
|
897
|
-
if(
|
|
898
|
-
vErrors.length =
|
|
809
|
+
if(_errs50){
|
|
810
|
+
vErrors.length = _errs50;
|
|
899
811
|
}
|
|
900
812
|
else {
|
|
901
813
|
vErrors = null;
|
|
902
814
|
}
|
|
903
815
|
}
|
|
904
816
|
}
|
|
905
|
-
var valid0 =
|
|
817
|
+
var valid0 = _errs49 === errors;
|
|
906
818
|
if(valid0){
|
|
907
|
-
let
|
|
908
|
-
const
|
|
909
|
-
if(typeof
|
|
910
|
-
let
|
|
911
|
-
let
|
|
912
|
-
if(!(
|
|
913
|
-
if(
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
else if(data19 === null){
|
|
917
|
-
coerced22 = "";
|
|
819
|
+
let data16 = data.http2SessionTimeout;
|
|
820
|
+
const _errs55 = errors;
|
|
821
|
+
if(!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))){
|
|
822
|
+
let dataType19 = typeof data16;
|
|
823
|
+
let coerced19 = undefined;
|
|
824
|
+
if(!(coerced19 !== undefined)){
|
|
825
|
+
if(dataType19 === "boolean" || data16 === null
|
|
826
|
+
|| (dataType19 === "string" && data16 && data16 == +data16 && !(data16 % 1))){
|
|
827
|
+
coerced19 = +data16;
|
|
918
828
|
}
|
|
919
829
|
else {
|
|
920
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
830
|
+
validate10.errors = [{instancePath:instancePath+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
|
|
921
831
|
return false;
|
|
922
832
|
}
|
|
923
833
|
}
|
|
924
|
-
if(
|
|
925
|
-
|
|
834
|
+
if(coerced19 !== undefined){
|
|
835
|
+
data16 = coerced19;
|
|
926
836
|
if(data !== undefined){
|
|
927
|
-
data["
|
|
837
|
+
data["http2SessionTimeout"] = coerced19;
|
|
928
838
|
}
|
|
929
839
|
}
|
|
930
840
|
}
|
|
931
|
-
var valid0 =
|
|
841
|
+
var valid0 = _errs55 === errors;
|
|
932
842
|
if(valid0){
|
|
933
|
-
let
|
|
934
|
-
const
|
|
935
|
-
if(
|
|
936
|
-
let
|
|
937
|
-
|
|
938
|
-
if(
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
843
|
+
let data17 = data.exposeHeadRoutes;
|
|
844
|
+
const _errs57 = errors;
|
|
845
|
+
if(typeof data17 !== "boolean"){
|
|
846
|
+
let coerced20 = undefined;
|
|
847
|
+
if(!(coerced20 !== undefined)){
|
|
848
|
+
if(data17 === "false" || data17 === 0 || data17 === null){
|
|
849
|
+
coerced20 = false;
|
|
850
|
+
}
|
|
851
|
+
else if(data17 === "true" || data17 === 1){
|
|
852
|
+
coerced20 = true;
|
|
942
853
|
}
|
|
943
854
|
else {
|
|
944
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
855
|
+
validate10.errors = [{instancePath:instancePath+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
945
856
|
return false;
|
|
946
857
|
}
|
|
947
858
|
}
|
|
948
|
-
if(
|
|
949
|
-
|
|
859
|
+
if(coerced20 !== undefined){
|
|
860
|
+
data17 = coerced20;
|
|
950
861
|
if(data !== undefined){
|
|
951
|
-
data["
|
|
862
|
+
data["exposeHeadRoutes"] = coerced20;
|
|
952
863
|
}
|
|
953
864
|
}
|
|
954
865
|
}
|
|
955
|
-
var valid0 =
|
|
866
|
+
var valid0 = _errs57 === errors;
|
|
956
867
|
if(valid0){
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
if(!(
|
|
962
|
-
if(
|
|
963
|
-
|
|
868
|
+
if(data.routerOptions !== undefined){
|
|
869
|
+
let data18 = data.routerOptions;
|
|
870
|
+
const _errs59 = errors;
|
|
871
|
+
if(errors === _errs59){
|
|
872
|
+
if(data18 && typeof data18 == "object" && !Array.isArray(data18)){
|
|
873
|
+
if(data18.allowUnsafeRegex === undefined){
|
|
874
|
+
data18.allowUnsafeRegex = false;
|
|
964
875
|
}
|
|
965
|
-
|
|
966
|
-
|
|
876
|
+
if(data18.caseSensitive === undefined){
|
|
877
|
+
data18.caseSensitive = true;
|
|
967
878
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
return false;
|
|
879
|
+
if(data18.ignoreTrailingSlash === undefined){
|
|
880
|
+
data18.ignoreTrailingSlash = false;
|
|
971
881
|
}
|
|
882
|
+
if(data18.ignoreDuplicateSlashes === undefined){
|
|
883
|
+
data18.ignoreDuplicateSlashes = false;
|
|
972
884
|
}
|
|
973
|
-
if(
|
|
974
|
-
|
|
975
|
-
if(data !== undefined){
|
|
976
|
-
data["exposeHeadRoutes"] = coerced24;
|
|
885
|
+
if(data18.maxParamLength === undefined){
|
|
886
|
+
data18.maxParamLength = 100;
|
|
977
887
|
}
|
|
888
|
+
if(data18.useSemicolonDelimiter === undefined){
|
|
889
|
+
data18.useSemicolonDelimiter = false;
|
|
978
890
|
}
|
|
891
|
+
const _errs61 = errors;
|
|
892
|
+
for(const key2 in data18){
|
|
893
|
+
if(!(((((((key2 === "allowUnsafeRegex") || (key2 === "caseSensitive")) || (key2 === "constraints")) || (key2 === "ignoreTrailingSlash")) || (key2 === "ignoreDuplicateSlashes")) || (key2 === "maxParamLength")) || (key2 === "useSemicolonDelimiter"))){
|
|
894
|
+
delete data18[key2];
|
|
979
895
|
}
|
|
980
|
-
var valid0 = _errs65 === errors;
|
|
981
|
-
if(valid0){
|
|
982
|
-
let data22 = data.useSemicolonDelimiter;
|
|
983
|
-
const _errs67 = errors;
|
|
984
|
-
if(typeof data22 !== "boolean"){
|
|
985
|
-
let coerced25 = undefined;
|
|
986
|
-
if(!(coerced25 !== undefined)){
|
|
987
|
-
if(data22 === "false" || data22 === 0 || data22 === null){
|
|
988
|
-
coerced25 = false;
|
|
989
896
|
}
|
|
990
|
-
|
|
991
|
-
|
|
897
|
+
if(_errs61 === errors){
|
|
898
|
+
let data19 = data18.allowUnsafeRegex;
|
|
899
|
+
const _errs62 = errors;
|
|
900
|
+
if(typeof data19 !== "boolean"){
|
|
901
|
+
let coerced21 = undefined;
|
|
902
|
+
if(!(coerced21 !== undefined)){
|
|
903
|
+
if(data19 === "false" || data19 === 0 || data19 === null){
|
|
904
|
+
coerced21 = false;
|
|
905
|
+
}
|
|
906
|
+
else if(data19 === "true" || data19 === 1){
|
|
907
|
+
coerced21 = true;
|
|
992
908
|
}
|
|
993
909
|
else {
|
|
994
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
910
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/allowUnsafeRegex",schemaPath:"#/properties/routerOptions/properties/allowUnsafeRegex/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
995
911
|
return false;
|
|
996
912
|
}
|
|
997
913
|
}
|
|
998
|
-
if(
|
|
999
|
-
|
|
1000
|
-
if(
|
|
1001
|
-
|
|
914
|
+
if(coerced21 !== undefined){
|
|
915
|
+
data19 = coerced21;
|
|
916
|
+
if(data18 !== undefined){
|
|
917
|
+
data18["allowUnsafeRegex"] = coerced21;
|
|
1002
918
|
}
|
|
1003
919
|
}
|
|
1004
920
|
}
|
|
1005
|
-
var
|
|
1006
|
-
if(
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
if(
|
|
1012
|
-
if(
|
|
1013
|
-
|
|
921
|
+
var valid7 = _errs62 === errors;
|
|
922
|
+
if(valid7){
|
|
923
|
+
let data20 = data18.caseSensitive;
|
|
924
|
+
const _errs64 = errors;
|
|
925
|
+
if(typeof data20 !== "boolean"){
|
|
926
|
+
let coerced22 = undefined;
|
|
927
|
+
if(!(coerced22 !== undefined)){
|
|
928
|
+
if(data20 === "false" || data20 === 0 || data20 === null){
|
|
929
|
+
coerced22 = false;
|
|
1014
930
|
}
|
|
1015
|
-
if(
|
|
1016
|
-
|
|
931
|
+
else if(data20 === "true" || data20 === 1){
|
|
932
|
+
coerced22 = true;
|
|
1017
933
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
934
|
+
else {
|
|
935
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/caseSensitive",schemaPath:"#/properties/routerOptions/properties/caseSensitive/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
936
|
+
return false;
|
|
1020
937
|
}
|
|
1021
|
-
if(data23.allowUnsafeRegex === undefined){
|
|
1022
|
-
data23.allowUnsafeRegex = false;
|
|
1023
938
|
}
|
|
1024
|
-
if(
|
|
1025
|
-
|
|
939
|
+
if(coerced22 !== undefined){
|
|
940
|
+
data20 = coerced22;
|
|
941
|
+
if(data18 !== undefined){
|
|
942
|
+
data18["caseSensitive"] = coerced22;
|
|
1026
943
|
}
|
|
1027
|
-
let data24 = data23.ignoreTrailingSlash;
|
|
1028
|
-
const _errs72 = errors;
|
|
1029
|
-
if(typeof data24 !== "boolean"){
|
|
1030
|
-
let coerced26 = undefined;
|
|
1031
|
-
if(!(coerced26 !== undefined)){
|
|
1032
|
-
if(data24 === "false" || data24 === 0 || data24 === null){
|
|
1033
|
-
coerced26 = false;
|
|
1034
944
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
945
|
+
}
|
|
946
|
+
var valid7 = _errs64 === errors;
|
|
947
|
+
if(valid7){
|
|
948
|
+
if(data18.constraints !== undefined){
|
|
949
|
+
let data21 = data18.constraints;
|
|
950
|
+
const _errs66 = errors;
|
|
951
|
+
if(errors === _errs66){
|
|
952
|
+
if(data21 && typeof data21 == "object" && !Array.isArray(data21)){
|
|
953
|
+
for(const key3 in data21){
|
|
954
|
+
let data22 = data21[key3];
|
|
955
|
+
const _errs69 = errors;
|
|
956
|
+
if(errors === _errs69){
|
|
957
|
+
if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
|
|
958
|
+
let missing1;
|
|
959
|
+
if(((((data22.name === undefined) && (missing1 = "name")) || ((data22.storage === undefined) && (missing1 = "storage"))) || ((data22.validate === undefined) && (missing1 = "validate"))) || ((data22.deriveConstraint === undefined) && (missing1 = "deriveConstraint"))){
|
|
960
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/routerOptions/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];
|
|
961
|
+
return false;
|
|
1037
962
|
}
|
|
1038
963
|
else {
|
|
1039
|
-
|
|
964
|
+
if(data22.name !== undefined){
|
|
965
|
+
let data23 = data22.name;
|
|
966
|
+
if(typeof data23 !== "string"){
|
|
967
|
+
let dataType23 = typeof data23;
|
|
968
|
+
let coerced23 = undefined;
|
|
969
|
+
if(!(coerced23 !== undefined)){
|
|
970
|
+
if(dataType23 == "number" || dataType23 == "boolean"){
|
|
971
|
+
coerced23 = "" + data23;
|
|
972
|
+
}
|
|
973
|
+
else if(data23 === null){
|
|
974
|
+
coerced23 = "";
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/properties/routerOptions/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];
|
|
1040
978
|
return false;
|
|
1041
979
|
}
|
|
1042
980
|
}
|
|
1043
|
-
if(
|
|
1044
|
-
|
|
1045
|
-
if(
|
|
1046
|
-
|
|
981
|
+
if(coerced23 !== undefined){
|
|
982
|
+
data23 = coerced23;
|
|
983
|
+
if(data22 !== undefined){
|
|
984
|
+
data22["name"] = coerced23;
|
|
985
|
+
}
|
|
1047
986
|
}
|
|
1048
987
|
}
|
|
1049
988
|
}
|
|
1050
|
-
var valid7 = _errs72 === errors;
|
|
1051
|
-
if(valid7){
|
|
1052
|
-
let data25 = data23.ignoreDuplicateSlashes;
|
|
1053
|
-
const _errs74 = errors;
|
|
1054
|
-
if(typeof data25 !== "boolean"){
|
|
1055
|
-
let coerced27 = undefined;
|
|
1056
|
-
if(!(coerced27 !== undefined)){
|
|
1057
|
-
if(data25 === "false" || data25 === 0 || data25 === null){
|
|
1058
|
-
coerced27 = false;
|
|
1059
989
|
}
|
|
1060
|
-
else if(data25 === "true" || data25 === 1){
|
|
1061
|
-
coerced27 = true;
|
|
1062
990
|
}
|
|
1063
991
|
else {
|
|
1064
|
-
validate10.errors = [{instancePath:instancePath+"/routerOptions/
|
|
992
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/constraints/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/routerOptions/properties/constraints/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"}];
|
|
1065
993
|
return false;
|
|
1066
994
|
}
|
|
1067
995
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
data23["ignoreDuplicateSlashes"] = coerced27;
|
|
996
|
+
var valid8 = _errs69 === errors;
|
|
997
|
+
if(!valid8){
|
|
998
|
+
break;
|
|
1072
999
|
}
|
|
1073
1000
|
}
|
|
1074
1001
|
}
|
|
1075
|
-
var valid7 = _errs74 === errors;
|
|
1076
|
-
if(valid7){
|
|
1077
|
-
let data26 = data23.maxParamLength;
|
|
1078
|
-
const _errs76 = errors;
|
|
1079
|
-
if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){
|
|
1080
|
-
let dataType28 = typeof data26;
|
|
1081
|
-
let coerced28 = undefined;
|
|
1082
|
-
if(!(coerced28 !== undefined)){
|
|
1083
|
-
if(dataType28 === "boolean" || data26 === null
|
|
1084
|
-
|| (dataType28 === "string" && data26 && data26 == +data26 && !(data26 % 1))){
|
|
1085
|
-
coerced28 = +data26;
|
|
1086
|
-
}
|
|
1087
1002
|
else {
|
|
1088
|
-
validate10.errors = [{instancePath:instancePath+"/routerOptions/
|
|
1003
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/constraints",schemaPath:"#/properties/routerOptions/properties/constraints/type",keyword:"type",params:{type: "object"},message:"must be object"}];
|
|
1089
1004
|
return false;
|
|
1090
1005
|
}
|
|
1091
1006
|
}
|
|
1092
|
-
|
|
1093
|
-
data26 = coerced28;
|
|
1094
|
-
if(data23 !== undefined){
|
|
1095
|
-
data23["maxParamLength"] = coerced28;
|
|
1096
|
-
}
|
|
1007
|
+
var valid7 = _errs66 === errors;
|
|
1097
1008
|
}
|
|
1009
|
+
else {
|
|
1010
|
+
var valid7 = true;
|
|
1098
1011
|
}
|
|
1099
|
-
var valid7 = _errs76 === errors;
|
|
1100
1012
|
if(valid7){
|
|
1101
|
-
let
|
|
1102
|
-
const
|
|
1103
|
-
if(typeof
|
|
1104
|
-
let
|
|
1105
|
-
if(!(
|
|
1106
|
-
if(
|
|
1107
|
-
|
|
1013
|
+
let data24 = data18.ignoreTrailingSlash;
|
|
1014
|
+
const _errs74 = errors;
|
|
1015
|
+
if(typeof data24 !== "boolean"){
|
|
1016
|
+
let coerced24 = undefined;
|
|
1017
|
+
if(!(coerced24 !== undefined)){
|
|
1018
|
+
if(data24 === "false" || data24 === 0 || data24 === null){
|
|
1019
|
+
coerced24 = false;
|
|
1108
1020
|
}
|
|
1109
|
-
else if(
|
|
1110
|
-
|
|
1021
|
+
else if(data24 === "true" || data24 === 1){
|
|
1022
|
+
coerced24 = true;
|
|
1111
1023
|
}
|
|
1112
1024
|
else {
|
|
1113
|
-
validate10.errors = [{instancePath:instancePath+"/routerOptions/
|
|
1025
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreTrailingSlash",schemaPath:"#/properties/routerOptions/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
1114
1026
|
return false;
|
|
1115
1027
|
}
|
|
1116
1028
|
}
|
|
1117
|
-
if(
|
|
1118
|
-
|
|
1119
|
-
if(
|
|
1120
|
-
|
|
1029
|
+
if(coerced24 !== undefined){
|
|
1030
|
+
data24 = coerced24;
|
|
1031
|
+
if(data18 !== undefined){
|
|
1032
|
+
data18["ignoreTrailingSlash"] = coerced24;
|
|
1121
1033
|
}
|
|
1122
1034
|
}
|
|
1123
1035
|
}
|
|
1124
|
-
var valid7 =
|
|
1036
|
+
var valid7 = _errs74 === errors;
|
|
1125
1037
|
if(valid7){
|
|
1126
|
-
let
|
|
1127
|
-
const
|
|
1128
|
-
if(typeof
|
|
1129
|
-
let
|
|
1130
|
-
if(!(
|
|
1131
|
-
if(
|
|
1132
|
-
|
|
1038
|
+
let data25 = data18.ignoreDuplicateSlashes;
|
|
1039
|
+
const _errs76 = errors;
|
|
1040
|
+
if(typeof data25 !== "boolean"){
|
|
1041
|
+
let coerced25 = undefined;
|
|
1042
|
+
if(!(coerced25 !== undefined)){
|
|
1043
|
+
if(data25 === "false" || data25 === 0 || data25 === null){
|
|
1044
|
+
coerced25 = false;
|
|
1133
1045
|
}
|
|
1134
|
-
else if(
|
|
1135
|
-
|
|
1046
|
+
else if(data25 === "true" || data25 === 1){
|
|
1047
|
+
coerced25 = true;
|
|
1136
1048
|
}
|
|
1137
1049
|
else {
|
|
1138
|
-
validate10.errors = [{instancePath:instancePath+"/routerOptions/
|
|
1050
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreDuplicateSlashes",schemaPath:"#/properties/routerOptions/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
1139
1051
|
return false;
|
|
1140
1052
|
}
|
|
1141
1053
|
}
|
|
1142
|
-
if(
|
|
1143
|
-
|
|
1144
|
-
if(
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
var valid7 = _errs80 === errors;
|
|
1150
|
-
}
|
|
1054
|
+
if(coerced25 !== undefined){
|
|
1055
|
+
data25 = coerced25;
|
|
1056
|
+
if(data18 !== undefined){
|
|
1057
|
+
data18["ignoreDuplicateSlashes"] = coerced25;
|
|
1151
1058
|
}
|
|
1152
1059
|
}
|
|
1153
1060
|
}
|
|
1061
|
+
var valid7 = _errs76 === errors;
|
|
1062
|
+
if(valid7){
|
|
1063
|
+
let data26 = data18.maxParamLength;
|
|
1064
|
+
const _errs78 = errors;
|
|
1065
|
+
if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){
|
|
1066
|
+
let dataType26 = typeof data26;
|
|
1067
|
+
let coerced26 = undefined;
|
|
1068
|
+
if(!(coerced26 !== undefined)){
|
|
1069
|
+
if(dataType26 === "boolean" || data26 === null
|
|
1070
|
+
|| (dataType26 === "string" && data26 && data26 == +data26 && !(data26 % 1))){
|
|
1071
|
+
coerced26 = +data26;
|
|
1154
1072
|
}
|
|
1155
1073
|
else {
|
|
1156
|
-
validate10.errors = [{instancePath:instancePath+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type: "
|
|
1074
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/maxParamLength",schemaPath:"#/properties/routerOptions/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
|
|
1157
1075
|
return false;
|
|
1158
1076
|
}
|
|
1159
1077
|
}
|
|
1160
|
-
|
|
1078
|
+
if(coerced26 !== undefined){
|
|
1079
|
+
data26 = coerced26;
|
|
1080
|
+
if(data18 !== undefined){
|
|
1081
|
+
data18["maxParamLength"] = coerced26;
|
|
1161
1082
|
}
|
|
1162
|
-
else {
|
|
1163
|
-
var valid0 = true;
|
|
1164
1083
|
}
|
|
1165
|
-
if(valid0){
|
|
1166
|
-
if(data.constraints !== undefined){
|
|
1167
|
-
let data29 = data.constraints;
|
|
1168
|
-
const _errs82 = errors;
|
|
1169
|
-
if(errors === _errs82){
|
|
1170
|
-
if(data29 && typeof data29 == "object" && !Array.isArray(data29)){
|
|
1171
|
-
for(const key2 in data29){
|
|
1172
|
-
let data30 = data29[key2];
|
|
1173
|
-
const _errs85 = errors;
|
|
1174
|
-
if(errors === _errs85){
|
|
1175
|
-
if(data30 && typeof data30 == "object" && !Array.isArray(data30)){
|
|
1176
|
-
let missing1;
|
|
1177
|
-
if(((((data30.name === undefined) && (missing1 = "name")) || ((data30.storage === undefined) && (missing1 = "storage"))) || ((data30.validate === undefined) && (missing1 = "validate"))) || ((data30.deriveConstraint === undefined) && (missing1 = "deriveConstraint"))){
|
|
1178
|
-
validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];
|
|
1179
|
-
return false;
|
|
1180
1084
|
}
|
|
1181
|
-
|
|
1182
|
-
if(
|
|
1183
|
-
let
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
let
|
|
1187
|
-
if(!(
|
|
1188
|
-
if(
|
|
1189
|
-
|
|
1085
|
+
var valid7 = _errs78 === errors;
|
|
1086
|
+
if(valid7){
|
|
1087
|
+
let data27 = data18.useSemicolonDelimiter;
|
|
1088
|
+
const _errs80 = errors;
|
|
1089
|
+
if(typeof data27 !== "boolean"){
|
|
1090
|
+
let coerced27 = undefined;
|
|
1091
|
+
if(!(coerced27 !== undefined)){
|
|
1092
|
+
if(data27 === "false" || data27 === 0 || data27 === null){
|
|
1093
|
+
coerced27 = false;
|
|
1190
1094
|
}
|
|
1191
|
-
else if(
|
|
1192
|
-
|
|
1095
|
+
else if(data27 === "true" || data27 === 1){
|
|
1096
|
+
coerced27 = true;
|
|
1193
1097
|
}
|
|
1194
1098
|
else {
|
|
1195
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
1099
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions/useSemicolonDelimiter",schemaPath:"#/properties/routerOptions/properties/useSemicolonDelimiter/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
|
|
1196
1100
|
return false;
|
|
1197
1101
|
}
|
|
1198
1102
|
}
|
|
1199
|
-
if(
|
|
1200
|
-
|
|
1201
|
-
if(
|
|
1202
|
-
|
|
1103
|
+
if(coerced27 !== undefined){
|
|
1104
|
+
data27 = coerced27;
|
|
1105
|
+
if(data18 !== undefined){
|
|
1106
|
+
data18["useSemicolonDelimiter"] = coerced27;
|
|
1203
1107
|
}
|
|
1204
1108
|
}
|
|
1205
1109
|
}
|
|
1110
|
+
var valid7 = _errs80 === errors;
|
|
1206
1111
|
}
|
|
1207
1112
|
}
|
|
1208
1113
|
}
|
|
1209
|
-
else {
|
|
1210
|
-
validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/constraints/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"}];
|
|
1211
|
-
return false;
|
|
1212
1114
|
}
|
|
1213
1115
|
}
|
|
1214
|
-
var valid8 = _errs85 === errors;
|
|
1215
|
-
if(!valid8){
|
|
1216
|
-
break;
|
|
1217
1116
|
}
|
|
1218
1117
|
}
|
|
1219
1118
|
}
|
|
1220
1119
|
else {
|
|
1221
|
-
validate10.errors = [{instancePath:instancePath+"/
|
|
1120
|
+
validate10.errors = [{instancePath:instancePath+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];
|
|
1222
1121
|
return false;
|
|
1223
1122
|
}
|
|
1224
1123
|
}
|
|
1225
|
-
var valid0 =
|
|
1124
|
+
var valid0 = _errs59 === errors;
|
|
1226
1125
|
}
|
|
1227
1126
|
else {
|
|
1228
1127
|
var valid0 = true;
|
|
@@ -1246,12 +1145,6 @@ var valid0 = true;
|
|
|
1246
1145
|
}
|
|
1247
1146
|
}
|
|
1248
1147
|
}
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
1148
|
else {
|
|
1256
1149
|
validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];
|
|
1257
1150
|
return false;
|
|
@@ -1262,5 +1155,5 @@ return errors === 0;
|
|
|
1262
1155
|
}
|
|
1263
1156
|
|
|
1264
1157
|
|
|
1265
|
-
module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"maxRequestsPerSocket":0,"requestTimeout":0,"handlerTimeout":0,"bodyLimit":1048576,"
|
|
1158
|
+
module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"maxRequestsPerSocket":0,"requestTimeout":0,"handlerTimeout":0,"bodyLimit":1048576,"onProtoPoisoning":"error","onConstructorPoisoning":"error","pluginTimeout":10000,"requestIdHeader":false,"http2SessionTimeout":72000,"exposeHeadRoutes":true,"allowErrorHandlerOverride":false,"routerOptions":{"allowUnsafeRegex":false,"caseSensitive":true,"ignoreTrailingSlash":false,"ignoreDuplicateSlashes":false,"maxParamLength":100,"useSemicolonDelimiter":false}}
|
|
1266
1159
|
/* c8 ignore stop */
|