@dooboostore/simple-boot-http-server 1.0.17 → 1.0.18
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.js +930 -2
- package/dist/cjs/SimpleBootHttpServer.js.map +7 -0
- package/dist/cjs/codes/HttpHeaders.js +71 -1
- package/dist/cjs/codes/HttpHeaders.js.map +7 -0
- package/dist/cjs/codes/HttpMethod.js +41 -1
- package/dist/cjs/codes/HttpMethod.js.map +7 -0
- package/dist/cjs/codes/HttpStatus.js +49 -1
- package/dist/cjs/codes/HttpStatus.js.map +7 -0
- package/dist/cjs/codes/Mimes.js +57 -1
- package/dist/cjs/codes/Mimes.js.map +7 -0
- package/dist/cjs/codes/index.js +145 -1
- package/dist/cjs/codes/index.js.map +7 -0
- package/dist/cjs/decorators/MethodMapping.js +265 -2
- package/dist/cjs/decorators/MethodMapping.js.map +7 -0
- package/dist/cjs/decorators/index.js +267 -2
- package/dist/cjs/decorators/index.js.map +7 -0
- package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js +55 -1
- package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
- package/dist/cjs/endpoints/EndPoint.js +18 -1
- package/dist/cjs/endpoints/EndPoint.js.map +7 -0
- package/dist/cjs/endpoints/HeaderEndPoint.js +41 -1
- package/dist/cjs/endpoints/HeaderEndPoint.js.map +7 -0
- package/dist/cjs/endpoints/index.js +73 -1
- package/dist/cjs/endpoints/index.js.map +7 -0
- package/dist/cjs/errors/BadRequestError.js +45 -1
- package/dist/cjs/errors/BadRequestError.js.map +7 -0
- package/dist/cjs/errors/ForbiddenError.js +45 -1
- package/dist/cjs/errors/ForbiddenError.js.map +7 -0
- package/dist/cjs/errors/HttpError.js +36 -1
- package/dist/cjs/errors/HttpError.js.map +7 -0
- package/dist/cjs/errors/InternalServerError.js +45 -1
- package/dist/cjs/errors/InternalServerError.js.map +7 -0
- package/dist/cjs/errors/NotFoundError.js +45 -1
- package/dist/cjs/errors/NotFoundError.js.map +7 -0
- package/dist/cjs/errors/UnauthorizedError.js +45 -1
- package/dist/cjs/errors/UnauthorizedError.js.map +7 -0
- package/dist/cjs/errors/index.js +83 -1
- package/dist/cjs/errors/index.js.map +7 -0
- package/dist/cjs/filters/CacheFilter.js +153 -1
- package/dist/cjs/filters/CacheFilter.js.map +7 -0
- package/dist/cjs/filters/Filter.js +18 -1
- package/dist/cjs/filters/Filter.js.map +7 -0
- package/dist/cjs/filters/HttpStatusFilter.js +44 -1
- package/dist/cjs/filters/HttpStatusFilter.js.map +7 -0
- package/dist/cjs/filters/OpenApi3Filter.js +83 -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 +47 -1
- package/dist/cjs/filters/ThrowFilter.js.map +7 -0
- package/dist/cjs/filters/index.js +318 -2
- package/dist/cjs/filters/index.js.map +7 -0
- package/dist/cjs/index.js +1756 -2
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/inject/InjectSituationType.js +33 -1
- package/dist/cjs/inject/InjectSituationType.js.map +7 -0
- package/dist/cjs/inject/index.js +35 -1
- package/dist/cjs/inject/index.js.map +7 -0
- package/dist/cjs/lifecycle/OnInit.js +18 -1
- package/dist/cjs/lifecycle/OnInit.js.map +7 -0
- package/dist/cjs/lifecycle/index.js +18 -1
- package/dist/cjs/lifecycle/index.js.map +7 -0
- package/dist/cjs/models/RequestResponse.js +500 -1
- package/dist/cjs/models/RequestResponse.js.map +7 -0
- package/dist/cjs/models/datas/HeaderData.js +35 -1
- package/dist/cjs/models/datas/HeaderData.js.map +7 -0
- package/dist/cjs/models/datas/MultipartData.js +18 -1
- package/dist/cjs/models/datas/MultipartData.js.map +7 -0
- package/dist/cjs/models/datas/ReqHeader.js +31 -1
- package/dist/cjs/models/datas/ReqHeader.js.map +7 -0
- package/dist/cjs/models/datas/Resource.js +550 -2
- package/dist/cjs/models/datas/Resource.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqFormUrlBody.js +31 -1
- package/dist/cjs/models/datas/body/ReqFormUrlBody.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqJsonBody.js +31 -1
- package/dist/cjs/models/datas/body/ReqJsonBody.js.map +7 -0
- package/dist/cjs/models/datas/body/ReqMultipartFormBody.js +34 -1
- package/dist/cjs/models/datas/body/ReqMultipartFormBody.js.map +7 -0
- package/dist/cjs/models/index.js +593 -2
- package/dist/cjs/models/index.js.map +7 -0
- package/dist/cjs/models/method/patch/PatchJson.js +49 -2
- package/dist/cjs/models/method/patch/PatchJson.js.map +7 -0
- package/dist/cjs/option/HttpServerOption.js +67 -1
- package/dist/cjs/option/HttpServerOption.js.map +7 -0
- package/dist/cjs/option/index.js +69 -1
- package/dist/cjs/option/index.js.map +7 -0
- package/dist/cjs/resolvers/Resolver.js +18 -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 +571 -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 +571 -2
- package/dist/cjs/resolvers/index.js.map +7 -0
- package/dist/cjs/session/SessionManager.js +577 -1
- package/dist/cjs/session/SessionManager.js.map +7 -0
- package/dist/cjs/session/index.js +579 -1
- package/dist/cjs/session/index.js.map +7 -0
- package/dist/esm/SimpleBootHttpServer.js +906 -2
- package/dist/esm/SimpleBootHttpServer.js.map +7 -0
- package/dist/esm/codes/HttpHeaders.js +47 -1
- package/dist/esm/codes/HttpHeaders.js.map +7 -0
- package/dist/esm/codes/HttpMethod.js +17 -1
- package/dist/esm/codes/HttpMethod.js.map +7 -0
- package/dist/esm/codes/HttpStatus.js +25 -1
- package/dist/esm/codes/HttpStatus.js.map +7 -0
- package/dist/esm/codes/Mimes.js +33 -1
- package/dist/esm/codes/Mimes.js.map +7 -0
- package/dist/esm/codes/index.js +116 -1
- package/dist/esm/codes/index.js.map +7 -0
- package/dist/esm/decorators/MethodMapping.js +211 -2
- package/dist/esm/decorators/MethodMapping.js.map +7 -0
- package/dist/esm/decorators/index.js +211 -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 +17 -1
- package/dist/esm/endpoints/HeaderEndPoint.js.map +7 -0
- package/dist/esm/endpoints/index.js +46 -1
- package/dist/esm/endpoints/index.js.map +7 -0
- package/dist/esm/errors/BadRequestError.js +19 -1
- package/dist/esm/errors/BadRequestError.js.map +7 -0
- package/dist/esm/errors/ForbiddenError.js +19 -1
- package/dist/esm/errors/ForbiddenError.js.map +7 -0
- package/dist/esm/errors/HttpError.js +12 -1
- package/dist/esm/errors/HttpError.js.map +7 -0
- package/dist/esm/errors/InternalServerError.js +19 -1
- package/dist/esm/errors/InternalServerError.js.map +7 -0
- package/dist/esm/errors/NotFoundError.js +19 -1
- package/dist/esm/errors/NotFoundError.js.map +7 -0
- package/dist/esm/errors/UnauthorizedError.js +19 -1
- package/dist/esm/errors/UnauthorizedError.js.map +7 -0
- package/dist/esm/errors/index.js +52 -1
- package/dist/esm/errors/index.js.map +7 -0
- package/dist/esm/filters/CacheFilter.js +129 -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 +20 -1
- package/dist/esm/filters/HttpStatusFilter.js.map +7 -0
- package/dist/esm/filters/OpenApi3Filter.js +57 -2
- package/dist/esm/filters/OpenApi3Filter.js.map +7 -0
- package/dist/esm/filters/ResourceFilter.js +57 -2
- package/dist/esm/filters/ResourceFilter.js.map +7 -0
- package/dist/esm/filters/ThrowFilter.js +23 -1
- package/dist/esm/filters/ThrowFilter.js.map +7 -0
- package/dist/esm/filters/index.js +278 -2
- package/dist/esm/filters/index.js.map +7 -0
- package/dist/esm/index.js +1662 -2
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/inject/InjectSituationType.js +9 -1
- package/dist/esm/inject/InjectSituationType.js.map +7 -0
- package/dist/esm/inject/index.js +9 -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 +1 -0
- package/dist/esm/lifecycle/index.js.map +7 -0
- package/dist/esm/models/RequestResponse.js +475 -1
- package/dist/esm/models/RequestResponse.js.map +7 -0
- package/dist/esm/models/datas/HeaderData.js +11 -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 +7 -1
- package/dist/esm/models/datas/ReqHeader.js.map +7 -0
- package/dist/esm/models/datas/Resource.js +516 -2
- package/dist/esm/models/datas/Resource.js.map +7 -0
- package/dist/esm/models/datas/body/ReqFormUrlBody.js +7 -1
- package/dist/esm/models/datas/body/ReqFormUrlBody.js.map +7 -0
- package/dist/esm/models/datas/body/ReqJsonBody.js +7 -1
- package/dist/esm/models/datas/body/ReqJsonBody.js.map +7 -0
- package/dist/esm/models/datas/body/ReqMultipartFormBody.js +10 -1
- package/dist/esm/models/datas/body/ReqMultipartFormBody.js.map +7 -0
- package/dist/esm/models/index.js +549 -2
- package/dist/esm/models/index.js.map +7 -0
- package/dist/esm/models/method/patch/PatchJson.js +15 -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 +43 -1
- package/dist/esm/option/HttpServerOption.js.map +7 -0
- package/dist/esm/option/index.js +43 -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 +538 -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 +538 -2
- package/dist/esm/resolvers/index.js.map +7 -0
- package/dist/esm/session/SessionManager.js +553 -1
- package/dist/esm/session/SessionManager.js.map +7 -0
- package/dist/esm/session/index.js +553 -1
- package/dist/esm/session/index.js.map +7 -0
- package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +1662 -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 +1699 -2
- package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +7 -0
- package/package.json +24 -21
- 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
|
@@ -1,2 +1,211 @@
|
|
|
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,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=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[o]=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,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,A(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,i)},e.prototype.entries=function(){return new r(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){if(!A(this._cacheKey,t)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(A(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 i(t,e){return e}function a(t,e){return[t,e]}}(),d="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[o]=function(){return this.keys()},t}(),h="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=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(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 i(t,n){if(!r.call(t,e)){if(!n)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(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):o(t,16),t}return o(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,i;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,i=t.getOwnMetadataKeys,o=t.deleteMetadata,a=new h;return{isProviderFor:function(t,e){var r=a.get(t);return!(m(r)||!r.has(e))||!!i(t,e).length&&(m(r)&&(r=new d,a.set(t,r)),r.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}(e.Reflect));var o=new h,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===i&&(i=new d),i.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 i=o.get(t);m(i)&&(i=new y,o.set(t,i)),i.set(e,r)}return!0}};return a;function u(e,o){if(!m(r)){if(r.isProviderFor(e,o))return r;if(!m(n)){if(n.isProviderFor(e,o))return r;if(!m(i))for(var a=I(i);;){var u=K(a);if(!u)return;var f=U(u);if(f.isProviderFor(e,o))return N(a),f}}}if(!m(t)&&t.isProviderFor(e,o))return t}function f(t,e){var r,n=o.get(t);return m(n)||(r=n.get(e)),m(r)?(m(r=u(t,e))||(m(n)&&(n=new y,o.set(t,n)),n.set(e,r)),r):r}function c(t){if(m(t))throw new TypeError;return r===t||n===t||!m(i)&&i.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 h,r={isProviderFor:function(t,r){var n=e.get(t);return!m(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(t,e,r,i){n(r,i,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,r){var i=n(e,r,!1);return!m(i)&&R(i.has(t))},OrdinaryGetOwnMetadata:function(t,e,r){var i=n(e,r,!1);if(!m(i))return i.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var r=[],i=n(t,e,!1);if(m(i))return r;for(var o=I(i.keys()),a=0;;){var u=K(o);if(!u)return r.length=a,r;var f=U(u);try{r[a]=f}catch(t){try{N(o)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,r,i){var o=n(r,i,!1);if(m(o))return!1;if(!o.delete(t))return!1;if(0===o.size){var a=e.get(r);m(a)||(a.delete(i),0===a.size&&e.delete(a))}return!0}};return l.registerProvider(r),r;function n(n,i,o){var a=e.get(n),u=!1;if(m(a)){if(!o)return;a=new y,e.set(n,a),u=!0}var f=a.get(i);if(m(f)){if(!o)return;if(f=new y,a.set(i,f),!t.setProvider(n,i,r))throw a.delete(i),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=H(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=H(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=H(t);if(null===n)return r;var i=T(n,e);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new d,a=[],u=0,f=r;u<f.length;u++){var c=f[u];o.has(c)||(o.add(c),a.push(c))}for(var s=0,y=i;s<y.length;s++)c=y[s],o.has(c)||(o.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,i);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(x(n)&&!k(r=n.call(t)))return r;if(x(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 j(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function x(t){return"function"==typeof t}function C(t){return"function"==typeof t}function A(t,e){return t===e||t!=t&&e!=e}function D(t,e){var r=t[e];if(null!=r){if(!x(r))throw new TypeError;return r}}function I(t){var e=D(t,o);if(!x(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 H(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 i=n.constructor;return"function"!=typeof i||i===t?e:i}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(!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 i=t.length-1;i>=0;--i){var o=(0,t[i])(e,r,n);if(!m(o)&&!P(o)){if(!k(o))throw new TypeError;n=o}}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={}))}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a,u={};o.d(u,{d:()=>a}),o(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={}))},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,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=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 L(Object.create(null))}:u?function(){return L({__proto__:null})}:function(){return L({})},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[o]=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,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];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,i)},e.prototype.entries=function(){return new r(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=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 i(t,e){return e}function a(t,e){return[t,e]}}(),d="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[o]=function(){return this.keys()},t}(),h="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=i(t,!1);return void 0!==e&&c.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?c.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(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 i(t,n){if(!r.call(t,e)){if(!n)return;Object.defineProperty(t,e,{value:c.create()})}return t[e]}function o(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):o(e,t),e}return o(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,i;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,i=t.getOwnMetadataKeys,o=t.deleteMetadata,a=new h;return{isProviderFor:function(t,e){var r=a.get(t);return!(m(r)||!r.has(e))||!!i(t,e).length&&(m(r)&&(r=new d,a.set(t,r)),r.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}(e.Reflect));var o=new h,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===i&&(i=new d),i.add(e)}}function f(e,o){if(!m(r)){if(r.isProviderFor(e,o))return r;if(!m(n)){if(n.isProviderFor(e,o))return r;if(!m(i))for(var a=U(i);;){var u=N(a);if(!u)return;var f=K(u);if(f.isProviderFor(e,o))return H(a),f}}}if(!m(t)&&t.isProviderFor(e,o))return t}function c(t,e){var r,n=o.get(t);return m(n)||(r=n.get(e)),m(r)?(m(r=f(t,e))||(m(n)&&(n=new y,o.set(t,n)),n.set(e,r)),r):r}function s(t){if(m(t))throw new TypeError;return r===t||n===t||!m(i)&&i.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 i=o.get(t);m(i)&&(i=new y,o.set(t,i)),i.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 h,r={isProviderFor:function(t,r){var n=e.get(t);return!m(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(t,e,r,i){n(r,i,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,r){var i=n(e,r,!1);return!m(i)&&S(i.has(t))},OrdinaryGetOwnMetadata:function(t,e,r){var i=n(e,r,!1);if(!m(i))return i.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var r=[],i=n(t,e,!1);if(m(i))return r;for(var o=U(i.keys()),a=0;;){var u=N(o);if(!u)return r.length=a,r;var f=K(u);try{r[a]=f}catch(t){try{H(o)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,r,i){var o=n(r,i,!1);if(m(o))return!1;if(!o.delete(t))return!1;if(0===o.size){var a=e.get(r);m(a)||(a.delete(i),0===a.size&&e.delete(a))}return!0}};return l.registerProvider(r),r;function n(n,i,o){var a=e.get(n),u=!1;if(m(a)){if(!o)return;a=new y,e.set(n,a),u=!0}var f=a.get(i);if(m(f)){if(!o)return;if(f=new y,a.set(i,f),!t.setProvider(n,i,r))throw a.delete(i),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 i=T(n,e);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new d,a=[],u=0,f=r;u<f.length;u++){var c=f[u];o.has(c)||(o.add(c),a.push(c))}for(var s=0,y=i;s<y.length;s++)c=y[s],o.has(c)||(o.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,i);if(void 0!==n){var o=n.call(t,r);if(k(o))throw new TypeError;return o}return function(t,e){if("string"===e){var r=t.toString;if(C(r)&&!k(i=r.call(t)))return i;if(C(n=t.valueOf)&&!k(i=n.call(t)))return i}else{var n;if(C(n=t.valueOf)&&!k(i=n.call(t)))return i;var i,o=t.toString;if(C(o)&&!k(i=o.call(t)))return i}throw new TypeError}(t,"default"===r?"number":r)}function S(t){return!!t}function j(t){var e=R(t,3);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 C(t){return"function"==typeof t}function A(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(!C(r))throw new TypeError;return r}}function U(t){var e=I(t,o);if(!C(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 H(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 i=n.constructor;return"function"!=typeof i||i===t?e:i}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 L(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 i=t.length-1;i>=0;--i){var o=(0,t[i])(e,r,n);if(!m(o)&&!P(o)){if(!k(o))throw new TypeError;n=o}}return n}(t,e,r=j(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=j(n)),E(t,e,r,n)}),t("hasMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=j(r)),w(t,e,r)}),t("hasOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=j(r)),_(t,e,r)}),t("getMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=j(r)),g(t,e,r)}),t("getOwnMetadata",function(t,e,r){if(!k(e))throw new TypeError;return m(r)||(r=j(r)),O(t,e,r)}),t("getMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=j(e)),T(t,e)}),t("getOwnMetadataKeys",function(t,e){if(!k(t))throw new TypeError;return m(e)||(e=j(e)),b(t,e)}),t("deleteMetadata",function(t,e,r){if(!k(e))throw new TypeError;if(m(r)||(r=j(r)),!k(e))throw new TypeError;m(r)||(r=j(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 i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.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:()=>w,D9:()=>M,Df:()=>v,Fz:()=>y,L3:()=>O,LO:()=>l,Ro:()=>I,SJ:()=>_,Sl:()=>C,Uc:()=>E,Vx:()=>j,Y:()=>p,Yu:()=>s,ZD:()=>K,Zy:()=>h,_P:()=>A,aK:()=>N,a_:()=>T,cr:()=>i,fG:()=>d,ft:()=>x,hZ:()=>R,hg:()=>U,kl:()=>D,lw:()=>k,mI:()=>P,nw:()=>m,oB:()=>S,q4:()=>c,rX:()=>b,sp:()=>g}),r(9771);var i,o=r(5053),a=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"}(i||(i={}));const u=Symbol("MappingMetadataKey"),f=(t,e,r,n)=>{const i=o.d.getMetadata(u,e.constructor)??[];i.push({propertyKey:r,config:t}),o.d.defineMetadata(u,i,e.constructor),o.d.defineMetadata(u,t,e,r)};function c(t,e,r){if(!e||!r)return(e,r,n)=>{f(t,e,r,n)};f({method:a.y.GET},t,e,r)}const s=(t,e)=>o.d.getMetadata(u,t,e),y=t=>(null!=t&&"object"==typeof t&&(t=t.constructor),o.d.getMetadata(u,t));function d(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.GET,f(t,e,r,n)};f({method:a.y.GET},t,e,r)}const h=(t,e)=>s(t,e),p=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.GET);function l(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.POST,f(t,e,r,n)};f({method:a.y.POST},t,e,r)}const v=(t,e)=>s(t,e),w=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.POST);function _(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.DELETE,f(t,e,r,n)};f({method:a.y.DELETE},t,e,r)}const g=(t,e)=>s(t,e),O=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.DELETE);function E(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.PUT,f(t,e,r,n)};f({method:a.y.PUT},t,e,r)}const T=(t,e)=>s(t,e),b=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.PUT);function M(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.PATCH,f(t,e,r,n)};f({method:a.y.PATCH},t,e,r)}const m=(t,e)=>s(t,e),P=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.GET);function k(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.OPTIONS,f(t,e,r,n)};f({method:a.y.OPTIONS},t,e,r)}const R=(t,e)=>s(t,e),S=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.OPTIONS);function j(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.HEAD,f(t,e,r,n)};f({method:a.y.HEAD},t,e,r)}const x=(t,e)=>s(t,e),C=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.GET);function A(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.TRACE,f(t,e,r,n)};f({method:a.y.TRACE},t,e,r)}const D=(t,e)=>s(t,e),I=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.TRACE);function U(t,e,r){if(!e||!r)return(e,r,n)=>{t.method=a.y.CONNECT,f(t,e,r,n)};f({method:a.y.CONNECT},t,e,r)}const K=(t,e)=>s(t,e),N=t=>y(t)?.filter(t=>t.config?.method.toUpperCase()===a.y.CONNECT),H=n.hg,G=n.SJ,F=n.fG,L=n.Vx,z=n.lw,B=n.D9,V=n.LO,W=n.Uc,Y=n._P,Z=n.q4,J=n.cr,Q=n.ZD,q=n.aK,X=n.sp,$=n.L3,tt=n.Zy,et=n.Y,rt=n.ft,nt=n.Sl,it=n.hZ,ot=n.oB,at=n.nw,ut=n.mI,ft=n.Df,ct=n.Ay,st=n.a_,yt=n.rX,dt=n.kl,ht=n.Ro,pt=n.Yu,lt=n.Fz;export{H as CONNECT,G as DELETE,F as GET,L as HEAD,z as OPTIONS,B as PATCH,V as POST,W as PUT,Y as TRACE,Z as UrlMapping,J as UrlMappingSituationType,Q as getCONNECT,q as getCONNECTS,X as getDELETE,$ as getDELETES,tt as getGET,et as getGETS,rt as getHEAD,nt as getHEADS,it as getOPTIONS,ot as getOPTIONSS,at as getPATCH,ut as getPATCHS,ft as getPOST,ct as getPOSTS,st as getPUT,yt as getPUTS,dt as getTRACE,ht as getTRACES,pt as getUrlMapping,lt as getUrlMappings};
|
|
1
|
+
// src/decorators/MethodMapping.ts
|
|
2
|
+
import "reflect-metadata";
|
|
3
|
+
import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
|
|
4
|
+
var UrlMappingSituationType = /* @__PURE__ */ ((UrlMappingSituationType2) => {
|
|
5
|
+
UrlMappingSituationType2["REQ_JSON_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY";
|
|
6
|
+
UrlMappingSituationType2["REQ_FORM_URL_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY";
|
|
7
|
+
return UrlMappingSituationType2;
|
|
8
|
+
})(UrlMappingSituationType || {});
|
|
9
|
+
var MappingMetadataKey = Symbol("MappingMetadataKey");
|
|
10
|
+
var process = (config, target, propertyKey, descriptor) => {
|
|
11
|
+
const saveMappingConfigs = ReflectUtils.getMetadata(MappingMetadataKey, target.constructor) ?? [];
|
|
12
|
+
saveMappingConfigs.push({ propertyKey, config });
|
|
13
|
+
ReflectUtils.defineMetadata(MappingMetadataKey, saveMappingConfigs, target.constructor);
|
|
14
|
+
ReflectUtils.defineMetadata(MappingMetadataKey, config, target, propertyKey);
|
|
15
|
+
};
|
|
16
|
+
function UrlMapping(configOrtarget, propertyKey, descriptor) {
|
|
17
|
+
if (propertyKey && descriptor) {
|
|
18
|
+
process({ method: "GET" /* GET */ }, configOrtarget, propertyKey, descriptor);
|
|
19
|
+
} else {
|
|
20
|
+
return (target, propertyKey2, descriptor2) => {
|
|
21
|
+
process(configOrtarget, target, propertyKey2, descriptor2);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
var getUrlMapping = (target, propertyKey) => {
|
|
26
|
+
return ReflectUtils.getMetadata(MappingMetadataKey, target, propertyKey);
|
|
27
|
+
};
|
|
28
|
+
var getUrlMappings = (target) => {
|
|
29
|
+
if (target !== null && void 0 !== target && typeof target === "object") {
|
|
30
|
+
target = target.constructor;
|
|
31
|
+
}
|
|
32
|
+
return ReflectUtils.getMetadata(MappingMetadataKey, target);
|
|
33
|
+
};
|
|
34
|
+
function GET(configOrTarget, propertyKey, descriptor) {
|
|
35
|
+
if (propertyKey && descriptor) {
|
|
36
|
+
process({ method: "GET" /* GET */ }, configOrTarget, propertyKey, descriptor);
|
|
37
|
+
} else {
|
|
38
|
+
return (target, propertyKey2, descriptor2) => {
|
|
39
|
+
configOrTarget.method = "GET" /* GET */;
|
|
40
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var getGET = (target, propertyKey) => {
|
|
45
|
+
return getUrlMapping(target, propertyKey);
|
|
46
|
+
};
|
|
47
|
+
var getGETS = (target) => {
|
|
48
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
49
|
+
};
|
|
50
|
+
function POST(configOrTarget, propertyKey, descriptor) {
|
|
51
|
+
if (propertyKey && descriptor) {
|
|
52
|
+
process({ method: "POST" /* POST */ }, configOrTarget, propertyKey, descriptor);
|
|
53
|
+
} else {
|
|
54
|
+
return (target, propertyKey2, descriptor2) => {
|
|
55
|
+
configOrTarget.method = "POST" /* POST */;
|
|
56
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
var getPOST = (target, propertyKey) => {
|
|
61
|
+
return getUrlMapping(target, propertyKey);
|
|
62
|
+
};
|
|
63
|
+
var getPOSTS = (target) => {
|
|
64
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "POST" /* POST */);
|
|
65
|
+
};
|
|
66
|
+
function DELETE(configOrTarget, propertyKey, descriptor) {
|
|
67
|
+
if (propertyKey && descriptor) {
|
|
68
|
+
process({ method: "DELETE" /* DELETE */ }, configOrTarget, propertyKey, descriptor);
|
|
69
|
+
} else {
|
|
70
|
+
return (target, propertyKey2, descriptor2) => {
|
|
71
|
+
configOrTarget.method = "DELETE" /* DELETE */;
|
|
72
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var getDELETE = (target, propertyKey) => {
|
|
77
|
+
return getUrlMapping(target, propertyKey);
|
|
78
|
+
};
|
|
79
|
+
var getDELETES = (target) => {
|
|
80
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "DELETE" /* DELETE */);
|
|
81
|
+
};
|
|
82
|
+
function PUT(configOrTarget, propertyKey, descriptor) {
|
|
83
|
+
if (propertyKey && descriptor) {
|
|
84
|
+
process({ method: "PUT" /* PUT */ }, configOrTarget, propertyKey, descriptor);
|
|
85
|
+
} else {
|
|
86
|
+
return (target, propertyKey2, descriptor2) => {
|
|
87
|
+
configOrTarget.method = "PUT" /* PUT */;
|
|
88
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var getPUT = (target, propertyKey) => {
|
|
93
|
+
return getUrlMapping(target, propertyKey);
|
|
94
|
+
};
|
|
95
|
+
var getPUTS = (target) => {
|
|
96
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "PUT" /* PUT */);
|
|
97
|
+
};
|
|
98
|
+
function PATCH(configOrTarget, propertyKey, descriptor) {
|
|
99
|
+
if (propertyKey && descriptor) {
|
|
100
|
+
process({ method: "PATCH" /* PATCH */ }, configOrTarget, propertyKey, descriptor);
|
|
101
|
+
} else {
|
|
102
|
+
return (target, propertyKey2, descriptor2) => {
|
|
103
|
+
configOrTarget.method = "PATCH" /* PATCH */;
|
|
104
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
var getPATCH = (target, propertyKey) => {
|
|
109
|
+
return getUrlMapping(target, propertyKey);
|
|
110
|
+
};
|
|
111
|
+
var getPATCHS = (target) => {
|
|
112
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
113
|
+
};
|
|
114
|
+
function OPTIONS(configOrTarget, propertyKey, descriptor) {
|
|
115
|
+
if (propertyKey && descriptor) {
|
|
116
|
+
process({ method: "OPTIONS" /* OPTIONS */ }, configOrTarget, propertyKey, descriptor);
|
|
117
|
+
} else {
|
|
118
|
+
return (target, propertyKey2, descriptor2) => {
|
|
119
|
+
configOrTarget.method = "OPTIONS" /* OPTIONS */;
|
|
120
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
var getOPTIONS = (target, propertyKey) => {
|
|
125
|
+
return getUrlMapping(target, propertyKey);
|
|
126
|
+
};
|
|
127
|
+
var getOPTIONSS = (target) => {
|
|
128
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "OPTIONS" /* OPTIONS */);
|
|
129
|
+
};
|
|
130
|
+
function HEAD(configOrTarget, propertyKey, descriptor) {
|
|
131
|
+
if (propertyKey && descriptor) {
|
|
132
|
+
process({ method: "HEAD" /* HEAD */ }, configOrTarget, propertyKey, descriptor);
|
|
133
|
+
} else {
|
|
134
|
+
return (target, propertyKey2, descriptor2) => {
|
|
135
|
+
configOrTarget.method = "HEAD" /* HEAD */;
|
|
136
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var getHEAD = (target, propertyKey) => {
|
|
141
|
+
return getUrlMapping(target, propertyKey);
|
|
142
|
+
};
|
|
143
|
+
var getHEADS = (target) => {
|
|
144
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
145
|
+
};
|
|
146
|
+
function TRACE(configOrTarget, propertyKey, descriptor) {
|
|
147
|
+
if (propertyKey && descriptor) {
|
|
148
|
+
process({ method: "TRACE" /* TRACE */ }, configOrTarget, propertyKey, descriptor);
|
|
149
|
+
} else {
|
|
150
|
+
return (target, propertyKey2, descriptor2) => {
|
|
151
|
+
configOrTarget.method = "TRACE" /* TRACE */;
|
|
152
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
var getTRACE = (target, propertyKey) => {
|
|
157
|
+
return getUrlMapping(target, propertyKey);
|
|
158
|
+
};
|
|
159
|
+
var getTRACES = (target) => {
|
|
160
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "TRACE" /* TRACE */);
|
|
161
|
+
};
|
|
162
|
+
function CONNECT(configOrTarget, propertyKey, descriptor) {
|
|
163
|
+
if (propertyKey && descriptor) {
|
|
164
|
+
process({ method: "CONNECT" /* CONNECT */ }, configOrTarget, propertyKey, descriptor);
|
|
165
|
+
} else {
|
|
166
|
+
return (target, propertyKey2, descriptor2) => {
|
|
167
|
+
configOrTarget.method = "CONNECT" /* CONNECT */;
|
|
168
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
var getCONNECT = (target, propertyKey) => {
|
|
173
|
+
return getUrlMapping(target, propertyKey);
|
|
174
|
+
};
|
|
175
|
+
var getCONNECTS = (target) => {
|
|
176
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "CONNECT" /* CONNECT */);
|
|
177
|
+
};
|
|
178
|
+
export {
|
|
179
|
+
CONNECT,
|
|
180
|
+
DELETE,
|
|
181
|
+
GET,
|
|
182
|
+
HEAD,
|
|
183
|
+
OPTIONS,
|
|
184
|
+
PATCH,
|
|
185
|
+
POST,
|
|
186
|
+
PUT,
|
|
187
|
+
TRACE,
|
|
188
|
+
UrlMapping,
|
|
189
|
+
UrlMappingSituationType,
|
|
190
|
+
getCONNECT,
|
|
191
|
+
getCONNECTS,
|
|
192
|
+
getDELETE,
|
|
193
|
+
getDELETES,
|
|
194
|
+
getGET,
|
|
195
|
+
getGETS,
|
|
196
|
+
getHEAD,
|
|
197
|
+
getHEADS,
|
|
198
|
+
getOPTIONS,
|
|
199
|
+
getOPTIONSS,
|
|
200
|
+
getPATCH,
|
|
201
|
+
getPATCHS,
|
|
202
|
+
getPOST,
|
|
203
|
+
getPOSTS,
|
|
204
|
+
getPUT,
|
|
205
|
+
getPUTS,
|
|
206
|
+
getTRACE,
|
|
207
|
+
getTRACES,
|
|
208
|
+
getUrlMapping,
|
|
209
|
+
getUrlMappings
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=MethodMapping.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/decorators/MethodMapping.ts"],
|
|
4
|
+
"sourcesContent": ["import 'reflect-metadata';\nimport { 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": ";AAAA,OAAO;AAGP,SAAS,oBAAoB;AAKtB,IAAK,0BAAL,kBAAKA,6BAAL;AACH,EAAAA,yBAAA,mBAAgB;AAChB,EAAAA,yBAAA,uBAAoB;AAFZ,SAAAA;AAAA,GAAA;AAwBZ,IAAM,qBAAqB,OAAO,oBAAoB;AAItD,IAAM,UAAU,CAAC,QAAuB,QAAa,aAA8B,eAAmC;AAClH,QAAM,qBAAsB,aAAa,YAAY,oBAAoB,OAAO,WAAW,KAAK,CAAC;AACjG,qBAAmB,KAAK,EAAC,aAAa,OAAM,CAAC;AAC7C,eAAa,eAAe,oBAAoB,oBAAoB,OAAO,WAAW;AACtF,eAAa,eAAe,oBAAoB,QAAQ,QAAQ,WAAW;AAC/E;AAGO,SAAS,WAAW,gBAAsC,aAA+B,YAAuD;AACnJ,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,wBAAsB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC7E,OAAO;AACH,WAAO,CAAC,QAAaC,cAA8BC,gBAAmC;AAClF,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AACO,IAAM,gBAAgB,CAAC,QAAa,gBAA4D;AACnG,SAAO,aAAa,YAAY,oBAAoB,QAAQ,WAAW;AAC3E;AAEO,IAAM,iBAAiB,CAAC,WAAqC;AAChE,MAAI,WAAW,QAAQ,WAAc,UAAU,OAAO,WAAW,UAAU;AACvE,aAAS,OAAO;AAAA,EACpB;AACA,SAAO,aAAa,YAAY,oBAAoB,MAAM;AAC9D;AAGO,SAAS,IAAI,gBAAsD,aAA+B,YAAuD;AAC5J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,wBAAsB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC7E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,SAAS,CAAC,QAAa,gBAA4D;AAC5F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,UAAU,CAAC,WAAqC;AACzD,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,qBAAoB;AAClG;AAGO,SAAS,KAAK,gBAAsD,aAA+B,YAAuD;AAC7J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,0BAAuB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC9E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,UAAU,CAAC,QAAa,gBAA4D;AAC7F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,WAAW,CAAC,WAAqC;AAC1D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,uBAAqB;AACnG;AAGO,SAAS,OAAO,gBAAsD,aAA+B,YAAuD;AAC/J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,8BAAyB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAChF,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,YAAY,CAAC,QAAa,gBAA4D;AAC/F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,aAAa,CAAC,WAAqC;AAC5D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,2BAAuB;AACrG;AAGO,SAAS,IAAI,gBAAsD,aAA+B,YAAuD;AAC5J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,wBAAsB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC7E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,SAAS,CAAC,QAAa,gBAA4D;AAC5F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,UAAU,CAAC,WAAqC;AACzD,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,qBAAoB;AAClG;AAGO,SAAS,MAAM,gBAAsD,aAA+B,YAAuD;AAC9J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,4BAAwB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC/E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,WAAW,CAAC,QAAa,gBAA4D;AAC9F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,YAAY,CAAC,WAAqC;AAC3D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,qBAAoB;AAClG;AAGO,SAAS,QAAQ,gBAAsD,aAA+B,YAAuD;AAChK,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,gCAA0B,GAAG,gBAAgB,aAAa,UAAU;AAAA,EACjF,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,aAAa,CAAC,QAAa,gBAA4D;AAChG,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,cAAc,CAAC,WAAqC;AAC7D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,6BAAwB;AACtG;AAGO,SAAS,KAAK,gBAAsD,aAA+B,YAAuD;AAC7J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,0BAAuB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC9E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,UAAU,CAAC,QAAa,gBAA4D;AAC7F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,WAAW,CAAC,WAAqC;AAC1D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,qBAAoB;AAClG;AAGO,SAAS,MAAM,gBAAsD,aAA+B,YAAuD;AAC9J,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,4BAAwB,GAAG,gBAAgB,aAAa,UAAU;AAAA,EAC/E,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,WAAW,CAAC,QAAa,gBAA4D;AAC9F,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,YAAY,CAAC,WAAqC;AAC3D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,yBAAsB;AACpG;AAGO,SAAS,QAAQ,gBAAsD,aAA+B,YAAuD;AAChK,MAAI,eAAe,YAAY;AAC3B,YAAQ,EAAC,gCAA0B,GAAG,gBAAgB,aAAa,UAAU;AAAA,EACjF,OAAO;AACH,WAAO,CAAC,QAAaD,cAA8BC,gBAAmC;AAClF,qBAAe;AACf,cAAQ,gBAAgB,QAAQD,cAAaC,WAAU;AAAA,IAC3D;AAAA,EACJ;AACJ;AAEO,IAAM,aAAa,CAAC,QAAa,gBAA4D;AAChG,SAAO,cAAc,QAAQ,WAAW;AAC5C;AACO,IAAM,cAAc,CAAC,WAAqC;AAC7D,SAAO,eAAe,MAAM,GAAG,OAAO,QAAM,GAAG,QAAQ,OAAO,YAAY,6BAAwB;AACtG;",
|
|
6
|
+
"names": ["UrlMappingSituationType", "propertyKey", "descriptor"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,211 @@
|
|
|
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
|
+
// src/decorators/MethodMapping.ts
|
|
2
|
+
import "reflect-metadata";
|
|
3
|
+
import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
|
|
4
|
+
var UrlMappingSituationType = /* @__PURE__ */ ((UrlMappingSituationType2) => {
|
|
5
|
+
UrlMappingSituationType2["REQ_JSON_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY";
|
|
6
|
+
UrlMappingSituationType2["REQ_FORM_URL_BODY"] = "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY";
|
|
7
|
+
return UrlMappingSituationType2;
|
|
8
|
+
})(UrlMappingSituationType || {});
|
|
9
|
+
var MappingMetadataKey = Symbol("MappingMetadataKey");
|
|
10
|
+
var process = (config, target, propertyKey, descriptor) => {
|
|
11
|
+
const saveMappingConfigs = ReflectUtils.getMetadata(MappingMetadataKey, target.constructor) ?? [];
|
|
12
|
+
saveMappingConfigs.push({ propertyKey, config });
|
|
13
|
+
ReflectUtils.defineMetadata(MappingMetadataKey, saveMappingConfigs, target.constructor);
|
|
14
|
+
ReflectUtils.defineMetadata(MappingMetadataKey, config, target, propertyKey);
|
|
15
|
+
};
|
|
16
|
+
function UrlMapping(configOrtarget, propertyKey, descriptor) {
|
|
17
|
+
if (propertyKey && descriptor) {
|
|
18
|
+
process({ method: "GET" /* GET */ }, configOrtarget, propertyKey, descriptor);
|
|
19
|
+
} else {
|
|
20
|
+
return (target, propertyKey2, descriptor2) => {
|
|
21
|
+
process(configOrtarget, target, propertyKey2, descriptor2);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
var getUrlMapping = (target, propertyKey) => {
|
|
26
|
+
return ReflectUtils.getMetadata(MappingMetadataKey, target, propertyKey);
|
|
27
|
+
};
|
|
28
|
+
var getUrlMappings = (target) => {
|
|
29
|
+
if (target !== null && void 0 !== target && typeof target === "object") {
|
|
30
|
+
target = target.constructor;
|
|
31
|
+
}
|
|
32
|
+
return ReflectUtils.getMetadata(MappingMetadataKey, target);
|
|
33
|
+
};
|
|
34
|
+
function GET(configOrTarget, propertyKey, descriptor) {
|
|
35
|
+
if (propertyKey && descriptor) {
|
|
36
|
+
process({ method: "GET" /* GET */ }, configOrTarget, propertyKey, descriptor);
|
|
37
|
+
} else {
|
|
38
|
+
return (target, propertyKey2, descriptor2) => {
|
|
39
|
+
configOrTarget.method = "GET" /* GET */;
|
|
40
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var getGET = (target, propertyKey) => {
|
|
45
|
+
return getUrlMapping(target, propertyKey);
|
|
46
|
+
};
|
|
47
|
+
var getGETS = (target) => {
|
|
48
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
49
|
+
};
|
|
50
|
+
function POST(configOrTarget, propertyKey, descriptor) {
|
|
51
|
+
if (propertyKey && descriptor) {
|
|
52
|
+
process({ method: "POST" /* POST */ }, configOrTarget, propertyKey, descriptor);
|
|
53
|
+
} else {
|
|
54
|
+
return (target, propertyKey2, descriptor2) => {
|
|
55
|
+
configOrTarget.method = "POST" /* POST */;
|
|
56
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
var getPOST = (target, propertyKey) => {
|
|
61
|
+
return getUrlMapping(target, propertyKey);
|
|
62
|
+
};
|
|
63
|
+
var getPOSTS = (target) => {
|
|
64
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "POST" /* POST */);
|
|
65
|
+
};
|
|
66
|
+
function DELETE(configOrTarget, propertyKey, descriptor) {
|
|
67
|
+
if (propertyKey && descriptor) {
|
|
68
|
+
process({ method: "DELETE" /* DELETE */ }, configOrTarget, propertyKey, descriptor);
|
|
69
|
+
} else {
|
|
70
|
+
return (target, propertyKey2, descriptor2) => {
|
|
71
|
+
configOrTarget.method = "DELETE" /* DELETE */;
|
|
72
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var getDELETE = (target, propertyKey) => {
|
|
77
|
+
return getUrlMapping(target, propertyKey);
|
|
78
|
+
};
|
|
79
|
+
var getDELETES = (target) => {
|
|
80
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "DELETE" /* DELETE */);
|
|
81
|
+
};
|
|
82
|
+
function PUT(configOrTarget, propertyKey, descriptor) {
|
|
83
|
+
if (propertyKey && descriptor) {
|
|
84
|
+
process({ method: "PUT" /* PUT */ }, configOrTarget, propertyKey, descriptor);
|
|
85
|
+
} else {
|
|
86
|
+
return (target, propertyKey2, descriptor2) => {
|
|
87
|
+
configOrTarget.method = "PUT" /* PUT */;
|
|
88
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var getPUT = (target, propertyKey) => {
|
|
93
|
+
return getUrlMapping(target, propertyKey);
|
|
94
|
+
};
|
|
95
|
+
var getPUTS = (target) => {
|
|
96
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "PUT" /* PUT */);
|
|
97
|
+
};
|
|
98
|
+
function PATCH(configOrTarget, propertyKey, descriptor) {
|
|
99
|
+
if (propertyKey && descriptor) {
|
|
100
|
+
process({ method: "PATCH" /* PATCH */ }, configOrTarget, propertyKey, descriptor);
|
|
101
|
+
} else {
|
|
102
|
+
return (target, propertyKey2, descriptor2) => {
|
|
103
|
+
configOrTarget.method = "PATCH" /* PATCH */;
|
|
104
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
var getPATCH = (target, propertyKey) => {
|
|
109
|
+
return getUrlMapping(target, propertyKey);
|
|
110
|
+
};
|
|
111
|
+
var getPATCHS = (target) => {
|
|
112
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
113
|
+
};
|
|
114
|
+
function OPTIONS(configOrTarget, propertyKey, descriptor) {
|
|
115
|
+
if (propertyKey && descriptor) {
|
|
116
|
+
process({ method: "OPTIONS" /* OPTIONS */ }, configOrTarget, propertyKey, descriptor);
|
|
117
|
+
} else {
|
|
118
|
+
return (target, propertyKey2, descriptor2) => {
|
|
119
|
+
configOrTarget.method = "OPTIONS" /* OPTIONS */;
|
|
120
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
var getOPTIONS = (target, propertyKey) => {
|
|
125
|
+
return getUrlMapping(target, propertyKey);
|
|
126
|
+
};
|
|
127
|
+
var getOPTIONSS = (target) => {
|
|
128
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "OPTIONS" /* OPTIONS */);
|
|
129
|
+
};
|
|
130
|
+
function HEAD(configOrTarget, propertyKey, descriptor) {
|
|
131
|
+
if (propertyKey && descriptor) {
|
|
132
|
+
process({ method: "HEAD" /* HEAD */ }, configOrTarget, propertyKey, descriptor);
|
|
133
|
+
} else {
|
|
134
|
+
return (target, propertyKey2, descriptor2) => {
|
|
135
|
+
configOrTarget.method = "HEAD" /* HEAD */;
|
|
136
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var getHEAD = (target, propertyKey) => {
|
|
141
|
+
return getUrlMapping(target, propertyKey);
|
|
142
|
+
};
|
|
143
|
+
var getHEADS = (target) => {
|
|
144
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "GET" /* GET */);
|
|
145
|
+
};
|
|
146
|
+
function TRACE(configOrTarget, propertyKey, descriptor) {
|
|
147
|
+
if (propertyKey && descriptor) {
|
|
148
|
+
process({ method: "TRACE" /* TRACE */ }, configOrTarget, propertyKey, descriptor);
|
|
149
|
+
} else {
|
|
150
|
+
return (target, propertyKey2, descriptor2) => {
|
|
151
|
+
configOrTarget.method = "TRACE" /* TRACE */;
|
|
152
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
var getTRACE = (target, propertyKey) => {
|
|
157
|
+
return getUrlMapping(target, propertyKey);
|
|
158
|
+
};
|
|
159
|
+
var getTRACES = (target) => {
|
|
160
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "TRACE" /* TRACE */);
|
|
161
|
+
};
|
|
162
|
+
function CONNECT(configOrTarget, propertyKey, descriptor) {
|
|
163
|
+
if (propertyKey && descriptor) {
|
|
164
|
+
process({ method: "CONNECT" /* CONNECT */ }, configOrTarget, propertyKey, descriptor);
|
|
165
|
+
} else {
|
|
166
|
+
return (target, propertyKey2, descriptor2) => {
|
|
167
|
+
configOrTarget.method = "CONNECT" /* CONNECT */;
|
|
168
|
+
process(configOrTarget, target, propertyKey2, descriptor2);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
var getCONNECT = (target, propertyKey) => {
|
|
173
|
+
return getUrlMapping(target, propertyKey);
|
|
174
|
+
};
|
|
175
|
+
var getCONNECTS = (target) => {
|
|
176
|
+
return getUrlMappings(target)?.filter((it) => it.config?.method.toUpperCase() === "CONNECT" /* CONNECT */);
|
|
177
|
+
};
|
|
178
|
+
export {
|
|
179
|
+
CONNECT,
|
|
180
|
+
DELETE,
|
|
181
|
+
GET,
|
|
182
|
+
HEAD,
|
|
183
|
+
OPTIONS,
|
|
184
|
+
PATCH,
|
|
185
|
+
POST,
|
|
186
|
+
PUT,
|
|
187
|
+
TRACE,
|
|
188
|
+
UrlMapping,
|
|
189
|
+
UrlMappingSituationType,
|
|
190
|
+
getCONNECT,
|
|
191
|
+
getCONNECTS,
|
|
192
|
+
getDELETE,
|
|
193
|
+
getDELETES,
|
|
194
|
+
getGET,
|
|
195
|
+
getGETS,
|
|
196
|
+
getHEAD,
|
|
197
|
+
getHEADS,
|
|
198
|
+
getOPTIONS,
|
|
199
|
+
getOPTIONSS,
|
|
200
|
+
getPATCH,
|
|
201
|
+
getPATCHS,
|
|
202
|
+
getPOST,
|
|
203
|
+
getPOSTS,
|
|
204
|
+
getPUT,
|
|
205
|
+
getPUTS,
|
|
206
|
+
getTRACE,
|
|
207
|
+
getTRACES,
|
|
208
|
+
getUrlMapping,
|
|
209
|
+
getUrlMappings
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=index.js.map
|