@keetanetwork/anchor 0.0.32 → 0.0.34

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 (67) hide show
  1. package/lib/http-server/index.d.ts +7 -1
  2. package/lib/http-server/index.d.ts.map +1 -1
  3. package/lib/http-server/index.js +2 -0
  4. package/lib/http-server/index.js.map +1 -1
  5. package/lib/queue/common.d.ts +26 -0
  6. package/lib/queue/common.d.ts.map +1 -0
  7. package/lib/queue/common.js +47 -0
  8. package/lib/queue/common.js.map +1 -0
  9. package/lib/queue/drivers/queue_file.d.ts +17 -0
  10. package/lib/queue/drivers/queue_file.d.ts.map +1 -0
  11. package/lib/queue/drivers/queue_file.js +100 -0
  12. package/lib/queue/drivers/queue_file.js.map +1 -0
  13. package/lib/queue/drivers/queue_postgres.d.ts +28 -0
  14. package/lib/queue/drivers/queue_postgres.d.ts.map +1 -0
  15. package/lib/queue/drivers/queue_postgres.js +360 -0
  16. package/lib/queue/drivers/queue_postgres.js.map +1 -0
  17. package/lib/queue/drivers/queue_redis.d.ts +27 -0
  18. package/lib/queue/drivers/queue_redis.d.ts.map +1 -0
  19. package/lib/queue/drivers/queue_redis.js +359 -0
  20. package/lib/queue/drivers/queue_redis.js.map +1 -0
  21. package/lib/queue/drivers/queue_sqlite3.d.ts +28 -0
  22. package/lib/queue/drivers/queue_sqlite3.d.ts.map +1 -0
  23. package/lib/queue/drivers/queue_sqlite3.js +378 -0
  24. package/lib/queue/drivers/queue_sqlite3.js.map +1 -0
  25. package/lib/queue/index.d.ts +341 -0
  26. package/lib/queue/index.d.ts.map +1 -0
  27. package/lib/queue/index.js +940 -0
  28. package/lib/queue/index.js.map +1 -0
  29. package/lib/queue/internal.d.ts +20 -0
  30. package/lib/queue/internal.d.ts.map +1 -0
  31. package/lib/queue/internal.js +66 -0
  32. package/lib/queue/internal.js.map +1 -0
  33. package/lib/queue/pipeline.d.ts +152 -0
  34. package/lib/queue/pipeline.d.ts.map +1 -0
  35. package/lib/queue/pipeline.js +296 -0
  36. package/lib/queue/pipeline.js.map +1 -0
  37. package/lib/resolver.d.ts +1 -1
  38. package/lib/resolver.d.ts.map +1 -1
  39. package/lib/resolver.js.map +1 -1
  40. package/lib/utils/asleep.d.ts +2 -0
  41. package/lib/utils/asleep.d.ts.map +1 -0
  42. package/lib/utils/asleep.js +3 -0
  43. package/lib/utils/asleep.js.map +1 -0
  44. package/lib/utils/defer.d.ts +4 -0
  45. package/lib/utils/defer.d.ts.map +1 -0
  46. package/lib/utils/defer.js +3 -0
  47. package/lib/utils/defer.js.map +1 -0
  48. package/npm-shrinkwrap.json +2 -2
  49. package/package.json +1 -1
  50. package/services/asset-movement/common.d.ts +15 -1
  51. package/services/asset-movement/common.d.ts.map +1 -1
  52. package/services/asset-movement/common.js +345 -147
  53. package/services/asset-movement/common.js.map +1 -1
  54. package/services/asset-movement/lib/location.js +1 -1
  55. package/services/asset-movement/lib/location.js.map +1 -1
  56. package/services/fx/client.d.ts +1 -1
  57. package/services/fx/client.d.ts.map +1 -1
  58. package/services/fx/client.js +2 -2
  59. package/services/fx/client.js.map +1 -1
  60. package/services/fx/common.d.ts +19 -4
  61. package/services/fx/common.d.ts.map +1 -1
  62. package/services/fx/common.js +8 -5
  63. package/services/fx/common.js.map +1 -1
  64. package/services/fx/server.d.ts +105 -8
  65. package/services/fx/server.d.ts.map +1 -1
  66. package/services/fx/server.js +609 -43
  67. package/services/fx/server.js.map +1 -1
