@orpc/client 0.0.0-next.68378b4 → 0.0.0-next.69674a7
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/standard/index.mjs +2 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/{client.BMw2gtvr.mjs → client.Df5pd75N.mjs} +1 -1
- package/dist/shared/{client.DcaJQZfy.mjs → client.XAn8cDTM.mjs} +2 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toFetchRequest, toStandardLazyResponse } from '@orpc/standard-server-fetch';
|
|
2
|
-
import { a as StandardRPCLinkCodec, b as RPCSerializer, S as StandardLink } from '../../shared/client.
|
|
2
|
+
import { a as StandardRPCLinkCodec, b as RPCSerializer, S as StandardLink } from '../../shared/client.Df5pd75N.mjs';
|
|
3
3
|
import '@orpc/shared';
|
|
4
|
-
import '../../shared/client.
|
|
4
|
+
import '../../shared/client.XAn8cDTM.mjs';
|
|
5
5
|
import '@orpc/standard-server';
|
|
6
6
|
|
|
7
7
|
class LinkFetchClient {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as InvalidEventIteratorRetryResponse, R as RPCJsonSerializer, b as RPCSerializer, S as StandardLink, a as StandardRPCLinkCodec } from '../../shared/client.
|
|
1
|
+
export { I as InvalidEventIteratorRetryResponse, R as RPCJsonSerializer, b as RPCSerializer, S as StandardLink, a as StandardRPCLinkCodec } from '../../shared/client.Df5pd75N.mjs';
|
|
2
2
|
import '@orpc/shared';
|
|
3
|
-
import '../../shared/client.
|
|
3
|
+
import '../../shared/client.XAn8cDTM.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
package/dist/index.d.mts
CHANGED
|
@@ -133,7 +133,9 @@ interface EventIteratorState {
|
|
|
133
133
|
}
|
|
134
134
|
declare function registerEventIteratorState(iterator: AsyncIteratorObject<unknown, unknown, void>, state: EventIteratorState): void;
|
|
135
135
|
declare function updateEventIteratorStatus(state: EventIteratorState, status: ConnectionStatus): void;
|
|
136
|
-
declare function onEventIteratorStatusChange(iterator: AsyncIteratorObject<unknown, unknown, void>, callback: (status: ConnectionStatus) => void,
|
|
136
|
+
declare function onEventIteratorStatusChange(iterator: AsyncIteratorObject<unknown, unknown, void>, callback: (status: ConnectionStatus) => void, options?: {
|
|
137
|
+
notifyImmediately?: boolean;
|
|
138
|
+
}): () => void;
|
|
137
139
|
|
|
138
140
|
type SafeResult<TOutput, TError extends Error> = [error: null, data: TOutput, isDefined: false] & {
|
|
139
141
|
error: null;
|
package/dist/index.d.ts
CHANGED
|
@@ -133,7 +133,9 @@ interface EventIteratorState {
|
|
|
133
133
|
}
|
|
134
134
|
declare function registerEventIteratorState(iterator: AsyncIteratorObject<unknown, unknown, void>, state: EventIteratorState): void;
|
|
135
135
|
declare function updateEventIteratorStatus(state: EventIteratorState, status: ConnectionStatus): void;
|
|
136
|
-
declare function onEventIteratorStatusChange(iterator: AsyncIteratorObject<unknown, unknown, void>, callback: (status: ConnectionStatus) => void,
|
|
136
|
+
declare function onEventIteratorStatusChange(iterator: AsyncIteratorObject<unknown, unknown, void>, callback: (status: ConnectionStatus) => void, options?: {
|
|
137
|
+
notifyImmediately?: boolean;
|
|
138
|
+
}): () => void;
|
|
137
139
|
|
|
138
140
|
type SafeResult<TOutput, TError extends Error> = [error: null, data: TOutput, isDefined: false] & {
|
|
139
141
|
error: null;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isDefinedError } from './shared/client.
|
|
2
|
-
export { C as COMMON_ORPC_ERROR_DEFS, O as ORPCError, c as createAutoRetryEventIterator, a as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, m as mapEventIterator, o as onEventIteratorStatusChange, r as registerEventIteratorState, t as toORPCError, u as updateEventIteratorStatus } from './shared/client.
|
|
1
|
+
import { i as isDefinedError } from './shared/client.XAn8cDTM.mjs';
|
|
2
|
+
export { C as COMMON_ORPC_ERROR_DEFS, O as ORPCError, c as createAutoRetryEventIterator, a as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, m as mapEventIterator, o as onEventIteratorStatusChange, r as registerEventIteratorState, t as toORPCError, u as updateEventIteratorStatus } from './shared/client.XAn8cDTM.mjs';
|
|
3
3
|
export { ErrorEvent } from '@orpc/standard-server';
|
|
4
4
|
import '@orpc/shared';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { intercept, isAsyncIteratorObject, value, isObject, trim, stringifyJSON } from '@orpc/shared';
|
|
2
|
-
import { c as createAutoRetryEventIterator, O as ORPCError, m as mapEventIterator, t as toORPCError } from './client.
|
|
2
|
+
import { c as createAutoRetryEventIterator, O as ORPCError, m as mapEventIterator, t as toORPCError } from './client.XAn8cDTM.mjs';
|
|
3
3
|
import { ErrorEvent } from '@orpc/standard-server';
|
|
4
4
|
|
|
5
5
|
class InvalidEventIteratorRetryResponse extends Error {
|
|
@@ -147,7 +147,8 @@ function updateEventIteratorStatus(state, status) {
|
|
|
147
147
|
state.listeners.forEach((cb) => cb(status));
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
function onEventIteratorStatusChange(iterator, callback,
|
|
150
|
+
function onEventIteratorStatusChange(iterator, callback, options = {}) {
|
|
151
|
+
const notifyImmediately = options.notifyImmediately ?? true;
|
|
151
152
|
const state = iteratorStates.get(iterator);
|
|
152
153
|
if (!state) {
|
|
153
154
|
throw new Error("Iterator is not registered.");
|
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.69674a7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@orpc/shared": "0.0.0-next.
|
|
38
|
-
"@orpc/standard-server": "0.0.0-next.
|
|
39
|
-
"@orpc/standard-server-fetch": "0.0.0-next.
|
|
37
|
+
"@orpc/shared": "0.0.0-next.69674a7",
|
|
38
|
+
"@orpc/standard-server": "0.0.0-next.69674a7",
|
|
39
|
+
"@orpc/standard-server-fetch": "0.0.0-next.69674a7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"zod": "^3.24.
|
|
42
|
+
"zod": "^3.24.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "unbuild",
|