jazz-wasm 2.0.0-alpha.21 → 2.0.0-alpha.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jazz-wasm",
3
- "version": "2.0.0-alpha.21",
3
+ "version": "2.0.0-alpha.24",
4
4
  "description": "WebAssembly bindings for the Jazz database engine",
5
5
  "keywords": [
6
6
  "crdt",
@@ -24,9 +24,6 @@
24
24
  "access": "public",
25
25
  "tag": "alpha"
26
26
  },
27
- "devDependencies": {
28
- "wasm-pack": "^0.14.0"
29
- },
30
27
  "scripts": {
31
28
  "build": "wasm-pack build --target web --profiling"
32
29
  }
@@ -140,11 +140,11 @@ export class WasmRuntime {
140
140
  * Delete a row and return a Promise that resolves when the tier acks,
141
141
  * scoped to an explicit session principal.
142
142
  */
143
- deleteDurableWithSession(object_id: string, session_json: string | null | undefined, tier: string): Promise<any>;
143
+ deleteDurableWithSession(object_id: string, write_context_json: string | null | undefined, tier: string): Promise<any>;
144
144
  /**
145
145
  * Delete a row by ObjectId as an explicit session principal.
146
146
  */
147
- deleteWithSession(object_id: string, session_json?: string | null): void;
147
+ deleteWithSession(object_id: string, write_context_json?: string | null): void;
148
148
  /**
149
149
  * Phase 2 of 2-phase subscribe: compile graph, register subscription,
150
150
  * sync to servers, attach callback, and deliver the first delta.
@@ -185,11 +185,11 @@ export class WasmRuntime {
185
185
  * Insert a row and return a Promise that resolves when the tier acks,
186
186
  * scoped to an explicit session principal.
187
187
  */
188
- insertDurableWithSession(table: string, values: any, session_json: string | null | undefined, tier: string): Promise<any>;
188
+ insertDurableWithSession(table: string, values: any, write_context_json: string | null | undefined, tier: string): Promise<any>;
189
189
  /**
190
190
  * Insert a row into a table as an explicit session principal.
191
191
  */
192
- insertWithSession(table: string, values: any, session_json?: string | null): any;
192
+ insertWithSession(table: string, values: any, write_context_json?: string | null): any;
193
193
  /**
194
194
  * Create a new WasmRuntime.
195
195
  *
@@ -280,7 +280,7 @@ export class WasmRuntime {
280
280
  * Update a row and return a Promise that resolves when the tier acks,
281
281
  * scoped to an explicit session principal.
282
282
  */
283
- updateDurableWithSession(object_id: string, values: any, session_json: string | null | undefined, tier: string): Promise<any>;
283
+ updateDurableWithSession(object_id: string, values: any, write_context_json: string | null | undefined, tier: string): Promise<any>;
284
284
  /**
285
285
  * Update a row by ObjectId as an explicit session principal.
286
286
  *
@@ -289,7 +289,7 @@ export class WasmRuntime {
289
289
  * * `values` - Partial update map (`{ columnName: Value }`)
290
290
  * * `session_json` - Optional JSON-encoded Session used for policy checks
291
291
  */
292
- updateWithSession(object_id: string, values: any, session_json?: string | null): void;
292
+ updateWithSession(object_id: string, values: any, write_context_json?: string | null): void;
293
293
  }
294
294
 
295
295
  export function bench_get_cache_bytes(): number;
@@ -368,6 +368,32 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
368
368
 
