@zudojs/http 1.4.3 → 1.5.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/dist/httpAdapter/errorResponse/httpAdapterError.headers.d.ts +46 -0
- package/dist/httpAdapter/errorResponse/httpAdapterError.headers.js +68 -0
- package/dist/httpAdapter/errorResponse/httpAdapterError.issues.d.ts +11 -0
- package/dist/httpAdapter/errorResponse/httpAdapterError.issues.js +37 -0
- package/dist/httpAdapter/errorResponse/httpAdapterError.locate.d.ts +29 -0
- package/dist/httpAdapter/errorResponse/httpAdapterError.locate.js +74 -0
- package/dist/httpAdapter/{httpAdapter.errorResponse.d.ts → errorResponse/httpAdapterError.response.d.ts} +10 -5
- package/dist/httpAdapter/errorResponse/httpAdapterError.response.js +83 -0
- package/dist/httpAdapter/errorResponse/index.d.ts +10 -0
- package/dist/httpAdapter/errorResponse/index.js +10 -0
- package/dist/httpAdapter/fetch/httpFetch.body.d.ts +0 -1
- package/dist/httpAdapter/fetch/httpFetch.body.js +0 -1
- package/dist/httpAdapter/fetch/httpFetch.helper.d.ts +0 -1
- package/dist/httpAdapter/fetch/httpFetch.helper.js +0 -1
- package/dist/httpAdapter/fetch/httpFetch.requestContext.d.ts +0 -1
- package/dist/httpAdapter/fetch/httpFetch.requestContext.js +0 -1
- package/dist/httpAdapter/fetch/httpFetch.responseWriter.d.ts +0 -1
- package/dist/httpAdapter/fetch/httpFetch.responseWriter.js +0 -1
- package/dist/httpAdapter/fetch/httpFetch.type.d.ts +2 -2
- package/dist/httpAdapter/fetch/httpFetch.type.js +2 -2
- package/dist/httpAdapter/fetch/index.d.ts +0 -1
- package/dist/httpAdapter/fetch/index.js +0 -1
- package/dist/httpAdapter/http.adapter.d.ts +12 -1
- package/dist/httpAdapter/http.adapter.js +5 -3
- package/dist/httpAdapter/http.adapters.d.ts +0 -1
- package/dist/httpAdapter/http.adapters.js +0 -1
- package/dist/httpAdapter/httpAdapter.logger.d.ts +0 -1
- package/dist/httpAdapter/httpAdapter.logger.js +0 -1
- package/dist/httpAdapter/httpFetch.adapter.d.ts +0 -1
- package/dist/httpAdapter/httpFetch.adapter.js +0 -1
- package/dist/httpAdapter/index.d.ts +1 -1
- package/dist/httpAdapter/index.js +0 -1
- package/dist/httpAdapter/node/httpNode.adapter.d.ts +6 -2
- package/dist/httpAdapter/node/httpNode.adapter.js +33 -10
- package/dist/httpAdapter/node/httpNode.request.d.ts +0 -1
- package/dist/httpAdapter/node/httpNode.request.js +0 -1
- package/dist/httpAdapter/node/httpNode.response.d.ts +0 -1
- package/dist/httpAdapter/node/httpNode.response.js +0 -1
- package/dist/httpAdapter/node/httpNode.server.d.ts +0 -1
- package/dist/httpAdapter/node/httpNode.server.js +0 -1
- package/dist/httpAdapter/node/httpNode.type.d.ts +2 -2
- package/dist/httpAdapter/node/httpNode.type.js +2 -2
- package/dist/httpAdapter/node/index.d.ts +0 -1
- package/dist/httpAdapter/node/index.js +0 -1
- package/dist/httpAgent/http.agent.d.ts +0 -1
- package/dist/httpAgent/http.agent.js +0 -1
- package/dist/httpAgent/index.d.ts +0 -1
- package/dist/httpAgent/index.js +0 -1
- package/dist/httpBody/http.body.d.ts +0 -1
- package/dist/httpBody/http.body.js +0 -1
- package/dist/httpBody/httpBody.formData.d.ts +5 -2
- package/dist/httpBody/httpBody.formData.js +5 -2
- package/dist/httpBody/httpBody.parser.d.ts +0 -1
- package/dist/httpBody/httpBody.parser.js +0 -1
- package/dist/httpBody/index.d.ts +0 -1
- package/dist/httpBody/index.js +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.parse.d.ts +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.parse.js +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.type.d.ts +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.type.js +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.validation.d.ts +0 -1
- package/dist/httpCacheControl/core/httpCacheControl.validation.js +0 -1
- package/dist/httpCacheControl/core/index.d.ts +0 -1
- package/dist/httpCacheControl/core/index.js +0 -1
- package/dist/httpCacheControl/httpCacheControl.core.d.ts +0 -1
- package/dist/httpCacheControl/httpCacheControl.core.js +0 -1
- package/dist/httpCacheControl/httpCacheControl.factory.d.ts +0 -1
- package/dist/httpCacheControl/httpCacheControl.factory.js +0 -1
- package/dist/httpCacheControl/httpCacheControl.freshness.d.ts +0 -1
- package/dist/httpCacheControl/httpCacheControl.freshness.js +0 -1
- package/dist/httpCacheControl/httpCacheControl.requestHelper.d.ts +0 -1
- package/dist/httpCacheControl/httpCacheControl.requestHelper.js +0 -1
- package/dist/httpCacheControl/httpCacheControl.responseHelper.d.ts +0 -1
- package/dist/httpCacheControl/httpCacheControl.responseHelper.js +0 -1
- package/dist/httpCacheControl/index.d.ts +0 -1
- package/dist/httpCacheControl/index.js +0 -1
- package/dist/httpClient/httpClient.abort.d.ts +0 -1
- package/dist/httpClient/httpClient.abort.js +0 -1
- package/dist/httpClient/httpClient.body.d.ts +0 -1
- package/dist/httpClient/httpClient.body.js +0 -1
- package/dist/httpClient/httpClient.client.d.ts +0 -1
- package/dist/httpClient/httpClient.client.js +0 -1
- package/dist/httpClient/httpClient.context.d.ts +0 -1
- package/dist/httpClient/httpClient.context.js +0 -1
- package/dist/httpClient/httpClient.error.d.ts +0 -1
- package/dist/httpClient/httpClient.error.js +0 -1
- package/dist/httpClient/httpClient.errorNormalizer.d.ts +0 -1
- package/dist/httpClient/httpClient.errorNormalizer.js +0 -1
- package/dist/httpClient/httpClient.executor.d.ts +0 -1
- package/dist/httpClient/httpClient.executor.js +0 -1
- package/dist/httpClient/httpClient.factory.d.ts +0 -1
- package/dist/httpClient/httpClient.factory.js +0 -1
- package/dist/httpClient/httpClient.headers.d.ts +0 -1
- package/dist/httpClient/httpClient.headers.js +0 -1
- package/dist/httpClient/httpClient.helpers.d.ts +0 -1
- package/dist/httpClient/httpClient.helpers.js +0 -1
- package/dist/httpClient/httpClient.interceptors.d.ts +0 -1
- package/dist/httpClient/httpClient.interceptors.js +0 -1
- package/dist/httpClient/httpClient.methods.d.ts +0 -1
- package/dist/httpClient/httpClient.methods.js +0 -1
- package/dist/httpClient/httpClient.response.d.ts +0 -1
- package/dist/httpClient/httpClient.response.js +0 -1
- package/dist/httpClient/httpClient.retry.d.ts +0 -1
- package/dist/httpClient/httpClient.retry.js +0 -1
- package/dist/httpClient/httpClient.type.d.ts +0 -1
- package/dist/httpClient/httpClient.type.js +0 -1
- package/dist/httpClient/httpClient.typeGuards.d.ts +0 -1
- package/dist/httpClient/httpClient.typeGuards.js +0 -1
- package/dist/httpClient/httpClient.url.d.ts +0 -1
- package/dist/httpClient/httpClient.url.js +0 -1
- package/dist/httpClient/index.d.ts +2 -1
- package/dist/httpClient/index.js +2 -1
- package/dist/httpCompression/http.compression.d.ts +0 -1
- package/dist/httpCompression/http.compression.js +0 -1
- package/dist/httpCompression/index.d.ts +0 -1
- package/dist/httpCompression/index.js +0 -1
- package/dist/httpConditional/httpConditional.core.d.ts +0 -1
- package/dist/httpConditional/httpConditional.core.js +0 -1
- package/dist/httpConditional/index.d.ts +0 -1
- package/dist/httpConditional/index.js +0 -1
- package/dist/httpConstants/http.constants.d.ts +0 -1
- package/dist/httpConstants/http.constants.js +0 -1
- package/dist/httpConstants/index.d.ts +0 -1
- package/dist/httpConstants/index.js +0 -1
- package/dist/httpContentDisposition/httpContentDisposition.core.d.ts +0 -1
- package/dist/httpContentDisposition/httpContentDisposition.core.js +0 -1
- package/dist/httpContentDisposition/index.d.ts +0 -1
- package/dist/httpContentDisposition/index.js +0 -1
- package/dist/httpContentType/httpContentType.boundary.d.ts +0 -1
- package/dist/httpContentType/httpContentType.boundary.js +0 -1
- package/dist/httpContentType/httpContentType.category.d.ts +0 -1
- package/dist/httpContentType/httpContentType.category.js +0 -1
- package/dist/httpContentType/httpContentType.categoryBinary.d.ts +0 -1
- package/dist/httpContentType/httpContentType.categoryBinary.js +0 -1
- package/dist/httpContentType/httpContentType.charset.d.ts +0 -1
- package/dist/httpContentType/httpContentType.charset.js +0 -1
- package/dist/httpContentType/httpContentType.constructors.d.ts +0 -1
- package/dist/httpContentType/httpContentType.constructors.js +0 -1
- package/dist/httpContentType/httpContentType.formatter.d.ts +0 -1
- package/dist/httpContentType/httpContentType.formatter.js +0 -1
- package/dist/httpContentType/httpContentType.matcher.d.ts +0 -1
- package/dist/httpContentType/httpContentType.matcher.js +0 -1
- package/dist/httpContentType/httpContentType.mediaTypes.d.ts +0 -1
- package/dist/httpContentType/httpContentType.mediaTypes.js +0 -1
- package/dist/httpContentType/httpContentType.normalizer.d.ts +0 -1
- package/dist/httpContentType/httpContentType.normalizer.js +0 -1
- package/dist/httpContentType/httpContentType.parameter.d.ts +0 -1
- package/dist/httpContentType/httpContentType.parameter.js +0 -1
- package/dist/httpContentType/httpContentType.parser.d.ts +0 -1
- package/dist/httpContentType/httpContentType.parser.js +0 -1
- package/dist/httpContentType/httpContentType.parserHelpers.d.ts +0 -1
- package/dist/httpContentType/httpContentType.parserHelpers.js +0 -1
- package/dist/httpContentType/httpContentType.type.d.ts +0 -1
- package/dist/httpContentType/httpContentType.type.js +0 -1
- package/dist/httpContentType/index.d.ts +0 -1
- package/dist/httpContentType/index.js +0 -1
- package/dist/httpContext/http.context.d.ts +0 -1
- package/dist/httpContext/http.context.js +0 -1
- package/dist/httpContext/index.d.ts +0 -1
- package/dist/httpContext/index.js +0 -1
- package/dist/httpCookies/http.cookies.d.ts +0 -1
- package/dist/httpCookies/http.cookies.js +0 -1
- package/dist/httpCookies/httpCookies.defaults.d.ts +0 -1
- package/dist/httpCookies/httpCookies.defaults.js +0 -1
- package/dist/httpCookies/index.d.ts +0 -1
- package/dist/httpCookies/index.js +0 -1
- package/dist/httpCors/http.cors.d.ts +0 -1
- package/dist/httpCors/http.cors.js +0 -1
- package/dist/httpCors/index.d.ts +0 -1
- package/dist/httpCors/index.js +0 -1
- package/dist/httpCsp/checks/httpCsp.checks.d.ts +0 -1
- package/dist/httpCsp/checks/httpCsp.checks.js +0 -1
- package/dist/httpCsp/checks/index.d.ts +0 -1
- package/dist/httpCsp/checks/index.js +0 -1
- package/dist/httpCsp/formatting/httpCsp.formatting.d.ts +0 -1
- package/dist/httpCsp/formatting/httpCsp.formatting.js +0 -1
- package/dist/httpCsp/formatting/index.d.ts +0 -1
- package/dist/httpCsp/formatting/index.js +0 -1
- package/dist/httpCsp/index.d.ts +0 -1
- package/dist/httpCsp/index.js +0 -1
- package/dist/httpCsp/internal/httpCsp.internal.d.ts +0 -1
- package/dist/httpCsp/internal/httpCsp.internal.js +0 -1
- package/dist/httpCsp/internal/index.d.ts +0 -1
- package/dist/httpCsp/internal/index.js +0 -1
- package/dist/httpCsp/nonce/httpCsp.nonce.d.ts +0 -1
- package/dist/httpCsp/nonce/httpCsp.nonce.js +0 -1
- package/dist/httpCsp/nonce/index.d.ts +0 -1
- package/dist/httpCsp/nonce/index.js +0 -1
- package/dist/httpCsp/parsing/httpCsp.parsing.d.ts +0 -1
- package/dist/httpCsp/parsing/httpCsp.parsing.js +0 -1
- package/dist/httpCsp/parsing/index.d.ts +0 -1
- package/dist/httpCsp/parsing/index.js +0 -1
- package/dist/httpCsp/policies/httpCsp.policies.d.ts +0 -1
- package/dist/httpCsp/policies/httpCsp.policies.js +0 -1
- package/dist/httpCsp/policies/index.d.ts +0 -1
- package/dist/httpCsp/policies/index.js +0 -1
- package/dist/httpCsp/reportOnly/httpCsp.reportOnly.d.ts +0 -1
- package/dist/httpCsp/reportOnly/httpCsp.reportOnly.js +0 -1
- package/dist/httpCsp/reportOnly/index.d.ts +0 -1
- package/dist/httpCsp/reportOnly/index.js +0 -1
- package/dist/httpCsp/sources/httpCsp.sources.d.ts +0 -1
- package/dist/httpCsp/sources/httpCsp.sources.js +0 -1
- package/dist/httpCsp/sources/index.d.ts +0 -1
- package/dist/httpCsp/sources/index.js +0 -1
- package/dist/httpCsp/types/httpCsp.constant.d.ts +0 -1
- package/dist/httpCsp/types/httpCsp.constant.js +0 -1
- package/dist/httpCsp/types/httpCsp.type.d.ts +0 -1
- package/dist/httpCsp/types/httpCsp.type.js +0 -1
- package/dist/httpCsp/types/index.d.ts +0 -1
- package/dist/httpCsp/types/index.js +0 -1
- package/dist/httpCsp/validation/httpCsp.validate.d.ts +0 -1
- package/dist/httpCsp/validation/httpCsp.validate.js +0 -1
- package/dist/httpCsp/validation/httpCsp.validation.d.ts +0 -1
- package/dist/httpCsp/validation/httpCsp.validation.js +0 -1
- package/dist/httpCsp/validation/index.d.ts +0 -1
- package/dist/httpCsp/validation/index.js +0 -1
- package/dist/httpErrors/factories/httpError.clientError.d.ts +0 -1
- package/dist/httpErrors/factories/httpError.clientError.js +0 -1
- package/dist/httpErrors/factories/httpError.serverError.d.ts +10 -6
- package/dist/httpErrors/factories/httpError.serverError.js +22 -6
- package/dist/httpErrors/httpError.base.d.ts +0 -1
- package/dist/httpErrors/httpError.base.js +0 -1
- package/dist/httpErrors/httpError.helper.d.ts +0 -1
- package/dist/httpErrors/httpError.helper.js +0 -1
- package/dist/httpErrors/httpError.invalidJson.d.ts +0 -1
- package/dist/httpErrors/httpError.invalidJson.js +0 -1
- package/dist/httpErrors/httpError.type.d.ts +0 -1
- package/dist/httpErrors/httpError.type.js +0 -1
- package/dist/httpErrors/httpError.typeGuard.d.ts +0 -1
- package/dist/httpErrors/httpError.typeGuard.js +0 -1
- package/dist/httpErrors/httpError.util.d.ts +0 -1
- package/dist/httpErrors/httpError.util.js +0 -1
- package/dist/httpErrors/index.d.ts +0 -1
- package/dist/httpErrors/index.js +0 -1
- package/dist/httpFetchMount/httpFetchMount.core.d.ts +0 -1
- package/dist/httpFetchMount/httpFetchMount.core.js +0 -1
- package/dist/httpFetchMount/httpFetchMount.request.d.ts +0 -1
- package/dist/httpFetchMount/httpFetchMount.request.js +0 -1
- package/dist/httpFetchMount/httpFetchMount.type.d.ts +0 -1
- package/dist/httpFetchMount/httpFetchMount.type.js +0 -1
- package/dist/httpFetchMount/index.d.ts +0 -1
- package/dist/httpFetchMount/index.js +0 -1
- package/dist/httpFormData/index.d.ts +0 -1
- package/dist/httpFormData/index.js +0 -1
- package/dist/httpHeaders/authorization/httpHeaders.authorization.d.ts +0 -1
- package/dist/httpHeaders/authorization/httpHeaders.authorization.js +0 -1
- package/dist/httpHeaders/authorization/index.d.ts +0 -1
- package/dist/httpHeaders/authorization/index.js +0 -1
- package/dist/httpHeaders/basic/httpHeaders.basic.d.ts +0 -1
- package/dist/httpHeaders/basic/httpHeaders.basic.js +0 -1
- package/dist/httpHeaders/basic/httpHeaders.basicMatch.d.ts +0 -1
- package/dist/httpHeaders/basic/httpHeaders.basicMatch.js +0 -1
- package/dist/httpHeaders/basic/index.d.ts +0 -1
- package/dist/httpHeaders/basic/index.js +0 -1
- package/dist/httpHeaders/conversion/httpHeaders.conversion.d.ts +0 -1
- package/dist/httpHeaders/conversion/httpHeaders.conversion.js +0 -1
- package/dist/httpHeaders/conversion/httpHeaders.conversionObject.d.ts +0 -1
- package/dist/httpHeaders/conversion/httpHeaders.conversionObject.js +0 -1
- package/dist/httpHeaders/conversion/index.d.ts +0 -1
- package/dist/httpHeaders/conversion/index.js +0 -1
- package/dist/httpHeaders/etag/httpHeaders.etag.d.ts +0 -1
- package/dist/httpHeaders/etag/httpHeaders.etag.js +0 -1
- package/dist/httpHeaders/etag/httpHeaders.etagMatch.d.ts +0 -1
- package/dist/httpHeaders/etag/httpHeaders.etagMatch.js +0 -1
- package/dist/httpHeaders/etag/index.d.ts +0 -1
- package/dist/httpHeaders/etag/index.js +0 -1
- package/dist/httpHeaders/forwarded/httpHeaders.forwarded.d.ts +0 -1
- package/dist/httpHeaders/forwarded/httpHeaders.forwarded.js +0 -1
- package/dist/httpHeaders/forwarded/index.d.ts +0 -1
- package/dist/httpHeaders/forwarded/index.js +0 -1
- package/dist/httpHeaders/http.headers.d.ts +0 -1
- package/dist/httpHeaders/http.headers.js +0 -1
- package/dist/httpHeaders/index.d.ts +0 -1
- package/dist/httpHeaders/index.js +0 -1
- package/dist/httpHeaders/internal/httpHeaders.internal.typeGuards.d.ts +0 -1
- package/dist/httpHeaders/internal/httpHeaders.internal.typeGuards.js +0 -1
- package/dist/httpHeaders/internal/index.d.ts +0 -1
- package/dist/httpHeaders/internal/index.js +0 -1
- package/dist/httpHeaders/list/httpHeaders.list.d.ts +0 -1
- package/dist/httpHeaders/list/httpHeaders.list.js +0 -1
- package/dist/httpHeaders/list/httpHeaders.listMutation.d.ts +0 -1
- package/dist/httpHeaders/list/httpHeaders.listMutation.js +0 -1
- package/dist/httpHeaders/list/index.d.ts +0 -1
- package/dist/httpHeaders/list/index.js +0 -1
- package/dist/httpHeaders/security/httpHeaders.security.d.ts +0 -1
- package/dist/httpHeaders/security/httpHeaders.security.js +0 -1
- package/dist/httpHeaders/security/index.d.ts +0 -1
- package/dist/httpHeaders/security/index.js +0 -1
- package/dist/httpHeaders/types/httpHeaders.type.d.ts +0 -1
- package/dist/httpHeaders/types/httpHeaders.type.js +0 -1
- package/dist/httpHeaders/types/index.d.ts +0 -1
- package/dist/httpHeaders/types/index.js +0 -1
- package/dist/httpHsts/http.hsts.d.ts +0 -1
- package/dist/httpHsts/http.hsts.js +0 -1
- package/dist/httpHsts/index.d.ts +0 -1
- package/dist/httpHsts/index.js +0 -1
- package/dist/httpInterceptors/builtin/httpInterceptor.request.d.ts +0 -1
- package/dist/httpInterceptors/builtin/httpInterceptor.request.js +0 -1
- package/dist/httpInterceptors/builtin/httpInterceptor.response.d.ts +0 -1
- package/dist/httpInterceptors/builtin/httpInterceptor.response.js +0 -1
- package/dist/httpInterceptors/builtin/index.d.ts +0 -1
- package/dist/httpInterceptors/builtin/index.js +0 -1
- package/dist/httpInterceptors/http.interceptors.d.ts +0 -1
- package/dist/httpInterceptors/http.interceptors.js +0 -1
- package/dist/httpInterceptors/httpInterceptor.helper.d.ts +0 -1
- package/dist/httpInterceptors/httpInterceptor.helper.js +0 -1
- package/dist/httpInterceptors/httpInterceptor.type.d.ts +0 -1
- package/dist/httpInterceptors/httpInterceptor.type.js +0 -1
- package/dist/httpInterceptors/index.d.ts +0 -1
- package/dist/httpInterceptors/index.js +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.lookup.d.ts +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.lookup.js +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.manager.d.ts +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.manager.js +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.registration.d.ts +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.registration.js +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.snapshot.d.ts +0 -1
- package/dist/httpInterceptors/manager/httpInterceptor.snapshot.js +0 -1
- package/dist/httpInterceptors/manager/index.d.ts +0 -1
- package/dist/httpInterceptors/manager/index.js +0 -1
- package/dist/httpKeepAlive/httpKeepAlive.core.d.ts +0 -1
- package/dist/httpKeepAlive/httpKeepAlive.core.js +0 -1
- package/dist/httpKeepAlive/index.d.ts +0 -1
- package/dist/httpKeepAlive/index.js +0 -1
- package/dist/httpMethods/http.methods.d.ts +0 -1
- package/dist/httpMethods/http.methods.js +0 -1
- package/dist/httpMethods/index.d.ts +0 -1
- package/dist/httpMethods/index.js +0 -1
- package/dist/httpMiddleware/builtin/compose/httpMiddleware.compose.d.ts +0 -1
- package/dist/httpMiddleware/builtin/compose/httpMiddleware.compose.js +0 -1
- package/dist/httpMiddleware/builtin/compose/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/compose/index.js +0 -1
- package/dist/httpMiddleware/builtin/conditional/httpMiddleware.conditional.d.ts +0 -1
- package/dist/httpMiddleware/builtin/conditional/httpMiddleware.conditional.js +0 -1
- package/dist/httpMiddleware/builtin/conditional/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/conditional/index.js +0 -1
- package/dist/httpMiddleware/builtin/cors/httpMiddleware.cors.d.ts +0 -1
- package/dist/httpMiddleware/builtin/cors/httpMiddleware.cors.js +0 -1
- package/dist/httpMiddleware/builtin/cors/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/cors/index.js +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.accessor.d.ts +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.accessor.js +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.contextHelper.d.ts +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.contextHelper.js +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.media.d.ts +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.media.js +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.response.d.ts +0 -1
- package/dist/httpMiddleware/builtin/helpers/httpMiddleware.response.js +0 -1
- package/dist/httpMiddleware/builtin/helpers/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/helpers/index.js +0 -1
- package/dist/httpMiddleware/builtin/image/httpMiddleware.image.d.ts +0 -1
- package/dist/httpMiddleware/builtin/image/httpMiddleware.image.js +0 -1
- package/dist/httpMiddleware/builtin/image/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/image/index.js +0 -1
- package/dist/httpMiddleware/builtin/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/index.js +0 -1
- package/dist/httpMiddleware/builtin/logging/httpMiddleware.logging.d.ts +0 -1
- package/dist/httpMiddleware/builtin/logging/httpMiddleware.logging.js +0 -1
- package/dist/httpMiddleware/builtin/logging/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/logging/index.js +0 -1
- package/dist/httpMiddleware/builtin/rateLimit/httpMiddleware.rateLimit.d.ts +3 -3
- package/dist/httpMiddleware/builtin/rateLimit/httpMiddleware.rateLimit.js +33 -4
- package/dist/httpMiddleware/builtin/rateLimit/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/rateLimit/index.js +0 -1
- package/dist/httpMiddleware/builtin/security/httpMiddleware.security.d.ts +0 -1
- package/dist/httpMiddleware/builtin/security/httpMiddleware.security.js +0 -1
- package/dist/httpMiddleware/builtin/security/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/security/index.js +0 -1
- package/dist/httpMiddleware/builtin/static/httpMiddleware.static.d.ts +0 -1
- package/dist/httpMiddleware/builtin/static/httpMiddleware.static.js +0 -1
- package/dist/httpMiddleware/builtin/static/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/static/index.js +0 -1
- package/dist/httpMiddleware/builtin/timing/httpMiddleware.timing.d.ts +0 -1
- package/dist/httpMiddleware/builtin/timing/httpMiddleware.timing.js +0 -1
- package/dist/httpMiddleware/builtin/timing/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/timing/index.js +0 -1
- package/dist/httpMiddleware/builtin/video/httpMiddleware.video.d.ts +0 -1
- package/dist/httpMiddleware/builtin/video/httpMiddleware.video.js +0 -1
- package/dist/httpMiddleware/builtin/video/httpMiddleware.video.options.d.ts +0 -1
- package/dist/httpMiddleware/builtin/video/httpMiddleware.video.options.js +0 -1
- package/dist/httpMiddleware/builtin/video/index.d.ts +0 -1
- package/dist/httpMiddleware/builtin/video/index.js +0 -1
- package/dist/httpMiddleware/httpMiddleware.error.d.ts +0 -1
- package/dist/httpMiddleware/httpMiddleware.error.js +0 -1
- package/dist/httpMiddleware/httpMiddleware.state.d.ts +0 -1
- package/dist/httpMiddleware/httpMiddleware.state.js +0 -1
- package/dist/httpMiddleware/httpMiddleware.type.d.ts +0 -1
- package/dist/httpMiddleware/httpMiddleware.type.js +0 -1
- package/dist/httpMiddleware/index.d.ts +0 -1
- package/dist/httpMiddleware/index.js +0 -1
- package/dist/httpMiddleware/pipeline/httpMiddleware.pipeline.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/httpMiddleware.pipeline.js +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.execution.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.execution.js +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.guardResponse.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.guardResponse.js +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.helper.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.helper.js +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.registration.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/httpPipeline.registration.js +0 -1
- package/dist/httpMiddleware/pipeline/index.d.ts +0 -1
- package/dist/httpMiddleware/pipeline/index.js +0 -1
- package/dist/httpMime/http.mime.d.ts +0 -1
- package/dist/httpMime/http.mime.js +0 -1
- package/dist/httpMime/httpMime.sniff.d.ts +31 -0
- package/dist/httpMime/httpMime.sniff.js +90 -0
- package/dist/httpMime/index.d.ts +1 -1
- package/dist/httpMime/index.js +1 -1
- package/dist/httpMultipart/http.multipart.d.ts +0 -1
- package/dist/httpMultipart/http.multipart.js +0 -1
- package/dist/httpMultipart/index.d.ts +0 -1
- package/dist/httpMultipart/index.js +0 -1
- package/dist/httpNegotiation/httpNegotiation.core.d.ts +0 -1
- package/dist/httpNegotiation/httpNegotiation.core.js +0 -1
- package/dist/httpNegotiation/index.d.ts +0 -1
- package/dist/httpNegotiation/index.js +0 -1
- package/dist/httpOpenApi/httpOpenApi.document.d.ts +0 -1
- package/dist/httpOpenApi/httpOpenApi.document.js +0 -1
- package/dist/httpOpenApi/httpOpenApi.mount.d.ts +2 -2
- package/dist/httpOpenApi/httpOpenApi.mount.js +7 -3
- package/dist/httpOpenApi/httpOpenApi.type.d.ts +5 -2
- package/dist/httpOpenApi/httpOpenApi.type.js +0 -1
- package/dist/httpOpenApi/index.d.ts +0 -1
- package/dist/httpOpenApi/index.js +0 -1
- package/dist/httpOpenApi/routeTable/index.d.ts +0 -1
- package/dist/httpOpenApi/routeTable/index.js +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.collect.d.ts +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.collect.js +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.merge.d.ts +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.merge.js +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.template.d.ts +0 -1
- package/dist/httpOpenApi/routeTable/routeTable.template.js +0 -1
- package/dist/httpProtocol/http.protocol.d.ts +0 -1
- package/dist/httpProtocol/http.protocol.js +0 -1
- package/dist/httpProtocol/index.d.ts +0 -1
- package/dist/httpProtocol/index.js +0 -1
- package/dist/httpProxy/http.proxy.d.ts +0 -1
- package/dist/httpProxy/http.proxy.js +0 -1
- package/dist/httpProxy/httpProxy.pathGuard.d.ts +0 -1
- package/dist/httpProxy/httpProxy.pathGuard.js +0 -1
- package/dist/httpProxy/index.d.ts +0 -1
- package/dist/httpProxy/index.js +0 -1
- package/dist/httpQuery/index.d.ts +0 -1
- package/dist/httpQuery/index.js +0 -1
- package/dist/httpQuery/queryParse/index.d.ts +0 -1
- package/dist/httpQuery/queryParse/index.js +0 -1
- package/dist/httpQuery/queryParse/queryParse.flat.d.ts +0 -1
- package/dist/httpQuery/queryParse/queryParse.flat.js +0 -1
- package/dist/httpQuery/queryParse/queryParse.nested.d.ts +0 -1
- package/dist/httpQuery/queryParse/queryParse.nested.js +0 -1
- package/dist/httpQuery/queryParse/queryParse.tokenizer.d.ts +0 -1
- package/dist/httpQuery/queryParse/queryParse.tokenizer.js +0 -1
- package/dist/httpQuery/queryRequest/index.d.ts +0 -1
- package/dist/httpQuery/queryRequest/index.js +0 -1
- package/dist/httpQuery/queryRequest/query.request.d.ts +0 -1
- package/dist/httpQuery/queryRequest/query.request.js +0 -1
- package/dist/httpQuery/querySerialize/index.d.ts +0 -1
- package/dist/httpQuery/querySerialize/index.js +0 -1
- package/dist/httpQuery/querySerialize/query.util.d.ts +0 -1
- package/dist/httpQuery/querySerialize/query.util.js +0 -1
- package/dist/httpQuery/querySerialize/querySerialize.core.d.ts +0 -1
- package/dist/httpQuery/querySerialize/querySerialize.core.js +0 -1
- package/dist/httpQuery/queryTypes/index.d.ts +0 -1
- package/dist/httpQuery/queryTypes/index.js +0 -1
- package/dist/httpQuery/queryTypes/query.container.d.ts +0 -1
- package/dist/httpQuery/queryTypes/query.container.js +0 -1
- package/dist/httpQuery/queryTypes/query.limit.d.ts +0 -1
- package/dist/httpQuery/queryTypes/query.limit.js +0 -1
- package/dist/httpQuery/queryTypes/query.type.d.ts +0 -1
- package/dist/httpQuery/queryTypes/query.type.js +0 -1
- package/dist/httpRange/http.range.d.ts +0 -1
- package/dist/httpRange/http.range.js +0 -1
- package/dist/httpRange/index.d.ts +0 -1
- package/dist/httpRange/index.js +0 -1
- package/dist/httpRedirect/http.redirect.d.ts +0 -1
- package/dist/httpRedirect/http.redirect.js +0 -1
- package/dist/httpRedirect/index.d.ts +0 -1
- package/dist/httpRedirect/index.js +0 -1
- package/dist/httpRequest/http.request.d.ts +0 -1
- package/dist/httpRequest/http.request.js +12 -2
- package/dist/httpRequest/httpRequest.context.constant.d.ts +0 -1
- package/dist/httpRequest/httpRequest.context.constant.js +0 -1
- package/dist/httpRequest/httpRequest.context.d.ts +0 -1
- package/dist/httpRequest/httpRequest.context.id.d.ts +0 -1
- package/dist/httpRequest/httpRequest.context.id.js +0 -1
- package/dist/httpRequest/httpRequest.context.js +15 -2
- package/dist/httpRequest/httpRequest.context.type.d.ts +0 -1
- package/dist/httpRequest/httpRequest.context.type.js +0 -1
- package/dist/httpRequest/index.d.ts +0 -1
- package/dist/httpRequest/index.js +0 -1
- package/dist/httpRequest/requestId/httpRequest.requestId.d.ts +0 -1
- package/dist/httpRequest/requestId/httpRequest.requestId.js +0 -1
- package/dist/httpRequest/requestId/index.d.ts +0 -1
- package/dist/httpRequest/requestId/index.js +0 -1
- package/dist/httpRequest/target/httpRequest.target.d.ts +0 -1
- package/dist/httpRequest/target/httpRequest.target.js +0 -1
- package/dist/httpRequest/target/index.d.ts +0 -1
- package/dist/httpRequest/target/index.js +0 -1
- package/dist/httpResponse/core/httpResponse.statusText.d.ts +0 -1
- package/dist/httpResponse/core/httpResponse.statusText.js +0 -1
- package/dist/httpResponse/core/httpResponse.type.d.ts +0 -1
- package/dist/httpResponse/core/httpResponse.type.js +0 -1
- package/dist/httpResponse/core/index.d.ts +0 -1
- package/dist/httpResponse/core/index.js +0 -1
- package/dist/httpResponse/http.response.d.ts +0 -1
- package/dist/httpResponse/http.response.js +0 -1
- package/dist/httpResponse/httpResponse.context.d.ts +0 -1
- package/dist/httpResponse/httpResponse.context.js +0 -1
- package/dist/httpResponse/httpResponse.fromWeb.d.ts +0 -1
- package/dist/httpResponse/httpResponse.fromWeb.js +0 -1
- package/dist/httpResponse/httpResponse.helper.d.ts +0 -1
- package/dist/httpResponse/httpResponse.helper.js +0 -1
- package/dist/httpResponse/httpResponse.writer.d.ts +0 -1
- package/dist/httpResponse/httpResponse.writer.js +0 -1
- package/dist/httpResponse/index.d.ts +0 -1
- package/dist/httpResponse/index.js +0 -1
- package/dist/httpRouter/core/error/httpRouter.error.d.ts +0 -1
- package/dist/httpRouter/core/error/httpRouter.error.js +0 -1
- package/dist/httpRouter/core/error/index.d.ts +0 -1
- package/dist/httpRouter/core/error/index.js +0 -1
- package/dist/httpRouter/core/factory/httpRoute.factory.base.d.ts +0 -1
- package/dist/httpRouter/core/factory/httpRoute.factory.base.js +24 -22
- package/dist/httpRouter/core/factory/httpRoute.factory.d.ts +7 -1
- package/dist/httpRouter/core/factory/httpRoute.factory.js +36 -13
- package/dist/httpRouter/core/factory/index.d.ts +0 -1
- package/dist/httpRouter/core/factory/index.js +0 -1
- package/dist/httpRouter/core/group/httpRouterGroup.core.d.ts +0 -1
- package/dist/httpRouter/core/group/httpRouterGroup.core.js +0 -1
- package/dist/httpRouter/core/group/index.d.ts +0 -1
- package/dist/httpRouter/core/group/index.js +0 -1
- package/dist/httpRouter/core/index.d.ts +0 -1
- package/dist/httpRouter/core/index.js +0 -1
- package/dist/httpRouter/core/register/httpRouter.register.d.ts +15 -1
- package/dist/httpRouter/core/register/httpRouter.register.js +124 -26
- package/dist/httpRouter/core/register/httpRouter.shadow.d.ts +18 -0
- package/dist/httpRouter/core/register/httpRouter.shadow.js +91 -0
- package/dist/httpRouter/core/register/index.d.ts +1 -1
- package/dist/httpRouter/core/register/index.js +1 -1
- package/dist/httpRouter/core/registry/core/httpRegistry.helper.d.ts +0 -1
- package/dist/httpRouter/core/registry/core/httpRegistry.helper.js +0 -1
- package/dist/httpRouter/core/registry/core/httpRegistry.type.d.ts +0 -1
- package/dist/httpRouter/core/registry/core/httpRegistry.type.js +0 -1
- package/dist/httpRouter/core/registry/core/index.d.ts +0 -1
- package/dist/httpRouter/core/registry/core/index.js +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.core.d.ts +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.core.js +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.factory.d.ts +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.factory.js +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.group.d.ts +0 -1
- package/dist/httpRouter/core/registry/httpRegistry.group.js +0 -1
- package/dist/httpRouter/core/registry/index.d.ts +0 -1
- package/dist/httpRouter/core/registry/index.js +0 -1
- package/dist/httpRouter/core/types/httpRouter.type.d.ts +27 -1
- package/dist/httpRouter/core/types/httpRouter.type.js +0 -1
- package/dist/httpRouter/core/types/index.d.ts +0 -1
- package/dist/httpRouter/core/types/index.js +0 -1
- package/dist/httpRouter/core/util/httpRoute.util.d.ts +0 -1
- package/dist/httpRouter/core/util/httpRoute.util.js +0 -1
- package/dist/httpRouter/core/util/index.d.ts +0 -1
- package/dist/httpRouter/core/util/index.js +0 -1
- package/dist/httpRouter/dispatch/httpRoute.dispatcher.d.ts +0 -1
- package/dist/httpRouter/dispatch/httpRoute.dispatcher.js +0 -1
- package/dist/httpRouter/dispatch/httpRoute.stack.d.ts +0 -1
- package/dist/httpRouter/dispatch/httpRoute.stack.js +0 -1
- package/dist/httpRouter/dispatch/index.d.ts +0 -1
- package/dist/httpRouter/dispatch/index.js +0 -1
- package/dist/httpRouter/httpRouter.context.d.ts +0 -1
- package/dist/httpRouter/httpRouter.context.js +0 -1
- package/dist/httpRouter/httpRouter.state.d.ts +0 -1
- package/dist/httpRouter/httpRouter.state.js +0 -1
- package/dist/httpRouter/index.d.ts +0 -1
- package/dist/httpRouter/index.js +0 -1
- package/dist/httpRouter/matching/httpRoute.matcher.core.d.ts +0 -1
- package/dist/httpRouter/matching/httpRoute.matcher.core.js +0 -1
- package/dist/httpRouter/matching/httpRoute.matcher.d.ts +0 -1
- package/dist/httpRouter/matching/httpRoute.matcher.js +0 -1
- package/dist/httpRouter/matching/index.d.ts +0 -1
- package/dist/httpRouter/matching/index.js +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.compilation.d.ts +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.compilation.js +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.matching.d.ts +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.matching.js +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.regexBuilding.d.ts +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.regexBuilding.js +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.segmentParsing.d.ts +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.segmentParsing.js +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.type.d.ts +0 -1
- package/dist/httpRouter/pattern/core/httpPattern.type.js +0 -1
- package/dist/httpRouter/pattern/core/index.d.ts +0 -1
- package/dist/httpRouter/pattern/core/index.js +0 -1
- package/dist/httpRouter/pattern/httpPattern.factory.d.ts +0 -1
- package/dist/httpRouter/pattern/httpPattern.factory.js +0 -1
- package/dist/httpRouter/pattern/httpRoute.pattern.parse.d.ts +18 -1
- package/dist/httpRouter/pattern/httpRoute.pattern.parse.js +51 -13
- package/dist/httpRouter/pattern/index.d.ts +0 -1
- package/dist/httpRouter/pattern/index.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.builder.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.builder.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.class.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.class.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.error.4xx.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.error.4xx.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.error.5xx.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.error.5xx.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.factory.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.factory.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.guard.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.guard.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.normalize.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.normalize.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.output.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.output.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.serialize.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.serialize.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.type.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.type.js +0 -1
- package/dist/httpRouter/result/httpRoute.result.util.d.ts +0 -1
- package/dist/httpRouter/result/httpRoute.result.util.js +0 -1
- package/dist/httpRouter/result/index.d.ts +0 -1
- package/dist/httpRouter/result/index.js +0 -1
- package/dist/httpRouter/tree/core/httpTree.enumerate.d.ts +21 -0
- package/dist/httpRouter/tree/core/httpTree.enumerate.js +43 -0
- package/dist/httpRouter/tree/core/httpTree.helper.d.ts +2 -3
- package/dist/httpRouter/tree/core/httpTree.helper.js +11 -10
- package/dist/httpRouter/tree/core/httpTree.nodeCreation.d.ts +15 -1
- package/dist/httpRouter/tree/core/httpTree.nodeCreation.js +58 -34
- package/dist/httpRouter/tree/core/httpTree.traversal.d.ts +15 -14
- package/dist/httpRouter/tree/core/httpTree.traversal.js +46 -48
- package/dist/httpRouter/tree/core/httpTree.type.d.ts +7 -6
- package/dist/httpRouter/tree/core/httpTree.type.js +0 -1
- package/dist/httpRouter/tree/core/index.d.ts +1 -1
- package/dist/httpRouter/tree/core/index.js +1 -1
- package/dist/httpRouter/tree/httpTree.core.d.ts +7 -3
- package/dist/httpRouter/tree/httpTree.core.js +17 -19
- package/dist/httpRouter/tree/httpTree.factory.d.ts +0 -1
- package/dist/httpRouter/tree/httpTree.factory.js +0 -1
- package/dist/httpRouter/tree/index.d.ts +0 -1
- package/dist/httpRouter/tree/index.js +0 -1
- package/dist/httpSecurity/httpSecurity.config.d.ts +10 -2
- package/dist/httpSecurity/httpSecurity.config.js +10 -2
- package/dist/httpSecurity/httpSecurity.guard.d.ts +0 -1
- package/dist/httpSecurity/httpSecurity.guard.js +14 -2
- package/dist/httpSecurity/httpSecurity.nodeGuard.d.ts +0 -1
- package/dist/httpSecurity/httpSecurity.nodeGuard.js +0 -1
- package/dist/httpSecurity/httpSecurity.validator.d.ts +0 -1
- package/dist/httpSecurity/httpSecurity.validator.js +0 -1
- package/dist/httpSecurity/index.d.ts +1 -2
- package/dist/httpSecurity/index.js +1 -2
- package/dist/httpSecurityHeaders/core/httpSecurityHeader.type.d.ts +0 -1
- package/dist/httpSecurityHeaders/core/httpSecurityHeader.type.js +0 -1
- package/dist/httpSecurityHeaders/core/httpSecurityHeader.validation.d.ts +0 -1
- package/dist/httpSecurityHeaders/core/httpSecurityHeader.validation.js +0 -1
- package/dist/httpSecurityHeaders/core/index.d.ts +0 -1
- package/dist/httpSecurityHeaders/core/index.js +0 -1
- package/dist/httpSecurityHeaders/httpSecurity.headers.d.ts +0 -1
- package/dist/httpSecurityHeaders/httpSecurity.headers.js +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.factory.d.ts +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.factory.js +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.individual.d.ts +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.individual.js +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.permissionsPolicy.d.ts +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.permissionsPolicy.js +0 -1
- package/dist/httpSecurityHeaders/httpSecurityHeader.recommended.d.ts +8 -2
- package/dist/httpSecurityHeaders/httpSecurityHeader.recommended.js +11 -4
- package/dist/httpSecurityHeaders/index.d.ts +0 -1
- package/dist/httpSecurityHeaders/index.js +0 -1
- package/dist/httpServer/core/httpServer.core.d.ts +0 -1
- package/dist/httpServer/core/httpServer.core.js +0 -1
- package/dist/httpServer/core/index.d.ts +0 -1
- package/dist/httpServer/core/index.js +0 -1
- package/dist/httpServer/factory/httpServer.factory.d.ts +0 -1
- package/dist/httpServer/factory/httpServer.factory.js +0 -1
- package/dist/httpServer/factory/index.d.ts +0 -1
- package/dist/httpServer/factory/index.js +0 -1
- package/dist/httpServer/index.d.ts +0 -1
- package/dist/httpServer/index.js +0 -1
- package/dist/httpServer/manager/httpServer.manager.d.ts +0 -1
- package/dist/httpServer/manager/httpServer.manager.js +0 -1
- package/dist/httpServer/manager/index.d.ts +0 -1
- package/dist/httpServer/manager/index.js +0 -1
- package/dist/httpServer/types/httpServer.type.d.ts +0 -1
- package/dist/httpServer/types/httpServer.type.js +0 -1
- package/dist/httpStatus/httpStatus.categoryPredicate.d.ts +0 -1
- package/dist/httpStatus/httpStatus.categoryPredicate.js +0 -1
- package/dist/httpStatus/httpStatus.clientErrorConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.clientErrorConstant.js +0 -1
- package/dist/httpStatus/httpStatus.clientErrorTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.clientErrorTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.collection.d.ts +0 -1
- package/dist/httpStatus/httpStatus.collection.js +0 -1
- package/dist/httpStatus/httpStatus.commonPredicate.d.ts +0 -1
- package/dist/httpStatus/httpStatus.commonPredicate.js +0 -1
- package/dist/httpStatus/httpStatus.constant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.constant.js +0 -1
- package/dist/httpStatus/httpStatus.errorPredicate.d.ts +0 -1
- package/dist/httpStatus/httpStatus.errorPredicate.js +0 -1
- package/dist/httpStatus/httpStatus.info.d.ts +0 -1
- package/dist/httpStatus/httpStatus.info.js +0 -1
- package/dist/httpStatus/httpStatus.informationalSuccessConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.informationalSuccessConstant.js +0 -1
- package/dist/httpStatus/httpStatus.informationalSuccessTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.informationalSuccessTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.lookup.d.ts +0 -1
- package/dist/httpStatus/httpStatus.lookup.js +0 -1
- package/dist/httpStatus/httpStatus.name.d.ts +0 -1
- package/dist/httpStatus/httpStatus.name.js +0 -1
- package/dist/httpStatus/httpStatus.predicate.d.ts +0 -1
- package/dist/httpStatus/httpStatus.predicate.js +0 -1
- package/dist/httpStatus/httpStatus.redirectErrorConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.redirectErrorConstant.js +0 -1
- package/dist/httpStatus/httpStatus.redirectErrorTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.redirectErrorTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.redirectPredicate.d.ts +0 -1
- package/dist/httpStatus/httpStatus.redirectPredicate.js +0 -1
- package/dist/httpStatus/httpStatus.redirectionConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.redirectionConstant.js +0 -1
- package/dist/httpStatus/httpStatus.redirectionTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.redirectionTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.semantics.d.ts +0 -1
- package/dist/httpStatus/httpStatus.semantics.js +0 -1
- package/dist/httpStatus/httpStatus.serverErrorConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.serverErrorConstant.js +0 -1
- package/dist/httpStatus/httpStatus.serverErrorTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.serverErrorTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.statusConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.statusConstant.js +0 -1
- package/dist/httpStatus/httpStatus.statusTextConstant.d.ts +0 -1
- package/dist/httpStatus/httpStatus.statusTextConstant.js +0 -1
- package/dist/httpStatus/httpStatus.type.d.ts +0 -1
- package/dist/httpStatus/httpStatus.type.js +0 -1
- package/dist/httpStatus/httpStatus.validator.d.ts +0 -1
- package/dist/httpStatus/httpStatus.validator.js +0 -1
- package/dist/httpStatus/httpStatusCodes.constant.d.ts +0 -1
- package/dist/httpStatus/httpStatusCodes.constant.js +0 -1
- package/dist/httpStatus/index.d.ts +0 -1
- package/dist/httpStatus/index.js +0 -1
- package/dist/httpStream/httpStream.backpressure.d.ts +0 -1
- package/dist/httpStream/httpStream.backpressure.js +0 -1
- package/dist/httpStream/httpStream.constants.d.ts +0 -1
- package/dist/httpStream/httpStream.constants.js +0 -1
- package/dist/httpStream/httpStream.consume.d.ts +0 -1
- package/dist/httpStream/httpStream.consume.js +0 -1
- package/dist/httpStream/httpStream.destroy.d.ts +0 -1
- package/dist/httpStream/httpStream.destroy.js +0 -1
- package/dist/httpStream/httpStream.error.d.ts +0 -1
- package/dist/httpStream/httpStream.error.js +0 -1
- package/dist/httpStream/httpStream.eventHelper.d.ts +0 -1
- package/dist/httpStream/httpStream.eventHelper.js +0 -1
- package/dist/httpStream/httpStream.helper.d.ts +0 -1
- package/dist/httpStream/httpStream.helper.js +0 -1
- package/dist/httpStream/httpStream.pipe.d.ts +0 -1
- package/dist/httpStream/httpStream.pipe.js +0 -1
- package/dist/httpStream/httpStream.progress.d.ts +0 -1
- package/dist/httpStream/httpStream.progress.js +0 -1
- package/dist/httpStream/httpStream.read.d.ts +0 -1
- package/dist/httpStream/httpStream.read.js +0 -1
- package/dist/httpStream/httpStream.request.d.ts +0 -1
- package/dist/httpStream/httpStream.request.js +0 -1
- package/dist/httpStream/httpStream.state.d.ts +0 -1
- package/dist/httpStream/httpStream.state.js +0 -1
- package/dist/httpStream/httpStream.transform.d.ts +0 -1
- package/dist/httpStream/httpStream.transform.js +0 -1
- package/dist/httpStream/httpStream.types.d.ts +0 -1
- package/dist/httpStream/httpStream.types.js +0 -1
- package/dist/httpStream/index.d.ts +0 -1
- package/dist/httpStream/index.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.compilation.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.compilation.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.core.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.core.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.helper.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.helper.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.ip.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.ip.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.parsing.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.parsing.js +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.type.d.ts +0 -1
- package/dist/httpTrustProxy/httpTrustProxy.type.js +0 -1
- package/dist/httpTrustProxy/index.d.ts +0 -1
- package/dist/httpTrustProxy/index.js +0 -1
- package/dist/httpTypes/http.types.d.ts +0 -1
- package/dist/httpTypes/http.types.js +0 -1
- package/dist/httpTypes/index.d.ts +0 -1
- package/dist/httpTypes/index.js +0 -1
- package/dist/httpUrl/http.url.d.ts +0 -1
- package/dist/httpUrl/http.url.js +0 -1
- package/dist/httpUrl/index.d.ts +0 -1
- package/dist/httpUrl/index.js +0 -1
- package/dist/httpValidation/httpValidationAssertion.d.ts +0 -1
- package/dist/httpValidation/httpValidationAssertion.js +0 -1
- package/dist/httpValidation/httpValidationAuthority.d.ts +0 -1
- package/dist/httpValidation/httpValidationAuthority.js +0 -1
- package/dist/httpValidation/httpValidationAuthorization.d.ts +0 -1
- package/dist/httpValidation/httpValidationAuthorization.js +0 -1
- package/dist/httpValidation/httpValidationCacheControl.d.ts +0 -1
- package/dist/httpValidation/httpValidationCacheControl.js +0 -1
- package/dist/httpValidation/httpValidationContentLength.d.ts +0 -1
- package/dist/httpValidation/httpValidationContentLength.js +0 -1
- package/dist/httpValidation/httpValidationContentType.d.ts +0 -1
- package/dist/httpValidation/httpValidationContentType.js +0 -1
- package/dist/httpValidation/httpValidationCookie.d.ts +0 -1
- package/dist/httpValidation/httpValidationCookie.js +0 -1
- package/dist/httpValidation/httpValidationDate.d.ts +0 -1
- package/dist/httpValidation/httpValidationDate.js +0 -1
- package/dist/httpValidation/httpValidationETag.d.ts +0 -1
- package/dist/httpValidation/httpValidationETag.js +0 -1
- package/dist/httpValidation/httpValidationHeader.d.ts +0 -1
- package/dist/httpValidation/httpValidationHeader.js +0 -1
- package/dist/httpValidation/httpValidationHostname.d.ts +0 -1
- package/dist/httpValidation/httpValidationHostname.js +0 -1
- package/dist/httpValidation/httpValidationMessage.d.ts +0 -1
- package/dist/httpValidation/httpValidationMessage.js +0 -1
- package/dist/httpValidation/httpValidationMethod.d.ts +0 -1
- package/dist/httpValidation/httpValidationMethod.js +0 -1
- package/dist/httpValidation/httpValidationPort.d.ts +0 -1
- package/dist/httpValidation/httpValidationPort.js +0 -1
- package/dist/httpValidation/httpValidationRange.d.ts +0 -1
- package/dist/httpValidation/httpValidationRange.js +0 -1
- package/dist/httpValidation/httpValidationRequestTarget.d.ts +0 -1
- package/dist/httpValidation/httpValidationRequestTarget.js +0 -1
- package/dist/httpValidation/httpValidationStatusCode.d.ts +0 -1
- package/dist/httpValidation/httpValidationStatusCode.js +0 -1
- package/dist/httpValidation/httpValidationToken.d.ts +0 -1
- package/dist/httpValidation/httpValidationToken.js +0 -1
- package/dist/httpValidation/httpValidationTypes.type.d.ts +0 -1
- package/dist/httpValidation/httpValidationTypes.type.js +0 -1
- package/dist/httpValidation/httpValidationUrl.d.ts +0 -1
- package/dist/httpValidation/httpValidationUrl.js +0 -1
- package/dist/httpValidation/index.d.ts +0 -1
- package/dist/httpValidation/index.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +8 -8
- package/dist/httpAdapter/httpAdapter.errorResponse.js +0 -137
- package/dist/httpQuery/http.query.d.ts +0 -110
- package/dist/httpQuery/http.query.js +0 -484
|
@@ -5,4 +5,3 @@ export declare function normalizeHeaders(headers?: HeadersInit): Record<string,
|
|
|
5
5
|
export declare function getHeader(headers: Record<string, string>, name: string): string | undefined;
|
|
6
6
|
export declare function validateStatus(status: number): void;
|
|
7
7
|
export declare function isReadableStream(value: unknown): value is ReadableStream<Uint8Array>;
|
|
8
|
-
//# sourceMappingURL=httpRoute.result.util.d.ts.map
|
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { HttpRouteResult, ok, created, noContent, redirect, badRequest, unauthorized, forbidden, notFound, conflict, tooManyRequests, internalServerError, accepted, methodNotAllowed, unprocessableEntity, notImplemented, serviceUnavailable, routeResult, response, normalizeRouteResult, resultFromContext, isRouteResult, isRouteResultInit, isRouteResultBody, DEFAULT_ROUTE_STATUS, DEFAULT_CONTENT_TYPE, } from "./httpRoute.result.js";
|
|
5
5
|
export type { RouteResultBody, RouteResultValue, RouteResultInit, RouteResult, RouteResultContext, RouteResultOptions, } from "./httpRoute.result.type.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,4 +2,3 @@
|
|
|
2
2
|
* HTTP route results.
|
|
3
3
|
*/
|
|
4
4
|
export { HttpRouteResult, ok, created, noContent, redirect, badRequest, unauthorized, forbidden, notFound, conflict, tooManyRequests, internalServerError, accepted, methodNotAllowed, unprocessableEntity, notImplemented, serviceUnavailable, routeResult, response, normalizeRouteResult, resultFromContext, isRouteResult, isRouteResultInit, isRouteResultBody, DEFAULT_ROUTE_STATUS, DEFAULT_CONTENT_TYPE, } from "./httpRoute.result.js";
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route tree enumeration helpers.
|
|
3
|
+
*
|
|
4
|
+
* @module httpRoute/tree/enumerate
|
|
5
|
+
*/
|
|
6
|
+
import type { MutableRouteTreeNode } from "./httpTree.type.js";
|
|
7
|
+
/**
|
|
8
|
+
* Collects optional routes from the tree.
|
|
9
|
+
*/
|
|
10
|
+
export declare function collectOptionalRoutes(node: MutableRouteTreeNode): MutableRouteTreeNode[];
|
|
11
|
+
/**
|
|
12
|
+
* Collects all routes from the tree.
|
|
13
|
+
*/
|
|
14
|
+
export declare function collectRoutes(node: MutableRouteTreeNode, path: string): Array<{
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly node: MutableRouteTreeNode;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Finds a static child node.
|
|
20
|
+
*/
|
|
21
|
+
export declare function findStaticChild(node: MutableRouteTreeNode, name: string): MutableRouteTreeNode | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route tree enumeration helpers.
|
|
3
|
+
*
|
|
4
|
+
* @module httpRoute/tree/enumerate
|
|
5
|
+
*/
|
|
6
|
+
import { literalKey } from "./httpTree.nodeCreation.js";
|
|
7
|
+
/**
|
|
8
|
+
* Collects optional routes from the tree.
|
|
9
|
+
*/
|
|
10
|
+
export function collectOptionalRoutes(node) {
|
|
11
|
+
const results = [];
|
|
12
|
+
for (const child of node.children.values()) {
|
|
13
|
+
if (child.type === "optional" || child.wildcard) {
|
|
14
|
+
results.push(child);
|
|
15
|
+
results.push(...collectOptionalRoutes(child));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return results;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Collects all routes from the tree.
|
|
22
|
+
*/
|
|
23
|
+
export function collectRoutes(node, path) {
|
|
24
|
+
const results = [];
|
|
25
|
+
if (node.handler) {
|
|
26
|
+
results.push({ path, node });
|
|
27
|
+
}
|
|
28
|
+
for (const [key, child] of node.children) {
|
|
29
|
+
const childPath = child.type === "parameter"
|
|
30
|
+
? `${path}/:${child.param ?? key}`
|
|
31
|
+
: child.type === "wildcard"
|
|
32
|
+
? `${path}/*${child.param ?? ""}`
|
|
33
|
+
: `${path}/${child.name}`;
|
|
34
|
+
results.push(...collectRoutes(child, childPath));
|
|
35
|
+
}
|
|
36
|
+
return results;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Finds a static child node.
|
|
40
|
+
*/
|
|
41
|
+
export function findStaticChild(node, name) {
|
|
42
|
+
return node.children.get(literalKey(name, false)) ?? node.children.get(name);
|
|
43
|
+
}
|
|
@@ -11,11 +11,11 @@ export declare function getPatternSegments(path: string): readonly string[];
|
|
|
11
11
|
/**
|
|
12
12
|
* Inserts a segment into the tree.
|
|
13
13
|
*/
|
|
14
|
-
export declare function insertSegment(node: MutableRouteTreeNode, segments: readonly string[], handler: unknown, methods: readonly string[], metadata: Record<string, unknown
|
|
14
|
+
export declare function insertSegment(node: MutableRouteTreeNode, segments: readonly string[], handler: unknown, methods: readonly string[], metadata: Record<string, unknown>, caseSensitive?: boolean): void;
|
|
15
15
|
/**
|
|
16
16
|
* Removes a route from the tree.
|
|
17
17
|
*/
|
|
18
|
-
export declare function removeRouteFromTree(node: MutableRouteTreeNode, segments: readonly string[]): boolean;
|
|
18
|
+
export declare function removeRouteFromTree(node: MutableRouteTreeNode, segments: readonly string[], caseSensitive?: boolean): boolean;
|
|
19
19
|
/**
|
|
20
20
|
* Checks if a node is empty.
|
|
21
21
|
*/
|
|
@@ -28,4 +28,3 @@ export declare function matchesMethod(node: MutableRouteTreeNode, method: string
|
|
|
28
28
|
* Splits a path into segments.
|
|
29
29
|
*/
|
|
30
30
|
export declare function splitPath(path: string): readonly string[];
|
|
31
|
-
//# sourceMappingURL=httpTree.helper.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module httpRoute/tree/helpers
|
|
5
5
|
*/
|
|
6
|
-
import { createChildNode } from "./httpTree.nodeCreation.js";
|
|
6
|
+
import { childKey, createChildNode } from "./httpTree.nodeCreation.js";
|
|
7
7
|
/**
|
|
8
8
|
* Gets pattern segments from a path.
|
|
9
9
|
*/
|
|
@@ -13,7 +13,7 @@ export function getPatternSegments(path) {
|
|
|
13
13
|
/**
|
|
14
14
|
* Inserts a segment into the tree.
|
|
15
15
|
*/
|
|
16
|
-
export function insertSegment(node, segments, handler, methods, metadata) {
|
|
16
|
+
export function insertSegment(node, segments, handler, methods, metadata, caseSensitive = false) {
|
|
17
17
|
if (segments.length === 0) {
|
|
18
18
|
node.handler = handler;
|
|
19
19
|
for (const method of methods) {
|
|
@@ -26,17 +26,18 @@ export function insertSegment(node, segments, handler, methods, metadata) {
|
|
|
26
26
|
if (segment === undefined) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
const key = childKey(segment, caseSensitive);
|
|
30
|
+
let child = node.children.get(key);
|
|
30
31
|
if (!child) {
|
|
31
32
|
child = createChildNode(segment);
|
|
32
|
-
node.children.set(
|
|
33
|
+
node.children.set(key, child);
|
|
33
34
|
}
|
|
34
|
-
insertSegment(child, rest, handler, methods, metadata);
|
|
35
|
+
insertSegment(child, rest, handler, methods, metadata, caseSensitive);
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Removes a route from the tree.
|
|
38
39
|
*/
|
|
39
|
-
export function removeRouteFromTree(node, segments) {
|
|
40
|
+
export function removeRouteFromTree(node, segments, caseSensitive = false) {
|
|
40
41
|
if (segments.length === 0) {
|
|
41
42
|
if (node.handler) {
|
|
42
43
|
node.handler = undefined;
|
|
@@ -49,13 +50,14 @@ export function removeRouteFromTree(node, segments) {
|
|
|
49
50
|
if (segment === undefined) {
|
|
50
51
|
return false;
|
|
51
52
|
}
|
|
52
|
-
const
|
|
53
|
+
const key = childKey(segment, caseSensitive);
|
|
54
|
+
const child = node.children.get(key);
|
|
53
55
|
if (!child) {
|
|
54
56
|
return false;
|
|
55
57
|
}
|
|
56
|
-
const removed = removeRouteFromTree(child, rest);
|
|
58
|
+
const removed = removeRouteFromTree(child, rest, caseSensitive);
|
|
57
59
|
if (removed && isEmptyNode(child)) {
|
|
58
|
-
node.children.delete(
|
|
60
|
+
node.children.delete(key);
|
|
59
61
|
}
|
|
60
62
|
return removed;
|
|
61
63
|
}
|
|
@@ -77,4 +79,3 @@ export function matchesMethod(node, method) {
|
|
|
77
79
|
export function splitPath(path) {
|
|
78
80
|
return path.split("/").filter(Boolean);
|
|
79
81
|
}
|
|
80
|
-
//# sourceMappingURL=httpTree.helper.js.map
|
|
@@ -4,8 +4,22 @@
|
|
|
4
4
|
* @module httpRoute/tree/nodeCreation
|
|
5
5
|
*/
|
|
6
6
|
import type { MutableRouteTreeNode } from "./httpTree.type.js";
|
|
7
|
+
/**
|
|
8
|
+
* The key a literal segment is stored under. Literals are compared
|
|
9
|
+
* case-insensitively unless the tree is case sensitive, matching the router's
|
|
10
|
+
* default; the tree used to match `/PAYMENTS/x` against nothing.
|
|
11
|
+
*/
|
|
12
|
+
export declare function literalKey(segment: string, caseSensitive: boolean): string;
|
|
13
|
+
/**
|
|
14
|
+
* The key a pattern segment is stored under: literals by
|
|
15
|
+
* {@link literalKey}, parameters and wildcards by their spelling.
|
|
16
|
+
*/
|
|
17
|
+
export declare function childKey(segment: string, caseSensitive: boolean): string;
|
|
7
18
|
/**
|
|
8
19
|
* Creates a child node based on the segment.
|
|
20
|
+
*
|
|
21
|
+
* Understands every spelling the router does: `:id`, `:id?`, `{name}`,
|
|
22
|
+
* `{name?}`, `*rest` (a named wildcard; only a bare `*` used to count, so
|
|
23
|
+
* `/admin/*rest` was stored as a literal segment) and a static `name?`.
|
|
9
24
|
*/
|
|
10
25
|
export declare function createChildNode(segment: string): MutableRouteTreeNode;
|
|
11
|
-
//# sourceMappingURL=httpTree.nodeCreation.d.ts.map
|
|
@@ -3,52 +3,76 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module httpRoute/tree/nodeCreation
|
|
5
5
|
*/
|
|
6
|
+
const BRACE_PARAMETER = /^\{([a-zA-Z_][a-zA-Z0-9_-]*)(\?)?(?::.+)?\}$/;
|
|
7
|
+
/**
|
|
8
|
+
* The key a literal segment is stored under. Literals are compared
|
|
9
|
+
* case-insensitively unless the tree is case sensitive, matching the router's
|
|
10
|
+
* default; the tree used to match `/PAYMENTS/x` against nothing.
|
|
11
|
+
*/
|
|
12
|
+
export function literalKey(segment, caseSensitive) {
|
|
13
|
+
return caseSensitive ? segment : segment.toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The key a pattern segment is stored under: literals by
|
|
17
|
+
* {@link literalKey}, parameters and wildcards by their spelling.
|
|
18
|
+
*/
|
|
19
|
+
export function childKey(segment, caseSensitive) {
|
|
20
|
+
if (segment.startsWith(":") ||
|
|
21
|
+
segment.startsWith("*") ||
|
|
22
|
+
segment.startsWith("{")) {
|
|
23
|
+
return segment;
|
|
24
|
+
}
|
|
25
|
+
return literalKey(segment.endsWith("?") ? segment.slice(0, -1) : segment, caseSensitive);
|
|
26
|
+
}
|
|
27
|
+
function node(fields) {
|
|
28
|
+
return {
|
|
29
|
+
...fields,
|
|
30
|
+
children: new Map(),
|
|
31
|
+
methods: new Set(),
|
|
32
|
+
metadata: {},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
6
35
|
/**
|
|
7
36
|
* Creates a child node based on the segment.
|
|
37
|
+
*
|
|
38
|
+
* Understands every spelling the router does: `:id`, `:id?`, `{name}`,
|
|
39
|
+
* `{name?}`, `*rest` (a named wildcard; only a bare `*` used to count, so
|
|
40
|
+
* `/admin/*rest` was stored as a literal segment) and a static `name?`.
|
|
8
41
|
*/
|
|
9
42
|
export function createChildNode(segment) {
|
|
10
43
|
if (segment.startsWith(":")) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
44
|
+
const optional = segment.endsWith("?");
|
|
45
|
+
const name = segment.slice(1, optional ? -1 : undefined);
|
|
46
|
+
return node({
|
|
47
|
+
name,
|
|
48
|
+
type: optional ? "optional" : "parameter",
|
|
49
|
+
optional,
|
|
50
|
+
wildcard: false,
|
|
51
|
+
param: name,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const brace = BRACE_PARAMETER.exec(segment);
|
|
55
|
+
if (brace && brace[1] !== undefined) {
|
|
56
|
+
const optional = brace[2] !== undefined;
|
|
57
|
+
return node({
|
|
58
|
+
name: brace[1],
|
|
59
|
+
type: optional ? "optional" : "parameter",
|
|
60
|
+
optional,
|
|
18
61
|
wildcard: false,
|
|
19
|
-
param:
|
|
20
|
-
};
|
|
62
|
+
param: brace[1],
|
|
63
|
+
});
|
|
21
64
|
}
|
|
22
|
-
if (segment
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type: "wildcard",
|
|
26
|
-
children: new Map(),
|
|
27
|
-
methods: new Set(),
|
|
28
|
-
metadata: {},
|
|
29
|
-
optional: false,
|
|
30
|
-
wildcard: true,
|
|
31
|
-
};
|
|
65
|
+
if (segment.startsWith("*")) {
|
|
66
|
+
const name = segment.slice(1) || "*";
|
|
67
|
+
return node({ name, type: "wildcard", optional: false, wildcard: true, param: name });
|
|
32
68
|
}
|
|
33
69
|
if (segment.endsWith("?")) {
|
|
34
|
-
return {
|
|
70
|
+
return node({
|
|
35
71
|
name: segment.slice(0, -1),
|
|
36
72
|
type: "optional",
|
|
37
|
-
children: new Map(),
|
|
38
|
-
methods: new Set(),
|
|
39
|
-
metadata: {},
|
|
40
73
|
optional: true,
|
|
41
74
|
wildcard: false,
|
|
42
|
-
};
|
|
75
|
+
});
|
|
43
76
|
}
|
|
44
|
-
return {
|
|
45
|
-
name: segment,
|
|
46
|
-
type: "static",
|
|
47
|
-
children: new Map(),
|
|
48
|
-
methods: new Set(),
|
|
49
|
-
metadata: {},
|
|
50
|
-
optional: false,
|
|
51
|
-
wildcard: false,
|
|
52
|
-
};
|
|
77
|
+
return node({ name: segment, type: "static", optional: false, wildcard: false });
|
|
53
78
|
}
|
|
54
|
-
//# sourceMappingURL=httpTree.nodeCreation.js.map
|
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { MutableRouteTreeNode } from "./httpTree.type.js";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* A node that matched a path, with every parameter captured on the way.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export interface RouteTreeCandidate {
|
|
11
|
+
readonly node: MutableRouteTreeNode;
|
|
12
|
+
readonly params: Readonly<Record<string, string>>;
|
|
13
|
+
}
|
|
11
14
|
/**
|
|
12
|
-
* Collects
|
|
15
|
+
* Collects the nodes matching `segments`, most specific first: at each level
|
|
16
|
+
* a literal child, then parameter children, then an optional child skipped,
|
|
17
|
+
* then a wildcard. Parameters are accumulated along the path — the old
|
|
18
|
+
* traversal returned bare nodes, so only the last parameter was ever
|
|
19
|
+
* reported — and a wildcard captures the rest of the path.
|
|
13
20
|
*/
|
|
14
|
-
export declare function
|
|
21
|
+
export declare function collectMatches(node: MutableRouteTreeNode, segments: readonly string[], caseSensitive: boolean, index?: number, params?: Readonly<Record<string, string>>): RouteTreeCandidate[];
|
|
15
22
|
/**
|
|
16
|
-
* Collects
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly path: string;
|
|
20
|
-
readonly node: MutableRouteTreeNode;
|
|
21
|
-
}>;
|
|
22
|
-
/**
|
|
23
|
-
* Finds a static child node.
|
|
23
|
+
* Collects candidate nodes for `segments`, in priority order.
|
|
24
|
+
*
|
|
25
|
+
* Kept for compatibility; {@link collectMatches} also reports parameters.
|
|
24
26
|
*/
|
|
25
|
-
export declare function
|
|
26
|
-
//# sourceMappingURL=httpTree.traversal.d.ts.map
|
|
27
|
+
export declare function collectCandidates(node: MutableRouteTreeNode, segments: readonly string[]): MutableRouteTreeNode[];
|
|
@@ -3,71 +3,69 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module httpRoute/tree/traversal
|
|
5
5
|
*/
|
|
6
|
+
import { literalKey } from "./httpTree.nodeCreation.js";
|
|
6
7
|
/**
|
|
7
|
-
* Collects
|
|
8
|
+
* Collects the nodes matching `segments`, most specific first: at each level
|
|
9
|
+
* a literal child, then parameter children, then an optional child skipped,
|
|
10
|
+
* then a wildcard. Parameters are accumulated along the path — the old
|
|
11
|
+
* traversal returned bare nodes, so only the last parameter was ever
|
|
12
|
+
* reported — and a wildcard captures the rest of the path.
|
|
8
13
|
*/
|
|
9
|
-
export function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
export function collectMatches(node, segments, caseSensitive, index = 0, params = {}) {
|
|
15
|
+
const matches = [];
|
|
16
|
+
const recurse = (child, next, captured) => {
|
|
17
|
+
matches.push(...collectMatches(child, segments, caseSensitive, next, captured));
|
|
18
|
+
};
|
|
19
|
+
const segment = segments[index];
|
|
14
20
|
if (segment === undefined) {
|
|
15
|
-
|
|
21
|
+
if (node.handler !== undefined) {
|
|
22
|
+
matches.push({ node, params });
|
|
23
|
+
}
|
|
24
|
+
for (const child of node.children.values()) {
|
|
25
|
+
if (child.type === "optional") {
|
|
26
|
+
recurse(child, index, params);
|
|
27
|
+
}
|
|
28
|
+
else if (child.type === "wildcard" && child.handler !== undefined) {
|
|
29
|
+
matches.push({ node: child, params: { ...params, [child.param ?? "*"]: "" } });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return matches;
|
|
16
33
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
candidates.push(...collectCandidates(staticChild, rest));
|
|
34
|
+
const literal = node.children.get(literalKey(segment, caseSensitive));
|
|
35
|
+
if (literal && literal.param === undefined && literal.type !== "wildcard") {
|
|
36
|
+
recurse(literal, index + 1, params);
|
|
21
37
|
}
|
|
22
38
|
for (const child of node.children.values()) {
|
|
23
|
-
if (child.type
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
if (child.type === "wildcard") {
|
|
27
|
-
candidates.push(child);
|
|
39
|
+
if (child.param !== undefined && child.type !== "wildcard") {
|
|
40
|
+
recurse(child, index + 1, { ...params, [child.param]: decodeSegment(segment) });
|
|
28
41
|
}
|
|
42
|
+
}
|
|
43
|
+
for (const child of node.children.values()) {
|
|
29
44
|
if (child.type === "optional") {
|
|
30
|
-
|
|
31
|
-
candidates.push(child);
|
|
45
|
+
recurse(child, index, params);
|
|
32
46
|
}
|
|
33
47
|
}
|
|
34
|
-
return candidates;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Collects optional routes from the tree.
|
|
38
|
-
*/
|
|
39
|
-
export function collectOptionalRoutes(node) {
|
|
40
|
-
const results = [];
|
|
41
48
|
for (const child of node.children.values()) {
|
|
42
|
-
if (child.type === "
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
if (child.type === "wildcard" && child.handler !== undefined) {
|
|
50
|
+
const rest = segments.slice(index).map(decodeSegment).join("/");
|
|
51
|
+
matches.push({ node: child, params: { ...params, [child.param ?? "*"]: rest } });
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
|
-
return
|
|
54
|
+
return matches;
|
|
48
55
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export function collectRoutes(node, path) {
|
|
53
|
-
const results = [];
|
|
54
|
-
if (node.handler) {
|
|
55
|
-
results.push({ path, node });
|
|
56
|
+
function decodeSegment(value) {
|
|
57
|
+
try {
|
|
58
|
+
return decodeURIComponent(value);
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
? `${path}:${key}`
|
|
60
|
-
: child.type === "wildcard"
|
|
61
|
-
? `${path}*`
|
|
62
|
-
: `${path}/${key}`;
|
|
63
|
-
results.push(...collectRoutes(child, childPath));
|
|
60
|
+
catch {
|
|
61
|
+
return value;
|
|
64
62
|
}
|
|
65
|
-
return results;
|
|
66
63
|
}
|
|
67
64
|
/**
|
|
68
|
-
*
|
|
65
|
+
* Collects candidate nodes for `segments`, in priority order.
|
|
66
|
+
*
|
|
67
|
+
* Kept for compatibility; {@link collectMatches} also reports parameters.
|
|
69
68
|
*/
|
|
70
|
-
export function
|
|
71
|
-
return node.
|
|
69
|
+
export function collectCandidates(node, segments) {
|
|
70
|
+
return collectMatches(node, segments, false).map((match) => match.node);
|
|
72
71
|
}
|
|
73
|
-
//# sourceMappingURL=httpTree.traversal.js.map
|
|
@@ -18,13 +18,15 @@ export type RouteTreeNodeType = "static" | "parameter" | "wildcard" | "optional"
|
|
|
18
18
|
/**
|
|
19
19
|
* Options for {@link RouteTree}.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `RouterOptions` and applied by `RouteMatcher`, which is the path requests
|
|
24
|
-
* actually take. Declaring them here again promised behaviour this structure
|
|
25
|
-
* never implemented.
|
|
21
|
+
* `strict` (trailing-slash handling) is deliberately not offered: the tree
|
|
22
|
+
* splits on `/` and drops empty segments, so `/a` and `/a/` are one path.
|
|
26
23
|
*/
|
|
27
24
|
export interface RouteTreeOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Whether literal segments are compared case-sensitively. Defaults to
|
|
27
|
+
* `false`, the router's default, so the two agree on `/PAYMENTS/x`.
|
|
28
|
+
*/
|
|
29
|
+
readonly caseSensitive?: boolean;
|
|
28
30
|
}
|
|
29
31
|
export interface RouteTreeMatch {
|
|
30
32
|
readonly params: Record<string, string>;
|
|
@@ -49,4 +51,3 @@ export interface MutableRouteTreeNode {
|
|
|
49
51
|
wildcard: boolean;
|
|
50
52
|
param?: string;
|
|
51
53
|
}
|
|
52
|
-
//# sourceMappingURL=httpTree.type.d.ts.map
|
|
@@ -6,16 +6,20 @@
|
|
|
6
6
|
import type { RouteTreeOptions, RouteTreeMatch, RouteTreeSnapshot } from "./core/httpTree.type.js";
|
|
7
7
|
export declare class RouteTree {
|
|
8
8
|
private readonly root;
|
|
9
|
+
private readonly caseSensitive;
|
|
9
10
|
private nodeCount;
|
|
10
|
-
constructor(
|
|
11
|
+
constructor(options?: RouteTreeOptions);
|
|
11
12
|
insert(path: string, handler: unknown, methods?: readonly string[], metadata?: Record<string, unknown>): void;
|
|
12
13
|
remove(path: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Finds the most specific route for a path: literal segments first, then
|
|
16
|
+
* parameters, then wildcards, left to right, as the router ranks them.
|
|
17
|
+
* Every parameter along the path is reported.
|
|
18
|
+
*/
|
|
13
19
|
lookup(path: string, method?: string): RouteTreeMatch | undefined;
|
|
14
20
|
has(path: string, method?: string): boolean;
|
|
15
21
|
clear(): void;
|
|
16
22
|
snapshot(): RouteTreeSnapshot;
|
|
17
23
|
get size(): number;
|
|
18
|
-
private extractParams;
|
|
19
24
|
private freezeNode;
|
|
20
25
|
}
|
|
21
|
-
//# sourceMappingURL=httpTree.core.d.ts.map
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
* @module httpRoute/tree/tree
|
|
5
5
|
*/
|
|
6
6
|
import { insertSegment, removeRouteFromTree, matchesMethod, splitPath, } from "./core/httpTree.helper.js";
|
|
7
|
-
import {
|
|
7
|
+
import { collectMatches } from "./core/httpTree.traversal.js";
|
|
8
8
|
export class RouteTree {
|
|
9
9
|
root;
|
|
10
|
+
caseSensitive;
|
|
10
11
|
nodeCount = 0;
|
|
11
|
-
constructor(
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this.caseSensitive = options.caseSensitive ?? false;
|
|
12
14
|
this.root = {
|
|
13
15
|
name: "",
|
|
14
16
|
type: "static",
|
|
@@ -21,28 +23,32 @@ export class RouteTree {
|
|
|
21
23
|
}
|
|
22
24
|
insert(path, handler, methods = ["GET"], metadata = {}) {
|
|
23
25
|
const segments = splitPath(path);
|
|
24
|
-
insertSegment(this.root, segments, handler, methods, metadata);
|
|
26
|
+
insertSegment(this.root, segments, handler, methods, metadata, this.caseSensitive);
|
|
25
27
|
this.nodeCount++;
|
|
26
28
|
}
|
|
27
29
|
remove(path) {
|
|
28
30
|
const segments = splitPath(path);
|
|
29
|
-
const removed = removeRouteFromTree(this.root, segments);
|
|
31
|
+
const removed = removeRouteFromTree(this.root, segments, this.caseSensitive);
|
|
30
32
|
if (removed) {
|
|
31
33
|
this.nodeCount--;
|
|
32
34
|
}
|
|
33
35
|
return removed;
|
|
34
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Finds the most specific route for a path: literal segments first, then
|
|
39
|
+
* parameters, then wildcards, left to right, as the router ranks them.
|
|
40
|
+
* Every parameter along the path is reported.
|
|
41
|
+
*/
|
|
35
42
|
lookup(path, method) {
|
|
36
43
|
const segments = splitPath(path);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
if (candidate.handler && (!method || matchesMethod(candidate, method))) {
|
|
44
|
+
for (const { node, params } of collectMatches(this.root, segments, this.caseSensitive)) {
|
|
45
|
+
if (node.handler && (!method || matchesMethod(node, method))) {
|
|
40
46
|
return {
|
|
41
|
-
params:
|
|
47
|
+
params: { ...params },
|
|
42
48
|
path,
|
|
43
|
-
handler:
|
|
44
|
-
methods: Array.from(
|
|
45
|
-
metadata: { ...
|
|
49
|
+
handler: node.handler,
|
|
50
|
+
methods: Array.from(node.methods),
|
|
51
|
+
metadata: { ...node.metadata },
|
|
46
52
|
};
|
|
47
53
|
}
|
|
48
54
|
}
|
|
@@ -68,13 +74,6 @@ export class RouteTree {
|
|
|
68
74
|
get size() {
|
|
69
75
|
return this.nodeCount;
|
|
70
76
|
}
|
|
71
|
-
extractParams(segments, node) {
|
|
72
|
-
const params = {};
|
|
73
|
-
if (node.type === "parameter" && node.param) {
|
|
74
|
-
params[node.param] = segments[segments.length - 1] ?? "";
|
|
75
|
-
}
|
|
76
|
-
return params;
|
|
77
|
-
}
|
|
78
77
|
freezeNode(node) {
|
|
79
78
|
const children = new Map();
|
|
80
79
|
for (const [key, child] of node.children) {
|
|
@@ -93,4 +92,3 @@ export class RouteTree {
|
|
|
93
92
|
};
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
|
-
//# sourceMappingURL=httpTree.core.js.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export type { RouteTreeNode, RouteTreeNodeType, RouteTreeOptions, RouteTreeMatch, RouteTreeSnapshot, MutableRouteTreeNode, } from "./core/httpTree.type.js";
|
|
5
5
|
export { RouteTree } from "./httpTree.core.js";
|
|
6
6
|
export { createRouteTree } from "./httpTree.factory.js";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|