@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.
- package/.turbo/turbo-build.log +7 -6
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +10 -0
- package/package.json +8 -8
- package/src/IndexedDBStorage.ts +1 -1
- package/src/addonIndexedDB.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/addon-indexeddb@0.1.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
-
[34mCLI[39m tsup v7.
|
|
7
|
+
[34mCLI[39m tsup v7.1.0
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m3.84 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 131ms
|
|
13
13
|
[32mCJS[39m [1mdist/index.js [22m[32m4.87 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 131ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 7464ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m728.00 B[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m728.00 B[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
ADDED
|
@@ -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.
|
|
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.
|
|
21
|
+
"@pluv/client": "^0.9.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"eslint": "^8.
|
|
25
|
-
"tsup": "^7.
|
|
26
|
-
"typescript": "^5.1.
|
|
27
|
-
"@pluv/tsconfig": "^0.1.
|
|
28
|
-
"@pluv/types": "^0.2.
|
|
29
|
-
"eslint-config-pluv": "^0.1.
|
|
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",
|
package/src/IndexedDBStorage.ts
CHANGED
package/src/addonIndexedDB.ts
CHANGED
|
@@ -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
|
|