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/dist/types/http.d.mts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
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 NodeFetchFn from 'node-fetch';
|
|
7
|
-
export { Response as HTTPResponse } from 'node-fetch';
|
|
8
|
-
import { Express } from 'express';
|
|
9
|
-
|
|
10
|
-
type NodeFetch = typeof NodeFetchFn;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @group Jimpex
|
|
14
|
-
*/
|
|
15
|
-
type JimpexServer = Express | Server;
|
|
16
|
-
/**
|
|
17
|
-
* @group Jimpex
|
|
18
|
-
*/
|
|
19
|
-
type JimpexServerInstance = Server$1 | Server;
|
|
20
|
-
/**
|
|
21
|
-
* The paths to the SSL credentials. Depending on the application options, they can be
|
|
22
|
-
* relative to the project root, or the application executable, but they can't be
|
|
23
|
-
* absolute.
|
|
24
|
-
*
|
|
25
|
-
* @group Jimpex
|
|
26
|
-
*/
|
|
27
|
-
type JimpexHTTPSCredentials = {
|
|
28
|
-
/**
|
|
29
|
-
* The path to the certificate authority file.
|
|
30
|
-
*/
|
|
31
|
-
ca?: string;
|
|
32
|
-
/**
|
|
33
|
-
* The path to the certificate file.
|
|
34
|
-
*/
|
|
35
|
-
cert?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The path to the key file.
|
|
38
|
-
*/
|
|
39
|
-
key?: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* The options to enable HTTP2.
|
|
43
|
-
*
|
|
44
|
-
* @group Jimpex
|
|
45
|
-
*/
|
|
46
|
-
type JimpexHTTP2Options = {
|
|
47
|
-
/**
|
|
48
|
-
* Whether or not to enable HTTP2.
|
|
49
|
-
*/
|
|
50
|
-
enabled?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Custom options for the Spdy server.
|
|
53
|
-
*
|
|
54
|
-
* @see {@link https://github.com/spdy-http2/node-spdy#options}
|
|
55
|
-
*/
|
|
56
|
-
spdy?: ServerOptions['spdy'];
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* The options to enable HTTPS.
|
|
60
|
-
*
|
|
61
|
-
* @group Jimpex
|
|
62
|
-
*/
|
|
63
|
-
type JimpexHTTPSOptions = {
|
|
64
|
-
/**
|
|
65
|
-
* Whether or not to enable HTTPS.
|
|
66
|
-
*/
|
|
67
|
-
enabled?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* The SSL credentials, and their location.
|
|
70
|
-
*/
|
|
71
|
-
credentials?: JimpexHTTPSCredentials & {
|
|
72
|
-
/**
|
|
73
|
-
* If `true`, the credentials will be located relative to the project root, otherwise,
|
|
74
|
-
* they will be located relative to the application executable.
|
|
75
|
-
*
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
onHome?: boolean;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export type { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance, NodeFetch };
|
package/dist/types/index.d.mts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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-Bwf7JHu9.mjs';
|
|
2
|
-
export { AsyncExpressMiddleware, ExpressErrorHandler, ExpressMiddleware, ExpressMiddlewareLike, RouterMethod } from './express.mjs';
|
|
3
|
-
export { JimpexHTTP2Options, JimpexHTTPSCredentials, JimpexHTTPSOptions, JimpexServer, JimpexServerInstance, NodeFetch } 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';
|
package/dist/types/options.d.mts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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-Bwf7JHu9.mjs';
|
|
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';
|
package/dist/types/utils.d.mts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
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 type { DeepPartial, DeepReadonly, Dict, NoStringIndex };
|
package/dist/types/wootils.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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';
|
|
@@ -1,17 +0,0 @@
|
|
|
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 };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Removes any leading slash from a URL.
|
|
3
|
-
*
|
|
4
|
-
* @param url The URL to format.
|
|
5
|
-
* @group Utilities
|
|
6
|
-
*/
|
|
7
|
-
declare const removeLeadingSlash: (url: string) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Removes any trailing slash from a URL.
|
|
10
|
-
*
|
|
11
|
-
* @param url The URL to format.
|
|
12
|
-
* @group Utilities
|
|
13
|
-
*/
|
|
14
|
-
declare const removeTrailingSlash: (url: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Remove any leading and trailing slash from a URL.
|
|
17
|
-
*
|
|
18
|
-
* @param url The URL to format.
|
|
19
|
-
* @param leading Whether or not to remove any leading slash.
|
|
20
|
-
* @param trailing Whether or not to remove the trailing slash.
|
|
21
|
-
* @group Utilities
|
|
22
|
-
*/
|
|
23
|
-
declare const removeSlashes: (url: string, leading?: boolean, trailing?: boolean) => string;
|
|
24
|
-
/**
|
|
25
|
-
* Given a server route definition, this function creates a regular expression to match
|
|
26
|
-
* it: The expression replaces the routes parameters with placeholders so it can be
|
|
27
|
-
* compared with real routes.
|
|
28
|
-
*
|
|
29
|
-
* @param route The route from which the expression will be created.
|
|
30
|
-
* @param leadingSlash Whether or not the expression should match a leading slash.
|
|
31
|
-
* @param trailingSlash Whether or not the expression should match a trailing slash.
|
|
32
|
-
* The reason this is `false` by default is because these
|
|
33
|
-
* expressions are often used to match against incoming requests,
|
|
34
|
-
* and they don't have a trailing slash.
|
|
35
|
-
* @group Utilities
|
|
36
|
-
*/
|
|
37
|
-
declare const createRouteExpression: (route: string, leadingSlash?: boolean, trailingSlash?: boolean) => RegExp;
|
|
38
|
-
|
|
39
|
-
export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export { default as statuses } from 'statuses';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The type definitions for the `statuses` library.
|
|
5
|
-
*
|
|
6
|
-
* While the library has type definitions, TypeScript throws an error that they can't be
|
|
7
|
-
* exported, so that's why they are copied in there.
|
|
8
|
-
*/
|
|
9
|
-
type Statuses = {
|
|
10
|
-
/**
|
|
11
|
-
* Given a status code, returns the status text, and given a status text, returns the
|
|
12
|
-
* status code.
|
|
13
|
-
*
|
|
14
|
-
* @param code The status code or status text to look up.
|
|
15
|
-
* @throws If the status is invalid.
|
|
16
|
-
*/
|
|
17
|
-
(code: number | string): number | string;
|
|
18
|
-
/**
|
|
19
|
-
* A list of all the supported status codes.
|
|
20
|
-
*/
|
|
21
|
-
codes: number[];
|
|
22
|
-
/**
|
|
23
|
-
* A dictionary with the status texts and their corresponding status codes.
|
|
24
|
-
*/
|
|
25
|
-
code: Record<string, number | undefined>;
|
|
26
|
-
/**
|
|
27
|
-
* A dictionary with the status codes and their corresponding status texts, for
|
|
28
|
-
* responses that expect an empty body.
|
|
29
|
-
*/
|
|
30
|
-
empty: Record<number, boolean | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
* A dictionary with the status codes and their corresponding status texts.
|
|
33
|
-
*/
|
|
34
|
-
message: Record<number, string | undefined>;
|
|
35
|
-
/**
|
|
36
|
-
* A dictionary with status codes for responses that are valid for redirections.
|
|
37
|
-
*/
|
|
38
|
-
redirect: Record<number, boolean | undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* A dictionary with status codes that should be retried.
|
|
41
|
-
*/
|
|
42
|
-
retry: Record<number, boolean | undefined>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export type { Statuses };
|
package/dist/utils/index.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { notUndefined } from './fns/others.mjs';
|
|
2
|
-
export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash } from './fns/routes.mjs';
|
|
3
|
-
export { Statuses } from './fns/statuses.mjs';
|
|
4
|
-
export { escapeForRegExp } from './fns/text.mjs';
|
|
5
|
-
export { H as Controller, C as ControllerConnectFn, I as ControllerCreator, F as ControllerCreatorFn, a2 as ControllerLike, O as ControllerProvider, Q as ControllerProviderCreator, M as ControllerProviderCreatorFn, K as ControllerProviderRegisterFn, V as Middleware, R as MiddlewareConnectFn, W as MiddlewareCreator, T as MiddlewareCreatorFn, a1 as MiddlewareLike, $ as MiddlewareProvider, a0 as MiddlewareProviderCreator, Z as MiddlewareProviderCreatorFn, X as MiddlewareProviderRegisterFn, y as Provider, z as ProviderCreator, B as ProviderLike, P as ProviderRegisterFn, A as Providers, D as controller, G as controllerCreator, L as controllerProvider, N as controllerProviderCreator, S as middleware, U as middlewareCreator, Y as middlewareProvider, _ as middlewareProviderCreator, v as provider, w as providerCreator, x as providers } from '../index-Bwf7JHu9.mjs';
|
|
6
|
-
export { default as statuses } from 'statuses';
|
|
7
|
-
import '../types/express.mjs';
|
|
8
|
-
import 'express';
|
|
9
|
-
import '../types/http.mjs';
|
|
10
|
-
import 'https';
|
|
11
|
-
import 'http';
|
|
12
|
-
import 'spdy';
|
|
13
|
-
import 'node-fetch';
|
|
14
|
-
import '../types/utils.mjs';
|
|
15
|
-
import '@homer0/path-utils';
|
|
16
|
-
import '@homer0/simple-logger';
|
|
17
|
-
import '@homer0/simple-config';
|
|
18
|
-
import '@homer0/events-hub';
|
|
19
|
-
import '@homer0/jimple';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@homer0/jimple';
|
|
2
|
-
export { H as Controller, C as ControllerConnectFn, I as ControllerCreator, F as ControllerCreatorFn, a2 as ControllerLike, O as ControllerProvider, Q as ControllerProviderCreator, M as ControllerProviderCreatorFn, K as ControllerProviderRegisterFn, V as Middleware, R as MiddlewareConnectFn, W as MiddlewareCreator, T as MiddlewareCreatorFn, a1 as MiddlewareLike, $ as MiddlewareProvider, a0 as MiddlewareProviderCreator, Z as MiddlewareProviderCreatorFn, X as MiddlewareProviderRegisterFn, y as Provider, z as ProviderCreator, B as ProviderLike, P as ProviderRegisterFn, A as Providers, D as controller, G as controllerCreator, L as controllerProvider, N as controllerProviderCreator, S as middleware, U as middlewareCreator, Y as middlewareProvider, _ as middlewareProviderCreator, v as provider, w as providerCreator, x as providers } from '../index-Bwf7JHu9.mjs';
|
|
3
|
-
import '../types/express.mjs';
|
|
4
|
-
import '../types/utils.mjs';
|
|
5
|
-
import 'express';
|
|
6
|
-
import '../types/http.mjs';
|
|
7
|
-
import 'https';
|
|
8
|
-
import 'http';
|
|
9
|
-
import 'spdy';
|
|
10
|
-
import 'node-fetch';
|
|
11
|
-
import '@homer0/path-utils';
|
|
12
|
-
import '@homer0/simple-logger';
|
|
13
|
-
import '@homer0/simple-config';
|
|
14
|
-
import '@homer0/events-hub';
|