alepha 0.13.3 → 0.13.5

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 (138) hide show
  1. package/README.md +7 -7
  2. package/dist/api-files/index.browser.js +5 -5
  3. package/dist/api-files/index.d.ts +16 -16
  4. package/dist/api-files/index.js +9 -9
  5. package/dist/api-jobs/index.browser.js +5 -5
  6. package/dist/api-jobs/index.d.ts +17 -17
  7. package/dist/api-jobs/index.js +9 -9
  8. package/dist/api-notifications/index.browser.js +11 -11
  9. package/dist/api-notifications/index.d.ts +158 -158
  10. package/dist/api-notifications/index.js +11 -11
  11. package/dist/api-parameters/index.browser.js +2 -2
  12. package/dist/api-parameters/index.d.ts +3 -3
  13. package/dist/api-parameters/index.js +3 -3
  14. package/dist/api-users/index.browser.js +6 -6
  15. package/dist/api-users/index.d.ts +55 -55
  16. package/dist/api-users/index.js +36 -36
  17. package/dist/api-verifications/index.browser.js +5 -5
  18. package/dist/api-verifications/index.d.ts +9 -9
  19. package/dist/api-verifications/index.js +10 -10
  20. package/dist/batch/index.d.ts +3 -3
  21. package/dist/batch/index.js +3 -3
  22. package/dist/bin/index.js +1 -1
  23. package/dist/bucket/index.d.ts +6 -6
  24. package/dist/bucket/index.js +7 -7
  25. package/dist/cache/index.d.ts +4 -4
  26. package/dist/cache/index.js +5 -5
  27. package/dist/cache-redis/index.d.ts +2 -2
  28. package/dist/cache-redis/index.js +2 -2
  29. package/dist/cli/{dist-lGnqsKpu.js → dist-BlfFtOk2.js} +16 -16
  30. package/dist/cli/{dist-lGnqsKpu.js.map → dist-BlfFtOk2.js.map} +1 -1
  31. package/dist/cli/index.d.ts +31 -75
  32. package/dist/cli/index.js +94 -171
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/command/index.d.ts +8 -8
  35. package/dist/command/index.js +11 -10
  36. package/dist/command/index.js.map +1 -1
  37. package/dist/core/index.browser.js +40 -36
  38. package/dist/core/index.browser.js.map +1 -1
  39. package/dist/core/index.d.ts +255 -253
  40. package/dist/core/index.js +40 -36
  41. package/dist/core/index.js.map +1 -1
  42. package/dist/core/index.native.js +40 -36
  43. package/dist/core/index.native.js.map +1 -1
  44. package/dist/datetime/index.d.ts +3 -3
  45. package/dist/datetime/index.js +3 -3
  46. package/dist/email/index.d.ts +7 -7
  47. package/dist/email/index.js +42 -42
  48. package/dist/fake/index.d.ts +2 -2
  49. package/dist/fake/index.js +5 -5
  50. package/dist/file/index.d.ts +4 -4
  51. package/dist/file/index.js +4 -4
  52. package/dist/lock/index.d.ts +5 -5
  53. package/dist/lock/index.js +5 -5
  54. package/dist/lock-redis/index.d.ts +2 -2
  55. package/dist/lock-redis/index.js +2 -2
  56. package/dist/logger/index.d.ts +11 -11
  57. package/dist/logger/index.js +12 -12
  58. package/dist/orm/index.browser.js +12 -12
  59. package/dist/orm/index.d.ts +33 -33
  60. package/dist/orm/index.js +32 -32
  61. package/dist/queue/index.d.ts +7 -7
  62. package/dist/queue/index.js +6 -6
  63. package/dist/queue-redis/index.d.ts +2 -2
  64. package/dist/queue-redis/index.js +2 -2
  65. package/dist/redis/index.d.ts +13 -13
  66. package/dist/redis/index.js +3 -3
  67. package/dist/retry/index.d.ts +5 -5
  68. package/dist/retry/index.js +5 -5
  69. package/dist/router/index.d.ts +1 -1
  70. package/dist/router/index.js +1 -1
  71. package/dist/scheduler/index.d.ts +4 -4
  72. package/dist/scheduler/index.js +7 -7
  73. package/dist/security/index.browser.js +7 -7
  74. package/dist/security/index.d.ts +15 -15
  75. package/dist/security/index.js +46 -46
  76. package/dist/server/index.browser.js +14 -14
  77. package/dist/server/index.d.ts +26 -26
  78. package/dist/server/index.js +26 -26
  79. package/dist/server-auth/index.browser.js +6 -6
  80. package/dist/server-auth/index.d.ts +11 -11
  81. package/dist/server-auth/index.js +13 -13
  82. package/dist/server-cache/index.d.ts +2 -2
  83. package/dist/server-cache/index.js +2 -2
  84. package/dist/server-compress/index.d.ts +2 -2
  85. package/dist/server-compress/index.js +2 -2
  86. package/dist/server-cookies/index.browser.js +3 -3
  87. package/dist/server-cookies/index.d.ts +4 -4
  88. package/dist/server-cookies/index.js +4 -4
  89. package/dist/server-cors/index.d.ts +3 -3
  90. package/dist/server-cors/index.js +3 -3
  91. package/dist/server-health/index.d.ts +3 -3
  92. package/dist/server-health/index.js +3 -3
  93. package/dist/server-helmet/index.d.ts +2 -2
  94. package/dist/server-helmet/index.js +2 -2
  95. package/dist/server-links/index.browser.js +5 -5
  96. package/dist/server-links/index.d.ts +40 -40
  97. package/dist/server-links/index.js +7 -7
  98. package/dist/server-metrics/index.d.ts +2 -2
  99. package/dist/server-metrics/index.js +86 -86
  100. package/dist/server-multipart/index.d.ts +2 -2
  101. package/dist/server-multipart/index.js +2 -2
  102. package/dist/server-proxy/index.d.ts +3 -3
  103. package/dist/server-proxy/index.js +3 -3
  104. package/dist/server-rate-limit/index.d.ts +3 -3
  105. package/dist/server-rate-limit/index.js +3 -3
  106. package/dist/server-security/index.browser.js +1 -1
  107. package/dist/server-security/index.d.ts +4 -4
  108. package/dist/server-security/index.js +4 -4
  109. package/dist/server-static/index.d.ts +3 -3
  110. package/dist/server-static/index.js +3 -3
  111. package/dist/server-swagger/index.d.ts +3 -3
  112. package/dist/server-swagger/index.js +3 -3
  113. package/dist/sms/index.d.ts +6 -6
  114. package/dist/sms/index.js +6 -6
  115. package/dist/thread/index.d.ts +3 -3
  116. package/dist/thread/index.js +3 -3
  117. package/dist/topic/index.d.ts +6 -6
  118. package/dist/topic/index.js +6 -6
  119. package/dist/topic-redis/index.d.ts +2 -2
  120. package/dist/topic-redis/index.js +2 -2
  121. package/dist/vite/index.d.ts +17 -17
  122. package/dist/vite/index.js +20 -20
  123. package/dist/websocket/index.browser.js +9 -9
  124. package/dist/websocket/index.d.ts +17 -17
  125. package/dist/websocket/index.js +10 -10
  126. package/package.json +5 -4
  127. package/src/cli/apps/AlephaCli.ts +1 -2
  128. package/src/cli/commands/BiomeCommands.ts +4 -6
  129. package/src/cli/commands/CoreCommands.ts +2 -2
  130. package/src/cli/commands/DrizzleCommands.ts +76 -78
  131. package/src/cli/commands/VerifyCommands.ts +3 -5
  132. package/src/cli/commands/ViteCommands.ts +6 -8
  133. package/src/cli/index.ts +1 -1
  134. package/src/cli/services/{ProjectUtils.ts → AlephaCliUtils.ts} +101 -16
  135. package/src/command/providers/CliProvider.ts +12 -4
  136. package/src/core/Alepha.ts +14 -0
  137. package/src/core/primitives/$module.ts +1 -1
  138. package/src/cli/services/ProcessRunner.ts +0 -89
