@orpc/client 0.0.0-next.25e937d → 0.0.0-next.28aa60a

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
  import { toFetchRequest, toStandardLazyResponse } from '@orpc/standard-server-fetch';
2
- import { b as StandardRPCJsonSerializer, c as StandardRPCLinkCodec, d as StandardRPCSerializer, S as StandardLink } from '../../shared/client.Be-O_tdu.mjs';
2
+ import { b as StandardRPCJsonSerializer, c as StandardRPCLinkCodec, d as StandardRPCSerializer, S as StandardLink } from '../../shared/client.CjUckqXO.mjs';
3
3
  import '@orpc/shared';
4
4
  import '../../shared/client.CvnV7_uV.mjs';
5
5
  import '@orpc/standard-server';
@@ -37,7 +37,7 @@ declare class StandardRPCSerializer {
37
37
  #private;
38
38
  private readonly jsonSerializer;
39
39
  constructor(jsonSerializer: StandardRPCJsonSerializer);
40
- serialize(data: unknown): object;
40
+ serialize(data: unknown): unknown;
41
41
  deserialize(data: unknown): unknown;
42
42
  }
43
43
 
@@ -37,7 +37,7 @@ declare class StandardRPCSerializer {
37
37
  #private;
38
38
  private readonly jsonSerializer;
39
39
  constructor(jsonSerializer: StandardRPCJsonSerializer);
40
- serialize(data: unknown): object;
40
+ serialize(data: unknown): unknown;
41
41
  deserialize(data: unknown): unknown;
42
42
  }
43
43
 
@@ -1,4 +1,4 @@
1
- export { I as InvalidEventIteratorRetryResponse, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLinkCodec, d as StandardRPCSerializer } from '../../shared/client.Be-O_tdu.mjs';
1
+ export { I as InvalidEventIteratorRetryResponse, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLinkCodec, d as StandardRPCSerializer } from '../../shared/client.CjUckqXO.mjs';
2
2
  import '@orpc/shared';
3
3
  import '../../shared/client.CvnV7_uV.mjs';
4
4
  import '@orpc/standard-server';
@@ -206,10 +206,10 @@ class StandardRPCLinkCodec {
206
206
  }
207
207
  }
208
208
  const serialized = this.serializer.serialize(input);
209
- if (expectedMethod === "GET" && !(serialized instanceof FormData) && !isAsyncIteratorObject(serialized)) {
209
+ if (expectedMethod === "GET" && !(serialized instanceof FormData) && !(serialized instanceof Blob) && !isAsyncIteratorObject(serialized)) {
210
210
  const maxUrlLength = await value(this.maxUrlLength, options, path, input);
211
211
  const getUrl = new URL(url);
212
- getUrl.searchParams.append("data", stringifyJSON(serialized));
212
+ getUrl.searchParams.append("data", stringifyJSON(serialized) ?? "");
213
213
  if (getUrl.toString().length <= maxUrlLength) {
214
214
  return {
215
215
  body: void 0,
@@ -278,6 +278,9 @@ class StandardRPCSerializer {
278
278
  return this.#serialize(data, true);
279
279
  }
280
280
  #serialize(data, enableFormData) {
281
+ if (data === void 0 || data instanceof Blob) {
282
+ return data;
283
+ }
281
284
  const [json, meta_, maps, blobs] = this.jsonSerializer.serialize(data);
282
285
  const meta = meta_.length === 0 ? void 0 : meta_;
283
286
  if (!enableFormData || blobs.length === 0) {
@@ -315,6 +318,9 @@ class StandardRPCSerializer {
315
318
  return this.#deserialize(data);
316
319
  }
317
320
  #deserialize(data) {
321
+ if (data === void 0 || data instanceof Blob) {
322
+ return data;
323
+ }
318
324
  if (!(data instanceof FormData)) {
319
325
  return this.jsonSerializer.deserialize(data.json, data.meta ?? []);
320
326
  }
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.25e937d",
4
+ "version": "0.0.0-next.28aa60a",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -39,9 +39,9 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@orpc/standard-server": "0.0.0-next.25e937d",
43
- "@orpc/standard-server-fetch": "0.0.0-next.25e937d",
44
- "@orpc/shared": "0.0.0-next.25e937d"
42
+ "@orpc/shared": "0.0.0-next.28aa60a",
43
+ "@orpc/standard-server": "0.0.0-next.28aa60a",
44
+ "@orpc/standard-server-fetch": "0.0.0-next.28aa60a"
45
45
  },
46
46
  "devDependencies": {
47
47
  "zod": "^3.24.2"