@wxn0brp/db-storage-web 0.110.1 → 0.120.0

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/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ValtheraClass } from "@wxn0brp/db-core";
2
- import { Data } from "@wxn0brp/db-core/types/data";
3
2
  import { Collection } from "@wxn0brp/db-core/helpers/collection";
4
- export * from "./storage.js";
3
+ import { Data } from "@wxn0brp/db-core/types/data";
5
4
  export * from "./indexed.js";
5
+ export * from "./storage.js";
6
6
  export declare function createWebStorageValthera<T extends Record<string, Data[]>>(name: string, data?: T, storage?: Storage): ValtheraClass & {
7
7
  [K in keyof T]: Collection<T[K][number]>;
8
8
  };
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { forgeValthera, ValtheraClass } from "@wxn0brp/db-core";
2
- import { WebStorageActions } from "./storage.js";
1
+ import { forgeTypedValthera, ValtheraClass } from "@wxn0brp/db-core";
3
2
  import { IndexedDBActions } from "./indexed.js";
4
- export * from "./storage.js";
3
+ import { WebStorageActions } from "./storage.js";
5
4
  export * from "./indexed.js";
5
+ export * from "./storage.js";
6
6
  export function createWebStorageValthera(name, data, storage = localStorage) {
7
7
  const db = new ValtheraClass({
8
- dbAction: new WebStorageActions(name, storage),
8
+ adapter: new WebStorageActions(name, storage),
9
9
  });
10
10
  if (!data)
11
- return forgeValthera(db);
11
+ return forgeTypedValthera(db);
12
12
  for (const collection of Object.keys(data)) {
13
13
  db.adapter._write(collection, data[collection]);
14
14
  }
15
- return forgeValthera(db);
15
+ return forgeTypedValthera(db);
16
16
  }
17
17
  export function createIndexedDBValthera(name) {
18
18
  const db = new ValtheraClass({
19
19
  adapter: new IndexedDBActions(name),
20
20
  });
21
- return forgeValthera(db);
21
+ return forgeTypedValthera(db);
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wxn0brp/db-storage-web",
3
- "version": "0.110.1",
3
+ "version": "0.120.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "wxn0brP",
@@ -18,11 +18,11 @@
18
18
  "vdb-adapter"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@wxn0brp/db-core": "^0.11.5"
21
+ "@wxn0brp/db-core": "^0.12.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@wxn0brp/biome": "*",
25
- "@wxn0brp/db-core": "^0.11.5",
25
+ "@wxn0brp/db-core": "^0.12.0",
26
26
  "tsc-alias": "^1",
27
27
  "typescript": "^7"
28
28
  },