@strapi/openapi 0.0.0-experimental.0008b7f1c9e3678ad260dac74a24f2d9f8d8a5c7

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 (281) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +77 -0
  3. package/dist/assemblers/document/factory.d.ts +8 -0
  4. package/dist/assemblers/document/factory.d.ts.map +1 -0
  5. package/dist/assemblers/document/factory.js +38 -0
  6. package/dist/assemblers/document/factory.js.map +1 -0
  7. package/dist/assemblers/document/factory.mjs +36 -0
  8. package/dist/assemblers/document/factory.mjs.map +1 -0
  9. package/dist/assemblers/document/index.d.ts +5 -0
  10. package/dist/assemblers/document/index.d.ts.map +1 -0
  11. package/dist/assemblers/document/info.d.ts +8 -0
  12. package/dist/assemblers/document/info.d.ts.map +1 -0
  13. package/dist/assemblers/document/info.js +32 -0
  14. package/dist/assemblers/document/info.js.map +1 -0
  15. package/dist/assemblers/document/info.mjs +30 -0
  16. package/dist/assemblers/document/info.mjs.map +1 -0
  17. package/dist/assemblers/document/metadata.d.ts +6 -0
  18. package/dist/assemblers/document/metadata.d.ts.map +1 -0
  19. package/dist/assemblers/document/metadata.js +23 -0
  20. package/dist/assemblers/document/metadata.js.map +1 -0
  21. package/dist/assemblers/document/metadata.mjs +21 -0
  22. package/dist/assemblers/document/metadata.mjs.map +1 -0
  23. package/dist/assemblers/document/path/factory.d.ts +6 -0
  24. package/dist/assemblers/document/path/factory.d.ts.map +1 -0
  25. package/dist/assemblers/document/path/factory.js +27 -0
  26. package/dist/assemblers/document/path/factory.js.map +1 -0
  27. package/dist/assemblers/document/path/factory.mjs +25 -0
  28. package/dist/assemblers/document/path/factory.mjs.map +1 -0
  29. package/dist/assemblers/document/path/index.d.ts +4 -0
  30. package/dist/assemblers/document/path/index.d.ts.map +1 -0
  31. package/dist/assemblers/document/path/path-item/factory.d.ts +6 -0
  32. package/dist/assemblers/document/path/path-item/factory.d.ts.map +1 -0
  33. package/dist/assemblers/document/path/path-item/factory.js +26 -0
  34. package/dist/assemblers/document/path/path-item/factory.js.map +1 -0
  35. package/dist/assemblers/document/path/path-item/factory.mjs +24 -0
  36. package/dist/assemblers/document/path/path-item/factory.mjs.map +1 -0
  37. package/dist/assemblers/document/path/path-item/index.d.ts +4 -0
  38. package/dist/assemblers/document/path/path-item/index.d.ts.map +1 -0
  39. package/dist/assemblers/document/path/path-item/operation/body.d.ts +7 -0
  40. package/dist/assemblers/document/path/path-item/operation/body.d.ts.map +1 -0
  41. package/dist/assemblers/document/path/path-item/operation/body.js +27 -0
  42. package/dist/assemblers/document/path/path-item/operation/body.js.map +1 -0
  43. package/dist/assemblers/document/path/path-item/operation/body.mjs +25 -0
  44. package/dist/assemblers/document/path/path-item/operation/body.mjs.map +1 -0
  45. package/dist/assemblers/document/path/path-item/operation/factory.d.ts +10 -0
  46. package/dist/assemblers/document/path/path-item/operation/factory.d.ts.map +1 -0
  47. package/dist/assemblers/document/path/path-item/operation/factory.js +37 -0
  48. package/dist/assemblers/document/path/path-item/operation/factory.js.map +1 -0
  49. package/dist/assemblers/document/path/path-item/operation/factory.mjs +35 -0
  50. package/dist/assemblers/document/path/path-item/operation/factory.mjs.map +1 -0
  51. package/dist/assemblers/document/path/path-item/operation/index.d.ts +8 -0
  52. package/dist/assemblers/document/path/path-item/operation/index.d.ts.map +1 -0
  53. package/dist/assemblers/document/path/path-item/operation/operation-id.d.ts +10 -0
  54. package/dist/assemblers/document/path/path-item/operation/operation-id.d.ts.map +1 -0
  55. package/dist/assemblers/document/path/path-item/operation/operation-id.js +47 -0
  56. package/dist/assemblers/document/path/path-item/operation/operation-id.js.map +1 -0
  57. package/dist/assemblers/document/path/path-item/operation/operation-id.mjs +45 -0
  58. package/dist/assemblers/document/path/path-item/operation/operation-id.mjs.map +1 -0
  59. package/dist/assemblers/document/path/path-item/operation/operation.d.ts +13 -0
  60. package/dist/assemblers/document/path/path-item/operation/operation.d.ts.map +1 -0
  61. package/dist/assemblers/document/path/path-item/operation/operation.js +51 -0
  62. package/dist/assemblers/document/path/path-item/operation/operation.js.map +1 -0
  63. package/dist/assemblers/document/path/path-item/operation/operation.mjs +49 -0
  64. package/dist/assemblers/document/path/path-item/operation/operation.mjs.map +1 -0
  65. package/dist/assemblers/document/path/path-item/operation/parameters.d.ts +9 -0
  66. package/dist/assemblers/document/path/path-item/operation/parameters.d.ts.map +1 -0
  67. package/dist/assemblers/document/path/path-item/operation/parameters.js +67 -0
  68. package/dist/assemblers/document/path/path-item/operation/parameters.js.map +1 -0
  69. package/dist/assemblers/document/path/path-item/operation/parameters.mjs +65 -0
  70. package/dist/assemblers/document/path/path-item/operation/parameters.mjs.map +1 -0
  71. package/dist/assemblers/document/path/path-item/operation/responses.d.ts +8 -0
  72. package/dist/assemblers/document/path/path-item/operation/responses.d.ts.map +1 -0
  73. package/dist/assemblers/document/path/path-item/operation/responses.js +51 -0
  74. package/dist/assemblers/document/path/path-item/operation/responses.js.map +1 -0
  75. package/dist/assemblers/document/path/path-item/operation/responses.mjs +49 -0
  76. package/dist/assemblers/document/path/path-item/operation/responses.mjs.map +1 -0
  77. package/dist/assemblers/document/path/path-item/operation/tags.d.ts +7 -0
  78. package/dist/assemblers/document/path/path-item/operation/tags.d.ts.map +1 -0
  79. package/dist/assemblers/document/path/path-item/operation/tags.js +25 -0
  80. package/dist/assemblers/document/path/path-item/operation/tags.js.map +1 -0
  81. package/dist/assemblers/document/path/path-item/operation/tags.mjs +23 -0
  82. package/dist/assemblers/document/path/path-item/operation/tags.mjs.map +1 -0
  83. package/dist/assemblers/document/path/path-item/path-item.d.ts +13 -0
  84. package/dist/assemblers/document/path/path-item/path-item.d.ts.map +1 -0
  85. package/dist/assemblers/document/path/path-item/path-item.js +53 -0
  86. package/dist/assemblers/document/path/path-item/path-item.js.map +1 -0
  87. package/dist/assemblers/document/path/path-item/path-item.mjs +51 -0
  88. package/dist/assemblers/document/path/path-item/path-item.mjs.map +1 -0
  89. package/dist/assemblers/document/path/path.d.ts +10 -0
  90. package/dist/assemblers/document/path/path.d.ts.map +1 -0
  91. package/dist/assemblers/document/path/path.js +28 -0
  92. package/dist/assemblers/document/path/path.js.map +1 -0
  93. package/dist/assemblers/document/path/path.mjs +26 -0
  94. package/dist/assemblers/document/path/path.mjs.map +1 -0
  95. package/dist/assemblers/index.d.ts +3 -0
  96. package/dist/assemblers/index.d.ts.map +1 -0
  97. package/dist/assemblers/types.d.ts +18 -0
  98. package/dist/assemblers/types.d.ts.map +1 -0
  99. package/dist/constants.d.ts +3 -0
  100. package/dist/constants.d.ts.map +1 -0
  101. package/dist/constants.js +8 -0
  102. package/dist/constants.js.map +1 -0
  103. package/dist/constants.mjs +5 -0
  104. package/dist/constants.mjs.map +1 -0
  105. package/dist/context/factories/abstract.d.ts +11 -0
  106. package/dist/context/factories/abstract.d.ts.map +1 -0
  107. package/dist/context/factories/abstract.js +38 -0
  108. package/dist/context/factories/abstract.js.map +1 -0
  109. package/dist/context/factories/abstract.mjs +36 -0
  110. package/dist/context/factories/abstract.mjs.map +1 -0
  111. package/dist/context/factories/document.d.ts +11 -0
  112. package/dist/context/factories/document.d.ts.map +1 -0
  113. package/dist/context/factories/document.js +20 -0
  114. package/dist/context/factories/document.js.map +1 -0
  115. package/dist/context/factories/document.mjs +18 -0
  116. package/dist/context/factories/document.mjs.map +1 -0
  117. package/dist/context/factories/index.d.ts +6 -0
  118. package/dist/context/factories/index.d.ts.map +1 -0
  119. package/dist/context/factories/operation.d.ts +11 -0
  120. package/dist/context/factories/operation.d.ts.map +1 -0
  121. package/dist/context/factories/operation.js +20 -0
  122. package/dist/context/factories/operation.js.map +1 -0
  123. package/dist/context/factories/operation.mjs +18 -0
  124. package/dist/context/factories/operation.mjs.map +1 -0
  125. package/dist/context/factories/path-item.d.ts +10 -0
  126. package/dist/context/factories/path-item.d.ts.map +1 -0
  127. package/dist/context/factories/path-item.js +20 -0
  128. package/dist/context/factories/path-item.js.map +1 -0
  129. package/dist/context/factories/path-item.mjs +18 -0
  130. package/dist/context/factories/path-item.mjs.map +1 -0
  131. package/dist/context/factories/path.d.ts +10 -0
  132. package/dist/context/factories/path.d.ts.map +1 -0
  133. package/dist/context/factories/path.js +20 -0
  134. package/dist/context/factories/path.js.map +1 -0
  135. package/dist/context/factories/path.mjs +18 -0
  136. package/dist/context/factories/path.mjs.map +1 -0
  137. package/dist/context/index.d.ts +3 -0
  138. package/dist/context/index.d.ts.map +1 -0
  139. package/dist/context/types.d.ts +28 -0
  140. package/dist/context/types.d.ts.map +1 -0
  141. package/dist/exports.d.ts +35 -0
  142. package/dist/exports.d.ts.map +1 -0
  143. package/dist/exports.js +76 -0
  144. package/dist/exports.js.map +1 -0
  145. package/dist/exports.mjs +74 -0
  146. package/dist/exports.mjs.map +1 -0
  147. package/dist/generator/generator.d.ts +29 -0
  148. package/dist/generator/generator.d.ts.map +1 -0
  149. package/dist/generator/generator.js +85 -0
  150. package/dist/generator/generator.js.map +1 -0
  151. package/dist/generator/generator.mjs +83 -0
  152. package/dist/generator/generator.mjs.map +1 -0
  153. package/dist/generator/index.d.ts +3 -0
  154. package/dist/generator/index.d.ts.map +1 -0
  155. package/dist/generator/types.d.ts +12 -0
  156. package/dist/generator/types.d.ts.map +1 -0
  157. package/dist/index.d.ts +2 -0
  158. package/dist/index.d.ts.map +1 -0
  159. package/dist/index.js +8 -0
  160. package/dist/index.js.map +1 -0
  161. package/dist/index.mjs +2 -0
  162. package/dist/index.mjs.map +1 -0
  163. package/dist/post-processor/component-writer.d.ts +6 -0
  164. package/dist/post-processor/component-writer.d.ts.map +1 -0
  165. package/dist/post-processor/component-writer.js +39 -0
  166. package/dist/post-processor/component-writer.js.map +1 -0
  167. package/dist/post-processor/component-writer.mjs +17 -0
  168. package/dist/post-processor/component-writer.mjs.map +1 -0
  169. package/dist/post-processor/factory.d.ts +5 -0
  170. package/dist/post-processor/factory.d.ts.map +1 -0
  171. package/dist/post-processor/factory.js +14 -0
  172. package/dist/post-processor/factory.js.map +1 -0
  173. package/dist/post-processor/factory.mjs +12 -0
  174. package/dist/post-processor/factory.mjs.map +1 -0
  175. package/dist/post-processor/index.d.ts +4 -0
  176. package/dist/post-processor/index.d.ts.map +1 -0
  177. package/dist/post-processor/types.d.ts +5 -0
  178. package/dist/post-processor/types.d.ts.map +1 -0
  179. package/dist/pre-processor/factory.d.ts +5 -0
  180. package/dist/pre-processor/factory.d.ts.map +1 -0
  181. package/dist/pre-processor/factory.js +10 -0
  182. package/dist/pre-processor/factory.js.map +1 -0
  183. package/dist/pre-processor/factory.mjs +8 -0
  184. package/dist/pre-processor/factory.mjs.map +1 -0
  185. package/dist/pre-processor/index.d.ts +3 -0
  186. package/dist/pre-processor/index.d.ts.map +1 -0
  187. package/dist/pre-processor/types.d.ts +5 -0
  188. package/dist/pre-processor/types.d.ts.map +1 -0
  189. package/dist/registries/factory.d.ts +4 -0
  190. package/dist/registries/factory.d.ts.map +1 -0
  191. package/dist/registries/factory.js +10 -0
  192. package/dist/registries/factory.js.map +1 -0
  193. package/dist/registries/factory.mjs +8 -0
  194. package/dist/registries/factory.mjs.map +1 -0
  195. package/dist/registries/index.d.ts +3 -0
  196. package/dist/registries/index.d.ts.map +1 -0
  197. package/dist/registries/types.d.ts +3 -0
  198. package/dist/registries/types.d.ts.map +1 -0
  199. package/dist/routes/collector.d.ts +29 -0
  200. package/dist/routes/collector.d.ts.map +1 -0
  201. package/dist/routes/collector.js +40 -0
  202. package/dist/routes/collector.js.map +1 -0
  203. package/dist/routes/collector.mjs +38 -0
  204. package/dist/routes/collector.mjs.map +1 -0
  205. package/dist/routes/index.d.ts +7 -0
  206. package/dist/routes/index.d.ts.map +1 -0
  207. package/dist/routes/matcher.d.ts +25 -0
  208. package/dist/routes/matcher.d.ts.map +1 -0
  209. package/dist/routes/matcher.js +24 -0
  210. package/dist/routes/matcher.js.map +1 -0
  211. package/dist/routes/matcher.mjs +22 -0
  212. package/dist/routes/matcher.mjs.map +1 -0
  213. package/dist/routes/providers/abstract.d.ts +35 -0
  214. package/dist/routes/providers/abstract.d.ts.map +1 -0
  215. package/dist/routes/providers/abstract.js +29 -0
  216. package/dist/routes/providers/abstract.js.map +1 -0
  217. package/dist/routes/providers/abstract.mjs +27 -0
  218. package/dist/routes/providers/abstract.mjs.map +1 -0
  219. package/dist/routes/providers/admin.d.ts +6 -0
  220. package/dist/routes/providers/admin.d.ts.map +1 -0
  221. package/dist/routes/providers/admin.js +19 -0
  222. package/dist/routes/providers/admin.js.map +1 -0
  223. package/dist/routes/providers/admin.mjs +17 -0
  224. package/dist/routes/providers/admin.mjs.map +1 -0
  225. package/dist/routes/providers/api.d.ts +22 -0
  226. package/dist/routes/providers/api.d.ts.map +1 -0
  227. package/dist/routes/providers/api.js +35 -0
  228. package/dist/routes/providers/api.js.map +1 -0
  229. package/dist/routes/providers/api.mjs +33 -0
  230. package/dist/routes/providers/api.mjs.map +1 -0
  231. package/dist/routes/providers/index.d.ts +6 -0
  232. package/dist/routes/providers/index.d.ts.map +1 -0
  233. package/dist/routes/providers/plugin.d.ts +23 -0
  234. package/dist/routes/providers/plugin.d.ts.map +1 -0
  235. package/dist/routes/providers/plugin.js +47 -0
  236. package/dist/routes/providers/plugin.js.map +1 -0
  237. package/dist/routes/providers/plugin.mjs +45 -0
  238. package/dist/routes/providers/plugin.mjs.map +1 -0
  239. package/dist/routes/providers/types.d.ts +13 -0
  240. package/dist/routes/providers/types.d.ts.map +1 -0
  241. package/dist/routes/rules/index.d.ts +2 -0
  242. package/dist/routes/rules/index.d.ts.map +1 -0
  243. package/dist/routes/rules/is-of-type.d.ts +3 -0
  244. package/dist/routes/rules/is-of-type.d.ts.map +1 -0
  245. package/dist/routes/rules/is-of-type.js +8 -0
  246. package/dist/routes/rules/is-of-type.js.map +1 -0
  247. package/dist/routes/rules/is-of-type.mjs +6 -0
  248. package/dist/routes/rules/is-of-type.mjs.map +1 -0
  249. package/dist/routes/types.d.ts +6 -0
  250. package/dist/routes/types.d.ts.map +1 -0
  251. package/dist/types.d.ts +14 -0
  252. package/dist/types.d.ts.map +1 -0
  253. package/dist/utils/debug.d.ts +3 -0
  254. package/dist/utils/debug.d.ts.map +1 -0
  255. package/dist/utils/debug.js +15 -0
  256. package/dist/utils/debug.js.map +1 -0
  257. package/dist/utils/debug.mjs +9 -0
  258. package/dist/utils/debug.mjs.map +1 -0
  259. package/dist/utils/index.d.ts +4 -0
  260. package/dist/utils/index.d.ts.map +1 -0
  261. package/dist/utils/timer/factory.d.ts +5 -0
  262. package/dist/utils/timer/factory.d.ts.map +1 -0
  263. package/dist/utils/timer/factory.js +12 -0
  264. package/dist/utils/timer/factory.js.map +1 -0
  265. package/dist/utils/timer/factory.mjs +10 -0
  266. package/dist/utils/timer/factory.mjs.map +1 -0
  267. package/dist/utils/timer/index.d.ts +3 -0
  268. package/dist/utils/timer/index.d.ts.map +1 -0
  269. package/dist/utils/timer/timer.d.ts +14 -0
  270. package/dist/utils/timer/timer.d.ts.map +1 -0
  271. package/dist/utils/timer/timer.js +38 -0
  272. package/dist/utils/timer/timer.js.map +1 -0
  273. package/dist/utils/timer/timer.mjs +36 -0
  274. package/dist/utils/timer/timer.mjs.map +1 -0
  275. package/dist/utils/zod.d.ts +39 -0
  276. package/dist/utils/zod.d.ts.map +1 -0
  277. package/dist/utils/zod.js +87 -0
  278. package/dist/utils/zod.js.map +1 -0
  279. package/dist/utils/zod.mjs +64 -0
  280. package/dist/utils/zod.mjs.map +1 -0
  281. package/package.json +68 -0
