exisjs 0.6.1 → 0.7.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 (564) hide show
  1. package/README.md +9 -3
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.js +2 -8
  4. package/dist/cli/commands/build.js.map +1 -1
  5. package/dist/cli/commands/dev.d.ts.map +1 -1
  6. package/dist/cli/commands/dev.js +33 -44
  7. package/dist/cli/commands/dev.js.map +1 -1
  8. package/dist/cli/commands/exports.d.ts.map +1 -1
  9. package/dist/cli/commands/exports.js +5 -32
  10. package/dist/cli/commands/exports.js.map +1 -1
  11. package/dist/cli/commands/generate.d.ts +2 -13
  12. package/dist/cli/commands/generate.d.ts.map +1 -1
  13. package/dist/cli/commands/generate.js +27 -60
  14. package/dist/cli/commands/generate.js.map +1 -1
  15. package/dist/cli/commands/init.d.ts.map +1 -1
  16. package/dist/cli/commands/init.js +4 -4
  17. package/dist/cli/commands/init.js.map +1 -1
  18. package/dist/cli/commands/start.d.ts.map +1 -1
  19. package/dist/cli/commands/start.js +2 -6
  20. package/dist/cli/commands/start.js.map +1 -1
  21. package/dist/cli/index.js +11 -23
  22. package/dist/cli/index.js.map +1 -1
  23. package/dist/cli/routes.d.ts.map +1 -1
  24. package/dist/cli/routes.js +20 -8
  25. package/dist/cli/routes.js.map +1 -1
  26. package/dist/config/config.d.ts +2 -1
  27. package/dist/config/config.d.ts.map +1 -1
  28. package/dist/config/config.js +7 -5
  29. package/dist/config/config.js.map +1 -1
  30. package/dist/config/env.d.ts.map +1 -1
  31. package/dist/config/env.js +3 -2
  32. package/dist/config/env.js.map +1 -1
  33. package/dist/config/types.d.ts +7 -2
  34. package/dist/config/types.d.ts.map +1 -1
  35. package/dist/decorators/constants.d.ts +9 -2
  36. package/dist/decorators/constants.d.ts.map +1 -1
  37. package/dist/decorators/constants.js +3 -2
  38. package/dist/decorators/constants.js.map +1 -1
  39. package/dist/decorators/core/metadata.d.ts +31 -0
  40. package/dist/decorators/core/metadata.d.ts.map +1 -1
  41. package/dist/decorators/core/metadata.js +110 -1
  42. package/dist/decorators/core/metadata.js.map +1 -1
  43. package/dist/decorators/core.d.ts +19 -4
  44. package/dist/decorators/core.d.ts.map +1 -1
  45. package/dist/decorators/core.js +29 -4
  46. package/dist/decorators/core.js.map +1 -1
  47. package/dist/decorators/middleware.d.ts +17 -17
  48. package/dist/decorators/middleware.d.ts.map +1 -1
  49. package/dist/decorators/middleware.js +111 -208
  50. package/dist/decorators/middleware.js.map +1 -1
  51. package/dist/decorators/params.d.ts +54 -12
  52. package/dist/decorators/params.d.ts.map +1 -1
  53. package/dist/decorators/params.js +40 -20
  54. package/dist/decorators/params.js.map +1 -1
  55. package/dist/decorators/routing.d.ts +0 -2
  56. package/dist/decorators/routing.d.ts.map +1 -1
  57. package/dist/decorators/routing.js +3 -4
  58. package/dist/decorators/routing.js.map +1 -1
  59. package/dist/di/container.d.ts +5 -1
  60. package/dist/di/container.d.ts.map +1 -1
  61. package/dist/di/container.js +56 -8
  62. package/dist/di/container.js.map +1 -1
  63. package/dist/di/decorators.d.ts +30 -0
  64. package/dist/di/decorators.d.ts.map +1 -0
  65. package/dist/di/decorators.js +59 -0
  66. package/dist/di/decorators.js.map +1 -0
  67. package/dist/di/index.d.ts +1 -0
  68. package/dist/di/index.d.ts.map +1 -1
  69. package/dist/di/index.js +4 -1
  70. package/dist/di/index.js.map +1 -1
  71. package/dist/docs/ARCHITECTURE.md +46 -285
  72. package/dist/docs/BENCHMARKS.md +5 -5
  73. package/dist/docs/README.md +8 -11
  74. package/dist/docs/content/boundaries.mdx +151 -0
  75. package/dist/docs/content/cli/commands.mdx +66 -104
  76. package/dist/docs/content/cli/overview.mdx +37 -47
  77. package/dist/docs/content/cli/usage.mdx +29 -15
  78. package/dist/docs/content/decorators.mdx +142 -81
  79. package/dist/docs/content/installation.mdx +20 -1
  80. package/dist/docs/content/middleware.mdx +65 -291
  81. package/dist/docs/content/modules.mdx +22 -1
  82. package/dist/docs/content/providers.mdx +33 -1
  83. package/dist/docs/content/security.mdx +44 -246
  84. package/dist/docs/content/structure.mdx +227 -100
  85. package/dist/docs/content/validation.mdx +0 -17
  86. package/dist/docs/reference/decorators.mdx +34 -216
  87. package/dist/docs/reference/di.mdx +35 -11
  88. package/dist/docs/reference/logger.mdx +100 -0
  89. package/dist/docs/reference/middleware.mdx +41 -217
  90. package/dist/docs/reference/router.mdx +9 -9
  91. package/dist/docs/reference/validator.mdx +2 -5
  92. package/dist/error/errors.d.ts.map +1 -1
  93. package/dist/error/errors.js +19 -5
  94. package/dist/error/errors.js.map +1 -1
  95. package/dist/index.d.ts +0 -1
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +1 -4
  98. package/dist/index.js.map +1 -1
  99. package/dist/lib/start-server.js +10 -0
  100. package/dist/lib/start-server.js.map +1 -1
  101. package/dist/logger/index.d.ts +81 -0
  102. package/dist/logger/index.d.ts.map +1 -0
  103. package/dist/logger/index.js +142 -0
  104. package/dist/logger/index.js.map +1 -0
  105. package/dist/middleware/dedupe.d.ts +1 -1
  106. package/dist/middleware/dedupe.js +1 -1
  107. package/dist/middleware/middleware.d.ts +3 -5
  108. package/dist/middleware/middleware.d.ts.map +1 -1
  109. package/dist/middleware/middleware.js +2 -6
  110. package/dist/middleware/middleware.js.map +1 -1
  111. package/dist/middleware/rate-limit.d.ts +0 -2
  112. package/dist/middleware/rate-limit.d.ts.map +1 -1
  113. package/dist/middleware/rate-limit.js +2 -14
  114. package/dist/middleware/rate-limit.js.map +1 -1
  115. package/dist/module/index.d.ts +2 -0
  116. package/dist/module/index.d.ts.map +1 -1
  117. package/dist/module/index.js +3 -1
  118. package/dist/module/index.js.map +1 -1
  119. package/dist/plugin/manager.d.ts +1 -1
  120. package/dist/plugin/manager.d.ts.map +1 -1
  121. package/dist/plugin/manager.js +47 -0
  122. package/dist/plugin/manager.js.map +1 -1
  123. package/dist/router/{gateway.d.ts → boundary.d.ts} +21 -13
  124. package/dist/router/boundary.d.ts.map +1 -0
  125. package/dist/router/boundary.js +11 -0
  126. package/dist/router/boundary.js.map +1 -0
  127. package/dist/router/controller-registrar.d.ts.map +1 -1
  128. package/dist/router/controller-registrar.js +33 -6
  129. package/dist/router/controller-registrar.js.map +1 -1
  130. package/dist/router/index.d.ts +3 -6
  131. package/dist/router/index.d.ts.map +1 -1
  132. package/dist/router/index.js +3 -7
  133. package/dist/router/index.js.map +1 -1
  134. package/dist/router/route-builder.d.ts +0 -28
  135. package/dist/router/route-builder.d.ts.map +1 -1
  136. package/dist/router/route-builder.js +2 -5
  137. package/dist/router/route-builder.js.map +1 -1
  138. package/dist/router/route-scanner.d.ts +1 -2
  139. package/dist/router/route-scanner.d.ts.map +1 -1
  140. package/dist/router/route-scanner.js +225 -203
  141. package/dist/router/route-scanner.js.map +1 -1
  142. package/dist/router/router.d.ts +4 -6
  143. package/dist/router/router.d.ts.map +1 -1
  144. package/dist/router/router.js +36 -72
  145. package/dist/router/router.js.map +1 -1
  146. package/dist/router/types.d.ts +2 -6
  147. package/dist/router/types.d.ts.map +1 -1
  148. package/dist/server/{bun-adapter.d.ts → adapters/bun-adapter.d.ts} +1 -1
  149. package/dist/server/adapters/bun-adapter.d.ts.map +1 -0
  150. package/dist/server/{bun-adapter.js → adapters/bun-adapter.js} +2 -24
  151. package/dist/server/adapters/bun-adapter.js.map +1 -0
  152. package/dist/server/{uws-adapter.d.ts → adapters/uws-adapter.d.ts} +1 -1
  153. package/dist/server/adapters/uws-adapter.d.ts.map +1 -0
  154. package/dist/server/{uws-adapter.js → adapters/uws-adapter.js} +1 -28
  155. package/dist/server/adapters/uws-adapter.js.map +1 -0
  156. package/dist/server/app.d.ts +10 -31
  157. package/dist/server/app.d.ts.map +1 -1
  158. package/dist/server/app.js +20 -135
  159. package/dist/server/app.js.map +1 -1
  160. package/dist/server/bootstrapper.d.ts +4 -15
  161. package/dist/server/bootstrapper.d.ts.map +1 -1
  162. package/dist/server/bootstrapper.js +30 -229
  163. package/dist/server/bootstrapper.js.map +1 -1
  164. package/dist/server/define.d.ts +2 -2
  165. package/dist/server/define.d.ts.map +1 -1
  166. package/dist/server/define.js +3 -3
  167. package/dist/server/define.js.map +1 -1
  168. package/dist/server/engines/bun-engine.d.ts +16 -0
  169. package/dist/server/engines/bun-engine.d.ts.map +1 -0
  170. package/dist/server/engines/bun-engine.js +41 -0
  171. package/dist/server/engines/bun-engine.js.map +1 -0
  172. package/dist/server/engines/engine.d.ts +16 -0
  173. package/dist/server/engines/engine.d.ts.map +1 -0
  174. package/dist/{queue/types.js → server/engines/engine.js} +1 -1
  175. package/dist/server/engines/engine.js.map +1 -0
  176. package/dist/server/engines/node-engine.d.ts +22 -0
  177. package/dist/server/engines/node-engine.d.ts.map +1 -0
  178. package/dist/server/engines/node-engine.js +130 -0
  179. package/dist/server/engines/node-engine.js.map +1 -0
  180. package/dist/server/engines/uws-engine.d.ts +16 -0
  181. package/dist/server/engines/uws-engine.d.ts.map +1 -0
  182. package/dist/server/engines/uws-engine.js +48 -0
  183. package/dist/server/engines/uws-engine.js.map +1 -0
  184. package/dist/server/request-handler.d.ts +0 -1
  185. package/dist/server/request-handler.d.ts.map +1 -1
  186. package/dist/server/request-handler.js +74 -48
  187. package/dist/server/request-handler.js.map +1 -1
  188. package/dist/server/request.d.ts +0 -8
  189. package/dist/server/request.d.ts.map +1 -1
  190. package/dist/server/request.js +0 -16
  191. package/dist/server/request.js.map +1 -1
  192. package/dist/server/response.d.ts.map +1 -1
  193. package/dist/server/response.js +2 -1
  194. package/dist/server/response.js.map +1 -1
  195. package/dist/utils/logger.d.ts.map +1 -1
  196. package/dist/utils/logger.js +0 -1
  197. package/dist/utils/logger.js.map +1 -1
  198. package/dist/utils/time.d.ts +6 -0
  199. package/dist/utils/time.d.ts.map +1 -0
  200. package/dist/utils/time.js +15 -0
  201. package/dist/utils/time.js.map +1 -0
  202. package/dist/validator/index.d.ts +1 -7
  203. package/dist/validator/index.d.ts.map +1 -1
  204. package/dist/validator/index.js +1 -5
  205. package/dist/validator/index.js.map +1 -1
  206. package/dist/validator/tex-types.d.ts +15 -2
  207. package/dist/validator/tex-types.d.ts.map +1 -1
  208. package/dist/validator/tex-types.js +8 -0
  209. package/dist/validator/tex-types.js.map +1 -1
  210. package/dist/validator/tex.d.ts.map +1 -1
  211. package/dist/validator/tex.js +21 -2
  212. package/dist/validator/tex.js.map +1 -1
  213. package/package.json +9 -151
  214. package/dist/adapters/aws-lambda.d.ts +0 -21
  215. package/dist/adapters/aws-lambda.d.ts.map +0 -1
  216. package/dist/adapters/aws-lambda.js +0 -125
  217. package/dist/adapters/aws-lambda.js.map +0 -1
  218. package/dist/adapters/bun.d.ts +0 -9
  219. package/dist/adapters/bun.d.ts.map +0 -1
  220. package/dist/adapters/bun.js +0 -23
  221. package/dist/adapters/bun.js.map +0 -1
  222. package/dist/adapters/cloudflare.d.ts +0 -10
  223. package/dist/adapters/cloudflare.d.ts.map +0 -1
  224. package/dist/adapters/cloudflare.js +0 -22
  225. package/dist/adapters/cloudflare.js.map +0 -1
  226. package/dist/adapters/deno.d.ts +0 -7
  227. package/dist/adapters/deno.d.ts.map +0 -1
  228. package/dist/adapters/deno.js +0 -21
  229. package/dist/adapters/deno.js.map +0 -1
  230. package/dist/adapters/fastly.d.ts +0 -6
  231. package/dist/adapters/fastly.d.ts.map +0 -1
  232. package/dist/adapters/fastly.js +0 -20
  233. package/dist/adapters/fastly.js.map +0 -1
  234. package/dist/adapters/fetch.d.ts +0 -30
  235. package/dist/adapters/fetch.d.ts.map +0 -1
  236. package/dist/adapters/fetch.js +0 -119
  237. package/dist/adapters/fetch.js.map +0 -1
  238. package/dist/adapters/index.d.ts +0 -9
  239. package/dist/adapters/index.d.ts.map +0 -1
  240. package/dist/adapters/index.js +0 -28
  241. package/dist/adapters/index.js.map +0 -1
  242. package/dist/adapters/netlify.d.ts +0 -8
  243. package/dist/adapters/netlify.d.ts.map +0 -1
  244. package/dist/adapters/netlify.js +0 -20
  245. package/dist/adapters/netlify.js.map +0 -1
  246. package/dist/adapters/vercel.d.ts +0 -17
  247. package/dist/adapters/vercel.d.ts.map +0 -1
  248. package/dist/adapters/vercel.js +0 -23
  249. package/dist/adapters/vercel.js.map +0 -1
  250. package/dist/auth/index.d.ts +0 -8
  251. package/dist/auth/index.d.ts.map +0 -1
  252. package/dist/auth/index.js +0 -49
  253. package/dist/auth/index.js.map +0 -1
  254. package/dist/auth/jwt.d.ts +0 -20
  255. package/dist/auth/jwt.d.ts.map +0 -1
  256. package/dist/auth/jwt.js +0 -59
  257. package/dist/auth/jwt.js.map +0 -1
  258. package/dist/auth/oauth/core.d.ts +0 -96
  259. package/dist/auth/oauth/core.d.ts.map +0 -1
  260. package/dist/auth/oauth/core.js +0 -203
  261. package/dist/auth/oauth/core.js.map +0 -1
  262. package/dist/auth/oauth/index.d.ts +0 -45
  263. package/dist/auth/oauth/index.d.ts.map +0 -1
  264. package/dist/auth/oauth/index.js +0 -64
  265. package/dist/auth/oauth/index.js.map +0 -1
  266. package/dist/auth/oauth/middleware.d.ts +0 -63
  267. package/dist/auth/oauth/middleware.d.ts.map +0 -1
  268. package/dist/auth/oauth/middleware.js +0 -164
  269. package/dist/auth/oauth/middleware.js.map +0 -1
  270. package/dist/auth/oauth/providers/custom.d.ts +0 -41
  271. package/dist/auth/oauth/providers/custom.d.ts.map +0 -1
  272. package/dist/auth/oauth/providers/custom.js +0 -204
  273. package/dist/auth/oauth/providers/custom.js.map +0 -1
  274. package/dist/auth/oauth/providers/discord.d.ts +0 -23
  275. package/dist/auth/oauth/providers/discord.d.ts.map +0 -1
  276. package/dist/auth/oauth/providers/discord.js +0 -130
  277. package/dist/auth/oauth/providers/discord.js.map +0 -1
  278. package/dist/auth/oauth/providers/facebook.d.ts +0 -28
  279. package/dist/auth/oauth/providers/facebook.d.ts.map +0 -1
  280. package/dist/auth/oauth/providers/facebook.js +0 -124
  281. package/dist/auth/oauth/providers/facebook.js.map +0 -1
  282. package/dist/auth/oauth/providers/github.d.ts +0 -25
  283. package/dist/auth/oauth/providers/github.d.ts.map +0 -1
  284. package/dist/auth/oauth/providers/github.js +0 -132
  285. package/dist/auth/oauth/providers/github.js.map +0 -1
  286. package/dist/auth/oauth/providers/google.d.ts +0 -23
  287. package/dist/auth/oauth/providers/google.d.ts.map +0 -1
  288. package/dist/auth/oauth/providers/google.js +0 -134
  289. package/dist/auth/oauth/providers/google.js.map +0 -1
  290. package/dist/auth/oauth/providers/microsoft.d.ts +0 -28
  291. package/dist/auth/oauth/providers/microsoft.d.ts.map +0 -1
  292. package/dist/auth/oauth/providers/microsoft.js +0 -136
  293. package/dist/auth/oauth/providers/microsoft.js.map +0 -1
  294. package/dist/auth/oauth/types.d.ts +0 -158
  295. package/dist/auth/oauth/types.d.ts.map +0 -1
  296. package/dist/auth/oauth/types.js +0 -4
  297. package/dist/auth/oauth/types.js.map +0 -1
  298. package/dist/auth/password.d.ts +0 -25
  299. package/dist/auth/password.d.ts.map +0 -1
  300. package/dist/auth/password.js +0 -93
  301. package/dist/auth/password.js.map +0 -1
  302. package/dist/auth/rbac.d.ts +0 -10
  303. package/dist/auth/rbac.d.ts.map +0 -1
  304. package/dist/auth/rbac.js +0 -34
  305. package/dist/auth/rbac.js.map +0 -1
  306. package/dist/auth/session.d.ts +0 -26
  307. package/dist/auth/session.d.ts.map +0 -1
  308. package/dist/auth/session.js +0 -134
  309. package/dist/auth/session.js.map +0 -1
  310. package/dist/cache/index.d.ts +0 -4
  311. package/dist/cache/index.d.ts.map +0 -1
  312. package/dist/cache/index.js +0 -25
  313. package/dist/cache/index.js.map +0 -1
  314. package/dist/cache/store.d.ts +0 -58
  315. package/dist/cache/store.d.ts.map +0 -1
  316. package/dist/cache/store.js +0 -298
  317. package/dist/cache/store.js.map +0 -1
  318. package/dist/cron/parser.d.ts +0 -2
  319. package/dist/cron/parser.d.ts.map +0 -1
  320. package/dist/cron/parser.js +0 -52
  321. package/dist/cron/parser.js.map +0 -1
  322. package/dist/cron/scheduler.d.ts +0 -23
  323. package/dist/cron/scheduler.d.ts.map +0 -1
  324. package/dist/cron/scheduler.js +0 -114
  325. package/dist/cron/scheduler.js.map +0 -1
  326. package/dist/database/adapters/mongodb.d.ts +0 -58
  327. package/dist/database/adapters/mongodb.d.ts.map +0 -1
  328. package/dist/database/adapters/mongodb.js +0 -264
  329. package/dist/database/adapters/mongodb.js.map +0 -1
  330. package/dist/database/adapters/mysql.d.ts +0 -27
  331. package/dist/database/adapters/mysql.d.ts.map +0 -1
  332. package/dist/database/adapters/mysql.js +0 -188
  333. package/dist/database/adapters/mysql.js.map +0 -1
  334. package/dist/database/adapters/postgres.d.ts +0 -28
  335. package/dist/database/adapters/postgres.d.ts.map +0 -1
  336. package/dist/database/adapters/postgres.js +0 -174
  337. package/dist/database/adapters/postgres.js.map +0 -1
  338. package/dist/database/adapters/sqlite.d.ts +0 -27
  339. package/dist/database/adapters/sqlite.d.ts.map +0 -1
  340. package/dist/database/adapters/sqlite.js +0 -149
  341. package/dist/database/adapters/sqlite.js.map +0 -1
  342. package/dist/database/index.d.ts +0 -42
  343. package/dist/database/index.d.ts.map +0 -1
  344. package/dist/database/index.js +0 -58
  345. package/dist/database/index.js.map +0 -1
  346. package/dist/database/manager.d.ts +0 -141
  347. package/dist/database/manager.d.ts.map +0 -1
  348. package/dist/database/manager.js +0 -337
  349. package/dist/database/manager.js.map +0 -1
  350. package/dist/database/migration.d.ts +0 -57
  351. package/dist/database/migration.d.ts.map +0 -1
  352. package/dist/database/migration.js +0 -329
  353. package/dist/database/migration.js.map +0 -1
  354. package/dist/database/query-builder.d.ts +0 -95
  355. package/dist/database/query-builder.d.ts.map +0 -1
  356. package/dist/database/query-builder.js +0 -404
  357. package/dist/database/query-builder.js.map +0 -1
  358. package/dist/database/sql/index.d.ts +0 -18
  359. package/dist/database/sql/index.d.ts.map +0 -1
  360. package/dist/database/sql/index.js +0 -74
  361. package/dist/database/sql/index.js.map +0 -1
  362. package/dist/database/sql/schema.d.ts +0 -38
  363. package/dist/database/sql/schema.d.ts.map +0 -1
  364. package/dist/database/sql/schema.js +0 -80
  365. package/dist/database/sql/schema.js.map +0 -1
  366. package/dist/database/synchronizer.d.ts +0 -12
  367. package/dist/database/synchronizer.d.ts.map +0 -1
  368. package/dist/database/synchronizer.js +0 -82
  369. package/dist/database/synchronizer.js.map +0 -1
  370. package/dist/database/types.d.ts +0 -184
  371. package/dist/database/types.d.ts.map +0 -1
  372. package/dist/database/types.js +0 -4
  373. package/dist/database/types.js.map +0 -1
  374. package/dist/dataloader/dataloader.d.ts +0 -23
  375. package/dist/dataloader/dataloader.d.ts.map +0 -1
  376. package/dist/dataloader/dataloader.js +0 -98
  377. package/dist/dataloader/dataloader.js.map +0 -1
  378. package/dist/dataloader/index.d.ts +0 -3
  379. package/dist/dataloader/index.d.ts.map +0 -1
  380. package/dist/dataloader/index.js +0 -19
  381. package/dist/dataloader/index.js.map +0 -1
  382. package/dist/dataloader/registry.d.ts +0 -17
  383. package/dist/dataloader/registry.d.ts.map +0 -1
  384. package/dist/dataloader/registry.js +0 -47
  385. package/dist/dataloader/registry.js.map +0 -1
  386. package/dist/dev/dep-graph.d.ts +0 -2
  387. package/dist/dev/dep-graph.d.ts.map +0 -1
  388. package/dist/dev/dep-graph.js +0 -111
  389. package/dist/dev/dep-graph.js.map +0 -1
  390. package/dist/dev/hot-reload.d.ts +0 -30
  391. package/dist/dev/hot-reload.d.ts.map +0 -1
  392. package/dist/dev/hot-reload.js +0 -262
  393. package/dist/dev/hot-reload.js.map +0 -1
  394. package/dist/docs/content/adapters.mdx +0 -199
  395. package/dist/docs/content/cache.mdx +0 -239
  396. package/dist/docs/content/circuit-breaker.mdx +0 -130
  397. package/dist/docs/content/cron.mdx +0 -109
  398. package/dist/docs/content/database.mdx +0 -278
  399. package/dist/docs/content/gateways.mdx +0 -376
  400. package/dist/docs/content/oauth.mdx +0 -179
  401. package/dist/docs/content/queues.mdx +0 -177
  402. package/dist/docs/content/rpc.mdx +0 -146
  403. package/dist/docs/content/sse.mdx +0 -159
  404. package/dist/docs/content/websockets.mdx +0 -289
  405. package/dist/docs/integrations/README.md +0 -23
  406. package/dist/docs/integrations/jwt.mdx +0 -151
  407. package/dist/docs/integrations/mongo.mdx +0 -183
  408. package/dist/docs/integrations/observability.mdx +0 -125
  409. package/dist/docs/integrations/openai.mdx +0 -108
  410. package/dist/docs/integrations/postgres.mdx +0 -190
  411. package/dist/docs/integrations/posthog.mdx +0 -122
  412. package/dist/docs/integrations/redis.mdx +0 -141
  413. package/dist/docs/integrations/resend.mdx +0 -117
  414. package/dist/docs/integrations/s3.mdx +0 -122
  415. package/dist/docs/integrations/swagger.mdx +0 -113
  416. package/dist/docs/reference/adapters.mdx +0 -130
  417. package/dist/docs/reference/auth.mdx +0 -183
  418. package/dist/docs/reference/cache.mdx +0 -132
  419. package/dist/docs/reference/circuit-breaker.mdx +0 -71
  420. package/dist/docs/reference/queue.mdx +0 -155
  421. package/dist/docs/reference/storage.mdx +0 -116
  422. package/dist/docs/reference/swagger.mdx +0 -132
  423. package/dist/integrations/drizzle.d.ts +0 -10
  424. package/dist/integrations/drizzle.d.ts.map +0 -1
  425. package/dist/integrations/drizzle.js +0 -34
  426. package/dist/integrations/drizzle.js.map +0 -1
  427. package/dist/integrations/jwt.d.ts +0 -12
  428. package/dist/integrations/jwt.d.ts.map +0 -1
  429. package/dist/integrations/jwt.js +0 -29
  430. package/dist/integrations/jwt.js.map +0 -1
  431. package/dist/integrations/mongodb.d.ts +0 -13
  432. package/dist/integrations/mongodb.d.ts.map +0 -1
  433. package/dist/integrations/mongodb.js +0 -48
  434. package/dist/integrations/mongodb.js.map +0 -1
  435. package/dist/integrations/mongoose.d.ts +0 -13
  436. package/dist/integrations/mongoose.d.ts.map +0 -1
  437. package/dist/integrations/mongoose.js +0 -84
  438. package/dist/integrations/mongoose.js.map +0 -1
  439. package/dist/integrations/openai.d.ts +0 -12
  440. package/dist/integrations/openai.d.ts.map +0 -1
  441. package/dist/integrations/openai.js +0 -47
  442. package/dist/integrations/openai.js.map +0 -1
  443. package/dist/integrations/postgres.d.ts +0 -13
  444. package/dist/integrations/postgres.d.ts.map +0 -1
  445. package/dist/integrations/postgres.js +0 -55
  446. package/dist/integrations/postgres.js.map +0 -1
  447. package/dist/integrations/posthog.d.ts +0 -13
  448. package/dist/integrations/posthog.d.ts.map +0 -1
  449. package/dist/integrations/posthog.js +0 -49
  450. package/dist/integrations/posthog.js.map +0 -1
  451. package/dist/integrations/prisma.d.ts +0 -10
  452. package/dist/integrations/prisma.d.ts.map +0 -1
  453. package/dist/integrations/prisma.js +0 -39
  454. package/dist/integrations/prisma.js.map +0 -1
  455. package/dist/integrations/redis.d.ts +0 -12
  456. package/dist/integrations/redis.d.ts.map +0 -1
  457. package/dist/integrations/redis.js +0 -48
  458. package/dist/integrations/redis.js.map +0 -1
  459. package/dist/integrations/resend.d.ts +0 -12
  460. package/dist/integrations/resend.d.ts.map +0 -1
  461. package/dist/integrations/resend.js +0 -47
  462. package/dist/integrations/resend.js.map +0 -1
  463. package/dist/integrations/s3.d.ts +0 -15
  464. package/dist/integrations/s3.d.ts.map +0 -1
  465. package/dist/integrations/s3.js +0 -60
  466. package/dist/integrations/s3.js.map +0 -1
  467. package/dist/integrations/supabase.d.ts +0 -13
  468. package/dist/integrations/supabase.d.ts.map +0 -1
  469. package/dist/integrations/supabase.js +0 -51
  470. package/dist/integrations/supabase.js.map +0 -1
  471. package/dist/middleware/cache.d.ts +0 -21
  472. package/dist/middleware/cache.d.ts.map +0 -1
  473. package/dist/middleware/cache.js +0 -156
  474. package/dist/middleware/cache.js.map +0 -1
  475. package/dist/observability/health.d.ts +0 -23
  476. package/dist/observability/health.d.ts.map +0 -1
  477. package/dist/observability/health.js +0 -49
  478. package/dist/observability/health.js.map +0 -1
  479. package/dist/observability/index.d.ts +0 -4
  480. package/dist/observability/index.d.ts.map +0 -1
  481. package/dist/observability/index.js +0 -10
  482. package/dist/observability/index.js.map +0 -1
  483. package/dist/observability/metrics.d.ts +0 -6
  484. package/dist/observability/metrics.d.ts.map +0 -1
  485. package/dist/observability/metrics.js +0 -60
  486. package/dist/observability/metrics.js.map +0 -1
  487. package/dist/observability/otel.d.ts +0 -27
  488. package/dist/observability/otel.d.ts.map +0 -1
  489. package/dist/observability/otel.js +0 -45
  490. package/dist/observability/otel.js.map +0 -1
  491. package/dist/observability/prometheus.d.ts +0 -30
  492. package/dist/observability/prometheus.d.ts.map +0 -1
  493. package/dist/observability/prometheus.js +0 -31
  494. package/dist/observability/prometheus.js.map +0 -1
  495. package/dist/queue/client.d.ts +0 -13
  496. package/dist/queue/client.d.ts.map +0 -1
  497. package/dist/queue/client.js +0 -83
  498. package/dist/queue/client.js.map +0 -1
  499. package/dist/queue/drivers/MemoryDriver.d.ts +0 -21
  500. package/dist/queue/drivers/MemoryDriver.d.ts.map +0 -1
  501. package/dist/queue/drivers/MemoryDriver.js +0 -176
  502. package/dist/queue/drivers/MemoryDriver.js.map +0 -1
  503. package/dist/queue/drivers/RedisDriver.d.ts +0 -19
  504. package/dist/queue/drivers/RedisDriver.d.ts.map +0 -1
  505. package/dist/queue/drivers/RedisDriver.js +0 -130
  506. package/dist/queue/drivers/RedisDriver.js.map +0 -1
  507. package/dist/queue/index.d.ts +0 -18
  508. package/dist/queue/index.d.ts.map +0 -1
  509. package/dist/queue/index.js +0 -37
  510. package/dist/queue/index.js.map +0 -1
  511. package/dist/queue/manager.d.ts +0 -18
  512. package/dist/queue/manager.d.ts.map +0 -1
  513. package/dist/queue/manager.js +0 -59
  514. package/dist/queue/manager.js.map +0 -1
  515. package/dist/queue/types.d.ts +0 -55
  516. package/dist/queue/types.d.ts.map +0 -1
  517. package/dist/queue/types.js.map +0 -1
  518. package/dist/queue/worker.d.ts +0 -18
  519. package/dist/queue/worker.d.ts.map +0 -1
  520. package/dist/queue/worker.js +0 -176
  521. package/dist/queue/worker.js.map +0 -1
  522. package/dist/router/gateway.d.ts.map +0 -1
  523. package/dist/router/gateway.js +0 -11
  524. package/dist/router/gateway.js.map +0 -1
  525. package/dist/server/bun-adapter.d.ts.map +0 -1
  526. package/dist/server/bun-adapter.js.map +0 -1
  527. package/dist/server/sse.d.ts +0 -16
  528. package/dist/server/sse.d.ts.map +0 -1
  529. package/dist/server/sse.js +0 -51
  530. package/dist/server/sse.js.map +0 -1
  531. package/dist/server/uws-adapter.d.ts.map +0 -1
  532. package/dist/server/uws-adapter.js.map +0 -1
  533. package/dist/storage/index.d.ts +0 -15
  534. package/dist/storage/index.d.ts.map +0 -1
  535. package/dist/storage/index.js +0 -7
  536. package/dist/storage/index.js.map +0 -1
  537. package/dist/swagger/index.d.ts +0 -9
  538. package/dist/swagger/index.d.ts.map +0 -1
  539. package/dist/swagger/index.js +0 -165
  540. package/dist/swagger/index.js.map +0 -1
  541. package/dist/threads/pool.d.ts +0 -14
  542. package/dist/threads/pool.d.ts.map +0 -1
  543. package/dist/threads/pool.js +0 -93
  544. package/dist/threads/pool.js.map +0 -1
  545. package/dist/threads/worker-runner.d.ts +0 -2
  546. package/dist/threads/worker-runner.d.ts.map +0 -1
  547. package/dist/threads/worker-runner.js +0 -71
  548. package/dist/threads/worker-runner.js.map +0 -1
  549. package/dist/validator/validator.d.ts +0 -360
  550. package/dist/validator/validator.d.ts.map +0 -1
  551. package/dist/validator/validator.js +0 -931
  552. package/dist/validator/validator.js.map +0 -1
  553. package/dist/websocket/orchestrator.d.ts +0 -11
  554. package/dist/websocket/orchestrator.d.ts.map +0 -1
  555. package/dist/websocket/orchestrator.js +0 -238
  556. package/dist/websocket/orchestrator.js.map +0 -1
  557. package/dist/websocket/server.d.ts +0 -66
  558. package/dist/websocket/server.d.ts.map +0 -1
  559. package/dist/websocket/server.js +0 -158
  560. package/dist/websocket/server.js.map +0 -1
  561. package/dist/websocket/socket.d.ts +0 -119
  562. package/dist/websocket/socket.d.ts.map +0 -1
  563. package/dist/websocket/socket.js +0 -242
  564. package/dist/websocket/socket.js.map +0 -1
