@dooboostore/simple-boot-http-server 1.0.17 → 1.0.19
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/cjs/SimpleBootHttpServer.d.ts +2 -1
- package/dist/cjs/SimpleBootHttpServer.d.ts.map +1 -1
- package/dist/cjs/SimpleBootHttpServer.js +310 -2
- package/dist/cjs/SimpleBootHttpServer.js.map +7 -0
- package/dist/cjs/codes/HttpHeaders.js +69 -1
- package/dist/cjs/codes/HttpHeaders.js.map +7 -0
- package/dist/cjs/codes/HttpMethod.js +39 -1
- package/dist/cjs/codes/HttpMethod.js.map +7 -0
- package/dist/cjs/codes/HttpStatus.js +47 -1
- package/dist/cjs/codes/HttpStatus.js.map +7 -0
- package/dist/cjs/codes/Mimes.js +55 -1
- package/dist/cjs/codes/Mimes.js.map +7 -0
- package/dist/cjs/codes/index.js +28 -1
- package/dist/cjs/codes/index.js.map +7 -0
- package/dist/cjs/decorators/MethodMapping.d.ts +0 -1
- package/dist/cjs/decorators/MethodMapping.d.ts.map +1 -1
- package/dist/cjs/decorators/MethodMapping.js +263 -2
- package/dist/cjs/decorators/MethodMapping.js.map +7 -0
- package/dist/cjs/decorators/index.js +22 -2
- package/dist/cjs/decorators/index.js.map +7 -0
- package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js +54 -1
- package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
- package/dist/cjs/endpoints/EndPoint.js +16 -1
- package/dist/cjs/endpoints/EndPoint.js.map +7 -0
- package/dist/cjs/endpoints/HeaderEndPoint.js +39 -1
- package/dist/cjs/endpoints/HeaderEndPoint.js.map +7 -0
- package/dist/cjs/endpoints/index.js +26 -1
- package/dist/cjs/endpoints/index.js.map +7 -0
- package/dist/cjs/errors/BadRequestError.js +34 -1
- package/dist/cjs/errors/BadRequestError.js.map +7 -0
- package/dist/cjs/errors/ForbiddenError.js +34 -1
- package/dist/cjs/errors/ForbiddenError.js.map +7 -0
- package/dist/cjs/errors/HttpError.js +38 -1
- package/dist/cjs/errors/HttpError.js.map +7 -0
- package/dist/cjs/errors/InternalServerError.js +34 -1
- package/dist/cjs/errors/InternalServerError.js.map +7 -0
- package/dist/cjs/errors/NotFoundError.js +34 -1
- package/dist/cjs/errors/NotFoundError.js.map +7 -0
- package/dist/cjs/errors/UnauthorizedError.js +34 -1
- package/dist/cjs/errors/UnauthorizedError.js.map +7 -0
- package/dist/cjs/errors/index.js +32 -1
- package/dist/cjs/errors/index.js.map +7 -0
- package/dist/cjs/filters/CacheFilter.js +150 -1
- package/dist/cjs/filters/CacheFilter.js.map +7 -0
- package/dist/cjs/filters/Filter.js +16 -1
- package/dist/cjs/filters/Filter.js.map +7 -0
- package/dist/cjs/filters/HttpStatusFilter.js +42 -1
- package/dist/cjs/filters/HttpStatusFilter.js.map +7 -0
- package/dist/cjs/filters/OpenApi3Filter.js +71 -2
- package/dist/cjs/filters/OpenApi3Filter.js.map +7 -0
- package/dist/cjs/filters/ResourceFilter.js +91 -2
- package/dist/cjs/filters/ResourceFilter.js.map +7 -0
- package/dist/cjs/filters/ThrowFilter.js +45 -1
- package/dist/cjs/filters/ThrowFilter.js.map +7 -0
- package/dist/cjs/filters/index.js +32 -2
- package/dist/cjs/filters/index.js.map +7 -0
- package/dist/cjs/index.d.ts +2 -12
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +24 -2
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/inject/InjectSituationType.js +31 -1
- package/dist/cjs/inject/InjectSituationType.js.map +7 -0
- package/dist/cjs/inject/index.js +22 -1
- package/dist/cjs/inject/index.js.map +7 -0
- package/dist/cjs/lifecycle/OnInit.js +16 -1
- package/dist/cjs/lifecycle/OnInit.js.map +7 -0
- package/dist/cjs/lifecycle/index.js +22 -1
- package/dist/cjs/lifecycle/index.js.map +7 -0
- package/dist/cjs/models/RequestResponse.js +493 -1
- package/dist/cjs/models/RequestResponse.js.map +7 -0
- package/dist/cjs/models/datas/HeaderData.js +33 -1
- package/dist/cjs/models/datas/HeaderData.js.map +7 -0
- package/dist/cjs/models/datas/MultipartData.js +16 -1
- package/dist/cjs/models/datas/MultipartData.js.map +7 -0
- package/dist/cjs/models/datas/ReqHeader.js +92 -1
- package/dist/cjs/models/datas/ReqHeader.js.map +7 -0
- package/dist/cjs/models/datas/Resource.js +78 -2
- package/dist/cjs/models/datas/Resource.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqFormUrlBody.js +29 -1
- package/dist/cjs/models/datas/body/ReqFormUrlBody.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqJsonBody.js +29 -1
- package/dist/cjs/models/datas/body/ReqJsonBody.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqMultipartFormBody.js +32 -1
- package/dist/cjs/models/datas/body/ReqMultipartFormBody.js.map +7 -0
- package/dist/cjs/models/index.js +38 -2
- package/dist/cjs/models/index.js.map +7 -0
- package/dist/cjs/models/method/patch/PatchJson.js +47 -2
- package/dist/cjs/models/method/patch/PatchJson.js.map +7 -0
- package/dist/cjs/option/HttpServerOption.js +72 -1
- package/dist/cjs/option/HttpServerOption.js.map +7 -0
- package/dist/cjs/option/index.js +22 -1
- package/dist/cjs/option/index.js.map +7 -0
- package/dist/cjs/resolvers/Resolver.js +16 -1
- package/dist/cjs/resolvers/Resolver.js.map +7 -0
- package/dist/cjs/resolvers/{ResourceResorver.d.ts → ResourceResolver.d.ts} +2 -2
- package/dist/cjs/resolvers/{ResourceResorver.d.ts.map → ResourceResolver.d.ts.map} +1 -1
- package/dist/cjs/resolvers/ResourceResolver.js +43 -0
- package/dist/cjs/resolvers/ResourceResolver.js.map +7 -0
- package/dist/cjs/resolvers/index.d.ts +1 -1
- package/dist/cjs/resolvers/index.js +24 -2
- package/dist/cjs/resolvers/index.js.map +7 -0
- package/dist/cjs/session/SessionManager.js +104 -1
- package/dist/cjs/session/SessionManager.js.map +7 -0
- package/dist/cjs/session/index.js +22 -1
- package/dist/cjs/session/index.js.map +7 -0
- package/dist/esm/SimpleBootHttpServer.d.ts +2 -1
- package/dist/esm/SimpleBootHttpServer.d.ts.map +1 -1
- package/dist/esm/SimpleBootHttpServer.js +287 -2
- package/dist/esm/SimpleBootHttpServer.js.map +7 -0
- package/dist/esm/codes/HttpHeaders.js +46 -1
- package/dist/esm/codes/HttpHeaders.js.map +7 -0
- package/dist/esm/codes/HttpMethod.js +16 -1
- package/dist/esm/codes/HttpMethod.js.map +7 -0
- package/dist/esm/codes/HttpStatus.js +24 -1
- package/dist/esm/codes/HttpStatus.js.map +7 -0
- package/dist/esm/codes/Mimes.js +32 -1
- package/dist/esm/codes/Mimes.js.map +7 -0
- package/dist/esm/codes/index.js +5 -1
- package/dist/esm/codes/index.js.map +7 -0
- package/dist/esm/decorators/MethodMapping.d.ts +0 -1
- package/dist/esm/decorators/MethodMapping.d.ts.map +1 -1
- package/dist/esm/decorators/MethodMapping.js +210 -2
- package/dist/esm/decorators/MethodMapping.js.map +7 -0
- package/dist/esm/decorators/index.js +2 -2
- package/dist/esm/decorators/index.js.map +7 -0
- package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js +31 -1
- package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
- package/dist/esm/endpoints/EndPoint.js +1 -0
- package/dist/esm/endpoints/EndPoint.js.map +7 -0
- package/dist/esm/endpoints/HeaderEndPoint.js +16 -1
- package/dist/esm/endpoints/HeaderEndPoint.js.map +7 -0
- package/dist/esm/endpoints/index.js +4 -1
- package/dist/esm/endpoints/index.js.map +7 -0
- package/dist/esm/errors/BadRequestError.js +11 -1
- package/dist/esm/errors/BadRequestError.js.map +7 -0
- package/dist/esm/errors/ForbiddenError.js +11 -1
- package/dist/esm/errors/ForbiddenError.js.map +7 -0
- package/dist/esm/errors/HttpError.js +15 -1
- package/dist/esm/errors/HttpError.js.map +7 -0
- package/dist/esm/errors/InternalServerError.js +11 -1
- package/dist/esm/errors/InternalServerError.js.map +7 -0
- package/dist/esm/errors/NotFoundError.js +11 -1
- package/dist/esm/errors/NotFoundError.js.map +7 -0
- package/dist/esm/errors/UnauthorizedError.js +11 -1
- package/dist/esm/errors/UnauthorizedError.js.map +7 -0
- package/dist/esm/errors/index.js +7 -1
- package/dist/esm/errors/index.js.map +7 -0
- package/dist/esm/filters/CacheFilter.js +127 -1
- package/dist/esm/filters/CacheFilter.js.map +7 -0
- package/dist/esm/filters/Filter.js +1 -0
- package/dist/esm/filters/Filter.js.map +7 -0
- package/dist/esm/filters/HttpStatusFilter.js +19 -1
- package/dist/esm/filters/HttpStatusFilter.js.map +7 -0
- package/dist/esm/filters/OpenApi3Filter.js +48 -2
- package/dist/esm/filters/OpenApi3Filter.js.map +7 -0
- package/dist/esm/filters/ResourceFilter.js +58 -2
- package/dist/esm/filters/ResourceFilter.js.map +7 -0
- package/dist/esm/filters/ThrowFilter.js +22 -1
- package/dist/esm/filters/ThrowFilter.js.map +7 -0
- package/dist/esm/filters/index.js +7 -2
- package/dist/esm/filters/index.js.map +7 -0
- package/dist/esm/index.d.ts +2 -12
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/inject/InjectSituationType.js +8 -1
- package/dist/esm/inject/InjectSituationType.js.map +7 -0
- package/dist/esm/inject/index.js +2 -1
- package/dist/esm/inject/index.js.map +7 -0
- package/dist/esm/lifecycle/OnInit.js +1 -0
- package/dist/esm/lifecycle/OnInit.js.map +7 -0
- package/dist/esm/lifecycle/index.js +2 -0
- package/dist/esm/lifecycle/index.js.map +7 -0
- package/dist/esm/models/RequestResponse.js +469 -1
- package/dist/esm/models/RequestResponse.js.map +7 -0
- package/dist/esm/models/datas/HeaderData.js +10 -1
- package/dist/esm/models/datas/HeaderData.js.map +7 -0
- package/dist/esm/models/datas/MultipartData.js +1 -0
- package/dist/esm/models/datas/MultipartData.js.map +7 -0
- package/dist/esm/models/datas/ReqHeader.js +69 -1
- package/dist/esm/models/datas/ReqHeader.js.map +7 -0
- package/dist/esm/models/datas/Resource.js +45 -2
- package/dist/esm/models/datas/Resource.js.map +7 -0
- package/dist/esm/models/datas/body/ReqFormUrlBody.js +6 -1
- package/dist/esm/models/datas/body/ReqFormUrlBody.js.map +7 -0
- package/dist/esm/models/datas/body/ReqJsonBody.js +6 -1
- package/dist/esm/models/datas/body/ReqJsonBody.js.map +7 -0
- package/dist/esm/models/datas/body/ReqMultipartFormBody.js +9 -1
- package/dist/esm/models/datas/body/ReqMultipartFormBody.js.map +7 -0
- package/dist/esm/models/index.js +10 -2
- package/dist/esm/models/index.js.map +7 -0
- package/dist/esm/models/method/patch/PatchJson.js +14 -2
- package/dist/esm/models/method/patch/PatchJson.js.map +7 -0
- package/dist/esm/option/HttpServerOption.d.ts +1 -1
- package/dist/esm/option/HttpServerOption.js +49 -1
- package/dist/esm/option/HttpServerOption.js.map +7 -0
- package/dist/esm/option/index.js +2 -1
- package/dist/esm/option/index.js.map +7 -0
- package/dist/esm/resolvers/Resolver.js +1 -0
- package/dist/esm/resolvers/Resolver.js.map +7 -0
- package/dist/esm/resolvers/{ResourceResorver.d.ts → ResourceResolver.d.ts} +2 -2
- package/dist/esm/resolvers/{ResourceResorver.d.ts.map → ResourceResolver.d.ts.map} +1 -1
- package/dist/esm/resolvers/ResourceResolver.js +20 -0
- package/dist/esm/resolvers/ResourceResolver.js.map +7 -0
- package/dist/esm/resolvers/index.d.ts +1 -1
- package/dist/esm/resolvers/index.js +3 -2
- package/dist/esm/resolvers/index.js.map +7 -0
- package/dist/esm/session/SessionManager.js +81 -1
- package/dist/esm/session/SessionManager.js.map +7 -0
- package/dist/esm/session/index.js +2 -1
- package/dist/esm/session/index.js.map +7 -0
- package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +6 -2
- package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.map +7 -0
- package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js +28 -2
- package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +7 -0
- package/package.json +29 -23
- package/dist/cjs/SimpleBootHttpServer.js.LICENSE.txt +0 -20
- package/dist/cjs/decorators/MethodMapping.js.LICENSE.txt +0 -16
- package/dist/cjs/decorators/index.js.LICENSE.txt +0 -16
- package/dist/cjs/filters/OpenApi3Filter.js.LICENSE.txt +0 -16
- package/dist/cjs/filters/ResourceFilter.js.LICENSE.txt +0 -13
- package/dist/cjs/filters/index.js.LICENSE.txt +0 -30
- package/dist/cjs/index.js.LICENSE.txt +0 -46
- package/dist/cjs/models/datas/Resource.js.LICENSE.txt +0 -13
- package/dist/cjs/models/index.js.LICENSE.txt +0 -25
- package/dist/cjs/models/method/patch/PatchJson.js.LICENSE.txt +0 -11
- package/dist/cjs/resolvers/ResourceResorver.js +0 -2
- package/dist/cjs/resolvers/ResourceResorver.js.LICENSE.txt +0 -13
- package/dist/cjs/resolvers/index.js.LICENSE.txt +0 -13
- package/dist/esm/SimpleBootHttpServer.js.LICENSE.txt +0 -20
- package/dist/esm/decorators/MethodMapping.js.LICENSE.txt +0 -16
- package/dist/esm/decorators/index.js.LICENSE.txt +0 -16
- package/dist/esm/filters/OpenApi3Filter.js.LICENSE.txt +0 -16
- package/dist/esm/filters/ResourceFilter.js.LICENSE.txt +0 -13
- package/dist/esm/filters/index.js.LICENSE.txt +0 -30
- package/dist/esm/index.js.LICENSE.txt +0 -46
- package/dist/esm/models/datas/Resource.js.LICENSE.txt +0 -13
- package/dist/esm/models/index.js.LICENSE.txt +0 -25
- package/dist/esm/models/method/patch/PatchJson.js.LICENSE.txt +0 -11
- package/dist/esm/resolvers/ResourceResorver.js +0 -2
- package/dist/esm/resolvers/ResourceResorver.js.LICENSE.txt +0 -13
- package/dist/esm/resolvers/index.js.LICENSE.txt +0 -13
- package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.LICENSE.txt +0 -54
- package/dist/umd-bundle/SimpleBootHttpServer.d.ts +0 -14
- package/dist/umd-bundle/SimpleBootHttpServer.d.ts.map +0 -1
- package/dist/umd-bundle/codes/HttpHeaders.d.ts +0 -42
- package/dist/umd-bundle/codes/HttpHeaders.d.ts.map +0 -1
- package/dist/umd-bundle/codes/HttpMethod.d.ts +0 -12
- package/dist/umd-bundle/codes/HttpMethod.d.ts.map +0 -1
- package/dist/umd-bundle/codes/HttpStatus.d.ts +0 -45
- package/dist/umd-bundle/codes/HttpStatus.d.ts.map +0 -1
- package/dist/umd-bundle/codes/Mimes.d.ts +0 -28
- package/dist/umd-bundle/codes/Mimes.d.ts.map +0 -1
- package/dist/umd-bundle/codes/index.d.ts +0 -5
- package/dist/umd-bundle/codes/index.d.ts.map +0 -1
- package/dist/umd-bundle/decorators/MethodMapping.d.ts +0 -74
- package/dist/umd-bundle/decorators/MethodMapping.d.ts.map +0 -1
- package/dist/umd-bundle/decorators/index.d.ts +0 -2
- package/dist/umd-bundle/decorators/index.d.ts.map +0 -1
- package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.LICENSE.txt +0 -54
- package/dist/umd-bundle/endpoints/CrossDomainHeaderEndPoint.d.ts +0 -16
- package/dist/umd-bundle/endpoints/CrossDomainHeaderEndPoint.d.ts.map +0 -1
- package/dist/umd-bundle/endpoints/EndPoint.d.ts +0 -7
- package/dist/umd-bundle/endpoints/EndPoint.d.ts.map +0 -1
- package/dist/umd-bundle/endpoints/HeaderEndPoint.d.ts +0 -12
- package/dist/umd-bundle/endpoints/HeaderEndPoint.d.ts.map +0 -1
- package/dist/umd-bundle/endpoints/index.d.ts +0 -4
- package/dist/umd-bundle/endpoints/index.d.ts.map +0 -1
- package/dist/umd-bundle/errors/BadRequestError.d.ts +0 -8
- package/dist/umd-bundle/errors/BadRequestError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/ForbiddenError.d.ts +0 -8
- package/dist/umd-bundle/errors/ForbiddenError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/HttpError.d.ts +0 -12
- package/dist/umd-bundle/errors/HttpError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/InternalServerError.d.ts +0 -8
- package/dist/umd-bundle/errors/InternalServerError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/NotFoundError.d.ts +0 -8
- package/dist/umd-bundle/errors/NotFoundError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/UnauthorizedError.d.ts +0 -8
- package/dist/umd-bundle/errors/UnauthorizedError.d.ts.map +0 -1
- package/dist/umd-bundle/errors/index.d.ts +0 -7
- package/dist/umd-bundle/errors/index.d.ts.map +0 -1
- package/dist/umd-bundle/filters/CacheFilter.d.ts +0 -45
- package/dist/umd-bundle/filters/CacheFilter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/Filter.d.ts +0 -17
- package/dist/umd-bundle/filters/Filter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/HttpStatusFilter.d.ts +0 -20
- package/dist/umd-bundle/filters/HttpStatusFilter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/OpenApi3Filter.d.ts +0 -142
- package/dist/umd-bundle/filters/OpenApi3Filter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/ResourceFilter.d.ts +0 -24
- package/dist/umd-bundle/filters/ResourceFilter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/ThrowFilter.d.ts +0 -19
- package/dist/umd-bundle/filters/ThrowFilter.d.ts.map +0 -1
- package/dist/umd-bundle/filters/index.d.ts +0 -7
- package/dist/umd-bundle/filters/index.d.ts.map +0 -1
- package/dist/umd-bundle/index.d.ts +0 -13
- package/dist/umd-bundle/index.d.ts.map +0 -1
- package/dist/umd-bundle/inject/InjectSituationType.d.ts +0 -4
- package/dist/umd-bundle/inject/InjectSituationType.d.ts.map +0 -1
- package/dist/umd-bundle/inject/index.d.ts +0 -2
- package/dist/umd-bundle/inject/index.d.ts.map +0 -1
- package/dist/umd-bundle/lifecycle/OnInit.d.ts +0 -5
- package/dist/umd-bundle/lifecycle/OnInit.d.ts.map +0 -1
- package/dist/umd-bundle/lifecycle/index.d.ts +0 -2
- package/dist/umd-bundle/lifecycle/index.d.ts.map +0 -1
- package/dist/umd-bundle/models/RequestResponse.d.ts +0 -100
- package/dist/umd-bundle/models/RequestResponse.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/HeaderData.d.ts +0 -10
- package/dist/umd-bundle/models/datas/HeaderData.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/MultipartData.d.ts +0 -12
- package/dist/umd-bundle/models/datas/MultipartData.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/ReqHeader.d.ts +0 -68
- package/dist/umd-bundle/models/datas/ReqHeader.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/Resource.d.ts +0 -11
- package/dist/umd-bundle/models/datas/Resource.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/body/ReqFormUrlBody.d.ts +0 -4
- package/dist/umd-bundle/models/datas/body/ReqFormUrlBody.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/body/ReqJsonBody.d.ts +0 -4
- package/dist/umd-bundle/models/datas/body/ReqJsonBody.d.ts.map +0 -1
- package/dist/umd-bundle/models/datas/body/ReqMultipartFormBody.d.ts +0 -6
- package/dist/umd-bundle/models/datas/body/ReqMultipartFormBody.d.ts.map +0 -1
- package/dist/umd-bundle/models/index.d.ts +0 -10
- package/dist/umd-bundle/models/index.d.ts.map +0 -1
- package/dist/umd-bundle/models/method/patch/PatchJson.d.ts +0 -8
- package/dist/umd-bundle/models/method/patch/PatchJson.d.ts.map +0 -1
- package/dist/umd-bundle/option/HttpServerOption.d.ts +0 -83
- package/dist/umd-bundle/option/HttpServerOption.d.ts.map +0 -1
- package/dist/umd-bundle/option/index.d.ts +0 -2
- package/dist/umd-bundle/option/index.d.ts.map +0 -1
- package/dist/umd-bundle/resolvers/Resolver.d.ts +0 -5
- package/dist/umd-bundle/resolvers/Resolver.d.ts.map +0 -1
- package/dist/umd-bundle/resolvers/ResourceResorver.d.ts +0 -6
- package/dist/umd-bundle/resolvers/ResourceResorver.d.ts.map +0 -1
- package/dist/umd-bundle/resolvers/index.d.ts +0 -3
- package/dist/umd-bundle/resolvers/index.d.ts.map +0 -1
- package/dist/umd-bundle/session/SessionManager.d.ts +0 -57
- package/dist/umd-bundle/session/SessionManager.d.ts.map +0 -1
- package/dist/umd-bundle/session/index.d.ts +0 -2
- package/dist/umd-bundle/session/index.d.ts.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/decorators/MethodMapping.ts"],
|
|
4
|
+
"sourcesContent": ["import { ConstructorType } from '@dooboostore/core/types';\nimport { ReflectMethod } from '@dooboostore/simple-boot/types/Types';\nimport { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { Resolver } from '../resolvers/Resolver';\nimport { Mimes } from '../codes/Mimes';\nimport { HttpMethod } from '../codes/HttpMethod';\n\nexport enum UrlMappingSituationType {\n REQ_JSON_BODY = 'SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY',\n REQ_FORM_URL_BODY = 'SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY'\n}\nexport type MappingConfig = {\n method: HttpMethod | string,\n description?: {\n name?: string;\n detail?: string;\n };\n\n req?: {\n contentType?: (Mimes|string)[];\n accept?: (Mimes|string)[];\n };\n\n res?: {\n status?: number;\n header?: {[key: string]: string};\n contentType?: Mimes | string;\n }\n resolver?: Resolver|ConstructorType<Resolver>;\n}\nexport type SaveMappingConfig = {propertyKey: string | symbol; config: MappingConfig}\nconst MappingMetadataKey = Symbol('MappingMetadataKey');\n// const GETSMappingMetadataKey = Symbol('GET_METHODS');\n// const GETMappingMetadataKey = Symbol('GET_METHOD');\n\nconst process = (config: MappingConfig, target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const saveMappingConfigs = (ReflectUtils.getMetadata(MappingMetadataKey, target.constructor) ?? []) as SaveMappingConfig[];\n saveMappingConfigs.push({propertyKey, config});\n ReflectUtils.defineMetadata(MappingMetadataKey, saveMappingConfigs, target.constructor);\n ReflectUtils.defineMetadata(MappingMetadataKey, config, target, propertyKey);\n}\nexport function UrlMapping(config: MappingConfig): ReflectMethod;\nexport function UrlMapping(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function UrlMapping(configOrtarget?: MappingConfig | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.GET}, configOrtarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n process(configOrtarget, target, propertyKey, descriptor);\n }\n }\n}\nexport const getUrlMapping = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return ReflectUtils.getMetadata(MappingMetadataKey, target, propertyKey);\n}\n\nexport const getUrlMappings = (target: any): SaveMappingConfig[] => {\n if (target !== null && undefined !== target && typeof target === 'object') {\n target = target.constructor;\n }\n return ReflectUtils.getMetadata(MappingMetadataKey, target);\n}\nexport function GET(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function GET(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function GET(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.GET}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.GET;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getGET = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getGETS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.GET);\n}\nexport function POST(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function POST(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function POST(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.POST}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.POST;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getPOST = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getPOSTS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.POST);\n}\nexport function DELETE(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function DELETE(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function DELETE(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.DELETE}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.DELETE;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getDELETE = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getDELETES = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.DELETE);\n}\nexport function PUT(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function PUT(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function PUT(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.PUT}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.PUT;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getPUT = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getPUTS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.PUT);\n}\nexport function PATCH(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function PATCH(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function PATCH(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.PATCH}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.PATCH;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getPATCH = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getPATCHS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.GET);\n}\nexport function OPTIONS(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function OPTIONS(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function OPTIONS(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.OPTIONS}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.OPTIONS;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getOPTIONS = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getOPTIONSS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.OPTIONS);\n}\nexport function HEAD(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function HEAD(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function HEAD(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.HEAD}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.HEAD;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getHEAD = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getHEADS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.GET);\n}\nexport function TRACE(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function TRACE(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function TRACE(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.TRACE}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.TRACE;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getTRACE = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getTRACES = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.TRACE);\n}\nexport function CONNECT(config: Omit<MappingConfig, 'method'>): ReflectMethod;\nexport function CONNECT(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function CONNECT(configOrTarget?: Omit<MappingConfig, 'method'> | any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): ReflectMethod | void {\n if (propertyKey && descriptor) {\n process({method: HttpMethod.CONNECT}, configOrTarget, propertyKey, descriptor);\n } else {\n return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n configOrTarget.method = HttpMethod.CONNECT;\n process(configOrTarget, target, propertyKey, descriptor);\n }\n }\n}\n\nexport const getCONNECT = (target: any, propertyKey: string | symbol): MappingConfig | undefined => {\n return getUrlMapping(target, propertyKey);\n}\nexport const getCONNECTS = (target: any): SaveMappingConfig[] => {\n return getUrlMappings(target)?.filter(it => it.config?.method.toUpperCase() === HttpMethod.CONNECT);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["UrlMappingSituationType", "propertyKey", "descriptor"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var t={5053:(t,e,r)=>{r.d(e,{d:()=>f});var n={9771:()=>{var t;!function(t){!function(){var e="object"==typeof globalThis?globalThis:"object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),r=n(t);function n(t,e){return function(r,n){Object.defineProperty(t,r,{configurable:!0,writable:!0,value:n}),e&&e(r,n)}}void 0!==e.Reflect&&(r=n(e.Reflect,r)),function(t,e){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,u={__proto__:[]}instanceof Array,f=!a&&!u,c={create:a?function(){return F(Object.create(null))}:u?function(){return F({__proto__:null})}:function(){return F({})},has:f?function(t,e){return r.call(t,e)}:function(t,e){return e in t},get:f?function(t,e){return r.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},s=Object.getPrototypeOf(Function),y="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],r=function(){function t(t,e,r){this._index=0,this._keys=t,this._values=e,this._selector=r}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var r=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,C(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new r(this._keys,this._values,n)},e.prototype.values=function(){return new r(this._keys,this._values,o)},e.prototype.entries=function(){return new r(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){if(!C(this._cacheKey,t)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(C(this._keys[r],t)){this._cacheIndex=r;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function n(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}(),h="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new y}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}(),d="function"==typeof WeakMap?WeakMap:function(){var t=c.create(),e=n();return function(){function t(){this._key=n()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=n()},t}();function n(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function o(t,n){if(!r.call(t,e)){if(!n)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function i(t,e){for(var r=0;r<e;++r)t[r]=255*Math.random()|0;return t}function a(){var t=function(){if("function"==typeof Uint8Array){var t=new Uint8Array(16);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):i(t,16),t}return i(new Array(16),16)}();t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var e="",r=0;r<16;++r){var n=t[r];4!==r&&6!==r&&8!==r||(e+="-"),n<16&&(e+="0"),e+=n.toString(16).toLowerCase()}return e}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,l=function(){var t;return!m(p)&&k(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[p]),m(t)&&(t=function(){var t,r,n,o;m(p)||void 0===e.Reflect||p in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,r=t.hasOwnMetadata,n=t.getOwnMetadata,o=t.getOwnMetadataKeys,i=t.deleteMetadata,a=new d;return{isProviderFor:function(t,e){var r=a.get(t);return!(m(r)||!r.has(e))||!!o(t,e).length&&(m(r)&&(r=new h,a.set(t,r)),r.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:i}}(e.Reflect));var i=new d,a={registerProvider:function(e){if(!Object.isExtensible(a))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case m(r):r=e;break;case r===e:break;case m(n):n=e;break;case n===e:break;default:void 0===o&&(o=new h),o.add(e)}},getProvider:f,setProvider:function(t,e,r){if(!c(r))throw new Error("Metadata provider not registered.");var n=f(t,e);if(n!==r){if(!m(n))return!1;var o=i.get(t);m(o)&&(o=new y,i.set(t,o)),o.set(e,r)}return!0}};return a;function u(e,i){if(!m(r)){if(r.isProviderFor(e,i))return r;if(!m(n)){if(n.isProviderFor(e,i))return r;if(!m(o))for(var a=I(o);;){var u=K(a);if(!u)return;var f=U(u);if(f.isProviderFor(e,i))return N(a),f}}}if(!m(t)&&t.isProviderFor(e,i))return t}function f(t,e){var r,n=i.get(t);return m(n)||(r=n.get(e)),m(r)?(m(r=u(t,e))||(m(n)&&(n=new y,i.set(t,n)),n.set(e,r)),r):r}function c(t){if(m(t))throw new TypeError;return r===t||n===t||!m(o)&&o.has(t)}}()),!m(p)&&k(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),v=function(t){var e=new d,r={isProviderFor:function(t,r){var n=e.get(t);return!m(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(t,e,r,o){n(r,o,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,r){var o=n(e,r,!1);return!m(o)&&R(o.has(t))},OrdinaryGetOwnMetadata:function(t,e,r){var o=n(e,r,!1);if(!m(o))return o.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var r=[],o=n(t,e,!1);if(m(o))return r;for(var i=I(o.keys()),a=0;;){var u=K(i);if(!u)return r.length=a,r;var f=U(u);try{r[a]=f}catch(t){try{N(i)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,r,o){var i=n(r,o,!1);if(m(i))return!1;if(!i.delete(t))return!1;if(0===i.size){var a=e.get(r);m(a)||(a.delete(o),0===a.size&&e.delete(a))}return!0}};return l.registerProvider(r),r;function n(n,o,i){var a=e.get(n),u=!1;if(m(a)){if(!i)return;a=new y,e.set(n,a),u=!0}var f=a.get(o);if(m(f)){if(!i)return;if(f=new y,a.set(o,f),!t.setProvider(n,o,r))throw a.delete(o),u&&e.delete(n),new Error("Wrong provider for target.")}return f}}(l);function w(t,e,r){if(_(t,e,r))return!0;var n=L(e);return!P(n)&&w(t,n,r)}function _(t,e,r){var n=G(e,r,!1);return!m(n)&&R(n.OrdinaryHasOwnMetadata(t,e,r))}function g(t,e,r){if(_(t,e,r))return O(t,e,r);var n=L(e);return P(n)?void 0:g(t,n,r)}function O(t,e,r){var n=G(e,r,!1);if(!m(n))return n.OrdinaryGetOwnMetadata(t,e,r)}function E(t,e,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(t,e,r,n)}function T(t,e){var r=b(t,e),n=L(t);if(null===n)return r;var o=T(n,e);if(o.length<=0)return r;if(r.length<=0)return o;for(var i=new h,a=[],u=0,f=r;u<f.length;u++){var c=f[u];i.has(c)||(i.add(c),a.push(c))}for(var s=0,y=o;s<y.length;s++)c=y[s],i.has(c)||(i.add(c),a.push(c));return a}function b(t,e){var r=G(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}function M(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function m(t){return void 0===t}function P(t){return null===t}function k(t){return"object"==typeof t?null!==t:"function"==typeof t}function R(t){return!!t}function S(t){var e=function(t){switch(M(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var e="string",r=D(t,o);if(void 0!==r){var n=r.call(t,e);if(k(n))throw new TypeError;return n}return function(t){var e,r,n=t.toString;if(j(n)&&!k(r=n.call(t)))return r;if(j(e=t.valueOf)&&!k(r=e.call(t)))return r;throw new TypeError}(t)}(t);return"symbol"==typeof e?e:function(t){return""+t}(e)}function x(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function j(t){return"function"==typeof t}function A(t){return"function"==typeof t}function C(t,e){return t===e||t!=t&&e!=e}function D(t,e){var r=t[e];if(null!=r){if(!j(r))throw new TypeError;return r}}function I(t){var e=D(t,i);if(!j(e))throw new TypeError;var r=e.call(t);if(!k(r))throw new TypeError;return r}function U(t){return t.value}function K(t){var e=t.next();return!e.done&&e}function N(t){var e=t.return;e&&e.call(t)}function L(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===s)return e;if(e!==s)return e;var r=t.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return e;var o=n.constructor;return"function"!=typeof o||o===t?e:o}function G(t,e,r){var n=l.getProvider(t,e);if(!m(n))return n;if(r){if(l.setProvider(t,e,v))return v;throw new Error("Illegal state.")}}function F(t){return t.__=void 0,delete t.__,t}t("decorate",function(t,e,r,n){if(m(r)){if(!x(t))throw new TypeError;if(!A(e))throw new TypeError;return function(t,e){for(var r=t.length-1;r>=0;--r){var n=(0,t[r])(e);if(!m(n)&&!P(n)){if(!A(n))throw new TypeError;e=n}}return e}(t,e)}if(!x(t))throw new TypeError;if(!k(e))throw new TypeError;if(!k(n)&&!m(n)&&!P(n))throw new TypeError;return P(n)&&(n=void 0),function(t,e,r,n){for(var o=t.length-1;o>=0;--o){var i=(0,t[o])(e,r,n);if(!m(i)&&!P(i)){if(!k(i))throw new TypeError;n=i}}return n}(t,e,r=S(r),n)}),t("metadata",function(t,e){return function(r,n){if(!k(r))throw new TypeError;if(!m(n)&&!function(t){switch(M(t)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;E(t,e,r,n)}}),t("defineMetadata",function(t,e,r,n){if(!k(r))throw new TypeError;return m(n)||(n=S(n)),E(t,e,r,n)}),t("hasMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=S(r)),w(t,e,r)}),t("hasOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=S(r)),_(t,e,r)}),t("getMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=S(r)),g(t,e,r)}),t("getOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=S(r)),O(t,e,r)}),t("getMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=S(e)),T(t,e)}),t("getOwnMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=S(e)),b(t,e)}),t("deleteMetadata",function(t,e,r){if(!k(e))throw new TypeError;if(m(r)||(r=S(r)),!k(e))throw new TypeError;m(r)||(r=S(r));var n=G(e,r,!1);return!m(n)&&n.OrdinaryDeleteMetadata(t,e,r)})}(r,e),void 0===e.Reflect&&(e.Reflect=t)}()}(t||(t={}))}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a,u={};i.d(u,{d:()=>a}),i(9771),function(t){t.getParameterTypes=(t,e)=>e?Reflect.getMetadata("design:paramtypes",t,e)||[]:Reflect.getMetadata("design:paramtypes",t)||[],t.getReturnType=(t,e)=>Reflect.getMetadata("design:returntype",t,e),t.getType=(t,e)=>e?Reflect.getMetadata("design:type",t,e):Reflect.getMetadata("design:type",t),t.getMetadata=(t,e,r)=>r?Reflect.getMetadata(t,e,r):Reflect.getMetadata(t,e),t.getMetadataKeys=t=>Reflect.getMetadataKeys(t),t.getOwnMetadata=(t,e,r)=>r?Reflect.getOwnMetadata(t,e,r):Reflect.getOwnMetadata(t,e),t.getMetadatas=e=>t.getMetadataKeys(e).map(r=>t.getMetadata(r,e)),t.metadata=(t,e)=>Reflect.metadata(t,e),t.defineMetadata=(t,e,r,n)=>{n&&Reflect.defineMetadata?Reflect.defineMetadata(t,e,r,n):Reflect.defineMetadata&&Reflect.defineMetadata(t,e,r)}}(a||(a={}));const f=u.d},5118:(t,e,r)=>{var n;r.d(e,{y:()=>n}),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.TRACE="TRACE",t.CONNECT="CONNECT"}(n||(n={}))},9108:(t,e,r)=>{r.d(e,{Ay:()=>v,D9:()=>b,Df:()=>l,Fz:()=>s,L3:()=>g,LO:()=>p,Ro:()=>D,SJ:()=>w,Sl:()=>j,Uc:()=>O,Vx:()=>S,Y:()=>d,Yu:()=>c,ZD:()=>U,Zy:()=>h,_P:()=>A,aK:()=>K,a_:()=>E,cr:()=>n,fG:()=>y,ft:()=>x,hZ:()=>k,hg:()=>I,kl:()=>C,lw:()=>P,mI:()=>m,nw:()=>M,oB:()=>R,q4:()=>f,rX:()=>T,sp:()=>_}),r(9771);var n,o=r(5053),i=r(5118);!function(t){t.REQ_JSON_BODY="SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY",t.REQ_FORM_URL_BODY="SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY"}(n||(n={}));const a=Symbol("MappingMetadataKey"),u=(t,e,r,n)=>{const i=o.d.getMetadata(a,e.constructor)??[];i.push({propertyKey:r,config:t}),o.d.defineMetadata(a,i,e.constructor),o.d.defineMetadata(a,t,e,r)};function f(t,e,r){if(!e||!r)return(e,r,n)=>{u(t,e,r,n)};u({method:i.y.GET},t,e,r)}const c=(t,e)=>o.d.getMetadata(a,t,e),s=t=>(null!=t&&"object"==typeof t&&(t=t.constructor),o.d.getMetadata(a,t));function y(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.GET,u(t,e,r,n)};u({method:i.y.GET},t,e,r)}const h=(t,e)=>c(t,e),d=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.GET);function p(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.POST,u(t,e,r,n)};u({method:i.y.POST},t,e,r)}const l=(t,e)=>c(t,e),v=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.POST);function w(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.DELETE,u(t,e,r,n)};u({method:i.y.DELETE},t,e,r)}const _=(t,e)=>c(t,e),g=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.DELETE);function O(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.PUT,u(t,e,r,n)};u({method:i.y.PUT},t,e,r)}const E=(t,e)=>c(t,e),T=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.PUT);function b(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.PATCH,u(t,e,r,n)};u({method:i.y.PATCH},t,e,r)}const M=(t,e)=>c(t,e),m=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.GET);function P(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.OPTIONS,u(t,e,r,n)};u({method:i.y.OPTIONS},t,e,r)}const k=(t,e)=>c(t,e),R=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.OPTIONS);function S(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.HEAD,u(t,e,r,n)};u({method:i.y.HEAD},t,e,r)}const x=(t,e)=>c(t,e),j=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.GET);function A(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.TRACE,u(t,e,r,n)};u({method:i.y.TRACE},t,e,r)}const C=(t,e)=>c(t,e),D=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.TRACE);function I(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=i.y.CONNECT,u(t,e,r,n)};u({method:i.y.CONNECT},t,e,r)}const U=(t,e)=>c(t,e),K=t=>s(t)?.filter(t=>t.config?.method.toUpperCase()===i.y.CONNECT)},9771:()=>{var t;!function(t){!function(){var e="object"==typeof globalThis?globalThis:"object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),r=n(t);function n(t,e){return function(r,n){Object.defineProperty(t,r,{configurable:!0,writable:!0,value:n}),e&&e(r,n)}}void 0!==e.Reflect&&(r=n(e.Reflect,r)),function(t,e){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,u={__proto__:[]}instanceof Array,f=!a&&!u,c={create:a?function(){return H(Object.create(null))}:u?function(){return H({__proto__:null})}:function(){return H({})},has:f?function(t,e){return r.call(t,e)}:function(t,e){return e in t},get:f?function(t,e){return r.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},s=Object.getPrototypeOf(Function),y="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],r=function(){function t(t,e,r){this._index=0,this._keys=t,this._values=e,this._selector=r}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var r=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,D(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new r(this._keys,this._values,n)},e.prototype.values=function(){return new r(this._keys,this._values,o)},e.prototype.entries=function(){return new r(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){if(!D(this._cacheKey,t)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(D(this._keys[r],t)){this._cacheIndex=r;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function n(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}(),h="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new y}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}(),d="function"==typeof WeakMap?WeakMap:function(){var t=c.create(),e=n();return function(){function t(){this._key=n()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=n()},t}();function n(){var e;do{e="@@WeakMap@@"+a()}while(c.has(t,e));return t[e]=!0,e}function o(t,n){if(!r.call(t,e)){if(!n)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function i(t,e){for(var r=0;r<e;++r)t[r]=255*Math.random()|0;return t}function a(){var t=function(t){if("function"==typeof Uint8Array){var e=new Uint8Array(t);return"undefined"!=typeof crypto?crypto.getRandomValues(e):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(e):i(e,t),e}return i(new Array(t),t)}(16);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var e="",r=0;r<16;++r){var n=t[r];4!==r&&6!==r&&8!==r||(e+="-"),n<16&&(e+="0"),e+=n.toString(16).toLowerCase()}return e}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,l=function(){var t;return!m(p)&&k(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[p]),m(t)&&(t=function(){var t,r,n,o;m(p)||void 0===e.Reflect||p in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,r=t.hasOwnMetadata,n=t.getOwnMetadata,o=t.getOwnMetadataKeys,i=t.deleteMetadata,a=new d;return{isProviderFor:function(t,e){var r=a.get(t);return!(m(r)||!r.has(e))||!!o(t,e).length&&(m(r)&&(r=new h,a.set(t,r)),r.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:i}}(e.Reflect));var i=new d,a={registerProvider:u,getProvider:c,setProvider:l};return a;function u(e){if(!Object.isExtensible(a))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case m(r):r=e;break;case r===e:break;case m(n):n=e;break;case n===e:break;default:void 0===o&&(o=new h),o.add(e)}}function f(e,i){if(!m(r)){if(r.isProviderFor(e,i))return r;if(!m(n)){if(n.isProviderFor(e,i))return r;if(!m(o))for(var a=U(o);;){var u=N(a);if(!u)return;var f=K(u);if(f.isProviderFor(e,i))return L(a),f}}}if(!m(t)&&t.isProviderFor(e,i))return t}function c(t,e){var r,n=i.get(t);return m(n)||(r=n.get(e)),m(r)?(m(r=f(t,e))||(m(n)&&(n=new y,i.set(t,n)),n.set(e,r)),r):r}function s(t){if(m(t))throw new TypeError;return r===t||n===t||!m(o)&&o.has(t)}function l(t,e,r){if(!s(r))throw new Error("Metadata provider not registered.");var n=c(t,e);if(n!==r){if(!m(n))return!1;var o=i.get(t);m(o)&&(o=new y,i.set(t,o)),o.set(e,r)}return!0}}()),!m(p)&&k(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),v=function(t){var e=new d,r={isProviderFor:function(t,r){var n=e.get(t);return!m(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(t,e,r,o){n(r,o,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,r){var o=n(e,r,!1);return!m(o)&&S(o.has(t))},OrdinaryGetOwnMetadata:function(t,e,r){var o=n(e,r,!1);if(!m(o))return o.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var r=[],o=n(t,e,!1);if(m(o))return r;for(var i=U(o.keys()),a=0;;){var u=N(i);if(!u)return r.length=a,r;var f=K(u);try{r[a]=f}catch(t){try{L(i)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,r,o){var i=n(r,o,!1);if(m(i))return!1;if(!i.delete(t))return!1;if(0===i.size){var a=e.get(r);m(a)||(a.delete(o),0===a.size&&e.delete(a))}return!0}};return l.registerProvider(r),r;function n(n,o,i){var a=e.get(n),u=!1;if(m(a)){if(!i)return;a=new y,e.set(n,a),u=!0}var f=a.get(o);if(m(f)){if(!i)return;if(f=new y,a.set(o,f),!t.setProvider(n,o,r))throw a.delete(o),u&&e.delete(n),new Error("Wrong provider for target.")}return f}}(l);function w(t,e,r){if(_(t,e,r))return!0;var n=G(e);return!P(n)&&w(t,n,r)}function _(t,e,r){var n=F(e,r,!1);return!m(n)&&S(n.OrdinaryHasOwnMetadata(t,e,r))}function g(t,e,r){if(_(t,e,r))return O(t,e,r);var n=G(e);return P(n)?void 0:g(t,n,r)}function O(t,e,r){var n=F(e,r,!1);if(!m(n))return n.OrdinaryGetOwnMetadata(t,e,r)}function E(t,e,r,n){F(r,n,!0).OrdinaryDefineOwnMetadata(t,e,r,n)}function T(t,e){var r=b(t,e),n=G(t);if(null===n)return r;var o=T(n,e);if(o.length<=0)return r;if(r.length<=0)return o;for(var i=new h,a=[],u=0,f=r;u<f.length;u++){var c=f[u];i.has(c)||(i.add(c),a.push(c))}for(var s=0,y=o;s<y.length;s++)c=y[s],i.has(c)||(i.add(c),a.push(c));return a}function b(t,e){var r=F(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}function M(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function m(t){return void 0===t}function P(t){return null===t}function k(t){return"object"==typeof t?null!==t:"function"==typeof t}function R(t,e){switch(M(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var r=3===e?"string":5===e?"number":"default",n=I(t,o);if(void 0!==n){var i=n.call(t,r);if(k(i))throw new TypeError;return i}return function(t,e){if("string"===e){var r=t.toString;if(A(r)&&!k(o=r.call(t)))return o;if(A(n=t.valueOf)&&!k(o=n.call(t)))return o}else{var n;if(A(n=t.valueOf)&&!k(o=n.call(t)))return o;var o,i=t.toString;if(A(i)&&!k(o=i.call(t)))return o}throw new TypeError}(t,"default"===r?"number":r)}function S(t){return!!t}function x(t){var e=R(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function j(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function A(t){return"function"==typeof t}function C(t){return"function"==typeof t}function D(t,e){return t===e||t!=t&&e!=e}function I(t,e){var r=t[e];if(null!=r){if(!A(r))throw new TypeError;return r}}function U(t){var e=I(t,i);if(!A(e))throw new TypeError;var r=e.call(t);if(!k(r))throw new TypeError;return r}function K(t){return t.value}function N(t){var e=t.next();return!e.done&&e}function L(t){var e=t.return;e&&e.call(t)}function G(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===s)return e;if(e!==s)return e;var r=t.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return e;var o=n.constructor;return"function"!=typeof o||o===t?e:o}function F(t,e,r){var n=l.getProvider(t,e);if(!m(n))return n;if(r){if(l.setProvider(t,e,v))return v;throw new Error("Illegal state.")}}function H(t){return t.__=void 0,delete t.__,t}t("decorate",function(t,e,r,n){if(m(r)){if(!j(t))throw new TypeError;if(!C(e))throw new TypeError;return function(t,e){for(var r=t.length-1;r>=0;--r){var n=(0,t[r])(e);if(!m(n)&&!P(n)){if(!C(n))throw new TypeError;e=n}}return e}(t,e)}if(!j(t))throw new TypeError;if(!k(e))throw new TypeError;if(!k(n)&&!m(n)&&!P(n))throw new TypeError;return P(n)&&(n=void 0),function(t,e,r,n){for(var o=t.length-1;o>=0;--o){var i=(0,t[o])(e,r,n);if(!m(i)&&!P(i)){if(!k(i))throw new TypeError;n=i}}return n}(t,e,r=x(r),n)}),t("metadata",function(t,e){return function(r,n){if(!k(r))throw new TypeError;if(!m(n)&&!function(t){switch(M(t)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;E(t,e,r,n)}}),t("defineMetadata",function(t,e,r,n){if(!k(r))throw new TypeError;return m(n)||(n=x(n)),E(t,e,r,n)}),t("hasMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=x(r)),w(t,e,r)}),t("hasOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=x(r)),_(t,e,r)}),t("getMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=x(r)),g(t,e,r)}),t("getOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=x(r)),O(t,e,r)}),t("getMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=x(e)),T(t,e)}),t("getOwnMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=x(e)),b(t,e)}),t("deleteMetadata",function(t,e,r){if(!k(e))throw new TypeError;if(m(r)||(r=x(r)),!k(e))throw new TypeError;m(r)||(r=x(r));var n=F(e,r,!1);return!m(n)&&n.OrdinaryDeleteMetadata(t,e,r)})}(r,e),void 0===e.Reflect&&(e.Reflect=t)}()}(t||(t={}))}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};r.d(n,{Ay:()=>o.Ay,D9:()=>o.D9,Df:()=>o.Df,Fz:()=>o.Fz,L3:()=>o.L3,LO:()=>o.LO,Ro:()=>o.Ro,SJ:()=>o.SJ,Sl:()=>o.Sl,Uc:()=>o.Uc,Vx:()=>o.Vx,Y:()=>o.Y,Yu:()=>o.Yu,ZD:()=>o.ZD,Zy:()=>o.Zy,_P:()=>o._P,aK:()=>o.aK,a_:()=>o.a_,cr:()=>o.cr,fG:()=>o.fG,ft:()=>o.ft,hZ:()=>o.hZ,hg:()=>o.hg,kl:()=>o.kl,lw:()=>o.lw,mI:()=>o.mI,nw:()=>o.nw,oB:()=>o.oB,q4:()=>o.q4,rX:()=>o.rX,sp:()=>o.sp});var o=r(9108);const i=n.hg,a=n.SJ,u=n.fG,f=n.Vx,c=n.lw,s=n.D9,y=n.LO,h=n.Uc,d=n._P,p=n.q4,l=n.cr,v=n.ZD,w=n.aK,_=n.sp,g=n.L3,O=n.Zy,E=n.Y,T=n.ft,b=n.Sl,M=n.hZ,m=n.oB,P=n.nw,k=n.mI,R=n.Df,S=n.Ay,x=n.a_,j=n.rX,A=n.kl,C=n.Ro,D=n.Yu,I=n.Fz;export{i as CONNECT,a as DELETE,u as GET,f as HEAD,c as OPTIONS,s as PATCH,y as POST,h as PUT,d as TRACE,p as UrlMapping,l as UrlMappingSituationType,v as getCONNECT,w as getCONNECTS,_ as getDELETE,g as getDELETES,O as getGET,E as getGETS,T as getHEAD,b as getHEADS,M as getOPTIONS,m as getOPTIONSS,P as getPATCH,k as getPATCHS,R as getPOST,S as getPOSTS,x as getPUT,j as getPUTS,A as getTRACE,C as getTRACES,D as getUrlMapping,I as getUrlMappings};
|
|
1
|
+
export * from "./MethodMapping.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpHeaders } from "../codes/HttpHeaders.js";
|
|
2
|
+
class CrossDomainHeaderEndPoint {
|
|
3
|
+
constructor(config) {
|
|
4
|
+
this.config = config;
|
|
5
|
+
}
|
|
6
|
+
/*
|
|
7
|
+
rr.resSetHeader("Access-Control-Allow-Origin", "*")
|
|
8
|
+
rr.resSetHeader("Access-Control-Allow-Methods", "DELETE, POST, GET, OPTIONS")
|
|
9
|
+
rr.resSetHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With")
|
|
10
|
+
*/
|
|
11
|
+
async endPoint(rr, app) {
|
|
12
|
+
if (this.config?.accessControlAllowOrigin) {
|
|
13
|
+
rr.resSetHeader(HttpHeaders.AccessControlAllowOrigin, Array.isArray(this.config.accessControlAllowOrigin) ? this.config.accessControlAllowOrigin.join(", ") : this.config.accessControlAllowOrigin);
|
|
14
|
+
}
|
|
15
|
+
if (this.config?.accessControlAllowMethods) {
|
|
16
|
+
rr.resSetHeader(HttpHeaders.AccessControlAllowMethods, Array.isArray(this.config.accessControlAllowMethods) ? this.config.accessControlAllowMethods.join(", ") : this.config.accessControlAllowMethods);
|
|
17
|
+
}
|
|
18
|
+
if (this.config?.accessControlAllowHeaders) {
|
|
19
|
+
rr.resSetHeader(HttpHeaders.AccessControlAllowHeaders, Array.isArray(this.config.accessControlAllowHeaders) ? this.config.accessControlAllowHeaders.join(", ") : this.config.accessControlAllowHeaders);
|
|
20
|
+
}
|
|
21
|
+
if (this.config?.accessControlExposeHeaders) {
|
|
22
|
+
rr.resSetHeader(HttpHeaders.AccessControlExposeHeaders, Array.isArray(this.config.accessControlExposeHeaders) ? this.config.accessControlExposeHeaders.join(", ") : this.config.accessControlExposeHeaders);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async onInit(app) {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
CrossDomainHeaderEndPoint
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=CrossDomainHeaderEndPoint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/endpoints/CrossDomainHeaderEndPoint.ts"],
|
|
4
|
+
"sourcesContent": ["import {EndPoint} from './EndPoint';\nimport {SimpleBootHttpServer} from '../SimpleBootHttpServer';\nimport {RequestResponse} from '../models/RequestResponse';\nimport { HttpHeaders } from '../codes/HttpHeaders';\n\nexport type CrossDomainHeaderEndPointConfig = {\n accessControlAllowOrigin?: string | string[],\n accessControlAllowMethods?: string | string[],\n accessControlAllowHeaders?: string | string[],\n accessControlExposeHeaders?: string | string[]\n}\nexport class CrossDomainHeaderEndPoint implements EndPoint {\n constructor(private config?: CrossDomainHeaderEndPointConfig) {\n }\n\n /*\n rr.resSetHeader(\"Access-Control-Allow-Origin\", \"*\")\n rr.resSetHeader(\"Access-Control-Allow-Methods\", \"DELETE, POST, GET, OPTIONS\")\n rr.resSetHeader(\"Access-Control-Allow-Headers\", \"Content-Type, Authorization, X-Requested-With\")\n */\n async endPoint(rr: RequestResponse, app: SimpleBootHttpServer) {\n if (this.config?.accessControlAllowOrigin) {\n rr.resSetHeader(HttpHeaders.AccessControlAllowOrigin, Array.isArray(this.config.accessControlAllowOrigin) ? this.config.accessControlAllowOrigin.join(', ') : this.config.accessControlAllowOrigin);\n }\n if (this.config?.accessControlAllowMethods) {\n rr.resSetHeader(HttpHeaders.AccessControlAllowMethods, Array.isArray(this.config.accessControlAllowMethods) ? this.config.accessControlAllowMethods.join(', ') : this.config.accessControlAllowMethods);\n }\n if (this.config?.accessControlAllowHeaders) {\n rr.resSetHeader(HttpHeaders.AccessControlAllowHeaders, Array.isArray(this.config.accessControlAllowHeaders) ? this.config.accessControlAllowHeaders.join(', ') : this.config.accessControlAllowHeaders);\n }\n if (this.config?.accessControlExposeHeaders) {\n rr.resSetHeader(HttpHeaders.AccessControlExposeHeaders, Array.isArray(this.config.accessControlExposeHeaders) ? this.config.accessControlExposeHeaders.join(', ') : this.config.accessControlExposeHeaders);\n }\n }\n\n async onInit(app: SimpleBootHttpServer) {\n }\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,mBAAmB;AAQrB,MAAM,0BAA8C;AAAA,EACvD,YAAoB,QAA0C;AAA1C;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,SAAS,IAAqB,KAA2B;AAC3D,QAAI,KAAK,QAAQ,0BAA0B;AACvC,SAAG,aAAa,YAAY,0BAA0B,MAAM,QAAQ,KAAK,OAAO,wBAAwB,IAAI,KAAK,OAAO,yBAAyB,KAAK,IAAI,IAAI,KAAK,OAAO,wBAAwB;AAAA,IACtM;AACA,QAAI,KAAK,QAAQ,2BAA2B;AACxC,SAAG,aAAa,YAAY,2BAA2B,MAAM,QAAQ,KAAK,OAAO,yBAAyB,IAAI,KAAK,OAAO,0BAA0B,KAAK,IAAI,IAAI,KAAK,OAAO,yBAAyB;AAAA,IAC1M;AACA,QAAI,KAAK,QAAQ,2BAA2B;AACxC,SAAG,aAAa,YAAY,2BAA2B,MAAM,QAAQ,KAAK,OAAO,yBAAyB,IAAI,KAAK,OAAO,0BAA0B,KAAK,IAAI,IAAI,KAAK,OAAO,yBAAyB;AAAA,IAC1M;AACA,QAAI,KAAK,QAAQ,4BAA4B;AACzC,SAAG,aAAa,YAAY,4BAA4B,MAAM,QAAQ,KAAK,OAAO,0BAA0B,IAAI,KAAK,OAAO,2BAA2B,KAAK,IAAI,IAAI,KAAK,OAAO,0BAA0B;AAAA,IAC9M;AAAA,EACJ;AAAA,EAEA,MAAM,OAAO,KAA2B;AAAA,EACxC;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=EndPoint.js.map
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
class HeaderEndPoint {
|
|
2
|
+
constructor(headers) {
|
|
3
|
+
this.headers = headers;
|
|
4
|
+
}
|
|
5
|
+
async endPoint(rr, app) {
|
|
6
|
+
if (this.headers) {
|
|
7
|
+
rr.resSetHeaders(this.headers);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
async onInit(app) {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
HeaderEndPoint
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=HeaderEndPoint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/endpoints/HeaderEndPoint.ts"],
|
|
4
|
+
"sourcesContent": ["import {EndPoint} from './EndPoint';\nimport {SimpleBootHttpServer} from '../SimpleBootHttpServer';\nimport {RequestResponse} from '../models/RequestResponse';\n\nexport class HeaderEndPoint implements EndPoint {\n constructor(private headers?: { [key: string]: string | string[] }) {\n }\n\n async endPoint(rr: RequestResponse, app: SimpleBootHttpServer) {\n if (this.headers) {\n rr.resSetHeaders(this.headers);\n }\n }\n\n async onInit(app: SimpleBootHttpServer) {\n }\n}\n"],
|
|
5
|
+
"mappings": "AAIO,MAAM,eAAmC;AAAA,EAC5C,YAAoB,SAAgD;AAAhD;AAAA,EACpB;AAAA,EAEA,MAAM,SAAS,IAAqB,KAA2B;AAC3D,QAAI,KAAK,SAAS;AACd,SAAG,cAAc,KAAK,OAAO;AAAA,IACjC;AAAA,EACJ;AAAA,EAEA,MAAM,OAAO,KAA2B;AAAA,EACxC;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./CrossDomainHeaderEndPoint.js";
|
|
2
|
+
export * from "./EndPoint.js";
|
|
3
|
+
export * from "./HeaderEndPoint.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/endpoints/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './CrossDomainHeaderEndPoint';\nexport * from './EndPoint';\nexport * from './HeaderEndPoint';\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpError } from "./HttpError.js";
|
|
2
|
+
import { HttpStatus } from "../codes/HttpStatus.js";
|
|
3
|
+
class BadRequestError extends HttpError {
|
|
4
|
+
constructor({ status = HttpStatus.BadRequest, message = "Bad Request" } = {}) {
|
|
5
|
+
super({ status, message });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
BadRequestError
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=BadRequestError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/BadRequestError.ts"],
|
|
4
|
+
"sourcesContent": ["import {HttpError} from './HttpError';\nimport {HttpStatus} from '../codes/HttpStatus';\n\nexport class BadRequestError extends HttpError {\n constructor({status = HttpStatus.BadRequest, message = 'Bad Request'}: {status?: number, message?: string} = {}) {\n super({status, message});\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAElB,MAAM,wBAAwB,UAAU;AAAA,EAC3C,YAAY,EAAC,SAAS,WAAW,YAAY,UAAU,cAAa,IAAyC,CAAC,GAAG;AAC7G,UAAM,EAAC,QAAQ,QAAO,CAAC;AAAA,EAC3B;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpError } from "./HttpError.js";
|
|
2
|
+
import { HttpStatus } from "../codes/HttpStatus.js";
|
|
3
|
+
class ForbiddenError extends HttpError {
|
|
4
|
+
constructor({ status = HttpStatus.Forbidden, message = "Forbidden" } = {}) {
|
|
5
|
+
super({ status, message });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
ForbiddenError
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=ForbiddenError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/ForbiddenError.ts"],
|
|
4
|
+
"sourcesContent": ["import {HttpError} from './HttpError';\nimport {HttpStatus} from '../codes/HttpStatus';\n\nexport class ForbiddenError extends HttpError {\n constructor({status = HttpStatus.Forbidden, message = 'Forbidden'}: {status?: number, message?: string} = {}) {\n super({status, message});\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAElB,MAAM,uBAAuB,UAAU;AAAA,EAC1C,YAAY,EAAC,SAAS,WAAW,WAAW,UAAU,YAAW,IAAyC,CAAC,GAAG;AAC1G,UAAM,EAAC,QAAQ,QAAO,CAAC;AAAA,EAC3B;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
class HttpError {
|
|
2
|
+
name = "Error";
|
|
3
|
+
message;
|
|
4
|
+
stack;
|
|
5
|
+
data;
|
|
6
|
+
status;
|
|
7
|
+
constructor({ status, message = "HttpError" }) {
|
|
8
|
+
this.message = message;
|
|
9
|
+
this.status = status;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
HttpError
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=HttpError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/HttpError.ts"],
|
|
4
|
+
"sourcesContent": ["\nexport class HttpError {\n name: string = 'Error'\n message: string;\n stack?: string\n data?: any;\n public status: number;\n\n constructor({status, message = 'HttpError'}: { status: number, message?: string }) {\n // super(message);\n this.message = message;\n this.status = status;\n }\n}\n"],
|
|
5
|
+
"mappings": "AACO,MAAM,UAAU;AAAA,EACnB,OAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACO;AAAA,EAEP,YAAY,EAAC,QAAQ,UAAU,YAAW,GAAyC;AAE/E,SAAK,UAAU;AACf,SAAK,SAAS;AAAA,EAClB;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpError } from "./HttpError.js";
|
|
2
|
+
import { HttpStatus } from "../codes/HttpStatus.js";
|
|
3
|
+
class InternalServerError extends HttpError {
|
|
4
|
+
constructor({ status = HttpStatus.InternalServerError, message = "Internal Server Error" } = {}) {
|
|
5
|
+
super({ status, message });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
InternalServerError
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=InternalServerError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/InternalServerError.ts"],
|
|
4
|
+
"sourcesContent": ["import {HttpError} from './HttpError';\nimport {HttpStatus} from '../codes/HttpStatus';\n\nexport class InternalServerError extends HttpError {\n constructor({status = HttpStatus.InternalServerError, message = 'Internal Server Error'}: {status?: number, message?: string} = {}) {\n super({status, message});\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAElB,MAAM,4BAA4B,UAAU;AAAA,EAC/C,YAAY,EAAC,SAAS,WAAW,qBAAqB,UAAU,wBAAuB,IAAyC,CAAC,GAAG;AAChI,UAAM,EAAC,QAAQ,QAAO,CAAC;AAAA,EAC3B;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpError } from "./HttpError.js";
|
|
2
|
+
import { HttpStatus } from "../codes/HttpStatus.js";
|
|
3
|
+
class NotFoundError extends HttpError {
|
|
4
|
+
constructor({ status = HttpStatus.NotFound, message = "Not Found" } = {}) {
|
|
5
|
+
super({ status, message });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
NotFoundError
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=NotFoundError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/NotFoundError.ts"],
|
|
4
|
+
"sourcesContent": ["import {HttpError} from './HttpError';\nimport {HttpStatus} from '../codes/HttpStatus';\n\nexport class NotFoundError extends HttpError {\n constructor({status = HttpStatus.NotFound, message = 'Not Found'}: {status?: number, message?: string} = {}) {\n super({status, message});\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAElB,MAAM,sBAAsB,UAAU;AAAA,EACzC,YAAY,EAAC,SAAS,WAAW,UAAU,UAAU,YAAW,IAAyC,CAAC,GAAG;AACzG,UAAM,EAAC,QAAQ,QAAO,CAAC;AAAA,EAC3B;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpError } from "./HttpError.js";
|
|
2
|
+
import { HttpStatus } from "../codes/HttpStatus.js";
|
|
3
|
+
class UnauthorizedError extends HttpError {
|
|
4
|
+
constructor({ status = HttpStatus.Unauthorized, message = "Unauthorized" } = {}) {
|
|
5
|
+
super({ status, message });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
UnauthorizedError
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=UnauthorizedError.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/UnauthorizedError.ts"],
|
|
4
|
+
"sourcesContent": ["import {HttpError} from './HttpError';\nimport {HttpStatus} from '../codes/HttpStatus';\n\nexport class UnauthorizedError extends HttpError {\n constructor({status = HttpStatus.Unauthorized, message = 'Unauthorized'}: {status?: number, message?: string} = {}) {\n super({status, message});\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAElB,MAAM,0BAA0B,UAAU;AAAA,EAC7C,YAAY,EAAC,SAAS,WAAW,cAAc,UAAU,eAAc,IAAyC,CAAC,GAAG;AAChH,UAAM,EAAC,QAAQ,QAAO,CAAC;AAAA,EAC3B;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/errors/index.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./BadRequestError.js";
|
|
2
|
+
export * from "./ForbiddenError.js";
|
|
3
|
+
export * from "./HttpError.js";
|
|
4
|
+
export * from "./InternalServerError.js";
|
|
5
|
+
export * from "./NotFoundError.js";
|
|
6
|
+
export * from "./UnauthorizedError.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/errors/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './BadRequestError';\nexport * from './ForbiddenError';\nexport * from './HttpError';\nexport * from './InternalServerError';\nexport * from './NotFoundError';\nexport * from './UnauthorizedError';\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,127 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";var t={426:(e,t,i)=>{i.d(t,{T:()=>s});var r,o={d:(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n={};o.d(n,{T:()=>r}),function(e){e.toString=function(e,t){return null==e?"":"string"==typeof e?e:e.toString(t?.encoding??"utf-8",t?.start,t?.end)},e.toBuffer=(e,t)=>"base64"===t?.encoding?(e=e.split(";base64,").pop()||"",Buffer.from(e,"base64")):Buffer.from(e)}(r||(r={}));const s=n.T},889:(e,t,i)=>{i.d(t,{n:()=>l});var r={9284:(e,t,i)=>{var r;i.d(t,{U:()=>r}),function(e){e.isArrowFunction=e=>"function"==typeof e&&void 0===e.prototype&&!e.toString().startsWith("class"),e.isPlainObject=e=>null!==e&&"object"==typeof e&&e.constructor===Object,e.isFrozen=e=>Object.isFrozen(e),e.isSealed=e=>Object.isSealed(e),e.isFrozenOrSealed=t=>e.isFrozen(t)||e.isSealed(t),e.isFrozenAndSealed=t=>e.isFrozen(t)&&e.isSealed(t),e.isNotFrozen=e=>!Object.isFrozen(e),e.isNotSealed=e=>!Object.isSealed(e),e.isNotFrozenOrSealed=t=>!e.isFrozen(t)&&!e.isSealed(t),e.isNotFrozenAndSealed=t=>!e.isFrozen(t)||!e.isSealed(t),e.isNullOrUndefined=e=>null==e||void 0===e,e.isConstructor=e=>"function"==typeof e&&void 0!==e.prototype&&e.prototype.constructor===e,e.isFunction=t=>"function"==typeof t&&!e.isConstructor(t),e.isNullish=t=>e.isNotNullish(t),e.isNotNullish=t=>Array.isArray(t)||e.isString(t)?t.length>0:t instanceof Set||t instanceof Map?t.size>0:"object"==typeof t&&null!==t?Object.keys(t).length>0:null!=t,e.isNotNullUndefined=e=>null!=e,e.isNull=e=>null===e,e.isUndefined=e=>void 0===e,e.isArray=t=>!e.isNullOrUndefined(t)&&"[object Array]"===Object.prototype.toString.call(t).trim(),e.isStringNumber=e=>"number"==typeof e?!isNaN(e):"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e)),e.isNumber=t=>!e.isNullOrUndefined(t)&&"[object Number]"===Object.prototype.toString.call(t).trim(),e.isIterator=e=>null!=e&&"function"==typeof e[Symbol.iterator],e.isString=t=>!e.isNullOrUndefined(t)&&"[object String]"===Object.prototype.toString.call(t).trim(),e.isObject=t=>!e.isNullOrUndefined(t)&&"[object Object]"===Object.prototype.toString.call(t).trim(),e.isMap=t=>!e.isNullOrUndefined(t)&&"[object Map]"===Object.prototype.toString.call(t).trim(),e.isEmpty=t=>!!e.isNullOrUndefined(t)||(e.isArray(t)?0===t.length:e.isString(t)?0===t.trim().length:e.isMap(t)?0===t.size:!!e.isObject(t)&&0===Object.keys(t).length),e.isSet=e=>e instanceof Set,e.isNullishFiltered=e=>Array.isArray(e)?e.every(e=>null!=e):null!=e,e.isFalsyFiltered=e=>Array.isArray(e)?e.every(e=>e):!!e,e.includeValue=(e,t)=>Object.values(e).includes(t),e.includeKey=(e,t)=>Object.keys(e).includes(t),e.lastConsonantLetter=e=>(e.charCodeAt(e.length-1)-44032)%28>0,e.inRange=(e,t,i)=>t<=e&&e<=i,e.isBase64=e=>{let t=e;const i=e.split(";base64,");if(i.length>1)t=i[1];else if(e.startsWith("data:")){const i=e.indexOf(",");i>-1&&(t=e.substring(i+1))}return""===t||t.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}}(r||(r={}))}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s={};n.d(s,{n:()=>a});var a,c=n(9284);!function(e){e.uniqueInts=(t,i,r)=>{const o=[];if(r>i-t)throw new Error("Count is greater than the range of unique integers");for(;o.length<r;){const r=e.int(t,i);o.includes(r)||o.push(r)}return o},e.chance=e=>{if(e<0||e>1)throw new Error("Percentage must be between 0 and 1");return Math.random()<e},e.int=(t,i)=>Math.floor(e.float(t,i)),e.float=(e,t)=>c.U.isNullOrUndefined(e)?Math.random():!c.U.isNullOrUndefined(e)&&c.U.isNullOrUndefined(t)?Math.random()*(e||0):Math.random()*((t||0)-(e||0))+(e||0),e.uuid=(e="xxxx-xxxx-xxxx-xxxx")=>e.replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),e.uuid4=()=>{let e,t="";for(e=0;e<32;e+=1)switch(e){case 8:case 20:t+="-",t+=(16*Math.random()|0).toString(16);break;case 12:t+="-",t+="4";break;case 16:t+="-",t+=(4*Math.random()|8).toString(16);break;default:t+=(16*Math.random()|0).toString(16)}return t},e.hex=()=>{const e="0123456789ABCDEF".split("");let t="";for(let i=0;i<6;i++)t+=e[Math.floor(16*Math.random())];return t},e.rgb=()=>{const e="0123456789ABCDEF".split("");let t="#";for(let i=0;i<6;i++)t+=e[Math.floor(16*Math.random())];return t},e.rgba=()=>{const e="0123456789ABCDEF".split("");let t="#";for(let i=0;i<8;i++)t+=e[Math.floor(16*Math.random())];return t},e.alphabet=e=>{const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let i="";for(let r=0;r<e;r++)i+=t[Math.floor(Math.random()*t.length)];return i}}(a||(a={}));const l=s.n},3055:(t,i,r)=>{r.d(i,{i:()=>y});const o=e(import.meta.url)("node:module"),n=(0,o.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:os"),s=(0,o.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:fs"),a=(0,o.createRequire)("file:///Users/hyunhakim/workspace/dooboostore/source/dooboostore-develop/dooboostore-develop.github.io/source/packages/@dooboostore/core-node/dist/esm/file/FileUtils.js")("node:path");var c={9284:(e,t,i)=>{var r;i.d(t,{U:()=>r}),function(e){e.isArrowFunction=e=>"function"==typeof e&&void 0===e.prototype&&!e.toString().startsWith("class"),e.isPlainObject=e=>null!==e&&"object"==typeof e&&e.constructor===Object,e.isFrozen=e=>Object.isFrozen(e),e.isSealed=e=>Object.isSealed(e),e.isFrozenOrSealed=t=>e.isFrozen(t)||e.isSealed(t),e.isFrozenAndSealed=t=>e.isFrozen(t)&&e.isSealed(t),e.isNotFrozen=e=>!Object.isFrozen(e),e.isNotSealed=e=>!Object.isSealed(e),e.isNotFrozenOrSealed=t=>!e.isFrozen(t)&&!e.isSealed(t),e.isNotFrozenAndSealed=t=>!e.isFrozen(t)||!e.isSealed(t),e.isNullOrUndefined=e=>null==e||void 0===e,e.isConstructor=e=>"function"==typeof e&&void 0!==e.prototype&&e.prototype.constructor===e,e.isFunction=t=>"function"==typeof t&&!e.isConstructor(t),e.isNullish=t=>e.isNotNullish(t),e.isNotNullish=t=>Array.isArray(t)||e.isString(t)?t.length>0:t instanceof Set||t instanceof Map?t.size>0:"object"==typeof t&&null!==t?Object.keys(t).length>0:null!=t,e.isNotNullUndefined=e=>null!=e,e.isNull=e=>null===e,e.isUndefined=e=>void 0===e,e.isArray=t=>!e.isNullOrUndefined(t)&&"[object Array]"===Object.prototype.toString.call(t).trim(),e.isStringNumber=e=>"number"==typeof e?!isNaN(e):"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e)),e.isNumber=t=>!e.isNullOrUndefined(t)&&"[object Number]"===Object.prototype.toString.call(t).trim(),e.isIterator=e=>null!=e&&"function"==typeof e[Symbol.iterator],e.isString=t=>!e.isNullOrUndefined(t)&&"[object String]"===Object.prototype.toString.call(t).trim(),e.isObject=t=>!e.isNullOrUndefined(t)&&"[object Object]"===Object.prototype.toString.call(t).trim(),e.isMap=t=>!e.isNullOrUndefined(t)&&"[object Map]"===Object.prototype.toString.call(t).trim(),e.isEmpty=t=>!!e.isNullOrUndefined(t)||(e.isArray(t)?0===t.length:e.isString(t)?0===t.trim().length:e.isMap(t)?0===t.size:!!e.isObject(t)&&0===Object.keys(t).length),e.isSet=e=>e instanceof Set,e.isNullishFiltered=e=>Array.isArray(e)?e.every(e=>null!=e):null!=e,e.isFalsyFiltered=e=>Array.isArray(e)?e.every(e=>e):!!e,e.includeValue=(e,t)=>Object.values(e).includes(t),e.includeKey=(e,t)=>Object.keys(e).includes(t),e.lastConsonantLetter=e=>(e.charCodeAt(e.length-1)-44032)%28>0,e.inRange=(e,t,i)=>t<=e&&e<=i,e.isBase64=e=>{let t=e;const i=e.split(";base64,");if(i.length>1)t=i[1];else if(e.startsWith("data:")){const i=e.indexOf(",");i>-1&&(t=e.substring(i+1))}return""===t||t.length,/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}}(r||(r={}))}},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[e]={exports:{}};return c[e](i,i.exports,d),i.exports}d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var h={};d.d(h,{n:()=>u});var u,p,f=d(9284);(p=u||(u={})).uniqueInts=(e,t,i)=>{const r=[];if(i>t-e)throw new Error("Count is greater than the range of unique integers");for(;r.length<i;){const i=p.int(e,t);r.includes(i)||r.push(i)}return r},p.chance=e=>{if(e<0||e>1)throw new Error("Percentage must be between 0 and 1");return Math.random()<e},p.int=(e,t)=>Math.floor(p.float(e,t)),p.float=(e,t)=>f.U.isNullOrUndefined(e)?Math.random():!f.U.isNullOrUndefined(e)&&f.U.isNullOrUndefined(t)?Math.random()*(e||0):Math.random()*((t||0)-(e||0))+(e||0),p.uuid=(e="xxxx-xxxx-xxxx-xxxx")=>e.replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),p.uuid4=()=>{let e,t="";for(e=0;e<32;e+=1)switch(e){case 8:case 20:t+="-",t+=(16*Math.random()|0).toString(16);break;case 12:t+="-",t+="4";break;case 16:t+="-",t+=(4*Math.random()|8).toString(16);break;default:t+=(16*Math.random()|0).toString(16)}return t},p.hex=()=>{const e="0123456789ABCDEF".split("");let t="";for(let i=0;i<6;i++)t+=e[Math.floor(16*Math.random())];return t},p.rgb=()=>{const e="0123456789ABCDEF".split("");let t="#";for(let i=0;i<6;i++)t+=e[Math.floor(16*Math.random())];return t},p.rgba=()=>{const e="0123456789ABCDEF".split("");let t="#";for(let i=0;i<8;i++)t+=e[Math.floor(16*Math.random())];return t},p.alphabet=e=>{const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let i="";for(let r=0;r<e;r++)i+=t[Math.floor(Math.random()*t.length)];return i};const g=h.n;var y;!function(e){class t{constructor(e){this._data=e,this.updateStats()}get originalName(){return this._data.originalName}get directory(){return this._data.path.substring(0,this._data.path.lastIndexOf("/"))}get fileName(){return this._data.path.substring(this._data.path.lastIndexOf("/")+1)}get path(){return this._data.path}get extension(){const e=this._data.path.substring(this._data.path.lastIndexOf(".")+1);return e.length>0?e:void 0}async updateStats(){const e=await s.promises.stat(this._data.path);this.size=e.size}async delete(){await s.promises.unlink(this._data.path),this._data.path="",this.size=void 0}async copy(e){await s.promises.copyFile(this._data.path,e),this._data.path=e,this.size=(await s.promises.stat(e)).size}async move(e){const t=e.substring(0,e.lastIndexOf("/"));await s.promises.mkdir(t,{recursive:!0}),await s.promises.rename(this._data.path,e),this._data.path=e,this.size=(await s.promises.stat(e)).size}async rename(e){const t=`${this.directory}/${e}`;await s.promises.rename(this._data.path,t),this.size=(await s.promises.stat(t)).size,this._data.path=t}}e.File=t,e.writeFile=async(e,i)=>(i.path??(i.path=`${n.tmpdir()}/${g.uuid4()}_${Date.now()}`),await s.promises.mkdir(i.path.substring(0,i.path.lastIndexOf("/")),{recursive:!0}),await s.promises.writeFile(i.path,e),new t({path:i.path,originalName:i.originalName})),e.path=e=>Array.isArray(e)?a.join(...e):e,e.existsSync=(t,i)=>{const r=e.path(t);return s.existsSync(r)?(i?.existes?.(r),!0):(i?.noExistes?.(r),!1)},e.mkdirSync=(t,i)=>{e.existsSync(t,{noExistes:e=>{s.mkdirSync(e,i)}})},e.mkdir=async(t,i)=>new Promise((r,o)=>{e.existsSync(t,{noExistes:e=>{s.mkdirSync(e,i),r(e)},existes:e=>{r(e)}})}),e.readSync=(t,i)=>{const r=e.path(t);return i?.option?s.readFileSync(r,i.option):s.readFileSync(r)},e.read=async(t,i)=>{const r=e.path(t);return s.readFile(r,i.option)},e.write=(t,i)=>{const r=e.path(i.path);return i.options?s.writeFileSync(r,t,i.options):s.writeFileSync(r,t),r},e.writeAppend=(t,i)=>{const r=e.path(i.path);return i.options?s.appendFileSync(r,t,i.options):s.appendFileSync(r,t),r},e.deleteSync=(t,i)=>{const r=e.path(t);e.existsSync(r)&&(i?.options?s.rmSync(r,i?.options):s.rmSync(r))},e.deleteDirSync=(t,i)=>{const r=e.path(t);e.existsSync(r)&&(i?.options?s.rmdirSync(r,i?.options):s.rmdirSync(r))},e.deleteFileSync=t=>{const i=e.path(t);e.existsSync(i)&&s.unlinkSync(i)},e.copySync=(t,i,r)=>{const o=e.path(t),n=e.path(i);s.cpSync(o,n,r)}}(y||(y={}))}},i={};function r(e){var o=i[e];if(void 0!==o)return o.exports;var n=i[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};r.d(o,{d:()=>c});var n=r(3055),s=r(426),a=r(889);class c{constructor(e){this.config=e,this.storage=new Map,e.config.cacheDir&&e.config.startUpClean&&n.i.deleteSync(e.config.cacheDir,{options:{recursive:!0}})}async onInit(e){}async proceedBefore({rr:e,app:t,carrier:i}){var r,o,a;const l=this.config.filter?.(e,t);if(!l)return!0;if(this.config.config.cacheDir&&n.i.mkdirSync(this.config.config.cacheDir,{recursive:!0}),!this.cacheConfig&&this.config.config.cacheDir)try{this.cacheConfig=JSON.parse(s.T.toString(n.i.readSync([this.config.config.cacheDir,"cacheConfig.json"],{option:{encoding:"utf-8"}})))}catch(e){}const d=(new Date).toISOString();this.cacheConfig??(this.cacheConfig={createDate:d,updateDate:d,caches:{}}),(r=this.cacheConfig).createDate??(r.createDate=d),(o=this.cacheConfig).updateDate??(o.updateDate=d),(a=this.cacheConfig).caches??(a.caches={});const h=this.config.key(e,t),u={key:h.key,lifeTime:h.lifeTime??this.config.config.lifeTime,isUpdate:!1,responseHeaders:h.responseHeaders},p=this.cacheConfig.caches[u.key];if(p){const t=this.config.config.cacheDir?n.i.existsSync(p.path):this.storage.has(p.path),i=Date.now()-p.createTime;if(!t||i>p.lifeTime)delete this.cacheConfig[u.key],this.deleteChunk(p.path),u.isUpdate=!0;else{e.resSetHeaders({...p.responseHeader,cacheFilter:"true;remainTime="+(p.lifeTime-i)});try{const t=this.getChunk(p.path);await e.resEnd(t)}catch(e){console.log("--------e",e)}}}else u.isUpdate=!0;return i.set(c.CARRIER_KEY_NAME,u),u.isUpdate}deleteChunk(e){this.config.config.cacheDir&&n.i.existsSync(e)?n.i.deleteFileSync(e):this.storage.has(e)&&this.storage.delete(e)}getChunk(e){return this.config.config.cacheDir?n.i.readSync(e):this.storage.get(e)}async proceedAfter({rr:e,app:t,carrier:i}){var r;const o=i.get(c.CARRIER_KEY_NAME);if(o&&o.isUpdate)try{this.config.config.cacheDir&&n.i.mkdirSync([this.config.config.cacheDir,"caches"],{recursive:!0});const t=e.resBodyData();if(!t)return!0;let i;const s=a.n.uuid4();i=this.writeChunk(s,t);const c=Date.now(),l=new Date(c).toISOString();(r=this.cacheConfig).createDate??(r.createDate=l),this.cacheConfig.updateDate=l;const d={};o.responseHeaders?.map(e=>e.toLowerCase()).forEach(t=>{d[t]=e.resHeader(t)}),this.cacheConfig.caches[o.key]={path:i,createTime:c,lifeTime:o.lifeTime,responseHeader:d},this.config.config.cacheDir&&n.i.write(JSON.stringify(this.cacheConfig),{path:[this.config.config.cacheDir,"cacheConfig.json"]})}catch(e){console.log("---",e)}return!0}writeChunk(e,t){return this.config.config.cacheDir?n.i.write(t,{path:[this.config.config.cacheDir,"caches",e]}):(this.storage.set(e,t),e)}}c.CARRIER_KEY_NAME="_CARRIER_CACHE_FILTER_KEY_NAME";const l=o.d;export{l as CacheFilter};
|
|
1
|
+
import { FileUtils } from "@dooboostore/core-node/file/FileUtils";
|
|
2
|
+
import { ConvertUtils } from "@dooboostore/core-node/convert/ConvertUtils";
|
|
3
|
+
import { RandomUtils } from "@dooboostore/core/random/RandomUtils";
|
|
4
|
+
class CacheFilter {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.config = config;
|
|
7
|
+
if (config.config.cacheDir && config.config.startUpClean) {
|
|
8
|
+
FileUtils.deleteSync(config.config.cacheDir, { options: { recursive: true } });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
static CARRIER_KEY_NAME = "_CARRIER_CACHE_FILTER_KEY_NAME";
|
|
12
|
+
storage = /* @__PURE__ */ new Map();
|
|
13
|
+
cacheConfig;
|
|
14
|
+
async onInit(app) {
|
|
15
|
+
}
|
|
16
|
+
async proceedBefore({ rr, app, carrier }) {
|
|
17
|
+
const filter = this.config.filter?.(rr, app);
|
|
18
|
+
if (!filter) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
if (this.config.config.cacheDir) {
|
|
22
|
+
FileUtils.mkdirSync(this.config.config.cacheDir, { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
if (!this.cacheConfig && this.config.config.cacheDir) {
|
|
25
|
+
try {
|
|
26
|
+
this.cacheConfig = JSON.parse(ConvertUtils.toString(FileUtils.readSync([this.config.config.cacheDir, "cacheConfig.json"], { option: { encoding: "utf-8" } })));
|
|
27
|
+
} catch (e) {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const date = (/* @__PURE__ */ new Date()).toISOString();
|
|
31
|
+
this.cacheConfig ??= {
|
|
32
|
+
createDate: date,
|
|
33
|
+
updateDate: date,
|
|
34
|
+
// accessDate: date,
|
|
35
|
+
caches: {}
|
|
36
|
+
};
|
|
37
|
+
this.cacheConfig.createDate ??= date;
|
|
38
|
+
this.cacheConfig.updateDate ??= date;
|
|
39
|
+
this.cacheConfig.caches ??= {};
|
|
40
|
+
const rkey = this.config.key(rr, app);
|
|
41
|
+
const sessionData = { key: rkey.key, lifeTime: rkey.lifeTime ?? this.config.config.lifeTime, isUpdate: false, responseHeaders: rkey.responseHeaders };
|
|
42
|
+
const cache = this.cacheConfig.caches[sessionData.key];
|
|
43
|
+
if (cache) {
|
|
44
|
+
const existes = this.config.config.cacheDir ? FileUtils.existsSync(cache.path) : this.storage.has(cache.path);
|
|
45
|
+
const diffTime = Date.now() - cache.createTime;
|
|
46
|
+
if (!existes || diffTime > cache.lifeTime) {
|
|
47
|
+
delete this.cacheConfig[sessionData.key];
|
|
48
|
+
this.deleteChunk(cache.path);
|
|
49
|
+
sessionData.isUpdate = true;
|
|
50
|
+
} else {
|
|
51
|
+
rr.resSetHeaders({
|
|
52
|
+
...cache.responseHeader,
|
|
53
|
+
cacheFilter: `true;remainTime=${cache.lifeTime - diffTime}`
|
|
54
|
+
});
|
|
55
|
+
try {
|
|
56
|
+
const chunk = this.getChunk(cache.path);
|
|
57
|
+
await rr.resEnd(chunk);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.log("--------e", e);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
sessionData.isUpdate = true;
|
|
64
|
+
}
|
|
65
|
+
carrier.set(CacheFilter.CARRIER_KEY_NAME, sessionData);
|
|
66
|
+
return sessionData.isUpdate;
|
|
67
|
+
}
|
|
68
|
+
deleteChunk(path2) {
|
|
69
|
+
if (this.config.config.cacheDir && FileUtils.existsSync(path2)) {
|
|
70
|
+
FileUtils.deleteFileSync(path2);
|
|
71
|
+
} else if (this.storage.has(path2)) {
|
|
72
|
+
this.storage.delete(path2);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
getChunk(path2) {
|
|
76
|
+
return this.config.config.cacheDir ? FileUtils.readSync(path2) : this.storage.get(path2);
|
|
77
|
+
}
|
|
78
|
+
async proceedAfter({ rr, app, carrier }) {
|
|
79
|
+
const sessionData = carrier.get(CacheFilter.CARRIER_KEY_NAME);
|
|
80
|
+
if (sessionData && sessionData.isUpdate) {
|
|
81
|
+
try {
|
|
82
|
+
if (this.config.config.cacheDir) {
|
|
83
|
+
FileUtils.mkdirSync([this.config.config.cacheDir, "caches"], { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
const resBody = rr.resBodyData();
|
|
86
|
+
if (!resBody) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
let p = void 0;
|
|
90
|
+
const destFileUUID = RandomUtils.uuid4();
|
|
91
|
+
p = this.writeChunk(destFileUUID, resBody);
|
|
92
|
+
const updateDateNow = Date.now();
|
|
93
|
+
const updateDate = new Date(updateDateNow).toISOString();
|
|
94
|
+
this.cacheConfig.createDate ??= updateDate;
|
|
95
|
+
this.cacheConfig.updateDate = updateDate;
|
|
96
|
+
const responseHeaders = {};
|
|
97
|
+
sessionData.responseHeaders?.map((it) => it.toLowerCase()).forEach((it) => {
|
|
98
|
+
responseHeaders[it] = rr.resHeader(it);
|
|
99
|
+
});
|
|
100
|
+
this.cacheConfig.caches[sessionData.key] = {
|
|
101
|
+
path: p,
|
|
102
|
+
createTime: updateDateNow,
|
|
103
|
+
lifeTime: sessionData.lifeTime,
|
|
104
|
+
responseHeader: responseHeaders
|
|
105
|
+
};
|
|
106
|
+
if (this.config.config.cacheDir) {
|
|
107
|
+
FileUtils.write(JSON.stringify(this.cacheConfig), { path: [this.config.config.cacheDir, "cacheConfig.json"] });
|
|
108
|
+
}
|
|
109
|
+
} catch (e) {
|
|
110
|
+
console.log("---", e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
writeChunk(destFileUUID, resBody) {
|
|
116
|
+
if (this.config.config.cacheDir) {
|
|
117
|
+
return FileUtils.write(resBody, { path: [this.config.config.cacheDir, "caches", destFileUUID] });
|
|
118
|
+
} else {
|
|
119
|
+
this.storage.set(destFileUUID, resBody);
|
|
120
|
+
return destFileUUID;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
CacheFilter
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=CacheFilter.js.map
|