alepha 0.14.3 → 0.15.0

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 (317) hide show
  1. package/README.md +2 -5
  2. package/dist/api/audits/index.d.ts +620 -811
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/files/index.d.ts +185 -377
  5. package/dist/api/files/index.d.ts.map +1 -1
  6. package/dist/api/files/index.js +0 -1
  7. package/dist/api/files/index.js.map +1 -1
  8. package/dist/api/jobs/index.d.ts +245 -435
  9. package/dist/api/jobs/index.d.ts.map +1 -1
  10. package/dist/api/notifications/index.d.ts +238 -429
  11. package/dist/api/notifications/index.d.ts.map +1 -1
  12. package/dist/api/parameters/index.d.ts +236 -427
  13. package/dist/api/parameters/index.d.ts.map +1 -1
  14. package/dist/api/users/index.browser.js +1 -2
  15. package/dist/api/users/index.browser.js.map +1 -1
  16. package/dist/api/users/index.d.ts +1010 -1196
  17. package/dist/api/users/index.d.ts.map +1 -1
  18. package/dist/api/users/index.js +178 -151
  19. package/dist/api/users/index.js.map +1 -1
  20. package/dist/api/verifications/index.d.ts +17 -17
  21. package/dist/api/verifications/index.d.ts.map +1 -1
  22. package/dist/batch/index.d.ts +122 -122
  23. package/dist/batch/index.d.ts.map +1 -1
  24. package/dist/batch/index.js +1 -2
  25. package/dist/batch/index.js.map +1 -1
  26. package/dist/bucket/index.d.ts +163 -163
  27. package/dist/bucket/index.d.ts.map +1 -1
  28. package/dist/cache/core/index.d.ts +46 -46
  29. package/dist/cache/core/index.d.ts.map +1 -1
  30. package/dist/cache/redis/index.d.ts.map +1 -1
  31. package/dist/cli/index.d.ts +384 -285
  32. package/dist/cli/index.d.ts.map +1 -1
  33. package/dist/cli/index.js +1113 -623
  34. package/dist/cli/index.js.map +1 -1
  35. package/dist/command/index.d.ts +299 -300
  36. package/dist/command/index.d.ts.map +1 -1
  37. package/dist/command/index.js +13 -9
  38. package/dist/command/index.js.map +1 -1
  39. package/dist/core/index.browser.js +445 -103
  40. package/dist/core/index.browser.js.map +1 -1
  41. package/dist/core/index.d.ts +733 -625
  42. package/dist/core/index.d.ts.map +1 -1
  43. package/dist/core/index.js +446 -103
  44. package/dist/core/index.js.map +1 -1
  45. package/dist/core/index.native.js +445 -103
  46. package/dist/core/index.native.js.map +1 -1
  47. package/dist/datetime/index.d.ts +44 -44
  48. package/dist/datetime/index.d.ts.map +1 -1
  49. package/dist/datetime/index.js +4 -4
  50. package/dist/datetime/index.js.map +1 -1
  51. package/dist/email/index.d.ts +97 -50
  52. package/dist/email/index.d.ts.map +1 -1
  53. package/dist/email/index.js +129 -33
  54. package/dist/email/index.js.map +1 -1
  55. package/dist/fake/index.d.ts +7981 -14
  56. package/dist/fake/index.d.ts.map +1 -1
  57. package/dist/file/index.d.ts +523 -390
  58. package/dist/file/index.d.ts.map +1 -1
  59. package/dist/file/index.js +253 -1
  60. package/dist/file/index.js.map +1 -1
  61. package/dist/lock/core/index.d.ts +208 -208
  62. package/dist/lock/core/index.d.ts.map +1 -1
  63. package/dist/lock/redis/index.d.ts.map +1 -1
  64. package/dist/logger/index.d.ts +25 -26
  65. package/dist/logger/index.d.ts.map +1 -1
  66. package/dist/logger/index.js +12 -2
  67. package/dist/logger/index.js.map +1 -1
  68. package/dist/mcp/index.d.ts +197 -197
  69. package/dist/mcp/index.d.ts.map +1 -1
  70. package/dist/mcp/index.js +1 -1
  71. package/dist/mcp/index.js.map +1 -1
  72. package/dist/orm/chunk-DtkW-qnP.js +38 -0
  73. package/dist/orm/index.browser.js.map +1 -1
  74. package/dist/orm/index.bun.js +2814 -0
  75. package/dist/orm/index.bun.js.map +1 -0
  76. package/dist/orm/index.d.ts +1228 -1216
  77. package/dist/orm/index.d.ts.map +1 -1
  78. package/dist/orm/index.js +2041 -1967
  79. package/dist/orm/index.js.map +1 -1
  80. package/dist/queue/core/index.d.ts +248 -248
  81. package/dist/queue/core/index.d.ts.map +1 -1
  82. package/dist/queue/redis/index.d.ts.map +1 -1
  83. package/dist/redis/index.bun.js +285 -0
  84. package/dist/redis/index.bun.js.map +1 -0
  85. package/dist/redis/index.d.ts +118 -136
  86. package/dist/redis/index.d.ts.map +1 -1
  87. package/dist/redis/index.js +18 -38
  88. package/dist/redis/index.js.map +1 -1
  89. package/dist/retry/index.d.ts +69 -69
  90. package/dist/retry/index.d.ts.map +1 -1
  91. package/dist/router/index.d.ts +6 -6
  92. package/dist/router/index.d.ts.map +1 -1
  93. package/dist/scheduler/index.d.ts +25 -25
  94. package/dist/scheduler/index.d.ts.map +1 -1
  95. package/dist/security/index.browser.js +5 -1
  96. package/dist/security/index.browser.js.map +1 -1
  97. package/dist/security/index.d.ts +417 -254
  98. package/dist/security/index.d.ts.map +1 -1
  99. package/dist/security/index.js +386 -86
  100. package/dist/security/index.js.map +1 -1
  101. package/dist/server/auth/index.d.ts +110 -110
  102. package/dist/server/auth/index.d.ts.map +1 -1
  103. package/dist/server/auth/index.js +20 -20
  104. package/dist/server/auth/index.js.map +1 -1
  105. package/dist/server/cache/index.d.ts +62 -47
  106. package/dist/server/cache/index.d.ts.map +1 -1
  107. package/dist/server/cache/index.js +56 -3
  108. package/dist/server/cache/index.js.map +1 -1
  109. package/dist/server/compress/index.d.ts +6 -0
  110. package/dist/server/compress/index.d.ts.map +1 -1
  111. package/dist/server/compress/index.js +36 -1
  112. package/dist/server/compress/index.js.map +1 -1
  113. package/dist/server/cookies/index.d.ts +6 -6
  114. package/dist/server/cookies/index.d.ts.map +1 -1
  115. package/dist/server/cookies/index.js +3 -3
  116. package/dist/server/cookies/index.js.map +1 -1
  117. package/dist/server/core/index.browser.js +2 -2
  118. package/dist/server/core/index.browser.js.map +1 -1
  119. package/dist/server/core/index.d.ts +242 -150
  120. package/dist/server/core/index.d.ts.map +1 -1
  121. package/dist/server/core/index.js +294 -125
  122. package/dist/server/core/index.js.map +1 -1
  123. package/dist/server/cors/index.d.ts +11 -12
  124. package/dist/server/cors/index.d.ts.map +1 -1
  125. package/dist/server/health/index.d.ts +0 -1
  126. package/dist/server/health/index.d.ts.map +1 -1
  127. package/dist/server/helmet/index.d.ts +2 -2
  128. package/dist/server/helmet/index.d.ts.map +1 -1
  129. package/dist/server/links/index.browser.js.map +1 -1
  130. package/dist/server/links/index.d.ts +123 -124
  131. package/dist/server/links/index.d.ts.map +1 -1
  132. package/dist/server/links/index.js +1 -2
  133. package/dist/server/links/index.js.map +1 -1
  134. package/dist/server/metrics/index.d.ts.map +1 -1
  135. package/dist/server/multipart/index.d.ts +6 -6
  136. package/dist/server/multipart/index.d.ts.map +1 -1
  137. package/dist/server/proxy/index.d.ts +102 -103
  138. package/dist/server/proxy/index.d.ts.map +1 -1
  139. package/dist/server/rate-limit/index.d.ts +16 -16
  140. package/dist/server/rate-limit/index.d.ts.map +1 -1
  141. package/dist/server/static/index.d.ts +44 -44
  142. package/dist/server/static/index.d.ts.map +1 -1
  143. package/dist/server/static/index.js +4 -0
  144. package/dist/server/static/index.js.map +1 -1
  145. package/dist/server/swagger/index.d.ts +48 -49
  146. package/dist/server/swagger/index.d.ts.map +1 -1
  147. package/dist/server/swagger/index.js +3 -5
  148. package/dist/server/swagger/index.js.map +1 -1
  149. package/dist/sms/index.d.ts +13 -11
  150. package/dist/sms/index.d.ts.map +1 -1
  151. package/dist/sms/index.js +7 -7
  152. package/dist/sms/index.js.map +1 -1
  153. package/dist/thread/index.d.ts +71 -72
  154. package/dist/thread/index.d.ts.map +1 -1
  155. package/dist/topic/core/index.d.ts +318 -318
  156. package/dist/topic/core/index.d.ts.map +1 -1
  157. package/dist/topic/redis/index.d.ts +6 -6
  158. package/dist/topic/redis/index.d.ts.map +1 -1
  159. package/dist/vite/index.d.ts +5805 -249
  160. package/dist/vite/index.d.ts.map +1 -1
  161. package/dist/vite/index.js +599 -513
  162. package/dist/vite/index.js.map +1 -1
  163. package/dist/websocket/index.browser.js +6 -6
  164. package/dist/websocket/index.browser.js.map +1 -1
  165. package/dist/websocket/index.d.ts +247 -247
  166. package/dist/websocket/index.d.ts.map +1 -1
  167. package/dist/websocket/index.js +6 -6
  168. package/dist/websocket/index.js.map +1 -1
  169. package/package.json +9 -14
  170. package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
  171. package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
  172. package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
  173. package/src/api/users/entities/users.ts +1 -1
  174. package/src/api/users/index.ts +8 -8
  175. package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
  176. package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
  177. package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
  178. package/src/api/users/services/CredentialService.ts +7 -7
  179. package/src/api/users/services/IdentityService.ts +4 -4
  180. package/src/api/users/services/RegistrationService.spec.ts +25 -27
  181. package/src/api/users/services/RegistrationService.ts +38 -27
  182. package/src/api/users/services/SessionCrudService.ts +3 -3
  183. package/src/api/users/services/SessionService.spec.ts +3 -3
  184. package/src/api/users/services/SessionService.ts +28 -9
  185. package/src/api/users/services/UserService.ts +7 -7
  186. package/src/batch/providers/BatchProvider.ts +1 -2
  187. package/src/cli/apps/AlephaCli.ts +0 -2
  188. package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
  189. package/src/cli/assets/apiHelloControllerTs.ts +18 -0
  190. package/src/cli/assets/apiIndexTs.ts +16 -0
  191. package/src/cli/assets/claudeMd.ts +303 -0
  192. package/src/cli/assets/mainBrowserTs.ts +2 -2
  193. package/src/cli/assets/mainServerTs.ts +24 -0
  194. package/src/cli/assets/webAppRouterTs.ts +15 -0
  195. package/src/cli/assets/webHelloComponentTsx.ts +16 -0
  196. package/src/cli/assets/webIndexTs.ts +16 -0
  197. package/src/cli/atoms/buildOptions.ts +88 -0
  198. package/src/cli/commands/build.ts +70 -87
  199. package/src/cli/commands/db.ts +21 -22
  200. package/src/cli/commands/deploy.ts +17 -5
  201. package/src/cli/commands/dev.ts +22 -14
  202. package/src/cli/commands/format.ts +8 -2
  203. package/src/cli/commands/gen/env.ts +53 -0
  204. package/src/cli/commands/gen/openapi.ts +1 -1
  205. package/src/cli/commands/gen/resource.ts +15 -0
  206. package/src/cli/commands/gen.ts +7 -1
  207. package/src/cli/commands/init.ts +74 -30
  208. package/src/cli/commands/lint.ts +8 -2
  209. package/src/cli/commands/test.ts +8 -3
  210. package/src/cli/commands/typecheck.ts +5 -1
  211. package/src/cli/commands/verify.ts +5 -3
  212. package/src/cli/defineConfig.ts +49 -7
  213. package/src/cli/index.ts +0 -1
  214. package/src/cli/services/AlephaCliUtils.ts +39 -589
  215. package/src/cli/services/PackageManagerUtils.ts +301 -0
  216. package/src/cli/services/ProjectScaffolder.ts +306 -0
  217. package/src/command/helpers/Runner.spec.ts +2 -2
  218. package/src/command/helpers/Runner.ts +16 -4
  219. package/src/command/primitives/$command.ts +0 -6
  220. package/src/command/providers/CliProvider.ts +1 -3
  221. package/src/core/Alepha.ts +42 -0
  222. package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
  223. package/src/core/index.shared.ts +1 -0
  224. package/src/core/index.ts +2 -0
  225. package/src/core/primitives/$hook.ts +6 -2
  226. package/src/core/primitives/$module.spec.ts +4 -0
  227. package/src/core/providers/AlsProvider.ts +1 -1
  228. package/src/core/providers/CodecManager.spec.ts +12 -6
  229. package/src/core/providers/CodecManager.ts +26 -6
  230. package/src/core/providers/EventManager.ts +169 -13
  231. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
  232. package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
  233. package/src/core/providers/StateManager.spec.ts +27 -16
  234. package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
  235. package/src/email/providers/LocalEmailProvider.ts +52 -15
  236. package/src/email/providers/NodemailerEmailProvider.ts +167 -56
  237. package/src/file/errors/FileError.ts +7 -0
  238. package/src/file/index.ts +9 -1
  239. package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
  240. package/src/logger/index.ts +15 -3
  241. package/src/mcp/transports/StdioMcpTransport.ts +1 -1
  242. package/src/orm/index.browser.ts +1 -19
  243. package/src/orm/index.bun.ts +77 -0
  244. package/src/orm/index.shared-server.ts +22 -0
  245. package/src/orm/index.shared.ts +15 -0
  246. package/src/orm/index.ts +13 -39
  247. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
  248. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  249. package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
  250. package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
  251. package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
  252. package/src/orm/services/Repository.ts +8 -0
  253. package/src/queue/core/providers/WorkerProvider.spec.ts +48 -32
  254. package/src/redis/index.bun.ts +35 -0
  255. package/src/redis/providers/BunRedisProvider.ts +12 -43
  256. package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
  257. package/src/redis/providers/NodeRedisProvider.ts +16 -34
  258. package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
  259. package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
  260. package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
  261. package/src/security/index.browser.ts +5 -0
  262. package/src/security/index.ts +90 -7
  263. package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
  264. package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
  265. package/src/security/primitives/$role.ts +5 -5
  266. package/src/security/primitives/$serviceAccount.spec.ts +5 -5
  267. package/src/security/primitives/$serviceAccount.ts +3 -3
  268. package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
  269. package/src/server/auth/primitives/$auth.ts +10 -10
  270. package/src/server/auth/primitives/$authCredentials.ts +3 -3
  271. package/src/server/auth/primitives/$authGithub.ts +3 -3
  272. package/src/server/auth/primitives/$authGoogle.ts +3 -3
  273. package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
  274. package/src/server/cache/providers/ServerCacheProvider.spec.ts +183 -0
  275. package/src/server/cache/providers/ServerCacheProvider.ts +95 -10
  276. package/src/server/compress/providers/ServerCompressProvider.ts +61 -2
  277. package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
  278. package/src/server/core/helpers/ServerReply.ts +2 -2
  279. package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
  280. package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
  281. package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
  282. package/src/server/core/providers/ServerProvider.ts +155 -22
  283. package/src/server/core/providers/ServerRouterProvider.ts +259 -115
  284. package/src/server/core/providers/ServerTimingProvider.ts +2 -2
  285. package/src/server/links/index.ts +1 -1
  286. package/src/server/links/providers/LinkProvider.ts +1 -1
  287. package/src/server/static/providers/ServerStaticProvider.ts +10 -0
  288. package/src/server/swagger/index.ts +1 -1
  289. package/src/server/swagger/providers/ServerSwaggerProvider.ts +5 -8
  290. package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
  291. package/src/sms/providers/LocalSmsProvider.ts +8 -7
  292. package/src/vite/helpers/boot.ts +28 -17
  293. package/src/vite/helpers/importViteReact.ts +13 -0
  294. package/src/vite/index.ts +1 -21
  295. package/src/vite/plugins/viteAlephaDev.ts +16 -1
  296. package/src/vite/plugins/viteAlephaSsrPreload.ts +222 -0
  297. package/src/vite/tasks/buildClient.ts +11 -0
  298. package/src/vite/tasks/buildServer.ts +59 -4
  299. package/src/vite/tasks/devServer.ts +71 -0
  300. package/src/vite/tasks/generateCloudflare.ts +7 -0
  301. package/src/vite/tasks/index.ts +2 -1
  302. package/dist/server/security/index.browser.js +0 -13
  303. package/dist/server/security/index.browser.js.map +0 -1
  304. package/dist/server/security/index.d.ts +0 -173
  305. package/dist/server/security/index.d.ts.map +0 -1
  306. package/dist/server/security/index.js +0 -311
  307. package/dist/server/security/index.js.map +0 -1
  308. package/src/cli/assets/appRouterTs.ts +0 -9
  309. package/src/cli/assets/mainTs.ts +0 -13
  310. package/src/cli/assets/viteConfigTs.ts +0 -14
  311. package/src/cli/commands/run.ts +0 -24
  312. package/src/server/security/index.browser.ts +0 -10
  313. package/src/server/security/index.ts +0 -94
  314. package/src/vite/plugins/viteAlepha.ts +0 -37
  315. package/src/vite/plugins/viteAlephaBuild.ts +0 -281
  316. /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
  317. /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