@@ -0,0 +1,151 @@
1
+ ---
2
+ nextUrl: "/docs/validation"
3
+ nextTitle: "Validation"
4
+ ---
5
+
6
+ # Boundaries (Config & Request Pipeline)
7
+
8
+ A `boundary.ts` acts as a folder-scoped configuration and request pipeline in your file-system routing architecture.
9
+
10
+ Any `boundary.ts` applies to every route in its folder and all subfolders recursively. Instead of manually registering middleware chains or route guards, placing a `boundary.ts` configures **CORS**, **Headers**, **Excluded Paths**, **Dependency Injection**, and an **auto-detected request pipeline** cleanly scoped to that sub-tree.
11
+
12
+ ---
13
+
14
+ ## Anatomy of a Boundary
15
+
16
+ A `boundary.ts` has two distinct, independent parts:
17
+
18
+ 1. **Config** — pure data, declared via `defineBoundary()` (functional) or the `@Boundary()` class decorator (OOP). It configures CORS, headers, DI providers, timeout, and exclusion rules.
19
+ 2. **Pipeline** — real code, auto-detected by function signature. No manual pipeline registration is needed.
20
+
21
+ | Signature | Detected as | Execution timing |
22
+ |---|---|---|
23
+ | `(req, res, next)` | Chain Step | Runs in file/declaration order, before the route |
24
+ | `(ctx, next)` — default export (functional) or class method `handle(ctx, next)` (OOP) | Request Wrapper | Wraps around all chain steps and the nested route/boundary |
25
+
26
+ ---
27
+
28
+ ## 1. Functional Paradigm
29
+
30
+ In functional style, export `config = defineBoundary(...)`, export named middleware functions `(req, res, next)` for chain steps, and optionally provide a `default export` function `(ctx, next)` as an onion-style wrapper.
31
+
32
+ ```typescript filename="src/http/admin/boundary.ts"
33
+ import { defineBoundary } from 'exisjs/router'
34
+ import type { Request, Response, Next, BoundaryContext } from 'exisjs/router'
35
+ import { UnauthorizedError } from 'exisjs/error'
36
+
37
+ // 1. Configuration (CORS, Headers, Exclusions, DI Providers)
38
+ export const config = defineBoundary({
39
+ cors: {
40
+ origin: ['https://admin.yourdomain.com'],
41
+ credentials: true,
42
+ },
43
+ headers: {
44
+ 'X-Admin-Api-Version': '2.0',
45
+ },
46
+ exclude: [
47
+ '/admin/health',
48
+ { path: '/admin/public/*', method: 'GET' }
49
+ ],
50
+ })
51
+
52
+ // 2. Chain Step (auto-detected by (req, res, next) signature)
53
+ export function requireAuth(req: Request, res: Response, next: Next) {
54
+ if (!req.headers['x-api-key']) {
55
+ throw new UnauthorizedError('Missing API key')
56
+ }
57
+ next()
58
+ }
59
+
60
+ // 3. Wrapper (auto-detected as default export with (ctx, next) signature)
61
+ export default async function (ctx: BoundaryContext, next: Next) {
62
+ const start = Date.now()
63
+ try {
64
+ const result = await next()
65
+ const duration = Date.now() - start
66
+ ctx.res.setHeader('X-Response-Time', `${duration}ms`)
67
+ return { success: true, data: result }
68
+ } catch (err: any) {
69
+ return {
70
+ success: false,
71
+ error: { message: err.message || 'Internal error' },
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 2. Class-Based (OOP) Paradigm
80
+
81
+ In OOP style, decorate a class with `@Boundary(...)`. Named methods taking `(req, res, next)` are auto-detected as chain steps, and a method named `handle(ctx, next)` serves as the request wrapper.
82
+
83
+ ```typescript filename="src/http/admin/boundary.ts"
84
+ import { Boundary } from 'exisjs/decorators'
85
+ import type { Request, Response, Next, BoundaryContext } from 'exisjs/router'
86
+ import { UnauthorizedError } from 'exisjs/error'
87
+
88
+ @Boundary({
89
+ cors: {
90
+ origin: ['https://admin.yourdomain.com'],
91
+ credentials: true,
92
+ },
93
+ headers: {
94
+ 'X-Admin-Api-Version': '2.0',
95
+ },
96
+ exclude: ['/admin/health'],
97
+ })
98
+ export default class AdminBoundary {
99
+ // Chain step
100
+ requireAuth(req: Request, res: Response, next: Next) {
101
+ if (!req.headers['x-api-key']) {
102
+ throw new UnauthorizedError('Missing API key')
103
+ }
104
+ next()
105
+ }
106
+
107
+ // Wrapper
108
+ async handle(ctx: BoundaryContext, next: Next) {
109
+ const start = Date.now()
110
+ const result = await next()
111
+ ctx.res.setHeader('X-Response-Time', `${Date.now() - start}ms`)
112
+ return result
113
+ }
114
+ }
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Cascading & Inheritance
120
+
121
+ Boundaries cascade down the directory tree. For instance:
122
+
123
+ ```text
124
+ src/http/
125
+ ├── boundary.ts # Root Boundary (applies to /api/*)
126
+ └── admin/
127
+ ├── boundary.ts # Admin Boundary (applies to /api/admin/*)
128
+ └── users/
129
+ └── route.ts # Handled by both Root Boundary and Admin Boundary
130
+ ```
131
+
132
+ 1. **Wrappers & Chain Steps**: Outer boundaries execute first. Root wrappers wrap nested wrappers, and root chain steps run before nested chain steps.
133
+ 2. **CORS & Headers**: Sub-boundaries inherit and merge or override parent headers and CORS policies.
134
+ 3. **Exclusions**: When a route matches an exclusion pattern (e.g. `/admin/health` in `exclude`), that boundary's chain steps and wrappers are bypassed for the request.
135
+
136
+ ---
137
+
138
+ ## Dependency Injection via Providers
139
+
140
+ Boundaries also act as IoC module scopes. You can scope providers to a directory tree using `providers`:
141
+
142
+ ```typescript filename="src/http/users/boundary.ts"
143
+ import { defineBoundary } from 'exisjs/router'
144
+ import { UsersRepository } from './repository'
145
+
146
+ export const config = defineBoundary({
147
+ providers: [
148
+ ['UsersRepository', { useClass: UsersRepository }],
149
+ ],
150
+ })
151
+ ```
@@ -3,212 +3,174 @@ nextUrl: "/docs"
3
3
  nextTitle: "Introduction"
