@pluv/platform-cloudflare 0.38.14 → 0.39.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,5 +1,5 @@
1
1
 
2
- > @pluv/platform-cloudflare@0.38.14 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@0.39.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
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 13.95 KB
12
- CJS ⚡️ Build success in 84ms
13
- ESM dist/index.mjs 12.82 KB
14
- ESM ⚡️ Build success in 86ms
11
+ ESM dist/index.mjs 12.83 KB
12
+ ESM ⚡️ Build success in 118ms
13
+ CJS dist/index.js 13.96 KB
14
+ CJS ⚡️ Build success in 131ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1223ms
17
- DTS dist/index.d.mts 6.63 KB
18
- DTS dist/index.d.ts 6.63 KB
16
+ DTS ⚡️ Build success in 1597ms
17
+ DTS dist/index.d.mts 6.64 KB
18
+ DTS dist/index.d.ts 6.64 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @pluv/platform-cloudflare
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 78a9c85: Update error codes for invalid websocket connection data to return a 1003 status code instead of 1011.
8
+ - Updated dependencies [fe6e239]
9
+ - Updated dependencies [737d508]
10
+ - @pluv/io@0.39.0
11
+ - @pluv/persistence-cloudflare-transactional-storage@0.39.0
12
+ - @pluv/types@0.39.0
13
+
3
14
  ## 0.38.14
4
15
 
5
16
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -12,7 +12,7 @@ declare class CloudflareWebSocket extends AbstractWebSocket<WebSocket> {
12
12
  addEventListener<TType extends keyof AbstractEventMap>(type: TType, handler: AbstractListener<TType>): void;
13
13
  close(code?: number | undefined, reason?: string | undefined): void;
14
14
  send(message: string | ArrayBuffer | ArrayBufferView): void;
15
- terminate(): void;
15
+ terminate(code?: number): void;
16
16
  }
17
17
 
18
18
  type CloudflarePlatformRoomContext<TEnv extends Record<string, any>, TMeta extends Record<string, Json>> = {
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare class CloudflareWebSocket extends AbstractWebSocket<WebSocket> {
12
12
  addEventListener<TType extends keyof AbstractEventMap>(type: TType, handler: AbstractListener<TType>): void;
13
13
  close(code?: number | undefined, reason?: string | undefined): void;
14
14
  send(message: string | ArrayBuffer | ArrayBufferView): void;
15
- terminate(): void;
15
+ terminate(code?: number): void;
16
16
  }
17
17
 
18
18
  type CloudflarePlatformRoomContext<TEnv extends Record<string, any>, TMeta extends Record<string, Json>> = {
package/dist/index.js CHANGED
@@ -257,8 +257,8 @@ var CloudflareWebSocket = class extends import_io.AbstractWebSocket {
257
257
  if (this.readyState !== this.OPEN) return;
258
258
  this.webSocket.send(message);
259
259
  }
260
- terminate() {
261
- return this.webSocket.close(1011, "Terminated");
260
+ terminate(code = 1011) {
261
+ return this.webSocket.close(code, "Terminated");
262
262
  }
263
263
  };
264
264
 
package/dist/index.mjs CHANGED
@@ -232,8 +232,8 @@ var CloudflareWebSocket = class extends AbstractWebSocket {
232
232
  if (this.readyState !== this.OPEN) return;
233
233
  this.webSocket.send(message);
234
234
  }
235
- terminate() {
236
- return this.webSocket.close(1011, "Terminated");
235
+ terminate(code = 1011) {
236
+ return this.webSocket.close(code, "Terminated");
237
237
  }
238
238
  };
239
239
 
@@ -0,0 +1,4 @@
1
+ import { config } from "eslint-config-pluv/base";
2
+
3
+ /** @type {import("eslint").Linter.Config} */
4
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-cloudflare",
3
- "version": "0.38.14",
3
+ "version": "0.39.0",
4
4
  "description": "@pluv/io adapter for cloudflare workers",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,22 +18,22 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "path-to-regexp": "^8.2.0",
21
- "@pluv/io": "^0.38.14",
22
- "@pluv/persistence-cloudflare-transactional-storage": "^0.38.14",
23
- "@pluv/types": "^0.38.14"
21
+ "@pluv/io": "^0.39.0",
22
+ "@pluv/persistence-cloudflare-transactional-storage": "^0.39.0",
23
+ "@pluv/types": "^0.39.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@cloudflare/workers-types": "^4.20250407.0",
27
- "eslint": "^8.57.1",
26
+ "@cloudflare/workers-types": "^4.20250414.0",
27
+ "eslint": "^9.24.0",
28
28
  "tsup": "^8.4.0",
29
29
  "typescript": "^5.8.3",
30
- "@pluv/tsconfig": "^0.38.14",
31
- "eslint-config-pluv": "^0.38.14"
30
+ "@pluv/tsconfig": "^0.39.0",
31
+ "eslint-config-pluv": "^0.39.0"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "tsup src/index.ts --format esm,cjs --dts",
35
35
  "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
36
- "lint": "eslint src/**/*.ts* --fix",
36
+ "lint": "eslint src/**/*.ts* --fix --max-warnings 0",
37
37
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
38
38
  }
39
39
  }
@@ -100,7 +100,7 @@ export class CloudflareWebSocket extends AbstractWebSocket<WebSocket> {
100
100
  this.webSocket.send(message);
101
101
  }
102
102
 
103
- public terminate(): void {
104
- return this.webSocket.close(1011, "Terminated");
103
+ public terminate(code: number = 1011): void {
104
+ return this.webSocket.close(code, "Terminated");
105
105
  }
106
106
  }
package/.eslintrc.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ["pluv"],
4
- };