@pluv/persistence-cloudflare-transactional-storage 0.38.14 → 0.39.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 -7
- package/CHANGELOG.md +16 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/eslint.config.mjs +4 -0
- package/package.json +8 -8
- package/src/PersistenceCloudflareTransactionalStorage.ts +6 -6
- package/.eslintrc.js +0 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/persistence-cloudflare-transactional-storage@0.
|
|
2
|
+
> @pluv/persistence-cloudflare-transactional-storage@0.39.1 build /home/runner/work/pluv/pluv/packages/persistence-cloudflare-transactional-storage
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m3.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m3.58 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 84ms
|
|
13
13
|
[32mCJS[39m [1mdist/index.js [22m[32m4.64 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 88ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m1.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3014ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m1.08 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.08 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @pluv/persistence-cloudflare-transactional-storage
|
|
2
2
|
|
|
3
|
+
## 0.39.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @pluv/io@0.39.1
|
|
8
|
+
- @pluv/types@0.39.1
|
|
9
|
+
|
|
10
|
+
## 0.39.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [fe6e239]
|
|
15
|
+
- Updated dependencies [737d508]
|
|
16
|
+
- @pluv/io@0.39.0
|
|
17
|
+
- @pluv/types@0.39.0
|
|
18
|
+
|
|
3
19
|
## 0.38.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -11,10 +11,10 @@ declare class PersistenceCloudflareTransactionalStorage extends AbstractPersiste
|
|
|
11
11
|
deleteStorageState(room: string): Promise<void>;
|
|
12
12
|
deleteUser(room: string, connectionId: string): Promise<void>;
|
|
13
13
|
deleteUsers(room: string): Promise<void>;
|
|
14
|
-
getSize(room: string): Promise<number>;
|
|
15
14
|
getStorageState(room: string): Promise<string | null>;
|
|
16
15
|
getUser(room: string, connectionId: string): Promise<JsonObject | null>;
|
|
17
16
|
getUsers(room: string): Promise<readonly (JsonObject | null)[]>;
|
|
17
|
+
getUsersSize(room: string): Promise<number>;
|
|
18
18
|
setStorageState(room: string, state: string): Promise<void>;
|
|
19
19
|
private _getStorageKey;
|
|
20
20
|
private _getUserKey;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ declare class PersistenceCloudflareTransactionalStorage extends AbstractPersiste
|
|
|
11
11
|
deleteStorageState(room: string): Promise<void>;
|
|
12
12
|
deleteUser(room: string, connectionId: string): Promise<void>;
|
|
13
13
|
deleteUsers(room: string): Promise<void>;
|
|
14
|
-
getSize(room: string): Promise<number>;
|
|
15
14
|
getStorageState(room: string): Promise<string | null>;
|
|
16
15
|
getUser(room: string, connectionId: string): Promise<JsonObject | null>;
|
|
17
16
|
getUsers(room: string): Promise<readonly (JsonObject | null)[]>;
|
|
17
|
+
getUsersSize(room: string): Promise<number>;
|
|
18
18
|
setStorageState(room: string, state: string): Promise<void>;
|
|
19
19
|
private _getStorageKey;
|
|
20
20
|
private _getUserKey;
|
package/dist/index.js
CHANGED
|
@@ -97,12 +97,6 @@ var PersistenceCloudflareTransactionalStorage = class extends import_io.Abstract
|
|
|
97
97
|
}));
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
getSize(room) {
|
|
101
|
-
return __async(this, null, function* () {
|
|
102
|
-
const storage = yield this._state.storage.list({ prefix: USER_PREFIX });
|
|
103
|
-
return storage.size;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
100
|
getStorageState(room) {
|
|
107
101
|
return __async(this, null, function* () {
|
|
108
102
|
const storage = yield this._state.storage.get(this._getStorageKey(room));
|
|
@@ -123,6 +117,12 @@ var PersistenceCloudflareTransactionalStorage = class extends import_io.Abstract
|
|
|
123
117
|
return Array.from(storage.values());
|
|
124
118
|
});
|
|
125
119
|
}
|
|
120
|
+
getUsersSize(room) {
|
|
121
|
+
return __async(this, null, function* () {
|
|
122
|
+
const storage = yield this._state.storage.list({ prefix: USER_PREFIX });
|
|
123
|
+
return storage.size;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
126
|
setStorageState(room, state) {
|
|
127
127
|
return __async(this, null, function* () {
|
|
128
128
|
yield this._state.storage.put(this._getStorageKey(room), state, {
|
package/dist/index.mjs
CHANGED
|
@@ -72,12 +72,6 @@ var PersistenceCloudflareTransactionalStorage = class extends AbstractPersistenc
|
|
|
72
72
|
}));
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
getSize(room) {
|
|
76
|
-
return __async(this, null, function* () {
|
|
77
|
-
const storage = yield this._state.storage.list({ prefix: USER_PREFIX });
|
|
78
|
-
return storage.size;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
75
|
getStorageState(room) {
|
|
82
76
|
return __async(this, null, function* () {
|
|
83
77
|
const storage = yield this._state.storage.get(this._getStorageKey(room));
|
|
@@ -98,6 +92,12 @@ var PersistenceCloudflareTransactionalStorage = class extends AbstractPersistenc
|
|
|
98
92
|
return Array.from(storage.values());
|
|
99
93
|
});
|
|
100
94
|
}
|
|
95
|
+
getUsersSize(room) {
|
|
96
|
+
return __async(this, null, function* () {
|
|
97
|
+
const storage = yield this._state.storage.list({ prefix: USER_PREFIX });
|
|
98
|
+
return storage.size;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
101
|
setStorageState(room, state) {
|
|
102
102
|
return __async(this, null, function* () {
|
|
103
103
|
yield this._state.storage.put(this._getStorageKey(room), state, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/persistence-cloudflare-transactional-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "@pluv/io crdt storage persistence for cloudflare via transactional storage",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@pluv/io": "^0.
|
|
21
|
-
"@pluv/types": "^0.
|
|
20
|
+
"@pluv/io": "^0.39.1",
|
|
21
|
+
"@pluv/types": "^0.39.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@cloudflare/workers-types": "^4.
|
|
25
|
-
"eslint": "^
|
|
24
|
+
"@cloudflare/workers-types": "^4.20250414.0",
|
|
25
|
+
"eslint": "^9.24.0",
|
|
26
26
|
"tsup": "^8.4.0",
|
|
27
27
|
"typescript": "^5.8.3",
|
|
28
|
-
"@pluv/tsconfig": "^0.
|
|
29
|
-
"eslint-config-pluv": "^0.
|
|
28
|
+
"@pluv/tsconfig": "^0.39.1",
|
|
29
|
+
"eslint-config-pluv": "^0.39.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
33
33
|
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
34
|
-
"lint": "eslint src/**/*.ts* --fix",
|
|
34
|
+
"lint": "eslint src/**/*.ts* --fix --max-warnings 0",
|
|
35
35
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -57,12 +57,6 @@ export class PersistenceCloudflareTransactionalStorage extends AbstractPersisten
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
public async getSize(room: string): Promise<number> {
|
|
61
|
-
const storage = await this._state.storage.list({ prefix: USER_PREFIX });
|
|
62
|
-
|
|
63
|
-
return storage.size;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
60
|
public async getStorageState(room: string): Promise<string | null> {
|
|
67
61
|
const storage = await this._state.storage.get<string>(this._getStorageKey(room));
|
|
68
62
|
|
|
@@ -83,6 +77,12 @@ export class PersistenceCloudflareTransactionalStorage extends AbstractPersisten
|
|
|
83
77
|
return Array.from(storage.values()) as (JsonObject | null)[];
|
|
84
78
|
}
|
|
85
79
|
|
|
80
|
+
public async getUsersSize(room: string): Promise<number> {
|
|
81
|
+
const storage = await this._state.storage.list({ prefix: USER_PREFIX });
|
|
82
|
+
|
|
83
|
+
return storage.size;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
86
|
public async setStorageState(room: string, state: string): Promise<void> {
|
|
87
87
|
await this._state.storage.put(this._getStorageKey(room), state, {
|
|
88
88
|
allowConcurrency: true,
|
package/.eslintrc.js
DELETED