alepha 0.14.1 → 0.14.3

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 (402) hide show
  1. package/README.md +3 -3
  2. package/dist/api/audits/index.browser.js +5 -5
  3. package/dist/api/audits/index.browser.js.map +1 -1
  4. package/dist/api/audits/index.d.ts +784 -784
  5. package/dist/api/audits/index.d.ts.map +1 -1
  6. package/dist/api/audits/index.js +13 -13
  7. package/dist/api/audits/index.js.map +1 -1
  8. package/dist/api/files/index.browser.js +5 -5
  9. package/dist/api/files/index.browser.js.map +1 -1
  10. package/dist/api/files/index.d.ts +57 -57
  11. package/dist/api/files/index.d.ts.map +1 -1
  12. package/dist/api/files/index.js +71 -71
  13. package/dist/api/files/index.js.map +1 -1
  14. package/dist/api/jobs/index.browser.js +5 -5
  15. package/dist/api/jobs/index.browser.js.map +1 -1
  16. package/dist/api/jobs/index.d.ts +165 -165
  17. package/dist/api/jobs/index.d.ts.map +1 -1
  18. package/dist/api/jobs/index.js +10 -10
  19. package/dist/api/jobs/index.js.map +1 -1
  20. package/dist/api/notifications/index.browser.js +10 -10
  21. package/dist/api/notifications/index.browser.js.map +1 -1
  22. package/dist/api/notifications/index.d.ts +583 -171
  23. package/dist/api/notifications/index.d.ts.map +1 -1
  24. package/dist/api/notifications/index.js +12 -12
  25. package/dist/api/notifications/index.js.map +1 -1
  26. package/dist/api/parameters/index.browser.js +163 -10
  27. package/dist/api/parameters/index.browser.js.map +1 -1
  28. package/dist/api/parameters/index.d.ts +281 -276
  29. package/dist/api/parameters/index.d.ts.map +1 -1
  30. package/dist/api/parameters/index.js +196 -91
  31. package/dist/api/parameters/index.js.map +1 -1
  32. package/dist/api/users/index.browser.js +19 -19
  33. package/dist/api/users/index.browser.js.map +1 -1
  34. package/dist/api/users/index.d.ts +778 -764
  35. package/dist/api/users/index.d.ts.map +1 -1
  36. package/dist/api/users/index.js +831 -596
  37. package/dist/api/users/index.js.map +1 -1
  38. package/dist/api/verifications/index.browser.js +6 -6
  39. package/dist/api/verifications/index.browser.js.map +1 -1
  40. package/dist/api/verifications/index.d.ts +125 -125
  41. package/dist/api/verifications/index.d.ts.map +1 -1
  42. package/dist/api/verifications/index.js +6 -6
  43. package/dist/api/verifications/index.js.map +1 -1
  44. package/dist/batch/index.js.map +1 -1
  45. package/dist/bin/index.d.ts +1 -2
  46. package/dist/bin/index.js +0 -1
  47. package/dist/bin/index.js.map +1 -1
  48. package/dist/cache/core/index.js.map +1 -1
  49. package/dist/cli/index.d.ts +249 -218
  50. package/dist/cli/index.d.ts.map +1 -1
  51. package/dist/cli/index.js +951 -821
  52. package/dist/cli/index.js.map +1 -1
  53. package/dist/command/index.d.ts +40 -0
  54. package/dist/command/index.d.ts.map +1 -1
  55. package/dist/command/index.js +97 -17
  56. package/dist/command/index.js.map +1 -1
  57. package/dist/core/index.browser.js +14 -18
  58. package/dist/core/index.browser.js.map +1 -1
  59. package/dist/core/index.d.ts +29 -0
  60. package/dist/core/index.d.ts.map +1 -1
  61. package/dist/core/index.js +21 -24
  62. package/dist/core/index.js.map +1 -1
  63. package/dist/core/index.native.js +21 -24
  64. package/dist/core/index.native.js.map +1 -1
  65. package/dist/datetime/index.js.map +1 -1
  66. package/dist/fake/index.js +195 -168
  67. package/dist/fake/index.js.map +1 -1
  68. package/dist/file/index.d.ts +8 -0
  69. package/dist/file/index.d.ts.map +1 -1
  70. package/dist/file/index.js +3 -0
  71. package/dist/file/index.js.map +1 -1
  72. package/dist/lock/redis/index.js.map +1 -1
  73. package/dist/logger/index.js.map +1 -1
  74. package/dist/mcp/index.d.ts.map +1 -1
  75. package/dist/mcp/index.js.map +1 -1
  76. package/dist/orm/index.browser.js +26 -5
  77. package/dist/orm/index.browser.js.map +1 -1
  78. package/dist/orm/index.d.ts +146 -121
  79. package/dist/orm/index.d.ts.map +1 -1
  80. package/dist/orm/index.js +49 -24
  81. package/dist/orm/index.js.map +1 -1
  82. package/dist/redis/index.js.map +1 -1
  83. package/dist/retry/index.js.map +1 -1
  84. package/dist/router/index.js.map +1 -1
  85. package/dist/scheduler/index.d.ts +6 -6
  86. package/dist/scheduler/index.js.map +1 -1
  87. package/dist/security/index.d.ts +29 -29
  88. package/dist/security/index.d.ts.map +1 -1
  89. package/dist/security/index.js +1 -1
  90. package/dist/security/index.js.map +1 -1
  91. package/dist/server/auth/index.d.ts +171 -155
  92. package/dist/server/auth/index.d.ts.map +1 -1
  93. package/dist/server/auth/index.js +0 -1
  94. package/dist/server/auth/index.js.map +1 -1
  95. package/dist/server/cache/index.js.map +1 -1
  96. package/dist/server/compress/index.d.ts.map +1 -1
  97. package/dist/server/compress/index.js +2 -0
  98. package/dist/server/compress/index.js.map +1 -1
  99. package/dist/server/cookies/index.browser.js.map +1 -1
  100. package/dist/server/cookies/index.js.map +1 -1
  101. package/dist/server/core/index.browser.js.map +1 -1
  102. package/dist/server/core/index.d.ts.map +1 -1
  103. package/dist/server/core/index.js +1 -1
  104. package/dist/server/core/index.js.map +1 -1
  105. package/dist/server/health/index.d.ts +17 -17
  106. package/dist/server/helmet/index.js.map +1 -1
  107. package/dist/server/links/index.browser.js +22 -6
  108. package/dist/server/links/index.browser.js.map +1 -1
  109. package/dist/server/links/index.d.ts +46 -44
  110. package/dist/server/links/index.d.ts.map +1 -1
  111. package/dist/server/links/index.js +24 -41
  112. package/dist/server/links/index.js.map +1 -1
  113. package/dist/server/multipart/index.js.map +1 -1
  114. package/dist/server/rate-limit/index.js.map +1 -1
  115. package/dist/server/security/index.js.map +1 -1
  116. package/dist/server/swagger/index.d.ts +2 -1
  117. package/dist/server/swagger/index.d.ts.map +1 -1
  118. package/dist/server/swagger/index.js +8 -3
  119. package/dist/server/swagger/index.js.map +1 -1
  120. package/dist/thread/index.js.map +1 -1
  121. package/dist/topic/core/index.js.map +1 -1
  122. package/dist/vite/index.d.ts.map +1 -1
  123. package/dist/vite/index.js +12 -4
  124. package/dist/vite/index.js.map +1 -1
  125. package/dist/websocket/index.browser.js.map +1 -1
  126. package/dist/websocket/index.js.map +1 -1
  127. package/package.json +7 -7
  128. package/src/api/audits/controllers/{AuditController.ts → AdminAuditController.ts} +5 -6
  129. package/src/api/audits/entities/audits.ts +5 -5
  130. package/src/api/audits/index.browser.ts +1 -1
  131. package/src/api/audits/index.ts +3 -3
  132. package/src/api/audits/primitives/$audit.spec.ts +276 -0
  133. package/src/api/audits/services/AuditService.spec.ts +495 -0
  134. package/src/api/files/__tests__/$bucket.spec.ts +91 -0
  135. package/src/api/files/controllers/AdminFileStatsController.spec.ts +166 -0
  136. package/src/api/files/controllers/{StorageStatsController.ts → AdminFileStatsController.ts} +2 -2
  137. package/src/api/files/controllers/FileController.spec.ts +558 -0
  138. package/src/api/files/controllers/FileController.ts +4 -5
  139. package/src/api/files/entities/files.ts +5 -5
  140. package/src/api/files/index.browser.ts +1 -1
  141. package/src/api/files/index.ts +4 -4
  142. package/src/api/files/jobs/FileJobs.spec.ts +52 -0
  143. package/src/api/files/services/FileService.spec.ts +109 -0
  144. package/src/api/jobs/__tests__/JobController.spec.ts +343 -0
  145. package/src/api/jobs/controllers/{JobController.ts → AdminJobController.ts} +2 -2
  146. package/src/api/jobs/entities/jobExecutions.ts +5 -5
  147. package/src/api/jobs/index.ts +3 -3
  148. package/src/api/jobs/primitives/$job.spec.ts +476 -0
  149. package/src/api/notifications/controllers/{NotificationController.ts → AdminNotificationController.ts} +4 -5
  150. package/src/api/notifications/entities/notifications.ts +5 -5
  151. package/src/api/notifications/index.browser.ts +1 -1
  152. package/src/api/notifications/index.ts +4 -4
  153. package/src/api/parameters/controllers/{ConfigController.ts → AdminConfigController.ts} +46 -107
  154. package/src/api/parameters/entities/parameters.ts +7 -17
  155. package/src/api/parameters/index.ts +3 -3
  156. package/src/api/parameters/primitives/$config.spec.ts +356 -0
  157. package/src/api/parameters/schemas/activateConfigBodySchema.ts +12 -0
  158. package/src/api/parameters/schemas/checkScheduledResponseSchema.ts +8 -0
  159. package/src/api/parameters/schemas/configCurrentResponseSchema.ts +13 -0
  160. package/src/api/parameters/schemas/configHistoryResponseSchema.ts +9 -0
  161. package/src/api/parameters/schemas/configNameParamSchema.ts +10 -0
  162. package/src/api/parameters/schemas/configNamesResponseSchema.ts +8 -0
  163. package/src/api/parameters/schemas/configTreeNodeSchema.ts +13 -0
  164. package/src/api/parameters/schemas/configVersionParamSchema.ts +9 -0
  165. package/src/api/parameters/schemas/configVersionResponseSchema.ts +9 -0
  166. package/src/api/parameters/schemas/configsByStatusResponseSchema.ts +9 -0
  167. package/src/api/parameters/schemas/createConfigVersionBodySchema.ts +24 -0
  168. package/src/api/parameters/schemas/index.ts +15 -0
  169. package/src/api/parameters/schemas/parameterResponseSchema.ts +26 -0
  170. package/src/api/parameters/schemas/parameterStatusSchema.ts +13 -0
  171. package/src/api/parameters/schemas/rollbackConfigBodySchema.ts +15 -0
  172. package/src/api/parameters/schemas/statusParamSchema.ts +9 -0
  173. package/src/api/users/__tests__/EmailVerification.spec.ts +369 -0
  174. package/src/api/users/__tests__/PasswordReset.spec.ts +550 -0
  175. package/src/api/users/controllers/AdminIdentityController.spec.ts +365 -0
  176. package/src/api/users/controllers/{IdentityController.ts → AdminIdentityController.ts} +3 -4
  177. package/src/api/users/controllers/AdminSessionController.spec.ts +274 -0
  178. package/src/api/users/controllers/{SessionController.ts → AdminSessionController.ts} +3 -4
  179. package/src/api/users/controllers/AdminUserController.spec.ts +372 -0
  180. package/src/api/users/controllers/AdminUserController.ts +116 -0
  181. package/src/api/users/controllers/UserController.ts +4 -107
  182. package/src/api/users/controllers/UserRealmController.ts +3 -0
  183. package/src/api/users/entities/identities.ts +6 -6
  184. package/src/api/users/entities/sessions.ts +6 -6
  185. package/src/api/users/entities/users.ts +9 -9
  186. package/src/api/users/index.ts +13 -6
  187. package/src/api/users/primitives/$userRealm.ts +13 -8
  188. package/src/api/users/services/CredentialService.spec.ts +509 -0
  189. package/src/api/users/services/CredentialService.ts +46 -0
  190. package/src/api/users/services/IdentityService.ts +15 -0
  191. package/src/api/users/services/RegistrationService.spec.ts +630 -0
  192. package/src/api/users/services/RegistrationService.ts +18 -0
  193. package/src/api/users/services/SessionService.spec.ts +301 -0
  194. package/src/api/users/services/SessionService.ts +110 -1
  195. package/src/api/users/services/UserService.ts +67 -2
  196. package/src/api/verifications/__tests__/CodeVerification.spec.ts +318 -0
  197. package/src/api/verifications/__tests__/LinkVerification.spec.ts +279 -0
  198. package/src/api/verifications/entities/verifications.ts +6 -6
  199. package/src/api/verifications/jobs/VerificationJobs.spec.ts +50 -0
  200. package/src/batch/__tests__/startup-buffering.spec.ts +458 -0
  201. package/src/batch/primitives/$batch.spec.ts +766 -0
  202. package/src/batch/providers/BatchProvider.spec.ts +786 -0
  203. package/src/bin/index.ts +0 -1
  204. package/src/bucket/__tests__/shared.ts +194 -0
  205. package/src/bucket/primitives/$bucket.spec.ts +104 -0
  206. package/src/bucket/providers/FileStorageProvider.spec.ts +13 -0
  207. package/src/bucket/providers/LocalFileStorageProvider.spec.ts +77 -0
  208. package/src/bucket/providers/MemoryFileStorageProvider.spec.ts +82 -0
  209. package/src/cache/core/__tests__/shared.ts +377 -0
  210. package/src/cache/core/primitives/$cache.spec.ts +111 -0
  211. package/src/cache/redis/__tests__/cache-redis.spec.ts +70 -0
  212. package/src/cli/apps/AlephaCli.ts +54 -16
  213. package/src/cli/apps/AlephaPackageBuilderCli.ts +2 -1
  214. package/src/cli/assets/appRouterTs.ts +1 -1
  215. package/src/cli/commands/{ViteCommands.ts → build.ts} +2 -105
  216. package/src/cli/commands/clean.ts +14 -0
  217. package/src/cli/commands/{DrizzleCommands.ts → db.ts} +10 -117
  218. package/src/cli/commands/{DeployCommands.ts → deploy.ts} +1 -1
  219. package/src/cli/commands/dev.ts +69 -0
  220. package/src/cli/commands/format.ts +17 -0
  221. package/src/cli/commands/gen/changelog.spec.ts +315 -0
  222. package/src/cli/commands/{ChangelogCommands.ts → gen/changelog.ts} +16 -31
  223. package/src/cli/commands/gen/openapi.ts +71 -0
  224. package/src/cli/commands/gen.ts +18 -0
  225. package/src/cli/commands/{CoreCommands.ts → init.ts} +4 -40
  226. package/src/cli/commands/lint.ts +17 -0
  227. package/src/cli/commands/root.ts +41 -0
  228. package/src/cli/commands/run.ts +24 -0
  229. package/src/cli/commands/test.ts +42 -0
  230. package/src/cli/commands/typecheck.ts +24 -0
  231. package/src/cli/commands/{VerifyCommands.ts → verify.ts} +1 -13
  232. package/src/cli/defineConfig.ts +10 -1
  233. package/src/cli/index.ts +17 -7
  234. package/src/cli/services/AlephaCliUtils.ts +71 -32
  235. package/src/cli/services/GitMessageParser.ts +1 -1
  236. package/src/command/helpers/Asker.spec.ts +127 -0
  237. package/src/command/helpers/Runner.spec.ts +126 -0
  238. package/src/command/primitives/$command.spec.ts +1588 -0
  239. package/src/command/providers/CliProvider.ts +74 -24
  240. package/src/core/Alepha.ts +52 -4
  241. package/src/core/__tests__/Alepha-emit.spec.ts +22 -0
  242. package/src/core/__tests__/Alepha-graph.spec.ts +93 -0
  243. package/src/core/__tests__/Alepha-has.spec.ts +41 -0
  244. package/src/core/__tests__/Alepha-inject.spec.ts +93 -0
  245. package/src/core/__tests__/Alepha-register.spec.ts +81 -0
  246. package/src/core/__tests__/Alepha-start.spec.ts +176 -0
  247. package/src/core/__tests__/Alepha-with.spec.ts +14 -0
  248. package/src/core/__tests__/TypeBox-usecases.spec.ts +35 -0
  249. package/src/core/__tests__/TypeBoxLocale.spec.ts +15 -0
  250. package/src/core/__tests__/descriptor.spec.ts +34 -0
  251. package/src/core/__tests__/fixtures/A.ts +5 -0
  252. package/src/core/__tests__/pagination.spec.ts +77 -0
  253. package/src/core/helpers/jsonSchemaToTypeBox.ts +2 -2
  254. package/src/core/primitives/$atom.spec.ts +43 -0
  255. package/src/core/primitives/$hook.spec.ts +130 -0
  256. package/src/core/primitives/$inject.spec.ts +175 -0
  257. package/src/core/primitives/$module.spec.ts +115 -0
  258. package/src/core/providers/CodecManager.spec.ts +740 -0
  259. package/src/core/providers/EventManager.spec.ts +762 -0
  260. package/src/core/providers/EventManager.ts +4 -0
  261. package/src/core/providers/StateManager.spec.ts +365 -0
  262. package/src/core/providers/TypeProvider.spec.ts +1607 -0
  263. package/src/core/providers/TypeProvider.ts +20 -26
  264. package/src/datetime/primitives/$interval.spec.ts +103 -0
  265. package/src/datetime/providers/DateTimeProvider.spec.ts +86 -0
  266. package/src/email/primitives/$email.spec.ts +175 -0
  267. package/src/email/providers/LocalEmailProvider.spec.ts +341 -0
  268. package/src/fake/__tests__/keyName.example.ts +40 -0
  269. package/src/fake/__tests__/keyName.spec.ts +152 -0
  270. package/src/fake/__tests__/module.example.ts +32 -0
  271. package/src/fake/providers/FakeProvider.spec.ts +438 -0
  272. package/src/file/providers/FileSystemProvider.ts +8 -0
  273. package/src/file/providers/NodeFileSystemProvider.spec.ts +418 -0
  274. package/src/file/providers/NodeFileSystemProvider.ts +5 -0
  275. package/src/file/services/FileDetector.spec.ts +591 -0
  276. package/src/lock/core/__tests__/shared.ts +190 -0
  277. package/src/lock/core/providers/MemoryLockProvider.spec.ts +25 -0
  278. package/src/lock/redis/providers/RedisLockProvider.spec.ts +25 -0
  279. package/src/logger/__tests__/SimpleFormatterProvider.spec.ts +109 -0
  280. package/src/logger/primitives/$logger.spec.ts +108 -0
  281. package/src/logger/services/Logger.spec.ts +295 -0
  282. package/src/mcp/__tests__/errors.spec.ts +175 -0
  283. package/src/mcp/__tests__/integration.spec.ts +450 -0
  284. package/src/mcp/helpers/jsonrpc.spec.ts +380 -0
  285. package/src/mcp/primitives/$prompt.spec.ts +468 -0
  286. package/src/mcp/primitives/$resource.spec.ts +390 -0
  287. package/src/mcp/primitives/$tool.spec.ts +406 -0
  288. package/src/mcp/providers/McpServerProvider.spec.ts +797 -0
  289. package/src/orm/__tests__/$repository-crud.spec.ts +276 -0
  290. package/src/orm/__tests__/$repository-hooks.spec.ts +325 -0
  291. package/src/orm/__tests__/$repository-orderBy.spec.ts +128 -0
  292. package/src/orm/__tests__/$repository-pagination-sort.spec.ts +149 -0
  293. package/src/orm/__tests__/$repository-save.spec.ts +37 -0
  294. package/src/orm/__tests__/ModelBuilder-integration.spec.ts +490 -0
  295. package/src/orm/__tests__/ModelBuilder-types.spec.ts +186 -0
  296. package/src/orm/__tests__/PostgresProvider.spec.ts +46 -0
  297. package/src/orm/__tests__/delete-returning.spec.ts +256 -0
  298. package/src/orm/__tests__/deletedAt.spec.ts +80 -0
  299. package/src/orm/__tests__/enums.spec.ts +315 -0
  300. package/src/orm/__tests__/execute.spec.ts +72 -0
  301. package/src/orm/__tests__/fixtures/bigEntitySchema.ts +65 -0
  302. package/src/orm/__tests__/fixtures/userEntitySchema.ts +27 -0
  303. package/src/orm/__tests__/joins.spec.ts +1114 -0
  304. package/src/orm/__tests__/page.spec.ts +287 -0
  305. package/src/orm/__tests__/primaryKey.spec.ts +87 -0
  306. package/src/orm/__tests__/query-date-encoding.spec.ts +402 -0
  307. package/src/orm/__tests__/ref-auto-onDelete.spec.ts +156 -0
  308. package/src/orm/__tests__/references.spec.ts +102 -0
  309. package/src/orm/__tests__/security.spec.ts +710 -0
  310. package/src/orm/__tests__/sqlite.spec.ts +111 -0
  311. package/src/orm/__tests__/string-operators.spec.ts +429 -0
  312. package/src/orm/__tests__/timestamps.spec.ts +388 -0
  313. package/src/orm/__tests__/validation.spec.ts +183 -0
  314. package/src/orm/__tests__/version.spec.ts +64 -0
  315. package/src/orm/helpers/parseQueryString.spec.ts +196 -0
  316. package/src/orm/index.browser.ts +1 -1
  317. package/src/orm/index.ts +10 -6
  318. package/src/orm/primitives/$repository.spec.ts +137 -0
  319. package/src/orm/primitives/$sequence.spec.ts +29 -0
  320. package/src/orm/primitives/$transaction.spec.ts +82 -0
  321. package/src/orm/providers/{PostgresTypeProvider.ts → DatabaseTypeProvider.ts} +25 -3
  322. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -3
  323. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  324. package/src/orm/providers/drivers/CloudflareD1Provider.ts +1 -1
  325. package/src/orm/providers/drivers/DatabaseProvider.ts +1 -1
  326. package/src/orm/providers/drivers/NodePostgresProvider.ts +3 -3
  327. package/src/orm/providers/drivers/NodeSqliteProvider.ts +1 -1
  328. package/src/orm/providers/drivers/PglitePostgresProvider.ts +2 -2
  329. package/src/orm/services/ModelBuilder.spec.ts +575 -0
  330. package/src/orm/services/Repository.spec.ts +137 -0
  331. package/src/queue/core/__tests__/shared.ts +143 -0
  332. package/src/queue/core/providers/MemoryQueueProvider.spec.ts +23 -0
  333. package/src/queue/core/providers/WorkerProvider.spec.ts +378 -0
  334. package/src/queue/redis/providers/RedisQueueProvider.spec.ts +23 -0
  335. package/src/redis/__tests__/redis.spec.ts +58 -0
  336. package/src/retry/primitives/$retry.spec.ts +234 -0
  337. package/src/retry/providers/RetryProvider.spec.ts +438 -0
  338. package/src/router/__tests__/match.spec.ts +252 -0
  339. package/src/router/providers/RouterProvider.spec.ts +197 -0
  340. package/src/scheduler/__tests__/$scheduler-cron.spec.ts +25 -0
  341. package/src/scheduler/__tests__/$scheduler-interval.spec.ts +25 -0
  342. package/src/scheduler/__tests__/shared.ts +77 -0
  343. package/src/security/__tests__/bug-1-wildcard-after-start.spec.ts +229 -0
  344. package/src/security/__tests__/bug-2-password-validation.spec.ts +245 -0
  345. package/src/security/__tests__/bug-3-regex-vulnerability.spec.ts +407 -0
  346. package/src/security/__tests__/bug-4-oauth2-validation.spec.ts +439 -0
  347. package/src/security/__tests__/multi-layer-permissions.spec.ts +522 -0
  348. package/src/security/primitives/$permission.spec.ts +30 -0
  349. package/src/security/primitives/$permission.ts +2 -2
  350. package/src/security/primitives/$realm.spec.ts +101 -0
  351. package/src/security/primitives/$role.spec.ts +52 -0
  352. package/src/security/primitives/$serviceAccount.spec.ts +61 -0
  353. package/src/security/providers/SecurityProvider.spec.ts +350 -0
  354. package/src/server/auth/providers/ServerAuthProvider.ts +0 -2
  355. package/src/server/cache/providers/ServerCacheProvider.spec.ts +942 -0
  356. package/src/server/compress/providers/ServerCompressProvider.spec.ts +31 -0
  357. package/src/server/compress/providers/ServerCompressProvider.ts +2 -0
  358. package/src/server/cookies/providers/ServerCookiesProvider.spec.ts +253 -0
  359. package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +334 -0
  360. package/src/server/core/__tests__/ServerRouterProvider-requestId.spec.ts +129 -0
  361. package/src/server/core/primitives/$action.spec.ts +191 -0
  362. package/src/server/core/primitives/$route.spec.ts +65 -0
  363. package/src/server/core/providers/ServerBodyParserProvider.spec.ts +93 -0
  364. package/src/server/core/providers/ServerLoggerProvider.spec.ts +100 -0
  365. package/src/server/core/providers/ServerProvider.ts +3 -1
  366. package/src/server/core/services/HttpClient.spec.ts +123 -0
  367. package/src/server/core/services/UserAgentParser.spec.ts +111 -0
  368. package/src/server/cors/providers/ServerCorsProvider.spec.ts +481 -0
  369. package/src/server/health/providers/ServerHealthProvider.spec.ts +22 -0
  370. package/src/server/helmet/providers/ServerHelmetProvider.spec.ts +105 -0
  371. package/src/server/links/__tests__/$action.spec.ts +238 -0
  372. package/src/server/links/__tests__/fixtures/CrudApp.ts +122 -0
  373. package/src/server/links/__tests__/requestId.spec.ts +120 -0
  374. package/src/server/links/primitives/$remote.spec.ts +228 -0
  375. package/src/server/links/providers/LinkProvider.spec.ts +54 -0
  376. package/src/server/links/providers/LinkProvider.ts +49 -3
  377. package/src/server/links/providers/ServerLinksProvider.ts +1 -53
  378. package/src/server/links/schemas/apiLinksResponseSchema.ts +7 -0
  379. package/src/server/metrics/providers/ServerMetricsProvider.spec.ts +25 -0
  380. package/src/server/multipart/providers/ServerMultipartProvider.spec.ts +528 -0
  381. package/src/server/proxy/primitives/$proxy.spec.ts +87 -0
  382. package/src/server/rate-limit/__tests__/ActionRateLimit.spec.ts +211 -0
  383. package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +344 -0
  384. package/src/server/security/__tests__/BasicAuth.spec.ts +684 -0
  385. package/src/server/security/__tests__/ServerSecurityProvider-realm.spec.ts +388 -0
  386. package/src/server/security/providers/ServerSecurityProvider.spec.ts +123 -0
  387. package/src/server/static/primitives/$serve.spec.ts +193 -0
  388. package/src/server/swagger/__tests__/ui.spec.ts +52 -0
  389. package/src/server/swagger/primitives/$swagger.spec.ts +193 -0
  390. package/src/server/swagger/providers/ServerSwaggerProvider.ts +18 -8
  391. package/src/sms/primitives/$sms.spec.ts +165 -0
  392. package/src/sms/providers/LocalSmsProvider.spec.ts +224 -0
  393. package/src/sms/providers/MemorySmsProvider.spec.ts +193 -0
  394. package/src/thread/primitives/$thread.spec.ts +186 -0
  395. package/src/topic/core/__tests__/shared.ts +144 -0
  396. package/src/topic/core/providers/MemoryTopicProvider.spec.ts +23 -0
  397. package/src/topic/redis/providers/RedisTopicProvider.spec.ts +23 -0
  398. package/src/vite/plugins/viteAlephaDev.ts +16 -4
  399. package/src/vite/tasks/runAlepha.ts +7 -1
  400. package/src/websocket/__tests__/$websocket-new.spec.ts +195 -0
  401. package/src/websocket/primitives/$channel.spec.ts +30 -0
  402. package/src/cli/commands/BiomeCommands.ts +0 -29
