@tinycloud/node-sdk 3.8.0-beta.6 → 3.8.0-beta.9

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/dist/index.js CHANGED
@@ -17099,6 +17099,9 @@ function assertValidReplicationConfig(replication) {
17099
17099
  if (replication?.syncScope !== void 0 && replication.syncScope !== "prefixes") {
17100
17100
  throw new TypeError('replication.syncScope must be "prefixes"');
17101
17101
  }
17102
+ if (replication?.contentFetch !== void 0 && replication.contentFetch !== "eager" && replication.contentFetch !== "lazy") {
17103
+ throw new TypeError('replication.contentFetch must be "eager" or "lazy"');
17104
+ }
17102
17105
  if (replication === void 0 || !replication.enabled) return;
17103
17106
  if (replication.storage === void 0 || replication.storage === null) {
17104
17107
  throw new TypeError("replication.enabled requires replication.storage");
@@ -17151,6 +17154,7 @@ function resolvedOptions(options) {
17151
17154
  maxStalenessMs: options.maxStalenessMs ?? 12e4,
17152
17155
  staleSyncTimeoutMs: options.staleSyncTimeoutMs ?? 5e3,
17153
17156
  allowSecrets: options.allowSecrets === true,
17157
+ contentFetch: options.contentFetch ?? "eager",
17154
17158
  verify: options.verify === true
17155
17159
  };
17156
17160
  }
@@ -29377,7 +29381,8 @@ var SqliteReplicaHandle = class {
29377
29381
  options.signal.addEventListener("abort", onAbort, { once: true });
29378
29382
  const engine = new (__privateGet(this, _replica)).Replica({
29379
29383
  store: __privateGet(this, _store),
29380
- transportFor
29384
+ transportFor,
29385
+ ...this.spec.contentFetch === void 0 ? {} : { contentFetch: this.spec.contentFetch }
29381
29386
  });
29382
29387
  const running = engine.sync({ signal: abort.signal });
29383
29388
  const registration = { promise: running, abort: () => abort.abort() };