@@ -17,6 +17,7 @@ interface Module {
17
17
  dependencies: string[];
18
18
  native?: boolean;
19
19
  browser?: boolean;
20
+ bun?: boolean;
20
21
  node?: boolean;
21
22
  }
22
23
  declare class AlephaPackageBuilderCli {
@@ -47,300 +48,305 @@ declare const DEFAULT_IGNORE: string[];
47
48
  */
48
49
  declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
49
50
  /**
50
- * Scopes to ignore (e.g., "project", "release", "chore").
51
- * Commits like `feat(chore): ...` will be excluded from changelog.
52
- */
51
+ * Scopes to ignore (e.g., "project", "release", "chore").
52
+ * Commits like `feat(chore): ...` will be excluded from changelog.
53
+ */
53
54
  ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
54
55
  }>, "alepha.changelog">;
55
56
  type ChangelogOptions = Static<typeof changelogOptions.schema>;
56
57
  //#endregion
57
58
  //#region ../../src/cli/services/AlephaCliUtils.d.ts
58
59
  /**
59
- * Utility service for common project operations used by CLI commands.
60
+ * Core utility service for CLI commands.
60
61
  *
61
- * This service provides helper methods for:
62
- * - Project configuration file management (tsconfig.json, package.json, etc.)
63
- * - Package manager setup (Yarn, npm, pnpm)
64
- * - Sample project downloading
65
- * - Drizzle ORM/Kit utilities
66
- * - Alepha instance loading
62
+ * Provides:
63
+ * - Command execution
64
+ * - File editing helpers
65
+ * - Drizzle/ORM utilities
66
+ * - Environment loading
67
67
  */
