jimpex 7.0.2 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/LICENSE +1 -1
- package/README.md +447 -435
- package/dist/app/index.d.mts +14 -0
- package/dist/app/index.d.ts +14 -0
- package/dist/app/index.js +23 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/jimpex.d.mts +14 -0
- package/dist/app/jimpex.d.ts +14 -0
- package/dist/app/jimpex.js +665 -0
- package/dist/app/jimpex.js.map +1 -0
- package/dist/controllers/common/config.d.mts +79 -0
- package/dist/controllers/common/config.d.ts +79 -0
- package/dist/controllers/common/config.js +107 -0
- package/dist/controllers/common/config.js.map +1 -0
- package/dist/controllers/common/health.d.mts +83 -0
- package/dist/controllers/common/health.d.ts +83 -0
- package/dist/controllers/common/health.js +115 -0
- package/dist/controllers/common/health.js.map +1 -0
- package/dist/controllers/common/index.d.mts +21 -0
- package/dist/controllers/common/index.d.ts +21 -0
- package/dist/controllers/common/index.js +27 -0
- package/dist/controllers/common/index.js.map +1 -0
- package/dist/controllers/common/statics.d.mts +215 -0
- package/dist/controllers/common/statics.d.ts +215 -0
- package/dist/controllers/common/statics.js +253 -0
- package/dist/controllers/common/statics.js.map +1 -0
- package/dist/controllers/index.d.mts +24 -0
- package/dist/controllers/index.d.ts +24 -0
- package/dist/controllers/index.js +25 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/utils/gateway.d.mts +725 -0
- package/dist/controllers/utils/gateway.d.ts +725 -0
- package/dist/controllers/utils/gateway.js +577 -0
- package/dist/controllers/utils/gateway.js.map +1 -0
- package/dist/controllers/utils/index.d.mts +17 -0
- package/dist/controllers/utils/index.d.ts +17 -0
- package/dist/controllers/utils/index.js +23 -0
- package/dist/controllers/utils/index.js.map +1 -0
- package/dist/esm/app/index.js +2 -0
- package/dist/esm/app/index.js.map +1 -0
- package/dist/esm/app/jimpex.js +636 -0
- package/dist/esm/app/jimpex.js.map +1 -0
- package/dist/esm/chunk-2B2CG5KL.js +11 -0
- package/dist/esm/chunk-2B2CG5KL.js.map +1 -0
- package/dist/esm/controllers/common/config.js +80 -0
- package/dist/esm/controllers/common/config.js.map +1 -0
- package/dist/esm/controllers/common/health.js +88 -0
- package/dist/esm/controllers/common/health.js.map +1 -0
- package/dist/esm/controllers/common/index.js +4 -0
- package/dist/esm/controllers/common/index.js.map +1 -0
- package/dist/esm/controllers/common/statics.js +220 -0
- package/dist/esm/controllers/common/statics.js.map +1 -0
- package/dist/esm/controllers/index.js +3 -0
- package/dist/esm/controllers/index.js.map +1 -0
- package/dist/esm/controllers/utils/gateway.js +556 -0
- package/dist/esm/controllers/utils/gateway.js.map +1 -0
- package/dist/esm/controllers/utils/index.js +2 -0
- package/dist/esm/controllers/utils/index.js.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/middlewares/common/errorHandler.js +116 -0
- package/dist/esm/middlewares/common/errorHandler.js.map +1 -0
- package/dist/esm/middlewares/common/forceHTTPS.js +53 -0
- package/dist/esm/middlewares/common/forceHTTPS.js.map +1 -0
- package/dist/esm/middlewares/common/hsts.js +74 -0
- package/dist/esm/middlewares/common/hsts.js.map +1 -0
- package/dist/esm/middlewares/common/index.js +4 -0
- package/dist/esm/middlewares/common/index.js.map +1 -0
- package/dist/esm/middlewares/html/fastHTML.js +158 -0
- package/dist/esm/middlewares/html/fastHTML.js.map +1 -0
- package/dist/esm/middlewares/html/index.js +3 -0
- package/dist/esm/middlewares/html/index.js.map +1 -0
- package/dist/esm/middlewares/html/showHTML.js +100 -0
- package/dist/esm/middlewares/html/showHTML.js.map +1 -0
- package/dist/esm/middlewares/index.js +4 -0
- package/dist/esm/middlewares/index.js.map +1 -0
- package/dist/esm/middlewares/utils/index.js +2 -0
- package/dist/esm/middlewares/utils/index.js.map +1 -0
- package/dist/esm/middlewares/utils/versionValidator.js +135 -0
- package/dist/esm/middlewares/utils/versionValidator.js.map +1 -0
- package/dist/esm/services/common/appError.js +98 -0
- package/dist/esm/services/common/appError.js.map +1 -0
- package/dist/esm/services/common/httpError.js +28 -0
- package/dist/esm/services/common/httpError.js.map +1 -0
- package/dist/esm/services/common/index.js +17 -0
- package/dist/esm/services/common/index.js.map +1 -0
- package/dist/esm/services/common/sendFile.js +27 -0
- package/dist/esm/services/common/sendFile.js.map +1 -0
- package/dist/esm/services/frontend/frontendFs.js +66 -0
- package/dist/esm/services/frontend/frontendFs.js.map +1 -0
- package/dist/esm/services/frontend/index.js +11 -0
- package/dist/esm/services/frontend/index.js.map +1 -0
- package/dist/esm/services/html/htmlGenerator.js +194 -0
- package/dist/esm/services/html/htmlGenerator.js.map +1 -0
- package/dist/esm/services/html/index.js +11 -0
- package/dist/esm/services/html/index.js.map +1 -0
- package/dist/esm/services/http/apiClient.js +97 -0
- package/dist/esm/services/http/apiClient.js.map +1 -0
- package/dist/esm/services/http/http.js +174 -0
- package/dist/esm/services/http/http.js.map +1 -0
- package/dist/esm/services/http/index.js +17 -0
- package/dist/esm/services/http/index.js.map +1 -0
- package/dist/esm/services/http/responsesBuilder.js +152 -0
- package/dist/esm/services/http/responsesBuilder.js.map +1 -0
- package/dist/esm/services/index.js +6 -0
- package/dist/esm/services/index.js.map +1 -0
- package/dist/esm/services/utils/ensureBearerToken.js +94 -0
- package/dist/esm/services/utils/ensureBearerToken.js.map +1 -0
- package/dist/esm/services/utils/index.js +11 -0
- package/dist/esm/services/utils/index.js.map +1 -0
- package/dist/esm/types/events.js +1 -0
- package/dist/esm/types/events.js.map +1 -0
- package/dist/esm/types/express.js +1 -0
- package/dist/esm/types/express.js.map +1 -0
- package/dist/esm/types/http.js +1 -0
- package/dist/esm/types/http.js.map +1 -0
- package/dist/esm/types/index.js +7 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/options.js +1 -0
- package/dist/esm/types/options.js.map +1 -0
- package/dist/esm/types/utils.js +1 -0
- package/dist/esm/types/utils.js.map +1 -0
- package/dist/esm/types/wootils.js +1 -0
- package/dist/esm/types/wootils.js.map +1 -0
- package/dist/esm/utils/fns/index.js +5 -0
- package/dist/esm/utils/fns/index.js.map +1 -0
- package/dist/esm/utils/fns/others.js +6 -0
- package/dist/esm/utils/fns/others.js.map +1 -0
- package/dist/esm/utils/fns/routes.js +25 -0
- package/dist/esm/utils/fns/routes.js.map +1 -0
- package/dist/esm/utils/fns/statuses.js +6 -0
- package/dist/esm/utils/fns/statuses.js.map +1 -0
- package/dist/esm/utils/fns/text.js +6 -0
- package/dist/esm/utils/fns/text.js.map +1 -0
- package/dist/esm/utils/index.js +3 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/wrappers.js +41 -0
- package/dist/esm/utils/wrappers.js.map +1 -0
- package/dist/index-b2a04c78.d.ts +1282 -0
- package/dist/index-efeb437e.d.ts +1282 -0
- package/dist/index.d.mts +46 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/common/errorHandler.d.mts +132 -0
- package/dist/middlewares/common/errorHandler.d.ts +132 -0
- package/dist/middlewares/common/errorHandler.js +143 -0
- package/dist/middlewares/common/errorHandler.js.map +1 -0
- package/dist/middlewares/common/forceHTTPS.d.mts +69 -0
- package/dist/middlewares/common/forceHTTPS.d.ts +69 -0
- package/dist/middlewares/common/forceHTTPS.js +80 -0
- package/dist/middlewares/common/forceHTTPS.js.map +1 -0
- package/dist/middlewares/common/hsts.d.mts +110 -0
- package/dist/middlewares/common/hsts.d.ts +110 -0
- package/dist/middlewares/common/hsts.js +101 -0
- package/dist/middlewares/common/hsts.js.map +1 -0
- package/dist/middlewares/common/index.d.mts +22 -0
- package/dist/middlewares/common/index.d.ts +22 -0
- package/dist/middlewares/common/index.js +27 -0
- package/dist/middlewares/common/index.js.map +1 -0
- package/dist/middlewares/html/fastHTML.d.mts +180 -0
- package/dist/middlewares/html/fastHTML.d.ts +180 -0
- package/dist/middlewares/html/fastHTML.js +185 -0
- package/dist/middlewares/html/fastHTML.js.map +1 -0
- package/dist/middlewares/html/index.d.mts +21 -0
- package/dist/middlewares/html/index.d.ts +21 -0
- package/dist/middlewares/html/index.js +25 -0
- package/dist/middlewares/html/index.js.map +1 -0
- package/dist/middlewares/html/showHTML.d.mts +127 -0
- package/dist/middlewares/html/showHTML.d.ts +127 -0
- package/dist/middlewares/html/showHTML.js +127 -0
- package/dist/middlewares/html/showHTML.js.map +1 -0
- package/dist/middlewares/index.d.mts +30 -0
- package/dist/middlewares/index.d.ts +30 -0
- package/dist/middlewares/index.js +27 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/utils/index.d.mts +20 -0
- package/dist/middlewares/utils/index.d.ts +20 -0
- package/dist/middlewares/utils/index.js +23 -0
- package/dist/middlewares/utils/index.js.map +1 -0
- package/dist/middlewares/utils/versionValidator.d.mts +215 -0
- package/dist/middlewares/utils/versionValidator.d.ts +215 -0
- package/dist/middlewares/utils/versionValidator.js +162 -0
- package/dist/middlewares/utils/versionValidator.js.map +1 -0
- package/dist/services/common/appError.d.mts +139 -0
- package/dist/services/common/appError.d.ts +139 -0
- package/dist/services/common/appError.js +126 -0
- package/dist/services/common/appError.js.map +1 -0
- package/dist/services/common/httpError.d.mts +80 -0
- package/dist/services/common/httpError.d.ts +80 -0
- package/dist/services/common/httpError.js +53 -0
- package/dist/services/common/httpError.js.map +1 -0
- package/dist/services/common/index.d.mts +47 -0
- package/dist/services/common/index.d.ts +47 -0
- package/dist/services/common/index.js +44 -0
- package/dist/services/common/index.js.map +1 -0
- package/dist/services/common/sendFile.d.mts +102 -0
- package/dist/services/common/sendFile.d.ts +102 -0
- package/dist/services/common/sendFile.js +51 -0
- package/dist/services/common/sendFile.js.map +1 -0
- package/dist/services/frontend/frontendFs.d.mts +96 -0
- package/dist/services/frontend/frontendFs.d.ts +96 -0
- package/dist/services/frontend/frontendFs.js +103 -0
- package/dist/services/frontend/frontendFs.js.map +1 -0
- package/dist/services/frontend/index.d.mts +40 -0
- package/dist/services/frontend/index.d.ts +40 -0
- package/dist/services/frontend/index.js +36 -0
- package/dist/services/frontend/index.js.map +1 -0
- package/dist/services/html/htmlGenerator.d.mts +237 -0
- package/dist/services/html/htmlGenerator.d.ts +237 -0
- package/dist/services/html/htmlGenerator.js +221 -0
- package/dist/services/html/htmlGenerator.js.map +1 -0
- package/dist/services/html/index.d.mts +43 -0
- package/dist/services/html/index.d.ts +43 -0
- package/dist/services/html/index.js +36 -0
- package/dist/services/html/index.js.map +1 -0
- package/dist/services/http/apiClient.d.mts +170 -0
- package/dist/services/http/apiClient.d.ts +170 -0
- package/dist/services/http/apiClient.js +122 -0
- package/dist/services/http/apiClient.js.map +1 -0
- package/dist/services/http/http.d.mts +176 -0
- package/dist/services/http/http.d.ts +176 -0
- package/dist/services/http/http.js +211 -0
- package/dist/services/http/http.js.map +1 -0
- package/dist/services/http/index.d.mts +51 -0
- package/dist/services/http/index.d.ts +51 -0
- package/dist/services/http/index.js +44 -0
- package/dist/services/http/index.js.map +1 -0
- package/dist/services/http/responsesBuilder.d.mts +179 -0
- package/dist/services/http/responsesBuilder.d.ts +179 -0
- package/dist/services/http/responsesBuilder.js +179 -0
- package/dist/services/http/responsesBuilder.js.map +1 -0
- package/dist/services/index.d.mts +33 -0
- package/dist/services/index.d.ts +33 -0
- package/dist/services/index.js +31 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/utils/ensureBearerToken.d.mts +158 -0
- package/dist/services/utils/ensureBearerToken.d.ts +158 -0
- package/dist/services/utils/ensureBearerToken.js +121 -0
- package/dist/services/utils/ensureBearerToken.js.map +1 -0
- package/dist/services/utils/index.d.mts +44 -0
- package/dist/services/utils/index.d.ts +44 -0
- package/dist/services/utils/index.js +36 -0
- package/dist/services/utils/index.js.map +1 -0
- package/dist/types/events.d.mts +14 -0
- package/dist/types/events.d.ts +14 -0
- package/dist/types/events.js +17 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/express.d.mts +10 -0
- package/dist/types/express.d.ts +10 -0
- package/dist/types/express.js +17 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/http.d.mts +79 -0
- package/dist/types/http.d.ts +79 -0
- package/dist/types/http.js +17 -0
- package/dist/types/http.js.map +1 -0
- package/dist/types/index.d.mts +14 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.js +33 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/options.d.mts +14 -0
- package/dist/types/options.d.ts +14 -0
- package/dist/types/options.js +17 -0
- package/dist/types/options.js.map +1 -0
- package/dist/types/utils.d.mts +48 -0
- package/dist/types/utils.d.ts +48 -0
- package/dist/types/utils.js +17 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/wootils.d.mts +4 -0
- package/dist/types/wootils.d.ts +4 -0
- package/dist/types/wootils.js +17 -0
- package/dist/types/wootils.js.map +1 -0
- package/dist/utils/fns/index.d.mts +5 -0
- package/dist/utils/fns/index.d.ts +5 -0
- package/dist/utils/fns/index.js +29 -0
- package/dist/utils/fns/index.js.map +1 -0
- package/dist/utils/fns/others.d.mts +17 -0
- package/dist/utils/fns/others.d.ts +17 -0
- package/dist/utils/fns/others.js +29 -0
- package/dist/utils/fns/others.js.map +1 -0
- package/dist/utils/fns/routes.d.mts +39 -0
- package/dist/utils/fns/routes.d.ts +39 -0
- package/dist/utils/fns/routes.js +51 -0
- package/dist/utils/fns/routes.js.map +1 -0
- package/dist/utils/fns/statuses.d.mts +45 -0
- package/dist/utils/fns/statuses.d.ts +45 -0
- package/dist/utils/fns/statuses.js +39 -0
- package/dist/utils/fns/statuses.js.map +1 -0
- package/dist/utils/fns/text.d.mts +9 -0
- package/dist/utils/fns/text.d.ts +9 -0
- package/dist/utils/fns/text.js +29 -0
- package/dist/utils/fns/text.js.map +1 -0
- package/dist/utils/index.d.mts +19 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.js +25 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/wrappers.d.mts +14 -0
- package/dist/utils/wrappers.d.ts +14 -0
- package/dist/utils/wrappers.js +68 -0
- package/dist/utils/wrappers.js.map +1 -0
- package/examples/basic/404.html +12 -0
- package/examples/basic/README.md +30 -0
- package/examples/basic/app.ts +18 -0
- package/examples/basic/controller.ts +45 -0
- package/examples/basic/index.ts +19 -0
- package/examples/basic/middleware.ts +13 -0
- package/examples/basic/service.ts +11 -0
- package/package.json +60 -39
- package/src/app/index.ts +1 -0
- package/src/app/jimpex.ts +743 -0
- package/src/controllers/common/config.ts +115 -0
- package/src/controllers/common/health.ts +128 -0
- package/src/controllers/common/index.ts +3 -0
- package/src/controllers/common/statics.ts +380 -0
- package/src/controllers/index.ts +2 -0
- package/src/controllers/utils/gateway.ts +1186 -0
- package/src/controllers/utils/index.ts +1 -0
- package/src/index.ts +6 -0
- package/src/middlewares/common/errorHandler.ts +203 -0
- package/src/middlewares/common/forceHTTPS.ts +83 -0
- package/src/middlewares/common/hsts.ts +135 -0
- package/src/middlewares/common/index.ts +3 -0
- package/src/middlewares/html/fastHTML.ts +255 -0
- package/src/middlewares/html/index.ts +2 -0
- package/src/middlewares/html/showHTML.ts +165 -0
- package/src/middlewares/index.ts +3 -0
- package/src/middlewares/utils/index.ts +1 -0
- package/src/middlewares/utils/versionValidator.ts +289 -0
- package/src/services/common/appError.ts +158 -0
- package/src/services/common/httpError.ts +74 -0
- package/src/services/common/index.ts +29 -0
- package/src/services/common/sendFile.ts +106 -0
- package/src/services/frontend/frontendFs.ts +101 -0
- package/src/services/frontend/index.ts +21 -0
- package/src/services/html/htmlGenerator.ts +356 -0
- package/src/services/html/index.ts +21 -0
- package/src/services/http/apiClient.ts +221 -0
- package/src/services/http/http.ts +286 -0
- package/src/services/http/index.ts +29 -0
- package/src/services/http/responsesBuilder.ts +265 -0
- package/src/services/index.ts +5 -0
- package/src/services/utils/ensureBearerToken.ts +202 -0
- package/src/services/utils/index.ts +21 -0
- package/src/types/events.ts +303 -0
- package/src/types/express.ts +21 -0
- package/src/types/http.ts +77 -0
- package/src/types/index.ts +6 -0
- package/src/types/options.ts +248 -0
- package/src/types/utils.ts +52 -0
- package/src/types/wootils.ts +4 -0
- package/src/utils/fns/index.ts +4 -0
- package/src/utils/fns/others.ts +15 -0
- package/src/utils/fns/routes.ts +64 -0
- package/src/utils/fns/statuses.ts +44 -0
- package/src/utils/fns/text.ts +8 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/wrappers.ts +537 -0
- package/tsconfig.json +5 -8
- package/tsup.config.ts +10 -0
- package/src/app/index.js +0 -692
- package/src/constants/eventNames.js +0 -48
- package/src/constants/index.js +0 -7
- package/src/controllers/common/configuration.js +0 -116
- package/src/controllers/common/health.js +0 -79
- package/src/controllers/common/index.js +0 -7
- package/src/controllers/common/statics.js +0 -336
- package/src/controllers/index.js +0 -9
- package/src/controllers/utils/gateway.js +0 -1039
- package/src/controllers/utils/index.js +0 -3
- package/src/index.js +0 -30
- package/src/middlewares/common/errorHandler.js +0 -185
- package/src/middlewares/common/forceHTTPS.js +0 -80
- package/src/middlewares/common/hsts.js +0 -122
- package/src/middlewares/common/index.js +0 -7
- package/src/middlewares/html/fastHTML.js +0 -298
- package/src/middlewares/html/index.js +0 -5
- package/src/middlewares/html/showHTML.js +0 -167
- package/src/middlewares/index.js +0 -11
- package/src/middlewares/utils/index.js +0 -3
- package/src/middlewares/utils/versionValidator.js +0 -261
- package/src/services/common/appError.js +0 -136
- package/src/services/common/httpError.js +0 -60
- package/src/services/common/index.js +0 -25
- package/src/services/common/sendFile.js +0 -68
- package/src/services/frontend/frontendFs.js +0 -85
- package/src/services/frontend/index.js +0 -17
- package/src/services/html/htmlGenerator.js +0 -391
- package/src/services/html/index.js +0 -17
- package/src/services/http/apiClient.js +0 -148
- package/src/services/http/http.js +0 -256
- package/src/services/http/index.js +0 -25
- package/src/services/http/responsesBuilder.js +0 -193
- package/src/services/index.js +0 -15
- package/src/services/utils/ensureBearerToken.js +0 -147
- package/src/services/utils/index.js +0 -19
- package/src/types.js +0 -377
- package/src/utils/functions.js +0 -78
- package/src/utils/wrappers.js +0 -131
- package/types/app/index.d.ts +0 -417
- package/types/constants/eventNames.d.ts +0 -93
- package/types/constants/index.d.ts +0 -2
- package/types/controllers/common/configuration.d.ts +0 -71
- package/types/controllers/common/health.d.ts +0 -55
- package/types/controllers/common/index.d.ts +0 -4
- package/types/controllers/common/statics.d.ts +0 -271
- package/types/controllers/index.d.ts +0 -3
- package/types/controllers/utils/gateway.d.ts +0 -947
- package/types/controllers/utils/index.d.ts +0 -2
- package/types/index.d.ts +0 -15
- package/types/middlewares/common/errorHandler.d.ts +0 -143
- package/types/middlewares/common/forceHTTPS.d.ts +0 -64
- package/types/middlewares/common/hsts.d.ts +0 -111
- package/types/middlewares/common/index.d.ts +0 -4
- package/types/middlewares/html/fastHTML.d.ts +0 -238
- package/types/middlewares/html/index.d.ts +0 -3
- package/types/middlewares/html/showHTML.d.ts +0 -128
- package/types/middlewares/index.d.ts +0 -4
- package/types/middlewares/utils/index.d.ts +0 -2
- package/types/middlewares/utils/versionValidator.d.ts +0 -247
- package/types/services/common/appError.d.ts +0 -89
- package/types/services/common/httpError.d.ts +0 -37
- package/types/services/common/index.d.ts +0 -18
- package/types/services/common/sendFile.d.ts +0 -56
- package/types/services/frontend/frontendFs.d.ts +0 -72
- package/types/services/frontend/index.d.ts +0 -3
- package/types/services/html/htmlGenerator.d.ts +0 -298
- package/types/services/html/index.d.ts +0 -3
- package/types/services/http/apiClient.d.ts +0 -141
- package/types/services/http/http.d.ts +0 -159
- package/types/services/http/index.d.ts +0 -18
- package/types/services/http/responsesBuilder.d.ts +0 -140
- package/types/services/index.d.ts +0 -6
- package/types/services/utils/ensureBearerToken.d.ts +0 -137
- package/types/services/utils/index.d.ts +0 -16
- package/types/types.d.ts +0 -280
- package/types/utils/functions.d.ts +0 -55
- package/types/utils/wrappers.d.ts +0 -127
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RequestHandler, ErrorRequestHandler } from 'express';
|
|
2
|
+
export { Express, NextFunction, Request, Response, Router } from 'express';
|
|
3
|
+
|
|
4
|
+
type ExpressMiddlewareLike = RequestHandler | ErrorRequestHandler;
|
|
5
|
+
type ExpressMiddleware = RequestHandler;
|
|
6
|
+
type AsyncExpressMiddleware = (...args: Parameters<ExpressMiddleware>) => Promise<void>;
|
|
7
|
+
type ExpressErrorHandler = ErrorRequestHandler;
|
|
8
|
+
type RouterMethod = 'all' | 'get' | 'head' | 'post' | 'patch' | 'put' | 'delete' | 'connect' | 'options' | 'trace';
|
|
9
|
+
|
|
10
|
+
export { AsyncExpressMiddleware, ExpressErrorHandler, ExpressMiddleware, ExpressMiddlewareLike, RouterMethod };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var express_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(express_exports);
|
|
17
|
+
//# sourceMappingURL=express.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/express.ts"],"sourcesContent":["import type { RequestHandler, ErrorRequestHandler } from 'express';\n\nexport type { Express, Router, Request, Response, NextFunction } from 'express';\n\nexport type ExpressMiddlewareLike = RequestHandler | ErrorRequestHandler;\nexport type ExpressMiddleware = RequestHandler;\nexport type AsyncExpressMiddleware = (\n ...args: Parameters<ExpressMiddleware>\n) => Promise<void>;\nexport type ExpressErrorHandler = ErrorRequestHandler;\nexport type RouterMethod =\n | 'all'\n | 'get'\n | 'head'\n | 'post'\n | 'patch'\n | 'put'\n | 'delete'\n | 'connect'\n | 'options'\n | 'trace';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Server } from 'https';
|
|
2
|
+
export { Server as HTTPSServer } from 'https';
|
|
3
|
+
import { Server as Server$1 } from 'http';
|
|
4
|
+
export { Server as HTTPServer } from 'http';
|
|
5
|
+
import { ServerOptions } from 'spdy';
|
|
6
|
+
import { Express } from 'express';
|
|
7
|
+
export { Response as HTTPResponse } from 'node-fetch';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @group Jimpex
|
|
11
|
+
*/
|
|
12
|
+
type JimpexServer = Express | Server;
|
|
13
|
+
/**
|
|
14
|
+
* @group Jimpex
|
|
15
|
+
*/
|
|
16
|
+
type JimpexServerInstance = Server$1 | Server;
|
|
17
|
+
/**
|
|
18
|
+
* The paths to the SSL credentials. Depending on the application options, they can be
|
|
19
|
+
* relative to the project root, or the application executable, but they can't be
|
|
20
|
+
* absolute.
|
|
21
|
+
*
|
|
22
|
+
* @group Jimpex
|
|
23
|
+
*/
|
|
24
|
+
type JimpexHTTPSCredentials = {
|
|
25
|
+
/**
|
|
26
|
+
* The path to the certificate authority file.
|
|
27
|
+
*/
|
|
28
|
+
ca?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The path to the certificate file.
|
|
31
|
+
*/
|
|
32
|
+
cert?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The path to the key file.
|
|
35
|
+
*/
|
|
36
|
+
key?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The options to enable HTTP2.
|
|
40
|
+
*
|
|
41
|
+
* @group Jimpex
|
|
42
|
+
*/
|
|
43
|
+
type JimpexHTTP2Options = {
|
|
44
|
+
/**
|
|
45
|
+
* Whether or not to enable HTTP2.
|
|
46
|
+
*/
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom options for the Spdy server.
|
|
50
|
+
*
|
|
51
|
+
* @see {@link https://github.com/spdy-http2/node-spdy#options}
|
|
52
|
+
*/
|
|
53
|
+
spdy?: ServerOptions['spdy'];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The options to enable HTTPS.
|
|
57
|
+
*
|
|
58
|
+
* @group Jimpex
|
|
59
|
+
*/
|
|
60
|
+
type JimpexHTTPSOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* Whether or not to enable HTTPS.
|
|
63
|
+
*/
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The SSL credentials, and their location.
|
|
67
|
+
*/
|
|
68
|
+
credentials?: JimpexHTTPSCredentials & {
|
|
69
|
+
/**
|
|
70
|
+
* If `true`, the credentials will be located relative to the project root, otherwise,
|
|
71
|
+
* they will be located relative to the application executable.
|
|
72
|
+
*
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
onHome?: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Server } from 'https';
|
|
2
|
+
export { Server as HTTPSServer } from 'https';
|
|
3
|
+
import { Server as Server$1 } from 'http';
|
|
4
|
+
export { Server as HTTPServer } from 'http';
|
|
5
|
+
import { ServerOptions } from 'spdy';
|
|
6
|
+
import { Express } from 'express';
|
|
7
|
+
export { Response as HTTPResponse } from 'node-fetch';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @group Jimpex
|
|
11
|
+
*/
|
|
12
|
+
type JimpexServer = Express | Server;
|
|
13
|
+
/**
|
|
14
|
+
* @group Jimpex
|
|
15
|
+
*/
|
|
16
|
+
type JimpexServerInstance = Server$1 | Server;
|
|
17
|
+
/**
|
|
18
|
+
* The paths to the SSL credentials. Depending on the application options, they can be
|
|
19
|
+
* relative to the project root, or the application executable, but they can't be
|
|
20
|
+
* absolute.
|
|
21
|
+
*
|
|
22
|
+
* @group Jimpex
|
|
23
|
+
*/
|
|
24
|
+
type JimpexHTTPSCredentials = {
|
|
25
|
+
/**
|
|
26
|
+
* The path to the certificate authority file.
|
|
27
|
+
*/
|
|
28
|
+
ca?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The path to the certificate file.
|
|
31
|
+
*/
|
|
32
|
+
cert?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The path to the key file.
|
|
35
|
+
*/
|
|
36
|
+
key?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The options to enable HTTP2.
|
|
40
|
+
*
|
|
41
|
+
* @group Jimpex
|
|
42
|
+
*/
|
|
43
|
+
type JimpexHTTP2Options = {
|
|
44
|
+
/**
|
|
45
|
+
* Whether or not to enable HTTP2.
|
|
46
|
+
*/
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom options for the Spdy server.
|
|
50
|
+
*
|
|
51
|
+
* @see {@link https://github.com/spdy-http2/node-spdy#options}
|
|
52
|
+
*/
|
|
53
|
+
spdy?: ServerOptions['spdy'];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The options to enable HTTPS.
|
|
57
|
+
*
|
|
58
|
+
* @group Jimpex
|
|
59
|
+
*/
|
|
60
|
+
type JimpexHTTPSOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* Whether or not to enable HTTPS.
|
|
63
|
+
*/
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The SSL credentials, and their location.
|
|
67
|
+
*/
|
|
68
|
+
credentials?: JimpexHTTPSCredentials & {
|
|
69
|
+
/**
|
|
70
|
+
* If `true`, the credentials will be located relative to the project root, otherwise,
|
|
71
|
+
* they will be located relative to the application executable.
|
|
72
|
+
*
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
onHome?: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var http_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(http_exports);
|
|
17
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/http.ts"],"sourcesContent":["import type { Server as HTTPSServer } from 'https';\nimport type { Server as HTTPServer } from 'http';\nimport type { ServerOptions as SpdyServerOptions } from 'spdy';\nimport type { Express } from './express';\n\nexport type { Response as HTTPResponse } from 'node-fetch';\n\nexport type { HTTPSServer, HTTPServer };\n/**\n * @group Jimpex\n */\nexport type JimpexServer = Express | HTTPSServer;\n/**\n * @group Jimpex\n */\nexport type JimpexServerInstance = HTTPServer | HTTPSServer;\n/**\n * The paths to the SSL credentials. Depending on the application options, they can be\n * relative to the project root, or the application executable, but they can't be\n * absolute.\n *\n * @group Jimpex\n */\nexport type JimpexHTTPSCredentials = {\n /**\n * The path to the certificate authority file.\n */\n ca?: string;\n /**\n * The path to the certificate file.\n */\n cert?: string;\n /**\n * The path to the key file.\n */\n key?: string;\n};\n/**\n * The options to enable HTTP2.\n *\n * @group Jimpex\n */\nexport type JimpexHTTP2Options = {\n /**\n * Whether or not to enable HTTP2.\n */\n enabled?: boolean;\n /**\n * Custom options for the Spdy server.\n *\n * @see {@link https://github.com/spdy-http2/node-spdy#options}\n */\n spdy?: SpdyServerOptions['spdy'];\n};\n/**\n * The options to enable HTTPS.\n *\n * @group Jimpex\n */\nexport type JimpexHTTPSOptions = {\n /**\n * Whether or not to enable HTTPS.\n */\n enabled?: boolean;\n /**\n * The SSL credentials, and their location.\n */\n credentials?: JimpexHTTPSCredentials & {\n /**\n * If `true`, the credentials will be located relative to the project root, otherwise,\n * they will be located relative to the application executable.\n *\n * @default false\n */\n onHome?: boolean;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { E as EventPayload, l as Events, m as JimpexConfigOptions, k as JimpexEventListener, b as JimpexEventName, i as JimpexEventNameLike, c as JimpexEventPayload, a as JimpexEvents, o as JimpexExpressOptions, s as JimpexHealthCheckFn, r as JimpexHealthStatus, t as JimpexOptions, p as JimpexPathOptions, f as JimpexReducerEventName, h as JimpexReducerEventPayload, e as JimpexReducerEventPayloads, g as JimpexReducerEventTarget, d as JimpexReducerEventTargets, q as JimpexServicesOptions, u as JimpexStartCallback, n as JimpexStaticsOptions } from '../index-efeb437e.js';
|
|
2
|
+
export { AsyncExpressMiddleware, ExpressErrorHandler, ExpressMiddleware, ExpressMiddlewareLike, RouterMethod } from './express.mjs';
|
|
3
|
+
export { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance } from './http.mjs';
|
|
4
|
+
export { DeepPartial, DeepReadonly, Dict, NoStringIndex } from './utils.mjs';
|
|
5
|
+
export { PathUtils } from '@homer0/path-utils';
|
|
6
|
+
export { SimpleLogger as Logger } from '@homer0/simple-logger';
|
|
7
|
+
export { SimpleConfig as Config } from '@homer0/simple-config';
|
|
8
|
+
export { EventsHub } from '@homer0/events-hub';
|
|
9
|
+
export { Express, NextFunction, Request, Response, Router } from 'express';
|
|
10
|
+
export { Response as HTTPResponse } from 'node-fetch';
|
|
11
|
+
export { Server as HTTPSServer } from 'https';
|
|
12
|
+
export { Server as HTTPServer } from 'http';
|
|
13
|
+
import '@homer0/jimple';
|
|
14
|
+
import 'spdy';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { E as EventPayload, l as Events, m as JimpexConfigOptions, k as JimpexEventListener, b as JimpexEventName, i as JimpexEventNameLike, c as JimpexEventPayload, a as JimpexEvents, o as JimpexExpressOptions, s as JimpexHealthCheckFn, r as JimpexHealthStatus, t as JimpexOptions, p as JimpexPathOptions, f as JimpexReducerEventName, h as JimpexReducerEventPayload, e as JimpexReducerEventPayloads, g as JimpexReducerEventTarget, d as JimpexReducerEventTargets, q as JimpexServicesOptions, u as JimpexStartCallback, n as JimpexStaticsOptions } from '../index-b2a04c78.js';
|
|
2
|
+
export { AsyncExpressMiddleware, ExpressErrorHandler, ExpressMiddleware, ExpressMiddlewareLike, RouterMethod } from './express.js';
|
|
3
|
+
export { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance } from './http.js';
|
|
4
|
+
export { DeepPartial, DeepReadonly, Dict, NoStringIndex } from './utils.js';
|
|
5
|
+
export { PathUtils } from '@homer0/path-utils';
|
|
6
|
+
export { SimpleLogger as Logger } from '@homer0/simple-logger';
|
|
7
|
+
export { SimpleConfig as Config } from '@homer0/simple-config';
|
|
8
|
+
export { EventsHub } from '@homer0/events-hub';
|
|
9
|
+
export { Express, NextFunction, Request, Response, Router } from 'express';
|
|
10
|
+
export { Response as HTTPResponse } from 'node-fetch';
|
|
11
|
+
export { Server as HTTPSServer } from 'https';
|
|
12
|
+
export { Server as HTTPServer } from 'http';
|
|
13
|
+
import '@homer0/jimple';
|
|
14
|
+
import 'spdy';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
18
|
+
__reExport(types_exports, require("./events"), module.exports);
|
|
19
|
+
__reExport(types_exports, require("./express"), module.exports);
|
|
20
|
+
__reExport(types_exports, require("./http"), module.exports);
|
|
21
|
+
__reExport(types_exports, require("./options"), module.exports);
|
|
22
|
+
__reExport(types_exports, require("./utils"), module.exports);
|
|
23
|
+
__reExport(types_exports, require("./wootils"), module.exports);
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
...require("./events"),
|
|
27
|
+
...require("./express"),
|
|
28
|
+
...require("./http"),
|
|
29
|
+
...require("./options"),
|
|
30
|
+
...require("./utils"),
|
|
31
|
+
...require("./wootils")
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './events';\nexport * from './express';\nexport * from './http';\nexport * from './options';\nexport * from './utils';\nexport * from './wootils';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,qBAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,sBAHd;AAIA,0BAAc,oBAJd;AAKA,0BAAc,sBALd;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@homer0/simple-config';
|
|
2
|
+
export { m as JimpexConfigOptions, o as JimpexExpressOptions, s as JimpexHealthCheckFn, r as JimpexHealthStatus, t as JimpexOptions, p as JimpexPathOptions, q as JimpexServicesOptions, u as JimpexStartCallback, n as JimpexStaticsOptions } from '../index-efeb437e.js';
|
|
3
|
+
import './express.mjs';
|
|
4
|
+
import 'express';
|
|
5
|
+
import './http.mjs';
|
|
6
|
+
import 'https';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'spdy';
|
|
9
|
+
import 'node-fetch';
|
|
10
|
+
import './utils.mjs';
|
|
11
|
+
import '@homer0/path-utils';
|
|
12
|
+
import '@homer0/simple-logger';
|
|
13
|
+
import '@homer0/events-hub';
|
|
14
|
+
import '@homer0/jimple';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@homer0/simple-config';
|
|
2
|
+
export { m as JimpexConfigOptions, o as JimpexExpressOptions, s as JimpexHealthCheckFn, r as JimpexHealthStatus, t as JimpexOptions, p as JimpexPathOptions, q as JimpexServicesOptions, u as JimpexStartCallback, n as JimpexStaticsOptions } from '../index-b2a04c78.js';
|
|
3
|
+
import './express.js';
|
|
4
|
+
import 'express';
|
|
5
|
+
import './http.js';
|
|
6
|
+
import 'https';
|
|
7
|
+
import 'http';
|
|
8
|
+
import 'spdy';
|
|
9
|
+
import 'node-fetch';
|
|
10
|
+
import './utils.js';
|
|
11
|
+
import '@homer0/path-utils';
|
|
12
|
+
import '@homer0/simple-logger';
|
|
13
|
+
import '@homer0/events-hub';
|
|
14
|
+
import '@homer0/jimple';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var options_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(options_exports);
|
|
17
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/options.ts"],"sourcesContent":["import type { Config } from './wootils';\nimport type { Jimpex } from '../app';\n/**\n * The options for the application's configuration service.\n *\n * @see {@link https://www.npmjs.com/package/@homer0/simple-config}\n * @group Jimpex\n */\nexport type JimpexConfigOptions = {\n /**\n * The default settings for the configuration. If no external configuration is used,\n * this needs to include a `port` property.\n */\n default: unknown;\n /**\n * The name of the application, used for external configuration files.\n *\n * @default 'app'\n */\n name: string;\n /**\n * The path to where external configuration files are stored. Relative to the project\n * root.\n *\n * @default 'config/'\n */\n path: string;\n /**\n * Whether the configuration files are inside a sub directory or not. If `true`, a\n * configuration path would be `config/[app-name]/[file]`.\n *\n * @default false\n */\n hasFolder: boolean;\n /**\n * Whether or not to check for the environment variable and load a configuration file\n * based on its value.\n *\n * @default true\n */\n loadFromEnvironment: boolean;\n /**\n * The name of the environment variable that will be used to set the active\n * configuration.\n *\n * @default 'CONFIG'\n */\n environmentVariable: string;\n /**\n * The name of the default configuration file.\n *\n * @default '[app-name].config.js'\n */\n defaultConfigFilename: string;\n /**\n * The name format of other external configuration files.\n *\n * @default '[app-name].[config-name].config.js'\n */\n filenameFormat: string;\n};\n/**\n * The options for the middleware that serves static files.\n *\n * @group Jimpex\n */\nexport type JimpexStaticsOptions = {\n /**\n * Whether or not to enable the middleware.\n *\n * @default true\n */\n enabled: boolean;\n /**\n * If `true`, the path to the statics folder will be relative to the project root\n * directory, otherwise, it will be relative to the directory where the app executable\n * file is located.\n *\n * @default false\n */\n onHome: boolean;\n /**\n * The name of both the route and the folder, relative to whatever you defined with the\n * `onHome` option.\n *\n * @default 'statics'\n */\n route: string;\n /**\n * By default, the folder will be the same as the `route`,\n * but you can use this option to define a relative path that won't affect the route.\n *\n * @default ''\n */\n folder?: string;\n};\n/**\n * The options for the Express application.\n *\n * @group Jimpex\n */\nexport type JimpexExpressOptions = {\n /**\n * Whether or not to enable the `trust proxy` option.\n *\n * @default true\n */\n trustProxy: boolean;\n /**\n * Whether or not to remove the `x-powered-by` header.\n *\n * @default true\n */\n disableXPoweredBy: boolean;\n /**\n * Whether or not to add the `compression` middleware.\n *\n * @default true\n */\n compression: boolean;\n /**\n * Whether or not to add the `body-parser` middleware.\n *\n * @default true\n */\n bodyParser: boolean;\n /**\n * Whether or not to add the `multer` middleware.\n *\n * @see {@link https://www.npmjs.com/package/multer}\n */\n multer: boolean;\n};\n/**\n * The options to configure the application executable path.\n *\n * @group Jimpex\n */\nexport type JimpexPathOptions = {\n /**\n * A \"hardcoded\" path to the application executable file.\n *\n * @default ''\n */\n appPath?: string;\n /**\n * If `true`, it will try to figure out the parent file path, and use its directory as\n * the path.\n *\n * @default true\n */\n useParentPath: boolean;\n};\n/**\n * The options to enable some of the default services Jimpex comes with.\n *\n * @group Jimpex\n */\nexport type JimpexServicesOptions = {\n /**\n * Whether or not to register all the `common` services: `appError`, `httpError`, and\n * `sendFile`.\n *\n * @default true\n */\n common: boolean;\n /**\n * Whether or not to register the `http` services: `apiClient`, `http`, and\n * `responsesBuilder`.\n *\n * @default true\n */\n http: boolean;\n /**\n * Whether or not to register the `utils` services: `ensureBearerToken`.\n */\n utils: boolean;\n};\n/**\n * The format in which the application's health status can be returned.\n * It's either a simple boolean, or a more detailed object.\n *\n * @group Jimpex\n */\nexport type JimpexHealthStatus =\n | boolean\n | {\n isHealthy?: boolean;\n services?: Record<string, boolean>;\n };\n/**\n * Returns the application health status. This is normally used by the `healthController`.\n *\n * @group Jimpex\n */\nexport type JimpexHealthCheckFn = (app: Jimpex) => Promise<JimpexHealthStatus>;\n/**\n * The options to create a new instance of Jimpex.\n *\n * @group Jimpex\n */\nexport type JimpexOptions = {\n /**\n * The size limit for the requests payload.\n *\n * @default '15MB'\n */\n filesizeLimit: string;\n /**\n * Whether or not to call the `boot` method after initialization. This is useful if you\n * want to register/overwrite services only on certain contexts, like a dev environment.\n *\n * @default true\n */\n boot: boolean;\n /**\n * The options to configure the application executable path.\n */\n path: JimpexPathOptions;\n /**\n * Options for the configuration service.\n *\n * @see {@link https://www.npmjs.com/package/@homer0/simple-config}\n */\n config: JimpexConfigOptions;\n /**\n * Options for the middleware that serves static files.\n */\n statics: JimpexStaticsOptions;\n /**\n * Options for the Express application.\n */\n express: JimpexExpressOptions;\n /**\n * Options to manage the default services.\n */\n services: JimpexServicesOptions;\n /**\n * A function that will be used to check the application health status.\n */\n healthCheck: JimpexHealthCheckFn;\n};\n/**\n * The function called when the application starts listening for requests.\n *\n * @group Jimpex\n */\nexport type JimpexStartCallback = (config: Config) => void;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple dictionary with unknown values.
|
|
3
|
+
*
|
|
4
|
+
* @group Utilities
|
|
5
|
+
*/
|
|
6
|
+
type Dict = Record<string, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Utility to make a deep "partial" of an existing type.
|
|
9
|
+
*
|
|
10
|
+
* @template T The type to make a partial of.
|
|
11
|
+
* @group Utilities
|
|
12
|
+
*/
|
|
13
|
+
type DeepPartial<T> = {
|
|
14
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial<U>[] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Utility to make a deep "readonly" of an existing type.
|
|
18
|
+
*
|
|
19
|
+
* @template T The type to make a readonly of.
|
|
20
|
+
* @group Utilities
|
|
21
|
+
*/
|
|
22
|
+
type DeepReadonly<T> = {
|
|
23
|
+
readonly [P in keyof T]: T[P] extends (infer U)[] ? DeepReadonly<U>[] : T[P] extends object ? DeepReadonly<T[P]> : T[P];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Utility to remove string indexes from types.
|
|
27
|
+
*
|
|
28
|
+
* @template T The type to remove string indexes from.
|
|
29
|
+
* @example
|
|
30
|
+
*
|
|
31
|
+
* type Foo = {
|
|
32
|
+
* a: string;
|
|
33
|
+
* b: string;
|
|
34
|
+
* [key: string]: string;
|
|
35
|
+
* };
|
|
36
|
+
* type Bar = RemoveStringIndexes<Foo>;
|
|
37
|
+
* // Bar = {
|
|
38
|
+
* // a: string;
|
|
39
|
+
* // b: string;
|
|
40
|
+
* // };
|
|
41
|
+
*
|
|
42
|
+
* @group Utilities
|
|
43
|
+
*/
|
|
44
|
+
type NoStringIndex<T> = {
|
|
45
|
+
[K in keyof T as string extends K ? never : K]: T[K];
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { DeepPartial, DeepReadonly, Dict, NoStringIndex };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple dictionary with unknown values.
|
|
3
|
+
*
|
|
4
|
+
* @group Utilities
|
|
5
|
+
*/
|
|
6
|
+
type Dict = Record<string, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Utility to make a deep "partial" of an existing type.
|
|
9
|
+
*
|
|
10
|
+
* @template T The type to make a partial of.
|
|
11
|
+
* @group Utilities
|
|
12
|
+
*/
|
|
13
|
+
type DeepPartial<T> = {
|
|
14
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial<U>[] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Utility to make a deep "readonly" of an existing type.
|
|
18
|
+
*
|
|
19
|
+
* @template T The type to make a readonly of.
|
|
20
|
+
* @group Utilities
|
|
21
|
+
*/
|
|
22
|
+
type DeepReadonly<T> = {
|
|
23
|
+
readonly [P in keyof T]: T[P] extends (infer U)[] ? DeepReadonly<U>[] : T[P] extends object ? DeepReadonly<T[P]> : T[P];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Utility to remove string indexes from types.
|
|
27
|
+
*
|
|
28
|
+
* @template T The type to remove string indexes from.
|
|
29
|
+
* @example
|
|
30
|
+
*
|
|
31
|
+
* type Foo = {
|
|
32
|
+
* a: string;
|
|
33
|
+
* b: string;
|
|
34
|
+
* [key: string]: string;
|
|
35
|
+
* };
|
|
36
|
+
* type Bar = RemoveStringIndexes<Foo>;
|
|
37
|
+
* // Bar = {
|
|
38
|
+
* // a: string;
|
|
39
|
+
* // b: string;
|
|
40
|
+
* // };
|
|
41
|
+
*
|
|
42
|
+
* @group Utilities
|
|
43
|
+
*/
|
|
44
|
+
type NoStringIndex<T> = {
|
|
45
|
+
[K in keyof T as string extends K ? never : K]: T[K];
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { DeepPartial, DeepReadonly, Dict, NoStringIndex };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var utils_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(utils_exports);
|
|
17
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/utils.ts"],"sourcesContent":["/**\n * A simple dictionary with unknown values.\n *\n * @group Utilities\n */\nexport type Dict = Record<string, unknown>;\n/**\n * Utility to make a deep \"partial\" of an existing type.\n *\n * @template T The type to make a partial of.\n * @group Utilities\n */\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? DeepPartial<U>[]\n : T[P] extends object\n ? DeepPartial<T[P]>\n : T[P];\n};\n/**\n * Utility to make a deep \"readonly\" of an existing type.\n *\n * @template T The type to make a readonly of.\n * @group Utilities\n */\nexport type DeepReadonly<T> = {\n readonly [P in keyof T]: T[P] extends (infer U)[]\n ? DeepReadonly<U>[]\n : T[P] extends object\n ? DeepReadonly<T[P]>\n : T[P];\n};\n/**\n * Utility to remove string indexes from types.\n *\n * @template T The type to remove string indexes from.\n * @example\n *\n * type Foo = {\n * a: string;\n * b: string;\n * [key: string]: string;\n * };\n * type Bar = RemoveStringIndexes<Foo>;\n * // Bar = {\n * // a: string;\n * // b: string;\n * // };\n *\n * @group Utilities\n */\nexport type NoStringIndex<T> = { [K in keyof T as string extends K ? never : K]: T[K] };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var wootils_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(wootils_exports);
|
|
17
|
+
//# sourceMappingURL=wootils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/wootils.ts"],"sourcesContent":["export type { PathUtils } from '@homer0/path-utils';\nexport type { SimpleLogger as Logger } from '@homer0/simple-logger';\nexport type { SimpleConfig as Config } from '@homer0/simple-config';\nexport type { EventsHub } from '@homer0/events-hub';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { notUndefined } from './others.mjs';
|
|
2
|
+
export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash } from './routes.mjs';
|
|
3
|
+
export { Statuses } from './statuses.mjs';
|
|
4
|
+
export { escapeForRegExp } from './text.mjs';
|
|
5
|
+
export { default as statuses } from 'statuses';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { notUndefined } from './others.js';
|
|
2
|
+
export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash } from './routes.js';
|
|
3
|
+
export { Statuses } from './statuses.js';
|
|
4
|
+
export { escapeForRegExp } from './text.js';
|
|
5
|
+
export { default as statuses } from 'statuses';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var fns_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(fns_exports);
|
|
18
|
+
__reExport(fns_exports, require("./others"), module.exports);
|
|
19
|
+
__reExport(fns_exports, require("./routes"), module.exports);
|
|
20
|
+
__reExport(fns_exports, require("./statuses"), module.exports);
|
|
21
|
+
__reExport(fns_exports, require("./text"), module.exports);
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
...require("./others"),
|
|
25
|
+
...require("./routes"),
|
|
26
|
+
...require("./statuses"),
|
|
27
|
+
...require("./text")
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/fns/index.ts"],"sourcesContent":["export * from './others';\nexport * from './routes';\nexport * from './statuses';\nexport * from './text';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,qBADd;AAEA,wBAAc,uBAFd;AAGA,wBAAc,mBAHd;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility function that can be used in `.filter` calls to remove `undefined` values and
|
|
3
|
+
* assert that the type is not longer `undefined`.
|
|
4
|
+
*
|
|
5
|
+
* @param value The value to check.
|
|
6
|
+
* @template T The type that is not `undefined`.
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* const arr: (number | undefined)[] = [1, 2, 3, undefined];
|
|
10
|
+
* const filtered = arr.filter(notUndefined);
|
|
11
|
+
* // filtered = [1, 2, 3] and its type is number[]
|
|
12
|
+
*
|
|
13
|
+
* @group Utilities
|
|
14
|
+
*/
|
|
15
|
+
declare const notUndefined: <T>(value: T | undefined) => value is T;
|
|
16
|
+
|
|
17
|
+
export { notUndefined };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility function that can be used in `.filter` calls to remove `undefined` values and
|
|
3
|
+
* assert that the type is not longer `undefined`.
|
|
4
|
+
*
|
|
5
|
+
* @param value The value to check.
|
|
6
|
+
* @template T The type that is not `undefined`.
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* const arr: (number | undefined)[] = [1, 2, 3, undefined];
|
|
10
|
+
* const filtered = arr.filter(notUndefined);
|
|
11
|
+
* // filtered = [1, 2, 3] and its type is number[]
|
|
12
|
+
*
|
|
13
|
+
* @group Utilities
|
|
14
|
+
*/
|
|
15
|
+
declare const notUndefined: <T>(value: T | undefined) => value is T;
|
|
16
|
+
|
|
17
|
+
export { notUndefined };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var others_exports = {};
|
|
20
|
+
__export(others_exports, {
|
|
21
|
+
notUndefined: () => notUndefined
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(others_exports);
|
|
24
|
+
const notUndefined = (value) => value !== void 0;
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
notUndefined
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=others.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/fns/others.ts"],"sourcesContent":["/**\n * A utility function that can be used in `.filter` calls to remove `undefined` values and\n * assert that the type is not longer `undefined`.\n *\n * @param value The value to check.\n * @template T The type that is not `undefined`.\n * @example\n *\n * const arr: (number | undefined)[] = [1, 2, 3, undefined];\n * const filtered = arr.filter(notUndefined);\n * // filtered = [1, 2, 3] and its type is number[]\n *\n * @group Utilities\n */\nexport const notUndefined = <T>(value: T | undefined): value is T => value !== undefined;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,MAAM,eAAe,CAAI,UAAqC,UAAU;","names":[]}
|