4
4
  ---
5
5
 
6
- # CLI command reference
6
+ # CLI Command Reference
7
7
 
8
- ### `exisjs init`
9
-
10
- Creates a new ExisJS project.
11
-
12
- ```bash
13
- $ npx exisjs init
14
- ```
15
-
16
- **Description**
17
- Creates and initializes a new ExisJS project. Prompts for configuration options (such as whether to include TypeScript, ESLint, Database integrations, etc.) and generates a boilerplate project structure for you.
18
-
19
- ---
20
-
21
- ### `exisjs generate`
8
+ ### `exisjs dev`
22
9
 
23
- Generates and/or modifies files based on a schematic.
10
+ Starts the development server with live reload and automatic port collision avoidance.
24
11
 
25
12
  ```bash
26
- $ npx exisjs generate <type> <name> [options]
27
- $ npx exisjs g <type> <name> [options]
13
+ $ npx exisjs dev [options]
28
14
  ```
29
15
 
30
- **Description**
31
- Generates new features for your application, such as routes, plugins, middleware, or tests.
32
-
33
- **Arguments**
34
-
35
- | Argument | Description |
36
- | :--- | :--- |
37
- | `<type>` | The type of the feature to generate. See the Schematics table below. |
38
- | `<name>` | The name of the generated component. |
39
-
40
16
  **Options**