369
369
  export interface InitOutput {
370
370
  readonly memory: WebAssembly.Memory;
371
+ readonly __wbg_wasmquerybuilder_free: (a: number, b: number) => void;
372
+ readonly currentTimestamp: () => bigint;
373
+ readonly generateId: () => [number, number];
374
+ readonly parseSchema: (a: number, b: number) => [number, number, number];
375
+ readonly wasmquerybuilder_alias: (a: number, b: number, c: number) => number;
376
+ readonly wasmquerybuilder_branch: (a: number, b: number, c: number) => number;
377
+ readonly wasmquerybuilder_branches: (a: number, b: number, c: number) => number;
378
+ readonly wasmquerybuilder_build: (a: number) => [number, number, number, number];
379
+ readonly wasmquerybuilder_buildJs: (a: number) => [number, number, number];
380
+ readonly wasmquerybuilder_filterEq: (a: number, b: number, c: number, d: any) => [number, number, number];
381
+ readonly wasmquerybuilder_filterGe: (a: number, b: number, c: number, d: any) => [number, number, number];
382
+ readonly wasmquerybuilder_filterGt: (a: number, b: number, c: number, d: any) => [number, number, number];
383
+ readonly wasmquerybuilder_filterLe: (a: number, b: number, c: number, d: any) => [number, number, number];
384
+ readonly wasmquerybuilder_filterLt: (a: number, b: number, c: number, d: any) => [number, number, number];
385
+ readonly wasmquerybuilder_filterNe: (a: number, b: number, c: number, d: any) => [number, number, number];
386
+ readonly wasmquerybuilder_includeDeleted: (a: number) => number;
387
+ readonly wasmquerybuilder_join: (a: number, b: number, c: number) => number;
388
+ readonly wasmquerybuilder_limit: (a: number, b: number) => number;
389
+ readonly wasmquerybuilder_new: (a: number, b: number) => number;
390
+ readonly wasmquerybuilder_offset: (a: number, b: number) => number;
391
+ readonly wasmquerybuilder_on: (a: number, b: number, c: number, d: number, e: number) => number;
392
+ readonly wasmquerybuilder_or: (a: number) => number;
393
+ readonly wasmquerybuilder_orderBy: (a: number, b: number, c: number) => number;
394
+ readonly wasmquerybuilder_orderByDesc: (a: number, b: number, c: number) => number;
395
+ readonly wasmquerybuilder_select: (a: number, b: number, c: number) => number;
396
+ readonly init: () => void;
371
397
  readonly __wbg_wasmruntime_free: (a: number, b: number) => void;
372
398
  readonly wasmruntime___debugSchemaState: (a: number) => [number, number, number];
373
399
  readonly wasmruntime___debugSeedLiveSchema: (a: number, b: number, c: number) => [number, number];
@@ -401,32 +427,6 @@ export interface InitOutput {
401
427
  readonly wasmruntime_updateDurable: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number, number];
402
428
  readonly wasmruntime_updateDurableWithSession: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number) => [number, number, number];
403
429
  readonly wasmruntime_updateWithSession: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number];
404
- readonly __wbg_wasmquerybuilder_free: (a: number, b: number) => void;
405
- readonly currentTimestamp: () => bigint;
406
- readonly generateId: () => [number, number];
407
- readonly parseSchema: (a: number, b: number) => [number, number, number];
408
- readonly wasmquerybuilder_alias: (a: number, b: number, c: number) => number;
409
- readonly wasmquerybuilder_branch: (a: number, b: number, c: number) => number;
410
- readonly wasmquerybuilder_branches: (a: number, b: number, c: number) => number;
411
- readonly wasmquerybuilder_build: (a: number) => [number, number, number, number];
412
- readonly wasmquerybuilder_buildJs: (a: number) => [number, number, number];
413
- readonly wasmquerybuilder_filterEq: (a: number, b: number, c: number, d: any) => [number, number, number];
414
- readonly wasmquerybuilder_filterGe: (a: number, b: number, c: number, d: any) => [number, number, number];
415
- readonly wasmquerybuilder_filterGt: (a: number, b: number, c: number, d: any) => [number, number, number];
416
- readonly wasmquerybuilder_filterLe: (a: number, b: number, c: number, d: any) => [number, number, number];
417
- readonly wasmquerybuilder_filterLt: (a: number, b: number, c: number, d: any) => [number, number, number];
418
- readonly wasmquerybuilder_filterNe: (a: number, b: number, c: number, d: any) => [number, number, number];
419
- readonly wasmquerybuilder_includeDeleted: (a: number) => number;
420
- readonly wasmquerybuilder_join: (a: number, b: number, c: number) => number;
421
- readonly wasmquerybuilder_limit: (a: number, b: number) => number;
422
- readonly wasmquerybuilder_new: (a: number, b: number) => number;
423
- readonly wasmquerybuilder_offset: (a: number, b: number) => number;
424
- readonly wasmquerybuilder_on: (a: number, b: number, c: number, d: number, e: number) => number;
425
- readonly wasmquerybuilder_or: (a: number) => number;
426
- readonly wasmquerybuilder_orderBy: (a: number, b: number, c: number) => number;
427
- readonly wasmquerybuilder_orderByDesc: (a: number, b: number, c: number) => number;
428
- readonly wasmquerybuilder_select: (a: number, b: number, c: number) => number;
429
- readonly init: () => void;
430
430
  readonly bench_get_pin_internal_pages: () => number;
