@trust0/ridb-mongodb 0.0.3 → 0.0.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 0.0.4 (2025-09-06)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - editor configuration auto save [skip ci] ([7cb2249](https://github.com/trust0-project/RIDB/commit/7cb2249))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated @trust0/ridb-build to 0.0.21
10
+ - Updated @trust0/ridb-core to 1.7.32
11
+ - Updated @trust0/ridb to 1.5.37
12
+
13
+ ### ❤️ Thank You
14
+
15
+ - Javier Ribó
16
+
1
17
  ## 0.0.3 (2025-07-22)
2
18
 
3
19
  ### 🩹 Fixes
package/build/index.d.ts CHANGED
@@ -22,6 +22,7 @@ import { BaseStorageOptions, SchemaTypeRecord, BaseStorage } from '@trust0/ridb-
22
22
  *
23
23
  * # SDK Rerefence
24
24
  */
25
+ /** biome-ignore-all lint/suspicious/noExplicitAny: Not needed here */
25
26
 
26
27
  interface MongoDBConfig {
27
28
  /** MongoDB connection URL */
package/build/index.js CHANGED
@@ -84,10 +84,10 @@ var require_ridb_core = __commonJS({
84
84
  InMemory: () => InMemory,
85
85
  IndexDB: () => IndexDB,
86
86
  OpType: () => OpType2,
87
- Operation: () => Operation2,
87
+ Operation: () => Operation,
88
88
  Property: () => Property,
89
89
  Query: () => Query,
90
- QueryOptions: () => QueryOptions2,
90
+ QueryOptions: () => QueryOptions,
91
91
  RIDBError: () => RIDBError,
92
92
  Schema: () => Schema,
93
93
  WasmBindgenTestContext: () => WasmBindgenTestContext,
@@ -272,6 +272,30 @@ ${val.stack}`;
272
272
  } } : new FinalizationRegistry((state) => {
273
273
  wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
274
274
  });
275
+ function makeMutClosure(arg0, arg1, dtor, f) {
276
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
277
+ const real = (...args) => {
278
+ state.cnt++;
279
+ const a = state.a;
280
+ state.a = 0;
281
+ try {
282
+ return f(a, state.b, ...args);
283
+ } finally {
284
+ if (--state.cnt === 0) {
285
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
286
+ CLOSURE_DTORS.unregister(state);
287
+ } else {
288
+ state.a = a;
289
+ }
290
+ }
291
+ };
292
+ real.original = state;
293
+ CLOSURE_DTORS.register(real, state, state);
294
+ return real;
295
+ }
296
+ function __wbg_adapter_56(arg0, arg1, arg2) {
297
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcf4fe6fd0b7ccc8d(arg0, arg1, addHeapObject(arg2));
298
+ }
275
299
  function makeClosure(arg0, arg1, dtor, f) {
276
300
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
277
301
  const real = (...args) => {
@@ -290,10 +314,10 @@ ${val.stack}`;
290
314
  CLOSURE_DTORS.register(real, state, state);
291
315
  return real;
292
316
  }
293
- function __wbg_adapter_56(arg0, arg1, arg2, arg3, arg4) {
317
+ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
294
318
  try {
295
319
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
296
- wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1d7727fe9471ac49(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
320
+ wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he6024291054ff5aa(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
297
321
  var r0 = getInt32Memory0()[retptr / 4 + 0];
298
322
  var r1 = getInt32Memory0()[retptr / 4 + 1];
299
323
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -305,35 +329,8 @@ ${val.stack}`;
305
329
  wasm.__wbindgen_add_to_stack_pointer(16);
306
330
  }
307
331
  }
308
- function makeMutClosure(arg0, arg1, dtor, f) {
309
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
310
- const real = (...args) => {
311
- state.cnt++;
312
- const a = state.a;
313
- state.a = 0;
314
- try {
315
- return f(a, state.b, ...args);
316
- } finally {
317
- if (--state.cnt === 0) {
318
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
319
- CLOSURE_DTORS.unregister(state);
320
- } else {
321
- state.a = a;
322
- }
323
- }
324
- };
325
- real.original = state;
326
- CLOSURE_DTORS.register(real, state, state);
327
- return real;
328
- }
329
- function __wbg_adapter_59(arg0, arg1, arg2) {
330
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4e550b82c2b30c7a(arg0, arg1, addHeapObject(arg2));
331
- }
332
- function __wbg_adapter_62(arg0, arg1) {
333
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec0cc069f718ed78(arg0, arg1);
334
- }
335
- function __wbg_adapter_65(arg0, arg1, arg2) {
336
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf401bdfdf8c9bdd9(arg0, arg1, addHeapObject(arg2));
332
+ function __wbg_adapter_62(arg0, arg1, arg2) {
333
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb6eb1f8e3b5e56e9(arg0, arg1, addHeapObject(arg2));
337
334
  }
338
335
  var cachedUint32Memory0 = null;
339
336
  function getUint32Memory0() {
@@ -352,6 +349,13 @@ ${val.stack}`;
352
349
  }
353
350
  return result;
354
351
  }
352
+ function main_js() {
353
+ wasm.main_js();
354
+ }
355
+ function is_debug_mode() {
356
+ const ret = wasm.is_debug_mode();
357
+ return ret !== 0;
358
+ }
355
359
  function _assertClass(instance, klass) {
356
360
  if (!(instance instanceof klass)) {
357
361
  throw new Error(`expected instance of ${klass.name}`);
@@ -380,13 +384,6 @@ ${val.stack}`;
380
384
  wasm.__wbindgen_exn_store(addHeapObject(e));
381
385
  }
382
386
  }
383
- function main_js() {
384
- wasm.main_js();
385
- }
386
- function is_debug_mode() {
387
- const ret = wasm.is_debug_mode();
388
- return ret !== 0;
389
- }
390
387
  function __wbgtest_console_log(args) {
391
388
  try {
392
389
  wasm.__wbgtest_console_log(addBorrowedObject(args));
@@ -422,16 +419,15 @@ ${val.stack}`;
422
419
  heap[stack_pointer++] = void 0;
423
420
  }
424
421
  }
425
- function __wbg_adapter_292(arg0, arg1) {
426
- wasm.wasm_bindgen__convert__closures__invoke0_mut__he68973678185bd11(arg0, arg1);
422
+ function __wbg_adapter_285(arg0, arg1) {
423
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__hff00333f3d941090(arg0, arg1);
427
424
  }
428
- function __wbg_adapter_335(arg0, arg1, arg2, arg3, arg4) {
429
- wasm.wasm_bindgen__convert__closures__invoke3_mut__h711940be5154e055(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
425
+ function __wbg_adapter_328(arg0, arg1, arg2, arg3, arg4) {
426
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h703f9c33fd3008bf(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
430
427
  }
431
- function __wbg_adapter_392(arg0, arg1, arg2, arg3) {
432
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hdfe55fa2a247d1ac(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
428
+ function __wbg_adapter_385(arg0, arg1, arg2, arg3) {
429
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h97988f5fa0547d24(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
433
430
  }
434
- var Errors = Object.freeze({ Error: 0, "0": "Error", HookError: 1, "1": "HookError", QueryError: 2, "2": "QueryError", SerializationError: 3, "3": "SerializationError", ValidationError: 4, "4": "ValidationError", AuthenticationError: 5, "5": "AuthenticationError" });
435
431
  var OpType2 = Object.freeze({
436
432
  /**
437
433
  * Create operation.
@@ -459,6 +455,7 @@ ${val.stack}`;
459
455
  COUNT: 4,
460
456
  "4": "COUNT"
461
457
  });
458
+ var Errors = Object.freeze({ Error: 0, "0": "Error", HookError: 1, "1": "HookError", QueryError: 2, "2": "QueryError", SerializationError: 3, "3": "SerializationError", ValidationError: 4, "4": "ValidationError", AuthenticationError: 5, "5": "AuthenticationError" });
462
459
  var BasePluginFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
463
460
  }, unregister: () => {
464
461
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_baseplugin_free(ptr >>> 0));
@@ -739,7 +736,7 @@ ${val.stack}`;
739
736
  if (r2) {
740
737
  throw takeObject(r1);
741
738
  }
742
- return QueryOptions2.__wrap(r0);
739
+ return QueryOptions.__wrap(r0);
743
740
  } finally {
744
741
  wasm.__wbindgen_add_to_stack_pointer(16);
745
742
  }
@@ -876,7 +873,7 @@ ${val.stack}`;
876
873
  try {
877
874
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
878
875
  _assertClass(schema, Schema);
879
- _assertClass(op, Operation2);
876
+ _assertClass(op, Operation);
880
877
  wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
881
878
  var r0 = getInt32Memory0()[retptr / 4 + 0];
882
879
  var r1 = getInt32Memory0()[retptr / 4 + 1];
@@ -901,8 +898,7 @@ ${val.stack}`;
901
898
  try {
902
899
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
903
900
  _assertClass(query, Query);
904
- var ptr0 = query.__destroy_into_raw();
905
- wasm.corestorage_matchesQuery(retptr, this.__wbg_ptr, addBorrowedObject(document2), ptr0);
901
+ wasm.corestorage_matchesQuery(retptr, this.__wbg_ptr, addBorrowedObject(document2), query.__wbg_ptr);
906
902
  var r0 = getInt32Memory0()[retptr / 4 + 0];
907
903
  var r1 = getInt32Memory0()[retptr / 4 + 1];
908
904
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1050,7 +1046,7 @@ ${val.stack}`;
1050
1046
  * @returns {Promise<any>}
1051
1047
  */
1052
1048
  write(op) {
1053
- _assertClass(op, Operation2);
1049
+ _assertClass(op, Operation);
1054
1050
  var ptr0 = op.__destroy_into_raw();
1055
1051
  const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
1056
1052
  return takeObject(ret);
@@ -1064,7 +1060,7 @@ ${val.stack}`;
1064
1060
  find(collection_name, query_js, options) {
1065
1061
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1066
1062
  const len0 = WASM_VECTOR_LEN;
1067
- _assertClass(options, QueryOptions2);
1063
+ _assertClass(options, QueryOptions);
1068
1064
  var ptr1 = options.__destroy_into_raw();
1069
1065
  const ret = wasm.inmemory_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
1070
1066
  return takeObject(ret);
@@ -1089,7 +1085,7 @@ ${val.stack}`;
1089
1085
  count(collection_name, query_js, options) {
1090
1086
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1091
1087
  const len0 = WASM_VECTOR_LEN;
1092
- _assertClass(options, QueryOptions2);
1088
+ _assertClass(options, QueryOptions);
1093
1089
  var ptr1 = options.__destroy_into_raw();
1094
1090
  const ret = wasm.inmemory_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
1095
1091
  return takeObject(ret);
@@ -1185,7 +1181,7 @@ ${val.stack}`;
1185
1181
  * @returns {Promise<any>}
1186
1182
  */
1187
1183
  write(op) {
1188
- _assertClass(op, Operation2);
1184
+ _assertClass(op, Operation);
1189
1185
  var ptr0 = op.__destroy_into_raw();
1190
1186
  const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1191
1187
  return takeObject(ret);
@@ -1199,7 +1195,7 @@ ${val.stack}`;
1199
1195
  find(collection_name, query, options) {
1200
1196
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1201
1197
  const len0 = WASM_VECTOR_LEN;
1202
- _assertClass(options, QueryOptions2);
1198
+ _assertClass(options, QueryOptions);
1203
1199
  var ptr1 = options.__destroy_into_raw();
1204
1200
  const ret = wasm.indexdb_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
1205
1201
  return takeObject(ret);
@@ -1224,7 +1220,7 @@ ${val.stack}`;
1224
1220
  count(collection_name, query, options) {
1225
1221
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1226
1222
  const len0 = WASM_VECTOR_LEN;
1227
- _assertClass(options, QueryOptions2);
1223
+ _assertClass(options, QueryOptions);
1228
1224
  var ptr1 = options.__destroy_into_raw();
1229
1225
  const ret = wasm.indexdb_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
1230
1226
  return takeObject(ret);
@@ -1247,7 +1243,7 @@ ${val.stack}`;
1247
1243
  var OperationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1248
1244
  }, unregister: () => {
1249
1245
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_operation_free(ptr >>> 0));
1250
- var Operation2 = class _Operation {
1246
+ var Operation = class _Operation {
1251
1247
  static __wrap(ptr) {
1252
1248
  ptr = ptr >>> 0;
1253
1249
  const obj = Object.create(_Operation.prototype);
@@ -1703,7 +1699,7 @@ ${val.stack}`;
1703
1699
  var QueryOptionsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1704
1700
  }, unregister: () => {
1705
1701
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_queryoptions_free(ptr >>> 0));
1706
- var QueryOptions2 = class _QueryOptions {
1702
+ var QueryOptions = class _QueryOptions {
1707
1703
  static __wrap(ptr) {
1708
1704
  ptr = ptr >>> 0;
1709
1705
  const obj = Object.create(_QueryOptions.prototype);
@@ -2219,54 +2215,35 @@ ${val.stack}`;
2219
2215
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2220
2216
  takeObject(arg0);
2221
2217
  };
2222
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2223
- const ret = getStringFromWasm0(arg0, arg1);
2224
- return addHeapObject(ret);
2218
+ imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2219
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2220
+ const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2221
+ return addHeapObject(ret);
2222
+ }, arguments);
2225
2223
  };
2226
2224
  imports.wbg.__wbg_ridberror_new = function(arg0) {
2227
2225
  const ret = RIDBError.__wrap(arg0);
2228
2226
  return addHeapObject(ret);
2229
2227
  };
2228
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2229
+ const ret = getStringFromWasm0(arg0, arg1);
2230
+ return addHeapObject(ret);
2231
+ };
2230
2232
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2231
2233
  const ret = getObject(arg0);
2232
2234
  return addHeapObject(ret);
2233
2235
  };
2234
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2235
- const obj = getObject(arg1);
2236
- const ret = typeof obj === "string" ? obj : void 0;
2237
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2238
- var len1 = WASM_VECTOR_LEN;
2239
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2240
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2241
- };
2242
2236
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
2243
2237
  const ret = getObject(arg0) === void 0;
2244
2238
  return ret;
2245
2239
  };
2246
- imports.wbg.__wbindgen_number_new = function(arg0) {
2247
- const ret = arg0;
2248
- return addHeapObject(ret);
2249
- };
2250
- imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2251
- return handleError(function(arg0, arg1, arg2) {
2252
- const ret = getObject(arg1).apply(takeObject(arg2));
2253
- const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
2254
- const len1 = WASM_VECTOR_LEN;
2255
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2256
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2257
- }, arguments);
2258
- };
2259
- imports.wbg.__wbg_inmemory_new = function(arg0) {
2260
- const ret = InMemory.__wrap(arg0);
2261
- return addHeapObject(ret);
2262
- };
2263
2240
  imports.wbg.__wbindgen_is_null = function(arg0) {
2264
2241
  const ret = getObject(arg0) === null;
2265
2242
  return ret;
2266
2243
  };
2267
- imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2244
+ imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2268
2245
  return handleError(function(arg0) {
2269
- const ret = getObject(arg0).close();
2246
+ const ret = getObject(arg0).start();
2270
2247
  return addHeapObject(ret);
2271
2248
  }, arguments);
2272
2249
  };
@@ -2279,15 +2256,34 @@ ${val.stack}`;
2279
2256
  const ret = false;
2280
2257
  return ret;
2281
2258
  };
2282
- imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2283
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2284
- const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions2.__wrap(arg4));
2285
- return addHeapObject(ret);
2259
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2260
+ const ret = arg0;
2261
+ return addHeapObject(ret);
2262
+ };
2263
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2264
+ const obj = getObject(arg1);
2265
+ const ret = typeof obj === "string" ? obj : void 0;
2266
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2267
+ var len1 = WASM_VECTOR_LEN;
2268
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2269
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2270
+ };
2271
+ imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2272
+ return handleError(function(arg0, arg1, arg2) {
2273
+ const ret = getObject(arg1).apply(takeObject(arg2));
2274
+ const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
2275
+ const len1 = WASM_VECTOR_LEN;
2276
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2277
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2286
2278
  }, arguments);
2287
2279
  };
2288
- imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2280
+ imports.wbg.__wbg_inmemory_new = function(arg0) {
2281
+ const ret = InMemory.__wrap(arg0);
2282
+ return addHeapObject(ret);
2283
+ };
2284
+ imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2289
2285
  return handleError(function(arg0) {
2290
- const ret = getObject(arg0).start();
2286
+ const ret = getObject(arg0).close();
2291
2287
  return addHeapObject(ret);
2292
2288
  }, arguments);
2293
2289
  };
@@ -2299,7 +2295,7 @@ ${val.stack}`;
2299
2295
  };
2300
2296
  imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2301
2297
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2302
- const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions2.__wrap(arg4));
2298
+ const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2303
2299
  return addHeapObject(ret);
2304
2300
  }, arguments);
2305
2301
  };
@@ -2311,27 +2307,10 @@ ${val.stack}`;
2311
2307
  };
2312
2308
  imports.wbg.__wbg_write_1159c67c07f62020 = function() {
2313
2309
  return handleError(function(arg0, arg1) {
2314
- const ret = getObject(arg0).write(Operation2.__wrap(arg1));
2310
+ const ret = getObject(arg0).write(Operation.__wrap(arg1));
2315
2311
  return addHeapObject(ret);
2316
2312
  }, arguments);
2317
2313
  };
2318
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2319
- const ret = IndexDB.__wrap(arg0);
2320
- return addHeapObject(ret);
2321
- };
2322
- imports.wbg.__wbg_database_new = function(arg0) {
2323
- const ret = Database.__wrap(arg0);
2324
- return addHeapObject(ret);
2325
- };
2326
- imports.wbg.__wbg_collection_new = function(arg0) {
2327
- const ret = Collection.__wrap(arg0);
2328
- return addHeapObject(ret);
2329
- };
2330
- imports.wbg.__wbindgen_is_object = function(arg0) {
2331
- const val = getObject(arg0);
2332
- const ret = typeof val === "object" && val !== null;
2333
- return ret;
2334
- };
2335
2314
  imports.wbg.__wbindgen_is_string = function(arg0) {
2336
2315
  const ret = typeof getObject(arg0) === "string";
2337
2316
  return ret;
@@ -2344,18 +2323,23 @@ ${val.stack}`;
2344
2323
  const ret = Array.isArray(getObject(arg0));
2345
2324
  return ret;
2346
2325
  };
2326
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2327
+ const val = getObject(arg0);
2328
+ const ret = typeof val === "object" && val !== null;
2329
+ return ret;
2330
+ };
2347
2331
  imports.wbg.__wbindgen_boolean_get = function(arg0) {
2348
2332
  const v = getObject(arg0);
2349
2333
  const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2350
2334
  return ret;
2351
2335
  };
2352
- imports.wbg.__wbindgen_is_falsy = function(arg0) {
2353
- const ret = !getObject(arg0);
2354
- return ret;
2336
+ imports.wbg.__wbg_database_new = function(arg0) {
2337
+ const ret = Database.__wrap(arg0);
2338
+ return addHeapObject(ret);
2355
2339
  };
2356
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2357
- const ret = getObject(arg0) === getObject(arg1);
2358
- return ret;
2340
+ imports.wbg.__wbg_collection_new = function(arg0) {
2341
+ const ret = Collection.__wrap(arg0);
2342
+ return addHeapObject(ret);
2359
2343
  };
2360
2344
  imports.wbg.__wbindgen_is_function = function(arg0) {
2361
2345
  const ret = typeof getObject(arg0) === "function";
@@ -2365,6 +2349,14 @@ ${val.stack}`;
2365
2349
  const ret = typeof getObject(arg0) === "bigint";
2366
2350
  return ret;
2367
2351
  };
2352
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2353
+ const ret = IndexDB.__wrap(arg0);
2354
+ return addHeapObject(ret);
2355
+ };
2356
+ imports.wbg.__wbindgen_is_falsy = function(arg0) {
2357
+ const ret = !getObject(arg0);
2358
+ return ret;
2359
+ };
2368
2360
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2369
2361
  const ret = getObject(arg0) in getObject(arg1);
2370
2362
  return ret;
@@ -2373,6 +2365,10 @@ ${val.stack}`;
2373
2365
  const ret = arg0;
2374
2366
  return addHeapObject(ret);
2375
2367
  };
2368
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2369
+ const ret = getObject(arg0) === getObject(arg1);
2370
+ return ret;
2371
+ };
2376
2372
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2377
2373
  const ret = BigInt.asUintN(64, arg0);
2378
2374
  return addHeapObject(ret);
@@ -2429,12 +2425,6 @@ ${val.stack}`;
2429
2425
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2430
2426
  }, arguments);
2431
2427
  };
2432
- imports.wbg.__wbg_setTimeout_c172d5704ef82276 = function() {
2433
- return handleError(function(arg0, arg1, arg2) {
2434
- const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
2435
- return ret;
2436
- }, arguments);
2437
- };
2438
2428
  imports.wbg.__wbg_instanceof_WorkerGlobalScope_46b577f151fad960 = function(arg0) {
2439
2429
  let result;
2440
2430
  try {
@@ -2451,12 +2441,6 @@ ${val.stack}`;
2451
2441
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2452
2442
  }, arguments);
2453
2443
  };