package/README.md CHANGED
@@ -19,6 +19,9 @@ Easy mode for building TypeScript applications.
19
19
  <a href="https://github.com/feunard/alepha"><img src="https://img.shields.io/github/stars/feunard/alepha.svg?style=social" alt="GitHub stars"/></a>
20
20
  </div>
21
21
 
22
+ > [!WARNING]
23
+ > **Early Development** — Alepha is under active development. The API is stabilizing but may change. First stable release planned for early 2026. Follow the repo to stay updated.
24
+
22
25
  ## What is this?
23
26
 
24
27
  Build API endpoints (Docker or Serverless), React applications (SSR, CSR or SSG), and more!
@@ -33,12 +36,7 @@ For more information, please visit the [documentation](https://feunard.github.io
33
36
 
34
37
  ## Examples
35
38
 
36
- We will show:
37
-
38
- - API endpoint with automatic OpenAPI documentation
39
- - Full-stack React application with server-side rendering
40
-
41
- ### Requirements
39
+ **Requirements**
42
40
 
43
41
  - [Node.js](https://nodejs.org/) v22 or higher
44
42
 
@@ -98,8 +96,10 @@ Run the development server:
98
96
 
99
97
  ```bash
100
98
  $ npx alepha dev
101
- # alepha dev comes with hot-reload and full TypeScript support, but you can also run:
99
+ # alepha dev comes with hot-reload and full TypeScript support
100
+ # but you can also run:
102
101
  $ node ./src/main.ts
102
+ $ bun ./src/main.ts
103
103
  ```
104
104
 
105
105
  Then, open your browser at `http://localhost:3000/docs/` and enjoy your automatically generated documentation.
@@ -1,7 +1,7 @@
1
1
  import { $module, t } from "alepha";
2
2
  import { $entity, pageQuerySchema, pg } from "alepha/orm";
3
3
 
4
- //#region src/api-files/entities/files.ts
4
+ //#region ../../src/api-files/entities/files.ts
5
5
  const files = $entity({
6
6
  name: "files",
7
7
  schema: t.object({
@@ -32,7 +32,7 @@ const files = $entity({
32
32
  });
33
33
 
34
34
  //#endregion
35
- //#region src/api-files/schemas/fileQuerySchema.ts
35
+ //#region ../../src/api-files/schemas/fileQuerySchema.ts
36
36
  const fileQuerySchema = t.extend(pageQuerySchema, {
37
37
  bucket: t.optional(t.string()),
38
38
  tags: t.optional(t.array(t.string())),
@@ -44,14 +44,14 @@ const fileQuerySchema = t.extend(pageQuerySchema, {
44
44
  });
45
45
 
46
46
  //#endregion
47
- //#region src/api-files/schemas/fileResourceSchema.ts
47
+ //#region ../../src/api-files/schemas/fileResourceSchema.ts
48
48
  const fileResourceSchema = t.extend(files.schema, {}, {
49
49
  title: "FileResource",
50
50
  description: "A file resource representing a file stored in the system."
51
51
  });
52
52
 
53
53
  //#endregion
54
- //#region src/api-files/schemas/storageStatsSchema.ts
54
+ //#region ../../src/api-files/schemas/storageStatsSchema.ts
55
55
  const bucketStatsSchema = t.object({
56
56
  bucket: t.string(),
57
57
  totalSize: t.number(),
@@ -69,7 +69,7 @@ const storageStatsSchema = t.object({
69
69
  });
70
70
 
71
71
  //#endregion
72
- //#region src/api-files/index.browser.ts
72
+ //#region ../../src/api-files/index.browser.ts
73
73
  const AlephaApiFiles = $module({
74
74
  name: "alepha.api.files",
75
75
  services: []
@@ -17,7 +17,7 @@ import "drizzle-orm/postgres-js";
17
17
  import "postgres";
18
18
  import "drizzle-orm/sqlite-core";
19
19
 
20
- //#region src/api-files/entities/files.d.ts
20
+ //#region ../../src/api-files/entities/files.d.ts
21
21
  declare const files: alepha_orm64.EntityPrimitive<alepha160.TObject<{
22
22
  id: alepha_orm64.PgAttr<alepha_orm64.PgAttr<alepha160.TString, typeof alepha_orm64.PG_PRIMARY_KEY>, typeof alepha_orm64.PG_DEFAULT>;
23
23
  version: alepha_orm64.PgAttr<alepha_orm64.PgAttr<alepha160.TInteger, typeof alepha_orm64.PG_VERSION>, typeof alepha_orm64.PG_DEFAULT>;
@@ -37,7 +37,7 @@ declare const files: alepha_orm64.EntityPrimitive<alepha160.TObject<{
37
37
  }>>;
38
38
  type FileEntity = Static<typeof files.schema>;
39
39
  //#endregion
40
- //#region src/api-files/schemas/fileQuerySchema.d.ts
40
+ //#region ../../src/api-files/schemas/fileQuerySchema.d.ts
41
41
  declare const fileQuerySchema: alepha160.TObject<{
42
42
  page: alepha160.TOptional<alepha160.TInteger>;
43
43
  size: alepha160.TOptional<alepha160.TInteger>;
@@ -52,7 +52,7 @@ declare const fileQuerySchema: alepha160.TObject<{
52
52
  }>;
53
53
  type FileQuery = Static<typeof fileQuerySchema>;
54
54
  //#endregion
55
- //#region src/orm/schemas/insertSchema.d.ts
55
+ //#region ../../src/orm/schemas/insertSchema.d.ts
56
56
  /**
57
57
  * Transforms a TObject schema for insert operations.
58
58
  * All default properties at the root level are made optional.
@@ -67,7 +67,7 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
67
67
  "~optional": true;
68
68
  } ? TOptional<T["properties"][K]> : T["properties"][K] }>;
69
69
  //#endregion
70
- //#region src/orm/schemas/updateSchema.d.ts
70
+ //#region ../../src/orm/schemas/updateSchema.d.ts
71
71
  /**
72
72
  * Transforms a TObject schema for update operations.
73
73
  * All optional properties at the root level are made nullable (i.e., `T | null`).
@@ -79,7 +79,7 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
79
79
  */
80
80
  type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
81
81
  //#endregion
82
- //#region src/orm/primitives/$entity.d.ts
82
+ //#region ../../src/orm/primitives/$entity.d.ts
83
83
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
84
84
  /**
85
85
  * The database table name that will be created for this entity.
@@ -212,7 +212,7 @@ type EntityColumn<T extends TObject> = {
212
212
  };
213
213
  type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
214
214
  //#endregion
215
- //#region src/orm/constants/PG_SYMBOLS.d.ts
215
+ //#region ../../src/orm/constants/PG_SYMBOLS.d.ts
216
216
  declare const PG_DEFAULT: unique symbol;
217
217
  declare const PG_PRIMARY_KEY: unique symbol;
218
218
  declare const PG_CREATED_AT: unique symbol;
@@ -262,13 +262,13 @@ interface PgRefOptions {
262
262
  };
263
263
  }
264
264
  //#endregion
265
- //#region src/orm/helpers/pgAttr.d.ts
265
+ //#region ../../src/orm/helpers/pgAttr.d.ts
266
266
  /**
267
267
  * Type representation.
268
268
  */
269
269
  type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
270
270
  //#endregion
271
- //#region src/orm/providers/drivers/NodePostgresProvider.d.ts
271
+ //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
272
272
  declare module "alepha" {
273
273
  interface Env extends Partial<Static<typeof envSchema>> {}
274
274
  }
@@ -289,7 +289,7 @@ declare const envSchema: alepha160.TObject<{
289
289
  POSTGRES_SCHEMA: alepha160.TOptional<alepha160.TString>;
290
290
  }>;
291
291
  //#endregion
292
- //#region src/orm/providers/drivers/NodeSqliteProvider.d.ts
292
+ //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
293
293
  /**
294
294
  * Configuration options for the Node.js SQLite database provider.
295
295
  */
@@ -309,7 +309,7 @@ declare module "alepha" {
309
309
  * This is NOT recommended for production use.
310
310
  */
311
311
  //#endregion
312
- //#region src/orm/index.d.ts
312
+ //#region ../../src/orm/index.d.ts
313
313
  declare module "alepha" {
314
314
  interface Hooks {
315
315
  /**
@@ -377,7 +377,7 @@ declare module "alepha" {
377
377
  }
378
378
  }
379
379
  //#endregion
380
- //#region src/api-files/schemas/fileResourceSchema.d.ts
380
+ //#region ../../src/api-files/schemas/fileResourceSchema.d.ts
381
381
  declare const fileResourceSchema: alepha160.TObject<{
382
382
  id: PgAttr<PgAttr<alepha160.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
383
383
  version: PgAttr<PgAttr<alepha160.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
@@ -397,7 +397,7 @@ declare const fileResourceSchema: alepha160.TObject<{
397
397
  }>;
398
398
  type FileResource = Static<typeof fileResourceSchema>;
399
399
  //#endregion
400
- //#region src/api-files/schemas/storageStatsSchema.d.ts
400
+ //#region ../../src/api-files/schemas/storageStatsSchema.d.ts
401
401
  declare const bucketStatsSchema: alepha160.TObject<{
402
402
  bucket: alepha160.TString;
403
403
  totalSize: alepha160.TNumber;
@@ -424,7 +424,7 @@ type BucketStats = Static<typeof bucketStatsSchema>;
424
424
  type MimeTypeStats = Static<typeof mimeTypeStatsSchema>;
425
425
  type StorageStats = Static<typeof storageStatsSchema>;
426
426
  //#endregion
427
- //#region src/api-files/services/FileService.d.ts
427
+ //#region ../../src/api-files/services/FileService.d.ts
428
428
  declare class FileService {
429
429
  protected readonly alepha: Alepha;
430
430
  protected readonly log: alepha_logger0.Logger;
@@ -568,7 +568,7 @@ declare class FileService {
568
568
  entityToResource(entity: FileEntity): FileResource;
569
569
  }
570
570
  //#endregion
571
- //#region src/api-files/controllers/FileController.d.ts
571
+ //#region ../../src/api-files/controllers/FileController.d.ts
572
572
  /**
573
573
  * REST API controller for file management operations.
574
574
  * Provides endpoints for uploading, downloading, listing, and deleting files.
@@ -701,7 +701,7 @@ declare class FileController {
701
701
  }>;
702
702
  }
703
703
  //#endregion
704
- //#region src/api-files/controllers/StorageStatsController.d.ts
704
+ //#region ../../src/api-files/controllers/StorageStatsController.d.ts
705
705
  /**
706
706
  * REST API controller for storage analytics and statistics.
707
707
  * Provides endpoints for viewing storage usage metrics.
@@ -732,7 +732,7 @@ declare class StorageStatsController {
732
732
  }>;
733
733
  }
734
734
  //#endregion
735
- //#region src/api-files/index.d.ts
735
+ //#region ../../src/api-files/index.d.ts
736
736
  declare module "alepha/bucket" {
737
737
  interface BucketFileOptions {
738
738
  /**
@@ -10,7 +10,7 @@ import { $logger } from "alepha/logger";
10
10
  import "alepha/server/security";
11
11
  import { $scheduler } from "alepha/scheduler";
12
12
 
13
- //#region src/api-files/schemas/fileQuerySchema.ts
13
+ //#region ../../src/api-files/schemas/fileQuerySchema.ts
14
14
  const fileQuerySchema = t.extend(pageQuerySchema, {
15
15
  bucket: t.optional(t.string()),
16
16
  tags: t.optional(t.array(t.string())),
@@ -22,7 +22,7 @@ const fileQuerySchema = t.extend(pageQuerySchema, {
22
22
  });
23
23
 
24
24
  //#endregion
25
- //#region src/api-files/entities/files.ts
25
+ //#region ../../src/api-files/entities/files.ts
26
26
  const files = $entity({
27
27
  name: "files",
28
28
  schema: t.object({
@@ -53,14 +53,14 @@ const files = $entity({
53
53
  });
54
54
 
55
55
  //#endregion
56
- //#region src/api-files/schemas/fileResourceSchema.ts
56
+ //#region ../../src/api-files/schemas/fileResourceSchema.ts
57
57
  const fileResourceSchema = t.extend(files.schema, {}, {
58
58
  title: "FileResource",
59
59
  description: "A file resource representing a file stored in the system."
60
60
  });
61
61
 
62
62
  //#endregion
63
- //#region src/api-files/services/FileService.ts
63
+ //#region ../../src/api-files/services/FileService.ts
64
64
  var FileService = class {
65
65
  alepha = $inject(Alepha);
66
66
  log = $logger();
@@ -322,7 +322,7 @@ var FileService = class {
322
322
  };
323
323
 
324
324
  //#endregion
325
- //#region src/api-files/controllers/FileController.ts
325
+ //#region ../../src/api-files/controllers/FileController.ts
326
326
  /**
327
327
  * REST API controller for file management operations.
328
328
  * Provides endpoints for uploading, downloading, listing, and deleting files.
@@ -430,7 +430,7 @@ var FileController = class {
430
430
  };
431
431
 
432
432
  //#endregion
433
- //#region src/api-files/schemas/storageStatsSchema.ts
433
+ //#region ../../src/api-files/schemas/storageStatsSchema.ts
434
434
  const bucketStatsSchema = t.object({
435
435
  bucket: t.string(),
436
436
  totalSize: t.number(),
@@ -448,7 +448,7 @@ const storageStatsSchema = t.object({
448
448
  });
449
449
 
450
450
  //#endregion
451
- //#region src/api-files/controllers/StorageStatsController.ts
451
+ //#region ../../src/api-files/controllers/StorageStatsController.ts
452
452
  /**
453
453
  * REST API controller for storage analytics and statistics.
454
454
  * Provides endpoints for viewing storage usage metrics.
@@ -472,7 +472,7 @@ var StorageStatsController = class {
472
472
  };
473
473
 
474
474
  //#endregion
475
- //#region src/api-files/jobs/FileJobs.ts
475
+ //#region ../../src/api-files/jobs/FileJobs.ts
476
476
  var FileJobs = class {
477
477
  fileService = $inject(FileService);
478
478
  purgeFiles = $scheduler({
@@ -486,7 +486,7 @@ var FileJobs = class {
486
486
  };
487
487
 
488
488
  //#endregion
489
- //#region src/api-files/index.ts
489
+ //#region ../../src/api-files/index.ts
490
490
  /**
491
491
  * Provides file management API endpoints for Alepha applications.
492
492
  *
@@ -2,7 +2,7 @@ import { $module, t } from "alepha";
2
2
  import { logEntrySchema } from "alepha/logger";
3
3
  import { $entity, pageQuerySchema, pg } from "alepha/orm";
4
4
 
5
- //#region src/api-jobs/entities/jobExecutions.ts
5
+ //#region ../../src/api-jobs/entities/jobExecutions.ts
6
6
  const jobExecutions = $entity({
7
7
  name: "job_executions",
8
8
  schema: t.object({
@@ -23,7 +23,7 @@ const jobExecutions = $entity({
23
23
  });
24
24
 
25
25
  //#endregion
26
- //#region src/api-jobs/schemas/jobExecutionQuerySchema.ts
26
+ //#region ../../src/api-jobs/schemas/jobExecutionQuerySchema.ts
27
27
  const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
28
28
  status: t.optional(t.enum([
29
29
  "STARTED",
@@ -34,18 +34,18 @@ const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/api-jobs/schemas/jobExecutionResourceSchema.ts
37
+ //#region ../../src/api-jobs/schemas/jobExecutionResourceSchema.ts
38
38
  const jobExecutionResourceSchema = t.extend(jobExecutions.schema, {}, {
39
39
  title: "JobExecutionResource",
40
40
  description: "A job execution resource representing the execution details of a job."
41
41
  });
42
42
 
43
43
  //#endregion
44
- //#region src/api-jobs/schemas/triggerJobSchema.ts
44
+ //#region ../../src/api-jobs/schemas/triggerJobSchema.ts
45
45
  const triggerJobSchema = t.object({ name: t.string() });
46
46
 
47
47
  //#endregion
48
- //#region src/api-jobs/index.browser.ts
48
+ //#region ../../src/api-jobs/index.browser.ts
49
49
  const AlephaApiJobs = $module({
50
50
  name: "alepha.api.jobs",
51
51
  services: []
@@ -13,7 +13,7 @@ import "drizzle-orm/postgres-js";
13
13
  import "postgres";
14
14
  import "drizzle-orm/sqlite-core";
15
15
 
16
- //#region src/orm/schemas/insertSchema.d.ts
16
+ //#region ../../src/orm/schemas/insertSchema.d.ts
17
17
  /**
18
18
  * Transforms a TObject schema for insert operations.
19
19
  * All default properties at the root level are made optional.
@@ -28,7 +28,7 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
28
28
  "~optional": true;
29
29
  } ? TOptional<T["properties"][K]> : T["properties"][K] }>;
30
30
  //#endregion
31
- //#region src/orm/schemas/updateSchema.d.ts
31
+ //#region ../../src/orm/schemas/updateSchema.d.ts
32
32
  /**
33
33
  * Transforms a TObject schema for update operations.
34
34
  * All optional properties at the root level are made nullable (i.e., `T | null`).
@@ -40,7 +40,7 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
40
40
  */
41
41
  type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
42
42
  //#endregion
43
- //#region src/orm/primitives/$entity.d.ts
43
+ //#region ../../src/orm/primitives/$entity.d.ts
44
44
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
45
45
  /**
46
46
  * The database table name that will be created for this entity.
@@ -173,7 +173,7 @@ type EntityColumn<T extends TObject> = {
173
173
  };
174
174
  type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
175
175
  //#endregion
176
- //#region src/orm/constants/PG_SYMBOLS.d.ts
176
+ //#region ../../src/orm/constants/PG_SYMBOLS.d.ts
177
177
  declare const PG_DEFAULT: unique symbol;
178
178
  declare const PG_PRIMARY_KEY: unique symbol;
179
179
  declare const PG_CREATED_AT: unique symbol;
@@ -223,13 +223,13 @@ interface PgRefOptions {
223
223
  };
224
224
  }
225
225
  //#endregion
226
- //#region src/orm/helpers/pgAttr.d.ts
226
+ //#region ../../src/orm/helpers/pgAttr.d.ts
227
227
  /**
228
228
  * Type representation.
229
229
  */
230
230
  type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
231
231
  //#endregion
232
- //#region src/orm/providers/drivers/NodePostgresProvider.d.ts
232
+ //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
233
233
  declare module "alepha" {
234
234
  interface Env extends Partial<Static<typeof envSchema$1>> {}
235
235
  }
@@ -250,7 +250,7 @@ declare const envSchema$1: alepha224.TObject<{
250
250
  POSTGRES_SCHEMA: alepha224.TOptional<alepha224.TString>;
251
251
  }>;
252
252
  //#endregion
253
- //#region src/orm/providers/drivers/NodeSqliteProvider.d.ts
253
+ //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
254
254
  /**
255
255
  * Configuration options for the Node.js SQLite database provider.
256
256
  */
@@ -270,7 +270,7 @@ declare module "alepha" {
270
270
  * This is NOT recommended for production use.
271
271
  */
272
272
  //#endregion
273
- //#region src/orm/index.d.ts
273
+ //#region ../../src/orm/index.d.ts
274
274
  declare module "alepha" {
275
275
  interface Hooks {
276
276
  /**
@@ -338,7 +338,7 @@ declare module "alepha" {
338
338
  }
339
339
  }
340
340
  //#endregion
341
- //#region src/api-jobs/schemas/jobExecutionQuerySchema.d.ts
341
+ //#region ../../src/api-jobs/schemas/jobExecutionQuerySchema.d.ts
342
342
  declare const jobExecutionQuerySchema: alepha224.TObject<{
343
343
  page: alepha224.TOptional<alepha224.TInteger>;
344
344
  size: alepha224.TOptional<alepha224.TInteger>;
@@ -348,7 +348,7 @@ declare const jobExecutionQuerySchema: alepha224.TObject<{
348
348
  }>;
349
349
  type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
350
350
  //#endregion
351
- //#region src/api-jobs/services/JobService.d.ts
351
+ //#region ../../src/api-jobs/services/JobService.d.ts
352
352
  declare class JobService {
353
353
  protected readonly alepha: Alepha;
354
354
  protected readonly executionRepository: alepha_orm0.Repository<alepha224.TObject<{
@@ -416,7 +416,7 @@ declare class JobService {
416
416
  }>;
417
417
  }
418
418
  //#endregion
419
- //#region src/api-jobs/controllers/JobController.d.ts
419
+ //#region ../../src/api-jobs/controllers/JobController.d.ts
420
420
  declare class JobController {
421
421
  protected readonly url: string;
422
422
  protected readonly group: string;
@@ -465,7 +465,7 @@ declare class JobController {
465
465
  }>;
466
466
  }
467
467
  //#endregion
468
- //#region src/api-jobs/entities/jobExecutions.d.ts
468
+ //#region ../../src/api-jobs/entities/jobExecutions.d.ts
469
469
  declare const jobExecutions: alepha_orm0.EntityPrimitive<alepha224.TObject<{
470
470
  id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha224.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
471
471
  version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha224.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
@@ -488,7 +488,7 @@ declare const jobExecutions: alepha_orm0.EntityPrimitive<alepha224.TObject<{
488
488
  }>>;
489
489
  type JobExecutionEntity = Static<typeof jobExecutions.schema>;
490
490
  //#endregion
491
- //#region src/api-jobs/providers/JobProvider.d.ts
491
+ //#region ../../src/api-jobs/providers/JobProvider.d.ts
492
492
  declare const envSchema: alepha224.TObject<{
493
493
  JOB_PREFIX: alepha224.TOptional<alepha224.TString>;
494
494
  }>;
@@ -589,7 +589,7 @@ interface JobRegistration {
589
589
  lockPrimitive: LockPrimitive<() => Promise<void>> | null;
590
590
  }
591
591
  //#endregion
592
- //#region src/api-jobs/primitives/$job.d.ts
592
+ //#region ../../src/api-jobs/primitives/$job.d.ts
593
593
  /**
594
594
  * Job primitive - a drop-in replacement for $scheduler with built-in execution tracking.
595
595
  */
@@ -613,7 +613,7 @@ interface JobHandlerArguments {
613
613
  now: DateTime;
614
614
  }
615
615
  //#endregion
616
- //#region src/api-jobs/schemas/jobExecutionResourceSchema.d.ts
616
+ //#region ../../src/api-jobs/schemas/jobExecutionResourceSchema.d.ts
617
617
  declare const jobExecutionResourceSchema: alepha224.TObject<{
618
618
  id: PgAttr<PgAttr<alepha224.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
619
619
  version: PgAttr<PgAttr<alepha224.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
@@ -636,13 +636,13 @@ declare const jobExecutionResourceSchema: alepha224.TObject<{
636
636
  }>;
637
637
  type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
638
638
  //#endregion
639
- //#region src/api-jobs/schemas/triggerJobSchema.d.ts
639
+ //#region ../../src/api-jobs/schemas/triggerJobSchema.d.ts
640
640
  declare const triggerJobSchema: alepha224.TObject<{
641
641
  name: alepha224.TString;
642
642
  }>;
643
643
  type TriggerJob = Static<typeof triggerJobSchema>;
644
644
  //#endregion
645
- //#region src/api-jobs/index.d.ts
645
+ //#region ../../src/api-jobs/index.d.ts
646
646
  /**
647
647
  * Provides job management API endpoints for Alepha applications.
648
648
  *
@@ -6,7 +6,7 @@ import { DateTimeProvider } from "alepha/datetime";
6
6
  import { $lock } from "alepha/lock";
7
7
  import { CronProvider } from "alepha/scheduler";
8
8
 
9
- //#region src/api-jobs/schemas/jobExecutionQuerySchema.ts
9
+ //#region ../../src/api-jobs/schemas/jobExecutionQuerySchema.ts
10
10
  const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
11
11
  status: t.optional(t.enum([
12
12
  "STARTED",
@@ -17,7 +17,7 @@ const jobExecutionQuerySchema = t.extend(pageQuerySchema, {
17
17
  });
18
18
 
19
19
  //#endregion
20
- //#region src/api-jobs/entities/jobExecutions.ts
20
+ //#region ../../src/api-jobs/entities/jobExecutions.ts
21
21
  const jobExecutions = $entity({
22
22
  name: "job_executions",
23
23
  schema: t.object({
@@ -38,18 +38,18 @@ const jobExecutions = $entity({
38
38
  });
39
39
 
40
40
  //#endregion
41
- //#region src/api-jobs/schemas/jobExecutionResourceSchema.ts
41
+ //#region ../../src/api-jobs/schemas/jobExecutionResourceSchema.ts
42
42
  const jobExecutionResourceSchema = t.extend(jobExecutions.schema, {}, {
43
43
  title: "JobExecutionResource",
44
44
  description: "A job execution resource representing the execution details of a job."
45
45
  });
46
46
 
47
47
  //#endregion
48
- //#region src/api-jobs/schemas/triggerJobSchema.ts
48
+ //#region ../../src/api-jobs/schemas/triggerJobSchema.ts
49
49
  const triggerJobSchema = t.object({ name: t.string() });
50
50
 
51
51
  //#endregion
52
- //#region src/api-jobs/providers/JobProvider.ts
52
+ //#region ../../src/api-jobs/providers/JobProvider.ts
53
53
  const envSchema = t.object({ JOB_PREFIX: t.optional(t.text({ description: "Prefix for job lock keys" })) });
54
54
  /**
55
55
  * Provider for job management and execution.
@@ -161,7 +161,7 @@ var JobProvider = class {
161
161
  };
162
162
 
163
163
  //#endregion
164
- //#region src/api-jobs/primitives/$job.ts
164
+ //#region ../../src/api-jobs/primitives/$job.ts
165
165
  /**
166
166
  * Job primitive - a drop-in replacement for $scheduler with built-in execution tracking.
167
167
  */
@@ -186,7 +186,7 @@ var JobPrimitive = class extends Primitive {
186
186
  $job[KIND] = JobPrimitive;
187
187
 
188
188
  //#endregion
189
- //#region src/api-jobs/services/JobService.ts
189
+ //#region ../../src/api-jobs/services/JobService.ts
190
190
  var JobService = class {
191
191
  alepha = $inject(Alepha);
192
192
  executionRepository = $repository(jobExecutions);
@@ -209,7 +209,7 @@ var JobService = class {
209
209
  };
210
210
 
211
211
  //#endregion
212
- //#region src/api-jobs/controllers/JobController.ts
212
+ //#region ../../src/api-jobs/controllers/JobController.ts
213
213
  var JobController = class {
214
214
  url = "/jobs";
215
215
  group = "jobs";
@@ -242,7 +242,7 @@ var JobController = class {
242
242
  };
243
243
 
244
244
  //#endregion
245
- //#region src/api-jobs/index.ts
245
+ //#region ../../src/api-jobs/index.ts
246
246
  /**
247
247
  * Provides job management API endpoints for Alepha applications.
248
248
  *
@@ -8,7 +8,7 @@ import { $queue } from "alepha/queue";
8
8
  import { EmailProvider } from "alepha/email";
9
9
  import { SmsProvider } from "alepha/sms";
10
10
 
11
- //#region src/api-notifications/entities/notifications.ts
11
+ //#region ../../src/api-notifications/entities/notifications.ts
12
12
  const notifications = $entity({
13
13
  name: "notifications",
14
14
  schema: t.object({
@@ -34,7 +34,7 @@ const notifications = $entity({
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/api-notifications/schemas/notificationQuerySchema.ts
37
+ //#region ../../src/api-notifications/schemas/notificationQuerySchema.ts
38
38
  const notificationQuerySchema = t.extend(pageQuerySchema, {
39
39
  type: t.optional(t.enum(["email", "sms"])),
40
40
  template: t.optional(t.string()),
@@ -48,7 +48,7 @@ const notificationQuerySchema = t.extend(pageQuerySchema, {
48
48
  });
49
49
 
50
50
  //#endregion
51
- //#region src/api-notifications/primitives/$notification.ts
51
+ //#region ../../src/api-notifications/primitives/$notification.ts
52
52
  /**
53
53
  * Creates a notification primitive for managing email/SMS notification templates.
54
54
  *
@@ -97,7 +97,7 @@ var NotificationPrimitive = class extends Primitive {
97
97
  $notification[KIND] = NotificationPrimitive;
98
98
 
99
99
  //#endregion
100
- //#region src/api-notifications/services/NotificationSenderService.ts
100
+ //#region ../../src/api-notifications/services/NotificationSenderService.ts
101
101
  var NotificationSenderService = class {
102
102
  alepha = $inject(Alepha);
103
103
  log = $logger();
@@ -225,7 +225,7 @@ var NotificationSenderService = class {
225
225
  };
226
226
 
227
227
  //#endregion
228
- //#region src/api-notifications/queues/NotificationQueues.ts
228
+ //#region ../../src/api-notifications/queues/NotificationQueues.ts
229
229
  var NotificationQueues = class {
230
230
  notificationSenderService = $inject(NotificationSenderService);
231
231
  processNotification = $queue({
@@ -238,7 +238,7 @@ var NotificationQueues = class {
238
238
  };
239
239
 
240
240
  //#endregion
241
- //#region src/api-notifications/schemas/notificationCreateSchema.ts
241
+ //#region ../../src/api-notifications/schemas/notificationCreateSchema.ts
242
242
  const notificationCreateSchema = t.pick(notifications.schema, [
243
243
  "type",
244
244
  "contact",
@@ -247,7 +247,7 @@ const notificationCreateSchema = t.pick(notifications.schema, [
247
247
  ]);
248
248
 
249
249
  //#endregion
250
- //#region src/api-notifications/services/NotificationService.ts
250
+ //#region ../../src/api-notifications/services/NotificationService.ts
251
251
  const notificationServiceEnvSchema = t.object({ NOTIFICATION_QUEUE: t.optional(t.boolean({ description: "If true, notifications will be queued instead of sent immediately" })) });
252
252
  var NotificationService = class {
253
253
  alepha = $inject(Alepha);
@@ -333,7 +333,7 @@ var NotificationService = class {
333
333
  };
334
334
 
335
335
  //#endregion
336
- //#region src/api-notifications/controllers/NotificationController.ts
336
+ //#region ../../src/api-notifications/controllers/NotificationController.ts
337
337
  var NotificationController = class {
338
338
  url = "/notifications";
339
339
  group = "notifications";
@@ -354,14 +354,14 @@ var NotificationController = class {
354
354
  };
355
355
 
356
356
  //#endregion
357
- //#region src/api-notifications/schemas/notificationContactPreferencesSchema.ts
357
+ //#region ../../src/api-notifications/schemas/notificationContactPreferencesSchema.ts
358
358
  const notificationContactPreferencesSchema = t.object({
359
359
  language: t.optional(t.text()),
360
360
  exclude: t.array(t.text())
361
361
  });
362
362
 
363
363
  //#endregion
364
- //#region src/api-notifications/schemas/notificationContactSchema.ts
364
+ //#region ../../src/api-notifications/schemas/notificationContactSchema.ts
365
365
  const notificationContactSchema = t.object({
366
366
  email: t.optional(t.email()),
367
367
  phoneNumber: t.optional(t.e164()),
@@ -371,7 +371,7 @@ const notificationContactSchema = t.object({
371
371
  });
372
372
 
373
373
  //#endregion
374
- //#region src/api-notifications/index.browser.ts
374
+ //#region ../../src/api-notifications/index.browser.ts
375
375
  const AlephaApiNotifications = $module({
376
376
  name: "alepha.api.notifications",
377
377
  services: []