@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.
- package/dist/transport.d.ts +3 -0
- package/package.json +1 -1
- package/src/transport.ts +4 -0
package/dist/transport.d.ts
CHANGED
|
@@ -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
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
|
}
|