41
17
 
42
18
  | Option | Description |
43
19
  | :--- | :--- |
44
- | `--oop` | Generate using Class-Based (OOP) paradigm instead of Functional. |
45
-
46
- **Schematics**
20
+ | `-p, --port <port>` | Port to listen on (overrides `.env` and `exis.config.ts`). |
21
+ | `-H, --host <host>` | Host to bind to (e.g. `0.0.0.0` or `localhost`). |
22
+ | `-e, --entry <file>` | Custom entry file path (default: `src/http/server.ts`). |
47
23
 
48
- | Name | Alias | Description |
49
- | :--- | :--- | :--- |
50
- | `route` | `r` | Generates a new Route controller. |
51
- | `plugin` | `p` | Generates a new ExisJS Plugin module. |
52
- | `middleware` | `m` | Generates a new Middleware function. |
53
- | `test` | `t` | Generates a new test suite file. |
24
+ - **Automatic Port Collision Detection**: If the designated port is occupied, the CLI detects the conflict and increments to the next available port automatically.
25
+ - **PID Lockfile**: Manages a `.exis/dev.pid` lockfile to prevent accidentally spawning duplicate dev servers in the same directory.
54
26
 
55
27
  ---
56
28
 
57
29
  ### `exisjs build`
58
30
 
