@orpc/client 1.15.2 → 1.15.4
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/fetch/index.mjs +2 -2
- package/dist/adapters/message-port/index.mjs +2 -2
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/adapters/websocket/index.mjs +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/{client.BKdRDdCe.mjs → client.BrcgsQH9.mjs} +14 -5
- package/dist/shared/{client.t2tsjbV-.mjs → client.DS9vjH_1.mjs} +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toArray, intercept } from '@orpc/shared';
|
|
2
2
|
import { toFetchRequest, toStandardLazyResponse } from '@orpc/standard-server-fetch';
|
|
3
|
-
import { C as CompositeStandardLinkPlugin, c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { C as CompositeStandardLinkPlugin, c as StandardRPCLink } from '../../shared/client.BrcgsQH9.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.DS9vjH_1.mjs';
|
|
6
6
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
7
7
|
|
|
8
8
|
class CompositeLinkFetchPlugin extends CompositeStandardLinkPlugin {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { value, isObject } from '@orpc/shared';
|
|
2
2
|
import { experimental_ClientPeerWithoutCodec, serializeRequestMessage, encodeRequestMessage, deserializeResponseMessage, decodeResponseMessage } from '@orpc/standard-server-peer';
|
|
3
|
-
import { c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { c as StandardRPCLink } from '../../shared/client.BrcgsQH9.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.DS9vjH_1.mjs';
|
|
6
6
|
import '@orpc/standard-server-fetch';
|
|
7
7
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CompositeStandardLinkPlugin, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLink, d as StandardRPCLinkCodec, e as StandardRPCSerializer, g as getMalformedResponseErrorCode, t as toHttpPath, f as toStandardHeaders } from '../../shared/client.
|
|
1
|
+
export { C as CompositeStandardLinkPlugin, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLink, d as StandardRPCLinkCodec, e as StandardRPCSerializer, g as getMalformedResponseErrorCode, t as toHttpPath, f as toStandardHeaders } from '../../shared/client.BrcgsQH9.mjs';
|
|
2
2
|
import '@orpc/shared';
|
|
3
3
|
import '@orpc/standard-server';
|
|
4
|
-
import '../../shared/client.
|
|
4
|
+
import '../../shared/client.DS9vjH_1.mjs';
|
|
5
5
|
import '@orpc/standard-server-fetch';
|
|
6
6
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readAsBuffer } from '@orpc/shared';
|
|
2
2
|
import { ClientPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import { c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { c as StandardRPCLink } from '../../shared/client.BrcgsQH9.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.DS9vjH_1.mjs';
|
|
6
6
|
import '@orpc/standard-server-fetch';
|
|
7
7
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
8
8
|
|
package/dist/index.d.mts
CHANGED
|
@@ -207,7 +207,7 @@ type SafeClient<T extends NestedClient<any>> = T extends Client<infer UContext,
|
|
|
207
207
|
declare function createSafeClient<T extends NestedClient<any>>(client: T): SafeClient<T>;
|
|
208
208
|
|
|
209
209
|
declare const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
210
|
-
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.15.
|
|
210
|
+
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.15.4";
|
|
211
211
|
/**
|
|
212
212
|
* Property names that should resolve to the underlying value instead of
|
|
213
213
|
* continuing recursive proxy traversal.
|
package/dist/index.d.ts
CHANGED
|
@@ -207,7 +207,7 @@ type SafeClient<T extends NestedClient<any>> = T extends Client<infer UContext,
|
|
|
207
207
|
declare function createSafeClient<T extends NestedClient<any>>(client: T): SafeClient<T>;
|
|
208
208
|
|
|
209
209
|
declare const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
210
|
-
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.15.
|
|
210
|
+
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.15.4";
|
|
211
211
|
/**
|
|
212
212
|
* Property names that should resolve to the underlying value instead of
|
|
213
213
|
* continuing recursive proxy traversal.
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { preventNativeAwait, isTypescriptObject } from '@orpc/shared';
|
|
2
2
|
export { AsyncIteratorClass, EventPublisher, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
3
|
-
import { i as isDefinedError, R as RECURSIVE_CLIENT_UNWRAP_KEYS } from './shared/client.
|
|
4
|
-
export { C as COMMON_ORPC_ERROR_DEFS, c as ORPCError, O as ORPC_CLIENT_PACKAGE_NAME, a as ORPC_CLIENT_PACKAGE_VERSION, g as createORPCErrorFromJson, b as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, e as isORPCErrorJson, d as isORPCErrorStatus, t as toORPCError } from './shared/client.
|
|
3
|
+
import { i as isDefinedError, R as RECURSIVE_CLIENT_UNWRAP_KEYS } from './shared/client.DS9vjH_1.mjs';
|
|
4
|
+
export { C as COMMON_ORPC_ERROR_DEFS, c as ORPCError, O as ORPC_CLIENT_PACKAGE_NAME, a as ORPC_CLIENT_PACKAGE_VERSION, g as createORPCErrorFromJson, b as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, e as isORPCErrorJson, d as isORPCErrorStatus, t as toORPCError } from './shared/client.DS9vjH_1.mjs';
|
|
5
5
|
export { m as mapEventIterator } from './shared/client.BLtwTQUg.mjs';
|
|
6
6
|
export { ErrorEvent, getEventMeta, withEventMeta } from '@orpc/standard-server';
|
|
7
7
|
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAsyncIteratorObject, defer, value, splitInHalf, toArray, stringifyJSON, overlayProxy, AsyncIteratorClass } from '@orpc/shared';
|
|
2
2
|
import { toBatchRequest, parseBatchResponse, toBatchAbortSignal } from '@orpc/standard-server/batch';
|
|
3
3
|
import { replicateStandardLazyResponse, getEventMeta, flattenHeader } from '@orpc/standard-server';
|
|
4
|
-
import { C as COMMON_ORPC_ERROR_DEFS } from '../shared/client.
|
|
4
|
+
import { C as COMMON_ORPC_ERROR_DEFS } from '../shared/client.DS9vjH_1.mjs';
|
|
5
5
|
|
|
6
6
|
class BatchLinkPlugin {
|
|
7
7
|
groups;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toArray, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, intercept, getGlobalOtelConfig, isObject, isValidRegExpFlags, createLazyRegExp, value, stringifyJSON } from '@orpc/shared';
|
|
1
|
+
import { toArray, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, intercept, getGlobalOtelConfig, isObject, copyOnWrite, isValidRegExpFlags, createLazyRegExp, value, stringifyJSON } from '@orpc/shared';
|
|
2
2
|
import { mergeStandardHeaders, ErrorEvent } from '@orpc/standard-server';
|
|
3
|
-
import { C as COMMON_ORPC_ERROR_DEFS, d as isORPCErrorStatus, e as isORPCErrorJson, g as createORPCErrorFromJson, c as ORPCError, t as toORPCError } from './client.
|
|
3
|
+
import { C as COMMON_ORPC_ERROR_DEFS, d as isORPCErrorStatus, e as isORPCErrorJson, g as createORPCErrorFromJson, c as ORPCError, t as toORPCError } from './client.DS9vjH_1.mjs';
|
|
4
4
|
import { toStandardHeaders as toStandardHeaders$1 } from '@orpc/standard-server-fetch';
|
|
5
5
|
import { m as mapEventIterator } from './client.BLtwTQUg.mjs';
|
|
6
6
|
|
|
@@ -173,18 +173,25 @@ class StandardRPCJsonSerializer {
|
|
|
173
173
|
}
|
|
174
174
|
deserialize(json, meta, maps, getBlob) {
|
|
175
175
|
const ref = { data: json };
|
|
176
|
+
const input = { data: json };
|
|
176
177
|
if (maps && getBlob) {
|
|
177
178
|
maps.forEach((segments, i) => {
|
|
179
|
+
const blob = getBlob(i);
|
|
180
|
+
if (!(blob instanceof Blob)) {
|
|
181
|
+
throw invalidSerializedData(`blob ${i} is not a Blob.`);
|
|
182
|
+
}
|
|
183
|
+
let original = input;
|
|
178
184
|
let currentRef = ref;
|
|
179
185
|
let preSegment = "data";
|
|
180
186
|
segments.forEach((segment) => {
|
|
181
|
-
|
|
187
|
+
original = original[preSegment];
|
|
188
|
+
currentRef = copyOnWrite(currentRef, preSegment, original);
|
|
182
189
|
preSegment = segment;
|
|
183
190
|
if (!Object.hasOwn(currentRef, preSegment)) {
|
|
184
191
|
throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
|
|
185
192
|
}
|
|
186
193
|
});
|
|
187
|
-
currentRef[preSegment] =
|
|
194
|
+
currentRef[preSegment] = blob;
|
|
188
195
|
});
|
|
189
196
|
}
|
|
190
197
|
for (const item of meta) {
|
|
@@ -193,10 +200,12 @@ class StandardRPCJsonSerializer {
|
|
|
193
200
|
if (custom === void 0 && !BUILT_IN_TYPES.has(type)) {
|
|
194
201
|
continue;
|
|
195
202
|
}
|
|
203
|
+
let original = input;
|
|
196
204
|
let currentRef = ref;
|
|
197
205
|
let preSegment = "data";
|
|
198
206
|
for (let i = 1; i < item.length; i++) {
|
|
199
|
-
|
|
207
|
+
original = original[preSegment];
|
|
208
|
+
currentRef = copyOnWrite(currentRef, preSegment, original);
|
|
200
209
|
preSegment = item[i];
|
|
201
210
|
if (!Object.hasOwn(currentRef, preSegment)) {
|
|
202
211
|
throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions, getConstructor, isObject } from '@orpc/shared';
|
|
2
2
|
|
|
3
3
|
const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
4
|
-
const ORPC_CLIENT_PACKAGE_VERSION = "1.15.
|
|
4
|
+
const ORPC_CLIENT_PACKAGE_VERSION = "1.15.4";
|
|
5
5
|
const RECURSIVE_CLIENT_UNWRAP_KEYS = /* @__PURE__ */ new Set([
|
|
6
6
|
/**
|
|
7
7
|
* Commonly used by libraries to bind functions to a specific `this`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@orpc/shared": "1.15.
|
|
53
|
-
"@orpc/standard-server": "1.15.
|
|
54
|
-
"@orpc/standard-server
|
|
55
|
-
"@orpc/standard-server-peer": "1.15.
|
|
52
|
+
"@orpc/shared": "1.15.4",
|
|
53
|
+
"@orpc/standard-server-fetch": "1.15.4",
|
|
54
|
+
"@orpc/standard-server": "1.15.4",
|
|
55
|
+
"@orpc/standard-server-peer": "1.15.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"zod": "^4.6.2"
|