@orpc/client 2.0.0-beta.41 → 2.0.0-beta.42
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/plugins/index.mjs +3 -2
- package/package.json +5 -5
package/dist/plugins/index.mjs
CHANGED
|
@@ -180,6 +180,7 @@ class BatchLinkPlugin {
|
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
isBatchSent = true;
|
|
183
|
+
const outgoingMessages = pendingMessages.filter((message) => openRequestIds.has(message.id));
|
|
183
184
|
try {
|
|
184
185
|
const request = {
|
|
185
186
|
url,
|
|
@@ -189,7 +190,7 @@ class BatchLinkPlugin {
|
|
|
189
190
|
};
|
|
190
191
|
if (method === "GET") {
|
|
191
192
|
const [pathname, search, hash] = parseStandardUrl(url);
|
|
192
|
-
const dataParam = `data=${safeEncodeURIComponent(stringifyJSON(
|
|
193
|
+
const dataParam = `data=${safeEncodeURIComponent(stringifyJSON(outgoingMessages))}`;
|
|
193
194
|
const newUrl = search ? `${pathname}${search}&${dataParam}${hash ?? ""}` : `${pathname}?${dataParam}${hash ?? ""}`;
|
|
194
195
|
const maxUrlLength = await value(this.maxUrlLength, subOptionsList);
|
|
195
196
|
if (newUrl.length > maxUrlLength) {
|
|
@@ -204,7 +205,7 @@ class BatchLinkPlugin {
|
|
|
204
205
|
}
|
|
205
206
|
request.url = newUrl;
|
|
206
207
|
} else {
|
|
207
|
-
request.body =
|
|
208
|
+
request.body = outgoingMessages;
|
|
208
209
|
}
|
|
209
210
|
batchResponse = await groupItems[0][0].next({
|
|
210
211
|
...subOptionsList[0],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.42",
|
|
5
5
|
"description": "Consume oRPC and OpenAPI APIs with end-to-end type safety over HTTP, WebSocket, or message ports",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"dist"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@orpc/shared": "2.0.0-beta.
|
|
67
|
-
"@standard-server/core": "~0.10.
|
|
68
|
-
"@standard-server/fetch": "~0.10.
|
|
69
|
-
"@standard-server/peer": "~0.10.
|
|
66
|
+
"@orpc/shared": "2.0.0-beta.42",
|
|
67
|
+
"@standard-server/core": "~0.10.1",
|
|
68
|
+
"@standard-server/fetch": "~0.10.1",
|
|
69
|
+
"@standard-server/peer": "~0.10.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/ws": "^8.18.1",
|