alepha 0.11.2 → 0.11.4

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 (50) hide show
  1. package/api/files.d.ts +1 -439
  2. package/api/jobs.d.ts +1 -218
  3. package/api/notifications.d.ts +1 -264
  4. package/api/users.d.ts +1 -924
  5. package/batch.d.ts +1 -585
  6. package/bucket.d.ts +1 -507
  7. package/cache/redis.d.ts +1 -40
  8. package/cache.d.ts +1 -288
  9. package/command.d.ts +1 -238
  10. package/core.d.ts +1 -1563
  11. package/datetime.d.ts +5 -3
  12. package/devtools.d.ts +1 -368
  13. package/email.d.ts +1 -144
  14. package/fake.cjs +8 -0
  15. package/fake.d.ts +1 -0
  16. package/fake.js +1 -0
  17. package/file.d.ts +1 -53
  18. package/lock/redis.d.ts +1 -24
  19. package/lock.d.ts +1 -552
  20. package/logger.d.ts +1 -284
  21. package/package.json +57 -50
  22. package/postgres.d.ts +1 -1931
  23. package/queue/redis.d.ts +1 -29
  24. package/queue.d.ts +1 -760
  25. package/react/auth.d.ts +1 -499
  26. package/react/form.d.ts +1 -188
  27. package/react/head.d.ts +1 -120
  28. package/react/i18n.d.ts +1 -118
  29. package/react.d.ts +1 -929
  30. package/redis.d.ts +1 -82
  31. package/scheduler.d.ts +1 -145
  32. package/security.d.ts +1 -586
  33. package/server/cache.d.ts +1 -163
  34. package/server/compress.d.ts +1 -32
  35. package/server/cookies.d.ts +1 -144
  36. package/server/cors.d.ts +1 -27
  37. package/server/health.d.ts +1 -59
  38. package/server/helmet.d.ts +1 -69
  39. package/server/links.d.ts +1 -316
  40. package/server/metrics.d.ts +1 -35
  41. package/server/multipart.d.ts +1 -42
  42. package/server/proxy.d.ts +1 -234
  43. package/server/security.d.ts +1 -87
  44. package/server/static.d.ts +1 -119
  45. package/server/swagger.d.ts +1 -148
  46. package/server.d.ts +1 -849
  47. package/topic/redis.d.ts +1 -42
  48. package/topic.d.ts +1 -819
  49. package/ui.d.ts +1 -619
  50. package/vite.d.ts +1 -197
package/datetime.d.ts CHANGED
@@ -22,7 +22,6 @@ declare const isTimeSchema: (schema: unknown) => schema is ReturnType<typeof tim
22
22
  declare const isDurationSchema: (schema: unknown) => schema is ReturnType<typeof duration>;
23
23
  //#endregion
24
24
  //#region src/providers/DateTimeProvider.d.ts
25
- type DateTimeApi = typeof dayjs;
26
25
  type DateTime = DayjsApi.Dayjs;
27
26
  type Duration = dayjsDuration.Duration;
28
27
  type DurationLike = number | dayjsDuration.Duration | [number, ManipulateType];
@@ -36,6 +35,8 @@ declare class DateTimeProvider {
36
35
  constructor();
37
36
  protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
38
37
  protected readonly onStop: _alepha_core1.HookDescriptor<"stop">;
38
+ setLocale(locale: string): void;
39
+ isDateTime(value: unknown): value is DateTime;
39
40
  /**
40
41
  * Create a new UTC DateTime instance.
41
42
  */
@@ -84,12 +85,13 @@ declare class DateTimeProvider {
84
85
  signal?: AbortSignal;
85
86
  now?: number;
86
87
  }): Promise<void>;
87
- createInterval(run: () => unknown, distance: DurationLike): Interval;
88
+ createInterval(run: () => unknown, distance: DurationLike, start?: boolean): Interval;
88
89
  /**
89
90
  * Run a callback after a certain duration.
90
91
  */
91
92
  createTimeout(callback: () => void, duration: DurationLike, now?: number): Timeout;
92
93
  clearTimeout(timeout: Timeout): void;
94
+ clearInterval(interval: Interval): void;
93
95
  /**
94
96
  * Run a function with a deadline.
95
97
  */
