alepha 0.13.4 → 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 (132) hide show
  1. package/dist/api-files/index.browser.js +5 -5
  2. package/dist/api-files/index.d.ts +191 -191
  3. package/dist/api-files/index.js +9 -9
  4. package/dist/api-jobs/index.browser.js +5 -5
  5. package/dist/api-jobs/index.d.ts +173 -173
  6. package/dist/api-jobs/index.js +9 -9
  7. package/dist/api-notifications/index.browser.js +11 -11
  8. package/dist/api-notifications/index.d.ts +11 -11
  9. package/dist/api-notifications/index.js +11 -11
  10. package/dist/api-parameters/index.browser.js +2 -2
  11. package/dist/api-parameters/index.d.ts +3 -3
  12. package/dist/api-parameters/index.js +3 -3
  13. package/dist/api-users/index.browser.js +6 -6
  14. package/dist/api-users/index.d.ts +55 -55
  15. package/dist/api-users/index.js +36 -36
  16. package/dist/api-verifications/index.browser.js +5 -5
  17. package/dist/api-verifications/index.d.ts +21 -21
  18. package/dist/api-verifications/index.js +10 -10
  19. package/dist/batch/index.d.ts +3 -3
  20. package/dist/batch/index.js +3 -3
  21. package/dist/bin/index.js +1 -1
  22. package/dist/bucket/index.d.ts +6 -6
  23. package/dist/bucket/index.js +7 -7
  24. package/dist/cache/index.d.ts +4 -4
  25. package/dist/cache/index.js +5 -5
  26. package/dist/cache-redis/index.d.ts +2 -2
  27. package/dist/cache-redis/index.js +2 -2
  28. package/dist/cli/{dist-lGnqsKpu.js → dist-BlfFtOk2.js} +16 -16
  29. package/dist/cli/{dist-lGnqsKpu.js.map → dist-BlfFtOk2.js.map} +1 -1
  30. package/dist/cli/index.d.ts +31 -75
  31. package/dist/cli/index.js +94 -171
  32. package/dist/cli/index.js.map +1 -1
  33. package/dist/command/index.d.ts +8 -8
  34. package/dist/command/index.js +11 -10
  35. package/dist/command/index.js.map +1 -1
  36. package/dist/core/index.browser.js +35 -35
  37. package/dist/core/index.d.ts +39 -39
  38. package/dist/core/index.js +35 -35
  39. package/dist/core/index.native.js +35 -35
  40. package/dist/datetime/index.d.ts +3 -3
  41. package/dist/datetime/index.js +3 -3
  42. package/dist/email/index.d.ts +11 -11
  43. package/dist/email/index.js +42 -42
  44. package/dist/fake/index.d.ts +2 -2
  45. package/dist/fake/index.js +5 -5
  46. package/dist/file/index.d.ts +4 -4
  47. package/dist/file/index.js +4 -4
  48. package/dist/lock/index.d.ts +5 -5
  49. package/dist/lock/index.js +5 -5
  50. package/dist/lock-redis/index.d.ts +2 -2
  51. package/dist/lock-redis/index.js +2 -2
  52. package/dist/logger/index.d.ts +11 -11
  53. package/dist/logger/index.js +12 -12
  54. package/dist/orm/index.browser.js +12 -12
  55. package/dist/orm/index.d.ts +52 -52
  56. package/dist/orm/index.js +32 -32
  57. package/dist/queue/index.d.ts +7 -7
  58. package/dist/queue/index.js +6 -6
  59. package/dist/queue-redis/index.d.ts +2 -2
  60. package/dist/queue-redis/index.js +2 -2
  61. package/dist/redis/index.d.ts +13 -13
  62. package/dist/redis/index.js +3 -3
  63. package/dist/retry/index.d.ts +5 -5
  64. package/dist/retry/index.js +5 -5
  65. package/dist/router/index.d.ts +1 -1
  66. package/dist/router/index.js +1 -1
  67. package/dist/scheduler/index.d.ts +4 -4
  68. package/dist/scheduler/index.js +7 -7
  69. package/dist/security/index.browser.js +7 -7
  70. package/dist/security/index.d.ts +15 -15
  71. package/dist/security/index.js +46 -46
  72. package/dist/server/index.browser.js +14 -14
  73. package/dist/server/index.d.ts +26 -26
  74. package/dist/server/index.js +26 -26
  75. package/dist/server-auth/index.browser.js +6 -6
  76. package/dist/server-auth/index.d.ts +163 -163
  77. package/dist/server-auth/index.js +13 -13
  78. package/dist/server-cache/index.d.ts +2 -2
  79. package/dist/server-cache/index.js +2 -2
  80. package/dist/server-compress/index.d.ts +2 -2
  81. package/dist/server-compress/index.js +2 -2
  82. package/dist/server-cookies/index.browser.js +3 -3
  83. package/dist/server-cookies/index.d.ts +4 -4
  84. package/dist/server-cookies/index.js +4 -4
  85. package/dist/server-cors/index.d.ts +3 -3
  86. package/dist/server-cors/index.js +3 -3
  87. package/dist/server-health/index.d.ts +3 -3
  88. package/dist/server-health/index.js +3 -3
  89. package/dist/server-helmet/index.d.ts +2 -2
  90. package/dist/server-helmet/index.js +2 -2
  91. package/dist/server-links/index.browser.js +5 -5
  92. package/dist/server-links/index.d.ts +40 -40
  93. package/dist/server-links/index.js +7 -7
  94. package/dist/server-metrics/index.d.ts +2 -2
  95. package/dist/server-metrics/index.js +86 -86
  96. package/dist/server-multipart/index.d.ts +2 -2
  97. package/dist/server-multipart/index.js +2 -2
  98. package/dist/server-proxy/index.d.ts +3 -3
  99. package/dist/server-proxy/index.js +3 -3
  100. package/dist/server-rate-limit/index.d.ts +3 -3
  101. package/dist/server-rate-limit/index.js +3 -3
  102. package/dist/server-security/index.browser.js +1 -1
  103. package/dist/server-security/index.d.ts +13 -13
  104. package/dist/server-security/index.js +4 -4
  105. package/dist/server-static/index.d.ts +3 -3
  106. package/dist/server-static/index.js +3 -3
  107. package/dist/server-swagger/index.d.ts +3 -3
  108. package/dist/server-swagger/index.js +3 -3
  109. package/dist/sms/index.d.ts +6 -6
  110. package/dist/sms/index.js +6 -6
  111. package/dist/thread/index.d.ts +3 -3
  112. package/dist/thread/index.js +3 -3
  113. package/dist/topic/index.d.ts +6 -6
  114. package/dist/topic/index.js +6 -6
  115. package/dist/topic-redis/index.d.ts +2 -2
  116. package/dist/topic-redis/index.js +2 -2
  117. package/dist/vite/index.d.ts +17 -17
  118. package/dist/vite/index.js +20 -20
  119. package/dist/websocket/index.browser.js +9 -9
  120. package/dist/websocket/index.d.ts +17 -17
  121. package/dist/websocket/index.js +10 -10
  122. package/package.json +5 -4
  123. package/src/cli/apps/AlephaCli.ts +1 -2
  124. package/src/cli/commands/BiomeCommands.ts +4 -6
  125. package/src/cli/commands/CoreCommands.ts +2 -2
  126. package/src/cli/commands/DrizzleCommands.ts +76 -78
  127. package/src/cli/commands/VerifyCommands.ts +3 -5
  128. package/src/cli/commands/ViteCommands.ts +6 -8
  129. package/src/cli/index.ts +1 -1
  130. package/src/cli/services/{ProjectUtils.ts → AlephaCliUtils.ts} +101 -16
  131. package/src/command/providers/CliProvider.ts +12 -4
  132. package/src/cli/services/ProcessRunner.ts +0 -89
