node-fastify 5.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/.borp.yaml +3 -0
  2. package/.markdownlint-cli2.yaml +22 -0
  3. package/.prettierignore +1 -0
  4. package/GOVERNANCE.md +4 -0
  5. package/LICENSE +21 -0
  6. package/PROJECT_CHARTER.md +126 -0
  7. package/README.md +423 -0
  8. package/SECURITY.md +220 -0
  9. package/SPONSORS.md +24 -0
  10. package/build/build-error-serializer.js +35 -0
  11. package/build/build-validation.js +169 -0
  12. package/build/sync-version.js +11 -0
  13. package/docs/Guides/Benchmarking.md +60 -0
  14. package/docs/Guides/Database.md +321 -0
  15. package/docs/Guides/Delay-Accepting-Requests.md +608 -0
  16. package/docs/Guides/Detecting-When-Clients-Abort.md +172 -0
  17. package/docs/Guides/Ecosystem.md +726 -0
  18. package/docs/Guides/Fluent-Schema.md +127 -0
  19. package/docs/Guides/Getting-Started.md +620 -0
  20. package/docs/Guides/Index.md +43 -0
  21. package/docs/Guides/Migration-Guide-V3.md +287 -0
  22. package/docs/Guides/Migration-Guide-V4.md +267 -0
  23. package/docs/Guides/Migration-Guide-V5.md +727 -0
  24. package/docs/Guides/Plugins-Guide.md +520 -0
  25. package/docs/Guides/Prototype-Poisoning.md +383 -0
  26. package/docs/Guides/Recommendations.md +378 -0
  27. package/docs/Guides/Serverless.md +604 -0
  28. package/docs/Guides/Style-Guide.md +246 -0
  29. package/docs/Guides/Testing.md +481 -0
  30. package/docs/Guides/Write-Plugin.md +103 -0
  31. package/docs/Guides/Write-Type-Provider.md +34 -0
  32. package/docs/Reference/ContentTypeParser.md +271 -0
  33. package/docs/Reference/Decorators.md +436 -0
  34. package/docs/Reference/Encapsulation.md +194 -0
  35. package/docs/Reference/Errors.md +377 -0
  36. package/docs/Reference/HTTP2.md +94 -0
  37. package/docs/Reference/Hooks.md +958 -0
  38. package/docs/Reference/Index.md +73 -0
  39. package/docs/Reference/LTS.md +86 -0
  40. package/docs/Reference/Lifecycle.md +99 -0
  41. package/docs/Reference/Logging.md +268 -0
  42. package/docs/Reference/Middleware.md +79 -0
  43. package/docs/Reference/Plugins.md +245 -0
  44. package/docs/Reference/Principles.md +73 -0
  45. package/docs/Reference/Reply.md +1001 -0
  46. package/docs/Reference/Request.md +295 -0
  47. package/docs/Reference/Routes.md +802 -0
  48. package/docs/Reference/Server.md +2389 -0
  49. package/docs/Reference/Type-Providers.md +256 -0
  50. package/docs/Reference/TypeScript.md +1729 -0
  51. package/docs/Reference/Validation-and-Serialization.md +1130 -0
  52. package/docs/Reference/Warnings.md +58 -0
  53. package/docs/index.md +24 -0
  54. package/docs/resources/encapsulation_context.drawio +1 -0
  55. package/docs/resources/encapsulation_context.svg +3 -0
  56. package/eslint.config.js +35 -0
  57. package/examples/asyncawait.js +38 -0
  58. package/examples/benchmark/body.json +3 -0
  59. package/examples/benchmark/hooks-benchmark-async-await.js +44 -0
  60. package/examples/benchmark/hooks-benchmark.js +52 -0
  61. package/examples/benchmark/parser.js +47 -0
  62. package/examples/benchmark/simple.js +30 -0
  63. package/examples/benchmark/webstream.js +27 -0
  64. package/examples/hooks.js +91 -0
  65. package/examples/http2.js +39 -0
  66. package/examples/https.js +38 -0
  67. package/examples/parser.js +53 -0
  68. package/examples/plugin.js +12 -0
  69. package/examples/route-prefix.js +38 -0
  70. package/examples/shared-schema.js +38 -0
  71. package/examples/simple-stream.js +20 -0
  72. package/examples/simple.js +32 -0
  73. package/examples/simple.mjs +27 -0
  74. package/examples/typescript-server.ts +79 -0
  75. package/examples/use-plugin.js +29 -0
  76. package/fastify.d.ts +253 -0
  77. package/fastify.js +985 -0
  78. package/integration/server.js +29 -0
  79. package/integration/test.sh +23 -0
  80. package/lib/config-validator.js +1266 -0
  81. package/lib/content-type-parser.js +413 -0
  82. package/lib/content-type.js +160 -0
  83. package/lib/context.js +98 -0
  84. package/lib/decorate.js +152 -0
  85. package/lib/error-handler.js +173 -0
  86. package/lib/error-serializer.js +134 -0
  87. package/lib/error-status.js +14 -0
  88. package/lib/errors.js +516 -0
  89. package/lib/four-oh-four.js +190 -0
  90. package/lib/handle-request.js +195 -0
  91. package/lib/head-route.js +45 -0
  92. package/lib/hooks.js +429 -0
  93. package/lib/initial-config-validation.js +37 -0
  94. package/lib/logger-factory.js +136 -0
  95. package/lib/logger-pino.js +68 -0
  96. package/lib/noop-set.js +10 -0
  97. package/lib/plugin-override.js +90 -0
  98. package/lib/plugin-utils.js +169 -0
  99. package/lib/promise.js +23 -0
  100. package/lib/reply.js +1030 -0
  101. package/lib/req-id-gen-factory.js +52 -0
  102. package/lib/request.js +391 -0
  103. package/lib/route.js +686 -0
  104. package/lib/schema-controller.js +164 -0
  105. package/lib/schemas.js +207 -0
  106. package/lib/server.js +441 -0
  107. package/lib/symbols.js +71 -0
  108. package/lib/validation.js +280 -0
  109. package/lib/warnings.js +57 -0
  110. package/lib/wrap-thenable.js +84 -0
  111. package/package.json +225 -0
  112. package/scripts/validate-ecosystem-links.js +179 -0
  113. package/test/404s.test.js +2035 -0
  114. package/test/500s.test.js +422 -0
  115. package/test/allow-unsafe-regex.test.js +92 -0
  116. package/test/als.test.js +65 -0
  117. package/test/async-await.test.js +705 -0
  118. package/test/async-dispose.test.js +20 -0
  119. package/test/async_hooks.test.js +52 -0
  120. package/test/body-limit.test.js +224 -0
  121. package/test/buffer.test.js +74 -0
  122. package/test/build/error-serializer.test.js +36 -0
  123. package/test/build/version.test.js +14 -0
  124. package/test/build-certificate.js +109 -0
  125. package/test/bundler/README.md +29 -0
  126. package/test/bundler/esbuild/bundler-test.js +32 -0
  127. package/test/bundler/esbuild/package.json +10 -0
  128. package/test/bundler/esbuild/src/fail-plugin-version.js +14 -0
  129. package/test/bundler/esbuild/src/index.js +9 -0
  130. package/test/bundler/webpack/bundler-test.js +32 -0
  131. package/test/bundler/webpack/package.json +11 -0
  132. package/test/bundler/webpack/src/fail-plugin-version.js +14 -0
  133. package/test/bundler/webpack/src/index.js +9 -0
  134. package/test/bundler/webpack/webpack.config.js +15 -0
  135. package/test/case-insensitive.test.js +102 -0
  136. package/test/chainable.test.js +40 -0
  137. package/test/child-logger-factory.test.js +128 -0
  138. package/test/client-timeout.test.js +38 -0
  139. package/test/close-pipelining.test.js +78 -0
  140. package/test/close.test.js +706 -0
  141. package/test/conditional-pino.test.js +47 -0
  142. package/test/connection-timeout.test.js +42 -0
  143. package/test/constrained-routes.test.js +1138 -0
  144. package/test/content-length.test.js +174 -0
  145. package/test/content-parser.test.js +739 -0
  146. package/test/content-type.test.js +181 -0
  147. package/test/context-config.test.js +164 -0
  148. package/test/custom-http-server.test.js +118 -0
  149. package/test/custom-parser-async.test.js +59 -0
  150. package/test/custom-parser.0.test.js +701 -0
  151. package/test/custom-parser.1.test.js +266 -0
  152. package/test/custom-parser.2.test.js +91 -0
  153. package/test/custom-parser.3.test.js +208 -0
  154. package/test/custom-parser.4.test.js +218 -0
  155. package/test/custom-parser.5.test.js +130 -0
  156. package/test/custom-querystring-parser.test.js +129 -0
  157. package/test/decorator.test.js +1330 -0
  158. package/test/delete.test.js +344 -0
  159. package/test/diagnostics-channel/404.test.js +49 -0
  160. package/test/diagnostics-channel/async-delay-request.test.js +65 -0
  161. package/test/diagnostics-channel/async-request.test.js +64 -0
  162. package/test/diagnostics-channel/error-before-handler.test.js +35 -0
  163. package/test/diagnostics-channel/error-request.test.js +53 -0
  164. package/test/diagnostics-channel/error-status.test.js +123 -0
  165. package/test/diagnostics-channel/init.test.js +50 -0
  166. package/test/diagnostics-channel/sync-delay-request.test.js +49 -0
  167. package/test/diagnostics-channel/sync-request-reply.test.js +51 -0
  168. package/test/diagnostics-channel/sync-request.test.js +54 -0
  169. package/test/encapsulated-child-logger-factory.test.js +69 -0
  170. package/test/encapsulated-error-handler.test.js +237 -0
  171. package/test/esm/errorCodes.test.mjs +10 -0
  172. package/test/esm/esm.test.mjs +13 -0
  173. package/test/esm/index.test.js +8 -0
  174. package/test/esm/named-exports.mjs +14 -0
  175. package/test/esm/other.mjs +8 -0
  176. package/test/esm/plugin.mjs +8 -0
  177. package/test/fastify-instance.test.js +300 -0
  178. package/test/find-route.test.js +152 -0
  179. package/test/fluent-schema.test.js +209 -0
  180. package/test/genReqId.test.js +426 -0
  181. package/test/handler-context.test.js +45 -0
  182. package/test/handler-timeout.test.js +367 -0
  183. package/test/has-route.test.js +88 -0
  184. package/test/header-overflow.test.js +55 -0
  185. package/test/helper.js +496 -0
  186. package/test/hooks-async.test.js +1099 -0
  187. package/test/hooks.on-listen.test.js +1162 -0
  188. package/test/hooks.on-ready.test.js +421 -0
  189. package/test/hooks.test.js +3578 -0
  190. package/test/http-methods/copy.test.js +35 -0
  191. package/test/http-methods/custom-http-methods.test.js +114 -0
  192. package/test/http-methods/get.test.js +412 -0
  193. package/test/http-methods/head.test.js +263 -0
  194. package/test/http-methods/lock.test.js +108 -0
  195. package/test/http-methods/mkcalendar.test.js +143 -0
  196. package/test/http-methods/mkcol.test.js +35 -0
  197. package/test/http-methods/move.test.js +42 -0
  198. package/test/http-methods/propfind.test.js +136 -0
  199. package/test/http-methods/proppatch.test.js +105 -0
  200. package/test/http-methods/report.test.js +142 -0
  201. package/test/http-methods/search.test.js +233 -0
  202. package/test/http-methods/trace.test.js +21 -0
  203. package/test/http-methods/unlock.test.js +38 -0
  204. package/test/http2/closing.test.js +270 -0
  205. package/test/http2/constraint.test.js +109 -0
  206. package/test/http2/head.test.js +34 -0
  207. package/test/http2/plain.test.js +68 -0
  208. package/test/http2/secure-with-fallback.test.js +113 -0
  209. package/test/http2/secure.test.js +67 -0
  210. package/test/http2/unknown-http-method.test.js +34 -0
  211. package/test/https/custom-https-server.test.js +58 -0
  212. package/test/https/https.test.js +136 -0
  213. package/test/imports.test.js +17 -0
  214. package/test/inject.test.js +502 -0
  215. package/test/input-validation.js +335 -0
  216. package/test/internals/all.test.js +38 -0
  217. package/test/internals/content-type-parser.test.js +111 -0
  218. package/test/internals/context.test.js +31 -0
  219. package/test/internals/decorator.test.js +156 -0
  220. package/test/internals/errors.test.js +982 -0
  221. package/test/internals/handle-request.test.js +270 -0
  222. package/test/internals/hook-runner.test.js +449 -0
  223. package/test/internals/hooks.test.js +96 -0
  224. package/test/internals/initial-config.test.js +383 -0
  225. package/test/internals/logger.test.js +163 -0
  226. package/test/internals/plugin.test.js +170 -0
  227. package/test/internals/promise.test.js +63 -0
  228. package/test/internals/reply-serialize.test.js +714 -0
  229. package/test/internals/reply.test.js +1920 -0
  230. package/test/internals/req-id-gen-factory.test.js +133 -0
  231. package/test/internals/request-validate.test.js +1402 -0
  232. package/test/internals/request.test.js +506 -0
  233. package/test/internals/schema-controller-perf.test.js +40 -0
  234. package/test/internals/server.test.js +91 -0
  235. package/test/internals/validation.test.js +352 -0
  236. package/test/issue-4959.test.js +118 -0
  237. package/test/keep-alive-timeout.test.js +42 -0
  238. package/test/listen.1.test.js +154 -0
  239. package/test/listen.2.test.js +113 -0
  240. package/test/listen.3.test.js +83 -0
  241. package/test/listen.4.test.js +168 -0
  242. package/test/listen.5.test.js +122 -0
  243. package/test/logger/instantiation.test.js +341 -0
  244. package/test/logger/logger-test-utils.js +47 -0
  245. package/test/logger/logging.test.js +460 -0
  246. package/test/logger/options.test.js +579 -0
  247. package/test/logger/request.test.js +292 -0
  248. package/test/logger/response.test.js +183 -0
  249. package/test/logger/tap-parallel-not-ok +0 -0
  250. package/test/max-requests-per-socket.test.js +113 -0
  251. package/test/middleware.test.js +37 -0
  252. package/test/noop-set.test.js +19 -0
  253. package/test/nullable-validation.test.js +187 -0
  254. package/test/options.error-handler.test.js +5 -0
  255. package/test/options.test.js +5 -0
  256. package/test/output-validation.test.js +140 -0
  257. package/test/patch.error-handler.test.js +5 -0
  258. package/test/patch.test.js +5 -0
  259. package/test/plugin.1.test.js +230 -0
  260. package/test/plugin.2.test.js +314 -0
  261. package/test/plugin.3.test.js +287 -0
  262. package/test/plugin.4.test.js +504 -0
  263. package/test/plugin.helper.js +8 -0
  264. package/test/plugin.name.display.js +10 -0
  265. package/test/post-empty-body.test.js +38 -0
  266. package/test/pretty-print.test.js +366 -0
  267. package/test/promises.test.js +125 -0
  268. package/test/proto-poisoning.test.js +145 -0
  269. package/test/put.error-handler.test.js +5 -0
  270. package/test/put.test.js +5 -0
  271. package/test/register.test.js +184 -0
  272. package/test/reply-code.test.js +148 -0
  273. package/test/reply-early-hints.test.js +100 -0
  274. package/test/reply-error.test.js +815 -0
  275. package/test/reply-trailers.test.js +445 -0
  276. package/test/reply-web-stream-locked.test.js +37 -0
  277. package/test/request-error.test.js +624 -0
  278. package/test/request-header-host.test.js +339 -0
  279. package/test/request-id.test.js +118 -0
  280. package/test/request-timeout.test.js +53 -0
  281. package/test/route-hooks.test.js +635 -0
  282. package/test/route-prefix.test.js +904 -0
  283. package/test/route-shorthand.test.js +48 -0
  284. package/test/route.1.test.js +259 -0
  285. package/test/route.2.test.js +100 -0
  286. package/test/route.3.test.js +213 -0
  287. package/test/route.4.test.js +127 -0
  288. package/test/route.5.test.js +211 -0
  289. package/test/route.6.test.js +306 -0
  290. package/test/route.7.test.js +406 -0
  291. package/test/route.8.test.js +225 -0
  292. package/test/router-options.test.js +1108 -0
  293. package/test/same-shape.test.js +124 -0
  294. package/test/schema-examples.test.js +661 -0
  295. package/test/schema-feature.test.js +2198 -0
  296. package/test/schema-serialization.test.js +1171 -0
  297. package/test/schema-special-usage.test.js +1348 -0
  298. package/test/schema-validation.test.js +1572 -0
  299. package/test/scripts/validate-ecosystem-links.test.js +339 -0
  300. package/test/serialize-response.test.js +186 -0
  301. package/test/server.test.js +347 -0
  302. package/test/set-error-handler.test.js +69 -0
  303. package/test/skip-reply-send.test.js +317 -0
  304. package/test/stream-serializers.test.js +40 -0
  305. package/test/stream.1.test.js +94 -0
  306. package/test/stream.2.test.js +129 -0
  307. package/test/stream.3.test.js +198 -0
  308. package/test/stream.4.test.js +176 -0
  309. package/test/stream.5.test.js +188 -0
  310. package/test/sync-routes.test.js +32 -0
  311. package/test/throw.test.js +359 -0
  312. package/test/toolkit.js +63 -0
  313. package/test/trust-proxy.test.js +162 -0
  314. package/test/type-provider.test.js +22 -0
  315. package/test/types/content-type-parser.test-d.ts +72 -0
  316. package/test/types/decorate-request-reply.test-d.ts +18 -0
  317. package/test/types/dummy-plugin.ts +9 -0
  318. package/test/types/errors.test-d.ts +90 -0
  319. package/test/types/fastify.test-d.ts +352 -0
  320. package/test/types/hooks.test-d.ts +550 -0
  321. package/test/types/import.ts +2 -0
  322. package/test/types/instance.test-d.ts +588 -0
  323. package/test/types/logger.test-d.ts +277 -0
  324. package/test/types/plugin.test-d.ts +97 -0
  325. package/test/types/register.test-d.ts +237 -0
  326. package/test/types/reply.test-d.ts +254 -0
  327. package/test/types/request.test-d.ts +188 -0
  328. package/test/types/route.test-d.ts +553 -0
  329. package/test/types/schema.test-d.ts +135 -0
  330. package/test/types/serverFactory.test-d.ts +37 -0
  331. package/test/types/type-provider.test-d.ts +1213 -0
  332. package/test/types/using.test-d.ts +17 -0
  333. package/test/upgrade.test.js +52 -0
  334. package/test/url-rewriting.test.js +122 -0
  335. package/test/use-semicolon-delimiter.test.js +168 -0
  336. package/test/validation-error-handling.test.js +900 -0
  337. package/test/versioned-routes.test.js +603 -0
  338. package/test/web-api.test.js +616 -0
  339. package/test/wrap-thenable.test.js +30 -0
  340. package/types/content-type-parser.d.ts +75 -0
  341. package/types/context.d.ts +22 -0
  342. package/types/errors.d.ts +92 -0
  343. package/types/hooks.d.ts +875 -0
  344. package/types/instance.d.ts +609 -0
  345. package/types/logger.d.ts +107 -0
  346. package/types/plugin.d.ts +44 -0
  347. package/types/register.d.ts +42 -0
  348. package/types/reply.d.ts +81 -0
  349. package/types/request.d.ts +95 -0
  350. package/types/route.d.ts +199 -0
  351. package/types/schema.d.ts +61 -0
  352. package/types/server-factory.d.ts +19 -0
  353. package/types/type-provider.d.ts +130 -0
  354. package/types/utils.d.ts +98 -0
