@atproto/sync 0.1.0

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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.txt +7 -0
  3. package/README.md +93 -0
  4. package/dist/events.d.ts +49 -0
  5. package/dist/events.d.ts.map +1 -0
  6. package/dist/events.js +3 -0
  7. package/dist/events.js.map +1 -0
  8. package/dist/firehose/index.d.ts +50 -0
  9. package/dist/firehose/index.d.ts.map +1 -0
  10. package/dist/firehose/index.js +309 -0
  11. package/dist/firehose/index.js.map +1 -0
  12. package/dist/firehose/lexicons.d.ts +118 -0
  13. package/dist/firehose/lexicons.d.ts.map +1 -0
  14. package/dist/firehose/lexicons.js +265 -0
  15. package/dist/firehose/lexicons.js.map +1 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +20 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/runner/consecutive-list.d.ts +27 -0
  21. package/dist/runner/consecutive-list.d.ts.map +1 -0
  22. package/dist/runner/consecutive-list.js +68 -0
  23. package/dist/runner/consecutive-list.js.map +1 -0
  24. package/dist/runner/index.d.ts +4 -0
  25. package/dist/runner/index.d.ts.map +1 -0
  26. package/dist/runner/index.js +20 -0
  27. package/dist/runner/index.js.map +1 -0
  28. package/dist/runner/memory-runner.d.ts +24 -0
  29. package/dist/runner/memory-runner.d.ts.map +1 -0
  30. package/dist/runner/memory-runner.js +92 -0
  31. package/dist/runner/memory-runner.js.map +1 -0
  32. package/dist/runner/types.d.ts +5 -0
  33. package/dist/runner/types.d.ts.map +1 -0
  34. package/dist/runner/types.js +3 -0
  35. package/dist/runner/types.js.map +1 -0
  36. package/dist/util.d.ts +6 -0
  37. package/dist/util.d.ts.map +1 -0
  38. package/dist/util.js +13 -0
  39. package/dist/util.js.map +1 -0
  40. package/jest.config.js +8 -0
  41. package/package.json +37 -0
  42. package/src/events.ts +61 -0
  43. package/src/firehose/index.ts +357 -0
  44. package/src/firehose/lexicons.ts +407 -0
  45. package/src/index.ts +3 -0
  46. package/src/runner/consecutive-list.ts +44 -0
  47. package/src/runner/index.ts +3 -0
  48. package/src/runner/memory-runner.ts +72 -0
  49. package/src/runner/types.ts +8 -0
  50. package/src/util.ts +10 -0
  51. package/tests/firehose.test.ts +180 -0
  52. package/tests/runner.test.ts +122 -0
  53. package/tsconfig.build.json +8 -0
  54. package/tsconfig.json +4 -0