@@ -0,0 +1,38 @@
1
+ import { createDebugger } from '../utils/debug.mjs';
2
+ import 'node:crypto';
3
+ import 'zod/v4';
4
+ import { RouteMatcher } from './matcher.mjs';
5
+
6
+ const debug = createDebugger('routes:collector');
7
+ /**
8
+ * Class responsible for collecting and filtering routes from multiple providers.
9
+ */ class RouteCollector {
10
+ /**
11
+ * Collects routes from all providers and filters them based on the matcher rules.
12
+ *
13
+ * @returns An array of {@link Core.Route} that pass the filter rules.
14
+ */ collect() {
15
+ const routes = this._providers.flatMap((provider)=>Array.from(provider));
16
+ const sanitizedRoutes = this.filter(routes);
17
+ debug('collected %o/%o routes from %o providers %o', sanitizedRoutes.length, routes.length, this._providers.length, this._providers.map((provider)=>provider.constructor.name));
18
+ return sanitizedRoutes;
19
+ }
20
+ /**
21
+ * Filters the given array of routes based on the matcher rules.
22
+ *
23
+ * @param routes - The list of routes to filter.
24
+ * @returns An array of routes that match the rules.
25
+ */ filter(routes) {
26
+ return routes.filter((route)=>this._matcher.match(route));
27
+ }
28
+ /**
29
+ * @param providers - An array of route providers to collect routes from. Defaults to an empty array.
30
+ * @param matcher - An instance of RouteMatcher to filter routes. Defaults to a new {@link RouteMatcher} with no rules.
31
+ */ constructor(providers = [], matcher = new RouteMatcher()){
32
+ this._providers = providers;
33
+ this._matcher = matcher;
34
+ }
35
+ }
36
+
37
+ export { RouteCollector };
38
+ //# sourceMappingURL=collector.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collector.mjs","sources":["../../src/routes/collector.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { createDebugger } from '../utils';\nimport { RouteMatcher } from './matcher';\n\nimport type { RoutesProvider } from './providers';\n\nconst debug = createDebugger('routes:collector');\n\n/**\n * Class responsible for collecting and filtering routes from multiple providers.\n */\nexport class RouteCollector {\n private readonly _providers: RoutesProvider[];\n\n private readonly _matcher: RouteMatcher;\n\n /**\n * @param providers - An array of route providers to collect routes from. Defaults to an empty array.\n * @param matcher - An instance of RouteMatcher to filter routes. Defaults to a new {@link RouteMatcher} with no rules.\n */\n constructor(providers: RoutesProvider[] = [], matcher: RouteMatcher = new RouteMatcher()) {\n this._providers = providers;\n this._matcher = matcher;\n }\n\n /**\n * Collects routes from all providers and filters them based on the matcher rules.\n *\n * @returns An array of {@link Core.Route} that pass the filter rules.\n */\n public collect(): Core.Route[] {\n const routes = this._providers.flatMap((provider) => Array.from(provider));\n const sanitizedRoutes = this.filter(routes);\n\n debug(\n 'collected %o/%o routes from %o providers %o',\n sanitizedRoutes.length,\n routes.length,\n this._providers.length,\n this._providers.map((provider) => provider.constructor.name)\n );\n\n return sanitizedRoutes;\n }\n\n /**\n * Filters the given array of routes based on the matcher rules.\n *\n * @param routes - The list of routes to filter.\n * @returns An array of routes that match the rules.\n */\n private filter(routes: Core.Route[]): Core.Route[] {\n return routes.filter((route) => this._matcher.match(route));\n }\n}\n"],"names":["debug","createDebugger","RouteCollector","collect","routes","_providers","flatMap","provider","Array","from","sanitizedRoutes","filter","length","map","name","route","_matcher","match","providers","matcher","RouteMatcher"],"mappings":";;;;;AAOA,MAAMA,QAAQC,cAAAA,CAAe,kBAAA,CAAA;AAE7B;;AAEC,IACM,MAAMC,cAAAA,CAAAA;AAcX;;;;AAIC,MACD,OAAOC,GAAwB;QAC7B,MAAMC,MAAAA,GAAS,IAAI,CAACC,UAAU,CAACC,OAAO,CAAC,CAACC,QAAAA,GAAaC,KAAAA,CAAMC,IAAI,CAACF,QAAAA,CAAAA,CAAAA;AAChE,QAAA,MAAMG,eAAAA,GAAkB,IAAI,CAACC,MAAM,CAACP,MAAAA,CAAAA;QAEpCJ,KAAAA,CACE,6CAAA,EACAU,eAAAA,CAAgBE,MAAM,EACtBR,MAAAA,CAAOQ,MAAM,EACb,IAAI,CAACP,UAAU,CAACO,MAAM,EACtB,IAAI,CAACP,UAAU,CAACQ,GAAG,CAAC,CAACN,QAAAA,GAAaA,QAAAA,CAAS,WAAW,CAACO,IAAI,CAAA,CAAA;QAG7D,OAAOJ,eAAAA;AACT,IAAA;AAEA;;;;;MAMQC,MAAAA,CAAOP,MAAoB,EAAgB;QACjD,OAAOA,MAAAA,CAAOO,MAAM,CAAC,CAACI,KAAAA,GAAU,IAAI,CAACC,QAAQ,CAACC,KAAK,CAACF,KAAAA,CAAAA,CAAAA;AACtD,IAAA;AArCA;;;AAGC,MACD,YAAYG,SAAAA,GAA8B,EAAE,EAAEC,OAAAA,GAAwB,IAAIC,cAAc,CAAE;QACxF,IAAI,CAACf,UAAU,GAAGa,SAAAA;QAClB,IAAI,CAACF,QAAQ,GAAGG,OAAAA;AAClB,IAAA;AA+BF;;;;"}
@@ -0,0 +1,7 @@
1
+ export { RouteCollector } from './collector';
2
+ export { RouteMatcher } from './matcher';
3
+ export { AbstractRoutesProvider, AdminRoutesProvider, ApiRoutesProvider, PluginRoutesProvider, } from './providers';
4
+ export * as rules from './rules';
5
+ export type { RoutesProvider } from './providers';
6
+ export type * from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Core } from '@strapi/types';
2
+ import type { MatcherRule } from './types';
3
+ /**
4
+ * Class responsible for matching routes based on provided rules.
5
+ */
6
+ export declare class RouteMatcher {
7
+ /**
8
+ * Array of rules to match routes against.
9
+ */
10
+ private readonly _rules;
11
+ /**
12
+ * @param rules - A list of matcher rules to apply. Defaults to an empty array.
13
+ */
14
+ constructor(rules?: MatcherRule[]);
15
+ /**
16
+ * Checks if a given route matches all provided rules.
17
+ *
18
+ * Exits early if any rule fails.
19
+ *
20
+ * @param route - The route to check.
21
+ * @returns `true` if the route satisfies all rules, otherwise `false`.
22
+ */
23
+ match(route: Core.Route): boolean;
24
+ }
25
+ //# sourceMappingURL=matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../../src/routes/matcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAY;IACvB;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC;;OAEG;gBACS,KAAK,GAAE,WAAW,EAAO;IAIrC;;;;;;;OAOG;IACH,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO;CAGlC"}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Class responsible for matching routes based on provided rules.
5
+ */ class RouteMatcher {
6
+ /**
7
+ * Checks if a given route matches all provided rules.
8
+ *
9
+ * Exits early if any rule fails.
10
+ *
11
+ * @param route - The route to check.
12
+ * @returns `true` if the route satisfies all rules, otherwise `false`.
13
+ */ match(route) {
14
+ return this._rules.every((rule)=>rule(route));
15
+ }
16
+ /**
17
+ * @param rules - A list of matcher rules to apply. Defaults to an empty array.
18
+ */ constructor(rules = []){
19
+ this._rules = rules;
20
+ }
21
+ }
22
+
23
+ exports.RouteMatcher = RouteMatcher;
24
+ //# sourceMappingURL=matcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matcher.js","sources":["../../src/routes/matcher.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport type { MatcherRule } from './types';\n\n/**\n * Class responsible for matching routes based on provided rules.\n */\nexport class RouteMatcher {\n /**\n * Array of rules to match routes against.\n */\n private readonly _rules: MatcherRule[];\n\n /**\n * @param rules - A list of matcher rules to apply. Defaults to an empty array.\n */\n constructor(rules: MatcherRule[] = []) {\n this._rules = rules;\n }\n\n /**\n * Checks if a given route matches all provided rules.\n *\n * Exits early if any rule fails.\n *\n * @param route - The route to check.\n * @returns `true` if the route satisfies all rules, otherwise `false`.\n */\n match(route: Core.Route): boolean {\n return this._rules.every((rule) => rule(route));\n }\n}\n"],"names":["RouteMatcher","match","route","_rules","every","rule","rules"],"mappings":";;AAIA;;AAEC,IACM,MAAMA,YAAAA,CAAAA;AAaX;;;;;;;MAQAC,KAAAA,CAAMC,KAAiB,EAAW;QAChC,OAAO,IAAI,CAACC,MAAM,CAACC,KAAK,CAAC,CAACC,OAASA,IAAAA,CAAKH,KAAAA,CAAAA,CAAAA;AAC1C,IAAA;AAjBA;;MAGA,WAAA,CAAYI,KAAAA,GAAuB,EAAE,CAAE;QACrC,IAAI,CAACH,MAAM,GAAGG,KAAAA;AAChB,IAAA;AAaF;;;;"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Class responsible for matching routes based on provided rules.
3
+ */ class RouteMatcher {
4
+ /**
5
+ * Checks if a given route matches all provided rules.
6
+ *
7
+ * Exits early if any rule fails.
8
+ *
9
+ * @param route - The route to check.
10
+ * @returns `true` if the route satisfies all rules, otherwise `false`.
11
+ */ match(route) {
12
+ return this._rules.every((rule)=>rule(route));
13
+ }
14
+ /**
15
+ * @param rules - A list of matcher rules to apply. Defaults to an empty array.
16
+ */ constructor(rules = []){
17
+ this._rules = rules;
18
+ }
19
+ }
20
+
21
+ export { RouteMatcher };
22
+ //# sourceMappingURL=matcher.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matcher.mjs","sources":["../../src/routes/matcher.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport type { MatcherRule } from './types';\n\n/**\n * Class responsible for matching routes based on provided rules.\n */\nexport class RouteMatcher {\n /**\n * Array of rules to match routes against.\n */\n private readonly _rules: MatcherRule[];\n\n /**\n * @param rules - A list of matcher rules to apply. Defaults to an empty array.\n */\n constructor(rules: MatcherRule[] = []) {\n this._rules = rules;\n }\n\n /**\n * Checks if a given route matches all provided rules.\n *\n * Exits early if any rule fails.\n *\n * @param route - The route to check.\n * @returns `true` if the route satisfies all rules, otherwise `false`.\n */\n match(route: Core.Route): boolean {\n return this._rules.every((rule) => rule(route));\n }\n}\n"],"names":["RouteMatcher","match","route","_rules","every","rule","rules"],"mappings":"AAIA;;AAEC,IACM,MAAMA,YAAAA,CAAAA;AAaX;;;;;;;MAQAC,KAAAA,CAAMC,KAAiB,EAAW;QAChC,OAAO,IAAI,CAACC,MAAM,CAACC,KAAK,CAAC,CAACC,OAASA,IAAAA,CAAKH,KAAAA,CAAAA,CAAAA;AAC1C,IAAA;AAjBA;;MAGA,WAAA,CAAYI,KAAAA,GAAuB,EAAE,CAAE;QACrC,IAAI,CAACH,MAAM,GAAGG,KAAAA;AAChB,IAAA;AAaF;;;;"}
@@ -0,0 +1,35 @@
1
+ import type { Core } from '@strapi/types';
2
+ import type { RoutesProvider } from './types';
3
+ /**
4
+ * Abstract class representing a provider for routes.
5
+ *
6
+ * This class provides a base implementation for classes that manage and provide
7
+ * routes from Strapi.
8
+ *
9
+ * @implements {@link RoutesProvider}
10
+ */
11
+ export declare abstract class AbstractRoutesProvider implements RoutesProvider {
12
+ /**
13
+ * Reference to the Strapi instance.
14
+ */
15
+ protected readonly _strapi: Core.Strapi;
16
+ /**
17
+ * @param strapi - The Strapi instance used to retrieve and manage routes.
18
+ */
19
+ constructor(strapi: Core.Strapi);
20
+ /**
21
+ * Retrieves an array of routes.
22
+ *
23
+ * Classes extending this abstract class must provide their own implementation
24
+ * for returning the list of routes they manage.
25
+ */
26
+ abstract get routes(): Core.Route[];
27
+ /**
28
+ * Iterator to traverse the routes.
29
+ *
30
+ * This generator function allows iterating over the {@link Core.Route} objects
31
+ * managed by this provider and yielding them one at a time.
32
+ */
33
+ [Symbol.iterator](): Iterator<Core.Route>;
34
+ }
35
+ //# sourceMappingURL=abstract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/abstract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,8BAAsB,sBAAuB,YAAW,cAAc;IACpE;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;IAExC;;OAEG;gBACgB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC;;;;;OAKG;IACH,aAAoB,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;IAE3C;;;;;OAKG;IACK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;CAKlD"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Abstract class representing a provider for routes.
5
+ *
6
+ * This class provides a base implementation for classes that manage and provide
7
+ * routes from Strapi.
8
+ *
9
+ * @implements {@link RoutesProvider}
10
+ */ class AbstractRoutesProvider {
11
+ /**
12
+ * Iterator to traverse the routes.
13
+ *
14
+ * This generator function allows iterating over the {@link Core.Route} objects
15
+ * managed by this provider and yielding them one at a time.
16
+ */ *[Symbol.iterator]() {
17
+ for (const route of this.routes){
18
+ yield route;
19
+ }
20
+ }
21
+ /**
22
+ * @param strapi - The Strapi instance used to retrieve and manage routes.
23
+ */ constructor(strapi){
24
+ this._strapi = strapi;
25
+ }
26
+ }
27
+
28
+ exports.AbstractRoutesProvider = AbstractRoutesProvider;
29
+ //# sourceMappingURL=abstract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract.js","sources":["../../../src/routes/providers/abstract.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport type { RoutesProvider } from './types';\n\n/**\n * Abstract class representing a provider for routes.\n *\n * This class provides a base implementation for classes that manage and provide\n * routes from Strapi.\n *\n * @implements {@link RoutesProvider}\n */\nexport abstract class AbstractRoutesProvider implements RoutesProvider {\n /**\n * Reference to the Strapi instance.\n */\n protected readonly _strapi: Core.Strapi;\n\n /**\n * @param strapi - The Strapi instance used to retrieve and manage routes.\n */\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * Retrieves an array of routes.\n *\n * Classes extending this abstract class must provide their own implementation\n * for returning the list of routes they manage.\n */\n public abstract get routes(): Core.Route[];\n\n /**\n * Iterator to traverse the routes.\n *\n * This generator function allows iterating over the {@link Core.Route} objects\n * managed by this provider and yielding them one at a time.\n */\n public *[Symbol.iterator](): Iterator<Core.Route> {\n for (const route of this.routes) {\n yield route;\n }\n }\n}\n"],"names":["AbstractRoutesProvider","Symbol","iterator","route","routes","strapi","_strapi"],"mappings":";;AAIA;;;;;;;AAOC,IACM,MAAeA,sBAAAA,CAAAA;AAqBpB;;;;;AAKC,MACD,EAASC,MAAAA,CAAOC,QAAQ,CAAC,GAAyB;AAChD,QAAA,KAAK,MAAMC,KAAAA,IAAS,IAAI,CAACC,MAAM,CAAE;YAC/B,MAAMD,KAAAA;AACR,QAAA;AACF,IAAA;AAzBA;;MAGA,WAAA,CAAmBE,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB,IAAA;AAqBF;;;;"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Abstract class representing a provider for routes.
3
+ *
4
+ * This class provides a base implementation for classes that manage and provide
5
+ * routes from Strapi.
6
+ *
7
+ * @implements {@link RoutesProvider}
8
+ */ class AbstractRoutesProvider {
9
+ /**
10
+ * Iterator to traverse the routes.
11
+ *
12
+ * This generator function allows iterating over the {@link Core.Route} objects
13
+ * managed by this provider and yielding them one at a time.
14
+ */ *[Symbol.iterator]() {
15
+ for (const route of this.routes){
16
+ yield route;
17
+ }
18
+ }
19
+ /**
20
+ * @param strapi - The Strapi instance used to retrieve and manage routes.
21
+ */ constructor(strapi){
22
+ this._strapi = strapi;
23
+ }
24
+ }
25
+
26
+ export { AbstractRoutesProvider };
27
+ //# sourceMappingURL=abstract.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract.mjs","sources":["../../../src/routes/providers/abstract.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport type { RoutesProvider } from './types';\n\n/**\n * Abstract class representing a provider for routes.\n *\n * This class provides a base implementation for classes that manage and provide\n * routes from Strapi.\n *\n * @implements {@link RoutesProvider}\n */\nexport abstract class AbstractRoutesProvider implements RoutesProvider {\n /**\n * Reference to the Strapi instance.\n */\n protected readonly _strapi: Core.Strapi;\n\n /**\n * @param strapi - The Strapi instance used to retrieve and manage routes.\n */\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * Retrieves an array of routes.\n *\n * Classes extending this abstract class must provide their own implementation\n * for returning the list of routes they manage.\n */\n public abstract get routes(): Core.Route[];\n\n /**\n * Iterator to traverse the routes.\n *\n * This generator function allows iterating over the {@link Core.Route} objects\n * managed by this provider and yielding them one at a time.\n */\n public *[Symbol.iterator](): Iterator<Core.Route> {\n for (const route of this.routes) {\n yield route;\n }\n }\n}\n"],"names":["AbstractRoutesProvider","Symbol","iterator","route","routes","strapi","_strapi"],"mappings":"AAIA;;;;;;;AAOC,IACM,MAAeA,sBAAAA,CAAAA;AAqBpB;;;;;AAKC,MACD,EAASC,MAAAA,CAAOC,QAAQ,CAAC,GAAyB;AAChD,QAAA,KAAK,MAAMC,KAAAA,IAAS,IAAI,CAACC,MAAM,CAAE;YAC/B,MAAMD,KAAAA;AACR,QAAA;AACF,IAAA;AAzBA;;MAGA,WAAA,CAAmBE,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB,IAAA;AAqBF;;;;"}
@@ -0,0 +1,6 @@
1
+ import type { Core } from '@strapi/types';
2
+ import { AbstractRoutesProvider } from './abstract';
3
+ export declare class AdminRoutesProvider extends AbstractRoutesProvider {
4
+ get routes(): Core.Route[];
5
+ }
6
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIpD,qBAAa,mBAAoB,SAAQ,sBAAsB;IAC7D,IAAW,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAQhC;CACF"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var debug$1 = require('../../utils/debug.js');
4
+ require('node:crypto');
5
+ require('zod/v4');
6
+ var abstract = require('./abstract.js');
7
+
8
+ const debug = debug$1.createDebugger('routes:provider:admin');
9
+ class AdminRoutesProvider extends abstract.AbstractRoutesProvider {
10
+ get routes() {
11
+ const { admin } = this._strapi;
12
+ const routes = Object.values(admin.routes).flatMap((router)=>router.routes);
13
+ debug('found %o routes in Strapi admin', routes.length);
14
+ return routes;
15
+ }
16
+ }
17
+
18
+ exports.AdminRoutesProvider = AdminRoutesProvider;
19
+ //# sourceMappingURL=admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.js","sources":["../../../src/routes/providers/admin.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { createDebugger } from '../../utils';\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:admin');\n\nexport class AdminRoutesProvider extends AbstractRoutesProvider {\n public get routes(): Core.Route[] {\n const { admin } = this._strapi;\n\n const routes = Object.values(admin.routes).flatMap((router) => router.routes);\n\n debug('found %o routes in Strapi admin', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","AdminRoutesProvider","AbstractRoutesProvider","routes","admin","_strapi","Object","values","flatMap","router","length"],"mappings":";;;;;;;AAKA,MAAMA,QAAQC,sBAAAA,CAAe,uBAAA,CAAA;AAEtB,MAAMC,mBAAAA,SAA4BC,+BAAAA,CAAAA;AACvC,IAAA,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAI,CAACC,OAAO;AAE9B,QAAA,MAAMF,MAAAA,GAASG,MAAAA,CAAOC,MAAM,CAACH,KAAAA,CAAMD,MAAM,CAAA,CAAEK,OAAO,CAAC,CAACC,MAAAA,GAAWA,MAAAA,CAAON,MAAM,CAAA;QAE5EJ,KAAAA,CAAM,iCAAA,EAAmCI,OAAOO,MAAM,CAAA;QAEtD,OAAOP,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,17 @@
1
+ import { createDebugger } from '../../utils/debug.mjs';
2
+ import 'node:crypto';
3
+ import 'zod/v4';
4
+ import { AbstractRoutesProvider } from './abstract.mjs';
5
+
6
+ const debug = createDebugger('routes:provider:admin');
7
+ class AdminRoutesProvider extends AbstractRoutesProvider {
8
+ get routes() {
9
+ const { admin } = this._strapi;
10
+ const routes = Object.values(admin.routes).flatMap((router)=>router.routes);
11
+ debug('found %o routes in Strapi admin', routes.length);
12
+ return routes;
13
+ }
14
+ }
15
+
16
+ export { AdminRoutesProvider };
17
+ //# sourceMappingURL=admin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.mjs","sources":["../../../src/routes/providers/admin.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { createDebugger } from '../../utils';\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:admin');\n\nexport class AdminRoutesProvider extends AbstractRoutesProvider {\n public get routes(): Core.Route[] {\n const { admin } = this._strapi;\n\n const routes = Object.values(admin.routes).flatMap((router) => router.routes);\n\n debug('found %o routes in Strapi admin', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","AdminRoutesProvider","AbstractRoutesProvider","routes","admin","_strapi","Object","values","flatMap","router","length"],"mappings":";;;;;AAKA,MAAMA,QAAQC,cAAAA,CAAe,uBAAA,CAAA;AAEtB,MAAMC,mBAAAA,SAA4BC,sBAAAA,CAAAA;AACvC,IAAA,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAI,CAACC,OAAO;AAE9B,QAAA,MAAMF,MAAAA,GAASG,MAAAA,CAAOC,MAAM,CAACH,KAAAA,CAAMD,MAAM,CAAA,CAAEK,OAAO,CAAC,CAACC,MAAAA,GAAWA,MAAAA,CAAON,MAAM,CAAA;QAE5EJ,KAAAA,CAAM,iCAAA,EAAmCI,OAAOO,MAAM,CAAA;QAEtD,OAAOP,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,22 @@
1
+ import type { Core } from '@strapi/types';
2
+ import { AbstractRoutesProvider } from './abstract';
3
+ /**
4
+ * Class representing a provider for API routes.
5
+ *
6
+ * This class retrieves and provides access to routes registered in the Strapi
7
+ * APIs.
8
+ *
9
+ * @extends {@link AbstractRoutesProvider}
10
+ */
11
+ export declare class ApiRoutesProvider extends AbstractRoutesProvider {
12
+ /**
13
+ * Retrieves all routes registered in the Strapi APIs.
14
+ *
15
+ * It extracts routes from the Strapi APIs by flattening their
16
+ * structure and consolidating them into a single array of {@link Core.Route}.
17
+ *
18
+ * @returns An array of {@link Core.Route} objects
19
+ */
20
+ get routes(): Core.Route[];
21
+ }
22
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIpD;;;;;;;GAOG;AACH,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D;;;;;;;OAOG;IACH,IAAW,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAYhC;CACF"}
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var debug$1 = require('../../utils/debug.js');
4
+ require('node:crypto');
5
+ require('zod/v4');
6
+ var abstract = require('./abstract.js');
7
+
8
+ const debug = debug$1.createDebugger('routes:provider:api');
9
+ /**
10
+ * Class representing a provider for API routes.
11
+ *
12
+ * This class retrieves and provides access to routes registered in the Strapi
13
+ * APIs.
14
+ *
15
+ * @extends {@link AbstractRoutesProvider}
16
+ */ class ApiRoutesProvider extends abstract.AbstractRoutesProvider {
17
+ /**
18
+ * Retrieves all routes registered in the Strapi APIs.
19
+ *
20
+ * It extracts routes from the Strapi APIs by flattening their
21
+ * structure and consolidating them into a single array of {@link Core.Route}.
22
+ *
23
+ * @returns An array of {@link Core.Route} objects
24
+ */ get routes() {
25
+ const { apis } = this._strapi;
26
+ const routes = Object.values(apis)// Extract and flatten each router from every API
27
+ .flatMap((api)=>Object.values(api.routes))// Extract and flatten the routes from each router
28
+ .flatMap((router)=>router.routes);
29
+ debug('found %o routes in Strapi APIs', routes.length);
30
+ return routes;
31
+ }
32
+ }
33
+
34
+ exports.ApiRoutesProvider = ApiRoutesProvider;
35
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sources":["../../../src/routes/providers/api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { createDebugger } from '../../utils';\n\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:api');\n\n/**\n * Class representing a provider for API routes.\n *\n * This class retrieves and provides access to routes registered in the Strapi\n * APIs.\n *\n * @extends {@link AbstractRoutesProvider}\n */\nexport class ApiRoutesProvider extends AbstractRoutesProvider {\n /**\n * Retrieves all routes registered in the Strapi APIs.\n *\n * It extracts routes from the Strapi APIs by flattening their\n * structure and consolidating them into a single array of {@link Core.Route}.\n *\n * @returns An array of {@link Core.Route} objects\n */\n public get routes(): Core.Route[] {\n const { apis } = this._strapi;\n\n const routes = Object.values(apis)\n // Extract and flatten each router from every API\n .flatMap((api) => Object.values(api.routes))\n // Extract and flatten the routes from each router\n .flatMap((router) => router.routes);\n\n debug('found %o routes in Strapi APIs', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","ApiRoutesProvider","AbstractRoutesProvider","routes","apis","_strapi","Object","values","flatMap","api","router","length"],"mappings":";;;;;;;AAKA,MAAMA,QAAQC,sBAAAA,CAAe,qBAAA,CAAA;AAE7B;;;;;;;IAQO,MAAMC,iBAAAA,SAA0BC,+BAAAA,CAAAA;AACrC;;;;;;;AAOC,MACD,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,IAAI,EAAE,GAAG,IAAI,CAACC,OAAO;AAE7B,QAAA,MAAMF,MAAAA,GAASG,MAAAA,CAAOC,MAAM,CAACH,KAC3B;SACCI,OAAO,CAAC,CAACC,GAAAA,GAAQH,MAAAA,CAAOC,MAAM,CAACE,GAAAA,CAAIN,MAAM,CAAA,CAC1C;AACCK,SAAAA,OAAO,CAAC,CAACE,MAAAA,GAAWA,MAAAA,CAAOP,MAAM,CAAA;QAEpCJ,KAAAA,CAAM,gCAAA,EAAkCI,OAAOQ,MAAM,CAAA;QAErD,OAAOR,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,33 @@
1
+ import { createDebugger } from '../../utils/debug.mjs';
2
+ import 'node:crypto';
3
+ import 'zod/v4';
4
+ import { AbstractRoutesProvider } from './abstract.mjs';
5
+
6
+ const debug = createDebugger('routes:provider:api');
7
+ /**
8
+ * Class representing a provider for API routes.
9
+ *
10
+ * This class retrieves and provides access to routes registered in the Strapi
11
+ * APIs.
12
+ *
13
+ * @extends {@link AbstractRoutesProvider}
14
+ */ class ApiRoutesProvider extends AbstractRoutesProvider {
15
+ /**
16
+ * Retrieves all routes registered in the Strapi APIs.
17
+ *
18
+ * It extracts routes from the Strapi APIs by flattening their
19
+ * structure and consolidating them into a single array of {@link Core.Route}.
20
+ *
21
+ * @returns An array of {@link Core.Route} objects
22
+ */ get routes() {
23
+ const { apis } = this._strapi;
24
+ const routes = Object.values(apis)// Extract and flatten each router from every API
25
+ .flatMap((api)=>Object.values(api.routes))// Extract and flatten the routes from each router
26
+ .flatMap((router)=>router.routes);
27
+ debug('found %o routes in Strapi APIs', routes.length);
28
+ return routes;
29
+ }
30
+ }
31
+
32
+ export { ApiRoutesProvider };
33
+ //# sourceMappingURL=api.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.mjs","sources":["../../../src/routes/providers/api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { createDebugger } from '../../utils';\n\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:api');\n\n/**\n * Class representing a provider for API routes.\n *\n * This class retrieves and provides access to routes registered in the Strapi\n * APIs.\n *\n * @extends {@link AbstractRoutesProvider}\n */\nexport class ApiRoutesProvider extends AbstractRoutesProvider {\n /**\n * Retrieves all routes registered in the Strapi APIs.\n *\n * It extracts routes from the Strapi APIs by flattening their\n * structure and consolidating them into a single array of {@link Core.Route}.\n *\n * @returns An array of {@link Core.Route} objects\n */\n public get routes(): Core.Route[] {\n const { apis } = this._strapi;\n\n const routes = Object.values(apis)\n // Extract and flatten each router from every API\n .flatMap((api) => Object.values(api.routes))\n // Extract and flatten the routes from each router\n .flatMap((router) => router.routes);\n\n debug('found %o routes in Strapi APIs', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","ApiRoutesProvider","AbstractRoutesProvider","routes","apis","_strapi","Object","values","flatMap","api","router","length"],"mappings":";;;;;AAKA,MAAMA,QAAQC,cAAAA,CAAe,qBAAA,CAAA;AAE7B;;;;;;;IAQO,MAAMC,iBAAAA,SAA0BC,sBAAAA,CAAAA;AACrC;;;;;;;AAOC,MACD,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,IAAI,EAAE,GAAG,IAAI,CAACC,OAAO;AAE7B,QAAA,MAAMF,MAAAA,GAASG,MAAAA,CAAOC,MAAM,CAACH,KAC3B;SACCI,OAAO,CAAC,CAACC,GAAAA,GAAQH,MAAAA,CAAOC,MAAM,CAACE,GAAAA,CAAIN,MAAM,CAAA,CAC1C;AACCK,SAAAA,OAAO,CAAC,CAACE,MAAAA,GAAWA,MAAAA,CAAOP,MAAM,CAAA;QAEpCJ,KAAAA,CAAM,gCAAA,EAAkCI,OAAOQ,MAAM,CAAA;QAErD,OAAOR,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,6 @@
1
+ export { AbstractRoutesProvider } from './abstract';
2
+ export { AdminRoutesProvider } from './admin';
3
+ export { ApiRoutesProvider } from './api';
4
+ export { PluginRoutesProvider } from './plugin';
5
+ export type { RoutesProvider } from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type Core } from '@strapi/types';
2
+ import { AbstractRoutesProvider } from './abstract';
3
+ /**
4
+ * Class providing routes from Strapi plugins.
5
+ *
6
+ * This class extracts and consolidates routes registered by Strapi plugins,
7
+ * accommodating different ways plugins may define their routes.
8
+ *
9
+ * @extends {@link AbstractRoutesProvider}
10
+ */
11
+ export declare class PluginRoutesProvider extends AbstractRoutesProvider {
12
+ /**
13
+ * Retrieves all routes registered in the Strapi plugins.
14
+ *
15
+ * It handles two cases:
16
+ * - The plugin's routes are directly provided as a {@link Core.Route}[].
17
+ * - The plugin's routes are defined as a record of routers which contain their own list of routes.
18
+ *
19
+ * @returns An array of {@link Core.Route} objects.
20
+ */
21
+ get routes(): Core.Route[];
22
+ }
23
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIpD;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,sBAAsB;IAC9D;;;;;;;;OAQG;IACH,IAAW,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAkChC;CACF"}
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ var debug$1 = require('../../utils/debug.js');
4
+ require('node:crypto');
5
+ require('zod/v4');
6
+ var abstract = require('./abstract.js');
7
+
8
+ const debug = debug$1.createDebugger('routes:provider:plugins');
9
+ /**
10
+ * Class providing routes from Strapi plugins.
11
+ *
12
+ * This class extracts and consolidates routes registered by Strapi plugins,
13
+ * accommodating different ways plugins may define their routes.
14
+ *
15
+ * @extends {@link AbstractRoutesProvider}
16
+ */ class PluginRoutesProvider extends abstract.AbstractRoutesProvider {
17
+ /**
18
+ * Retrieves all routes registered in the Strapi plugins.
19
+ *
20
+ * It handles two cases:
21
+ * - The plugin's routes are directly provided as a {@link Core.Route}[].
22
+ * - The plugin's routes are defined as a record of routers which contain their own list of routes.
23
+ *
24
+ * @returns An array of {@link Core.Route} objects.
25
+ */ get routes() {
26
+ const { plugins } = this._strapi;
27
+ const routes = Object.values(plugins).flatMap((plugin)=>{
28
+ const { routes } = plugin;
29
+ return Array.isArray(routes) ? routes : Object.values(routes).flatMap((router)=>{
30
+ return router.routes.map((route)=>{
31
+ const hasOwnPrefix = route.config != null && Object.prototype.hasOwnProperty.call(route.config, 'prefix');
32
+ const effectivePrefix = hasOwnPrefix ? route.config?.prefix ?? '' : router.prefix ?? '';
33
+ const fullPath = (`${effectivePrefix}${route.path}` || '/').replace(/\/+/g, '/').replace(/\/$/, '') || '/';
34
+ return {
35
+ ...route,
36
+ path: fullPath
37
+ };
38
+ });
39
+ });
40
+ });
41
+ debug('found %o routes in Strapi plugins', routes.length);
42
+ return routes;
43
+ }
44
+ }
45
+
46
+ exports.PluginRoutesProvider = PluginRoutesProvider;
47
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["../../../src/routes/providers/plugin.ts"],"sourcesContent":["import { type Core } from '@strapi/types';\nimport { createDebugger } from '../../utils';\n\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:plugins');\n\n/**\n * Class providing routes from Strapi plugins.\n *\n * This class extracts and consolidates routes registered by Strapi plugins,\n * accommodating different ways plugins may define their routes.\n *\n * @extends {@link AbstractRoutesProvider}\n */\nexport class PluginRoutesProvider extends AbstractRoutesProvider {\n /**\n * Retrieves all routes registered in the Strapi plugins.\n *\n * It handles two cases:\n * - The plugin's routes are directly provided as a {@link Core.Route}[].\n * - The plugin's routes are defined as a record of routers which contain their own list of routes.\n *\n * @returns An array of {@link Core.Route} objects.\n */\n public get routes(): Core.Route[] {\n const { plugins } = this._strapi;\n\n const routes = Object.values(plugins).flatMap((plugin) => {\n const { routes } = plugin;\n\n return Array.isArray(routes)\n ? routes\n : Object.values(routes).flatMap((router: Core.Router) => {\n return router.routes.map((route: Core.Route) => {\n const hasOwnPrefix =\n route.config != null &&\n Object.prototype.hasOwnProperty.call(route.config, 'prefix');\n\n const effectivePrefix = hasOwnPrefix\n ? (route.config?.prefix ?? '')\n : (router.prefix ?? '');\n\n const fullPath =\n (`${effectivePrefix}${route.path}` || '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n return {\n ...route,\n path: fullPath,\n };\n });\n });\n });\n\n debug('found %o routes in Strapi plugins', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","PluginRoutesProvider","AbstractRoutesProvider","routes","plugins","_strapi","Object","values","flatMap","plugin","Array","isArray","router","map","route","hasOwnPrefix","config","prototype","hasOwnProperty","call","effectivePrefix","prefix","fullPath","path","replace","length"],"mappings":";;;;;;;AAKA,MAAMA,QAAQC,sBAAAA,CAAe,yBAAA,CAAA;AAE7B;;;;;;;IAQO,MAAMC,oBAAAA,SAA6BC,+BAAAA,CAAAA;AACxC;;;;;;;;AAQC,MACD,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI,CAACC,OAAO;AAEhC,QAAA,MAAMF,SAASG,MAAAA,CAAOC,MAAM,CAACH,OAAAA,CAAAA,CAASI,OAAO,CAAC,CAACC,MAAAA,GAAAA;YAC7C,MAAM,EAAEN,MAAM,EAAE,GAAGM,MAAAA;YAEnB,OAAOC,KAAAA,CAAMC,OAAO,CAACR,MAAAA,CAAAA,GACjBA,MAAAA,GACAG,MAAAA,CAAOC,MAAM,CAACJ,MAAAA,CAAAA,CAAQK,OAAO,CAAC,CAACI,MAAAA,GAAAA;AAC7B,gBAAA,OAAOA,MAAAA,CAAOT,MAAM,CAACU,GAAG,CAAC,CAACC,KAAAA,GAAAA;AACxB,oBAAA,MAAMC,YAAAA,GACJD,KAAAA,CAAME,MAAM,IAAI,QAChBV,MAAAA,CAAOW,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,KAAAA,CAAME,MAAM,EAAE,QAAA,CAAA;oBAErD,MAAMI,eAAAA,GAAkBL,eACnBD,KAAAA,CAAME,MAAM,EAAEK,MAAAA,IAAU,EAAA,GACxBT,MAAAA,CAAOS,MAAM,IAAI,EAAA;AAEtB,oBAAA,MAAMC,WACJ,CAAC,GAAGF,eAAAA,CAAAA,EAAkBN,KAAAA,CAAMS,IAAI,CAAA,CAAE,IAAI,GAAE,EACrCC,OAAO,CAAC,MAAA,EAAQ,KAChBA,OAAO,CAAC,OAAO,EAAA,CAAA,IAAO,GAAA;oBAE3B,OAAO;AACL,wBAAA,GAAGV,KAAK;wBACRS,IAAAA,EAAMD;AACR,qBAAA;AACF,gBAAA,CAAA,CAAA;AACF,YAAA,CAAA,CAAA;AACN,QAAA,CAAA,CAAA;QAEAvB,KAAAA,CAAM,mCAAA,EAAqCI,OAAOsB,MAAM,CAAA;QAExD,OAAOtB,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,45 @@
1
+ import { createDebugger } from '../../utils/debug.mjs';
2
+ import 'node:crypto';
3
+ import 'zod/v4';
4
+ import { AbstractRoutesProvider } from './abstract.mjs';
5
+
6
+ const debug = createDebugger('routes:provider:plugins');
7
+ /**
8
+ * Class providing routes from Strapi plugins.
9
+ *
10
+ * This class extracts and consolidates routes registered by Strapi plugins,
11
+ * accommodating different ways plugins may define their routes.
12
+ *
13
+ * @extends {@link AbstractRoutesProvider}
14
+ */ class PluginRoutesProvider extends AbstractRoutesProvider {
15
+ /**
16
+ * Retrieves all routes registered in the Strapi plugins.
17
+ *
18
+ * It handles two cases:
19
+ * - The plugin's routes are directly provided as a {@link Core.Route}[].
20
+ * - The plugin's routes are defined as a record of routers which contain their own list of routes.
21
+ *
22
+ * @returns An array of {@link Core.Route} objects.
23
+ */ get routes() {
24
+ const { plugins } = this._strapi;
25
+ const routes = Object.values(plugins).flatMap((plugin)=>{
26
+ const { routes } = plugin;
27
+ return Array.isArray(routes) ? routes : Object.values(routes).flatMap((router)=>{
28
+ return router.routes.map((route)=>{
29
+ const hasOwnPrefix = route.config != null && Object.prototype.hasOwnProperty.call(route.config, 'prefix');
30
+ const effectivePrefix = hasOwnPrefix ? route.config?.prefix ?? '' : router.prefix ?? '';
31
+ const fullPath = (`${effectivePrefix}${route.path}` || '/').replace(/\/+/g, '/').replace(/\/$/, '') || '/';
32
+ return {
33
+ ...route,
34
+ path: fullPath
35
+ };
36
+ });
37
+ });
38
+ });
39
+ debug('found %o routes in Strapi plugins', routes.length);
40
+ return routes;
41
+ }
42
+ }
43
+
44
+ export { PluginRoutesProvider };
45
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../src/routes/providers/plugin.ts"],"sourcesContent":["import { type Core } from '@strapi/types';\nimport { createDebugger } from '../../utils';\n\nimport { AbstractRoutesProvider } from './abstract';\n\nconst debug = createDebugger('routes:provider:plugins');\n\n/**\n * Class providing routes from Strapi plugins.\n *\n * This class extracts and consolidates routes registered by Strapi plugins,\n * accommodating different ways plugins may define their routes.\n *\n * @extends {@link AbstractRoutesProvider}\n */\nexport class PluginRoutesProvider extends AbstractRoutesProvider {\n /**\n * Retrieves all routes registered in the Strapi plugins.\n *\n * It handles two cases:\n * - The plugin's routes are directly provided as a {@link Core.Route}[].\n * - The plugin's routes are defined as a record of routers which contain their own list of routes.\n *\n * @returns An array of {@link Core.Route} objects.\n */\n public get routes(): Core.Route[] {\n const { plugins } = this._strapi;\n\n const routes = Object.values(plugins).flatMap((plugin) => {\n const { routes } = plugin;\n\n return Array.isArray(routes)\n ? routes\n : Object.values(routes).flatMap((router: Core.Router) => {\n return router.routes.map((route: Core.Route) => {\n const hasOwnPrefix =\n route.config != null &&\n Object.prototype.hasOwnProperty.call(route.config, 'prefix');\n\n const effectivePrefix = hasOwnPrefix\n ? (route.config?.prefix ?? '')\n : (router.prefix ?? '');\n\n const fullPath =\n (`${effectivePrefix}${route.path}` || '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n return {\n ...route,\n path: fullPath,\n };\n });\n });\n });\n\n debug('found %o routes in Strapi plugins', routes.length);\n\n return routes;\n }\n}\n"],"names":["debug","createDebugger","PluginRoutesProvider","AbstractRoutesProvider","routes","plugins","_strapi","Object","values","flatMap","plugin","Array","isArray","router","map","route","hasOwnPrefix","config","prototype","hasOwnProperty","call","effectivePrefix","prefix","fullPath","path","replace","length"],"mappings":";;;;;AAKA,MAAMA,QAAQC,cAAAA,CAAe,yBAAA,CAAA;AAE7B;;;;;;;IAQO,MAAMC,oBAAAA,SAA6BC,sBAAAA,CAAAA;AACxC;;;;;;;;AAQC,MACD,IAAWC,MAAAA,GAAuB;AAChC,QAAA,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI,CAACC,OAAO;AAEhC,QAAA,MAAMF,SAASG,MAAAA,CAAOC,MAAM,CAACH,OAAAA,CAAAA,CAASI,OAAO,CAAC,CAACC,MAAAA,GAAAA;YAC7C,MAAM,EAAEN,MAAM,EAAE,GAAGM,MAAAA;YAEnB,OAAOC,KAAAA,CAAMC,OAAO,CAACR,MAAAA,CAAAA,GACjBA,MAAAA,GACAG,MAAAA,CAAOC,MAAM,CAACJ,MAAAA,CAAAA,CAAQK,OAAO,CAAC,CAACI,MAAAA,GAAAA;AAC7B,gBAAA,OAAOA,MAAAA,CAAOT,MAAM,CAACU,GAAG,CAAC,CAACC,KAAAA,GAAAA;AACxB,oBAAA,MAAMC,YAAAA,GACJD,KAAAA,CAAME,MAAM,IAAI,QAChBV,MAAAA,CAAOW,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,KAAAA,CAAME,MAAM,EAAE,QAAA,CAAA;oBAErD,MAAMI,eAAAA,GAAkBL,eACnBD,KAAAA,CAAME,MAAM,EAAEK,MAAAA,IAAU,EAAA,GACxBT,MAAAA,CAAOS,MAAM,IAAI,EAAA;AAEtB,oBAAA,MAAMC,WACJ,CAAC,GAAGF,eAAAA,CAAAA,EAAkBN,KAAAA,CAAMS,IAAI,CAAA,CAAE,IAAI,GAAE,EACrCC,OAAO,CAAC,MAAA,EAAQ,KAChBA,OAAO,CAAC,OAAO,EAAA,CAAA,IAAO,GAAA;oBAE3B,OAAO;AACL,wBAAA,GAAGV,KAAK;wBACRS,IAAAA,EAAMD;AACR,qBAAA;AACF,gBAAA,CAAA,CAAA;AACF,YAAA,CAAA,CAAA;AACN,QAAA,CAAA,CAAA;QAEAvB,KAAAA,CAAM,mCAAA,EAAqCI,OAAOsB,MAAM,CAAA;QAExD,OAAOtB,MAAAA;AACT,IAAA;AACF;;;;"}
@@ -0,0 +1,13 @@
1
+ import type { Core } from '@strapi/types';
2
+ /**
3
+ * Interface representing a provider for routes.
4
+ *
5
+ * It extends {@link Iterable} to allow iteration over {@link Core.Route} objects.
6
+ */
7
+ export interface RoutesProvider extends Iterable<Core.Route> {
8
+ /**
9
+ * Retrieves an array of routes.
10
+ */
11
+ get routes(): Core.Route[];
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/providers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1D;;OAEG;IACH,IAAI,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export { isOfType } from './is-of-type';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MatcherRule } from '../types';
2
+ export declare const isOfType: (type: string) => MatcherRule;
3
+ //# sourceMappingURL=is-of-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-of-type.d.ts","sourceRoot":"","sources":["../../../src/routes/rules/is-of-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,WAEvC,CAAC"}