59
- Compiles an application or workspace into an output folder.
31
+ Compiles TypeScript to production JavaScript and produces route manifests.
60
32
 
61
33
  ```bash
62
34
  $ npx exisjs build [options]
63
35
  ```
64
36
 
65
- **Description**
66
- Compiles TypeScript to production JavaScript.
67
-
68
37
  **Options**
69
38
 
70
39
  | Option | Description |
71
40
  | :--- | :--- |
72
- | `-o, --out-dir <dir>` | Output directory (default: dist). |
73
- | `--no-clean` | Skip cleaning the output directory. |
41
+ | `-o, --out-dir <dir>` | Output directory (default: `.exis/server` or `dist`). |
42
+ | `--no-clean` | Skip cleaning the output directory before compilation. |
43
+
44
+ - **Type-Check**: Runs the TypeScript compiler in check-only mode (`noEmit`) to verify strict typing before compiling.
45
+ - **Fast Bundling**: Emits JavaScript via esbuild.
46
+ - **Route Manifest**: Generates `.exis/routes-manifest.js` to enable O(1) route discovery at runtime without filesystem directory walks.
74
47
 
75
48
  ---
76
49
 
77
50
  ### `exisjs start`
78
51
 
79
- Compiles and runs an application from the compiled `dist` directory.
52
+ Starts the compiled production server.
80
53
 
