@pylonsync/sync 0.22.35 → 0.22.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.
@@ -62,6 +62,9 @@ export interface PylonRequestInit {
62
62
  accept?: string;
63
63
  /** AbortController signal for cancellation. */
64
64
  signal?: AbortSignal;
65
+ /** Let the request outlive the page (fetch `keepalive`). The body must
66
+ * stay under the browser's 64 KB keepalive limit. */
67
+ keepalive?: boolean;
65
68
  }
66
69
  /**
67
70
  * Resolve the base URL. Browser-side fallback to
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.22.35",
6
+ "version": "0.22.39",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "types": "./dist/index.d.ts",
package/src/transport.ts CHANGED
@@ -108,6 +108,9 @@ export interface PylonRequestInit {
108
108
  accept?: string;
109
109
  /** AbortController signal for cancellation. */
110
110
  signal?: AbortSignal;
111
+ /** Let the request outlive the page (fetch `keepalive`). The body must
112
+ * stay under the browser's 64 KB keepalive limit. */
113
+ keepalive?: boolean;
111
114
  }
112
115
 
113
116
  /**
@@ -164,6 +167,7 @@ export function buildRequest(
164
167
  credentials: "include",
165
168
  body,
166
169
  signal: init.signal,
170
+ ...(init.keepalive ? { keepalive: true } : {}),
167
171
  },
168
172
  };
169
173
  }