jazz-wasm 2.0.0-alpha.35 → 2.0.0-alpha.37
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/package.json +1 -1
- package/pkg/jazz_wasm.d.ts +11 -1
- package/pkg/jazz_wasm.js +58 -5
- package/pkg/jazz_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/jazz_wasm.d.ts
CHANGED
|
@@ -169,6 +169,7 @@ export class WasmRuntime {
|
|
|
169
169
|
* Disconnect from the Jazz server and drop the transport handle.
|
|
170
170
|
*/
|
|
171
171
|
disconnect(): void;
|
|
172
|
+
drainRejectedBatchIds(): any;
|
|
172
173
|
/**
|
|
173
174
|
* Phase 2 of 2-phase subscribe: compile graph, register subscription,
|
|
174
175
|
* sync to servers, attach callback, and deliver the first delta.
|
|
@@ -272,6 +273,13 @@ export class WasmRuntime {
|
|
|
272
273
|
* Register a callback for outgoing sync messages.
|
|
273
274
|
*/
|
|
274
275
|
onSyncMessageToSend(callback: Function): void;
|
|
276
|
+
/**
|
|
277
|
+
* Create an ephemeral WasmRuntime backed by in-memory storage.
|
|
278
|
+
*
|
|
279
|
+
* Data is not persisted across page loads. Used as a fallback when OPFS
|
|
280
|
+
* is unavailable (e.g. Firefox private browsing mode).
|
|
281
|
+
*/
|
|
282
|
+
static openEphemeral(schema_json: string, app_id: string, env: string, user_branch: string, db_name: string, tier: string | null | undefined, use_binary_encoding: boolean): WasmRuntime;
|
|
275
283
|
/**
|
|
276
284
|
* Create a persistent WasmRuntime backed by OPFS.
|
|
277
285
|
*
|
|
@@ -408,7 +416,7 @@ export function currentTimestamp(): bigint;
|
|
|
408
416
|
/**
|
|
409
417
|
* Generate a new UUID v7 (time-ordered).
|
|
410
418
|
*
|
|
411
|
-
* Useful
|
|
419
|
+
* Useful when a caller wants the default generated row-id shape.
|
|
412
420
|
*/
|
|
413
421
|
export function generateId(): string;
|
|
414
422
|
|
|
@@ -450,6 +458,7 @@ export interface InitOutput {
|
|
|
450
458
|
readonly wasmruntime_deleteWithSession: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
451
459
|
readonly wasmruntime_deriveUserId: (a: number, b: number) => [number, number, number, number];
|
|
452
460
|
readonly wasmruntime_disconnect: (a: number) => void;
|
|
461
|
+
readonly wasmruntime_drainRejectedBatchIds: (a: number) => [number, number, number];
|
|
453
462
|
readonly wasmruntime_executeSubscription: (a: number, b: number, c: any) => [number, number];
|
|
454
463
|
readonly wasmruntime_flush: (a: number) => void;
|
|
455
464
|
readonly wasmruntime_flushWal: (a: number) => void;
|
|
@@ -470,6 +479,7 @@ export interface InitOutput {
|
|
|
470
479
|
readonly wasmruntime_onSyncMessageReceived: (a: number, b: any, c: number, d: number) => [number, number];
|
|
471
480
|
readonly wasmruntime_onSyncMessageReceivedFromClient: (a: number, b: number, c: number, d: any) => [number, number];
|
|
472
481
|
readonly wasmruntime_onSyncMessageToSend: (a: number, b: any) => void;
|
|
482
|
+
readonly wasmruntime_openEphemeral: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => [number, number, number];
|
|
473
483
|
readonly wasmruntime_openPersistent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
|
|
474
484
|
readonly wasmruntime_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
475
485
|
readonly wasmruntime_removeServer: (a: number) => void;
|
package/pkg/jazz_wasm.js
CHANGED
|
@@ -579,6 +579,16 @@ export class WasmRuntime {
|
|
|
579
579
|
disconnect() {
|
|
580
580
|
wasm.wasmruntime_disconnect(this.__wbg_ptr);
|
|
581
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* @returns {any}
|
|
584
|
+
*/
|
|
585
|
+
drainRejectedBatchIds() {
|
|
586
|
+
const ret = wasm.wasmruntime_drainRejectedBatchIds(this.__wbg_ptr);
|
|
587
|
+
if (ret[2]) {
|
|
588
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
589
|
+
}
|
|
590
|
+
return takeFromExternrefTable0(ret[0]);
|
|
591
|
+
}
|
|
582
592
|
/**
|
|
583
593
|
* Phase 2 of 2-phase subscribe: compile graph, register subscription,
|
|
584
594
|
* sync to servers, attach callback, and deliver the first delta.
|
|
@@ -932,6 +942,39 @@ export class WasmRuntime {
|
|
|
932
942
|
onSyncMessageToSend(callback) {
|
|
933
943
|
wasm.wasmruntime_onSyncMessageToSend(this.__wbg_ptr, callback);
|
|
934
944
|
}
|
|
945
|
+
/**
|
|
946
|
+
* Create an ephemeral WasmRuntime backed by in-memory storage.
|
|
947
|
+
*
|
|
948
|
+
* Data is not persisted across page loads. Used as a fallback when OPFS
|
|
949
|
+
* is unavailable (e.g. Firefox private browsing mode).
|
|
950
|
+
* @param {string} schema_json
|
|
951
|
+
* @param {string} app_id
|
|
952
|
+
* @param {string} env
|
|
953
|
+
* @param {string} user_branch
|
|
954
|
+
* @param {string} db_name
|
|
955
|
+
* @param {string | null | undefined} tier
|
|
956
|
+
* @param {boolean} use_binary_encoding
|
|
957
|
+
* @returns {WasmRuntime}
|
|
958
|
+
*/
|
|
959
|
+
static openEphemeral(schema_json, app_id, env, user_branch, db_name, tier, use_binary_encoding) {
|
|
960
|
+
const ptr0 = passStringToWasm0(schema_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
961
|
+
const len0 = WASM_VECTOR_LEN;
|
|
962
|
+
const ptr1 = passStringToWasm0(app_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
963
|
+
const len1 = WASM_VECTOR_LEN;
|
|
964
|
+
const ptr2 = passStringToWasm0(env, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
965
|
+
const len2 = WASM_VECTOR_LEN;
|
|
966
|
+
const ptr3 = passStringToWasm0(user_branch, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
967
|
+
const len3 = WASM_VECTOR_LEN;
|
|
968
|
+
const ptr4 = passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
969
|
+
const len4 = WASM_VECTOR_LEN;
|
|
970
|
+
var ptr5 = isLikeNone(tier) ? 0 : passStringToWasm0(tier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
971
|
+
var len5 = WASM_VECTOR_LEN;
|
|
972
|
+
const ret = wasm.wasmruntime_openEphemeral(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, use_binary_encoding);
|
|
973
|
+
if (ret[2]) {
|
|
974
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
975
|
+
}
|
|
976
|
+
return WasmRuntime.__wrap(ret[0]);
|
|
977
|
+
}
|
|
935
978
|
/**
|
|
936
979
|
* Create a persistent WasmRuntime backed by OPFS.
|
|
937
980
|
*
|
|
@@ -1407,7 +1450,7 @@ export function currentTimestamp() {
|
|
|
1407
1450
|
/**
|
|
1408
1451
|
* Generate a new UUID v7 (time-ordered).
|
|
1409
1452
|
*
|
|
1410
|
-
* Useful
|
|
1453
|
+
* Useful when a caller wants the default generated row-id shape.
|
|
1411
1454
|
* @returns {string}
|
|
1412
1455
|
*/
|
|
1413
1456
|
export function generateId() {
|
|
@@ -1867,6 +1910,13 @@ function __wbg_get_imports() {
|
|
|
1867
1910
|
const ret = arg0.msCrypto;
|
|
1868
1911
|
return ret;
|
|
1869
1912
|
},
|
|
1913
|
+
__wbg_name_d7bb38b41d6d953e: function(arg0, arg1) {
|
|
1914
|
+
const ret = arg1.name;
|
|
1915
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1916
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1917
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1918
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1919
|
+
},
|
|
1870
1920
|
__wbg_navigator_af52153252bdf29d: function(arg0) {
|
|
1871
1921
|
const ret = arg0.navigator;
|
|
1872
1922
|
return ret;
|
|
@@ -2059,6 +2109,9 @@ function __wbg_get_imports() {
|
|
|
2059
2109
|
__wbg_set_create_0654e513e8ccb2be: function(arg0, arg1) {
|
|
2060
2110
|
arg0.create = arg1 !== 0;
|
|
2061
2111
|
},
|
|
2112
|
+
__wbg_set_name_ab9c98596fd7310a: function(arg0, arg1, arg2) {
|
|
2113
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
2114
|
+
},
|
|
2062
2115
|
__wbg_set_onclose_47cce56c686db4fb: function(arg0, arg1) {
|
|
2063
2116
|
arg0.onclose = arg1;
|
|
2064
2117
|
},
|
|
@@ -2160,22 +2213,22 @@ function __wbg_get_imports() {
|
|
|
2160
2213
|
return ret;
|
|
2161
2214
|
}, arguments); },
|
|
2162
2215
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2163
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
2216
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3162, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2164
2217
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h656199c36535c3e6);
|
|
2165
2218
|
return ret;
|
|
2166
2219
|
},
|
|
2167
2220
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2168
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
2221
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 811, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2169
2222
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hf7ddf3622752ec36);
|
|
2170
2223
|
return ret;
|
|
2171
2224
|
},
|
|
2172
2225
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
2173
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
2226
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 904, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2174
2227
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc18e08680cddc2e5);
|
|
2175
2228
|
return ret;
|
|
2176
2229
|
},
|
|
2177
2230
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
2178
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
2231
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1287, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2179
2232
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h03757a48b3eba690);
|
|
2180
2233
|
return ret;
|
|
2181
2234
|
},
|
package/pkg/jazz_wasm_bg.wasm
CHANGED
|
Binary file
|