@adaas/a-server 0.0.22 → 0.0.24
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/.conf/tsconfig.base.json +79 -0
- package/.conf/tsconfig.browser.json +32 -0
- package/.conf/tsconfig.node.json +33 -0
- package/LICENSE +10 -19
- package/dist/browser/index.d.mts +1699 -0
- package/dist/browser/index.mjs +2935 -0
- package/dist/browser/index.mjs.map +1 -0
- package/dist/node/A-Request.entity-8_9MCXT2.d.ts +533 -0
- package/dist/node/A-Request.entity-r905O60G.d.mts +533 -0
- package/dist/node/A-Response.entity-6qhiV7BE.d.mts +348 -0
- package/dist/node/A-Response.entity-bjh6bofZ.d.ts +348 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.d.mts +9 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.d.ts +9 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.js +13 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.js.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.mjs +12 -0
- package/dist/node/channels/A-Http/A-Http.channel.constants.mjs.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.d.mts +23 -0
- package/dist/node/channels/A-Http/A-Http.channel.d.ts +23 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.d.mts +7 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.d.ts +7 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.js +11 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.js.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.mjs +10 -0
- package/dist/node/channels/A-Http/A-Http.channel.error.mjs.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.js +122 -0
- package/dist/node/channels/A-Http/A-Http.channel.js.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.mjs +110 -0
- package/dist/node/channels/A-Http/A-Http.channel.mjs.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.d.mts +67 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.d.ts +67 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.js +4 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.js.map +1 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.mjs +3 -0
- package/dist/node/channels/A-Http/A-Http.channel.types.mjs.map +1 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.d.mts +7 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.d.ts +7 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.js +13 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.js.map +1 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.mjs +12 -0
- package/dist/node/channels/A-Websockets/A-Websockets.channel.mjs.map +1 -0
- package/dist/node/chunk-EQQGB2QZ.mjs +15 -0
- package/dist/node/chunk-EQQGB2QZ.mjs.map +1 -0
- package/dist/node/constants/env.constants.d.mts +12 -0
- package/dist/node/constants/env.constants.d.ts +12 -0
- package/dist/node/constants/env.constants.js +23 -0
- package/dist/node/constants/env.constants.js.map +1 -0
- package/dist/node/constants/env.constants.mjs +22 -0
- package/dist/node/constants/env.constants.mjs.map +1 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.d.mts +29 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.d.ts +29 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.js +55 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.js.map +1 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.mjs +43 -0
- package/dist/node/controllers/A-CommandController/A-CommandController.component.mjs.map +1 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.d.mts +44 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.d.ts +44 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.js +189 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.js.map +1 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.mjs +177 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.mjs.map +1 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.d.mts +2 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.d.ts +2 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.js +4 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.js.map +1 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.mjs +3 -0
- package/dist/node/controllers/A-EntityController/A-EntityController.component.types.mjs.map +1 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.d.mts +28 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.d.ts +28 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.js +59 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.js.map +1 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.mjs +47 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.component.mjs.map +1 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.d.mts +2 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.d.ts +2 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.js +4 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.js.map +1 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.mjs +3 -0
- package/dist/node/controllers/A-ListingController/A-ListingController.types.mjs.map +1 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.d.mts +30 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.d.ts +30 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.js +46 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.js.map +1 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.mjs +34 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.component.mjs.map +1 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.d.mts +2 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.d.ts +2 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.js +4 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.js.map +1 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.mjs +3 -0
- package/dist/node/controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.mjs.map +1 -0
- package/dist/node/index.d.mts +51 -0
- package/dist/node/index.d.ts +51 -0
- package/dist/node/index.js +320 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/index.mjs +48 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.d.mts +12 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.d.ts +12 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.js +25 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.js.map +1 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.mjs +24 -0
- package/dist/node/lib/A-Request/A-HttpRequestData.context.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.d.mts +39 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.d.ts +39 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.js +56 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.js.map +1 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.mjs +55 -0
- package/dist/node/lib/A-Request/A-HttpServerRequest.context.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.constants.d.mts +18 -0
- package/dist/node/lib/A-Request/A-Request.constants.d.ts +18 -0
- package/dist/node/lib/A-Request/A-Request.constants.js +22 -0
- package/dist/node/lib/A-Request/A-Request.constants.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.constants.mjs +22 -0
- package/dist/node/lib/A-Request/A-Request.constants.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.entity.d.mts +17 -0
- package/dist/node/lib/A-Request/A-Request.entity.d.ts +17 -0
- package/dist/node/lib/A-Request/A-Request.entity.js +651 -0
- package/dist/node/lib/A-Request/A-Request.entity.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.entity.mjs +639 -0
- package/dist/node/lib/A-Request/A-Request.entity.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.env.d.mts +37 -0
- package/dist/node/lib/A-Request/A-Request.env.d.ts +37 -0
- package/dist/node/lib/A-Request/A-Request.env.js +39 -0
- package/dist/node/lib/A-Request/A-Request.env.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.env.mjs +38 -0
- package/dist/node/lib/A-Request/A-Request.env.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.error.d.mts +11 -0
- package/dist/node/lib/A-Request/A-Request.error.d.ts +11 -0
- package/dist/node/lib/A-Request/A-Request.error.js +15 -0
- package/dist/node/lib/A-Request/A-Request.error.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.error.mjs +14 -0
- package/dist/node/lib/A-Request/A-Request.error.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.helper.d.mts +105 -0
- package/dist/node/lib/A-Request/A-Request.helper.d.ts +105 -0
- package/dist/node/lib/A-Request/A-Request.helper.js +181 -0
- package/dist/node/lib/A-Request/A-Request.helper.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.helper.mjs +180 -0
- package/dist/node/lib/A-Request/A-Request.helper.mjs.map +1 -0
- package/dist/node/lib/A-Request/A-Request.types.d.mts +17 -0
- package/dist/node/lib/A-Request/A-Request.types.d.ts +17 -0
- package/dist/node/lib/A-Request/A-Request.types.js +14 -0
- package/dist/node/lib/A-Request/A-Request.types.js.map +1 -0
- package/dist/node/lib/A-Request/A-Request.types.mjs +14 -0
- package/dist/node/lib/A-Request/A-Request.types.mjs.map +1 -0
- package/dist/node/lib/A-Response/A-Response.constants.d.mts +24 -0
- package/dist/node/lib/A-Response/A-Response.constants.d.ts +24 -0
- package/dist/node/lib/A-Response/A-Response.constants.js +28 -0
- package/dist/node/lib/A-Response/A-Response.constants.js.map +1 -0
- package/dist/node/lib/A-Response/A-Response.constants.mjs +28 -0
- package/dist/node/lib/A-Response/A-Response.constants.mjs.map +1 -0
- package/dist/node/lib/A-Response/A-Response.entity.d.mts +20 -0
- package/dist/node/lib/A-Response/A-Response.entity.d.ts +20 -0
- package/dist/node/lib/A-Response/A-Response.entity.js +608 -0
- package/dist/node/lib/A-Response/A-Response.entity.js.map +1 -0
- package/dist/node/lib/A-Response/A-Response.entity.mjs +596 -0
- package/dist/node/lib/A-Response/A-Response.entity.mjs.map +1 -0
- package/dist/node/lib/A-Response/A-Response.env.d.mts +2 -0
- package/dist/node/lib/A-Response/A-Response.env.d.ts +2 -0
- package/dist/node/lib/A-Response/A-Response.env.js +4 -0
- package/dist/node/lib/A-Response/A-Response.env.js.map +1 -0
- package/dist/node/lib/A-Response/A-Response.env.mjs +3 -0
- package/dist/node/lib/A-Response/A-Response.env.mjs.map +1 -0
- package/dist/node/lib/A-Response/A-Response.error.d.mts +6 -0
- package/dist/node/lib/A-Response/A-Response.error.d.ts +6 -0
- package/dist/node/lib/A-Response/A-Response.error.js +10 -0
- package/dist/node/lib/A-Response/A-Response.error.js.map +1 -0
- package/dist/node/lib/A-Response/A-Response.error.mjs +9 -0
- package/dist/node/lib/A-Response/A-Response.error.mjs.map +1 -0
- package/dist/node/lib/A-Response/A-Response.types.d.mts +20 -0
- package/dist/node/lib/A-Response/A-Response.types.d.ts +20 -0
- package/dist/node/lib/A-Response/A-Response.types.js +4 -0
- package/dist/node/lib/A-Response/A-Response.types.js.map +1 -0
- package/dist/node/lib/A-Response/A-Response.types.mjs +3 -0
- package/dist/node/lib/A-Response/A-Response.types.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.d.mts +7 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.d.ts +7 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.js +11 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.js.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.mjs +11 -0
- package/dist/node/lib/A-Server/A-HttpServer.constants.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.d.mts +50 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.d.ts +50 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.js +196 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.js.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.mjs +184 -0
- package/dist/node/lib/A-Server/A-HttpServer.container.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.d.mts +54 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.d.ts +54 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.js +118 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.js.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.mjs +117 -0
- package/dist/node/lib/A-Server/A-HttpServer.error.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.d.mts +19 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.d.ts +19 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.js +4 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.js.map +1 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.mjs +3 -0
- package/dist/node/lib/A-Server/A-HttpServer.types.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-Server.context.d.mts +22 -0
- package/dist/node/lib/A-Server/A-Server.context.d.ts +22 -0
- package/dist/node/lib/A-Server/A-Server.context.js +24 -0
- package/dist/node/lib/A-Server/A-Server.context.js.map +1 -0
- package/dist/node/lib/A-Server/A-Server.context.mjs +23 -0
- package/dist/node/lib/A-Server/A-Server.context.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-Server.error.d.mts +14 -0
- package/dist/node/lib/A-Server/A-Server.error.d.ts +14 -0
- package/dist/node/lib/A-Server/A-Server.error.js +26 -0
- package/dist/node/lib/A-Server/A-Server.error.js.map +1 -0
- package/dist/node/lib/A-Server/A-Server.error.mjs +25 -0
- package/dist/node/lib/A-Server/A-Server.error.mjs.map +1 -0
- package/dist/node/lib/A-Server/A-Server.types.d.mts +26 -0
- package/dist/node/lib/A-Server/A-Server.types.d.ts +26 -0
- package/dist/node/lib/A-Server/A-Server.types.js +4 -0
- package/dist/node/lib/A-Server/A-Server.types.js.map +1 -0
- package/dist/node/lib/A-Server/A-Server.types.mjs +3 -0
- package/dist/node/lib/A-Server/A-Server.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.d.mts +29 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.d.ts +29 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.js +49 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.js.map +1 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.mjs +37 -0
- package/dist/node/lib/A-ServerController/A-ServerController.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.d.mts +2 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.d.ts +2 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.js +4 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.js.map +1 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.mjs +3 -0
- package/dist/node/lib/A-ServerController/A-ServerController.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.d.mts +49 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.d.ts +49 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.js +91 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.js.map +1 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.mjs +90 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.entity.mjs.map +1 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.d.mts +22 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.d.ts +22 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.js +10 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.js.map +1 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.mjs +10 -0
- package/dist/node/lib/A-ServerEntityList/A-EntityList.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.d.mts +13 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.d.ts +13 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.js +32 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.js.map +1 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.mjs +31 -0
- package/dist/node/lib/A-ServerListQuery/A-ServerListQueryFilter.context.mjs.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.d.mts +48 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.d.ts +48 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.js +88 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.js.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.mjs +76 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.d.mts +24 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.d.ts +24 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.js +33 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.js.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.mjs +33 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.constants.mjs.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.d.mts +12 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.d.ts +12 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.js +4 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.js.map +1 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.mjs +3 -0
- package/dist/node/lib/A-ServerLogger/A-ServerLogger.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.d.mts +6 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.d.ts +6 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.js +18 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.js.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.mjs +17 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.d.mts +2 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.d.ts +2 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.js +4 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.js.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.mjs +3 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.constants.mjs.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.d.mts +2 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.d.ts +2 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.js +4 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.js.map +1 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.mjs +3 -0
- package/dist/node/lib/A-ServerMiddleware/A-ServerMiddleware.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.d.mts +31 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.d.ts +31 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.js +90 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.js.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.mjs +78 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.d.mts +9 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.d.ts +9 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.js +14 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.js.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.mjs +14 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.constants.mjs.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.d.mts +36 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.d.ts +36 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.js +60 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.js.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.mjs +59 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.context.mjs.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.d.mts +23 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.d.ts +23 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.js +4 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.js.map +1 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.mjs +3 -0
- package/dist/node/lib/A-ServerProxy/A-ServerProxy.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.d.mts +20 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.d.ts +20 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.js +25 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.js.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.mjs +24 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.constants.mjs.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.d.mts +15 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.d.ts +15 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.js +24 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.js.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.mjs +23 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.entity.mjs.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.d.mts +6 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.d.ts +6 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.js +4 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.js.map +1 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.mjs +3 -0
- package/dist/node/lib/A-ServerRoute/A-ServerRoute.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.d.mts +84 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.d.ts +84 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.js +194 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.js.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.mjs +184 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.d.mts +6 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.d.ts +6 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.js +10 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.js.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.mjs +10 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.constants.mjs.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.d.mts +16 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.d.ts +16 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.js +40 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.js.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.mjs +39 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.meta.mjs.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.d.mts +24 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.d.ts +24 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.js +4 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.js.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.mjs +3 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouter.types.mjs.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.d.mts +16 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.d.ts +16 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.js +25 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.js.map +1 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.mjs +24 -0
- package/dist/node/lib/A-ServerRouter/A-ServerRouterDefine.decorator.mjs.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.d.mts +65 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.d.ts +65 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.js +260 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.js.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.mjs +248 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.component.mjs.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.d.mts +110 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.d.ts +110 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.js +180 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.js.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.mjs +179 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.context.mjs.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.d.mts +8 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.d.ts +8 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.js +4 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.js.map +1 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.mjs +3 -0
- package/dist/node/lib/A-ServerStatic/A-ServerStatic.types.mjs.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.d.mts +29 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.d.ts +29 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.js +62 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.js.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.mjs +50 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.component.mjs.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.d.mts +5 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.d.ts +5 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.js +14 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.js.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.mjs +14 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.constants.mjs.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.d.mts +9 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.d.ts +9 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.js +4 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.js.map +1 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.mjs +3 -0
- package/dist/node/middlewares/A-ServerCORS/A_ServerCORS.types.mjs.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.d.mts +24 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.d.ts +24 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.js +94 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.js.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.mjs +82 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.component.mjs.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.d.mts +2 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.d.ts +2 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.js +4 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.js.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.mjs +3 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.error.mjs.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.d.mts +2 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.d.ts +2 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.js +4 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.js.map +1 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.mjs +3 -0
- package/dist/node/repositories/A-EntityRepository/A-EntityRepository.types.mjs.map +1 -0
- package/examples/simple-server/commands/SignIn.command.ts +17 -1
- package/examples/simple-server/components/Test.controller.ts +8 -7
- package/examples/simple-server/components/Users.repository.ts +28 -26
- package/examples/simple-server/concept.ts +56 -66
- package/examples/simple-server/entities/User/User.entity.ts +17 -7
- package/jest.config.ts +24 -10
- package/package.json +267 -25
- package/src/channels/A-Http/A-Http.channel.constants.ts +6 -7
- package/src/channels/A-Http/A-Http.channel.error.ts +2 -2
- package/src/channels/A-Http/A-Http.channel.ts +76 -125
- package/src/channels/A-Http/A-Http.channel.types.ts +6 -3
- package/src/channels/A-Websockets/A-Websockets.channel.ts +1 -1
- package/src/{components → controllers}/A-CommandController/A-CommandController.component.ts +16 -10
- package/src/{components → controllers}/A-EntityController/A-EntityController.component.ts +24 -28
- package/src/{components → controllers}/A-ListingController/A-ListingController.component.ts +10 -12
- package/src/{components → controllers}/A-ServerHealthMonitor/A-ServerHealthMonitor.component.ts +11 -11
- package/src/index.ts +58 -63
- package/src/lib/A-Request/A-HttpRequestData.context.ts +30 -0
- package/src/lib/A-Request/A-HttpServerRequest.context.ts +103 -0
- package/src/lib/A-Request/A-Request.constants.ts +30 -0
- package/src/lib/A-Request/A-Request.entity.ts +844 -0
- package/src/lib/A-Request/A-Request.env.ts +50 -0
- package/src/lib/A-Request/A-Request.error.ts +11 -0
- package/src/lib/A-Request/A-Request.helper.ts +276 -0
- package/src/lib/A-Request/A-Request.types.ts +284 -0
- package/src/lib/A-Request/README.md +567 -0
- package/src/lib/A-Response/A-Response.constants.ts +24 -0
- package/src/lib/A-Response/A-Response.entity.ts +751 -0
- package/src/lib/A-Response/A-Response.error.ts +6 -0
- package/src/lib/A-Response/A-Response.types.ts +127 -0
- package/src/lib/A-Response/README.md +793 -0
- package/src/lib/A-Server/A-HttpServer.constants.ts +9 -0
- package/src/lib/A-Server/A-HttpServer.container.ts +256 -0
- package/src/lib/A-Server/A-HttpServer.error.ts +165 -0
- package/src/lib/A-Server/A-HttpServer.types.ts +37 -0
- package/src/{context/A-Server/A_Server.context.ts → lib/A-Server/A-Server.context.ts} +6 -7
- package/src/lib/A-Server/A-Server.error.ts +26 -0
- package/src/{components/A-ServerError/A-ServerError.types.ts → lib/A-Server/A-Server.types.ts} +8 -0
- package/src/{components/A-Controller/A-Controller.component.ts → lib/A-ServerController/A-ServerController.component.ts} +5 -5
- package/src/{entities/A_EntityList/A_EntityList.entity.ts → lib/A-ServerEntityList/A-EntityList.entity.ts} +2 -2
- package/src/{entities/A_EntityList/A_EntityList.entity.types.ts → lib/A-ServerEntityList/A-EntityList.types.ts} +2 -2
- package/src/{context/A-ListQueryFilter/A_ListQueryFilter.context.ts → lib/A-ServerListQuery/A-ServerListQueryFilter.context.ts} +1 -1
- package/src/lib/A-ServerLogger/A-ServerLogger.component.ts +121 -0
- package/src/lib/A-ServerLogger/A-ServerLogger.types.ts +13 -0
- package/src/lib/A-ServerMiddleware/A-ServerMiddleware.component.ts +17 -0
- package/src/{components → lib}/A-ServerProxy/A-ServerProxy.component.ts +17 -12
- package/src/{context/A-ProxyConfig/A_ProxyConfig.constants.ts → lib/A-ServerProxy/A-ServerProxy.constants.ts} +1 -1
- package/src/{context/A-ProxyConfig/A_ProxyConfig.context.ts → lib/A-ServerProxy/A-ServerProxy.context.ts} +4 -4
- package/src/{context/A-ProxyConfig/A_ProxyConfig.types.ts → lib/A-ServerProxy/A-ServerProxy.types.ts} +4 -4
- package/src/lib/A-ServerRoute/A-ServerRoute.constants.ts +20 -0
- package/src/lib/A-ServerRoute/A-ServerRoute.entity.ts +48 -0
- package/src/lib/A-ServerRoute/A-ServerRoute.types.ts +6 -0
- package/src/{components/A-Router/A-Router.component.ts → lib/A-ServerRouter/A-ServerRouter.component.ts} +77 -97
- package/src/lib/A-ServerRouter/A-ServerRouter.constants.ts +8 -0
- package/src/lib/A-ServerRouter/A-ServerRouter.meta.ts +48 -0
- package/src/lib/A-ServerRouter/A-ServerRouter.types.ts +27 -0
- package/src/lib/A-ServerRouter/A-ServerRouterDefine.decorator.ts +37 -0
- package/src/{components/A-StaticLoader/A-StaticLoader.component.ts → lib/A-ServerStatic/A-ServerStatic.component.ts} +73 -54
- package/src/{context/A-StaticConfig/A-StaticConfig.context.ts → lib/A-ServerStatic/A-ServerStatic.context.ts} +16 -6
- package/src/{components → middlewares}/A-ServerCORS/A_ServerCORS.component.ts +16 -13
- package/src/{components/A-ServerCORS/A_ServerCORS.component.defaults.ts → middlewares/A-ServerCORS/A_ServerCORS.constants.ts} +2 -2
- package/src/{components → repositories}/A-EntityRepository/A-EntityRepository.component.ts +39 -30
- package/tests/A-HttpChannel.test.ts +41 -48
- package/tests/A-HttpServerError.test.ts +204 -0
- package/tests/A-Request.test.ts +351 -0
- package/tsconfig.json +40 -50
- package/tsup.config.ts +111 -13
- package/dist/index.d.mts +0 -855
- package/dist/index.d.ts +0 -855
- package/dist/index.js +0 -2179
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -2144
- package/dist/index.mjs.map +0 -1
- package/examples/microservices-server/components/controllers/Statistics.controller.ts +0 -18
- package/examples/microservices-server/components/repositories/Memory.repository.ts +0 -66
- package/examples/microservices-server/concept.ts +0 -43
- package/examples/microservices-server/context/MemoryStore.context.ts +0 -31
- package/examples/microservices-server/entities/Order.entity.ts +0 -7
- package/examples/microservices-server/entities/User.entity.ts +0 -8
- package/src/components/A-Router/A-Router.component.types.ts +0 -38
- package/src/components/A-ServerError/A-ServerError.class.ts +0 -98
- package/src/components/A-ServerLogger/A_ServerLogger.component.ts +0 -194
- package/src/components/A-ServerLogger/A_ServerLogger.component.types.ts +0 -14
- package/src/containers/A-Service/A-Service.container.ts +0 -218
- package/src/containers/A-Service/A-Service.container.types.ts +0 -46
- package/src/context/A-EntityFactory/A-EntityFactory.context.ts +0 -163
- package/src/context/A-EntityFactory/A-EntityFactory.context.types.ts +0 -11
- package/src/context/A-HttpChannel/A-HttpChannel.context.ts +0 -36
- package/src/context/A-Server/A_Server.context.types.ts +0 -9
- package/src/entities/A-Request/A-Request.entity.ts +0 -163
- package/src/entities/A-Request/A-Request.entity.types.ts +0 -41
- package/src/entities/A-Response/A-Response.entity.ts +0 -194
- package/src/entities/A-Response/A-Response.entity.types.ts +0 -26
- package/src/entities/A-Route/A-Route.entity.ts +0 -117
- package/tests/A-Service.test.ts +0 -18
- /package/src/{components → controllers}/A-EntityController/A-EntityController.component.types.ts +0 -0
- /package/src/{components/A-Controller/A-Controller.component.types.ts → controllers/A-ListingController/A-ListingController.types.ts} +0 -0
- /package/src/{components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.types.ts → controllers/A-ServerHealthMonitor/A-ServerHealthMonitor.types.ts} +0 -0
- /package/src/{components/A-EntityRepository/A-EntityRepository.error.ts → lib/A-Response/A-Response.env.ts} +0 -0
- /package/src/{components/A-EntityRepository/A-EntityRepository.types.ts → lib/A-ServerController/A-ServerController.types.ts} +0 -0
- /package/src/{components → lib}/A-ServerLogger/A-ServerLogger.constants.ts +0 -0
- /package/src/{components/A-ListingController/A-ListingController.component.types.ts → lib/A-ServerMiddleware/A-ServerMiddleware.constants.ts} +0 -0
- /package/src/{components/A-ServerError/A-ServerError.constants.ts → lib/A-ServerMiddleware/A-ServerMiddleware.types.ts} +0 -0
- /package/src/{components/A-StaticLoader/A-StaticLoader.component.types.ts → lib/A-ServerStatic/A-ServerStatic.types.ts} +0 -0
- /package/src/{components/A-ServerCORS/A_ServerCORS.component.types.ts → middlewares/A-ServerCORS/A_ServerCORS.types.ts} +0 -0
- /package/src/{context/A-StaticConfig/A-StaticConfig.context.types.ts → repositories/A-EntityRepository/A-EntityRepository.error.ts} +0 -0
- /package/src/{entities/A-Route/A-Route.entity.types.ts → repositories/A-EntityRepository/A-EntityRepository.types.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_Fragment, A_TYPES__Required } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__ServerConstructor } from './A-Server.types.mjs';
|
|
3
|
+
import { A_ServerRoute } from '../A-ServerRoute/A-ServerRoute.entity.mjs';
|
|
4
|
+
import '@adaas/a-utils/a-route';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.types.mjs';
|
|
6
|
+
import '../A-ServerRoute/A-ServerRoute.constants.mjs';
|
|
7
|
+
|
|
8
|
+
declare class A_Server extends A_Fragment {
|
|
9
|
+
port: number;
|
|
10
|
+
version: string;
|
|
11
|
+
protected _routes: A_ServerRoute[];
|
|
12
|
+
constructor(params: A_TYPES__Required<Partial<A_SERVER_TYPES__ServerConstructor>, [
|
|
13
|
+
'port',
|
|
14
|
+
'name'
|
|
15
|
+
]>);
|
|
16
|
+
/**
|
|
17
|
+
* A list of routes that the server will listen to
|
|
18
|
+
*/
|
|
19
|
+
get routes(): A_ServerRoute[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { A_Server };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_Fragment, A_TYPES__Required } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__ServerConstructor } from './A-Server.types.js';
|
|
3
|
+
import { A_ServerRoute } from '../A-ServerRoute/A-ServerRoute.entity.js';
|
|
4
|
+
import '@adaas/a-utils/a-route';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.types.js';
|
|
6
|
+
import '../A-ServerRoute/A-ServerRoute.constants.js';
|
|
7
|
+
|
|
8
|
+
declare class A_Server extends A_Fragment {
|
|
9
|
+
port: number;
|
|
10
|
+
version: string;
|
|
11
|
+
protected _routes: A_ServerRoute[];
|
|
12
|
+
constructor(params: A_TYPES__Required<Partial<A_SERVER_TYPES__ServerConstructor>, [
|
|
13
|
+
'port',
|
|
14
|
+
'name'
|
|
15
|
+
]>);
|
|
16
|
+
/**
|
|
17
|
+
* A list of routes that the server will listen to
|
|
18
|
+
*/
|
|
19
|
+
get routes(): A_ServerRoute[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { A_Server };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
|
|
5
|
+
class A_Server extends aConcept.A_Fragment {
|
|
6
|
+
constructor(params) {
|
|
7
|
+
super(params);
|
|
8
|
+
this._routes = [];
|
|
9
|
+
this.port = params.port;
|
|
10
|
+
this._name = params.name;
|
|
11
|
+
this.version = params.version || "v1";
|
|
12
|
+
this._routes = params.routes || this._routes;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A list of routes that the server will listen to
|
|
16
|
+
*/
|
|
17
|
+
get routes() {
|
|
18
|
+
return this._routes;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.A_Server = A_Server;
|
|
23
|
+
//# sourceMappingURL=A-Server.context.js.map
|
|
24
|
+
//# sourceMappingURL=A-Server.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-Server/A-Server.context.ts"],"names":["A_Fragment"],"mappings":";;;;AAKO,MAAM,iBAAiBA,mBAAA,CAAW;AAAA,EAMrC,YACI,MAAA,EAIF;AACE,IAAA,KAAA,CAAM,MAAM,CAAA;AARhB,IAAA,IAAA,CAAU,UAA2B,EAAC;AAUlC,IAAA,IAAA,CAAK,OAAO,MAAA,CAAO,IAAA;AACnB,IAAA,IAAA,CAAK,QAAQ,MAAA,CAAO,IAAA;AACpB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAO,OAAA,IAAW,IAAA;AAEjC,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA,CAAO,MAAA,IAAU,IAAA,CAAK,OAAA;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,MAAA,GAA0B;AAC1B,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,EAChB;AAEJ","file":"A-Server.context.js","sourcesContent":["import { A_Fragment, A_TYPES__Required } from \"@adaas/a-concept\";\nimport { A_SERVER_TYPES__ServerConstructor } from \"./A-Server.types\";\nimport { A_ServerRoute } from \"@adaas/a-server/route/A-ServerRoute.entity\";\n\n\nexport class A_Server extends A_Fragment {\n\n public port: number;\n public version: string;\n protected _routes: A_ServerRoute[] = [];\n\n constructor(\n params: A_TYPES__Required<Partial<A_SERVER_TYPES__ServerConstructor>, [\n 'port',\n 'name'\n ]>\n ) {\n super(params);\n\n this.port = params.port;\n this._name = params.name;\n this.version = params.version || 'v1';\n\n this._routes = params.routes || this._routes;\n }\n\n\n /**\n * A list of routes that the server will listen to\n */\n get routes(): A_ServerRoute[] {\n return this._routes\n }\n\n}\n\n\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Fragment } from '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
class A_Server extends A_Fragment {
|
|
5
|
+
constructor(params) {
|
|
6
|
+
super(params);
|
|
7
|
+
this._routes = [];
|
|
8
|
+
this.port = params.port;
|
|
9
|
+
this._name = params.name;
|
|
10
|
+
this.version = params.version || "v1";
|
|
11
|
+
this._routes = params.routes || this._routes;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A list of routes that the server will listen to
|
|
15
|
+
*/
|
|
16
|
+
get routes() {
|
|
17
|
+
return this._routes;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { A_Server };
|
|
22
|
+
//# sourceMappingURL=A-Server.context.mjs.map
|
|
23
|
+
//# sourceMappingURL=A-Server.context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-Server/A-Server.context.ts"],"names":[],"mappings":";;;AAKO,MAAM,iBAAiB,UAAA,CAAW;AAAA,EAMrC,YACI,MAAA,EAIF;AACE,IAAA,KAAA,CAAM,MAAM,CAAA;AARhB,IAAA,IAAA,CAAU,UAA2B,EAAC;AAUlC,IAAA,IAAA,CAAK,OAAO,MAAA,CAAO,IAAA;AACnB,IAAA,IAAA,CAAK,QAAQ,MAAA,CAAO,IAAA;AACpB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAO,OAAA,IAAW,IAAA;AAEjC,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA,CAAO,MAAA,IAAU,IAAA,CAAK,OAAA;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,MAAA,GAA0B;AAC1B,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,EAChB;AAEJ","file":"A-Server.context.mjs","sourcesContent":["import { A_Fragment, A_TYPES__Required } from \"@adaas/a-concept\";\nimport { A_SERVER_TYPES__ServerConstructor } from \"./A-Server.types\";\nimport { A_ServerRoute } from \"@adaas/a-server/route/A-ServerRoute.entity\";\n\n\nexport class A_Server extends A_Fragment {\n\n public port: number;\n public version: string;\n protected _routes: A_ServerRoute[] = [];\n\n constructor(\n params: A_TYPES__Required<Partial<A_SERVER_TYPES__ServerConstructor>, [\n 'port',\n 'name'\n ]>\n ) {\n super(params);\n\n this.port = params.port;\n this._name = params.name;\n this.version = params.version || 'v1';\n\n this._routes = params.routes || this._routes;\n }\n\n\n /**\n * A list of routes that the server will listen to\n */\n get routes(): A_ServerRoute[] {\n return this._routes\n }\n\n}\n\n\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized } from './A-Server.types.mjs';
|
|
3
|
+
import '../A-ServerRoute/A-ServerRoute.entity.mjs';
|
|
4
|
+
import '@adaas/a-utils/a-route';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.types.mjs';
|
|
6
|
+
import '../A-ServerRoute/A-ServerRoute.constants.mjs';
|
|
7
|
+
|
|
8
|
+
declare class A_ServerError extends A_Error<A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized> {
|
|
9
|
+
status: number;
|
|
10
|
+
protected fromConstructor(params: A_SERVER_TYPES__ServerError_Init): void;
|
|
11
|
+
toJSON(): A_SERVER_TYPES__ServerError_Serialized;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { A_ServerError };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized } from './A-Server.types.js';
|
|
3
|
+
import '../A-ServerRoute/A-ServerRoute.entity.js';
|
|
4
|
+
import '@adaas/a-utils/a-route';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.types.js';
|
|
6
|
+
import '../A-ServerRoute/A-ServerRoute.constants.js';
|
|
7
|
+
|
|
8
|
+
declare class A_ServerError extends A_Error<A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized> {
|
|
9
|
+
status: number;
|
|
10
|
+
protected fromConstructor(params: A_SERVER_TYPES__ServerError_Init): void;
|
|
11
|
+
toJSON(): A_SERVER_TYPES__ServerError_Serialized;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { A_ServerError };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
|
|
5
|
+
class A_ServerError extends aConcept.A_Error {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.status = 500;
|
|
9
|
+
}
|
|
10
|
+
fromConstructor(params) {
|
|
11
|
+
super.fromConstructor(params);
|
|
12
|
+
if (params.status) {
|
|
13
|
+
this.status = params.status;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
toJSON() {
|
|
17
|
+
return {
|
|
18
|
+
...super.toJSON(),
|
|
19
|
+
status: this.status
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.A_ServerError = A_ServerError;
|
|
25
|
+
//# sourceMappingURL=A-Server.error.js.map
|
|
26
|
+
//# sourceMappingURL=A-Server.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-Server/A-Server.error.ts"],"names":["A_Error"],"mappings":";;;;AAIO,MAAM,sBAAsBA,gBAAA,CAAkF;AAAA,EAA9G,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,MAAA,GAAiB,GAAA;AAAA,EAAA;AAAA,EAGP,gBAAgB,MAAA,EAAgD;AACtE,IAAA,KAAA,CAAM,gBAAgB,MAAM,CAAA;AAC5B,IAAA,IAAI,OAAO,MAAA,EAAQ;AACf,MAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAAA,IACzB;AAAA,EACJ;AAAA,EAGA,MAAA,GAAiD;AAC7C,IAAA,OAAO;AAAA,MACH,GAAG,MAAM,MAAA,EAAO;AAAA,MAChB,QAAQ,IAAA,CAAK;AAAA,KACjB;AAAA,EACJ;AACJ","file":"A-Server.error.js","sourcesContent":["import { A_Error } from '@adaas/a-concept';\nimport { A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized } from './A-Server.types';\n\n\nexport class A_ServerError extends A_Error<A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized> {\n\n status: number = 500;\n\n\n protected fromConstructor(params: A_SERVER_TYPES__ServerError_Init): void {\n super.fromConstructor(params);\n if (params.status) {\n this.status = params.status;\n }\n }\n\n\n toJSON(): A_SERVER_TYPES__ServerError_Serialized {\n return {\n ...super.toJSON(),\n status: this.status\n }\n }\n}\n\n\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Error } from '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
class A_ServerError extends A_Error {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.status = 500;
|
|
8
|
+
}
|
|
9
|
+
fromConstructor(params) {
|
|
10
|
+
super.fromConstructor(params);
|
|
11
|
+
if (params.status) {
|
|
12
|
+
this.status = params.status;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
...super.toJSON(),
|
|
18
|
+
status: this.status
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { A_ServerError };
|
|
24
|
+
//# sourceMappingURL=A-Server.error.mjs.map
|
|
25
|
+
//# sourceMappingURL=A-Server.error.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-Server/A-Server.error.ts"],"names":[],"mappings":";;;AAIO,MAAM,sBAAsB,OAAA,CAAkF;AAAA,EAA9G,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,MAAA,GAAiB,GAAA;AAAA,EAAA;AAAA,EAGP,gBAAgB,MAAA,EAAgD;AACtE,IAAA,KAAA,CAAM,gBAAgB,MAAM,CAAA;AAC5B,IAAA,IAAI,OAAO,MAAA,EAAQ;AACf,MAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAAA,IACzB;AAAA,EACJ;AAAA,EAGA,MAAA,GAAiD;AAC7C,IAAA,OAAO;AAAA,MACH,GAAG,MAAM,MAAA,EAAO;AAAA,MAChB,QAAQ,IAAA,CAAK;AAAA,KACjB;AAAA,EACJ;AACJ","file":"A-Server.error.mjs","sourcesContent":["import { A_Error } from '@adaas/a-concept';\nimport { A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized } from './A-Server.types';\n\n\nexport class A_ServerError extends A_Error<A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized> {\n\n status: number = 500;\n\n\n protected fromConstructor(params: A_SERVER_TYPES__ServerError_Init): void {\n super.fromConstructor(params);\n if (params.status) {\n this.status = params.status;\n }\n }\n\n\n toJSON(): A_SERVER_TYPES__ServerError_Serialized {\n return {\n ...super.toJSON(),\n status: this.status\n }\n }\n}\n\n\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { A_TYPES__Error_Init, A_TYPES__Error_Serialized } from '@adaas/a-concept';
|
|
2
|
+
import { A_ServerRoute } from '../A-ServerRoute/A-ServerRoute.entity.mjs';
|
|
3
|
+
import '@adaas/a-utils/a-route';
|
|
4
|
+
import '../A-ServerRoute/A-ServerRoute.types.mjs';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.constants.mjs';
|
|
6
|
+
|
|
7
|
+
type A_SERVER_TYPES__ServerConstructor = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
routes: A_ServerRoute[];
|
|
11
|
+
port: number;
|
|
12
|
+
};
|
|
13
|
+
type A_SERVER_TYPES__ServerError_Init = {
|
|
14
|
+
/**
|
|
15
|
+
* HTTP Status Code of the error
|
|
16
|
+
*/
|
|
17
|
+
status?: number;
|
|
18
|
+
} & A_TYPES__Error_Init;
|
|
19
|
+
type A_SERVER_TYPES__ServerError_Serialized = {
|
|
20
|
+
/**
|
|
21
|
+
* HTTP Status Code of the error
|
|
22
|
+
*/
|
|
23
|
+
status: number;
|
|
24
|
+
} & A_TYPES__Error_Serialized;
|
|
25
|
+
|
|
26
|
+
export type { A_SERVER_TYPES__ServerConstructor, A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { A_TYPES__Error_Init, A_TYPES__Error_Serialized } from '@adaas/a-concept';
|
|
2
|
+
import { A_ServerRoute } from '../A-ServerRoute/A-ServerRoute.entity.js';
|
|
3
|
+
import '@adaas/a-utils/a-route';
|
|
4
|
+
import '../A-ServerRoute/A-ServerRoute.types.js';
|
|
5
|
+
import '../A-ServerRoute/A-ServerRoute.constants.js';
|
|
6
|
+
|
|
7
|
+
type A_SERVER_TYPES__ServerConstructor = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
routes: A_ServerRoute[];
|
|
11
|
+
port: number;
|
|
12
|
+
};
|
|
13
|
+
type A_SERVER_TYPES__ServerError_Init = {
|
|
14
|
+
/**
|
|
15
|
+
* HTTP Status Code of the error
|
|
16
|
+
*/
|
|
17
|
+
status?: number;
|
|
18
|
+
} & A_TYPES__Error_Init;
|
|
19
|
+
type A_SERVER_TYPES__ServerError_Serialized = {
|
|
20
|
+
/**
|
|
21
|
+
* HTTP Status Code of the error
|
|
22
|
+
*/
|
|
23
|
+
status: number;
|
|
24
|
+
} & A_TYPES__Error_Serialized;
|
|
25
|
+
|
|
26
|
+
export type { A_SERVER_TYPES__ServerConstructor, A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"A-Server.types.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"A-Server.types.mjs"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { A_Component, A_Scope } from '@adaas/a-concept';
|
|
2
|
+
import { A as A_Response } from '../../A-Response.entity-6qhiV7BE.mjs';
|
|
3
|
+
import { A as A_Request } from '../../A-Request.entity-r905O60G.mjs';
|
|
4
|
+
import 'http';
|
|
5
|
+
import 'stream';
|
|
6
|
+
import '../A-Response/A-Response.constants.mjs';
|
|
7
|
+
import '../A-Server/A-HttpServer.error.mjs';
|
|
8
|
+
import '../A-Server/A-HttpServer.types.mjs';
|
|
9
|
+
import '../A-Server/A-HttpServer.constants.mjs';
|
|
10
|
+
import '../A-Request/A-HttpServerRequest.context.mjs';
|
|
11
|
+
import '@adaas/a-utils/a-operation';
|
|
12
|
+
import '../A-Request/A-Request.constants.mjs';
|
|
13
|
+
import '../A-Request/A-Request.env.mjs';
|
|
14
|
+
import '../A-Request/A-HttpRequestData.context.mjs';
|
|
15
|
+
import '@adaas/a-utils/a-execution';
|
|
16
|
+
import '@adaas/a-utils/a-config';
|
|
17
|
+
import '../A-ServerRoute/A-ServerRoute.entity.mjs';
|
|
18
|
+
import '@adaas/a-utils/a-route';
|
|
19
|
+
import '../A-ServerRoute/A-ServerRoute.types.mjs';
|
|
20
|
+
import '../A-ServerRoute/A-ServerRoute.constants.mjs';
|
|
21
|
+
|
|
22
|
+
declare class A_ServerController extends A_Component {
|
|
23
|
+
callEntityMethod(request: A_Request<any, any, {
|
|
24
|
+
component: string;
|
|
25
|
+
operation: string;
|
|
26
|
+
}>, response: A_Response, scope: A_Scope): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { A_ServerController };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { A_Component, A_Scope } from '@adaas/a-concept';
|
|
2
|
+
import { A as A_Response } from '../../A-Response.entity-bjh6bofZ.js';
|
|
3
|
+
import { A as A_Request } from '../../A-Request.entity-8_9MCXT2.js';
|
|
4
|
+
import 'http';
|
|
5
|
+
import 'stream';
|
|
6
|
+
import '../A-Response/A-Response.constants.js';
|
|
7
|
+
import '../A-Server/A-HttpServer.error.js';
|
|
8
|
+
import '../A-Server/A-HttpServer.types.js';
|
|
9
|
+
import '../A-Server/A-HttpServer.constants.js';
|
|
10
|
+
import '../A-Request/A-HttpServerRequest.context.js';
|
|
11
|
+
import '@adaas/a-utils/a-operation';
|
|
12
|
+
import '../A-Request/A-Request.constants.js';
|
|
13
|
+
import '../A-Request/A-Request.env.js';
|
|
14
|
+
import '../A-Request/A-HttpRequestData.context.js';
|
|
15
|
+
import '@adaas/a-utils/a-execution';
|
|
16
|
+
import '@adaas/a-utils/a-config';
|
|
17
|
+
import '../A-ServerRoute/A-ServerRoute.entity.js';
|
|
18
|
+
import '@adaas/a-utils/a-route';
|
|
19
|
+
import '../A-ServerRoute/A-ServerRoute.types.js';
|
|
20
|
+
import '../A-ServerRoute/A-ServerRoute.constants.js';
|
|
21
|
+
|
|
22
|
+
declare class A_ServerController extends A_Component {
|
|
23
|
+
callEntityMethod(request: A_Request<any, any, {
|
|
24
|
+
component: string;
|
|
25
|
+
operation: string;
|
|
26
|
+
}>, response: A_Response, scope: A_Scope): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { A_ServerController };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
var AServerRouter_component = require('@adaas/a-server/router/A-ServerRouter.component');
|
|
5
|
+
var AResponse_entity = require('@adaas/a-server/response/A-Response.entity');
|
|
6
|
+
var ARequest_entity = require('@adaas/a-server/request/A-Request.entity');
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = __getOwnPropDesc(target, key) ;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (decorator(target, key, result) ) || result;
|
|
15
|
+
if (result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
19
|
+
class A_ServerController extends aConcept.A_Component {
|
|
20
|
+
async callEntityMethod(request, response, scope) {
|
|
21
|
+
if (!scope.has(request.params.component))
|
|
22
|
+
return;
|
|
23
|
+
if (!request.params.operation || typeof request.params.operation !== "string")
|
|
24
|
+
return;
|
|
25
|
+
const possibleComponent = scope.resolve(request.params.component);
|
|
26
|
+
if (!possibleComponent || ![aConcept.A_Component, aConcept.A_Container].some((c) => possibleComponent instanceof c))
|
|
27
|
+
return;
|
|
28
|
+
const component = possibleComponent;
|
|
29
|
+
const meta = aConcept.A_Context.meta(component);
|
|
30
|
+
const targetFeature = meta.features().find((f) => f.name === `${component.constructor.name}.${request.params.operation}`);
|
|
31
|
+
if (!targetFeature)
|
|
32
|
+
return;
|
|
33
|
+
await component.call(request.params.operation, scope);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
__decorateClass([
|
|
37
|
+
AServerRouter_component.A_ServerRouter.Post({
|
|
38
|
+
path: "/:component/:operation",
|
|
39
|
+
version: "v1",
|
|
40
|
+
prefix: "a-component"
|
|
41
|
+
}),
|
|
42
|
+
__decorateParam(0, aConcept.A_Inject(ARequest_entity.A_Request)),
|
|
43
|
+
__decorateParam(1, aConcept.A_Inject(AResponse_entity.A_Response)),
|
|
44
|
+
__decorateParam(2, aConcept.A_Inject(aConcept.A_Scope))
|
|
45
|
+
], A_ServerController.prototype, "callEntityMethod");
|
|
46
|
+
|
|
47
|
+
exports.A_ServerController = A_ServerController;
|
|
48
|
+
//# sourceMappingURL=A-ServerController.component.js.map
|
|
49
|
+
//# sourceMappingURL=A-ServerController.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerController/A-ServerController.component.ts"],"names":["A_Component","A_Container","A_Context","A_ServerRouter","A_Request","A_Response","A_Scope"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAM,2BAA2BA,oBAAA,CAAY;AAAA,EAQhD,MAAM,gBAAA,CACmB,OAAA,EAIC,QAAA,EACH,KAAA,EACrB;AAIE,IAAA,IAAI,CAAC,KAAA,CAAM,GAAA,CAAI,OAAA,CAAQ,OAAO,SAAS,CAAA;AACnC,MAAA;AAEJ,IAAA,IAAI,CAAC,OAAA,CAAQ,MAAA,CAAO,aAAa,OAAO,OAAA,CAAQ,OAAO,SAAA,KAAc,QAAA;AACjE,MAAA;AAGJ,IAAA,MAAM,iBAAA,GAAoB,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ,OAAO,SAAS,CAAA;AAEhE,IAAA,IACI,CAAC,iBAAA,IAED,CAAC,CAACA,oBAAA,EAAaC,oBAAW,CAAA,CACrB,IAAA,CAAK,CAAA,CAAA,KAAK,iBAAA,YAA6B,CAAC,CAAA;AAE7C,MAAA;AAEJ,IAAA,MAAM,SAAA,GAAY,iBAAA;AAElB,IAAA,MAAM,IAAA,GAAOC,kBAAA,CAAU,IAAA,CAAK,SAAS,CAAA;AAErC,IAAA,MAAM,gBAAgB,IAAA,CAAK,QAAA,EAAS,CAAE,IAAA,CAAK,OAAK,CAAA,CAAE,IAAA,KAAS,CAAA,EAAG,SAAA,CAAU,YAAY,IAAI,CAAA,CAAA,EAAI,OAAA,CAAQ,MAAA,CAAO,SAAS,CAAA,CAAE,CAAA;AAEtH,IAAA,IAAI,CAAC,aAAA;AACD,MAAA;AAGJ,IAAA,MAAM,SAAA,CAAU,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,WAAW,KAAK,CAAA;AAAA,EACxD;AACJ;AAxCU,eAAA,CAAA;AAAA,EALLC,uCAAe,IAAA,CAAK;AAAA,IACjB,IAAA,EAAM,wBAAA;AAAA,IACN,OAAA,EAAS,IAAA;AAAA,IACT,MAAA,EAAQ;AAAA,GACX,CAAA;AAAA,EAEI,qCAASC,yBAAS,CAAA,CAAA;AAAA,EAIlB,qCAASC,2BAAU,CAAA,CAAA;AAAA,EACnB,qCAASC,gBAAO,CAAA;AAAA,CAAA,EAdZ,kBAAA,CAQH,SAAA,EAAA,kBAAA,CAAA","file":"A-ServerController.component.js","sourcesContent":["import { A_Component, A_Container, A_Context, A_Feature, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { A_ServerRouter } from \"@adaas/a-server/router/A-ServerRouter.component\";\nimport { A_Response } from \"@adaas/a-server/response/A-Response.entity\";\nimport { A_Request } from \"@adaas/a-server/request/A-Request.entity\";\n\n\n\nexport class A_ServerController extends A_Component {\n\n\n @A_ServerRouter.Post({\n path: '/:component/:operation',\n version: 'v1',\n prefix: 'a-component'\n })\n async callEntityMethod(\n @A_Inject(A_Request) request: A_Request<any, any, {\n component: string,\n operation: string\n }>,\n @A_Inject(A_Response) response: A_Response,\n @A_Inject(A_Scope) scope: A_Scope\n ) {\n\n // check step by step each parameter to ensure they are valid\n\n if (!scope.has(request.params.component))\n return\n\n if (!request.params.operation || typeof request.params.operation !== 'string')\n return;\n\n\n const possibleComponent = scope.resolve(request.params.component);\n\n if (\n !possibleComponent\n ||\n ![A_Component, A_Container]\n .some(c => possibleComponent instanceof c)\n )\n return;\n\n const component = possibleComponent as A_Component | A_Container;\n\n const meta = A_Context.meta(component);\n\n const targetFeature = meta.features().find(f => f.name === `${component.constructor.name}.${request.params.operation}`);\n\n if (!targetFeature)\n return;\n\n\n await component.call(request.params.operation, scope);\n }\n}"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __decorateClass, __decorateParam } from '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Inject, A_Scope, A_Component, A_Container, A_Context } from '@adaas/a-concept';
|
|
3
|
+
import { A_ServerRouter } from '@adaas/a-server/router/A-ServerRouter.component';
|
|
4
|
+
import { A_Response } from '@adaas/a-server/response/A-Response.entity';
|
|
5
|
+
import { A_Request } from '@adaas/a-server/request/A-Request.entity';
|
|
6
|
+
|
|
7
|
+
class A_ServerController extends A_Component {
|
|
8
|
+
async callEntityMethod(request, response, scope) {
|
|
9
|
+
if (!scope.has(request.params.component))
|
|
10
|
+
return;
|
|
11
|
+
if (!request.params.operation || typeof request.params.operation !== "string")
|
|
12
|
+
return;
|
|
13
|
+
const possibleComponent = scope.resolve(request.params.component);
|
|
14
|
+
if (!possibleComponent || ![A_Component, A_Container].some((c) => possibleComponent instanceof c))
|
|
15
|
+
return;
|
|
16
|
+
const component = possibleComponent;
|
|
17
|
+
const meta = A_Context.meta(component);
|
|
18
|
+
const targetFeature = meta.features().find((f) => f.name === `${component.constructor.name}.${request.params.operation}`);
|
|
19
|
+
if (!targetFeature)
|
|
20
|
+
return;
|
|
21
|
+
await component.call(request.params.operation, scope);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
__decorateClass([
|
|
25
|
+
A_ServerRouter.Post({
|
|
26
|
+
path: "/:component/:operation",
|
|
27
|
+
version: "v1",
|
|
28
|
+
prefix: "a-component"
|
|
29
|
+
}),
|
|
30
|
+
__decorateParam(0, A_Inject(A_Request)),
|
|
31
|
+
__decorateParam(1, A_Inject(A_Response)),
|
|
32
|
+
__decorateParam(2, A_Inject(A_Scope))
|
|
33
|
+
], A_ServerController.prototype, "callEntityMethod", 1);
|
|
34
|
+
|
|
35
|
+
export { A_ServerController };
|
|
36
|
+
//# sourceMappingURL=A-ServerController.component.mjs.map
|
|
37
|
+
//# sourceMappingURL=A-ServerController.component.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerController/A-ServerController.component.ts"],"names":[],"mappings":";;;;;;AAOO,MAAM,2BAA2B,WAAA,CAAY;AAAA,EAQhD,MAAM,gBAAA,CACmB,OAAA,EAIC,QAAA,EACH,KAAA,EACrB;AAIE,IAAA,IAAI,CAAC,KAAA,CAAM,GAAA,CAAI,OAAA,CAAQ,OAAO,SAAS,CAAA;AACnC,MAAA;AAEJ,IAAA,IAAI,CAAC,OAAA,CAAQ,MAAA,CAAO,aAAa,OAAO,OAAA,CAAQ,OAAO,SAAA,KAAc,QAAA;AACjE,MAAA;AAGJ,IAAA,MAAM,iBAAA,GAAoB,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ,OAAO,SAAS,CAAA;AAEhE,IAAA,IACI,CAAC,iBAAA,IAED,CAAC,CAAC,WAAA,EAAa,WAAW,CAAA,CACrB,IAAA,CAAK,CAAA,CAAA,KAAK,iBAAA,YAA6B,CAAC,CAAA;AAE7C,MAAA;AAEJ,IAAA,MAAM,SAAA,GAAY,iBAAA;AAElB,IAAA,MAAM,IAAA,GAAO,SAAA,CAAU,IAAA,CAAK,SAAS,CAAA;AAErC,IAAA,MAAM,gBAAgB,IAAA,CAAK,QAAA,EAAS,CAAE,IAAA,CAAK,OAAK,CAAA,CAAE,IAAA,KAAS,CAAA,EAAG,SAAA,CAAU,YAAY,IAAI,CAAA,CAAA,EAAI,OAAA,CAAQ,MAAA,CAAO,SAAS,CAAA,CAAE,CAAA;AAEtH,IAAA,IAAI,CAAC,aAAA;AACD,MAAA;AAGJ,IAAA,MAAM,SAAA,CAAU,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,WAAW,KAAK,CAAA;AAAA,EACxD;AACJ;AAxCU,eAAA,CAAA;AAAA,EALL,eAAe,IAAA,CAAK;AAAA,IACjB,IAAA,EAAM,wBAAA;AAAA,IACN,OAAA,EAAS,IAAA;AAAA,IACT,MAAA,EAAQ;AAAA,GACX,CAAA;AAAA,EAEI,4BAAS,SAAS,CAAA,CAAA;AAAA,EAIlB,4BAAS,UAAU,CAAA,CAAA;AAAA,EACnB,4BAAS,OAAO,CAAA;AAAA,CAAA,EAdZ,kBAAA,CAQH,SAAA,EAAA,kBAAA,EAAA,CAAA,CAAA","file":"A-ServerController.component.mjs","sourcesContent":["import { A_Component, A_Container, A_Context, A_Feature, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { A_ServerRouter } from \"@adaas/a-server/router/A-ServerRouter.component\";\nimport { A_Response } from \"@adaas/a-server/response/A-Response.entity\";\nimport { A_Request } from \"@adaas/a-server/request/A-Request.entity\";\n\n\n\nexport class A_ServerController extends A_Component {\n\n\n @A_ServerRouter.Post({\n path: '/:component/:operation',\n version: 'v1',\n prefix: 'a-component'\n })\n async callEntityMethod(\n @A_Inject(A_Request) request: A_Request<any, any, {\n component: string,\n operation: string\n }>,\n @A_Inject(A_Response) response: A_Response,\n @A_Inject(A_Scope) scope: A_Scope\n ) {\n\n // check step by step each parameter to ensure they are valid\n\n if (!scope.has(request.params.component))\n return\n\n if (!request.params.operation || typeof request.params.operation !== 'string')\n return;\n\n\n const possibleComponent = scope.resolve(request.params.component);\n\n if (\n !possibleComponent\n ||\n ![A_Component, A_Container]\n .some(c => possibleComponent instanceof c)\n )\n return;\n\n const component = possibleComponent as A_Component | A_Container;\n\n const meta = A_Context.meta(component);\n\n const targetFeature = meta.features().find(f => f.name === `${component.constructor.name}.${request.params.operation}`);\n\n if (!targetFeature)\n return;\n\n\n await component.call(request.params.operation, scope);\n }\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"A-ServerController.types.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"A-ServerController.types.mjs"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { A_Entity } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListSerialized, A_SERVER_TYPES__A_EntityListPagination } from './A-EntityList.types.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A-EntityList
|
|
6
|
+
*
|
|
7
|
+
* Entity that represents a list of entities with pagination of particular type
|
|
8
|
+
*/
|
|
9
|
+
declare class A_ServerEntityList<EntityType extends A_Entity = A_Entity> extends A_Entity<A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListSerialized> {
|
|
10
|
+
static get scope(): string;
|
|
11
|
+
protected _entityConstructor: new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
|
|
12
|
+
protected _items: Array<EntityType>;
|
|
13
|
+
protected _pagination: A_SERVER_TYPES__A_EntityListPagination;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the entity constructor used for the list
|
|
16
|
+
*/
|
|
17
|
+
get entityConstructor(): new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the list of items contained in the entity list
|
|
20
|
+
*/
|
|
21
|
+
get items(): Array<EntityType>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns pagination information about the entity list
|
|
24
|
+
*/
|
|
25
|
+
get pagination(): A_SERVER_TYPES__A_EntityListPagination;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new instance of A_EntityList
|
|
28
|
+
*
|
|
29
|
+
* @param newEntity
|
|
30
|
+
*/
|
|
31
|
+
fromNew(newEntity: A_SERVER_TYPES__A_EntityListConstructor): void;
|
|
32
|
+
/**
|
|
33
|
+
* Allows to convert Repository Response data to EntityList instance
|
|
34
|
+
*
|
|
35
|
+
* [!] This method does not load the data from the repository, it only converts the data to the EntityList instance
|
|
36
|
+
*
|
|
37
|
+
* @param items
|
|
38
|
+
* @param pagination
|
|
39
|
+
*/
|
|
40
|
+
fromList(items: Array<EntityType> | Array<ReturnType<EntityType['toJSON']>>, pagination?: A_SERVER_TYPES__A_EntityListPagination): void;
|
|
41
|
+
/**
|
|
42
|
+
* Serializes the EntityList to a JSON object
|
|
43
|
+
*
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
toJSON(): A_SERVER_TYPES__A_EntityListSerialized<EntityType>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { A_ServerEntityList };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { A_Entity } from '@adaas/a-concept';
|
|
2
|
+
import { A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListSerialized, A_SERVER_TYPES__A_EntityListPagination } from './A-EntityList.types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A-EntityList
|
|
6
|
+
*
|
|
7
|
+
* Entity that represents a list of entities with pagination of particular type
|
|
8
|
+
*/
|
|
9
|
+
declare class A_ServerEntityList<EntityType extends A_Entity = A_Entity> extends A_Entity<A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListSerialized> {
|
|
10
|
+
static get scope(): string;
|
|
11
|
+
protected _entityConstructor: new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
|
|
12
|
+
protected _items: Array<EntityType>;
|
|
13
|
+
protected _pagination: A_SERVER_TYPES__A_EntityListPagination;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the entity constructor used for the list
|
|
16
|
+
*/
|
|
17
|
+
get entityConstructor(): new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the list of items contained in the entity list
|
|
20
|
+
*/
|
|
21
|
+
get items(): Array<EntityType>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns pagination information about the entity list
|
|
24
|
+
*/
|
|
25
|
+
get pagination(): A_SERVER_TYPES__A_EntityListPagination;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new instance of A_EntityList
|
|
28
|
+
*
|
|
29
|
+
* @param newEntity
|
|
30
|
+
*/
|
|
31
|
+
fromNew(newEntity: A_SERVER_TYPES__A_EntityListConstructor): void;
|
|
32
|
+
/**
|
|
33
|
+
* Allows to convert Repository Response data to EntityList instance
|
|
34
|
+
*
|
|
35
|
+
* [!] This method does not load the data from the repository, it only converts the data to the EntityList instance
|
|
36
|
+
*
|
|
37
|
+
* @param items
|
|
38
|
+
* @param pagination
|
|
39
|
+
*/
|
|
40
|
+
fromList(items: Array<EntityType> | Array<ReturnType<EntityType['toJSON']>>, pagination?: A_SERVER_TYPES__A_EntityListPagination): void;
|
|
41
|
+
/**
|
|
42
|
+
* Serializes the EntityList to a JSON object
|
|
43
|
+
*
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
toJSON(): A_SERVER_TYPES__A_EntityListSerialized<EntityType>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { A_ServerEntityList };
|