@schema-hub/zod-graphql-client 0.0.23 → 0.0.25
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Mathias Schreck <schreck.mathias@gmail.com>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@schema-hub/zod-error-formatter": "0.0.
|
|
4
|
+
"@schema-hub/zod-error-formatter": "0.0.18",
|
|
5
5
|
"@schema-hub/zod-graphql-query-builder": "0.0.18",
|
|
6
6
|
"ky": "2.0.2"
|
|
7
7
|
},
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"import": "./zod-graphql-client/client.js",
|
|
19
19
|
"types": "./zod-graphql-client/client.d.ts"
|
|
20
20
|
},
|
|
21
|
+
"./zod-graphql-client/operation-error.js": {
|
|
22
|
+
"import": "./zod-graphql-client/operation-error.js",
|
|
23
|
+
"types": "./zod-graphql-client/operation-error.d.ts"
|
|
24
|
+
},
|
|
21
25
|
"./zod-graphql-client/operation-payload.js": {
|
|
22
26
|
"import": "./zod-graphql-client/operation-payload.js",
|
|
23
27
|
"types": "./zod-graphql-client/operation-payload.d.ts"
|
|
@@ -43,8 +47,9 @@
|
|
|
43
47
|
"sideEffects": [
|
|
44
48
|
"./zod-graphql-client/graphql-error.js",
|
|
45
49
|
"./zod-graphql-client/graphql-response.js",
|
|
46
|
-
"./zod-graphql-client/infer-graphql-type.js"
|
|
50
|
+
"./zod-graphql-client/infer-graphql-type.js",
|
|
51
|
+
"./zod-graphql-client/operation-error.js"
|
|
47
52
|
],
|
|
48
53
|
"type": "module",
|
|
49
|
-
"version": "0.0.
|
|
54
|
+
"version": "0.0.25"
|
|
50
55
|
}
|
package/sbom.cdx.json
CHANGED
|
@@ -9,31 +9,31 @@
|
|
|
9
9
|
{
|
|
10
10
|
"type": "application",
|
|
11
11
|
"name": "packtory",
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.101"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "library",
|
|
18
18
|
"name": "@schema-hub/zod-graphql-client",
|
|
19
|
-
"version": "0.0.
|
|
20
|
-
"bom-ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.
|
|
21
|
-
"purl": "pkg:npm/@schema-hub/zod-graphql-client@0.0.
|
|
19
|
+
"version": "0.0.25",
|
|
20
|
+
"bom-ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.25",
|
|
21
|
+
"purl": "pkg:npm/@schema-hub/zod-graphql-client@0.0.25"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
25
25
|
{
|
|
26
26
|
"type": "library",
|
|
27
27
|
"name": "@schema-hub/zod-error-formatter",
|
|
28
|
-
"version": "0.0.
|
|
29
|
-
"bom-ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.
|
|
28
|
+
"version": "0.0.18",
|
|
29
|
+
"bom-ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.18",
|
|
30
30
|
"scope": "required",
|
|
31
31
|
"licenses": [
|
|
32
32
|
{
|
|
33
33
|
"expression": "MIT"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"purl": "pkg:npm/@schema-hub/zod-error-formatter@0.0.
|
|
36
|
+
"purl": "pkg:npm/@schema-hub/zod-error-formatter@0.0.18"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"type": "library",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
],
|
|
78
78
|
"dependencies": [
|
|
79
79
|
{
|
|
80
|
-
"ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.
|
|
80
|
+
"ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.18"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
|
-
"ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.
|
|
83
|
+
"ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.25",
|
|
84
84
|
"dependsOn": [
|
|
85
|
-
"pkg:npm/@schema-hub/zod-error-formatter@0.0.
|
|
85
|
+
"pkg:npm/@schema-hub/zod-error-formatter@0.0.18",
|
|
86
86
|
"pkg:npm/@schema-hub/zod-graphql-query-builder@0.0.18",
|
|
87
87
|
"pkg:npm/ky@2.0.2",
|
|
88
88
|
"pkg:npm/zod@%5E4.0.5"
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle -- we need to access _zod */
|
|
2
2
|
/* eslint-disable functional/prefer-immutable-types -- parameters are third-party zod schema types that are only read */
|
|
3
3
|
import 'zod/v4/core';
|
|
4
|
+
export class GraphqlTypeInferenceError extends Error {
|
|
5
|
+
constructor(message, options) {
|
|
6
|
+
super(message, options);
|
|
7
|
+
this.name = 'GraphqlTypeInferenceError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
4
10
|
const integerNumberFormats = new Set(['safeint', 'int32', 'int64', 'uint32', 'uint64']);
|
|
5
11
|
//# sourceMappingURL=infer-graphql-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infer-graphql-type.js","sourceRoot":"","sources":["../../../../source/zod-graphql-client/infer-graphql-type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,wHAAwH;AACxH,OAQO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"infer-graphql-type.js","sourceRoot":"","sources":["../../../../source/zod-graphql-client/infer-graphql-type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,wHAAwH;AACxH,OAQO,aAAa,CAAC;AAErB,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAChD,YAAmB,OAAe,EAAE,OAAsB;QACtD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAExB,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC5C,CAAC;CACJ;AAED,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAE,CAAC,CAAC;AAQtF"}
|
|
@@ -1 +1,20 @@
|
|
|
1
|
+
function causeOf(details) {
|
|
2
|
+
// eslint-disable-next-line unicorn/prefer-includes-over-repeated-comparisons -- literal comparisons narrow the discriminated union so `cause` is accessible
|
|
3
|
+
if (details.type === 'network' || details.type === 'server' || details.type === 'unknown') {
|
|
4
|
+
return details.cause;
|
|
5
|
+
}
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
export class GraphqlOperationError extends Error {
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types, restricted-syntax-typescript/no-public-class-property -- no type-fest installed; details is part of the error's public API
|
|
10
|
+
details;
|
|
11
|
+
// eslint-disable-next-line unicorn/custom-error-definition -- constructor takes a domain details object rather than message + options
|
|
12
|
+
constructor(details) {
|
|
13
|
+
const cause = causeOf(details);
|
|
14
|
+
const { message, ...remainingDetails } = details;
|
|
15
|
+
super(message, cause === undefined ? undefined : { cause });
|
|
16
|
+
this.name = 'GraphqlOperationError';
|
|
17
|
+
this.details = remainingDetails;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
1
20
|
//# sourceMappingURL=operation-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-error.js","sourceRoot":"","sources":["../../../../source/zod-graphql-client/operation-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation-error.js","sourceRoot":"","sources":["../../../../source/zod-graphql-client/operation-error.ts"],"names":[],"mappings":"AAmCA,SAAS,OAAO,CAAC,OAA8B;IAC3C,4JAA4J;IAC5J,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACxF,OAAO,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC5C,8LAA8L;IAC9K,OAAO,CAAyC;IAEhE,sIAAsI;IACtI,YAAmB,OAA8B;QAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,GAAG,OAAO,CAAC;QACjD,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAE5D,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC;IACpC,CAAC;CACJ"}
|