@@ -0,0 +1,1266 @@
1
+ // This file is autogenerated by build/build-validation.js, do not edit
2
+ /* c8 ignore start */
3
+ "use strict";
4
+ module.exports = validate10;
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},"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
+ const func2 = Object.prototype.hasOwnProperty;
8
+ const pattern0 = new RegExp("idle", "u");
9
+
10
+ function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
11
+ let vErrors = null;
12
+ let errors = 0;
13
+ if(errors === 0){
14
+ if(data && typeof data == "object" && !Array.isArray(data)){
15
+ if(data.connectionTimeout === undefined){
16
+ data.connectionTimeout = 0;
17
+ }
18
+ if(data.keepAliveTimeout === undefined){
19
+ data.keepAliveTimeout = 72000;
20
+ }
21
+ if(data.maxRequestsPerSocket === undefined){
22
+ data.maxRequestsPerSocket = 0;
23
+ }
24
+ if(data.requestTimeout === undefined){
25
+ data.requestTimeout = 0;
26
+ }
27
+ if(data.handlerTimeout === undefined){
28
+ data.handlerTimeout = 0;
29
+ }
30
+ if(data.bodyLimit === undefined){
31
+ data.bodyLimit = 1048576;
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
+ if(data.onProtoPoisoning === undefined){
52
+ data.onProtoPoisoning = "error";
53
+ }
54
+ if(data.onConstructorPoisoning === undefined){
55
+ data.onConstructorPoisoning = "error";
56
+ }
57
+ if(data.pluginTimeout === undefined){
58
+ data.pluginTimeout = 10000;
59
+ }
60
+ if(data.requestIdHeader === undefined){
61
+ data.requestIdHeader = false;
62
+ }
63
+ if(data.requestIdLogLabel === undefined){
64
+ data.requestIdLogLabel = "reqId";
65
+ }
66
+ if(data.http2SessionTimeout === undefined){
67
+ data.http2SessionTimeout = 72000;
68
+ }
69
+ if(data.exposeHeadRoutes === undefined){
70
+ data.exposeHeadRoutes = true;
71
+ }
72
+ if(data.useSemicolonDelimiter === undefined){
73
+ data.useSemicolonDelimiter = false;
74
+ }
75
+ const _errs1 = errors;
76
+ for(const key0 in data){
77
+ if(!(func2.call(schema11.properties, key0))){
78
+ delete data[key0];
79
+ }
80
+ }
81
+ if(_errs1 === errors){
82
+ let data0 = data.connectionTimeout;
83
+ const _errs2 = errors;
84
+ if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){
85
+ let dataType0 = typeof data0;
86
+ let coerced0 = undefined;
87
+ if(!(coerced0 !== undefined)){
88
+ if(dataType0 === "boolean" || data0 === null
89
+ || (dataType0 === "string" && data0 && data0 == +data0 && !(data0 % 1))){
90
+ coerced0 = +data0;
91
+ }
92
+ else {
93
+ validate10.errors = [{instancePath:instancePath+"/connectionTimeout",schemaPath:"#/properties/connectionTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
94
+ return false;
95
+ }
96
+ }
97
+ if(coerced0 !== undefined){
98
+ data0 = coerced0;
99
+ if(data !== undefined){
100
+ data["connectionTimeout"] = coerced0;
101
+ }
102
+ }
103
+ }
104
+ var valid0 = _errs2 === errors;
105
+ if(valid0){
106
+ let data1 = data.keepAliveTimeout;
107
+ const _errs4 = errors;
108
+ if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){
109
+ let dataType1 = typeof data1;
110
+ let coerced1 = undefined;
111
+ if(!(coerced1 !== undefined)){
112
+ if(dataType1 === "boolean" || data1 === null
113
+ || (dataType1 === "string" && data1 && data1 == +data1 && !(data1 % 1))){
114
+ coerced1 = +data1;
115
+ }
116
+ else {
117
+ validate10.errors = [{instancePath:instancePath+"/keepAliveTimeout",schemaPath:"#/properties/keepAliveTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
118
+ return false;
119
+ }
120
+ }
121
+ if(coerced1 !== undefined){
122
+ data1 = coerced1;
123
+ if(data !== undefined){
124
+ data["keepAliveTimeout"] = coerced1;
125
+ }
126
+ }
127
+ }
128
+ var valid0 = _errs4 === errors;
129
+ if(valid0){
130
+ if(data.forceCloseConnections !== undefined){
131
+ let data2 = data.forceCloseConnections;
132
+ const _errs6 = errors;
133
+ const _errs7 = errors;
134
+ let valid1 = false;
135
+ let passing0 = null;
136
+ const _errs8 = errors;
137
+ if(typeof data2 !== "string"){
138
+ let dataType2 = typeof data2;
139
+ let coerced2 = undefined;
140
+ if(!(coerced2 !== undefined)){
141
+ if(dataType2 == "number" || dataType2 == "boolean"){
142
+ coerced2 = "" + data2;
143
+ }
144
+ else if(data2 === null){
145
+ coerced2 = "";
146
+ }
147
+ else {
148
+ const err0 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
149
+ if(vErrors === null){
150
+ vErrors = [err0];
151
+ }
152
+ else {
153
+ vErrors.push(err0);
154
+ }
155
+ errors++;
156
+ }
157
+ }
158
+ if(coerced2 !== undefined){
159
+ data2 = coerced2;
160
+ if(data !== undefined){
161
+ data["forceCloseConnections"] = coerced2;
162
+ }
163
+ }
164
+ }
165
+ if(errors === _errs8){
166
+ if(typeof data2 === "string"){
167
+ if(!pattern0.test(data2)){
168
+ const err1 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/pattern",keyword:"pattern",params:{pattern: "idle"},message:"must match pattern \""+"idle"+"\""};
169
+ if(vErrors === null){
170
+ vErrors = [err1];
171
+ }
172
+ else {
173
+ vErrors.push(err1);
174
+ }
175
+ errors++;
176
+ }
177
+ }
178
+ }
179
+ var _valid0 = _errs8 === errors;
180
+ if(_valid0){
181
+ valid1 = true;
182
+ passing0 = 0;
183
+ }
184
+ const _errs10 = errors;
185
+ if(typeof data2 !== "boolean"){
186
+ let coerced3 = undefined;
187
+ if(!(coerced3 !== undefined)){
188
+ if(data2 === "false" || data2 === 0 || data2 === null){
189
+ coerced3 = false;
190
+ }
191
+ else if(data2 === "true" || data2 === 1){
192
+ coerced3 = true;
193
+ }
194
+ else {
195
+ const err2 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
196
+ if(vErrors === null){
197
+ vErrors = [err2];
198
+ }
199
+ else {
200
+ vErrors.push(err2);
201
+ }
202
+ errors++;
203
+ }
204
+ }
205
+ if(coerced3 !== undefined){
206
+ data2 = coerced3;
207
+ if(data !== undefined){
208
+ data["forceCloseConnections"] = coerced3;
209
+ }
210
+ }
211
+ }
212
+ var _valid0 = _errs10 === errors;
213
+ if(_valid0 && valid1){
214
+ valid1 = false;
215
+ passing0 = [passing0, 1];
216
+ }
217
+ else {
218
+ if(_valid0){
219
+ valid1 = true;
220
+ passing0 = 1;
221
+ }
222
+ }
223
+ if(!valid1){
224
+ const err3 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};
225
+ if(vErrors === null){
226
+ vErrors = [err3];
227
+ }
228
+ else {
229
+ vErrors.push(err3);
230
+ }
231
+ errors++;
232
+ validate10.errors = vErrors;
233
+ return false;
234
+ }
235
+ else {
236
+ errors = _errs7;
237
+ if(vErrors !== null){
238
+ if(_errs7){
239
+ vErrors.length = _errs7;
240
+ }
241
+ else {
242
+ vErrors = null;
243
+ }
244
+ }
245
+ }
246
+ var valid0 = _errs6 === errors;
247
+ }
248
+ else {
249
+ var valid0 = true;
250
+ }
251
+ if(valid0){
252
+ let data3 = data.maxRequestsPerSocket;
253
+ const _errs12 = errors;
254
+ if((!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) && (data3 !== null)){
255
+ let dataType4 = typeof data3;
256
+ let coerced4 = undefined;
257
+ if(!(coerced4 !== undefined)){
258
+ if(dataType4 === "boolean" || data3 === null
259
+ || (dataType4 === "string" && data3 && data3 == +data3 && !(data3 % 1))){
260
+ coerced4 = +data3;
261
+ }
262
+ else if(data3 === "" || data3 === 0 || data3 === false){
263
+ coerced4 = null;
264
+ }
265
+ else {
266
+ validate10.errors = [{instancePath:instancePath+"/maxRequestsPerSocket",schemaPath:"#/properties/maxRequestsPerSocket/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
267
+ return false;
268
+ }
269
+ }
270
+ if(coerced4 !== undefined){
271
+ data3 = coerced4;
272
+ if(data !== undefined){
273
+ data["maxRequestsPerSocket"] = coerced4;
274
+ }
275
+ }
276
+ }
277
+ var valid0 = _errs12 === errors;
278
+ if(valid0){
279
+ let data4 = data.requestTimeout;
280
+ const _errs15 = errors;
281
+ if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){
282
+ let dataType5 = typeof data4;
283
+ let coerced5 = undefined;
284
+ if(!(coerced5 !== undefined)){
285
+ if(dataType5 === "boolean" || data4 === null
286
+ || (dataType5 === "string" && data4 && data4 == +data4 && !(data4 % 1))){
287
+ coerced5 = +data4;
288
+ }
289
+ else {
290
+ validate10.errors = [{instancePath:instancePath+"/requestTimeout",schemaPath:"#/properties/requestTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
291
+ return false;
292
+ }
293
+ }
294
+ if(coerced5 !== undefined){
295
+ data4 = coerced5;
296
+ if(data !== undefined){
297
+ data["requestTimeout"] = coerced5;
298
+ }
299
+ }
300
+ }
301
+ var valid0 = _errs15 === errors;
302
+ if(valid0){
303
+ let data5 = data.handlerTimeout;
304
+ const _errs17 = errors;
305
+ if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){
306
+ let dataType6 = typeof data5;
307
+ let coerced6 = undefined;
308
+ if(!(coerced6 !== undefined)){
309
+ if(dataType6 === "boolean" || data5 === null
310
+ || (dataType6 === "string" && data5 && data5 == +data5 && !(data5 % 1))){
311
+ coerced6 = +data5;
312
+ }
313
+ else {
314
+ validate10.errors = [{instancePath:instancePath+"/handlerTimeout",schemaPath:"#/properties/handlerTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
315
+ return false;
316
+ }
317
+ }
318
+ if(coerced6 !== undefined){
319
+ data5 = coerced6;
320
+ if(data !== undefined){
321
+ data["handlerTimeout"] = coerced6;
322
+ }
323
+ }
324
+ }
325
+ var valid0 = _errs17 === errors;
326
+ if(valid0){
327
+ let data6 = data.bodyLimit;
328
+ const _errs19 = errors;
329
+ if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){
330
+ let dataType7 = typeof data6;
331
+ let coerced7 = undefined;
332
+ if(!(coerced7 !== undefined)){
333
+ if(dataType7 === "boolean" || data6 === null
334
+ || (dataType7 === "string" && data6 && data6 == +data6 && !(data6 % 1))){
335
+ coerced7 = +data6;
336
+ }
337
+ else {
338
+ validate10.errors = [{instancePath:instancePath+"/bodyLimit",schemaPath:"#/properties/bodyLimit/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
339
+ return false;
340
+ }
341
+ }
342
+ if(coerced7 !== undefined){
343
+ data6 = coerced7;
344
+ if(data !== undefined){
345
+ data["bodyLimit"] = coerced7;
346
+ }
347
+ }
348
+ }
349
+ var valid0 = _errs19 === errors;
350
+ if(valid0){
351
+ let data7 = data.caseSensitive;
352
+ const _errs21 = errors;
353
+ if(typeof data7 !== "boolean"){
354
+ let coerced8 = undefined;
355
+ if(!(coerced8 !== undefined)){
356
+ if(data7 === "false" || data7 === 0 || data7 === null){
357
+ coerced8 = false;
358
+ }
359
+ else if(data7 === "true" || data7 === 1){
360
+ coerced8 = true;
361
+ }
362
+ else {
363
+ validate10.errors = [{instancePath:instancePath+"/caseSensitive",schemaPath:"#/properties/caseSensitive/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
364
+ return false;
365
+ }
366
+ }
367
+ if(coerced8 !== undefined){
368
+ data7 = coerced8;
369
+ if(data !== undefined){
370
+ data["caseSensitive"] = coerced8;
371
+ }
372
+ }
373
+ }
374
+ 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
+ }
427
+ else {
428
+ var valid0 = true;
429
+ }
430
+ if(valid0){
431
+ if(data.https !== undefined){
432
+ let data10 = data.https;
433
+ const _errs27 = errors;
434
+ const _errs28 = errors;
435
+ let valid2 = true;
436
+ const _errs29 = errors;
437
+ const _errs30 = errors;
438
+ const _errs31 = errors;
439
+ const _errs32 = errors;
440
+ let valid4 = false;
441
+ let passing1 = null;
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;
448
+ }
449
+ else if(data10 === "true" || data10 === 1){
450
+ coerced11 = true;
451
+ }
452
+ else {
453
+ const err4 = {};
454
+ if(vErrors === null){
455
+ vErrors = [err4];
456
+ }
457
+ else {
458
+ vErrors.push(err4);
459
+ }
460
+ errors++;
461
+ }
462
+ }
463
+ if(coerced11 !== undefined){
464
+ data10 = coerced11;
465
+ if(data !== undefined){
466
+ data["https"] = coerced11;
467
+ }
468
+ }
469
+ }
470
+ var _valid2 = _errs33 === errors;
471
+ if(_valid2){
472
+ valid4 = true;
473
+ passing1 = 0;
474
+ }
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;
481
+ }
482
+ else {
483
+ const err5 = {};
484
+ if(vErrors === null){
485
+ vErrors = [err5];
486
+ }
487
+ else {
488
+ vErrors.push(err5);
489
+ }
490
+ errors++;
491
+ }
492
+ }
493
+ if(coerced12 !== undefined){
494
+ data10 = coerced12;
495
+ if(data !== undefined){
496
+ data["https"] = coerced12;
497
+ }
498
+ }
499
+ }
500
+ var _valid2 = _errs35 === errors;
501
+ if(_valid2 && valid4){
502
+ valid4 = false;
503
+ passing1 = [passing1, 1];
504
+ }
505
+ else {
506
+ if(_valid2){
507
+ valid4 = true;
508
+ passing1 = 1;
509
+ }
510
+ const _errs37 = errors;
511
+ if(errors === _errs37){
512
+ if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
513
+ let missing0;
514
+ if((data10.allowHTTP1 === undefined) && (missing0 = "allowHTTP1")){
515
+ const err6 = {};
516
+ if(vErrors === null){
517
+ vErrors = [err6];
518
+ }
519
+ else {
520
+ vErrors.push(err6);
521
+ }
522
+ errors++;
523
+ }
524
+ else {
525
+ const _errs39 = errors;
526
+ for(const key1 in data10){
527
+ if(!(key1 === "allowHTTP1")){
528
+ delete data10[key1];
529
+ }
530
+ }
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;
539
+ }
540
+ else if(data11 === "true" || data11 === 1){
541
+ coerced13 = true;
542
+ }
543
+ else {
544
+ const err7 = {};
545
+ if(vErrors === null){
546
+ vErrors = [err7];
547
+ }
548
+ else {
549
+ vErrors.push(err7);
550
+ }
551
+ errors++;
552
+ }
553
+ }
554
+ if(coerced13 !== undefined){
555
+ data11 = coerced13;
556
+ if(data10 !== undefined){
557
+ data10["allowHTTP1"] = coerced13;
558
+ }
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ else {
566
+ const err8 = {};
567
+ if(vErrors === null){
568
+ vErrors = [err8];
569
+ }
570
+ else {
571
+ vErrors.push(err8);
572
+ }
573
+ errors++;
574
+ }
575
+ }
576
+ var _valid2 = _errs37 === errors;
577
+ if(_valid2 && valid4){
578
+ valid4 = false;
579
+ passing1 = [passing1, 2];
580
+ }
581
+ else {
582
+ if(_valid2){
583
+ valid4 = true;
584
+ passing1 = 2;
585
+ }
586
+ }
587
+ }
588
+ if(!valid4){
589
+ const err9 = {};
590
+ if(vErrors === null){
591
+ vErrors = [err9];
592
+ }
593
+ else {
594
+ vErrors.push(err9);
595
+ }
596
+ errors++;
597
+ }
598
+ else {
599
+ errors = _errs32;
600
+ if(vErrors !== null){
601
+ if(_errs32){
602
+ vErrors.length = _errs32;
603
+ }
604
+ else {
605
+ vErrors = null;
606
+ }
607
+ }
608
+ }
609
+ var valid3 = _errs31 === errors;
610
+ if(valid3){
611
+ const err10 = {};
612
+ if(vErrors === null){
613
+ vErrors = [err10];
614
+ }
615
+ else {
616
+ vErrors.push(err10);
617
+ }
618
+ errors++;
619
+ }
620
+ else {
621
+ errors = _errs30;
622
+ if(vErrors !== null){
623
+ if(_errs30){
624
+ vErrors.length = _errs30;
625
+ }
626
+ else {
627
+ vErrors = null;
628
+ }
629
+ }
630
+ }
631
+ var _valid1 = _errs29 === errors;
632
+ errors = _errs28;
633
+ if(vErrors !== null){
634
+ if(_errs28){
635
+ vErrors.length = _errs28;
636
+ }
637
+ else {
638
+ vErrors = null;
639
+ }
640
+ }
641
+ if(_valid1){
642
+ const _errs42 = errors;
643
+ data["https"] = true;
644
+ var _valid1 = _errs42 === errors;
645
+ valid2 = _valid1;
646
+ }
647
+ if(!valid2){
648
+ const err11 = {instancePath:instancePath+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
649
+ if(vErrors === null){
650
+ vErrors = [err11];
651
+ }
652
+ else {
653
+ vErrors.push(err11);
654
+ }
655
+ errors++;
656
+ validate10.errors = vErrors;
657
+ return false;
658
+ }
659
+ var valid0 = _errs27 === errors;
660
+ }
661
+ else {
662
+ var valid0 = true;
663
+ }
664
+ if(valid0){
665
+ let data12 = data.ignoreTrailingSlash;
666
+ const _errs43 = errors;
667
+ if(typeof data12 !== "boolean"){
668
+ let coerced14 = undefined;
669
+ if(!(coerced14 !== undefined)){
670
+ if(data12 === "false" || data12 === 0 || data12 === null){
671
+ coerced14 = false;
672
+ }
673
+ else if(data12 === "true" || data12 === 1){
674
+ coerced14 = true;
675
+ }
676
+ else {
677
+ validate10.errors = [{instancePath:instancePath+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
678
+ return false;
679
+ }
680
+ }
681
+ if(coerced14 !== undefined){
682
+ data12 = coerced14;
683
+ if(data !== undefined){
684
+ data["ignoreTrailingSlash"] = coerced14;
685
+ }
686
+ }
687
+ }
688
+ var valid0 = _errs43 === errors;
689
+ if(valid0){
690
+ let data13 = data.ignoreDuplicateSlashes;
691
+ const _errs45 = errors;
692
+ if(typeof data13 !== "boolean"){
693
+ let coerced15 = undefined;
694
+ if(!(coerced15 !== undefined)){
695
+ if(data13 === "false" || data13 === 0 || data13 === null){
696
+ coerced15 = false;
697
+ }
698
+ else if(data13 === "true" || data13 === 1){
699
+ coerced15 = true;
700
+ }
701
+ else {
702
+ validate10.errors = [{instancePath:instancePath+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
703
+ return false;
704
+ }
705
+ }
706
+ if(coerced15 !== undefined){
707
+ data13 = coerced15;
708
+ if(data !== undefined){
709
+ data["ignoreDuplicateSlashes"] = coerced15;
710
+ }
711
+ }
712
+ }
713
+ var valid0 = _errs45 === errors;
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;
724
+ }
725
+ else {
726
+ validate10.errors = [{instancePath:instancePath+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
727
+ return false;
728
+ }
729
+ }
730
+ if(coerced16 !== undefined){
731
+ data14 = coerced16;
732
+ if(data !== undefined){
733
+ data["maxParamLength"] = coerced16;
734
+ }
735
+ }
736
+ }
737
+ var valid0 = _errs47 === errors;
738
+ if(valid0){
739
+ let data15 = data.onProtoPoisoning;
740
+ const _errs49 = errors;
741
+ if(typeof data15 !== "string"){
742
+ let dataType17 = typeof data15;
743
+ let coerced17 = undefined;
744
+ if(!(coerced17 !== undefined)){
745
+ if(dataType17 == "number" || dataType17 == "boolean"){
746
+ coerced17 = "" + data15;
747
+ }
748
+ else if(data15 === null){
749
+ coerced17 = "";
750
+ }
751
+ else {
752
+ validate10.errors = [{instancePath:instancePath+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
753
+ return false;
754
+ }
755
+ }
756
+ if(coerced17 !== undefined){
757
+ data15 = coerced17;
758
+ if(data !== undefined){
759
+ data["onProtoPoisoning"] = coerced17;
760
+ }
761
+ }
762
+ }
763
+ var valid0 = _errs49 === errors;
764
+ if(valid0){
765
+ let data16 = data.onConstructorPoisoning;
766
+ const _errs51 = errors;
767
+ if(typeof data16 !== "string"){
768
+ let dataType18 = typeof data16;
769
+ let coerced18 = undefined;
770
+ if(!(coerced18 !== undefined)){
771
+ if(dataType18 == "number" || dataType18 == "boolean"){
772
+ coerced18 = "" + data16;
773
+ }
774
+ else if(data16 === null){
775
+ coerced18 = "";
776
+ }
777
+ else {
778
+ validate10.errors = [{instancePath:instancePath+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
779
+ return false;
780
+ }
781
+ }
782
+ if(coerced18 !== undefined){
783
+ data16 = coerced18;
784
+ if(data !== undefined){
785
+ data["onConstructorPoisoning"] = coerced18;
786
+ }
787
+ }
788
+ }
789
+ var valid0 = _errs51 === errors;
790
+ if(valid0){
791
+ let data17 = data.pluginTimeout;
792
+ const _errs53 = errors;
793
+ if(!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))){
794
+ let dataType19 = typeof data17;
795
+ let coerced19 = undefined;
796
+ if(!(coerced19 !== undefined)){
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;
810
+ }
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;
828
+ }
829
+ else {
830
+ const err12 = {instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
831
+ if(vErrors === null){
832
+ vErrors = [err12];
833
+ }
834
+ else {
835
+ vErrors.push(err12);
836
+ }
837
+ errors++;
838
+ }
839
+ }
840
+ if(coerced20 !== undefined){
841
+ data18 = coerced20;
842
+ if(data !== undefined){
843
+ data["requestIdHeader"] = coerced20;
844
+ }
845
+ }
846
+ }
847
+ var _valid3 = _errs57 === errors;
848
+ valid6 = valid6 || _valid3;
849
+ if(!valid6){
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;
857
+ }
858
+ else if(data18 === null){
859
+ coerced21 = "";
860
+ }
861
+ else {
862
+ const err13 = {instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};
863
+ if(vErrors === null){
864
+ vErrors = [err13];
865
+ }
866
+ else {
867
+ vErrors.push(err13);
868
+ }
869
+ errors++;
870
+ }
871
+ }
872
+ if(coerced21 !== undefined){
873
+ data18 = coerced21;
874
+ if(data !== undefined){
875
+ data["requestIdHeader"] = coerced21;
876
+ }
877
+ }
878
+ }
879
+ var _valid3 = _errs59 === errors;
880
+ valid6 = valid6 || _valid3;
881
+ }
882
+ if(!valid6){
883
+ const err14 = {instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
884
+ if(vErrors === null){
885
+ vErrors = [err14];
886
+ }
887
+ else {
888
+ vErrors.push(err14);
889
+ }
890
+ errors++;
891
+ validate10.errors = vErrors;
892
+ return false;
893
+ }
894
+ else {
895
+ errors = _errs56;
896
+ if(vErrors !== null){
897
+ if(_errs56){
898
+ vErrors.length = _errs56;
899
+ }
900
+ else {
901
+ vErrors = null;
902
+ }
903
+ }
904
+ }
905
+ var valid0 = _errs55 === errors;
906
+ if(valid0){
907
+ let data19 = data.requestIdLogLabel;
908
+ const _errs61 = errors;
909
+ if(typeof data19 !== "string"){
910
+ let dataType22 = typeof data19;
911
+ let coerced22 = undefined;
912
+ if(!(coerced22 !== undefined)){
913
+ if(dataType22 == "number" || dataType22 == "boolean"){
914
+ coerced22 = "" + data19;
915
+ }
916
+ else if(data19 === null){
917
+ coerced22 = "";
918
+ }
919
+ else {
920
+ validate10.errors = [{instancePath:instancePath+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type: "string"},message:"must be string"}];
921
+ return false;
922
+ }
923
+ }
924
+ if(coerced22 !== undefined){
925
+ data19 = coerced22;
926
+ if(data !== undefined){
927
+ data["requestIdLogLabel"] = coerced22;
928
+ }
929
+ }
930
+ }
931
+ var valid0 = _errs61 === errors;
932
+ if(valid0){
933
+ let data20 = data.http2SessionTimeout;
934
+ const _errs63 = errors;
935
+ if(!(((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20))) && (isFinite(data20)))){
936
+ let dataType23 = typeof data20;
937
+ let coerced23 = undefined;
938
+ if(!(coerced23 !== undefined)){
939
+ if(dataType23 === "boolean" || data20 === null
940
+ || (dataType23 === "string" && data20 && data20 == +data20 && !(data20 % 1))){
941
+ coerced23 = +data20;
942
+ }
943
+ else {
944
+ validate10.errors = [{instancePath:instancePath+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
945
+ return false;
946
+ }
947
+ }
948
+ if(coerced23 !== undefined){
949
+ data20 = coerced23;
950
+ if(data !== undefined){
951
+ data["http2SessionTimeout"] = coerced23;
952
+ }
953
+ }
954
+ }
955
+ var valid0 = _errs63 === errors;
956
+ if(valid0){
957
+ let data21 = data.exposeHeadRoutes;
958
+ const _errs65 = errors;
959
+ if(typeof data21 !== "boolean"){
960
+ let coerced24 = undefined;
961
+ if(!(coerced24 !== undefined)){
962
+ if(data21 === "false" || data21 === 0 || data21 === null){
963
+ coerced24 = false;
964
+ }
965
+ else if(data21 === "true" || data21 === 1){
966
+ coerced24 = true;
967
+ }
968
+ else {
969
+ validate10.errors = [{instancePath:instancePath+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
970
+ return false;
971
+ }
972
+ }
973
+ if(coerced24 !== undefined){
974
+ data21 = coerced24;
975
+ if(data !== undefined){
976
+ data["exposeHeadRoutes"] = coerced24;
977
+ }
978
+ }
979
+ }
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
+ }
990
+ else if(data22 === "true" || data22 === 1){
991
+ coerced25 = true;
992
+ }
993
+ else {
994
+ validate10.errors = [{instancePath:instancePath+"/useSemicolonDelimiter",schemaPath:"#/properties/useSemicolonDelimiter/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
995
+ return false;
996
+ }
997
+ }
998
+ if(coerced25 !== undefined){
999
+ data22 = coerced25;
1000
+ if(data !== undefined){
1001
+ data["useSemicolonDelimiter"] = coerced25;
1002
+ }
1003
+ }
1004
+ }
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;
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
+ }
1035
+ else if(data24 === "true" || data24 === 1){
1036
+ coerced26 = true;
1037
+ }
1038
+ else {
1039
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreTrailingSlash",schemaPath:"#/properties/routerOptions/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
1040
+ return false;
1041
+ }
1042
+ }
1043
+ if(coerced26 !== undefined){
1044
+ data24 = coerced26;
1045
+ if(data23 !== undefined){
1046
+ data23["ignoreTrailingSlash"] = coerced26;
1047
+ }
1048
+ }
1049
+ }
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
+ }
1060
+ else if(data25 === "true" || data25 === 1){
1061
+ coerced27 = true;
1062
+ }
1063
+ else {
1064
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/ignoreDuplicateSlashes",schemaPath:"#/properties/routerOptions/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
1065
+ return false;
1066
+ }
1067
+ }
1068
+ if(coerced27 !== undefined){
1069
+ data25 = coerced27;
1070
+ if(data23 !== undefined){
1071
+ data23["ignoreDuplicateSlashes"] = coerced27;
1072
+ }
1073
+ }
1074
+ }
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
+ else {
1088
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/maxParamLength",schemaPath:"#/properties/routerOptions/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
1089
+ return false;
1090
+ }
1091
+ }
1092
+ if(coerced28 !== undefined){
1093
+ data26 = coerced28;
1094
+ if(data23 !== undefined){
1095
+ data23["maxParamLength"] = coerced28;
1096
+ }
1097
+ }
1098
+ }
1099
+ var valid7 = _errs76 === errors;
1100
+ if(valid7){
1101
+ let data27 = data23.allowUnsafeRegex;
1102
+ const _errs78 = errors;
1103
+ if(typeof data27 !== "boolean"){
1104
+ let coerced29 = undefined;
1105
+ if(!(coerced29 !== undefined)){
1106
+ if(data27 === "false" || data27 === 0 || data27 === null){
1107
+ coerced29 = false;
1108
+ }
1109
+ else if(data27 === "true" || data27 === 1){
1110
+ coerced29 = true;
1111
+ }
1112
+ else {
1113
+ validate10.errors = [{instancePath:instancePath+"/routerOptions/allowUnsafeRegex",schemaPath:"#/properties/routerOptions/properties/allowUnsafeRegex/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
1114
+ return false;
1115
+ }
1116
+ }
1117
+ if(coerced29 !== undefined){
1118
+ data27 = coerced29;
1119
+ if(data23 !== undefined){
1120
+ data23["allowUnsafeRegex"] = coerced29;
1121
+ }
1122
+ }
1123
+ }
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;
1150
+ }
1151
+ }
1152
+ }
1153
+ }
1154
+ }
1155
+ else {
1156
+ validate10.errors = [{instancePath:instancePath+"/routerOptions",schemaPath:"#/properties/routerOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];
1157
+ return false;
1158
+ }
1159
+ }
1160
+ var valid0 = _errs69 === errors;
1161
+ }
1162
+ else {
1163
+ var valid0 = true;
1164
+ }
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
+ }
1181
+ else {
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;
1190
+ }
1191
+ else if(data31 === null){
1192
+ coerced31 = "";
1193
+ }
1194
+ else {
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"}];
1196
+ return false;
1197
+ }
1198
+ }
1199
+ if(coerced31 !== undefined){
1200
+ data31 = coerced31;
1201
+ if(data30 !== undefined){
1202
+ data30["name"] = coerced31;
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+ }
1208
+ }
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
+ }
1213
+ }
1214
+ var valid8 = _errs85 === errors;
1215
+ if(!valid8){
1216
+ break;
1217
+ }
1218
+ }
1219
+ }
1220
+ else {
1221
+ validate10.errors = [{instancePath:instancePath+"/constraints",schemaPath:"#/properties/constraints/type",keyword:"type",params:{type: "object"},message:"must be object"}];
1222
+ return false;
1223
+ }
1224
+ }
1225
+ var valid0 = _errs82 === errors;
1226
+ }
1227
+ else {
1228
+ var valid0 = true;
1229
+ }
1230
+ }
1231
+ }
1232
+ }
1233
+ }
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+ }
1240
+ }
1241
+ }
1242
+ }
1243
+ }
1244
+ }
1245
+ }
1246
+ }
1247
+ }
1248
+ }
1249
+ }
1250
+ }
1251
+ }
1252
+ }
1253
+ }
1254
+ }
1255
+ else {
1256
+ validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];
1257
+ return false;
1258
+ }
1259
+ }
1260
+ validate10.errors = vErrors;
1261
+ return errors === 0;
1262
+ }
1263
+
1264
+
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}}
1266
+ /* c8 ignore stop */