2454
- imports.wbg.__wbg_setTimeout_8502a960d5dde06e = function() {
2455
- return handleError(function(arg0, arg1, arg2) {
2456
- const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
2457
- return ret;
2458
- }, arguments);
2459
- };
2460
2444
  imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2461
2445
  console.debug(getObject(arg0));
2462
2446
  };
@@ -2695,7 +2679,7 @@ ${val.stack}`;
2695
2679
  const a = state0.a;
2696
2680
  state0.a = 0;
2697
2681
  try {
2698
- return __wbg_adapter_292(a, state0.b);
2682
+ return __wbg_adapter_285(a, state0.b);
2699
2683
  } finally {
2700
2684
  state0.a = a;
2701
2685
  }
@@ -2706,16 +2690,12 @@ ${val.stack}`;
2706
2690
  }
2707
2691
  }, arguments);
2708
2692
  };
2709
- imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2710
- const ret = document;
2711
- return addHeapObject(ret);
2693
+ imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2694
+ __wbg_test_output_writeln(takeObject(arg0));
2712
2695
  };
2713
- imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2714
- const ret = getObject(arg1).stack;
2715
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2716
- const len1 = WASM_VECTOR_LEN;
2717
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2718
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2696
+ imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2697
+ const ret = getObject(arg0).stack;
2698
+ return addHeapObject(ret);
2719
2699
  };
