@visulima/api-platform 4.0.0-alpha.7 → 4.0.0-alpha.8

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.
Files changed (238) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/LICENSE.md +109 -0
  3. package/dist/connect/create-node-router.d.cts +24 -0
  4. package/dist/connect/create-node-router.d.mts +24 -0
  5. package/dist/connect/create-node-router.d.ts +24 -0
  6. package/dist/connect/handler.d.cts +5 -0
  7. package/dist/connect/handler.d.mts +5 -0
  8. package/dist/connect/handler.d.ts +5 -0
  9. package/dist/connect/middleware/cors-middleware.d.cts +5 -0
  10. package/dist/connect/middleware/cors-middleware.d.mts +5 -0
  11. package/dist/connect/middleware/cors-middleware.d.ts +5 -0
  12. package/dist/connect/middleware/http-header-normalizer.d.cts +12 -0
  13. package/dist/connect/middleware/http-header-normalizer.d.mts +12 -0
  14. package/dist/connect/middleware/http-header-normalizer.d.ts +12 -0
  15. package/dist/connect/middleware/rate-limiter-middleware.d.cts +7 -0
  16. package/dist/connect/middleware/rate-limiter-middleware.d.mts +7 -0
  17. package/dist/connect/middleware/rate-limiter-middleware.d.ts +7 -0
  18. package/dist/connect/middleware/serializers-middleware.d.cts +6 -0
  19. package/dist/connect/middleware/serializers-middleware.d.mts +6 -0
  20. package/dist/connect/middleware/serializers-middleware.d.ts +6 -0
  21. package/dist/error-handler/jsonapi-error-handler.d.cts +3 -0
  22. package/dist/error-handler/jsonapi-error-handler.d.mts +3 -0
  23. package/dist/error-handler/jsonapi-error-handler.d.ts +3 -0
  24. package/dist/error-handler/problem-error-handler.d.cts +7 -0
  25. package/dist/error-handler/problem-error-handler.d.mts +7 -0
  26. package/dist/error-handler/problem-error-handler.d.ts +7 -0
  27. package/dist/error-handler/utils.d.cts +9 -0
  28. package/dist/error-handler/utils.d.mts +9 -0
  29. package/dist/error-handler/utils.d.ts +9 -0
  30. package/dist/framework/cli/command/list/get-routes.d.cts +7 -0
  31. package/dist/framework/cli/command/list/get-routes.d.mts +7 -0
  32. package/dist/framework/cli/command/list/get-routes.d.ts +7 -0
  33. package/dist/framework/cli/command/list/list-command.d.cts +9 -0
  34. package/dist/framework/cli/command/list/list-command.d.mts +9 -0
  35. package/dist/framework/cli/command/list/list-command.d.ts +9 -0
  36. package/dist/framework/cli/command/list/routes/express/express-path-parser.d.cts +16 -0
  37. package/dist/framework/cli/command/list/routes/express/express-path-parser.d.mts +16 -0
  38. package/dist/framework/cli/command/list/routes/express/express-path-parser.d.ts +16 -0
  39. package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.cts +9 -0
  40. package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.mts +9 -0
  41. package/dist/framework/cli/command/list/routes/express/map-keys-to-path.d.ts +9 -0
  42. package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.cts +11 -0
  43. package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.mts +11 -0
  44. package/dist/framework/cli/command/list/routes/express/path-regex-parser.d.ts +11 -0
  45. package/dist/framework/cli/command/list/routes/express-routes.d.cts +4 -0
  46. package/dist/framework/cli/command/list/routes/express-routes.d.mts +4 -0
  47. package/dist/framework/cli/command/list/routes/express-routes.d.ts +4 -0
  48. package/dist/framework/cli/command/list/routes/fastify-routes.d.cts +4 -0
  49. package/dist/framework/cli/command/list/routes/fastify-routes.d.mts +4 -0
  50. package/dist/framework/cli/command/list/routes/fastify-routes.d.ts +4 -0
  51. package/dist/framework/cli/command/list/routes/hapi-routes.d.cts +4 -0
  52. package/dist/framework/cli/command/list/routes/hapi-routes.d.mts +4 -0
  53. package/dist/framework/cli/command/list/routes/hapi-routes.d.ts +4 -0
  54. package/dist/framework/cli/command/list/routes/koa-routes.d.cts +4 -0
  55. package/dist/framework/cli/command/list/routes/koa-routes.d.mts +4 -0
  56. package/dist/framework/cli/command/list/routes/koa-routes.d.ts +4 -0
  57. package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.cts +3 -0
  58. package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.mts +3 -0
  59. package/dist/framework/cli/command/list/routes/next/api-route-file-parser.d.ts +3 -0
  60. package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.cts +2 -0
  61. package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.mts +2 -0
  62. package/dist/framework/cli/command/list/routes/next/collect-api-route-files.d.ts +2 -0
  63. package/dist/framework/cli/command/list/routes/routes-group-by.d.cts +3 -0
  64. package/dist/framework/cli/command/list/routes/routes-group-by.d.mts +3 -0
  65. package/dist/framework/cli/command/list/routes/routes-group-by.d.ts +3 -0
  66. package/dist/framework/cli/command/list/routes/routes-render.d.cts +5 -0
  67. package/dist/framework/cli/command/list/routes/routes-render.d.mts +5 -0
  68. package/dist/framework/cli/command/list/routes/routes-render.d.ts +5 -0
  69. package/dist/framework/cli/command/list/routes/types.d.cts +6 -0
  70. package/dist/framework/cli/command/list/routes/types.d.mts +6 -0
  71. package/dist/framework/cli/command/list/routes/types.d.ts +6 -0
  72. package/dist/framework/cli/command/list/utils.d.cts +11 -0
  73. package/dist/framework/cli/command/list/utils.d.mts +11 -0
  74. package/dist/framework/cli/command/list/utils.d.ts +11 -0
  75. package/dist/framework/cli/index.cjs +1 -0
  76. package/dist/framework/cli/index.d.cts +1 -0
  77. package/dist/framework/cli/index.d.mts +1 -10
  78. package/dist/framework/cli/index.d.ts +1 -10
  79. package/dist/framework/cli/index.mjs +1 -2
  80. package/dist/framework/next/index-browser.d.cts +1 -0
  81. package/dist/framework/next/index-browser.d.mts +1 -5
  82. package/dist/framework/next/index-browser.d.ts +1 -5
  83. package/dist/framework/next/index-browser.mjs +1 -2
  84. package/dist/framework/next/index-server.cjs +1 -0
  85. package/dist/framework/next/index-server.d.cts +3 -0
  86. package/dist/framework/next/index-server.d.mts +3 -20
  87. package/dist/framework/next/index-server.d.ts +3 -20
  88. package/dist/framework/next/index-server.mjs +1 -2
  89. package/dist/framework/next/routes/api/swagger.d.cts +6 -0
  90. package/dist/framework/next/routes/api/swagger.d.mts +6 -0
  91. package/dist/framework/next/routes/api/swagger.d.ts +6 -0
  92. package/dist/framework/next/routes/pages/get-static-properties-swagger.d.cts +3 -0
  93. package/dist/framework/next/routes/pages/get-static-properties-swagger.d.mts +3 -0
  94. package/dist/framework/next/routes/pages/get-static-properties-swagger.d.ts +3 -0
  95. package/dist/framework/next/routes/pages/redoc/index.cjs +5 -0
  96. package/dist/framework/next/routes/pages/redoc/index.d.cts +6 -0
  97. package/dist/framework/next/routes/pages/redoc/index.d.mts +3 -5
  98. package/dist/framework/next/routes/pages/redoc/index.d.ts +2 -4
  99. package/dist/framework/next/routes/pages/redoc/index.mjs +2 -3
  100. package/dist/framework/next/routes/pages/swagger/index.cjs +5 -0
  101. package/dist/framework/next/routes/pages/swagger/index.d.cts +5 -0
  102. package/dist/framework/next/routes/pages/swagger/index.d.mts +4 -6
  103. package/dist/framework/next/routes/pages/swagger/index.d.ts +3 -5
  104. package/dist/framework/next/routes/pages/swagger/index.mjs +2 -3
  105. package/dist/framework/next/webpack/with-open-api.d.cts +11 -0
  106. package/dist/framework/next/webpack/with-open-api.d.mts +11 -0
  107. package/dist/framework/next/webpack/with-open-api.d.ts +11 -0
  108. package/dist/index-browser.d.cts +1 -0
  109. package/dist/index-browser.d.mts +1 -2
  110. package/dist/index-browser.d.ts +1 -2
  111. package/dist/index-browser.mjs +1 -2
  112. package/dist/index-server.cjs +1 -0
  113. package/dist/index-server.d.cts +14 -0
  114. package/dist/index-server.d.mts +14 -75
  115. package/dist/index-server.d.ts +14 -75
  116. package/dist/index-server.mjs +1 -3
  117. package/dist/packem_shared/corsMiddleware-D1pyvOyv.mjs +1 -0
  118. package/dist/packem_shared/corsMiddleware-DWTsl8B1.cjs +1 -0
  119. package/dist/packem_shared/createNodeRouter-Dm5Whmms.mjs +1 -0
  120. package/dist/packem_shared/createNodeRouter-iaG84YWy.cjs +1 -0
  121. package/dist/packem_shared/dateIn-C9Ti6fo7.mjs +1 -0
  122. package/dist/packem_shared/dateIn-DylTg8aG.cjs +1 -0
  123. package/dist/packem_shared/getSwaggerStaticProps-CyQoc8U9.cjs +1 -0
  124. package/dist/packem_shared/getSwaggerStaticProps-HLLlemG9.js +1 -0
  125. package/dist/packem_shared/getSwaggerStaticProps-HLLlemG9.mjs +1 -0
  126. package/dist/packem_shared/httpHeaderNormalizerMiddleware-DjISyK8_.mjs +1 -0
  127. package/dist/packem_shared/httpHeaderNormalizerMiddleware-QqE89aK5.cjs +1 -0
  128. package/dist/packem_shared/index-BjPTPgei.cjs +1 -0
  129. package/dist/packem_shared/index-C3aJF6SV.mjs +1 -0
  130. package/dist/packem_shared/listCommand-BQnW5VPN.mjs +5 -0
  131. package/dist/packem_shared/listCommand-CUt5_WGC.cjs +5 -0
  132. package/dist/packem_shared/onError-DIbxlS28.cjs +1 -0
  133. package/dist/packem_shared/onError-DzFkIIU_.mjs +1 -0
  134. package/dist/packem_shared/rateLimiterMiddleware-Ohn-bfGn.mjs +1 -0
  135. package/dist/packem_shared/rateLimiterMiddleware-iKphEEyl.cjs +1 -0
  136. package/dist/packem_shared/serialize-BQ5nNuTA.mjs +1 -0
  137. package/dist/packem_shared/serialize-DrSd3bRJ.cjs +1 -0
  138. package/dist/packem_shared/serializersMiddleware-DmYV9JsS.cjs +1 -0
  139. package/dist/packem_shared/serializersMiddleware-WsnnEh4z.mjs +1 -0
  140. package/dist/packem_shared/swaggerApiRoute-Bg8TT2PM.cjs +1 -0
  141. package/dist/packem_shared/swaggerApiRoute-uMNR4Fq6.mjs +1 -0
  142. package/dist/packem_shared/swaggerHandler-D4zaMC6r.cjs +1 -0
  143. package/dist/packem_shared/swaggerHandler-Dcg9F7KZ.mjs +1 -0
  144. package/dist/packem_shared/utils-B3c9VYrK.cjs +1 -0
  145. package/dist/packem_shared/utils-CDFMC8qn.mjs +1 -0
  146. package/dist/packem_shared/withOpenApi-D27jB-z-.cjs +1 -0
  147. package/dist/packem_shared/withOpenApi-DXirQ48v.mjs +1 -0
  148. package/dist/packem_shared/xmlTransformer-D49hlcok.mjs +1 -0
  149. package/dist/packem_shared/xmlTransformer-sHYc31_g.cjs +1 -0
  150. package/dist/packem_shared/yamlTransformer-CJsV5N3c.mjs +1 -0
  151. package/dist/packem_shared/yamlTransformer-DgcCb8ww.cjs +1 -0
  152. package/dist/packem_shared/zod-Bvj53ziu.cjs +1 -0
  153. package/dist/packem_shared/zod-D9vLMypI.mjs +1 -0
  154. package/dist/serializers/has-json-structure.d.cts +2 -0
  155. package/dist/serializers/has-json-structure.d.mts +2 -0
  156. package/dist/serializers/has-json-structure.d.ts +2 -0
  157. package/dist/serializers/index.d.cts +4 -0
  158. package/dist/serializers/index.d.mts +4 -0
  159. package/dist/serializers/index.d.ts +4 -0
  160. package/dist/serializers/serialize.d.cts +6 -0
  161. package/dist/serializers/serialize.d.mts +6 -0
  162. package/dist/serializers/serialize.d.ts +6 -0
  163. package/dist/serializers/transformer/xml.d.cts +3 -0
  164. package/dist/serializers/transformer/xml.d.mts +3 -0
  165. package/dist/serializers/transformer/xml.d.ts +3 -0
  166. package/dist/serializers/transformer/yaml.d.cts +3 -0
  167. package/dist/serializers/transformer/yaml.d.mts +3 -0
  168. package/dist/serializers/transformer/yaml.d.ts +3 -0
  169. package/dist/swagger/api/swagger-handler.d.cts +15 -0
  170. package/dist/swagger/api/swagger-handler.d.mts +15 -0
  171. package/dist/swagger/api/swagger-handler.d.ts +15 -0
  172. package/dist/swagger/extend-swagger-spec.d.cts +7 -0
  173. package/dist/swagger/extend-swagger-spec.d.mts +7 -0
  174. package/dist/swagger/extend-swagger-spec.d.ts +7 -0
  175. package/dist/utils.d.cts +10 -0
  176. package/dist/utils.d.mts +10 -0
  177. package/dist/utils.d.ts +10 -0
  178. package/dist/zod/date-in-schema.d.cts +12 -0
  179. package/dist/zod/date-in-schema.d.mts +12 -0
  180. package/dist/zod/date-in-schema.d.ts +12 -0
  181. package/dist/zod/date-out-schema.d.cts +11 -0
  182. package/dist/zod/date-out-schema.d.mts +11 -0
  183. package/dist/zod/date-out-schema.d.ts +11 -0
  184. package/dist/zod/index.d.cts +5 -0
  185. package/dist/zod/index.d.mts +5 -0
  186. package/dist/zod/index.d.ts +5 -0
  187. package/package.json +62 -39
  188. package/dist/chunk-2RCSQLSQ.js +0 -2
  189. package/dist/chunk-2RCSQLSQ.js.map +0 -1
  190. package/dist/chunk-4C666HHU.js +0 -2
  191. package/dist/chunk-4C666HHU.js.map +0 -1
  192. package/dist/chunk-5DME62EW.mjs +0 -2
  193. package/dist/chunk-5DME62EW.mjs.map +0 -1
  194. package/dist/chunk-BJSUSPWM.mjs +0 -2
  195. package/dist/chunk-BJSUSPWM.mjs.map +0 -1
  196. package/dist/chunk-EEEP2HBM.js +0 -2
  197. package/dist/chunk-EEEP2HBM.js.map +0 -1
  198. package/dist/chunk-FQUHP33M.js +0 -6
  199. package/dist/chunk-FQUHP33M.js.map +0 -1
  200. package/dist/chunk-HZWWJL43.mjs +0 -2
  201. package/dist/chunk-HZWWJL43.mjs.map +0 -1
  202. package/dist/chunk-JPUMGEAE.mjs +0 -6
  203. package/dist/chunk-JPUMGEAE.mjs.map +0 -1
  204. package/dist/chunk-LTU4LAD7.mjs +0 -2
  205. package/dist/chunk-LTU4LAD7.mjs.map +0 -1
  206. package/dist/chunk-NCNFFJRK.js +0 -2
  207. package/dist/chunk-NCNFFJRK.js.map +0 -1
  208. package/dist/framework/cli/commander/index.d.mts +0 -5
  209. package/dist/framework/cli/commander/index.d.ts +0 -5
  210. package/dist/framework/cli/commander/index.js +0 -2
  211. package/dist/framework/cli/commander/index.js.map +0 -1
  212. package/dist/framework/cli/commander/index.mjs +0 -2
  213. package/dist/framework/cli/commander/index.mjs.map +0 -1
  214. package/dist/framework/cli/index.js +0 -2
  215. package/dist/framework/cli/index.js.map +0 -1
  216. package/dist/framework/cli/index.mjs.map +0 -1
  217. package/dist/framework/next/index-browser.js +0 -2
  218. package/dist/framework/next/index-browser.js.map +0 -1
  219. package/dist/framework/next/index-browser.mjs.map +0 -1
  220. package/dist/framework/next/index-server.js +0 -2
  221. package/dist/framework/next/index-server.js.map +0 -1
  222. package/dist/framework/next/index-server.mjs.map +0 -1
  223. package/dist/framework/next/routes/pages/redoc/index.js +0 -8
  224. package/dist/framework/next/routes/pages/redoc/index.js.map +0 -1
  225. package/dist/framework/next/routes/pages/redoc/index.mjs.map +0 -1
  226. package/dist/framework/next/routes/pages/swagger/index.js +0 -8
  227. package/dist/framework/next/routes/pages/swagger/index.js.map +0 -1
  228. package/dist/framework/next/routes/pages/swagger/index.mjs.map +0 -1
  229. package/dist/index-browser-Cy6Ywaan.d.mts +0 -30
  230. package/dist/index-browser-Cy6Ywaan.d.ts +0 -30
  231. package/dist/index-browser.js +0 -2
  232. package/dist/index-browser.js.map +0 -1
  233. package/dist/index-browser.mjs.map +0 -1
  234. package/dist/index-server.js +0 -3
  235. package/dist/index-server.js.map +0 -1
  236. package/dist/index-server.mjs.map +0 -1
  237. package/dist/swagger-handler-BPZJNDgC.d.mts +0 -17
  238. package/dist/swagger-handler-BPZJNDgC.d.ts +0 -17