@@ -0,0 +1,341 @@
1
+ import type { BrandedString, Brand } from '../utils/brand.ts';
2
+ import type { Logger } from '../log/index.ts';
3
+ import type { JSONSerializable } from '../utils/json.ts';
4
+ import type { KeetaAnchorQueueRunOptions } from './common.js';
5
+ export type KeetaAnchorQueueRequest<QueueRequest> = QueueRequest;
6
+ export type KeetaAnchorQueueRequestID = BrandedString<'KeetaAnchorQueueID'>;
7
+ export type KeetaAnchorQueueWorkerID = Brand<number, 'KeetaAnchorQueueWorkerID'>;
8
+ export type KeetaAnchorQueueStatus = 'pending' | 'processing' | 'completed' | 'failed_temporarily' | 'failed_permanently' | 'stuck' | 'aborted' | 'moved' | '@internal';
9
+ export type KeetaAnchorQueueEntry<QueueRequest, QueueResult> = {
10
+ /**
11
+ * The Job ID
12
+ */
13
+ id: KeetaAnchorQueueRequestID;
14
+ /**
15
+ * Idempotent IDs from a previous stage
16
+ */
17
+ idempotentKeys?: Set<KeetaAnchorQueueRequestID> | undefined;
18
+ request: KeetaAnchorQueueRequest<QueueRequest>;
19
+ output: QueueResult | null;
20
+ lastError: string | null;
21
+ status: KeetaAnchorQueueStatus;
22
+ created: Date;
23
+ updated: Date;
24
+ worker: KeetaAnchorQueueWorkerID | null;
25
+ failures: number;
26
+ };
27
+ /**
28
+ * Extra information to provide to a request when adding an entry to the queue
29
+ */
30
+ export type KeetaAnchorQueueEntryExtra = {
31
+ [key in 'idempotentKeys' | 'id' | 'status']?: (key extends 'id' ? KeetaAnchorQueueRequestID | string : KeetaAnchorQueueEntry<never, never>[key]) | undefined;
32
+ };
33
+ export type KeetaAnchorQueueFilter = {
34
+ /**
35
+ * Only return entries with this status
36
+ */
37
+ status?: KeetaAnchorQueueStatus;
38
+ /**
39
+ * Only return entries last updated before this date
40
+ */
41
+ updatedBefore?: Date;
42
+ /**
43
+ * Limit the number of entries returned
44
+ */
45
+ limit?: number;
46
+ };
47
+ export type KeetaAnchorQueueCommonOptions = {
48
+ logger?: Logger | undefined;
49
+ id?: string | undefined;
50
+ };
51
+ export type KeetaAnchorQueueRunnerOptions = KeetaAnchorQueueCommonOptions & {
52
+ /**
53
+ * If specified, then multiple workers can be used to process this queue
54
+ * in parallel by splitting the work among the workers.
55
+ *
56
+ * By default, only a single worker will process the queue (count=1, id=0)
57
+ */
58
+ workers?: {
59
+ count: number;
60
+ id: number;
61
+ } | undefined;
62
+ };
63
+ export type KeetaAnchorQueueStorageOptions = KeetaAnchorQueueCommonOptions & {
64
+ path?: string[] | undefined;
65
+ };
66
+ export type KeetaAnchorQueueEntryAncillaryData<QueueResult> = {
67
+ /**
68
+ * The previous status of the entry -- if the entry is not currently in this status,
69
+ * the status update will fail
70
+ */
71
+ oldStatus?: KeetaAnchorQueueStatus | undefined;
72
+ /**
73
+ * The worker ID performing the status update
74
+ */
75
+ by?: KeetaAnchorQueueWorkerID | undefined;
76
+ /**
77
+ * The output data to store with the entry
78
+ */
79
+ output?: QueueResult | null | undefined;
80
+ /**
81
+ * An error message to store with the entry
82
+ */
83
+ error?: string | undefined;
84
+ };
85
+ export type KeetaAnchorQueueStorageDriverConstructor<QueueRequest extends JSONSerializable, QueueResult extends JSONSerializable> = new (options?: KeetaAnchorQueueStorageOptions) => KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult>;
86
+ export interface KeetaAnchorQueueStorageDriver<QueueRequest extends JSONSerializable, QueueResult extends JSONSerializable> {
87
+ /**
88
+ * An ID for this instance of the storage driver
89
+ */
90
+ readonly id: string;
91
+ /**
92
+ * The name of the storage driver
93
+ */
94
+ readonly name: string;
95
+ /**
96
+ * The partition ID for this instance of the storage driver
97
+ *
98
+ * This is used to divide a single storage backend into multiple
99
+ * independent queues.
100
+ *
101
+ * The root partition is an empty array, and each element is
102
+ * a hierarchical partition name.
103
+ */
104
+ readonly path: string[];
105
+ /**
106
+ * Enqueue an item to be processed by the queue
107
+ *
108
+ * It will be inserted into the queue as a 'pending' entry
109
+ *
110
+ * @param request The request to enqueue
111
+ * @param id Optional ID to use for the entry -- if not provided, a new
112
+ * ID will be generated. If the ID is already in use then
113
+ * nothing will be added.
114
+ * @returns The ID for the newly created pending entry
115
+ */
116
+ add: (request: KeetaAnchorQueueRequest<QueueRequest>, info?: KeetaAnchorQueueEntryExtra) => Promise<KeetaAnchorQueueRequestID>;
117
+ /**
118
+ * Update the status of an entry in the queue
119
+ *
120
+ * If the status is "failed_temporarily", the failure count will be incremented
121
+ *
122
+ * @param id The entry ID to update
123
+ * @param status The new status of the entry
124
+ * @param ancillary Optional ancillary data for the status update
125
+ * @returns void
126
+ */
127
+ setStatus: (id: KeetaAnchorQueueRequestID, status: KeetaAnchorQueueStatus, ancillary?: KeetaAnchorQueueEntryAncillaryData<QueueResult>) => Promise<void>;
128
+ /**
129
+ * Get entries from storage with an optional filter
130
+ *
131
+ * @param filter The filter to apply (optional)
132
+ * @returns An array of entries matching the criteria
133
+ */
134
+ query(filter?: KeetaAnchorQueueFilter): Promise<KeetaAnchorQueueEntry<QueueRequest, QueueResult>[]>;
135
+ /**
136
+ * Get a single entry from storage by ID
137
+ *
138
+ * @param id The ID of the entry to retrieve
139
+ * @returns The entry if found, or null if not found
140
+ */
141
+ get(id: KeetaAnchorQueueRequestID): Promise<KeetaAnchorQueueEntry<QueueRequest, QueueResult> | null>;
142
+ /**
143
+ * Perform maintenance tasks on the storage driver
144
+ * (e.g. cleaning up old entries, etc)
145
+ *
146
+ * @returns void
147
+ */
148
+ maintain?: () => Promise<void>;
149
+ /**
150
+ * Create a partitioned view of the queue
151
+ *
152
+ * @param partitionID The partition ID to use
153
+ * @returns A new storage driver instance for the partition
154
+ */
155
+ partition: (path: string) => Promise<KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult>>;
156
+ /**
157
+ * Close the storage driver and release any resources
158
+ */
159
+ destroy(): Promise<void>;
160
+ [Symbol.asyncDispose](): Promise<void>;
161
+ }
162
+ /**
163
+ * An in-memory implementation of the KeetaAnchorQueueStorageDriver
164
+ */
165
+ export declare class KeetaAnchorQueueStorageDriverMemory<QueueRequest extends JSONSerializable = JSONSerializable, QueueResult extends JSONSerializable = JSONSerializable> implements KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult> {
166
+ protected queueStorage: {
167
+ [path: string]: KeetaAnchorQueueEntry<QueueRequest, QueueResult>[];
168
+ };
169
+ protected readonly logger?: Logger | undefined;
170
+ protected partitionCounter: number;
171
+ private destroyed;
172
+ readonly name: string;
173
+ readonly id: string;
174
+ readonly path: string[];
175
+ constructor(options?: KeetaAnchorQueueStorageOptions);
176
+ protected clone(options?: Partial<KeetaAnchorQueueStorageOptions>): KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult>;
177
+ protected get queue(): KeetaAnchorQueueEntry<QueueRequest, QueueResult>[];
178
+ protected methodLogger(method: string): Logger | undefined;
179
+ private checkDestroyed;
180
+ add(request: KeetaAnchorQueueRequest<QueueRequest>, info?: KeetaAnchorQueueEntryExtra): Promise<KeetaAnchorQueueRequestID>;
181
+ setStatus(id: KeetaAnchorQueueRequestID, status: KeetaAnchorQueueStatus, ancillary?: KeetaAnchorQueueEntryAncillaryData<QueueResult>): Promise<void>;
182
+ get(id: KeetaAnchorQueueRequestID): Promise<KeetaAnchorQueueEntry<QueueRequest, QueueResult> | null>;
183
+ query(filter?: KeetaAnchorQueueFilter): Promise<KeetaAnchorQueueEntry<QueueRequest, QueueResult>[]>;
184
+ partition(path: string): Promise<KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult>>;
185
+ destroy(): Promise<void>;
186
+ [Symbol.asyncDispose](): Promise<void>;
187
+ }
188
+ /**
189
+ * A Queue Runner and Request Translator for processing entries in a queue
190
+ *
191
+ * The queue runner is responsible for pulling entries from the queue,
192
+ * processing them, and updating their status in the queue. As well
193
+ * as moving jobs between queues by piping the output of one runner
194
+ * to another. Additionally, maintenance tasks such as re-queuing
195
+ * failed jobs and marking stuck jobs are also handled by the runner.
196
+ *
197
+ * This is an abstract base class that must be extended to provide
198
+ * the actual processing logic as well as the encoding and decoding
199
+ * for requests and responses.
200
+ */
201
+ export declare abstract class KeetaAnchorQueueRunner<UserRequest = unknown, UserResult = unknown, QueueRequest extends JSONSerializable = JSONSerializable, QueueResult extends JSONSerializable = JSONSerializable> {
202
+ /**
203
+ * The queue this runner is responsible for running
204
+ */
205
+ private readonly queue;
206
+ /**
207
+ * The logger we should use for logging anything
208
+ */
209
+ private readonly logger?;
210
+ /**
211
+ * The processor function to use for processing entries
212
+ */
213
+ protected abstract processor(entry: KeetaAnchorQueueEntry<UserRequest, UserResult>): Promise<{
214
+ status: KeetaAnchorQueueStatus;
215
+ output: UserResult | null;
216
+ error?: string | undefined;
217
+ }>;
218
+ /**
219
+ * The processor for stuck jobs (optional)
220
+ */
221
+ protected processorStuck?(entry: KeetaAnchorQueueEntry<UserRequest, UserResult>): Promise<{
222
+ status: KeetaAnchorQueueStatus;
223
+ output: UserResult | null;
224
+ error?: string | undefined;
225
+ }>;
226
+ /**
227
+ * The processor for aborted jobs (optional)
228
+ */
229
+ protected processorAborted?(entry: KeetaAnchorQueueEntry<UserRequest, UserResult>): Promise<{
230
+ status: KeetaAnchorQueueStatus;
231
+ output: UserResult | null;
232
+ error?: string | undefined;
233
+ }>;
234
+ /**
235
+ * Worker configuration
236
+ */
237
+ private readonly workers;
238
+ private readonly workerID;
239
+ /**
240
+ * Pipes to other runners we have registered
241
+ */
242
+ private readonly pipes;
243
+ /**
244
+ * Initialization promise
245
+ */
246
+ private initializePromise;
247
+ /**
248
+ * Configuration for this queue
249
+ */
250
+ protected maxRetries: number;
251
+ protected processTimeout: number;
252
+ protected batchSize: number;
253
+ /**
254
+ * How many runners can process this queue in parallel
255
+ */
256
+ protected maxRunners?: number;
257
+ private readonly runnerLockKey;
258
+ /**
259
+ * The ID of this runner for diagnostic purposes
260
+ */
261
+ readonly id: string;
262
+ constructor(config: {
263
+ queue: KeetaAnchorQueueStorageDriver<QueueRequest, QueueResult>;
264
+ } & KeetaAnchorQueueRunnerOptions);
265
+ private initialize;
266
+ private methodLogger;
267
+ protected abstract decodeRequest(request: QueueRequest): UserRequest;
268
+ protected abstract decodeResponse(response: QueueResult | null): UserResult | null;
269
+ protected abstract encodeRequest(request: UserRequest): QueueRequest;
270
+ protected abstract encodeResponse(response: UserResult | null): QueueResult | null;
271
+ protected decodeEntry(entry: KeetaAnchorQueueEntry<QueueRequest, QueueResult>): KeetaAnchorQueueEntry<UserRequest, UserResult>;
272
+ /**
273
+ * Enqueue an item to be processed by the queue
274
+ */
275
+ add(request: UserRequest, info?: KeetaAnchorQueueEntryExtra): Promise<KeetaAnchorQueueRequestID>;
276
+ /**
277
+ * Get a single entry from storage by ID
278
+ */
279
+ get(id: KeetaAnchorQueueRequestID): Promise<KeetaAnchorQueueEntry<UserRequest, UserResult> | null>;
280
+ /**
281
+ * Get entries from storage with an optional filter
282
+ */
283
+ query(filter?: KeetaAnchorQueueFilter): Promise<KeetaAnchorQueueEntry<UserRequest, UserResult>[]>;
284
+ /**
285
+ * Set the status of an entry in the queue
286
+ */
287
+ setStatus(id: KeetaAnchorQueueRequestID, status: KeetaAnchorQueueStatus, ancillary?: KeetaAnchorQueueEntryAncillaryData<UserResult>): Promise<void>;
288
+ /**
289
+ * Checks to see if the queue is runnable
290
+ */
291
+ runnable(): Promise<boolean>;
292
+ private getRunnerLock;
293
+ private maintainRunnerLock;
294
+ /**
295
+ * Run the queue processor
296
+ *
297
+ * Processes up to `batchSize` entries from the queue and returns
298
+ * true if there may be more work to do, or false if the queue
299
+ * is empty.
300
+ *
301
+ * @param options Optional run options
302
+ */
303
+ run(options?: KeetaAnchorQueueRunOptions): Promise<boolean>;
304
+ private markStuckRequestsAsStuck;
305
+ private requeueFailedRequests;
306
+ private moveCompletedToNextStage;
307
+ maintain(): Promise<void>;
308
+ /**
309
+ * Pipe the the completed entries of this runner to another runner
310
+ */
311
+ pipe<T1, T2 extends JSONSerializable>(target: KeetaAnchorQueueRunner<UserResult, T1, QueueResult, T2>): typeof target;
312
+ /**
313
+ * Pipe batches of completed entries from this runner to another runner
314
+ */
315
+ pipeBatch<T1, T2 extends JSONSerializable>(target: KeetaAnchorQueueRunner<UserResult[], T1, JSONSerializable, T2>, maxBatchSize?: number, minBatchSize?: number): typeof target;
316
+ destroy(): Promise<void>;
317
+ [Symbol.asyncDispose](): Promise<void>;
318
+ }
319
+ /**
320
+ * A KeetaAnchorQueueRunner for use when you want to process already
321
+ * JSON-serializable data without any encoding/decoding needed
322
+ */
323
+ export declare abstract class KeetaAnchorQueueRunnerJSON<UserRequest extends JSONSerializable = JSONSerializable, UserResult extends JSONSerializable = JSONSerializable> extends KeetaAnchorQueueRunner<UserRequest, UserResult, JSONSerializable, JSONSerializable> {
324
+ protected decodeRequest(request: JSONSerializable): UserRequest;
325
+ protected decodeResponse(response: JSONSerializable | null): UserResult | null;
326
+ protected encodeRequest(request: JSONSerializable): JSONSerializable;
327
+ protected encodeResponse(response: JSONSerializable | null): JSONSerializable | null;
328
+ }
329
+ /**
330
+ * A KeetaAnchorQueueRunnerJSON that takes a processor function
331
+ * in the constructor -- this is mainly useful for testing
332
+ */
333
+ export declare class KeetaAnchorQueueRunnerJSONConfigProc<UserRequest extends JSONSerializable = JSONSerializable, UserResult extends JSONSerializable = JSONSerializable> extends KeetaAnchorQueueRunnerJSON<UserRequest, UserResult> {
334
+ protected readonly processor: KeetaAnchorQueueRunner<UserRequest, UserResult>['processor'];
335
+ constructor(config: ConstructorParameters<typeof KeetaAnchorQueueRunner>[0] & {
336
+ processor: KeetaAnchorQueueRunner<UserRequest, UserResult>['processor'];
337
+ processorStuck?: KeetaAnchorQueueRunner<UserRequest, UserResult>['processorStuck'] | undefined;
338
+ processorAborted?: KeetaAnchorQueueRunner<UserRequest, UserResult>['processorAborted'] | undefined;
339
+ });
340
+ }
341
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/queue/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAU9D,MAAM,MAAM,uBAAuB,CAAC,YAAY,IAAI,YAAY,CAAC;AACjE,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAC5E,M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