@aom-js/router 0.0.0-stage → 0.1.1

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 (328) hide show
  1. package/dist/cjs/classes/index.d.ts +3 -0
  2. package/dist/cjs/classes/index.d.ts.map +1 -0
  3. package/dist/cjs/classes/index.js +19 -0
  4. package/dist/cjs/classes/index.js.map +1 -0
  5. package/dist/cjs/classes/openapi.d.ts +21 -0
  6. package/dist/cjs/classes/openapi.d.ts.map +1 -0
  7. package/dist/cjs/classes/openapi.js +188 -0
  8. package/dist/cjs/classes/openapi.js.map +1 -0
  9. package/dist/cjs/classes/router.d.ts +17 -0
  10. package/dist/cjs/classes/router.d.ts.map +1 -0
  11. package/dist/cjs/classes/router.js +84 -0
  12. package/dist/cjs/classes/router.js.map +1 -0
  13. package/dist/cjs/common/api.d.ts +95 -0
  14. package/dist/cjs/common/api.d.ts.map +1 -0
  15. package/dist/cjs/common/api.js +113 -0
  16. package/dist/cjs/common/api.js.map +1 -0
  17. package/dist/cjs/common/classes.d.ts +7 -0
  18. package/dist/cjs/common/classes.d.ts.map +1 -0
  19. package/dist/cjs/common/classes.js +12 -0
  20. package/dist/cjs/common/classes.js.map +1 -0
  21. package/dist/cjs/common/context.d.ts +28 -0
  22. package/dist/cjs/common/context.d.ts.map +1 -0
  23. package/dist/cjs/common/context.js +142 -0
  24. package/dist/cjs/common/context.js.map +1 -0
  25. package/dist/cjs/common/cursor.d.ts +55 -0
  26. package/dist/cjs/common/cursor.d.ts.map +1 -0
  27. package/dist/cjs/common/cursor.js +170 -0
  28. package/dist/cjs/common/cursor.js.map +1 -0
  29. package/dist/cjs/common/index.d.ts +7 -0
  30. package/dist/cjs/common/index.d.ts.map +1 -0
  31. package/dist/cjs/common/index.js +23 -0
  32. package/dist/cjs/common/index.js.map +1 -0
  33. package/dist/cjs/common/kinds.d.ts +44 -0
  34. package/dist/cjs/common/kinds.d.ts.map +1 -0
  35. package/dist/cjs/common/kinds.js +51 -0
  36. package/dist/cjs/common/kinds.js.map +1 -0
  37. package/dist/cjs/common/lazy.d.ts +7 -0
  38. package/dist/cjs/common/lazy.d.ts.map +1 -0
  39. package/dist/cjs/common/lazy.js +14 -0
  40. package/dist/cjs/common/lazy.js.map +1 -0
  41. package/dist/cjs/common/openapi.d.ts +45 -0
  42. package/dist/cjs/common/openapi.d.ts.map +1 -0
  43. package/dist/cjs/common/openapi.js +3 -0
  44. package/dist/cjs/common/openapi.js.map +1 -0
  45. package/dist/cjs/common/path.d.ts +6 -0
  46. package/dist/cjs/common/path.d.ts.map +1 -0
  47. package/dist/cjs/common/path.js +17 -0
  48. package/dist/cjs/common/path.js.map +1 -0
  49. package/dist/cjs/common/references.d.ts +18 -0
  50. package/dist/cjs/common/references.d.ts.map +1 -0
  51. package/dist/cjs/common/references.js +31 -0
  52. package/dist/cjs/common/references.js.map +1 -0
  53. package/dist/cjs/common/route.d.ts +33 -0
  54. package/dist/cjs/common/route.d.ts.map +1 -0
  55. package/dist/cjs/common/route.js +78 -0
  56. package/dist/cjs/common/route.js.map +1 -0
  57. package/dist/cjs/common/types.d.ts +8 -0
  58. package/dist/cjs/common/types.d.ts.map +1 -0
  59. package/dist/cjs/common/types.js +3 -0
  60. package/dist/cjs/common/types.js.map +1 -0
  61. package/dist/cjs/constants/errors.d.ts +21 -0
  62. package/dist/cjs/constants/errors.d.ts.map +1 -0
  63. package/dist/cjs/constants/errors.js +24 -0
  64. package/dist/cjs/constants/errors.js.map +1 -0
  65. package/dist/cjs/constants/index.d.ts +2 -0
  66. package/dist/cjs/constants/index.d.ts.map +1 -0
  67. package/dist/cjs/constants/index.js +18 -0
  68. package/dist/cjs/constants/index.js.map +1 -0
  69. package/dist/cjs/decorators/arguments/index.d.ts +22 -0
  70. package/dist/cjs/decorators/arguments/index.d.ts.map +1 -0
  71. package/dist/cjs/decorators/arguments/index.js +188 -0
  72. package/dist/cjs/decorators/arguments/index.js.map +1 -0
  73. package/dist/cjs/decorators/controllers/index.d.ts +2 -0
  74. package/dist/cjs/decorators/controllers/index.d.ts.map +1 -0
  75. package/dist/cjs/decorators/controllers/index.js +21 -0
  76. package/dist/cjs/decorators/controllers/index.js.map +1 -0
  77. package/dist/cjs/decorators/docs/index.d.ts +4 -0
  78. package/dist/cjs/decorators/docs/index.d.ts.map +1 -0
  79. package/dist/cjs/decorators/docs/index.js +16 -0
  80. package/dist/cjs/decorators/docs/index.js.map +1 -0
  81. package/dist/cjs/decorators/endpoints/index.d.ts +20 -0
  82. package/dist/cjs/decorators/endpoints/index.d.ts.map +1 -0
  83. package/dist/cjs/decorators/endpoints/index.js +125 -0
  84. package/dist/cjs/decorators/endpoints/index.js.map +1 -0
  85. package/dist/cjs/decorators/index.d.ts +9 -0
  86. package/dist/cjs/decorators/index.d.ts.map +1 -0
  87. package/dist/cjs/decorators/index.js +25 -0
  88. package/dist/cjs/decorators/index.js.map +1 -0
  89. package/dist/cjs/decorators/kinds/index.d.ts +3 -0
  90. package/dist/cjs/decorators/kinds/index.d.ts.map +1 -0
  91. package/dist/cjs/decorators/kinds/index.js +49 -0
  92. package/dist/cjs/decorators/kinds/index.js.map +1 -0
  93. package/dist/cjs/decorators/middlewares/index.d.ts +11 -0
  94. package/dist/cjs/decorators/middlewares/index.d.ts.map +1 -0
  95. package/dist/cjs/decorators/middlewares/index.js +137 -0
  96. package/dist/cjs/decorators/middlewares/index.js.map +1 -0
  97. package/dist/cjs/decorators/openapi/index.d.ts +10 -0
  98. package/dist/cjs/decorators/openapi/index.d.ts.map +1 -0
  99. package/dist/cjs/decorators/openapi/index.js +61 -0
  100. package/dist/cjs/decorators/openapi/index.js.map +1 -0
  101. package/dist/cjs/decorators/openapi/tags.d.ts +6 -0
  102. package/dist/cjs/decorators/openapi/tags.d.ts.map +1 -0
  103. package/dist/cjs/decorators/openapi/tags.js +28 -0
  104. package/dist/cjs/decorators/openapi/tags.js.map +1 -0
  105. package/dist/cjs/decorators/references/index.d.ts +3 -0
  106. package/dist/cjs/decorators/references/index.d.ts.map +1 -0
  107. package/dist/cjs/decorators/references/index.js +10 -0
  108. package/dist/cjs/decorators/references/index.js.map +1 -0
  109. package/dist/cjs/index.d.ts +12 -0
  110. package/dist/cjs/index.d.ts.map +1 -0
  111. package/dist/cjs/index.js +30 -0
  112. package/dist/cjs/index.js.map +1 -0
  113. package/dist/cjs/package.json +1 -0
  114. package/dist/cjs/specials/index.d.ts +2 -0
  115. package/dist/cjs/specials/index.d.ts.map +1 -0
  116. package/dist/cjs/specials/index.js +18 -0
  117. package/dist/cjs/specials/index.js.map +1 -0
  118. package/dist/cjs/specials/references.d.ts +5 -0
  119. package/dist/cjs/specials/references.d.ts.map +1 -0
  120. package/dist/cjs/specials/references.js +16 -0
  121. package/dist/cjs/specials/references.js.map +1 -0
  122. package/dist/cjs/testing/chain.d.ts +31 -0
  123. package/dist/cjs/testing/chain.d.ts.map +1 -0
  124. package/dist/cjs/testing/chain.js +110 -0
  125. package/dist/cjs/testing/chain.js.map +1 -0
  126. package/dist/cjs/testing/decorators.d.ts +23 -0
  127. package/dist/cjs/testing/decorators.d.ts.map +1 -0
  128. package/dist/cjs/testing/decorators.js +52 -0
  129. package/dist/cjs/testing/decorators.js.map +1 -0
  130. package/dist/cjs/testing/index.d.ts +7 -0
  131. package/dist/cjs/testing/index.d.ts.map +1 -0
  132. package/dist/cjs/testing/index.js +27 -0
  133. package/dist/cjs/testing/index.js.map +1 -0
  134. package/dist/cjs/testing/report.d.ts +24 -0
  135. package/dist/cjs/testing/report.d.ts.map +1 -0
  136. package/dist/cjs/testing/report.js +53 -0
  137. package/dist/cjs/testing/report.js.map +1 -0
  138. package/dist/cjs/testing/runner.d.ts +23 -0
  139. package/dist/cjs/testing/runner.d.ts.map +1 -0
  140. package/dist/cjs/testing/runner.js +295 -0
  141. package/dist/cjs/testing/runner.js.map +1 -0
  142. package/dist/cjs/types/index.d.ts +16 -0
  143. package/dist/cjs/types/index.d.ts.map +1 -0
  144. package/dist/cjs/types/index.js +3 -0
  145. package/dist/cjs/types/index.js.map +1 -0
  146. package/dist/mjs/classes/index.d.ts +3 -0
  147. package/dist/mjs/classes/index.d.ts.map +1 -0
  148. package/dist/mjs/classes/index.js +3 -0
  149. package/dist/mjs/classes/index.js.map +1 -0
  150. package/dist/mjs/classes/openapi.d.ts +21 -0
  151. package/dist/mjs/classes/openapi.d.ts.map +1 -0
  152. package/dist/mjs/classes/openapi.js +151 -0
  153. package/dist/mjs/classes/openapi.js.map +1 -0
  154. package/dist/mjs/classes/router.d.ts +17 -0
  155. package/dist/mjs/classes/router.d.ts.map +1 -0
  156. package/dist/mjs/classes/router.js +47 -0
  157. package/dist/mjs/classes/router.js.map +1 -0
  158. package/dist/mjs/common/api.d.ts +95 -0
  159. package/dist/mjs/common/api.d.ts.map +1 -0
  160. package/dist/mjs/common/api.js +109 -0
  161. package/dist/mjs/common/api.js.map +1 -0
  162. package/dist/mjs/common/classes.d.ts +7 -0
  163. package/dist/mjs/common/classes.d.ts.map +1 -0
  164. package/dist/mjs/common/classes.js +4 -0
  165. package/dist/mjs/common/classes.js.map +1 -0
  166. package/dist/mjs/common/context.d.ts +28 -0
  167. package/dist/mjs/common/context.d.ts.map +1 -0
  168. package/dist/mjs/common/context.js +104 -0
  169. package/dist/mjs/common/context.js.map +1 -0
  170. package/dist/mjs/common/cursor.d.ts +55 -0
  171. package/dist/mjs/common/cursor.d.ts.map +1 -0
  172. package/dist/mjs/common/cursor.js +132 -0
  173. package/dist/mjs/common/cursor.js.map +1 -0
  174. package/dist/mjs/common/index.d.ts +7 -0
  175. package/dist/mjs/common/index.d.ts.map +1 -0
  176. package/dist/mjs/common/index.js +7 -0
  177. package/dist/mjs/common/index.js.map +1 -0
  178. package/dist/mjs/common/kinds.d.ts +44 -0
  179. package/dist/mjs/common/kinds.d.ts.map +1 -0
  180. package/dist/mjs/common/kinds.js +48 -0
  181. package/dist/mjs/common/kinds.js.map +1 -0
  182. package/dist/mjs/common/lazy.d.ts +7 -0
  183. package/dist/mjs/common/lazy.d.ts.map +1 -0
  184. package/dist/mjs/common/lazy.js +9 -0
  185. package/dist/mjs/common/lazy.js.map +1 -0
  186. package/dist/mjs/common/openapi.d.ts +45 -0
  187. package/dist/mjs/common/openapi.d.ts.map +1 -0
  188. package/dist/mjs/common/openapi.js +2 -0
  189. package/dist/mjs/common/openapi.js.map +1 -0
  190. package/dist/mjs/common/path.d.ts +6 -0
  191. package/dist/mjs/common/path.d.ts.map +1 -0
  192. package/dist/mjs/common/path.js +13 -0
  193. package/dist/mjs/common/path.js.map +1 -0
  194. package/dist/mjs/common/references.d.ts +18 -0
  195. package/dist/mjs/common/references.d.ts.map +1 -0
  196. package/dist/mjs/common/references.js +24 -0
  197. package/dist/mjs/common/references.js.map +1 -0
  198. package/dist/mjs/common/route.d.ts +33 -0
  199. package/dist/mjs/common/route.d.ts.map +1 -0
  200. package/dist/mjs/common/route.js +73 -0
  201. package/dist/mjs/common/route.js.map +1 -0
  202. package/dist/mjs/common/types.d.ts +8 -0
  203. package/dist/mjs/common/types.d.ts.map +1 -0
  204. package/dist/mjs/common/types.js +2 -0
  205. package/dist/mjs/common/types.js.map +1 -0
  206. package/dist/mjs/constants/errors.d.ts +21 -0
  207. package/dist/mjs/constants/errors.d.ts.map +1 -0
  208. package/dist/mjs/constants/errors.js +21 -0
  209. package/dist/mjs/constants/errors.js.map +1 -0
  210. package/dist/mjs/constants/index.d.ts +2 -0
  211. package/dist/mjs/constants/index.d.ts.map +1 -0
  212. package/dist/mjs/constants/index.js +2 -0
  213. package/dist/mjs/constants/index.js.map +1 -0
  214. package/dist/mjs/decorators/arguments/index.d.ts +22 -0
  215. package/dist/mjs/decorators/arguments/index.d.ts.map +1 -0
  216. package/dist/mjs/decorators/arguments/index.js +136 -0
  217. package/dist/mjs/decorators/arguments/index.js.map +1 -0
  218. package/dist/mjs/decorators/controllers/index.d.ts +2 -0
  219. package/dist/mjs/decorators/controllers/index.d.ts.map +1 -0
  220. package/dist/mjs/decorators/controllers/index.js +18 -0
  221. package/dist/mjs/decorators/controllers/index.js.map +1 -0
  222. package/dist/mjs/decorators/docs/index.d.ts +4 -0
  223. package/dist/mjs/decorators/docs/index.d.ts.map +1 -0
  224. package/dist/mjs/decorators/docs/index.js +12 -0
  225. package/dist/mjs/decorators/docs/index.js.map +1 -0
  226. package/dist/mjs/decorators/endpoints/index.d.ts +20 -0
  227. package/dist/mjs/decorators/endpoints/index.d.ts.map +1 -0
  228. package/dist/mjs/decorators/endpoints/index.js +80 -0
  229. package/dist/mjs/decorators/endpoints/index.js.map +1 -0
  230. package/dist/mjs/decorators/index.d.ts +9 -0
  231. package/dist/mjs/decorators/index.d.ts.map +1 -0
  232. package/dist/mjs/decorators/index.js +9 -0
  233. package/dist/mjs/decorators/index.js.map +1 -0
  234. package/dist/mjs/decorators/kinds/index.d.ts +3 -0
  235. package/dist/mjs/decorators/kinds/index.d.ts.map +1 -0
  236. package/dist/mjs/decorators/kinds/index.js +13 -0
  237. package/dist/mjs/decorators/kinds/index.js.map +1 -0
  238. package/dist/mjs/decorators/middlewares/index.d.ts +11 -0
  239. package/dist/mjs/decorators/middlewares/index.d.ts.map +1 -0
  240. package/dist/mjs/decorators/middlewares/index.js +94 -0
  241. package/dist/mjs/decorators/middlewares/index.js.map +1 -0
  242. package/dist/mjs/decorators/openapi/index.d.ts +10 -0
  243. package/dist/mjs/decorators/openapi/index.d.ts.map +1 -0
  244. package/dist/mjs/decorators/openapi/index.js +38 -0
  245. package/dist/mjs/decorators/openapi/index.js.map +1 -0
  246. package/dist/mjs/decorators/openapi/tags.d.ts +6 -0
  247. package/dist/mjs/decorators/openapi/tags.d.ts.map +1 -0
  248. package/dist/mjs/decorators/openapi/tags.js +22 -0
  249. package/dist/mjs/decorators/openapi/tags.js.map +1 -0
  250. package/dist/mjs/decorators/references/index.d.ts +3 -0
  251. package/dist/mjs/decorators/references/index.d.ts.map +1 -0
  252. package/dist/mjs/decorators/references/index.js +7 -0
  253. package/dist/mjs/decorators/references/index.js.map +1 -0
  254. package/dist/mjs/index.d.ts +12 -0
  255. package/dist/mjs/index.d.ts.map +1 -0
  256. package/dist/mjs/index.js +12 -0
  257. package/dist/mjs/index.js.map +1 -0
  258. package/dist/mjs/specials/index.d.ts +2 -0
  259. package/dist/mjs/specials/index.d.ts.map +1 -0
  260. package/dist/mjs/specials/index.js +2 -0
  261. package/dist/mjs/specials/index.js.map +1 -0
  262. package/dist/mjs/specials/references.d.ts +5 -0
  263. package/dist/mjs/specials/references.d.ts.map +1 -0
  264. package/dist/mjs/specials/references.js +11 -0
  265. package/dist/mjs/specials/references.js.map +1 -0
  266. package/dist/mjs/testing/chain.d.ts +31 -0
  267. package/dist/mjs/testing/chain.d.ts.map +1 -0
  268. package/dist/mjs/testing/chain.js +99 -0
  269. package/dist/mjs/testing/chain.js.map +1 -0
  270. package/dist/mjs/testing/decorators.d.ts +23 -0
  271. package/dist/mjs/testing/decorators.d.ts.map +1 -0
  272. package/dist/mjs/testing/decorators.js +42 -0
  273. package/dist/mjs/testing/decorators.js.map +1 -0
  274. package/dist/mjs/testing/index.d.ts +7 -0
  275. package/dist/mjs/testing/index.d.ts.map +1 -0
  276. package/dist/mjs/testing/index.js +6 -0
  277. package/dist/mjs/testing/index.js.map +1 -0
  278. package/dist/mjs/testing/report.d.ts +24 -0
  279. package/dist/mjs/testing/report.d.ts.map +1 -0
  280. package/dist/mjs/testing/report.js +49 -0
  281. package/dist/mjs/testing/report.js.map +1 -0
  282. package/dist/mjs/testing/runner.d.ts +23 -0
  283. package/dist/mjs/testing/runner.d.ts.map +1 -0
  284. package/dist/mjs/testing/runner.js +289 -0
  285. package/dist/mjs/testing/runner.js.map +1 -0
  286. package/dist/mjs/types/index.d.ts +16 -0
  287. package/dist/mjs/types/index.d.ts.map +1 -0
  288. package/dist/mjs/types/index.js +2 -0
  289. package/dist/mjs/types/index.js.map +1 -0
  290. package/dist/types/classes/index.d.ts +2 -0
  291. package/dist/types/classes/openapi.d.ts +20 -0
  292. package/dist/types/classes/router.d.ts +16 -0
  293. package/dist/types/common/api.d.ts +94 -0
  294. package/dist/types/common/classes.d.ts +6 -0
  295. package/dist/types/common/context.d.ts +27 -0
  296. package/dist/types/common/cursor.d.ts +54 -0
  297. package/dist/types/common/index.d.ts +6 -0
  298. package/dist/types/common/kinds.d.ts +43 -0
  299. package/dist/types/common/lazy.d.ts +6 -0
  300. package/dist/types/common/openapi.d.ts +44 -0
  301. package/dist/types/common/path.d.ts +5 -0
  302. package/dist/types/common/references.d.ts +17 -0
  303. package/dist/types/common/route.d.ts +32 -0
  304. package/dist/types/common/types.d.ts +7 -0
  305. package/dist/types/constants/errors.d.ts +20 -0
  306. package/dist/types/constants/index.d.ts +1 -0
  307. package/dist/types/decorators/arguments/index.d.ts +21 -0
  308. package/dist/types/decorators/controllers/index.d.ts +1 -0
  309. package/dist/types/decorators/docs/index.d.ts +3 -0
  310. package/dist/types/decorators/endpoints/index.d.ts +19 -0
  311. package/dist/types/decorators/index.d.ts +8 -0
  312. package/dist/types/decorators/kinds/index.d.ts +2 -0
  313. package/dist/types/decorators/middlewares/index.d.ts +10 -0
  314. package/dist/types/decorators/openapi/index.d.ts +9 -0
  315. package/dist/types/decorators/openapi/tags.d.ts +5 -0
  316. package/dist/types/decorators/references/index.d.ts +2 -0
  317. package/dist/types/index.d.ts +11 -0
  318. package/dist/types/specials/index.d.ts +1 -0
  319. package/dist/types/specials/references.d.ts +4 -0
  320. package/dist/types/testing/chain.d.ts +30 -0
  321. package/dist/types/testing/decorators.d.ts +22 -0
  322. package/dist/types/testing/index.d.ts +6 -0
  323. package/dist/types/testing/report.d.ts +23 -0
  324. package/dist/types/testing/runner.d.ts +22 -0
  325. package/dist/types/types/index.d.ts +15 -0
  326. package/package.json +66 -3
  327. package/readme.md +9 -0
  328. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/common/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,M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M,EAAE,qBAAqB,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAOD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAGlF,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAID,MAAM,CAAC,OAAO,MAAM,0BAA0B,GAAG,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,GAAG;IACpF,EAAE,CAAC,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAOF,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IAC1C,CAAC,SAAS,EAAE,MAAM,GAAG,0BAA0B,CAAC;CACjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../../src/common/openapi.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export declare const PATH_PARAM: RegExp;
