orez 0.5.16 → 0.5.18
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/README.md +4 -0
- package/dist/cf-do/worker.d.ts.map +1 -1
- package/dist/cf-do/worker.js +89 -14
- package/dist/cf-do/worker.js.map +1 -1
- package/dist/sync-browser-host/generated/sqlite3-browser.wasm +0 -0
- package/dist/sync-browser-host/generated/sync_wasm.js +921 -0
- package/dist/sync-browser-host/generated/sync_wasm_bg.wasm +0 -0
- package/dist/sync-browser-host/host.d.ts +8 -0
- package/dist/sync-browser-host/host.d.ts.map +1 -0
- package/dist/sync-browser-host/host.js +435 -0
- package/dist/sync-browser-host/host.js.map +1 -0
- package/dist/sync-browser-host/idb-snapshot.d.ts +10 -0
- package/dist/sync-browser-host/idb-snapshot.d.ts.map +1 -0
- package/dist/sync-browser-host/idb-snapshot.js +109 -0
- package/dist/sync-browser-host/idb-snapshot.js.map +1 -0
- package/dist/sync-browser-host/index.d.ts +4 -0
- package/dist/sync-browser-host/index.d.ts.map +1 -0
- package/dist/sync-browser-host/index.js +4 -0
- package/dist/sync-browser-host/index.js.map +1 -0
- package/dist/sync-browser-host/message-port.d.ts +6 -0
- package/dist/sync-browser-host/message-port.d.ts.map +1 -0
- package/dist/sync-browser-host/message-port.js +182 -0
- package/dist/sync-browser-host/message-port.js.map +1 -0
- package/dist/sync-browser-host/sqlite-adapter.d.ts +66 -0
- package/dist/sync-browser-host/sqlite-adapter.d.ts.map +1 -0
- package/dist/sync-browser-host/sqlite-adapter.js +135 -0
- package/dist/sync-browser-host/sqlite-adapter.js.map +1 -0
- package/dist/sync-browser-host/types.d.ts +88 -0
- package/dist/sync-browser-host/types.d.ts.map +1 -0
- package/dist/sync-browser-host/types.js +12 -0
- package/dist/sync-browser-host/types.js.map +1 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +35 -0
- package/dist/test-setup.js.map +1 -0
- package/dist/zero-http/test-harness.d.ts +2 -6
- package/dist/zero-http/test-harness.d.ts.map +1 -1
- package/dist/zero-http/test-harness.js +4 -2
- package/dist/zero-http/test-harness.js.map +1 -1
- package/dist/zero-http/transport.d.ts +30 -4
- package/dist/zero-http/transport.d.ts.map +1 -1
- package/dist/zero-http/transport.js +411 -44
- package/dist/zero-http/transport.js.map +1 -1
- package/package.json +15 -5
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
fetch?: typeof fetch;
|
|
4
|
-
}): {
|
|
1
|
+
export type QueryTransform = (name: string, args: readonly unknown[]) => unknown;
|
|
2
|
+
export type HttpPullTransport = {
|
|
5
3
|
pull(): Promise<void>;
|
|
4
|
+
flush(): Promise<void>;
|
|
6
5
|
readonly connections: number;
|
|
7
6
|
uninstall(): void;
|
|
8
7
|
};
|
|
8
|
+
export type HttpPullTransportOptions = {
|
|
9
|
+
appID?: string;
|
|
10
|
+
shardNum?: number;
|
|
11
|
+
origin: string;
|
|
12
|
+
pushOrigin?: string;
|
|
13
|
+
fetch?: typeof fetch;
|
|
14
|
+
pullIntervalMs?: number;
|
|
15
|
+
/**
|
|
16
|
+
* opens a notification-only socket to <origin>/wake and pulls immediately on
|
|
17
|
+
* any wake, demoting interval polling to a safety net. true preserves the
|
|
18
|
+
* bare unauthenticated URL. for an authenticated host, pass getToken: each
|
|
19
|
+
* socket attempt calls it afresh and appends the result as wakeToken because
|
|
20
|
+
* browser WebSockets cannot send headers. consumers should implement
|
|
21
|
+
* getToken by calling an authenticated edge route that mints a short-lived,
|
|
22
|
+
* namespace-scoped signed token; the consumer's authorizeWake callback must
|
|
23
|
+
* verify that token. mint failures leave this advisory channel down and retry
|
|
24
|
+
* with backoff; pulls remain the source of correctness.
|
|
25
|
+
*/
|
|
26
|
+
wake?: boolean | {
|
|
27
|
+
getToken(): Promise<string>;
|
|
28
|
+
};
|
|
29
|
+
queryTransform?: QueryTransform;
|
|
30
|
+
queryForward?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare function installHttpPullTransport(opts: HttpPullTransportOptions): HttpPullTransport;
|
|
33
|
+
export declare function ensureHttpPullTransport(opts: HttpPullTransportOptions): HttpPullTransport;
|
|
34
|
+
export declare function flushHttpPullTransports(): Promise<void>;
|
|
9
35
|
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/zero-http/transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/zero-http/transport.ts"],"names":[],"mappings":"AA6CA,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,KAAK,OAAO,CAAA;AAyChF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAKrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,SAAS,IAAI,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IAGrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IAId,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IAGpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG;QAAE,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,CAAA;IAIhD,cAAc,CAAC,EAAE,cAAc,CAAA;IAI/B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,wBAAwB,GAC7B,iBAAiB,CA2EnB;AAOD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,wBAAwB,GAC7B,iBAAiB,CAOnB;AAED,wBAAsB,uBAAuB,kBAI5C"}
|