@pluv/persistence-cloudflare-transactional-storage 0.38.13 → 0.39.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/persistence-cloudflare-transactional-storage@0.38.13 build /home/runner/work/pluv/pluv/packages/persistence-cloudflare-transactional-storage
2
+ > @pluv/persistence-cloudflare-transactional-storage@0.39.0 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
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 3.57 KB
12
- ESM ⚡️ Build success in 80ms
11
+ ESM dist/index.mjs 3.58 KB
12
+ ESM ⚡️ Build success in 64ms
13
13
  CJS dist/index.js 4.64 KB
14
- CJS ⚡️ Build success in 85ms
14
+ CJS ⚡️ Build success in 65ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 2958ms
17
- DTS dist/index.d.mts 1.07 KB
18
- DTS dist/index.d.ts 1.07 KB
16
+ DTS ⚡️ Build success in 2288ms
17
+ DTS dist/index.d.mts 1.08 KB
18
+ DTS dist/index.d.ts 1.08 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @pluv/persistence-cloudflare-transactional-storage
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [fe6e239]
8
+ - Updated dependencies [737d508]
9
+ - @pluv/io@0.39.0
10
+ - @pluv/types@0.39.0
11
+
12
+ ## 0.38.14
13
+
14
+ ### Patch Changes
15
+
16
+ - @pluv/io@0.38.14
17
+ - @pluv/types@0.38.14
18
+
3
19
  ## 0.38.13
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, {
@@ -0,0 +1,4 @@
1
+ import { config } from "eslint-config-pluv/base";
2
+
3
+ /** @type {import("eslint").Linter.Config} */
4
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/persistence-cloudflare-transactional-storage",
3
- "version": "0.38.13",
3
+ "version": "0.39.0",
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.38.13",
21
- "@pluv/types": "^0.38.13"
20
+ "@pluv/io": "^0.39.0",
21
+ "@pluv/types": "^0.39.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@cloudflare/workers-types": "^4.20250407.0",
25
- "eslint": "^8.57.1",
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.38.13",
29
- "eslint-config-pluv": "^0.38.13"
28
+ "@pluv/tsconfig": "^0.39.0",
29
+ "eslint-config-pluv": "^0.39.0"
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
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ["pluv"],
4
- };