431
431
  readonly bench_opfs_cold_random_read: (a: number, b: number) => any;
432
432
  readonly bench_opfs_cold_sequential_read: (a: number, b: number) => any;
package/pkg/jazz_wasm.js CHANGED
@@ -438,14 +438,14 @@ export class WasmRuntime {
438
438
  * Delete a row and return a Promise that resolves when the tier acks,
439
439
  * scoped to an explicit session principal.
440
440
  * @param {string} object_id
441
- * @param {string | null | undefined} session_json
441
+ * @param {string | null | undefined} write_context_json
442
442
  * @param {string} tier
443
443
  * @returns {Promise<any>}
444
444
  */
445
- deleteDurableWithSession(object_id, session_json, tier) {
445
+ deleteDurableWithSession(object_id, write_context_json, tier) {
446
446
  const ptr0 = passStringToWasm0(object_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
447
  const len0 = WASM_VECTOR_LEN;
448
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
448
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
449
  var len1 = WASM_VECTOR_LEN;
450
450
  const ptr2 = passStringToWasm0(tier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
451
451
  const len2 = WASM_VECTOR_LEN;
@@ -458,12 +458,12 @@ export class WasmRuntime {
458
458
  /**
459
459
  * Delete a row by ObjectId as an explicit session principal.
460
460
  * @param {string} object_id
461
- * @param {string | null} [session_json]
461
+ * @param {string | null} [write_context_json]
462
462
  */
463
- deleteWithSession(object_id, session_json) {
463
+ deleteWithSession(object_id, write_context_json) {
464
464
  const ptr0 = passStringToWasm0(object_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
465
465
  const len0 = WASM_VECTOR_LEN;
466
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
466
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
467
467
  var len1 = WASM_VECTOR_LEN;
468
468
  const ret = wasm.wasmruntime_deleteWithSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
469
469
  if (ret[1]) {
@@ -566,14 +566,14 @@ export class WasmRuntime {
566
566
  * scoped to an explicit session principal.
567
567
  * @param {string} table
568
568
  * @param {any} values
569
- * @param {string | null | undefined} session_json
569
+ * @param {string | null | undefined} write_context_json
570
570
  * @param {string} tier
571
571
  * @returns {Promise<any>}
572
572
  */
573
- insertDurableWithSession(table, values, session_json, tier) {
573
+ insertDurableWithSession(table, values, write_context_json, tier) {
574
574
  const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
575
575
  const len0 = WASM_VECTOR_LEN;
576
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
576
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
577
577
  var len1 = WASM_VECTOR_LEN;
578
578
  const ptr2 = passStringToWasm0(tier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
579
579
  const len2 = WASM_VECTOR_LEN;
@@ -587,13 +587,13 @@ export class WasmRuntime {
587
587
  * Insert a row into a table as an explicit session principal.
588
588
  * @param {string} table
589
589
  * @param {any} values
590
- * @param {string | null} [session_json]
590
+ * @param {string | null} [write_context_json]
591
591
  * @returns {any}
592
592
  */
593
- insertWithSession(table, values, session_json) {
593
+ insertWithSession(table, values, write_context_json) {
594
594
  const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
595
595
  const len0 = WASM_VECTOR_LEN;
596
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
596
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
597
597
  var len1 = WASM_VECTOR_LEN;
598
598
  const ret = wasm.wasmruntime_insertWithSession(this.__wbg_ptr, ptr0, len0, values, ptr1, len1);
599
599
  if (ret[2]) {
@@ -835,14 +835,14 @@ export class WasmRuntime {
835
835
  * scoped to an explicit session principal.
836
836
  * @param {string} object_id
837
837
  * @param {any} values
838
- * @param {string | null | undefined} session_json
838
+ * @param {string | null | undefined} write_context_json
839
839
  * @param {string} tier
840
840
  * @returns {Promise<any>}
841
841
  */
842
- updateDurableWithSession(object_id, values, session_json, tier) {
842
+ updateDurableWithSession(object_id, values, write_context_json, tier) {
843
843
  const ptr0 = passStringToWasm0(object_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
844
844
  const len0 = WASM_VECTOR_LEN;
845
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
845
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
846
846
  var len1 = WASM_VECTOR_LEN;
847
847
  const ptr2 = passStringToWasm0(tier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
848
848
  const len2 = WASM_VECTOR_LEN;
@@ -861,12 +861,12 @@ export class WasmRuntime {
861
861
  * * `session_json` - Optional JSON-encoded Session used for policy checks
862
862
  * @param {string} object_id
863
863
  * @param {any} values
864
- * @param {string | null} [session_json]
864
+ * @param {string | null} [write_context_json]
865
865
  */
866
- updateWithSession(object_id, values, session_json) {
866
+ updateWithSession(object_id, values, write_context_json) {
867
867
  const ptr0 = passStringToWasm0(object_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
868
868
  const len0 = WASM_VECTOR_LEN;
869
- var ptr1 = isLikeNone(session_json) ? 0 : passStringToWasm0(session_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
869
+ var ptr1 = isLikeNone(write_context_json) ? 0 : passStringToWasm0(write_context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
870
870
  var len1 = WASM_VECTOR_LEN;
871
871
  const ret = wasm.wasmruntime_updateWithSession(this.__wbg_ptr, ptr0, len0, values, ptr1, len1);
872
872
  if (ret[1]) {
@@ -1357,6 +1357,16 @@ function __wbg_get_imports() {
1357
1357
  const ret = result;
1358
1358
  return ret;
1359
1359
  },
1360
+ __wbg_instanceof_DomException_2bdcf7791a2d7d09: function(arg0) {
1361
+ let result;
1362
+ try {
1363
+ result = arg0 instanceof DOMException;
1364
+ } catch (_) {
1365
+ result = false;
1366
+ }
1367
+ const ret = result;
1368
+ return ret;
1369
+ },
1360
1370
  __wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c: function(arg0) {
1361
1371
  let result;
1362
1372
  try {
@@ -1512,6 +1522,24 @@ function __wbg_get_imports() {
1512
1522
  const ret = new Object();
1513
1523
  return ret;
1514
1524
  },
1525
+ __wbg_new_d098e265629cd10f: function(arg0, arg1) {
1526
+ try {
1527
+ var state0 = {a: arg0, b: arg1};
1528
+ var cb0 = (arg0, arg1) => {
1529
+ const a = state0.a;
1530
+ state0.a = 0;
1531
+ try {
1532
+ return wasm_bindgen__convert__closures_____invoke__h4abc8a55d4718cb4(a, state0.b, arg0, arg1);
1533
+ } finally {
1534
+ state0.a = a;
1535
+ }
1536
+ };
1537
+ const ret = new Promise(cb0);
1538
+ return ret;
1539
+ } finally {
1540
+ state0.a = state0.b = 0;
1541
+ }
1542
+ },
1515
1543
  __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
1516
1544
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1517
1545
  return ret;
@@ -1572,6 +1600,9 @@ function __wbg_get_imports() {
1572
1600
  const ret = Promise.resolve(arg0);
1573
1601
  return ret;
1574
1602
  },
1603
+ __wbg_setTimeout_90ea1b70d376baa9: function(arg0, arg1) {
1604
+ setTimeout(arg0, arg1);
1605
+ },
1575
1606
  __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
1576
1607
  arg0[arg1 >>> 0] = arg2;
1577
1608
  },
@@ -1662,7 +1693,7 @@ function __wbg_get_imports() {
1662
1693
  return ret;
1663
1694
  }, arguments); },
1664
1695
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1665
- // Cast intrinsic for `Closure(Closure { dtor_idx: 2497, function: Function { arguments: [Externref], shim_idx: 2498, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1696
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2575, function: Function { arguments: [Externref], shim_idx: 2576, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1666
1697
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h91062c162630e93c, wasm_bindgen__convert__closures_____invoke__hc8651b792d0b9061);
1667
1698
  return ret;
1668
1699
  },
Binary file