2720
2700
  imports.wbg.__wbg_self_55106357ec10ecd4 = function(arg0) {
2721
2701
  const ret = getObject(arg0).self;
@@ -2743,13 +2723,17 @@ ${val.stack}`;
2743
2723
  const ret = getObject(arg0).stack;
2744
2724
  return addHeapObject(ret);
2745
2725
  };
2746
- imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2747
- __wbg_test_output_writeln(takeObject(arg0));
2748
- };
2749
- imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2750
- const ret = getObject(arg0).stack;
2726
+ imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2727
+ const ret = document;
2751
2728
  return addHeapObject(ret);
2752
2729
  };
2730
+ imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2731
+ const ret = getObject(arg1).stack;
2732
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2733
+ const len1 = WASM_VECTOR_LEN;
2734
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2735
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2736
+ };
2753
2737
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
2754
2738
  const ret = new Error();
2755
2739
  return addHeapObject(ret);
@@ -2772,13 +2756,13 @@ ${val.stack}`;
2772
2756
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2773
2757
  }
2774
2758
  };
2775
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2776
- queueMicrotask(getObject(arg0));
2777
- };
2778
2759
  imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2779
2760
  const ret = getObject(arg0).queueMicrotask;
2780
2761
  return addHeapObject(ret);
2781
2762
  };