81
54
  ```bash
82
55
  $ npx exisjs start [options]
83
56
  ```
84
57
 
85
- **Description**
86
- Starts the production server by executing the compiled application entry file.
87
-
88
58
  **Options**
89
59
 
90
60
  | Option | Description |
91
61
  | :--- | :--- |
92
- | `-p, --port <port>` | Port to listen on (overrides `.env`). |
93
- | `-e, --entry <file>` | Custom compiled entry file path (default: `dist/http/server.js`). |
62
+ | `-p, --port <port>` | Port to listen on. |
63
+ | `-H, --host <host>` | Host to bind to. |
64
+ | `-e, --entry <file>` | Custom compiled entry file path. |
94
65
 
95
66
  ---
96
67
 
97
- ### `exisjs dev`
68
+ ### `exisjs generate`
98
69
 
99
- Starts the development server with Hot Module Replacement (HMR) and automatic restarts.
70
+ Scaffolds framework components and files according to ExisJS core conventions.
100
71
 
101
72
  ```bash
102
- $ npx exisjs dev [options]
73
+ $ npx exisjs generate <type> <name> [options]
74
+ $ npx exisjs g <type> <name> [options]
103
75
  ```
104
76
 
105
- **Description**
106
- Starts the development server and handles TypeScript compilation on the fly.
107
- - **Port Detection:** If your requested port is already in use by another process, it detects the collision, automatically increments the port, and binds to the next available one.
108
- - **Lazy Routing (.exis):** ExisJS leverages the hidden `.exis` folder during development to lazy-load routes on demand.
77
+ **Arguments**
78
+
79
+ | Argument | Description |
80
+ | :--- | :--- |
81
+ | `<type>` | The schematic type to generate. |
82
+ | `<name>` | The name of the feature / folder. |
109
83
 
110
84
  **Options**
111
85
 
112
86
  | Option | Description |
113
87
  | :--- | :--- |
