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