alepha 0.12.1 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/api-notifications/index.d.ts +111 -111
  2. package/dist/api-users/index.d.ts +1240 -1240
  3. package/dist/api-verifications/index.d.ts +94 -94
  4. package/dist/cli/{dist-Sz2EXvQX.cjs → dist-Dl9Vl7Ur.js} +17 -13
  5. package/dist/cli/{dist-BBPjuQ56.js.map → dist-Dl9Vl7Ur.js.map} +1 -1
  6. package/dist/cli/index.d.ts +3 -11
  7. package/dist/cli/index.js +106 -74
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/email/index.js +71 -73
  10. package/dist/email/index.js.map +1 -1
  11. package/dist/orm/index.d.ts +1 -1
  12. package/dist/orm/index.js.map +1 -1
  13. package/dist/queue/index.d.ts +4 -4
  14. package/dist/redis/index.d.ts +10 -10
  15. package/dist/retry/index.d.ts +1 -1
  16. package/dist/retry/index.js +2 -2
  17. package/dist/retry/index.js.map +1 -1
  18. package/dist/scheduler/index.d.ts +6 -6
  19. package/dist/server/index.js +1 -1
  20. package/dist/server/index.js.map +1 -1
  21. package/dist/server-auth/index.d.ts +193 -193
  22. package/dist/server-health/index.d.ts +17 -17
  23. package/dist/server-links/index.d.ts +34 -34
  24. package/dist/server-metrics/index.js +170 -174
  25. package/dist/server-metrics/index.js.map +1 -1
  26. package/dist/server-security/index.d.ts +9 -9
  27. package/dist/vite/index.js +4 -5
  28. package/dist/vite/index.js.map +1 -1
  29. package/dist/websocket/index.d.ts +7 -7
  30. package/package.json +52 -103
  31. package/src/cli/apps/AlephaPackageBuilderCli.ts +7 -2
  32. package/src/cli/assets/appRouterTs.ts +9 -0
  33. package/src/cli/assets/indexHtml.ts +2 -1
  34. package/src/cli/assets/mainBrowserTs.ts +10 -0
  35. package/src/cli/commands/CoreCommands.ts +6 -5
  36. package/src/cli/commands/DrizzleCommands.ts +65 -57
  37. package/src/cli/commands/VerifyCommands.ts +1 -1
  38. package/src/cli/services/ProjectUtils.ts +44 -38
  39. package/src/orm/providers/DrizzleKitProvider.ts +1 -1
  40. package/src/retry/descriptors/$retry.ts +5 -3
  41. package/src/server/providers/NodeHttpServerProvider.ts +1 -1
  42. package/src/vite/helpers/boot.ts +3 -3
  43. package/dist/api-files/index.cjs +0 -1293
  44. package/dist/api-files/index.cjs.map +0 -1
  45. package/dist/api-files/index.d.cts +0 -829
  46. package/dist/api-jobs/index.cjs +0 -274
  47. package/dist/api-jobs/index.cjs.map +0 -1
  48. package/dist/api-jobs/index.d.cts +0 -654
  49. package/dist/api-notifications/index.cjs +0 -380
  50. package/dist/api-notifications/index.cjs.map +0 -1
  51. package/dist/api-notifications/index.d.cts +0 -289
  52. package/dist/api-parameters/index.cjs +0 -66
  53. package/dist/api-parameters/index.cjs.map +0 -1
  54. package/dist/api-parameters/index.d.cts +0 -84
  55. package/dist/api-users/index.cjs +0 -6009
  56. package/dist/api-users/index.cjs.map +0 -1
  57. package/dist/api-users/index.d.cts +0 -4740
  58. package/dist/api-verifications/index.cjs +0 -407
  59. package/dist/api-verifications/index.cjs.map +0 -1
  60. package/dist/api-verifications/index.d.cts +0 -207
  61. package/dist/batch/index.cjs +0 -408
  62. package/dist/batch/index.cjs.map +0 -1
  63. package/dist/batch/index.d.cts +0 -330
  64. package/dist/bin/index.cjs +0 -17
  65. package/dist/bin/index.cjs.map +0 -1
  66. package/dist/bin/index.d.cts +0 -1
  67. package/dist/bucket/index.cjs +0 -303
  68. package/dist/bucket/index.cjs.map +0 -1
  69. package/dist/bucket/index.d.cts +0 -355
  70. package/dist/cache/index.cjs +0 -241
  71. package/dist/cache/index.cjs.map +0 -1
  72. package/dist/cache/index.d.cts +0 -202
  73. package/dist/cache-redis/index.cjs +0 -84
  74. package/dist/cache-redis/index.cjs.map +0 -1
  75. package/dist/cache-redis/index.d.cts +0 -40
  76. package/dist/cli/chunk-DSlc6foC.cjs +0 -43
  77. package/dist/cli/dist-BBPjuQ56.js +0 -2778
  78. package/dist/cli/dist-Sz2EXvQX.cjs.map +0 -1
  79. package/dist/cli/index.cjs +0 -1241
  80. package/dist/cli/index.cjs.map +0 -1
  81. package/dist/cli/index.d.cts +0 -422
  82. package/dist/command/index.cjs +0 -693
  83. package/dist/command/index.cjs.map +0 -1
  84. package/dist/command/index.d.cts +0 -340
  85. package/dist/core/index.cjs +0 -2264
  86. package/dist/core/index.cjs.map +0 -1
  87. package/dist/core/index.d.cts +0 -1927
  88. package/dist/datetime/index.cjs +0 -318
  89. package/dist/datetime/index.cjs.map +0 -1
  90. package/dist/datetime/index.d.cts +0 -145
  91. package/dist/email/index.cjs +0 -10874
  92. package/dist/email/index.cjs.map +0 -1
  93. package/dist/email/index.d.cts +0 -186
  94. package/dist/fake/index.cjs +0 -34641
  95. package/dist/fake/index.cjs.map +0 -1
  96. package/dist/fake/index.d.cts +0 -74
  97. package/dist/file/index.cjs +0 -1212
  98. package/dist/file/index.cjs.map +0 -1
  99. package/dist/file/index.d.cts +0 -698
  100. package/dist/lock/index.cjs +0 -226
  101. package/dist/lock/index.cjs.map +0 -1
  102. package/dist/lock/index.d.cts +0 -361
  103. package/dist/lock-redis/index.cjs +0 -113
  104. package/dist/lock-redis/index.cjs.map +0 -1
  105. package/dist/lock-redis/index.d.cts +0 -24
  106. package/dist/logger/index.cjs +0 -521
  107. package/dist/logger/index.cjs.map +0 -1
  108. package/dist/logger/index.d.cts +0 -281
  109. package/dist/orm/index.cjs +0 -2986
  110. package/dist/orm/index.cjs.map +0 -1
  111. package/dist/orm/index.d.cts +0 -2213
  112. package/dist/queue/index.cjs +0 -1044
  113. package/dist/queue/index.cjs.map +0 -1
  114. package/dist/queue/index.d.cts +0 -1265
  115. package/dist/queue-redis/index.cjs +0 -873
  116. package/dist/queue-redis/index.cjs.map +0 -1
  117. package/dist/queue-redis/index.d.cts +0 -82
  118. package/dist/redis/index.cjs +0 -153
  119. package/dist/redis/index.cjs.map +0 -1
  120. package/dist/redis/index.d.cts +0 -82
  121. package/dist/retry/index.cjs +0 -146
  122. package/dist/retry/index.cjs.map +0 -1
  123. package/dist/retry/index.d.cts +0 -172
  124. package/dist/router/index.cjs +0 -111
  125. package/dist/router/index.cjs.map +0 -1
  126. package/dist/router/index.d.cts +0 -46
  127. package/dist/scheduler/index.cjs +0 -576
  128. package/dist/scheduler/index.cjs.map +0 -1
  129. package/dist/scheduler/index.d.cts +0 -145
  130. package/dist/security/index.cjs +0 -2402
  131. package/dist/security/index.cjs.map +0 -1
  132. package/dist/security/index.d.cts +0 -598
  133. package/dist/server/index.cjs +0 -1680
  134. package/dist/server/index.cjs.map +0 -1
  135. package/dist/server/index.d.cts +0 -810
  136. package/dist/server-auth/index.cjs +0 -3146
  137. package/dist/server-auth/index.cjs.map +0 -1
  138. package/dist/server-auth/index.d.cts +0 -1164
  139. package/dist/server-cache/index.cjs +0 -252
  140. package/dist/server-cache/index.cjs.map +0 -1
  141. package/dist/server-cache/index.d.cts +0 -164
  142. package/dist/server-compress/index.cjs +0 -141
  143. package/dist/server-compress/index.cjs.map +0 -1
  144. package/dist/server-compress/index.d.cts +0 -38
  145. package/dist/server-cookies/index.cjs +0 -234
  146. package/dist/server-cookies/index.cjs.map +0 -1
  147. package/dist/server-cookies/index.d.cts +0 -144
  148. package/dist/server-cors/index.cjs +0 -201
  149. package/dist/server-cors/index.cjs.map +0 -1
  150. package/dist/server-cors/index.d.cts +0 -140
  151. package/dist/server-health/index.cjs +0 -62
  152. package/dist/server-health/index.cjs.map +0 -1
  153. package/dist/server-health/index.d.cts +0 -58
  154. package/dist/server-helmet/index.cjs +0 -131
  155. package/dist/server-helmet/index.cjs.map +0 -1
  156. package/dist/server-helmet/index.d.cts +0 -97
  157. package/dist/server-links/index.cjs +0 -992
  158. package/dist/server-links/index.cjs.map +0 -1
  159. package/dist/server-links/index.d.cts +0 -513
  160. package/dist/server-metrics/index.cjs +0 -4535
  161. package/dist/server-metrics/index.cjs.map +0 -1
  162. package/dist/server-metrics/index.d.cts +0 -35
  163. package/dist/server-multipart/index.cjs +0 -237
  164. package/dist/server-multipart/index.cjs.map +0 -1
  165. package/dist/server-multipart/index.d.cts +0 -50
  166. package/dist/server-proxy/index.cjs +0 -186
  167. package/dist/server-proxy/index.cjs.map +0 -1
  168. package/dist/server-proxy/index.d.cts +0 -234
  169. package/dist/server-rate-limit/index.cjs +0 -241
  170. package/dist/server-rate-limit/index.cjs.map +0 -1
  171. package/dist/server-rate-limit/index.d.cts +0 -183
  172. package/dist/server-security/index.cjs +0 -316
  173. package/dist/server-security/index.cjs.map +0 -1
  174. package/dist/server-security/index.d.cts +0 -173
  175. package/dist/server-static/index.cjs +0 -170
  176. package/dist/server-static/index.cjs.map +0 -1
  177. package/dist/server-static/index.d.cts +0 -121
  178. package/dist/server-swagger/index.cjs +0 -1021
  179. package/dist/server-swagger/index.cjs.map +0 -1
  180. package/dist/server-swagger/index.d.cts +0 -382
  181. package/dist/sms/index.cjs +0 -221
  182. package/dist/sms/index.cjs.map +0 -1
  183. package/dist/sms/index.d.cts +0 -130
  184. package/dist/thread/index.cjs +0 -350
  185. package/dist/thread/index.cjs.map +0 -1
  186. package/dist/thread/index.d.cts +0 -260
  187. package/dist/topic/index.cjs +0 -282
  188. package/dist/topic/index.cjs.map +0 -1
  189. package/dist/topic/index.d.cts +0 -523
  190. package/dist/topic-redis/index.cjs +0 -71
  191. package/dist/topic-redis/index.cjs.map +0 -1
  192. package/dist/topic-redis/index.d.cts +0 -42
  193. package/dist/vite/index.cjs +0 -1077
  194. package/dist/vite/index.cjs.map +0 -1
  195. package/dist/vite/index.d.cts +0 -542
  196. package/dist/websocket/index.cjs +0 -1117
  197. package/dist/websocket/index.cjs.map +0 -1
  198. package/dist/websocket/index.d.cts +0 -861
