raiton 0.0.2 → 1.0.0-alpha.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 (435) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +20 -0
  3. package/build/bin/index.mjs +6788 -47
  4. package/build/raiton-1.0.0-alpha.1.tgz +0 -0
  5. package/package.json +21 -36
  6. package/source/bin/bootstrapper.ts +15 -0
  7. package/source/bin/cli-tools.ts +43 -0
  8. package/source/bin/cli.ts +12 -0
  9. package/source/bin/index.ts +6 -0
  10. package/source/commands/artifact.command.ts +28 -0
  11. package/source/commands/build.command.ts +31 -0
  12. package/source/commands/develop.command.ts +47 -0
  13. package/source/commands/grafts.command.ts +27 -0
  14. package/source/commands/start.command.ts +28 -0
  15. package/source/core/application.ts +115 -0
  16. package/source/core/artifacts/artifact.ts +109 -0
  17. package/source/core/artifacts/artifacts.ts +10 -0
  18. package/source/core/artifacts/index.ts +1 -0
  19. package/source/core/artifacts/runner.ts +3 -0
  20. package/source/core/builder.ts +138 -0
  21. package/source/core/bytes.util.ts +17 -0
  22. package/source/core/command.ts +24 -0
  23. package/source/core/commands.ts +44 -0
  24. package/source/core/config/config.ts +51 -0
  25. package/source/core/config/define.ts +13 -0
  26. package/source/core/config/index.ts +2 -0
  27. package/source/core/context.ts +33 -0
  28. package/source/core/controller/builder.ts +38 -0
  29. package/source/core/controller/compiler.ts +22 -0
  30. package/source/core/controller/index.ts +3 -0
  31. package/source/core/controller/metadata.ts +13 -0
  32. package/source/core/directories.ts +30 -0
  33. package/source/core/helpers/index.ts +1 -0
  34. package/source/core/helpers/raiton.ts +3 -0
  35. package/source/core/hmr.ts +106 -0
  36. package/source/core/hooks.ts +28 -0
  37. package/source/core/index.ts +13 -0
  38. package/source/core/injection/index.ts +1 -0
  39. package/source/core/injection/injection.ts +157 -0
  40. package/source/core/middleware/compose.ts +40 -0
  41. package/source/core/middleware/index.ts +2 -0
  42. package/source/core/middleware/pipeline.ts +27 -0
  43. package/source/core/plugins/index.ts +2 -0
  44. package/source/core/plugins/plugin.ts +8 -0
  45. package/source/core/plugins/scope.ts +46 -0
  46. package/source/core/process.util.ts +12 -0
  47. package/source/core/raiton.ts +21 -0
  48. package/source/core/router/handler.ts +59 -0
  49. package/source/core/router/index.ts +4 -0
  50. package/source/core/router/matcher.ts +51 -0
  51. package/source/core/router/route.ts +63 -0
  52. package/source/core/router/router.ts +31 -0
  53. package/source/core/server.ts +26 -0
  54. package/source/core/thread.ts +87 -0
  55. package/source/env.d.ts +3 -0
  56. package/source/requirements.ts +27 -0
  57. package/source/sdk/artifacts.ts +55 -0
  58. package/source/sdk/constants/decorators.constant.ts +7 -0
  59. package/source/sdk/constants/index.ts +2 -0
  60. package/source/sdk/constants/microservices.constant.ts +4 -0
  61. package/source/sdk/controllers.ts +4 -0
  62. package/source/sdk/data-transfer-object.ts +7 -0
  63. package/source/sdk/decorators/access-guard.decorator.ts +9 -0
  64. package/source/sdk/decorators/controllable.decorator.ts +20 -0
  65. package/source/sdk/decorators/index.ts +5 -0
  66. package/source/sdk/decorators/injection.decorator.ts +46 -0
  67. package/source/sdk/decorators/middleware.decorator.ts +15 -0
  68. package/source/sdk/decorators/parametrable.ts +24 -0
  69. package/source/sdk/decorators/payload.decorator.ts +77 -0
  70. package/source/sdk/decorators/routable.decorator.ts +48 -0
  71. package/source/sdk/encryption.ts +155 -0
  72. package/source/sdk/enums/encrypted.enum.ts +13 -0
  73. package/source/sdk/enums/event.message.enum.ts +4 -0
  74. package/{build/sdk/enums/http-parameters.enum.d.ts → source/sdk/enums/http-parameters.enum.ts} +3 -5
  75. package/source/sdk/enums/http.enum.ts +10 -0
  76. package/source/sdk/enums/index.ts +6 -0
  77. package/{build/sdk/enums/runtime.enum.d.ts → source/sdk/enums/runtime.enum.ts} +2 -4
  78. package/{build/sdk/enums/timestamp.enum.d.ts → source/sdk/enums/timestamp.enum.ts} +2 -4
  79. package/source/sdk/env.ts +40 -0
  80. package/source/sdk/index.ts +6 -0
  81. package/source/sdk/json.ts +55 -0
  82. package/source/sdk/plugins/body-parser.plugin.ts +119 -0
  83. package/source/sdk/plugins/index.ts +2 -0
  84. package/source/sdk/plugins/security/body-limit.ts +19 -0
  85. package/source/sdk/plugins/security/cors.ts +44 -0
  86. package/source/sdk/plugins/security/headers.ts +14 -0
  87. package/source/sdk/plugins/security/index.ts +13 -0
  88. package/source/sdk/plugins/security/method-guard.ts +14 -0
  89. package/source/sdk/plugins/security/rate-limit.ts +42 -0
  90. package/source/sdk/repositories.ts +14 -0
  91. package/source/sdk/request.ts +3 -0
  92. package/source/sdk/responses.ts +45 -0
  93. package/source/sdk/runtime/bun/server.ts +72 -0
  94. package/source/sdk/runtime/deno/server.ts +53 -0
  95. package/source/sdk/runtime/index.ts +47 -0
  96. package/source/sdk/runtime/node/server.ts +60 -0
  97. package/source/sdk/runtime/web/server.ts +57 -0
  98. package/{build/sdk/schemes.d.ts → source/sdk/schemes.ts} +91 -33
  99. package/source/sdk/services.ts +9 -0
  100. package/{build/sdk/throwable.d.ts → source/sdk/throwable.ts} +35 -12
  101. package/source/sdk/utilities/alias-path.util.ts +49 -0
  102. package/source/sdk/utilities/artifacts.util.ts +62 -0
  103. package/source/sdk/utilities/callable.util.ts +27 -0
  104. package/source/sdk/utilities/controller.util.ts +8 -0
  105. package/source/sdk/utilities/index.ts +7 -0
  106. package/source/sdk/utilities/json.util.ts +21 -0
  107. package/source/sdk/utilities/path.util.ts +19 -0
  108. package/source/sdk/utilities/url.ts +5 -0
  109. package/source/sdk/utilities/utilities.util.ts +25 -0
  110. package/source/types/access-guards.ts +4 -0
  111. package/{build/types/application.d.ts → source/types/application.ts} +23 -7
  112. package/source/types/artifact.ts +40 -0
  113. package/source/types/builder.ts +48 -0
  114. package/source/types/config.ts +7 -0
  115. package/source/types/controller.ts +34 -0
  116. package/source/types/contruct.ts +3 -0
  117. package/source/types/core.ts +28 -0
  118. package/source/types/data-transfer-object.ts +4 -0
  119. package/{build/types/directory.d.ts → source/types/directory.ts} +4 -4
  120. package/source/types/encryption.ts +17 -0
  121. package/source/types/generic.ts +3 -0
  122. package/{build/types/hmr.d.ts → source/types/hmr.ts} +19 -5
  123. package/source/types/http-responses.ts +8 -0
  124. package/source/types/index.ts +26 -0
  125. package/source/types/injection.ts +13 -0
  126. package/source/types/middleware.ts +18 -0
  127. package/source/types/parseable.ts +7 -0
  128. package/source/types/plugin.ts +10 -0
  129. package/source/types/raiton.ts +9 -0
  130. package/source/types/responses.ts +10 -0
  131. package/source/types/router.ts +11 -0
  132. package/source/types/runtime.ts +53 -0
  133. package/{build/types/scheme.d.ts → source/types/scheme.ts} +33 -8
  134. package/source/types/server.ts +12 -0
  135. package/source/types/thread.ts +31 -0
  136. package/source/types/utilities.ts +4 -0
  137. package/source/types/values.ts +3 -0
  138. package/.releaserc.json +0 -45
  139. package/build/bin/bootstrapper.d.ts +0 -5
  140. package/build/bin/bootstrapper.mjs +0 -46
  141. package/build/bin/cli.d.ts +0 -5
  142. package/build/bin/cli.mjs +0 -6
  143. package/build/bin/index.d.ts +0 -1
  144. package/build/chunk-3PWMRP6G.mjs +0 -16
  145. package/build/chunk-52JR26TI.mjs +0 -29
  146. package/build/chunk-5LNOA4SK.mjs +0 -16
  147. package/build/chunk-AUGL35CF.mjs +0 -24
  148. package/build/chunk-BVILWYAP.mjs +0 -14
  149. package/build/chunk-BYYJRCB4.mjs +0 -10
  150. package/build/chunk-FFRJ4AUA.mjs +0 -16
  151. package/build/chunk-GPJSLV3Q.mjs +0 -50
  152. package/build/chunk-HVFHDVAH.mjs +0 -20
  153. package/build/chunk-IOCHNQMF.mjs +0 -13
  154. package/build/chunk-JATYBWHL.mjs +0 -36
  155. package/build/chunk-JWNBO7XV.mjs +0 -53
  156. package/build/chunk-K4IQQ2KF.mjs +0 -55
  157. package/build/chunk-K4KLOLSO.mjs +0 -645
  158. package/build/chunk-M2RZZJQR.mjs +0 -27
  159. package/build/chunk-MLFGBJDV.mjs +0 -12
  160. package/build/chunk-NB62GSFI.mjs +0 -27
  161. package/build/chunk-O7R3NJQN.mjs +0 -19
  162. package/build/chunk-P3IRIFPT.mjs +0 -53
  163. package/build/chunk-QFSXFOEN.mjs +0 -56
  164. package/build/chunk-QHCQ4AUA.mjs +0 -14
  165. package/build/chunk-QI7OFSXB.mjs +0 -37
  166. package/build/chunk-RVH2YBNU.mjs +0 -111
  167. package/build/chunk-RXG7754R.mjs +0 -25
  168. package/build/chunk-S3ONGVNZ.mjs +0 -11
  169. package/build/chunk-SRR4467I.mjs +0 -29
  170. package/build/chunk-T6L55AUG.mjs +0 -32
  171. package/build/chunk-TOJFTPAY.mjs +0 -83
  172. package/build/chunk-UAPCBU3J.mjs +0 -12
  173. package/build/chunk-UCHBN3DV.mjs +0 -52
  174. package/build/chunk-UWM46HLZ.mjs +0 -18
  175. package/build/chunk-UZFCGVHP.mjs +0 -8
  176. package/build/chunk-VQINCGLQ.mjs +0 -59
  177. package/build/chunk-VRL4S7UF.mjs +0 -74
  178. package/build/chunk-WAWFDMOH.mjs +0 -72
  179. package/build/chunk-X3JFRRRQ.mjs +0 -45
  180. package/build/chunk-XFBLELHI.mjs +0 -34
  181. package/build/chunk-XIGE72LC.mjs +0 -34
  182. package/build/chunk-XW7EPAD7.mjs +0 -0
  183. package/build/chunk-YGIZFKLJ.mjs +0 -20
  184. package/build/chunk-YRVIAORI.mjs +0 -8
  185. package/build/chunk-YXU5W2CB.mjs +0 -12
  186. package/build/commands/artifact.command.d.ts +0 -14
  187. package/build/commands/artifact.command.mjs +0 -59
  188. package/build/commands/build.command.d.ts +0 -14
  189. package/build/commands/build.command.mjs +0 -65
  190. package/build/commands/develop.command.d.ts +0 -13
  191. package/build/commands/develop.command.mjs +0 -75
  192. package/build/commands/grafts.command.d.ts +0 -12
  193. package/build/commands/grafts.command.mjs +0 -58
  194. package/build/commands/start.command.d.ts +0 -12
  195. package/build/commands/start.command.mjs +0 -64
  196. package/build/core/application.d.ts +0 -27
  197. package/build/core/application.mjs +0 -124
  198. package/build/core/artifact.d.ts +0 -19
  199. package/build/core/artifact.mjs +0 -133
  200. package/build/core/builder.d.ts +0 -35
  201. package/build/core/builder.mjs +0 -45
  202. package/build/core/bytes.util.d.ts +0 -6
  203. package/build/core/bytes.util.mjs +0 -8
  204. package/build/core/command.d.ts +0 -15
  205. package/build/core/command.mjs +0 -6
  206. package/build/core/commands.d.ts +0 -13
  207. package/build/core/commands.mjs +0 -7
  208. package/build/core/config.d.ts +0 -10
  209. package/build/core/config.mjs +0 -7
  210. package/build/core/context.d.ts +0 -15
  211. package/build/core/context.mjs +0 -6
  212. package/build/core/controller/builder.d.ts +0 -10
  213. package/build/core/controller/builder.mjs +0 -45
  214. package/build/core/controller/compiler.d.ts +0 -6
  215. package/build/core/controller/compiler.mjs +0 -45
  216. package/build/core/controller/index.d.ts +0 -13
  217. package/build/core/controller/index.mjs +0 -50
  218. package/build/core/controller/metadata.d.ts +0 -10
  219. package/build/core/controller/metadata.mjs +0 -6
  220. package/build/core/directories.d.ts +0 -11
  221. package/build/core/directories.mjs +0 -8
  222. package/build/core/hmr.d.ts +0 -22
  223. package/build/core/hmr.mjs +0 -6
  224. package/build/core/hooks.d.ts +0 -12
  225. package/build/core/hooks.mjs +0 -6
  226. package/build/core/index.d.ts +0 -41
  227. package/build/core/index.mjs +0 -100
  228. package/build/core/middleware/compose.d.ts +0 -8
  229. package/build/core/middleware/compose.mjs +0 -6
  230. package/build/core/middleware/index.d.ts +0 -6
  231. package/build/core/middleware/index.mjs +0 -11
  232. package/build/core/middleware/pipeline.d.ts +0 -14
  233. package/build/core/middleware/pipeline.mjs +0 -7
  234. package/build/core/plugins/index.d.ts +0 -14
  235. package/build/core/plugins/index.mjs +0 -48
  236. package/build/core/plugins/plugin.d.ts +0 -17
  237. package/build/core/plugins/plugin.mjs +0 -6
  238. package/build/core/plugins/scope.d.ts +0 -24
  239. package/build/core/plugins/scope.mjs +0 -45
  240. package/build/core/process.util.d.ts +0 -3
  241. package/build/core/process.util.mjs +0 -6
  242. package/build/core/raiton.d.ts +0 -20
  243. package/build/core/raiton.mjs +0 -6
  244. package/build/core/router/handler.d.ts +0 -10
  245. package/build/core/router/handler.mjs +0 -45
  246. package/build/core/router/index.d.ts +0 -12
  247. package/build/core/router/index.mjs +0 -54
  248. package/build/core/router/matcher.d.ts +0 -21
  249. package/build/core/router/matcher.mjs +0 -6
  250. package/build/core/router/route.d.ts +0 -20
  251. package/build/core/router/route.mjs +0 -6
  252. package/build/core/router/router.d.ts +0 -16
  253. package/build/core/router/router.mjs +0 -8
  254. package/build/core/thread.d.ts +0 -30
  255. package/build/core/thread.mjs +0 -45
  256. package/build/env.d.d.ts +0 -2
  257. package/build/env.d.mjs +0 -0
  258. package/build/raiton-0.0.2.tgz +0 -0
  259. package/build/requirements.d.ts +0 -2
  260. package/build/requirements.mjs +0 -19
  261. package/build/sdk/artifacts.d.ts +0 -13
  262. package/build/sdk/artifacts.mjs +0 -45
  263. package/build/sdk/constants/decorators.constant.d.ts +0 -11
  264. package/build/sdk/constants/decorators.constant.mjs +0 -6
  265. package/build/sdk/constants/index.d.ts +0 -2
  266. package/build/sdk/constants/index.mjs +0 -11
  267. package/build/sdk/constants/microservices.constant.d.ts +0 -5
  268. package/build/sdk/constants/microservices.constant.mjs +0 -6
  269. package/build/sdk/controllers.d.ts +0 -4
  270. package/build/sdk/controllers.mjs +0 -6
  271. package/build/sdk/data-transfer-object.d.ts +0 -7
  272. package/build/sdk/data-transfer-object.mjs +0 -7
  273. package/build/sdk/decorators/access-guard.decorator.d.ts +0 -2
  274. package/build/sdk/decorators/access-guard.decorator.mjs +0 -0
  275. package/build/sdk/decorators/controllable.d.ts +0 -3
  276. package/build/sdk/decorators/controllable.mjs +0 -45
  277. package/build/sdk/decorators/controllers.decorator.d.ts +0 -2
  278. package/build/sdk/decorators/controllers.decorator.mjs +0 -0
  279. package/build/sdk/decorators/grafts.decorator.d.ts +0 -2
  280. package/build/sdk/decorators/grafts.decorator.mjs +0 -0
  281. package/build/sdk/decorators/index.d.ts +0 -3
  282. package/build/sdk/decorators/index.mjs +0 -75
  283. package/build/sdk/decorators/parameters.decorator.d.ts +0 -2
  284. package/build/sdk/decorators/parameters.decorator.mjs +0 -0
  285. package/build/sdk/decorators/parametrable.d.ts +0 -9
  286. package/build/sdk/decorators/parametrable.mjs +0 -57
  287. package/build/sdk/decorators/payload.decorator.d.ts +0 -2
  288. package/build/sdk/decorators/payload.decorator.mjs +0 -0
  289. package/build/sdk/decorators/routable.d.ts +0 -10
  290. package/build/sdk/decorators/routable.mjs +0 -59
  291. package/build/sdk/dependency-container.d.ts +0 -19
  292. package/build/sdk/dependency-container.mjs +0 -46
  293. package/build/sdk/encryption.d.ts +0 -27
  294. package/build/sdk/encryption.mjs +0 -141
  295. package/build/sdk/enums/encrypted.enum.d.ts +0 -15
  296. package/build/sdk/enums/encrypted.enum.mjs +0 -6
  297. package/build/sdk/enums/event.message.enum.d.ts +0 -6
  298. package/build/sdk/enums/event.message.enum.mjs +0 -6
  299. package/build/sdk/enums/http-parameters.enum.mjs +0 -6
  300. package/build/sdk/enums/http.enum.d.ts +0 -12
  301. package/build/sdk/enums/http.enum.mjs +0 -6
  302. package/build/sdk/enums/index.d.ts +0 -6
  303. package/build/sdk/enums/index.mjs +0 -27
  304. package/build/sdk/enums/runtime.enum.mjs +0 -6
  305. package/build/sdk/enums/timestamp.enum.mjs +0 -6
  306. package/build/sdk/env.d.ts +0 -6
  307. package/build/sdk/env.mjs +0 -74
  308. package/build/sdk/fastify.d.ts +0 -11
  309. package/build/sdk/fastify.mjs +0 -9
  310. package/build/sdk/grafts.d.ts +0 -15
  311. package/build/sdk/grafts.mjs +0 -71
  312. package/build/sdk/index.d.ts +0 -34
  313. package/build/sdk/index.mjs +0 -126
  314. package/build/sdk/json.d.ts +0 -17
  315. package/build/sdk/json.mjs +0 -87
  316. package/build/sdk/plugins/body-parser.plugin.d.ts +0 -17
  317. package/build/sdk/plugins/body-parser.plugin.mjs +0 -7
  318. package/build/sdk/plugins/index.d.ts +0 -17
  319. package/build/sdk/plugins/index.mjs +0 -48
  320. package/build/sdk/plugins/security/body-limit.d.ts +0 -17
  321. package/build/sdk/plugins/security/body-limit.mjs +0 -45
  322. package/build/sdk/plugins/security/cors.d.ts +0 -22
  323. package/build/sdk/plugins/security/cors.mjs +0 -45
  324. package/build/sdk/plugins/security/headers.d.ts +0 -17
  325. package/build/sdk/plugins/security/headers.mjs +0 -45
  326. package/build/sdk/plugins/security/index.d.ts +0 -25
  327. package/build/sdk/plugins/security/index.mjs +0 -45
  328. package/build/sdk/plugins/security/method-guard.d.ts +0 -17
  329. package/build/sdk/plugins/security/method-guard.mjs +0 -45
  330. package/build/sdk/plugins/security/rate-limit.d.ts +0 -21
  331. package/build/sdk/plugins/security/rate-limit.mjs +0 -45
  332. package/build/sdk/repositories.d.ts +0 -7
  333. package/build/sdk/repositories.mjs +0 -17
  334. package/build/sdk/request.d.ts +0 -4
  335. package/build/sdk/request.mjs +0 -6
  336. package/build/sdk/responses.d.ts +0 -8
  337. package/build/sdk/responses.mjs +0 -20
  338. package/build/sdk/routes.d.ts +0 -7
  339. package/build/sdk/routes.mjs +0 -61
  340. package/build/sdk/runtime/bun/server.d.ts +0 -6
  341. package/build/sdk/runtime/bun/server.mjs +0 -6
  342. package/build/sdk/runtime/deno/server.d.ts +0 -6
  343. package/build/sdk/runtime/deno/server.mjs +0 -6
  344. package/build/sdk/runtime/index.d.ts +0 -15
  345. package/build/sdk/runtime/index.mjs +0 -11
  346. package/build/sdk/runtime/node/reply.d.ts +0 -2
  347. package/build/sdk/runtime/node/reply.mjs +0 -0
  348. package/build/sdk/runtime/node/request.d.ts +0 -2
  349. package/build/sdk/runtime/node/request.mjs +0 -0
  350. package/build/sdk/runtime/node/server.d.ts +0 -6
  351. package/build/sdk/runtime/node/server.mjs +0 -6
  352. package/build/sdk/runtime/web/server.d.ts +0 -6
  353. package/build/sdk/runtime/web/server.mjs +0 -6
  354. package/build/sdk/schemes.mjs +0 -129
  355. package/build/sdk/services.d.ts +0 -8
  356. package/build/sdk/services.mjs +0 -10
  357. package/build/sdk/throwable.mjs +0 -14
  358. package/build/sdk/utilities/alias-path.util.d.ts +0 -9
  359. package/build/sdk/utilities/alias-path.util.mjs +0 -6
  360. package/build/sdk/utilities/artifacts.util.d.ts +0 -3
  361. package/build/sdk/utilities/artifacts.util.mjs +0 -45
  362. package/build/sdk/utilities/callable.util.d.ts +0 -3
  363. package/build/sdk/utilities/callable.util.mjs +0 -6
  364. package/build/sdk/utilities/controller.util.d.ts +0 -3
  365. package/build/sdk/utilities/controller.util.mjs +0 -6
  366. package/build/sdk/utilities/index.d.ts +0 -7
  367. package/build/sdk/utilities/index.mjs +0 -62
  368. package/build/sdk/utilities/json.util.d.ts +0 -3
  369. package/build/sdk/utilities/json.util.mjs +0 -6
  370. package/build/sdk/utilities/parameters-arguments.util.d.ts +0 -2
  371. package/build/sdk/utilities/parameters-arguments.util.mjs +0 -0
  372. package/build/sdk/utilities/url.d.ts +0 -3
  373. package/build/sdk/utilities/url.mjs +0 -7
  374. package/build/sdk/utilities/utilities.util.d.ts +0 -6
  375. package/build/sdk/utilities/utilities.util.mjs +0 -8
  376. package/build/types/access-guards.d.ts +0 -6
  377. package/build/types/access-guards.mjs +0 -0
  378. package/build/types/application.mjs +0 -0
  379. package/build/types/artifact.d.ts +0 -21
  380. package/build/types/artifact.mjs +0 -0
  381. package/build/types/builder.d.ts +0 -32
  382. package/build/types/builder.mjs +0 -0
  383. package/build/types/config.d.ts +0 -6
  384. package/build/types/config.mjs +0 -0
  385. package/build/types/controller.d.ts +0 -25
  386. package/build/types/controller.mjs +0 -0
  387. package/build/types/contruct.d.ts +0 -3
  388. package/build/types/contruct.mjs +0 -0
  389. package/build/types/core.d.ts +0 -15
  390. package/build/types/core.mjs +0 -0
  391. package/build/types/data-transfer-object.d.ts +0 -5
  392. package/build/types/data-transfer-object.mjs +0 -0
  393. package/build/types/dependency-container.d.ts +0 -20
  394. package/build/types/dependency-container.mjs +0 -0
  395. package/build/types/directory.mjs +0 -0
  396. package/build/types/encryption.d.ts +0 -16
  397. package/build/types/encryption.mjs +0 -0
  398. package/build/types/generic.d.ts +0 -4
  399. package/build/types/generic.mjs +0 -0
  400. package/build/types/hmr.mjs +0 -0
  401. package/build/types/http-responses.d.ts +0 -10
  402. package/build/types/http-responses.mjs +0 -0
  403. package/build/types/index.d.ts +0 -45
  404. package/build/types/index.mjs +0 -0
  405. package/build/types/middleware.d.ts +0 -12
  406. package/build/types/middleware.mjs +0 -0
  407. package/build/types/parameters.d.ts +0 -19
  408. package/build/types/parameters.mjs +0 -0
  409. package/build/types/parseable.d.ts +0 -5
  410. package/build/types/parseable.mjs +0 -0
  411. package/build/types/payload.d.ts +0 -6
  412. package/build/types/payload.mjs +0 -0
  413. package/build/types/plugin.d.ts +0 -20
  414. package/build/types/plugin.mjs +0 -0
  415. package/build/types/raiton.d.ts +0 -12
  416. package/build/types/raiton.mjs +0 -0
  417. package/build/types/repositories.d.ts +0 -8
  418. package/build/types/repositories.mjs +0 -0
  419. package/build/types/router.d.ts +0 -14
  420. package/build/types/router.mjs +0 -0
  421. package/build/types/runtime.d.ts +0 -37
  422. package/build/types/runtime.mjs +0 -0
  423. package/build/types/scheme.mjs +0 -0
  424. package/build/types/server.d.ts +0 -57
  425. package/build/types/server.mjs +0 -0
  426. package/build/types/services.d.ts +0 -8
  427. package/build/types/services.mjs +0 -0
  428. package/build/types/thread.d.ts +0 -24
  429. package/build/types/thread.mjs +0 -0
  430. package/build/types/utilities.d.ts +0 -6
  431. package/build/types/utilities.mjs +0 -0
  432. package/build/types/values.d.ts +0 -4
  433. package/build/types/values.mjs +0 -0
  434. /package/{build/chunk-4OWCGDUD.mjs → source/sdk/runtime/node/reply.ts} +0 -0
  435. /package/{build/chunk-DIWD7ZCJ.mjs → source/sdk/runtime/node/request.ts} +0 -0
