document-drive 1.29.4-dev.2 → 1.29.4-dev.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base-server.d.ts","sourceRoot":"","sources":["../../../src/server/base-server.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,aAAa,EAKnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAG3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAEd,KAAK,UAAU,EAYhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAGL,cAAc,EACd,KAAK,gCAAgC,EACtC,MAAM,YAAY,CAAC;AAOpB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EAExB,KAAK,0BAA0B,EAC/B,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAE5B,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAEjB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,w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U;CA6CzB;AAED,MAAM,MAAM,8BAA8B,GACxC,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAEvC,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,KAAK,CAC7C,OAAO,uBAAuB,EAC9B,CAAC,CACF,CAAC;AAEF,eAAO,MAAM,mBAAmB,sKAA0C,CAAC"}
@@ -236,15 +236,21 @@ export class BaseDocumentDriveServer {
236
236
  }
237
237
  async _initializeDrive(driveId) {
238
238
  const drive = await this.getDrive(driveId);
239
+ logger.verbose(`[SYNC DEBUG] Initializing drive ${driveId} with slug "${drive.state.global.slug}"`);
239
240
  await this.synchronizationManager.initializeDriveSyncStatus(driveId, drive);
240
241
  if (this.shouldSyncRemoteDrive(drive)) {
242
+ logger.verbose(`[SYNC DEBUG] Starting sync for remote drive ${driveId}`);
241
243
  await this.startSyncRemoteDrive(driveId);
242
244
  }
243
245
  // add switchboard push listeners
246
+ logger.verbose(`[SYNC DEBUG] Processing ${drive.state.local.listeners.length} listeners for drive ${driveId}`);
244
247
  for (const zodListener of drive.state.local.listeners) {
245
248
  if (zodListener.callInfo?.transmitterType === "SwitchboardPush") {
249
+ logger.verbose(`[SYNC DEBUG] Setting up SwitchboardPush listener ${zodListener.listenerId} for drive ${driveId}`);
246
250
  const transmitter = new SwitchboardPushTransmitter(zodListener.callInfo?.data ?? "");
247
- this.listenerManager.setListener(driveId, {
251
+ logger.verbose(`[SYNC DEBUG] Created SwitchboardPush transmitter with URL: ${zodListener.callInfo?.data || "none"}`);
252
+ await this.listenerManager
253
+ .setListener(driveId, {
248
254
  block: zodListener.block,
249
255
  driveId: drive.state.global.id,
250
256
  filter: {
@@ -258,8 +264,14 @@ export class BaseDocumentDriveServer {
258
264
  system: zodListener.system,
259
265
  label: zodListener.label ?? "",
260
266
  transmitter,
267
+ })
268
+ .then(() => {
269
+ logger.verbose(`[SYNC DEBUG] Successfully set up listener ${zodListener.listenerId} for drive ${driveId}`);
261
270
  });
262
271
  }
272
+ else {
273
+ logger.error(`Skipping listener ${zodListener.listenerId} with unsupported type ${zodListener.callInfo?.transmitterType || "unknown"}`);
274
+ }
263
275
  }
264
276
  }
265
277
  // Delegate synchronization methods to synchronizationManager
@@ -1 +1 @@
1
- {"version":3,"file":"listener-manager.d.ts","sourceRoot":"","sources":["../../../../src/server/listener/listener-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAEL,KAAK,uBAAuB,EAE5B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,cAAc,EAEnB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,eAAe,CAAC;AAOvB,qBAAa,eAAgB,YAAW,gBAAgB;IACtD,MAAM,CAAC,qBAAqB,SAAO;IAEnC,SAAS,CAAC,MAAM,gDAGb;IAEH,SAAS,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAC/C,SAAS,CAAC,OAAO,EAAE,sBAAsB,CAAC;IAG1C,SAAS,CAAC,sBAAsB,0CAG5B;gBAGF,WAAW,EAAE,uBAAuB,EACpC,OAAO,GAAE,sBAAsD;IAQ3D,UAAU,CAAC,OAAO,EAAE,uBAAuB;IAcjD,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAI3B,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IA+B/C,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAWlD,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,EAAE,GAC/C,OAAO,CAAC,IAAI,CAAC;IAaV,8BAA8B,CAClC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,mBAAmB,EAAE,EAChC,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a,sEAOO,KAAK,WAAW,MAAM,YAAY,aAAa,KAAK,IAAI,+EAJ1E;YAEY,cAAc;IA8N5B,OAAO,CAAC,YAAY;IAsBpB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAexD,sBAAsB,CACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAehC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB3C,UAAU,CACd,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAuH1B,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAepD,gBAAgB,CACd,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa;CAU/B"}
@@ -324,58 +324,81 @@ export class ListenerManager {
324
324
  }
325
325
  async getStrands(driveId, listenerId, options) {
326
326
  // this will throw if listenerState is not found
327
- const listenerState = this.getListenerState(driveId, listenerId);
327
+ this.logger.verbose(`[SYNC DEBUG] ListenerManager.getStrands called for drive: ${driveId}, listener: ${listenerId}, options: ${JSON.stringify(options || {})}`);
328
+ let listenerState;
329
+ try {
330
+ listenerState = this.getListenerState(driveId, listenerId);
331
+ this.logger.verbose(`[SYNC DEBUG] Found listener state for drive: ${driveId}, listener: ${listenerId}, status: ${listenerState.listenerStatus}`);
332
+ }
333
+ catch (error) {
334
+ this.logger.error(`[SYNC DEBUG] Failed to find listener state for drive: ${driveId}, listener: ${listenerId}. Error: ${error}`);
335
+ throw error;
336
+ }
328
337
  // fetch operations from drive and prepare strands
329
338
  const strands = [];
330
- const syncUnits = await this.getListenerSyncUnits(driveId, listenerId);
331
- const limit = options?.limit; // maximum number of operations to send across all sync units
332
- let operationsCount = 0; // total amount of operations that have been retrieved
333
- const tasks = syncUnits.map((syncUnit) => async () => {
334
- if (limit && operationsCount >= limit) {
335
- // break;
336
- return;
337
- }
338
- if (syncUnit.revision < 0) {
339
- return;
340
- }
341
- const entry = listenerState.syncUnits.get(syncUnit.syncId);
342
- if (entry && entry.listenerRev >= syncUnit.revision) {
343
- return;
344
- }
345
- const { documentId, scope, branch } = syncUnit;
346
- try {
347
- const operations = await this.syncManager.getOperationData(
348
- // DEAL WITH INVALID SYNC ID ERROR
349
- driveId, syncUnit.syncId, {
350
- since: options?.since,
351
- fromRevision: options?.fromRevision ?? entry?.listenerRev,
352
- limit: limit ? limit - operationsCount : undefined,
353
- });
354
- if (!operations.length) {
339
+ try {
340
+ const syncUnits = await this.getListenerSyncUnits(driveId, listenerId);
341
+ this.logger.verbose(`[SYNC DEBUG] Retrieved ${syncUnits.length} sync units for drive: ${driveId}, listener: ${listenerId}`);
342
+ const limit = options?.limit; // maximum number of operations to send across all sync units
343
+ let operationsCount = 0; // total amount of operations that have been retrieved
344
+ const tasks = syncUnits.map((syncUnit) => async () => {
345
+ if (limit && operationsCount >= limit) {
346
+ // break;
355
347
  return;
356
348
  }
357
- operationsCount += operations.length;
358
- strands.push({
359
- driveId,
360
- documentId,
361
- scope: scope,
362
- branch,
363
- operations,
364
- });
365
- }
366
- catch (error) {
367
- this.logger.error(error);
368
- return;
349
+ if (syncUnit.revision < 0) {
350
+ this.logger.verbose(`[SYNC DEBUG] Skipping sync unit with negative revision: ${syncUnit.syncId}, revision: ${syncUnit.revision}`);
351
+ return;
352
+ }
353
+ const entry = listenerState.syncUnits.get(syncUnit.syncId);
354
+ if (entry && entry.listenerRev >= syncUnit.revision) {
355
+ this.logger.verbose(`[SYNC DEBUG] Skipping sync unit - listener already up to date: ${syncUnit.syncId}, listenerRev: ${entry.listenerRev}, revision: ${syncUnit.revision}`);
356
+ return;
357
+ }
358
+ const { documentId, scope, branch } = syncUnit;
359
+ try {
360
+ this.logger.verbose(`[SYNC DEBUG] Getting operations for syncUnit: ${syncUnit.syncId}, documentId: ${documentId}, scope: ${scope}, branch: ${branch}`);
361
+ const operations = await this.syncManager.getOperationData(
362
+ // DEAL WITH INVALID SYNC ID ERROR
363
+ driveId, syncUnit.syncId, {
364
+ since: options?.since,
365
+ fromRevision: options?.fromRevision ?? entry?.listenerRev,
366
+ limit: limit ? limit - operationsCount : undefined,
367
+ });
368
+ this.logger.verbose(`[SYNC DEBUG] Retrieved ${operations.length} operations for syncUnit: ${syncUnit.syncId}`);
369
+ if (!operations.length) {
370
+ return;
371
+ }
372
+ operationsCount += operations.length;
373
+ strands.push({
374
+ driveId,
375
+ documentId,
376
+ scope: scope,
377
+ branch,
378
+ operations,
379
+ });
380
+ this.logger.verbose(`[SYNC DEBUG] Added strand with ${operations.length} operations for syncUnit: ${syncUnit.syncId}`);
381
+ }
382
+ catch (error) {
383
+ this.logger.error(`Error getting operations for syncUnit: ${syncUnit.syncId}, error: ${error}`);
384
+ return;
385
+ }
386
+ });
387
+ if (this.options.sequentialUpdates) {
388
+ this.logger.verbose(`[SYNC DEBUG] Processing ${tasks.length} sync units sequentially`);
389
+ for (const task of tasks) {
390
+ await task();
391
+ }
369
392
  }
370
- });
371
- if (this.options.sequentialUpdates) {
372
- for (const task of tasks) {
373
- await task();
393
+ else {
394
+ this.logger.verbose(`[SYNC DEBUG] Processing ${tasks.length} sync units in parallel`);
395
+ await Promise.all(tasks.map((task) => task()));
374
396
  }
375
397
  }
376
- else {
377
- await Promise.all(tasks.map((task) => task()));
398
+ catch (error) {
399
+ this.logger.error(`Error in getStrands: ${error}`);
378
400
  }
401
+ this.logger.verbose(`ListenerManager.getStrands returning ${strands.length} strands for drive: ${driveId}, listener: ${listenerId}`);
379
402
  return strands;
380
403
  }
381
404
  getListenerState(driveId, listenerId) {
@@ -30,6 +30,14 @@ export declare class PullResponderTransmitter implements IPullResponderTransmitt
30
30
  static registerPullResponder(driveId: string, url: string, filter: ListenerFilter): Promise<Listener["listenerId"]>;
31
31
  static pullStrands(driveId: string, url: string, listenerId: string, options?: GetStrandsOptions): Promise<StrandUpdate[]>;
32
32
  static acknowledgeStrands(url: string, listenerId: string, revisions: ListenerRevision[]): Promise<void>;
33
+ /**
34
+ * This function will only throw if `onError` throws an error (or there is
35
+ * an unintentionally unhandled error in the pull loop).
36
+ *
37
+ * All other errors are caught, logged, and passed to `onError`.
38
+ *
39
+ * Because of this, `onError` _may be called multiple times_.
40
+ */
33
41
  private static executePull;
34
42
  static setupPull(driveId: string, trigger: PullResponderTrigger, onStrandUpdate: (strand: StrandUpdate, source: StrandUpdateSource) => Promise<IOperationResult>, onError: (error: Error) => void, onRevisions?: (revisions: ListenerRevisionWithError[]) => void, onAcknowledge?: (success: boolean) => void): CancelPullLoop;
35
43
  static createPullResponderTrigger(driveId: string, url: string, options: Pick<RemoteDriveOptions, "pullInterval" | "pullFilter">): Promise<PullResponderTrigger>;
@@ -1 +1 @@
1
- {"version":3,"file":"pull-responder.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/pull-responder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG;IACpE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,OA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E,GAC5B,OAAO,CAAC,IAAI,CAAC;mBAoDK,WAAW;IAgHhC,MAAM,CAAC,SAAS,CACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,cAAc,EAAE,CACd,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,kBAAkB,KACvB,OAAO,CAAC,gBAAgB,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EAC/B,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,yBAAyB,EAAE,KAAK,IAAI,EAC9D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GACzC,cAAc;WAoDJ,0BAA0B,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,YAAY,CAAC,GAC/D,OAAO,CAAC,oBAAoB,CAAC;IA6BhC,MAAM,CAAC,sBAAsB,CAC3B,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,oBAAoB;CAGnC"}
1
+ {"version":3,"file":"pull-responder.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/pull-responder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG;IACpE,K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,YAAY,EAAE,CAAC;WAmFb,kBAAkB,CAC7B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,gBAAgB,EAAE,GAC5B,OAAO,CAAC,IAAI,CAAC;IAoDhB;;;;;;;OAOG;mBACkB,WAAW;IA+NhC,MAAM,CAAC,SAAS,CACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,cAAc,EAAE,CACd,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,kBAAkB,KACvB,OAAO,CAAC,gBAAgB,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EAC/B,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,yBAAyB,EAAE,KAAK,IAAI,EAC9D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GACzC,cAAc;WAsEJ,0BAA0B,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,YAAY,CAAC,GAC/D,OAAO,CAAC,oBAAoB,CAAC;IAgChC,MAAM,CAAC,sBAAsB,CAC3B,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,oBAAoB;CAGnC"}
@@ -22,8 +22,21 @@ export class PullResponderTransmitter {
22
22
  this.logger.verbose(`constructor(listener: ${listener.listenerId})`);
23
23
  }
24
24
  getStrands(options) {
25
- this.logger.verbose(`getStrands(drive: ${this.listener.driveId}, listener: ${this.listener.listenerId})`);
26
- return this.manager.getStrands(this.listener.driveId, this.listener.listenerId, options);
25
+ this.logger.verbose(`[SYNC DEBUG] PullResponderTransmitter.getStrands called for drive: ${this.listener.driveId}, listener: ${this.listener.listenerId}, options: ${JSON.stringify(options || {})}`);
26
+ return this.manager
27
+ .getStrands(this.listener.driveId, this.listener.listenerId, options)
28
+ .then((strands) => {
29
+ this.logger.verbose(`[SYNC DEBUG] PullResponderTransmitter.getStrands returning ${strands.length} strands for drive: ${this.listener.driveId}, listener: ${this.listener.listenerId}`);
30
+ if (strands.length === 0) {
31
+ this.logger.verbose(`[SYNC DEBUG] No strands returned for drive: ${this.listener.driveId}, listener: ${this.listener.listenerId}`);
32
+ }
33
+ else {
34
+ for (const strand of strands) {
35
+ this.logger.verbose(`[SYNC DEBUG] Strand for drive: ${strand.driveId}, document: ${strand.documentId}, scope: ${strand.scope}, operations: ${strand.operations.length}`);
36
+ }
37
+ }
38
+ return strands;
39
+ });
27
40
  }
28
41
  disconnect() {
29
42
  // TODO remove listener from switchboard
@@ -66,7 +79,7 @@ export class PullResponderTransmitter {
66
79
  return result.registerPullResponderListener.listenerId;
67
80
  }
68
81
  static async pullStrands(driveId, url, listenerId, options) {
69
- this.staticLogger.verbose(`pullStrands(url: ${url}, listener: ${listenerId})`);
82
+ this.staticLogger.verbose(`[SYNC DEBUG] PullResponderTransmitter.pullStrands called for drive: ${driveId}, url: ${url}, listener: ${listenerId}, options: ${JSON.stringify(options || {})}`);
70
83
  const result = await requestGraphql(url, gql `
71
84
  query strands($listenerId: ID!) {
72
85
  system {
@@ -106,18 +119,25 @@ export class PullResponderTransmitter {
106
119
  `, { listenerId });
107
120
  const error = result.errors?.at(0);
108
121
  if (error) {
122
+ this.staticLogger.verbose(`[SYNC DEBUG] Error pulling strands for drive: ${driveId}, listener: ${listenerId}, error: ${JSON.stringify(error)}`);
109
123
  throw error;
110
124
  }
111
125
  if (!result.system) {
126
+ this.staticLogger.verbose(`[SYNC DEBUG] No system data returned when pulling strands for drive: ${driveId}, listener: ${listenerId}`);
112
127
  return [];
113
128
  }
114
- return result.system.sync.strands.map((s) => ({
129
+ const strands = result.system.sync.strands.map((s) => ({
115
130
  ...s,
116
131
  operations: s.operations.map((o) => ({
117
132
  ...o,
118
133
  input: JSON.parse(o.input),
119
134
  })),
120
135
  }));
136
+ this.staticLogger.verbose(`[SYNC DEBUG] PullResponderTransmitter.pullStrands returning ${strands.length} strands for drive: ${driveId}, listener: ${listenerId}`);
137
+ if (strands.length > 0) {
138
+ this.staticLogger.verbose(`[SYNC DEBUG] Strands being returned: ${strands.map((s) => `${s.documentId}:${s.scope}`).join(", ")}`);
139
+ }
140
+ return strands;
121
141
  }
122
142
  static async acknowledgeStrands(url, listenerId, revisions) {
123
143
  this.staticLogger.verbose(`acknowledgeStrands(url: ${url}, listener: ${listenerId})`, revisions);
@@ -153,84 +173,148 @@ export class PullResponderTransmitter {
153
173
  throw new Error("Error acknowledging strands");
154
174
  }
155
175
  }
176
+ /**
177
+ * This function will only throw if `onError` throws an error (or there is
178
+ * an unintentionally unhandled error in the pull loop).
179
+ *
180
+ * All other errors are caught, logged, and passed to `onError`.
181
+ *
182
+ * Because of this, `onError` _may be called multiple times_.
183
+ */
156
184
  static async executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge) {
157
185
  this.staticLogger.verbose(`executePull(driveId: ${driveId}), trigger:`, trigger);
186
+ this.staticLogger.info(`[SYNC DEBUG] PullResponderTransmitter.executePull starting for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
187
+ const { url } = trigger.data;
188
+ let strands;
189
+ let error;
158
190
  try {
159
- const { url, listenerId } = trigger.data;
160
- const strands = await PullResponderTransmitter.pullStrands(driveId, url, listenerId);
161
- this.staticLogger.verbose("Pulled strands...");
162
- // if there are no new strands then do nothing
163
- if (!strands.length) {
164
- onRevisions?.([]);
165
- this.staticLogger.verbose("No new strands, skipping...");
166
- return;
167
- }
168
- const listenerRevisions = [];
169
- for (const strand of strands) {
170
- const operations = strand.operations.map((op) => ({
171
- ...op,
172
- scope: strand.scope,
173
- branch: strand.branch,
174
- }));
175
- this.staticLogger.verbose("Processing strand...");
176
- let error = undefined;
177
- try {
178
- const result = await onStrandUpdate(strand, {
179
- type: "trigger",
180
- trigger,
181
- });
182
- if (result.error) {
183
- throw result.error;
191
+ strands = await PullResponderTransmitter.pullStrands(driveId, url, trigger.data.listenerId);
192
+ }
193
+ catch (e) {
194
+ error = e;
195
+ const graphqlError = error;
196
+ const errors = graphqlError.response?.errors ?? [];
197
+ for (const err of errors) {
198
+ if (err.message === "Listener not found") {
199
+ this.staticLogger.verbose(`[SYNC DEBUG] Auto-registering pull responder for drive: ${driveId}`);
200
+ // register a new pull responder
201
+ const listenerId = await PullResponderTransmitter.registerPullResponder(trigger.driveId, url, trigger.filter);
202
+ // update the trigger with the new listenerId
203
+ trigger.data.listenerId = listenerId;
204
+ // try again
205
+ try {
206
+ strands = await PullResponderTransmitter.pullStrands(driveId, url, listenerId);
207
+ this.staticLogger.verbose(`Successfully auto-registerd and pulled strands for drive: ${driveId}, listenerId: ${listenerId}`);
184
208
  }
209
+ catch (error) {
210
+ this.staticLogger.error(`Could not resolve 'Listener not found' error by registering a new pull responder for drive: ${driveId}, listenerId: ${listenerId}: ${error}`);
211
+ onError(error);
212
+ return;
213
+ }
214
+ break;
185
215
  }
186
- catch (e) {
187
- error = e;
188
- onError(error);
189
- }
190
- listenerRevisions.push({
191
- branch: strand.branch,
192
- documentId: strand.documentId || "",
193
- driveId: strand.driveId,
194
- revision: operations.pop()?.index ?? -1,
195
- scope: strand.scope,
196
- status: error
197
- ? error instanceof OperationError
198
- ? error.status
199
- : "ERROR"
200
- : "SUCCESS",
201
- error,
202
- });
203
216
  }
204
- this.staticLogger.verbose("Processed strands...");
205
- onRevisions?.(listenerRevisions);
206
- this.staticLogger.verbose("Acknowledging strands...");
207
- let success = false;
217
+ }
218
+ if (!strands) {
219
+ this.staticLogger.error(`Error pulling strands for drive, and could not auto-register: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
220
+ onError(error);
221
+ return;
222
+ }
223
+ // if there are no new strands then do nothing
224
+ if (!strands.length) {
225
+ this.staticLogger.verbose(`[SYNC DEBUG] No strands returned in pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
208
226
  try {
209
- await PullResponderTransmitter.acknowledgeStrands(url, listenerId, listenerRevisions.map((revision) => {
210
- const { error, ...rest } = revision;
211
- return rest;
212
- }));
213
- success = true;
227
+ onRevisions?.([]);
214
228
  }
215
229
  catch (error) {
216
- this.staticLogger.error("ACK error", error);
230
+ this.staticLogger.error(`Error calling onRevisions for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
231
+ // pass the error to the caller
232
+ onError(error);
217
233
  }
218
- if (success) {
219
- this.staticLogger.verbose("Acknowledged strands successfully.");
234
+ return;
235
+ }
236
+ this.staticLogger.verbose(`[SYNC DEBUG] Processing ${strands.length} strands in pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
237
+ const listenerRevisions = [];
238
+ // todo: evaluate whether or not we can process strands in parallel
239
+ for (const strand of strands) {
240
+ const operations = strand.operations.map((op) => ({
241
+ ...op,
242
+ scope: strand.scope,
243
+ branch: strand.branch,
244
+ }));
245
+ this.staticLogger.verbose(`[SYNC DEBUG] Processing strand for drive: ${strand.driveId}, document: ${strand.documentId}, scope: ${strand.scope}, with ${operations.length} operations`);
246
+ let error = undefined;
247
+ try {
248
+ const result = await onStrandUpdate(strand, {
249
+ type: "trigger",
250
+ trigger,
251
+ });
252
+ if (result.error) {
253
+ throw result.error;
254
+ }
220
255
  }
221
- else {
222
- this.staticLogger.error("Failed to acknowledge strands");
256
+ catch (e) {
257
+ this.staticLogger.error(`Error processing strand for drive: ${strand.driveId}, document: ${strand.documentId}, scope: ${strand.scope}, with ${operations.length} operations: ${e}`);
258
+ error = e;
259
+ onError(error);
260
+ // continue
223
261
  }
224
- // let this throw separately
262
+ listenerRevisions.push({
263
+ branch: strand.branch,
264
+ documentId: strand.documentId || "",
265
+ driveId: strand.driveId,
266
+ revision: operations.pop()?.index ?? -1,
267
+ scope: strand.scope,
268
+ status: error
269
+ ? error instanceof OperationError
270
+ ? error.status
271
+ : "ERROR"
272
+ : "SUCCESS",
273
+ error,
274
+ });
275
+ }
276
+ this.staticLogger.verbose("Processed strands...");
277
+ // do not let a listener kill the pull loop
278
+ try {
279
+ onRevisions?.(listenerRevisions);
280
+ }
281
+ catch (error) {
282
+ this.staticLogger.error(`Error calling onRevisions for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
283
+ // pass the error to the caller
284
+ onError(error);
285
+ }
286
+ this.staticLogger.verbose(`[SYNC DEBUG] Acknowledging ${listenerRevisions.length} strands for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
287
+ let success = false;
288
+ try {
289
+ await PullResponderTransmitter.acknowledgeStrands(url, trigger.data.listenerId, listenerRevisions.map((revision) => {
290
+ const { error, ...rest } = revision;
291
+ return rest;
292
+ }));
293
+ success = true;
294
+ }
295
+ catch (error) {
296
+ this.staticLogger.error(`Error acknowledging strands for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
297
+ // pass the error to the caller
298
+ onError(error);
299
+ }
300
+ if (success) {
301
+ this.staticLogger.verbose(`[SYNC DEBUG] Successfully acknowledged strands for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
302
+ }
303
+ else {
304
+ this.staticLogger.error("Failed to acknowledge strands");
305
+ }
306
+ // let this throw separately
307
+ try {
225
308
  onAcknowledge?.(success);
226
309
  }
227
310
  catch (error) {
228
- this.staticLogger.error("Pull error", error);
311
+ this.staticLogger.error(`Error calling onAcknowledge for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
312
+ // pass the error to the caller
229
313
  onError(error);
230
314
  }
231
315
  }
232
316
  static setupPull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge) {
233
- this.staticLogger.verbose(`setupPull(drive: ${driveId}), trigger:`, trigger);
317
+ this.staticLogger.verbose(`[SYNC DEBUG] PullResponderTransmitter.setupPull initiated for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
234
318
  const { interval } = trigger.data;
235
319
  let loopInterval = PULL_DRIVE_INTERVAL;
236
320
  if (interval) {
@@ -244,20 +328,25 @@ export class PullResponderTransmitter {
244
328
  // ignore invalid interval
245
329
  }
246
330
  }
331
+ this.staticLogger.verbose(`[SYNC DEBUG] Pull interval set to ${loopInterval}ms for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
247
332
  let isCancelled = false;
248
333
  let timeout;
249
334
  const executeLoop = async () => {
250
335
  while (!isCancelled) {
251
- this.staticLogger.verbose("Execute loop...");
336
+ this.staticLogger.verbose(`[SYNC DEBUG] Starting pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
252
337
  await this.executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge);
338
+ this.staticLogger.verbose(`[SYNC DEBUG] Completed pull cycle for drive: ${driveId}, listenerId: ${trigger.data.listenerId}, waiting ${loopInterval}ms for next cycle`);
253
339
  await new Promise((resolve) => {
254
340
  this.staticLogger.verbose(`Scheduling next pull in ${loopInterval} ms`);
255
341
  timeout = setTimeout(resolve, loopInterval);
256
342
  });
257
343
  }
258
344
  };
259
- executeLoop().catch(this.staticLogger.error);
345
+ executeLoop().catch((error) => {
346
+ this.staticLogger.error(`Error in executeLoop for drive: ${driveId}, listenerId: ${trigger.data.listenerId}: ${error}`);
347
+ });
260
348
  return () => {
349
+ this.staticLogger.verbose(`[SYNC DEBUG] Cancelling pull loop for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
261
350
  isCancelled = true;
262
351
  if (timeout !== undefined) {
263
352
  clearTimeout(timeout);
@@ -267,15 +356,18 @@ export class PullResponderTransmitter {
267
356
  static async createPullResponderTrigger(driveId, url, options) {
268
357
  this.staticLogger.verbose(`createPullResponderTrigger(drive: ${driveId}, url: ${url})`);
269
358
  const { pullFilter, pullInterval } = options;
270
- const listenerId = await PullResponderTransmitter.registerPullResponder(driveId, url, pullFilter ?? {
359
+ const filter = pullFilter ?? {
271
360
  documentId: ["*"],
272
361
  documentType: ["*"],
273
362
  branch: ["*"],
274
363
  scope: ["*"],
275
- });
364
+ };
365
+ const listenerId = await PullResponderTransmitter.registerPullResponder(driveId, url, filter);
276
366
  const pullTrigger = {
277
367
  id: generateUUID(),
278
368
  type: "PullResponder",
369
+ driveId,
370
+ filter,
279
371
  data: {
280
372
  url,
281
373
  listenerId,
@@ -1,4 +1,4 @@
1
- import { type PullResponderTriggerData, type Trigger } from "#drive-document-model/gen/types";
1
+ import { type ListenerFilter, type PullResponderTriggerData, type Trigger } from "#drive-document-model/gen/types";
2
2
  import { type ListenerRevision, type StrandUpdate } from "#server/types";
3
3
  export type StrandUpdateSource = {
4
4
  type: "local";
@@ -14,6 +14,8 @@ export interface InternalTransmitterService extends ITransmitter {
14
14
  getName(): string;
15
15
  }
16
16
  export type PullResponderTrigger = Omit<Trigger, "data" | "type"> & {
17
+ driveId: string;
18
+ filter: ListenerFilter;
17
19
  data: PullResponderTriggerData;
18
20
  type: "PullResponder";
19
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CACP,OAAO,EAAE,YAAY,EAAE,EACvB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AACD,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAClE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CACP,OAAO,EAAE,YAAY,EAAE,EACvB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AACD,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sync-manager.d.ts","sourceRoot":"","sources":["../../../src/server/sync-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,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