114
- | `-p, --port <port>` | Port to listen on (overrides `.env`). |
115
- | `-h, --host <host>` | Host to bind to. |
116
- | `-e, --entry <file>` | Custom entry file path (default: `src/http/server.ts`). |
88
+ | `--oop` | Generates using Class-Based (OOP) decorators instead of Functional syntax. |
89
+
90
+ **Supported Schematics**
91
+
92
+ | Schematic | Alias | Description | Output Path |
93
+ | :--- | :--- | :--- | :--- |
94
+ | `resource` | | Complete domain slice (`schema.ts`, `service.ts`, `boundary.ts`, `route.ts`) | `src/http/<name>/` |
95
+ | `route` | `r`, `c`, `controller` | HTTP route file | `src/http/<name>/route.ts` |
96
+ | `service` | `s` | Injectable service / business logic | `src/http/<name>/service.ts` |
97
+ | `schema` | `sc` | Validation schemas powered by `tex` | `src/http/<name>/schema.ts` |
98
+ | `boundary` | `b` | Folder-scoped configuration and request pipeline | `src/http/<name>/boundary.ts` |
99
+ | `plugin` | `p` | Distributable plugin module | `src/plugins/<name>.ts` |
100
+ | `middleware` | `m` | Standalone middleware handler | `src/middleware/<name>.ts` |
101
+ | `test` | `t` | Native test suite | `tests/<name>.test.ts` |
117
102
 
118
103
  ---
119
104
 
120
- ### `exisjs test`
105
+ ### `exisjs routes`
121
106
 
122
- Runs the native Node.js test runner (`node:test`) across your project.
107
+ Analyzes and prints the application routing table to the terminal.
123
108
 
124
109
  ```bash
125
- $ npx exisjs test [files...] [options]
110
+ $ npx exisjs routes [options]
126
111
  ```
127
112
 
128
- **Description**
129
- Automatically sets up the ExisJS environment and parses TypeScript natively to run tests using the built-in `node:test` runner.
130
-
131
- **Arguments**
132
-
133
- | Argument | Description |
134
- | :--- | :--- |
135
- | `[files...]` | Specific test files or directories to run (optional). |
136
-
137
113
  **Options**
138
114
 
139
115
  | Option | Description |
140
116
  | :--- | :--- |
141
- | `--watch` | Watch for file changes and re-run tests. |
142
- | `-u, --update` | Update test snapshots. |
143
- | `-e, --entry <file>` | Custom entry file path to bootstrap before tests. |
117
+ | `-e, --entry <file>` | Custom entry file path to bootstrap the app from. |
144
118
 
145
119
  ---
146
120
 
147
- ### `exisjs routes`
121
+ ### `exisjs init`
148
122
 
149
- Analyzes your application and prints a tabular representation of your entire routing table to the terminal.
123
+ Initializes a new ExisJS project in the current directory using `@exisjs/create`.
150
124
 
151
125
  ```bash
152
- $ npx exisjs routes [options]
126
+ $ npx exisjs init
153
127
  ```
154
128
 
155
- **Description**
156
- Loads your application context and outputs a formatted table showing all registered HTTP routes.
129
+ ---
130
+
131
+ ### `exisjs test`
132
+
133
+ Runs the native Node.js test runner (`node:test`) across the project.
134
+
135
+ ```bash
136
+ $ npx exisjs test [files...] [options]
137
+ ```
157
138
 
158
139
  **Options**
159
140
 
160
141
  | Option | Description |
161
142
  | :--- | :--- |
162
- | `-e, --entry <file>` | Custom entry file path to bootstrap the app from. |
143
+ | `--watch` | Watch for file changes and re-run tests. |
144
+ | `-u, --update` | Update test snapshots. |
145
+ | `-e, --entry <file>` | Custom entry file path to bootstrap before running tests. |
163
146
 
164
147
  ---
165
148
 
166
149
  ### `exisjs repl`
167
150
 
168
- Starts an interactive Read-Eval-Print Loop (REPL) console loaded with your application's context.
151
+ Starts an interactive Node.js REPL console loaded with your application context.
169
152
 
170
153
  ```bash
171
154
  $ npx exisjs repl [options]
172
155
  $ npx exisjs console [options]
173
156
  ```
174
157
 
175
- **Description**
176
- Provides an interactive command-line environment with direct access to your application's database, plugins, and services.
177
-
178
- **Options**
179
-
180
- | Option | Description |
181
- | :--- | :--- |
182
- | `-e, --entry <file>` | Custom entry file path to bootstrap the app from. |
183
-
184
158
  ---
185
159
 
186
160
  ### `exisjs exports`
187
161
 
188
- Lists all the available framework exports and public APIs exposed by ExisJS.
162
+ Lists all available framework exports and public subpaths exposed by `exisjs/*`.
189
163
 
190
164
  ```bash
191
165
  $ npx exisjs exports
192
166
  ```
193
167
 
194
- **Description**
195
- Outputs a list of everything that can be imported from the `exisjs` package.
196
-
197
168
  ---
198
169
 
199
170
  ### `exisjs info`
200
171
 
201
- Displays environment and version information for debugging and bug reporting.
172
+ Displays runtime environment, Node.js version, platform, architecture, and ExisJS version.
202
173
 
203
174
  ```bash
204
175
  $ npx exisjs info
205
176
  ```
206
-
207
- **Description**
208
- Prints out the current ExisJS version, Node.js version, platform, and architecture.
209
-
210
- ---
211
-
212
- ## Requirements
213
-
214
- ExisJS CLI requires a Node.js binary. We recommend Node.js v20+ to ensure compatibility with modern native features (like the built-in test runner).
@@ -5,50 +5,49 @@ nextTitle: "CLI Usage"
5
5
 
6
6
  # Overview
7
7
 
8
- The ExisJS CLI is a command-line interface tool that helps you initialize, develop, and maintain your ExisJS applications. It assists in scaffolding the project, serving it in development mode, and building the application for production.
8
+ The ExisJS CLI (`exis` / `exisjs`) is a developer tool that assists in initializing, developing, building, and running ExisJS applications.
9
9
 
10
- An ExisJS application is a standard TypeScript application that needs to be compiled to JavaScript before execution. The CLI provides a standard build and execute process with reasonable defaults, while ensuring developers can access the underlying tools (like `tsc` and `node`) to customize them if necessary.
10
+ The CLI is engineered around ExisJS core conventions: file-system routing under `src/http/`, schema validation with `tex`, directory-scoped boundaries (`boundary.ts`), and high-performance production builds with route manifests.
11
11
 
12
12
  ## Installation
13
13
 
14
- You have several options available for managing how your OS command line resolves the location of the `exisjs` binary file.
15
-
16
- You can install the CLI globally using the `npm install -g` command. This provides convenience and ensures the `exisjs` binary is available across your system.
14
+ The CLI can be run on-demand via `npx` or installed globally via npm:
17
15
 
18
16
  ```bash
17
+ # Run on-demand (recommended for scaffolding new projects)
18
+ $ npx exisjs init my-api
19
+
20
+ # Or install globally
19
21
  $ npm install -g exisjs
20
22
  ```
21
23
 
22
- > [!NOTE]
23
- > Alternatively, you can use `npx exisjs` to run the CLI without installing it globally. This ensures you run the latest version or a managed local version.
24
+ Inside an initialized ExisJS project, the CLI is locally available and executed via `npx exisjs` or `npm run <script>`.
24
25
 
25
- ## Basic workflow
26
+ ## Basic Workflow
26
27
 
27
- Once installed, you can invoke CLI commands directly from your OS command line through the `exisjs` executable. See the available commands by entering the following:
28
+ Once in your terminal, invoke CLI commands directly:
28
29
 
29
30
  ```bash
30
- $ exisjs --help
31
- ```
31
+ # View help for all commands
32
+ $ npx exisjs --help
32
33
 
33
- Get help on an individual command using the `--help` flag. Substitute any command to get detailed help:
34
-
35
- ```bash
36
- $ exisjs generate --help
34
+ # View help for a specific command
35
+ $ npx exisjs generate --help
37
36
  ```
38
37
 
39
- To create, build, and run a new basic ExisJS project in development mode, navigate to the folder that should be the parent of your new project, and run the following commands:
38
+ To create and run a new project:
40
39
 
41
40
  ```bash
42
- $ exisjs init my-project
43
- $ cd my-project
41
+ $ npx exisjs init my-app
42
+ $ cd my-app
44
43
  $ npm run dev
45
44
  ```