@@ -1,542 +0,0 @@
1
- import { Alepha } from "alepha";
2
- import { Logger, Plugin, ResolvedConfig, UserConfig, ViteDevServer, defineConfig } from "vite";
3
- import { BrotliOptions, ZlibOptions } from "node:zlib";
4
-
5
- //#region src/vite/helpers/boot.d.ts
6
- declare const boot: {
7
- getClientEntry: (root?: string) => Promise<string | undefined>;
8
- getServerEntry: (root?: string, explicitEntry?: string) => Promise<string>;
9
- };
10
- //#endregion
11
- //#region src/vite/helpers/createBufferedLogger.d.ts
12
- interface BufferedLogEntry {
13
- level: "info" | "warn" | "error";
14
- msg: string;
15
- timestamp: Date;
16
- }
17
- interface BufferedLogger extends Logger {
18
- /**
19
- * Flush all buffered log messages to console.
20
- * Call this on build failure to show what happened.
21
- */
22
- flush(): void;
23
- /**
24
- * Get all buffered log entries.
25
- */
26
- getEntries(): BufferedLogEntry[];
27
- /**
28
- * Clear all buffered entries without printing.
29
- */
30
- clear(): void;
31
- }
32
- /**
33
- * Creates a Vite logger that buffers all messages instead of printing them.
34
- * Useful for silent builds that only show output on failure.
35
- *
36
- * @example
37
- * ```ts
38
- * const logger = createBufferedLogger();
39
- * try {
40
- * await viteBuild({ customLogger: logger, logLevel: 'info' });
41
- * } catch (error) {
42
- * logger.flush(); // Print all buffered logs
43
- * throw error;
44
- * }
45
- * ```
46
- */
47
- declare function createBufferedLogger(): BufferedLogger;
48
- //#endregion
49
- //#region src/vite/plugins/viteCompress.d.ts
50
- interface ViteCompressOptions {
51
- /**
52
- * If true, the plugin will not compress the files.
53
- *
54
- * @default false
55
- */
56
- disabled?: boolean;
57
- /**
58
- * If true, the plugin will compress the files using brotli.
59
- * Can also be an object with brotli options.
60
- *
61
- * @default true
62
- */
63
- brotli?: boolean | BrotliOptions;
64
- /**
65
- * If true, the plugin will compress the files using gzip.
66
- * Can also be an object with gzip options.
67
- *
68
- * @default true
69
- */
70
- gzip?: boolean | ZlibOptions;
71
- /**
72
- * A filter to determine which files to compress.
73
- * Can be a RegExp or a function that returns true for files to compress.
74
- *
75
- * @default /\.(js|mjs|cjs|css|wasm|svg|html)$/
76
- */
77
- filter?: RegExp | ((fileName: string) => boolean);
78
- }
79
- declare function viteCompress(options?: ViteCompressOptions): Plugin;
80
- declare function compressFile(options: ViteCompressOptions | undefined, filePath: string): Promise<void>;
81
- //#endregion
82
- //#region src/vite/tasks/buildClient.d.ts
83
- interface BuildClientOptions {
84
- /**
85
- * Output directory for client build.
86
- */
87
- dist: string;
88
- /**
89
- * If true, precompress assets using gzip and brotli compression.
90
- *
91
- * @default false
92
- */
93
- precompress?: ViteCompressOptions | boolean;
94
- /**
95
- * If true, prerender all static routes found in the $pages directory.
96
- *
97
- * @default false
98
- */
99
- prerender?: boolean;
100
- /**
101
- * Build a sitemap.xml file based on the $pages routes.
102
- */
103
- sitemap?: {
104
- hostname: string;
105
- };
106
- /**
107
- * Override Vite config options.
108
- */
109
- config?: UserConfig;
110
- /**
111
- * If true, generate build stats report.
112
- */
113
- stats?: boolean;
114
- /**
115
- * If true, suppress build output. Logs are buffered and only shown on failure.
116
- *
117
- * @default false
118
- */
119
- silent?: boolean;
120
- }
121
- /**
122
- * Build client-side bundle with Vite.
123
- *
124
- * This task compiles the browser/client code for production,
125
- * including code splitting, minification, and optional compression.
126
- */
127
- declare function buildClient(opts: BuildClientOptions): Promise<void>;
128
- //#endregion
129
- //#region src/vite/tasks/buildServer.d.ts
130
- interface BuildServerOptions {
131
- /**
132
- * Path to the server entry file.
133
- */
134
- entry: string;
135
- /**
136
- * Output directory for server build.
137
- */
138
- distDir: string;
139
- /**
140
- * Optional client directory name (relative to distDir).
141
- * If provided, the client template will be embedded in the server output.
142
- */
143
- clientDir?: string;
144
- /**
145
- * Override Vite config options.
146
- */
147
- config?: UserConfig;
148
- /**
149
- * If true, generate build stats report.
150
- */
151
- stats?: boolean;
152
- /**
153
- * If true, suppress build output. Logs are buffered and only shown on failure.
154
- *
155
- * @default false
156
- */
157
- silent?: boolean;
158
- }
159
- interface BuildServerResult {
160
- /**
161
- * The filename of the built server entry (e.g., "abc123.js").
162
- */
163
- entryFile: string;
164
- }
165
- /**
166
- * Build server-side SSR bundle with Vite.
167
- *
168
- * This task compiles the server code for production,
169
- * generates the externals package.json, and creates
170
- * the dist/index.js entry wrapper.
171
- */
172
- declare function buildServer(opts: BuildServerOptions): Promise<BuildServerResult>;
173
- //#endregion
174
- //#region src/vite/tasks/copyAssets.d.ts
175
- interface CopyAssetsOptions {
176
- /**
177
- * Entry point for the built Alepha application.
178
- */
179
- entry: string;
180
- /**
181
- * Output directory for copied assets.
182
- */
183
- distDir: string;
184
- }
185
- /**
186
- * Copy assets from Alepha packages to the build output directory.
187
- *
188
- * This task loads the built Alepha application, reads the
189
- * `alepha.build.assets` state to find packages with assets,
190
- * and copies their `/assets` directories to the build output.
191
- *
192
- * Used by modules like AlephaServerSwagger to distribute UI files.
193
- */
194
- declare function copyAssets(opts: CopyAssetsOptions): Promise<void>;
195
- //#endregion
196
- //#region src/vite/tasks/generateCloudflare.d.ts
197
- interface GenerateCloudflareOptions {
198
- /**
199
- * The directory where the build output is placed.
200
- *
201
- * @default "dist"
202
- */
203
- distDir?: string;
204
- }
205
- /**
206
- * Generate Cloudflare Workers deployment configuration.
207
- *
208
- * This task creates:
209
- * - wrangler.jsonc with worker configuration
210
- * - worker.js entry point for Cloudflare Workers
211
- */
212
- declare function generateCloudflare(opts?: GenerateCloudflareOptions): Promise<void>;
213
- //#endregion
214
- //#region src/vite/tasks/generateDocker.d.ts
215
- interface GenerateDockerOptions {
216
- /**
217
- * The directory where the build output is placed.
218
- *
219
- * @default "dist"
220
- */
221
- distDir?: string;
222
- /**
223
- * Docker image name to use in the Dockerfile.
224
- *
225
- * @default "node:24-alpine"
226
- */
227
- image?: string;
228
- /**
229
- * Command to run in the Docker container.
230
- *
231
- * @default "node"
232
- */
233
- command?: string;
234
- }
235
- /**
236
- * Generate Docker deployment configuration.
237
- *
238
- * This task creates:
239
- * - Dockerfile with configurable Node image
240
- * - Copies drizzle migrations if they exist
241
- */
242
- declare function generateDocker(opts?: GenerateDockerOptions): Promise<void>;
243
- //#endregion
244
- //#region src/vite/tasks/generateExternals.d.ts
245
- interface GenerateExternalsOptions {
246
- /**
247
- * Output directory for package.json.
248
- */
249
- distDir: string;
250
- /**
251
- * List of external package names.
252
- */
253
- externals: string[];
254
- }
255
- /**
256
- * Generate minimal package.json with pinned external dependencies.
257
- *
258
- * This task creates a package.json in the dist directory containing
259
- * only the external dependencies needed at runtime, with their versions
260
- * pinned to the currently installed versions.
261
- */
262
- declare function generateExternals(opts: GenerateExternalsOptions): Promise<void>;
263
- //#endregion
264
- //#region src/vite/tasks/generateSitemap.d.ts
265
- interface GenerateSitemapOptions {
266
- /**
267
- * Entry point for the built Alepha application.
268
- */
269
- entry: string;
270
- /**
271
- * Base URL for the sitemap (e.g., "https://example.com").
272
- */
273
- baseUrl: string;
274
- /**
275
- * Optional HTML template (for React SSR).
276
- */
277
- template?: string;
278
- }
279
- /**
280
- * Generate sitemap.xml from Alepha page descriptors.
281
- *
282
- * This task loads the built Alepha application,
283
- * queries all page descriptors, and generates a sitemap.xml
284
- * containing URLs for all accessible pages.
285
- */
286
- declare function generateSitemap(opts: GenerateSitemapOptions): Promise<string>;
287
- //#endregion
288
- //#region src/vite/tasks/generateVercel.d.ts
289
- interface GenerateVercelOptions {
290
- /**
291
- * The directory where the build output is placed.
292
- *
293
- * @default "dist"
294
- */
295
- distDir?: string;
296
- /**
297
- * The name of the client directory.
298
- *
299
- * @default "public"
300
- */
301
- clientDir?: string;
302
- /**
303
- * Vercel configuration options.
304
- */
305
- config?: VercelConfig;
306
- }
307
- interface VercelConfig {
308
- projectName?: string;
309
- orgId?: string;
310
- projectId?: string;
311
- config?: Record<string, any> & {
312
- crons?: Array<{
313
- path: string;
314
- schedule: string;
315
- }>;
316
- };
317
- }
318
- /**
319
- * Generate Vercel deployment configuration.
320
- *
321
- * This task creates:
322
- * - vercel.json with route rewrites
323
- * - api/index.js entry point for Vercel serverless function
324
- * - .vercel/project.json if VERCEL_PROJECT_ID and VERCEL_ORG_ID are set
325
- */
326
- declare function generateVercel(opts?: GenerateVercelOptions): Promise<void>;
327
- //#endregion
328
- //#region src/vite/tasks/prerenderPages.d.ts
329
- interface PrerenderPagesOptions {
330
- /**
331
- * Entry point for the built Alepha application.
332
- */
333
- entry: string;
334
- /**
335
- * Client dist directory for output files.
336
- */
337
- dist: string;
338
- /**
339
- * Optional compression options.
340
- */
341
- compress?: ViteCompressOptions | boolean;
342
- }
343
- interface PrerenderPagesResult {
344
- /**
345
- * Number of pages pre-rendered.
346
- */
347
- count: number;
348
- }
349
- /**
350
- * Pre-render static pages defined in the Alepha application.
351
- *
352
- * This task loads the built Alepha application, queries all page
353
- * descriptors with `static: true`, and generates static HTML files
354
- * for each page. Supports pages with parameterized routes via
355
- * `static.entries` configuration.
356
- */
357
- declare function prerenderPages(opts: PrerenderPagesOptions): Promise<PrerenderPagesResult>;
358
- //#endregion
359
- //#region src/vite/tasks/runAlepha.d.ts
360
- interface AlephaRunnerOptions {
361
- /**
362
- * Path to the server entry file.
363
- */
364
- entry: string;
365
- /**
366
- * Enable debug logging.
367
- */
368
- debug?: boolean;
369
- }
370
- interface AlephaRunnerState {
371
- root: string;
372
- started: boolean;
373
- app?: Alepha;
374
- config?: ResolvedConfig;
375
- lock?: PromiseWithResolvers<void>;
376
- log: (...msg: string[]) => void;
377
- entry: string;
378
- onReload?: () => void;
379
- }
380
- /**
381
- * Create an Alepha runner for development.
382
- *
383
- * The runner manages the lifecycle of an Alepha application during
384
- * Vite dev server operation, handling start/stop/restart and HMR.
385
- */
386
- declare function createAlephaRunner(opts: AlephaRunnerOptions): AlephaRunner;
387
- declare class AlephaRunner {
388
- protected state: AlephaRunnerState;
389
- constructor(state: AlephaRunnerState);
390
- /**
391
- * Set resolved Vite config.
392
- */
393
- setConfig(config: ResolvedConfig): void;
394
- /**
395
- * Check if SSR is enabled for the running app.
396
- */
397
- isSsrEnabled(): boolean;
398
- /**
399
- * Check if app is started.
400
- */
401
- get isStarted(): boolean;
402
- /**
403
- * Get the running Alepha app instance.
404
- */
405
- get app(): Alepha | undefined;
406
- /**
407
- * Start the Alepha application.
408
- */
409
- start(server: ViteDevServer): Promise<void>;
410
- /**
411
- * Stop the Alepha application.
412
- */
413
- stop(): Promise<void>;
414
- /**
415
- * Restart the Alepha application.
416
- *
417
- * @returns true if the restart was skipped due to locking
418
- */
419
- restart(server: ViteDevServer, invalidate?: boolean): Promise<boolean>;
420
- /**
421
- * Send reload event to client.
422
- */
423
- sendReload(server: ViteDevServer): void;
424
- }
425
- /**
426
- * Check if a URL path is a Vite internal file.
427
- */
428
- declare function isViteInternalPath(pathname: string): boolean;
429
- //#endregion
430
- //#region src/vite/plugins/viteAlephaBuild.d.ts
431
- interface ViteAlephaBuildOptions {
432
- /**
433
- * Path to the entry file for the server build.
434
- * If empty, SSR build will be skipped.
435
- */
436
- serverEntry?: string | false;
437
- /**
438
- * Set false to skip the client build.
439
- * This is useful if you only want to build the server-side application.
440
- */
441
- client?: false | Partial<BuildClientOptions>;
442
- /**
443
- * If true, the build will be optimized for Vercel deployment.
444
- *
445
- * If `VERCEL_PROJECT_ID` and `VERCEL_ORG_ID` environment variables are set, .vercel will be generated with the correct configuration.
446
- *
447
- * @default false
448
- */
449
- vercel?: boolean | VercelConfig;
450
- /**
451
- * If true, the build will generate Cloudflare Workers configuration.
452
- *
453
- * @default false
454
- */
455
- cloudflare?: boolean;
456
- /**
457
- * If true, the build will be optimized for Docker deployment.
458
- * Additionally, it will generate a Dockerfile in the dist directory.
459
- */
460
- docker?: boolean | Omit<GenerateDockerOptions, "distDir">;
461
- /**
462
- * If true, build statistics will be printed after the build completes.
463
- */
464
- stats?: boolean;
465
- }
466
- /**
467
- * Build modes controlled by ALEPHA_BUILD_MODE environment variable:
468
- * - "cli": Skip plugin entirely, CLI handles all tasks
469
- * - "client": Only build client bundle
470
- * - "server": Only build server bundle
471
- * - undefined/other: Full build (default behavior)
472
- */
473
- type AlephaBuildMode = "cli" | "client" | "server";
474
- /**
475
- * Alepha build plugin for Vite.
476
- *
477
- * This plugin orchestrates the complete build process:
478
- * 1. Build client (if index.html exists)
479
- * 2. Build server (SSR)
480
- * 3. Copy assets from packages
481
- * 4. Pre-render static pages (if enabled)
482
- * 5. Generate sitemap (if enabled)
483
- * 6. Generate deployment config (Vercel/Cloudflare/Docker)
484
- *
485
- * Build mode can be controlled via ALEPHA_BUILD_MODE env var for CLI integration.
486
- */
487
- declare function viteAlephaBuild(options?: ViteAlephaBuildOptions): Promise<Plugin>;
488
- //#endregion
489
- //#region src/vite/plugins/viteAlephaDev.d.ts
490
- interface ViteAlephaDevOptions {
491
- /**
492
- * Path to the entry file for the server build.
493
- * If empty, plugin will be disabled.
494
- */
495
- serverEntry?: string | false;
496
- /**
497
- * If true, enables debug logging.
498
- *
499
- * @default false
500
- */
501
- debug?: boolean;
502
- }
503
- /**
504
- * Plug Alepha into Vite development server.
505
- *
506
- * This plugin manages the Alepha application lifecycle during development,
507
- * handling hot module replacement and request forwarding.
508
- */
509
- declare function viteAlephaDev(options?: ViteAlephaDevOptions): Promise<Plugin>;
510
- //#endregion
511
- //#region src/vite/plugins/viteAlepha.d.ts
512
- type ViteAlephaOptions = ViteAlephaDevOptions & ViteAlephaBuildOptions & {
513
- react?: false;
514
- };
515
- declare function viteAlepha(options?: ViteAlephaOptions): (Plugin | Promise<Plugin>)[];
516
- //#endregion
517
- //#region src/vite/index.d.ts
518
- declare global {
519
- var __cli_alepha: Alepha;
520
- }
521
- /**
522
- * Plugin vite for Alepha framework.
523
- *
524
- * This module provides Vite plugins and configurations to integrate Alepha applications with Vite's build and development processes.
525
- *
526
- * @example
527
- * ```ts
528
- * import { defineConfig } from "vite";
529
- * import { viteAlepha } from "alepha/vite";
530
- *
531
- * export default defineConfig({
532
- * plugins: [viteAlepha()],
533
- * // other Vite configurations...
534
- * });
535
- * ```
536
- *
537
- * @module alepha.vite
538
- */
539
-
540
- //#endregion
541
- export { AlephaBuildMode, AlephaRunner, AlephaRunnerOptions, AlephaRunnerState, BufferedLogger, BuildClientOptions, BuildServerOptions, BuildServerResult, CopyAssetsOptions, GenerateCloudflareOptions, GenerateDockerOptions, GenerateExternalsOptions, GenerateSitemapOptions, GenerateVercelOptions, PrerenderPagesOptions, PrerenderPagesResult, VercelConfig, ViteAlephaBuildOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, boot, buildClient, buildServer, compressFile, copyAssets, createAlephaRunner, createBufferedLogger, defineConfig, generateCloudflare, generateDocker, generateExternals, generateSitemap, generateVercel, isViteInternalPath, prerenderPages, viteAlepha, viteAlephaBuild, viteAlephaDev, viteCompress };
542
- //# sourceMappingURL=index.d.cts.map