@orpc/contract 2.0.0-beta.33 → 2.0.0-beta.34
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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isTypescriptObject, toArray, get, set, isPropertyKey, ORPC_NAME, resolveMaybeOptionalOptions, getOwn, isAsyncIteratorObject } from '@orpc/shared';
|
|
2
|
-
import { P as ProcedureContract, r as resolveMetaPlugins, m as mergeErrorMap, a as augmentContractRouter, V as ValidationError } from './shared/contract.
|
|
3
|
-
export { d as defineMeta, g as getContractRouter, b as getProcedureContractOrThrow, g as getRouterContract, c as minifyContractRouter, c as minifyRouterContract, e as reconcileORPCError } from './shared/contract.
|
|
2
|
+
import { P as ProcedureContract, r as resolveMetaPlugins, m as mergeErrorMap, a as augmentContractRouter, V as ValidationError } from './shared/contract.DXyrtpyP.mjs';
|
|
3
|
+
export { d as defineMeta, g as getContractRouter, b as getProcedureContractOrThrow, g as getRouterContract, c as minifyContractRouter, c as minifyRouterContract, e as reconcileORPCError } from './shared/contract.DXyrtpyP.mjs';
|
|
4
4
|
import { createORPCClient, ORPCError, wrapAsyncIteratorPreservingEventMeta } from '@orpc/client';
|
|
5
5
|
|
|
6
6
|
const HIDDEN_META_PLUGINS_SYMBOL = Symbol.for("ORPC_HIDDEN_META_PLUGINS");
|
|
@@ -269,7 +269,6 @@ function createORPCErrorConstructorMap(errorMap) {
|
|
|
269
269
|
});
|
|
270
270
|
if (config) {
|
|
271
271
|
error2.defined = true;
|
|
272
|
-
error2.inferable = true;
|
|
273
272
|
}
|
|
274
273
|
return error2;
|
|
275
274
|
};
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ORPCError } from '@orpc/client';
|
|
2
2
|
import { toArray, isPlainObject, mergeTwoLevels } from '@orpc/shared';
|
|
3
|
-
import { b as getProcedureContractOrThrow, V as ValidationError, e as reconcileORPCError } from '../shared/contract.
|
|
3
|
+
import { b as getProcedureContractOrThrow, V as ValidationError, e as reconcileORPCError } from '../shared/contract.DXyrtpyP.mjs';
|
|
4
4
|
|
|
5
5
|
class RequestValidationLinkPlugin {
|
|
6
6
|
constructor(contract, options = {}) {
|
|
@@ -12,16 +12,14 @@ async function reconcileORPCError(map, error) {
|
|
|
12
12
|
}
|
|
13
13
|
const cloned2 = cloneORPCError(error);
|
|
14
14
|
cloned2.defined = false;
|
|
15
|
-
cloned2.inferable = false;
|
|
16
15
|
return cloned2;
|
|
17
16
|
}
|
|
18
17
|
if (!config.data) {
|
|
19
|
-
if (error.defined
|
|
18
|
+
if (error.defined) {
|
|
20
19
|
return error;
|
|
21
20
|
}
|
|
22
21
|
const cloned2 = cloneORPCError(error);
|
|
23
22
|
cloned2.defined = true;
|
|
24
|
-
cloned2.inferable = true;
|
|
25
23
|
return cloned2;
|
|
26
24
|
}
|
|
27
25
|
const validated = await config.data["~standard"].validate(error.data);
|
|
@@ -31,16 +29,14 @@ async function reconcileORPCError(map, error) {
|
|
|
31
29
|
}
|
|
32
30
|
const cloned2 = cloneORPCError(error);
|
|
33
31
|
cloned2.defined = false;
|
|
34
|
-
cloned2.inferable = false;
|
|
35
32
|
return cloned2;
|
|
36
33
|
}
|
|
37
|
-
if (error.data === validated.value && error.defined
|
|
34
|
+
if (error.data === validated.value && error.defined) {
|
|
38
35
|
return error;
|
|
39
36
|
}
|
|
40
37
|
const cloned = cloneORPCError(error);
|
|
41
38
|
cloned.data = validated.value;
|
|
42
39
|
cloned.defined = true;
|
|
43
|
-
cloned.inferable = true;
|
|
44
40
|
return cloned;
|
|
45
41
|
}
|
|
46
42
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.34",
|
|
5
5
|
"description": "Define typesafe API contracts as the single source of truth for oRPC, powered by Standard Schema",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@orpc/client": "2.0.0-beta.
|
|
47
|
-
"@orpc/shared": "2.0.0-beta.
|
|
46
|
+
"@orpc/client": "2.0.0-beta.34",
|
|
47
|
+
"@orpc/shared": "2.0.0-beta.34",
|
|
48
48
|
"@standard-schema/spec": "^1.1.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|