46
45
 
47
- In your browser, open `http://localhost:3000` to see the new application running. The application will automatically recompile and reload when you change any source files.
46
+ Open `http://localhost:4000` (or the dynamically resolved available port) to access your running API.
48
47
 
49
- ## CLI command syntax
48
+ ## CLI Command Syntax
50
49
 
51
- All `exisjs` commands follow the same format:
50
+ All ExisJS CLI commands follow this standard structure:
52
51
 
53
52
  ```bash
54
53
  exisjs <command> [arguments] [options]
@@ -57,36 +56,27 @@ exisjs <command> [arguments] [options]
57
56
  For example:
58
57
 
59
58
  ```bash
60
- $ exisjs generate route users --oop
61
- ```
62
-
63
- Here, `generate` is the command, `route` and `users` are the arguments, and `--oop` is the option.
59
+ # Scaffold a new route with functional syntax
60
+ $ npx exisjs generate route users
64
61
 
65
- Most commands and some options have aliases. For example, `generate` can be invoked as `g`:
62
+ # Scaffold with class-based (OOP) decorators
63
+ $ npx exisjs generate route users --oop
66
64
 
67
- ```bash
68
- $ exisjs g route users --oop
65
+ # Use the short alias
66
+ $ npx exisjs g r users --oop
69
67
  ```
70
68
 
71
- ## Command overview
72
-
73
- Run `exisjs <command> --help` for any of the following commands to see command-specific options.
74
-
75
- See [CLI Commands](/docs/cli/commands) for detailed descriptions of each command.
69
+ ## Command Overview
76
70
 
77
71
  | Command | Alias | Description |
78
72
  | :--- | :--- | :--- |
79
- | `init` | | Creates and initializes a new ExisJS project. |
80
- | `generate` | `g` | Generates features based on schematics (routes, plugins, etc.). |
81
- | `build` | | Compiles an application into an output folder. |
82
- | `start` | | Runs an application from the compiled directory. |
83
- | `dev` | | Starts the development server with hot module replacement. |
84
- | `test` | | Runs the native Node.js test runner across your project. |
85
- | `routes` | | Prints a tabular representation of your routing table. |
86
- | `repl` | `console` | Starts an interactive REPL console loaded with your application context. |
87
- | `exports` | | Lists all available framework exports. |
88
- | `info` | | Displays environment and version information. |
89
-
90
- ## Requirements
91
-
92
- The ExisJS CLI requires a Node.js binary. We recommend Node.js v20+ to ensure compatibility with modern native features, such as the built-in test runner.
73
+ | `dev` | | Starts the development server with HMR and automatic port collision avoidance. |
74
+ | `build` | | Type-checks and compiles TypeScript to production JavaScript with route manifest generation. |
75
+ | `start` | | Runs the compiled production server. |
76
+ | `routes` | | Prints the application routing table to the terminal. |
77
+ | `generate` | `g` | Scaffolds framework slices (resource, route, service, schema, boundary, plugin, middleware, test). |
78
+ | `test` | | Runs the native Node.js test suite (`node:test`) with custom Jest-style reporting. |
79
+ | `repl` | `console` | Starts an interactive Node.js REPL loaded with the application context. |
80
+ | `exports` | | Displays all available `@exisjs` and `exisjs/*` subpath exports. |
81
+ | `info` | | Displays system, Node.js, and ExisJS runtime information. |
82
+ | `init` | | Initializes a new ExisJS application in the current directory. |
@@ -5,19 +5,21 @@ nextTitle: "CLI Commands"
5
5
 
6
6
  # CLI Usage
7
7
 
8
- The ExisJS CLI can be executed in two primary contexts: **globally** via your operating system's PATH, or **locally** via your project's `package.json` scripts. Understanding the distinction between these execution contexts is critical for maintaining stable development environments.
8
+ The ExisJS CLI (`exis` / `exisjs`) can be executed in two primary contexts: **globally / on-demand** via `npx`, or **locally** via your project's `package.json` scripts.
9
9
 
10
10
  ## Global vs. Local Execution
11
11
 
12
- When you install the CLI globally (`npm install -g exisjs`) or run it on-demand via `npx`, the binary operates outside of your project's dependency tree. While this is necessary for initializing new projects, it presents a challenge for long-term maintenance: if two developers have different global versions of the CLI installed, they may experience inconsistent build outputs or behavior.
12
+ When bootstrapping a brand-new project, invoke the initialization tool using `npx`:
13
13
 
14
- To solve this, ExisJS manages its build and execution tools as **local development dependencies**. When you run `exisjs init`, the framework automatically installs the `exisjs` package into your `node_modules` and wires it up to your `package.json` scripts.
14
+ ```bash
15
+ $ npx exisjs init my-api
16
+ ```
15
17
 
16
- By executing the CLI through `npm run`, npm automatically resolves the binary to the exact version pinned in your `package.json`, ensuring deterministic behavior across your entire engineering team and CI/CD pipelines.
18
+ Once inside an initialized ExisJS project, execution through `npm run` ensures deterministic behavior pinned to the local `exisjs` version in `node_modules`.
17
19
 
18
20
  ## Default Package Scripts
19
21
 
20
- Every ExisJS project is scaffolded with a standard set of `package.json` scripts that wrap the underlying CLI commands:
22
+ Every ExisJS project scaffolded with `init` includes the standard script targets in `package.json`:
21
23
 
22
24
  ```json
23
25
  {
@@ -30,32 +32,44 @@ Every ExisJS project is scaffolded with a standard set of `package.json` scripts
30
32
  }
31
33
  ```
32
34
 
33
- You invoke these scripts using your package manager:
35
+ Invoke these scripts using your package manager:
34
36
 
35
37
  ```bash
36
38
  $ npm run dev
37
39
  $ npm run build
38
40
  $ npm run start
41
+ $ npm test
39
42
  ```
40
43
 
41
44
  ## Passing Arguments via Scripts
42
45
 
43
- If you need to pass additional arguments or options to the CLI while using package scripts, append a double-dash (`--`) before the CLI options. This instructs npm to pass the remaining arguments directly to the underlying `exisjs` command.
44
-
45
- For example, to start the development server on a custom port:
46
+ To pass options through `npm run`, append a double-dash (`--`) before the CLI flags:
46
47
 
47
48
  ```bash
48
- $ npm run dev -- --port 4000
49
+ # Start the dev server on port 5000
50
+ $ npm run dev -- -p 5000
51
+
52
+ # Run a specific test file
53
+ $ npm test -- tests/users.test.ts
49
54
  ```
50
55
 
51
- To generate a new route using `npx` (which bypasses the script requirement while still using the local binary):
56
+ Direct commands can also be called via `npx exisjs`:
52
57
 
53
58
  ```bash
54
- $ npx exisjs generate route users
59
+ # Scaffold a new resource slice
60
+ $ npx exisjs g resource users
61
+
62
+ # Print the routing table
63
+ $ npx exisjs routes
64
+
65
+ # Inspect available public exports
66
+ $ npx exisjs exports
55
67
  ```
56
68
 
57
69
  ## Recommended Workflow
58
70
 
59
- 1. Use the global CLI (or `npx exisjs`) **only** for scaffolding new projects (`exisjs init`).
60
- 2. Use the `package.json` scripts (e.g., `npm run dev`) for all day-to-day development, building, and testing.
61
- 3. Use `npx exisjs` inside an existing project directory for one-off commands (like `generate`, `routes`, or `repl`).
71
+ 1. Use `npx exisjs init <name>` to scaffold new applications.
72
+ 2. Use `npm run dev` for local hot-reloading development with automatic port conflict handling.
73
+ 3. Use `npx exisjs generate <type> <name>` to scaffold file conventions (`route`, `service`, `schema`, `boundary`, `resource`).
74
+ 4. Use `npm test` to run the integrated test runner.
75
+ 5. Use `npm run build` and `npm run start` for production deployment.