@pluv/platform-cloudflare 0.14.1 → 0.16.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,18 +1,18 @@
1
1
 
2
- > @pluv/platform-cloudflare@0.14.1 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@0.16.0 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 v8.0.1
7
+ CLI tsup v8.0.2
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 5.80 KB
12
- ESM ⚡️ Build success in 56ms
13
11
  CJS dist/index.js 6.93 KB
14
- CJS ⚡️ Build success in 56ms
12
+ CJS ⚡️ Build success in 107ms
13
+ ESM dist/index.mjs 5.80 KB
14
+ ESM ⚡️ Build success in 107ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4022ms
16
+ DTS ⚡️ Build success in 3453ms
17
17
  DTS dist/index.d.mts 2.94 KB
18
18
  DTS dist/index.d.ts 2.94 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @pluv/platform-cloudflare
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4280220]
8
+ - @pluv/io@0.16.0
9
+ - @pluv/types@0.16.0
10
+
11
+ ## 0.15.0
12
+
13
+ ### Patch Changes
14
+
15
+ - @pluv/io@0.15.0
16
+ - @pluv/types@0.15.0
17
+
3
18
  ## 0.14.1
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
  <br />
6
6
  <img src="https://github.com/pluv-io/pluv/blob/master/assets/pluv-icon-192x192.png?raw=true" alt="Pluv.IO" width="180" style="border-radius:16px" />
7
7
  <br />
8
- Pluv.IO (preview)
8
+ <a href="https://pluv.io/docs/introduction">Pluv.IO (preview)</a>
9
9
  <br />
10
10
  </h1>
11
11
 
12
12
  <h3 align="center">Multi-platform, E2E type-safe realtime packages</h3>
13
- <h4 align="center">💕 Inspired by <a href="https://trpc.io">trpc</a> 💕 Built with <a href="https://docs.yjs.dev/">yjs</a> 💕</h4>
13
+ <h4 align="center">💕 Inspired by <a href="https://trpc.io">trpc</a> 💕 <a href="https://docs.yjs.dev/">yjs</a> 💕 and <a href="https://developers.cloudflare.com/">Cloudflare</a> 💕 </h4>
14
14
 
15
15
  <p align="center">
16
16
  <a href="https://www.npmjs.com/package/@pluv/platform-cloudflare">
@@ -19,14 +19,10 @@
19
19
  <a href="https://github.com/pluv-io/pluv/blob/master/LICENSE">
20
20
  <img alt="GitHub" src="https://img.shields.io/github/license/pluv-io/pluv" alt="License MIT" />
21
21
  </a>
22
- <img src="https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555" alt="TypeScript" />
23
22
  <a href="https://commitizen.github.io/cz-cli/">
24
23
  <img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" />
25
24
  </a>
26
- </p>
27
-
28
- <p align="center">
29
- <img src="https://github.com/pluv-io/pluv/blob/master/assets/demo-events.gif?raw=true" alt="Demo" />
25
+ <img src="https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555" alt="TypeScript" />
30
26
  </p>
31
27
 
32
28
  ## `@pluv/platform-cloudflare`
package/dist/index.js CHANGED
@@ -165,14 +165,14 @@ var import_io2 = require("@pluv/io");
165
165
  // src/CloudflareWebSocket.ts
166
166
  var import_io = require("@pluv/io");
167
167
  var CloudflareWebSocket = class extends import_io.AbstractWebSocket {
168
+ get readyState() {
169
+ return this.webSocket.readyState;
170
+ }
168
171
  constructor(webSocket, config) {
169
172
  const { room, sessionId, userId } = config;
170
173
  super({ room, sessionId, userId });
171
174
  this.webSocket = webSocket;
172
175
  }
173
- get readyState() {
174
- return this.webSocket.readyState;
175
- }
176
176
  addEventListener(type, handler) {
177
177
  this.webSocket.addEventListener(type, handler);
178
178
  }
package/dist/index.mjs CHANGED
@@ -141,14 +141,14 @@ import {
141
141
  AbstractWebSocket
142
142
  } from "@pluv/io";
143
143
  var CloudflareWebSocket = class extends AbstractWebSocket {
144
+ get readyState() {
145
+ return this.webSocket.readyState;
146
+ }
144
147
  constructor(webSocket, config) {
145
148
  const { room, sessionId, userId } = config;
146
149
  super({ room, sessionId, userId });
147
150
  this.webSocket = webSocket;
148
151
  }
149
- get readyState() {
150
- return this.webSocket.readyState;
151
- }
152
152
  addEventListener(type, handler) {
153
153
  this.webSocket.addEventListener(type, handler);
154
154
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-cloudflare",
3
- "version": "0.14.1",
3
+ "version": "0.16.0",
4
4
  "description": "@pluv/io adapter for cloudflare workers",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,16 +18,16 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "path-to-regexp": "^6.2.1",
21
- "@pluv/io": "^0.14.1",
22
- "@pluv/types": "^0.14.1"
21
+ "@pluv/io": "^0.16.0",
22
+ "@pluv/types": "^0.16.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudflare/workers-types": "^4.20231121.0",
25
+ "@cloudflare/workers-types": "^4.20240208.0",
26
26
  "eslint": "^8.56.0",
27
- "tsup": "^8.0.1",
28
- "typescript": "^5.2.2",
29
- "@pluv/tsconfig": "^0.14.1",
30
- "eslint-config-pluv": "^0.14.1"
27
+ "tsup": "^8.0.2",
28
+ "typescript": "^5.3.3",
29
+ "@pluv/tsconfig": "^0.16.0",
30
+ "eslint-config-pluv": "^0.16.0"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -51,17 +51,18 @@ export interface CreatePluvHandlerResult<
51
51
 
52
52
  type InferCloudflarePluvHandlerEnv<
53
53
  TPluv extends PluvIO<CloudflarePlatform, any, any, any, any, any, any>,
54
- > = TPluv extends PluvIO<
55
- CloudflarePlatform<infer IEnv>,
56
- any,
57
- any,
58
- any,
59
- any,
60
- any,
61
- any
62
- >
63
- ? IEnv
64
- : {};
54
+ > =
55
+ TPluv extends PluvIO<
56
+ CloudflarePlatform<infer IEnv>,
57
+ any,
58
+ any,
59
+ any,
60
+ any,
61
+ any,
62
+ any
63
+ >
64
+ ? IEnv
65
+ : {};
65
66
 
66
67
  export const createPluvHandler = <
67
68
  TPluv extends PluvIO<CloudflarePlatform, any, any, any, any, any, any>,