jimpex 10.0.2 → 11.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 +29 -0
- package/README.md +7 -9
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +1 -22
- package/dist/app/index.js.map +1 -1
- package/dist/app/jimpex.d.ts +1 -1
- package/dist/app/jimpex.js +100 -131
- package/dist/app/jimpex.js.map +1 -1
- package/dist/controllers/common/config.d.ts +2 -2
- package/dist/controllers/common/config.js +12 -39
- package/dist/controllers/common/config.js.map +1 -1
- package/dist/controllers/common/health.d.ts +4 -4
- package/dist/controllers/common/health.js +20 -47
- package/dist/controllers/common/health.js.map +1 -1
- package/dist/controllers/common/index.d.ts +1 -1
- package/dist/controllers/common/index.js +3 -26
- package/dist/controllers/common/index.js.map +1 -1
- package/dist/controllers/common/statics.d.ts +3 -3
- package/dist/controllers/common/statics.js +32 -65
- package/dist/controllers/common/statics.js.map +1 -1
- package/dist/controllers/index.d.ts +1 -1
- package/dist/controllers/index.js +2 -24
- package/dist/controllers/index.js.map +1 -1
- package/dist/controllers/utils/gateway.d.ts +5 -5
- package/dist/controllers/utils/gateway.js +70 -91
- package/dist/controllers/utils/gateway.js.map +1 -1
- package/dist/controllers/utils/index.d.ts +1 -1
- package/dist/controllers/utils/index.js +1 -22
- package/dist/controllers/utils/index.js.map +1 -1
- package/dist/{index-C6I3NCC-.d.ts → index-BlSpNHox.d.ts} +13 -13
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -32
- package/dist/index.js.map +1 -1
- package/dist/middlewares/common/errorHandler.d.ts +5 -5
- package/dist/middlewares/common/errorHandler.js +31 -56
- package/dist/middlewares/common/errorHandler.js.map +1 -1
- package/dist/middlewares/common/forceHTTPS.d.ts +1 -1
- package/dist/middlewares/common/forceHTTPS.js +8 -35
- package/dist/middlewares/common/forceHTTPS.js.map +1 -1
- package/dist/middlewares/common/hsts.d.ts +1 -1
- package/dist/middlewares/common/hsts.js +12 -39
- package/dist/middlewares/common/hsts.js.map +1 -1
- package/dist/middlewares/common/index.d.ts +3 -3
- package/dist/middlewares/common/index.js +3 -26
- package/dist/middlewares/common/index.js.map +1 -1
- package/dist/middlewares/html/fastHTML.d.ts +4 -4
- package/dist/middlewares/html/fastHTML.js +43 -66
- package/dist/middlewares/html/fastHTML.js.map +1 -1
- package/dist/middlewares/html/index.d.ts +2 -2
- package/dist/middlewares/html/index.js +2 -24
- package/dist/middlewares/html/index.js.map +1 -1
- package/dist/middlewares/html/showHTML.d.ts +3 -3
- package/dist/middlewares/html/showHTML.js +25 -52
- package/dist/middlewares/html/showHTML.js.map +1 -1
- package/dist/middlewares/index.d.ts +4 -4
- package/dist/middlewares/index.js +3 -26
- package/dist/middlewares/index.js.map +1 -1
- package/dist/middlewares/utils/index.d.ts +3 -3
- package/dist/middlewares/utils/index.js +1 -22
- package/dist/middlewares/utils/index.js.map +1 -1
- package/dist/middlewares/utils/versionValidator.d.ts +5 -5
- package/dist/middlewares/utils/versionValidator.js +24 -51
- package/dist/middlewares/utils/versionValidator.js.map +1 -1
- package/dist/services/common/appError.d.ts +2 -2
- package/dist/services/common/appError.js +18 -46
- package/dist/services/common/appError.js.map +1 -1
- package/dist/services/common/httpError.d.ts +2 -2
- package/dist/services/common/httpError.js +7 -33
- package/dist/services/common/httpError.js.map +1 -1
- package/dist/services/common/index.d.ts +1 -1
- package/dist/services/common/index.js +14 -42
- package/dist/services/common/index.js.map +1 -1
- package/dist/services/common/sendFile.d.ts +1 -1
- package/dist/services/common/sendFile.js +4 -29
- package/dist/services/common/sendFile.js.map +1 -1
- package/dist/services/frontend/frontendFs.d.ts +2 -2
- package/dist/services/frontend/frontendFs.js +12 -49
- package/dist/services/frontend/frontendFs.js.map +1 -1
- package/dist/services/frontend/index.d.ts +2 -2
- package/dist/services/frontend/index.js +8 -34
- package/dist/services/frontend/index.js.map +1 -1
- package/dist/services/html/htmlGenerator.d.ts +5 -5
- package/dist/services/html/htmlGenerator.js +46 -75
- package/dist/services/html/htmlGenerator.js.map +1 -1
- package/dist/services/html/index.d.ts +2 -2
- package/dist/services/html/index.js +8 -34
- package/dist/services/html/index.js.map +1 -1
- package/dist/services/http/apiClient.d.ts +1 -1
- package/dist/services/http/apiClient.js +23 -48
- package/dist/services/http/apiClient.js.map +1 -1
- package/dist/services/http/http.d.ts +5 -5
- package/dist/services/http/http.js +23 -60
- package/dist/services/http/http.js.map +1 -1
- package/dist/services/http/index.d.ts +2 -2
- package/dist/services/http/index.js +14 -42
- package/dist/services/http/index.js.map +1 -1
- package/dist/services/http/responsesBuilder.d.ts +4 -4
- package/dist/services/http/responsesBuilder.js +13 -40
- package/dist/services/http/responsesBuilder.js.map +1 -1
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.js +5 -30
- package/dist/services/index.js.map +1 -1
- package/dist/services/utils/ensureBearerToken.d.ts +2 -2
- package/dist/services/utils/ensureBearerToken.js +15 -42
- package/dist/services/utils/ensureBearerToken.js.map +1 -1
- package/dist/services/utils/index.d.ts +1 -1
- package/dist/services/utils/index.js +8 -34
- package/dist/services/utils/index.js.map +1 -1
- package/dist/types/events.d.ts +1 -1
- package/dist/types/events.js +0 -16
- package/dist/types/events.js.map +1 -1
- package/dist/types/express.js +0 -16
- package/dist/types/express.js.map +1 -1
- package/dist/types/http.js +0 -16
- package/dist/types/http.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +6 -32
- package/dist/types/index.js.map +1 -1
- package/dist/types/options.d.ts +1 -1
- package/dist/types/options.js +0 -16
- package/dist/types/options.js.map +1 -1
- package/dist/types/utils.js +0 -16
- package/dist/types/utils.js.map +1 -1
- package/dist/types/wootils.js +0 -16
- package/dist/types/wootils.js.map +1 -1
- package/dist/utils/fns/index.js +4 -28
- package/dist/utils/fns/index.js.map +1 -1
- package/dist/utils/fns/others.js +2 -26
- package/dist/utils/fns/others.js.map +1 -1
- package/dist/utils/fns/routes.js +4 -31
- package/dist/utils/fns/routes.js.map +1 -1
- package/dist/utils/fns/statuses.js +3 -37
- package/dist/utils/fns/statuses.js.map +1 -1
- package/dist/utils/fns/text.js +2 -26
- package/dist/utils/fns/text.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -24
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/wrappers.d.ts +1 -1
- package/dist/utils/wrappers.js +20 -48
- package/dist/utils/wrappers.js.map +1 -1
- package/eslint.config.js +19 -0
- package/examples/basic/app.ts +4 -4
- package/examples/basic/controller.ts +2 -2
- package/examples/basic/index.ts +4 -4
- package/examples/basic/middleware.ts +2 -2
- package/examples/basic/service.ts +1 -1
- package/package.json +61 -49
- package/pnpm-workspace.yaml +4 -0
- package/src/app/index.ts +1 -1
- package/src/app/jimpex.ts +23 -20
- package/src/controllers/common/config.ts +4 -4
- package/src/controllers/common/health.ts +9 -5
- package/src/controllers/common/index.ts +3 -3
- package/src/controllers/common/statics.ts +12 -7
- package/src/controllers/index.ts +2 -2
- package/src/controllers/utils/gateway.ts +8 -8
- package/src/controllers/utils/index.ts +1 -1
- package/src/index.ts +6 -6
- package/src/middlewares/common/errorHandler.ts +9 -5
- package/src/middlewares/common/forceHTTPS.ts +2 -2
- package/src/middlewares/common/hsts.ts +2 -2
- package/src/middlewares/common/index.ts +3 -3
- package/src/middlewares/html/fastHTML.ts +14 -5
- package/src/middlewares/html/index.ts +2 -2
- package/src/middlewares/html/showHTML.ts +8 -4
- package/src/middlewares/index.ts +3 -3
- package/src/middlewares/utils/index.ts +1 -1
- package/src/middlewares/utils/versionValidator.ts +6 -6
- package/src/services/common/appError.ts +1 -1
- package/src/services/common/httpError.ts +2 -2
- package/src/services/common/index.ts +7 -7
- package/src/services/common/sendFile.ts +2 -2
- package/src/services/frontend/frontendFs.ts +3 -3
- package/src/services/frontend/index.ts +3 -3
- package/src/services/html/htmlGenerator.ts +11 -13
- package/src/services/html/index.ts +3 -3
- package/src/services/http/apiClient.ts +3 -3
- package/src/services/http/http.ts +5 -5
- package/src/services/http/index.ts +7 -7
- package/src/services/http/responsesBuilder.ts +5 -5
- package/src/services/index.ts +5 -5
- package/src/services/utils/ensureBearerToken.ts +4 -4
- package/src/services/utils/index.ts +3 -3
- package/src/types/events.ts +8 -8
- package/src/types/http.ts +1 -1
- package/src/types/index.ts +6 -6
- package/src/types/options.ts +2 -2
- package/src/types/utils.ts +4 -4
- package/src/utils/fns/index.ts +4 -4
- package/src/utils/fns/routes.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/wrappers.ts +6 -6
- package/tsconfig.json +9 -4
- package/tsup.config.ts +1 -2
- package/vitest.config.ts +24 -0
- package/dist/app/index.d.mts +0 -14
- package/dist/app/jimpex.d.mts +0 -14
- package/dist/controllers/common/config.d.mts +0 -79
- package/dist/controllers/common/health.d.mts +0 -83
- package/dist/controllers/common/index.d.mts +0 -22
- package/dist/controllers/common/statics.d.mts +0 -223
- package/dist/controllers/index.d.mts +0 -25
- package/dist/controllers/utils/gateway.d.mts +0 -725
- package/dist/controllers/utils/index.d.mts +0 -17
- package/dist/esm/app/index.js +0 -2
- package/dist/esm/app/index.js.map +0 -1
- package/dist/esm/app/jimpex.js +0 -640
- package/dist/esm/app/jimpex.js.map +0 -1
- package/dist/esm/chunk-V6TY7KAL.js +0 -8
- package/dist/esm/chunk-V6TY7KAL.js.map +0 -1
- package/dist/esm/controllers/common/config.js +0 -80
- package/dist/esm/controllers/common/config.js.map +0 -1
- package/dist/esm/controllers/common/health.js +0 -88
- package/dist/esm/controllers/common/health.js.map +0 -1
- package/dist/esm/controllers/common/index.js +0 -4
- package/dist/esm/controllers/common/index.js.map +0 -1
- package/dist/esm/controllers/common/statics.js +0 -226
- package/dist/esm/controllers/common/statics.js.map +0 -1
- package/dist/esm/controllers/index.js +0 -3
- package/dist/esm/controllers/index.js.map +0 -1
- package/dist/esm/controllers/utils/gateway.js +0 -559
- package/dist/esm/controllers/utils/gateway.js.map +0 -1
- package/dist/esm/controllers/utils/index.js +0 -2
- package/dist/esm/controllers/utils/index.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/middlewares/common/errorHandler.js +0 -116
- package/dist/esm/middlewares/common/errorHandler.js.map +0 -1
- package/dist/esm/middlewares/common/forceHTTPS.js +0 -52
- package/dist/esm/middlewares/common/forceHTTPS.js.map +0 -1
- package/dist/esm/middlewares/common/hsts.js +0 -74
- package/dist/esm/middlewares/common/hsts.js.map +0 -1
- package/dist/esm/middlewares/common/index.js +0 -4
- package/dist/esm/middlewares/common/index.js.map +0 -1
- package/dist/esm/middlewares/html/fastHTML.js +0 -157
- package/dist/esm/middlewares/html/fastHTML.js.map +0 -1
- package/dist/esm/middlewares/html/index.js +0 -3
- package/dist/esm/middlewares/html/index.js.map +0 -1
- package/dist/esm/middlewares/html/showHTML.js +0 -100
- package/dist/esm/middlewares/html/showHTML.js.map +0 -1
- package/dist/esm/middlewares/index.js +0 -4
- package/dist/esm/middlewares/index.js.map +0 -1
- package/dist/esm/middlewares/utils/index.js +0 -2
- package/dist/esm/middlewares/utils/index.js.map +0 -1
- package/dist/esm/middlewares/utils/versionValidator.js +0 -135
- package/dist/esm/middlewares/utils/versionValidator.js.map +0 -1
- package/dist/esm/services/common/appError.js +0 -98
- package/dist/esm/services/common/appError.js.map +0 -1
- package/dist/esm/services/common/httpError.js +0 -28
- package/dist/esm/services/common/httpError.js.map +0 -1
- package/dist/esm/services/common/index.js +0 -17
- package/dist/esm/services/common/index.js.map +0 -1
- package/dist/esm/services/common/sendFile.js +0 -27
- package/dist/esm/services/common/sendFile.js.map +0 -1
- package/dist/esm/services/frontend/frontendFs.js +0 -66
- package/dist/esm/services/frontend/frontendFs.js.map +0 -1
- package/dist/esm/services/frontend/index.js +0 -11
- package/dist/esm/services/frontend/index.js.map +0 -1
- package/dist/esm/services/html/htmlGenerator.js +0 -192
- package/dist/esm/services/html/htmlGenerator.js.map +0 -1
- package/dist/esm/services/html/index.js +0 -11
- package/dist/esm/services/html/index.js.map +0 -1
- package/dist/esm/services/http/apiClient.js +0 -94
- package/dist/esm/services/http/apiClient.js.map +0 -1
- package/dist/esm/services/http/http.js +0 -180
- package/dist/esm/services/http/http.js.map +0 -1
- package/dist/esm/services/http/index.js +0 -17
- package/dist/esm/services/http/index.js.map +0 -1
- package/dist/esm/services/http/responsesBuilder.js +0 -152
- package/dist/esm/services/http/responsesBuilder.js.map +0 -1
- package/dist/esm/services/index.js +0 -6
- package/dist/esm/services/index.js.map +0 -1
- package/dist/esm/services/utils/ensureBearerToken.js +0 -94
- package/dist/esm/services/utils/ensureBearerToken.js.map +0 -1
- package/dist/esm/services/utils/index.js +0 -11
- package/dist/esm/services/utils/index.js.map +0 -1
- package/dist/esm/types/events.js +0 -1
- package/dist/esm/types/events.js.map +0 -1
- package/dist/esm/types/express.js +0 -1
- package/dist/esm/types/express.js.map +0 -1
- package/dist/esm/types/http.js +0 -1
- package/dist/esm/types/http.js.map +0 -1
- package/dist/esm/types/index.js +0 -7
- package/dist/esm/types/index.js.map +0 -1
- package/dist/esm/types/options.js +0 -1
- package/dist/esm/types/options.js.map +0 -1
- package/dist/esm/types/utils.js +0 -1
- package/dist/esm/types/utils.js.map +0 -1
- package/dist/esm/types/wootils.js +0 -1
- package/dist/esm/types/wootils.js.map +0 -1
- package/dist/esm/utils/fns/index.js +0 -5
- package/dist/esm/utils/fns/index.js.map +0 -1
- package/dist/esm/utils/fns/others.js +0 -6
- package/dist/esm/utils/fns/others.js.map +0 -1
- package/dist/esm/utils/fns/routes.js +0 -25
- package/dist/esm/utils/fns/routes.js.map +0 -1
- package/dist/esm/utils/fns/statuses.js +0 -6
- package/dist/esm/utils/fns/statuses.js.map +0 -1
- package/dist/esm/utils/fns/text.js +0 -6
- package/dist/esm/utils/fns/text.js.map +0 -1
- package/dist/esm/utils/index.js +0 -3
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/wrappers.js +0 -41
- package/dist/esm/utils/wrappers.js.map +0 -1
- package/dist/index-Bwf7JHu9.d.mts +0 -1287
- package/dist/index.d.mts +0 -47
- package/dist/middlewares/common/errorHandler.d.mts +0 -132
- package/dist/middlewares/common/forceHTTPS.d.mts +0 -69
- package/dist/middlewares/common/hsts.d.mts +0 -110
- package/dist/middlewares/common/index.d.mts +0 -22
- package/dist/middlewares/html/fastHTML.d.mts +0 -180
- package/dist/middlewares/html/index.d.mts +0 -21
- package/dist/middlewares/html/showHTML.d.mts +0 -127
- package/dist/middlewares/index.d.mts +0 -30
- package/dist/middlewares/utils/index.d.mts +0 -20
- package/dist/middlewares/utils/versionValidator.d.mts +0 -215
- package/dist/services/common/appError.d.mts +0 -139
- package/dist/services/common/httpError.d.mts +0 -80
- package/dist/services/common/index.d.mts +0 -47
- package/dist/services/common/sendFile.d.mts +0 -102
- package/dist/services/frontend/frontendFs.d.mts +0 -96
- package/dist/services/frontend/index.d.mts +0 -40
- package/dist/services/html/htmlGenerator.d.mts +0 -237
- package/dist/services/html/index.d.mts +0 -43
- package/dist/services/http/apiClient.d.mts +0 -170
- package/dist/services/http/http.d.mts +0 -182
- package/dist/services/http/index.d.mts +0 -51
- package/dist/services/http/responsesBuilder.d.mts +0 -179
- package/dist/services/index.d.mts +0 -33
- package/dist/services/utils/ensureBearerToken.d.mts +0 -158
- package/dist/services/utils/index.d.mts +0 -44
- package/dist/types/events.d.mts +0 -14
- package/dist/types/express.d.mts +0 -10
- package/dist/types/http.d.mts +0 -82
- package/dist/types/index.d.mts +0 -14
- package/dist/types/options.d.mts +0 -14
- package/dist/types/utils.d.mts +0 -48
- package/dist/types/wootils.d.mts +0 -4
- package/dist/utils/fns/index.d.mts +0 -5
- package/dist/utils/fns/others.d.mts +0 -17
- package/dist/utils/fns/routes.d.mts +0 -39
- package/dist/utils/fns/statuses.d.mts +0 -45
- package/dist/utils/fns/text.d.mts +0 -9
- package/dist/utils/index.d.mts +0 -19
- package/dist/utils/wrappers.d.mts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
# [11.0.0](https://github.com/homer0/jimpex/compare/10.0.2...11.0.0) (2025-12-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add missing extensions for esm ([c08930d](https://github.com/homer0/jimpex/commit/c08930d559f6b656c7fe9aa84b4ab894141439aa))
|
|
7
|
+
* define module exports for the package and set the type to module ([935a9d2](https://github.com/homer0/jimpex/commit/935a9d273f9495f833a0e976e12ffe8d1f4cba3a))
|
|
8
|
+
* drop Node v18 ([46de5f2](https://github.com/homer0/jimpex/commit/46de5f20e185cea701a57de46ed92fb5f8c1c854))
|
|
9
|
+
* import a single obj from spdy ([ee96af3](https://github.com/homer0/jimpex/commit/ee96af3c0a64b4bc1d115a77ef26e635a852a3df))
|
|
10
|
+
* import spdy only when using it ([385b70f](https://github.com/homer0/jimpex/commit/385b70fd14127cbc4510ab2364476d7dad2ba99d))
|
|
11
|
+
* remove unnecessary check ([7530b2b](https://github.com/homer0/jimpex/commit/7530b2b0a16abdddb608c0541a56a765bfc36e35))
|
|
12
|
+
* typo on default value ([9fd84c5](https://github.com/homer0/jimpex/commit/9fd84c5e1ba6ca9908e0e8da45a71b37e8d76206))
|
|
13
|
+
* typo on type name ([c0c3118](https://github.com/homer0/jimpex/commit/c0c311825e9f8895b08b5d8ae09a93111264724c))
|
|
14
|
+
* update dependencies ([8245c8f](https://github.com/homer0/jimpex/commit/8245c8fc11863d27b98652c09b0df9a2345498e3))
|
|
15
|
+
* update regex to cover new stack trace ([c6672ef](https://github.com/homer0/jimpex/commit/c6672ef08c9e4880759fe9a615b5e28419cc0239))
|
|
16
|
+
* use node prefix for importing internals ([ed1df9e](https://github.com/homer0/jimpex/commit/ed1df9e295368a0de417298b38b8fcbd95101492))
|
|
17
|
+
* use the right import path ([7ed1721](https://github.com/homer0/jimpex/commit/7ed1721ddccb170a5ff45e61fee874c040c2d5ad))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
* The VersionValidator default option for `popup.message`
|
|
23
|
+
was changed from `vesion:conflict` to `version:confict`
|
|
24
|
+
* The type HTTPContructorOptions was renamed to
|
|
25
|
+
HTTPConstructorOptions
|
|
26
|
+
* This package is now esm only
|
|
27
|
+
* Node v18 is not longer supported. Node v20.19 is the minimum
|
|
28
|
+
required version now.
|
|
29
|
+
|
|
1
30
|
## [10.0.2](https://github.com/homer0/jimpex/compare/10.0.1...10.0.2) (2024-11-09)
|
|
2
31
|
|
|
3
32
|
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ app.set('message', 'Hello Pili!');
|
|
|
96
96
|
app.boot();
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Now, this may look like an unnecessary feature, but if you consider the
|
|
99
|
+
Now, this may look like an unnecessary feature, but if you consider the possibility of different entry points based on environment, maybe to enable debugging tools on dev, this becomes really useful.
|
|
100
100
|
|
|
101
101
|
### ⚙️ Options and configuration
|
|
102
102
|
|
|
@@ -356,7 +356,7 @@ Jimpex already comes with a few built-in service providers ready to be used, and
|
|
|
356
356
|
|
|
357
357
|
##### Configurable services
|
|
358
358
|
|
|
359
|
-
Since the version of Jimple that Jimpex uses under the hood is [`@homer0/jimple`](https://www.npmjs.com/package/@homer0/jimple), my custom "fork", you can also create "
|
|
359
|
+
Since the version of Jimple that Jimpex uses under the hood is [`@homer0/jimple`](https://www.npmjs.com/package/@homer0/jimple), my custom "fork", you can also create "configurable providers":
|
|
360
360
|
|
|
361
361
|
```ts
|
|
362
362
|
// src/my-service.js
|
|
@@ -502,7 +502,7 @@ class MyApp extends Jimpex {
|
|
|
502
502
|
|
|
503
503
|
#### Controllers with services
|
|
504
504
|
|
|
505
|
-
If for some reason, your controller needs to register a service that the rest of the container needs to have access to, and you plan to do it on the `controller`/`controllerCreator` callback, you could end up messing with the
|
|
505
|
+
If for some reason, your controller needs to register a service that the rest of the container needs to have access to, and you plan to do it on the `controller`/`controllerCreator` callback, you could end up messing with the _laziness_ of the container: If a middleware or another controller tries to access the service and the controller that registers it is mounted after it, it will get an error as the service _doesn't exist yet_.
|
|
506
506
|
|
|
507
507
|
A way to solve this issue would be with a `provider`/`providerCreator`, mounting the controller:
|
|
508
508
|
|
|
@@ -623,7 +623,7 @@ Just like the `controllerCreator` wrapper, you can also use the `middlewareCreat
|
|
|
623
623
|
|
|
624
624
|
```ts
|
|
625
625
|
// my-middleware.js
|
|
626
|
-
import {
|
|
626
|
+
import { middlewareCreator } from 'jimpex';
|
|
627
627
|
|
|
628
628
|
// Define your middleware function (or class if it gets more complex)
|
|
629
629
|
export const greetingsMiddleware = (message) => (req, res, next) => {
|
|
@@ -743,15 +743,13 @@ The configuration for `semantic-release` is on `./releaserc` and the workflow fo
|
|
|
743
743
|
|
|
744
744
|
### Testing
|
|
745
745
|
|
|
746
|
-
I use [
|
|
746
|
+
I use [Vitest](https://vitest.dev) to test the project.
|
|
747
747
|
|
|
748
748
|
The configuration file is on `./.jestrc.js`, the tests are on `./tests` and the script that runs it is on `./utils/scripts/test`.
|
|
749
749
|
|
|
750
750
|
### Code linting and formatting
|
|
751
751
|
|
|
752
|
-
For linting, I use [ESlint](https://eslint.org) with [my own custom configuration](https://npmjs.com/package/@homer0/eslint-plugin).
|
|
753
|
-
|
|
754
|
-
There are two configuration files, `./.eslintrc` for the source and the tooling, and `./tests/.eslintrc`, and there's also a `./.eslintignore` to exclude some files.
|
|
752
|
+
For linting, I use [ESlint](https://eslint.org) with [my own custom configuration](https://npmjs.com/package/@homer0/eslint-plugin). The configuration file is `./eslint.config.js`.
|
|
755
753
|
|
|
756
754
|
For formatting, I use [Prettier](https://prettier.io) with [my JSDoc plugin](https://npmjs.com/package/@homer0/prettier-plugin-jsdoc) and [my own custom configuration](https://npmjs.com/package/@homer0/prettier-config). The configuration file is `./.prettierrc`.
|
|
757
755
|
|
|
@@ -767,4 +765,4 @@ The configuration file is `./.typedoc.json` and the script that runs it is on `.
|
|
|
767
765
|
|
|
768
766
|
A friend, who's also web developer, brought the idea of start using a dependency injection container on Node, and how Jimple was a great tool for it; from the moment I tried Jimple, I could never think of starting another project without it: It not only allows you to implement dependency injection on a simple and clean way, but it also kind of forces you to have a really good organization of your code.
|
|
769
767
|
|
|
770
|
-
A couple of months after that, the same friend told me that we should do something similar to [Silex](https://github.com/silexphp/Silex), which is based on Pimple,
|
|
768
|
+
A couple of months after that, the same friend told me that we should do something similar to [Silex](https://github.com/silexphp/Silex), which is based on Pimple, but with Express. I ran with the idea and... this project is what I think a mix of Jimple and Express would look like. To be clear, **this is not a port of Silex**.
|
package/dist/app/index.d.ts
CHANGED
package/dist/app/index.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
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 app_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(app_exports);
|
|
18
|
-
__reExport(app_exports, require("./jimpex"), module.exports);
|
|
19
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
20
|
-
0 && (module.exports = {
|
|
21
|
-
...require("./jimpex")
|
|
22
|
-
});
|
|
1
|
+
export * from "./jimpex.js";
|
|
23
2
|
//# sourceMappingURL=index.js.map
|
package/dist/app/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/app/index.ts"],"sourcesContent":["export * from './jimpex';\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/app/index.ts"],"sourcesContent":["export * from './jimpex.js';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
package/dist/app/jimpex.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@homer0/jimple';
|
|
2
2
|
import '@homer0/events-hub';
|
|
3
|
-
export { J as Jimpex, j as jimpex } from '../index-
|
|
3
|
+
export { J as Jimpex, j as jimpex } from '../index-BlSpNHox.js';
|
|
4
4
|
import 'express';
|
|
5
5
|
import '../types/http.js';
|
|
6
6
|
import '../types/utils.js';
|
package/dist/app/jimpex.js
CHANGED
|
@@ -1,106 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
|
+
import { createServer as createHTTPSServer } from "https";
|
|
4
|
+
import { Jimple } from "@homer0/jimple";
|
|
5
|
+
import { deepAssignWithOverwrite } from "@homer0/deep-assign";
|
|
6
|
+
import { appLoggerProvider } from "@homer0/simple-logger";
|
|
7
|
+
import { envUtilsProvider } from "@homer0/env-utils";
|
|
8
|
+
import { packageInfoProvider } from "@homer0/package-info";
|
|
9
|
+
import { pathUtilsProvider } from "@homer0/path-utils";
|
|
10
|
+
import { rootFileProvider } from "@homer0/root-file";
|
|
11
|
+
import { tsAsyncImport } from "@homer0/ts-async-import";
|
|
12
|
+
import { EventsHub } from "@homer0/events-hub";
|
|
13
|
+
import { simpleConfigProvider } from "@homer0/simple-config";
|
|
14
|
+
import compression from "compression";
|
|
15
|
+
import bodyParser from "body-parser";
|
|
16
|
+
import multer from "multer";
|
|
17
|
+
import express from "express";
|
|
18
|
+
import {
|
|
19
|
+
commonServicesProvider,
|
|
20
|
+
httpServicesProvider,
|
|
21
|
+
utilsServicesProvider
|
|
22
|
+
} from "../services/index.js";
|
|
23
|
+
import {
|
|
24
|
+
statuses
|
|
25
|
+
} from "../utils/index.js";
|
|
26
|
+
class Jimpex extends Jimple {
|
|
27
|
+
/**
|
|
28
|
+
* The customization settings for the application.
|
|
29
|
+
*/
|
|
30
|
+
_options;
|
|
31
|
+
/**
|
|
32
|
+
* The Express application Jimpex uses under the hood.
|
|
33
|
+
*/
|
|
34
|
+
_express;
|
|
35
|
+
/**
|
|
36
|
+
* Since the configuration service has an async initialization, the class uses this flag
|
|
37
|
+
* internally to validate if the configuration has been initialized or not.
|
|
38
|
+
*/
|
|
39
|
+
_configReady = false;
|
|
40
|
+
/**
|
|
41
|
+
* A reference to the actual HTTP the application will use. This can vary depending on
|
|
42
|
+
* whether HTTPS, or HTTP2 are enabled. If HTTPS is not enabled, it will be the same as
|
|
43
|
+
* the `express` property; if HTTPS is enabled, it will be an `https` server; and if
|
|
44
|
+
* HTTP2 is enabled, it will be an `spdy` server.
|
|
45
|
+
*/
|
|
46
|
+
_server;
|
|
47
|
+
/**
|
|
48
|
+
* The instance of the server that is listening for requests.
|
|
49
|
+
*/
|
|
50
|
+
_instance;
|
|
51
|
+
/**
|
|
52
|
+
* A list of functions that implement controllers and middlewares. When the application
|
|
53
|
+
* starts, the queue will be processed and those controllers and middlewares will be
|
|
54
|
+
* added to the server instance. The reason they are not added directly like with a
|
|
55
|
+
* regular Express implementation is that services on Jimple use lazy loading, and
|
|
56
|
+
* adding middlewares and controllers as they come could cause errors if they depend on
|
|
57
|
+
* services that are not yet registered.
|
|
58
|
+
*/
|
|
59
|
+
_mountQueue = [];
|
|
60
|
+
/**
|
|
61
|
+
* A list with all the top routes controlled by the application. Every time a controller
|
|
62
|
+
* is mounted, its route will be added here.
|
|
63
|
+
*/
|
|
64
|
+
_controlledRoutes = [];
|
|
58
65
|
/**
|
|
59
66
|
* @param options Preferences to customize the application.
|
|
60
67
|
* @param config The default settings for the configuration service. It's a
|
|
61
|
-
*
|
|
68
|
+
* short-circuit for `options.config.default`
|
|
62
69
|
*/
|
|
63
70
|
constructor(options = {}, config = {}) {
|
|
64
71
|
super();
|
|
65
|
-
|
|
66
|
-
* The customization settings for the application.
|
|
67
|
-
*/
|
|
68
|
-
__publicField(this, "_options");
|
|
69
|
-
/**
|
|
70
|
-
* The Express application Jimpex uses under the hood.
|
|
71
|
-
*/
|
|
72
|
-
__publicField(this, "_express");
|
|
73
|
-
/**
|
|
74
|
-
* Since the configuration service has an async initialization, the class uses this flag
|
|
75
|
-
* internally to validate if the configuration has been initialized or not.
|
|
76
|
-
*/
|
|
77
|
-
__publicField(this, "_configReady", false);
|
|
78
|
-
/**
|
|
79
|
-
* A reference to the actuall HTTP the application will use. This can vary depending on
|
|
80
|
-
* whether HTTPS, or HTTP2 are enabled. If HTTPS is not enabled, it will be the same as
|
|
81
|
-
* the `express` property; if HTTPS is enabled, it will be an `https` server; and if
|
|
82
|
-
* HTTP2 is enabled, it will be an `spdy` server.
|
|
83
|
-
*/
|
|
84
|
-
__publicField(this, "_server");
|
|
85
|
-
/**
|
|
86
|
-
* The instance of the server that is listening for requests.
|
|
87
|
-
*/
|
|
88
|
-
__publicField(this, "_instance");
|
|
89
|
-
/**
|
|
90
|
-
* A list of functions that implement controllers and middlewares. When the application
|
|
91
|
-
* starts, the queue will be processed and those controllers and middlewares will be
|
|
92
|
-
* added to the server instance. The reason they are not added directly like with a
|
|
93
|
-
* regular Express implementation is that services on Jimple use lazy loading, and
|
|
94
|
-
* adding middlewares and controllers as they come could cause errors if they depend on
|
|
95
|
-
* services that are not yet registered.
|
|
96
|
-
*/
|
|
97
|
-
__publicField(this, "_mountQueue", []);
|
|
98
|
-
/**
|
|
99
|
-
* A list with all the top routes controlled by the application. Every time a controller
|
|
100
|
-
* is mounted, its route will be added here.
|
|
101
|
-
*/
|
|
102
|
-
__publicField(this, "_controlledRoutes", []);
|
|
103
|
-
this._options = (0, import_deep_assign.deepAssignWithOverwrite)(
|
|
72
|
+
this._options = deepAssignWithOverwrite(
|
|
104
73
|
{
|
|
105
74
|
filesizeLimit: "15MB",
|
|
106
75
|
boot: true,
|
|
@@ -140,7 +109,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
140
109
|
options,
|
|
141
110
|
this._initOptions()
|
|
142
111
|
);
|
|
143
|
-
this._express = (
|
|
112
|
+
this._express = express();
|
|
144
113
|
this._setupCoreServices();
|
|
145
114
|
this._setupExpress();
|
|
146
115
|
this._configurePath();
|
|
@@ -321,7 +290,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
321
290
|
* The application customization options.
|
|
322
291
|
*/
|
|
323
292
|
get options() {
|
|
324
|
-
return
|
|
293
|
+
return deepAssignWithOverwrite({}, this._options);
|
|
325
294
|
}
|
|
326
295
|
/**
|
|
327
296
|
* Gets the events service.
|
|
@@ -348,7 +317,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
348
317
|
return this.eventsHub.on(eventName, listener);
|
|
349
318
|
}
|
|
350
319
|
/**
|
|
351
|
-
* Adds a listener for an application event that will only be
|
|
320
|
+
* Adds a listener for an application event that will only be executed once: the first
|
|
352
321
|
* time the event is triggered.
|
|
353
322
|
*
|
|
354
323
|
* @param eventName The name of the event to listen for.
|
|
@@ -361,7 +330,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
361
330
|
return this.eventsHub.once(eventName, listener);
|
|
362
331
|
}
|
|
363
332
|
/**
|
|
364
|
-
* Based on the application options, it returns
|
|
333
|
+
* Based on the application options, it returns whether the application is healthy or
|
|
365
334
|
* not.
|
|
366
335
|
*/
|
|
367
336
|
isHealthy() {
|
|
@@ -370,7 +339,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
370
339
|
/**
|
|
371
340
|
* This method is like a "lifecycle method", it gets executed on the constructor right
|
|
372
341
|
* before the "boot step". The idea is for the method to be a helper when the
|
|
373
|
-
* application is defined by
|
|
342
|
+
* application is defined by sub-classing {@link Jimpex}: the application could register
|
|
374
343
|
* all important services here and the routes on boot, then, if the implementation needs
|
|
375
344
|
* to access or overwrite a something, it can send `boot: false`, access/register what
|
|
376
345
|
* it needs, and then call `boot()`. That would be impossible for an application without
|
|
@@ -380,7 +349,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
380
349
|
}
|
|
381
350
|
/**
|
|
382
351
|
* It generates overwrites for the application options when it gets created. This method
|
|
383
|
-
* is a helper for when the application is defined by
|
|
352
|
+
* is a helper for when the application is defined by sub-classing {@link Jimpex}: It's
|
|
384
353
|
* highly probable that if the application needs to change the default options, it would
|
|
385
354
|
* want to do it right from the class, instead of having to do it on every
|
|
386
355
|
* implementation. A way to do it would be overwriting the constructor and calling
|
|
@@ -396,20 +365,20 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
396
365
|
*/
|
|
397
366
|
_setupCoreServices() {
|
|
398
367
|
this.register(
|
|
399
|
-
|
|
368
|
+
appLoggerProvider({
|
|
400
369
|
serviceName: "logger"
|
|
401
370
|
})
|
|
402
371
|
);
|
|
403
|
-
this.register(
|
|
404
|
-
this.register(
|
|
405
|
-
this.register(
|
|
406
|
-
this.register(
|
|
372
|
+
this.register(envUtilsProvider);
|
|
373
|
+
this.register(packageInfoProvider);
|
|
374
|
+
this.register(pathUtilsProvider);
|
|
375
|
+
this.register(rootFileProvider);
|
|
407
376
|
const { services: enabledServices } = this._options;
|
|
408
|
-
if (enabledServices.common) this.register(
|
|
409
|
-
if (enabledServices.http) this.register(
|
|
410
|
-
if (enabledServices.utils) this.register(
|
|
411
|
-
this.set("events", () => new
|
|
412
|
-
this.set("statuses", () =>
|
|
377
|
+
if (enabledServices.common) this.register(commonServicesProvider);
|
|
378
|
+
if (enabledServices.http) this.register(httpServicesProvider);
|
|
379
|
+
if (enabledServices.utils) this.register(utilsServicesProvider);
|
|
380
|
+
this.set("events", () => new EventsHub());
|
|
381
|
+
this.set("statuses", () => statuses);
|
|
413
382
|
}
|
|
414
383
|
/**
|
|
415
384
|
* Configures the Express application based on the class options.
|
|
@@ -423,30 +392,30 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
423
392
|
this._express.disable("x-powered-by");
|
|
424
393
|
}
|
|
425
394
|
if (expressOptions.compression) {
|
|
426
|
-
this._express.use((
|
|
395
|
+
this._express.use(compression());
|
|
427
396
|
}
|
|
428
397
|
if (statics.enabled) {
|
|
429
398
|
this._addStaticsFolder(statics.route, statics.folder, statics.onHome);
|
|
430
399
|
}
|
|
431
400
|
if (expressOptions.bodyParser) {
|
|
432
401
|
this._express.use(
|
|
433
|
-
|
|
402
|
+
bodyParser.json({
|
|
434
403
|
limit: filesizeLimit
|
|
435
404
|
})
|
|
436
405
|
);
|
|
437
406
|
this._express.use(
|
|
438
|
-
|
|
407
|
+
bodyParser.urlencoded({
|
|
439
408
|
extended: true,
|
|
440
409
|
limit: filesizeLimit
|
|
441
410
|
})
|
|
442
411
|
);
|
|
443
412
|
}
|
|
444
413
|
if (expressOptions.multer) {
|
|
445
|
-
this._express.use((
|
|
414
|
+
this._express.use(multer().any());
|
|
446
415
|
}
|
|
447
416
|
this.set(
|
|
448
417
|
"router",
|
|
449
|
-
this.factory(() =>
|
|
418
|
+
this.factory(() => express.Router())
|
|
450
419
|
);
|
|
451
420
|
}
|
|
452
421
|
/**
|
|
@@ -467,7 +436,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
467
436
|
const pathUtils = this.get("pathUtils");
|
|
468
437
|
const staticFolder = pathUtils.joinFrom(location, folder || staticRoute);
|
|
469
438
|
this.mount(`/${staticRoute}`, {
|
|
470
|
-
connect: () =>
|
|
439
|
+
connect: () => express.static(staticFolder),
|
|
471
440
|
controller: true
|
|
472
441
|
});
|
|
473
442
|
}
|
|
@@ -475,7 +444,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
475
444
|
* This helper method validates the `path` options in order to register the `app`
|
|
476
445
|
* location in the `pathUtils` service. The `app` location should be the path to where
|
|
477
446
|
* the application executable is located, but due to how ESM works, we can't infer it
|
|
478
|
-
* from the `module` object, so we need either
|
|
447
|
+
* from the `module` object, so we need either received as the `appPath` setting, or try
|
|
479
448
|
* to get it from the parent module.
|
|
480
449
|
*
|
|
481
450
|
* @throws If the method should use the path from the parent module, but can't find
|
|
@@ -497,7 +466,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
497
466
|
stackList.shift();
|
|
498
467
|
const parentFromStack = stackList.find((line) => !line.includes(__filename));
|
|
499
468
|
if (parentFromStack) {
|
|
500
|
-
const parentFile = parentFromStack.replace(/^.*?\s\(([^\s]+):\d+:\d+\)
|
|
469
|
+
const parentFile = parentFromStack.replace(/^.*?\s\(?([^\s]+):\d+:\d+\)?/, "$1");
|
|
501
470
|
if (parentFile !== parentFromStack) {
|
|
502
471
|
foundPath = true;
|
|
503
472
|
pathUtils.addLocation("app", path.dirname(parentFile));
|
|
@@ -530,7 +499,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
530
499
|
options.name
|
|
531
500
|
);
|
|
532
501
|
this.register(
|
|
533
|
-
|
|
502
|
+
simpleConfigProvider({
|
|
534
503
|
name: options.name,
|
|
535
504
|
defaultConfig: options.default,
|
|
536
505
|
defaultConfigFilename,
|
|
@@ -550,8 +519,8 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
550
519
|
* the application so they'll be available for all the services.
|
|
551
520
|
*/
|
|
552
521
|
async _loadESMModules() {
|
|
553
|
-
const { default: nodeFetch } = await
|
|
554
|
-
const { default: mime } = await
|
|
522
|
+
const { default: nodeFetch } = await tsAsyncImport("node-fetch");
|
|
523
|
+
const { default: mime } = await tsAsyncImport("mime");
|
|
555
524
|
this.set("node-fetch", () => nodeFetch);
|
|
556
525
|
this.set("mime", () => mime);
|
|
557
526
|
}
|
|
@@ -603,7 +572,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
603
572
|
keys.map(async (key) => {
|
|
604
573
|
const filepath = credentialsInfo[key];
|
|
605
574
|
if (!filepath) return void 0;
|
|
606
|
-
const file = await
|
|
575
|
+
const file = await fs.readFile(pathUtils.joinFrom(location, filepath), "utf8");
|
|
607
576
|
return {
|
|
608
577
|
key,
|
|
609
578
|
file
|
|
@@ -625,7 +594,7 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
625
594
|
* @returns {Server}
|
|
626
595
|
* @throws {Error} If HTTP2 is enabled but HTTPS is not.
|
|
627
596
|
* @throws {Error} If HTTPS is enabled but there's no `https.credentials` object.
|
|
628
|
-
* @throws {Error} If HTTPS is enabled and no
|
|
597
|
+
* @throws {Error} If HTTPS is enabled and no credentials are found.
|
|
629
598
|
* @access protected
|
|
630
599
|
* @ignore
|
|
631
600
|
*/
|
|
@@ -652,15 +621,15 @@ class Jimpex extends import_jimple.Jimple {
|
|
|
652
621
|
...credentials,
|
|
653
622
|
spdy: http2Config.spdy
|
|
654
623
|
};
|
|
655
|
-
|
|
624
|
+
const spdyModule = await tsAsyncImport("spdy");
|
|
625
|
+
return spdyModule.default.createServer(serverOptions, this._express);
|
|
656
626
|
}
|
|
657
|
-
return (
|
|
627
|
+
return createHTTPSServer(credentials, this._express);
|
|
658
628
|
}
|
|
659
629
|
}
|
|
660
630
|
const jimpex = (...args) => new Jimpex(...args);
|
|
661
|
-
|
|
662
|
-
0 && (module.exports = {
|
|
631
|
+
export {
|
|
663
632
|
Jimpex,
|
|
664
633
|
jimpex
|
|
665
|
-
}
|
|
634
|
+
};
|
|
666
635
|
//# sourceMappingURL=jimpex.js.map
|