@@ -1,6 +0,0 @@
1
- import {
2
- tryParseJson
3
- } from "../../chunk-MLFGBJDV.mjs";
4
- export {
5
- tryParseJson
6
- };
@@ -1,2 +0,0 @@
1
-
2
- export { }
File without changes
@@ -1,3 +0,0 @@
1
- declare function escapeUrl(str: string): string;
2
-
3
- export { escapeUrl };
@@ -1,7 +0,0 @@
1
- // source/sdk/utilities/url.ts
2
- function escapeUrl(str) {
3
- return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4
- }
5
- export {
6
- escapeUrl
7
- };
@@ -1,6 +0,0 @@
1
- import { IGenericValueType } from '../../types/generic.js';
2
-
3
- declare function getType(value: any): IGenericValueType;
4
- declare function stabilizeJson<T>(json: string | T | null): any;
5
-
6
- export { getType, stabilizeJson };
@@ -1,8 +0,0 @@
1
- import {
2
- getType,
3
- stabilizeJson
4
- } from "../../chunk-M2RZZJQR.mjs";
5
- export {
6
- getType,
7
- stabilizeJson
8
- };
@@ -1,6 +0,0 @@
1
- interface IAccessGuardDeclaration {
2
- credential?: boolean;
3
- capabilities?: string[];
4
- }
5
-
6
- export type { IAccessGuardDeclaration };
File without changes
File without changes
@@ -1,21 +0,0 @@
1
- interface ArtifactEntry {
2
- id: string;
3
- timestamp: Date;
4
- size: number;
5
- }
6
- type ArtifactDecoratorHandler = () => void;
7
- interface ArtifactDecorator {
8
- syntax: RegExp;
9
- handler: ArtifactDecoratorHandler;
10
- }
11
- interface ArtifactOptions {
12
- artifact: string;
13
- provider: string;
14
- decorator: ArtifactDecorator;
15
- verbose?: boolean;
16
- }
17
- interface ArtifactInterface {
18
- readonly options: ArtifactOptions;
19
- }
20
-
21
- export type { ArtifactDecorator, ArtifactDecoratorHandler, ArtifactEntry, ArtifactInterface, ArtifactOptions };
File without changes
@@ -1,32 +0,0 @@
1
- import { BuildContext, BuildOptions } from 'esbuild';
2
- import { HmrInterface } from './hmr.js';
3
-
4
- interface BuildCommandOptions {
5
- develop?: boolean;
6
- bootstrap?: boolean;
7
- }
8
- interface BuilderConfig {
9
- development?: boolean;
10
- }
11
- type BuilderBootCallable = (builder: BuilderInterface) => Promise<void>;
12
- interface BuilderInterface {
13
- readonly workdir: string;
14
- readonly options: BuilderConfig;
15
- readonly hmr: HmrInterface;
16
- get context(): BuildContext<BuildOptions> | null;
17
- get source(): string | null;
18
- get out(): string | null;
19
- get bootstrapper(): string | null;
20
- get bootstrapperIndex(): string | null;
21
- get baseConfig(): BuildOptions;
22
- prepare(): Promise<this>;
23
- boot(): Promise<any>;
24
- start(callable?: BuilderBootCallable): Promise<this>;
25
- }
26
- interface BuilderHMRDeclaration {
27
- filename: string;
28
- timestamp?: number;
29
- version?: number;
30
- }
31
-
32
- export type { BuildCommandOptions, BuilderBootCallable, BuilderConfig, BuilderHMRDeclaration, BuilderInterface };
File without changes
@@ -1,6 +0,0 @@
1
- interface Configurable {
2
- rootDir: string;
3
- version: string;
4
- }
5
-
6
- export type { Configurable };
File without changes
@@ -1,25 +0,0 @@
1
- import { HttpMethod } from '../sdk/enums/http.enum.js';
2
- import { Parametrable } from '../sdk/enums/http-parameters.enum.js';
3
- import { Context } from './core.js';
4
- import './runtime.js';
5
- import '../sdk/enums/runtime.enum.js';
6
-
7
- interface ControllerMeta {
8
- prefix?: string;
9
- routes: RouteMeta[];
10
- params: Record<string, ParamMeta[]>;
11
- }
12
- interface RouteMeta {
13
- method: HttpMethod;
14
- path: string;
15
- propertyKey: string;
16
- params: ParamMeta[];
17
- }
18
- interface ParamMeta {
19
- index: number;
20
- type: Parametrable;
21
- key?: string;
22
- callable?: (ctx: Context) => any;
23
- }
24
-
25
- export type { ControllerMeta, ParamMeta, RouteMeta };
File without changes
@@ -1,3 +0,0 @@
1
- type IConstructor<T = any> = new (...args: any[]) => T;
2
-
3
- export type { IConstructor };
File without changes
@@ -1,15 +0,0 @@
1
- import { RuntimeRequest, RuntimeReply } from './runtime.js';
2
- import '../sdk/enums/runtime.enum.js';
3
-
4
- type HookName = 'onRequest' | 'preParsing' | 'preHandler' | 'onSend' | 'onResponse';
5
- type HookHandler = (ctx: Context) => Promise<void> | void;
6
- interface Context {
7
- req: RuntimeRequest;
8
- reply: RuntimeReply;
9
- state: Record<string, any>;
10
- decorate<T = any>(key: string, value: T): void;
11
- get<T = any>(key: string): T;
12
- send(body: any): void;
13
- }
14
-
15
- export type { Context, HookHandler, HookName };
File without changes
@@ -1,5 +0,0 @@
1
- import { IDynamicProps } from '@protorians/parameters';
2
-
3
- type IDataTransferObject<T> = IDynamicProps<T>;
4
-
5
- export type { IDataTransferObject };
File without changes
@@ -1,20 +0,0 @@
1
- import { IConstructor } from './contruct.js';
2
- import { LifetimeEnum } from '@protorians/core';
3
-
4
- interface IDependencyContainerDefinition<T = any> {
5
- name: string;
6
- construct: IConstructor<T>;
7
- lifetime: LifetimeEnum;
8
- instance?: any;
9
- }
10
- interface IDependencyContainer<T extends IDependencyContainerDefinition<E>, E = any> {
11
- readonly artifact: string;
12
- get classes(): Map<string, T>;
13
- get instances(): Map<string, E>;
14
- register(name: string, construct: IConstructor<E>, lifetime: LifetimeEnum): this;
15
- resolveArguments(definition: T): any[];
16
- get<T>(name: string): T | undefined;
17
- imports(): Promise<string[]>;
18
- }
19
-
20
- export type { IDependencyContainer, IDependencyContainerDefinition };
File without changes
File without changes
@@ -1,16 +0,0 @@
1
- type IEncryptionResult = string;
2
- interface IDerivationOptions {
3
- salt?: string;
4
- iterations?: number;
5
- keylen?: number;
6
- digest?: string;
7
- }
8
- interface IScryptOptions {
9
- salt?: string;
10
- keylen?: number;
11
- cost?: number;
12
- blockSize?: number;
13
- parallelization?: number;
14
- }
15
-
16
- export type { IDerivationOptions, IEncryptionResult, IScryptOptions };
File without changes
@@ -1,4 +0,0 @@
1
- type IGenericValue = 'string' | 'int' | 'bigInt' | 'float' | 'boolean';
2
- type IGenericValueType = IGenericValue | 'array' | 'object' | 'function' | undefined;
3
-
4
- export type { IGenericValue, IGenericValueType };
File without changes
File without changes
@@ -1,10 +0,0 @@
1
- import { IParseableEntry, IParseableEntries } from './parseable.js';
2
-
3
- interface IHttpResponse<T extends IParseableEntry> extends IParseableEntries {
4
- statusCode: number;
5
- message?: string;
6
- data?: T;
7
- error?: any;
8
- }
9
-
10
- export type { IHttpResponse };
File without changes
@@ -1,45 +0,0 @@
1
- export { Configurable } from './config.js';
2
- export { BuildCommandOptions, BuilderBootCallable, BuilderConfig, BuilderHMRDeclaration, BuilderInterface } from './builder.js';
3
- export { ThreadInterface, ThreadSetupOptions, ThreadWaitCallable } from './thread.js';
4
- export { IAccessGuardDeclaration } from './access-guards.js';
5
- export { IConstructor } from './contruct.js';
6
- export { IDataTransferObject } from './data-transfer-object.js';
7
- export { IDependencyContainer, IDependencyContainerDefinition } from './dependency-container.js';
8
- export { IFileStatInfo } from './directory.js';
9
- export { IDerivationOptions, IEncryptionResult, IScryptOptions } from './encryption.js';
10
- export { IGenericValue, IGenericValueType } from './generic.js';
11
- export { IHttpResponse } from './http-responses.js';
12
- export { IParseableEntries, IParseableEntry, IParseablePrimitiveEntry } from './parseable.js';
13
- export { IPayload } from './payload.js';
14
- export { IRepositoryDefinition } from './repositories.js';
15
- export { IScheme, ISchemeConfig, ISchemeOptions, ISchemePropertyOptions } from './scheme.js';
16
- export { IGraftDefinition } from './services.js';
17
- export { IString, IStringable } from './values.js';
18
- export { ServerControllerInterface, ServerFeaturesUsed, ServerHMRDeclaration, ServerInterface, ServerOptions, ServerRouteInterface, ServerSignalMap } from './server.js';
19
- export { FileSizeFormated } from './utilities.js';
20
- export { ArtifactDecorator, ArtifactDecoratorHandler, ArtifactEntry, ArtifactInterface, ArtifactOptions } from './artifact.js';
21
- export { RouteParametersMetadataCallable, RouteParametersMetadataInterface, RouteParametersMetadataPayload } from './parameters.js';
22
- export { HMRMetadataInterface, HmrInterface } from './hmr.js';
23
- export { Middleware, MiddlewareStepped, Next } from './middleware.js';
24
- export { Context, HookHandler, HookName } from './core.js';
25
- export { Plugin, PluginFn } from './plugin.js';
26
- export { RuntimeAdapter, RuntimeHandlerCallable, RuntimeInterface, RuntimeReply, RuntimeRequest, RuntimeServer } from './runtime.js';
27
- export { RouteDefinition, RouteHandler } from './router.js';
28
- export { ControllerMeta, ParamMeta, RouteMeta } from './controller.js';
29
- export { RaitonSignalMap } from './raiton.js';
30
- import 'esbuild';
31
- import './application.js';
32
- import '../sdk/enums/http.enum.js';
33
- import '../sdk/enums/runtime.enum.js';
34
- import '@protorians/parameters';
35
- import '@protorians/core';
36
- import 'fastify/types/schema';
37
- import '@sinclair/typebox';
38
- import 'fastify';
39
- import '../sdk/enums/http-parameters.enum.js';
40
- import '../core/context.js';
41
- import '../core/plugins/scope.js';
42
- import '../core/hooks.js';
43
- import '../core/middleware/pipeline.js';
44
- import '../core/router/route.js';
45
- import '../core/router/router.js';
File without changes
@@ -1,12 +0,0 @@
1
- import { RequestContext } from '../core/context.js';
2
- import './runtime.js';
3
- import '../sdk/enums/runtime.enum.js';
4
-
5
- type Next = () => Promise<void>;
6
- type MiddlewareStepped = {
7
- setup: any;
8
- name: string;
9
- };
10
- type Middleware = ((ctx: RequestContext, next: Next) => Promise<any> | void) | MiddlewareStepped;
11
-
12
- export type { Middleware, MiddlewareStepped, Next };
File without changes
@@ -1,19 +0,0 @@
1
- import { Parametrable } from '../sdk/enums/http-parameters.enum.js';
2
- import { FastifyRequest, FastifyReply } from 'fastify';
3
-
4
- interface RouteParametersMetadataPayload {
5
- request: FastifyRequest;
6
- reply: FastifyReply;
7
- files: AsyncIterableIterator<any> | any[];
8
- }
9
- type RouteParametersMetadataCallable = (payload: RouteParametersMetadataPayload) => any[];
10
- interface RouteParametersMetadataInterface {
11
- index: number;
12
- type: Parametrable;
13
- key: string;
14
- multiple: boolean;
15
- optional: boolean;
16
- callable?: RouteParametersMetadataCallable;
17
- }
18
-
19
- export type { RouteParametersMetadataCallable, RouteParametersMetadataInterface, RouteParametersMetadataPayload };
File without changes
@@ -1,5 +0,0 @@
1
- type IParseableEntry = string | number | boolean | null | undefined | IParseableEntry[] | object;
2
- type IParseableEntries = Record<string, IParseableEntry>;
3
- type IParseablePrimitiveEntry<T extends IParseableEntries> = string | T | null;
4
-
5
- export type { IParseableEntries, IParseableEntry, IParseablePrimitiveEntry };
File without changes
@@ -1,6 +0,0 @@
1
- import { FastifySchema } from 'fastify/types/schema';
2
-
3
- interface IPayload extends FastifySchema {
4
- }
5
-
6
- export type { IPayload };
File without changes
@@ -1,20 +0,0 @@
1
- import { PluginScope } from '../core/plugins/scope.js';
2
- import '../core/hooks.js';
3
- import './core.js';
4
- import './runtime.js';
5
- import '../sdk/enums/runtime.enum.js';
6
- import '../core/middleware/pipeline.js';
7
- import './middleware.js';
8
- import '../core/context.js';
9
- import '../core/router/route.js';
10
- import './router.js';
11
- import '../sdk/enums/http.enum.js';
12
- import '../core/router/router.js';
13
-
14
- type PluginFn = (scope: PluginScope) => Promise<void> | void;
15
- interface Plugin {
16
- name?: string;
17
- setup: PluginFn;
18
- }
19
-
20
- export type { Plugin, PluginFn };
File without changes
@@ -1,12 +0,0 @@
1
- import { BuilderHMRDeclaration } from './builder.js';
2
- import { Metafile } from 'esbuild';
3
- import './hmr.js';
4
-
5
- interface RaitonSignalMap {
6
- ready?: undefined;
7
- errors: any;
8
- 'hmr:controller': BuilderHMRDeclaration;
9
- 'hmr:triggered': Metafile | undefined;
10
- }
11
-
12
- export type { RaitonSignalMap };
File without changes
@@ -1,8 +0,0 @@
1
- import { IDependencyContainerDefinition } from './dependency-container.js';
2
- import './contruct.js';
3
- import '@protorians/core';
4
-
5
- interface IRepositoryDefinition<T = any> extends IDependencyContainerDefinition<T> {
6
- }
7
-
8
- export type { IRepositoryDefinition };
File without changes
@@ -1,14 +0,0 @@
1
- import { RequestContext } from '../core/context.js';
2
- import { HttpMethod } from '../sdk/enums/http.enum.js';
3
- import './runtime.js';
4
- import '../sdk/enums/runtime.enum.js';
5
-
6
- type RouteHandler = (ctx: RequestContext) => Promise<any> | any;
7
- interface RouteDefinition {
8
- method: HttpMethod;
9
- path: string;
10
- version?: string;
11
- handler: RouteHandler;
12
- }
13
-
14
- export type { RouteDefinition, RouteHandler };
File without changes
@@ -1,37 +0,0 @@
1
- import { RuntimeType } from '../sdk/enums/runtime.enum.js';
2
-
3
- interface RuntimeServer {
4
- listen(port: number): Promise<void>;
5
- close(): Promise<void>;
6
- handle?(request: Request): Promise<Response>;
7
- }
8
- interface RuntimeRequest {
9
- method: string;
10
- url: string;
11
- headers: Headers;
12
- body?: ReadableStream<Uint8Array> | Uint8Array | Record<string, any> | null;
13
- query?: Record<string, any>;
14
- remoteAddress?: string;
15
- }
16
- type RuntimeHandlerCallable = (req: RuntimeRequest, reply: RuntimeReply) => Promise<void>;
17
- interface RuntimeReply {
18
- status(code: number): void;
19
- header(name: string, value: string): void;
20
- send(body: any): void;
21
- text(text: string | Buffer): void;
22
- json(data: any): void;
23
- }
24
- interface RuntimeAdapter {
25
- createServer(handler: RuntimeHandlerCallable): RuntimeServer;
26
- }
27
- interface RuntimeInterface {
28
- readonly type: RuntimeType;
29
- get isNode(): boolean;
30
- get isDeno(): boolean;
31
- get isWeb(): boolean;
32
- get isBun(): boolean;
33
- adapter(): RuntimeAdapter;
34
- createServer(handler: RuntimeHandlerCallable): RuntimeServer;
35
- }
36
-
37
- export type { RuntimeAdapter, RuntimeHandlerCallable, RuntimeInterface, RuntimeReply, RuntimeRequest, RuntimeServer };
File without changes
File without changes
@@ -1,57 +0,0 @@
1
- import { FastifyRequest, FastifyReply, FastifyInstance } from 'fastify';
2
- import { ISchemeOptions } from './scheme.js';
3
- import { TSchema } from '@sinclair/typebox';
4
- import { ISignalStack } from '@protorians/core';
5
- import { Metafile } from 'esbuild';
6
-
7
- interface ServerOptions {
8
- workdir: string;
9
- prefix?: string;
10
- develop?: boolean;
11
- port?: number;
12
- verbose?: boolean;
13
- trustProxy?: boolean;
14
- }
15
- type ServerFeaturesUsed = Map<string, any>;
16
- interface ServerInterface {
17
- readonly options: ServerOptions;
18
- readonly controllers: Map<string, ServerControllerInterface>;
19
- readonly signals: ISignalStack<ServerSignalMap>;
20
- get runner(): FastifyInstance;
21
- get feature(): ServerFeaturesUsed;
22
- useAuthenticate(): Promise<this>;
23
- useFormbody(): Promise<this>;
24
- useMultipart(): Promise<this>;
25
- useSwagger(): Promise<this>;
26
- usePublicDirectory(directory?: string): Promise<this>;
27
- prepare(): Promise<this>;
28
- start(): Promise<this>;
29
- }
30
- interface ServerRouteInterface {
31
- method: string;
32
- path: string;
33
- name: string;
34
- url: string;
35
- paramsMetadata: any[];
36
- schema?: ISchemeOptions<TSchema, TSchema, TSchema, Record<number, TSchema>> | undefined;
37
- }
38
- interface ServerControllerInterface {
39
- prefix: string;
40
- routes: ServerRouteInterface[];
41
- instance: (...args: any[]) => Record<string, Function>;
42
- filename?: string;
43
- handler: (handleName: string, params: any[]) => (req: FastifyRequest, reply: FastifyReply) => Promise<any>;
44
- }
45
- interface ServerHMRDeclaration {
46
- filename: string;
47
- timestamp?: number;
48
- version?: number;
49
- }
50
- interface ServerSignalMap {
51
- ready: undefined;
52
- errors: any;
53
- 'hmr:controller': ServerHMRDeclaration;
54
- 'hmr:triggered': Metafile | undefined;
55
- }
56
-
57
- export type { ServerControllerInterface, ServerFeaturesUsed, ServerHMRDeclaration, ServerInterface, ServerOptions, ServerRouteInterface, ServerSignalMap };
File without changes
@@ -1,8 +0,0 @@
1
- import { IDependencyContainerDefinition } from './dependency-container.js';
2
- import './contruct.js';
3
- import '@protorians/core';
4
-
5
- interface IGraftDefinition<T = any> extends IDependencyContainerDefinition<T> {
6
- }
7
-
8
- export type { IGraftDefinition };
File without changes
@@ -1,24 +0,0 @@
1
- import { BuilderInterface } from './builder.js';
2
- import { ApplicationInterface } from './application.js';
3
- import { RuntimeType } from '../sdk/enums/runtime.enum.js';
4
- import 'esbuild';
5
- import './hmr.js';
6
- import '../sdk/enums/http.enum.js';
7
-
8
- interface ThreadSetupOptions {
9
- application: ApplicationInterface;
10
- runtime?: RuntimeType;
11
- }
12
- type ThreadWaitCallable = () => (boolean | Promise<boolean>);
13
- interface ThreadInterface {
14
- readonly appDir: string;
15
- readonly builder: BuilderInterface;
16
- setup(options: ThreadSetupOptions): this;
17
- run(): Promise<this>;
18
- restart(): void;
19
- stop(): void;
20
- sleep(milliseconds: number): Promise<unknown>;
21
- wait(condition: ThreadWaitCallable): Promise<void>;
22
- }
23
-
24
- export type { ThreadInterface, ThreadSetupOptions, ThreadWaitCallable };
File without changes
@@ -1,6 +0,0 @@
1
- interface FileSizeFormated {
2
- size: number;
3
- unit: string;
4
- }
5
-
6
- export type { FileSizeFormated };
File without changes
@@ -1,4 +0,0 @@
1
- type IString = string | Object | null | undefined;
2
- type IStringable = IString | IString[] | Promise<IString | IString[]>;
3
-
4
- export type { IString, IStringable };
File without changes