68
68
  declare class AlephaCliUtils {
69
69
  protected readonly log: alepha_logger7.Logger;
70
70
  protected readonly fs: FileSystemProvider;
71
71
  protected readonly envUtils: EnvUtils;
72
- protected readonly alepha: Alepha;
73
72
  /**
74
- * Execute a command using npx with inherited stdio.
75
- *
76
- * @example
77
- * ```ts
78
- * const runner = alepha.inject(ProcessRunner);
79
- * await runner.exec("tsx watch src/index.ts");
80
- * ```
81
- */
73
+ * Execute a command with inherited stdio.
74
+ */
82
75
  exec(command: string, options?: {
76
+ root?: string;
83
77
  env?: Record<string, string>;
84
78
  global?: boolean;
85
79
  }): Promise<void>;
86
80
  /**
87
- * Write a configuration file to node_modules/.alepha directory.
88
- *
89
- * Creates the .alepha directory if it doesn't exist and writes the file with the given content.
90
- *
91
- * @param name - The name of the config file to create
92
- * @param content - The content to write to the file
93
- * @param root - The root directory (defaults to process.cwd())
94
- * @returns The absolute path to the created file
95
- *
96
- * @example
97
- * ```ts
98
- * const runner = alepha.inject(ProcessRunner);
99
- * const configPath = await runner.writeConfigFile("biome.json", biomeConfig);
100
- * ```
101
- */
81
+ * Write a configuration file to node_modules/.alepha directory.
82
+ */
102
83
  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>;
109
- /**
110
- * Ensure Yarn is configured in the project directory.
111
- *
112
- * Creates a .yarnrc.yml file with node-modules linker if it doesn't exist.
113
- *
114
- * @param root - The root directory of the project
115
- */
116
- ensureYarn(root: string): Promise<void>;
117
- ensureBun(root: string): Promise<void>;
118
- ensurePnpm(root: string): Promise<void>;
119
- ensureNpm(root: string): Promise<void>;
120
- /**
121
- * Generate package.json content with Alepha dependencies.
122
- *
123
- * @param modes - Configuration for which dependencies to include
124
- * @returns Package.json partial with dependencies, devDependencies, and scripts
125
- */
126
- generatePackageJsonContent(modes: DependencyModes): {
127
- dependencies: Record<string, string>;
128
- devDependencies: Record<string, string>;
129
- scripts: Record<string, string>;
130
- type: "module";
131
- };
132
- /**
133
- * Ensure package.json exists and has correct configuration.
134
- *
135
- * Creates a new package.json if none exists, or updates an existing one to:
136
- * - Set "type": "module"
137
- * - Add Alepha dependencies
138
- * - Add standard scripts
139
- *
140
- * @param root - The root directory of the project
141
- * @param modes - Configuration for which dependencies to include
142
- */
143
- ensurePackageJson(root: string, modes: DependencyModes): Promise<object>;
144
- ensureConfig(root: string, opts: {
145
- packageJson?: boolean | DependencyModes;
146
- tsconfigJson?: boolean;
147
- viteConfigTs?: boolean;
148
- indexHtml?: boolean;
149
- biomeJson?: boolean;
150
- editorconfig?: boolean;
151
- }): Promise<Array<void | object>>;
152
- /**
153
- * Ensure tsconfig.json exists in the project.
154
- *
155
- * Creates a standard Alepha tsconfig.json if none exists.
156
- *
157
- * @param root - The root directory of the project
158
- */
159
- ensureTsConfig(root: string): Promise<void>;
160
- /**
161
- * Ensure vite.config.ts exists in the project.
162
- *
163
- * Creates a standard Alepha vite.config.ts if none exists.
164
- */
165
- ensureViteConfig(root: string, serverEntry?: string): Promise<void>;
166
- protected checkFileExists(root: string, name: string, checkParentDirectories?: boolean): Promise<string | undefined>;
167
- protected ensureFileExists(root: string, name: string, content: string, checkParentDirectories?: boolean): Promise<void>;
168
- /**
169
- * Get the path to Biome configuration file.
170
- *
171
- * Looks for an existing biome.json in the project root, or creates one if it doesn't exist.
172
- */
173
- ensureBiomeConfig(root: string): Promise<void>;
174
- /**
175
- * Ensure .editorconfig exists in the project.
176
- *
177
- * Creates a standard .editorconfig if none exists.
178
- *
179
- * @param root - The root directory of the project
180
- */
181
- ensureEditorConfig(root: string): Promise<void>;
182
84
  /**
183
- * Load Alepha instance from a server entry file.
184
- *
185
- * Dynamically imports the server entry file and extracts the Alepha instance.
186
- * Skips the automatic start process.
187
- *
188
- * @param rootDir - The root directory of the project
189
- * @param explicitEntry - Optional explicit path to the entry file
190
- * @returns Object containing the Alepha instance and the entry file path
191
- * @throws {AlephaError} If the Alepha instance cannot be found
192
- */
85
+ * Load Alepha instance from a server entry file.
86
+ */
193
87
  loadAlephaFromServerEntryFile(rootDir?: string, explicitEntry?: string): Promise<{
194
88
  alepha: Alepha;
195
89
  entry: string;
196
90
  }>;
197
91
  /**
198
- * Generate JavaScript code for Drizzle entities export.
199
- *
200
- * Creates a temporary entities.js file that imports from the entry file
201
- * and exports database models for Drizzle Kit to process.
202
- *
203
- * @param entry - Path to the server entry file
204
- * @param provider - Name of the database provider
205
- * @param models - Array of model names to export
206
- * @returns JavaScript code as a string
207
- */
92
+ * Generate JavaScript code for Drizzle entities export.
93
+ */
208
94
  generateEntitiesJs(entry: string, provider: string, models?: string[]): string;
209
95
  /**
210
- * Load environment variables from a .env file.
211
- *
212
- * Reads the .env file in the specified root directory and sets
213
- * the environment variables in process.env.
214
- */
96
+ * Load environment variables from a .env file.
97
+ */
215
98
  loadEnv(root: string, files?: string[]): Promise<void>;
99
+ exists(root: string, path: string): Promise<boolean>;
100
+ protected checkFileExists(root: string, name: string): Promise<string | undefined>;
101
+ }
102
+ //#endregion
103
+ //#region ../../src/cli/services/PackageManagerUtils.d.ts
104
+ /**
105
+ * Utility service for package manager operations.
106
+ *
107
+ * Handles detection, installation, and cleanup for:
108
+ * - Yarn
109
+ * - npm
110
+ * - pnpm
111
+ * - Bun
112
+ */
113
+ declare class PackageManagerUtils {
114
+ protected readonly log: alepha_logger7.Logger;
115
+ protected readonly fs: FileSystemProvider;
116
+ protected readonly alepha: Alepha;
117
+ /**
118
+ * Detect the package manager used in the project.
119
+ */
216
120
  getPackageManager(root: string, flags?: {
217
121
  yarn?: boolean;
218
122
  pnpm?: boolean;
219
123
  npm?: boolean;
220
124
  bun?: boolean;
221
125
  }): Promise<"yarn" | "pnpm" | "npm" | "bun">;
222
- ensureIndexHtml(root: string): Promise<void>;
223
- exists(root: string, dirName: string): Promise<boolean>;
224
- /**
225
- * Ensure src/main.ts exists with a minimal Alepha bootstrap.
226
- *
227
- * Creates the src directory and main.ts file if the src directory
228
- * doesn't exist or is empty.
229
- *
230
- * @param root - The root directory of the project
231
- */
232
- ensureSrcMain(root: string): Promise<void>;
233
- /**
234
- * Ensure test directory exists with a dummy test file.
235
- *
236
- * Creates the test directory and a dummy.spec.ts file if the test directory
237
- * doesn't exist or is empty.
238
- *
239
- * @param root - The root directory of the project
240
- */
241
- ensureTestDir(root: string): Promise<void>;
242
- readPackageJson(root: string): Promise<Record<string, any>>;
243
126
  /**
244
- * Check if a dependency is installed in the project.
245
- *
246
- * @param root - The root directory of the project
247
- * @param packageName - The name of the package to check
248
- * @returns True if the package is in dependencies or devDependencies
249
- */
127
+ * Get the install command for a package.
128
+ */
129
+ getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
130
+ /**
131
+ * Check if a dependency is installed in the project.
132
+ */
250
133
  hasDependency(root: string, packageName: string): Promise<boolean>;
251
134
  /**
252
- * Check if Expo is present in the project.
253
- *
254
- * @param root - The root directory of the project
255
- * @returns True if expo is in dependencies or devDependencies
256
- */
135
+ * Check if Expo is present in the project.
136
+ */
257
137
  hasExpo(root: string): Promise<boolean>;
258
- getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
259
138
  /**
260
- * Install a dependency if it's missing from the project.
261
- *
262
- * Automatically detects the package manager (yarn, pnpm, npm) and installs
263
- * the package as a dev dependency if not already present.
264
- */
139
+ * Install a dependency if it's missing from the project.
140
+ */
265
141
  ensureDependency(root: string, packageName: string, options?: {
266
142
  dev?: boolean;
267
143
  run?: RunnerMethod;
144
+ exec?: (cmd: string, opts?: {
145
+ global?: boolean;
146
+ root?: string;
147
+ }) => Promise<void>;
268
148
  }): Promise<void>;
149
+ ensureYarn(root: string): Promise<void>;
150
+ ensureBun(root: string): Promise<void>;
151
+ ensurePnpm(root: string): Promise<void>;
152
+ ensureNpm(root: string): Promise<void>;
153
+ removeAllPmFilesExcept(root: string, except: string): Promise<void>;
154
+ removeYarn(root: string): Promise<void>;
155
+ removePnpm(root: string): Promise<void>;
156
+ removeNpm(root: string): Promise<void>;
157
+ removeBun(root: string): Promise<void>;
158
+ readPackageJson(root: string): Promise<Record<string, any>>;
159
+ writePackageJson(root: string, content: Record<string, any>): Promise<void>;
160
+ editPackageJson(root: string, editFn: (pkg: Record<string, any>) => Record<string, any>): Promise<void>;
161
+ ensurePackageJson(root: string, modes: DependencyModes): Promise<Record<string, any>>;
162
+ generatePackageJsonContent(modes: DependencyModes): {
163
+ dependencies: Record<string, string>;
164
+ devDependencies: Record<string, string>;
165
+ scripts: Record<string, string>;
166
+ type: "module";
167
+ };
168
+ protected removeFiles(root: string, files: string[]): Promise<void>;
269
169
  }