@@ -16,14 +16,14 @@ import { $authCredentials, $authGithub, $authGoogle, ServerAuthProvider, authent
16
16
  import { FileSystemProvider } from "alepha/file";
17
17
  import { AlephaApiFiles } from "alepha/api/files";
18
18
 
19
- //#region src/api-users/schemas/identityQuerySchema.ts
19
+ //#region ../../src/api-users/schemas/identityQuerySchema.ts
20
20
  const identityQuerySchema = t.extend(pageQuerySchema, {
21
21
  userId: t.optional(t.uuid()),
22
22
  provider: t.optional(t.string())
23
23
  });
24
24
 
25
25
  //#endregion
26
- //#region src/api-users/entities/users.ts
26
+ //#region ../../src/api-users/entities/users.ts
27
27
  const DEFAULT_USER_REALM_NAME = "default";
28
28
  const users = $entity({
29
29
  name: "users",
@@ -64,7 +64,7 @@ const users = $entity({
64
64
  });
65
65
 
66
66
  //#endregion
67
- //#region src/api-users/entities/identities.ts
67
+ //#region ../../src/api-users/entities/identities.ts
68
68
  const identities = $entity({
69
69
  name: "identities",
70
70
  schema: t.object({
@@ -81,11 +81,11 @@ const identities = $entity({
81
81
  });
82
82
 
83
83
  //#endregion
84
- //#region src/api-users/schemas/identityResourceSchema.ts
84
+ //#region ../../src/api-users/schemas/identityResourceSchema.ts
85
85
  const identityResourceSchema = t.omit(identities.schema, ["password"]);
86
86
 
87
87
  //#endregion
88
- //#region src/api-users/entities/sessions.ts
88
+ //#region ../../src/api-users/entities/sessions.ts
89
89
  const sessions = $entity({
90
90
  name: "sessions",
91
91
  schema: t.object({
@@ -110,7 +110,7 @@ const sessions = $entity({
110
110
  });
111
111
 
112
112
  //#endregion
113
- //#region src/api-users/providers/UserRealmProvider.ts
113
+ //#region ../../src/api-users/providers/UserRealmProvider.ts
114
114
  var UserRealmProvider = class {
115
115
  alepha = $inject(Alepha);
116
116
  defaultIdentities = $repository(identities);
@@ -178,7 +178,7 @@ var UserRealmProvider = class {
178
178
  };
179
179
 
180
180
  //#endregion
181
- //#region src/api-users/services/IdentityService.ts
181
+ //#region ../../src/api-users/services/IdentityService.ts
182
182
  var IdentityService = class {
183
183
  log = $logger();
184
184
  userRealmProvider = $inject(UserRealmProvider);
@@ -239,7 +239,7 @@ var IdentityService = class {
239
239
  };
240
240
 
241
241
  //#endregion
242
- //#region src/api-users/controllers/IdentityController.ts
242
+ //#region ../../src/api-users/controllers/IdentityController.ts
243
243
  var IdentityController = class {
244
244
  url = "/identities";
245
245
  group = "identities";
@@ -298,11 +298,11 @@ var IdentityController = class {
298
298
  };
299
299
 
300
300
  //#endregion
301
- //#region src/api-users/schemas/sessionQuerySchema.ts
301
+ //#region ../../src/api-users/schemas/sessionQuerySchema.ts
302
302
  const sessionQuerySchema = t.extend(pageQuerySchema, { userId: t.optional(t.uuid()) });
303
303
 
304
304
  //#endregion
305
- //#region src/api-users/schemas/sessionResourceSchema.ts
305
+ //#region ../../src/api-users/schemas/sessionResourceSchema.ts
306
306
  const sessionResourceSchema = t.object({
307
307
  id: t.uuid(),
308
308
  version: t.number(),
@@ -324,7 +324,7 @@ const sessionResourceSchema = t.object({
324
324
  });
325
325
 
326
326
  //#endregion
327
- //#region src/api-users/services/SessionCrudService.ts
327
+ //#region ../../src/api-users/services/SessionCrudService.ts
328
328
  var SessionCrudService = class {
329
329
  log = $logger();
330
330
  userRealmProvider = $inject(UserRealmProvider);
@@ -379,7 +379,7 @@ var SessionCrudService = class {
379
379
  };
380
380
 
381
381
  //#endregion
382
- //#region src/api-users/controllers/SessionController.ts
382
+ //#region ../../src/api-users/controllers/SessionController.ts
383
383
  var SessionController = class {
384
384
  url = "/sessions";
385
385
  group = "sessions";
@@ -438,7 +438,7 @@ var SessionController = class {
438
438
  };
439
439
 
440
440
  //#endregion
441
- //#region src/api-users/schemas/completePasswordResetRequestSchema.ts
441
+ //#region ../../src/api-users/schemas/completePasswordResetRequestSchema.ts
442
442
  /**
443
443
  * Request schema for completing a password reset.
444
444
  *
@@ -455,7 +455,7 @@ const completePasswordResetRequestSchema = t.object({
455
455
  });
456
456
 
457
457
  //#endregion
458
- //#region src/api-users/schemas/completeRegistrationRequestSchema.ts
458
+ //#region ../../src/api-users/schemas/completeRegistrationRequestSchema.ts
459
459
  const completeRegistrationRequestSchema = t.object({
460
460
  intentId: t.uuid({ description: "The registration intent ID from the first phase" }),
461
461
  emailCode: t.optional(t.string({ description: "Email verification code (if email verification required)" })),
@@ -464,11 +464,11 @@ const completeRegistrationRequestSchema = t.object({
464
464
  });
465
465
 
466
466
  //#endregion
467
- //#region src/api-users/schemas/createUserSchema.ts
467
+ //#region ../../src/api-users/schemas/createUserSchema.ts
468
468
  const createUserSchema = t.omit(users.insertSchema, ["realm"]);
469
469
 
470
470
  //#endregion
471
- //#region src/api-users/schemas/passwordResetIntentResponseSchema.ts
471
+ //#region ../../src/api-users/schemas/passwordResetIntentResponseSchema.ts
472
472
  /**
473
473
  * Response schema for password reset intent creation.
474
474
  *
@@ -481,7 +481,7 @@ const passwordResetIntentResponseSchema = t.object({
481
481
  });
482
482
 
483
483
  //#endregion
484
- //#region src/api-users/schemas/registerQuerySchema.ts
484
+ //#region ../../src/api-users/schemas/registerQuerySchema.ts
485
485
  /**
486
486
  * Schema for user registration query parameters.
487
487
  * Allows specifying a custom user realm.
@@ -489,7 +489,7 @@ const passwordResetIntentResponseSchema = t.object({
489
489
  const registerQuerySchema = t.object({ userRealmName: t.optional(t.text({ description: "The user realm to register the user in (defaults to 'default')" })) });
490
490
 
491
491
  //#endregion
492
- //#region src/api-users/schemas/registerRequestSchema.ts
492
+ //#region ../../src/api-users/schemas/registerRequestSchema.ts
493
493
  /**
494
494
  * Schema for user registration request body.
495
495
  * Password is always required, other fields depend on realm settings.
@@ -514,7 +514,7 @@ const registerRequestSchema = t.object({
514
514
  });
515
515
 
516
516
  //#endregion
517
- //#region src/api-users/schemas/registrationIntentResponseSchema.ts
517
+ //#region ../../src/api-users/schemas/registrationIntentResponseSchema.ts
518
518
  const registrationIntentResponseSchema = t.object({
519
519
  intentId: t.uuid({ description: "Unique identifier for the registration intent" }),
520
520
  expectCaptcha: t.boolean({ description: "Whether captcha verification is required" }),
@@ -524,7 +524,7 @@ const registrationIntentResponseSchema = t.object({
524
524
  });
525
525
 
526
526
  //#endregion
527
- //#region src/api-users/schemas/updateUserSchema.ts
527
+ //#region ../../src/api-users/schemas/updateUserSchema.ts
528
528
  const updateUserSchema = t.partial(t.omit(users.insertSchema, [
529
529
  "id",
530
530
  "version",
@@ -535,7 +535,7 @@ const updateUserSchema = t.partial(t.omit(users.insertSchema, [
535
535
  ]));
536
536
 
537
537
  //#endregion
538
- //#region src/api-users/schemas/userQuerySchema.ts
538
+ //#region ../../src/api-users/schemas/userQuerySchema.ts
539
539
  const userQuerySchema = t.extend(pageQuerySchema, {
540
540
  email: t.optional(t.string()),
541
541
  enabled: t.optional(t.boolean()),
@@ -545,11 +545,11 @@ const userQuerySchema = t.extend(pageQuerySchema, {
545
545
  });
546
546
 
547
547
  //#endregion
548
- //#region src/api-users/schemas/userResourceSchema.ts
548
+ //#region ../../src/api-users/schemas/userResourceSchema.ts
549
549
  const userResourceSchema = users.schema;
550
550
 
551
551
  //#endregion
552
- //#region src/api-users/notifications/UserNotifications.ts
552
+ //#region ../../src/api-users/notifications/UserNotifications.ts
553
553
  var UserNotifications = class {
554
554
  passwordReset = $notification({
555
555
  category: "security",
@@ -678,7 +678,7 @@ var UserNotifications = class {
678
678
  };
679
679
 
680
680
  //#endregion
681
- //#region src/api-users/services/CredentialService.ts
681
+ //#region ../../src/api-users/services/CredentialService.ts
682
682
  const INTENT_TTL_MINUTES$1 = 10;
683
683
  var CredentialService = class {
684
684
  log = $logger();
@@ -861,7 +861,7 @@ var CredentialService = class {
861
861
  };
862
862
 
863
863
  //#endregion
864
- //#region src/api-users/services/RegistrationService.ts
864
+ //#region ../../src/api-users/services/RegistrationService.ts
865
865
  const INTENT_TTL_MINUTES = 10;
866
866
  var RegistrationService = class {
867
867
  log = $logger();
@@ -1127,7 +1127,7 @@ var RegistrationService = class {
1127
1127
  };
1128
1128
 
1129
1129
  //#endregion
1130
- //#region src/api-users/services/UserService.ts
1130
+ //#region ../../src/api-users/services/UserService.ts
1131
1131
  var UserService = class {
1132
1132
  log = $logger();
1133
1133
  verificationController = $client();
@@ -1347,7 +1347,7 @@ var UserService = class {
1347
1347
  };
1348
1348
 
1349
1349
  //#endregion
1350
- //#region src/api-users/controllers/UserController.ts
1350
+ //#region ../../src/api-users/controllers/UserController.ts
1351
1351
  var UserController = class {
1352
1352
  url = "/users";
1353
1353
  group = "users";
@@ -1652,7 +1652,7 @@ var UserController = class {
1652
1652
  };
1653
1653
 
1654
1654
  //#endregion
1655
- //#region src/api-users/atoms/realmAuthSettingsAtom.ts
1655
+ //#region ../../src/api-users/atoms/realmAuthSettingsAtom.ts
1656
1656
  const realmAuthSettingsAtom = $atom({
1657
1657
  name: "alepha.api.users.realmAuthSettings",
1658
1658
  schema: t.object({
@@ -1704,7 +1704,7 @@ const realmAuthSettingsAtom = $atom({
1704
1704
  });
1705
1705
 
1706
1706
  //#endregion
1707
- //#region src/api-users/schemas/userRealmConfigSchema.ts
1707
+ //#region ../../src/api-users/schemas/userRealmConfigSchema.ts
1708
1708
  const userRealmConfigSchema = t.object({
1709
1709
  settings: realmAuthSettingsAtom.schema,
1710
1710
  realmName: t.string(),
@@ -1712,7 +1712,7 @@ const userRealmConfigSchema = t.object({
1712
1712
  });
1713
1713
 
1714
1714
  //#endregion
1715
- //#region src/api-users/controllers/UserRealmController.ts
1715
+ //#region ../../src/api-users/controllers/UserRealmController.ts
1716
1716
  /**
1717
1717
  * Controller for exposing realm configuration.
1718
1718
  * Uses $route instead of $action to keep endpoints hidden from API documentation.
@@ -1763,7 +1763,7 @@ var UserRealmController = class {
1763
1763
  };
1764
1764
 
1765
1765
  //#endregion
1766
- //#region src/api-users/services/SessionService.ts
1766
+ //#region ../../src/api-users/services/SessionService.ts
1767
1767
  var SessionService = class {
1768
1768
  alepha = $inject(Alepha);
1769
1769
  fsp = $inject(FileSystemProvider);
@@ -1986,7 +1986,7 @@ var SessionService = class {
1986
1986
  };
1987
1987
 
1988
1988
  //#endregion
1989
- //#region src/api-users/primitives/$userRealm.ts
1989
+ //#region ../../src/api-users/primitives/$userRealm.ts
1990
1990
  /**
1991
1991
  * Already configured realm for user management.
1992
1992
  *
@@ -2058,7 +2058,7 @@ const $userRealm = (options = {}) => {
2058
2058
  };
2059
2059
 
2060
2060
  //#endregion
2061
- //#region src/api-users/schemas/loginSchema.ts
2061
+ //#region ../../src/api-users/schemas/loginSchema.ts
2062
2062
  const loginSchema = t.object({
2063
2063
  username: t.text({
2064
2064
  minLength: 3,
@@ -2072,7 +2072,7 @@ const loginSchema = t.object({
2072
2072
  });
2073
2073
 
2074
2074
  //#endregion
2075
- //#region src/api-users/schemas/registerSchema.ts
2075
+ //#region ../../src/api-users/schemas/registerSchema.ts
2076
2076
  const registerSchema = t.object({
2077
2077
  username: t.string({
2078
2078
  minLength: 3,
@@ -2100,7 +2100,7 @@ const registerSchema = t.object({
2100
2100
  });
2101
2101
 
2102
2102
  //#endregion
2103
- //#region src/api-users/schemas/resetPasswordSchema.ts
2103
+ //#region ../../src/api-users/schemas/resetPasswordSchema.ts
2104
2104
  const resetPasswordRequestSchema = t.object({ email: t.email({ description: "Email address to send password reset link" }) });
2105
2105
  const resetPasswordSchema = t.object({
2106
2106
  token: t.string({ description: "Password reset token from email" }),
@@ -2115,7 +2115,7 @@ const resetPasswordSchema = t.object({
2115
2115
  });
2116
2116
 
2117
2117
  //#endregion
2118
- //#region src/api-users/index.ts
2118
+ //#region ../../src/api-users/index.ts
2119
2119
  /**
2120
2120
  * Provides user management API endpoints for Alepha applications.
2121
2121
  *
@@ -1,11 +1,11 @@
1
1
  import { $module, t } from "alepha";
2
2
  import { $entity, pg } from "alepha/orm";
3
3
 
4
- //#region src/api-verifications/schemas/verificationTypeEnumSchema.ts
4
+ //#region ../../src/api-verifications/schemas/verificationTypeEnumSchema.ts
5
5
  const verificationTypeEnumSchema = t.enum(["code", "link"]);
6
6
 
7
7
  //#endregion
8
- //#region src/api-verifications/entities/verifications.ts
8
+ //#region ../../src/api-verifications/entities/verifications.ts
9
9
  const verifications = $entity({
10
10
  name: "verification",
11
11
  schema: t.object({
@@ -25,7 +25,7 @@ const verificationEntitySchema = verifications.schema;
25
25
  const verificationEntityInsertSchema = verifications.insertSchema;
26
26
 
27
27
  //#endregion
28
- //#region src/api-verifications/schemas/requestVerificationCodeResponseSchema.ts
28
+ //#region ../../src/api-verifications/schemas/requestVerificationCodeResponseSchema.ts
29
29
  const requestVerificationCodeResponseSchema = t.object({
30
30
  token: t.string({ description: "The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method." }),
31
31
  codeExpiration: t.integer({ description: "Time in seconds before your verification token expires." }),
@@ -34,14 +34,14 @@ const requestVerificationCodeResponseSchema = t.object({
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/api-verifications/schemas/validateVerificationCodeResponseSchema.ts
37
+ //#region ../../src/api-verifications/schemas/validateVerificationCodeResponseSchema.ts
38
38
  const validateVerificationCodeResponseSchema = t.object({
39
39
  ok: t.boolean({ description: "Indicates whether the verification was successful." }),
40
40
  alreadyVerified: t.optional(t.boolean({ description: "Indicates whether the target was already verified." }))
41
41
  });
42
42
 
43
43
  //#endregion
44
- //#region src/api-verifications/index.browser.ts
44
+ //#region ../../src/api-verifications/index.browser.ts
45
45
  const AlephaApiVerification = $module({
46
46
  name: "alepha.api.verifications",
47
47
  services: []
@@ -5,13 +5,13 @@ import { DateTimeProvider } from "alepha/datetime";
5
5
  import * as alepha_logger0 from "alepha/logger";
6
6
  import * as alepha_orm56 from "alepha/orm";
7
7
 
8
- //#region src/api-verifications/entities/verifications.d.ts
8
+ //#region ../../src/api-verifications/entities/verifications.d.ts
9
9
  declare const verifications: alepha_orm56.EntityPrimitive<alepha52.TObject<{
10
10
  id: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_PRIMARY_KEY>, typeof alepha_orm56.PG_DEFAULT>;
11
11
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
12
12
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
13
13
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
14
- type: alepha52.TUnsafe<"code" | "link">;
14
+ type: alepha52.TUnsafe<"link" | "code">;
15
15
  target: alepha52.TString;
16
16
  code: alepha52.TString;
17
17
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -22,7 +22,7 @@ declare const verificationEntitySchema: alepha52.TObject<{
22
22
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
23
23
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
24
24
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
25
- type: alepha52.TUnsafe<"code" | "link">;
25
+ type: alepha52.TUnsafe<"link" | "code">;
26
26
  target: alepha52.TString;
27
27
  code: alepha52.TString;
28
28
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -33,7 +33,7 @@ declare const verificationEntityInsertSchema: alepha_orm56.TObjectInsert<alepha5
33
33
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
34
34
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
35
35
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
36
- type: alepha52.TUnsafe<"code" | "link">;
36
+ type: alepha52.TUnsafe<"link" | "code">;
37
37
  target: alepha52.TString;
38
38
  code: alepha52.TString;
39
39
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -41,7 +41,7 @@ declare const verificationEntityInsertSchema: alepha_orm56.TObjectInsert<alepha5
41
41
  }>>;
42
42
  type VerificationEntity = Static<typeof verifications.schema>;
43
43
  //#endregion
44
- //#region src/api-verifications/schemas/verificationSettingsSchema.d.ts
44
+ //#region ../../src/api-verifications/schemas/verificationSettingsSchema.d.ts
45
45
  declare const verificationSettingsSchema: alepha52.TObject<{
46
46
  code: alepha52.TObject<{
47
47
  maxAttempts: alepha52.TInteger;
@@ -60,7 +60,7 @@ declare const verificationSettingsSchema: alepha52.TObject<{
60
60
  }>;
61
61
  type VerificationSettings = Static<typeof verificationSettingsSchema>;
62
62
  //#endregion
63
- //#region src/api-verifications/parameters/VerificationParameters.d.ts
63
+ //#region ../../src/api-verifications/parameters/VerificationParameters.d.ts
64
64
  /**
65
65
  * Verification settings configuration atom
66
66
  */
@@ -88,17 +88,17 @@ declare module "alepha" {
88
88
  }
89
89
  declare class VerificationParameters {
90
90
  protected readonly options: Readonly<{
91
- code: {
91
+ link: {
92
92
  codeExpiration: number;
93
93
  verificationCooldown: number;
94
94
  maxAttempts: number;
95
- codeLength: number;
96
95
  limitPerDay: number;
97
96
  };
98
- link: {
97
+ code: {
99
98
  codeExpiration: number;
100
99
  verificationCooldown: number;
101
100
  maxAttempts: number;
101
+ codeLength: number;
102
102
  limitPerDay: number;
103
103
  };
104
104
  purgeDays: number;
@@ -106,7 +106,7 @@ declare class VerificationParameters {
106
106
  get<K extends keyof VerificationSettings>(key: K): VerificationSettings[K];
107
107
  }
108
108
  //#endregion
109
- //#region src/api-verifications/schemas/requestVerificationCodeResponseSchema.d.ts
109
+ //#region ../../src/api-verifications/schemas/requestVerificationCodeResponseSchema.d.ts
110
110
  declare const requestVerificationCodeResponseSchema: alepha52.TObject<{
111
111
  token: alepha52.TString;
112
112
  codeExpiration: alepha52.TInteger;
@@ -115,18 +115,18 @@ declare const requestVerificationCodeResponseSchema: alepha52.TObject<{
115
115
  }>;
116
116
  type RequestVerificationResponse = Static<typeof requestVerificationCodeResponseSchema>;
117
117
  //#endregion
118
- //#region src/api-verifications/schemas/validateVerificationCodeResponseSchema.d.ts
118
+ //#region ../../src/api-verifications/schemas/validateVerificationCodeResponseSchema.d.ts
119
119
  declare const validateVerificationCodeResponseSchema: alepha52.TObject<{
120
120
  ok: alepha52.TBoolean;
121
121
  alreadyVerified: alepha52.TOptional<alepha52.TBoolean>;
122
122
  }>;
123
123
  type ValidateVerificationCodeResponse = Static<typeof validateVerificationCodeResponseSchema>;
124
124
  //#endregion
125
- //#region src/api-verifications/schemas/verificationTypeEnumSchema.d.ts
126
- declare const verificationTypeEnumSchema: alepha52.TUnsafe<"code" | "link">;
125
+ //#region ../../src/api-verifications/schemas/verificationTypeEnumSchema.d.ts
126
+ declare const verificationTypeEnumSchema: alepha52.TUnsafe<"link" | "code">;
127
127
  type VerificationTypeEnum = Static<typeof verificationTypeEnumSchema>;
128
128
  //#endregion
129
- //#region src/api-verifications/services/VerificationService.d.ts
129
+ //#region ../../src/api-verifications/services/VerificationService.d.ts
130
130
  declare class VerificationService {
131
131
  protected readonly log: alepha_logger0.Logger;
132
132
  protected readonly dateTimeProvider: DateTimeProvider;
@@ -136,7 +136,7 @@ declare class VerificationService {
136
136
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
137
137
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
138
138
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
139
- type: alepha52.TUnsafe<"code" | "link">;
139
+ type: alepha52.TUnsafe<"link" | "code">;
140
140
  target: alepha52.TString;
141
141
  code: alepha52.TString;
142
142
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -148,7 +148,7 @@ declare class VerificationService {
148
148
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
149
149
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
150
150
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
151
- type: alepha52.TUnsafe<"code" | "link">;
151
+ type: alepha52.TUnsafe<"link" | "code">;
152
152
  target: alepha52.TString;
153
153
  code: alepha52.TString;
154
154
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -158,7 +158,7 @@ declare class VerificationService {
158
158
  createdAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_CREATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
159
159
  updatedAt: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TString, typeof alepha_orm56.PG_UPDATED_AT>, typeof alepha_orm56.PG_DEFAULT>;
160
160
  version: alepha_orm56.PgAttr<alepha_orm56.PgAttr<alepha52.TInteger, typeof alepha_orm56.PG_VERSION>, typeof alepha_orm56.PG_DEFAULT>;
161
- type: alepha52.TUnsafe<"code" | "link">;
161
+ type: alepha52.TUnsafe<"link" | "code">;
162
162
  target: alepha52.TString;
163
163
  code: alepha52.TString;
164
164
  verifiedAt: alepha52.TOptional<alepha52.TString>;
@@ -179,14 +179,14 @@ interface VerificationEntry {
179
179
  target: string;
180
180
  }
181
181
  //#endregion
182
- //#region src/api-verifications/controllers/VerificationController.d.ts
182
+ //#region ../../src/api-verifications/controllers/VerificationController.d.ts
183
183
  declare class VerificationController {
184
184
  protected readonly verificationService: VerificationService;
185
185
  readonly url = "/verifications";
186
186
  readonly group = "verifications";
187
187
  readonly requestVerificationCode: alepha_server0.ActionPrimitiveFn<{
188
188
  params: alepha52.TObject<{
189
- type: alepha52.TUnsafe<"code" | "link">;
189
+ type: alepha52.TUnsafe<"link" | "code">;
190
190
  }>;
191
191
  body: alepha52.TObject<{
192
192
  target: alepha52.TString;
@@ -200,7 +200,7 @@ declare class VerificationController {
200
200
  }>;
201
201
  readonly validateVerificationCode: alepha_server0.ActionPrimitiveFn<{
202
202
  params: alepha52.TObject<{
203
- type: alepha52.TUnsafe<"code" | "link">;
203
+ type: alepha52.TUnsafe<"link" | "code">;
204
204
  }>;
205
205
  body: alepha52.TObject<{
206
206
  target: alepha52.TString;
@@ -213,7 +213,7 @@ declare class VerificationController {
213
213
  }>;
214
214
  }
215
215
  //#endregion
216
- //#region src/api-verifications/index.d.ts
216
+ //#region ../../src/api-verifications/index.d.ts
217
217
  /**
218
218
  * Provides email/phone verification management API endpoints for Alepha applications.
219
219
  *
@@ -6,7 +6,7 @@ import { $logger } from "alepha/logger";
6
6
  import { $entity, $repository, pg } from "alepha/orm";
7
7
  import { $scheduler } from "alepha/scheduler";
8
8
 
9
- //#region src/api-verifications/schemas/requestVerificationCodeResponseSchema.ts
9
+ //#region ../../src/api-verifications/schemas/requestVerificationCodeResponseSchema.ts
10
10
  const requestVerificationCodeResponseSchema = t.object({
11
11
  token: t.string({ description: "The verification token (6-digit code for phone, UUID for email). The caller should send this to the user via their preferred notification method." }),
12
12
  codeExpiration: t.integer({ description: "Time in seconds before your verification token expires." }),
@@ -15,18 +15,18 @@ const requestVerificationCodeResponseSchema = t.object({
15
15
  });
16
16
 
17
17
  //#endregion
18
- //#region src/api-verifications/schemas/validateVerificationCodeResponseSchema.ts
18
+ //#region ../../src/api-verifications/schemas/validateVerificationCodeResponseSchema.ts
19
19
  const validateVerificationCodeResponseSchema = t.object({
20
20
  ok: t.boolean({ description: "Indicates whether the verification was successful." }),
21
21
  alreadyVerified: t.optional(t.boolean({ description: "Indicates whether the target was already verified." }))
22
22
  });
23
23
 
24
24
  //#endregion
25
- //#region src/api-verifications/schemas/verificationTypeEnumSchema.ts
25
+ //#region ../../src/api-verifications/schemas/verificationTypeEnumSchema.ts
26
26
  const verificationTypeEnumSchema = t.enum(["code", "link"]);
27
27
 
28
28
  //#endregion
29
- //#region src/api-verifications/entities/verifications.ts
29
+ //#region ../../src/api-verifications/entities/verifications.ts
30
30
  const verifications = $entity({
31
31
  name: "verification",
32
32
  schema: t.object({
@@ -46,7 +46,7 @@ const verificationEntitySchema = verifications.schema;
46
46
  const verificationEntityInsertSchema = verifications.insertSchema;
47
47
 
48
48
  //#endregion
49
- //#region src/api-verifications/schemas/verificationSettingsSchema.ts
49
+ //#region ../../src/api-verifications/schemas/verificationSettingsSchema.ts
50
50
  const verificationSettingsSchema = t.object({
51
51
  code: t.object({
52
52
  maxAttempts: t.integer({
@@ -105,7 +105,7 @@ const verificationSettingsSchema = t.object({
105
105
  });
106
106
 
107
107
  //#endregion
108
- //#region src/api-verifications/parameters/VerificationParameters.ts
108
+ //#region ../../src/api-verifications/parameters/VerificationParameters.ts
109
109
  /**
110
110
  * Verification settings configuration atom
111
111
  */
@@ -137,7 +137,7 @@ var VerificationParameters = class {
137
137
  };
138
138
 
139
139
  //#endregion
140
- //#region src/api-verifications/services/VerificationService.ts
140
+ //#region ../../src/api-verifications/services/VerificationService.ts
141
141
  var VerificationService = class {
142
142
  log = $logger();
143
143
  dateTimeProvider = $inject(DateTimeProvider);
@@ -317,7 +317,7 @@ var VerificationService = class {
317
317
  };
318
318
 
319
319
  //#endregion
320
- //#region src/api-verifications/controllers/VerificationController.ts
320
+ //#region ../../src/api-verifications/controllers/VerificationController.ts
321
321
  var VerificationController = class {
322
322
  verificationService = $inject(VerificationService);
323
323
  url = "/verifications";
@@ -360,7 +360,7 @@ var VerificationController = class {
360
360
  };
361
361
 
362
362
  //#endregion
363
- //#region src/api-verifications/jobs/VerificationJobs.ts
363
+ //#region ../../src/api-verifications/jobs/VerificationJobs.ts
364
364
  var VerificationJobs = class {
365
365
  verificationRepository = $repository(verifications);
366
366
  verificationParameters = $inject(VerificationParameters);
@@ -378,7 +378,7 @@ var VerificationJobs = class {
378
378
  };
379
379
 
380
380
  //#endregion
381
- //#region src/api-verifications/index.ts
381
+ //#region ../../src/api-verifications/index.ts
382
382
  /**
383
383
  * Provides email/phone verification management API endpoints for Alepha applications.
384
384
  *
@@ -4,7 +4,7 @@ import { DateTimeProvider, DurationLike } from "alepha/datetime";
4
4
  import * as alepha_logger0 from "alepha/logger";
5
5
  import { RetryBackoffOptions, RetryPrimitiveOptions, RetryProvider } from "alepha/retry";
6
6
 
7
- //#region src/batch/providers/BatchProvider.d.ts
7
+ //#region ../../src/batch/providers/BatchProvider.d.ts
8
8
  interface BatchOptions<TItem, TResponse = any> {
9
9
  /**
10
10
  * The batch processing handler function that processes arrays of validated items.
@@ -191,7 +191,7 @@ declare class BatchProvider {
191
191
  protected startProcessing<TItem, TResponse>(context: BatchContext<TItem, TResponse>): Promise<void>;
192
192
  }
193
193
  //#endregion
194
- //#region src/batch/primitives/$batch.d.ts
194
+ //#region ../../src/batch/primitives/$batch.d.ts
195
195
  /**
196
196
  * Creates a batch processing primitive for efficient grouping and processing of multiple operations.
197
197
  */
@@ -281,7 +281,7 @@ declare class BatchPrimitive<TItem extends TSchema, TResponse = any> extends Pri
281
281
  protected readonly dispose: alepha1.HookPrimitive<"stop">;
282
282
  }
283
283
  //#endregion
284
- //#region src/batch/index.d.ts
284
+ //#region ../../src/batch/index.d.ts
285
285
  /**
286
286
  * This module allows you to group multiple asynchronous operations into a single "batch," which is then processed together.
287
287
  * This is an essential pattern for improving performance, reducing I/O, and interacting efficiently with rate-limited APIs or databases.
@@ -4,7 +4,7 @@ import { DateTimeProvider } from "alepha/datetime";
4
4
  import { $logger } from "alepha/logger";
5
5
  import { RetryProvider } from "alepha/retry";
6
6
 
7
- //#region src/batch/providers/BatchProvider.ts
7
+ //#region ../../src/batch/providers/BatchProvider.ts
8
8
  /**
9
9
  * Service for batch processing operations.
10
10
  * Provides methods to manage batches of items with automatic flushing based on size or time.
@@ -267,7 +267,7 @@ var BatchProvider = class {
267
267
  };
268
268
 
269
269
  //#endregion
270
- //#region src/batch/primitives/$batch.ts
270
+ //#region ../../src/batch/primitives/$batch.ts
271
271
  /**
272
272
  * Creates a batch processing primitive for efficient grouping and processing of multiple operations.
273
273
  */
@@ -346,7 +346,7 @@ var BatchPrimitive = class extends Primitive {
346
346
  $batch[KIND] = BatchPrimitive;
347
347
 
348
348
  //#endregion
349
- //#region src/batch/index.ts
349
+ //#region ../../src/batch/index.ts
350
350
  /**
351
351
  * This module allows you to group multiple asynchronous operations into a single "batch," which is then processed together.
352
352
  * This is an essential pattern for improving performance, reducing I/O, and interacting efficiently with rate-limited APIs or databases.
package/dist/bin/index.js CHANGED
@@ -3,7 +3,7 @@ import "tsx";
3
3
  import { Alepha, run } from "alepha";
4
4
  import { AlephaCli, version } from "alepha/cli";
5
5
 
6
- //#region src/bin/index.ts
6
+ //#region ../../src/bin/index.ts
7
7
  const alepha = Alepha.create({ env: {
8
8
  LOG_LEVEL: "alepha.core:warn,info",
9
9
  LOG_FORMAT: "raw",