2763
+ imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2764
+ queueMicrotask(getObject(arg0));
2765
+ };
2782
2766
  imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2783
2767
  const ret = getObject(arg0)[arg1 >>> 0];
2784
2768
  return addHeapObject(ret);
@@ -2875,7 +2859,7 @@ ${val.stack}`;
2875
2859
  const a = state0.a;
2876
2860
  state0.a = 0;
2877
2861
  try {
2878
- return __wbg_adapter_335(a, state0.b, arg02, arg12, arg22);
2862
+ return __wbg_adapter_328(a, state0.b, arg02, arg12, arg22);
2879
2863
  } finally {
2880
2864
  state0.a = a;
2881
2865
  }
@@ -2976,7 +2960,7 @@ ${val.stack}`;
2976
2960
  const a = state0.a;
2977
2961
  state0.a = 0;
2978
2962
  try {
2979
- return __wbg_adapter_392(a, state0.b, arg02, arg12);
2963
+ return __wbg_adapter_385(a, state0.b, arg02, arg12);
2980
2964
  } finally {
2981
2965
  state0.a = a;
2982
2966
  }
@@ -3092,20 +3076,16 @@ ${val.stack}`;
3092
3076
  const ret = wasm.memory;
3093
3077
  return addHeapObject(ret);
3094
3078
  };
3095
- imports.wbg.__wbindgen_closure_wrapper814 = function(arg0, arg1, arg2) {
3096
- const ret = makeClosure(arg0, arg1, 336, __wbg_adapter_56);
3097
- return addHeapObject(ret);
3098
- };
3099
- imports.wbg.__wbindgen_closure_wrapper816 = function(arg0, arg1, arg2) {
3100
- const ret = makeMutClosure(arg0, arg1, 336, __wbg_adapter_59);
3079
+ imports.wbg.__wbindgen_closure_wrapper566 = function(arg0, arg1, arg2) {
3080
+ const ret = makeMutClosure(arg0, arg1, 207, __wbg_adapter_56);
3101
3081
  return addHeapObject(ret);
3102
3082
  };
3103
- imports.wbg.__wbindgen_closure_wrapper818 = function(arg0, arg1, arg2) {
3104
- const ret = makeMutClosure(arg0, arg1, 336, __wbg_adapter_62);
3083
+ imports.wbg.__wbindgen_closure_wrapper568 = function(arg0, arg1, arg2) {
3084
+ const ret = makeClosure(arg0, arg1, 207, __wbg_adapter_59);
3105
3085
  return addHeapObject(ret);
3106
3086
  };
3107
- imports.wbg.__wbindgen_closure_wrapper1616 = function(arg0, arg1, arg2) {
3108
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_65);
3087
+ imports.wbg.__wbindgen_closure_wrapper1630 = function(arg0, arg1, arg2) {
3088
+ const ret = makeMutClosure(arg0, arg1, 449, __wbg_adapter_62);
3109
3089
  return addHeapObject(ret);
3110
3090
  };
3111
3091
  return imports;
@@ -3153,8 +3133,8 @@ __export(index_exports, {
3153
3133
  createMongoDB: () => createMongoDB
3154
3134
  });
3155
3135
  module.exports = __toCommonJS(index_exports);
3156
- var import_ridb_core = __toESM(require_ridb_core());
3157
3136
  var import_ridb = require("@trust0/ridb");
3137
+ var import_ridb_core = __toESM(require_ridb_core());
3158
3138
  async function createMongoDB() {
3159
3139
  const { BaseStorage } = await (0, import_ridb.WasmInternal)();
3160
3140
  class MongoDBStorage extends BaseStorage {
@@ -3270,7 +3250,7 @@ async function createMongoDB() {
3270
3250
  throw new Error(`Document with ${primaryKey} '${id}' already exists`);
3271
3251
  }
3272
3252
  const docToInsert = { ...op.data };
3273
- const insertResult = await collection.insertOne(docToInsert);
3253
+ await collection.insertOne(docToInsert);
3274
3254
  const result = this.convertObjectIdsToStrings(op.data);
3275
3255
  return result;
3276
3256
  }
@@ -3303,7 +3283,7 @@ async function createMongoDB() {
3303
3283
  }
3304
3284
  }
3305
3285
  /** Convert RIDB query to MongoDB filter */
3306
- convertQueryToMongoFilter(query, schema) {
3286
+ convertQueryToMongoFilter(query, _schema) {
3307
3287
  if (!query || typeof query !== "object") {
3308
3288
  return {};
3309
3289
  }
@@ -3342,7 +3322,7 @@ async function createMongoDB() {
3342
3322
  const collection = this.getCollection(String(collectionName));
3343
3323
  const schema = this.getSchema(String(collectionName));
3344
3324
  const filter = this.convertQueryToMongoFilter(query, schema);
3345
- let countOptions = {};
3325
+ const countOptions = {};
3346
3326
  if (options?.offset) {
3347
3327
  countOptions.skip = options.offset;
3348
3328
  }
package/build/index.mjs CHANGED
@@ -78,10 +78,10 @@ var require_ridb_core = __commonJS({
78
78
  InMemory: () => InMemory,
79
79
  IndexDB: () => IndexDB,
80
80
  OpType: () => OpType2,
81
- Operation: () => Operation2,
81
+ Operation: () => Operation,
82
82
  Property: () => Property,
83
83
  Query: () => Query,
84
- QueryOptions: () => QueryOptions2,
84
+ QueryOptions: () => QueryOptions,
85
85
  RIDBError: () => RIDBError,
86
86
  Schema: () => Schema,
87
87
  WasmBindgenTestContext: () => WasmBindgenTestContext,
@@ -266,6 +266,30 @@ ${val.stack}`;
266
266
  } } : new FinalizationRegistry((state) => {
267
267
  wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
268
268
  });