package/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## @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)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **api-platform:** finalize packem config with validation and node10 compat ([8c48298](https://github.com/visulima/visulima/commit/8c4829837117aae855c0a2aad0ceee6a41122483))
6
+ * **api-platform:** fix packem build with externals and isolated declarations ([2849a72](https://github.com/visulima/visulima/commit/2849a729ec5e08f0a2ba74abfdb4d3d398e07c87))
7
+ * remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * **api-platform:** add tsconfig.eslint.json for type-aware linting ([f7a49f0](https://github.com/visulima/visulima/commit/f7a49f0eba9d28d3c93c19a5460ae6673bf86d62))
12
+ * **api-platform:** migrate .prettierrc.cjs to prettier.config.js ([6273cfa](https://github.com/visulima/visulima/commit/6273cfad25dee29a972346b6a0fa94819bf4ec63))
13
+ * **api-platform:** sort package.json fields ([a965510](https://github.com/visulima/visulima/commit/a96551017e9f032ecbf5cc73e848c0bd9b7f25d6))
14
+ * **api:** remove empty dependency objects from package.json ([f6bfc85](https://github.com/visulima/visulima/commit/f6bfc85c48c973ff8ea0a7db5951794ae0ea3efb))
15
+ * **connect:** apply prettier formatting ([8ecf930](https://github.com/visulima/visulima/commit/8ecf93071cb0087a8c49520cc594a753dba5e39d))
16
+ * update bundled dependency licenses ([6ace4c6](https://github.com/visulima/visulima/commit/6ace4c69d41fc1fd0a744fbca8ca219ba631b4ab))
17
+
18
+ ### Build System
19
+
20
+ * **api-platform, crud:** migrate from tsup to packem ([e8aadac](https://github.com/visulima/visulima/commit/e8aadac072738c7c75e3a6a1478318922f2ceeac))
21
+
22
+
23
+ ### Dependencies
24
+
25
+ * **@visulima/connect:** upgraded to 4.0.0-alpha.8
26
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.7
27
+ * **@visulima/jsdoc-open-api:** upgraded to 3.0.0-alpha.7
28
+ * **@visulima/path:** upgraded to 3.0.0-alpha.8
29
+ * **@visulima/crud:** upgraded to 3.0.0-alpha.9
30
+
1
31
  ## @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
32
 
3
33
  ### 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,3 @@
1
+ import type { ErrorHandler } from "./types.d.d.cts";
2
+ declare const jsonapiErrorHandler: ErrorHandler;
3
+ export = jsonapiErrorHandler;
@@ -0,0 +1,3 @@
1
+ import type { ErrorHandler } from "./types.d.d.mts";
2
+ declare const jsonapiErrorHandler: ErrorHandler;
3
+ export default jsonapiErrorHandler;
@@ -0,0 +1,3 @@
1
+ import type { ErrorHandler } from "./types.d.d.ts";
2
+ declare const jsonapiErrorHandler: ErrorHandler;
3
+ export = jsonapiErrorHandler;
@@ -0,0 +1,7 @@
1
+ import type { ErrorHandler } from "./types.d.d.cts";
2
+ /**
3
+ * Normalizes errors according to the API Problem spec (RFC 7807).
4
+ * @see https://tools.ietf.org/html/rfc7807
5
+ */
6
+ declare const problemErrorHandler: ErrorHandler;
7
+ export = problemErrorHandler;
@@ -0,0 +1,7 @@
1
+ import type { ErrorHandler } from "./types.d.d.mts";
2
+ /**
3
+ * Normalizes errors according to the API Problem spec (RFC 7807).
4
+ * @see https://tools.ietf.org/html/rfc7807
5
+ */
6
+ declare const problemErrorHandler: ErrorHandler;
7
+ export default problemErrorHandler;
@@ -0,0 +1,7 @@
1
+ import type { ErrorHandler } from "./types.d.d.ts";
2
+ /**
3
+ * Normalizes errors according to the API Problem spec (RFC 7807).
4
+ * @see https://tools.ietf.org/html/rfc7807
5
+ */
6
+ declare const problemErrorHandler: ErrorHandler;
7
+ export = problemErrorHandler;
@@ -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;
@@ -0,0 +1,4 @@
1
+ import type { Express } from "express";
2
+ import type { Route } from "./types.d.cts";
3
+ declare const expressRoutes: (app: Express) => Route[];
4
+ export = expressRoutes;