270
170
  interface DependencyModes {
171
+ web?: boolean;
172
+ admin?: boolean;
173
+ expo?: boolean;
174
+ }
175
+ //#endregion
176
+ //#region ../../src/cli/assets/claudeMd.d.ts
177
+ interface ClaudeMdOptions {
271
178
  react?: boolean;
272
179
  ui?: boolean;
273
- expo?: boolean;
180
+ projectName?: string;
181
+ }
182
+ //#endregion
183
+ //#region ../../src/cli/services/ProjectScaffolder.d.ts
184
+ /**
185
+ * Service for scaffolding new Alepha projects.
186
+ *
187
+ * Handles creation of:
188
+ * - Project structure (src/api, src/web)
189
+ * - Configuration files (tsconfig, biome, editorconfig)
190
+ * - Entry points (main.server.ts, main.browser.ts)
191
+ * - Example code (HelloController, Hello component)
192
+ */
193
+ declare class ProjectScaffolder {
194
+ protected readonly log: alepha_logger7.Logger;
195
+ protected readonly fs: FileSystemProvider;
196
+ protected readonly pm: PackageManagerUtils;
197
+ /**
198
+ * Get the app name from the directory name.
199
+ *
200
+ * Converts the directory name to a valid module name:
201
+ * - Converts to lowercase
202
+ * - Replaces spaces, dashes, underscores with nothing
203
+ * - Falls back to "app" if empty
204
+ */
205
+ getAppName(root: string): string;
206
+ /**
207
+ * Ensure all configuration files exist.
208
+ */
209
+ ensureConfig(root: string, opts: {
210
+ packageJson?: boolean | DependencyModes;
211
+ tsconfigJson?: boolean;
212
+ indexHtml?: boolean;
213
+ biomeJson?: boolean;
214
+ editorconfig?: boolean;
215
+ claudeMd?: boolean | ClaudeMdOptions;
216
+ }): Promise<void>;
217
+ ensureTsConfig(root: string): Promise<void>;
218
+ ensureBiomeConfig(root: string): Promise<void>;
219
+ ensureEditorConfig(root: string): Promise<void>;
220
+ ensureClaudeMd(root: string, options?: ClaudeMdOptions): Promise<void>;
221
+ /**
222
+ * Ensure src/main.server.ts exists with full API structure.
223
+ *
224
+ * Creates:
225
+ * - src/main.server.ts (entry point)
226
+ * - src/api/index.ts (API module)
227
+ * - src/api/controllers/HelloController.ts (example controller)
228
+ */
229
+ ensureApiProject(root: string): Promise<void>;
230
+ /**
231
+ * Ensure full React project structure exists.
232
+ *
233
+ * Creates:
234
+ * - index.html
235
+ * - src/main.server.ts, src/main.browser.ts
236
+ * - src/api/index.ts, src/api/controllers/HelloController.ts
237
+ * - src/web/index.ts, src/web/AppRouter.ts, src/web/components/Hello.tsx
238
+ */
239
+ ensureReactProject(root: string): Promise<void>;
240
+ /**
241
+ * Ensure test directory exists with a dummy test file.
242
+ */
243
+ ensureTestDir(root: string): Promise<void>;
244
+ protected ensureFileIfNotExists(root: string, relativePath: string, content: string): Promise<void>;
245
+ /**
246
+ * Check if a file exists in the given directory or any parent directory.
247
+ */
248
+ protected existsInParents(root: string, filename: string): Promise<boolean>;
274
249
  }
