@pluv/platform-cloudflare 2.2.4 → 2.2.5

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/platform-cloudflare@2.2.4 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@2.2.5 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
3
3
  > tsup src/index.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,8 +8,8 @@
8
8
  CLI Using tsup config: /home/runner/work/pluv/pluv/packages/platform-cloudflare/tsup.config.ts
9
9
  CLI Target: es6
10
10
  ESM Build start
11
- ESM dist/index.mjs 14.00 KB
12
- ESM ⚡️ Build success in 42ms
11
+ ESM dist/index.mjs 14.09 KB
12
+ ESM ⚡️ Build success in 26ms
13
13
  DTS Build start
14
- DTS ⚡️ Build success in 1257ms
15
- DTS dist/index.d.mts 7.31 KB
14
+ DTS ⚡️ Build success in 1103ms
15
+ DTS dist/index.d.mts 7.33 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @pluv/platform-cloudflare
2
2
 
3
+ ## 2.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 02b401c: Fixed storage state not being written into transactional storage.
8
+ - @pluv/io@2.2.5
9
+ - @pluv/persistence-cloudflare-transactional-storage@2.2.5
10
+ - @pluv/types@2.2.5
11
+
3
12
  ## 2.2.4
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -48,6 +48,7 @@ declare class CloudflarePlatform<TAuthorize extends IOAuthorize<any, any> | null
48
48
  };
49
49
  router: true;
50
50
  }> {
51
+ readonly id: string;
51
52
  readonly _config: {
52
53
  authorize: {
53
54
  secret: true;
package/dist/index.mjs CHANGED
@@ -280,15 +280,18 @@ var CloudflareWebSocket = class extends AbstractWebSocket {
280
280
  // src/CloudflarePlatform.ts
281
281
  var CloudflarePlatform = class _CloudflarePlatform extends AbstractPlatform {
282
282
  constructor(config) {
283
- var _a;
284
- super(__spreadValues(__spreadValues({}, config), config.roomContext && config.mode === "detached" ? { persistence: new PersistenceCloudflareTransactionalStorage({ mode: "sqlite" }) } : {}));
283
+ var _a, _b;
284
+ super(__spreadValues(__spreadValues({}, config), config.roomContext && config.mode === "detached" ? {
285
+ persistence: (_a = config.persistence) != null ? _a : new PersistenceCloudflareTransactionalStorage({ mode: "sqlite" })
286
+ } : {}));
287
+ this.id = crypto.randomUUID();
285
288
  this._name = "platformCloudflare";
286
289
  this._config = {
287
290
  authorize: {
288
291
  secret: true
289
292
  },
290
293
  handleMode: "io",
291
- registrationMode: (_a = config.mode) != null ? _a : DEFAULT_REGISTRATION_MODE,
294
+ registrationMode: (_b = config.mode) != null ? _b : DEFAULT_REGISTRATION_MODE,
292
295
  requireAuth: false,
293
296
  listeners: {
294
297
  onRoomDeleted: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-cloudflare",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "@pluv/io adapter for cloudflare workers",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,17 +17,17 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "path-to-regexp": "^8.2.0",
20
- "@pluv/io": "^2.2.4",
21
- "@pluv/persistence-cloudflare-transactional-storage": "^2.2.4",
22
- "@pluv/types": "^2.2.4"
20
+ "@pluv/io": "^2.2.5",
21
+ "@pluv/persistence-cloudflare-transactional-storage": "^2.2.5",
22
+ "@pluv/types": "^2.2.5"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@cloudflare/workers-types": "^4.20250521.0",
26
26
  "eslint": "^9.27.0",
27
27
  "tsup": "^8.5.0",
28
28
  "typescript": "^5.8.3",
29
- "@pluv/tsconfig": "^2.2.4",
30
- "eslint-config-pluv": "^2.2.4"
29
+ "@pluv/tsconfig": "^2.2.5",
30
+ "eslint-config-pluv": "^2.2.5"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsup src/index.ts",
@@ -50,6 +50,7 @@ export class CloudflarePlatform<
50
50
  router: true;
51
51
  }
52
52
  > {
53
+ public readonly id = crypto.randomUUID();
53
54
  public readonly _config;
54
55
  public readonly _name = "platformCloudflare";
55
56
 
@@ -57,7 +58,11 @@ export class CloudflarePlatform<
57
58
  super({
58
59
  ...config,
59
60
  ...(config.roomContext && config.mode === "detached"
60
- ? { persistence: new PersistenceCloudflareTransactionalStorage({ mode: "sqlite" }) }
61
+ ? {
62
+ persistence:
63
+ config.persistence ??
64
+ new PersistenceCloudflareTransactionalStorage({ mode: "sqlite" }),
65
+ }
61
66
  : {}),
62
67
  });
63
68