@@ -163,5 +165,5 @@ declare module "alepha" {
163
165
  }
164
166
  declare const AlephaDateTime: _alepha_core1.Service<_alepha_core1.Module<{}>>;
165
167
  //#endregion
166
- export { $interval, AlephaDateTime, DateTime, DateTimeApi, DateTimeProvider, Duration, DurationLike, Interval, IntervalDescriptor, IntervalDescriptorOptions, Timeout, date, datetime, dayjs, duration, isDateSchema, isDateTimeSchema, isDurationSchema, isTimeSchema, time };
168
+ export { $interval, AlephaDateTime, DateTime, DateTimeProvider, Duration, DurationLike, Interval, IntervalDescriptor, IntervalDescriptorOptions, Timeout, date, datetime, dayjs, duration, isDateSchema, isDateTimeSchema, isDurationSchema, isTimeSchema, time };
167
169
  //# sourceMappingURL=index.d.ts.map
package/devtools.d.ts CHANGED
@@ -1,368 +1 @@
1
- import * as _alepha_core1 from "alepha";
2
- import { Alepha, Static } from "alepha";
3
- import * as _alepha_server0 from "alepha/server";
4
- import * as typebox144 from "typebox";
5
- import { LogEntry } from "alepha/logger";
6
-
7
- //#region src/schemas/DevActionMetadata.d.ts
8
- declare const devActionMetadataSchema: typebox144.TObject<{
9
- name: typebox144.TString;
10
- group: typebox144.TString;
11
- method: typebox144.TString;
12
- path: typebox144.TString;
13
- prefix: typebox144.TString;
14
- fullPath: typebox144.TString;
15
- description: typebox144.TOptional<typebox144.TString>;
16
- summary: typebox144.TOptional<typebox144.TString>;
17
- disabled: typebox144.TOptional<typebox144.TBoolean>;
18
- secure: typebox144.TOptional<typebox144.TBoolean>;
19
- hide: typebox144.TOptional<typebox144.TBoolean>;
20
- body: typebox144.TOptional<typebox144.TAny>;
21
- params: typebox144.TOptional<typebox144.TAny>;
22
- query: typebox144.TOptional<typebox144.TAny>;
23
- response: typebox144.TOptional<typebox144.TAny>;
24
- bodyContentType: typebox144.TOptional<typebox144.TString>;
25
- }>;
26
- type DevActionMetadata = Static<typeof devActionMetadataSchema>;
27
- //#endregion
28
- //#region src/schemas/DevBucketMetadata.d.ts
29
- declare const devBucketMetadataSchema: typebox144.TObject<{
30
- name: typebox144.TString;
31
- description: typebox144.TOptional<typebox144.TString>;
32
- mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
33
- maxSize: typebox144.TOptional<typebox144.TNumber>;
34
- provider: typebox144.TString;
35
- }>;
36
- type DevBucketMetadata = Static<typeof devBucketMetadataSchema>;
37
- //#endregion
38
- //#region src/schemas/DevCacheMetadata.d.ts
39
- declare const devCacheMetadataSchema: typebox144.TObject<{
40
- name: typebox144.TString;
41
- ttl: typebox144.TOptional<typebox144.TAny>;
42
- disabled: typebox144.TOptional<typebox144.TBoolean>;
43
- provider: typebox144.TString;
44
- }>;
45
- type DevCacheMetadata = Static<typeof devCacheMetadataSchema>;
46
- //#endregion
47
- //#region src/schemas/DevLogEntry.d.ts
48
- declare const devLogEntrySchema: typebox144.TObject<{
49
- formatted: typebox144.TString;
50
- entry: typebox144.TAny;
51
- }>;
52
- type DevLogEntry = Static<typeof devLogEntrySchema> & {
53
- entry: LogEntry;
54
- };
55
- //#endregion
56
- //#region src/schemas/DevMetadata.d.ts
57
- declare const devMetadataSchema: typebox144.TObject<{
58
- actions: typebox144.TArray<typebox144.TObject<{
59
- name: typebox144.TString;
60
- group: typebox144.TString;
61
- method: typebox144.TString;
62
- path: typebox144.TString;
63
- prefix: typebox144.TString;
64
- fullPath: typebox144.TString;
65
- description: typebox144.TOptional<typebox144.TString>;
66
- summary: typebox144.TOptional<typebox144.TString>;
67
- disabled: typebox144.TOptional<typebox144.TBoolean>;
68
- secure: typebox144.TOptional<typebox144.TBoolean>;
69
- hide: typebox144.TOptional<typebox144.TBoolean>;
70
- body: typebox144.TOptional<typebox144.TAny>;
71
- params: typebox144.TOptional<typebox144.TAny>;
72
- query: typebox144.TOptional<typebox144.TAny>;
73
- response: typebox144.TOptional<typebox144.TAny>;
74
- bodyContentType: typebox144.TOptional<typebox144.TString>;
75
- }>>;
76
- queues: typebox144.TArray<typebox144.TObject<{
77
- name: typebox144.TString;
78
- description: typebox144.TOptional<typebox144.TString>;
79
- schema: typebox144.TOptional<typebox144.TAny>;
80
- provider: typebox144.TString;
81
- }>>;
82
- schedulers: typebox144.TArray<typebox144.TObject<{
83
- name: typebox144.TString;
84
- description: typebox144.TOptional<typebox144.TString>;
85
- cron: typebox144.TOptional<typebox144.TString>;
86
- interval: typebox144.TOptional<typebox144.TAny>;
87
- lock: typebox144.TOptional<typebox144.TBoolean>;
88
- }>>;
89
- topics: typebox144.TArray<typebox144.TObject<{
90
- name: typebox144.TString;
91
- description: typebox144.TOptional<typebox144.TString>;
92
- schema: typebox144.TOptional<typebox144.TAny>;
93
- provider: typebox144.TString;
94
- }>>;
95
- buckets: typebox144.TArray<typebox144.TObject<{
96
- name: typebox144.TString;
97
- description: typebox144.TOptional<typebox144.TString>;
98
- mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
99
- maxSize: typebox144.TOptional<typebox144.TNumber>;
100
- provider: typebox144.TString;
101
- }>>;
102
- realms: typebox144.TArray<typebox144.TObject<{
103
- name: typebox144.TString;
104
- description: typebox144.TOptional<typebox144.TString>;
105
- roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>;
106
- type: typebox144.TUnsafe<"internal" | "external">;
107
- settings: typebox144.TOptional<typebox144.TObject<{
108
- accessTokenExpiration: typebox144.TOptional<typebox144.TAny>;
109
- refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>;
110
- hasOnCreateSession: typebox144.TBoolean;
111
- hasOnRefreshSession: typebox144.TBoolean;
112
- hasOnDeleteSession: typebox144.TBoolean;
113
- }>>;
114
- }>>;
115
- caches: typebox144.TArray<typebox144.TObject<{
116
- name: typebox144.TString;
117
- ttl: typebox144.TOptional<typebox144.TAny>;
118
- disabled: typebox144.TOptional<typebox144.TBoolean>;
119
- provider: typebox144.TString;
120
- }>>;
121
- pages: typebox144.TArray<typebox144.TObject<{
122
- name: typebox144.TString;
123
- description: typebox144.TOptional<typebox144.TString>;
124
- path: typebox144.TOptional<typebox144.TString>;
125
- params: typebox144.TOptional<typebox144.TAny>;
126
- query: typebox144.TOptional<typebox144.TAny>;
127
- hasComponent: typebox144.TBoolean;
128
- hasLazy: typebox144.TBoolean;
129
- hasResolve: typebox144.TBoolean;
130
- hasChildren: typebox144.TBoolean;
131
- hasParent: typebox144.TBoolean;
132
- hasErrorHandler: typebox144.TBoolean;
133
- static: typebox144.TOptional<typebox144.TBoolean>;
134
- cache: typebox144.TOptional<typebox144.TAny>;
135
- client: typebox144.TOptional<typebox144.TAny>;
136
- animation: typebox144.TOptional<typebox144.TAny>;
137
- }>>;
138
- providers: typebox144.TArray<typebox144.TObject<{
139
- name: typebox144.TString;
140
- module: typebox144.TOptional<typebox144.TString>;
141
- dependencies: typebox144.TArray<typebox144.TString>;
142
- aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
143
- }>>;
144
- modules: typebox144.TArray<typebox144.TObject<{
145
- name: typebox144.TString;
146
- providers: typebox144.TArray<typebox144.TString>;
147
- }>>;
148
- }>;
149
- type DevMetadata = Static<typeof devMetadataSchema>;
150
- //#endregion
151
- //#region src/schemas/DevModuleMetadata.d.ts
152
- declare const devModuleMetadataSchema: typebox144.TObject<{
153
- name: typebox144.TString;
154
- providers: typebox144.TArray<typebox144.TString>;
155
- }>;
156
- type DevModuleMetadata = Static<typeof devModuleMetadataSchema>;
157
- //#endregion
158
- //#region src/schemas/DevPageMetadata.d.ts
159
- declare const devPageMetadataSchema: typebox144.TObject<{
160
- name: typebox144.TString;
161
- description: typebox144.TOptional<typebox144.TString>;
162
- path: typebox144.TOptional<typebox144.TString>;
163
- params: typebox144.TOptional<typebox144.TAny>;
164
- query: typebox144.TOptional<typebox144.TAny>;
165
- hasComponent: typebox144.TBoolean;
166
- hasLazy: typebox144.TBoolean;
167
- hasResolve: typebox144.TBoolean;
168
- hasChildren: typebox144.TBoolean;
169
- hasParent: typebox144.TBoolean;
170
- hasErrorHandler: typebox144.TBoolean;
171
- static: typebox144.TOptional<typebox144.TBoolean>;
172
- cache: typebox144.TOptional<typebox144.TAny>;
173
- client: typebox144.TOptional<typebox144.TAny>;
174
- animation: typebox144.TOptional<typebox144.TAny>;
175
- }>;
176
- type DevPageMetadata = Static<typeof devPageMetadataSchema>;
177
- //#endregion
178
- //#region src/schemas/DevProviderMetadata.d.ts
179
- declare const devProviderMetadataSchema: typebox144.TObject<{
180
- name: typebox144.TString;
181
- module: typebox144.TOptional<typebox144.TString>;
182
- dependencies: typebox144.TArray<typebox144.TString>;
183
- aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
184
- }>;
185
- type DevProviderMetadata = Static<typeof devProviderMetadataSchema>;
186
- //#endregion
187
- //#region src/schemas/DevQueueMetadata.d.ts
188
- declare const devQueueMetadataSchema: typebox144.TObject<{
189
- name: typebox144.TString;
190
- description: typebox144.TOptional<typebox144.TString>;
191
- schema: typebox144.TOptional<typebox144.TAny>;
192
- provider: typebox144.TString;
193
- }>;
194
- type DevQueueMetadata = Static<typeof devQueueMetadataSchema>;
195
- //#endregion
196
- //#region src/schemas/DevRealmMetadata.d.ts
197
- declare const devRealmMetadataSchema: typebox144.TObject<{
198
- name: typebox144.TString;
199
- description: typebox144.TOptional<typebox144.TString>;
200
- roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>;
201
- type: typebox144.TUnsafe<"internal" | "external">;
202
- settings: typebox144.TOptional<typebox144.TObject<{
203
- accessTokenExpiration: typebox144.TOptional<typebox144.TAny>;
204
- refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>;
205
- hasOnCreateSession: typebox144.TBoolean;
206
- hasOnRefreshSession: typebox144.TBoolean;
207
- hasOnDeleteSession: typebox144.TBoolean;
208
- }>>;
209
- }>;
210
- type DevRealmMetadata = Static<typeof devRealmMetadataSchema>;
211
- //#endregion
212
- //#region src/schemas/DevSchedulerMetadata.d.ts
213
- declare const devSchedulerMetadataSchema: typebox144.TObject<{
214
- name: typebox144.TString;
215
- description: typebox144.TOptional<typebox144.TString>;
216
- cron: typebox144.TOptional<typebox144.TString>;
217
- interval: typebox144.TOptional<typebox144.TAny>;
218
- lock: typebox144.TOptional<typebox144.TBoolean>;
219
- }>;
220
- type DevSchedulerMetadata = Static<typeof devSchedulerMetadataSchema>;
221
- //#endregion
222
- //#region src/schemas/DevTopicMetadata.d.ts
223
- declare const devTopicMetadataSchema: typebox144.TObject<{
224
- name: typebox144.TString;
225
- description: typebox144.TOptional<typebox144.TString>;
226
- schema: typebox144.TOptional<typebox144.TAny>;
227
- provider: typebox144.TString;
228
- }>;
229
- type DevTopicMetadata = Static<typeof devTopicMetadataSchema>;
230
- //#endregion
231
- //#region src/DevCollectorProvider.d.ts
232
- declare class DevCollectorProvider {
233
- protected readonly alepha: Alepha;
234
- protected readonly logs: DevLogEntry[];
235
- protected readonly maxLogs = 10000;
236
- protected readonly onLog: _alepha_core1.HookDescriptor<"log">;
237
- protected readonly uiRoute: _alepha_server0.RouteDescriptor<{
238
- response: typebox144.TString;
239
- }>;
240
- protected readonly metadataRoute: _alepha_server0.RouteDescriptor<{
241
- response: typebox144.TObject<{
242
- actions: typebox144.TArray<typebox144.TObject<{
243
- name: typebox144.TString;
244
- group: typebox144.TString;
245
- method: typebox144.TString;
246
- path: typebox144.TString;
247
- prefix: typebox144.TString;
248
- fullPath: typebox144.TString;
249
- description: typebox144.TOptional<typebox144.TString>;
250
- summary: typebox144.TOptional<typebox144.TString>;
251
- disabled: typebox144.TOptional<typebox144.TBoolean>;
252
- secure: typebox144.TOptional<typebox144.TBoolean>;
253
- hide: typebox144.TOptional<typebox144.TBoolean>;
254
- body: typebox144.TOptional<typebox144.TAny>;
255
- params: typebox144.TOptional<typebox144.TAny>;
256
- query: typebox144.TOptional<typebox144.TAny>;
257
- response: typebox144.TOptional<typebox144.TAny>;
258
- bodyContentType: typebox144.TOptional<typebox144.TString>;
259
- }>>;
260
- queues: typebox144.TArray<typebox144.TObject<{
261
- name: typebox144.TString;
262
- description: typebox144.TOptional<typebox144.TString>;
263
- schema: typebox144.TOptional<typebox144.TAny>;
264
- provider: typebox144.TString;
265
- }>>;
266
- schedulers: typebox144.TArray<typebox144.TObject<{
267
- name: typebox144.TString;
268
- description: typebox144.TOptional<typebox144.TString>;
269
- cron: typebox144.TOptional<typebox144.TString>;
270
- interval: typebox144.TOptional<typebox144.TAny>;
271
- lock: typebox144.TOptional<typebox144.TBoolean>;
272
- }>>;
273
- topics: typebox144.TArray<typebox144.TObject<{
274
- name: typebox144.TString;
275
- description: typebox144.TOptional<typebox144.TString>;
276
- schema: typebox144.TOptional<typebox144.TAny>;
277
- provider: typebox144.TString;
278
- }>>;
279
- buckets: typebox144.TArray<typebox144.TObject<{
280
- name: typebox144.TString;
281
- description: typebox144.TOptional<typebox144.TString>;
282
- mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
283
- maxSize: typebox144.TOptional<typebox144.TNumber>;
284
- provider: typebox144.TString;
285
- }>>;
286
- realms: typebox144.TArray<typebox144.TObject<{
287
- name: typebox144.TString;
288
- description: typebox144.TOptional<typebox144.TString>;
289
- roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>;
290
- type: typebox144.TUnsafe<"internal" | "external">;
291
- settings: typebox144.TOptional<typebox144.TObject<{
292
- accessTokenExpiration: typebox144.TOptional<typebox144.TAny>;
293
- refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>;
294
- hasOnCreateSession: typebox144.TBoolean;
295
- hasOnRefreshSession: typebox144.TBoolean;
296
- hasOnDeleteSession: typebox144.TBoolean;
297
- }>>;
298
- }>>;
299
- caches: typebox144.TArray<typebox144.TObject<{
300
- name: typebox144.TString;
301
- ttl: typebox144.TOptional<typebox144.TAny>;
302
- disabled: typebox144.TOptional<typebox144.TBoolean>;
303
- provider: typebox144.TString;
304
- }>>;
305
- pages: typebox144.TArray<typebox144.TObject<{
306
- name: typebox144.TString;
307
- description: typebox144.TOptional<typebox144.TString>;
308
- path: typebox144.TOptional<typebox144.TString>;
309
- params: typebox144.TOptional<typebox144.TAny>;
310
- query: typebox144.TOptional<typebox144.TAny>;
311
- hasComponent: typebox144.TBoolean;
312
- hasLazy: typebox144.TBoolean;
313
- hasResolve: typebox144.TBoolean;
314
- hasChildren: typebox144.TBoolean;
315
- hasParent: typebox144.TBoolean;
316
- hasErrorHandler: typebox144.TBoolean;
317
- static: typebox144.TOptional<typebox144.TBoolean>;
318
- cache: typebox144.TOptional<typebox144.TAny>;
319
- client: typebox144.TOptional<typebox144.TAny>;
320
- animation: typebox144.TOptional<typebox144.TAny>;
321
- }>>;
322
- providers: typebox144.TArray<typebox144.TObject<{
323
- name: typebox144.TString;
324
- module: typebox144.TOptional<typebox144.TString>;
325
- dependencies: typebox144.TArray<typebox144.TString>;
326
- aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>;
327
- }>>;
328
- modules: typebox144.TArray<typebox144.TObject<{
329
- name: typebox144.TString;
330
- providers: typebox144.TArray<typebox144.TString>;
331
- }>>;
332
- }>;
333
- }>;
334
- protected readonly logsRoute: _alepha_server0.RouteDescriptor<{
335
- response: typebox144.TArray<typebox144.TObject<{
336
- formatted: typebox144.TString;
337
- entry: typebox144.TAny;
338
- }>>;
339
- }>;
340
- getLogs(): DevLogEntry[];
341
- getActions(): DevActionMetadata[];
342
- getQueues(): DevQueueMetadata[];
343
- getSchedulers(): DevSchedulerMetadata[];
344
- getTopics(): DevTopicMetadata[];
345
- getBuckets(): DevBucketMetadata[];
346
- getRealms(): DevRealmMetadata[];
347
- getCaches(): DevCacheMetadata[];
348
- getPages(): DevPageMetadata[];
349
- getProviders(): DevProviderMetadata[];
350
- getModules(): DevModuleMetadata[];
351
- getMetadata(): DevMetadata;
352
- protected getProviderName(provider?: "memory" | any): string;
353
- }
354
- //#endregion
355
- //#region src/index.d.ts
356
- /**
357
- * Developer tools module for monitoring and debugging Alepha applications.
358
- *
359
- * This module provides comprehensive data collection capabilities for tracking application behavior,
360
- * performance metrics, and debugging information in real-time.
361
- *
362
- * @see {@link DevCollectorProvider}
363
- * @module alepha.devtools
364
- */
365
- declare const AlephaDevtools: _alepha_core1.Service<_alepha_core1.Module<{}>>;
366
- //#endregion
367
- export { AlephaDevtools, DevActionMetadata, DevBucketMetadata, DevCacheMetadata, DevCollectorProvider, DevLogEntry, DevMetadata, DevModuleMetadata, DevPageMetadata, DevProviderMetadata, DevQueueMetadata, DevRealmMetadata, DevSchedulerMetadata, DevTopicMetadata, devActionMetadataSchema, devBucketMetadataSchema, devCacheMetadataSchema, devLogEntrySchema, devMetadataSchema, devModuleMetadataSchema, devPageMetadataSchema, devProviderMetadataSchema, devQueueMetadataSchema, devRealmMetadataSchema, devSchedulerMetadataSchema, devTopicMetadataSchema };
368
- //# sourceMappingURL=index.d.ts.map
1
+ export * from '@alepha/devtools';
package/email.d.ts CHANGED
@@ -1,144 +1 @@
1
- import * as _alepha_core1 from "alepha";
2
- import * as _alepha_logger0 from "alepha/logger";
3
- import { Transporter } from "nodemailer";
4
-
5
- //#region src/providers/EmailProvider.d.ts
6
- /**
7
- * Email provider interface.
8
- *
9
- * All methods are asynchronous and return promises.
10
- */
11
- declare abstract class EmailProvider {
12
- /**
13
- * Send an email.
14
- *
15
- * @return Promise that resolves when the email is sent.
16
- */
17
- abstract send(options: EmailSendOptions): Promise<void>;
18
- }
19
- type EmailSendOptions = {
20
- to: string | string[];
21
- subject: string;
22
- body: string;
23
- };
24
- //#endregion
25
- //#region src/errors/EmailError.d.ts
26
- declare class EmailError extends Error {
27
- constructor(message: string, cause?: Error);
28
- }
29
- //#endregion
30
- //#region src/providers/LocalEmailProvider.d.ts
31
- interface LocalEmailProviderOptions {
32
- /**
33
- * Directory to save email files.
34
- * @default "node_modules/.email" (relative to project root)
35
- */
36
- directory?: string;
37
- }
38
- declare class LocalEmailProvider implements EmailProvider {
39
- protected readonly log: _alepha_logger0.Logger;
40
- protected readonly directory: string;
41
- constructor(options?: LocalEmailProviderOptions);
42
- send(options: EmailSendOptions): Promise<void>;
43
- createEmailHtml(options: {
44
- to: string;
45
- subject: string;
46
- body: string;
47
- }): string;
48
- escapeHtml(text: string): string;
49
- }
50
- //#endregion
51
- //#region src/providers/MemoryEmailProvider.d.ts
52
- interface EmailRecord {
53
- to: string;
54
- subject: string;
55
- body: string;
56
- sentAt: Date;
57
- }
58
- declare class MemoryEmailProvider implements EmailProvider {
59
- protected readonly log: _alepha_logger0.Logger;
60
- records: EmailRecord[];
61
- send(options: EmailSendOptions): Promise<void>;
62
- /**
63
- * Get the last email sent (for testing purposes).
64
- */
65
- get last(): EmailRecord | undefined;
66
- }
67
- //#endregion
68
- //#region src/providers/NodemailerEmailProvider.d.ts
69
- interface NodemailerEmailProviderOptions {
70
- /**
71
- * Custom transporter configuration.
72
- * If provided, will override environment variables.
73
- */
74
- transporter?: Transporter;
75
- /**
76
- * Custom from email address.
77
- * If not provided, will use EMAIL_FROM from environment.
78
- */
79
- from?: string;
80
- /**
81
- * Additional nodemailer options.
82
- */
83
- options?: {
84
- pool?: boolean;
85
- maxConnections?: number;
86
- maxMessages?: number;
87
- rateDelta?: number;
88
- rateLimit?: number;
89
- };
90
- }
91
- declare class NodemailerEmailProvider implements EmailProvider {
92
- protected readonly env: {
93
- EMAIL_HOST: string;
94
- EMAIL_PORT: number;
95
- EMAIL_USER: string;
96
- EMAIL_PASS: string;
97
- EMAIL_FROM: string;
98
- EMAIL_SECURE: boolean;
99
- };
100
- protected readonly log: _alepha_logger0.Logger;
101
- protected transporter: Transporter;
102
- protected fromAddress: string;
103
- readonly options: NodemailerEmailProviderOptions;
104
- constructor();
105
- send(options: EmailSendOptions): Promise<void>;
106
- protected createTransporter(): Transporter;
107
- /**
108
- * Verify the connection to the email server.
109
- */
110
- verify(): Promise<boolean>;
111
- /**
112
- * Close the transporter connection.
113
- */
114
- close(): void;
115
- protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
116
- protected readonly onStop: _alepha_core1.HookDescriptor<"stop">;
117
- }
118
- //#endregion
119
- //#region src/index.d.ts
120
- declare module "alepha" {
121
- interface Hooks {
122
- "email:sending": {
123
- to: string | string[];
124
- template: string;
125
- variables: Record<string, unknown>;
126
- provider: EmailProvider;
127
- abort(): void;
128
- };
129
- }
130
- }
131
- /**
132
- * Provides email sending capabilities for Alepha applications with multiple provider backends.
133
- *
134
- * The email module enables declarative email sending through the `$email` descriptor, allowing you to send
135
- * emails through different providers: memory (for testing), local file system, or SMTP via Nodemailer.
136
- * It supports HTML email content and automatic provider selection based on environment configuration.
137
- *
138
- * @see {@link EmailProvider}
139
- * @module alepha.email
140
- */
141
- declare const AlephaEmail: _alepha_core1.Service<_alepha_core1.Module<{}>>;
142
- //#endregion
143
- export { AlephaEmail, EmailError, EmailProvider, EmailRecord, EmailSendOptions, LocalEmailProvider, LocalEmailProviderOptions, MemoryEmailProvider, NodemailerEmailProvider, NodemailerEmailProviderOptions };
144
- //# sourceMappingURL=index.d.ts.map
1
+ export * from '@alepha/email';
package/fake.cjs ADDED
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+ var m = require('@alepha/fake');
3
+ Object.keys(m).forEach(function (k) {
4
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
5
+ enumerable: true,
6
+ get: function () { return m[k]; }
7
+ });
8
+ });
package/fake.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '@alepha/fake';
package/fake.js ADDED
@@ -0,0 +1 @@
1
+ export * from '@alepha/fake'
package/file.d.ts CHANGED
@@ -1,53 +1 @@
1
- import { FileLike, StreamLike } from "alepha";
2
-
3
- //#region src/helpers/createFile.d.ts
4
- declare const createFile: (source: string | Buffer | ArrayBuffer | StreamLike | File, options?: {
5
- type?: string;
6
- name?: string;
7
- size?: number;
8
- }) => FileLike;
9
- declare const createFileFromWebFile: (source: File, options?: {
10
- type?: string;
11
- name?: string;
12
- size?: number;
13
- }) => FileLike;
14
- declare const createFileFromBuffer: (source: Buffer, options?: {
15
- type?: string;
16
- name?: string;
17
- }) => FileLike;
18
- declare const createFileFromStream: (source: StreamLike, options?: {
19
- type?: string;
20
- name?: string;
21
- size?: number;
22
- }) => FileLike & {
23
- _buffer: null | Buffer;
24
- };
25
- declare const createFileFromUrl: (url: string, options?: {
26
- type?: string;
27
- name?: string;
28
- }) => FileLike;
29
- /**
30
- * Converts a stream-like object to a Buffer.
31
- */
32
- declare const streamToBuffer: (streamLike: StreamLike) => Promise<Buffer>;
33
- /**
34
- * Converts a Node.js Buffer to an ArrayBuffer.
35
- */
36
- declare const bufferToArrayBuffer: (buffer: Buffer) => ArrayBuffer;
37
- declare const isReadableStream: (obj: unknown) => obj is NodeJS.ReadableStream;
38
- //#endregion
39
- //#region src/helpers/getContentType.d.ts
40
- /**
41
- * Can be used to get the content type of file based on its extension.
42
- *
43
- * Feel free to add more mime types in your project!
44
- */
45
- declare const mimeMap: Record<string, string>;
46
- /**
47
- * Returns the content type of file based on its filename.
48
- * @see {mimeMap}
49
- */
50
- declare const getContentType: (filename: string) => string;
51
- //#endregion
52
- export { bufferToArrayBuffer, createFile, createFileFromBuffer, createFileFromStream, createFileFromUrl, createFileFromWebFile, getContentType, isReadableStream, mimeMap, streamToBuffer };
53
- //# sourceMappingURL=index.d.ts.map
1
+ export * from '@alepha/file';
package/lock/redis.d.ts CHANGED
@@ -1,24 +1 @@
1
- import * as _alepha_core0 from "alepha";
2
- import { LockProvider } from "alepha/lock";
3
- import * as _alepha_logger0 from "alepha/logger";
4
- import { RedisProvider } from "alepha/redis";
5
-
6
- //#region src/providers/RedisLockProvider.d.ts
7
- declare class RedisLockProvider implements LockProvider {
8
- protected readonly log: _alepha_logger0.Logger;
9
- protected readonly redisProvider: RedisProvider;
10
- set(key: string, value: string, nx?: boolean, px?: number): Promise<string>;
11
- del(...keys: string[]): Promise<void>;
12
- }
13
- //#endregion
14
- //#region src/index.d.ts
15
- /**
16
- * Plugin for Alepha that provides a locking mechanism.
17
- *
18
- * @see {@link RedisLockProvider}
19
- * @module alepha.lock.redis
20
- */
21
- declare const AlephaLockRedis: _alepha_core0.Service<_alepha_core0.Module<{}>>;
22
- //#endregion
23
- export { AlephaLockRedis, RedisLockProvider };
24
- //# sourceMappingURL=index.d.ts.map
1
+ export * from '@alepha/lock-redis';