@pluv/addon-indexeddb 0.1.0 → 0.1.2

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.
@@ -1,17 +1,18 @@
1
1
 
2
- > @pluv/addon-indexeddb@0.1.0 build /home/runner/work/pluv/pluv/packages/addon-indexeddb
2
+ > @pluv/addon-indexeddb@0.1.2 build /home/runner/work/pluv/pluv/packages/addon-indexeddb
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.0.0
7
+ CLI tsup v7.1.0
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
11
  ESM dist/index.mjs 3.84 KB
12
- ESM ⚡️ Build success in 147ms
12
+ ESM ⚡️ Build success in 112ms
13
13
  CJS dist/index.js 4.87 KB
14
- CJS ⚡️ Build success in 148ms
14
+ CJS ⚡️ Build success in 116ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 8280ms
17
- DTS dist/index.d.ts 728.00 B
16
+ DTS ⚡️ Build success in 6964ms
17
+ DTS dist/index.d.mts 728.00 B
18
+ DTS dist/index.d.ts 728.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @pluv/addon-indexeddb
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [f4317ba]
8
+ - @pluv/client@0.9.2
9
+
10
+ ## 0.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - 8997c65: bumped dependencies
15
+ - Updated dependencies [8fba48b]
16
+ - Updated dependencies [8997c65]
17
+ - @pluv/client@0.9.1
18
+
3
19
  ## 0.1.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,10 @@
1
+ import * as _pluv_types from '@pluv/types';
2
+ import { IOLike, JsonObject } from '@pluv/types';
3
+ import { AbstractType, PluvRoomAddon, PluvRoom } from '@pluv/client';
4
+
5
+ interface AddonIndexedDBConfig<TIO extends IOLike, TPresence extends JsonObject = {}, TStorage extends Record<string, AbstractType<any>> = {}> {
6
+ enabled?: boolean | ((room: PluvRoom<TIO, TPresence, TStorage>) => boolean);
7
+ }
8
+ declare const addonIndexedDB: <TIO extends IOLike<_pluv_types.IOAuthorize<any, any>, {}, {}, {}, {}>, TPresence extends JsonObject = {}, TStorage extends Record<string, AbstractType<any>> = {}>(config?: AddonIndexedDBConfig<TIO, TPresence, TStorage> | undefined) => PluvRoomAddon<TIO, TPresence, TStorage>;
9
+
10
+ export { addonIndexedDB };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/addon-indexeddb",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "@pluv/io indexeddb for client storage persistance",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,15 +18,15 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "idb": "^7.1.1",
21
- "@pluv/client": "^0.9.0"
21
+ "@pluv/client": "^0.9.2"
22
22
  },
23
23
  "devDependencies": {
24
- "eslint": "^8.43.0",
25
- "tsup": "^7.0.0",
26
- "typescript": "^5.1.3",
27
- "@pluv/tsconfig": "^0.1.7",
28
- "@pluv/types": "^0.2.1",
29
- "eslint-config-pluv": "^0.1.13"
24
+ "eslint": "^8.45.0",
25
+ "tsup": "^7.1.0",
26
+ "typescript": "^5.1.6",
27
+ "@pluv/tsconfig": "^0.2.0",
28
+ "@pluv/types": "^0.2.2",
29
+ "eslint-config-pluv": "^0.1.14"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -71,7 +71,7 @@ export class IndexedDBStorage extends AbstractStorageStore {
71
71
 
72
72
  const updates = await db.getAll(
73
73
  UPGRADES_KEY,
74
- this._getLowerBound(start)
74
+ this._getLowerBound(start),
75
75
  );
76
76
 
77
77
  const lastKey = await this._getLastKey();
@@ -5,7 +5,7 @@ import { IndexedDBStorage } from "./IndexedDBStorage";
5
5
  export interface AddonIndexedDBConfig<
6
6
  TIO extends IOLike,
7
7
  TPresence extends JsonObject = {},
8
- TStorage extends Record<string, AbstractType<any>> = {}
8
+ TStorage extends Record<string, AbstractType<any>> = {},
9
9
  > {
10
10
  enabled?: boolean | ((room: PluvRoom<TIO, TPresence, TStorage>) => boolean);
11
11
  }
@@ -13,9 +13,9 @@ export interface AddonIndexedDBConfig<
13
13
  export const addonIndexedDB = <
14
14
  TIO extends IOLike,
15
15
  TPresence extends JsonObject = {},
16
- TStorage extends Record<string, AbstractType<any>> = {}
16
+ TStorage extends Record<string, AbstractType<any>> = {},
17
17
  >(
18
- config?: AddonIndexedDBConfig<TIO, TPresence, TStorage>
18
+ config?: AddonIndexedDBConfig<TIO, TPresence, TStorage>,
19
19
  ): PluvRoomAddon<TIO, TPresence, TStorage> => {
20
20
  const { enabled = true } = config ?? {};
21
21