@trust0/ridb-core 1.7.12 → 1.7.14

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.
@@ -73,6 +73,144 @@ declare enum OpType {
73
73
  COUNT = 4,
74
74
  }
75
75
 
76
+ type InternalsRecord = {
77
+ [name: string]: BaseStorage<SchemaTypeRecord>
78
+ };
79
+ /**
80
+ * ExtractType is a utility type that maps a string representing a basic data type to the actual TypeScript type.
81
+ *
82
+ * @template T - A string literal type representing the basic data type ('string', 'number', 'boolean', 'object', 'array').
83
+ *
84
+ * @example
85
+ * type StringType = ExtractType<'string'>; // StringType is string
86
+ * type NumberType = ExtractType<'number'>; // NumberType is number
87
+ * type BooleanType = ExtractType<'boolean'>; // BooleanType is boolean
88
+ * type ObjectType = ExtractType<'object'>; // ObjectType is object
89
+ * type ArrayType = ExtractType<'array'>; // ArrayType is Array<any>
90
+ */
91
+ type ExtractType<T extends string> =
92
+ T extends "string" ? string :
93
+ T extends "number" ? number :
94
+ T extends "boolean" ? boolean :
95
+ T extends "object" ? object :
96
+ T extends "array" ? any[] :
97
+ never;
98
+
99
+ type IsOptional<T> = T extends { required: false } ? true :
100
+ T extends { default: any } ? true : false;
101
+
102
+ /**
103
+ * Doc is a utility type that transforms a schema type into a document type where each property is mapped to its extracted type.
104
+ *
105
+ * @template T - A schema type with a 'properties' field where each property's type is represented as a string.
106
+ *
107
+ * type Document = Doc<Schema>; // Document is { name: string; age: number; }
108
+ */
109
+ type Doc<T extends SchemaType> = {
110
+ [K in keyof T["properties"] as IsOptional<T["properties"][K]> extends true ? K : never]?:
111
+ ExtractType<T["properties"][K]["type"]>
112
+ } & {
113
+ [K in keyof T["properties"] as IsOptional<T["properties"][K]> extends false ? K : never]:
114
+ ExtractType<T["properties"][K]["type"]>
115
+ } & {
116
+ __version?: number;
117
+ createdAt?: number;
118
+ updatedAt?: number;
119
+ };
120
+
121
+ type QueryOptions = {
122
+ limit?: number;
123
+ offset?: number;
124
+ }
125
+
126
+ /**
127
+ * Collection is a class that represents a collection of documents in a database.
128
+ * @template T - A schema type defining the structure of the documents in the collection.
129
+ */
130
+ declare class Collection<T extends SchemaType> {
131
+ /**
132
+ * Finds all documents in the collection.
133
+ *
134
+ * @returns A promise that resolves to an array of documents.
135
+ */
136
+ find(query: QueryType<T>, options?: QueryOptions): Promise<Doc<T>[]>;
137
+ /**
138
+ * count all documents in the collection.
139
+ *
140
+ * @returns A promise that resolves to an array of documents.
141
+ */
142
+ count(query: QueryType<T>, options?: QueryOptions): Promise<number>;
143
+ /**
144
+ * Finds a single document in the collection by its ID.
145
+ *
146
+ * @param id - The ID of the document to find.
147
+ * @returns A promise that resolves to the found document.
148
+ */
149
+ findById(id: string): Promise<Doc<T>>;
150
+ /**
151
+ * Updates a document in the collection by its ID.
152
+ *
153
+ * @param id - The ID of the document to update.
154
+ * @param document - A partial document containing the fields to update.
155
+ * @returns A promise that resolves when the update is complete.
156
+ */
157
+ update(document: Partial<Doc<T>>): Promise<void>;
158
+ /**
159
+ * Creates a new document in the collection.
160
+ *
161
+ * @param document - The document to create.
162
+ * @returns A promise that resolves to the created document.
163
+ */
164
+ create(document: Doc<T>): Promise<Doc<T>>;
165
+ /**
166
+ * Deletes a document in the collection by its ID.
167
+ *
168
+ * @param id - The ID of the document to delete.
169
+ * @returns A promise that resolves when the deletion is complete.
170
+ */
171
+ delete(id: string): Promise<void>;
172
+ }
173
+
174
+
175
+
176
+
177
+ type BaseStorageOptions = {
178
+ [name:string]:string | boolean | number
179
+ }
180
+
181
+ declare class BaseStorage<Schemas extends SchemaTypeRecord> extends StorageInternal<Schemas> {
182
+ static create<SchemasCreate extends SchemaTypeRecord>(
183
+ dbName: string,
184
+ schemas: SchemasCreate,
185
+ options?: BaseStorageOptions
186
+ ): Promise<
187
+ BaseStorage<
188
+ SchemasCreate
189
+ >
190
+ >;
191
+ constructor(
192
+ dbName: string,
193
+ schemas: Schemas,
194
+ options?: BaseStorageOptions
195
+ );
196
+ readonly dbName: string;
197
+ readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>;
198
+ readonly options: BaseStorageOptions;
199
+ readonly core: CoreStorage;
200
+ start(): Promise<void>;
201
+ close(): Promise<void>;
202
+ count(colectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<number>;
203
+ findDocumentById(collectionName: keyof Schemas, id: string): Promise<Doc<Schemas[keyof Schemas]> | null>;
204
+ find(collectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<Doc<Schemas[keyof Schemas]>[]>;
205
+ write(op: Operation<Schemas[keyof Schemas]>): Promise<Doc<Schemas[keyof Schemas]>>;
206
+ getOption(name: string): string | boolean | number | undefined;
207
+ getSchema(name: string): Schema<any>;
208
+ //Call addIndexSchemas if you need extra indexing schemas for your database
209
+ addIndexSchemas(): null
210
+ }
211
+
212
+
213
+
76
214
  /**
77
215
  * Represents a property within a schema, including various constraints and nested properties.
78
216
  */
@@ -347,190 +485,6 @@ declare class BasePlugin implements BasePluginOptions {
347
485
 
348
486
 
349
487
 
350
- type InternalsRecord = {
351
- [name: string]: BaseStorage<SchemaTypeRecord>
352
- };
353
- /**
354
- * ExtractType is a utility type that maps a string representing a basic data type to the actual TypeScript type.
355
- *
356
- * @template T - A string literal type representing the basic data type ('string', 'number', 'boolean', 'object', 'array').
357
- *
358
- * @example
359
- * type StringType = ExtractType<'string'>; // StringType is string
360
- * type NumberType = ExtractType<'number'>; // NumberType is number
361
- * type BooleanType = ExtractType<'boolean'>; // BooleanType is boolean
362
- * type ObjectType = ExtractType<'object'>; // ObjectType is object
363
- * type ArrayType = ExtractType<'array'>; // ArrayType is Array<any>
364
- */
365
- type ExtractType<T extends string> =
366
- T extends "string" ? string :
367
- T extends "number" ? number :
368
- T extends "boolean" ? boolean :
369
- T extends "object" ? object :
370
- T extends "array" ? any[] :
371
- never;
372
-
373
- type IsOptional<T> = T extends { required: false } ? true :
374
- T extends { default: any } ? true : false;
375
-
376
- /**
377
- * Doc is a utility type that transforms a schema type into a document type where each property is mapped to its extracted type.
378
- *
379
- * @template T - A schema type with a 'properties' field where each property's type is represented as a string.
380
- *
381
- * type Document = Doc<Schema>; // Document is { name: string; age: number; }
382
- */
383
- type Doc<T extends SchemaType> = {
384
- [K in keyof T["properties"] as IsOptional<T["properties"][K]> extends true ? K : never]?:
385
- ExtractType<T["properties"][K]["type"]>
386
- } & {
387
- [K in keyof T["properties"] as IsOptional<T["properties"][K]> extends false ? K : never]:
388
- ExtractType<T["properties"][K]["type"]>
389
- } & {
390
- __version?: number;
391
- createdAt?: number;
392
- updatedAt?: number;
393
- };
394
-
395
- type QueryOptions = {
396
- limit?: number;
397
- offset?: number;
398
- }
399
-
400
- /**
401
- * Collection is a class that represents a collection of documents in a database.
402
- * @template T - A schema type defining the structure of the documents in the collection.
403
- */
404
- declare class Collection<T extends SchemaType> {
405
- /**
406
- * Finds all documents in the collection.
407
- *
408
- * @returns A promise that resolves to an array of documents.
409
- */
410
- find(query: QueryType<T>, options?: QueryOptions): Promise<Doc<T>[]>;
411
- /**
412
- * count all documents in the collection.
413
- *
414
- * @returns A promise that resolves to an array of documents.
415
- */
416
- count(query: QueryType<T>, options?: QueryOptions): Promise<number>;
417
- /**
418
- * Finds a single document in the collection by its ID.
419
- *
420
- * @param id - The ID of the document to find.
421
- * @returns A promise that resolves to the found document.
422
- */
423
- findById(id: string): Promise<Doc<T>>;
424
- /**
425
- * Updates a document in the collection by its ID.
426
- *
427
- * @param id - The ID of the document to update.
428
- * @param document - A partial document containing the fields to update.
429
- * @returns A promise that resolves when the update is complete.
430
- */
431
- update(document: Partial<Doc<T>>): Promise<void>;
432
- /**
433
- * Creates a new document in the collection.
434
- *
435
- * @param document - The document to create.
436
- * @returns A promise that resolves to the created document.
437
- */
438
- create(document: Doc<T>): Promise<Doc<T>>;
439
- /**
440
- * Deletes a document in the collection by its ID.
441
- *
442
- * @param id - The ID of the document to delete.
443
- * @returns A promise that resolves when the deletion is complete.
444
- */
445
- delete(id: string): Promise<void>;
446
- }
447
-
448
-
449
-
450
-
451
- type BaseStorageOptions = {
452
- [name:string]:string | boolean | number
453
- }
454
-
455
- declare class BaseStorage<Schemas extends SchemaTypeRecord> extends StorageInternal<Schemas> {
456
- static create<SchemasCreate extends SchemaTypeRecord>(
457
- dbName: string,
458
- schemas: SchemasCreate,
459
- options?: BaseStorageOptions
460
- ): Promise<
461
- BaseStorage<
462
- SchemasCreate
463
- >
464
- >;
465
- constructor(
466
- dbName: string,
467
- schemas: Schemas,
468
- options?: BaseStorageOptions
469
- );
470
- readonly dbName: string;
471
- readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>;
472
- readonly options: BaseStorageOptions;
473
- readonly core: CoreStorage;
474
- start(): Promise<void>;
475
- close(): Promise<void>;
476
- count(colectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<number>;
477
- findDocumentById(collectionName: keyof Schemas, id: string): Promise<Doc<Schemas[keyof Schemas]> | null>;
478
- find(collectionName: keyof Schemas, query: QueryType<Schemas[keyof Schemas]>, options?: QueryOptions): Promise<Doc<Schemas[keyof Schemas]>[]>;
479
- write(op: Operation<Schemas[keyof Schemas]>): Promise<Doc<Schemas[keyof Schemas]>>;
480
- getOption(name: string): string | boolean | number | undefined;
481
- getSchema(name: string): Schema<any>;
482
- //Call addIndexSchemas if you need extra indexing schemas for your database
483
- addIndexSchemas(): null
484
- }
485
-
486
-
487
-
488
- /**
489
- * Represents an IndexDB storage system extending the base storage functionality.
490
- *
491
- * @template T - The schema type.
492
- */
493
- declare class IndexDB<T extends SchemaTypeRecord> extends BaseStorage<T> {
494
- /**
495
- * Frees the resources used by the in-memory storage.
496
- */
497
- free(): void;
498
-
499
- static create<SchemasCreate extends SchemaTypeRecord>(
500
- dbName: string,
501
- schemas: SchemasCreate,
502
- ): Promise<
503
- IndexDB<
504
- SchemasCreate
505
- >
506
- >;
507
- }
508
-
509
-
510
-
511
- /**
512
- * Represents an in-memory storage system extending the base storage functionality.
513
- *
514
- * @template T - The schema type.
515
- */
516
- declare class InMemory<T extends SchemaTypeRecord> extends BaseStorage<T> {
517
- /**
518
- * Frees the resources used by the in-memory storage.
519
- */
520
- free(): void;
521
-
522
- static create<SchemasCreate extends SchemaTypeRecord>(
523
- dbName: string,
524
- schemas: SchemasCreate,
525
- ): Promise<
526
- InMemory<
527
- SchemasCreate
528
- >
529
- >;
530
- }
531
-
532
-
533
-
534
488
  declare class CoreStorage {
535
489
  /**
536
490
  * @param {any} document
@@ -708,6 +662,52 @@ declare abstract class StorageInternal<Schemas extends SchemaTypeRecord> {
708
662
  ): Promise<Doc<Schemas[keyof Schemas]>>;
709
663
  }
710
664
 
665
+
666
+ /**
667
+ * Represents an IndexDB storage system extending the base storage functionality.
668
+ *
669
+ * @template T - The schema type.
670
+ */
671
+ declare class IndexDB<T extends SchemaTypeRecord> extends BaseStorage<T> {
672
+ /**
673
+ * Frees the resources used by the in-memory storage.
674
+ */
675
+ free(): void;
676
+
677
+ static create<SchemasCreate extends SchemaTypeRecord>(
678
+ dbName: string,
679
+ schemas: SchemasCreate,
680
+ ): Promise<
681
+ IndexDB<
682
+ SchemasCreate
683
+ >
684
+ >;
685
+ }
686
+
687
+
688
+
689
+ /**
690
+ * Represents an in-memory storage system extending the base storage functionality.
691
+ *
692
+ * @template T - The schema type.
693
+ */
694
+ declare class InMemory<T extends SchemaTypeRecord> extends BaseStorage<T> {
695
+ /**
696
+ * Frees the resources used by the in-memory storage.
697
+ */
698
+ free(): void;
699
+
700
+ static create<SchemasCreate extends SchemaTypeRecord>(
701
+ dbName: string,
702
+ schemas: SchemasCreate,
703
+ ): Promise<
704
+ InMemory<
705
+ SchemasCreate
706
+ >
707
+ >;
708
+ }
709
+
710
+
711
711
  /**
712
712
  */
713
713
  declare class RIDBError {
@@ -819,6 +819,25 @@ type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Modul
819
819
 
820
820
  interface InitOutput {
821
821
  readonly memory: WebAssembly.Memory;
822
+ readonly __wbg_collection_free: (a: number) => void;
823
+ readonly collection_name: (a: number, b: number) => void;
824
+ readonly collection_schema: (a: number, b: number) => void;
825
+ readonly collection_find: (a: number, b: number, c: number) => number;
826
+ readonly collection_parse_query_options: (a: number, b: number, c: number) => void;
827
+ readonly collection_count: (a: number, b: number, c: number) => number;
828
+ readonly collection_findById: (a: number, b: number) => number;
829
+ readonly collection_update: (a: number, b: number) => number;
830
+ readonly collection_create: (a: number, b: number) => number;
831
+ readonly collection_delete: (a: number, b: number) => number;
832
+ readonly __wbg_basestorage_free: (a: number) => void;
833
+ readonly basestorage_new: (a: number, b: number, c: number, d: number, e: number) => void;
834
+ readonly basestorage_addIndexSchemas: (a: number, b: number) => void;
835
+ readonly basestorage_getOption: (a: number, b: number, c: number, d: number) => void;
836
+ readonly basestorage_getSchema: (a: number, b: number, c: number, d: number) => void;
837
+ readonly basestorage_core: (a: number, b: number) => void;
838
+ readonly __wbg_queryoptions_free: (a: number) => void;
839
+ readonly queryoptions_limit: (a: number, b: number) => void;
840
+ readonly queryoptions_offset: (a: number, b: number) => void;
822
841
  readonly __wbg_property_free: (a: number) => void;
823
842
  readonly property_is_valid: (a: number, b: number) => void;
824
843
  readonly property_type: (a: number) => number;
@@ -889,25 +908,25 @@ interface InitOutput {
889
908
  readonly baseplugin_set_doc_recover_hook: (a: number, b: number) => void;
890
909
  readonly main_js: () => void;
891
910
  readonly is_debug_mode: () => number;
892
- readonly __wbg_collection_free: (a: number) => void;
893
- readonly collection_name: (a: number, b: number) => void;
894
- readonly collection_schema: (a: number, b: number) => void;
895
- readonly collection_find: (a: number, b: number, c: number) => number;
896
- readonly collection_parse_query_options: (a: number, b: number, c: number) => void;
897
- readonly collection_count: (a: number, b: number, c: number) => number;
898
- readonly collection_findById: (a: number, b: number) => number;
899
- readonly collection_update: (a: number, b: number) => number;
900
- readonly collection_create: (a: number, b: number) => number;
901
- readonly collection_delete: (a: number, b: number) => number;
902
- readonly __wbg_basestorage_free: (a: number) => void;
903
- readonly basestorage_new: (a: number, b: number, c: number, d: number, e: number) => void;
904
- readonly basestorage_addIndexSchemas: (a: number, b: number) => void;
905
- readonly basestorage_getOption: (a: number, b: number, c: number, d: number) => void;
906
- readonly basestorage_getSchema: (a: number, b: number, c: number, d: number) => void;
907
- readonly basestorage_core: (a: number, b: number) => void;
908
- readonly __wbg_queryoptions_free: (a: number) => void;
909
- readonly queryoptions_limit: (a: number, b: number) => void;
910
- readonly queryoptions_offset: (a: number, b: number) => void;
911
+ readonly corestorage_new: () => number;
912
+ readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
913
+ readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
914
+ readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
915
+ readonly __wbg_database_free: (a: number) => void;
916
+ readonly database_start: (a: number) => number;
917
+ readonly database_close: (a: number) => number;
918
+ readonly database_started: (a: number) => number;
919
+ readonly database_authenticate: (a: number, b: number, c: number) => number;
920
+ readonly database_collections: (a: number, b: number) => void;
921
+ readonly database_create: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
922
+ readonly __wbg_operation_free: (a: number) => void;
923
+ readonly operation_collection: (a: number, b: number) => void;
924
+ readonly operation_opType: (a: number) => number;
925
+ readonly operation_data: (a: number) => number;
926
+ readonly operation_primaryKeyField: (a: number) => number;
927
+ readonly operation_primaryKey: (a: number) => number;
928
+ readonly operation_primaryKeyIndex: (a: number, b: number) => void;
929
+ readonly __wbg_corestorage_free: (a: number) => void;
911
930
  readonly __wbg_ridberror_free: (a: number) => void;
912
931
  readonly ridberror_new: (a: number, b: number, c: number, d: number, e: number) => number;
913
932
  readonly ridberror_type: (a: number, b: number) => void;
@@ -938,25 +957,6 @@ interface InitOutput {
938
957
  readonly inmemory_count: (a: number, b: number, c: number, d: number, e: number) => number;
939
958
  readonly inmemory_close: (a: number) => number;
940
959
  readonly inmemory_start: (a: number) => number;
941
- readonly corestorage_new: () => number;
942
- readonly corestorage_getPrimaryKeyTyped: (a: number, b: number, c: number) => void;
943
- readonly corestorage_getIndexes: (a: number, b: number, c: number, d: number) => void;
944
- readonly corestorage_matchesQuery: (a: number, b: number, c: number, d: number) => void;
945
- readonly __wbg_database_free: (a: number) => void;
946
- readonly database_start: (a: number) => number;
947
- readonly database_close: (a: number) => number;
948
- readonly database_started: (a: number) => number;
949
- readonly database_authenticate: (a: number, b: number, c: number) => number;
950
- readonly database_collections: (a: number, b: number) => void;
951
- readonly database_create: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
952
- readonly __wbg_operation_free: (a: number) => void;
953
- readonly operation_collection: (a: number, b: number) => void;
954
- readonly operation_opType: (a: number) => number;
955
- readonly operation_data: (a: number) => number;
956
- readonly operation_primaryKeyField: (a: number) => number;
957
- readonly operation_primaryKey: (a: number) => number;
958
- readonly operation_primaryKeyIndex: (a: number, b: number) => void;
959
- readonly __wbg_corestorage_free: (a: number) => void;
960
960
  readonly __wbg_wasmbindgentestcontext_free: (a: number) => void;
961
961
  readonly wasmbindgentestcontext_new: () => number;
962
962
  readonly wasmbindgentestcontext_args: (a: number, b: number, c: number) => void;
@@ -368,13 +368,13 @@ function __wbgtest_console_error(args) {
368
368
  heap[stack_pointer++] = void 0;
369
369
  }
370
370
  }
371
- function __wbg_adapter_290(arg0, arg1) {
371
+ function __wbg_adapter_296(arg0, arg1) {
372
372
  wasm.wasm_bindgen__convert__closures__invoke0_mut__h99a9f0884c9cd22a(arg0, arg1);
373
373
  }
374
- function __wbg_adapter_333(arg0, arg1, arg2, arg3, arg4) {
374
+ function __wbg_adapter_339(arg0, arg1, arg2, arg3, arg4) {
375
375
  wasm.wasm_bindgen__convert__closures__invoke3_mut__h07c8feee2a4f48f8(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
376
376
  }
377
- function __wbg_adapter_390(arg0, arg1, arg2, arg3) {
377
+ function __wbg_adapter_396(arg0, arg1, arg2, arg3) {
378
378
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h424d8c39cf909020(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
379
379
  }
380
380
  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" });
@@ -2261,6 +2261,18 @@ function __wbg_get_imports() {
2261
2261
  return addHeapObject(ret);
2262
2262
  }, arguments);
2263
2263
  };
2264
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2265
+ const ret = typeof getObject(arg0) === "function";
2266
+ return ret;
2267
+ };
2268
+ imports.wbg.__wbindgen_is_string = function(arg0) {
2269
+ const ret = typeof getObject(arg0) === "string";
2270
+ return ret;
2271
+ };
2272
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
2273
+ const ret = typeof getObject(arg0) === "bigint";
2274
+ return ret;
2275
+ };
2264
2276
  imports.wbg.__wbg_collection_new = function(arg0) {
2265
2277
  const ret = Collection.__wrap(arg0);
2266
2278
  return addHeapObject(ret);
@@ -2286,10 +2298,6 @@ function __wbg_get_imports() {
2286
2298
  const ret = typeof val === "object" && val !== null;
2287
2299
  return ret;
2288
2300
  };
2289
- imports.wbg.__wbindgen_is_string = function(arg0) {
2290
- const ret = typeof getObject(arg0) === "string";
2291
- return ret;
2292
- };
2293
2301
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2294
2302
  const ret = !getObject(arg0);
2295
2303
  return ret;
@@ -2299,18 +2307,6 @@ function __wbg_get_imports() {
2299
2307
  const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2300
2308
  return ret;
2301
2309
  };
2302
- imports.wbg.__wbindgen_is_function = function(arg0) {
2303
- const ret = typeof getObject(arg0) === "function";
2304
- return ret;
2305
- };
2306
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
2307
- const ret = typeof getObject(arg0) === "bigint";
2308
- return ret;
2309
- };
2310
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2311
- const ret = IndexDB.__wrap(arg0);
2312
- return addHeapObject(ret);
2313
- };
2314
2310
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2315
2311
  const ret = getObject(arg0) in getObject(arg1);
2316
2312
  return ret;
@@ -2323,6 +2319,10 @@ function __wbg_get_imports() {
2323
2319
  const ret = BigInt.asUintN(64, arg0);
2324
2320
  return addHeapObject(ret);
2325
2321
  };
2322
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2323
+ const ret = IndexDB.__wrap(arg0);
2324
+ return addHeapObject(ret);
2325
+ };
2326
2326
  imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
2327
2327
  const ret = getObject(arg0).crypto;
2328
2328
  return addHeapObject(ret);
@@ -2369,6 +2369,12 @@ function __wbg_get_imports() {
2369
2369
  const ret = result;
2370
2370
  return ret;
2371
2371
  };
2372
+ imports.wbg.__wbg_localStorage_e381d34d0c40c761 = function() {
2373
+ return handleError(function(arg0) {
2374
+ const ret = getObject(arg0).localStorage;
2375
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2376
+ }, arguments);
2377
+ };
2372
2378
  imports.wbg.__wbg_indexedDB_7c51d9056667f4e0 = function() {
2373
2379
  return handleError(function(arg0) {
2374
2380
  const ret = getObject(arg0).indexedDB;
@@ -2391,6 +2397,9 @@ function __wbg_get_imports() {
2391
2397
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2392
2398
  }, arguments);
2393
2399
  };
2400
+ imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2401
+ console.debug(getObject(arg0));
2402
+ };
2394
2403
  imports.wbg.__wbg_log_5bb5f88f245d7762 = function(arg0) {
2395
2404
  console.log(getObject(arg0));
2396
2405
  };
@@ -2580,6 +2589,15 @@ function __wbg_get_imports() {
2580
2589
  return addHeapObject(ret);
2581
2590
  }, arguments);
2582
2591
  };
2592
+ imports.wbg.__wbg_getItem_164e8e5265095b87 = function() {
2593
+ return handleError(function(arg0, arg1, arg2, arg3) {
2594
+ const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
2595
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2596
+ var len1 = WASM_VECTOR_LEN;
2597
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2598
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2599
+ }, arguments);
2600
+ };
2583
2601
  imports.wbg.__wbg_continue_f1c3e0815924de62 = function() {
2584
2602
  return handleError(function(arg0) {
2585
2603
  getObject(arg0).continue();
@@ -2632,7 +2650,7 @@ function __wbg_get_imports() {
2632
2650
  const a = state0.a;
2633
2651
  state0.a = 0;
2634
2652
  try {
2635
- return __wbg_adapter_290(a, state0.b);
2653
+ return __wbg_adapter_296(a, state0.b);
2636
2654
  } finally {
2637
2655
  state0.a = a;
2638
2656
  }
@@ -2812,7 +2830,7 @@ function __wbg_get_imports() {
2812
2830
  const a = state0.a;
2813
2831
  state0.a = 0;
2814
2832
  try {
2815
- return __wbg_adapter_333(a, state0.b, arg02, arg12, arg22);
2833
+ return __wbg_adapter_339(a, state0.b, arg02, arg12, arg22);
2816
2834
  } finally {
2817
2835
  state0.a = a;
2818
2836
  }
@@ -2913,7 +2931,7 @@ function __wbg_get_imports() {
2913
2931
  const a = state0.a;
2914
2932
  state0.a = 0;
2915
2933
  try {
2916
- return __wbg_adapter_390(a, state0.b, arg02, arg12);
2934
+ return __wbg_adapter_396(a, state0.b, arg02, arg12);
2917
2935
  } finally {
2918
2936
  state0.a = a;
2919
2937
  }
@@ -3029,20 +3047,20 @@ function __wbg_get_imports() {
3029
3047
  const ret = wasm.memory;
3030
3048
  return addHeapObject(ret);
3031
3049
  };
3032
- imports.wbg.__wbindgen_closure_wrapper575 = function(arg0, arg1, arg2) {
3033
- const ret = makeMutClosure(arg0, arg1, 217, __wbg_adapter_56);
3050
+ imports.wbg.__wbindgen_closure_wrapper960 = function(arg0, arg1, arg2) {
3051
+ const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_56);
3034
3052
  return addHeapObject(ret);
3035
3053
  };
3036
- imports.wbg.__wbindgen_closure_wrapper577 = function(arg0, arg1, arg2) {
3037
- const ret = makeClosure(arg0, arg1, 217, __wbg_adapter_59);
3054
+ imports.wbg.__wbindgen_closure_wrapper962 = function(arg0, arg1, arg2) {
3055
+ const ret = makeClosure(arg0, arg1, 342, __wbg_adapter_59);
3038
3056
  return addHeapObject(ret);
3039
3057
  };
3040
- imports.wbg.__wbindgen_closure_wrapper579 = function(arg0, arg1, arg2) {
3041
- const ret = makeMutClosure(arg0, arg1, 217, __wbg_adapter_62);
3058
+ imports.wbg.__wbindgen_closure_wrapper964 = function(arg0, arg1, arg2) {
3059
+ const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_62);
3042
3060
  return addHeapObject(ret);
3043
3061
  };
3044
- imports.wbg.__wbindgen_closure_wrapper1612 = function(arg0, arg1, arg2) {
3045
- const ret = makeMutClosure(arg0, arg1, 440, __wbg_adapter_65);
3062
+ imports.wbg.__wbindgen_closure_wrapper1629 = function(arg0, arg1, arg2) {
3063
+ const ret = makeMutClosure(arg0, arg1, 444, __wbg_adapter_65);
3046
3064
  return addHeapObject(ret);
3047
3065
  };
3048
3066
  return imports;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.7.12",
7
+ "version": "1.7.14",
8
8
  "main": "./build/ridb_core.js",
9
9
  "module": "./build/ridb_core.mjs",
10
10
  "types": "./build/ridb_core.d.ts",
@@ -16,7 +16,7 @@
16
16
  "default": "./build/ridb_core.mjs"
17
17
  },
18
18
  "./wasm": {
19
- "types": "./build/ridb_core_bg.d.ts",
19
+ "types": "./build/ridb_core_bg.d.mts",
20
20
  "import": "./build/ridb_core_bg.mjs",
21
21
  "default": "./build/ridb_core_bg.mjs"
22
22
  }
@@ -25,11 +25,12 @@
25
25
  "clean": "rm -rf build node_modules",
26
26
  "test": "sh test.sh",
27
27
  "build": "rm -rf build && sh build.sh",
28
+ "lint": "npx eslint .",
28
29
  "docs": "npx typedoc"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@esbuild-plugins/node-resolve": "^0.2.2",
32
- "@trust0/ridb-build": "^0.0.8",
33
+ "@trust0/ridb-build": "^0.0.10",
33
34
  "esbuild": "^0.25.4"
34
35
  },
35
36
  "files": [