@pluv/addon-indexeddb 0.1.0 → 0.1.1

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.1 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 131ms
13
13
  CJS dist/index.js 4.87 KB
14
- CJS ⚡️ Build success in 148ms
14
+ CJS ⚡️ Build success in 131ms
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 7464ms
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,14 @@
1
1
  # @pluv/addon-indexeddb
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8997c65: bumped dependencies
8
+ - Updated dependencies [8fba48b]
9
+ - Updated dependencies [8997c65]
10
+ - @pluv/client@0.9.1
11
+
3
12
  ## 0.1.0
4
13
 
5
14
  ### 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.1",
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.1"
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.44.0",
25
+ "tsup": "^7.1.0",
26
+ "typescript": "^5.1.6",
27
+ "@pluv/tsconfig": "^0.1.8",
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