2
+ export declare function compilePath(path: string): {
3
+ pattern: RegExp;
4
+ paramNames: string[];
5
+ };
6
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/common/path.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,QAA+B,CAAC;AAmBvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAWnF"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PATH_PARAM = void 0;
4
+ exports.compilePath = compilePath;
5
+ exports.PATH_PARAM = /:([^/()]+)(?:\(([^)]+)\))?/;
6
+ const PATH_TOKEN = new RegExp(`${exports.PATH_PARAM.source}|${/[.*+?^${}()|[\]\\]/.source}`, "g");
7
+ function compilePath(path) {
8
+ const paramNames = [];
9
+ const pattern = path.replace(PATH_TOKEN, (whole, name, validator) => {
10
+ if (name === undefined)
11
+ return `\\${whole}`;
12
+ paramNames.push(name);
13
+ return `(${validator ?? "[^/]+"})`;
14
+ });
15
+ return { pattern: new RegExp(`^${pattern}$`), paramNames };
16
+ }
17
+ //# sourceMappingURL=path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/common/path.ts"],"names":[],"mappings":";;;;AAKa,QAAA,UAAU,GAAG,4BAA4B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,GAAG,QAAA,UAAU,CAAC,MAAM,IAAI,oBAAoB,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;AAgB1F,qBAA4B,IAAY;IACtC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAa,EAAE,SAAkB,EAAE,EAAE;QAEpF,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,KAAK,KAAK,EAAE,CAAC;QAE5C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,SAAS,IAAI,OAAO,GAAG,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,UAAU,EAAE,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ClassType } from "@aom-js/core";
2
+ import { ContainerFunction, FwdFunction, RefFunction } from "./types.js";
3
+ export declare class RefContainer {
4
+ protected fn: ContainerFunction;
5
+ constructor(fn?: RefFunction);
6
+ exec(constructor: ClassType): any;
7
+ static default: RefFunction;
8
+ }
9
+ export declare class FwdContainer extends RefContainer {
10
+ constructor(fn?: FwdFunction);
11
+ exec(): any;
12
+ static default: FwdFunction;
13
+ }
14
+ export declare class ThisRefContainer extends RefContainer {
15
+ }
16
+ export declare class RouteRefContainer extends RefContainer {
17
+ }
18
+ //# sourceMappingURL=references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/common/references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAWtE,qBAAa,YAAY;IACvB,SAAS,CAAC,EAAE,EAAE,iBAAiB,CAAC;IAChC,YAAY,EAAE,GAAE,WAAkC,EAEjD;IAED,IAAI,CAAC,WAAW,EAAE,SAAS,OAE1B;IAED,MAAM,CAAC,OAAO,EAAE,WAAW,CAA2C;CACvE;AAUD,qBAAa,YAAa,SAAQ,YAAY;IAC5C,YAAY,EAAE,GAAE,WAAkC,EAGjD;IAED,IAAI,QAEH;IAED,MAAM,CAAC,OAAO,EAAE,WAAW,CAAwB;CACpD;AASD,qBAAa,gBAAiB,SAAQ,YAAY;CAAG;AASrD,qBAAa,iBAAkB,SAAQ,YAAY;CAAG"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RouteRefContainer = exports.ThisRefContainer = exports.FwdContainer = exports.RefContainer = void 0;
4
+ class RefContainer {
5
+ constructor(fn = RefContainer.default) {
6
+ this.fn = fn;
7
+ }
8
+ exec(constructor) {
9
+ return Reflect.apply(this.fn, constructor, [constructor]);
10
+ }
11
+ }
12
+ exports.RefContainer = RefContainer;
13
+ RefContainer.default = (constructor) => constructor;
14
+ class FwdContainer extends RefContainer {
15
+ constructor(fn = FwdContainer.default) {
16
+ super(fn);
17
+ this.fn = fn;
18
+ }
19
+ exec() {
20
+ return Reflect.apply(this.fn, undefined, []);
21
+ }
22
+ }
23
+ exports.FwdContainer = FwdContainer;
24
+ FwdContainer.default = () => new Function();
25
+ class ThisRefContainer extends RefContainer {
26
+ }
27
+ exports.ThisRefContainer = ThisRefContainer;
28
+ class RouteRefContainer extends RefContainer {
29
+ }
30
+ exports.RouteRefContainer = RouteRefContainer;
31
+ //# sourceMappingURL=references.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"references.js","sourceRoot":"","sources":["../../../src/common/references.ts"],"names":[],"mappings":";;;AAYA;IAEE,YAAY,EAAE,GAAgB,YAAY,CAAC,OAAO;QAChD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,IAAI,CAAC,WAAsB;QACzB,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;CAGF;;AADQ,oBAAO,GAAgB,CAAC,WAAsB,EAAE,EAAE,CAAC,WAAW,CAAC;AAWxE,kBAA0B,SAAQ,YAAY;IAC5C,YAAY,EAAE,GAAgB,YAAY,CAAC,OAAO;QAChD,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,IAAI;QACF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;CAGF;;AADQ,oBAAO,GAAgB,GAAG,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;AAUrD,sBAA8B,SAAQ,YAAY;CAAG;;AASrD,uBAA+B,SAAQ,YAAY;CAAG"}
@@ -0,0 +1,33 @@
1
+ import type { HTTPMethods } from "./types.js";
2
+ import type { HttpContextValues } from "../types/index.js";
3
+ import type { Router } from "../classes/index.js";
4
+ import { AomCursor, type AomCursorJSON } from "./cursor.js";
5
+ import type { AomEndpoint } from "./api.js";
6
+ export declare type MarkerType = Record<string, any>;
7
+ export declare type MarkerHandler = (route: AomRoute, cursor: AomCursor) => void | unknown;
8
+ export declare interface AomRouteJSON {
9
+ method: string;
10
+ path: string;
11
+ markers: Record<string, {
12
+ accessPoints: string[];
13
+ accessTypes?: string[];
14
+ extra?: Record<string, Array<{
15
+ ident: string;
16
+ accessTypes: string[];
17
+ }>>;
18
+ }>;
19
+ steps: AomCursorJSON[];
20
+ }
21
+ export declare function plain(cursors: AomCursor[], into?: AomCursor[]): AomCursor[];
22
+ export declare class AomRoute {
23
+ router: Router;
24
+ endpoint: AomEndpoint;
25
+ path: string;
26
+ method: HTTPMethods;
27
+ markers: MarkerType;
28
+ cursors: AomCursor[];
29
+ constructor(router: Router, prefix: string, endpoint: AomEndpoint, cursors: AomCursor[]);
30
+ apply(context: HttpContextValues): any;
31
+ toJSON(): AomRouteJSON;
32
+ }
33
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/common/route.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,CAAC,OAAO,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGrD,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC;AAG3F,MAAM,CAAC,OAAO,WAAW,YAAY;IACnC,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IAKb,OAAO,EAAE,MAAM,CACb,MAAM,EACN;QACE,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC,CAAC;KACzE,CACF,CAAC;IAEF,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAgBD,wBAAgB,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,IAAI,GAAE,SAAS,EAAO,GAAG,SAAS,EAAE,CAqC/E;AAaD,qBAAa,QAAQ;IACnB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,WAAW,CAAC;IAEtB,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,EAAE,WAAW,CAAC;IAOpB,OAAO,EAAE,UAAU,CAAM;IAGzB,OAAO,EAAE,SAAS,EAAE,CAAM;IAE1B,YAAY,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EA6BtF;IAyBD,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAErC;IAMD,MAAM,IAAI,YAAY,CA4BrB;CACF"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AomRoute = void 0;
4
+ exports.plain = plain;
5
+ const node_path_1 = require("node:path");
6
+ const cursor_1 = require("./cursor.js");
7
+ const context_1 = require("./context.js");
8
+ const kinds_1 = require("./kinds.js");
9
+ function placed(cursor, via, viaGroup) {
10
+ cursor.via = via;
11
+ if (viaGroup)
12
+ cursor.viaGroup = viaGroup;
13
+ return cursor;
14
+ }
15
+ function plain(cursors, into = []) {
16
+ cursors.forEach((cursor) => {
17
+ plain(cursor.$.element.pre_middlewares.map((middleware) => placed(new cursor_1.AomCursor(middleware, cursor.$, cursor.prefix, cursor.endpoint), kinds_1.AomViaKind.Before)), into);
18
+ into.push(cursor);
19
+ plain(cursor.$.element.post_middlewares.map((middleware) => placed(new cursor_1.AomCursor(middleware, cursor.$, cursor.prefix, cursor.endpoint), kinds_1.AomViaKind.After)), into);
20
+ if (cursor.$.element.nextpoint) {
21
+ plain([
22
+ placed(new cursor_1.AomCursor(cursor.$.element.nextpoint, cursor.$, cursor.prefix, cursor.endpoint), kinds_1.AomViaKind.Next, cursor.$.toString()),
23
+ ], into);
24
+ }
25
+ });
26
+ return into;
27
+ }
28
+ class AomRoute {
29
+ constructor(router, prefix, endpoint, cursors) {
30
+ this.markers = {};
31
+ this.cursors = [];
32
+ this.router = router;
33
+ this.path = (0, node_path_1.resolve)((0, node_path_1.join)(prefix, endpoint.prefix));
34
+ this.method = endpoint.method;
35
+ this.endpoint = endpoint;
36
+ this.cursors = plain([
37
+ ...cursors.map((cursor) => placed(new cursor_1.AomCursor(cursor.$, cursor.origin, cursor.prefix, endpoint), cursor.via)),
38
+ placed(new cursor_1.AomCursor(endpoint.$, endpoint.$, this.path, endpoint), kinds_1.AomViaKind.Endpoint),
39
+ ]);
40
+ this.cursors.forEach((cursor, index) => {
41
+ cursor.$.element.markers.forEach((marker) => {
42
+ Reflect.apply(marker.element.descriptor.value, marker._.target, [this, cursor]);
43
+ });
44
+ cursor.index = index;
45
+ });
46
+ }
47
+ apply(context) {
48
+ return new context_1.RxContext(context, this).run(this.cursors);
49
+ }
50
+ toJSON() {
51
+ const markers = {};
52
+ Object.entries(this.markers).forEach(([name, marker]) => {
53
+ const points = Array.isArray(marker?.accessPoints)
54
+ ? marker.accessPoints
55
+ : [];
56
+ const projection = { accessPoints: points.map(({ ident }) => ident) };
57
+ if (Array.isArray(marker?.accessTypes))
58
+ projection.accessTypes = [...marker.accessTypes];
59
+ const layered = points.filter(({ extra }) => extra?.length);
60
+ if (layered.length) {
61
+ projection.extra = Object.fromEntries(layered.map(({ ident, extra = [] }) => [
62
+ ident,
63
+ extra.map((layer) => ({ ident: layer.ident, accessTypes: [...layer.accessTypes] })),
64
+ ]));
65
+ }
66
+ markers[name] = projection;
67
+ });
68
+ const created = new Set();
69
+ return {
70
+ method: this.method,
71
+ path: this.path,
72
+ markers,
73
+ steps: this.cursors.map((cursor) => cursor.toJSON(created)),
74
+ };
75
+ }
76
+ }
77
+ exports.AomRoute = AomRoute;
78
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/common/route.ts"],"names":[],"mappings":";;;;AAAA,yCAA0C;AAM1C,qCAAyD;AAEzD,uCAAsC;AACtC,mCAAqC;AA8BrC,SAAS,MAAM,CAAC,MAAiB,EAAE,GAAgB,EAAE,QAAiB;IACpE,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,IAAI,QAAQ;QAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzC,OAAO,MAAM,CAAC;AAChB,CAAC;AASD,eAAsB,OAAoB,EAAE,IAAI,GAAgB,EAAE;IAChE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAIzB,KAAK,CACH,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAClD,MAAM,CAAC,IAAI,kBAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAU,CAAC,MAAM,CAAC,CAC/F,EACD,IAAI,CACL,CAAC;QAGF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElB,KAAK,CAC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CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;YACvG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;gBAAE,UAAU,CAAC,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;YACzF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,CACnC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC;oBACrC,KAAK;oBACL,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;iBACpF,CAAC,CACH,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,GAAG,EAAW,CAAC;QACnC,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO;YACP,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAC5D,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { ClassType } from "@aom-js/core";
2
+ export declare type HTTPMethods = "get" | "post" | "put" | "patch" | "delete" | "options" | "all" | "sockets";
3
+ export declare type HandlerFunction = (...args: any[]) => any;
4
+ export declare type MiddlewareHandler = HandlerFunction;
5
+ export declare type FwdFunction = () => HandlerFunction | ClassType;
6
+ export declare type RefFunction = (constructor: ClassType) => any;
7
+ export declare type ContainerFunction = FwdFunction | RefFunction;
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,MAAM,CAAC,OAAO,MAAM,WAAW,GAC7B,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAO9E,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAG9D,MAAM,CAAC,OAAO,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAGxD,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG,MAAM,eAAe,GAAG,SAAS,CAAC;AAMpE,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,SAAS,KAAK,GAAG,CAAC;AAGlE,MAAM,CAAC,OAAO,MAAM,iBAAiB,GAAG,WAAW,GAAG,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export declare const CONSTRUCTOR_TYPE_ERROR = "CONSTRUCTOR_TYPE_ERROR";
2
+ export declare const ERROR_CONSTRUCTOR_ERROR = "ERROR_CONSTRUCTOR_ERROR";
3
+ export declare const PARAMETER_HANDLER_ERROR = "PARAMETER_HANDLER_ERROR";
4
+ export declare const CONSTRUCTOR_PROPERTY_TYPE_ERROR = "CONSTRUCTOR_PROPERTY_TYPE_ERROR";
5
+ export declare const COMMON_ENDPOINT_ERROR = "COMMON_ENDPOINT_ERROR";
6
+ export declare const ENDPOINT_DEFINE_ERROR = "ENDPOINT_DEFINE_ERROR";
7
+ export declare const NEXPOINT_DEFINE_ERROR = "NEXPOINT_DEFINE_ERROR";
8
+ export declare const WEBSOCKET_DEFINE_ERROR = "WEBSOCKET_DEFINE_ERROR";
9
+ export declare const MIDDLEWARE_DEFINE_ERROR = "MIDDLEWARE_DEFINE_ERROR";
10
+ export declare const ON_INSTANCE_DEFINE_ERROR = "ON_INSTANCE_DEFINE_ERROR";
11
+ export declare const USE_NEXT_DEFINE_ERROR = "USE_NEXT_DEFINE_ERROR";
12
+ export declare const USE_MARKER_DEFINE_ERROR = "USE_MARKER_DEFINE_ERROR";
13
+ export declare const USE_MIDDLEWARE_DEFINE_ERROR = "USE_MIDDLEWARE_DEFINE_ERROR";
14
+ export declare const CURSOR_KIND_DEFINE_ERROR = "CURSOR_KIND_DEFINE_ERROR";
15
+ export declare const RESPONSE_EVENTS_DEFINE_ERROR = "RESPONSE_EVENTS_DEFINE_ERROR";
16
+ export declare const ROUTE_REF_DELAY_ERROR = "ROUTE_REF_DELAY_ERROR";
17
+ export declare const ROUTE_OF_NOT_FOUND_ERROR = "ROUTE_OF_NOT_FOUND_ERROR";
18
+ export declare const ROUTE_OF_AMBIGUOUS_ERROR = "ROUTE_OF_AMBIGUOUS_ERROR";
19
+ export declare const CIRCULAR_INSTANCE_ERROR = "CIRCULAR_INSTANCE_ERROR";
20
+ export declare const CURSOR_NOT_EXECUTABLE_ERROR = "CURSOR_NOT_EXECUTABLE_ERROR";
21
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/constants/errors.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,+BAA+B,oCAAoC,CAAC;AAEjF,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAG7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAGnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAGzE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAGnE,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAG3E,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAO7D,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAMnE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAUnE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAUjE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CURSOR_NOT_EXECUTABLE_ERROR = exports.CIRCULAR_INSTANCE_ERROR = exports.ROUTE_OF_AMBIGUOUS_ERROR = exports.ROUTE_OF_NOT_FOUND_ERROR = exports.ROUTE_REF_DELAY_ERROR = exports.RESPONSE_EVENTS_DEFINE_ERROR = exports.CURSOR_KIND_DEFINE_ERROR = exports.USE_MIDDLEWARE_DEFINE_ERROR = exports.USE_MARKER_DEFINE_ERROR = exports.USE_NEXT_DEFINE_ERROR = exports.ON_INSTANCE_DEFINE_ERROR = exports.MIDDLEWARE_DEFINE_ERROR = exports.WEBSOCKET_DEFINE_ERROR = exports.NEXPOINT_DEFINE_ERROR = exports.ENDPOINT_DEFINE_ERROR = exports.COMMON_ENDPOINT_ERROR = exports.CONSTRUCTOR_PROPERTY_TYPE_ERROR = exports.PARAMETER_HANDLER_ERROR = exports.ERROR_CONSTRUCTOR_ERROR = exports.CONSTRUCTOR_TYPE_ERROR = void 0;
4
+ exports.CONSTRUCTOR_TYPE_ERROR = "CONSTRUCTOR_TYPE_ERROR";
5
+ exports.ERROR_CONSTRUCTOR_ERROR = "ERROR_CONSTRUCTOR_ERROR";
6
+ exports.PARAMETER_HANDLER_ERROR = "PARAMETER_HANDLER_ERROR";
7
+ exports.CONSTRUCTOR_PROPERTY_TYPE_ERROR = "CONSTRUCTOR_PROPERTY_TYPE_ERROR";
8
+ exports.COMMON_ENDPOINT_ERROR = "COMMON_ENDPOINT_ERROR";
9
+ exports.ENDPOINT_DEFINE_ERROR = "ENDPOINT_DEFINE_ERROR";
10
+ exports.NEXPOINT_DEFINE_ERROR = "NEXPOINT_DEFINE_ERROR";
11
+ exports.WEBSOCKET_DEFINE_ERROR = "WEBSOCKET_DEFINE_ERROR";
12
+ exports.MIDDLEWARE_DEFINE_ERROR = "MIDDLEWARE_DEFINE_ERROR";
13
+ exports.ON_INSTANCE_DEFINE_ERROR = "ON_INSTANCE_DEFINE_ERROR";
14
+ exports.USE_NEXT_DEFINE_ERROR = "USE_NEXT_DEFINE_ERROR";
15
+ exports.USE_MARKER_DEFINE_ERROR = "USE_MARKER_DEFINE_ERROR";
16
+ exports.USE_MIDDLEWARE_DEFINE_ERROR = "USE_MIDDLEWARE_DEFINE_ERROR";
17
+ exports.CURSOR_KIND_DEFINE_ERROR = "CURSOR_KIND_DEFINE_ERROR";
18
+ exports.RESPONSE_EVENTS_DEFINE_ERROR = "RESPONSE_EVENTS_DEFINE_ERROR";
19
+ exports.ROUTE_REF_DELAY_ERROR = "ROUTE_REF_DELAY_ERROR";
20
+ exports.ROUTE_OF_NOT_FOUND_ERROR = "ROUTE_OF_NOT_FOUND_ERROR";
21
+ exports.ROUTE_OF_AMBIGUOUS_ERROR = "ROUTE_OF_AMBIGUOUS_ERROR";
22
+ exports.CIRCULAR_INSTANCE_ERROR = "CIRCULAR_INSTANCE_ERROR";
23
+ exports.CURSOR_NOT_EXECUTABLE_ERROR = "CURSOR_NOT_EXECUTABLE_ERROR";
24
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/constants/errors.ts"],"names":[],"mappings":";;;AAMa,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAElD,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AAEpD,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AAEpD,QAAA,+BAA+B,GAAG,iCAAiC,CAAC;AAEpE,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAGhD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAEhD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAEhD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAElD,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AAEpD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAGtD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAEhD,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AAEpD,QAAA,2BAA2B,GAAG,6BAA6B,CAAC;AAG5D,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAGtD,QAAA,4BAA4B,GAAG,8BAA8B,CAAC;AAG9D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAOhD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAMtD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAUtD,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AAUpD,QAAA,2BAA2B,GAAG,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./errors.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./errors.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
@@ -0,0 +1,22 @@
1
+ import { ClassConstructor } from "@aom-js/core";
2
+ import { ArgumentsDecoratorHandler, type AomParameterDescriptor } from "../../common/index.js";
3
+ import type { FwdContainer, ThisRefContainer, RouteRefContainer } from "../../common/index.js";
4
+ import { AomApi } from "../../common/index.js";
5
+ export declare function Args(handler?: ArgumentsDecoratorHandler, descriptor?: AomParameterDescriptor): ReturnType<typeof AomApi.parameterDecorator>;
6
+ export declare function Query(queryHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
7
+ export declare function Body(bodyHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
8
+ export declare function Params(paramsHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
9
+ export declare function Cookies(paramsHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
10
+ export declare function Session(sessionName?: string): ReturnType<typeof Args>;
11
+ export declare function Files(fileName?: string): ReturnType<typeof Args>;
12
+ export declare function Headers(headerHandler?: Function | ThisRefContainer | RouteRefContainer | string): ReturnType<typeof Args>;
13
+ export declare function Run(): ReturnType<typeof Args>;
14
+ export declare function Ctx(): ParameterDecorator;
15
+ export declare function Err(ErrorConstructor?: ClassConstructor): ReturnType<typeof Args>;
16
+ export declare function Req(): ParameterDecorator;
17
+ export declare function Res(): ParameterDecorator;
18
+ export declare function Cursor(): ReturnType<typeof Args>;
19
+ export declare function Route(): ReturnType<typeof Args>;
20
+ export declare function State(constructor?: ClassConstructor): ReturnType<typeof Args>;
21
+ export declare function This(constructor?: ClassConstructor | FwdContainer | RouteRefContainer | ThisRefContainer): ReturnType<typeof Args>;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/arguments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,cAAc,CAAC;AAGhE,OAAO,EAIL,yBAAyB,EAKzB,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAoCtC,wBAAgB,IAAI,CAClB,OAAO,GAAE,yBAA0C,EACnD,UAAU,GAAE,sBAAyD,GACpE,UAAU,CAAC,OAAO,MAAM,CAAC,kBAAkB,CAAC,CAM9C;AAmDD,wBAAgB,KAAK,CACnB,YAAY,GAAE,QAAQ,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,MAAuB,GACtF,UAAU,CAAC,OAAO,IAAI,CA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ClB,WAAW,CAAC,EAAE,gBAAgB,GAAG,YAAY,GAAG,iBAAiB,GAAG,gBAAgB,GACnF,UAAU,CAAC,OAAO,IAAI,CAAC,CAezB"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Args = Args;
37
+ exports.Query = Query;
38
+ exports.Body = Body;
39
+ exports.Params = Params;
40
+ exports.Cookies = Cookies;
41
+ exports.Session = Session;
42
+ exports.Files = Files;
43
+ exports.Headers = Headers;
44
+ exports.Run = Run;
45
+ exports.Ctx = Ctx;
46
+ exports.Err = Err;
47
+ exports.Req = Req;
48
+ exports.Res = Res;
49
+ exports.Cursor = Cursor;
50
+ exports.Route = Route;
51
+ exports.State = State;
52
+ exports.This = This;
53
+ const core_1 = require("@aom-js/core");
54
+ const constants = __importStar(require("../../constants/index.js"));
55
+ const common_1 = require("../../common/index.js");
56
+ const common_2 = require("../../common/index.js");
57
+ function defaultHandler(args) {
58
+ return args;
59
+ }
60
+ function Args(handler = defaultHandler, descriptor = { kind: common_1.AomParameterKind.Other }) {
61
+ if (typeof handler !== "function")
62
+ throw new Error(constants.PARAMETER_HANDLER_ERROR);
63
+ return common_2.AomApi.parameterDecorator(($, parameterIndex) => {
64
+ $.element.parameters.handlers[parameterIndex] = handler;
65
+ $.element.parameters.descriptors[parameterIndex] = descriptor;
66
+ }, core_1.ExecutionPhase.LAST);
67
+ }
68
+ function values(source, ref, thisArg) {
69
+ const handler = async function ({ context, cursor }) {
70
+ const target = (0, common_1.resolveTarget)(ref, cursor);
71
+ const value = await context.value(source);
72
+ if ("string" === typeof target)
73
+ return Reflect.get(value, target);
74
+ return Reflect.apply(target, thisArg?.(cursor), [value]);
75
+ };
76
+ return Args(handler, { kind: common_1.AomParameterKind.Values, source, ref });
77
+ }
78
+ function Query(queryHandler = defaultHandler) {
79
+ return values(common_1.AomValuesSource.Query, queryHandler);
80
+ }
81
+ function Body(bodyHandler = defaultHandler) {
82
+ return values(common_1.AomValuesSource.Body, bodyHandler);
83
+ }
84
+ function Params(paramsHandler = defaultHandler) {
85
+ return values(common_1.AomValuesSource.Params, paramsHandler);
86
+ }
87
+ function Cookies(paramsHandler = defaultHandler) {
88
+ return values(common_1.AomValuesSource.Cookies, paramsHandler);
89
+ }
90
+ function Session(sessionName) {
91
+ const handler = async function (args) {
92
+ const { context } = args;
93
+ const session = await context.value("session");
94
+ return sessionName ? Reflect.get(session, sessionName) : session;
95
+ };
96
+ return Args(handler, { kind: common_1.AomParameterKind.Values, source: common_1.AomValuesSource.Session, ref: sessionName });
97
+ }
98
+ function Files(fileName) {
99
+ const handler = async function (args) {
100
+ const { context } = args;
101
+ const files = await context.value("files");
102
+ return fileName ? Reflect.get(files, fileName) : files;
103
+ };
104
+ return Args(handler, { kind: common_1.AomParameterKind.Values, source: common_1.AomValuesSource.Files, ref: fileName });
105
+ }
106
+ function Headers(headerHandler = defaultHandler) {
107
+ return values(common_1.AomValuesSource.Headers, headerHandler, (cursor) => cursor.constructor);
108
+ }
109
+ function Run() {
110
+ const handler = function ({ context, cursor }) {
111
+ return (...handlers) => {
112
+ const { prefix, endpoint } = cursor;
113
+ const cursors = handlers.map((handler, index) => {
114
+ const $ = common_2.AomApi.instance(handler);
115
+ const nextCursor = new common_1.AomCursor($, cursor.$, prefix, endpoint);
116
+ nextCursor.index = index;
117
+ nextCursor.creating = cursor.creating;
118
+ return nextCursor;
119
+ });
120
+ return context.run(cursors);
121
+ };
122
+ };
123
+ return Args(handler, { kind: common_1.AomParameterKind.Run });
124
+ }
125
+ function Ctx() {
126
+ const handler = function (args) {
127
+ const { context } = args;
128
+ return context.values.ctx;
129
+ };
130
+ return Args(handler, { kind: common_1.AomParameterKind.Ctx });
131
+ }
132
+ function Err(ErrorConstructor = Error) {
133
+ if (!(ErrorConstructor === Error || ErrorConstructor.prototype instanceof Error))
134
+ throw new Error(constants.ERROR_CONSTRUCTOR_ERROR);
135
+ const handler = function () {
136
+ return function (message, status, data) {
137
+ const error = new ErrorConstructor(message);
138
+ status = status || Reflect.get(error, "status") || Reflect.get(ErrorConstructor, "status");
139
+ data = data || Reflect.get(error, "data");
140
+ return Object.assign(error, { status, data });
141
+ };
142
+ };
143
+ return Args(handler, { kind: common_1.AomParameterKind.Err });
144
+ }
145
+ function Req() {
146
+ const handler = function (args) {
147
+ const { context } = args;
148
+ return context.values.req;
149
+ };
150
+ return Args(handler, { kind: common_1.AomParameterKind.Req });
151
+ }
152
+ function Res() {
153
+ const handler = function (args) {
154
+ const { context } = args;
155
+ return context.values.res;
156
+ };
157
+ return Args(handler, { kind: common_1.AomParameterKind.Res });
158
+ }
159
+ function Cursor() {
160
+ const handler = function ({ cursor }) {
161
+ return cursor;
162
+ };
163
+ return Args(handler, { kind: common_1.AomParameterKind.Cursor });
164
+ }
165
+ function Route() {
166
+ const handler = function ({ route }) {
167
+ return route;
168
+ };
169
+ return Args(handler, { kind: common_1.AomParameterKind.Route });
170
+ }
171
+ function State(constructor) {
172
+ const handler = ({ context }) => {
173
+ return constructor ? context.state.get(constructor) : context.state;
174
+ };
175
+ return Args(handler, { kind: common_1.AomParameterKind.State, ref: constructor });
176
+ }
177
+ function This(constructor) {
178
+ if (constructor && !(constructor instanceof Function || constructor instanceof common_1.RefContainer)) {
179
+ throw new Error(constants.CONSTRUCTOR_TYPE_ERROR);
180
+ }
181
+ const handler = async (args) => {
182
+ const { cursor } = args;
183
+ const target = constructor ? (0, common_1.resolveTarget)(constructor, cursor) : cursor.$._.target;
184
+ return common_2.AomApi.instanceWithHooks(target, args);
185
+ };
186
+ return Args(handler, { kind: common_1.AomParameterKind.This, ref: constructor });
187
+ }
188
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/arguments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAgE;AAChE,MAAY,SAAS,4CAAwB;AAE7C,yCAUsB;AAEtB,yCAAsC;AAGtC,SAAS,cAAc,CAAC,IAAsC;IAC5D,OAAO,IAAI,CAAC;AACd,CAAC;AA+BD,cACE,OAAO,GAA8B,cAAc,EACnD,UAAU,GAA2B,EAAE,IAAI,EAAE,yBAAgB,CAAC,KAAK,EAAE;IAErE,IAAI,OAAO,OAAO,KAAK,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;IACtF,OAAO,eAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE;QACrD,CAAC,CAAC,OAAO,CAAC,UAAU,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,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function Controller(): ClassDecorator;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/controllers/index.ts"],"names":[],"mappings":"AA6CA,wBAAgB,UAAU,mBAsBzB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Controller = Controller;
4
+ const core_1 = require("@aom-js/core");
5
+ const common_1 = require("../../common/index.js");
6
+ function Controller() {
7
+ return common_1.AomApi.classDecorator(($) => {
8
+ $.element.isController = true;
9
+ const errors = [];
10
+ const inheritDecorators = (parent) => {
11
+ const $parent = $._.inherit(parent);
12
+ if (!$parent.element.isController &&
13
+ $._.base.instance(Object.getPrototypeOf(parent)).element.isController) {
14
+ inheritDecorators(Object.getPrototypeOf(parent));
15
+ }
16
+ };
17
+ inheritDecorators(Object.getPrototypeOf($._.target));
18
+ $._.apply();
19
+ }, core_1.ExecutionPhase.INSTANT);
20
+ }
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/controllers/index.ts"],"names":[],"mappings":";;;AAAA,uCAAyD;AACzD,yCAAsC;AA4CtC;IACE,OAAO,eAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;QACjC,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;QAE9B,MAAM,MAAM,GAAY,EAAE,CAAC;QAE3B,MAAM,iBAAiB,GAAG,CAAC,MAAiB,EAAE,EAAE;YAE9C,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAGpC,IACE,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY;gBAC7B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EACrE,CAAC;gBACD,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YACnD,CAAC;QACH,CAAC,CAAC;QACF,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IACd,CAAC,EAAE,qBAAc,CAAC,OAAO,CAAC,CAAC;AAE7B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { CombinedDecorator } from "@aom-js/core";
2
+ export declare function Title(value: string): CombinedDecorator;
3
+ export declare function Description(value: string): CombinedDecorator;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA4BtD,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAItD;AAUD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAI5D"}