oxfmt 0.57.0 → 0.59.0
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/configuration_schema.json +3 -3
- package/dist/{acorn-LGWopQvF.js → acorn-Dxp-n4ed.js} +1984 -1801
- package/dist/{angular-BbAuvH72.js → angular-Clx-wbm6.js} +1750 -995
- package/dist/{apis-CvFX8LhR.js → apis-D299uPBa.js} +4 -4
- package/dist/babel-7tfAjQas.js +10005 -0
- package/dist/{bindings-Cj_GMsoO.js → bindings-CjOHPMBU.js} +26 -26
- package/dist/{chunk-DSjvVL_1-DllBg9tc.js → chunk-DSjvVL_1-Do0Iorfu.js} +1 -1
- package/dist/cli-worker.d.ts +21 -27
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +3 -2
- package/dist/{dist-BKyxiMdj.js → dist-Byfj_1s9.js} +17 -17
- package/dist/estree-CyQu6pff.js +8006 -0
- package/dist/flow-BH5imzwC.js +9164 -0
- package/dist/{glimmer-Ba_8Z2bG.js → glimmer-B5hfTXAX.js} +295 -213
- package/dist/{graphql-CZ7EPWgo.js → graphql-DQB_nHt9.js} +968 -818
- package/dist/{html-DblM11Xw.js → html--849eFzc.js} +1531 -1318
- package/dist/index.d.ts +7 -3
- package/dist/index.js +3 -3
- package/dist/{jiti-Bb1dT6Cw-0c6As3U-.js → jiti-Bb1dT6Cw-cY1yrK9n.js} +2 -2
- package/dist/markdown-B1lBrqaF.js +14043 -0
- package/dist/{meriyah-DafjRZfO.js → meriyah-B5wbO5kj.js} +1568 -1445
- package/dist/{migrate-prettier-DrYAkU3F.js → migrate-prettier-CbxtU9AG.js} +49 -42
- package/dist/{plugin-BuVceHGR.js → plugin-D1B0s0iv.js} +16 -12
- package/dist/{postcss-CkhtwsAS.js → postcss-DuOoF7OX.js} +2243 -2013
- package/dist/{prettier-DKAx5A83.js → prettier-CEZwFZsY.js} +5673 -5038
- package/dist/{sorter-BZkvDMjt-C8qUPUh2.js → sorter-BZkvDMjt-DFTeIPU-.js} +7 -7
- package/dist/{sorter-DSVZH4kF.js → sorter-Cm0Z2eGI.js} +1 -1
- package/dist/{typescript-DaxiA0nr.js → typescript-Cvdwz3-D.js} +10574 -10254
- package/dist/{v3-D-mr2VVh-Ch8a-2Ce.js → v3-D-mr2VVh-C_WUxELf.js} +6 -5
- package/dist/{v4-C-HWEQJm-DheWK34Z.js → v4-C-HWEQJm-C0ut0NwJ.js} +108 -30
- package/dist/yaml-Dd4aShtG.js +6210 -0
- package/package.json +20 -20
- package/dist/babel-DLjwvkt5.js +0 -9884
- package/dist/estree-DbmUPhmV.js +0 -7269
- package/dist/flow-CJbpv7JL.js +0 -52916
- package/dist/markdown-B5hFVJKQ.js +0 -6880
- package/dist/yaml-BC7gw7un.js +0 -5280
|
@@ -1,125 +1,167 @@
|
|
|
1
1
|
import { n as __esmMin } from "./rolldown-runtime-CE-6LUnI.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/prettier@3.
|
|
3
|
-
function
|
|
4
|
-
return
|
|
5
|
-
type:
|
|
2
|
+
//#region ../../node_modules/.pnpm/prettier@3.9.5/node_modules/prettier/plugins/graphql.mjs
|
|
3
|
+
function m(e) {
|
|
4
|
+
return O(e), {
|
|
5
|
+
type: Ie,
|
|
6
6
|
contents: e
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
type:
|
|
9
|
+
function N(e, t = {}) {
|
|
10
|
+
return O(e), J(t.expandedStates, !0), {
|
|
11
|
+
type: ge,
|
|
12
12
|
id: t.id,
|
|
13
13
|
contents: e,
|
|
14
14
|
break: !!t.shouldBreak,
|
|
15
15
|
expandedStates: t.expandedStates
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
20
|
-
type:
|
|
18
|
+
function _(e, t = "", n = {}) {
|
|
19
|
+
return O(e), t !== "" && O(t), {
|
|
20
|
+
type: Se,
|
|
21
21
|
breakContents: e,
|
|
22
22
|
flatContents: t,
|
|
23
23
|
groupId: n.groupId
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function d(e, t) {
|
|
27
|
+
O(e), J(t);
|
|
28
28
|
let n = [];
|
|
29
|
-
for (let
|
|
29
|
+
for (let r = 0; r < t.length; r++) r !== 0 && n.push(e), n.push(t[r]);
|
|
30
30
|
return n;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return (t, n,
|
|
34
|
-
let r = !!i?.backwards;
|
|
32
|
+
function W(e) {
|
|
33
|
+
return (t, n, r) => {
|
|
35
34
|
if (n === !1) return !1;
|
|
36
|
-
let { length: s } = t, a = n;
|
|
35
|
+
let i = !!r?.backwards, { length: s } = t, a = n;
|
|
37
36
|
for (; a >= 0 && a < s;) {
|
|
38
|
-
let
|
|
37
|
+
let p = t.charAt(a);
|
|
39
38
|
if (e instanceof RegExp) {
|
|
40
|
-
if (!e.test(
|
|
41
|
-
} else if (!e.includes(
|
|
42
|
-
|
|
39
|
+
if (!e.test(p)) return a;
|
|
40
|
+
} else if (!e.includes(p)) return a;
|
|
41
|
+
i ? a-- : a++;
|
|
43
42
|
}
|
|
44
43
|
return a === -1 || a === s ? a : !1;
|
|
45
44
|
};
|
|
46
45
|
}
|
|
47
|
-
function
|
|
48
|
-
let i = !!n?.backwards;
|
|
46
|
+
function Dt(e, t, n) {
|
|
49
47
|
if (t === !1) return !1;
|
|
50
|
-
let r = e.charAt(t);
|
|
51
|
-
if (
|
|
52
|
-
if (e.charAt(t - 1) === "\r" &&
|
|
48
|
+
let r = !!n?.backwards, i = e.charAt(t);
|
|
49
|
+
if (r) {
|
|
50
|
+
if (e.charAt(t - 1) === "\r" && i === `
|
|
53
51
|
`) return t - 2;
|
|
54
|
-
if (
|
|
52
|
+
if (Ce(i)) return t - 1;
|
|
55
53
|
} else {
|
|
56
|
-
if (
|
|
54
|
+
if (i === "\r" && e.charAt(t + 1) === `
|
|
57
55
|
`) return t + 2;
|
|
58
|
-
if (
|
|
56
|
+
if (Ce(i)) return t + 1;
|
|
59
57
|
}
|
|
60
58
|
return t;
|
|
61
59
|
}
|
|
62
|
-
function
|
|
63
|
-
let
|
|
64
|
-
return
|
|
60
|
+
function _t(e, t, n = {}) {
|
|
61
|
+
let r = z(e, n.backwards ? t - 1 : t, n);
|
|
62
|
+
return r !== Z(e, r, n);
|
|
63
|
+
}
|
|
64
|
+
function It(e, t) {
|
|
65
|
+
let n = e.node;
|
|
66
|
+
return n.printed = !0, t.printer.printComment(e, t);
|
|
67
|
+
}
|
|
68
|
+
function ue(e, t, n = {}) {
|
|
69
|
+
let { indent: r = !1, marker: i, filter: s = At } = n, a = new Set(e.node?.comments?.filter((x) => !(x.leading || x.trailing || x.marker !== i || !s(x))));
|
|
70
|
+
if (a.size === 0) return "";
|
|
71
|
+
let E = d(l, e.map(({ node: x }) => a.has(x) ? It(e, t) : "", "comments").filter(Boolean));
|
|
72
|
+
return r ? m([l, E]) : E;
|
|
73
|
+
}
|
|
74
|
+
function gt(e) {
|
|
75
|
+
return Array.isArray(e) && e.length > 0;
|
|
76
|
+
}
|
|
77
|
+
function j(e) {
|
|
78
|
+
if (K !== null && typeof K.property) {
|
|
79
|
+
let t = K;
|
|
80
|
+
return K = j.prototype = null, t;
|
|
81
|
+
}
|
|
82
|
+
return K = j.prototype = e ?? Object.create(null), new j();
|
|
83
|
+
}
|
|
84
|
+
function de(e) {
|
|
85
|
+
return j(e);
|
|
65
86
|
}
|
|
66
|
-
function
|
|
87
|
+
function Ot(e, t = "type") {
|
|
88
|
+
de(e);
|
|
89
|
+
function n(r) {
|
|
90
|
+
let i = r[t], s = e[i];
|
|
91
|
+
if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: r });
|
|
92
|
+
return s;
|
|
93
|
+
}
|
|
94
|
+
return n;
|
|
95
|
+
}
|
|
96
|
+
function fe(e, t) {
|
|
97
|
+
e.kind === "StringValue" && e.block && !e.value.includes(`
|
|
98
|
+
`) && (t.value = e.value.trim());
|
|
99
|
+
}
|
|
100
|
+
function kt(e, t) {
|
|
67
101
|
if (t === !1) return !1;
|
|
68
102
|
if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
|
|
69
103
|
for (let n = t + 2; n < e.length; ++n) if (e.charAt(n) === "*" && e.charAt(n + 1) === "/") return n + 2;
|
|
70
104
|
}
|
|
71
105
|
return t;
|
|
72
106
|
}
|
|
73
|
-
function
|
|
74
|
-
return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ?
|
|
107
|
+
function Ct(e, t) {
|
|
108
|
+
return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ke(e, t) : t;
|
|
75
109
|
}
|
|
76
|
-
function
|
|
77
|
-
let n = null,
|
|
78
|
-
for (;
|
|
79
|
-
return
|
|
110
|
+
function Rt(e, t) {
|
|
111
|
+
let n = null, r = t;
|
|
112
|
+
for (; r !== n;) n = r, r = ve(e, r), r = Ke(e, r), r = z(e, r);
|
|
113
|
+
return r = je(e, r), r = Z(e, r), r !== !1 && Re(e, r);
|
|
80
114
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
115
|
+
function I(e, t, n, r) {
|
|
116
|
+
return e.map(({ isLast: i, node: s }) => {
|
|
117
|
+
let a = n();
|
|
118
|
+
return !i && Ye(t.originalText, te(s)) ? [a, l] : a;
|
|
119
|
+
}, r);
|
|
83
120
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
121
|
+
function me(e, t, n) {
|
|
122
|
+
let { node: r } = e;
|
|
123
|
+
return T(r.arguments) ? N([
|
|
124
|
+
"(",
|
|
125
|
+
m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
|
|
126
|
+
u,
|
|
127
|
+
")"
|
|
128
|
+
]) : "";
|
|
90
129
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
130
|
+
function A(e, t, n) {
|
|
131
|
+
let { node: r } = e;
|
|
132
|
+
if (!r.description) return "";
|
|
133
|
+
let i = [n("description")];
|
|
134
|
+
return r.kind === "InputValueDefinition" && !r.description.block ? i.push(S) : i.push(l), i;
|
|
93
135
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return s;
|
|
100
|
-
}
|
|
101
|
-
return n;
|
|
136
|
+
function y(e, t) {
|
|
137
|
+
let { node: n } = e;
|
|
138
|
+
if (!T(n.directives)) return "";
|
|
139
|
+
let r = d(S, e.map(t, "directives"));
|
|
140
|
+
return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? N([S, r]) : [" ", N(m([u, r]))];
|
|
102
141
|
}
|
|
103
|
-
function
|
|
104
|
-
let { node:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
142
|
+
function he(e, t) {
|
|
143
|
+
let { node: n } = e;
|
|
144
|
+
return T(n.variableDefinitions) ? N([
|
|
145
|
+
"(",
|
|
146
|
+
m([u, d([_("", ", "), u], e.map(t, "variableDefinitions"))]),
|
|
147
|
+
u,
|
|
148
|
+
")"
|
|
149
|
+
]) : "";
|
|
108
150
|
}
|
|
109
|
-
function
|
|
110
|
-
let { node:
|
|
111
|
-
switch (
|
|
112
|
-
case "Document": return [...
|
|
151
|
+
function Lt(e, t, n) {
|
|
152
|
+
let { node: r } = e;
|
|
153
|
+
switch (r.kind) {
|
|
154
|
+
case "Document": return [...d(l, I(e, t, n, "definitions")), l];
|
|
113
155
|
case "OperationDefinition": {
|
|
114
|
-
let
|
|
156
|
+
let i = t.originalText[ee(r)] !== "{", s = !!r.name;
|
|
115
157
|
return [
|
|
116
158
|
A(e, t, n),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
!
|
|
159
|
+
i ? r.operation : "",
|
|
160
|
+
i && s ? [" ", n("name")] : "",
|
|
161
|
+
i && !s && T(r.variableDefinitions) ? " " : "",
|
|
162
|
+
he(e, n),
|
|
163
|
+
y(e, n),
|
|
164
|
+
!i && !s ? "" : " ",
|
|
123
165
|
n("selectionSet")
|
|
124
166
|
];
|
|
125
167
|
}
|
|
@@ -127,74 +169,80 @@ function Dt(e, t, n) {
|
|
|
127
169
|
A(e, t, n),
|
|
128
170
|
"fragment ",
|
|
129
171
|
n("name"),
|
|
130
|
-
|
|
172
|
+
he(e, n),
|
|
131
173
|
" on ",
|
|
132
174
|
n("typeCondition"),
|
|
133
|
-
|
|
175
|
+
y(e, n),
|
|
134
176
|
" ",
|
|
135
177
|
n("selectionSet")
|
|
136
178
|
];
|
|
137
179
|
case "SelectionSet": return [
|
|
138
180
|
"{",
|
|
139
|
-
|
|
140
|
-
|
|
181
|
+
m([l, d(l, I(e, t, n, "selections"))]),
|
|
182
|
+
l,
|
|
141
183
|
"}"
|
|
142
184
|
];
|
|
143
|
-
case "Field": return
|
|
144
|
-
|
|
185
|
+
case "Field": return N([
|
|
186
|
+
r.alias ? [n("alias"), ": "] : "",
|
|
145
187
|
n("name"),
|
|
146
|
-
|
|
188
|
+
T(r.arguments) ? N([
|
|
147
189
|
"(",
|
|
148
|
-
|
|
149
|
-
|
|
190
|
+
m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
|
|
191
|
+
u,
|
|
150
192
|
")"
|
|
151
193
|
]) : "",
|
|
152
|
-
|
|
153
|
-
|
|
194
|
+
y(e, n),
|
|
195
|
+
r.selectionSet ? " " : "",
|
|
154
196
|
n("selectionSet")
|
|
155
197
|
]);
|
|
156
|
-
case "Name": return
|
|
198
|
+
case "Name": return r.value;
|
|
157
199
|
case "StringValue":
|
|
158
|
-
if (
|
|
159
|
-
let
|
|
200
|
+
if (r.block) {
|
|
201
|
+
let i = X(0, r.value, "\"\"\"", "\\\"\"\"").split(`
|
|
160
202
|
`);
|
|
161
|
-
return
|
|
203
|
+
return i.length === 1 && (i[0] = i[0].trim()), i.every((s) => s === "") && (i.length = 0), d(l, [
|
|
162
204
|
"\"\"\"",
|
|
163
|
-
...
|
|
205
|
+
...i,
|
|
164
206
|
"\"\"\""
|
|
165
207
|
]);
|
|
166
208
|
}
|
|
167
209
|
return [
|
|
168
210
|
"\"",
|
|
169
|
-
|
|
211
|
+
X(0, X(0, r.value, /["\\]/g, "\\$&"), `
|
|
170
212
|
`, "\\n"),
|
|
171
213
|
"\""
|
|
172
214
|
];
|
|
173
215
|
case "IntValue":
|
|
174
216
|
case "FloatValue":
|
|
175
|
-
case "EnumValue": return
|
|
176
|
-
case "BooleanValue": return
|
|
217
|
+
case "EnumValue": return r.value;
|
|
218
|
+
case "BooleanValue": return r.value ? "true" : "false";
|
|
177
219
|
case "NullValue": return "null";
|
|
178
220
|
case "Variable": return ["$", n("name")];
|
|
179
|
-
case "ListValue":
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
221
|
+
case "ListValue": {
|
|
222
|
+
let i = !T(r.values);
|
|
223
|
+
return N([
|
|
224
|
+
"[",
|
|
225
|
+
ue(e, t, { indent: !0 }),
|
|
226
|
+
i ? "" : m([u, d([_("", ", "), u], e.map(n, "values"))]),
|
|
227
|
+
u,
|
|
228
|
+
"]"
|
|
229
|
+
]);
|
|
230
|
+
}
|
|
185
231
|
case "ObjectValue": {
|
|
186
|
-
let r = t.bracketSpacing && i
|
|
187
|
-
return
|
|
232
|
+
let i = !T(r.fields), s = t.bracketSpacing && !i ? " " : "";
|
|
233
|
+
return N([
|
|
188
234
|
"{",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
235
|
+
s,
|
|
236
|
+
ue(e, t, { indent: !0 }),
|
|
237
|
+
i ? "" : [m([u, d([_("", ", "), u], e.map(n, "fields"))])],
|
|
238
|
+
u,
|
|
239
|
+
_("", s),
|
|
193
240
|
"}"
|
|
194
241
|
]);
|
|
195
242
|
}
|
|
196
243
|
case "ObjectField":
|
|
197
|
-
case "Argument":
|
|
244
|
+
case "Argument":
|
|
245
|
+
case "FragmentArgument": return [
|
|
198
246
|
n("name"),
|
|
199
247
|
": ",
|
|
200
248
|
n("value")
|
|
@@ -202,12 +250,7 @@ function Dt(e, t, n) {
|
|
|
202
250
|
case "Directive": return [
|
|
203
251
|
"@",
|
|
204
252
|
n("name"),
|
|
205
|
-
|
|
206
|
-
"(",
|
|
207
|
-
x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
|
|
208
|
-
l,
|
|
209
|
-
")"
|
|
210
|
-
]) : ""
|
|
253
|
+
me(e, t, n)
|
|
211
254
|
];
|
|
212
255
|
case "NamedType": return n("name");
|
|
213
256
|
case "VariableDefinition": return [
|
|
@@ -215,8 +258,8 @@ function Dt(e, t, n) {
|
|
|
215
258
|
n("variable"),
|
|
216
259
|
": ",
|
|
217
260
|
n("type"),
|
|
218
|
-
|
|
219
|
-
|
|
261
|
+
r.defaultValue ? [" = ", n("defaultValue")] : "",
|
|
262
|
+
y(e, n)
|
|
220
263
|
];
|
|
221
264
|
case "ObjectTypeExtension":
|
|
222
265
|
case "ObjectTypeDefinition":
|
|
@@ -224,124 +267,131 @@ function Dt(e, t, n) {
|
|
|
224
267
|
case "InputObjectTypeDefinition":
|
|
225
268
|
case "InterfaceTypeExtension":
|
|
226
269
|
case "InterfaceTypeDefinition": {
|
|
227
|
-
let { kind:
|
|
228
|
-
return
|
|
270
|
+
let { kind: i } = r, s = [];
|
|
271
|
+
return i.endsWith("TypeDefinition") ? s.push(A(e, t, n)) : s.push("extend "), i.startsWith("ObjectType") ? s.push("type") : i.startsWith("InputObjectType") ? s.push("input") : s.push("interface"), s.push(" ", n("name")), !i.startsWith("InputObjectType") && T(r.interfaces) && s.push(" implements ", m([N([d([" &", S], e.map(n, "interfaces"))])])), s.push(y(e, n)), T(r.fields) && s.push([
|
|
229
272
|
" {",
|
|
230
|
-
|
|
231
|
-
|
|
273
|
+
m([l, d(l, I(e, t, n, "fields"))]),
|
|
274
|
+
l,
|
|
232
275
|
"}"
|
|
233
276
|
]), s;
|
|
234
277
|
}
|
|
235
278
|
case "FieldDefinition": return [
|
|
236
279
|
A(e, t, n),
|
|
237
280
|
n("name"),
|
|
238
|
-
|
|
281
|
+
T(r.arguments) ? N([
|
|
239
282
|
"(",
|
|
240
|
-
|
|
241
|
-
|
|
283
|
+
m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
|
|
284
|
+
u,
|
|
242
285
|
")"
|
|
243
286
|
]) : "",
|
|
244
287
|
": ",
|
|
245
288
|
n("type"),
|
|
246
|
-
|
|
289
|
+
y(e, n)
|
|
247
290
|
];
|
|
248
291
|
case "DirectiveDefinition": return [
|
|
249
292
|
A(e, t, n),
|
|
250
293
|
"directive ",
|
|
251
294
|
"@",
|
|
252
295
|
n("name"),
|
|
253
|
-
|
|
296
|
+
T(r.arguments) ? N([
|
|
254
297
|
"(",
|
|
255
|
-
|
|
256
|
-
|
|
298
|
+
m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
|
|
299
|
+
u,
|
|
257
300
|
")"
|
|
258
301
|
]) : "",
|
|
259
|
-
|
|
302
|
+
y(e, n),
|
|
303
|
+
r.repeatable ? " repeatable" : "",
|
|
260
304
|
" on ",
|
|
261
|
-
...
|
|
305
|
+
...d(" | ", e.map(n, "locations"))
|
|
306
|
+
];
|
|
307
|
+
case "DirectiveExtension": return [
|
|
308
|
+
"extend directive @",
|
|
309
|
+
n("name"),
|
|
310
|
+
y(e, n)
|
|
262
311
|
];
|
|
263
312
|
case "EnumTypeExtension":
|
|
264
313
|
case "EnumTypeDefinition": return [
|
|
265
314
|
A(e, t, n),
|
|
266
|
-
|
|
315
|
+
r.kind === "EnumTypeExtension" ? "extend " : "",
|
|
267
316
|
"enum ",
|
|
268
317
|
n("name"),
|
|
269
|
-
|
|
270
|
-
|
|
318
|
+
y(e, n),
|
|
319
|
+
T(r.values) ? [
|
|
271
320
|
" {",
|
|
272
|
-
|
|
273
|
-
|
|
321
|
+
m([l, d(l, I(e, t, n, "values"))]),
|
|
322
|
+
l,
|
|
274
323
|
"}"
|
|
275
324
|
] : ""
|
|
276
325
|
];
|
|
277
326
|
case "EnumValueDefinition": return [
|
|
278
327
|
A(e, t, n),
|
|
279
328
|
n("name"),
|
|
280
|
-
|
|
329
|
+
y(e, n)
|
|
281
330
|
];
|
|
282
331
|
case "InputValueDefinition": return [
|
|
283
332
|
A(e, t, n),
|
|
284
333
|
n("name"),
|
|
285
334
|
": ",
|
|
286
335
|
n("type"),
|
|
287
|
-
|
|
288
|
-
|
|
336
|
+
r.defaultValue ? [" = ", n("defaultValue")] : "",
|
|
337
|
+
y(e, n)
|
|
289
338
|
];
|
|
290
339
|
case "SchemaExtension": return [
|
|
291
340
|
"extend schema",
|
|
292
|
-
|
|
293
|
-
...
|
|
341
|
+
y(e, n),
|
|
342
|
+
...T(r.operationTypes) ? [
|
|
294
343
|
" {",
|
|
295
|
-
|
|
296
|
-
|
|
344
|
+
m([l, d(l, I(e, t, n, "operationTypes"))]),
|
|
345
|
+
l,
|
|
297
346
|
"}"
|
|
298
347
|
] : []
|
|
299
348
|
];
|
|
300
349
|
case "SchemaDefinition": return [
|
|
301
350
|
A(e, t, n),
|
|
302
351
|
"schema",
|
|
303
|
-
|
|
352
|
+
y(e, n),
|
|
304
353
|
" {",
|
|
305
|
-
|
|
306
|
-
|
|
354
|
+
T(r.operationTypes) ? m([l, d(l, I(e, t, n, "operationTypes"))]) : "",
|
|
355
|
+
l,
|
|
307
356
|
"}"
|
|
308
357
|
];
|
|
309
358
|
case "OperationTypeDefinition": return [
|
|
310
|
-
|
|
359
|
+
r.operation,
|
|
311
360
|
": ",
|
|
312
361
|
n("type")
|
|
313
362
|
];
|
|
314
363
|
case "FragmentSpread": return [
|
|
315
364
|
"...",
|
|
316
365
|
n("name"),
|
|
317
|
-
|
|
366
|
+
me(e, t, n),
|
|
367
|
+
y(e, n)
|
|
318
368
|
];
|
|
319
369
|
case "InlineFragment": return [
|
|
320
370
|
"...",
|
|
321
|
-
|
|
322
|
-
|
|
371
|
+
r.typeCondition ? [" on ", n("typeCondition")] : "",
|
|
372
|
+
y(e, n),
|
|
323
373
|
" ",
|
|
324
374
|
n("selectionSet")
|
|
325
375
|
];
|
|
326
376
|
case "UnionTypeExtension":
|
|
327
|
-
case "UnionTypeDefinition": return
|
|
328
|
-
|
|
377
|
+
case "UnionTypeDefinition": return N([A(e, t, n), N([
|
|
378
|
+
r.kind === "UnionTypeExtension" ? "extend " : "",
|
|
329
379
|
"union ",
|
|
330
380
|
n("name"),
|
|
331
|
-
|
|
332
|
-
|
|
381
|
+
y(e, n),
|
|
382
|
+
T(r.types) ? [
|
|
333
383
|
" =",
|
|
334
|
-
|
|
335
|
-
|
|
384
|
+
_("", " "),
|
|
385
|
+
m([_([S, "| "]), d([S, "| "], e.map(n, "types"))])
|
|
336
386
|
] : ""
|
|
337
387
|
])]);
|
|
338
388
|
case "ScalarTypeExtension":
|
|
339
389
|
case "ScalarTypeDefinition": return [
|
|
340
390
|
A(e, t, n),
|
|
341
|
-
|
|
391
|
+
r.kind === "ScalarTypeExtension" ? "extend " : "",
|
|
342
392
|
"scalar ",
|
|
343
393
|
n("name"),
|
|
344
|
-
|
|
394
|
+
y(e, n)
|
|
345
395
|
];
|
|
346
396
|
case "NonNullType": return [n("type"), "!"];
|
|
347
397
|
case "ListType": return [
|
|
@@ -349,302 +399,280 @@ function Dt(e, t, n) {
|
|
|
349
399
|
n("type"),
|
|
350
400
|
"]"
|
|
351
401
|
];
|
|
352
|
-
default: throw new
|
|
402
|
+
default: throw new Le(r, "Graphql", "kind");
|
|
353
403
|
}
|
|
354
404
|
}
|
|
355
|
-
function
|
|
356
|
-
if (n.directives.length === 0) return "";
|
|
357
|
-
let i = E(k, e.map(t, "directives"));
|
|
358
|
-
return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(x([l, i]))];
|
|
359
|
-
}
|
|
360
|
-
function g(e, t, n, i) {
|
|
361
|
-
return e.map(({ isLast: r, node: s }) => {
|
|
362
|
-
let a = n();
|
|
363
|
-
return !r && Se(t.originalText, q(s)) ? [a, f] : a;
|
|
364
|
-
}, i);
|
|
365
|
-
}
|
|
366
|
-
function gt(e) {
|
|
405
|
+
function bt(e) {
|
|
367
406
|
return e.kind !== "Comment";
|
|
368
407
|
}
|
|
369
|
-
function
|
|
408
|
+
function Ft({ node: e }) {
|
|
370
409
|
if (e.kind === "Comment") return "#" + e.value.trimEnd();
|
|
371
410
|
throw new Error("Not a comment: " + JSON.stringify(e));
|
|
372
411
|
}
|
|
373
|
-
function
|
|
374
|
-
let { node: i } = e, r = [], { interfaces: s } = i, a = e.map(n, "interfaces");
|
|
375
|
-
for (let u = 0; u < s.length; u++) {
|
|
376
|
-
let p = s[u];
|
|
377
|
-
r.push(a[u]);
|
|
378
|
-
let T = s[u + 1];
|
|
379
|
-
if (T) {
|
|
380
|
-
let D = t.originalText.slice(p.loc.end, T.loc.start).includes("#");
|
|
381
|
-
r.push(" &", D ? k : " ");
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
return r;
|
|
385
|
-
}
|
|
386
|
-
function Be(e, t) {
|
|
387
|
-
let { node: n } = e;
|
|
388
|
-
return se(n.variableDefinitions) ? y([
|
|
389
|
-
"(",
|
|
390
|
-
x([l, E([I("", ", "), l], e.map(t, "variableDefinitions"))]),
|
|
391
|
-
l,
|
|
392
|
-
")"
|
|
393
|
-
]) : "";
|
|
394
|
-
}
|
|
395
|
-
function Ue(e, t) {
|
|
396
|
-
e.kind === "StringValue" && e.block && !e.value.includes(`
|
|
397
|
-
`) && (t.value = e.value.trim());
|
|
398
|
-
}
|
|
399
|
-
function Ct(e) {
|
|
412
|
+
function Pt(e) {
|
|
400
413
|
let { node: t } = e;
|
|
401
414
|
return t?.comments?.some((n) => n.value.trim() === "prettier-ignore");
|
|
402
415
|
}
|
|
403
|
-
function
|
|
416
|
+
function Mt(e, t) {
|
|
417
|
+
return e?.__kind === t;
|
|
418
|
+
}
|
|
419
|
+
function Je(e) {
|
|
404
420
|
return typeof e == "object" && e !== null;
|
|
405
421
|
}
|
|
406
|
-
function
|
|
407
|
-
if (
|
|
422
|
+
function We(e, t) {
|
|
423
|
+
if (!e) throw new Error(t ?? "Unexpected invariant triggered.");
|
|
408
424
|
}
|
|
409
|
-
function
|
|
410
|
-
let n = 0,
|
|
411
|
-
for (let
|
|
412
|
-
if (typeof
|
|
413
|
-
n =
|
|
425
|
+
function w(e, t) {
|
|
426
|
+
let n = 0, r = 1;
|
|
427
|
+
for (let i of e.body.matchAll(Ut)) {
|
|
428
|
+
if (typeof i.index != "number" && We(!1), i.index >= t) break;
|
|
429
|
+
n = i.index + i[0].length, r += 1;
|
|
414
430
|
}
|
|
415
431
|
return {
|
|
416
|
-
line:
|
|
432
|
+
line: r,
|
|
417
433
|
column: t + 1 - n
|
|
418
434
|
};
|
|
419
435
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
|
-
function
|
|
424
|
-
let n = e.locationOffset.column - 1,
|
|
425
|
-
`,
|
|
426
|
-
if (
|
|
427
|
-
let
|
|
428
|
-
for (let
|
|
429
|
-
return
|
|
430
|
-
[`${a} |`,
|
|
431
|
-
...
|
|
432
|
-
["|", "^".padStart(
|
|
433
|
-
["|",
|
|
436
|
+
function Ee(e) {
|
|
437
|
+
return ne(e.source, w(e.source, e.start));
|
|
438
|
+
}
|
|
439
|
+
function ne(e, t) {
|
|
440
|
+
let n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, p = t.line === 1 ? n : 0, E = t.column + p, x = `${e.name}:${a}:${E}
|
|
441
|
+
`, v = r.split(/\r\n|[\n\r]/g), P = v[i];
|
|
442
|
+
if (P.length > 120) {
|
|
443
|
+
let $ = Math.floor(E / 80), G = E % 80, k = [];
|
|
444
|
+
for (let C = 0; C < P.length; C += 80) k.push(P.slice(C, C + 80));
|
|
445
|
+
return x + ze([
|
|
446
|
+
[`${a} |`, k[0]],
|
|
447
|
+
...k.slice(1, $ + 1).map((C) => ["|", C]),
|
|
448
|
+
["|", "^".padStart(G)],
|
|
449
|
+
["|", k[$ + 1]]
|
|
434
450
|
]);
|
|
435
451
|
}
|
|
436
|
-
return
|
|
437
|
-
[`${a - 1} |`,
|
|
438
|
-
[`${a} |`,
|
|
439
|
-
["|", "^".padStart(
|
|
440
|
-
[`${a + 1} |`,
|
|
452
|
+
return x + ze([
|
|
453
|
+
[`${a - 1} |`, v[i - 1]],
|
|
454
|
+
[`${a} |`, P],
|
|
455
|
+
["|", "^".padStart(E)],
|
|
456
|
+
[`${a + 1} |`, v[i + 1]]
|
|
441
457
|
]);
|
|
442
458
|
}
|
|
443
|
-
function
|
|
444
|
-
let t = e.filter(([
|
|
445
|
-
return t.map(([
|
|
459
|
+
function ze(e) {
|
|
460
|
+
let t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
|
|
461
|
+
return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
|
|
446
462
|
`);
|
|
447
463
|
}
|
|
448
|
-
function
|
|
449
|
-
let t = e[0];
|
|
450
|
-
return t == null || "kind" in t || "length" in t ? {
|
|
451
|
-
nodes: t,
|
|
452
|
-
source: e[1],
|
|
453
|
-
positions: e[2],
|
|
454
|
-
path: e[3],
|
|
455
|
-
originalError: e[4],
|
|
456
|
-
extensions: e[5]
|
|
457
|
-
} : t;
|
|
458
|
-
}
|
|
459
|
-
function Qe(e) {
|
|
464
|
+
function Ze(e) {
|
|
460
465
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
461
466
|
}
|
|
462
|
-
function
|
|
463
|
-
|
|
464
|
-
source: e,
|
|
465
|
-
positions: [t]
|
|
466
|
-
});
|
|
467
|
+
function Te(e, t) {
|
|
468
|
+
if (!e) throw new Error(t);
|
|
467
469
|
}
|
|
468
|
-
function
|
|
470
|
+
function tt(e) {
|
|
469
471
|
return e === 9 || e === 32;
|
|
470
472
|
}
|
|
471
|
-
function
|
|
473
|
+
function L(e) {
|
|
472
474
|
return e >= 48 && e <= 57;
|
|
473
475
|
}
|
|
474
|
-
function
|
|
476
|
+
function nt(e) {
|
|
475
477
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
476
478
|
}
|
|
477
|
-
function
|
|
478
|
-
return
|
|
479
|
+
function xe(e) {
|
|
480
|
+
return nt(e) || e === 95;
|
|
479
481
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
482
|
+
function it(e) {
|
|
483
|
+
return nt(e) || L(e) || e === 95;
|
|
482
484
|
}
|
|
483
|
-
function
|
|
484
|
-
|
|
485
|
-
let
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
let u = e[a], p = Pt(u);
|
|
489
|
-
p !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p));
|
|
485
|
+
function rt(e) {
|
|
486
|
+
let t = Number.MAX_SAFE_INTEGER, n = null, r = -1;
|
|
487
|
+
for (let i = 0; i < e.length; ++i) {
|
|
488
|
+
let s = e[i], a = Mn(s);
|
|
489
|
+
a !== s.length && (n ?? (n = i), r = i, i !== 0 && a < t && (t = a));
|
|
490
490
|
}
|
|
491
|
-
return e.map((
|
|
491
|
+
return e.map((i, s) => s === 0 ? i : i.slice(t)).slice(n ?? 0, r + 1);
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Mn(e) {
|
|
494
494
|
let t = 0;
|
|
495
|
-
for (; t < e.length &&
|
|
495
|
+
for (; t < e.length && tt(e.charCodeAt(t));) ++t;
|
|
496
496
|
return t;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function f(e, t, n) {
|
|
499
|
+
return new R(`Syntax Error: ${n}`, {
|
|
500
|
+
source: e,
|
|
501
|
+
positions: [t]
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function Un() {
|
|
505
|
+
let e;
|
|
506
|
+
try {
|
|
507
|
+
let t = globalThis.process;
|
|
508
|
+
typeof t?.getBuiltinModule == "function" && (e = t.getBuiltinModule("node:diagnostics_channel"));
|
|
509
|
+
} catch {}
|
|
510
|
+
return e;
|
|
511
|
+
}
|
|
512
|
+
function st(e) {
|
|
513
|
+
if (e == null) return !1;
|
|
514
|
+
let t = e.hasSubscribers;
|
|
515
|
+
if (t !== void 0) return t;
|
|
516
|
+
for (let n of Bn) if (e[n].hasSubscribers) return !0;
|
|
517
|
+
return !1;
|
|
518
|
+
}
|
|
519
|
+
function at(e) {
|
|
499
520
|
return e === o.BANG || e === o.DOLLAR || e === o.AMP || e === o.PAREN_L || e === o.PAREN_R || e === o.DOT || e === o.SPREAD || e === o.COLON || e === o.EQUALS || e === o.AT || e === o.BRACKET_L || e === o.BRACKET_R || e === o.BRACE_L || e === o.PIPE || e === o.BRACE_R;
|
|
500
521
|
}
|
|
501
|
-
function
|
|
522
|
+
function U(e) {
|
|
502
523
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
503
524
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
525
|
+
function re(e, t) {
|
|
526
|
+
return ct(e.charCodeAt(t)) && pt(e.charCodeAt(t + 1));
|
|
506
527
|
}
|
|
507
|
-
function
|
|
528
|
+
function ct(e) {
|
|
508
529
|
return e >= 55296 && e <= 56319;
|
|
509
530
|
}
|
|
510
|
-
function
|
|
531
|
+
function pt(e) {
|
|
511
532
|
return e >= 56320 && e <= 57343;
|
|
512
533
|
}
|
|
513
|
-
function
|
|
534
|
+
function F(e, t) {
|
|
514
535
|
let n = e.source.body.codePointAt(t);
|
|
515
536
|
if (n === void 0) return o.EOF;
|
|
516
537
|
if (n >= 32 && n <= 126) {
|
|
517
|
-
let
|
|
518
|
-
return
|
|
538
|
+
let r = String.fromCodePoint(n);
|
|
539
|
+
return r === "\"" ? `'"'` : `"${r}"`;
|
|
519
540
|
}
|
|
520
541
|
return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
|
|
521
542
|
}
|
|
522
|
-
function
|
|
543
|
+
function h(e, t, n, r, i) {
|
|
523
544
|
let s = e.line;
|
|
524
|
-
return new
|
|
545
|
+
return new V(t, n, r, s, 1 + n - e.lineStart, i);
|
|
525
546
|
}
|
|
526
|
-
function
|
|
527
|
-
let n = e.source.body,
|
|
528
|
-
for (;
|
|
529
|
-
let s = n.charCodeAt(
|
|
547
|
+
function Gn(e, t) {
|
|
548
|
+
let n = e.source.body, r = n.length, i = t;
|
|
549
|
+
for (; i < r;) {
|
|
550
|
+
let s = n.charCodeAt(i);
|
|
530
551
|
switch (s) {
|
|
531
552
|
case 65279:
|
|
532
553
|
case 9:
|
|
533
554
|
case 32:
|
|
534
555
|
case 44:
|
|
535
|
-
++
|
|
556
|
+
++i;
|
|
536
557
|
continue;
|
|
537
558
|
case 10:
|
|
538
|
-
++
|
|
559
|
+
++i, ++e.line, e.lineStart = i;
|
|
539
560
|
continue;
|
|
540
561
|
case 13:
|
|
541
|
-
n.charCodeAt(
|
|
562
|
+
n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
|
|
542
563
|
continue;
|
|
543
|
-
case 35: return
|
|
544
|
-
case 33: return
|
|
545
|
-
case 36: return
|
|
546
|
-
case 38: return
|
|
547
|
-
case 40: return
|
|
548
|
-
case 41: return
|
|
549
|
-
case 46:
|
|
550
|
-
|
|
564
|
+
case 35: return Kn(e, i);
|
|
565
|
+
case 33: return h(e, o.BANG, i, i + 1);
|
|
566
|
+
case 36: return h(e, o.DOLLAR, i, i + 1);
|
|
567
|
+
case 38: return h(e, o.AMP, i, i + 1);
|
|
568
|
+
case 40: return h(e, o.PAREN_L, i, i + 1);
|
|
569
|
+
case 41: return h(e, o.PAREN_R, i, i + 1);
|
|
570
|
+
case 46: {
|
|
571
|
+
let a = n.charCodeAt(i + 1);
|
|
572
|
+
if (a === 46 && n.charCodeAt(i + 2) === 46) return h(e, o.SPREAD, i, i + 3);
|
|
573
|
+
if (a === 46) throw f(e.source, i, "Unexpected \"..\", did you mean \"...\"?");
|
|
574
|
+
if (L(a)) {
|
|
575
|
+
let p = e.source.body.slice(i + 1, ie(e, i + 1, a));
|
|
576
|
+
throw f(e.source, i, `Invalid number, expected digit before ".", did you mean "0.${p}"?`);
|
|
577
|
+
}
|
|
551
578
|
break;
|
|
552
|
-
|
|
553
|
-
case
|
|
554
|
-
case
|
|
555
|
-
case
|
|
556
|
-
case
|
|
557
|
-
case
|
|
558
|
-
case
|
|
559
|
-
case
|
|
560
|
-
case
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
if (
|
|
564
|
-
|
|
579
|
+
}
|
|
580
|
+
case 58: return h(e, o.COLON, i, i + 1);
|
|
581
|
+
case 61: return h(e, o.EQUALS, i, i + 1);
|
|
582
|
+
case 64: return h(e, o.AT, i, i + 1);
|
|
583
|
+
case 91: return h(e, o.BRACKET_L, i, i + 1);
|
|
584
|
+
case 93: return h(e, o.BRACKET_R, i, i + 1);
|
|
585
|
+
case 123: return h(e, o.BRACE_L, i, i + 1);
|
|
586
|
+
case 124: return h(e, o.PIPE, i, i + 1);
|
|
587
|
+
case 125: return h(e, o.BRACE_R, i, i + 1);
|
|
588
|
+
case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Xn(e, i) : Yn(e, i);
|
|
589
|
+
}
|
|
590
|
+
if (L(s) || s === 45) return jn(e, i, s);
|
|
591
|
+
if (xe(s)) return Hn(e, i);
|
|
592
|
+
throw f(e.source, i, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : U(s) || re(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`);
|
|
565
593
|
}
|
|
566
|
-
return
|
|
594
|
+
return h(e, o.EOF, r, r);
|
|
567
595
|
}
|
|
568
|
-
function
|
|
569
|
-
let n = e.source.body,
|
|
570
|
-
for (;
|
|
571
|
-
let s = n.charCodeAt(
|
|
596
|
+
function Kn(e, t) {
|
|
597
|
+
let n = e.source.body, r = n.length, i = t + 1;
|
|
598
|
+
for (; i < r;) {
|
|
599
|
+
let s = n.charCodeAt(i);
|
|
572
600
|
if (s === 10 || s === 13) break;
|
|
573
|
-
if (
|
|
574
|
-
else if (
|
|
601
|
+
if (U(s)) ++i;
|
|
602
|
+
else if (re(n, i)) i += 2;
|
|
575
603
|
else break;
|
|
576
604
|
}
|
|
577
|
-
return
|
|
578
|
-
}
|
|
579
|
-
function
|
|
580
|
-
let
|
|
581
|
-
if (s === 45 && (s =
|
|
582
|
-
if (s =
|
|
583
|
-
} else
|
|
584
|
-
if (s === 46 && (a = !0, s =
|
|
585
|
-
return
|
|
586
|
-
}
|
|
587
|
-
function
|
|
588
|
-
if (!
|
|
589
|
-
let
|
|
590
|
-
for (;
|
|
591
|
-
return
|
|
592
|
-
}
|
|
593
|
-
function
|
|
594
|
-
let n = e.source.body,
|
|
595
|
-
for (;
|
|
596
|
-
let
|
|
597
|
-
if (
|
|
598
|
-
if (
|
|
599
|
-
a += n.slice(s,
|
|
600
|
-
let
|
|
601
|
-
a +=
|
|
605
|
+
return h(e, o.COMMENT, t, i, n.slice(t + 1, i));
|
|
606
|
+
}
|
|
607
|
+
function jn(e, t, n) {
|
|
608
|
+
let r = e.source.body, i = t, s = n, a = !1;
|
|
609
|
+
if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
|
|
610
|
+
if (s = r.charCodeAt(++i), L(s)) throw f(e.source, i, `Invalid number, unexpected digit after 0: ${F(e, i)}.`);
|
|
611
|
+
} else i = ie(e, i, s), s = r.charCodeAt(i);
|
|
612
|
+
if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ie(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ie(e, i, s), s = r.charCodeAt(i)), s === 46 || xe(s)) throw f(e.source, i, `Invalid number, expected digit but got: ${F(e, i)}.`);
|
|
613
|
+
return h(e, a ? o.FLOAT : o.INT, t, i, r.slice(t, i));
|
|
614
|
+
}
|
|
615
|
+
function ie(e, t, n) {
|
|
616
|
+
if (!L(n)) throw f(e.source, t, `Invalid number, expected digit but got: ${F(e, t)}.`);
|
|
617
|
+
let r = e.source.body, i = t + 1;
|
|
618
|
+
for (; L(r.charCodeAt(i));) ++i;
|
|
619
|
+
return i;
|
|
620
|
+
}
|
|
621
|
+
function Yn(e, t) {
|
|
622
|
+
let n = e.source.body, r = n.length, i = t + 1, s = i, a = "";
|
|
623
|
+
for (; i < r;) {
|
|
624
|
+
let p = n.charCodeAt(i);
|
|
625
|
+
if (p === 34) return a += n.slice(s, i), h(e, o.STRING, t, i + 1, a);
|
|
626
|
+
if (p === 92) {
|
|
627
|
+
a += n.slice(s, i);
|
|
628
|
+
let E = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? qn(e, i) : Qn(e, i) : $n(e, i);
|
|
629
|
+
a += E.value, i += E.size, s = i;
|
|
602
630
|
continue;
|
|
603
631
|
}
|
|
604
|
-
if (
|
|
605
|
-
if (
|
|
606
|
-
else if (
|
|
607
|
-
else throw
|
|
632
|
+
if (p === 10 || p === 13) break;
|
|
633
|
+
if (U(p)) ++i;
|
|
634
|
+
else if (re(n, i)) i += 2;
|
|
635
|
+
else throw f(e.source, i, `Invalid character within String: ${F(e, i)}.`);
|
|
608
636
|
}
|
|
609
|
-
throw
|
|
637
|
+
throw f(e.source, i, "Unterminated string.");
|
|
610
638
|
}
|
|
611
|
-
function
|
|
612
|
-
let n = e.source.body,
|
|
613
|
-
for (;
|
|
614
|
-
let s = n.charCodeAt(t +
|
|
639
|
+
function qn(e, t) {
|
|
640
|
+
let n = e.source.body, r = 0, i = 3;
|
|
641
|
+
for (; i < 12;) {
|
|
642
|
+
let s = n.charCodeAt(t + i++);
|
|
615
643
|
if (s === 125) {
|
|
616
|
-
if (
|
|
644
|
+
if (i < 5 || !U(r)) break;
|
|
617
645
|
return {
|
|
618
|
-
value: String.fromCodePoint(
|
|
619
|
-
size:
|
|
646
|
+
value: String.fromCodePoint(r),
|
|
647
|
+
size: i
|
|
620
648
|
};
|
|
621
649
|
}
|
|
622
|
-
if (
|
|
650
|
+
if (r = r << 4 | q(s), r < 0) break;
|
|
623
651
|
}
|
|
624
|
-
throw
|
|
652
|
+
throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + i)}".`);
|
|
625
653
|
}
|
|
626
|
-
function
|
|
627
|
-
let n = e.source.body,
|
|
628
|
-
if (
|
|
629
|
-
value: String.fromCodePoint(
|
|
654
|
+
function Qn(e, t) {
|
|
655
|
+
let n = e.source.body, r = ot(n, t + 2);
|
|
656
|
+
if (U(r)) return {
|
|
657
|
+
value: String.fromCodePoint(r),
|
|
630
658
|
size: 6
|
|
631
659
|
};
|
|
632
|
-
if (
|
|
633
|
-
let
|
|
634
|
-
if (
|
|
635
|
-
value: String.fromCodePoint(
|
|
660
|
+
if (ct(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
661
|
+
let i = ot(n, t + 8);
|
|
662
|
+
if (pt(i)) return {
|
|
663
|
+
value: String.fromCodePoint(r, i),
|
|
636
664
|
size: 12
|
|
637
665
|
};
|
|
638
666
|
}
|
|
639
|
-
throw
|
|
667
|
+
throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
|
|
640
668
|
}
|
|
641
|
-
function
|
|
642
|
-
return
|
|
669
|
+
function ot(e, t) {
|
|
670
|
+
return q(e.charCodeAt(t)) << 12 | q(e.charCodeAt(t + 1)) << 8 | q(e.charCodeAt(t + 2)) << 4 | q(e.charCodeAt(t + 3));
|
|
643
671
|
}
|
|
644
|
-
function
|
|
672
|
+
function q(e) {
|
|
645
673
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
646
674
|
}
|
|
647
|
-
function
|
|
675
|
+
function $n(e, t) {
|
|
648
676
|
let n = e.source.body;
|
|
649
677
|
switch (n.charCodeAt(t + 1)) {
|
|
650
678
|
case 34: return {
|
|
@@ -681,220 +709,178 @@ function Gt(e, t) {
|
|
|
681
709
|
size: 2
|
|
682
710
|
};
|
|
683
711
|
}
|
|
684
|
-
throw
|
|
685
|
-
}
|
|
686
|
-
function
|
|
687
|
-
let n = e.source.body,
|
|
688
|
-
for (; s <
|
|
689
|
-
let
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
let
|
|
712
|
+
throw f(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
|
|
713
|
+
}
|
|
714
|
+
function Xn(e, t) {
|
|
715
|
+
let n = e.source.body, r = n.length, i = e.lineStart, s = t + 3, a = s, p = "", E = [];
|
|
716
|
+
for (; s < r;) {
|
|
717
|
+
let x = n.charCodeAt(s);
|
|
718
|
+
if (x === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
719
|
+
p += n.slice(a, s), E.push(p);
|
|
720
|
+
let v = h(e, o.BLOCK_STRING, t, s + 3, rt(E).join(`
|
|
693
721
|
`));
|
|
694
|
-
return e.line +=
|
|
722
|
+
return e.line += E.length - 1, e.lineStart = i, v;
|
|
695
723
|
}
|
|
696
|
-
if (
|
|
697
|
-
|
|
724
|
+
if (x === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
|
|
725
|
+
p += n.slice(a, s), a = s + 1, s += 4;
|
|
698
726
|
continue;
|
|
699
727
|
}
|
|
700
|
-
if (
|
|
701
|
-
|
|
728
|
+
if (x === 10 || x === 13) {
|
|
729
|
+
p += n.slice(a, s), E.push(p), x === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, p = "", a = s, i = s;
|
|
702
730
|
continue;
|
|
703
731
|
}
|
|
704
|
-
if (
|
|
705
|
-
else if (
|
|
706
|
-
else throw
|
|
732
|
+
if (U(x)) ++s;
|
|
733
|
+
else if (re(n, s)) s += 2;
|
|
734
|
+
else throw f(e.source, s, `Invalid character within String: ${F(e, s)}.`);
|
|
707
735
|
}
|
|
708
|
-
throw
|
|
736
|
+
throw f(e.source, s, "Unterminated string.");
|
|
709
737
|
}
|
|
710
|
-
function
|
|
711
|
-
let n = e.source.body,
|
|
712
|
-
for (;
|
|
738
|
+
function Hn(e, t) {
|
|
739
|
+
let n = e.source.body, r = n.length, i = t + 1;
|
|
740
|
+
for (; i < r;) if (it(n.charCodeAt(i))) ++i;
|
|
713
741
|
else break;
|
|
714
|
-
return
|
|
715
|
-
}
|
|
716
|
-
function Z(e, t) {
|
|
717
|
-
if (!!!e) throw new Error(t);
|
|
718
|
-
}
|
|
719
|
-
function ee(e) {
|
|
720
|
-
return te(e, []);
|
|
721
|
-
}
|
|
722
|
-
function te(e, t) {
|
|
723
|
-
switch (typeof e) {
|
|
724
|
-
case "string": return JSON.stringify(e);
|
|
725
|
-
case "function": return e.name ? `[function ${e.name}]` : "[function]";
|
|
726
|
-
case "object": return $t(e, t);
|
|
727
|
-
default: return String(e);
|
|
728
|
-
}
|
|
742
|
+
return h(e, o.NAME, t, i, n.slice(t, i));
|
|
729
743
|
}
|
|
730
|
-
function
|
|
731
|
-
|
|
732
|
-
if (t.includes(e)) return "[Circular]";
|
|
733
|
-
let n = [...t, e];
|
|
734
|
-
if (Xt(e)) {
|
|
735
|
-
let i = e.toJSON();
|
|
736
|
-
if (i !== e) return typeof i == "string" ? i : te(i, n);
|
|
737
|
-
} else if (Array.isArray(e)) return Jt(e, n);
|
|
738
|
-
return Ht(e, n);
|
|
739
|
-
}
|
|
740
|
-
function Xt(e) {
|
|
741
|
-
return typeof e.toJSON == "function";
|
|
742
|
-
}
|
|
743
|
-
function Ht(e, t) {
|
|
744
|
-
let n = Object.entries(e);
|
|
745
|
-
return n.length === 0 ? "{}" : t.length > 2 ? "[" + qt(e) + "]" : "{ " + n.map(([r, s]) => r + ": " + te(s, t)).join(", ") + " }";
|
|
746
|
-
}
|
|
747
|
-
function Jt(e, t) {
|
|
748
|
-
if (e.length === 0) return "[]";
|
|
749
|
-
if (t.length > 2) return "[Array]";
|
|
750
|
-
let n = Math.min(10, e.length), i = e.length - n, r = [];
|
|
751
|
-
for (let s = 0; s < n; ++s) r.push(te(e[s], t));
|
|
752
|
-
return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
|
|
753
|
-
}
|
|
754
|
-
function qt(e) {
|
|
755
|
-
let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
756
|
-
if (t === "Object" && typeof e.constructor == "function") {
|
|
757
|
-
let n = e.constructor.name;
|
|
758
|
-
if (typeof n == "string" && n !== "") return n;
|
|
759
|
-
}
|
|
760
|
-
return t;
|
|
744
|
+
function lt(e) {
|
|
745
|
+
return He(e, ut, B);
|
|
761
746
|
}
|
|
762
|
-
function
|
|
763
|
-
return
|
|
747
|
+
function oe(e, t) {
|
|
748
|
+
return st(Ne) ? Ne.traceSync(() => dt(e, t), { source: e }) : dt(e, t);
|
|
764
749
|
}
|
|
765
|
-
function
|
|
766
|
-
let n = new
|
|
767
|
-
return Object.defineProperty(
|
|
750
|
+
function dt(e, t) {
|
|
751
|
+
let n = new De(e, t), r = n.parseDocument();
|
|
752
|
+
return Object.defineProperty(r, "tokenCount", {
|
|
768
753
|
enumerable: !1,
|
|
769
754
|
value: n.tokenCount
|
|
770
|
-
}),
|
|
755
|
+
}), r;
|
|
771
756
|
}
|
|
772
|
-
function
|
|
757
|
+
function se(e) {
|
|
773
758
|
let t = e.value;
|
|
774
|
-
return
|
|
759
|
+
return ft(e.kind) + (t != null ? ` "${t}"` : "");
|
|
775
760
|
}
|
|
776
|
-
function
|
|
777
|
-
return
|
|
761
|
+
function ft(e) {
|
|
762
|
+
return at(e) ? `"${e}"` : e;
|
|
778
763
|
}
|
|
779
|
-
function
|
|
764
|
+
function ei(e, t) {
|
|
780
765
|
let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
|
|
781
766
|
return Object.assign(n, t);
|
|
782
767
|
}
|
|
783
|
-
function
|
|
784
|
-
let t = [], { startToken: n, endToken:
|
|
785
|
-
for (let
|
|
786
|
-
...
|
|
768
|
+
function ti(e) {
|
|
769
|
+
let t = [], { startToken: n, endToken: r } = e.loc;
|
|
770
|
+
for (let i = n; i !== r; i = i.next) i.kind === "Comment" && t.push({
|
|
771
|
+
...i,
|
|
787
772
|
loc: {
|
|
788
|
-
start:
|
|
789
|
-
end:
|
|
773
|
+
start: i.start,
|
|
774
|
+
end: i.end
|
|
790
775
|
}
|
|
791
776
|
});
|
|
792
777
|
return t;
|
|
793
778
|
}
|
|
794
|
-
function
|
|
795
|
-
if (e
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}
|
|
802
|
-
return e;
|
|
779
|
+
function ii(e) {
|
|
780
|
+
if (!(e instanceof R)) return e;
|
|
781
|
+
let { message: t, locations: [n] } = e;
|
|
782
|
+
return mt(t, {
|
|
783
|
+
loc: { start: n },
|
|
784
|
+
cause: e
|
|
785
|
+
});
|
|
803
786
|
}
|
|
804
|
-
function
|
|
787
|
+
function ri(e) {
|
|
805
788
|
let t;
|
|
806
789
|
try {
|
|
807
|
-
t =
|
|
790
|
+
t = oe(e, ni);
|
|
808
791
|
} catch (n) {
|
|
809
|
-
throw
|
|
792
|
+
throw ii(n);
|
|
810
793
|
}
|
|
811
|
-
return t.comments =
|
|
794
|
+
return t.comments = ti(t), t;
|
|
812
795
|
}
|
|
813
|
-
var
|
|
796
|
+
var Et, ae, ht, Ae, Tt, X, yt, ce, Ie, ge, Se, H, Oe, O, J, pe, S, u, l, z, ve, ke, Ce, Z, Re, At, T, le, Le, K, St, be, D, Pe, ee, te, we, Ve, Me, Ue, Be, Ge, Ke, je, Ye, qe, Qe, Xe, _e, He, Ut, R, et, Y, V, M, c, Gt, Kt, jt, Yt, qt, Qt, $t, Xt, Ht, Jt, Wt, zt, Zt, en, tn, nn, rn, sn, on, an, cn, pn, un, ln, dn, fn, mn, hn, En, Tn, xn, yn, Nn, Dn, _n, An, In, gn, Sn, On, vn, kn, Cn, Rn, Ln, bn, Fn, Pn, wn, Vn, ye, b, Ne, Bn, o, Q, ut, B, De, mt, ni, si, oi;
|
|
814
797
|
//#endregion
|
|
815
798
|
__esmMin((() => {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
for (var n in t)
|
|
799
|
+
Et = Object.defineProperty;
|
|
800
|
+
ae = (e, t) => {
|
|
801
|
+
for (var n in t) Et(e, n, {
|
|
819
802
|
get: t[n],
|
|
820
803
|
enumerable: !0
|
|
821
804
|
});
|
|
822
805
|
};
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
languages: () =>
|
|
826
|
-
options: () =>
|
|
827
|
-
parsers: () =>
|
|
828
|
-
printers: () =>
|
|
806
|
+
ht = {};
|
|
807
|
+
ae(ht, {
|
|
808
|
+
languages: () => Qe,
|
|
809
|
+
options: () => Xe,
|
|
810
|
+
parsers: () => _e,
|
|
811
|
+
printers: () => oi
|
|
829
812
|
});
|
|
830
|
-
|
|
831
|
-
|
|
813
|
+
Ae = (e, t) => (n, r, ...i) => n | 1 && r == null ? void 0 : (t.call(r) ?? r[e]).apply(r, i);
|
|
814
|
+
Tt = String.prototype.replaceAll ?? function(e, t) {
|
|
832
815
|
return e.global ? this.replace(e, t) : this.split(e).join(t);
|
|
833
|
-
}
|
|
834
|
-
|
|
816
|
+
};
|
|
817
|
+
X = Ae("replaceAll", function() {
|
|
818
|
+
if (typeof this == "string") return Tt;
|
|
835
819
|
});
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
820
|
+
yt = () => {};
|
|
821
|
+
ce = yt;
|
|
822
|
+
Ie = "indent";
|
|
823
|
+
ge = "group";
|
|
824
|
+
Se = "if-break";
|
|
825
|
+
H = "line";
|
|
826
|
+
Oe = "break-parent";
|
|
827
|
+
O = ce;
|
|
828
|
+
J = ce;
|
|
829
|
+
pe = { type: Oe };
|
|
830
|
+
S = { type: H };
|
|
831
|
+
u = {
|
|
832
|
+
type: H,
|
|
846
833
|
soft: !0
|
|
847
|
-
}
|
|
848
|
-
|
|
834
|
+
};
|
|
835
|
+
l = [{
|
|
836
|
+
type: H,
|
|
849
837
|
hard: !0
|
|
850
|
-
},
|
|
851
|
-
|
|
852
|
-
|
|
838
|
+
}, pe];
|
|
839
|
+
z = W(" ");
|
|
840
|
+
ve = W(",; ");
|
|
841
|
+
ke = W(/[^\n\r]/);
|
|
842
|
+
Ce = (e) => e === `
|
|
853
843
|
` || e === "\r" || e === "\u2028" || e === "\u2029";
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
se = _t;
|
|
860
|
-
oe = class extends Error {
|
|
844
|
+
Z = Dt;
|
|
845
|
+
Re = _t;
|
|
846
|
+
At = () => !0;
|
|
847
|
+
T = gt;
|
|
848
|
+
le = class extends Error {
|
|
861
849
|
name = "UnexpectedNodeError";
|
|
862
|
-
constructor(t, n,
|
|
863
|
-
super(`Unexpected ${n} node ${
|
|
864
|
-
}
|
|
865
|
-
}, ke = oe;
|
|
866
|
-
P = null;
|
|
867
|
-
yt = 10;
|
|
868
|
-
for (let e = 0; e <= yt; e++) w();
|
|
869
|
-
Ce = At, H = class {
|
|
870
|
-
constructor(t, n, i) {
|
|
871
|
-
this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
|
|
872
|
-
}
|
|
873
|
-
get [Symbol.toStringTag]() {
|
|
874
|
-
return "Location";
|
|
850
|
+
constructor(t, n, r = "type") {
|
|
851
|
+
super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`), this.node = t;
|
|
875
852
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
853
|
+
};
|
|
854
|
+
Le = le;
|
|
855
|
+
K = null;
|
|
856
|
+
St = 10;
|
|
857
|
+
for (let e = 0; e <= St; e++) j();
|
|
858
|
+
be = Ot;
|
|
859
|
+
D = [
|
|
860
|
+
["name"],
|
|
861
|
+
["name", "value"],
|
|
862
|
+
["type"],
|
|
863
|
+
[
|
|
864
|
+
"description",
|
|
865
|
+
"name",
|
|
866
|
+
"directives"
|
|
867
|
+
],
|
|
868
|
+
[
|
|
869
|
+
"description",
|
|
870
|
+
"name",
|
|
871
|
+
"interfaces",
|
|
872
|
+
"directives",
|
|
873
|
+
"fields"
|
|
874
|
+
],
|
|
875
|
+
["name", "directives"],
|
|
876
|
+
[
|
|
877
|
+
"name",
|
|
878
|
+
"interfaces",
|
|
879
|
+
"directives",
|
|
880
|
+
"fields"
|
|
881
|
+
]
|
|
882
|
+
];
|
|
883
|
+
Pe = be({
|
|
898
884
|
Name: [],
|
|
899
885
|
Document: ["definitions"],
|
|
900
886
|
OperationDefinition: [
|
|
@@ -911,7 +897,7 @@ __esmMin((() => {
|
|
|
911
897
|
"defaultValue",
|
|
912
898
|
"directives"
|
|
913
899
|
],
|
|
914
|
-
Variable: [
|
|
900
|
+
Variable: D[0],
|
|
915
901
|
SelectionSet: ["selections"],
|
|
916
902
|
Field: [
|
|
917
903
|
"alias",
|
|
@@ -920,8 +906,13 @@ __esmMin((() => {
|
|
|
920
906
|
"directives",
|
|
921
907
|
"selectionSet"
|
|
922
908
|
],
|
|
923
|
-
Argument: [
|
|
924
|
-
|
|
909
|
+
Argument: D[1],
|
|
910
|
+
FragmentArgument: D[1],
|
|
911
|
+
FragmentSpread: [
|
|
912
|
+
"name",
|
|
913
|
+
"arguments",
|
|
914
|
+
"directives"
|
|
915
|
+
],
|
|
925
916
|
InlineFragment: [
|
|
926
917
|
"typeCondition",
|
|
927
918
|
"directives",
|
|
@@ -943,29 +934,19 @@ __esmMin((() => {
|
|
|
943
934
|
EnumValue: [],
|
|
944
935
|
ListValue: ["values"],
|
|
945
936
|
ObjectValue: ["fields"],
|
|
946
|
-
ObjectField: [
|
|
937
|
+
ObjectField: D[1],
|
|
947
938
|
Directive: ["name", "arguments"],
|
|
948
|
-
NamedType: [
|
|
949
|
-
ListType: [
|
|
950
|
-
NonNullType: [
|
|
939
|
+
NamedType: D[0],
|
|
940
|
+
ListType: D[2],
|
|
941
|
+
NonNullType: D[2],
|
|
951
942
|
SchemaDefinition: [
|
|
952
943
|
"description",
|
|
953
944
|
"directives",
|
|
954
945
|
"operationTypes"
|
|
955
946
|
],
|
|
956
|
-
OperationTypeDefinition: [
|
|
957
|
-
ScalarTypeDefinition: [
|
|
958
|
-
|
|
959
|
-
"name",
|
|
960
|
-
"directives"
|
|
961
|
-
],
|
|
962
|
-
ObjectTypeDefinition: [
|
|
963
|
-
"description",
|
|
964
|
-
"name",
|
|
965
|
-
"interfaces",
|
|
966
|
-
"directives",
|
|
967
|
-
"fields"
|
|
968
|
-
],
|
|
947
|
+
OperationTypeDefinition: D[2],
|
|
948
|
+
ScalarTypeDefinition: D[3],
|
|
949
|
+
ObjectTypeDefinition: D[4],
|
|
969
950
|
FieldDefinition: [
|
|
970
951
|
"description",
|
|
971
952
|
"name",
|
|
@@ -980,13 +961,7 @@ __esmMin((() => {
|
|
|
980
961
|
"defaultValue",
|
|
981
962
|
"directives"
|
|
982
963
|
],
|
|
983
|
-
InterfaceTypeDefinition: [
|
|
984
|
-
"description",
|
|
985
|
-
"name",
|
|
986
|
-
"interfaces",
|
|
987
|
-
"directives",
|
|
988
|
-
"fields"
|
|
989
|
-
],
|
|
964
|
+
InterfaceTypeDefinition: D[4],
|
|
990
965
|
UnionTypeDefinition: [
|
|
991
966
|
"description",
|
|
992
967
|
"name",
|
|
@@ -999,11 +974,7 @@ __esmMin((() => {
|
|
|
999
974
|
"directives",
|
|
1000
975
|
"values"
|
|
1001
976
|
],
|
|
1002
|
-
EnumValueDefinition: [
|
|
1003
|
-
"description",
|
|
1004
|
-
"name",
|
|
1005
|
-
"directives"
|
|
1006
|
-
],
|
|
977
|
+
EnumValueDefinition: D[3],
|
|
1007
978
|
InputObjectTypeDefinition: [
|
|
1008
979
|
"description",
|
|
1009
980
|
"name",
|
|
@@ -1014,22 +985,14 @@ __esmMin((() => {
|
|
|
1014
985
|
"description",
|
|
1015
986
|
"name",
|
|
1016
987
|
"arguments",
|
|
988
|
+
"directives",
|
|
1017
989
|
"locations"
|
|
1018
990
|
],
|
|
1019
991
|
SchemaExtension: ["directives", "operationTypes"],
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
"directives",
|
|
1025
|
-
"fields"
|
|
1026
|
-
],
|
|
1027
|
-
InterfaceTypeExtension: [
|
|
1028
|
-
"name",
|
|
1029
|
-
"interfaces",
|
|
1030
|
-
"directives",
|
|
1031
|
-
"fields"
|
|
1032
|
-
],
|
|
992
|
+
DirectiveExtension: D[5],
|
|
993
|
+
ScalarTypeExtension: D[5],
|
|
994
|
+
ObjectTypeExtension: D[6],
|
|
995
|
+
InterfaceTypeExtension: D[6],
|
|
1033
996
|
UnionTypeExtension: [
|
|
1034
997
|
"name",
|
|
1035
998
|
"directives",
|
|
@@ -1044,47 +1007,32 @@ __esmMin((() => {
|
|
|
1044
1007
|
"name",
|
|
1045
1008
|
"directives",
|
|
1046
1009
|
"fields"
|
|
1047
|
-
]
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}
|
|
1058
|
-
new Set(Object.keys(ce));
|
|
1059
|
-
(function(e) {
|
|
1060
|
-
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
1061
|
-
})(C || (C = {}));
|
|
1062
|
-
Re = { ...ce };
|
|
1063
|
-
for (let e of [
|
|
1064
|
-
"ArgumentCoordinate",
|
|
1065
|
-
"DirectiveArgumentCoordinate",
|
|
1066
|
-
"DirectiveCoordinate",
|
|
1067
|
-
"MemberCoordinate",
|
|
1068
|
-
"TypeCoordinate"
|
|
1069
|
-
]) delete Re[e];
|
|
1070
|
-
be = Ce(Re, "kind");
|
|
1071
|
-
J = (e) => e.loc.start, q = (e) => e.loc.end;
|
|
1072
|
-
Le = "format", Pe = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, we = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;
|
|
1073
|
-
Fe = (e) => we.test(e), Me = (e) => Pe.test(e), Ve = (e) => `# @${Le}
|
|
1010
|
+
]
|
|
1011
|
+
}, "kind");
|
|
1012
|
+
ee = (e) => e.loc.start;
|
|
1013
|
+
te = (e) => e.loc.end;
|
|
1014
|
+
fe.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
|
|
1015
|
+
we = "format";
|
|
1016
|
+
Ve = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/;
|
|
1017
|
+
Me = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;
|
|
1018
|
+
Ue = (e) => Me.test(e);
|
|
1019
|
+
Be = (e) => Ve.test(e);
|
|
1020
|
+
Ge = (e) => `# @${we}
|
|
1074
1021
|
|
|
1075
1022
|
${e}`;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1023
|
+
Ke = kt;
|
|
1024
|
+
je = Ct;
|
|
1025
|
+
Ye = Rt;
|
|
1026
|
+
qe = {
|
|
1027
|
+
print: Lt,
|
|
1028
|
+
massageAstNode: fe,
|
|
1029
|
+
hasPrettierIgnore: Pt,
|
|
1030
|
+
insertPragma: Ge,
|
|
1031
|
+
printComment: Ft,
|
|
1032
|
+
canAttachComment: bt,
|
|
1033
|
+
getVisitorKeys: Pe
|
|
1086
1034
|
};
|
|
1087
|
-
|
|
1035
|
+
Qe = [{
|
|
1088
1036
|
name: "GraphQL",
|
|
1089
1037
|
type: "data",
|
|
1090
1038
|
aceMode: "graphqlschema",
|
|
@@ -1098,7 +1046,7 @@ ${e}`;
|
|
|
1098
1046
|
vscodeLanguageIds: ["graphql"],
|
|
1099
1047
|
linguistLanguageId: 139
|
|
1100
1048
|
}];
|
|
1101
|
-
|
|
1049
|
+
Xe = { bracketSpacing: {
|
|
1102
1050
|
bracketSpacing: {
|
|
1103
1051
|
category: "Common",
|
|
1104
1052
|
type: "boolean",
|
|
@@ -1158,18 +1106,20 @@ ${e}`;
|
|
|
1158
1106
|
description: "Enforce single attribute per line in HTML, Vue and JSX."
|
|
1159
1107
|
}
|
|
1160
1108
|
}.bracketSpacing };
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
let { nodes:
|
|
1168
|
-
super(t
|
|
1169
|
-
let
|
|
1170
|
-
this.
|
|
1171
|
-
let
|
|
1172
|
-
this.
|
|
1109
|
+
_e = {};
|
|
1110
|
+
ae(_e, { graphql: () => si });
|
|
1111
|
+
He = Mt;
|
|
1112
|
+
Ut = /\r\n|[\n\r]/g;
|
|
1113
|
+
R = class e extends Error {
|
|
1114
|
+
constructor(t, n = {}) {
|
|
1115
|
+
let { nodes: r, source: i, positions: s, path: a, originalError: p, cause: E, extensions: x } = n, v = "cause" in n;
|
|
1116
|
+
super(t, v || p != null ? { cause: v ? E : p } : void 0), this.name = "GraphQLError", this.path = a ?? void 0;
|
|
1117
|
+
let G = p ?? (E instanceof Error ? E : void 0);
|
|
1118
|
+
this.originalError = G, this.nodes = Ze(Array.isArray(r) ? r : r ? [r] : void 0);
|
|
1119
|
+
let k = Ze(this.nodes?.map((g) => g.loc).filter((g) => g != null));
|
|
1120
|
+
this.source = i ?? k?.[0]?.source, this.positions = s ?? k?.map((g) => g.start), this.locations = s && i ? s.map((g) => w(i, g)) : k?.map((g) => w(g.source, g.start));
|
|
1121
|
+
let C = Je(G?.extensions) ? G.extensions : void 0;
|
|
1122
|
+
this.extensions = x ?? C ?? Object.create(null), Object.defineProperties(this, {
|
|
1173
1123
|
message: {
|
|
1174
1124
|
writable: !0,
|
|
1175
1125
|
enumerable: !0
|
|
@@ -1179,11 +1129,11 @@ ${e}`;
|
|
|
1179
1129
|
source: { enumerable: !1 },
|
|
1180
1130
|
positions: { enumerable: !1 },
|
|
1181
1131
|
originalError: { enumerable: !1 }
|
|
1182
|
-
}),
|
|
1183
|
-
value:
|
|
1132
|
+
}), p?.stack != null ? Object.defineProperty(this, "stack", {
|
|
1133
|
+
value: p.stack,
|
|
1184
1134
|
writable: !0,
|
|
1185
1135
|
configurable: !0
|
|
1186
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
|
|
1136
|
+
}) : Error.captureStackTrace != null ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
|
|
1187
1137
|
value: Error().stack,
|
|
1188
1138
|
writable: !0,
|
|
1189
1139
|
configurable: !0
|
|
@@ -1196,10 +1146,10 @@ ${e}`;
|
|
|
1196
1146
|
let t = this.message;
|
|
1197
1147
|
if (this.nodes) for (let n of this.nodes) n.loc && (t += `
|
|
1198
1148
|
|
|
1199
|
-
` +
|
|
1149
|
+
` + Ee(n.loc));
|
|
1200
1150
|
else if (this.source && this.locations) for (let n of this.locations) t += `
|
|
1201
1151
|
|
|
1202
|
-
` +
|
|
1152
|
+
` + ne(this.source, n);
|
|
1203
1153
|
return t;
|
|
1204
1154
|
}
|
|
1205
1155
|
toJSON() {
|
|
@@ -1207,18 +1157,211 @@ ${e}`;
|
|
|
1207
1157
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
1208
1158
|
}
|
|
1209
1159
|
};
|
|
1210
|
-
(
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1160
|
+
et = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
1161
|
+
Y = class {
|
|
1162
|
+
constructor(t, n, r) {
|
|
1163
|
+
this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
|
|
1164
|
+
}
|
|
1165
|
+
get [Symbol.toStringTag]() {
|
|
1166
|
+
return "Location";
|
|
1167
|
+
}
|
|
1168
|
+
toJSON() {
|
|
1169
|
+
return {
|
|
1170
|
+
start: this.start,
|
|
1171
|
+
end: this.end
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
V = class {
|
|
1176
|
+
constructor(t, n, r, i, s, a) {
|
|
1177
|
+
this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
|
|
1178
|
+
}
|
|
1179
|
+
get [Symbol.toStringTag]() {
|
|
1180
|
+
return "Token";
|
|
1181
|
+
}
|
|
1182
|
+
toJSON() {
|
|
1183
|
+
return {
|
|
1184
|
+
kind: this.kind,
|
|
1185
|
+
value: this.value,
|
|
1186
|
+
line: this.line,
|
|
1187
|
+
column: this.column
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
M = {
|
|
1192
|
+
QUERY: "query",
|
|
1193
|
+
MUTATION: "mutation",
|
|
1194
|
+
SUBSCRIPTION: "subscription"
|
|
1195
|
+
};
|
|
1196
|
+
c = {};
|
|
1197
|
+
ae(c, {
|
|
1198
|
+
ARGUMENT: () => $t,
|
|
1199
|
+
ARGUMENT_COORDINATE: () => Pn,
|
|
1200
|
+
BOOLEAN: () => nn,
|
|
1201
|
+
DIRECTIVE: () => pn,
|
|
1202
|
+
DIRECTIVE_ARGUMENT_COORDINATE: () => Vn,
|
|
1203
|
+
DIRECTIVE_COORDINATE: () => wn,
|
|
1204
|
+
DIRECTIVE_DEFINITION: () => In,
|
|
1205
|
+
DIRECTIVE_EXTENSION: () => Sn,
|
|
1206
|
+
DOCUMENT: () => Kt,
|
|
1207
|
+
ENUM: () => sn,
|
|
1208
|
+
ENUM_TYPE_DEFINITION: () => Dn,
|
|
1209
|
+
ENUM_TYPE_EXTENSION: () => Rn,
|
|
1210
|
+
ENUM_VALUE_DEFINITION: () => _n,
|
|
1211
|
+
FIELD: () => Qt,
|
|
1212
|
+
FIELD_DEFINITION: () => Tn,
|
|
1213
|
+
FLOAT: () => en,
|
|
1214
|
+
FRAGMENT_ARGUMENT: () => Xt,
|
|
1215
|
+
FRAGMENT_DEFINITION: () => Wt,
|
|
1216
|
+
FRAGMENT_SPREAD: () => Ht,
|
|
1217
|
+
INLINE_FRAGMENT: () => Jt,
|
|
1218
|
+
INPUT_OBJECT_TYPE_DEFINITION: () => An,
|
|
1219
|
+
INPUT_OBJECT_TYPE_EXTENSION: () => Ln,
|
|
1220
|
+
INPUT_VALUE_DEFINITION: () => xn,
|
|
1221
|
+
INT: () => Zt,
|
|
1222
|
+
INTERFACE_TYPE_DEFINITION: () => yn,
|
|
1223
|
+
INTERFACE_TYPE_EXTENSION: () => kn,
|
|
1224
|
+
LIST: () => on,
|
|
1225
|
+
LIST_TYPE: () => ln,
|
|
1226
|
+
MEMBER_COORDINATE: () => Fn,
|
|
1227
|
+
NAME: () => Gt,
|
|
1228
|
+
NAMED_TYPE: () => un,
|
|
1229
|
+
NON_NULL_TYPE: () => dn,
|
|
1230
|
+
NULL: () => rn,
|
|
1231
|
+
OBJECT: () => an,
|
|
1232
|
+
OBJECT_FIELD: () => cn,
|
|
1233
|
+
OBJECT_TYPE_DEFINITION: () => En,
|
|
1234
|
+
OBJECT_TYPE_EXTENSION: () => vn,
|
|
1235
|
+
OPERATION_DEFINITION: () => jt,
|
|
1236
|
+
OPERATION_TYPE_DEFINITION: () => mn,
|
|
1237
|
+
SCALAR_TYPE_DEFINITION: () => hn,
|
|
1238
|
+
SCALAR_TYPE_EXTENSION: () => On,
|
|
1239
|
+
SCHEMA_DEFINITION: () => fn,
|
|
1240
|
+
SCHEMA_EXTENSION: () => gn,
|
|
1241
|
+
SELECTION_SET: () => qt,
|
|
1242
|
+
STRING: () => tn,
|
|
1243
|
+
TYPE_COORDINATE: () => bn,
|
|
1244
|
+
UNION_TYPE_DEFINITION: () => Nn,
|
|
1245
|
+
UNION_TYPE_EXTENSION: () => Cn,
|
|
1246
|
+
VARIABLE: () => zt,
|
|
1247
|
+
VARIABLE_DEFINITION: () => Yt
|
|
1248
|
+
});
|
|
1249
|
+
Gt = "Name";
|
|
1250
|
+
Kt = "Document";
|
|
1251
|
+
jt = "OperationDefinition";
|
|
1252
|
+
Yt = "VariableDefinition";
|
|
1253
|
+
qt = "SelectionSet";
|
|
1254
|
+
Qt = "Field";
|
|
1255
|
+
$t = "Argument";
|
|
1256
|
+
Xt = "FragmentArgument";
|
|
1257
|
+
Ht = "FragmentSpread";
|
|
1258
|
+
Jt = "InlineFragment";
|
|
1259
|
+
Wt = "FragmentDefinition";
|
|
1260
|
+
zt = "Variable";
|
|
1261
|
+
Zt = "IntValue";
|
|
1262
|
+
en = "FloatValue";
|
|
1263
|
+
tn = "StringValue";
|
|
1264
|
+
nn = "BooleanValue";
|
|
1265
|
+
rn = "NullValue";
|
|
1266
|
+
sn = "EnumValue";
|
|
1267
|
+
on = "ListValue";
|
|
1268
|
+
an = "ObjectValue";
|
|
1269
|
+
cn = "ObjectField";
|
|
1270
|
+
pn = "Directive";
|
|
1271
|
+
un = "NamedType";
|
|
1272
|
+
ln = "ListType";
|
|
1273
|
+
dn = "NonNullType";
|
|
1274
|
+
fn = "SchemaDefinition";
|
|
1275
|
+
mn = "OperationTypeDefinition";
|
|
1276
|
+
hn = "ScalarTypeDefinition";
|
|
1277
|
+
En = "ObjectTypeDefinition";
|
|
1278
|
+
Tn = "FieldDefinition";
|
|
1279
|
+
xn = "InputValueDefinition";
|
|
1280
|
+
yn = "InterfaceTypeDefinition";
|
|
1281
|
+
Nn = "UnionTypeDefinition";
|
|
1282
|
+
Dn = "EnumTypeDefinition";
|
|
1283
|
+
_n = "EnumValueDefinition";
|
|
1284
|
+
An = "InputObjectTypeDefinition";
|
|
1285
|
+
In = "DirectiveDefinition";
|
|
1286
|
+
gn = "SchemaExtension";
|
|
1287
|
+
Sn = "DirectiveExtension";
|
|
1288
|
+
On = "ScalarTypeExtension";
|
|
1289
|
+
vn = "ObjectTypeExtension";
|
|
1290
|
+
kn = "InterfaceTypeExtension";
|
|
1291
|
+
Cn = "UnionTypeExtension";
|
|
1292
|
+
Rn = "EnumTypeExtension";
|
|
1293
|
+
Ln = "InputObjectTypeExtension";
|
|
1294
|
+
bn = "TypeCoordinate";
|
|
1295
|
+
Fn = "MemberCoordinate";
|
|
1296
|
+
Pn = "ArgumentCoordinate";
|
|
1297
|
+
wn = "DirectiveCoordinate";
|
|
1298
|
+
Vn = "DirectiveArgumentCoordinate";
|
|
1299
|
+
ye = {
|
|
1300
|
+
QUERY: "QUERY",
|
|
1301
|
+
MUTATION: "MUTATION",
|
|
1302
|
+
SUBSCRIPTION: "SUBSCRIPTION",
|
|
1303
|
+
FIELD: "FIELD",
|
|
1304
|
+
FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION",
|
|
1305
|
+
FRAGMENT_SPREAD: "FRAGMENT_SPREAD",
|
|
1306
|
+
INLINE_FRAGMENT: "INLINE_FRAGMENT",
|
|
1307
|
+
VARIABLE_DEFINITION: "VARIABLE_DEFINITION",
|
|
1308
|
+
FRAGMENT_VARIABLE_DEFINITION: "FRAGMENT_VARIABLE_DEFINITION",
|
|
1309
|
+
SCHEMA: "SCHEMA",
|
|
1310
|
+
SCALAR: "SCALAR",
|
|
1311
|
+
OBJECT: "OBJECT",
|
|
1312
|
+
FIELD_DEFINITION: "FIELD_DEFINITION",
|
|
1313
|
+
ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION",
|
|
1314
|
+
INTERFACE: "INTERFACE",
|
|
1315
|
+
UNION: "UNION",
|
|
1316
|
+
ENUM: "ENUM",
|
|
1317
|
+
ENUM_VALUE: "ENUM_VALUE",
|
|
1318
|
+
INPUT_OBJECT: "INPUT_OBJECT",
|
|
1319
|
+
INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION",
|
|
1320
|
+
DIRECTIVE_DEFINITION: "DIRECTIVE_DEFINITION"
|
|
1321
|
+
};
|
|
1322
|
+
b = Un();
|
|
1323
|
+
Ne = b?.tracingChannel("graphql:parse");
|
|
1324
|
+
b?.tracingChannel("graphql:validate");
|
|
1325
|
+
b?.tracingChannel("graphql:execute");
|
|
1326
|
+
b?.tracingChannel("graphql:execute:variableCoercion");
|
|
1327
|
+
b?.tracingChannel("graphql:execute:rootSelectionSet");
|
|
1328
|
+
b?.tracingChannel("graphql:subscribe");
|
|
1329
|
+
b?.tracingChannel("graphql:resolve");
|
|
1330
|
+
Bn = [
|
|
1331
|
+
"start",
|
|
1332
|
+
"end",
|
|
1333
|
+
"asyncStart",
|
|
1334
|
+
"asyncEnd",
|
|
1335
|
+
"error"
|
|
1336
|
+
];
|
|
1337
|
+
o = {
|
|
1338
|
+
SOF: "<SOF>",
|
|
1339
|
+
EOF: "<EOF>",
|
|
1340
|
+
BANG: "!",
|
|
1341
|
+
DOLLAR: "$",
|
|
1342
|
+
AMP: "&",
|
|
1343
|
+
PAREN_L: "(",
|
|
1344
|
+
PAREN_R: ")",
|
|
1345
|
+
DOT: ".",
|
|
1346
|
+
SPREAD: "...",
|
|
1347
|
+
COLON: ":",
|
|
1348
|
+
EQUALS: "=",
|
|
1349
|
+
AT: "@",
|
|
1350
|
+
BRACKET_L: "[",
|
|
1351
|
+
BRACKET_R: "]",
|
|
1352
|
+
BRACE_L: "{",
|
|
1353
|
+
PIPE: "|",
|
|
1354
|
+
BRACE_R: "}",
|
|
1355
|
+
NAME: "Name",
|
|
1356
|
+
INT: "Int",
|
|
1357
|
+
FLOAT: "Float",
|
|
1358
|
+
STRING: "String",
|
|
1359
|
+
BLOCK_STRING: "BlockString",
|
|
1360
|
+
COMMENT: "Comment"
|
|
1361
|
+
};
|
|
1362
|
+
Q = class {
|
|
1220
1363
|
constructor(t) {
|
|
1221
|
-
let n = new
|
|
1364
|
+
let n = new V(o.SOF, 0, 0, 0, 0);
|
|
1222
1365
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
1223
1366
|
}
|
|
1224
1367
|
get [Symbol.toStringTag]() {
|
|
@@ -1232,58 +1375,34 @@ ${e}`;
|
|
|
1232
1375
|
if (t.kind !== o.EOF) do
|
|
1233
1376
|
if (t.next) t = t.next;
|
|
1234
1377
|
else {
|
|
1235
|
-
let n =
|
|
1378
|
+
let n = Gn(this, t.end);
|
|
1236
1379
|
t.next = n, n.prev = t, t = n;
|
|
1237
1380
|
}
|
|
1238
1381
|
while (t.kind === o.COMMENT);
|
|
1239
1382
|
return t;
|
|
1240
1383
|
}
|
|
1241
1384
|
};
|
|
1242
|
-
|
|
1243
|
-
return t instanceof n;
|
|
1244
|
-
} : function(t, n) {
|
|
1245
|
-
if (t instanceof n) return !0;
|
|
1246
|
-
if (typeof t == "object" && t !== null) {
|
|
1247
|
-
var i;
|
|
1248
|
-
let r = n.prototype[Symbol.toStringTag];
|
|
1249
|
-
if (r === (Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name)) {
|
|
1250
|
-
let a = ee(t);
|
|
1251
|
-
throw new Error(`Cannot use ${r} "${a}" from another module or realm.
|
|
1252
|
-
|
|
1253
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
|
1254
|
-
directory. If different versions of "graphql" are the dependencies of other
|
|
1255
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
1256
|
-
|
|
1257
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
1258
|
-
|
|
1259
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
|
1260
|
-
versions may have different capabilities and behavior. The data from one
|
|
1261
|
-
version used in the function from another could produce confusing and
|
|
1262
|
-
spurious results.`);
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
return !1;
|
|
1266
|
-
};
|
|
1385
|
+
ut = Symbol("Source");
|
|
1267
1386
|
B = class {
|
|
1268
|
-
constructor(t, n = "GraphQL request",
|
|
1387
|
+
constructor(t, n = "GraphQL request", r = {
|
|
1269
1388
|
line: 1,
|
|
1270
1389
|
column: 1
|
|
1271
1390
|
}) {
|
|
1272
|
-
|
|
1391
|
+
this.__kind = ut, this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || Te(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Te(!1, "column in locationOffset is 1-indexed and must be positive.");
|
|
1273
1392
|
}
|
|
1274
1393
|
get [Symbol.toStringTag]() {
|
|
1275
1394
|
return "Source";
|
|
1276
1395
|
}
|
|
1277
1396
|
};
|
|
1278
|
-
|
|
1397
|
+
De = class {
|
|
1279
1398
|
constructor(t, n = {}) {
|
|
1280
|
-
let { lexer:
|
|
1281
|
-
if (
|
|
1399
|
+
let { lexer: r, ...i } = n;
|
|
1400
|
+
if (r) this._lexer = r;
|
|
1282
1401
|
else {
|
|
1283
|
-
let s =
|
|
1284
|
-
this._lexer = new
|
|
1402
|
+
let s = lt(t) ? t : new B(t);
|
|
1403
|
+
this._lexer = new Q(s);
|
|
1285
1404
|
}
|
|
1286
|
-
this._options =
|
|
1405
|
+
this._options = i, this._tokenCounter = 0;
|
|
1287
1406
|
}
|
|
1288
1407
|
get tokenCount() {
|
|
1289
1408
|
return this._tokenCounter;
|
|
@@ -1304,7 +1423,7 @@ spurious results.`);
|
|
|
1304
1423
|
parseDefinition() {
|
|
1305
1424
|
if (this.peek(o.BRACE_L)) return this.parseOperationDefinition();
|
|
1306
1425
|
let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
|
|
1307
|
-
if (t && n.kind === o.BRACE_L) throw
|
|
1426
|
+
if (t && n.kind === o.BRACE_L) throw f(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are not supported on shorthand queries.");
|
|
1308
1427
|
if (n.kind === o.NAME) {
|
|
1309
1428
|
switch (n.value) {
|
|
1310
1429
|
case "schema": return this.parseSchemaDefinition();
|
|
@@ -1322,10 +1441,8 @@ spurious results.`);
|
|
|
1322
1441
|
case "subscription": return this.parseOperationDefinition();
|
|
1323
1442
|
case "fragment": return this.parseFragmentDefinition();
|
|
1324
1443
|
}
|
|
1325
|
-
if (t) throw
|
|
1326
|
-
|
|
1327
|
-
case "extend": return this.parseTypeSystemExtension();
|
|
1328
|
-
}
|
|
1444
|
+
if (t) throw f(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
|
|
1445
|
+
if (n.value === "extend") return this.parseTypeSystemExtension();
|
|
1329
1446
|
}
|
|
1330
1447
|
throw this.unexpected(n);
|
|
1331
1448
|
}
|
|
@@ -1333,19 +1450,19 @@ spurious results.`);
|
|
|
1333
1450
|
let t = this._lexer.token;
|
|
1334
1451
|
if (this.peek(o.BRACE_L)) return this.node(t, {
|
|
1335
1452
|
kind: c.OPERATION_DEFINITION,
|
|
1336
|
-
operation:
|
|
1453
|
+
operation: M.QUERY,
|
|
1337
1454
|
description: void 0,
|
|
1338
1455
|
name: void 0,
|
|
1339
|
-
variableDefinitions:
|
|
1340
|
-
directives:
|
|
1456
|
+
variableDefinitions: void 0,
|
|
1457
|
+
directives: void 0,
|
|
1341
1458
|
selectionSet: this.parseSelectionSet()
|
|
1342
1459
|
});
|
|
1343
|
-
let n = this.parseDescription(),
|
|
1344
|
-
return this.peek(o.NAME) && (
|
|
1460
|
+
let n = this.parseDescription(), r = this.parseOperationType(), i;
|
|
1461
|
+
return this.peek(o.NAME) && (i = this.parseName()), this.node(t, {
|
|
1345
1462
|
kind: c.OPERATION_DEFINITION,
|
|
1346
|
-
operation:
|
|
1463
|
+
operation: r,
|
|
1347
1464
|
description: n,
|
|
1348
|
-
name:
|
|
1465
|
+
name: i,
|
|
1349
1466
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
1350
1467
|
directives: this.parseDirectives(!1),
|
|
1351
1468
|
selectionSet: this.parseSelectionSet()
|
|
@@ -1354,9 +1471,9 @@ spurious results.`);
|
|
|
1354
1471
|
parseOperationType() {
|
|
1355
1472
|
let t = this.expectToken(o.NAME);
|
|
1356
1473
|
switch (t.value) {
|
|
1357
|
-
case "query": return
|
|
1358
|
-
case "mutation": return
|
|
1359
|
-
case "subscription": return
|
|
1474
|
+
case "query": return M.QUERY;
|
|
1475
|
+
case "mutation": return M.MUTATION;
|
|
1476
|
+
case "subscription": return M.SUBSCRIPTION;
|
|
1360
1477
|
}
|
|
1361
1478
|
throw this.unexpected(t);
|
|
1362
1479
|
}
|
|
@@ -1390,11 +1507,11 @@ spurious results.`);
|
|
|
1390
1507
|
return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
|
|
1391
1508
|
}
|
|
1392
1509
|
parseField() {
|
|
1393
|
-
let t = this._lexer.token, n = this.parseName(),
|
|
1394
|
-
return this.expectOptionalToken(o.COLON) ? (
|
|
1510
|
+
let t = this._lexer.token, n = this.parseName(), r, i;
|
|
1511
|
+
return this.expectOptionalToken(o.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
|
|
1395
1512
|
kind: c.FIELD,
|
|
1396
|
-
alias:
|
|
1397
|
-
name:
|
|
1513
|
+
alias: r,
|
|
1514
|
+
name: i,
|
|
1398
1515
|
arguments: this.parseArguments(!1),
|
|
1399
1516
|
directives: this.parseDirectives(!1),
|
|
1400
1517
|
selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
@@ -1404,26 +1521,47 @@ spurious results.`);
|
|
|
1404
1521
|
let n = t ? this.parseConstArgument : this.parseArgument;
|
|
1405
1522
|
return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
|
|
1406
1523
|
}
|
|
1524
|
+
parseFragmentArguments() {
|
|
1525
|
+
let t = this.parseFragmentArgument;
|
|
1526
|
+
return this.optionalMany(o.PAREN_L, t, o.PAREN_R);
|
|
1527
|
+
}
|
|
1407
1528
|
parseArgument(t = !1) {
|
|
1408
|
-
let n = this._lexer.token,
|
|
1529
|
+
let n = this._lexer.token, r = this.parseName();
|
|
1409
1530
|
return this.expectToken(o.COLON), this.node(n, {
|
|
1410
1531
|
kind: c.ARGUMENT,
|
|
1411
|
-
name:
|
|
1532
|
+
name: r,
|
|
1412
1533
|
value: this.parseValueLiteral(t)
|
|
1413
1534
|
});
|
|
1414
1535
|
}
|
|
1415
1536
|
parseConstArgument() {
|
|
1416
1537
|
return this.parseArgument(!0);
|
|
1417
1538
|
}
|
|
1539
|
+
parseFragmentArgument() {
|
|
1540
|
+
let t = this._lexer.token, n = this.parseName();
|
|
1541
|
+
return this.expectToken(o.COLON), this.node(t, {
|
|
1542
|
+
kind: c.FRAGMENT_ARGUMENT,
|
|
1543
|
+
name: n,
|
|
1544
|
+
value: this.parseValueLiteral(!1)
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1418
1547
|
parseFragment() {
|
|
1419
1548
|
let t = this._lexer.token;
|
|
1420
1549
|
this.expectToken(o.SPREAD);
|
|
1421
1550
|
let n = this.expectOptionalKeyword("on");
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1551
|
+
if (!n && this.peek(o.NAME)) {
|
|
1552
|
+
let r = this.parseFragmentName();
|
|
1553
|
+
return this.peek(o.PAREN_L) && this._options.experimentalFragmentArguments ? this.node(t, {
|
|
1554
|
+
kind: c.FRAGMENT_SPREAD,
|
|
1555
|
+
name: r,
|
|
1556
|
+
arguments: this.parseFragmentArguments(),
|
|
1557
|
+
directives: this.parseDirectives(!1)
|
|
1558
|
+
}) : this.node(t, {
|
|
1559
|
+
kind: c.FRAGMENT_SPREAD,
|
|
1560
|
+
name: r,
|
|
1561
|
+
directives: this.parseDirectives(!1)
|
|
1562
|
+
});
|
|
1563
|
+
}
|
|
1564
|
+
return this.node(t, {
|
|
1427
1565
|
kind: c.INLINE_FRAGMENT,
|
|
1428
1566
|
typeCondition: n ? this.parseNamedType() : void 0,
|
|
1429
1567
|
directives: this.parseDirectives(!1),
|
|
@@ -1432,7 +1570,7 @@ spurious results.`);
|
|
|
1432
1570
|
}
|
|
1433
1571
|
parseFragmentDefinition() {
|
|
1434
1572
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1435
|
-
return this.expectKeyword("fragment"), this._options.
|
|
1573
|
+
return this.expectKeyword("fragment"), this._options.experimentalFragmentArguments === !0 ? this.node(t, {
|
|
1436
1574
|
kind: c.FRAGMENT_DEFINITION,
|
|
1437
1575
|
description: n,
|
|
1438
1576
|
name: this.parseFragmentName(),
|
|
@@ -1485,8 +1623,8 @@ spurious results.`);
|
|
|
1485
1623
|
}
|
|
1486
1624
|
case o.DOLLAR:
|
|
1487
1625
|
if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
|
|
1488
|
-
let
|
|
1489
|
-
throw
|
|
1626
|
+
let r = this._lexer.token.value;
|
|
1627
|
+
throw f(this._lexer.source, n.start, `Unexpected variable "$${r}" in constant value.`);
|
|
1490
1628
|
} else throw this.unexpected(n);
|
|
1491
1629
|
return this.parseVariable();
|
|
1492
1630
|
default: throw this.unexpected();
|
|
@@ -1518,17 +1656,17 @@ spurious results.`);
|
|
|
1518
1656
|
});
|
|
1519
1657
|
}
|
|
1520
1658
|
parseObjectField(t) {
|
|
1521
|
-
let n = this._lexer.token,
|
|
1659
|
+
let n = this._lexer.token, r = this.parseName();
|
|
1522
1660
|
return this.expectToken(o.COLON), this.node(n, {
|
|
1523
1661
|
kind: c.OBJECT_FIELD,
|
|
1524
|
-
name:
|
|
1662
|
+
name: r,
|
|
1525
1663
|
value: this.parseValueLiteral(t)
|
|
1526
1664
|
});
|
|
1527
1665
|
}
|
|
1528
1666
|
parseDirectives(t) {
|
|
1529
1667
|
let n = [];
|
|
1530
1668
|
for (; this.peek(o.AT);) n.push(this.parseDirective(t));
|
|
1531
|
-
return n;
|
|
1669
|
+
if (n.length) return n;
|
|
1532
1670
|
}
|
|
1533
1671
|
parseConstDirectives() {
|
|
1534
1672
|
return this.parseDirectives(!0);
|
|
@@ -1544,10 +1682,10 @@ spurious results.`);
|
|
|
1544
1682
|
parseTypeReference() {
|
|
1545
1683
|
let t = this._lexer.token, n;
|
|
1546
1684
|
if (this.expectOptionalToken(o.BRACKET_L)) {
|
|
1547
|
-
let
|
|
1685
|
+
let r = this.parseTypeReference();
|
|
1548
1686
|
this.expectToken(o.BRACKET_R), n = this.node(t, {
|
|
1549
1687
|
kind: c.LIST_TYPE,
|
|
1550
|
-
type:
|
|
1688
|
+
type: r
|
|
1551
1689
|
});
|
|
1552
1690
|
} else n = this.parseNamedType();
|
|
1553
1691
|
return this.expectOptionalToken(o.BANG) ? this.node(t, {
|
|
@@ -1570,63 +1708,63 @@ spurious results.`);
|
|
|
1570
1708
|
parseSchemaDefinition() {
|
|
1571
1709
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1572
1710
|
this.expectKeyword("schema");
|
|
1573
|
-
let
|
|
1711
|
+
let r = this.parseConstDirectives(), i = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
|
|
1574
1712
|
return this.node(t, {
|
|
1575
1713
|
kind: c.SCHEMA_DEFINITION,
|
|
1576
1714
|
description: n,
|
|
1577
|
-
directives:
|
|
1578
|
-
operationTypes:
|
|
1715
|
+
directives: r,
|
|
1716
|
+
operationTypes: i
|
|
1579
1717
|
});
|
|
1580
1718
|
}
|
|
1581
1719
|
parseOperationTypeDefinition() {
|
|
1582
1720
|
let t = this._lexer.token, n = this.parseOperationType();
|
|
1583
1721
|
this.expectToken(o.COLON);
|
|
1584
|
-
let
|
|
1722
|
+
let r = this.parseNamedType();
|
|
1585
1723
|
return this.node(t, {
|
|
1586
1724
|
kind: c.OPERATION_TYPE_DEFINITION,
|
|
1587
1725
|
operation: n,
|
|
1588
|
-
type:
|
|
1726
|
+
type: r
|
|
1589
1727
|
});
|
|
1590
1728
|
}
|
|
1591
1729
|
parseScalarTypeDefinition() {
|
|
1592
1730
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1593
1731
|
this.expectKeyword("scalar");
|
|
1594
|
-
let
|
|
1732
|
+
let r = this.parseName(), i = this.parseConstDirectives();
|
|
1595
1733
|
return this.node(t, {
|
|
1596
1734
|
kind: c.SCALAR_TYPE_DEFINITION,
|
|
1597
1735
|
description: n,
|
|
1598
|
-
name:
|
|
1599
|
-
directives:
|
|
1736
|
+
name: r,
|
|
1737
|
+
directives: i
|
|
1600
1738
|
});
|
|
1601
1739
|
}
|
|
1602
1740
|
parseObjectTypeDefinition() {
|
|
1603
1741
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1604
1742
|
this.expectKeyword("type");
|
|
1605
|
-
let
|
|
1743
|
+
let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
|
|
1606
1744
|
return this.node(t, {
|
|
1607
1745
|
kind: c.OBJECT_TYPE_DEFINITION,
|
|
1608
1746
|
description: n,
|
|
1609
|
-
name:
|
|
1610
|
-
interfaces:
|
|
1747
|
+
name: r,
|
|
1748
|
+
interfaces: i,
|
|
1611
1749
|
directives: s,
|
|
1612
1750
|
fields: a
|
|
1613
1751
|
});
|
|
1614
1752
|
}
|
|
1615
1753
|
parseImplementsInterfaces() {
|
|
1616
|
-
return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) :
|
|
1754
|
+
return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : void 0;
|
|
1617
1755
|
}
|
|
1618
1756
|
parseFieldsDefinition() {
|
|
1619
1757
|
return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R);
|
|
1620
1758
|
}
|
|
1621
1759
|
parseFieldDefinition() {
|
|
1622
|
-
let t = this._lexer.token, n = this.parseDescription(),
|
|
1760
|
+
let t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
|
|
1623
1761
|
this.expectToken(o.COLON);
|
|
1624
1762
|
let s = this.parseTypeReference(), a = this.parseConstDirectives();
|
|
1625
1763
|
return this.node(t, {
|
|
1626
1764
|
kind: c.FIELD_DEFINITION,
|
|
1627
1765
|
description: n,
|
|
1628
|
-
name:
|
|
1629
|
-
arguments:
|
|
1766
|
+
name: r,
|
|
1767
|
+
arguments: i,
|
|
1630
1768
|
type: s,
|
|
1631
1769
|
directives: a
|
|
1632
1770
|
});
|
|
@@ -1635,16 +1773,16 @@ spurious results.`);
|
|
|
1635
1773
|
return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R);
|
|
1636
1774
|
}
|
|
1637
1775
|
parseInputValueDef() {
|
|
1638
|
-
let t = this._lexer.token, n = this.parseDescription(),
|
|
1776
|
+
let t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
|
|
1639
1777
|
this.expectToken(o.COLON);
|
|
1640
|
-
let
|
|
1778
|
+
let i = this.parseTypeReference(), s;
|
|
1641
1779
|
this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
|
|
1642
1780
|
let a = this.parseConstDirectives();
|
|
1643
1781
|
return this.node(t, {
|
|
1644
1782
|
kind: c.INPUT_VALUE_DEFINITION,
|
|
1645
1783
|
description: n,
|
|
1646
|
-
name:
|
|
1647
|
-
type:
|
|
1784
|
+
name: r,
|
|
1785
|
+
type: i,
|
|
1648
1786
|
defaultValue: s,
|
|
1649
1787
|
directives: a
|
|
1650
1788
|
});
|
|
@@ -1652,12 +1790,12 @@ spurious results.`);
|
|
|
1652
1790
|
parseInterfaceTypeDefinition() {
|
|
1653
1791
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1654
1792
|
this.expectKeyword("interface");
|
|
1655
|
-
let
|
|
1793
|
+
let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
|
|
1656
1794
|
return this.node(t, {
|
|
1657
1795
|
kind: c.INTERFACE_TYPE_DEFINITION,
|
|
1658
1796
|
description: n,
|
|
1659
|
-
name:
|
|
1660
|
-
interfaces:
|
|
1797
|
+
name: r,
|
|
1798
|
+
interfaces: i,
|
|
1661
1799
|
directives: s,
|
|
1662
1800
|
fields: a
|
|
1663
1801
|
});
|
|
@@ -1665,27 +1803,27 @@ spurious results.`);
|
|
|
1665
1803
|
parseUnionTypeDefinition() {
|
|
1666
1804
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1667
1805
|
this.expectKeyword("union");
|
|
1668
|
-
let
|
|
1806
|
+
let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
|
|
1669
1807
|
return this.node(t, {
|
|
1670
1808
|
kind: c.UNION_TYPE_DEFINITION,
|
|
1671
1809
|
description: n,
|
|
1672
|
-
name:
|
|
1673
|
-
directives:
|
|
1810
|
+
name: r,
|
|
1811
|
+
directives: i,
|
|
1674
1812
|
types: s
|
|
1675
1813
|
});
|
|
1676
1814
|
}
|
|
1677
1815
|
parseUnionMemberTypes() {
|
|
1678
|
-
return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) :
|
|
1816
|
+
return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : void 0;
|
|
1679
1817
|
}
|
|
1680
1818
|
parseEnumTypeDefinition() {
|
|
1681
1819
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1682
1820
|
this.expectKeyword("enum");
|
|
1683
|
-
let
|
|
1821
|
+
let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
|
|
1684
1822
|
return this.node(t, {
|
|
1685
1823
|
kind: c.ENUM_TYPE_DEFINITION,
|
|
1686
1824
|
description: n,
|
|
1687
|
-
name:
|
|
1688
|
-
directives:
|
|
1825
|
+
name: r,
|
|
1826
|
+
directives: i,
|
|
1689
1827
|
values: s
|
|
1690
1828
|
});
|
|
1691
1829
|
}
|
|
@@ -1693,27 +1831,27 @@ spurious results.`);
|
|
|
1693
1831
|
return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R);
|
|
1694
1832
|
}
|
|
1695
1833
|
parseEnumValueDefinition() {
|
|
1696
|
-
let t = this._lexer.token, n = this.parseDescription(),
|
|
1834
|
+
let t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
|
|
1697
1835
|
return this.node(t, {
|
|
1698
1836
|
kind: c.ENUM_VALUE_DEFINITION,
|
|
1699
1837
|
description: n,
|
|
1700
|
-
name:
|
|
1701
|
-
directives:
|
|
1838
|
+
name: r,
|
|
1839
|
+
directives: i
|
|
1702
1840
|
});
|
|
1703
1841
|
}
|
|
1704
1842
|
parseEnumValueName() {
|
|
1705
|
-
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw
|
|
1843
|
+
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw f(this._lexer.source, this._lexer.token.start, `${se(this._lexer.token)} is reserved and cannot be used for an enum value.`);
|
|
1706
1844
|
return this.parseName();
|
|
1707
1845
|
}
|
|
1708
1846
|
parseInputObjectTypeDefinition() {
|
|
1709
1847
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1710
1848
|
this.expectKeyword("input");
|
|
1711
|
-
let
|
|
1849
|
+
let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
|
|
1712
1850
|
return this.node(t, {
|
|
1713
1851
|
kind: c.INPUT_OBJECT_TYPE_DEFINITION,
|
|
1714
1852
|
description: n,
|
|
1715
|
-
name:
|
|
1716
|
-
directives:
|
|
1853
|
+
name: r,
|
|
1854
|
+
directives: i,
|
|
1717
1855
|
fields: s
|
|
1718
1856
|
});
|
|
1719
1857
|
}
|
|
@@ -1730,106 +1868,119 @@ spurious results.`);
|
|
|
1730
1868
|
case "union": return this.parseUnionTypeExtension();
|
|
1731
1869
|
case "enum": return this.parseEnumTypeExtension();
|
|
1732
1870
|
case "input": return this.parseInputObjectTypeExtension();
|
|
1871
|
+
case "directive": return this.parseDirectiveExtension();
|
|
1733
1872
|
}
|
|
1734
1873
|
throw this.unexpected(t);
|
|
1735
1874
|
}
|
|
1736
1875
|
parseSchemaExtension() {
|
|
1737
1876
|
let t = this._lexer.token;
|
|
1738
1877
|
this.expectKeyword("extend"), this.expectKeyword("schema");
|
|
1739
|
-
let n = this.parseConstDirectives(),
|
|
1740
|
-
if (n
|
|
1878
|
+
let n = this.parseConstDirectives(), r = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
|
|
1879
|
+
if (n === void 0 && r === void 0) throw this.unexpected();
|
|
1741
1880
|
return this.node(t, {
|
|
1742
1881
|
kind: c.SCHEMA_EXTENSION,
|
|
1743
1882
|
directives: n,
|
|
1744
|
-
operationTypes:
|
|
1883
|
+
operationTypes: r
|
|
1745
1884
|
});
|
|
1746
1885
|
}
|
|
1747
1886
|
parseScalarTypeExtension() {
|
|
1748
1887
|
let t = this._lexer.token;
|
|
1749
1888
|
this.expectKeyword("extend"), this.expectKeyword("scalar");
|
|
1750
|
-
let n = this.parseName(),
|
|
1751
|
-
if (
|
|
1889
|
+
let n = this.parseName(), r = this.parseConstDirectives();
|
|
1890
|
+
if (r === void 0) throw this.unexpected();
|
|
1752
1891
|
return this.node(t, {
|
|
1753
1892
|
kind: c.SCALAR_TYPE_EXTENSION,
|
|
1754
1893
|
name: n,
|
|
1755
|
-
directives:
|
|
1894
|
+
directives: r
|
|
1756
1895
|
});
|
|
1757
1896
|
}
|
|
1758
1897
|
parseObjectTypeExtension() {
|
|
1759
1898
|
let t = this._lexer.token;
|
|
1760
1899
|
this.expectKeyword("extend"), this.expectKeyword("type");
|
|
1761
|
-
let n = this.parseName(),
|
|
1762
|
-
if (
|
|
1900
|
+
let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1901
|
+
if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
|
|
1763
1902
|
return this.node(t, {
|
|
1764
1903
|
kind: c.OBJECT_TYPE_EXTENSION,
|
|
1765
1904
|
name: n,
|
|
1766
|
-
interfaces:
|
|
1767
|
-
directives:
|
|
1905
|
+
interfaces: r,
|
|
1906
|
+
directives: i,
|
|
1768
1907
|
fields: s
|
|
1769
1908
|
});
|
|
1770
1909
|
}
|
|
1771
1910
|
parseInterfaceTypeExtension() {
|
|
1772
1911
|
let t = this._lexer.token;
|
|
1773
1912
|
this.expectKeyword("extend"), this.expectKeyword("interface");
|
|
1774
|
-
let n = this.parseName(),
|
|
1775
|
-
if (
|
|
1913
|
+
let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1914
|
+
if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
|
|
1776
1915
|
return this.node(t, {
|
|
1777
1916
|
kind: c.INTERFACE_TYPE_EXTENSION,
|
|
1778
1917
|
name: n,
|
|
1779
|
-
interfaces:
|
|
1780
|
-
directives:
|
|
1918
|
+
interfaces: r,
|
|
1919
|
+
directives: i,
|
|
1781
1920
|
fields: s
|
|
1782
1921
|
});
|
|
1783
1922
|
}
|
|
1784
1923
|
parseUnionTypeExtension() {
|
|
1785
1924
|
let t = this._lexer.token;
|
|
1786
1925
|
this.expectKeyword("extend"), this.expectKeyword("union");
|
|
1787
|
-
let n = this.parseName(),
|
|
1788
|
-
if (
|
|
1926
|
+
let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
|
|
1927
|
+
if (r === void 0 && i === void 0) throw this.unexpected();
|
|
1789
1928
|
return this.node(t, {
|
|
1790
1929
|
kind: c.UNION_TYPE_EXTENSION,
|
|
1791
1930
|
name: n,
|
|
1792
|
-
directives:
|
|
1793
|
-
types:
|
|
1931
|
+
directives: r,
|
|
1932
|
+
types: i
|
|
1794
1933
|
});
|
|
1795
1934
|
}
|
|
1796
1935
|
parseEnumTypeExtension() {
|
|
1797
1936
|
let t = this._lexer.token;
|
|
1798
1937
|
this.expectKeyword("extend"), this.expectKeyword("enum");
|
|
1799
|
-
let n = this.parseName(),
|
|
1800
|
-
if (
|
|
1938
|
+
let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
|
|
1939
|
+
if (r === void 0 && i === void 0) throw this.unexpected();
|
|
1801
1940
|
return this.node(t, {
|
|
1802
1941
|
kind: c.ENUM_TYPE_EXTENSION,
|
|
1803
1942
|
name: n,
|
|
1804
|
-
directives:
|
|
1805
|
-
values:
|
|
1943
|
+
directives: r,
|
|
1944
|
+
values: i
|
|
1806
1945
|
});
|
|
1807
1946
|
}
|
|
1808
1947
|
parseInputObjectTypeExtension() {
|
|
1809
1948
|
let t = this._lexer.token;
|
|
1810
1949
|
this.expectKeyword("extend"), this.expectKeyword("input");
|
|
1811
|
-
let n = this.parseName(),
|
|
1812
|
-
if (
|
|
1950
|
+
let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
|
|
1951
|
+
if (r === void 0 && i === void 0) throw this.unexpected();
|
|
1813
1952
|
return this.node(t, {
|
|
1814
1953
|
kind: c.INPUT_OBJECT_TYPE_EXTENSION,
|
|
1815
1954
|
name: n,
|
|
1816
|
-
directives:
|
|
1817
|
-
fields:
|
|
1955
|
+
directives: r,
|
|
1956
|
+
fields: i
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
parseDirectiveExtension() {
|
|
1960
|
+
let t = this._lexer.token;
|
|
1961
|
+
this.expectKeyword("extend"), this.expectKeyword("directive"), this.expectToken(o.AT);
|
|
1962
|
+
let n = this.parseName(), r = this.parseConstDirectives();
|
|
1963
|
+
if (r === void 0) throw this.unexpected();
|
|
1964
|
+
return this.node(t, {
|
|
1965
|
+
kind: c.DIRECTIVE_EXTENSION,
|
|
1966
|
+
name: n,
|
|
1967
|
+
directives: r
|
|
1818
1968
|
});
|
|
1819
1969
|
}
|
|
1820
1970
|
parseDirectiveDefinition() {
|
|
1821
1971
|
let t = this._lexer.token, n = this.parseDescription();
|
|
1822
1972
|
this.expectKeyword("directive"), this.expectToken(o.AT);
|
|
1823
|
-
let
|
|
1973
|
+
let r = this.parseName(), i = this.parseArgumentDefs(), s = this.parseConstDirectives(), a = this.expectOptionalKeyword("repeatable");
|
|
1824
1974
|
this.expectKeyword("on");
|
|
1825
|
-
let
|
|
1975
|
+
let p = this.parseDirectiveLocations();
|
|
1826
1976
|
return this.node(t, {
|
|
1827
1977
|
kind: c.DIRECTIVE_DEFINITION,
|
|
1828
1978
|
description: n,
|
|
1829
|
-
name:
|
|
1830
|
-
arguments:
|
|
1831
|
-
|
|
1832
|
-
|
|
1979
|
+
name: r,
|
|
1980
|
+
arguments: i,
|
|
1981
|
+
directives: s,
|
|
1982
|
+
repeatable: a,
|
|
1983
|
+
locations: p
|
|
1833
1984
|
});
|
|
1834
1985
|
}
|
|
1835
1986
|
parseDirectiveLocations() {
|
|
@@ -1837,36 +1988,36 @@ spurious results.`);
|
|
|
1837
1988
|
}
|
|
1838
1989
|
parseDirectiveLocation() {
|
|
1839
1990
|
let t = this._lexer.token, n = this.parseName();
|
|
1840
|
-
if (
|
|
1991
|
+
if (et(ye, n.value)) return n;
|
|
1841
1992
|
throw this.unexpected(t);
|
|
1842
1993
|
}
|
|
1843
1994
|
parseSchemaCoordinate() {
|
|
1844
|
-
let t = this._lexer.token, n = this.expectOptionalToken(o.AT),
|
|
1845
|
-
!n && this.expectOptionalToken(o.DOT) && (
|
|
1995
|
+
let t = this._lexer.token, n = this.expectOptionalToken(o.AT), r = this.parseName(), i;
|
|
1996
|
+
!n && this.expectOptionalToken(o.DOT) && (i = this.parseName());
|
|
1846
1997
|
let s;
|
|
1847
|
-
return (n ||
|
|
1998
|
+
return (n || i) && this.expectOptionalToken(o.PAREN_L) && (s = this.parseName(), this.expectToken(o.COLON), this.expectToken(o.PAREN_R)), n ? s ? this.node(t, {
|
|
1848
1999
|
kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1849
|
-
name:
|
|
2000
|
+
name: r,
|
|
1850
2001
|
argumentName: s
|
|
1851
2002
|
}) : this.node(t, {
|
|
1852
2003
|
kind: c.DIRECTIVE_COORDINATE,
|
|
1853
|
-
name:
|
|
1854
|
-
}) :
|
|
2004
|
+
name: r
|
|
2005
|
+
}) : i ? s ? this.node(t, {
|
|
1855
2006
|
kind: c.ARGUMENT_COORDINATE,
|
|
1856
|
-
name:
|
|
1857
|
-
fieldName:
|
|
2007
|
+
name: r,
|
|
2008
|
+
fieldName: i,
|
|
1858
2009
|
argumentName: s
|
|
1859
2010
|
}) : this.node(t, {
|
|
1860
2011
|
kind: c.MEMBER_COORDINATE,
|
|
1861
|
-
name:
|
|
1862
|
-
memberName:
|
|
2012
|
+
name: r,
|
|
2013
|
+
memberName: i
|
|
1863
2014
|
}) : this.node(t, {
|
|
1864
2015
|
kind: c.TYPE_COORDINATE,
|
|
1865
|
-
name:
|
|
2016
|
+
name: r
|
|
1866
2017
|
});
|
|
1867
2018
|
}
|
|
1868
2019
|
node(t, n) {
|
|
1869
|
-
return this._options.noLocation !== !0 && (n.loc = new
|
|
2020
|
+
return this._options.noLocation !== !0 && (n.loc = new Y(t, this._lexer.lastToken, this._lexer.source)), n;
|
|
1870
2021
|
}
|
|
1871
2022
|
peek(t) {
|
|
1872
2023
|
return this._lexer.token.kind === t;
|
|
@@ -1874,7 +2025,7 @@ spurious results.`);
|
|
|
1874
2025
|
expectToken(t) {
|
|
1875
2026
|
let n = this._lexer.token;
|
|
1876
2027
|
if (n.kind === t) return this.advanceLexer(), n;
|
|
1877
|
-
throw
|
|
2028
|
+
throw f(this._lexer.source, n.start, `Expected ${ft(t)}, found ${se(n)}.`);
|
|
1878
2029
|
}
|
|
1879
2030
|
expectOptionalToken(t) {
|
|
1880
2031
|
return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
|
|
@@ -1882,7 +2033,7 @@ spurious results.`);
|
|
|
1882
2033
|
expectKeyword(t) {
|
|
1883
2034
|
let n = this._lexer.token;
|
|
1884
2035
|
if (n.kind === o.NAME && n.value === t) this.advanceLexer();
|
|
1885
|
-
else throw
|
|
2036
|
+
else throw f(this._lexer.source, n.start, `Expected "${t}", found ${se(n)}.`);
|
|
1886
2037
|
}
|
|
1887
2038
|
expectOptionalKeyword(t) {
|
|
1888
2039
|
let n = this._lexer.token;
|
|
@@ -1890,55 +2041,54 @@ spurious results.`);
|
|
|
1890
2041
|
}
|
|
1891
2042
|
unexpected(t) {
|
|
1892
2043
|
let n = t ?? this._lexer.token;
|
|
1893
|
-
return
|
|
2044
|
+
return f(this._lexer.source, n.start, `Unexpected ${se(n)}.`);
|
|
1894
2045
|
}
|
|
1895
|
-
any(t, n,
|
|
2046
|
+
any(t, n, r) {
|
|
1896
2047
|
this.expectToken(t);
|
|
1897
|
-
let
|
|
1898
|
-
for (; !this.expectOptionalToken(
|
|
1899
|
-
return
|
|
2048
|
+
let i = [];
|
|
2049
|
+
for (; !this.expectOptionalToken(r);) i.push(n.call(this));
|
|
2050
|
+
return i;
|
|
1900
2051
|
}
|
|
1901
|
-
optionalMany(t, n,
|
|
2052
|
+
optionalMany(t, n, r) {
|
|
1902
2053
|
if (this.expectOptionalToken(t)) {
|
|
1903
|
-
let
|
|
2054
|
+
let i = [];
|
|
1904
2055
|
do
|
|
1905
|
-
|
|
1906
|
-
while (!this.expectOptionalToken(
|
|
1907
|
-
return
|
|
2056
|
+
i.push(n.call(this));
|
|
2057
|
+
while (!this.expectOptionalToken(r));
|
|
2058
|
+
return i;
|
|
1908
2059
|
}
|
|
1909
|
-
return [];
|
|
1910
2060
|
}
|
|
1911
|
-
many(t, n,
|
|
2061
|
+
many(t, n, r) {
|
|
1912
2062
|
this.expectToken(t);
|
|
1913
|
-
let
|
|
2063
|
+
let i = [];
|
|
1914
2064
|
do
|
|
1915
|
-
|
|
1916
|
-
while (!this.expectOptionalToken(
|
|
1917
|
-
return
|
|
2065
|
+
i.push(n.call(this));
|
|
2066
|
+
while (!this.expectOptionalToken(r));
|
|
2067
|
+
return i;
|
|
1918
2068
|
}
|
|
1919
2069
|
delimitedMany(t, n) {
|
|
1920
2070
|
this.expectOptionalToken(t);
|
|
1921
|
-
let
|
|
2071
|
+
let r = [];
|
|
1922
2072
|
do
|
|
1923
|
-
|
|
2073
|
+
r.push(n.call(this));
|
|
1924
2074
|
while (this.expectOptionalToken(t));
|
|
1925
|
-
return
|
|
2075
|
+
return r;
|
|
1926
2076
|
}
|
|
1927
2077
|
advanceLexer() {
|
|
1928
2078
|
let { maxTokens: t } = this._options, n = this._lexer.advance();
|
|
1929
|
-
if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw
|
|
2079
|
+
if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw f(this._lexer.source, n.start, `Document contains more than ${t} tokens. Parsing aborted.`);
|
|
1930
2080
|
}
|
|
1931
2081
|
};
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
parse:
|
|
2082
|
+
mt = ei;
|
|
2083
|
+
ni = { experimentalFragmentArguments: !0 };
|
|
2084
|
+
si = {
|
|
2085
|
+
parse: ri,
|
|
1936
2086
|
astFormat: "graphql",
|
|
1937
|
-
hasPragma:
|
|
1938
|
-
hasIgnorePragma:
|
|
1939
|
-
locStart:
|
|
1940
|
-
locEnd:
|
|
2087
|
+
hasPragma: Ue,
|
|
2088
|
+
hasIgnorePragma: Be,
|
|
2089
|
+
locStart: ee,
|
|
2090
|
+
locEnd: te
|
|
1941
2091
|
};
|
|
1942
|
-
|
|
2092
|
+
oi = { graphql: qe };
|
|
1943
2093
|
}))();
|
|
1944
|
-
export {
|
|
2094
|
+
export { ht as default, Qe as languages, Xe as options, _e as parsers, oi as printers };
|