jimpex 8.0.0 → 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 +13 -0
- package/README.md +2 -2
- package/dist/app/index.d.mts +14 -0
- package/dist/app/index.d.ts +5 -4
- package/dist/app/index.js +4 -0
- package/dist/app/jimpex.d.mts +14 -0
- package/dist/app/jimpex.d.ts +3 -2
- package/dist/app/jimpex.js +225 -0
- package/dist/app/jimpex.js.map +1 -1
- package/dist/controllers/common/config.d.mts +79 -0
- package/dist/controllers/common/config.d.ts +3 -2
- package/dist/controllers/common/config.js +18 -0
- package/dist/controllers/common/config.js.map +1 -1
- package/dist/controllers/common/health.d.mts +83 -0
- package/dist/controllers/common/health.d.ts +4 -3
- package/dist/controllers/common/health.js +18 -0
- package/dist/controllers/common/health.js.map +1 -1
- package/dist/controllers/common/index.d.mts +21 -0
- package/dist/controllers/common/index.d.ts +4 -4
- package/dist/controllers/common/index.js +6 -0
- package/dist/controllers/common/statics.d.mts +215 -0
- package/dist/controllers/common/statics.d.ts +4 -4
- package/dist/controllers/common/statics.js +51 -0
- package/dist/controllers/common/statics.js.map +1 -1
- package/dist/controllers/index.d.mts +24 -0
- package/dist/controllers/index.d.ts +4 -4
- package/dist/controllers/index.js +5 -0
- package/dist/controllers/utils/gateway.d.mts +725 -0
- package/dist/controllers/utils/gateway.d.ts +4 -3
- package/dist/controllers/utils/gateway.js +152 -0
- package/dist/controllers/utils/gateway.js.map +1 -1
- package/dist/controllers/utils/index.d.mts +17 -0
- package/dist/controllers/utils/index.d.ts +4 -3
- package/dist/controllers/utils/index.js +4 -0
- package/dist/esm/app/jimpex.js +222 -1
- package/dist/esm/app/jimpex.js.map +1 -1
- package/dist/esm/{chunk-T2T6Q22Z.js → chunk-2B2CG5KL.js} +1 -1
- package/dist/esm/controllers/common/config.js +19 -1
- package/dist/esm/controllers/common/config.js.map +1 -1
- package/dist/esm/controllers/common/health.js +19 -1
- package/dist/esm/controllers/common/health.js.map +1 -1
- package/dist/esm/controllers/common/statics.js +48 -1
- package/dist/esm/controllers/common/statics.js.map +1 -1
- package/dist/esm/controllers/utils/gateway.js +153 -1
- package/dist/esm/controllers/utils/gateway.js.map +1 -1
- package/dist/esm/middlewares/common/errorHandler.js +25 -1
- package/dist/esm/middlewares/common/errorHandler.js.map +1 -1
- package/dist/esm/middlewares/common/forceHTTPS.js +13 -1
- package/dist/esm/middlewares/common/forceHTTPS.js.map +1 -1
- package/dist/esm/middlewares/common/hsts.js +22 -1
- package/dist/esm/middlewares/common/hsts.js.map +1 -1
- package/dist/esm/middlewares/html/fastHTML.js +55 -1
- package/dist/esm/middlewares/html/fastHTML.js.map +1 -1
- package/dist/esm/middlewares/html/showHTML.js +33 -1
- package/dist/esm/middlewares/html/showHTML.js.map +1 -1
- package/dist/esm/middlewares/utils/versionValidator.js +35 -1
- package/dist/esm/middlewares/utils/versionValidator.js.map +1 -1
- package/dist/esm/services/common/appError.js +48 -2
- package/dist/esm/services/common/appError.js.map +1 -1
- package/dist/esm/services/common/httpError.js +10 -1
- package/dist/esm/services/common/httpError.js.map +1 -1
- package/dist/esm/services/common/index.js +1 -1
- package/dist/esm/services/common/sendFile.js +1 -1
- package/dist/esm/services/frontend/frontendFs.js +29 -1
- package/dist/esm/services/frontend/frontendFs.js.map +1 -1
- package/dist/esm/services/frontend/index.js +1 -1
- package/dist/esm/services/html/htmlGenerator.js +51 -1
- package/dist/esm/services/html/htmlGenerator.js.map +1 -1
- package/dist/esm/services/html/index.js +1 -1
- package/dist/esm/services/http/apiClient.js +27 -1
- package/dist/esm/services/http/apiClient.js.map +1 -1
- package/dist/esm/services/http/http.js +50 -1
- package/dist/esm/services/http/http.js.map +1 -1
- package/dist/esm/services/http/index.js +1 -1
- package/dist/esm/services/http/responsesBuilder.js +49 -2
- package/dist/esm/services/http/responsesBuilder.js.map +1 -1
- package/dist/esm/services/utils/ensureBearerToken.js +17 -1
- package/dist/esm/services/utils/ensureBearerToken.js.map +1 -1
- package/dist/esm/services/utils/index.js +1 -1
- package/dist/esm/utils/fns/others.js +1 -1
- package/dist/esm/utils/fns/routes.js +1 -1
- package/dist/esm/utils/fns/routes.js.map +1 -1
- package/dist/esm/utils/fns/statuses.js +1 -1
- package/dist/esm/utils/fns/text.js +1 -1
- package/dist/esm/utils/wrappers.js +1 -1
- package/dist/{jimpex-7eaee271.d.ts → index-b2a04c78.d.ts} +9 -5
- package/dist/index-efeb437e.d.ts +1282 -0
- package/dist/index.d.mts +46 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -0
- package/dist/middlewares/common/errorHandler.d.mts +132 -0
- package/dist/middlewares/common/errorHandler.d.ts +4 -3
- package/dist/middlewares/common/errorHandler.js +24 -0
- package/dist/middlewares/common/errorHandler.js.map +1 -1
- package/dist/middlewares/common/forceHTTPS.d.mts +69 -0
- package/dist/middlewares/common/forceHTTPS.d.ts +5 -4
- package/dist/middlewares/common/forceHTTPS.js +12 -0
- package/dist/middlewares/common/forceHTTPS.js.map +1 -1
- package/dist/middlewares/common/hsts.d.mts +110 -0
- package/dist/middlewares/common/hsts.d.ts +5 -4
- package/dist/middlewares/common/hsts.js +21 -0
- package/dist/middlewares/common/hsts.js.map +1 -1
- package/dist/middlewares/common/index.d.mts +22 -0
- package/dist/middlewares/common/index.d.ts +4 -3
- package/dist/middlewares/common/index.js +6 -0
- package/dist/middlewares/html/fastHTML.d.mts +180 -0
- package/dist/middlewares/html/fastHTML.d.ts +4 -4
- package/dist/middlewares/html/fastHTML.js +54 -0
- package/dist/middlewares/html/fastHTML.js.map +1 -1
- package/dist/middlewares/html/index.d.mts +21 -0
- package/dist/middlewares/html/index.d.ts +4 -4
- package/dist/middlewares/html/index.js +5 -0
- package/dist/middlewares/html/showHTML.d.mts +127 -0
- package/dist/middlewares/html/showHTML.d.ts +4 -4
- package/dist/middlewares/html/showHTML.js +32 -0
- package/dist/middlewares/html/showHTML.js.map +1 -1
- package/dist/middlewares/index.d.mts +30 -0
- package/dist/middlewares/index.d.ts +4 -4
- package/dist/middlewares/index.js +6 -0
- package/dist/middlewares/utils/index.d.mts +20 -0
- package/dist/middlewares/utils/index.d.ts +4 -3
- package/dist/middlewares/utils/index.js +4 -0
- package/dist/middlewares/utils/versionValidator.d.mts +215 -0
- package/dist/middlewares/utils/versionValidator.d.ts +4 -3
- package/dist/middlewares/utils/versionValidator.js +34 -0
- package/dist/middlewares/utils/versionValidator.js.map +1 -1
- package/dist/services/common/appError.d.mts +139 -0
- package/dist/services/common/appError.d.ts +4 -3
- package/dist/services/common/appError.js +47 -1
- package/dist/services/common/appError.js.map +1 -1
- package/dist/services/common/httpError.d.mts +80 -0
- package/dist/services/common/httpError.d.ts +4 -3
- package/dist/services/common/httpError.js +9 -0
- package/dist/services/common/httpError.js.map +1 -1
- package/dist/services/common/index.d.mts +47 -0
- package/dist/services/common/index.d.ts +4 -4
- package/dist/services/common/index.js +4 -1
- package/dist/services/common/sendFile.d.mts +102 -0
- package/dist/services/common/sendFile.d.ts +3 -3
- package/dist/services/frontend/frontendFs.d.mts +96 -0
- package/dist/services/frontend/frontendFs.d.ts +3 -3
- package/dist/services/frontend/frontendFs.js +32 -0
- package/dist/services/frontend/frontendFs.js.map +1 -1
- package/dist/services/frontend/index.d.mts +40 -0
- package/dist/services/frontend/index.d.ts +4 -4
- package/dist/services/frontend/index.js +2 -1
- package/dist/services/html/htmlGenerator.d.mts +237 -0
- package/dist/services/html/htmlGenerator.d.ts +2 -2
- package/dist/services/html/htmlGenerator.js +50 -0
- package/dist/services/html/htmlGenerator.js.map +1 -1
- package/dist/services/html/index.d.mts +43 -0
- package/dist/services/html/index.d.ts +4 -4
- package/dist/services/html/index.js +2 -1
- package/dist/services/http/apiClient.d.mts +170 -0
- package/dist/services/http/apiClient.d.ts +4 -3
- package/dist/services/http/apiClient.js +26 -0
- package/dist/services/http/apiClient.js.map +1 -1
- package/dist/services/http/http.d.mts +176 -0
- package/dist/services/http/http.d.ts +4 -3
- package/dist/services/http/http.js +53 -0
- package/dist/services/http/http.js.map +1 -1
- package/dist/services/http/index.d.mts +51 -0
- package/dist/services/http/index.d.ts +4 -3
- package/dist/services/http/index.js +4 -1
- package/dist/services/http/responsesBuilder.d.mts +179 -0
- package/dist/services/http/responsesBuilder.d.ts +3 -2
- package/dist/services/http/responsesBuilder.js +48 -1
- package/dist/services/http/responsesBuilder.js.map +1 -1
- package/dist/services/index.d.mts +33 -0
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.js +8 -0
- package/dist/services/utils/ensureBearerToken.d.mts +158 -0
- package/dist/services/utils/ensureBearerToken.d.ts +5 -4
- package/dist/services/utils/ensureBearerToken.js +16 -0
- package/dist/services/utils/ensureBearerToken.js.map +1 -1
- package/dist/services/utils/index.d.mts +44 -0
- package/dist/services/utils/index.d.ts +4 -3
- package/dist/services/utils/index.js +2 -1
- package/dist/types/events.d.mts +14 -0
- package/dist/types/events.d.ts +5 -4
- package/dist/types/express.d.mts +10 -0
- package/dist/types/http.d.mts +79 -0
- package/dist/types/index.d.mts +14 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +9 -0
- package/dist/types/options.d.mts +14 -0
- package/dist/types/options.d.ts +4 -3
- package/dist/types/utils.d.mts +48 -0
- package/dist/types/wootils.d.mts +4 -0
- package/dist/utils/fns/index.d.mts +5 -0
- package/dist/utils/fns/index.js +7 -0
- package/dist/utils/fns/others.d.mts +17 -0
- package/dist/utils/fns/routes.d.mts +39 -0
- package/dist/utils/fns/routes.js.map +1 -1
- package/dist/utils/fns/statuses.d.mts +45 -0
- package/dist/utils/fns/statuses.js +4 -0
- package/dist/utils/fns/statuses.js.map +1 -1
- package/dist/utils/fns/text.d.mts +9 -0
- package/dist/utils/index.d.mts +19 -0
- package/dist/utils/index.d.ts +5 -4
- package/dist/utils/index.js +5 -0
- package/dist/utils/wrappers.d.mts +14 -0
- package/dist/utils/wrappers.d.ts +4 -3
- package/package.json +43 -43
- /package/dist/esm/{chunk-T2T6Q22Z.js.map → chunk-2B2CG5KL.js.map} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/fns/routes.ts"],"sourcesContent":["import { escapeForRegExp } from './text';\n\n/**\n * Removes any leading slash from a URL.\n *\n * @param url The URL to format.\n * @group Utilities\n */\nexport const removeLeadingSlash = (url: string): string => url.replace(/^\\/+/, '');\n/**\n * Removes any trailing slash from a URL.\n *\n * @param url The URL to format.\n * @group Utilities\n */\nexport const removeTrailingSlash = (url: string): string => url.replace(/\\/+$/, '');\n/**\n * Remove any leading and trailing slash from a URL.\n *\n * @param url The URL to format.\n * @param leading Whether or not to remove any leading slash.\n * @param trailing Whether or not to remove the trailing slash.\n * @group Utilities\n */\nexport const removeSlashes = (\n url: string,\n leading: boolean = true,\n trailing: boolean = true,\n) => {\n const newUrl = leading ? removeLeadingSlash(url) : url;\n return trailing ? removeTrailingSlash(newUrl) : newUrl;\n};\n\n/**\n * Given a server route definition, this function creates a regular expression to match\n * it: The expression replaces the routes parameters with placeholders so it can be\n * compared with real routes.\n *\n * @param route The route from which the expression will be created.\n * @param leadingSlash Whether or not the expression should match a leading slash.\n * @param trailingSlash Whether or not the expression should match a trailing slash.\n * The reason this is `false` by default is because these\n * expressions are often used to match against incoming requests,\n * and they don't have a trailing slash.\n * @group Utilities\n */\nexport const createRouteExpression = (\n route: string,\n leadingSlash: boolean = true,\n trailingSlash: boolean = false,\n): RegExp => {\n let expression = removeSlashes(route)\n .split('/')\n .map((part) => (part.startsWith(':') ? '(?:([^\\\\/]+?))' : escapeForRegExp(part)))\n .join('\\\\/');\n if (leadingSlash) {\n expression = `\\\\/${expression}`;\n }\n if (trailingSlash) {\n expression = `${expression}\\\\/`;\n }\n\n return new RegExp(expression);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAQzB,MAAM,qBAAqB,CAAC,QAAwB,IAAI,QAAQ,QAAQ,EAAE;AAO1E,MAAM,sBAAsB,CAAC,QAAwB,IAAI,QAAQ,QAAQ,EAAE;AAS3E,MAAM,gBAAgB,CAC3B,KACA,UAAmB,MACnB,WAAoB,SACjB;AACH,QAAM,SAAS,UAAU,mBAAmB,GAAG,IAAI;AACnD,SAAO,WAAW,oBAAoB,MAAM,IAAI;AAClD;AAeO,MAAM,wBAAwB,CACnC,OACA,eAAwB,MACxB,gBAAyB,UACd;AACX,MAAI,aAAa,cAAc,KAAK,EACjC,MAAM,GAAG,EACT,IAAI,CAAC,SAAU,KAAK,WAAW,GAAG,IAAI,uBAAmB,6BAAgB,IAAI,CAAE,EAC/E,KAAK,KAAK;AACb,MAAI,cAAc;AAChB,iBAAa,MAAM;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/fns/routes.ts"],"sourcesContent":["import { escapeForRegExp } from './text';\n\n/**\n * Removes any leading slash from a URL.\n *\n * @param url The URL to format.\n * @group Utilities\n */\nexport const removeLeadingSlash = (url: string): string => url.replace(/^\\/+/, '');\n/**\n * Removes any trailing slash from a URL.\n *\n * @param url The URL to format.\n * @group Utilities\n */\nexport const removeTrailingSlash = (url: string): string => url.replace(/\\/+$/, '');\n/**\n * Remove any leading and trailing slash from a URL.\n *\n * @param url The URL to format.\n * @param leading Whether or not to remove any leading slash.\n * @param trailing Whether or not to remove the trailing slash.\n * @group Utilities\n */\nexport const removeSlashes = (\n url: string,\n leading: boolean = true,\n trailing: boolean = true,\n) => {\n const newUrl = leading ? removeLeadingSlash(url) : url;\n return trailing ? removeTrailingSlash(newUrl) : newUrl;\n};\n\n/**\n * Given a server route definition, this function creates a regular expression to match\n * it: The expression replaces the routes parameters with placeholders so it can be\n * compared with real routes.\n *\n * @param route The route from which the expression will be created.\n * @param leadingSlash Whether or not the expression should match a leading slash.\n * @param trailingSlash Whether or not the expression should match a trailing slash.\n * The reason this is `false` by default is because these\n * expressions are often used to match against incoming requests,\n * and they don't have a trailing slash.\n * @group Utilities\n */\nexport const createRouteExpression = (\n route: string,\n leadingSlash: boolean = true,\n trailingSlash: boolean = false,\n): RegExp => {\n let expression = removeSlashes(route)\n .split('/')\n .map((part) => (part.startsWith(':') ? '(?:([^\\\\/]+?))' : escapeForRegExp(part)))\n .join('\\\\/');\n if (leadingSlash) {\n expression = `\\\\/${expression}`;\n }\n if (trailingSlash) {\n expression = `${expression}\\\\/`;\n }\n\n return new RegExp(expression);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAQzB,MAAM,qBAAqB,CAAC,QAAwB,IAAI,QAAQ,QAAQ,EAAE;AAO1E,MAAM,sBAAsB,CAAC,QAAwB,IAAI,QAAQ,QAAQ,EAAE;AAS3E,MAAM,gBAAgB,CAC3B,KACA,UAAmB,MACnB,WAAoB,SACjB;AACH,QAAM,SAAS,UAAU,mBAAmB,GAAG,IAAI;AACnD,SAAO,WAAW,oBAAoB,MAAM,IAAI;AAClD;AAeO,MAAM,wBAAwB,CACnC,OACA,eAAwB,MACxB,gBAAyB,UACd;AACX,MAAI,aAAa,cAAc,KAAK,EACjC,MAAM,GAAG,EACT,IAAI,CAAC,SAAU,KAAK,WAAW,GAAG,IAAI,uBAAmB,6BAAgB,IAAI,CAAE,EAC/E,KAAK,KAAK;AACb,MAAI,cAAc;AAChB,iBAAa,MAAM,UAAU;AAAA,EAC/B;AACA,MAAI,eAAe;AACjB,iBAAa,GAAG,UAAU;AAAA,EAC5B;AAEA,SAAO,IAAI,OAAO,UAAU;AAC9B;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { Statuses };
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/fns/statuses.ts"],"sourcesContent":["import statuses from 'statuses';\n/**\n * The type definitions for the `statuses` library.\n *\n * While the library has type definitions, TypeScript throws an error that they can't be\n * exported, so that's why they are copied in there.\n */\nexport type Statuses = {\n /**\n * Given a status code, returns the status text, and given a status text, returns the\n * status code.\n *\n * @param code The status code or status text to look up.\n * @throws If the status is invalid.\n */\n (code: number | string): number | string;\n /**\n * A list of all the supported status codes.\n */\n codes: number[];\n /**\n * A dictionary with the status texts and their corresponding status codes.\n */\n code: Record<string, number | undefined>;\n /**\n * A dictionary with the status codes and their corresponding status texts, for\n * responses that expect an empty body.\n */\n empty: Record<number, boolean | undefined>;\n /**\n * A dictionary with the status codes and their corresponding status texts.\n */\n message: Record<number, string | undefined>;\n /**\n * A dictionary with status codes for responses that are valid for redirections.\n */\n redirect: Record<number, boolean | undefined>;\n /**\n * A dictionary with status codes that should be retried.\n */\n retry: Record<number, boolean | undefined>;\n};\n\nexport { statuses };\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/fns/statuses.ts"],"sourcesContent":["import statuses from 'statuses';\n/**\n * The type definitions for the `statuses` library.\n *\n * While the library has type definitions, TypeScript throws an error that they can't be\n * exported, so that's why they are copied in there.\n */\nexport type Statuses = {\n /**\n * Given a status code, returns the status text, and given a status text, returns the\n * status code.\n *\n * @param code The status code or status text to look up.\n * @throws If the status is invalid.\n */\n (code: number | string): number | string;\n /**\n * A list of all the supported status codes.\n */\n codes: number[];\n /**\n * A dictionary with the status texts and their corresponding status codes.\n */\n code: Record<string, number | undefined>;\n /**\n * A dictionary with the status codes and their corresponding status texts, for\n * responses that expect an empty body.\n */\n empty: Record<number, boolean | undefined>;\n /**\n * A dictionary with the status codes and their corresponding status texts.\n */\n message: Record<number, string | undefined>;\n /**\n * A dictionary with status codes for responses that are valid for redirections.\n */\n redirect: Record<number, boolean | undefined>;\n /**\n * A dictionary with status codes that should be retried.\n */\n retry: Record<number, boolean | undefined>;\n};\n\nexport { statuses };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kCAAAA;AAAA;AAAA;AAAA,sBAAqB;","names":["statuses"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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-efeb437e.js';
|
|
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';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,10 +2,8 @@ export { notUndefined } from './fns/others.js';
|
|
|
2
2
|
export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash } from './fns/routes.js';
|
|
3
3
|
export { Statuses } from './fns/statuses.js';
|
|
4
4
|
export { escapeForRegExp } from './fns/text.js';
|
|
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 '../
|
|
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-b2a04c78.js';
|
|
6
6
|
export { default as statuses } from 'statuses';
|
|
7
|
-
import '@homer0/jimple';
|
|
8
|
-
import '@homer0/events-hub';
|
|
9
7
|
import '../types/express.js';
|
|
10
8
|
import 'express';
|
|
11
9
|
import '../types/http.js';
|
|
@@ -13,6 +11,9 @@ import 'https';
|
|
|
13
11
|
import 'http';
|
|
14
12
|
import 'spdy';
|
|
15
13
|
import 'node-fetch';
|
|
16
|
-
import '@homer0/simple-config';
|
|
17
14
|
import '../types/utils.js';
|
|
15
|
+
import '@homer0/path-utils';
|
|
18
16
|
import '@homer0/simple-logger';
|
|
17
|
+
import '@homer0/simple-config';
|
|
18
|
+
import '@homer0/events-hub';
|
|
19
|
+
import '@homer0/jimple';
|
package/dist/utils/index.js
CHANGED
|
@@ -17,4 +17,9 @@ var utils_exports = {};
|
|
|
17
17
|
module.exports = __toCommonJS(utils_exports);
|
|
18
18
|
__reExport(utils_exports, require("./fns"), module.exports);
|
|
19
19
|
__reExport(utils_exports, require("./wrappers"), module.exports);
|
|
20
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require("./fns"),
|
|
23
|
+
...require("./wrappers")
|
|
24
|
+
});
|
|
20
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
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-efeb437e.js';
|
|
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';
|
package/dist/utils/wrappers.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
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 '../
|
|
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-b2a04c78.js';
|
|
3
3
|
import '../types/express.js';
|
|
4
4
|
import '../types/utils.js';
|
|
5
5
|
import 'express';
|
|
6
|
-
import '@homer0/events-hub';
|
|
7
6
|
import '../types/http.js';
|
|
8
7
|
import 'https';
|
|
9
8
|
import 'http';
|
|
10
9
|
import 'spdy';
|
|
11
10
|
import 'node-fetch';
|
|
12
|
-
import '@homer0/
|
|
11
|
+
import '@homer0/path-utils';
|
|
13
12
|
import '@homer0/simple-logger';
|
|
13
|
+
import '@homer0/simple-config';
|
|
14
|
+
import '@homer0/events-hub';
|
package/package.json
CHANGED
|
@@ -2,67 +2,67 @@
|
|
|
2
2
|
"name": "jimpex",
|
|
3
3
|
"description": "Express as dependency injection container.",
|
|
4
4
|
"homepage": "https://homer0.github.io/jimpex/",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "9.0.0",
|
|
6
6
|
"repository": "homer0/jimpex",
|
|
7
7
|
"author": "Leonardo Apiwan (@homer0) <me@homer0.com>",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@homer0/api-utils": "^
|
|
11
|
-
"@homer0/deep-assign": "^
|
|
12
|
-
"@homer0/deferred": "^
|
|
13
|
-
"@homer0/env-utils": "^
|
|
14
|
-
"@homer0/events-hub": "^
|
|
15
|
-
"@homer0/jimple": "^
|
|
16
|
-
"@homer0/object-utils": "^
|
|
17
|
-
"@homer0/package-info": "^
|
|
18
|
-
"@homer0/path-utils": "^
|
|
19
|
-
"@homer0/root-file": "^
|
|
20
|
-
"@homer0/simple-logger": "^
|
|
21
|
-
"@homer0/simple-config": "^
|
|
10
|
+
"@homer0/api-utils": "^3.0.0",
|
|
11
|
+
"@homer0/deep-assign": "^3.0.0",
|
|
12
|
+
"@homer0/deferred": "^3.0.0",
|
|
13
|
+
"@homer0/env-utils": "^3.0.0",
|
|
14
|
+
"@homer0/events-hub": "^3.0.0",
|
|
15
|
+
"@homer0/jimple": "^3.0.0",
|
|
16
|
+
"@homer0/object-utils": "^3.0.0",
|
|
17
|
+
"@homer0/package-info": "^3.0.0",
|
|
18
|
+
"@homer0/path-utils": "^3.0.0",
|
|
19
|
+
"@homer0/root-file": "^3.0.0",
|
|
20
|
+
"@homer0/simple-logger": "^3.0.0",
|
|
21
|
+
"@homer0/simple-config": "^3.0.0",
|
|
22
22
|
"express": "^4.18.2",
|
|
23
|
-
"body-parser": "^1.20.
|
|
23
|
+
"body-parser": "^1.20.2",
|
|
24
24
|
"compression": "^1.7.4",
|
|
25
|
-
"node-fetch": "^2.
|
|
25
|
+
"node-fetch": "^2.7.0",
|
|
26
26
|
"urijs": "^1.19.11",
|
|
27
27
|
"statuses": "^2.0.1",
|
|
28
|
-
"multer": "
|
|
28
|
+
"multer": "1.4.5-lts.1",
|
|
29
29
|
"mime": "^3.0.0",
|
|
30
30
|
"spdy": "^4.0.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@commitlint/cli": "^17.
|
|
34
|
-
"@commitlint/config-conventional": "^17.
|
|
35
|
-
"@homer0/eslint-plugin": "^
|
|
36
|
-
"@homer0/prettier-config": "^1.1.
|
|
37
|
-
"@homer0/prettier-plugin-jsdoc": "^
|
|
38
|
-
"@homer0/tsconfig": "^1.0.
|
|
39
|
-
"@semantic-release/changelog": "^6.0.
|
|
33
|
+
"@commitlint/cli": "^17.7.2",
|
|
34
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
35
|
+
"@homer0/eslint-plugin": "^12.0.0",
|
|
36
|
+
"@homer0/prettier-config": "^1.1.3",
|
|
37
|
+
"@homer0/prettier-plugin-jsdoc": "^7.0.3",
|
|
38
|
+
"@homer0/tsconfig": "^1.0.12",
|
|
39
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
40
40
|
"@semantic-release/git": "^10.0.1",
|
|
41
|
-
"@types/body-parser": "^1.19.
|
|
42
|
-
"@types/compression": "^1.7.
|
|
43
|
-
"@types/express": "^4.17.
|
|
44
|
-
"@types/multer": "^1.4.
|
|
45
|
-
"@types/mime": "^3.0.
|
|
46
|
-
"@types/node-fetch": "^2.6.
|
|
47
|
-
"@types/spdy": "^3.4.
|
|
48
|
-
"@types/statuses": "^2.0.
|
|
49
|
-
"@types/urijs": "^1.19.
|
|
50
|
-
"eslint": "^8.
|
|
41
|
+
"@types/body-parser": "^1.19.3",
|
|
42
|
+
"@types/compression": "^1.7.3",
|
|
43
|
+
"@types/express": "^4.17.18",
|
|
44
|
+
"@types/multer": "^1.4.8",
|
|
45
|
+
"@types/mime": "^3.0.2",
|
|
46
|
+
"@types/node-fetch": "^2.6.6",
|
|
47
|
+
"@types/spdy": "^3.4.6",
|
|
48
|
+
"@types/statuses": "^2.0.2",
|
|
49
|
+
"@types/urijs": "^1.19.20",
|
|
50
|
+
"eslint": "^8.50.0",
|
|
51
51
|
"is-ci": "^3.0.1",
|
|
52
|
-
"jest": "^29.
|
|
53
|
-
"leasot": "^13.
|
|
54
|
-
"lint-staged": "^
|
|
55
|
-
"husky": "^8.0.
|
|
56
|
-
"semantic-release": "^
|
|
57
|
-
"ts-jest": "^29.
|
|
52
|
+
"jest": "^29.7.0",
|
|
53
|
+
"leasot": "^13.3.0",
|
|
54
|
+
"lint-staged": "^14.0.1",
|
|
55
|
+
"husky": "^8.0.3",
|
|
56
|
+
"semantic-release": "^22.0.5",
|
|
57
|
+
"ts-jest": "^29.1.1",
|
|
58
58
|
"ts-node-dev": "^2.0.0",
|
|
59
|
-
"tsup": "^
|
|
60
|
-
"typedoc": "0.
|
|
61
|
-
"typescript": "^
|
|
59
|
+
"tsup": "^7.2.0",
|
|
60
|
+
"typedoc": "0.25.1",
|
|
61
|
+
"typescript": "^5.2.2"
|
|
62
62
|
},
|
|
63
63
|
"engine-strict": true,
|
|
64
64
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
65
|
+
"node": ">=18.17 <21"
|
|
66
66
|
},
|
|
67
67
|
"main": "./dist/index.js",
|
|
68
68
|
"module": "./dist/esm/index.js",
|
|
File without changes
|