@@ -0,0 +1,118 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type { IncomingMessage } from 'node:http';
4
+ import { type LexiconDoc } from '@atproto/lexicon';
5
+ import type { ErrorFrame, HandlerAuth } from '@atproto/xrpc-server';
6
+ import type { CID } from 'multiformats/cid';
7
+ export declare function isObj(v: unknown): v is Record<string, unknown>;
8
+ export declare function hasProp<K extends PropertyKey>(data: object, prop: K): data is Record<K, unknown>;
9
+ export interface QueryParams {
10
+ /** The last known event seq number to backfill from. */
11
+ cursor?: number;
12
+ }
13
+ export type RepoEvent = Commit | Identity | Account | Handle | Migrate | Tombstone | Info | {
14
+ $type: string;
15
+ [k: string]: unknown;
16
+ };
17
+ export type HandlerError = ErrorFrame<'FutureCursor' | 'ConsumerTooSlow'>;
18
+ export type HandlerOutput = HandlerError | RepoEvent;
19
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
20
+ auth: HA;
21
+ params: QueryParams;
22
+ req: IncomingMessage;
23
+ signal: AbortSignal;
24
+ };
25
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => AsyncIterable<HandlerOutput>;
26
+ /** Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. */
27
+ export interface Commit {
28
+ /** The stream sequence number of this message. */
29
+ seq: number;
30
+ /** DEPRECATED -- unused */
31
+ rebase: boolean;
32
+ /** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
33
+ tooBig: boolean;
34
+ /** The repo this event comes from. */
35
+ repo: string;
36
+ /** Repo commit object CID. */
37
+ commit: CID;
38
+ /** DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. */
39
+ prev?: CID | null;
40
+ /** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
41
+ rev: string;
42
+ /** The rev of the last emitted commit from this repo (if any). */
43
+ since: string | null;
44
+ /** CAR file containing relevant blocks, as a diff since the previous repo state. */
45
+ blocks: Uint8Array;
46
+ ops: RepoOp[];
47
+ blobs: CID[];
48
+ /** Timestamp of when this message was originally broadcast. */
49
+ time: string;
50
+ [k: string]: unknown;
51
+ }
52
+ export declare function isCommit(v: unknown): v is Commit;
53
+ /** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
54
+ export interface Identity {
55
+ seq: number;
56
+ did: string;
57
+ time: string;
58
+ /** The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. */
59
+ handle?: string;
60
+ [k: string]: unknown;
61
+ }
62
+ export declare function isIdentity(v: unknown): v is Identity;
63
+ /** Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. */
64
+ export interface Account {
65
+ seq: number;
66
+ did: string;
67
+ time: string;
68
+ /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
69
+ active: boolean;
70
+ /** If active=false, this optional field indicates a reason for why the account is not active. */
71
+ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | string;
72
+ [k: string]: unknown;
73
+ }
74
+ export declare function isAccount(v: unknown): v is Account;
75
+ /** DEPRECATED -- Use #identity event instead */
76
+ export interface Handle {
77
+ seq: number;
78
+ did: string;
79
+ handle: string;
80
+ time: string;
81
+ [k: string]: unknown;
82
+ }
83
+ export declare function isHandle(v: unknown): v is Handle;
84
+ /** DEPRECATED -- Use #account event instead */
85
+ export interface Migrate {
86
+ seq: number;
87
+ did: string;
88
+ migrateTo: string | null;
89
+ time: string;
90
+ [k: string]: unknown;
91
+ }
92
+ export declare function isMigrate(v: unknown): v is Migrate;
93
+ /** DEPRECATED -- Use #account event instead */
94
+ export interface Tombstone {
95
+ seq: number;
96
+ did: string;
97
+ time: string;
98
+ [k: string]: unknown;
99
+ }
100
+ export declare function isTombstone(v: unknown): v is Tombstone;
101
+ export interface Info {
102
+ name: 'OutdatedCursor' | string;
103
+ message?: string;
104
+ [k: string]: unknown;
105
+ }
106
+ export declare function isInfo(v: unknown): v is Info;
107
+ /** A repo operation, ie a mutation of a single record. */
108
+ export interface RepoOp {
109
+ action: 'create' | 'update' | 'delete' | string;
110
+ path: string;
111
+ /** For creates and updates, the new record CID. For deletions, null. */
112
+ cid: CID | null;
113
+ [k: string]: unknown;
114
+ }
115
+ export declare function isRepoOp(v: unknown): v is RepoOp;
116
+ export declare const ComAtprotoSyncSubscribeRepos: LexiconDoc;
117
+ export declare const isValidRepoEvent: (evt: unknown) => RepoEvent;
118
+ //# sourceMappingURL=lexicons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicons.d.ts","sourceRoot":"","sources":["../../src/firehose/lexicons.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAI3C,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE9D;AAED,wBAAgB,OAAO,CAAC,CAAC,SAA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AAM,4BAA4B,EAAE,UAsM1C,CAAA;AAID,eAAO,MAAM,gBAAgB,QAAS,OAAO,cAK5C,CAAA"}
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isValidRepoEvent = exports.ComAtprotoSyncSubscribeRepos = exports.isRepoOp = exports.isInfo = exports.isTombstone = exports.isMigrate = exports.isHandle = exports.isAccount = exports.isIdentity = exports.isCommit = exports.hasProp = exports.isObj = void 0;
4
+ const lexicon_1 = require("@atproto/lexicon");
5
+ // @NOTE: this file is an ugly copy job of codegen output. I'd like to clean this whole thing up
6
+ function isObj(v) {
7
+ return typeof v === 'object' && v !== null;
8
+ }
9
+ exports.isObj = isObj;
10
+ function hasProp(data, prop) {
11
+ return prop in data;
12
+ }
13
+ exports.hasProp = hasProp;
14
+ function isCommit(v) {
15
+ return (isObj(v) &&
16
+ hasProp(v, '$type') &&
17
+ v.$type === 'com.atproto.sync.subscribeRepos#commit');
18
+ }
19
+ exports.isCommit = isCommit;
20
+ function isIdentity(v) {
21
+ return (isObj(v) &&
22
+ hasProp(v, '$type') &&
23
+ v.$type === 'com.atproto.sync.subscribeRepos#identity');
24
+ }
25
+ exports.isIdentity = isIdentity;
26
+ function isAccount(v) {
27
+ return (isObj(v) &&
28
+ hasProp(v, '$type') &&
29
+ v.$type === 'com.atproto.sync.subscribeRepos#account');
30
+ }
31
+ exports.isAccount = isAccount;
32
+ function isHandle(v) {
33
+ return (isObj(v) &&
34
+ hasProp(v, '$type') &&
35
+ v.$type === 'com.atproto.sync.subscribeRepos#handle');
36
+ }
37
+ exports.isHandle = isHandle;
38
+ function isMigrate(v) {
39
+ return (isObj(v) &&
40
+ hasProp(v, '$type') &&
41
+ v.$type === 'com.atproto.sync.subscribeRepos#migrate');
42
+ }
43
+ exports.isMigrate = isMigrate;
44
+ function isTombstone(v) {
45
+ return (isObj(v) &&
46
+ hasProp(v, '$type') &&
47
+ v.$type === 'com.atproto.sync.subscribeRepos#tombstone');
48
+ }
49
+ exports.isTombstone = isTombstone;
50
+ function isInfo(v) {
51
+ return (isObj(v) &&
52
+ hasProp(v, '$type') &&
53
+ v.$type === 'com.atproto.sync.subscribeRepos#info');
54
+ }
55
+ exports.isInfo = isInfo;
56
+ function isRepoOp(v) {
57
+ return (isObj(v) &&
58
+ hasProp(v, '$type') &&
59
+ v.$type === 'com.atproto.sync.subscribeRepos#repoOp');
60
+ }
61
+ exports.isRepoOp = isRepoOp;
62
+ exports.ComAtprotoSyncSubscribeRepos = {
63
+ lexicon: 1,
64
+ id: 'com.atproto.sync.subscribeRepos',
65
+ defs: {
66
+ main: {
67
+ type: 'subscription',
68
+ description: 'Subscribe to repo updates',
69
+ parameters: {
70
+ type: 'params',
71
+ properties: {
72
+ cursor: {
73
+ type: 'integer',
74
+ description: 'The last known event to backfill from.',
75
+ },
76
+ },
77
+ },
78
+ message: {
79
+ schema: {
80
+ type: 'union',
81
+ refs: [
82
+ 'lex:com.atproto.sync.subscribeRepos#commit',
83
+ 'lex:com.atproto.sync.subscribeRepos#handle',
84
+ 'lex:com.atproto.sync.subscribeRepos#migrate',
85
+ 'lex:com.atproto.sync.subscribeRepos#tombstone',
86
+ 'lex:com.atproto.sync.subscribeRepos#info',
87
+ ],
88
+ },
89
+ },
90
+ errors: [
91
+ {
92
+ name: 'FutureCursor',
93
+ },
94
+ {
95
+ name: 'ConsumerTooSlow',
96
+ },
97
+ ],
98
+ },
99
+ commit: {
100
+ type: 'object',
101
+ required: [
102
+ 'seq',
103
+ 'rebase',
104
+ 'tooBig',
105
+ 'repo',
106
+ 'commit',
107
+ 'rev',
108
+ 'since',
109
+ 'blocks',
110
+ 'ops',
111
+ 'blobs',
112
+ 'time',
113
+ ],
114
+ nullable: ['prev', 'since'],
115
+ properties: {
116
+ seq: {
117
+ type: 'integer',
118
+ },
119
+ rebase: {
120
+ type: 'boolean',
121
+ },
122
+ tooBig: {
123
+ type: 'boolean',
124
+ },
125
+ repo: {
126
+ type: 'string',
127
+ format: 'did',
128
+ },
129
+ commit: {
130
+ type: 'cid-link',
131
+ },
132
+ prev: {
133
+ type: 'cid-link',
134
+ },
135
+ rev: {
136
+ type: 'string',
137
+ description: 'The rev of the emitted commit',
138
+ },
139
+ since: {
140
+ type: 'string',
141
+ description: 'The rev of the last emitted commit from this repo',
142
+ },
143
+ blocks: {
144
+ type: 'bytes',
145
+ description: 'CAR file containing relevant blocks',
146
+ maxLength: 1000000,
147
+ },
148
+ ops: {
149
+ type: 'array',
150
+ items: {
151
+ type: 'ref',
152
+ ref: 'lex:com.atproto.sync.subscribeRepos#repoOp',
153
+ },
154
+ maxLength: 200,
155
+ },
156
+ blobs: {
157
+ type: 'array',
158
+ items: {
159
+ type: 'cid-link',
160
+ },
161
+ },
162
+ time: {
163
+ type: 'string',
164
+ format: 'datetime',
165
+ },
166
+ },
167
+ },
168
+ handle: {
169
+ type: 'object',
170
+ required: ['seq', 'did', 'handle', 'time'],
171
+ properties: {
172
+ seq: {
173
+ type: 'integer',
174
+ },
175
+ did: {
176
+ type: 'string',
177
+ format: 'did',
178
+ },
179
+ handle: {
180
+ type: 'string',
181
+ format: 'handle',
182
+ },
183
+ time: {
184
+ type: 'string',
185
+ format: 'datetime',
186
+ },
187
+ },
188
+ },
189
+ migrate: {
190
+ type: 'object',
191
+ required: ['seq', 'did', 'migrateTo', 'time'],
192
+ nullable: ['migrateTo'],
193
+ properties: {
194
+ seq: {
195
+ type: 'integer',
196
+ },
197
+ did: {
198
+ type: 'string',
199
+ format: 'did',
200
+ },
201
+ migrateTo: {
202
+ type: 'string',
203
+ },
204
+ time: {
205
+ type: 'string',
206
+ format: 'datetime',
207
+ },
208
+ },
209
+ },
210
+ tombstone: {
211
+ type: 'object',
212
+ required: ['seq', 'did', 'time'],
213
+ properties: {
214
+ seq: {
215
+ type: 'integer',
216
+ },
217
+ did: {
218
+ type: 'string',
219
+ format: 'did',
220
+ },
221
+ time: {
222
+ type: 'string',
223
+ format: 'datetime',
224
+ },
225
+ },
226
+ },
227
+ info: {
228
+ type: 'object',
229
+ required: ['name'],
230
+ properties: {
231
+ name: {
232
+ type: 'string',
233
+ knownValues: ['OutdatedCursor'],
234
+ },
235
+ message: {
236
+ type: 'string',
237
+ },
238
+ },
239
+ },
240
+ repoOp: {
241
+ type: 'object',
242
+ description: "A repo operation, ie a write of a single record. For creates and updates, cid is the record's CID as of this operation. For deletes, it's null.",
243
+ required: ['action', 'path', 'cid'],
244
+ nullable: ['cid'],
245
+ properties: {
246
+ action: {
247
+ type: 'string',
248
+ knownValues: ['create', 'update', 'delete'],
249
+ },
250
+ path: {
251
+ type: 'string',
252
+ },
253
+ cid: {
254
+ type: 'cid-link',
255
+ },
256
+ },
257
+ },
258
+ },
259
+ };
260
+ const lexicons = new lexicon_1.Lexicons([exports.ComAtprotoSyncSubscribeRepos]);
261
+ const isValidRepoEvent = (evt) => {
262
+ return lexicons.assertValidXrpcMessage('com.atproto.sync.subscribeRepos', evt);
263
+ };
264
+ exports.isValidRepoEvent = isValidRepoEvent;
265
+ //# sourceMappingURL=lexicons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicons.js","sourceRoot":"","sources":["../../src/firehose/lexicons.ts"],"names":[],"mappings":";;;AAEA,8CAA4D;AAI5D,gGAAgG;AAEhG,SAAgB,KAAK,CAAC,CAAU;IAC9B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAA;AAC5C,CAAC;AAFD,sBAEC;AAED,SAAgB,OAAO,CACrB,IAAY,EACZ,IAAO;IAEP,OAAO,IAAI,IAAI,IAAI,CAAA;AACrB,CAAC;AALD,0BAKC;AAuDD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,KAAK,CAAC,CAAC,CAAC;QACR,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,wCAAwC,CACrD,CAAA;AACH,CAAC;AAND,4BAMC;AAYD,SAAgB,UAAU,CAAC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,kBAAQ,CAAC,CAAC,oCAA4B,CAAC,CAAC,CAAA;AAEtD,MAAM,gBAAgB,GAAG,CAAC,GAAY,EAAE,EAAE;IAC/C,OAAO,QAAQ,CAAC,sBAAsB,CACpC,iCAAiC,EACjC,GAAG,CACJ,CAAA;AACH,CAAC,CAAA;AALY,QAAA,gBAAgB,oBAK5B"}
@@ -0,0 +1,4 @@
1
+ export * from './runner';
2
+ export * from './firehose';
3
+ export * from './events';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./runner"), exports);
18
+ __exportStar(require("./firehose"), exports);
19
+ __exportStar(require("./events"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,6CAA0B;AAC1B,2CAAwB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Add items to a list, and mark those items as
3
+ * completed. Upon item completion, get list of consecutive
4
+ * items completed at the head of the list. Example:
5
+ *
6
+ * const consecutive = new ConsecutiveList<number>()
7
+ * const item1 = consecutive.push(1)
8
+ * const item2 = consecutive.push(2)
9
+ * const item3 = consecutive.push(3)
10
+ * item2.complete() // []
11
+ * item1.complete() // [1, 2]
12
+ * item3.complete() // [3]
13
+ *
14
+ */
15
+ export declare class ConsecutiveList<T> {
16
+ list: ConsecutiveItem<T>[];
17
+ push(value: T): ConsecutiveItem<T>;
18
+ complete(): T[];
19
+ }
20
+ export declare class ConsecutiveItem<T> {
21
+ private consecutive;
22
+ value: T;
23
+ isComplete: boolean;
24
+ constructor(consecutive: ConsecutiveList<T>, value: T);
25
+ complete(): T[];
26
+ }
27
+ //# sourceMappingURL=consecutive-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consecutive-list.d.ts","sourceRoot":"","sources":["../../src/runner/consecutive-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,qBAAa,eAAe,CAAC,CAAC;IAC5B,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAK;IAE/B,IAAI,CAAC,KAAK,EAAE,CAAC;IAMb,QAAQ,IAAI,CAAC,EAAE;CAOhB;AAED,qBAAa,eAAe,CAAC,CAAC;IAG1B,OAAO,CAAC,WAAW;IACZ,KAAK,EAAE,CAAC;IAHjB,UAAU,UAAQ;gBAER,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,EAChC,KAAK,EAAE,CAAC;IAGjB,QAAQ;CAIT"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConsecutiveItem = exports.ConsecutiveList = void 0;
4
+ /**
5
+ * Add items to a list, and mark those items as
6
+ * completed. Upon item completion, get list of consecutive
7
+ * items completed at the head of the list. Example:
8
+ *
9
+ * const consecutive = new ConsecutiveList<number>()
10
+ * const item1 = consecutive.push(1)
11
+ * const item2 = consecutive.push(2)
12
+ * const item3 = consecutive.push(3)
13
+ * item2.complete() // []
14
+ * item1.complete() // [1, 2]
15
+ * item3.complete() // [3]
16
+ *
17
+ */
18
+ class ConsecutiveList {
19
+ constructor() {
20
+ Object.defineProperty(this, "list", {
21
+ enumerable: true,
22
+ configurable: true,
23
+ writable: true,
24
+ value: []
25
+ });
26
+ }
27
+ push(value) {
28
+ const item = new ConsecutiveItem(this, value);
29
+ this.list.push(item);
30
+ return item;
31
+ }
32
+ complete() {
33
+ let i = 0;
34
+ while (this.list[i]?.isComplete) {
35
+ i += 1;
36
+ }
37
+ return this.list.splice(0, i).map((item) => item.value);
38
+ }
39
+ }
40
+ exports.ConsecutiveList = ConsecutiveList;
41
+ class ConsecutiveItem {
42
+ constructor(consecutive, value) {
43
+ Object.defineProperty(this, "consecutive", {
44
+ enumerable: true,
45
+ configurable: true,
46
+ writable: true,
47
+ value: consecutive
48
+ });
49
+ Object.defineProperty(this, "value", {
50
+ enumerable: true,
51
+ configurable: true,
52
+ writable: true,
53
+ value: value
54
+ });
55
+ Object.defineProperty(this, "isComplete", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: false
60
+ });
61
+ }
62
+ complete() {
63
+ this.isComplete = true;
64
+ return this.consecutive.complete();
65
+ }
66
+ }
67
+ exports.ConsecutiveItem = ConsecutiveItem;
68
+ //# sourceMappingURL=consecutive-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consecutive-list.js","sourceRoot":"","sources":["../../src/runner/consecutive-list.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,MAAa,eAAe;IAA5B;QACE;;;;mBAA6B,EAAE;WAAA;IAejC,CAAC;IAbC,IAAI,CAAC,KAAQ;QACX,MAAM,IAAI,GAAG,IAAI,eAAe,CAAI,IAAI,EAAE,KAAK,CAAC,CAAA;QAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,GAAG,CAAC,CAAA;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;YAChC,CAAC,IAAI,CAAC,CAAA;QACR,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzD,CAAC;CACF;AAhBD,0CAgBC;AAED,MAAa,eAAe;IAE1B,YACU,WAA+B,EAChC,KAAQ;QADf;;;;mBAAQ,WAAW;WAAoB;QACvC;;;;mBAAO,KAAK;WAAG;QAHjB;;;;mBAAa,KAAK;WAAA;IAIf,CAAC;IAEJ,QAAQ;QACN,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAA;IACpC,CAAC;CACF;AAXD,0CAWC"}
@@ -0,0 +1,4 @@
1
+ export * from './consecutive-list';
2
+ export * from './memory-runner';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./consecutive-list"), exports);
18
+ __exportStar(require("./memory-runner"), exports);
19
+ __exportStar(require("./types"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC;AAClC,kDAA+B;AAC/B,0CAAuB"}
@@ -0,0 +1,24 @@
1
+ import PQueue from 'p-queue';
2
+ import { ConsecutiveList } from './consecutive-list';
3
+ import { EventRunner } from './types';
4
+ export { ConsecutiveList };
5
+ export type MemoryRunnerOptions = {
6
+ setCursor?: (cursor: number) => Promise<void>;
7
+ concurrency?: number;
8
+ startCursor?: number;
9
+ };
10
+ export declare class MemoryRunner implements EventRunner {
11
+ opts: MemoryRunnerOptions;
12
+ consecutive: ConsecutiveList<number>;
13
+ mainQueue: PQueue;
14
+ partitions: Map<string, PQueue<import("p-queue/dist/priority-queue").default, import("p-queue").DefaultAddOptions>>;
15
+ cursor: number | undefined;
16
+ constructor(opts?: MemoryRunnerOptions);
17
+ getCursor(): number | undefined;
18
+ addTask(partitionId: string, task: () => Promise<void>): Promise<void>;
19
+ private getPartition;
20
+ trackEvent(did: string, seq: number, handler: () => Promise<void>): Promise<void>;
21
+ processAll(): Promise<void>;
22
+ destroy(): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=memory-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-runner.d.ts","sourceRoot":"","sources":["../../src/runner/memory-runner.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,EAAE,eAAe,EAAE,CAAA;AAE1B,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAID,qBAAa,YAAa,YAAW,WAAW;IAM3B,IAAI,EAAE,mBAAmB;IAL5C,WAAW,0BAAgC;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,0GAA4B;IACtC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;gBAEP,IAAI,GAAE,mBAAwB;IAKjD,SAAS;IAIH,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAO5D,OAAO,CAAC,YAAY;IAUd,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAejE,UAAU;IAIV,OAAO;CAMd"}