@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,91 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
|
|
5
|
+
class A_ServerEntityList extends aConcept.A_Entity {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this._items = [];
|
|
9
|
+
this._pagination = {
|
|
10
|
+
total: 0,
|
|
11
|
+
page: 1,
|
|
12
|
+
pageSize: 10
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
static get scope() {
|
|
16
|
+
return "a-server";
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns the entity constructor used for the list
|
|
20
|
+
*/
|
|
21
|
+
get entityConstructor() {
|
|
22
|
+
return this._entityConstructor;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns the list of items contained in the entity list
|
|
26
|
+
*/
|
|
27
|
+
get items() {
|
|
28
|
+
return this._items;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns pagination information about the entity list
|
|
32
|
+
*/
|
|
33
|
+
get pagination() {
|
|
34
|
+
return this._pagination;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new instance of A_EntityList
|
|
38
|
+
*
|
|
39
|
+
* @param newEntity
|
|
40
|
+
*/
|
|
41
|
+
fromNew(newEntity) {
|
|
42
|
+
this.aseid = new aConcept.ASEID({
|
|
43
|
+
concept: aConcept.A_Context.root.name,
|
|
44
|
+
scope: "default",
|
|
45
|
+
entity: "a-list" + (newEntity.name ? `.${newEntity.name}` : ""),
|
|
46
|
+
id: (/* @__PURE__ */ new Date()).getTime().toString()
|
|
47
|
+
});
|
|
48
|
+
this._entityConstructor = newEntity.constructor;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Allows to convert Repository Response data to EntityList instance
|
|
52
|
+
*
|
|
53
|
+
* [!] This method does not load the data from the repository, it only converts the data to the EntityList instance
|
|
54
|
+
*
|
|
55
|
+
* @param items
|
|
56
|
+
* @param pagination
|
|
57
|
+
*/
|
|
58
|
+
fromList(items, pagination) {
|
|
59
|
+
this._items = items.map((item) => {
|
|
60
|
+
if (item instanceof aConcept.A_Entity) {
|
|
61
|
+
return item;
|
|
62
|
+
} else {
|
|
63
|
+
const entity = new this._entityConstructor(item);
|
|
64
|
+
return entity;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
if (pagination) {
|
|
68
|
+
this._pagination = {
|
|
69
|
+
total: pagination.total,
|
|
70
|
+
page: pagination.page,
|
|
71
|
+
pageSize: pagination.pageSize
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Serializes the EntityList to a JSON object
|
|
77
|
+
*
|
|
78
|
+
* @returns
|
|
79
|
+
*/
|
|
80
|
+
toJSON() {
|
|
81
|
+
return {
|
|
82
|
+
...super.toJSON(),
|
|
83
|
+
items: this._items.map((i) => i.toJSON()),
|
|
84
|
+
pagination: this._pagination
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
exports.A_ServerEntityList = A_ServerEntityList;
|
|
90
|
+
//# sourceMappingURL=A-EntityList.entity.js.map
|
|
91
|
+
//# sourceMappingURL=A-EntityList.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerEntityList/A-EntityList.entity.ts"],"names":["A_Entity","ASEID","A_Context"],"mappings":";;;;AAiBO,MAAM,2BAEHA,iBAAA,CAGR;AAAA,EALK,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAYH,IAAA,IAAA,CAAU,SAA4B,EAAC;AACvC,IAAA,IAAA,CAAU,WAAA,GAAsD;AAAA,MAC5D,KAAA,EAAO,CAAA;AAAA,MACP,IAAA,EAAM,CAAA;AAAA,MACN,QAAA,EAAU;AAAA,KACd;AAAA,EAAA;AAAA,EAVA,WAAW,KAAA,GAAgB;AACvB,IAAA,OAAO,UAAA;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAcA,IAAI,iBAAA,GAAyF;AACzF,IAAA,OAAO,IAAA,CAAK,kBAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,KAAA,GAA2B;AAC3B,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,UAAA,GAAqD;AACrD,IAAA,OAAO,IAAA,CAAK,WAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,QAAQ,SAAA,EAA0D;AAC9D,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAIC,cAAA,CAAM;AAAA,MACnB,OAAA,EAASC,mBAAU,IAAA,CAAK,IAAA;AAAA,MACxB,KAAA,EAAO,SAAA;AAAA,MACP,QAAQ,QAAA,IAAY,SAAA,CAAU,OAAO,CAAA,CAAA,EAAI,SAAA,CAAU,IAAI,CAAA,CAAA,GAAK,EAAA,CAAA;AAAA,MAC5D,qBAAK,IAAI,IAAA,EAAK,EAAG,OAAA,GAAU,QAAA;AAAS,KACvC,CAAA;AAED,IAAA,IAAA,CAAK,qBAAqB,SAAA,CAAU,WAAA;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,QAAA,CACI,OACA,UAAA,EACF;AACE,IAAA,IAAA,CAAK,MAAA,GAAS,KAAA,CAAM,GAAA,CAAI,CAAA,IAAA,KAAQ;AAC5B,MAAA,IAAI,gBAAgBF,iBAAA,EAAU;AAC1B,QAAA,OAAO,IAAA;AAAA,MACX,CAAA,MAAO;AACH,QAAA,MAAM,MAAA,GAAS,IAAI,IAAA,CAAK,kBAAA,CAAmB,IAAI,CAAA;AAC/C,QAAA,OAAO,MAAA;AAAA,MACX;AAAA,IACJ,CAAC,CAAA;AAED,IAAA,IAAI,UAAA,EAAY;AACZ,MAAA,IAAA,CAAK,WAAA,GAAc;AAAA,QACf,OAAO,UAAA,CAAW,KAAA;AAAA,QAClB,MAAM,UAAA,CAAW,IAAA;AAAA,QACjB,UAAU,UAAA,CAAW;AAAA,OACzB;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAA,GAA6D;AACzD,IAAA,OAAO;AAAA,MACH,GAAG,MAAM,MAAA,EAAO;AAAA,MAChB,OAAO,IAAA,CAAK,MAAA,CAAO,IAAI,CAAA,CAAA,KAAK,CAAA,CAAE,QAAQ,CAAA;AAAA,MACtC,YAAY,IAAA,CAAK;AAAA,KACrB;AAAA,EACJ;AACJ","file":"A-EntityList.entity.js","sourcesContent":["import {\n A_Context, A_Entity,\n ASEID,\n} from \"@adaas/a-concept\";\nimport {\n A_SERVER_TYPES__A_EntityListConstructor,\n A_SERVER_TYPES__A_EntityListPagination,\n A_SERVER_TYPES__A_EntityListSerialized\n} from \"./A-EntityList.types\";\n\n\n\n/**\n * A-EntityList\n * \n * Entity that represents a list of entities with pagination of particular type\n */\nexport class A_ServerEntityList<\n EntityType extends A_Entity = A_Entity,\n> extends A_Entity<\n A_SERVER_TYPES__A_EntityListConstructor,\n A_SERVER_TYPES__A_EntityListSerialized\n> {\n\n static get scope(): string {\n return 'a-server';\n }\n\n protected _entityConstructor!: new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;\n protected _items: Array<EntityType> = [];\n protected _pagination: A_SERVER_TYPES__A_EntityListPagination = {\n total: 0,\n page: 1,\n pageSize: 10\n };\n\n\n /**\n * Returns the entity constructor used for the list\n */\n get entityConstructor(): new (...args: ConstructorParameters<typeof A_Entity>) => EntityType {\n return this._entityConstructor;\n }\n\n /**\n * Returns the list of items contained in the entity list\n */\n get items(): Array<EntityType> {\n return this._items;\n }\n\n /**\n * Returns pagination information about the entity list\n */\n get pagination(): A_SERVER_TYPES__A_EntityListPagination {\n return this._pagination;\n }\n\n\n\n\n /**\n * Creates a new instance of A_EntityList\n * \n * @param newEntity \n */\n fromNew(newEntity: A_SERVER_TYPES__A_EntityListConstructor): void {\n this.aseid = new ASEID({\n concept: A_Context.root.name,\n scope: 'default',\n entity: 'a-list' + (newEntity.name ? `.${newEntity.name}` : ''),\n id: (new Date()).getTime().toString(),\n });\n\n this._entityConstructor = newEntity.constructor as new (...args: any[]) => EntityType;\n }\n\n\n\n /**\n * Allows to convert Repository Response data to EntityList instance\n * \n * [!] This method does not load the data from the repository, it only converts the data to the EntityList instance\n * \n * @param items \n * @param pagination \n */\n fromList(\n items: Array<EntityType> | Array<ReturnType<EntityType['toJSON']>>,\n pagination?: A_SERVER_TYPES__A_EntityListPagination\n ) {\n this._items = items.map(item => {\n if (item instanceof A_Entity) {\n return item as EntityType;\n } else {\n const entity = new this._entityConstructor(item);\n return entity;\n }\n });\n\n if (pagination) {\n this._pagination = {\n total: pagination.total,\n page: pagination.page,\n pageSize: pagination.pageSize\n }\n }\n }\n\n\n\n /**\n * Serializes the EntityList to a JSON object\n * \n * @returns \n */\n toJSON(): A_SERVER_TYPES__A_EntityListSerialized<EntityType> {\n return {\n ...super.toJSON(),\n items: this._items.map(i => i.toJSON()) as ReturnType<EntityType['toJSON']>[],\n pagination: this._pagination\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Entity, ASEID, A_Context } from '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
class A_ServerEntityList extends A_Entity {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this._items = [];
|
|
8
|
+
this._pagination = {
|
|
9
|
+
total: 0,
|
|
10
|
+
page: 1,
|
|
11
|
+
pageSize: 10
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
static get scope() {
|
|
15
|
+
return "a-server";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns the entity constructor used for the list
|
|
19
|
+
*/
|
|
20
|
+
get entityConstructor() {
|
|
21
|
+
return this._entityConstructor;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the list of items contained in the entity list
|
|
25
|
+
*/
|
|
26
|
+
get items() {
|
|
27
|
+
return this._items;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns pagination information about the entity list
|
|
31
|
+
*/
|
|
32
|
+
get pagination() {
|
|
33
|
+
return this._pagination;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new instance of A_EntityList
|
|
37
|
+
*
|
|
38
|
+
* @param newEntity
|
|
39
|
+
*/
|
|
40
|
+
fromNew(newEntity) {
|
|
41
|
+
this.aseid = new ASEID({
|
|
42
|
+
concept: A_Context.root.name,
|
|
43
|
+
scope: "default",
|
|
44
|
+
entity: "a-list" + (newEntity.name ? `.${newEntity.name}` : ""),
|
|
45
|
+
id: (/* @__PURE__ */ new Date()).getTime().toString()
|
|
46
|
+
});
|
|
47
|
+
this._entityConstructor = newEntity.constructor;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Allows to convert Repository Response data to EntityList instance
|
|
51
|
+
*
|
|
52
|
+
* [!] This method does not load the data from the repository, it only converts the data to the EntityList instance
|
|
53
|
+
*
|
|
54
|
+
* @param items
|
|
55
|
+
* @param pagination
|
|
56
|
+
*/
|
|
57
|
+
fromList(items, pagination) {
|
|
58
|
+
this._items = items.map((item) => {
|
|
59
|
+
if (item instanceof A_Entity) {
|
|
60
|
+
return item;
|
|
61
|
+
} else {
|
|
62
|
+
const entity = new this._entityConstructor(item);
|
|
63
|
+
return entity;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
if (pagination) {
|
|
67
|
+
this._pagination = {
|
|
68
|
+
total: pagination.total,
|
|
69
|
+
page: pagination.page,
|
|
70
|
+
pageSize: pagination.pageSize
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Serializes the EntityList to a JSON object
|
|
76
|
+
*
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
toJSON() {
|
|
80
|
+
return {
|
|
81
|
+
...super.toJSON(),
|
|
82
|
+
items: this._items.map((i) => i.toJSON()),
|
|
83
|
+
pagination: this._pagination
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { A_ServerEntityList };
|
|
89
|
+
//# sourceMappingURL=A-EntityList.entity.mjs.map
|
|
90
|
+
//# sourceMappingURL=A-EntityList.entity.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerEntityList/A-EntityList.entity.ts"],"names":[],"mappings":";;;AAiBO,MAAM,2BAEH,QAAA,CAGR;AAAA,EALK,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAYH,IAAA,IAAA,CAAU,SAA4B,EAAC;AACvC,IAAA,IAAA,CAAU,WAAA,GAAsD;AAAA,MAC5D,KAAA,EAAO,CAAA;AAAA,MACP,IAAA,EAAM,CAAA;AAAA,MACN,QAAA,EAAU;AAAA,KACd;AAAA,EAAA;AAAA,EAVA,WAAW,KAAA,GAAgB;AACvB,IAAA,OAAO,UAAA;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAcA,IAAI,iBAAA,GAAyF;AACzF,IAAA,OAAO,IAAA,CAAK,kBAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,KAAA,GAA2B;AAC3B,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,UAAA,GAAqD;AACrD,IAAA,OAAO,IAAA,CAAK,WAAA;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,QAAQ,SAAA,EAA0D;AAC9D,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,KAAA,CAAM;AAAA,MACnB,OAAA,EAAS,UAAU,IAAA,CAAK,IAAA;AAAA,MACxB,KAAA,EAAO,SAAA;AAAA,MACP,QAAQ,QAAA,IAAY,SAAA,CAAU,OAAO,CAAA,CAAA,EAAI,SAAA,CAAU,IAAI,CAAA,CAAA,GAAK,EAAA,CAAA;AAAA,MAC5D,qBAAK,IAAI,IAAA,EAAK,EAAG,OAAA,GAAU,QAAA;AAAS,KACvC,CAAA;AAED,IAAA,IAAA,CAAK,qBAAqB,SAAA,CAAU,WAAA;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,QAAA,CACI,OACA,UAAA,EACF;AACE,IAAA,IAAA,CAAK,MAAA,GAAS,KAAA,CAAM,GAAA,CAAI,CAAA,IAAA,KAAQ;AAC5B,MAAA,IAAI,gBAAgB,QAAA,EAAU;AAC1B,QAAA,OAAO,IAAA;AAAA,MACX,CAAA,MAAO;AACH,QAAA,MAAM,MAAA,GAAS,IAAI,IAAA,CAAK,kBAAA,CAAmB,IAAI,CAAA;AAC/C,QAAA,OAAO,MAAA;AAAA,MACX;AAAA,IACJ,CAAC,CAAA;AAED,IAAA,IAAI,UAAA,EAAY;AACZ,MAAA,IAAA,CAAK,WAAA,GAAc;AAAA,QACf,OAAO,UAAA,CAAW,KAAA;AAAA,QAClB,MAAM,UAAA,CAAW,IAAA;AAAA,QACjB,UAAU,UAAA,CAAW;AAAA,OACzB;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAA,GAA6D;AACzD,IAAA,OAAO;AAAA,MACH,GAAG,MAAM,MAAA,EAAO;AAAA,MAChB,OAAO,IAAA,CAAK,MAAA,CAAO,IAAI,CAAA,CAAA,KAAK,CAAA,CAAE,QAAQ,CAAA;AAAA,MACtC,YAAY,IAAA,CAAK;AAAA,KACrB;AAAA,EACJ;AACJ","file":"A-EntityList.entity.mjs","sourcesContent":["import {\n A_Context, A_Entity,\n ASEID,\n} from \"@adaas/a-concept\";\nimport {\n A_SERVER_TYPES__A_EntityListConstructor,\n A_SERVER_TYPES__A_EntityListPagination,\n A_SERVER_TYPES__A_EntityListSerialized\n} from \"./A-EntityList.types\";\n\n\n\n/**\n * A-EntityList\n * \n * Entity that represents a list of entities with pagination of particular type\n */\nexport class A_ServerEntityList<\n EntityType extends A_Entity = A_Entity,\n> extends A_Entity<\n A_SERVER_TYPES__A_EntityListConstructor,\n A_SERVER_TYPES__A_EntityListSerialized\n> {\n\n static get scope(): string {\n return 'a-server';\n }\n\n protected _entityConstructor!: new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;\n protected _items: Array<EntityType> = [];\n protected _pagination: A_SERVER_TYPES__A_EntityListPagination = {\n total: 0,\n page: 1,\n pageSize: 10\n };\n\n\n /**\n * Returns the entity constructor used for the list\n */\n get entityConstructor(): new (...args: ConstructorParameters<typeof A_Entity>) => EntityType {\n return this._entityConstructor;\n }\n\n /**\n * Returns the list of items contained in the entity list\n */\n get items(): Array<EntityType> {\n return this._items;\n }\n\n /**\n * Returns pagination information about the entity list\n */\n get pagination(): A_SERVER_TYPES__A_EntityListPagination {\n return this._pagination;\n }\n\n\n\n\n /**\n * Creates a new instance of A_EntityList\n * \n * @param newEntity \n */\n fromNew(newEntity: A_SERVER_TYPES__A_EntityListConstructor): void {\n this.aseid = new ASEID({\n concept: A_Context.root.name,\n scope: 'default',\n entity: 'a-list' + (newEntity.name ? `.${newEntity.name}` : ''),\n id: (new Date()).getTime().toString(),\n });\n\n this._entityConstructor = newEntity.constructor as new (...args: any[]) => EntityType;\n }\n\n\n\n /**\n * Allows to convert Repository Response data to EntityList instance\n * \n * [!] This method does not load the data from the repository, it only converts the data to the EntityList instance\n * \n * @param items \n * @param pagination \n */\n fromList(\n items: Array<EntityType> | Array<ReturnType<EntityType['toJSON']>>,\n pagination?: A_SERVER_TYPES__A_EntityListPagination\n ) {\n this._items = items.map(item => {\n if (item instanceof A_Entity) {\n return item as EntityType;\n } else {\n const entity = new this._entityConstructor(item);\n return entity;\n }\n });\n\n if (pagination) {\n this._pagination = {\n total: pagination.total,\n page: pagination.page,\n pageSize: pagination.pageSize\n }\n }\n }\n\n\n\n /**\n * Serializes the EntityList to a JSON object\n * \n * @returns \n */\n toJSON(): A_SERVER_TYPES__A_EntityListSerialized<EntityType> {\n return {\n ...super.toJSON(),\n items: this._items.map(i => i.toJSON()) as ReturnType<EntityType['toJSON']>[],\n pagination: this._pagination\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_TYPES__Entity_Constructor, A_Entity, A_TYPES__Entity_Serialized } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
type A_SERVER_TYPES__A_EntityListConstructor = {
|
|
4
|
+
name: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
constructor: A_TYPES__Entity_Constructor;
|
|
7
|
+
};
|
|
8
|
+
declare enum A_SERVER_TYPES__A_EntityListEvent {
|
|
9
|
+
Load = "load"
|
|
10
|
+
}
|
|
11
|
+
type A_SERVER_TYPES__A_EntityListSerialized<EntityTypes extends A_Entity = A_Entity> = {
|
|
12
|
+
items: Array<ReturnType<EntityTypes['toJSON']>>;
|
|
13
|
+
type: string;
|
|
14
|
+
pagination: A_SERVER_TYPES__A_EntityListPagination;
|
|
15
|
+
} & A_TYPES__Entity_Serialized;
|
|
16
|
+
type A_SERVER_TYPES__A_EntityListPagination = {
|
|
17
|
+
total: number;
|
|
18
|
+
page: number;
|
|
19
|
+
pageSize: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { type A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListEvent, type A_SERVER_TYPES__A_EntityListPagination, type A_SERVER_TYPES__A_EntityListSerialized };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_TYPES__Entity_Constructor, A_Entity, A_TYPES__Entity_Serialized } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
type A_SERVER_TYPES__A_EntityListConstructor = {
|
|
4
|
+
name: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
constructor: A_TYPES__Entity_Constructor;
|
|
7
|
+
};
|
|
8
|
+
declare enum A_SERVER_TYPES__A_EntityListEvent {
|
|
9
|
+
Load = "load"
|
|
10
|
+
}
|
|
11
|
+
type A_SERVER_TYPES__A_EntityListSerialized<EntityTypes extends A_Entity = A_Entity> = {
|
|
12
|
+
items: Array<ReturnType<EntityTypes['toJSON']>>;
|
|
13
|
+
type: string;
|
|
14
|
+
pagination: A_SERVER_TYPES__A_EntityListPagination;
|
|
15
|
+
} & A_TYPES__Entity_Serialized;
|
|
16
|
+
type A_SERVER_TYPES__A_EntityListPagination = {
|
|
17
|
+
total: number;
|
|
18
|
+
page: number;
|
|
19
|
+
pageSize: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { type A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListEvent, type A_SERVER_TYPES__A_EntityListPagination, type A_SERVER_TYPES__A_EntityListSerialized };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var A_SERVER_TYPES__A_EntityListEvent = /* @__PURE__ */ ((A_SERVER_TYPES__A_EntityListEvent2) => {
|
|
4
|
+
A_SERVER_TYPES__A_EntityListEvent2["Load"] = "load";
|
|
5
|
+
return A_SERVER_TYPES__A_EntityListEvent2;
|
|
6
|
+
})(A_SERVER_TYPES__A_EntityListEvent || {});
|
|
7
|
+
|
|
8
|
+
exports.A_SERVER_TYPES__A_EntityListEvent = A_SERVER_TYPES__A_EntityListEvent;
|
|
9
|
+
//# sourceMappingURL=A-EntityList.types.js.map
|
|
10
|
+
//# sourceMappingURL=A-EntityList.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerEntityList/A-EntityList.types.ts"],"names":["A_SERVER_TYPES__A_EntityListEvent"],"mappings":";;AASO,IAAK,iCAAA,qBAAAA,kCAAAA,KAAL;AACH,EAAAA,mCAAA,MAAA,CAAA,GAAO,MAAA;AADC,EAAA,OAAAA,kCAAAA;AAAA,CAAA,EAAA,iCAAA,IAAA,EAAA","file":"A-EntityList.types.js","sourcesContent":["import { A_Entity, A_TYPES__Entity_Constructor, A_TYPES__Entity_Serialized } from \"@adaas/a-concept\";\n\n\nexport type A_SERVER_TYPES__A_EntityListConstructor = {\n name: string,\n scope: string,\n constructor: A_TYPES__Entity_Constructor,\n}\n\nexport enum A_SERVER_TYPES__A_EntityListEvent {\n Load = 'load',\n}\n\nexport type A_SERVER_TYPES__A_EntityListSerialized<EntityTypes extends A_Entity = A_Entity> = {\n items: Array<ReturnType<EntityTypes['toJSON']>>,\n type: string,\n pagination: A_SERVER_TYPES__A_EntityListPagination\n} & A_TYPES__Entity_Serialized;\n\n\n\nexport type A_SERVER_TYPES__A_EntityListPagination = {\n total: number,\n page: number,\n pageSize: number,\n}\n\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
|
|
3
|
+
var A_SERVER_TYPES__A_EntityListEvent = /* @__PURE__ */ ((A_SERVER_TYPES__A_EntityListEvent2) => {
|
|
4
|
+
A_SERVER_TYPES__A_EntityListEvent2["Load"] = "load";
|
|
5
|
+
return A_SERVER_TYPES__A_EntityListEvent2;
|
|
6
|
+
})(A_SERVER_TYPES__A_EntityListEvent || {});
|
|
7
|
+
|
|
8
|
+
export { A_SERVER_TYPES__A_EntityListEvent };
|
|
9
|
+
//# sourceMappingURL=A-EntityList.types.mjs.map
|
|
10
|
+
//# sourceMappingURL=A-EntityList.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerEntityList/A-EntityList.types.ts"],"names":["A_SERVER_TYPES__A_EntityListEvent"],"mappings":";;AASO,IAAK,iCAAA,qBAAAA,kCAAAA,KAAL;AACH,EAAAA,mCAAA,MAAA,CAAA,GAAO,MAAA;AADC,EAAA,OAAAA,kCAAAA;AAAA,CAAA,EAAA,iCAAA,IAAA,EAAA","file":"A-EntityList.types.mjs","sourcesContent":["import { A_Entity, A_TYPES__Entity_Constructor, A_TYPES__Entity_Serialized } from \"@adaas/a-concept\";\n\n\nexport type A_SERVER_TYPES__A_EntityListConstructor = {\n name: string,\n scope: string,\n constructor: A_TYPES__Entity_Constructor,\n}\n\nexport enum A_SERVER_TYPES__A_EntityListEvent {\n Load = 'load',\n}\n\nexport type A_SERVER_TYPES__A_EntityListSerialized<EntityTypes extends A_Entity = A_Entity> = {\n items: Array<ReturnType<EntityTypes['toJSON']>>,\n type: string,\n pagination: A_SERVER_TYPES__A_EntityListPagination\n} & A_TYPES__Entity_Serialized;\n\n\n\nexport type A_SERVER_TYPES__A_EntityListPagination = {\n total: number,\n page: number,\n pageSize: number,\n}\n\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { A_Fragment } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_ServerListQueryFilter<FilterFields extends string[]> extends A_Fragment {
|
|
4
|
+
protected _query: string | Partial<Record<FilterFields[number], string>>;
|
|
5
|
+
protected defaults: Partial<Record<FilterFields[number], string>>;
|
|
6
|
+
protected parsedQuery: Record<FilterFields[number], string>;
|
|
7
|
+
constructor(_query?: string | Partial<Record<FilterFields[number], string>>, defaults?: Partial<Record<FilterFields[number], string>>);
|
|
8
|
+
get query(): string | Partial<Record<FilterFields[number], string>>;
|
|
9
|
+
get(property: FilterFields[number], defaultValue?: string): string;
|
|
10
|
+
protected parseQueryString(value?: string | Partial<Record<FilterFields[number], string>>): Record<FilterFields[number], string>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { A_ServerListQueryFilter };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { A_Fragment } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_ServerListQueryFilter<FilterFields extends string[]> extends A_Fragment {
|
|
4
|
+
protected _query: string | Partial<Record<FilterFields[number], string>>;
|
|
5
|
+
protected defaults: Partial<Record<FilterFields[number], string>>;
|
|
6
|
+
protected parsedQuery: Record<FilterFields[number], string>;
|
|
7
|
+
constructor(_query?: string | Partial<Record<FilterFields[number], string>>, defaults?: Partial<Record<FilterFields[number], string>>);
|
|
8
|
+
get query(): string | Partial<Record<FilterFields[number], string>>;
|
|
9
|
+
get(property: FilterFields[number], defaultValue?: string): string;
|
|
10
|
+
protected parseQueryString(value?: string | Partial<Record<FilterFields[number], string>>): Record<FilterFields[number], string>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { A_ServerListQueryFilter };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
|
|
5
|
+
class A_ServerListQueryFilter extends aConcept.A_Fragment {
|
|
6
|
+
constructor(_query = {}, defaults = {}) {
|
|
7
|
+
super();
|
|
8
|
+
this._query = _query;
|
|
9
|
+
this.defaults = defaults;
|
|
10
|
+
this.parsedQuery = this.parseQueryString(_query);
|
|
11
|
+
}
|
|
12
|
+
get query() {
|
|
13
|
+
return this._query;
|
|
14
|
+
}
|
|
15
|
+
get(property, defaultValue = "") {
|
|
16
|
+
return this.parsedQuery[property] || this.defaults[property] || defaultValue;
|
|
17
|
+
}
|
|
18
|
+
parseQueryString(value = {}) {
|
|
19
|
+
if (typeof value === "string") {
|
|
20
|
+
return value.split("&").reduce((acc, part) => {
|
|
21
|
+
const [key, val] = part.split("=");
|
|
22
|
+
acc[decodeURIComponent(key)] = decodeURIComponent(val || "");
|
|
23
|
+
return acc;
|
|
24
|
+
}, {});
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.A_ServerListQueryFilter = A_ServerListQueryFilter;
|
|
31
|
+
//# sourceMappingURL=A-ServerListQueryFilter.context.js.map
|
|
32
|
+
//# sourceMappingURL=A-ServerListQueryFilter.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerListQuery/A-ServerListQueryFilter.context.ts"],"names":["A_Fragment"],"mappings":";;;;AAIO,MAAM,gCAA+DA,mBAAA,CAAW;AAAA,EAInF,YACc,MAAA,GAAiE,EAAC,EAClE,QAAA,GAA0D,EAAC,EACvE;AACE,IAAA,KAAA,EAAM;AAHI,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AAGV,IAAA,IAAA,CAAK,WAAA,GAAc,IAAA,CAAK,gBAAA,CAAiB,MAAM,CAAA;AAAA,EACnD;AAAA,EAGA,IAAI,KAAA,GAAQ;AACR,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA,EAGA,GAAA,CAAI,QAAA,EAAgC,YAAA,GAAuB,EAAA,EAAI;AAC3D,IAAA,OAAO,KAAK,WAAA,CAAY,QAAQ,KAAK,IAAA,CAAK,QAAA,CAAS,QAAQ,CAAA,IAAK,YAAA;AAAA,EACpE;AAAA,EAEU,gBAAA,CAAiB,KAAA,GAAgE,EAAC,EAAyC;AACjI,IAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAC3B,MAAA,OAAO,MAAM,KAAA,CAAM,GAAG,EAAE,MAAA,CAAO,CAAC,KAAK,IAAA,KAAS;AAC1C,QAAA,MAAM,CAAC,GAAA,EAAK,GAAG,CAAA,GAAI,IAAA,CAAK,MAAM,GAAG,CAAA;AACjC,QAAA,GAAA,CAAI,mBAAmB,GAAG,CAAC,CAAA,GAAI,kBAAA,CAAmB,OAAO,EAAE,CAAA;AAC3D,QAAA,OAAO,GAAA;AAAA,MACX,CAAA,EAAG,EAAE,CAAA;AAAA,IACT;AACA,IAAA,OAAO,KAAA;AAAA,EACX;AACJ","file":"A-ServerListQueryFilter.context.js","sourcesContent":["import { A_Fragment } from \"@adaas/a-concept\";\n\n\n\nexport class A_ServerListQueryFilter<FilterFields extends string[]> extends A_Fragment {\n\n protected parsedQuery!: Record<FilterFields[number], string>;\n\n constructor(\n protected _query: string | Partial<Record<FilterFields[number], string>> = {},\n protected defaults: Partial<Record<FilterFields[number], string>> = {}\n ) {\n super();\n this.parsedQuery = this.parseQueryString(_query);\n }\n\n\n get query() {\n return this._query;\n }\n\n\n get(property: FilterFields[number], defaultValue: string = '') {\n return this.parsedQuery[property] || this.defaults[property] || defaultValue;\n }\n\n protected parseQueryString(value: string | Partial<Record<FilterFields[number], string>> = {}): Record<FilterFields[number], string> {\n if (typeof value === 'string') {\n return value.split('&').reduce((acc, part) => {\n const [key, val] = part.split('=');\n acc[decodeURIComponent(key)] = decodeURIComponent(val || '');\n return acc;\n }, {}) as Record<FilterFields[number], string>;\n }\n return value as Record<FilterFields[number], string>;\n }\n}"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Fragment } from '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
class A_ServerListQueryFilter extends A_Fragment {
|
|
5
|
+
constructor(_query = {}, defaults = {}) {
|
|
6
|
+
super();
|
|
7
|
+
this._query = _query;
|
|
8
|
+
this.defaults = defaults;
|
|
9
|
+
this.parsedQuery = this.parseQueryString(_query);
|
|
10
|
+
}
|
|
11
|
+
get query() {
|
|
12
|
+
return this._query;
|
|
13
|
+
}
|
|
14
|
+
get(property, defaultValue = "") {
|
|
15
|
+
return this.parsedQuery[property] || this.defaults[property] || defaultValue;
|
|
16
|
+
}
|
|
17
|
+
parseQueryString(value = {}) {
|
|
18
|
+
if (typeof value === "string") {
|
|
19
|
+
return value.split("&").reduce((acc, part) => {
|
|
20
|
+
const [key, val] = part.split("=");
|
|
21
|
+
acc[decodeURIComponent(key)] = decodeURIComponent(val || "");
|
|
22
|
+
return acc;
|
|
23
|
+
}, {});
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { A_ServerListQueryFilter };
|
|
30
|
+
//# sourceMappingURL=A-ServerListQueryFilter.context.mjs.map
|
|
31
|
+
//# sourceMappingURL=A-ServerListQueryFilter.context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerListQuery/A-ServerListQueryFilter.context.ts"],"names":[],"mappings":";;;AAIO,MAAM,gCAA+D,UAAA,CAAW;AAAA,EAInF,YACc,MAAA,GAAiE,EAAC,EAClE,QAAA,GAA0D,EAAC,EACvE;AACE,IAAA,KAAA,EAAM;AAHI,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AAGV,IAAA,IAAA,CAAK,WAAA,GAAc,IAAA,CAAK,gBAAA,CAAiB,MAAM,CAAA;AAAA,EACnD;AAAA,EAGA,IAAI,KAAA,GAAQ;AACR,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EAChB;AAAA,EAGA,GAAA,CAAI,QAAA,EAAgC,YAAA,GAAuB,EAAA,EAAI;AAC3D,IAAA,OAAO,KAAK,WAAA,CAAY,QAAQ,KAAK,IAAA,CAAK,QAAA,CAAS,QAAQ,CAAA,IAAK,YAAA;AAAA,EACpE;AAAA,EAEU,gBAAA,CAAiB,KAAA,GAAgE,EAAC,EAAyC;AACjI,IAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAC3B,MAAA,OAAO,MAAM,KAAA,CAAM,GAAG,EAAE,MAAA,CAAO,CAAC,KAAK,IAAA,KAAS;AAC1C,QAAA,MAAM,CAAC,GAAA,EAAK,GAAG,CAAA,GAAI,IAAA,CAAK,MAAM,GAAG,CAAA;AACjC,QAAA,GAAA,CAAI,mBAAmB,GAAG,CAAC,CAAA,GAAI,kBAAA,CAAmB,OAAO,EAAE,CAAA;AAC3D,QAAA,OAAO,GAAA;AAAA,MACX,CAAA,EAAG,EAAE,CAAA;AAAA,IACT;AACA,IAAA,OAAO,KAAA;AAAA,EACX;AACJ","file":"A-ServerListQueryFilter.context.mjs","sourcesContent":["import { A_Fragment } from \"@adaas/a-concept\";\n\n\n\nexport class A_ServerListQueryFilter<FilterFields extends string[]> extends A_Fragment {\n\n protected parsedQuery!: Record<FilterFields[number], string>;\n\n constructor(\n protected _query: string | Partial<Record<FilterFields[number], string>> = {},\n protected defaults: Partial<Record<FilterFields[number], string>> = {}\n ) {\n super();\n this.parsedQuery = this.parseQueryString(_query);\n }\n\n\n get query() {\n return this._query;\n }\n\n\n get(property: FilterFields[number], defaultValue: string = '') {\n return this.parsedQuery[property] || this.defaults[property] || defaultValue;\n }\n\n protected parseQueryString(value: string | Partial<Record<FilterFields[number], string>> = {}): Record<FilterFields[number], string> {\n if (typeof value === 'string') {\n return value.split('&').reduce((acc, part) => {\n const [key, val] = part.split('=');\n acc[decodeURIComponent(key)] = decodeURIComponent(val || '');\n return acc;\n }, {}) as Record<FilterFields[number], string>;\n }\n return value as Record<FilterFields[number], string>;\n }\n}"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
import { A_Server } from '../A-Server/A-Server.context.mjs';
|
|
3
|
+
import { A as A_Request } from '../../A-Request.entity-r905O60G.mjs';
|
|
4
|
+
import { A as A_Response } from '../../A-Response.entity-6qhiV7BE.mjs';
|
|
5
|
+
import { A_HttpServerRequestContext } from '../A-Request/A-HttpServerRequest.context.mjs';
|
|
6
|
+
import { A_Config } from '@adaas/a-utils/a-config';
|
|
7
|
+
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
8
|
+
import '../A-Server/A-Server.types.mjs';
|
|
9
|
+
import '../A-ServerRoute/A-ServerRoute.entity.mjs';
|
|
10
|
+
import '@adaas/a-utils/a-route';
|
|
11
|
+
import '../A-ServerRoute/A-ServerRoute.types.mjs';
|
|
12
|
+
import '../A-ServerRoute/A-ServerRoute.constants.mjs';
|
|
13
|
+
import 'http';
|
|
14
|
+
import '../A-Server/A-HttpServer.error.mjs';
|
|
15
|
+
import '../A-Server/A-HttpServer.types.mjs';
|
|
16
|
+
import '../A-Server/A-HttpServer.constants.mjs';
|
|
17
|
+
import '../A-Request/A-Request.constants.mjs';
|
|
18
|
+
import '../A-Request/A-Request.env.mjs';
|
|
19
|
+
import '../A-Request/A-HttpRequestData.context.mjs';
|
|
20
|
+
import '@adaas/a-utils/a-execution';
|
|
21
|
+
import 'stream';
|
|
22
|
+
import '../A-Response/A-Response.constants.mjs';
|
|
23
|
+
import '@adaas/a-utils/a-operation';
|
|
24
|
+
|
|
25
|
+
declare class A_ServerLogger extends A_Logger {
|
|
26
|
+
protected config: A_Config<any>;
|
|
27
|
+
logRequestFinish(request: A_Request, response: A_Response, context: A_HttpServerRequestContext): void;
|
|
28
|
+
logResponseError(request: A_Request, response: A_Response, context: A_HttpServerRequestContext, error: A_Error): void;
|
|
29
|
+
logStop(server: A_Server): void;
|
|
30
|
+
serverReady(params: {
|
|
31
|
+
port: number;
|
|
32
|
+
app: {
|
|
33
|
+
name: string;
|
|
34
|
+
version?: string;
|
|
35
|
+
};
|
|
36
|
+
}): void;
|
|
37
|
+
/**
|
|
38
|
+
* Displays a proxy routes
|
|
39
|
+
*
|
|
40
|
+
* @param params
|
|
41
|
+
*/
|
|
42
|
+
proxy(params: {
|
|
43
|
+
original: string;
|
|
44
|
+
destination: string;
|
|
45
|
+
}): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { A_ServerLogger };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
import { A_Server } from '../A-Server/A-Server.context.js';
|
|
3
|
+
import { A as A_Request } from '../../A-Request.entity-8_9MCXT2.js';
|
|
4
|
+
import { A as A_Response } from '../../A-Response.entity-bjh6bofZ.js';
|
|
5
|
+
import { A_HttpServerRequestContext } from '../A-Request/A-HttpServerRequest.context.js';
|
|
6
|
+
import { A_Config } from '@adaas/a-utils/a-config';
|
|
7
|
+
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
8
|
+
import '../A-Server/A-Server.types.js';
|
|
9
|
+
import '../A-ServerRoute/A-ServerRoute.entity.js';
|
|
10
|
+
import '@adaas/a-utils/a-route';
|
|
11
|
+
import '../A-ServerRoute/A-ServerRoute.types.js';
|
|
12
|
+
import '../A-ServerRoute/A-ServerRoute.constants.js';
|
|
13
|
+
import 'http';
|
|
14
|
+
import '../A-Server/A-HttpServer.error.js';
|
|
15
|
+
import '../A-Server/A-HttpServer.types.js';
|
|
16
|
+
import '../A-Server/A-HttpServer.constants.js';
|
|
17
|
+
import '../A-Request/A-Request.constants.js';
|
|
18
|
+
import '../A-Request/A-Request.env.js';
|
|
19
|
+
import '../A-Request/A-HttpRequestData.context.js';
|
|
20
|
+
import '@adaas/a-utils/a-execution';
|
|
21
|
+
import 'stream';
|
|
22
|
+
import '../A-Response/A-Response.constants.js';
|
|
23
|
+
import '@adaas/a-utils/a-operation';
|
|
24
|
+
|
|
25
|
+
declare class A_ServerLogger extends A_Logger {
|
|
26
|
+
protected config: A_Config<any>;
|
|
27
|
+
logRequestFinish(request: A_Request, response: A_Response, context: A_HttpServerRequestContext): void;
|
|
28
|
+
logResponseError(request: A_Request, response: A_Response, context: A_HttpServerRequestContext, error: A_Error): void;
|
|
29
|
+
logStop(server: A_Server): void;
|
|
30
|
+
serverReady(params: {
|
|
31
|
+
port: number;
|
|
32
|
+
app: {
|
|
33
|
+
name: string;
|
|
34
|
+
version?: string;
|
|
35
|
+
};
|
|
36
|
+
}): void;
|
|
37
|
+
/**
|
|
38
|
+
* Displays a proxy routes
|
|
39
|
+
*
|
|
40
|
+
* @param params
|
|
41
|
+
*/
|
|
42
|
+
proxy(params: {
|
|
43
|
+
original: string;
|
|
44
|
+
destination: string;
|
|
45
|
+
}): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { A_ServerLogger };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
var AServer_context = require('@adaas/a-server/server/A-Server.context');
|
|
5
|
+
var ARequest_entity = require('@adaas/a-server/request/A-Request.entity');
|
|
6
|
+
var AResponse_entity = require('@adaas/a-server/response/A-Response.entity');
|
|
7
|
+
var AResponse_constants = require('@adaas/a-server/response/A-Response.constants');
|
|
8
|
+
var AHttpServerRequest_context = require('@adaas/a-server/request/A-HttpServerRequest.context');
|
|
9
|
+
var aLogger = require('@adaas/a-utils/a-logger');
|
|
10
|
+
var aService = require('@adaas/a-utils/a-service');
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = __getOwnPropDesc(target, key) ;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (decorator(target, key, result) ) || result;
|
|
19
|
+
if (result) __defProp(target, key, result);
|
|
20
|
+
return result;
|
|
21
|
+
};
|
|
22
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
23
|
+
class A_ServerLogger extends aLogger.A_Logger {
|
|
24
|
+
logRequestFinish(request, response, context) {
|
|
25
|
+
this.info("green", `Request ${request.method} ${request.url} finished with status ${response.statusCode} in ${context.processingTime ?? "N/A"}ms`);
|
|
26
|
+
}
|
|
27
|
+
logResponseError(request, response, context, error) {
|
|
28
|
+
this.info("red", `Request ${request.method} ${request.url} errored with status ${response.statusCode} in ${context.processingTime ?? "N/A"}ms`);
|
|
29
|
+
this.error(error);
|
|
30
|
+
}
|
|
31
|
+
logStop(server) {
|
|
32
|
+
this.log("red", `Server ${server.name} stopped`);
|
|
33
|
+
}
|
|
34
|
+
serverReady(params) {
|
|
35
|
+
const processId = process.pid;
|
|
36
|
+
this.info(
|
|
37
|
+
"cyan",
|
|
38
|
+
` ${params.app.name} v${params.app.version || "0.0.1"} is running on port ${params.port}`,
|
|
39
|
+
` Process ID: ${processId}`,
|
|
40
|
+
` Open In Browser: http://localhost:${params.port}`,
|
|
41
|
+
``,
|
|
42
|
+
`-------------------------------`,
|
|
43
|
+
` ==============================`,
|
|
44
|
+
` LISTENING... `,
|
|
45
|
+
` ==============================`
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Displays a proxy routes
|
|
50
|
+
*
|
|
51
|
+
* @param params
|
|
52
|
+
*/
|
|
53
|
+
proxy(params) {
|
|
54
|
+
console.log(`\x1B[35m[${this.scope.name}] |${this.getTime()}| Proxy:
|
|
55
|
+
${" ".repeat(this.scopeLength + 3)}| ${params.original} -> ${params.destination}
|
|
56
|
+
${" ".repeat(this.scopeLength + 3)}|-------------------------------\x1B[0m`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
__decorateClass([
|
|
60
|
+
aConcept.A_Feature.Extend({
|
|
61
|
+
name: AResponse_constants.A_ResponseFeatures.onSend,
|
|
62
|
+
scope: [AResponse_entity.A_Response]
|
|
63
|
+
}),
|
|
64
|
+
__decorateParam(0, aConcept.A_Inject(ARequest_entity.A_Request)),
|
|
65
|
+
__decorateParam(1, aConcept.A_Inject(AResponse_entity.A_Response)),
|
|
66
|
+
__decorateParam(2, aConcept.A_Inject(AHttpServerRequest_context.A_HttpServerRequestContext))
|
|
67
|
+
], A_ServerLogger.prototype, "logRequestFinish");
|
|
68
|
+
__decorateClass([
|
|
69
|
+
aConcept.A_Feature.Extend({
|
|
70
|
+
name: AResponse_constants.A_ResponseFeatures.onError,
|
|
71
|
+
scope: [AResponse_entity.A_Response]
|
|
72
|
+
}),
|
|
73
|
+
__decorateParam(0, aConcept.A_Inject(ARequest_entity.A_Request)),
|
|
74
|
+
__decorateParam(1, aConcept.A_Inject(AResponse_entity.A_Response)),
|
|
75
|
+
__decorateParam(2, aConcept.A_Inject(AHttpServerRequest_context.A_HttpServerRequestContext)),
|
|
76
|
+
__decorateParam(3, aConcept.A_Inject(aConcept.A_Error))
|
|
77
|
+
], A_ServerLogger.prototype, "logResponseError");
|
|
78
|
+
__decorateClass([
|
|
79
|
+
aConcept.A_Feature.Extend({
|
|
80
|
+
name: aService.A_ServiceFeatures.onAfterStop,
|
|
81
|
+
scope: [aService.A_Service]
|
|
82
|
+
}),
|
|
83
|
+
__decorateParam(0, aConcept.A_Inject(AServer_context.A_Server))
|
|
84
|
+
], A_ServerLogger.prototype, "logStop");
|
|
85
|
+
|
|
86
|
+
exports.A_ServerLogger = A_ServerLogger;
|
|
87
|
+
//# sourceMappingURL=A-ServerLogger.component.js.map
|
|
88
|
+
//# sourceMappingURL=A-ServerLogger.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-ServerLogger/A-ServerLogger.component.ts"],"names":["A_Logger","A_Feature","A_ResponseFeatures","A_Response","A_Request","A_HttpServerRequestContext","A_Error","A_ServiceFeatures","A_Service","A_Server"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,uBAAuBA,gBAAA,CAAS;AAAA,EAUzC,gBAAA,CACyB,OAAA,EACC,QAAA,EACgB,OAAA,EACxC;AAEE,IAAA,IAAA,CAAK,IAAA,CAAK,OAAA,EAAS,CAAA,QAAA,EAAW,OAAA,CAAQ,MAAM,CAAA,CAAA,EAAI,OAAA,CAAQ,GAAG,CAAA,sBAAA,EAAyB,SAAS,UAAU,CAAA,IAAA,EAAO,OAAA,CAAQ,cAAA,IAAkB,KAAK,CAAA,EAAA,CAAI,CAAA;AAAA,EACrJ;AAAA,EAOA,gBAAA,CACyB,OAAA,EACC,QAAA,EACgB,OAAA,EACnB,KAAA,EACrB;AACE,IAAA,IAAA,CAAK,IAAA,CAAK,KAAA,EAAO,CAAA,QAAA,EAAW,OAAA,CAAQ,MAAM,CAAA,CAAA,EAAI,OAAA,CAAQ,GAAG,CAAA,qBAAA,EAAwB,SAAS,UAAU,CAAA,IAAA,EAAO,OAAA,CAAQ,cAAA,IAAkB,KAAK,CAAA,EAAA,CAAI,CAAA;AAC9I,IAAA,IAAA,CAAK,MAAM,KAAK,CAAA;AAAA,EACpB;AAAA,EA2BA,QACwB,MAAA,EACtB;AACE,IAAA,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,CAAA,OAAA,EAAU,MAAA,CAAO,IAAI,CAAA,QAAA,CAAU,CAAA;AAAA,EACnD;AAAA,EAKA,YACI,MAAA,EAQF;AACE,IAAA,MAAM,YAAY,OAAA,CAAQ,GAAA;AAE1B,IAAA,IAAA,CAAK,IAAA;AAAA,MAAK,MAAA;AAAA,MACN,CAAA,CAAA,EAAI,MAAA,CAAO,GAAA,CAAI,IAAI,CAAA,EAAA,EAAK,MAAA,CAAO,GAAA,CAAI,OAAA,IAAW,OAAO,CAAA,oBAAA,EAAuB,MAAA,CAAO,IAAI,CAAA,CAAA;AAAA,MACvF,gBAAgB,SAAS,CAAA,CAAA;AAAA,MACzB,CAAA,mCAAA,EAAsC,OAAO,IAAI,CAAA,CAAA;AAAA,MACjD,CAAA,CAAA;AAAA,MACA,CAAA,+BAAA,CAAA;AAAA,MACA,CAAA,+BAAA,CAAA;AAAA,MACA,CAAA,4BAAA,CAAA;AAAA,MACA,CAAA,+BAAA;AAAA,KACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MACI,MAAA,EAIF;AACE,IAAA,OAAA,CAAQ,GAAA,CAAI,YAAY,IAAA,CAAK,KAAA,CAAM,IAAI,CAAA,GAAA,EAAM,IAAA,CAAK,SAAS,CAAA;AAAA,EACjE,GAAA,CAAI,MAAA,CAAO,IAAA,CAAK,WAAA,GAAc,CAAC,CAAC,CAAA,EAAA,EAAK,MAAA,CAAO,QAAQ,CAAA,IAAA,EAAO,MAAA,CAAO,WAAW;AAAA,EAC7E,IAAI,MAAA,CAAO,IAAA,CAAK,WAAA,GAAc,CAAC,CAAC,CAAA,uCAAA,CAAyC,CAAA;AAAA,EACvE;AAEJ;AAnGI,eAAA,CAAA;AAAA,EAJCC,mBAAU,MAAA,CAAO;AAAA,IACd,MAAMC,sCAAA,CAAmB,MAAA;AAAA,IACzB,KAAA,EAAO,CAACC,2BAAU;AAAA,GACrB,CAAA;AAAA,EAEI,qCAASC,yBAAS,CAAA,CAAA;AAAA,EAClB,qCAASD,2BAAU,CAAA,CAAA;AAAA,EACnB,qCAASE,qDAA0B,CAAA;AAAA,CAAA,EAb/B,cAAA,CAUT,SAAA,EAAA,kBAAA,CAAA;AAcA,eAAA,CAAA;AAAA,EAJCJ,mBAAU,MAAA,CAAO;AAAA,IACd,MAAMC,sCAAA,CAAmB,OAAA;AAAA,IACzB,KAAA,EAAO,CAACC,2BAAU;AAAA,GACrB,CAAA;AAAA,EAEI,qCAASC,yBAAS,CAAA,CAAA;AAAA,EAClB,qCAASD,2BAAU,CAAA,CAAA;AAAA,EACnB,qCAASE,qDAA0B,CAAA,CAAA;AAAA,EACnC,qCAASC,gBAAO,CAAA;AAAA,CAAA,EA5BZ,cAAA,CAwBT,SAAA,EAAA,kBAAA,CAAA;AAmCA,eAAA,CAAA;AAAA,EAJCL,mBAAU,MAAA,CAAO;AAAA,IACd,MAAMM,0BAAA,CAAkB,WAAA;AAAA,IACxB,KAAA,EAAO,CAACC,kBAAS;AAAA,GACpB,CAAA;AAAA,EAEI,qCAASC,wBAAQ,CAAA;AAAA,CAAA,EA5Db,cAAA,CA2DT,SAAA,EAAA,SAAA,CAAA","file":"A-ServerLogger.component.js","sourcesContent":["import { A_Error, A_Feature, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Server } from \"@adaas/a-server/server/A-Server.context\";\nimport { A_Request } from \"@adaas/a-server/request/A-Request.entity\";\nimport { A_Response } from \"@adaas/a-server/response/A-Response.entity\";\nimport { A_ResponseFeatures } from \"@adaas/a-server/response/A-Response.constants\";\nimport { A_HttpServerRequestContext } from \"@adaas/a-server/request/A-HttpServerRequest.context\";\nimport { A_Config } from \"@adaas/a-utils/a-config\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_Service, A_ServiceFeatures } from \"@adaas/a-utils/a-service\";\n\n\nexport class A_ServerLogger extends A_Logger {\n\n protected declare config: A_Config<any>\n\n\n\n @A_Feature.Extend({\n name: A_ResponseFeatures.onSend,\n scope: [A_Response]\n })\n logRequestFinish(\n @A_Inject(A_Request) request: A_Request,\n @A_Inject(A_Response) response: A_Response,\n @A_Inject(A_HttpServerRequestContext) context: A_HttpServerRequestContext,\n ) {\n\n this.info('green', `Request ${request.method} ${request.url} finished with status ${response.statusCode} in ${context.processingTime ?? 'N/A'}ms`);\n }\n\n\n @A_Feature.Extend({\n name: A_ResponseFeatures.onError,\n scope: [A_Response]\n })\n logResponseError(\n @A_Inject(A_Request) request: A_Request,\n @A_Inject(A_Response) response: A_Response,\n @A_Inject(A_HttpServerRequestContext) context: A_HttpServerRequestContext,\n @A_Inject(A_Error) error: A_Error,\n ) {\n this.info('red', `Request ${request.method} ${request.url} errored with status ${response.statusCode} in ${context.processingTime ?? 'N/A'}ms`);\n this.error(error);\n }\n\n\n\n\n // @A_Feature.Extend({\n // name: A_ServiceFeatures.onAfterStart,\n // scope: [A_Service]\n // })\n // logStart(\n // @A_Inject(A_Service) container: A_Service,\n // ): void {\n // // this.serverReady({\n // // port: container.port,\n // // app: {\n // // name: container.name,\n // // }\n // // })\n // }\n\n\n\n\n @A_Feature.Extend({\n name: A_ServiceFeatures.onAfterStop,\n scope: [A_Service]\n })\n logStop(\n @A_Inject(A_Server) server: A_Server,\n ) {\n this.log('red', `Server ${server.name} stopped`);\n }\n\n\n\n\n serverReady(\n params: {\n port: number,\n\n app: {\n name: string,\n version?: string\n }\n }\n ) {\n const processId = process.pid;\n\n this.info('cyan',\n ` ${params.app.name} v${params.app.version || '0.0.1'} is running on port ${params.port}`,\n ` Process ID: ${processId}`,\n ` Open In Browser: http://localhost:${params.port}`,\n ``,\n `-------------------------------`,\n ` ==============================`,\n ` LISTENING... `,\n ` ==============================`\n );\n }\n\n\n /**\n * Displays a proxy routes \n * \n * @param params \n */\n proxy(\n params: {\n original: string,\n destination: string,\n }\n ) {\n console.log(`\\x1b[35m[${this.scope.name}] |${this.getTime()}| Proxy:\n${' '.repeat(this.scopeLength + 3)}| ${params.original} -> ${params.destination}\n${' '.repeat(this.scopeLength + 3)}|-------------------------------\\x1b[0m`);\n }\n\n}"]}
|