@pluv/platform-cloudflare 0.3.4 → 0.10.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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @pluv/platform-cloudflare@0.3.4 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@0.10.1 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
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.1.0
7
+ CLI tsup v7.2.0
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 120ms
13
- CJS dist/index.js 6.89 KB
14
- CJS ⚡️ Build success in 121ms
11
+ ESM dist/index.mjs 5.80 KB
12
+ ESM ⚡️ Build success in 160ms
13
+ CJS dist/index.js 6.93 KB
14
+ CJS ⚡️ Build success in 164ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 7077ms
17
- DTS dist/index.d.mts 2.90 KB
18
- DTS dist/index.d.ts 2.90 KB
16
+ DTS ⚡️ Build success in 9173ms
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,28 @@
1
1
  # @pluv/platform-cloudflare
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0eeb67c: Passed through sessionId and userId into platform websockets.
8
+ - 885835d: remove unnecessary dependency
9
+ - Updated dependencies [0eeb67c]
10
+ - Updated dependencies [885835d]
11
+ - @pluv/io@0.10.1
12
+ - @pluv/types@0.10.1
13
+
14
+ ## 0.10.0
15
+
16
+ ### Minor Changes
17
+
18
+ - f43f1cc: Change packages to all be versioned together for consistency.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [f43f1cc]
23
+ - @pluv/io@0.10.0
24
+ - @pluv/types@0.10.0
25
+
3
26
  ## 0.3.4
4
27
 
5
28
  ### Patch 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.3.4",
3
+ "version": "0.10.1",
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.15",
21
20
  "path-to-regexp": "^6.2.1",
22
- "@pluv/io": "^0.7.2",
23
- "@pluv/types": "^0.2.2"
21
+ "@pluv/io": "^0.10.1",
22
+ "@pluv/types": "^0.10.1"
24
23
  },
25
24
  "devDependencies": {
26
- "@cloudflare/workers-types": "^4.20230717.1",
27
- "tsup": "^7.1.0",
25
+ "@cloudflare/workers-types": "^4.20230814.0",
26
+ "eslint": "^8.47.0",
27
+ "tsup": "^7.2.0",
28
28
  "typescript": "^5.1.6",
29
- "@pluv/tsconfig": "^0.2.0",
30
- "eslint-config-pluv": "^0.1.14"
29
+ "@pluv/tsconfig": "^0.10.1",
30
+ "eslint-config-pluv": "^0.8.1"
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
  }