alepha 0.9.2 → 0.9.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.
package/queue/redis.d.ts CHANGED
@@ -23,9 +23,7 @@ declare class RedisQueueProvider implements QueueProvider {
23
23
  * @see {@link RedisQueueProvider}
24
24
  * @module alepha.queue.redis
25
25
  */
26
- declare const AlephaQueueRedis: _alepha_core0.ModuleDescriptor;
27
- //# sourceMappingURL=index.d.ts.map
28
-
26
+ declare const AlephaQueueRedis: _alepha_core0.Service<_alepha_core0.Module>;
29
27
  //#endregion
30
28
  export { AlephaQueueRedis, RedisQueueProvider };
31
29
  //# sourceMappingURL=index.d.ts.map
package/queue.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import * as _alepha_core1 from "alepha";
2
- import * as _alepha_core2 from "alepha";
3
- import * as _alepha_core0$1 from "alepha";
4
- import * as _alepha_core0 from "alepha";
5
2
  import { Alepha, Descriptor, KIND, Service, Static, TSchema } from "alepha";
3
+ import * as _alepha_logger0 from "alepha/logger";
6
4
  import { DateTimeProvider } from "alepha/datetime";
7
5
 
8
6
  //#region src/providers/QueueProvider.d.ts
@@ -28,38 +26,36 @@ declare abstract class QueueProvider {
28
26
  */
29
27
  abstract pop(queue: string): Promise<string | undefined>;
30
28
  }
31
- //# sourceMappingURL=QueueProvider.d.ts.map
32
29
  //#endregion
33
30
  //#region src/providers/MemoryQueueProvider.d.ts
34
31
  declare class MemoryQueueProvider implements QueueProvider {
35
- protected readonly log: _alepha_core1.Logger;
32
+ protected readonly log: _alepha_logger0.Logger;
36
33
  protected queueList: Record<string, string[]>;
37
34
  push(queue: string, ...messages: string[]): Promise<void>;
38
35
  pop(queue: string): Promise<string | undefined>;
39
36
  }
40
- //# sourceMappingURL=MemoryQueueProvider.d.ts.map
41
37
  //#endregion
42
38
  //#region src/providers/WorkerProvider.d.ts
43
- declare const envSchema: _alepha_core2.TObject<{
39
+ declare const envSchema: _alepha_core1.TObject<{
44
40
  /**
45
41
  * The interval in milliseconds to wait before checking for new messages.
46
42
  */
47
- QUEUE_WORKER_INTERVAL: _alepha_core2.TNumber;
43
+ QUEUE_WORKER_INTERVAL: _alepha_core1.TNumber;
48
44
  /**
49
45
  * The maximum interval in milliseconds to wait before checking for new messages.
50
46
  */
51
- QUEUE_WORKER_MAX_INTERVAL: _alepha_core2.TNumber;
47
+ QUEUE_WORKER_MAX_INTERVAL: _alepha_core1.TNumber;
52
48
  /**
53
49
  * The number of workers to run concurrently. Defaults to 1.
54
50
  * Useful only if you are doing a lot of I/O.
55
51
  */
56
- QUEUE_WORKER_CONCURRENCY: _alepha_core2.TNumber;
52
+ QUEUE_WORKER_CONCURRENCY: _alepha_core1.TNumber;
57
53
  }>;
58
54
  declare module "alepha" {
59
55
  interface Env extends Partial<Static<typeof envSchema>> {}
60
56
  }
61
57
  declare class WorkerProvider {
62
- protected readonly log: _alepha_core2.Logger;
58
+ protected readonly log: _alepha_logger0.Logger;
63
59
  protected readonly env: {
64
60
  QUEUE_WORKER_INTERVAL: number;
65
61
  QUEUE_WORKER_MAX_INTERVAL: number;
@@ -73,13 +69,13 @@ declare class WorkerProvider {
73
69
  protected abortController: AbortController;
74
70
  protected workerIntervals: Record<number, number>;
75
71
  protected consumers: Array<Consumer>;
76
- protected readonly start: _alepha_core2.HookDescriptor<"start">;
72
+ protected readonly start: _alepha_core1.HookDescriptor<"start">;
77
73
  /**
78
74
  * Start the workers.
79
75
  * This method will create an endless loop that will check for new messages!
80
76
  */
81
77
  protected startWorkers(): void;
82
- protected readonly stop: _alepha_core2.HookDescriptor<"stop">;
78
+ protected readonly stop: _alepha_core1.HookDescriptor<"stop">;
83
79
  /**
84
80
  * Wait for the next message, where `n` is the worker number.
85
81
  *
@@ -133,7 +129,7 @@ interface QueueDescriptorOptions<T extends TSchema> {
133
129
  handler?: (message: QueueMessage<T>) => Promise<void>;
134
130
  }
135
131
  declare class QueueDescriptor<T extends TSchema> extends Descriptor<QueueDescriptorOptions<T>> {
136
- protected readonly log: _alepha_core0$1.Logger;
132
+ protected readonly log: _alepha_logger0.Logger;
137
133
  protected readonly workerProvider: WorkerProvider;
138
134
  readonly provider: QueueProvider | MemoryQueueProvider;
139
135
  push(...payloads: Array<Static<T>>): Promise<void>;
@@ -146,7 +142,6 @@ interface QueueMessageSchema {
146
142
  interface QueueMessage<T extends TSchema> {
147
143
  payload: Static<T>;
148
144
  }
149
- //# sourceMappingURL=$queue.d.ts.map
150
145
  //#endregion
151
146
  //#region src/descriptors/$consumer.d.ts
152
147
  /**
@@ -163,7 +158,6 @@ interface ConsumerDescriptorOptions<T extends TSchema> {
163
158
  }) => Promise<void>;
164
159
  }
165
160
  declare class ConsumerDescriptor<T extends TSchema> extends Descriptor<ConsumerDescriptorOptions<T>> {}
166
- //# sourceMappingURL=$consumer.d.ts.map
167
161
  //#endregion
168
162
  //#region src/index.d.ts
169
163
  /**
@@ -177,9 +171,7 @@ declare class ConsumerDescriptor<T extends TSchema> extends Descriptor<ConsumerD
177
171
  * @see {@link $consumer}
178
172
  * @module alepha.queue
179
173
  */
180
- declare const AlephaQueue: _alepha_core0.ModuleDescriptor;
181
- //# sourceMappingURL=index.d.ts.map
182
-
174
+ declare const AlephaQueue: _alepha_core1.Service<_alepha_core1.Module>;
183
175
  //#endregion
184
176
  export { $consumer, $queue, AlephaQueue, ConsumerDescriptor, ConsumerDescriptorOptions, MemoryQueueProvider, QueueDescriptor, QueueDescriptorOptions, QueueMessage, QueueMessageSchema, QueueProvider };
185
177
  //# sourceMappingURL=index.d.ts.map