269
+ function makeMutClosure(arg0, arg1, dtor, f) {
270
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
271
+ const real = (...args) => {
272
+ state.cnt++;
273
+ const a = state.a;
274
+ state.a = 0;
275
+ try {
276
+ return f(a, state.b, ...args);
277
+ } finally {
278
+ if (--state.cnt === 0) {
279
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
280
+ CLOSURE_DTORS.unregister(state);
281
+ } else {
282
+ state.a = a;
283
+ }
284
+ }
285
+ };
286
+ real.original = state;
287
+ CLOSURE_DTORS.register(real, state, state);
288
+ return real;
289
+ }
290
+ function __wbg_adapter_56(arg0, arg1, arg2) {
291
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcf4fe6fd0b7ccc8d(arg0, arg1, addHeapObject(arg2));
292
+ }
269
293
  function makeClosure(arg0, arg1, dtor, f) {
270
294
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
271
295
  const real = (...args) => {
@@ -284,10 +308,10 @@ ${val.stack}`;
284
308
  CLOSURE_DTORS.register(real, state, state);
285
309
  return real;
286
310
  }
287
- function __wbg_adapter_56(arg0, arg1, arg2, arg3, arg4) {
311
+ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
288
312
  try {
289
313
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
290
- wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1d7727fe9471ac49(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
314
+ wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he6024291054ff5aa(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
291
315
  var r0 = getInt32Memory0()[retptr / 4 + 0];
292
316
  var r1 = getInt32Memory0()[retptr / 4 + 1];
293
317
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -299,35 +323,8 @@ ${val.stack}`;
299
323
  wasm.__wbindgen_add_to_stack_pointer(16);
300
324
  }
301
325
  }
302
- function makeMutClosure(arg0, arg1, dtor, f) {
303
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
304
- const real = (...args) => {
305
- state.cnt++;
306
- const a = state.a;
307
- state.a = 0;
308
- try {
309
- return f(a, state.b, ...args);
310
- } finally {
311
- if (--state.cnt === 0) {
312
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
313
- CLOSURE_DTORS.unregister(state);
314
- } else {
315
- state.a = a;
316
- }
317
- }
318
- };
319
- real.original = state;
320
- CLOSURE_DTORS.register(real, state, state);
321
- return real;
322
- }
323
- function __wbg_adapter_59(arg0, arg1, arg2) {
324
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4e550b82c2b30c7a(arg0, arg1, addHeapObject(arg2));
325
- }
326
- function __wbg_adapter_62(arg0, arg1) {
327
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec0cc069f718ed78(arg0, arg1);
328
- }
329
- function __wbg_adapter_65(arg0, arg1, arg2) {
330
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf401bdfdf8c9bdd9(arg0, arg1, addHeapObject(arg2));
326
+ function __wbg_adapter_62(arg0, arg1, arg2) {
327
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb6eb1f8e3b5e56e9(arg0, arg1, addHeapObject(arg2));
331
328
  }
332
329
  var cachedUint32Memory0 = null;
333
330
  function getUint32Memory0() {
@@ -346,6 +343,13 @@ ${val.stack}`;
346
343
  }
347
344
  return result;
348
345
  }
346
+ function main_js() {
347
+ wasm.main_js();
348
+ }
349
+ function is_debug_mode() {
350
+ const ret = wasm.is_debug_mode();
351
+ return ret !== 0;
352
+ }
349
353
  function _assertClass(instance, klass) {
350
354
  if (!(instance instanceof klass)) {
351
355
  throw new Error(`expected instance of ${klass.name}`);
@@ -374,13 +378,6 @@ ${val.stack}`;
374
378
  wasm.__wbindgen_exn_store(addHeapObject(e));
375
379
  }
376
380
  }
377
- function main_js() {
378
- wasm.main_js();
379
- }
380
- function is_debug_mode() {
381
- const ret = wasm.is_debug_mode();
382
- return ret !== 0;
383
- }
384
381
  function __wbgtest_console_log(args) {
385
382
  try {
386
383
  wasm.__wbgtest_console_log(addBorrowedObject(args));
@@ -416,16 +413,15 @@ ${val.stack}`;
416
413
  heap[stack_pointer++] = void 0;
417
414
  }
418
415
  }
419
- function __wbg_adapter_292(arg0, arg1) {
420
- wasm.wasm_bindgen__convert__closures__invoke0_mut__he68973678185bd11(arg0, arg1);
416
+ function __wbg_adapter_285(arg0, arg1) {
417
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__hff00333f3d941090(arg0, arg1);
421
418
  }
422
- function __wbg_adapter_335(arg0, arg1, arg2, arg3, arg4) {
423
- wasm.wasm_bindgen__convert__closures__invoke3_mut__h711940be5154e055(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
419
+ function __wbg_adapter_328(arg0, arg1, arg2, arg3, arg4) {
420
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h703f9c33fd3008bf(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
424
421
  }
425
- function __wbg_adapter_392(arg0, arg1, arg2, arg3) {
426
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hdfe55fa2a247d1ac(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
422
+ function __wbg_adapter_385(arg0, arg1, arg2, arg3) {
423
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h97988f5fa0547d24(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
427
424
  }
428
- var Errors = Object.freeze({ Error: 0, "0": "Error", HookError: 1, "1": "HookError", QueryError: 2, "2": "QueryError", SerializationError: 3, "3": "SerializationError", ValidationError: 4, "4": "ValidationError", AuthenticationError: 5, "5": "AuthenticationError" });
429
425
  var OpType2 = Object.freeze({
430
426
  /**
431
427
  * Create operation.
@@ -453,6 +449,7 @@ ${val.stack}`;
453
449
  COUNT: 4,
454
450
  "4": "COUNT"
455
451
  });
452
+ var Errors = Object.freeze({ Error: 0, "0": "Error", HookError: 1, "1": "HookError", QueryError: 2, "2": "QueryError", SerializationError: 3, "3": "SerializationError", ValidationError: 4, "4": "ValidationError", AuthenticationError: 5, "5": "AuthenticationError" });
456
453
  var BasePluginFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
