@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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +19 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
- package/src/CloudflarePlatform.ts +2 -2
- package/src/CloudflareWebSocket.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-cloudflare@0.10.
|
|
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
|
[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[32m5.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m6.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m5.80 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 111ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m6.93 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 114ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6690ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.92 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.92 KB[39m
|
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:
|
|
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:
|
|
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.
|
|
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.
|
|
23
|
-
"@pluv/types": "^0.10.
|
|
21
|
+
"@pluv/io": "^0.10.2",
|
|
22
|
+
"@pluv/types": "^0.10.2"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
|
-
"@cloudflare/workers-types": "^4.
|
|
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.
|
|
30
|
-
"eslint-config-pluv": "^0.2
|
|
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 {
|
|
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:
|
|
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
|
}
|