@orpc/client 0.0.0-next.dda04c5 → 0.0.0-next.de7ca70
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.
|
@@ -29,7 +29,7 @@ type SupportedMessagePort = Pick<MessagePort, 'addEventListener' | 'postMessage'
|
|
|
29
29
|
/**
|
|
30
30
|
* Message port can support [The structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)
|
|
31
31
|
*/
|
|
32
|
-
type SupportedMessagePortData = string | ArrayBufferLike;
|
|
32
|
+
type SupportedMessagePortData = string | ArrayBufferLike | Uint8Array;
|
|
33
33
|
declare function postMessagePortMessage(port: SupportedMessagePort, data: SupportedMessagePortData): void;
|
|
34
34
|
declare function onMessagePortMessage(port: SupportedMessagePort, callback: (data: SupportedMessagePortData) => void): void;
|
|
35
35
|
declare function onMessagePortClose(port: SupportedMessagePort, callback: () => void): void;
|
|
@@ -29,7 +29,7 @@ type SupportedMessagePort = Pick<MessagePort, 'addEventListener' | 'postMessage'
|
|
|
29
29
|
/**
|
|
30
30
|
* Message port can support [The structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)
|
|
31
31
|
*/
|
|
32
|
-
type SupportedMessagePortData = string | ArrayBufferLike;
|
|
32
|
+
type SupportedMessagePortData = string | ArrayBufferLike | Uint8Array;
|
|
33
33
|
declare function postMessagePortMessage(port: SupportedMessagePort, data: SupportedMessagePortData): void;
|
|
34
34
|
declare function onMessagePortMessage(port: SupportedMessagePort, callback: (data: SupportedMessagePortData) => void): void;
|
|
35
35
|
declare function onMessagePortClose(port: SupportedMessagePort, callback: () => void): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { readAsBuffer } from '@orpc/shared';
|
|
1
2
|
import { ClientPeer } from '@orpc/standard-server-peer';
|
|
2
|
-
import '@orpc/shared';
|
|
3
3
|
import { c as StandardRPCLink } from '../../shared/client.DwfV9Oyl.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
5
|
import '../../shared/client.DHOfWE0c.mjs';
|
|
@@ -21,7 +21,7 @@ class experimental_LinkWebsocketClient {
|
|
|
21
21
|
return options.websocket.send(message);
|
|
22
22
|
});
|
|
23
23
|
options.websocket.addEventListener("message", async (event) => {
|
|
24
|
-
const message = event.data instanceof Blob ? await event.data
|
|
24
|
+
const message = event.data instanceof Blob ? await readAsBuffer(event.data) : event.data;
|
|
25
25
|
this.peer.message(message);
|
|
26
26
|
});
|
|
27
27
|
options.websocket.addEventListener("close", () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.de7ca70",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@orpc/
|
|
53
|
-
"@orpc/
|
|
54
|
-
"@orpc/standard-server-fetch": "0.0.0-next.
|
|
55
|
-
"@orpc/standard-server-peer": "0.0.0-next.
|
|
52
|
+
"@orpc/standard-server": "0.0.0-next.de7ca70",
|
|
53
|
+
"@orpc/shared": "0.0.0-next.de7ca70",
|
|
54
|
+
"@orpc/standard-server-fetch": "0.0.0-next.de7ca70",
|
|
55
|
+
"@orpc/standard-server-peer": "0.0.0-next.de7ca70"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"zod": "^3.25.
|
|
58
|
+
"zod": "^3.25.76"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "unbuild",
|