dexie-cloud-addon 4.1.0-beta.38 → 4.1.0-beta.39

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.1.0-beta.38, Fri Dec 06 2024
11
+ * Version 4.1.0-beta.39, Mon Jan 20 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -3909,7 +3909,7 @@
3909
3909
  },
3910
3910
  };
3911
3911
 
3912
- const bigIntDef = {
3912
+ const bigIntDef$1 = {
3913
3913
  bigint: {
3914
3914
  replace: (realVal) => {
3915
3915
  return { $t: "bigint", v: "" + realVal };
@@ -4152,7 +4152,7 @@
4152
4152
 
4153
4153
  const builtin = {
4154
4154
  ...numberDef,
4155
- ...bigIntDef,
4155
+ ...bigIntDef$1,
4156
4156
  ...DateDef,
4157
4157
  ...SetDef,
4158
4158
  ...MapDef,
@@ -4262,7 +4262,7 @@
4262
4262
  this.v = value;
4263
4263
  }
4264
4264
  }
4265
- const defs = Object.assign(Object.assign(Object.assign({}, undefinedDef), (hasBigIntSupport
4265
+ const bigIntDef = hasBigIntSupport
4266
4266
  ? {}
4267
4267
  : {
4268
4268
  bigint: {
@@ -4270,17 +4270,19 @@
4270
4270
  replace: (fakeBigInt) => {
4271
4271
  return Object.assign({ $t: 'bigint' }, fakeBigInt);
4272
4272
  },
4273
- revive: ({ v, }) => new FakeBigInt(v)
4274
- }
4275
- })), { PropModification: {
4273
+ revive: ({ v }) => new FakeBigInt(v),
4274
+ },
4275
+ };
4276
+ const defs = Object.assign(Object.assign(Object.assign({}, undefinedDef), bigIntDef), { PropModification: {
4276
4277
  test: (val) => val instanceof Dexie.PropModification,
4277
4278
  replace: (propModification) => {
4278
- return Object.assign({ $t: 'PropModification' }, propModification);
4279
+ return Object.assign({ $t: 'PropModification' }, propModification['@@propmod']);
4279
4280
  },
4280
4281
  revive: (_a) => {
4281
- var propModification = __rest(_a, ["$t"]);
4282
- return new Dexie.PropModification(propModification);
4283
- }
4282
+ var propModSpec = __rest(_a, ["$t"]) // keep the rest
4283
+ ;
4284
+ return new Dexie.PropModification(propModSpec);
4285
+ },
4284
4286
  } });
4285
4287
  const TSON = TypesonSimplified(builtin, defs);
4286
4288
  const BISON = Bison(defs);
@@ -4438,11 +4440,12 @@
4438
4440
  db.syncStateChangedEvent.next({
4439
4441
  phase: 'pushing',
4440
4442
  });
4443
+ const body = TSON.stringify(syncRequest);
4441
4444
  const res = yield fetch(`${databaseUrl}/sync`, {
4442
4445
  method: 'post',
4443
4446
  headers,
4444
4447
  credentials: 'include', // For Arr Affinity cookie only, for better Rate-Limit counting only.
4445
- body: TSON.stringify(syncRequest),
4448
+ body,
4446
4449
  });
4447
4450
  //const contentLength = Number(res.headers.get('content-length'));
4448
4451
  db.syncStateChangedEvent.next({
@@ -5277,7 +5280,12 @@
5277
5280
  const usingYProps = Object.values(schema).some(tbl => { var _a; return (_a = tbl.yProps) === null || _a === void 0 ? void 0 : _a.length; });
5278
5281
  const serverSupportsYprops = !!res.yMessages;
5279
5282
  if (usingYProps && serverSupportsYprops) {
5280
- yield downloadYDocsFromServer(db, databaseUrl, newSyncState);
5283
+ try {
5284
+ yield downloadYDocsFromServer(db, databaseUrl, newSyncState);
5285
+ }
5286
+ catch (error) {
5287
+ console.error('Failed to download Yjs documents from server', error);
5288
+ }
5281
5289
  }
5282
5290
  console.debug('SYNC DONE', { isInitialSync });
5283
5291
  db.syncCompleteEvent.next();
@@ -8153,7 +8161,7 @@
8153
8161
  const syncComplete = new rxjs.Subject();
8154
8162
  dexie.cloud = {
8155
8163
  // @ts-ignore
8156
- version: "4.1.0-beta.38",
8164
+ version: "4.1.0-beta.39",
8157
8165
  options: Object.assign({}, DEFAULT_OPTIONS),
8158
8166
  schema: null,
8159
8167
  get currentUserId() {
@@ -8471,7 +8479,7 @@
8471
8479
  }
8472
8480
  }
8473
8481
  // @ts-ignore
8474
- dexieCloud.version = "4.1.0-beta.38";
8482
+ dexieCloud.version = "4.1.0-beta.39";
8475
8483
  Dexie.Cloud = dexieCloud;
8476
8484
 
8477
8485
  // In case the SW lives for a while, let it reuse already opened connections: