@orpc/contract 0.0.0-next.31590a1 → 0.0.0-next.32cb70c
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/index.js +0 -7
- package/dist/src/client.d.ts +1 -3
- package/dist/src/error-utils.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -319,12 +319,6 @@ async function validateORPCError(map, error) {
|
|
|
319
319
|
}
|
|
320
320
|
return new ORPCError(code, { defined: true, status, message, data: validated.value, cause });
|
|
321
321
|
}
|
|
322
|
-
function toORPCError(error) {
|
|
323
|
-
return error instanceof ORPCError ? error : new ORPCError("INTERNAL_SERVER_ERROR", {
|
|
324
|
-
message: "Internal server error",
|
|
325
|
-
cause: error
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
322
|
|
|
329
323
|
// src/client-utils.ts
|
|
330
324
|
async function safe(promise) {
|
|
@@ -401,7 +395,6 @@ export {
|
|
|
401
395
|
oc,
|
|
402
396
|
prefixRoute,
|
|
403
397
|
safe,
|
|
404
|
-
toORPCError,
|
|
405
398
|
type,
|
|
406
399
|
unshiftTagRoute,
|
|
407
400
|
validateORPCError
|
package/dist/src/client.d.ts
CHANGED
|
@@ -8,9 +8,7 @@ export type ClientOptions<TClientContext> = {
|
|
|
8
8
|
});
|
|
9
9
|
export type ClientRest<TClientContext, TInput> = [input: TInput, options: ClientOptions<TClientContext>] | (undefined extends TInput & TClientContext ? [] : never) | (undefined extends TClientContext ? [input: TInput] : never);
|
|
10
10
|
export type ClientPromiseResult<TOutput, TError extends Error> = Promise<TOutput> & {
|
|
11
|
-
|
|
12
|
-
type: TError;
|
|
13
|
-
};
|
|
11
|
+
__typeError?: TError;
|
|
14
12
|
};
|
|
15
13
|
export interface Client<TClientContext, TInput, TOutput, TError extends Error> {
|
|
16
14
|
(...rest: ClientRest<TClientContext, TInput>): ClientPromiseResult<TOutput, TError>;
|
|
@@ -11,5 +11,4 @@ export type ORPCErrorConstructorMap<T extends ErrorMap> = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare function createORPCErrorConstructorMap<T extends ErrorMap>(errors: T): ORPCErrorConstructorMap<T>;
|
|
13
13
|
export declare function validateORPCError(map: ErrorMap, error: ORPCError<any, any>): Promise<ORPCError<string, unknown>>;
|
|
14
|
-
export declare function toORPCError(error: unknown): ORPCError<any, any>;
|
|
15
14
|
//# sourceMappingURL=error-utils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.32cb70c",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@standard-schema/spec": "1.0.0-rc.0",
|
|
33
|
-
"@orpc/shared": "0.0.0-next.
|
|
33
|
+
"@orpc/shared": "0.0.0-next.32cb70c"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"arktype": "2.0.0-rc.26",
|