@pluv/platform-cloudflare 0.10.0 → 0.10.2

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@0.10.0 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@0.10.2 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
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 5.76 KB
12
- ESM ⚡️ Build success in 61ms
13
- CJS dist/index.js 6.89 KB
14
- CJS ⚡️ Build success in 62ms
11
+ ESM dist/index.mjs 5.80 KB
12
+ ESM ⚡️ Build success in 111ms
13
+ CJS dist/index.js 6.93 KB
14
+ CJS ⚡️ Build success in 114ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6481ms
17
- DTS dist/index.d.mts 2.90 KB
18
- DTS dist/index.d.ts 2.90 KB
16
+ DTS ⚡️ Build success in 6690ms
17
+ DTS dist/index.d.mts 2.92 KB
18
+ DTS dist/index.d.ts 2.92 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @pluv/platform-cloudflare
2
2
 
3
+ ## 0.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3deee13]
8
+ - @pluv/io@0.10.2
9
+ - @pluv/types@0.10.2
10
+
11
+ ## 0.10.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 0eeb67c: Passed through sessionId and userId into platform websockets.
16
+ - 885835d: remove unnecessary dependency
17
+ - Updated dependencies [0eeb67c]
18
+ - Updated dependencies [885835d]
19
+ - @pluv/io@0.10.1
20
+ - @pluv/types@0.10.1
21
+
3
22
  ## 0.10.0
4
23
 
5
24
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AbstractWebSocket, AbstractEventMap, AbstractListener, AbstractWebSocketConfig, AbstractPlatform, PluvIO } from '@pluv/io';
1
+ import { AbstractWebSocket, AbstractEventMap, AbstractListener, AbstractWebSocketConfig, AbstractPlatform, ConvertWebSocketConfig, PluvIO } from '@pluv/io';
2
2
  import { MaybePromise, Maybe, InferIOAuthorizeUser, InferIOAuthorize, InferIOAuthorizeRequired, Id } from '@pluv/types';
3
3
 
4
4
  type CloudflareWebSocketConfig = AbstractWebSocketConfig;
@@ -18,7 +18,7 @@ declare class CloudflarePlatform<TEnv extends Record<string, any> = {}> extends
18
18
  }, {
19
19
  request: Request;
20
20
  }> {
21
- convertWebSocket(webSocket: WebSocket, config: AbstractWebSocketConfig): CloudflareWebSocket;
21
+ convertWebSocket(webSocket: WebSocket, config: ConvertWebSocketConfig): CloudflareWebSocket;
22
22
  parseData(data: string | ArrayBuffer): Record<string, any>;
23
23
  randomUUID(): string;
24
24
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AbstractWebSocket, AbstractEventMap, AbstractListener, AbstractWebSocketConfig, AbstractPlatform, PluvIO } from '@pluv/io';
1
+ import { AbstractWebSocket, AbstractEventMap, AbstractListener, AbstractWebSocketConfig, AbstractPlatform, ConvertWebSocketConfig, PluvIO } from '@pluv/io';
2
2
  import { MaybePromise, Maybe, InferIOAuthorizeUser, InferIOAuthorize, InferIOAuthorizeRequired, Id } from '@pluv/types';
3
3
 
4
4
  type CloudflareWebSocketConfig = AbstractWebSocketConfig;
@@ -18,7 +18,7 @@ declare class CloudflarePlatform<TEnv extends Record<string, any> = {}> extends
18
18
  }, {
19
19
  request: Request;
20
20
  }> {
21
- convertWebSocket(webSocket: WebSocket, config: AbstractWebSocketConfig): CloudflareWebSocket;
21
+ convertWebSocket(webSocket: WebSocket, config: ConvertWebSocketConfig): CloudflareWebSocket;
22
22
  parseData(data: string | ArrayBuffer): Record<string, any>;
23
23
  randomUUID(): string;
24
24
  }
package/dist/index.js CHANGED
@@ -166,8 +166,8 @@ var import_io2 = require("@pluv/io");
166
166
  var import_io = require("@pluv/io");
167
167
  var CloudflareWebSocket = class extends import_io.AbstractWebSocket {
168
168
  constructor(webSocket, config) {
169
- const { room } = config;
170
- super({ room });
169
+ const { room, sessionId, userId } = config;
170
+ super({ room, sessionId, userId });
171
171
  this.webSocket = webSocket;
172
172
  }
173
173
  get readyState() {
package/dist/index.mjs CHANGED
@@ -142,8 +142,8 @@ import {
142
142
  } from "@pluv/io";
143
143
  var CloudflareWebSocket = class extends AbstractWebSocket {
144
144
  constructor(webSocket, config) {
145
- const { room } = config;
146
- super({ room });
145
+ const { room, sessionId, userId } = config;
146
+ super({ room, sessionId, userId });
147
147
  this.webSocket = webSocket;
148
148
  }
149
149
  get readyState() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-cloudflare",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "@pluv/io adapter for cloudflare workers",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,17 +17,17 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@types/react": "^18.2.20",
21
20
  "path-to-regexp": "^6.2.1",
22
- "@pluv/io": "^0.10.0",
23
- "@pluv/types": "^0.10.0"
21
+ "@pluv/io": "^0.10.2",
22
+ "@pluv/types": "^0.10.2"
24
23
  },
25
24
  "devDependencies": {
26
- "@cloudflare/workers-types": "^4.20230807.0",
25
+ "@cloudflare/workers-types": "^4.20230814.0",
26
+ "eslint": "^8.47.0",
27
27
  "tsup": "^7.2.0",
28
28
  "typescript": "^5.1.6",
29
- "@pluv/tsconfig": "^0.10.0",
30
- "eslint-config-pluv": "^0.2.0"
29
+ "@pluv/tsconfig": "^0.10.2",
30
+ "eslint-config-pluv": "^0.10.2"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -1,4 +1,4 @@
1
- import type { AbstractWebSocketConfig } from "@pluv/io";
1
+ import type { ConvertWebSocketConfig } from "@pluv/io";
2
2
  import { AbstractPlatform } from "@pluv/io";
3
3
  import { CloudflareWebSocket } from "./CloudflareWebSocket";
4
4
 
@@ -7,7 +7,7 @@ export class CloudflarePlatform<
7
7
  > extends AbstractPlatform<WebSocket, { env: TEnv }, { request: Request }> {
8
8
  public convertWebSocket(
9
9
  webSocket: WebSocket,
10
- config: AbstractWebSocketConfig,
10
+ config: ConvertWebSocketConfig,
11
11
  ): CloudflareWebSocket {
12
12
  return new CloudflareWebSocket(webSocket, config);
13
13
  }
@@ -22,9 +22,9 @@ export class CloudflareWebSocket extends AbstractWebSocket {
22
22
  }
23
23
 
24
24
  constructor(webSocket: WebSocket, config: CloudflareWebSocketConfig) {
25
- const { room } = config;
25
+ const { room, sessionId, userId } = config;
26
26
 
27
- super({ room });
27
+ super({ room, sessionId, userId });
28
28
 
29
29
  this.webSocket = webSocket;
30
30
  }