@orpc/client 0.0.0-next.c0088c7 → 0.0.0-next.c0afbea
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/README.md +3 -1
- 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 +4 -4
package/README.md
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
- **Contract-First Development 📜**: (Optional) Define your API contract upfront and implement it with confidence.
|
33
33
|
- **Exceptional Developer Experience ✨**: Enjoy a streamlined workflow with robust typing and clear, in-code documentation.
|
34
34
|
- **Multi-Runtime Support 🌍**: Run your code seamlessly on Cloudflare, Deno, Bun, Node.js, and more.
|
35
|
-
- **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue), Pinia Colada, and more.
|
35
|
+
- **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
|
36
36
|
- **Server Actions ⚡️**: Fully compatible with React Server Actions on Next.js, TanStack Start, and more.
|
37
37
|
- **Standard Schema Support 🗂️**: Effortlessly work with Zod, Valibot, ArkType, and others right out of the box.
|
38
38
|
- **Fast & Lightweight 💨**: Built on native APIs across all runtimes – optimized for speed and efficiency.
|
@@ -55,6 +55,8 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
55
55
|
- [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
|
56
56
|
- [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
|
57
57
|
- [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
|
58
|
+
- [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
|
59
|
+
- [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
|
58
60
|
- [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
|
59
61
|
- [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
|
60
62
|
- [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
|
@@ -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.c0afbea",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -34,9 +34,9 @@
|
|
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.c0afbea",
|
38
|
+
"@orpc/standard-server": "0.0.0-next.c0afbea",
|
39
|
+
"@orpc/standard-server-fetch": "0.0.0-next.c0afbea"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
42
|
"zod": "^3.24.2"
|