@@ -3,7 +3,9 @@ import { Alepha, Static } from "alepha";
3
3
  import { FileSystemProvider } from "alepha/file";
4
4
  import * as alepha_command0 from "alepha/command";
5
5
  import { CliProvider, CommandPrimitive, EnvUtils, RunnerMethod } from "alepha/command";
6
- import * as alepha_logger5 from "alepha/logger";
6
+ import * as alepha_logger7 from "alepha/logger";
7
+ import { ConsoleColorProvider } from "alepha/logger";
8
+ import * as typebox0 from "typebox";
7
9
  import { DatabaseProvider } from "alepha/orm";
8
10
 
9
11
  //#region ../../src/cli/apps/AlephaCli.d.ts
@@ -25,6 +27,33 @@ declare class AlephaPackageBuilderCli {
25
27
  }
26
28
  declare function analyzeModules(srcDir: string, packageName: string): Promise<Module[]>;
27
29
  //#endregion
30
+ //#region ../../src/cli/atoms/changelogOptions.d.ts
31
+ /**
32
+ * Default scopes to ignore in changelog generation.
33
+ * Commits with these scopes won't appear in release notes.
34
+ */
35
+ declare const DEFAULT_IGNORE: string[];
36
+ /**
37
+ * Changelog configuration atom.
38
+ *
39
+ * Configure in `alepha.config.ts`:
40
+ * ```ts
41
+ * import { changelogOptions } from "alepha/cli";
42
+ *
43
+ * alepha.set(changelogOptions, {
44
+ * ignore: ["project", "release", "chore", "docs"],
45
+ * });
46
+ * ```
47
+ */
48
+ declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
49
+ /**
50
+ * Scopes to ignore (e.g., "project", "release", "chore").
51
+ * Commits like `feat(chore): ...` will be excluded from changelog.
52
+ */
53
+ ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
54
+ }>, "alepha.changelog">;
55
+ type ChangelogOptions = Static<typeof changelogOptions.schema>;
56
+ //#endregion
28
57
  //#region ../../src/cli/services/AlephaCliUtils.d.ts