275
250
  //#endregion
276
251
  //#region ../../src/cli/commands/build.d.ts
277
252
  declare class BuildCommand {
278
253
  protected readonly log: alepha_logger7.Logger;
254
+ protected readonly fs: FileSystemProvider;
279
255
  protected readonly utils: AlephaCliUtils;
256
+ protected readonly pm: PackageManagerUtils;
257
+ protected readonly scaffolder: ProjectScaffolder;
258
+ protected readonly options: Readonly<{
259
+ stats?: boolean | undefined;
260
+ vercel?: {
261
+ config?: {
262
+ crons?: {
263
+ path: string;
264
+ schedule: string;
265
+ }[] | undefined;
266
+ } | undefined;
267
+ projectName?: string | undefined;
268
+ orgId?: string | undefined;
269
+ projectId?: string | undefined;
270
+ } | undefined;
271
+ cloudflare?: {
272
+ config?: typebox0.StaticRecord<[], "Decode", {}, {
273
+ config: alepha0.TOptional<alepha0.TRecord<string, alepha0.TAny>>;
274
+ }, string, alepha0.TAny> | undefined;
275
+ } | undefined;
276
+ docker?: {
277
+ image?: string | undefined;
278
+ command?: string | undefined;
279
+ } | undefined;
280
+ sitemap?: {
281
+ hostname: string;
282
+ } | undefined;
283
+ }>;
280
284
  readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
281
285
  stats: alepha0.TOptional<alepha0.TBoolean>;
282
286
  vercel: alepha0.TOptional<alepha0.TBoolean>;
283
287
  cloudflare: alepha0.TOptional<alepha0.TBoolean>;
284
288
  docker: alepha0.TOptional<alepha0.TBoolean>;
285
289
  sitemap: alepha0.TOptional<alepha0.TString>;
290
+ bun: alepha0.TOptional<alepha0.TBoolean>;
286
291
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
287
292
  }