457
454
  }, unregister: () => {
458
455
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_baseplugin_free(ptr >>> 0));
@@ -733,7 +730,7 @@ ${val.stack}`;
733
730
  if (r2) {
734
731
  throw takeObject(r1);
735
732
  }
736
- return QueryOptions2.__wrap(r0);
733
+ return QueryOptions.__wrap(r0);
737
734
  } finally {
738
735
  wasm.__wbindgen_add_to_stack_pointer(16);
739
736
  }
@@ -870,7 +867,7 @@ ${val.stack}`;
870
867
  try {
871
868
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
872
869
  _assertClass(schema, Schema);
873
- _assertClass(op, Operation2);
870
+ _assertClass(op, Operation);
874
871
  wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
875
872
  var r0 = getInt32Memory0()[retptr / 4 + 0];
876
873
  var r1 = getInt32Memory0()[retptr / 4 + 1];
@@ -895,8 +892,7 @@ ${val.stack}`;
895
892
  try {
896
893
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
897
894
  _assertClass(query, Query);
898
- var ptr0 = query.__destroy_into_raw();
899
- wasm.corestorage_matchesQuery(retptr, this.__wbg_ptr, addBorrowedObject(document2), ptr0);
895
+ wasm.corestorage_matchesQuery(retptr, this.__wbg_ptr, addBorrowedObject(document2), query.__wbg_ptr);
900
896
  var r0 = getInt32Memory0()[retptr / 4 + 0];
901
897
  var r1 = getInt32Memory0()[retptr / 4 + 1];
902
898
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1044,7 +1040,7 @@ ${val.stack}`;
1044
1040
  * @returns {Promise<any>}
1045
1041
  */
1046
1042
  write(op) {
1047
- _assertClass(op, Operation2);
1043
+ _assertClass(op, Operation);
1048
1044
  var ptr0 = op.__destroy_into_raw();
1049
1045
  const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
1050
1046
  return takeObject(ret);
@@ -1058,7 +1054,7 @@ ${val.stack}`;
1058
1054
  find(collection_name, query_js, options) {
1059
1055
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1060
1056
  const len0 = WASM_VECTOR_LEN;
1061
- _assertClass(options, QueryOptions2);
1057
+ _assertClass(options, QueryOptions);
1062
1058
  var ptr1 = options.__destroy_into_raw();
1063
1059
  const ret = wasm.inmemory_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
1064
1060
  return takeObject(ret);
@@ -1083,7 +1079,7 @@ ${val.stack}`;
1083
1079
  count(collection_name, query_js, options) {
1084
1080
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1085
1081
  const len0 = WASM_VECTOR_LEN;
1086
- _assertClass(options, QueryOptions2);
1082
+ _assertClass(options, QueryOptions);
1087
1083
  var ptr1 = options.__destroy_into_raw();
1088
1084
  const ret = wasm.inmemory_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query_js), ptr1);
1089
1085
  return takeObject(ret);
@@ -1179,7 +1175,7 @@ ${val.stack}`;
1179
1175
  * @returns {Promise<any>}
1180
1176
  */
1181
1177
  write(op) {
1182
- _assertClass(op, Operation2);
1178
+ _assertClass(op, Operation);
1183
1179
  var ptr0 = op.__destroy_into_raw();
1184
1180
  const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1185
1181
  return takeObject(ret);
@@ -1193,7 +1189,7 @@ ${val.stack}`;
1193
1189
  find(collection_name, query, options) {
1194
1190
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1195
1191
  const len0 = WASM_VECTOR_LEN;
1196
- _assertClass(options, QueryOptions2);
1192
+ _assertClass(options, QueryOptions);
1197
1193
  var ptr1 = options.__destroy_into_raw();
1198
1194
  const ret = wasm.indexdb_find(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
1199
1195
  return takeObject(ret);
@@ -1218,7 +1214,7 @@ ${val.stack}`;
1218
1214
  count(collection_name, query, options) {
1219
1215
  const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1220
1216
  const len0 = WASM_VECTOR_LEN;
1221
- _assertClass(options, QueryOptions2);
1217
+ _assertClass(options, QueryOptions);
1222
1218
  var ptr1 = options.__destroy_into_raw();
1223
1219
  const ret = wasm.indexdb_count(this.__wbg_ptr, ptr0, len0, addHeapObject(query), ptr1);
1224
1220
  return takeObject(ret);
@@ -1241,7 +1237,7 @@ ${val.stack}`;
1241
1237
  var OperationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1242
1238
  }, unregister: () => {
1243
1239
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_operation_free(ptr >>> 0));
1244
- var Operation2 = class _Operation {
1240
+ var Operation = class _Operation {
1245
1241
  static __wrap(ptr) {
1246
1242
  ptr = ptr >>> 0;
1247
1243
  const obj = Object.create(_Operation.prototype);
@@ -1697,7 +1693,7 @@ ${val.stack}`;
1697
1693
  var QueryOptionsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1698
1694
  }, unregister: () => {
1699
1695
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_queryoptions_free(ptr >>> 0));
1700
- var QueryOptions2 = class _QueryOptions {
1696
+ var QueryOptions = class _QueryOptions {
1701
1697
  static __wrap(ptr) {
1702
1698
  ptr = ptr >>> 0;
1703
1699
  const obj = Object.create(_QueryOptions.prototype);
@@ -2213,54 +2209,35 @@ ${val.stack}`;
2213
2209
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2214
2210
  takeObject(arg0);
2215
2211
  };
2216
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2217
- const ret = getStringFromWasm0(arg0, arg1);
2218
- return addHeapObject(ret);
2212
+ imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2213
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2214
+ const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2215
+ return addHeapObject(ret);
2216
+ }, arguments);
2219
2217
  };
2220
2218
  imports.wbg.__wbg_ridberror_new = function(arg0) {
2221
2219
  const ret = RIDBError.__wrap(arg0);
2222
2220
  return addHeapObject(ret);
2223
2221
  };
2222
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2223
+ const ret = getStringFromWasm0(arg0, arg1);
2224
+ return addHeapObject(ret);
2225
+ };
2224
2226
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2225
2227
  const ret = getObject(arg0);
2226
2228
  return addHeapObject(ret);
2227
2229
  };
2228
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2229
- const obj = getObject(arg1);
2230
- const ret = typeof obj === "string" ? obj : void 0;
2231
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2232
- var len1 = WASM_VECTOR_LEN;
2233
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2234
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2235
- };
2236
2230
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
2237
2231
  const ret = getObject(arg0) === void 0;
2238
2232
  return ret;
2239
2233
  };
2240
- imports.wbg.__wbindgen_number_new = function(arg0) {
2241
- const ret = arg0;
2242
- return addHeapObject(ret);
2243
- };
2244
- imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2245
- return handleError(function(arg0, arg1, arg2) {
2246
- const ret = getObject(arg1).apply(takeObject(arg2));
2247
- const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
2248
- const len1 = WASM_VECTOR_LEN;
2249
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2250
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2251
- }, arguments);
2252
- };
2253
- imports.wbg.__wbg_inmemory_new = function(arg0) {
2254
- const ret = InMemory.__wrap(arg0);
2255
- return addHeapObject(ret);
2256
- };
2257
2234
  imports.wbg.__wbindgen_is_null = function(arg0) {
2258
2235
  const ret = getObject(arg0) === null;
2259
2236
  return ret;
2260
2237
  };
2261
- imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2238
+ imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2262
2239
  return handleError(function(arg0) {
2263
- const ret = getObject(arg0).close();
2240
+ const ret = getObject(arg0).start();
2264
2241
  return addHeapObject(ret);
2265
2242
  }, arguments);
2266
2243
  };