29
58
  /**
30
59
  * Utility service for common project operations used by CLI commands.
@@ -37,9 +66,10 @@ declare function analyzeModules(srcDir: string, packageName: string): Promise<Mo
37
66
  * - Alepha instance loading
38
67
  */
39
68
  declare class AlephaCliUtils {
40
- protected readonly log: alepha_logger5.Logger;
69
+ protected readonly log: alepha_logger7.Logger;
41
70
  protected readonly fs: FileSystemProvider;
42
71
  protected readonly envUtils: EnvUtils;
72
+ protected readonly alepha: Alepha;
43
73
  /**
44
74
  * Execute a command using npx with inherited stdio.
45
75
  *
@@ -70,6 +100,12 @@ declare class AlephaCliUtils {
70
100
  * ```
71
101
  */
72
102
  writeConfigFile(name: string, content: string, root?: string): Promise<string>;
103
+ removeFiles(root: string, files: string[]): Promise<void>;
104
+ removeYarn(root: string): Promise<void>;
105
+ removePnpm(root: string): Promise<void>;
106
+ removeNpm(root: string): Promise<void>;
107
+ removeBun(root: string): Promise<void>;
108
+ removeAllPmFilesExcept(root: string, except: string): Promise<void>;
73
109
  /**
74
110
  * Ensure Yarn is configured in the project directory.
75
111
  *
@@ -78,6 +114,7 @@ declare class AlephaCliUtils {
78
114
  * @param root - The root directory of the project
79
115
  */
80
116
  ensureYarn(root: string): Promise<void>;
117
+ ensureBun(root: string): Promise<void>;
81
118
  ensurePnpm(root: string): Promise<void>;
82
119
  ensureNpm(root: string): Promise<void>;
83
120
  /**
@@ -218,6 +255,7 @@ declare class AlephaCliUtils {
218
255
  * @returns True if expo is in dependencies or devDependencies
219
256
  */
220
257
  hasExpo(root: string): Promise<boolean>;
258
+ getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
221
259
  /**
222
260
  * Install a dependency if it's missing from the project.
223
261
  *
@@ -235,40 +273,152 @@ interface DependencyModes {
235
273
  expo?: boolean;
236
274
  }
237
275
  //#endregion
238
- //#region ../../src/cli/commands/BiomeCommands.d.ts
239
- declare class BiomeCommands {
240
- protected readonly log: alepha_logger5.Logger;
276
+ //#region ../../src/cli/commands/build.d.ts
277
+ declare class BuildCommand {
278
+ protected readonly log: alepha_logger7.Logger;
241
279
  protected readonly utils: AlephaCliUtils;
242
- readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
243
- readonly lint: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
280
+ readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
281
+ stats: alepha0.TOptional<alepha0.TBoolean>;
282
+ vercel: alepha0.TOptional<alepha0.TBoolean>;
283
+ cloudflare: alepha0.TOptional<alepha0.TBoolean>;
284
+ docker: alepha0.TOptional<alepha0.TBoolean>;
285
+ sitemap: alepha0.TOptional<alepha0.TString>;
286
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
244
287
  }
245
288
  //#endregion
246
- //#region ../../src/cli/atoms/changelogOptions.d.ts
247
- /**
248
- * Default scopes to ignore in changelog generation.
249
- * Commits with these scopes won't appear in release notes.
250
- */
251
- declare const DEFAULT_IGNORE: string[];
252
- /**
253
- * Changelog configuration atom.
254
- *
255
- * Configure in `alepha.config.ts`:
256
- * ```ts
257
- * import { changelogOptions } from "alepha/cli";
258
- *
259
- * alepha.set(changelogOptions, {
260
- * ignore: ["project", "release", "chore", "docs"],
261
- * });
262
- * ```
263
- */
264
- declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
289
+ //#region ../../src/cli/commands/clean.d.ts
290
+ declare class CleanCommand {
265
291
  /**
266
- * Scopes to ignore (e.g., "project", "release", "chore").
267
- * Commits like `feat(chore): ...` will be excluded from changelog.
292
+ * Clean the project, removing the "dist" directory
268
293
  */
269
- ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
270
- }>, "alepha.changelog">;
271
- type ChangelogOptions = Static<typeof changelogOptions.schema>;
294
+ readonly clean: alepha_command0.CommandPrimitive<typebox0.TObject<typebox0.TProperties>, typebox0.TSchema, typebox0.TObject<typebox0.TProperties>>;
295
+ }
296
+ //#endregion
297
+ //#region ../../src/cli/commands/db.d.ts
298
+ declare class DbCommand {
299
+ protected readonly log: alepha_logger7.Logger;
300
+ protected readonly utils: AlephaCliUtils;
301
+ /**
302
+ * Check if database migrations are up to date.
303
+ */
304
+ protected readonly check: alepha_command0.CommandPrimitive<alepha0.TObject<{
305
+ provider: alepha0.TOptional<alepha0.TString>;
306
+ mode: alepha0.TOptional<alepha0.TString>;
307
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
308
+ /**
309
+ * Generate database migration files
310
+ */
311
+ protected readonly generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
312
+ provider: alepha0.TOptional<alepha0.TString>;
313
+ mode: alepha0.TOptional<alepha0.TString>;
314
+ custom: alepha0.TOptional<alepha0.TString>;
315
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
316
+ /**
317
+ * Push database schema changes directly to the database
318
+ */
319
+ protected readonly push: alepha_command0.CommandPrimitive<alepha0.TObject<{
320
+ provider: alepha0.TOptional<alepha0.TString>;
321
+ mode: alepha0.TOptional<alepha0.TString>;
322
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
323
+ /**
324
+ * Apply pending database migrations
325
+ */
326
+ protected readonly migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
327
+ provider: alepha0.TOptional<alepha0.TString>;
328
+ mode: alepha0.TOptional<alepha0.TString>;
329
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
330
+ /**
331
+ * Launch Drizzle Studio database browser
332
+ */
333
+ protected readonly studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
334
+ provider: alepha0.TOptional<alepha0.TString>;
335
+ mode: alepha0.TOptional<alepha0.TString>;
336
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
337
+ /**
338
+ * Parent command for database operations.
339
+ */
340
+ readonly db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
341
+ /**
342
+ * Run a drizzle-kit command for all database providers in an Alepha instance.
343
+ */
344
+ runDrizzleKitCommand(options: {
345
+ root: string;
346
+ args?: string;
347
+ command: string;
348
+ commandFlags?: string;
349
+ provider?: string;
350
+ logMessage: (providerName: string, dialect: string) => string;
351
+ env?: string;
352
+ }): Promise<void>;
353
+ /**
354
+ * Prepare Drizzle configuration files for a database provider.
355
+ */
356
+ prepareDrizzleConfig(options: {
357
+ kit: any;
358
+ provider: DatabaseProvider;
359
+ providerName: string;
360
+ providerUrl: string;
361
+ dialect: string;
362
+ entry: string;
363
+ rootDir: string;
364
+ }): Promise<string>;
365
+ }
366
+ //#endregion
367
+ //#region ../../src/cli/commands/deploy.d.ts
368
+ declare class DeployCommand {
369
+ protected readonly log: alepha_logger7.Logger;
370
+ protected readonly utils: AlephaCliUtils;
371
+ /**
372
+ * Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
373
+ *
374
+ * Deploy command can be overridden by creating a alepha.config.ts in the project root:
375
+ *
376
+ * ```ts
377
+ * import { defineConfig } from "alepha/cli";
378
+ *
379
+ * export default defineConfig({
380
+ * commands: {
381
+ * deploy: {
382
+ * handler: async ({ root, mode, flags }) => {
383
+ * // Custom deployment logic here
384
+ * },
385
+ * },
386
+ * },
387
+ * });
388
+ * ```
389
+ */
390
+ readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
391
+ build: alepha0.TBoolean;
392
+ migrate: alepha0.TBoolean;
393
+ }>, alepha0.TSchema, alepha0.TObject<{
394
+ VERCEL_TOKEN: alepha0.TOptional<alepha0.TString>;
395
+ VERCEL_ORG_ID: alepha0.TOptional<alepha0.TString>;
396
+ VERCEL_PROJECT_ID: alepha0.TOptional<alepha0.TString>;
397
+ CLOUDFLARE_API_TOKEN: alepha0.TOptional<alepha0.TString>;
398
+ CLOUDFLARE_ACCOUNT_ID: alepha0.TOptional<alepha0.TString>;
399
+ }>>;
400
+ }
401
+ //#endregion
402
+ //#region ../../src/cli/commands/dev.d.ts
403
+ declare class DevCommand {
404
+ protected readonly log: alepha_logger7.Logger;
405
+ protected readonly utils: AlephaCliUtils;
406
+ protected readonly alepha: Alepha;
407
+ /**
408
+ * Will run the project in watch mode.
409
+ *
410
+ * - If an index.html file is found in the project root, it will run Vite in dev mode.
411
+ * - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
412
+ */
413
+ readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
414
+ protected isFullstackProject(root: string): Promise<boolean>;
415
+ }
416
+ //#endregion
417
+ //#region ../../src/cli/commands/format.d.ts
418
+ declare class FormatCommand {
419
+ protected readonly utils: AlephaCliUtils;
420
+ readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
421
+ }
272
422
  //#endregion
273
423
  //#region ../../src/cli/services/GitMessageParser.d.ts
274
424
  /**
@@ -286,7 +436,7 @@ type ChangelogOptions = Static<typeof changelogOptions.schema>;
286
436
  * - `feat(cli): add command` → included
287
437
  */
288
438
  declare class GitMessageParser {
289
- protected readonly log: alepha_logger5.Logger;
439
+ protected readonly log: alepha_logger7.Logger;
290
440
  /**
291
441
  * Parse a git commit line into a structured Commit object.
292
442
  *
@@ -301,7 +451,7 @@ declare class GitMessageParser {
301
451
  parseCommit(line: string, config: ChangelogOptions): Commit | null;
302
452
  }
303
453
  //#endregion
304
- //#region ../../src/cli/commands/ChangelogCommands.d.ts
454
+ //#region ../../src/cli/commands/gen/changelog.d.ts
305
455
  /**
306
456
  * Git provider for executing git commands.
307
457
  * Can be substituted in tests with a mock implementation.
@@ -319,19 +469,18 @@ interface Commit {
319
469
  interface ChangelogEntry {
320
470
  features: Commit[];
321
471
  fixes: Commit[];
322
- breaking: Commit[];
323
472
  }
324
473
  /**
325
474
  * Changelog command for generating release notes from git commits.
326
475
  *
327
476
  * Usage:
328
- * - `alepha changelog` - Show unreleased changes since latest tag to HEAD
329
- * - `alepha changelog --from=1.0.0` - Show changes from version to HEAD
330
- * - `alepha changelog --from=1.0.0 --to=1.1.0` - Show changes between two refs
331
- * - `alepha changelog | tee -a CHANGELOG.md` - Append to file
477
+ * - `alepha gen changelog` - Show unreleased changes since latest tag to HEAD
478
+ * - `alepha gen changelog --from=1.0.0` - Show changes from version to HEAD
479
+ * - `alepha gen changelog --from=1.0.0 --to=1.1.0` - Show changes between two refs
480
+ * - `alepha gen changelog | tee -a CHANGELOG.md` - Append to file
332
481
  */
333
- declare class ChangelogCommands {
334
- protected readonly log: alepha_logger5.Logger;
482
+ declare class ChangelogCommand {
483
+ protected readonly log: alepha_logger7.Logger;
335
484
  protected readonly git: GitProvider;
336
485
  protected readonly parser: GitMessageParser;
337
486
  protected readonly config: Readonly<{
@@ -340,6 +489,7 @@ declare class ChangelogCommands {
340
489
  /**
341
490
  * Format a single commit line.
342
491
  * Example: `- **cli**: add new command (\`abc1234\`)`
492
+ * Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
343
493
  */
344
494
  protected formatCommit(commit: Commit): string;
345
495
  /**
@@ -358,7 +508,7 @@ declare class ChangelogCommands {
358
508
  * Get the latest version tag.
359
509
  */
360
510
  protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
361
- readonly changelog: alepha_command0.CommandPrimitive<alepha0.TObject<{
511
+ readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
362
512
  /**
363
513
  * Show changes from this ref (tag, commit, branch).
364
514
  * Defaults to the latest version tag.
@@ -374,21 +524,19 @@ declare class ChangelogCommands {
374
524
  }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
375
525
  }
376
526
  //#endregion
377
- //#region ../../src/cli/commands/CoreCommands.d.ts
378
- declare class CoreCommands {
379
- protected readonly log: alepha_logger5.Logger;
380
- protected readonly cli: CliProvider;
527
+ //#region ../../src/cli/commands/gen/openapi.d.ts
528
+ declare class OpenApiCommand {
529
+ protected readonly log: alepha_logger7.Logger;
381
530
  protected readonly utils: AlephaCliUtils;
382
- /**
383
- * Called when no command is provided
384
- */
385
- readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
386
- version: alepha0.TOptional<alepha0.TBoolean>;
531
+ protected readonly fs: FileSystemProvider;
532
+ readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
533
+ out: alepha0.TOptional<alepha0.TString>;
387
534
  }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
388
- /**
389
- * Clean the project, removing the "dist" directory
390
- */
391
- readonly clean: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
535
+ }
536
+ //#endregion
537
+ //#region ../../src/cli/commands/init.d.ts
538
+ declare class InitCommand {
539
+ protected readonly utils: AlephaCliUtils;
392
540
  /**
393
541
  * Ensure the project has the necessary Alepha configuration files.
394
542
  * Add the correct dependencies to package.json and install them.
@@ -404,145 +552,56 @@ declare class CoreCommands {
404
552
  }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
405
553
  }
406
554
  //#endregion
407
- //#region ../../src/cli/commands/DeployCommands.d.ts
408
- declare class DeployCommands {
409
- protected readonly log: alepha_logger5.Logger;
555
+ //#region ../../src/cli/commands/lint.d.ts
556
+ declare class LintCommand {
410
557
  protected readonly utils: AlephaCliUtils;
558
+ readonly lint: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
559
+ }
560
+ //#endregion
561
+ //#region ../../src/cli/commands/root.d.ts
562
+ declare class RootCommand {
563
+ protected readonly log: alepha_logger7.Logger;
564
+ protected readonly cli: CliProvider;
565
+ protected readonly alepha: Alepha;
566
+ protected readonly color: ConsoleColorProvider;
411
567
  /**
412
- * Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
413
- *
414
- * Deploy command can be overridden by creating a alepha.config.ts in the project root:
415
- *
416
- * ```ts
417
- * import { defineConfig } from "alepha/cli";
418
- *
419
- * export default defineConfig({
420
- * commands: {
421
- * deploy: {
422
- * handler: async ({ root, mode, flags }) => {
423
- * // Custom deployment logic here
424
- * },
425
- * },
426
- * },
427
- * });
428
- * ```
568
+ * Called when no command is provided
429
569
  */
430
- readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
431
- build: alepha0.TBoolean;
432
- migrate: alepha0.TBoolean;
570
+ readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
571
+ version: alepha0.TOptional<alepha0.TBoolean>;
572
+ }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
573
+ }
574
+ //#endregion
575
+ //#region ../../src/cli/commands/run.d.ts
576
+ declare class RunCommand {
577
+ protected readonly utils: AlephaCliUtils;
578
+ readonly run: alepha_command0.CommandPrimitive<alepha0.TObject<{
579
+ watch: alepha0.TOptional<alepha0.TBoolean>;
580
+ }>, alepha0.TString, alepha0.TObject<alepha0.TProperties>>;
581
+ }
582
+ //#endregion
583
+ //#region ../../src/cli/commands/test.d.ts
584
+ declare class TestCommand {
585
+ protected readonly utils: AlephaCliUtils;
586
+ readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
587
+ config: alepha0.TOptional<alepha0.TString>;
433
588
  }>, alepha0.TSchema, alepha0.TObject<{
434
- VERCEL_TOKEN: alepha0.TOptional<alepha0.TString>;
435
- VERCEL_ORG_ID: alepha0.TOptional<alepha0.TString>;
436
- VERCEL_PROJECT_ID: alepha0.TOptional<alepha0.TString>;
437
- CLOUDFLARE_API_TOKEN: alepha0.TOptional<alepha0.TString>;
438
- CLOUDFLARE_ACCOUNT_ID: alepha0.TOptional<alepha0.TString>;
589
+ VITEST_ARGS: alepha0.TOptional<alepha0.TString>;
439
590
  }>>;
440
591
  }
441
592
  //#endregion
442
- //#region ../../src/cli/commands/DrizzleCommands.d.ts
443
- declare class DrizzleCommands {
444
- log: alepha_logger5.Logger;
445
- utils: AlephaCliUtils;
446
- /**
447
- * Check if database migrations are up to date.
448
- */
449
- check: alepha_command0.CommandPrimitive<alepha0.TObject<{
450
- provider: alepha0.TOptional<alepha0.TString>;
451
- mode: alepha0.TOptional<alepha0.TString>;
452
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
453
- /**
454
- * Generate database migration files
455
- *
456
- * - Loads the Alepha instance from the specified entry file.
457
- * - Retrieves all repository primitives to gather database models.
458
- * - Creates temporary entity definitions based on the current database schema.
459
- * - Writes these definitions to a temporary schema file. (node_modules/.db/entities.ts)
460
- * - Invokes Drizzle Kit's CLI to generate migration files based on the current schema.
461
- */
462
- generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
463
- provider: alepha0.TOptional<alepha0.TString>;
464
- mode: alepha0.TOptional<alepha0.TString>;
465
- custom: alepha0.TOptional<alepha0.TString>;
466
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
467
- /**
468
- * Push database schema changes directly to the database
469
- *
470
- * - Loads the Alepha instance from the specified entry file.
471
- * - Retrieves all repository primitives to gather database models.
472
- * - Creates temporary entity definitions and Drizzle config.
473
- * - Invokes Drizzle Kit's push command to apply schema changes directly.
474
- */
475
- push: alepha_command0.CommandPrimitive<alepha0.TObject<{
476
- provider: alepha0.TOptional<alepha0.TString>;
477
- mode: alepha0.TOptional<alepha0.TString>;
478
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
479
- /**
480
- * Apply pending database migrations
481
- *
482
- * - Loads the Alepha instance from the specified entry file.
483
- * - Retrieves all repository primitives to gather database models.
484
- * - Creates temporary entity definitions and Drizzle config.
485
- * - Invokes Drizzle Kit's migrate command to apply pending migrations.
486
- */
487
- migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
488
- provider: alepha0.TOptional<alepha0.TString>;
489
- mode: alepha0.TOptional<alepha0.TString>;
490
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
491
- /**
492
- * Launch Drizzle Studio database browser
493
- *
494
- * - Loads the Alepha instance from the specified entry file.
495
- * - Retrieves all repository primitives to gather database models.
496
- * - Creates temporary entity definitions and Drizzle config.
497
- * - Invokes Drizzle Kit's studio command to launch the web-based database browser.
498
- */
499
- studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
500
- provider: alepha0.TOptional<alepha0.TString>;
501
- mode: alepha0.TOptional<alepha0.TString>;
502
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
503
- /**
504
- * Parent command for database operations.
505
- */
506
- db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
507
- /**
508
- * Run a drizzle-kit command for all database providers in an Alepha instance.
509
- *
510
- * Iterates through all repository providers, prepares Drizzle config for each,
511
- * and executes the specified drizzle-kit command.
512
- *
513
- * @param options - Configuration including command to run, flags, and logging
514
- */
515
- runDrizzleKitCommand(options: {
516
- root: string;
517
- args?: string;
518
- command: string;
519
- commandFlags?: string;
520
- provider?: string;
521
- logMessage: (providerName: string, dialect: string) => string;
522
- env?: string;
523
- }): Promise<void>;
593
+ //#region ../../src/cli/commands/typecheck.d.ts
594
+ declare class TypecheckCommand {
595
+ protected readonly utils: AlephaCliUtils;
596
+ protected readonly log: alepha_logger7.Logger;
524
597
  /**
525
- * Prepare Drizzle configuration files for a database provider.
526
- *
527
- * Creates temporary entities.js and drizzle.config.js files needed
528
- * for Drizzle Kit commands to run properly.
529
- *
530
- * @param options - Configuration options including kit, provider info, and paths
531
- * @returns Path to the generated drizzle.config.js file
598
+ * Run TypeScript type checking across the codebase with no emit.
532
599
  */
533
- prepareDrizzleConfig(options: {
534
- kit: any;
535
- provider: DatabaseProvider;
536
- providerName: string;
537
- providerUrl: string;
538
- dialect: string;
539
- entry: string;
540
- rootDir: string;
541
- }): Promise<string>;
600
+ readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
542
601
  }
543
602
  //#endregion
544
- //#region ../../src/cli/commands/VerifyCommands.d.ts
545
- declare class VerifyCommands {
603
+ //#region ../../src/cli/commands/verify.d.ts
604
+ declare class VerifyCommand {
546
605
  protected readonly utils: AlephaCliUtils;
547
606
  /**
548
607
  * Run a series of verification commands to ensure code quality and correctness.
@@ -558,53 +617,25 @@ declare class VerifyCommands {
558
617
  * - Clean the project again
559
618
  */
560
619
  readonly verify: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
561
- /**
562
- * Run TypeScript type checking across the codebase with no emit.
563
- */
564
- readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
565
- }
566
- //#endregion
567
- //#region ../../src/cli/commands/ViteCommands.d.ts
568
- declare class ViteCommands {
569
- protected readonly log: alepha_logger5.Logger;
570
- protected readonly utils: AlephaCliUtils;
571
- protected readonly env: {
572
- VITEST_ARGS: string;
573
- };
574
- readonly run: alepha_command0.CommandPrimitive<alepha0.TObject<{
575
- watch: alepha0.TOptional<alepha0.TBoolean>;
576
- }>, alepha0.TString, alepha0.TObject<alepha0.TProperties>>;
577
- /**
578
- * Will run the project in watch mode.
579
- *
580
- * - If an index.html file is found in the project root, it will run Vite in dev mode.
581
- * - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
582
- */
583
- readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
584
- readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
585
- stats: alepha0.TOptional<alepha0.TBoolean>;
586
- vercel: alepha0.TOptional<alepha0.TBoolean>;
587
- cloudflare: alepha0.TOptional<alepha0.TBoolean>;
588
- docker: alepha0.TOptional<alepha0.TBoolean>;
589
- sitemap: alepha0.TOptional<alepha0.TString>;
590
- }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
591
- readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
592
- config: alepha0.TOptional<alepha0.TString>;
593
- }>, alepha0.TSchema, alepha0.TObject<{
594
- VITEST_ARGS: alepha0.TOptional<alepha0.TString>;
595
- }>>;
596
620
  }
597
621
  //#endregion
598
622
  //#region ../../src/cli/defineConfig.d.ts
599
623
  type AlephaCliConfig = (alepha: Alepha) => {
600
624
  commands?: Record<string, CommandPrimitive>;
625
+ services?: Array<any>;
601
626
  };
602
627
  declare const defineConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
603
628
  [x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
604
629
  };
630
+ /**
631
+ * @alias defineConfig
632
+ */
633
+ declare const defineAlephaConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
634
+ [x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
635
+ };
605
636
  //#endregion
606
637
  //#region ../../src/cli/version.d.ts
607
638
  declare const version: any;
608
639
  //#endregion
609
- export { AlephaCli, AlephaCliConfig, AlephaCliUtils, AlephaPackageBuilderCli, BiomeCommands, ChangelogCommands, type ChangelogOptions, Commit, CoreCommands, DEFAULT_IGNORE, DependencyModes, DeployCommands, DrizzleCommands, GitMessageParser, GitProvider, VerifyCommands, ViteCommands, analyzeModules, changelogOptions, defineConfig, version };
640
+ export { AlephaCli, AlephaCliConfig, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DependencyModes, DeployCommand, DevCommand, FormatCommand, GitMessageParser, GitProvider, InitCommand, LintCommand, OpenApiCommand, RootCommand, RunCommand, TestCommand, TypecheckCommand, VerifyCommand, analyzeModules, changelogOptions, defineAlephaConfig, defineConfig, version };
610
641
  //# sourceMappingURL=index.d.ts.map