288
293
  //#endregion
289
294
  //#region ../../src/cli/commands/clean.d.ts
290
295
  declare class CleanCommand {
291
296
  /**
292
- * Clean the project, removing the "dist" directory
293
- */
297
+ * Clean the project, removing the "dist" directory
298
+ */
294
299
  readonly clean: alepha_command0.CommandPrimitive<typebox0.TObject<typebox0.TProperties>, typebox0.TSchema, typebox0.TObject<typebox0.TProperties>>;
295
300
  }
296
301
  //#endregion
297
302
  //#region ../../src/cli/commands/db.d.ts
298
303
  declare class DbCommand {
299
304
  protected readonly log: alepha_logger7.Logger;
305
+ protected readonly fs: FileSystemProvider;
300
306
  protected readonly utils: AlephaCliUtils;
301
307
  /**
302
- * Check if database migrations are up to date.
303
- */
308
+ * Check if database migrations are up to date.
309
+ */
304
310
  protected readonly check: alepha_command0.CommandPrimitive<alepha0.TObject<{
305
311
  provider: alepha0.TOptional<alepha0.TString>;
306
312
  mode: alepha0.TOptional<alepha0.TString>;
307
313
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
308
314
  /**
309
- * Generate database migration files
310
- */
315
+ * Generate database migration files
316
+ */
311
317
  protected readonly generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
312
318
  provider: alepha0.TOptional<alepha0.TString>;
313
319
  mode: alepha0.TOptional<alepha0.TString>;
314
320
  custom: alepha0.TOptional<alepha0.TString>;
315
321
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
316
322
  /**
317
- * Push database schema changes directly to the database
318
- */
323
+ * Push database schema changes directly to the database
324
+ */
319
325
  protected readonly push: alepha_command0.CommandPrimitive<alepha0.TObject<{
320
326
  provider: alepha0.TOptional<alepha0.TString>;
321
327
  mode: alepha0.TOptional<alepha0.TString>;
322
328
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
323
329
  /**
324
- * Apply pending database migrations
325
- */
330
+ * Apply pending database migrations
331
+ */
326
332
  protected readonly migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
327
333
  provider: alepha0.TOptional<alepha0.TString>;
328
334
  mode: alepha0.TOptional<alepha0.TString>;
329
335
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
330
336
  /**
331
- * Launch Drizzle Studio database browser
332
- */
337
+ * Launch Drizzle Studio database browser
338
+ */
333
339
  protected readonly studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
334
340
  provider: alepha0.TOptional<alepha0.TString>;
335
341
  mode: alepha0.TOptional<alepha0.TString>;
336
342
  }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
337
343
  /**
338
- * Parent command for database operations.
339
- */
344
+ * Parent command for database operations.
345
+ */
340
346
  readonly db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
341
347
  /**
342
- * Run a drizzle-kit command for all database providers in an Alepha instance.
343
- */
348
+ * Run a drizzle-kit command for all database providers in an Alepha instance.
349
+ */
344
350
  runDrizzleKitCommand(options: {
345
351
  root: string;
346
352
  args?: string;
@@ -351,13 +357,14 @@ declare class DbCommand {
351
357
  env?: string;
352
358
  }): Promise<void>;
353
359
  /**
354
- * Prepare Drizzle configuration files for a database provider.
355
- */
360
+ * Prepare Drizzle configuration files for a database provider.
361
+ */
356
362
  prepareDrizzleConfig(options: {
357
363
  kit: any;
358
364
  provider: DatabaseProvider;
359
365
  providerName: string;
360
366
  providerUrl: string;
367
+ providerDriver: string;
361
368
  dialect: string;
362
369
  entry: string;
363
370
  rootDir: string;
@@ -367,26 +374,28 @@ declare class DbCommand {
367
374
  //#region ../../src/cli/commands/deploy.d.ts
368
375
  declare class DeployCommand {
369
376
  protected readonly log: alepha_logger7.Logger;
377
+ protected readonly fs: FileSystemProvider;
370
378
  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
- */
379
+ protected readonly pm: PackageManagerUtils;
380
+ /**
381
+ * Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
382
+ *
383
+ * Deploy command can be overridden by creating a alepha.config.ts in the project root:
384
+ *
385
+ * ```ts
386
+ * import { defineConfig } from "alepha/cli";
387
+ *
388
+ * export default defineConfig({
389
+ * commands: {
390
+ * deploy: {
391
+ * handler: async ({ root, mode, flags }) => {
392
+ * // Custom deployment logic here
393
+ * },
394
+ * },
395
+ * },
396
+ * });
397
+ * ```
398
+ */
390
399
  readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
391
400
  build: alepha0.TBoolean;
392
401
  migrate: alepha0.TBoolean;
@@ -402,21 +411,27 @@ declare class DeployCommand {
402
411
  //#region ../../src/cli/commands/dev.d.ts
403
412
  declare class DevCommand {
404
413
  protected readonly log: alepha_logger7.Logger;
414
+ protected readonly fs: FileSystemProvider;
405
415
  protected readonly utils: AlephaCliUtils;
416
+ protected readonly pm: PackageManagerUtils;
417
+ protected readonly scaffolder: ProjectScaffolder;
406
418
  protected readonly alepha: Alepha;
407
419
  /**
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
- */
420
+ * Will run the project in watch mode.
421
+ *
422
+ * - If an index.html file is found in the project root, it will run Vite in dev mode.
423
+ * - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
424
+ */
413
425
  readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
426
+ protected isBunProject(root: string): Promise<boolean>;
414
427
  protected isFullstackProject(root: string): Promise<boolean>;
415
428
  }
416
429
  //#endregion
417
430
  //#region ../../src/cli/commands/format.d.ts
418
431
  declare class FormatCommand {
419
432
  protected readonly utils: AlephaCliUtils;
433
+ protected readonly pm: PackageManagerUtils;
434
+ protected readonly scaffolder: ProjectScaffolder;
420
435
  readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
421
436
  }
422
437
  //#endregion
@@ -438,16 +453,16 @@ declare class FormatCommand {
438
453
  declare class GitMessageParser {
439
454
  protected readonly log: alepha_logger7.Logger;
440
455
  /**
441
- * Parse a git commit line into a structured Commit object.
442
- *
443
- * **Format:** `type(scope): description` or `type(scope)!: description`
444
- *
445
- * **Supported types:** feat, fix, docs, refactor, perf, revert
446
- *
447
- * **Breaking changes:** Use `!` before `:` (e.g., `feat(api)!: remove endpoint`)
448
- *
449
- * @returns Commit object or null if not matching/ignored
450
- */
456
+ * Parse a git commit line into a structured Commit object.
457
+ *
458
+ * **Format:** `type(scope): description` or `type(scope)!: description`
459
+ *
460
+ * **Supported types:** feat, fix, docs, refactor, perf, revert
461
+ *
462
+ * **Breaking changes:** Use `!` before `:` (e.g., `feat(api)!: remove endpoint`)
463
+ *
464
+ * @returns Commit object or null if not matching/ignored
465
+ */
451
466
  parseCommit(line: string, config: ChangelogOptions): Commit | null;
452
467
  }
453
468
  //#endregion
@@ -487,39 +502,39 @@ declare class ChangelogCommand {
487
502
  ignore?: string[] | undefined;
488
503
  }>;
489
504
  /**
490
- * Format a single commit line.
491
- * Example: `- **cli**: add new command (\`abc1234\`)`
492
- * Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
493
- */
505
+ * Format a single commit line.
506
+ * Example: `- **cli**: add new command (\`abc1234\`)`
507
+ * Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
508
+ */
494
509
  protected formatCommit(commit: Commit): string;
495
510
  /**
496
- * Format the changelog entry with sections.
497
- */
511
+ * Format the changelog entry with sections.
512
+ */
498
513
  protected formatEntry(entry: ChangelogEntry): string;
499
514
  /**
500
- * Parse git log output into a changelog entry.
501
- */
515
+ * Parse git log output into a changelog entry.
516
+ */
502
517
  protected parseCommits(commitsOutput: string): ChangelogEntry;
503
518
  /**
504
- * Check if entry has any public commits.
505
- */
519
+ * Check if entry has any public commits.
520
+ */
506
521
  protected hasChanges(entry: ChangelogEntry): boolean;
507
522
  /**
508
- * Get the latest version tag.
509
- */
523
+ * Get the latest version tag.
524
+ */
510
525
  protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
511
526
  readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
512
527
  /**
513
- * Show changes from this ref (tag, commit, branch).
514
- * Defaults to the latest version tag.
515
- * Example: --from=1.0.0
516
- */
528
+ * Show changes from this ref (tag, commit, branch).
529
+ * Defaults to the latest version tag.
530
+ * Example: --from=1.0.0
531
+ */
517
532
  from: alepha0.TOptional<alepha0.TString>;
518
533
  /**
519
- * Show changes up to this ref (tag, commit, branch).
520
- * Defaults to HEAD.
521
- * Example: --to=main
522
- */
534
+ * Show changes up to this ref (tag, commit, branch).
535
+ * Defaults to HEAD.
536
+ * Example: --to=main
537
+ */
523
538
  to: alepha0.TOptional<alepha0.TString>;
524
539
  }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
525
540
  }
@@ -537,24 +552,30 @@ declare class OpenApiCommand {
537
552
  //#region ../../src/cli/commands/init.d.ts
538
553
  declare class InitCommand {
539
554
  protected readonly utils: AlephaCliUtils;
555
+ protected readonly pm: PackageManagerUtils;
556
+ protected readonly scaffolder: ProjectScaffolder;
557
+ protected readonly fs: FileSystemProvider;
540
558
  /**
541
- * Ensure the project has the necessary Alepha configuration files.
542
- * Add the correct dependencies to package.json and install them.
543
- */
559
+ * Ensure the project has the necessary Alepha configuration files.
560
+ * Add the correct dependencies to package.json and install them.
561
+ */
544
562
  readonly init: alepha_command0.CommandPrimitive<alepha0.TObject<{
563
+ agent: alepha0.TOptional<alepha0.TBoolean>;
545
564
  yarn: alepha0.TOptional<alepha0.TBoolean>;
546
565
  pnpm: alepha0.TOptional<alepha0.TBoolean>;
547
566
  npm: alepha0.TOptional<alepha0.TBoolean>;
548
567
  bun: alepha0.TOptional<alepha0.TBoolean>;
549
- react: alepha0.TOptional<alepha0.TBoolean>;
550
- ui: alepha0.TOptional<alepha0.TBoolean>;
568
+ web: alepha0.TOptional<alepha0.TBoolean>;
569
+ admin: alepha0.TOptional<alepha0.TBoolean>;
551
570
  test: alepha0.TOptional<alepha0.TBoolean>;
552
- }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
571
+ }>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
553
572
  }
554
573
  //#endregion
555
574
  //#region ../../src/cli/commands/lint.d.ts
556
575
  declare class LintCommand {
557
576
  protected readonly utils: AlephaCliUtils;
577
+ protected readonly pm: PackageManagerUtils;
578
+ protected readonly scaffolder: ProjectScaffolder;
558
579
  readonly lint: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
559
580
  }
560
581
  //#endregion
@@ -565,24 +586,18 @@ declare class RootCommand {
565
586
  protected readonly alepha: Alepha;
566
587
  protected readonly color: ConsoleColorProvider;
567
588
  /**
568
- * Called when no command is provided
569
- */
589
+ * Called when no command is provided
590
+ */
570
591
  readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
571
592
  version: alepha0.TOptional<alepha0.TBoolean>;
572
593
  }>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
573
594
  }
574
595
  //#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
596
  //#region ../../src/cli/commands/test.d.ts
584
597
  declare class TestCommand {
585
598
  protected readonly utils: AlephaCliUtils;
599
+ protected readonly pm: PackageManagerUtils;
600
+ protected readonly scaffolder: ProjectScaffolder;
586
601
  readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
587
602
  config: alepha0.TOptional<alepha0.TString>;
588
603
  }>, alepha0.TSchema, alepha0.TObject<{
@@ -593,49 +608,133 @@ declare class TestCommand {
593
608
  //#region ../../src/cli/commands/typecheck.d.ts
594
609
  declare class TypecheckCommand {
595
610
  protected readonly utils: AlephaCliUtils;
611
+ protected readonly pm: PackageManagerUtils;
596
612
  protected readonly log: alepha_logger7.Logger;
597
613
  /**
598
- * Run TypeScript type checking across the codebase with no emit.
599
- */
614
+ * Run TypeScript type checking across the codebase with no emit.
615
+ */
600
616
  readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
601
617
  }
602
618
  //#endregion
603
619
  //#region ../../src/cli/commands/verify.d.ts
604
620
  declare class VerifyCommand {
605
621
  protected readonly utils: AlephaCliUtils;
606
- /**
607
- * Run a series of verification commands to ensure code quality and correctness.
608
- *
609
- * This command runs the following checks in order:
610
- * - Clean the project
611
- * - Format the code
612
- * - Lint the code
613
- * - Run tests (if Vitest is a dev dependency)
614
- * - Check database migrations (if a migrations directory exists)
615
- * - Type check the code
616
- * - Build the project
617
- * - Clean the project again
618
- */
622
+ protected readonly pm: PackageManagerUtils;
623
+ /**
624
+ * Run a series of verification commands to ensure code quality and correctness.
625
+ *
626
+ * This command runs the following checks in order:
627
+ * - Clean the project
628
+ * - Format the code
629
+ * - Lint the code
630
+ * - Run tests (if Vitest is a dev dependency)
631
+ * - Check database migrations (if a migrations directory exists)
632
+ * - Type check the code
633
+ * - Build the project
634
+ * - Clean the project again
635
+ */
619
636
  readonly verify: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
620
637
  }
621
638
  //#endregion
639
+ //#region ../../src/cli/atoms/buildOptions.d.ts
640
+ /**
641
+ * Build options atom for CLI build command.
642
+ *
643
+ * Defines the available build configuration options with their defaults.
644
+ * Options can be overridden via vite.config.ts or CLI flags.
645
+ */
646
+ declare const buildOptions: alepha0.Atom<alepha0.TObject<{
647
+ /**
648
+ * Generate build stats report.
649
+ */
650
+ stats: alepha0.TOptional<alepha0.TBoolean>;
651
+ /**
652
+ * Vercel deployment configuration.
653
+ */
654
+ vercel: alepha0.TOptional<alepha0.TObject<{
655
+ projectName: alepha0.TOptional<alepha0.TString>;
656
+ orgId: alepha0.TOptional<alepha0.TString>;
657
+ projectId: alepha0.TOptional<alepha0.TString>;
658
+ config: alepha0.TOptional<alepha0.TObject<{
659
+ crons: alepha0.TOptional<alepha0.TArray<alepha0.TObject<{
660
+ path: alepha0.TString;
661
+ schedule: alepha0.TString;
662
+ }>>>;
663
+ }>>;
664
+ }>>;
665
+ /**
666
+ * Cloudflare Workers deployment configuration.
667
+ */
668
+ cloudflare: alepha0.TOptional<alepha0.TObject<{
669
+ config: alepha0.TOptional<alepha0.TRecord<string, alepha0.TAny>>;
670
+ }>>;
671
+ /**
672
+ * Docker deployment configuration.
673
+ */
674
+ docker: alepha0.TOptional<alepha0.TObject<{
675
+ /**
676
+ * Docker image name to use in the Dockerfile.
677
+ * @default "node:24-alpine"
678
+ */
679
+ image: alepha0.TOptional<alepha0.TString>;
680
+ /**
681
+ * Command to run in the Docker container.
682
+ * @default "node"
683
+ */
684
+ command: alepha0.TOptional<alepha0.TString>;
685
+ }>>;
686
+ /**
687
+ * Sitemap generation configuration.
688
+ */
689
+ sitemap: alepha0.TOptional<alepha0.TObject<{
690
+ /**
691
+ * Base URL for sitemap entries.
692
+ */
693
+ hostname: alepha0.TString;
694
+ }>>;
695
+ }>, "alepha.build.options">;
696
+ /**
697
+ * Type for build options.
698
+ */
699
+ type BuildOptions = Static<typeof buildOptions.schema>;
700
+ //#endregion
622
701
  //#region ../../src/cli/defineConfig.d.ts
623
- type AlephaCliConfig = (alepha: Alepha) => {
702
+ interface AlephaCliConfig {
703
+ /**
704
+ * Add custom commands to the Alepha CLI.
705
+ *
706
+ * You can override 'deploy', 'build', 'dev', 'start' commands this way.
707
+ * But you can also add your own commands and run them via `alepha <command>`.
708
+ */
624
709
  commands?: Record<string, CommandPrimitive>;
710
+ /**
711
+ * Register more services to the Alepha CLI (enhancements, commands, etc.).
712
+ */
625
713
  services?: Array<any>;
626
- };
627
- declare const defineConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
714
+ /**
715
+ * Configure Alepha build command.
716
+ */
717
+ build?: BuildOptions;
718
+ /**
719
+ * Environment variables to set before running commands.
720
+ *
721
+ * Always use .env files by default, this is only for dynamic values.
722
+ */
723
+ env?: Record<string, unknown>;
724
+ }
725
+ type AlephaCliConfigFn = (alepha: Alepha) => AlephaCliConfig;
726
+ declare const defineConfig: (runConfig: AlephaCliConfig | AlephaCliConfigFn) => (alepha: Alepha) => {
628
727
  [x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
629
728
  };
630
729
  /**
631
730
  * @alias defineConfig
632
731
  */
633
- declare const defineAlephaConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
732
+ declare const defineAlephaConfig: (runConfig: AlephaCliConfig | AlephaCliConfigFn) => (alepha: Alepha) => {
634
733
  [x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
635
734
  };
636
735
  //#endregion
637
736
  //#region ../../src/cli/version.d.ts
638
737
  declare const version: any;
639
738
  //#endregion
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 };
739
+ export { AlephaCli, AlephaCliConfig, AlephaCliConfigFn, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DeployCommand, DevCommand, FormatCommand, GitMessageParser, GitProvider, InitCommand, LintCommand, OpenApiCommand, RootCommand, TestCommand, TypecheckCommand, VerifyCommand, analyzeModules, changelogOptions, defineAlephaConfig, defineConfig, version };
641
740
  //# sourceMappingURL=index.d.ts.map