@@ -2273,15 +2250,34 @@ ${val.stack}`;
2273
2250
  const ret = false;
2274
2251
  return ret;
2275
2252
  };
2276
- imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2277
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2278
- const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions2.__wrap(arg4));
2279
- return addHeapObject(ret);
2253
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2254
+ const ret = arg0;
2255
+ return addHeapObject(ret);
2256
+ };
2257
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2258
+ const obj = getObject(arg1);
2259
+ const ret = typeof obj === "string" ? obj : void 0;
2260
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2261
+ var len1 = WASM_VECTOR_LEN;
2262
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2263
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2264
+ };
2265
+ imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2266
+ return handleError(function(arg0, arg1, arg2) {
2267
+ const ret = getObject(arg1).apply(takeObject(arg2));
2268
+ const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
2269
+ const len1 = WASM_VECTOR_LEN;
2270
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2271
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2280
2272
  }, arguments);
2281
2273
  };
2282
- imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2274
+ imports.wbg.__wbg_inmemory_new = function(arg0) {
2275
+ const ret = InMemory.__wrap(arg0);
2276
+ return addHeapObject(ret);
2277
+ };
2278
+ imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2283
2279
  return handleError(function(arg0) {
2284
- const ret = getObject(arg0).start();
2280
+ const ret = getObject(arg0).close();
2285
2281
  return addHeapObject(ret);
2286
2282
  }, arguments);
2287
2283
  };
@@ -2293,7 +2289,7 @@ ${val.stack}`;
2293
2289
  };
2294
2290
  imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2295
2291
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2296
- const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions2.__wrap(arg4));
2292
+ const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2297
2293
  return addHeapObject(ret);
2298
2294
  }, arguments);
2299
2295
  };
@@ -2305,27 +2301,10 @@ ${val.stack}`;
2305
2301
  };
2306
2302
  imports.wbg.__wbg_write_1159c67c07f62020 = function() {
2307
2303
  return handleError(function(arg0, arg1) {
2308
- const ret = getObject(arg0).write(Operation2.__wrap(arg1));
2304
+ const ret = getObject(arg0).write(Operation.__wrap(arg1));
2309
2305
  return addHeapObject(ret);
2310
2306
  }, arguments);
2311
2307
  };
2312
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2313
- const ret = IndexDB.__wrap(arg0);
2314
- return addHeapObject(ret);
2315
- };
2316
- imports.wbg.__wbg_database_new = function(arg0) {
2317
- const ret = Database.__wrap(arg0);
2318
- return addHeapObject(ret);
2319
- };
2320
- imports.wbg.__wbg_collection_new = function(arg0) {
2321
- const ret = Collection.__wrap(arg0);
2322
- return addHeapObject(ret);
2323
- };
2324
- imports.wbg.__wbindgen_is_object = function(arg0) {
2325
- const val = getObject(arg0);
2326
- const ret = typeof val === "object" && val !== null;
2327
- return ret;
2328
- };
2329
2308
  imports.wbg.__wbindgen_is_string = function(arg0) {
2330
2309
  const ret = typeof getObject(arg0) === "string";
2331
2310
  return ret;
@@ -2338,18 +2317,23 @@ ${val.stack}`;
2338
2317
  const ret = Array.isArray(getObject(arg0));
2339
2318
  return ret;
2340
2319
  };
2320
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2321
+ const val = getObject(arg0);
2322
+ const ret = typeof val === "object" && val !== null;
2323
+ return ret;
2324
+ };
2341
2325
  imports.wbg.__wbindgen_boolean_get = function(arg0) {
2342
2326
  const v = getObject(arg0);
2343
2327
  const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2344
2328
  return ret;
2345
2329
  };
2346
- imports.wbg.__wbindgen_is_falsy = function(arg0) {
2347
- const ret = !getObject(arg0);
2348
- return ret;
2330
+ imports.wbg.__wbg_database_new = function(arg0) {
2331
+ const ret = Database.__wrap(arg0);
2332
+ return addHeapObject(ret);
2349
2333
  };
2350
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2351
- const ret = getObject(arg0) === getObject(arg1);
2352
- return ret;
2334
+ imports.wbg.__wbg_collection_new = function(arg0) {
2335
+ const ret = Collection.__wrap(arg0);
2336
+ return addHeapObject(ret);
2353
2337
  };
2354
2338
  imports.wbg.__wbindgen_is_function = function(arg0) {
2355
2339
  const ret = typeof getObject(arg0) === "function";
@@ -2359,6 +2343,14 @@ ${val.stack}`;
2359
2343
  const ret = typeof getObject(arg0) === "bigint";
2360
2344
  return ret;
2361
2345
  };
2346
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2347
+ const ret = IndexDB.__wrap(arg0);
2348
+ return addHeapObject(ret);
2349
+ };
2350
+ imports.wbg.__wbindgen_is_falsy = function(arg0) {
2351
+ const ret = !getObject(arg0);
2352
+ return ret;
2353
+ };
2362
2354
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2363
2355
  const ret = getObject(arg0) in getObject(arg1);
2364
2356
  return ret;
@@ -2367,6 +2359,10 @@ ${val.stack}`;
2367
2359
  const ret = arg0;
2368
2360
  return addHeapObject(ret);
2369
2361
  };
2362
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2363
+ const ret = getObject(arg0) === getObject(arg1);
2364
+ return ret;
2365
+ };
2370
2366
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2371
2367
  const ret = BigInt.asUintN(64, arg0);
2372
2368
  return addHeapObject(ret);
@@ -2423,12 +2419,6 @@ ${val.stack}`;
2423
2419
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2424
2420
  }, arguments);
2425
2421
  };
2426
- imports.wbg.__wbg_setTimeout_c172d5704ef82276 = function() {
2427
- return handleError(function(arg0, arg1, arg2) {
2428
- const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
2429
- return ret;
2430
- }, arguments);
2431
- };
2432
2422
  imports.wbg.__wbg_instanceof_WorkerGlobalScope_46b577f151fad960 = function(arg0) {
2433
2423
  let result;
2434
2424
  try {
@@ -2445,12 +2435,6 @@ ${val.stack}`;
2445
2435
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2446
2436
  }, arguments);
2447
2437
  };
2448
- imports.wbg.__wbg_setTimeout_8502a960d5dde06e = function() {
2449
- return handleError(function(arg0, arg1, arg2) {
2450
- const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
2451
- return ret;
2452
- }, arguments);
2453
- };
2454
2438
  imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2455
2439
  console.debug(getObject(arg0));
2456
2440
  };
@@ -2689,7 +2673,7 @@ ${val.stack}`;
2689
2673
  const a = state0.a;
2690
2674
  state0.a = 0;
2691
2675
  try {
2692
- return __wbg_adapter_292(a, state0.b);
2676
+ return __wbg_adapter_285(a, state0.b);
2693
2677
  } finally {
2694
2678
  state0.a = a;
2695
2679
  }
@@ -2700,16 +2684,12 @@ ${val.stack}`;
2700
2684
  }
2701
2685
  }, arguments);
2702
2686
  };
2703
- imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2704
- const ret = document;
2705
- return addHeapObject(ret);
2687
+ imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2688
+ __wbg_test_output_writeln(takeObject(arg0));
2706
2689
  };
2707
- imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2708
- const ret = getObject(arg1).stack;
2709
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2710
- const len1 = WASM_VECTOR_LEN;
2711
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2712
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2690
+ imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2691
+ const ret = getObject(arg0).stack;
2692
+ return addHeapObject(ret);
2713
2693
  };
