crossws 0.3.2 → 0.3.3
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/dist/adapters/bun.mjs +1 -1
- package/dist/adapters/cloudflare-durable.mjs +1 -1
- package/dist/adapters/cloudflare.mjs +1 -1
- package/dist/adapters/deno.mjs +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/adapters/sse.mjs +1 -1
- package/dist/adapters/uws.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{crossws.BcEs6ZHK.mjs → crossws.CB4awDDj.mjs} +6 -2
- package/package.json +11 -11
package/dist/adapters/bun.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import 'uncrypto';
|
|
4
4
|
|
|
5
5
|
const bun = defineWebSocketAdapter(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import 'uncrypto';
|
|
4
4
|
|
|
5
5
|
const cloudflareDurable = defineWebSocketAdapter((opts) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import { W as WSError } from '../shared/crossws.By9qWDAI.mjs';
|
|
4
4
|
import 'uncrypto';
|
|
5
5
|
|
package/dist/adapters/deno.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import { W as WSError } from '../shared/crossws.By9qWDAI.mjs';
|
|
4
4
|
import 'uncrypto';
|
|
5
5
|
|
package/dist/adapters/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import { W as WSError } from '../shared/crossws.By9qWDAI.mjs';
|
|
4
4
|
import 'stream';
|
|
5
5
|
import { _ as _WebSocketServer } from '../shared/crossws.DelSCW9g.mjs';
|
package/dist/adapters/sse.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, a as toString } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import 'uncrypto';
|
|
4
4
|
|
|
5
5
|
const sse = defineWebSocketAdapter((opts = {}) => {
|
package/dist/adapters/uws.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Message, P as Peer, t as toBufferLike } from '../shared/crossws.DLRVRjZs.mjs';
|
|
2
|
-
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.
|
|
2
|
+
import { d as defineWebSocketAdapter, a as adapterUtils, A as AdapterHookable } from '../shared/crossws.CB4awDDj.mjs';
|
|
3
3
|
import 'uncrypto';
|
|
4
4
|
|
|
5
5
|
const uws = defineWebSocketAdapter(
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as defineHooks, d as defineWebSocketAdapter } from './shared/crossws.
|
|
1
|
+
export { b as defineHooks, d as defineWebSocketAdapter } from './shared/crossws.CB4awDDj.mjs';
|
|
@@ -38,8 +38,12 @@ class AdapterHookable {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
} catch (error) {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const errResponse = error.response || error;
|
|
42
|
+
if (errResponse instanceof Response) {
|
|
43
|
+
return {
|
|
44
|
+
context,
|
|
45
|
+
endResponse: errResponse
|
|
46
|
+
};
|
|
43
47
|
}
|
|
44
48
|
throw error;
|
|
45
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crossws",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Cross-platform WebSocket Servers for Node.js, Deno, Bun and Cloudflare Workers",
|
|
5
5
|
"repository": "unjs/crossws",
|
|
6
6
|
"license": "MIT",
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
"uncrypto": "^0.1.3"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@cloudflare/workers-types": "^4.
|
|
91
|
-
"@types/bun": "^1.
|
|
90
|
+
"@cloudflare/workers-types": "^4.20250124.3",
|
|
91
|
+
"@types/bun": "^1.2.0",
|
|
92
92
|
"@types/deno": "^2.0.0",
|
|
93
93
|
"@types/eventsource": "^1.1.15",
|
|
94
|
-
"@types/node": "^22.10.
|
|
95
|
-
"@types/web": "^0.0.
|
|
96
|
-
"@types/ws": "^8.5.
|
|
97
|
-
"@vitest/coverage-v8": "^3.0.
|
|
94
|
+
"@types/node": "^22.10.10",
|
|
95
|
+
"@types/web": "^0.0.198",
|
|
96
|
+
"@types/ws": "^8.5.14",
|
|
97
|
+
"@vitest/coverage-v8": "^3.0.4",
|
|
98
98
|
"automd": "^0.3.12",
|
|
99
99
|
"changelogen": "^0.5.7",
|
|
100
100
|
"consola": "^3.4.0",
|
|
@@ -103,16 +103,16 @@
|
|
|
103
103
|
"eventsource": "^3.0.2",
|
|
104
104
|
"execa": "^9.5.2",
|
|
105
105
|
"get-port-please": "^3.1.2",
|
|
106
|
-
"h3": "^1.
|
|
106
|
+
"h3": "^1.14.0",
|
|
107
107
|
"jiti": "^2.4.2",
|
|
108
108
|
"listhen": "^1.9.0",
|
|
109
109
|
"prettier": "^3.4.2",
|
|
110
110
|
"typescript": "^5.7.3",
|
|
111
111
|
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.44.0",
|
|
112
112
|
"unbuild": "^3.3.1",
|
|
113
|
-
"undici": "^7.
|
|
114
|
-
"vitest": "^3.0.
|
|
115
|
-
"wrangler": "^3.
|
|
113
|
+
"undici": "^7.3.0",
|
|
114
|
+
"vitest": "^3.0.4",
|
|
115
|
+
"wrangler": "^3.105.1",
|
|
116
116
|
"ws": "^8.18.0"
|
|
117
117
|
},
|
|
118
118
|
"packageManager": "pnpm@9.15.4"
|