@visulima/api-platform 4.0.0-alpha.7 → 4.0.0-alpha.9
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 +32 -0
- package/LICENSE.md +109 -0
- package/dist/connect/create-node-router.d.cts +24 -0
- package/dist/connect/create-node-router.d.mts +24 -0
- package/dist/connect/create-node-router.d.ts +24 -0
- package/dist/connect/handler.d.cts +5 -0
- package/dist/connect/handler.d.mts +5 -0
- package/dist/connect/handler.d.ts +5 -0
- package/dist/connect/middleware/cors-middleware.d.cts +5 -0
- package/dist/connect/middleware/cors-middleware.d.mts +5 -0
- package/dist/connect/middleware/cors-middleware.d.ts +5 -0
- package/dist/connect/middleware/http-header-normalizer.d.cts +12 -0
- package/dist/connect/middleware/http-header-normalizer.d.mts +12 -0
- package/dist/connect/middleware/http-header-normalizer.d.ts +12 -0
- package/dist/connect/middleware/rate-limiter-middleware.d.cts +7 -0
- package/dist/connect/middleware/rate-limiter-middleware.d.mts +7 -0
- package/dist/connect/middleware/rate-limiter-middleware.d.ts +7 -0
- package/dist/connect/middleware/serializers-middleware.d.cts +6 -0
- package/dist/connect/middleware/serializers-middleware.d.mts +6 -0
- package/dist/connect/middleware/serializers-middleware.d.ts +6 -0
- package/dist/error-handler/jsonapi-error-handler.d.cts +3 -0
- package/dist/error-handler/jsonapi-error-handler.d.mts +3 -0
- package/dist/error-handler/jsonapi-error-handler.d.ts +3 -0
- package/dist/error-handler/problem-error-handler.d.cts +7 -0
- package/dist/error-handler/problem-error-handler.d.mts +7 -0
- package/dist/error-handler/problem-error-handler.d.ts +7 -0
- package/dist/error-handler/utils.d.cts +9 -0
- package/dist/error-handler/utils.d.mts +9 -0
- package/dist/error-handler/utils.d.ts +9 -0
- package/dist/framework/cli/command/list/get-routes.d.cts +7 -0
- package/dist/framework/cli/command/list/get-routes.d.mts +7 -0
- package/dist/framework/cli/command/list/get-routes.d.ts +7 -0
- package/dist/framework/cli/command/list/list-command.d.cts +9 -0
- package/dist/framework/cli/command/list/list-command.d.mts +9 -0
- package/dist/framework/cli/command/list/list-command.d.ts +9 -0
- package/dist/framework/cli/command/list/routes/express/express-path-parser.d.cts +16 -0
- package/dist/framework/cli/command/list/routes/express/express-path-parser.d.mts +16 -0
- package/dist/framework/cli/command/list/routes/express/express-path-parser.d.ts +16 -0
- package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.cts +9 -0
- package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.mts +9 -0
- package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.ts +9 -0
- package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.cts +11 -0
- package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.mts +11 -0
- package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.ts +11 -0
- package/dist/framework/cli/command/list/routes/express-routes.d.cts +4 -0
- package/dist/framework/cli/command/list/routes/express-routes.d.mts +4 -0
- package/dist/framework/cli/command/list/routes/express-routes.d.ts +4 -0
- package/dist/framework/cli/command/list/routes/fastify-routes.d.cts +4 -0
- package/dist/framework/cli/command/list/routes/fastify-routes.d.mts +4 -0
- package/dist/framework/cli/command/list/routes/fastify-routes.d.ts +4 -0
- package/dist/framework/cli/command/list/routes/hapi-routes.d.cts +4 -0
- package/dist/framework/cli/command/list/routes/hapi-routes.d.mts +4 -0
- package/dist/framework/cli/command/list/routes/hapi-routes.d.ts +4 -0
- package/dist/framework/cli/command/list/routes/koa-routes.d.cts +4 -0
- package/dist/framework/cli/command/list/routes/koa-routes.d.mts +4 -0
- package/dist/framework/cli/command/list/routes/koa-routes.d.ts +4 -0
- package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.cts +3 -0
- package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.mts +3 -0
- package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.ts +3 -0
- package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.cts +2 -0
- package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.mts +2 -0
- package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.ts +2 -0
- package/dist/framework/cli/command/list/routes/routes-group-by.d.cts +3 -0
- package/dist/framework/cli/command/list/routes/routes-group-by.d.mts +3 -0
- package/dist/framework/cli/command/list/routes/routes-group-by.d.ts +3 -0
- package/dist/framework/cli/command/list/routes/routes-render.d.cts +5 -0
- package/dist/framework/cli/command/list/routes/routes-render.d.mts +5 -0
- package/dist/framework/cli/command/list/routes/routes-render.d.ts +5 -0
- package/dist/framework/cli/command/list/routes/types.d.cts +6 -0
- package/dist/framework/cli/command/list/routes/types.d.mts +6 -0
- package/dist/framework/cli/command/list/routes/types.d.ts +6 -0
- package/dist/framework/cli/command/list/utils.d.cts +11 -0
- package/dist/framework/cli/command/list/utils.d.mts +11 -0
- package/dist/framework/cli/command/list/utils.d.ts +11 -0
- package/dist/framework/cli/index.cjs +1 -0
- package/dist/framework/cli/index.d.cts +1 -0
- package/dist/framework/cli/index.d.mts +1 -10
- package/dist/framework/cli/index.d.ts +1 -10
- package/dist/framework/cli/index.mjs +1 -2
- package/dist/framework/next/index-browser.d.cts +1 -0
- package/dist/framework/next/index-browser.d.mts +1 -5
- package/dist/framework/next/index-browser.d.ts +1 -5
- package/dist/framework/next/index-browser.mjs +1 -2
- package/dist/framework/next/index-server.cjs +1 -0
- package/dist/framework/next/index-server.d.cts +3 -0
- package/dist/framework/next/index-server.d.mts +3 -20
- package/dist/framework/next/index-server.d.ts +3 -20
- package/dist/framework/next/index-server.mjs +1 -2
- package/dist/framework/next/routes/api/swagger.d.cts +6 -0
- package/dist/framework/next/routes/api/swagger.d.mts +6 -0
- package/dist/framework/next/routes/api/swagger.d.ts +6 -0
- package/dist/framework/next/routes/pages/get-static-properties-swagger.d.cts +3 -0
- package/dist/framework/next/routes/pages/get-static-properties-swagger.d.mts +3 -0
- package/dist/framework/next/routes/pages/get-static-properties-swagger.d.ts +3 -0
- package/dist/framework/next/routes/pages/redoc/index.cjs +5 -0
- package/dist/framework/next/routes/pages/redoc/index.d.cts +6 -0
- package/dist/framework/next/routes/pages/redoc/index.d.mts +3 -5
- package/dist/framework/next/routes/pages/redoc/index.d.ts +2 -4
- package/dist/framework/next/routes/pages/redoc/index.mjs +2 -3
- package/dist/framework/next/routes/pages/swagger/index.cjs +5 -0
- package/dist/framework/next/routes/pages/swagger/index.d.cts +5 -0
- package/dist/framework/next/routes/pages/swagger/index.d.mts +4 -6
- package/dist/framework/next/routes/pages/swagger/index.d.ts +3 -5
- package/dist/framework/next/routes/pages/swagger/index.mjs +2 -3
- package/dist/framework/next/webpack/with-open-api.d.cts +11 -0
- package/dist/framework/next/webpack/with-open-api.d.mts +11 -0
- package/dist/framework/next/webpack/with-open-api.d.ts +11 -0
- package/dist/index-browser.d.cts +1 -0
- package/dist/index-browser.d.mts +1 -2
- package/dist/index-browser.d.ts +1 -2
- package/dist/index-browser.mjs +1 -2
- package/dist/index-server.cjs +1 -0
- package/dist/index-server.d.cts +14 -0
- package/dist/index-server.d.mts +14 -75
- package/dist/index-server.d.ts +14 -75
- package/dist/index-server.mjs +1 -3
- package/dist/packem_shared/corsMiddleware-D1pyvOyv.mjs +1 -0
- package/dist/packem_shared/corsMiddleware-DWTsl8B1.cjs +1 -0
- package/dist/packem_shared/createNodeRouter-Dm5Whmms.mjs +1 -0
- package/dist/packem_shared/createNodeRouter-iaG84YWy.cjs +1 -0
- package/dist/packem_shared/dateIn-C9Ti6fo7.mjs +1 -0
- package/dist/packem_shared/dateIn-DylTg8aG.cjs +1 -0
- package/dist/packem_shared/getSwaggerStaticProps-CyQoc8U9.cjs +1 -0
- package/dist/packem_shared/getSwaggerStaticProps-HLLlemG9.js +1 -0
- package/dist/packem_shared/getSwaggerStaticProps-HLLlemG9.mjs +1 -0
- package/dist/packem_shared/httpHeaderNormalizerMiddleware-DjISyK8_.mjs +1 -0
- package/dist/packem_shared/httpHeaderNormalizerMiddleware-QqE89aK5.cjs +1 -0
- package/dist/packem_shared/index-BjPTPgei.cjs +1 -0
- package/dist/packem_shared/index-C3aJF6SV.mjs +1 -0
- package/dist/packem_shared/listCommand-BQnW5VPN.mjs +5 -0
- package/dist/packem_shared/listCommand-CUt5_WGC.cjs +5 -0
- package/dist/packem_shared/onError-DIbxlS28.cjs +1 -0
- package/dist/packem_shared/onError-DzFkIIU_.mjs +1 -0
- package/dist/packem_shared/rateLimiterMiddleware-Ohn-bfGn.mjs +1 -0
- package/dist/packem_shared/rateLimiterMiddleware-iKphEEyl.cjs +1 -0
- package/dist/packem_shared/serialize-BQ5nNuTA.mjs +1 -0
- package/dist/packem_shared/serialize-DrSd3bRJ.cjs +1 -0
- package/dist/packem_shared/serializersMiddleware-DmYV9JsS.cjs +1 -0
- package/dist/packem_shared/serializersMiddleware-WsnnEh4z.mjs +1 -0
- package/dist/packem_shared/swaggerApiRoute-Bg8TT2PM.cjs +1 -0
- package/dist/packem_shared/swaggerApiRoute-uMNR4Fq6.mjs +1 -0
- package/dist/packem_shared/swaggerHandler-D4zaMC6r.cjs +1 -0
- package/dist/packem_shared/swaggerHandler-Dcg9F7KZ.mjs +1 -0
- package/dist/packem_shared/utils-B3c9VYrK.cjs +1 -0
- package/dist/packem_shared/utils-CDFMC8qn.mjs +1 -0
- package/dist/packem_shared/withOpenApi-D27jB-z-.cjs +1 -0
- package/dist/packem_shared/withOpenApi-DXirQ48v.mjs +1 -0
- package/dist/packem_shared/xmlTransformer-D49hlcok.mjs +1 -0
- package/dist/packem_shared/xmlTransformer-sHYc31_g.cjs +1 -0
- package/dist/packem_shared/yamlTransformer-CJsV5N3c.mjs +1 -0
- package/dist/packem_shared/yamlTransformer-DgcCb8ww.cjs +1 -0
- package/dist/packem_shared/zod-Bvj53ziu.cjs +1 -0
- package/dist/packem_shared/zod-D9vLMypI.mjs +1 -0
- package/dist/serializers/has-json-structure.d.cts +2 -0
- package/dist/serializers/has-json-structure.d.mts +2 -0
- package/dist/serializers/has-json-structure.d.ts +2 -0
- package/dist/serializers/index.d.cts +4 -0
- package/dist/serializers/index.d.mts +4 -0
- package/dist/serializers/index.d.ts +4 -0
- package/dist/serializers/serialize.d.cts +6 -0
- package/dist/serializers/serialize.d.mts +6 -0
- package/dist/serializers/serialize.d.ts +6 -0
- package/dist/serializers/transformer/xml.d.cts +3 -0
- package/dist/serializers/transformer/xml.d.mts +3 -0
- package/dist/serializers/transformer/xml.d.ts +3 -0
- package/dist/serializers/transformer/yaml.d.cts +3 -0
- package/dist/serializers/transformer/yaml.d.mts +3 -0
- package/dist/serializers/transformer/yaml.d.ts +3 -0
- package/dist/swagger/api/swagger-handler.d.cts +15 -0
- package/dist/swagger/api/swagger-handler.d.mts +15 -0
- package/dist/swagger/api/swagger-handler.d.ts +15 -0
- package/dist/swagger/extend-swagger-spec.d.cts +7 -0
- package/dist/swagger/extend-swagger-spec.d.mts +7 -0
- package/dist/swagger/extend-swagger-spec.d.ts +7 -0
- package/dist/utils.d.cts +10 -0
- package/dist/utils.d.mts +10 -0
- package/dist/utils.d.ts +10 -0
- package/dist/zod/date-in-schema.d.cts +12 -0
- package/dist/zod/date-in-schema.d.mts +12 -0
- package/dist/zod/date-in-schema.d.ts +12 -0
- package/dist/zod/date-out-schema.d.cts +11 -0
- package/dist/zod/date-out-schema.d.mts +11 -0
- package/dist/zod/date-out-schema.d.ts +11 -0
- package/dist/zod/index.d.cts +5 -0
- package/dist/zod/index.d.mts +5 -0
- package/dist/zod/index.d.ts +5 -0
- package/package.json +64 -41
- package/dist/chunk-2RCSQLSQ.js +0 -2
- package/dist/chunk-2RCSQLSQ.js.map +0 -1
- package/dist/chunk-4C666HHU.js +0 -2
- package/dist/chunk-4C666HHU.js.map +0 -1
- package/dist/chunk-5DME62EW.mjs +0 -2
- package/dist/chunk-5DME62EW.mjs.map +0 -1
- package/dist/chunk-BJSUSPWM.mjs +0 -2
- package/dist/chunk-BJSUSPWM.mjs.map +0 -1
- package/dist/chunk-EEEP2HBM.js +0 -2
- package/dist/chunk-EEEP2HBM.js.map +0 -1
- package/dist/chunk-FQUHP33M.js +0 -6
- package/dist/chunk-FQUHP33M.js.map +0 -1
- package/dist/chunk-HZWWJL43.mjs +0 -2
- package/dist/chunk-HZWWJL43.mjs.map +0 -1
- package/dist/chunk-JPUMGEAE.mjs +0 -6
- package/dist/chunk-JPUMGEAE.mjs.map +0 -1
- package/dist/chunk-LTU4LAD7.mjs +0 -2
- package/dist/chunk-LTU4LAD7.mjs.map +0 -1
- package/dist/chunk-NCNFFJRK.js +0 -2
- package/dist/chunk-NCNFFJRK.js.map +0 -1
- package/dist/framework/cli/commander/index.d.mts +0 -5
- package/dist/framework/cli/commander/index.d.ts +0 -5
- package/dist/framework/cli/commander/index.js +0 -2
- package/dist/framework/cli/commander/index.js.map +0 -1
- package/dist/framework/cli/commander/index.mjs +0 -2
- package/dist/framework/cli/commander/index.mjs.map +0 -1
- package/dist/framework/cli/index.js +0 -2
- package/dist/framework/cli/index.js.map +0 -1
- package/dist/framework/cli/index.mjs.map +0 -1
- package/dist/framework/next/index-browser.js +0 -2
- package/dist/framework/next/index-browser.js.map +0 -1
- package/dist/framework/next/index-browser.mjs.map +0 -1
- package/dist/framework/next/index-server.js +0 -2
- package/dist/framework/next/index-server.js.map +0 -1
- package/dist/framework/next/index-server.mjs.map +0 -1
- package/dist/framework/next/routes/pages/redoc/index.js +0 -8
- package/dist/framework/next/routes/pages/redoc/index.js.map +0 -1
- package/dist/framework/next/routes/pages/redoc/index.mjs.map +0 -1
- package/dist/framework/next/routes/pages/swagger/index.js +0 -8
- package/dist/framework/next/routes/pages/swagger/index.js.map +0 -1
- package/dist/framework/next/routes/pages/swagger/index.mjs.map +0 -1
- package/dist/index-browser-Cy6Ywaan.d.mts +0 -30
- package/dist/index-browser-Cy6Ywaan.d.ts +0 -30
- package/dist/index-browser.js +0 -2
- package/dist/index-browser.js.map +0 -1
- package/dist/index-browser.mjs.map +0 -1
- package/dist/index-server.js +0 -3
- package/dist/index-server.js.map +0 -1
- package/dist/index-server.mjs.map +0 -1
- package/dist/swagger-handler-BPZJNDgC.d.mts +0 -17
- package/dist/swagger-handler-BPZJNDgC.d.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
## @visulima/api-platform [4.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/api-platform@4.0.0-alpha.8...@visulima/api-platform@4.0.0-alpha.9) (2026-04-09)
|
|
2
|
+
|
|
3
|
+
## @visulima/api-platform [4.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/api-platform@4.0.0-alpha.7...@visulima/api-platform@4.0.0-alpha.8) (2026-04-08)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **api-platform:** finalize packem config with validation and node10 compat ([8c48298](https://github.com/visulima/visulima/commit/8c4829837117aae855c0a2aad0ceee6a41122483))
|
|
8
|
+
* **api-platform:** fix packem build with externals and isolated declarations ([2849a72](https://github.com/visulima/visulima/commit/2849a729ec5e08f0a2ba74abfdb4d3d398e07c87))
|
|
9
|
+
* remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* **api-platform:** add tsconfig.eslint.json for type-aware linting ([f7a49f0](https://github.com/visulima/visulima/commit/f7a49f0eba9d28d3c93c19a5460ae6673bf86d62))
|
|
14
|
+
* **api-platform:** migrate .prettierrc.cjs to prettier.config.js ([6273cfa](https://github.com/visulima/visulima/commit/6273cfad25dee29a972346b6a0fa94819bf4ec63))
|
|
15
|
+
* **api-platform:** sort package.json fields ([a965510](https://github.com/visulima/visulima/commit/a96551017e9f032ecbf5cc73e848c0bd9b7f25d6))
|
|
16
|
+
* **api:** remove empty dependency objects from package.json ([f6bfc85](https://github.com/visulima/visulima/commit/f6bfc85c48c973ff8ea0a7db5951794ae0ea3efb))
|
|
17
|
+
* **connect:** apply prettier formatting ([8ecf930](https://github.com/visulima/visulima/commit/8ecf93071cb0087a8c49520cc594a753dba5e39d))
|
|
18
|
+
* update bundled dependency licenses ([6ace4c6](https://github.com/visulima/visulima/commit/6ace4c69d41fc1fd0a744fbca8ca219ba631b4ab))
|
|
19
|
+
|
|
20
|
+
### Build System
|
|
21
|
+
|
|
22
|
+
* **api-platform, crud:** migrate from tsup to packem ([e8aadac](https://github.com/visulima/visulima/commit/e8aadac072738c7c75e3a6a1478318922f2ceeac))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* **@visulima/connect:** upgraded to 4.0.0-alpha.8
|
|
28
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.7
|
|
29
|
+
* **@visulima/jsdoc-open-api:** upgraded to 3.0.0-alpha.7
|
|
30
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
31
|
+
* **@visulima/crud:** upgraded to 3.0.0-alpha.9
|
|
32
|
+
|
|
1
33
|
## @visulima/api-platform [4.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/api-platform@4.0.0-alpha.6...@visulima/api-platform@4.0.0-alpha.7) (2026-03-26)
|
|
2
34
|
|
|
3
35
|
### Features
|
package/LICENSE.md
CHANGED
|
@@ -24,4 +24,113 @@ SOFTWARE.
|
|
|
24
24
|
<!-- /DEPENDENCIES -->
|
|
25
25
|
|
|
26
26
|
<!-- TYPE_DEPENDENCIES -->
|
|
27
|
+
|
|
28
|
+
# Licenses of bundled types
|
|
29
|
+
|
|
30
|
+
The published @visulima/api-platform artifact additionally contains code with the following licenses:
|
|
31
|
+
ISC, MIT
|
|
32
|
+
|
|
33
|
+
# Bundled types:
|
|
34
|
+
|
|
35
|
+
## @types/cors
|
|
36
|
+
|
|
37
|
+
License: MIT
|
|
38
|
+
By: Alan Plum, Gaurav Sharma, Sebastian Beltran
|
|
39
|
+
Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git
|
|
40
|
+
|
|
41
|
+
> MIT License
|
|
42
|
+
>
|
|
43
|
+
> Copyright (c) Microsoft Corporation.
|
|
44
|
+
>
|
|
45
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
47
|
+
> in the Software without restriction, including without limitation the rights
|
|
48
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
49
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
50
|
+
> furnished to do so, subject to the following conditions:
|
|
51
|
+
>
|
|
52
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
53
|
+
> copies or substantial portions of the Software.
|
|
54
|
+
>
|
|
55
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
59
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
60
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
61
|
+
> SOFTWARE
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## @visulima/crud
|
|
66
|
+
|
|
67
|
+
License: MIT
|
|
68
|
+
By: Daniel Bannert
|
|
69
|
+
Repository: https://github.com/visulima/visulima.git
|
|
70
|
+
|
|
71
|
+
> MIT License
|
|
72
|
+
>
|
|
73
|
+
> Copyright (c) 2026 visulima
|
|
74
|
+
>
|
|
75
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
76
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
77
|
+
> in the Software without restriction, including without limitation the rights
|
|
78
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
79
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
80
|
+
> furnished to do so, subject to the following conditions:
|
|
81
|
+
>
|
|
82
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
83
|
+
> copies or substantial portions of the Software.
|
|
84
|
+
>
|
|
85
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
86
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
87
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
88
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
89
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
90
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
91
|
+
> SOFTWARE.
|
|
92
|
+
>
|
|
93
|
+
> <!-- DEPENDENCIES -->
|
|
94
|
+
>
|
|
95
|
+
> # Licenses of bundled dependencies
|
|
96
|
+
>
|
|
97
|
+
> The published @visulima/crud artifact additionally contains code with the following licenses:
|
|
98
|
+
> MIT
|
|
99
|
+
>
|
|
100
|
+
> # Bundled dependencies:
|
|
101
|
+
>
|
|
102
|
+
> ## dot-prop
|
|
103
|
+
>
|
|
104
|
+
> License: MIT
|
|
105
|
+
> By: Sindre Sorhus
|
|
106
|
+
> Repository: sindresorhus/dot-prop
|
|
107
|
+
>
|
|
108
|
+
> > MIT License
|
|
109
|
+
> >
|
|
110
|
+
> > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
111
|
+
> >
|
|
112
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
113
|
+
> >
|
|
114
|
+
> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
115
|
+
> >
|
|
116
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
117
|
+
>
|
|
118
|
+
> <!-- /DEPENDENCIES -->
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## rate-limiter-flexible
|
|
123
|
+
|
|
124
|
+
License: ISC
|
|
125
|
+
By: animir
|
|
126
|
+
Repository: git+https://github.com/animir/node-rate-limiter-flexible.git
|
|
127
|
+
|
|
128
|
+
> ## ISC License (ISC)
|
|
129
|
+
>
|
|
130
|
+
> Copyright 2019 Roman Voloboev
|
|
131
|
+
>
|
|
132
|
+
> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
133
|
+
>
|
|
134
|
+
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
135
|
+
|
|
27
136
|
<!-- /TYPE_DEPENDENCIES -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import { NodeRouter } from "@visulima/connect";
|
|
3
|
+
import type { AnyZodObject, ZodObject } from "zod";
|
|
4
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.cts";
|
|
5
|
+
import type { Serializers } from "../index.d.cts";
|
|
6
|
+
declare const createNodeRouter: <Request extends IncomingMessage, Response extends ServerResponse, Schema extends AnyZodObject = ZodObject<{
|
|
7
|
+
body?: AnyZodObject;
|
|
8
|
+
headers?: AnyZodObject;
|
|
9
|
+
query?: AnyZodObject;
|
|
10
|
+
}>>(options?: {
|
|
11
|
+
errorHandlers?: ErrorHandlers;
|
|
12
|
+
middlewares?: {
|
|
13
|
+
"http-header-normalizer"?: {
|
|
14
|
+
canonical?: boolean;
|
|
15
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
16
|
+
};
|
|
17
|
+
serializers?: {
|
|
18
|
+
defaultContentType?: string;
|
|
19
|
+
serializers?: Serializers;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
showTrace?: boolean;
|
|
23
|
+
}) => NodeRouter<Request, Response, Schema>;
|
|
24
|
+
export = createNodeRouter;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import { NodeRouter } from "@visulima/connect";
|
|
3
|
+
import type { AnyZodObject, ZodObject } from "zod";
|
|
4
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.mts";
|
|
5
|
+
import type { Serializers } from "../index.d.mts";
|
|
6
|
+
declare const createNodeRouter: <Request extends IncomingMessage, Response extends ServerResponse, Schema extends AnyZodObject = ZodObject<{
|
|
7
|
+
body?: AnyZodObject;
|
|
8
|
+
headers?: AnyZodObject;
|
|
9
|
+
query?: AnyZodObject;
|
|
10
|
+
}>>(options?: {
|
|
11
|
+
errorHandlers?: ErrorHandlers;
|
|
12
|
+
middlewares?: {
|
|
13
|
+
"http-header-normalizer"?: {
|
|
14
|
+
canonical?: boolean;
|
|
15
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
16
|
+
};
|
|
17
|
+
serializers?: {
|
|
18
|
+
defaultContentType?: string;
|
|
19
|
+
serializers?: Serializers;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
showTrace?: boolean;
|
|
23
|
+
}) => NodeRouter<Request, Response, Schema>;
|
|
24
|
+
export default createNodeRouter;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import { NodeRouter } from "@visulima/connect";
|
|
3
|
+
import type { AnyZodObject, ZodObject } from "zod";
|
|
4
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.ts";
|
|
5
|
+
import type { Serializers } from "../index.d.ts";
|
|
6
|
+
declare const createNodeRouter: <Request extends IncomingMessage, Response extends ServerResponse, Schema extends AnyZodObject = ZodObject<{
|
|
7
|
+
body?: AnyZodObject;
|
|
8
|
+
headers?: AnyZodObject;
|
|
9
|
+
query?: AnyZodObject;
|
|
10
|
+
}>>(options?: {
|
|
11
|
+
errorHandlers?: ErrorHandlers;
|
|
12
|
+
middlewares?: {
|
|
13
|
+
"http-header-normalizer"?: {
|
|
14
|
+
canonical?: boolean;
|
|
15
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
16
|
+
};
|
|
17
|
+
serializers?: {
|
|
18
|
+
defaultContentType?: string;
|
|
19
|
+
serializers?: Serializers;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
showTrace?: boolean;
|
|
23
|
+
}) => NodeRouter<Request, Response, Schema>;
|
|
24
|
+
export = createNodeRouter;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { FunctionLike, Nextable, Route, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.cts";
|
|
4
|
+
export declare const onError: <Request extends IncomingMessage, Response extends ServerResponse>(errorHandlers: ErrorHandlers, showTrace: boolean) => ((error: unknown, request: Request, response: Response) => Promise<void>);
|
|
5
|
+
export declare const onNoMatch: <Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: Response, routes: Route<Nextable<FunctionLike>>[]) => ValueOrPromise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { FunctionLike, Nextable, Route, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.mts";
|
|
4
|
+
export declare const onError: <Request extends IncomingMessage, Response extends ServerResponse>(errorHandlers: ErrorHandlers, showTrace: boolean) => ((error: unknown, request: Request, response: Response) => Promise<void>);
|
|
5
|
+
export declare const onNoMatch: <Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: Response, routes: Route<Nextable<FunctionLike>>[]) => ValueOrPromise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { FunctionLike, Nextable, Route, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { ErrorHandlers } from "../error-handler/types.d.d.ts";
|
|
4
|
+
export declare const onError: <Request extends IncomingMessage, Response extends ServerResponse>(errorHandlers: ErrorHandlers, showTrace: boolean) => ((error: unknown, request: Request, response: Response) => Promise<void>);
|
|
5
|
+
export declare const onNoMatch: <Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: Response, routes: Route<Nextable<FunctionLike>>[]) => ValueOrPromise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { Nextable, NodeRequestHandler } from "@visulima/connect";
|
|
3
|
+
import type CorsTypes from "cors";
|
|
4
|
+
declare const corsMiddleware: <Request extends IncomingMessage, Response extends ServerResponse>(options?: CorsTypes.CorsOptions | CorsTypes.CorsOptionsDelegate) => Nextable<NodeRequestHandler<Request, Response>>;
|
|
5
|
+
export = corsMiddleware;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { Nextable, NodeRequestHandler } from "@visulima/connect";
|
|
3
|
+
import type CorsTypes from "cors";
|
|
4
|
+
declare const corsMiddleware: <Request extends IncomingMessage, Response extends ServerResponse>(options?: CorsTypes.CorsOptions | CorsTypes.CorsOptionsDelegate) => Nextable<NodeRequestHandler<Request, Response>>;
|
|
5
|
+
export default corsMiddleware;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { Nextable, NodeRequestHandler } from "@visulima/connect";
|
|
3
|
+
import type CorsTypes from "cors";
|
|
4
|
+
declare const corsMiddleware: <Request extends IncomingMessage, Response extends ServerResponse>(options?: CorsTypes.CorsOptions | CorsTypes.CorsOptionsDelegate) => Nextable<NodeRequestHandler<Request, Response>>;
|
|
5
|
+
export = corsMiddleware;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
/**
|
|
4
|
+
* HTTP headers are case-insensitive.
|
|
5
|
+
* That's why NodeJS makes them lower case by default.
|
|
6
|
+
* While sensible, sometimes, for example for compatibility reasons, you might need them in their more common form.
|
|
7
|
+
*/
|
|
8
|
+
declare const httpHeaderNormalizerMiddleware: (options_?: {
|
|
9
|
+
canonical?: boolean;
|
|
10
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
11
|
+
}) => ((request: IncomingMessage, response: ServerResponse, next: NextHandler) => ValueOrPromise<void>);
|
|
12
|
+
export = httpHeaderNormalizerMiddleware;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
/**
|
|
4
|
+
* HTTP headers are case-insensitive.
|
|
5
|
+
* That's why NodeJS makes them lower case by default.
|
|
6
|
+
* While sensible, sometimes, for example for compatibility reasons, you might need them in their more common form.
|
|
7
|
+
*/
|
|
8
|
+
declare const httpHeaderNormalizerMiddleware: (options_?: {
|
|
9
|
+
canonical?: boolean;
|
|
10
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
11
|
+
}) => ((request: IncomingMessage, response: ServerResponse, next: NextHandler) => ValueOrPromise<void>);
|
|
12
|
+
export default httpHeaderNormalizerMiddleware;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
/**
|
|
4
|
+
* HTTP headers are case-insensitive.
|
|
5
|
+
* That's why NodeJS makes them lower case by default.
|
|
6
|
+
* While sensible, sometimes, for example for compatibility reasons, you might need them in their more common form.
|
|
7
|
+
*/
|
|
8
|
+
declare const httpHeaderNormalizerMiddleware: (options_?: {
|
|
9
|
+
canonical?: boolean;
|
|
10
|
+
normalizeHeaderKey?: (key: string, canonical: boolean) => string;
|
|
11
|
+
}) => ((request: IncomingMessage, response: ServerResponse, next: NextHandler) => ValueOrPromise<void>);
|
|
12
|
+
export = httpHeaderNormalizerMiddleware;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.cts";
|
|
4
|
+
import type { RateLimiterAbstract, RateLimiterRes } from "rate-limiter-flexible";
|
|
5
|
+
type HeaderValue = ReadonlyArray<string> | number | string;
|
|
6
|
+
declare const rateLimiterMiddleware: (rateLimiter: RateLimiterAbstract, headers?: (limiterResponse: RateLimiterRes) => Record<string, HeaderValue>) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<void>);
|
|
7
|
+
export = rateLimiterMiddleware;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.mts";
|
|
4
|
+
import type { RateLimiterAbstract, RateLimiterRes } from "rate-limiter-flexible";
|
|
5
|
+
type HeaderValue = ReadonlyArray<string> | number | string;
|
|
6
|
+
declare const rateLimiterMiddleware: (rateLimiter: RateLimiterAbstract, headers?: (limiterResponse: RateLimiterRes) => Record<string, HeaderValue>) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<void>);
|
|
7
|
+
export default rateLimiterMiddleware;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.ts";
|
|
4
|
+
import type { RateLimiterAbstract, RateLimiterRes } from "rate-limiter-flexible";
|
|
5
|
+
type HeaderValue = ReadonlyArray<string> | number | string;
|
|
6
|
+
declare const rateLimiterMiddleware: (rateLimiter: RateLimiterAbstract, headers?: (limiterResponse: RateLimiterRes) => Record<string, HeaderValue>) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<void>);
|
|
7
|
+
export = rateLimiterMiddleware;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.cts";
|
|
4
|
+
import type { Serializers } from "../../index.d.cts";
|
|
5
|
+
declare const serializersMiddleware: (serializers?: Serializers, defaultContentType?: string) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<ValueOrPromise<void>>);
|
|
6
|
+
export = serializersMiddleware;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.mts";
|
|
4
|
+
import type { Serializers } from "../../index.d.mts";
|
|
5
|
+
declare const serializersMiddleware: (serializers?: Serializers, defaultContentType?: string) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<ValueOrPromise<void>>);
|
|
6
|
+
export default serializersMiddleware;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { NextHandler, ValueOrPromise } from "@visulima/connect";
|
|
3
|
+
import type { NextApiResponse } from "next/types.d.ts";
|
|
4
|
+
import type { Serializers } from "../../index.d.ts";
|
|
5
|
+
declare const serializersMiddleware: (serializers?: Serializers, defaultContentType?: string) => (<Request extends IncomingMessage, Response extends ServerResponse>(request: Request, response: NextApiResponse | Response, next: NextHandler) => Promise<ValueOrPromise<void>>);
|
|
6
|
+
export = serializersMiddleware;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ServerResponse } from "node:http";
|
|
2
|
+
export declare const setErrorHeaders: (response: ServerResponse, error: unknown) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Send `JSON` object
|
|
5
|
+
* @param response response object
|
|
6
|
+
* @param jsonBody of data
|
|
7
|
+
*/
|
|
8
|
+
export declare const sendJson: (response: ServerResponse, jsonBody: unknown) => void;
|
|
9
|
+
export declare const addStatusCodeToResponse: (response: ServerResponse, error: unknown) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ServerResponse } from "node:http";
|
|
2
|
+
export declare const setErrorHeaders: (response: ServerResponse, error: unknown) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Send `JSON` object
|
|
5
|
+
* @param response response object
|
|
6
|
+
* @param jsonBody of data
|
|
7
|
+
*/
|
|
8
|
+
export declare const sendJson: (response: ServerResponse, jsonBody: unknown) => void;
|
|
9
|
+
export declare const addStatusCodeToResponse: (response: ServerResponse, error: unknown) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ServerResponse } from "node:http";
|
|
2
|
+
export declare const setErrorHeaders: (response: ServerResponse, error: unknown) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Send `JSON` object
|
|
5
|
+
* @param response response object
|
|
6
|
+
* @param jsonBody of data
|
|
7
|
+
*/
|
|
8
|
+
export declare const sendJson: (response: ServerResponse, jsonBody: unknown) => void;
|
|
9
|
+
export declare const addStatusCodeToResponse: (response: ServerResponse, error: unknown) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Server } from "@hapi/hapi";
|
|
2
|
+
import type { Express } from "express";
|
|
3
|
+
import type { FastifyInstance } from "fastify";
|
|
4
|
+
import type Koa from "koa";
|
|
5
|
+
import type { Route } from "./routes/types.d.cts";
|
|
6
|
+
export type FrameworkName = "express" | "fastify" | "hapi" | "koa" | "next" | "unknown";
|
|
7
|
+
export declare const getRoutes: (appOrPath: Express | FastifyInstance | Koa | Server | string, frameworkName: FrameworkName, verbose: boolean) => Promise<Route[] | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Server } from "@hapi/hapi";
|
|
2
|
+
import type { Express } from "express";
|
|
3
|
+
import type { FastifyInstance } from "fastify";
|
|
4
|
+
import type Koa from "koa";
|
|
5
|
+
import type { Route } from "./routes/types.d.mts";
|
|
6
|
+
export type FrameworkName = "express" | "fastify" | "hapi" | "koa" | "next" | "unknown";
|
|
7
|
+
export declare const getRoutes: (appOrPath: Express | FastifyInstance | Koa | Server | string, frameworkName: FrameworkName, verbose: boolean) => Promise<Route[] | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Server } from "@hapi/hapi";
|
|
2
|
+
import type { Express } from "express";
|
|
3
|
+
import type { FastifyInstance } from "fastify";
|
|
4
|
+
import type Koa from "koa";
|
|
5
|
+
import type { Route } from "./routes/types.d.ts";
|
|
6
|
+
export type FrameworkName = "express" | "fastify" | "hapi" | "koa" | "next" | "unknown";
|
|
7
|
+
export declare const getRoutes: (appOrPath: Express | FastifyInstance | Koa | Server | string, frameworkName: FrameworkName, verbose: boolean) => Promise<Route[] | null>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RenderOptions {
|
|
2
|
+
excludePaths: string[];
|
|
3
|
+
group: string;
|
|
4
|
+
includePaths: string[];
|
|
5
|
+
methods: string[];
|
|
6
|
+
verbose: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const listCommand: (framework: "express" | "fastify" | "hapi" | "koa" | "next" | undefined, path: string, options?: Partial<RenderOptions>) => Promise<void>;
|
|
9
|
+
export = listCommand;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RenderOptions {
|
|
2
|
+
excludePaths: string[];
|
|
3
|
+
group: string;
|
|
4
|
+
includePaths: string[];
|
|
5
|
+
methods: string[];
|
|
6
|
+
verbose: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const listCommand: (framework: "express" | "fastify" | "hapi" | "koa" | "next" | undefined, path: string, options?: Partial<RenderOptions>) => Promise<void>;
|
|
9
|
+
export default listCommand;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RenderOptions {
|
|
2
|
+
excludePaths: string[];
|
|
3
|
+
group: string;
|
|
4
|
+
includePaths: string[];
|
|
5
|
+
methods: string[];
|
|
6
|
+
verbose: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const listCommand: (framework: "express" | "fastify" | "hapi" | "koa" | "next" | undefined, path: string, options?: Partial<RenderOptions>) => Promise<void>;
|
|
9
|
+
export = listCommand;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Express } from "express";
|
|
2
|
+
import type { RouteMetaData } from "./types.d.d.cts";
|
|
3
|
+
/**
|
|
4
|
+
* Parses an Express app and generates list of routes with metadata.
|
|
5
|
+
*
|
|
6
|
+
* Can Parse:
|
|
7
|
+
* - Nested Routers and Complex Express Projects
|
|
8
|
+
* - Optional parameters e.g. /:name?
|
|
9
|
+
* - Complex Matching routes e.g. /ma*tch, /ex(ab)?mple
|
|
10
|
+
* - Regex routes e.g. /\/abc|\/xyz/
|
|
11
|
+
* - Array of paths e.g. app.get(['/abc', '/xyz']) -> /abc,xyz/
|
|
12
|
+
* @param app The Express app reference. Must be used after all routes have been attached
|
|
13
|
+
* @returns List of routes for this express app with meta-data that has been picked up
|
|
14
|
+
*/
|
|
15
|
+
declare const expressPathParser: (app: Express) => RouteMetaData[];
|
|
16
|
+
export = expressPathParser;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Express } from "express";
|
|
2
|
+
import type { RouteMetaData } from "./types.d.d.mts";
|
|
3
|
+
/**
|
|
4
|
+
* Parses an Express app and generates list of routes with metadata.
|
|
5
|
+
*
|
|
6
|
+
* Can Parse:
|
|
7
|
+
* - Nested Routers and Complex Express Projects
|
|
8
|
+
* - Optional parameters e.g. /:name?
|
|
9
|
+
* - Complex Matching routes e.g. /ma*tch, /ex(ab)?mple
|
|
10
|
+
* - Regex routes e.g. /\/abc|\/xyz/
|
|
11
|
+
* - Array of paths e.g. app.get(['/abc', '/xyz']) -> /abc,xyz/
|
|
12
|
+
* @param app The Express app reference. Must be used after all routes have been attached
|
|
13
|
+
* @returns List of routes for this express app with meta-data that has been picked up
|
|
14
|
+
*/
|
|
15
|
+
declare const expressPathParser: (app: Express) => RouteMetaData[];
|
|
16
|
+
export default expressPathParser;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Express } from "express";
|
|
2
|
+
import type { RouteMetaData } from "./types.d.d.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Parses an Express app and generates list of routes with metadata.
|
|
5
|
+
*
|
|
6
|
+
* Can Parse:
|
|
7
|
+
* - Nested Routers and Complex Express Projects
|
|
8
|
+
* - Optional parameters e.g. /:name?
|
|
9
|
+
* - Complex Matching routes e.g. /ma*tch, /ex(ab)?mple
|
|
10
|
+
* - Regex routes e.g. /\/abc|\/xyz/
|
|
11
|
+
* - Array of paths e.g. app.get(['/abc', '/xyz']) -> /abc,xyz/
|
|
12
|
+
* @param app The Express app reference. Must be used after all routes have been attached
|
|
13
|
+
* @returns List of routes for this express app with meta-data that has been picked up
|
|
14
|
+
*/
|
|
15
|
+
declare const expressPathParser: (app: Express) => RouteMetaData[];
|
|
16
|
+
export = expressPathParser;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.cts";
|
|
2
|
+
/**
|
|
3
|
+
* Map's the keys/path variables to the regex inside a given path
|
|
4
|
+
* @param layerRegexPath The regex for a router with path parameters
|
|
5
|
+
* @param keys The keys that represent the path parameters
|
|
6
|
+
* @returns The regex for a path variable converted to original string on the express route
|
|
7
|
+
*/
|
|
8
|
+
declare const mapKeysToPath: (layerRegexPath: ExpressRegex, keys: Key[]) => string;
|
|
9
|
+
export = mapKeysToPath;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.mts";
|
|
2
|
+
/**
|
|
3
|
+
* Map's the keys/path variables to the regex inside a given path
|
|
4
|
+
* @param layerRegexPath The regex for a router with path parameters
|
|
5
|
+
* @param keys The keys that represent the path parameters
|
|
6
|
+
* @returns The regex for a path variable converted to original string on the express route
|
|
7
|
+
*/
|
|
8
|
+
declare const mapKeysToPath: (layerRegexPath: ExpressRegex, keys: Key[]) => string;
|
|
9
|
+
export default mapKeysToPath;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Map's the keys/path variables to the regex inside a given path
|
|
4
|
+
* @param layerRegexPath The regex for a router with path parameters
|
|
5
|
+
* @param keys The keys that represent the path parameters
|
|
6
|
+
* @returns The regex for a path variable converted to original string on the express route
|
|
7
|
+
*/
|
|
8
|
+
declare const mapKeysToPath: (layerRegexPath: ExpressRegex, keys: Key[]) => string;
|
|
9
|
+
export = mapKeysToPath;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.cts";
|
|
2
|
+
/**
|
|
3
|
+
* Parses an express layer's regex and converts it to the original format seen in code.
|
|
4
|
+
* @param layerRegexPath The layer's regex pattern
|
|
5
|
+
* @param keys The keys that represent the layer's path parameters
|
|
6
|
+
* @returns The path string for that layer
|
|
7
|
+
* Code inspired and modify from:
|
|
8
|
+
* https://github.com/expressjs/express/issues/3308#issuecomment-300957572
|
|
9
|
+
*/
|
|
10
|
+
declare const pathRegexParser: (layerRegexPath: ExpressRegex | string, keys: Key[]) => string;
|
|
11
|
+
export = pathRegexParser;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.mts";
|
|
2
|
+
/**
|
|
3
|
+
* Parses an express layer's regex and converts it to the original format seen in code.
|
|
4
|
+
* @param layerRegexPath The layer's regex pattern
|
|
5
|
+
* @param keys The keys that represent the layer's path parameters
|
|
6
|
+
* @returns The path string for that layer
|
|
7
|
+
* Code inspired and modify from:
|
|
8
|
+
* https://github.com/expressjs/express/issues/3308#issuecomment-300957572
|
|
9
|
+
*/
|
|
10
|
+
declare const pathRegexParser: (layerRegexPath: ExpressRegex | string, keys: Key[]) => string;
|
|
11
|
+
export default pathRegexParser;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExpressRegex, Key } from "./types.d.d.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Parses an express layer's regex and converts it to the original format seen in code.
|
|
4
|
+
* @param layerRegexPath The layer's regex pattern
|
|
5
|
+
* @param keys The keys that represent the layer's path parameters
|
|
6
|
+
* @returns The path string for that layer
|
|
7
|
+
* Code inspired and modify from:
|
|
8
|
+
* https://github.com/expressjs/express/issues/3308#issuecomment-300957572
|
|
9
|
+
*/
|
|
10
|
+
declare const pathRegexParser: (layerRegexPath: ExpressRegex | string, keys: Key[]) => string;
|
|
11
|
+
export = pathRegexParser;
|