2714
2694
  imports.wbg.__wbg_self_55106357ec10ecd4 = function(arg0) {
2715
2695
  const ret = getObject(arg0).self;
@@ -2737,13 +2717,17 @@ ${val.stack}`;
2737
2717
  const ret = getObject(arg0).stack;
2738
2718
  return addHeapObject(ret);
2739
2719
  };
2740
- imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2741
- __wbg_test_output_writeln(takeObject(arg0));
2742
- };
2743
- imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2744
- const ret = getObject(arg0).stack;
2720
+ imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2721
+ const ret = document;
2745
2722
  return addHeapObject(ret);
2746
2723
  };
2724
+ imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2725
+ const ret = getObject(arg1).stack;
2726
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2727
+ const len1 = WASM_VECTOR_LEN;
2728
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2729
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2730
+ };
2747
2731
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
2748
2732
  const ret = new Error();
2749
2733
  return addHeapObject(ret);
@@ -2766,13 +2750,13 @@ ${val.stack}`;
2766
2750
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2767
2751
  }
2768
2752
  };
2769
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2770
- queueMicrotask(getObject(arg0));
2771
- };
2772
2753
  imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2773
2754
  const ret = getObject(arg0).queueMicrotask;
2774
2755
  return addHeapObject(ret);
2775
2756
  };
2757
+ imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2758
+ queueMicrotask(getObject(arg0));
2759
+ };
2776
2760
  imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2777
2761
  const ret = getObject(arg0)[arg1 >>> 0];
2778
2762
  return addHeapObject(ret);
@@ -2869,7 +2853,7 @@ ${val.stack}`;
2869
2853
  const a = state0.a;
2870
2854
  state0.a = 0;
2871
2855
  try {
2872
- return __wbg_adapter_335(a, state0.b, arg02, arg12, arg22);
2856
+ return __wbg_adapter_328(a, state0.b, arg02, arg12, arg22);
2873
2857
  } finally {
2874
2858
  state0.a = a;
2875
2859
  }
@@ -2970,7 +2954,7 @@ ${val.stack}`;
2970
2954
  const a = state0.a;
2971
2955
  state0.a = 0;
2972
2956
  try {
2973
- return __wbg_adapter_392(a, state0.b, arg02, arg12);
2957
+ return __wbg_adapter_385(a, state0.b, arg02, arg12);
2974
2958
  } finally {
2975
2959
  state0.a = a;
2976
2960
  }
@@ -3086,20 +3070,16 @@ ${val.stack}`;
3086
3070
  const ret = wasm.memory;
3087
3071
  return addHeapObject(ret);
3088
3072
  };
3089
- imports.wbg.__wbindgen_closure_wrapper814 = function(arg0, arg1, arg2) {
3090
- const ret = makeClosure(arg0, arg1, 336, __wbg_adapter_56);
3091
- return addHeapObject(ret);
3092
- };
3093
- imports.wbg.__wbindgen_closure_wrapper816 = function(arg0, arg1, arg2) {
3094
- const ret = makeMutClosure(arg0, arg1, 336, __wbg_adapter_59);
3073
+ imports.wbg.__wbindgen_closure_wrapper566 = function(arg0, arg1, arg2) {
3074
+ const ret = makeMutClosure(arg0, arg1, 207, __wbg_adapter_56);
3095
3075
  return addHeapObject(ret);
3096
3076
  };
3097
- imports.wbg.__wbindgen_closure_wrapper818 = function(arg0, arg1, arg2) {
3098
- const ret = makeMutClosure(arg0, arg1, 336, __wbg_adapter_62);
3077
+ imports.wbg.__wbindgen_closure_wrapper568 = function(arg0, arg1, arg2) {
3078
+ const ret = makeClosure(arg0, arg1, 207, __wbg_adapter_59);
3099
3079
  return addHeapObject(ret);
3100
3080
  };
3101
- imports.wbg.__wbindgen_closure_wrapper1616 = function(arg0, arg1, arg2) {
3102
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_65);
3081
+ imports.wbg.__wbindgen_closure_wrapper1630 = function(arg0, arg1, arg2) {
3082
+ const ret = makeMutClosure(arg0, arg1, 449, __wbg_adapter_62);
3103
3083
  return addHeapObject(ret);
3104
3084
  };
3105
3085
  return imports;
@@ -3143,9 +3123,7 @@ ${val.stack}`;
3143
3123
 
3144
3124
  // src/index.ts
3145
3125
  var import_ridb_core = __toESM(require_ridb_core());
3146
- import {
3147
- WasmInternal
3148
- } from "@trust0/ridb";
3126
+ import { WasmInternal } from "@trust0/ridb";
3149
3127
  async function createMongoDB() {
3150
3128
  const { BaseStorage } = await WasmInternal();
3151
3129
  class MongoDBStorage extends BaseStorage {
@@ -3261,7 +3239,7 @@ async function createMongoDB() {
3261
3239
  throw new Error(`Document with ${primaryKey} '${id}' already exists`);
3262
3240
  }
3263
3241
  const docToInsert = { ...op.data };
3264
- const insertResult = await collection.insertOne(docToInsert);
3242
+ await collection.insertOne(docToInsert);
3265
3243
  const result = this.convertObjectIdsToStrings(op.data);
3266
3244
  return result;
3267
3245
  }
@@ -3294,7 +3272,7 @@ async function createMongoDB() {
3294
3272
  }
3295
3273
  }
3296
3274
  /** Convert RIDB query to MongoDB filter */
3297
- convertQueryToMongoFilter(query, schema) {
3275
+ convertQueryToMongoFilter(query, _schema) {
3298
3276
  if (!query || typeof query !== "object") {
3299
3277
  return {};
3300
3278
  }
@@ -3333,7 +3311,7 @@ async function createMongoDB() {
3333
3311
  const collection = this.getCollection(String(collectionName));
3334
3312
  const schema = this.getSchema(String(collectionName));
3335
3313
  const filter = this.convertQueryToMongoFilter(query, schema);
3336
- let countOptions = {};
3314
+ const countOptions = {};
3337
3315
  if (options?.offset) {
3338
3316
  countOptions.skip = options.offset;
3339
3317
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trust0/ridb-mongodb",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "MongoDB storage for @trust0/ridb",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",
@@ -25,14 +25,13 @@
25
25
  "clean": "rm -rf build node_modules",
26
26
  "docs": "npx typedoc",
27
27
  "build": "sh build.sh",
28
- "lint": "npx eslint .",
29
28
  "test": "sh test.sh",
30
29
  "types": "npm run types:default",
31
30
  "types:default": "npx tsc"
32
31
  },
33
32
  "devDependencies": {
34
- "@trust0/ridb": "^1.5.36",
35
- "@trust0/ridb-build": "^0.0.16",
33
+ "@trust0/ridb": "^1.5.37",
34
+ "@trust0/ridb-build": "^0.0.21",
36
35
  "jsdom": "^24.1.3",
37
36
  "mongodb": "^6.0.0",
38
37
  "uuid": "^11.0.3",
@@ -40,6 +39,6 @@
40
39
  "vitest": "^3.2.4"
41
40
  },
42
41
  "peerDependencies": {
43
- "@trust0/ridb": "^1"
42
+ "@trust0/ridb": "^1.5.37"
44
43
  }
45
44
  }