zudoku 0.64.2 → 0.65.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/dist/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +53 -1
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +6 -0
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
- package/dist/lib/plugins/openapi/Sidecar.js +39 -15
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Button.js +1 -0
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
- package/lib/Button-B3ucvvQw.js.map +1 -0
- package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-BOVgwTRP.js} +2555 -2609
- package/lib/ErrorAlert-BOVgwTRP.js.map +1 -0
- package/lib/{MdxPage-Bpa9tL63.js → MdxPage-CBYFyqUs.js} +6 -6
- package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-CBYFyqUs.js.map} +1 -1
- package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-DlTYnbLO.js} +4 -4
- package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-DlTYnbLO.js.map} +1 -1
- package/lib/{OasProvider-jr0oDSFy.js → OasProvider-DIPAQ79S.js} +2 -2
- package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-DIPAQ79S.js.map} +1 -1
- package/lib/{OperationList-DLEAg4qw.js → OperationList-BOTFIfda.js} +2053 -1830
- package/lib/OperationList-BOTFIfda.js.map +1 -0
- package/lib/{Pagination-H2HW9-Er.js → Pagination-BOZ9Pxcw.js} +2 -2
- package/lib/{Pagination-H2HW9-Er.js.map → Pagination-BOZ9Pxcw.js.map} +1 -1
- package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
- package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
- package/lib/RouterError-DQS_bMwf.js +42 -0
- package/lib/RouterError-DQS_bMwf.js.map +1 -0
- package/lib/{SchemaList-CSDSazqV.js → SchemaList-Bu95q_q2.js} +7 -7
- package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-Bu95q_q2.js.map} +1 -1
- package/lib/SchemaView-CaxK_HV4.js +586 -0
- package/lib/SchemaView-CaxK_HV4.js.map +1 -0
- package/lib/Select-DFRCS31-.js +399 -0
- package/lib/Select-DFRCS31-.js.map +1 -0
- package/lib/{SignUp-Fycafbyg.js → SignUp-CfB278ao.js} +2 -2
- package/lib/{SignUp-Fycafbyg.js.map → SignUp-CfB278ao.js.map} +1 -1
- package/lib/{Toc-ChkOg2UU.js → Toc-DQIqdghO.js} +2 -2
- package/lib/{Toc-ChkOg2UU.js.map → Toc-DQIqdghO.js.map} +1 -1
- package/lib/{circular-DGfd8SGc.js → circular-B-_VyILZ.js} +6360 -5953
- package/lib/circular-B-_VyILZ.js.map +1 -0
- package/lib/{createServer-DGD8hEzT.js → createServer-C5lXk4ba.js} +770 -735
- package/lib/createServer-C5lXk4ba.js.map +1 -0
- package/lib/{errors-BTpjwHS6.js → errors-DqoyOKev.js} +2 -2
- package/lib/{errors-BTpjwHS6.js.map → errors-DqoyOKev.js.map} +1 -1
- package/lib/index-B7yD7ZUk.js +3680 -0
- package/lib/index-B7yD7ZUk.js.map +1 -0
- package/lib/{index-Bvas0H4x.js → index-BG79m3lF.js} +2 -2
- package/lib/{index-Bvas0H4x.js.map → index-BG79m3lF.js.map} +1 -1
- package/lib/{index-FNRZUtwo.js → index-DHDtI9H5.js} +3 -3
- package/lib/{index-FNRZUtwo.js.map → index-DHDtI9H5.js.map} +1 -1
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +6 -5
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +19 -18
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Tabs.js +10 -10
- package/lib/zudoku.__internal.js +345 -345
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +3 -3
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.auth-supabase.js +3 -3
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/package.json +4 -4
- package/src/app/main.tsx +5 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/interfaces.ts +12 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -3
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
- package/lib/OperationList-DLEAg4qw.js.map +0 -1
- package/lib/RouterError-DZS2d6Sc.js +0 -41
- package/lib/RouterError-DZS2d6Sc.js.map +0 -1
- package/lib/SchemaView-DJiBd0_5.js +0 -397
- package/lib/SchemaView-DJiBd0_5.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DGfd8SGc.js.map +0 -1
- package/lib/createServer-DGD8hEzT.js.map +0 -1
- package/lib/index-DP1xZgfJ.js +0 -3364
- package/lib/index-DP1xZgfJ.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { K as p, i as Pe, a as U, b as oe, c as ae, d as K, G as
|
|
3
|
-
import { a as Jo } from "./index-
|
|
1
|
+
import { i as Co, S as Fo, L as xo, T as R, s as Me, j as ye, k as Do, l as Lo, m as _, n as C, o as qe, p as ss, q as tt, r as Le, t as Po } from "./index-B7yD7ZUk.js";
|
|
2
|
+
import { K as p, i as Pe, a as U, b as oe, c as ae, d as K, G as Ve, p as Z, e as M, f as $o, t as os, g as Mo, h as jo, j as de, k as Be, l as _t, m as ge, n as se, o as Wt, q as as, r as Ot, s as Ie, u as Ne, v as Yt, w as Uo, x as dn, y as ls, z as Ge, A as us, B as Ji, D as it, E as Dn, F as Rt, H as zt, I as Vo, J as qo, L as cs, M as Bo, N as Go, O as pt, P as Mt, Q as pn, R as Qo, C as Ho, S as Ko, T as Wo, U as zo } from "./circular-B-_VyILZ.js";
|
|
3
|
+
import { a as Jo } from "./index-BG79m3lF.js";
|
|
4
4
|
import { traverse as De } from "./processors/traverse.js";
|
|
5
5
|
import { g as Yo } from "./invariant-Bm-FVUQE.js";
|
|
6
6
|
function Xo(t, e) {
|
|
@@ -21,7 +21,7 @@ function Xo(t, e) {
|
|
|
21
21
|
}
|
|
22
22
|
const fs = Object.freeze({
|
|
23
23
|
major: 16,
|
|
24
|
-
minor:
|
|
24
|
+
minor: 12,
|
|
25
25
|
patch: 0,
|
|
26
26
|
preReleaseTag: null
|
|
27
27
|
});
|
|
@@ -41,8 +41,14 @@ function ea(t, e) {
|
|
|
41
41
|
}
|
|
42
42
|
class ta {
|
|
43
43
|
constructor(e, n = {}) {
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const { lexer: i, ...r } = n;
|
|
45
|
+
if (i)
|
|
46
|
+
this._lexer = i;
|
|
47
|
+
else {
|
|
48
|
+
const s = Co(e) ? e : new Fo(e);
|
|
49
|
+
this._lexer = new xo(s);
|
|
50
|
+
}
|
|
51
|
+
this._options = r, this._tokenCounter = 0;
|
|
46
52
|
}
|
|
47
53
|
get tokenCount() {
|
|
48
54
|
return this._tokenCounter;
|
|
@@ -51,7 +57,7 @@ class ta {
|
|
|
51
57
|
* Converts a name lex token into a name parse node.
|
|
52
58
|
*/
|
|
53
59
|
parseName() {
|
|
54
|
-
const e = this.expectToken(
|
|
60
|
+
const e = this.expectToken(R.NAME);
|
|
55
61
|
return this.node(e, {
|
|
56
62
|
kind: p.NAME,
|
|
57
63
|
value: e.value
|
|
@@ -65,9 +71,9 @@ class ta {
|
|
|
65
71
|
return this.node(this._lexer.token, {
|
|
66
72
|
kind: p.DOCUMENT,
|
|
67
73
|
definitions: this.many(
|
|
68
|
-
|
|
74
|
+
R.SOF,
|
|
69
75
|
this.parseDefinition,
|
|
70
|
-
|
|
76
|
+
R.EOF
|
|
71
77
|
)
|
|
72
78
|
});
|
|
73
79
|
}
|
|
@@ -95,10 +101,16 @@ class ta {
|
|
|
95
101
|
* - InputObjectTypeDefinition
|
|
96
102
|
*/
|
|
97
103
|
parseDefinition() {
|
|
98
|
-
if (this.peek(
|
|
104
|
+
if (this.peek(R.BRACE_L))
|
|
99
105
|
return this.parseOperationDefinition();
|
|
100
106
|
const e = this.peekDescription(), n = e ? this._lexer.lookahead() : this._lexer.token;
|
|
101
|
-
if (n.kind ===
|
|
107
|
+
if (e && n.kind === R.BRACE_L)
|
|
108
|
+
throw Me(
|
|
109
|
+
this._lexer.source,
|
|
110
|
+
this._lexer.token.start,
|
|
111
|
+
"Unexpected description, descriptions are not supported on shorthand queries."
|
|
112
|
+
);
|
|
113
|
+
if (n.kind === R.NAME) {
|
|
102
114
|
switch (n.value) {
|
|
103
115
|
case "schema":
|
|
104
116
|
return this.parseSchemaDefinition();
|
|
@@ -117,12 +129,6 @@ class ta {
|
|
|
117
129
|
case "directive":
|
|
118
130
|
return this.parseDirectiveDefinition();
|
|
119
131
|
}
|
|
120
|
-
if (e)
|
|
121
|
-
throw Ke(
|
|
122
|
-
this._lexer.source,
|
|
123
|
-
this._lexer.token.start,
|
|
124
|
-
"Unexpected description, descriptions are supported only on type definitions."
|
|
125
|
-
);
|
|
126
132
|
switch (n.value) {
|
|
127
133
|
case "query":
|
|
128
134
|
case "mutation":
|
|
@@ -130,6 +136,14 @@ class ta {
|
|
|
130
136
|
return this.parseOperationDefinition();
|
|
131
137
|
case "fragment":
|
|
132
138
|
return this.parseFragmentDefinition();
|
|
139
|
+
}
|
|
140
|
+
if (e)
|
|
141
|
+
throw Me(
|
|
142
|
+
this._lexer.source,
|
|
143
|
+
this._lexer.token.start,
|
|
144
|
+
"Unexpected description, only GraphQL definitions support descriptions."
|
|
145
|
+
);
|
|
146
|
+
switch (n.value) {
|
|
133
147
|
case "extend":
|
|
134
148
|
return this.parseTypeSystemExtension();
|
|
135
149
|
}
|
|
@@ -144,21 +158,23 @@ class ta {
|
|
|
144
158
|
*/
|
|
145
159
|
parseOperationDefinition() {
|
|
146
160
|
const e = this._lexer.token;
|
|
147
|
-
if (this.peek(
|
|
161
|
+
if (this.peek(R.BRACE_L))
|
|
148
162
|
return this.node(e, {
|
|
149
163
|
kind: p.OPERATION_DEFINITION,
|
|
150
164
|
operation: ye.QUERY,
|
|
165
|
+
description: void 0,
|
|
151
166
|
name: void 0,
|
|
152
167
|
variableDefinitions: [],
|
|
153
168
|
directives: [],
|
|
154
169
|
selectionSet: this.parseSelectionSet()
|
|
155
170
|
});
|
|
156
|
-
const n = this.parseOperationType();
|
|
157
|
-
let
|
|
158
|
-
return this.peek(
|
|
171
|
+
const n = this.parseDescription(), i = this.parseOperationType();
|
|
172
|
+
let r;
|
|
173
|
+
return this.peek(R.NAME) && (r = this.parseName()), this.node(e, {
|
|
159
174
|
kind: p.OPERATION_DEFINITION,
|
|
160
|
-
operation:
|
|
161
|
-
|
|
175
|
+
operation: i,
|
|
176
|
+
description: n,
|
|
177
|
+
name: r,
|
|
162
178
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
163
179
|
directives: this.parseDirectives(!1),
|
|
164
180
|
selectionSet: this.parseSelectionSet()
|
|
@@ -168,7 +184,7 @@ class ta {
|
|
|
168
184
|
* OperationType : one of query mutation subscription
|
|
169
185
|
*/
|
|
170
186
|
parseOperationType() {
|
|
171
|
-
const e = this.expectToken(
|
|
187
|
+
const e = this.expectToken(R.NAME);
|
|
172
188
|
switch (e.value) {
|
|
173
189
|
case "query":
|
|
174
190
|
return ye.QUERY;
|
|
@@ -184,9 +200,9 @@ class ta {
|
|
|
184
200
|
*/
|
|
185
201
|
parseVariableDefinitions() {
|
|
186
202
|
return this.optionalMany(
|
|
187
|
-
|
|
203
|
+
R.PAREN_L,
|
|
188
204
|
this.parseVariableDefinition,
|
|
189
|
-
|
|
205
|
+
R.PAREN_R
|
|
190
206
|
);
|
|
191
207
|
}
|
|
192
208
|
/**
|
|
@@ -195,9 +211,10 @@ class ta {
|
|
|
195
211
|
parseVariableDefinition() {
|
|
196
212
|
return this.node(this._lexer.token, {
|
|
197
213
|
kind: p.VARIABLE_DEFINITION,
|
|
214
|
+
description: this.parseDescription(),
|
|
198
215
|
variable: this.parseVariable(),
|
|
199
|
-
type: (this.expectToken(
|
|
200
|
-
defaultValue: this.expectOptionalToken(
|
|
216
|
+
type: (this.expectToken(R.COLON), this.parseTypeReference()),
|
|
217
|
+
defaultValue: this.expectOptionalToken(R.EQUALS) ? this.parseConstValueLiteral() : void 0,
|
|
201
218
|
directives: this.parseConstDirectives()
|
|
202
219
|
});
|
|
203
220
|
}
|
|
@@ -206,7 +223,7 @@ class ta {
|
|
|
206
223
|
*/
|
|
207
224
|
parseVariable() {
|
|
208
225
|
const e = this._lexer.token;
|
|
209
|
-
return this.expectToken(
|
|
226
|
+
return this.expectToken(R.DOLLAR), this.node(e, {
|
|
210
227
|
kind: p.VARIABLE,
|
|
211
228
|
name: this.parseName()
|
|
212
229
|
});
|
|
@@ -220,9 +237,9 @@ class ta {
|
|
|
220
237
|
return this.node(this._lexer.token, {
|
|
221
238
|
kind: p.SELECTION_SET,
|
|
222
239
|
selections: this.many(
|
|
223
|
-
|
|
240
|
+
R.BRACE_L,
|
|
224
241
|
this.parseSelection,
|
|
225
|
-
|
|
242
|
+
R.BRACE_R
|
|
226
243
|
)
|
|
227
244
|
});
|
|
228
245
|
}
|
|
@@ -233,7 +250,7 @@ class ta {
|
|
|
233
250
|
* - InlineFragment
|
|
234
251
|
*/
|
|
235
252
|
parseSelection() {
|
|
236
|
-
return this.peek(
|
|
253
|
+
return this.peek(R.SPREAD) ? this.parseFragment() : this.parseField();
|
|
237
254
|
}
|
|
238
255
|
/**
|
|
239
256
|
* Field : Alias? Name Arguments? Directives? SelectionSet?
|
|
@@ -243,13 +260,13 @@ class ta {
|
|
|
243
260
|
parseField() {
|
|
244
261
|
const e = this._lexer.token, n = this.parseName();
|
|
245
262
|
let i, r;
|
|
246
|
-
return this.expectOptionalToken(
|
|
263
|
+
return this.expectOptionalToken(R.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(e, {
|
|
247
264
|
kind: p.FIELD,
|
|
248
265
|
alias: i,
|
|
249
266
|
name: r,
|
|
250
267
|
arguments: this.parseArguments(!1),
|
|
251
268
|
directives: this.parseDirectives(!1),
|
|
252
|
-
selectionSet: this.peek(
|
|
269
|
+
selectionSet: this.peek(R.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
253
270
|
});
|
|
254
271
|
}
|
|
255
272
|
/**
|
|
@@ -257,14 +274,14 @@ class ta {
|
|
|
257
274
|
*/
|
|
258
275
|
parseArguments(e) {
|
|
259
276
|
const n = e ? this.parseConstArgument : this.parseArgument;
|
|
260
|
-
return this.optionalMany(
|
|
277
|
+
return this.optionalMany(R.PAREN_L, n, R.PAREN_R);
|
|
261
278
|
}
|
|
262
279
|
/**
|
|
263
280
|
* Argument[Const] : Name : Value[?Const]
|
|
264
281
|
*/
|
|
265
282
|
parseArgument(e = !1) {
|
|
266
283
|
const n = this._lexer.token, i = this.parseName();
|
|
267
|
-
return this.expectToken(
|
|
284
|
+
return this.expectToken(R.COLON), this.node(n, {
|
|
268
285
|
kind: p.ARGUMENT,
|
|
269
286
|
name: i,
|
|
270
287
|
value: this.parseValueLiteral(e)
|
|
@@ -283,9 +300,9 @@ class ta {
|
|
|
283
300
|
*/
|
|
284
301
|
parseFragment() {
|
|
285
302
|
const e = this._lexer.token;
|
|
286
|
-
this.expectToken(
|
|
303
|
+
this.expectToken(R.SPREAD);
|
|
287
304
|
const n = this.expectOptionalKeyword("on");
|
|
288
|
-
return !n && this.peek(
|
|
305
|
+
return !n && this.peek(R.NAME) ? this.node(e, {
|
|
289
306
|
kind: p.FRAGMENT_SPREAD,
|
|
290
307
|
name: this.parseFragmentName(),
|
|
291
308
|
directives: this.parseDirectives(!1)
|
|
@@ -303,9 +320,10 @@ class ta {
|
|
|
303
320
|
* TypeCondition : NamedType
|
|
304
321
|
*/
|
|
305
322
|
parseFragmentDefinition() {
|
|
306
|
-
const e = this._lexer.token;
|
|
323
|
+
const e = this._lexer.token, n = this.parseDescription();
|
|
307
324
|
return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(e, {
|
|
308
325
|
kind: p.FRAGMENT_DEFINITION,
|
|
326
|
+
description: n,
|
|
309
327
|
name: this.parseFragmentName(),
|
|
310
328
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
311
329
|
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
@@ -313,6 +331,7 @@ class ta {
|
|
|
313
331
|
selectionSet: this.parseSelectionSet()
|
|
314
332
|
}) : this.node(e, {
|
|
315
333
|
kind: p.FRAGMENT_DEFINITION,
|
|
334
|
+
description: n,
|
|
316
335
|
name: this.parseFragmentName(),
|
|
317
336
|
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
318
337
|
directives: this.parseDirectives(!1),
|
|
@@ -349,24 +368,24 @@ class ta {
|
|
|
349
368
|
parseValueLiteral(e) {
|
|
350
369
|
const n = this._lexer.token;
|
|
351
370
|
switch (n.kind) {
|
|
352
|
-
case
|
|
371
|
+
case R.BRACKET_L:
|
|
353
372
|
return this.parseList(e);
|
|
354
|
-
case
|
|
373
|
+
case R.BRACE_L:
|
|
355
374
|
return this.parseObject(e);
|
|
356
|
-
case
|
|
375
|
+
case R.INT:
|
|
357
376
|
return this.advanceLexer(), this.node(n, {
|
|
358
377
|
kind: p.INT,
|
|
359
378
|
value: n.value
|
|
360
379
|
});
|
|
361
|
-
case
|
|
380
|
+
case R.FLOAT:
|
|
362
381
|
return this.advanceLexer(), this.node(n, {
|
|
363
382
|
kind: p.FLOAT,
|
|
364
383
|
value: n.value
|
|
365
384
|
});
|
|
366
|
-
case
|
|
367
|
-
case
|
|
385
|
+
case R.STRING:
|
|
386
|
+
case R.BLOCK_STRING:
|
|
368
387
|
return this.parseStringLiteral();
|
|
369
|
-
case
|
|
388
|
+
case R.NAME:
|
|
370
389
|
switch (this.advanceLexer(), n.value) {
|
|
371
390
|
case "true":
|
|
372
391
|
return this.node(n, {
|
|
@@ -388,11 +407,11 @@ class ta {
|
|
|
388
407
|
value: n.value
|
|
389
408
|
});
|
|
390
409
|
}
|
|
391
|
-
case
|
|
410
|
+
case R.DOLLAR:
|
|
392
411
|
if (e)
|
|
393
|
-
if (this.expectToken(
|
|
412
|
+
if (this.expectToken(R.DOLLAR), this._lexer.token.kind === R.NAME) {
|
|
394
413
|
const i = this._lexer.token.value;
|
|
395
|
-
throw
|
|
414
|
+
throw Me(
|
|
396
415
|
this._lexer.source,
|
|
397
416
|
n.start,
|
|
398
417
|
`Unexpected variable "$${i}" in constant value.`
|
|
@@ -412,7 +431,7 @@ class ta {
|
|
|
412
431
|
return this.advanceLexer(), this.node(e, {
|
|
413
432
|
kind: p.STRING,
|
|
414
433
|
value: e.value,
|
|
415
|
-
block: e.kind ===
|
|
434
|
+
block: e.kind === R.BLOCK_STRING
|
|
416
435
|
});
|
|
417
436
|
}
|
|
418
437
|
/**
|
|
@@ -424,7 +443,7 @@ class ta {
|
|
|
424
443
|
const n = () => this.parseValueLiteral(e);
|
|
425
444
|
return this.node(this._lexer.token, {
|
|
426
445
|
kind: p.LIST,
|
|
427
|
-
values: this.any(
|
|
446
|
+
values: this.any(R.BRACKET_L, n, R.BRACKET_R)
|
|
428
447
|
});
|
|
429
448
|
}
|
|
430
449
|
/**
|
|
@@ -438,7 +457,7 @@ class ta {
|
|
|
438
457
|
const n = () => this.parseObjectField(e);
|
|
439
458
|
return this.node(this._lexer.token, {
|
|
440
459
|
kind: p.OBJECT,
|
|
441
|
-
fields: this.any(
|
|
460
|
+
fields: this.any(R.BRACE_L, n, R.BRACE_R)
|
|
442
461
|
});
|
|
443
462
|
}
|
|
444
463
|
/**
|
|
@@ -446,7 +465,7 @@ class ta {
|
|
|
446
465
|
*/
|
|
447
466
|
parseObjectField(e) {
|
|
448
467
|
const n = this._lexer.token, i = this.parseName();
|
|
449
|
-
return this.expectToken(
|
|
468
|
+
return this.expectToken(R.COLON), this.node(n, {
|
|
450
469
|
kind: p.OBJECT_FIELD,
|
|
451
470
|
name: i,
|
|
452
471
|
value: this.parseValueLiteral(e)
|
|
@@ -458,7 +477,7 @@ class ta {
|
|
|
458
477
|
*/
|
|
459
478
|
parseDirectives(e) {
|
|
460
479
|
const n = [];
|
|
461
|
-
for (; this.peek(
|
|
480
|
+
for (; this.peek(R.AT); )
|
|
462
481
|
n.push(this.parseDirective(e));
|
|
463
482
|
return n;
|
|
464
483
|
}
|
|
@@ -472,7 +491,7 @@ class ta {
|
|
|
472
491
|
*/
|
|
473
492
|
parseDirective(e) {
|
|
474
493
|
const n = this._lexer.token;
|
|
475
|
-
return this.expectToken(
|
|
494
|
+
return this.expectToken(R.AT), this.node(n, {
|
|
476
495
|
kind: p.DIRECTIVE,
|
|
477
496
|
name: this.parseName(),
|
|
478
497
|
arguments: this.parseArguments(e)
|
|
@@ -488,15 +507,15 @@ class ta {
|
|
|
488
507
|
parseTypeReference() {
|
|
489
508
|
const e = this._lexer.token;
|
|
490
509
|
let n;
|
|
491
|
-
if (this.expectOptionalToken(
|
|
510
|
+
if (this.expectOptionalToken(R.BRACKET_L)) {
|
|
492
511
|
const i = this.parseTypeReference();
|
|
493
|
-
this.expectToken(
|
|
512
|
+
this.expectToken(R.BRACKET_R), n = this.node(e, {
|
|
494
513
|
kind: p.LIST_TYPE,
|
|
495
514
|
type: i
|
|
496
515
|
});
|
|
497
516
|
} else
|
|
498
517
|
n = this.parseNamedType();
|
|
499
|
-
return this.expectOptionalToken(
|
|
518
|
+
return this.expectOptionalToken(R.BANG) ? this.node(e, {
|
|
500
519
|
kind: p.NON_NULL_TYPE,
|
|
501
520
|
type: n
|
|
502
521
|
}) : n;
|
|
@@ -512,7 +531,7 @@ class ta {
|
|
|
512
531
|
}
|
|
513
532
|
// Implements the parsing rules in the Type Definition section.
|
|
514
533
|
peekDescription() {
|
|
515
|
-
return this.peek(
|
|
534
|
+
return this.peek(R.STRING) || this.peek(R.BLOCK_STRING);
|
|
516
535
|
}
|
|
517
536
|
/**
|
|
518
537
|
* Description : StringValue
|
|
@@ -530,9 +549,9 @@ class ta {
|
|
|
530
549
|
const e = this._lexer.token, n = this.parseDescription();
|
|
531
550
|
this.expectKeyword("schema");
|
|
532
551
|
const i = this.parseConstDirectives(), r = this.many(
|
|
533
|
-
|
|
552
|
+
R.BRACE_L,
|
|
534
553
|
this.parseOperationTypeDefinition,
|
|
535
|
-
|
|
554
|
+
R.BRACE_R
|
|
536
555
|
);
|
|
537
556
|
return this.node(e, {
|
|
538
557
|
kind: p.SCHEMA_DEFINITION,
|
|
@@ -546,7 +565,7 @@ class ta {
|
|
|
546
565
|
*/
|
|
547
566
|
parseOperationTypeDefinition() {
|
|
548
567
|
const e = this._lexer.token, n = this.parseOperationType();
|
|
549
|
-
this.expectToken(
|
|
568
|
+
this.expectToken(R.COLON);
|
|
550
569
|
const i = this.parseNamedType();
|
|
551
570
|
return this.node(e, {
|
|
552
571
|
kind: p.OPERATION_TYPE_DEFINITION,
|
|
@@ -592,7 +611,7 @@ class ta {
|
|
|
592
611
|
* - ImplementsInterfaces & NamedType
|
|
593
612
|
*/
|
|
594
613
|
parseImplementsInterfaces() {
|
|
595
|
-
return this.expectOptionalKeyword("implements") ? this.delimitedMany(
|
|
614
|
+
return this.expectOptionalKeyword("implements") ? this.delimitedMany(R.AMP, this.parseNamedType) : [];
|
|
596
615
|
}
|
|
597
616
|
/**
|
|
598
617
|
* ```
|
|
@@ -601,9 +620,9 @@ class ta {
|
|
|
601
620
|
*/
|
|
602
621
|
parseFieldsDefinition() {
|
|
603
622
|
return this.optionalMany(
|
|
604
|
-
|
|
623
|
+
R.BRACE_L,
|
|
605
624
|
this.parseFieldDefinition,
|
|
606
|
-
|
|
625
|
+
R.BRACE_R
|
|
607
626
|
);
|
|
608
627
|
}
|
|
609
628
|
/**
|
|
@@ -612,7 +631,7 @@ class ta {
|
|
|
612
631
|
*/
|
|
613
632
|
parseFieldDefinition() {
|
|
614
633
|
const e = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
|
|
615
|
-
this.expectToken(
|
|
634
|
+
this.expectToken(R.COLON);
|
|
616
635
|
const s = this.parseTypeReference(), o = this.parseConstDirectives();
|
|
617
636
|
return this.node(e, {
|
|
618
637
|
kind: p.FIELD_DEFINITION,
|
|
@@ -628,9 +647,9 @@ class ta {
|
|
|
628
647
|
*/
|
|
629
648
|
parseArgumentDefs() {
|
|
630
649
|
return this.optionalMany(
|
|
631
|
-
|
|
650
|
+
R.PAREN_L,
|
|
632
651
|
this.parseInputValueDef,
|
|
633
|
-
|
|
652
|
+
R.PAREN_R
|
|
634
653
|
);
|
|
635
654
|
}
|
|
636
655
|
/**
|
|
@@ -639,10 +658,10 @@ class ta {
|
|
|
639
658
|
*/
|
|
640
659
|
parseInputValueDef() {
|
|
641
660
|
const e = this._lexer.token, n = this.parseDescription(), i = this.parseName();
|
|
642
|
-
this.expectToken(
|
|
661
|
+
this.expectToken(R.COLON);
|
|
643
662
|
const r = this.parseTypeReference();
|
|
644
663
|
let s;
|
|
645
|
-
this.expectOptionalToken(
|
|
664
|
+
this.expectOptionalToken(R.EQUALS) && (s = this.parseConstValueLiteral());
|
|
646
665
|
const o = this.parseConstDirectives();
|
|
647
666
|
return this.node(e, {
|
|
648
667
|
kind: p.INPUT_VALUE_DEFINITION,
|
|
@@ -692,7 +711,7 @@ class ta {
|
|
|
692
711
|
* - UnionMemberTypes | NamedType
|
|
693
712
|
*/
|
|
694
713
|
parseUnionMemberTypes() {
|
|
695
|
-
return this.expectOptionalToken(
|
|
714
|
+
return this.expectOptionalToken(R.EQUALS) ? this.delimitedMany(R.PIPE, this.parseNamedType) : [];
|
|
696
715
|
}
|
|
697
716
|
/**
|
|
698
717
|
* EnumTypeDefinition :
|
|
@@ -717,9 +736,9 @@ class ta {
|
|
|
717
736
|
*/
|
|
718
737
|
parseEnumValuesDefinition() {
|
|
719
738
|
return this.optionalMany(
|
|
720
|
-
|
|
739
|
+
R.BRACE_L,
|
|
721
740
|
this.parseEnumValueDefinition,
|
|
722
|
-
|
|
741
|
+
R.BRACE_R
|
|
723
742
|
);
|
|
724
743
|
}
|
|
725
744
|
/**
|
|
@@ -739,7 +758,7 @@ class ta {
|
|
|
739
758
|
*/
|
|
740
759
|
parseEnumValueName() {
|
|
741
760
|
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
|
|
742
|
-
throw
|
|
761
|
+
throw Me(
|
|
743
762
|
this._lexer.source,
|
|
744
763
|
this._lexer.token.start,
|
|
745
764
|
`${nn(
|
|
@@ -771,9 +790,9 @@ class ta {
|
|
|
771
790
|
*/
|
|
772
791
|
parseInputFieldsDefinition() {
|
|
773
792
|
return this.optionalMany(
|
|
774
|
-
|
|
793
|
+
R.BRACE_L,
|
|
775
794
|
this.parseInputValueDef,
|
|
776
|
-
|
|
795
|
+
R.BRACE_R
|
|
777
796
|
);
|
|
778
797
|
}
|
|
779
798
|
/**
|
|
@@ -791,7 +810,7 @@ class ta {
|
|
|
791
810
|
*/
|
|
792
811
|
parseTypeSystemExtension() {
|
|
793
812
|
const e = this._lexer.lookahead();
|
|
794
|
-
if (e.kind ===
|
|
813
|
+
if (e.kind === R.NAME)
|
|
795
814
|
switch (e.value) {
|
|
796
815
|
case "schema":
|
|
797
816
|
return this.parseSchemaExtension();
|
|
@@ -821,9 +840,9 @@ class ta {
|
|
|
821
840
|
const e = this._lexer.token;
|
|
822
841
|
this.expectKeyword("extend"), this.expectKeyword("schema");
|
|
823
842
|
const n = this.parseConstDirectives(), i = this.optionalMany(
|
|
824
|
-
|
|
843
|
+
R.BRACE_L,
|
|
825
844
|
this.parseOperationTypeDefinition,
|
|
826
|
-
|
|
845
|
+
R.BRACE_R
|
|
827
846
|
);
|
|
828
847
|
if (n.length === 0 && i.length === 0)
|
|
829
848
|
throw this.unexpected();
|
|
@@ -951,7 +970,7 @@ class ta {
|
|
|
951
970
|
*/
|
|
952
971
|
parseDirectiveDefinition() {
|
|
953
972
|
const e = this._lexer.token, n = this.parseDescription();
|
|
954
|
-
this.expectKeyword("directive"), this.expectToken(
|
|
973
|
+
this.expectKeyword("directive"), this.expectToken(R.AT);
|
|
955
974
|
const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
|
|
956
975
|
this.expectKeyword("on");
|
|
957
976
|
const o = this.parseDirectiveLocations();
|
|
@@ -970,7 +989,7 @@ class ta {
|
|
|
970
989
|
* - DirectiveLocations | DirectiveLocation
|
|
971
990
|
*/
|
|
972
991
|
parseDirectiveLocations() {
|
|
973
|
-
return this.delimitedMany(
|
|
992
|
+
return this.delimitedMany(R.PIPE, this.parseDirectiveLocation);
|
|
974
993
|
}
|
|
975
994
|
/*
|
|
976
995
|
* DirectiveLocation :
|
|
@@ -1005,6 +1024,41 @@ class ta {
|
|
|
1005
1024
|
return n;
|
|
1006
1025
|
throw this.unexpected(e);
|
|
1007
1026
|
}
|
|
1027
|
+
// Schema Coordinates
|
|
1028
|
+
/**
|
|
1029
|
+
* SchemaCoordinate :
|
|
1030
|
+
* - Name
|
|
1031
|
+
* - Name . Name
|
|
1032
|
+
* - Name . Name ( Name : )
|
|
1033
|
+
* - \@ Name
|
|
1034
|
+
* - \@ Name ( Name : )
|
|
1035
|
+
*/
|
|
1036
|
+
parseSchemaCoordinate() {
|
|
1037
|
+
const e = this._lexer.token, n = this.expectOptionalToken(R.AT), i = this.parseName();
|
|
1038
|
+
let r;
|
|
1039
|
+
!n && this.expectOptionalToken(R.DOT) && (r = this.parseName());
|
|
1040
|
+
let s;
|
|
1041
|
+
return (n || r) && this.expectOptionalToken(R.PAREN_L) && (s = this.parseName(), this.expectToken(R.COLON), this.expectToken(R.PAREN_R)), n ? s ? this.node(e, {
|
|
1042
|
+
kind: p.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1043
|
+
name: i,
|
|
1044
|
+
argumentName: s
|
|
1045
|
+
}) : this.node(e, {
|
|
1046
|
+
kind: p.DIRECTIVE_COORDINATE,
|
|
1047
|
+
name: i
|
|
1048
|
+
}) : r ? s ? this.node(e, {
|
|
1049
|
+
kind: p.ARGUMENT_COORDINATE,
|
|
1050
|
+
name: i,
|
|
1051
|
+
fieldName: r,
|
|
1052
|
+
argumentName: s
|
|
1053
|
+
}) : this.node(e, {
|
|
1054
|
+
kind: p.MEMBER_COORDINATE,
|
|
1055
|
+
name: i,
|
|
1056
|
+
memberName: r
|
|
1057
|
+
}) : this.node(e, {
|
|
1058
|
+
kind: p.TYPE_COORDINATE,
|
|
1059
|
+
name: i
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1008
1062
|
// Core parsing utility functions
|
|
1009
1063
|
/**
|
|
1010
1064
|
* Returns a node that, if configured to do so, sets a "loc" field as a
|
|
@@ -1032,7 +1086,7 @@ class ta {
|
|
|
1032
1086
|
const n = this._lexer.token;
|
|
1033
1087
|
if (n.kind === e)
|
|
1034
1088
|
return this.advanceLexer(), n;
|
|
1035
|
-
throw
|
|
1089
|
+
throw Me(
|
|
1036
1090
|
this._lexer.source,
|
|
1037
1091
|
n.start,
|
|
1038
1092
|
`Expected ${ds(e)}, found ${nn(n)}.`
|
|
@@ -1051,10 +1105,10 @@ class ta {
|
|
|
1051
1105
|
*/
|
|
1052
1106
|
expectKeyword(e) {
|
|
1053
1107
|
const n = this._lexer.token;
|
|
1054
|
-
if (n.kind ===
|
|
1108
|
+
if (n.kind === R.NAME && n.value === e)
|
|
1055
1109
|
this.advanceLexer();
|
|
1056
1110
|
else
|
|
1057
|
-
throw
|
|
1111
|
+
throw Me(
|
|
1058
1112
|
this._lexer.source,
|
|
1059
1113
|
n.start,
|
|
1060
1114
|
`Expected "${e}", found ${nn(n)}.`
|
|
@@ -1066,14 +1120,14 @@ class ta {
|
|
|
1066
1120
|
*/
|
|
1067
1121
|
expectOptionalKeyword(e) {
|
|
1068
1122
|
const n = this._lexer.token;
|
|
1069
|
-
return n.kind ===
|
|
1123
|
+
return n.kind === R.NAME && n.value === e ? (this.advanceLexer(), !0) : !1;
|
|
1070
1124
|
}
|
|
1071
1125
|
/**
|
|
1072
1126
|
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
1073
1127
|
*/
|
|
1074
1128
|
unexpected(e) {
|
|
1075
1129
|
const n = e ?? this._lexer.token;
|
|
1076
|
-
return
|
|
1130
|
+
return Me(
|
|
1077
1131
|
this._lexer.source,
|
|
1078
1132
|
n.start,
|
|
1079
1133
|
`Unexpected ${nn(n)}.`
|
|
@@ -1135,8 +1189,8 @@ class ta {
|
|
|
1135
1189
|
}
|
|
1136
1190
|
advanceLexer() {
|
|
1137
1191
|
const { maxTokens: e } = this._options, n = this._lexer.advance();
|
|
1138
|
-
if (n.kind !==
|
|
1139
|
-
throw
|
|
1192
|
+
if (n.kind !== R.EOF && (++this._tokenCounter, e !== void 0 && this._tokenCounter > e))
|
|
1193
|
+
throw Me(
|
|
1140
1194
|
this._lexer.source,
|
|
1141
1195
|
n.start,
|
|
1142
1196
|
`Document contains more that ${e} tokens. Parsing aborted.`
|
|
@@ -1159,7 +1213,7 @@ function St(t, e, n) {
|
|
|
1159
1213
|
function Yi(t, e, n) {
|
|
1160
1214
|
return e === n ? !0 : Pe(e) ? Pe(n) ? t.getPossibleTypes(e).some((i) => t.isSubType(n, i)) : t.isSubType(e, n) : Pe(n) ? t.isSubType(n, e) : !1;
|
|
1161
1215
|
}
|
|
1162
|
-
const Wn = 2147483647, zn = -2147483648, Ln = new
|
|
1216
|
+
const Wn = 2147483647, zn = -2147483648, Ln = new Ve({
|
|
1163
1217
|
name: "Int",
|
|
1164
1218
|
description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
|
|
1165
1219
|
serialize(t) {
|
|
@@ -1169,18 +1223,18 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1169
1223
|
let n = e;
|
|
1170
1224
|
if (typeof e == "string" && e !== "" && (n = Number(e)), typeof n != "number" || !Number.isInteger(n))
|
|
1171
1225
|
throw new _(
|
|
1172
|
-
`Int cannot represent non-integer value: ${
|
|
1226
|
+
`Int cannot represent non-integer value: ${C(e)}`
|
|
1173
1227
|
);
|
|
1174
1228
|
if (n > Wn || n < zn)
|
|
1175
1229
|
throw new _(
|
|
1176
|
-
"Int cannot represent non 32-bit signed integer value: " +
|
|
1230
|
+
"Int cannot represent non 32-bit signed integer value: " + C(e)
|
|
1177
1231
|
);
|
|
1178
1232
|
return n;
|
|
1179
1233
|
},
|
|
1180
1234
|
parseValue(t) {
|
|
1181
1235
|
if (typeof t != "number" || !Number.isInteger(t))
|
|
1182
1236
|
throw new _(
|
|
1183
|
-
`Int cannot represent non-integer value: ${
|
|
1237
|
+
`Int cannot represent non-integer value: ${C(t)}`
|
|
1184
1238
|
);
|
|
1185
1239
|
if (t > Wn || t < zn)
|
|
1186
1240
|
throw new _(
|
|
@@ -1206,7 +1260,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1206
1260
|
);
|
|
1207
1261
|
return e;
|
|
1208
1262
|
}
|
|
1209
|
-
}), Ni = new
|
|
1263
|
+
}), Ni = new Ve({
|
|
1210
1264
|
name: "Float",
|
|
1211
1265
|
description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
|
|
1212
1266
|
serialize(t) {
|
|
@@ -1216,14 +1270,14 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1216
1270
|
let n = e;
|
|
1217
1271
|
if (typeof e == "string" && e !== "" && (n = Number(e)), typeof n != "number" || !Number.isFinite(n))
|
|
1218
1272
|
throw new _(
|
|
1219
|
-
`Float cannot represent non numeric value: ${
|
|
1273
|
+
`Float cannot represent non numeric value: ${C(e)}`
|
|
1220
1274
|
);
|
|
1221
1275
|
return n;
|
|
1222
1276
|
},
|
|
1223
1277
|
parseValue(t) {
|
|
1224
1278
|
if (typeof t != "number" || !Number.isFinite(t))
|
|
1225
1279
|
throw new _(
|
|
1226
|
-
`Float cannot represent non numeric value: ${
|
|
1280
|
+
`Float cannot represent non numeric value: ${C(t)}`
|
|
1227
1281
|
);
|
|
1228
1282
|
return t;
|
|
1229
1283
|
},
|
|
@@ -1235,7 +1289,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1235
1289
|
);
|
|
1236
1290
|
return parseFloat(t.value);
|
|
1237
1291
|
}
|
|
1238
|
-
}), G = new
|
|
1292
|
+
}), G = new Ve({
|
|
1239
1293
|
name: "String",
|
|
1240
1294
|
description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
|
|
1241
1295
|
serialize(t) {
|
|
@@ -1247,13 +1301,13 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1247
1301
|
if (typeof e == "number" && Number.isFinite(e))
|
|
1248
1302
|
return e.toString();
|
|
1249
1303
|
throw new _(
|
|
1250
|
-
`String cannot represent value: ${
|
|
1304
|
+
`String cannot represent value: ${C(t)}`
|
|
1251
1305
|
);
|
|
1252
1306
|
},
|
|
1253
1307
|
parseValue(t) {
|
|
1254
1308
|
if (typeof t != "string")
|
|
1255
1309
|
throw new _(
|
|
1256
|
-
`String cannot represent a non string value: ${
|
|
1310
|
+
`String cannot represent a non string value: ${C(t)}`
|
|
1257
1311
|
);
|
|
1258
1312
|
return t;
|
|
1259
1313
|
},
|
|
@@ -1267,7 +1321,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1267
1321
|
);
|
|
1268
1322
|
return t.value;
|
|
1269
1323
|
}
|
|
1270
|
-
}), te = new
|
|
1324
|
+
}), te = new Ve({
|
|
1271
1325
|
name: "Boolean",
|
|
1272
1326
|
description: "The `Boolean` scalar type represents `true` or `false`.",
|
|
1273
1327
|
serialize(t) {
|
|
@@ -1277,13 +1331,13 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1277
1331
|
if (Number.isFinite(e))
|
|
1278
1332
|
return e !== 0;
|
|
1279
1333
|
throw new _(
|
|
1280
|
-
`Boolean cannot represent a non boolean value: ${
|
|
1334
|
+
`Boolean cannot represent a non boolean value: ${C(e)}`
|
|
1281
1335
|
);
|
|
1282
1336
|
},
|
|
1283
1337
|
parseValue(t) {
|
|
1284
1338
|
if (typeof t != "boolean")
|
|
1285
1339
|
throw new _(
|
|
1286
|
-
`Boolean cannot represent a non boolean value: ${
|
|
1340
|
+
`Boolean cannot represent a non boolean value: ${C(t)}`
|
|
1287
1341
|
);
|
|
1288
1342
|
return t;
|
|
1289
1343
|
},
|
|
@@ -1297,7 +1351,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1297
1351
|
);
|
|
1298
1352
|
return t.value;
|
|
1299
1353
|
}
|
|
1300
|
-
}), Pn = new
|
|
1354
|
+
}), Pn = new Ve({
|
|
1301
1355
|
name: "ID",
|
|
1302
1356
|
description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',
|
|
1303
1357
|
serialize(t) {
|
|
@@ -1307,7 +1361,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1307
1361
|
if (Number.isInteger(e))
|
|
1308
1362
|
return String(e);
|
|
1309
1363
|
throw new _(
|
|
1310
|
-
`ID cannot represent value: ${
|
|
1364
|
+
`ID cannot represent value: ${C(t)}`
|
|
1311
1365
|
);
|
|
1312
1366
|
},
|
|
1313
1367
|
parseValue(t) {
|
|
@@ -1315,7 +1369,7 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1315
1369
|
return t;
|
|
1316
1370
|
if (typeof t == "number" && Number.isInteger(t))
|
|
1317
1371
|
return t.toString();
|
|
1318
|
-
throw new _(`ID cannot represent value: ${
|
|
1372
|
+
throw new _(`ID cannot represent value: ${C(t)}`);
|
|
1319
1373
|
},
|
|
1320
1374
|
parseLiteral(t) {
|
|
1321
1375
|
if (t.kind !== p.STRING && t.kind !== p.INT)
|
|
@@ -1335,10 +1389,10 @@ const Wn = 2147483647, zn = -2147483648, Ln = new Ue({
|
|
|
1335
1389
|
Pn
|
|
1336
1390
|
]);
|
|
1337
1391
|
function Xt(t) {
|
|
1338
|
-
if (
|
|
1392
|
+
if (qe(t)) {
|
|
1339
1393
|
if (typeof t.valueOf == "function") {
|
|
1340
1394
|
const e = t.valueOf();
|
|
1341
|
-
if (!
|
|
1395
|
+
if (!qe(e))
|
|
1342
1396
|
return e;
|
|
1343
1397
|
}
|
|
1344
1398
|
if (typeof t.toJSON == "function")
|
|
@@ -1354,7 +1408,7 @@ class $e {
|
|
|
1354
1408
|
var n, i;
|
|
1355
1409
|
this.name = $o(e.name), this.description = e.description, this.locations = e.locations, this.isRepeatable = (n = e.isRepeatable) !== null && n !== void 0 ? n : !1, this.extensions = os(e.extensions), this.astNode = e.astNode, Array.isArray(e.locations) || tt(!1, `@${e.name} locations must be an Array.`);
|
|
1356
1410
|
const r = (i = e.args) !== null && i !== void 0 ? i : {};
|
|
1357
|
-
|
|
1411
|
+
qe(r) && !Array.isArray(r) || tt(
|
|
1358
1412
|
!1,
|
|
1359
1413
|
`@${e.name} args must be an object with argument names as keys.`
|
|
1360
1414
|
), this.args = Mo(r);
|
|
@@ -1380,7 +1434,7 @@ class $e {
|
|
|
1380
1434
|
return this.toString();
|
|
1381
1435
|
}
|
|
1382
1436
|
}
|
|
1383
|
-
const
|
|
1437
|
+
const Ri = new $e({
|
|
1384
1438
|
name: "include",
|
|
1385
1439
|
description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
|
|
1386
1440
|
locations: [
|
|
@@ -1394,7 +1448,7 @@ const Ai = new $e({
|
|
|
1394
1448
|
description: "Included when true."
|
|
1395
1449
|
}
|
|
1396
1450
|
}
|
|
1397
|
-
}),
|
|
1451
|
+
}), Ai = new $e({
|
|
1398
1452
|
name: "skip",
|
|
1399
1453
|
description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
|
|
1400
1454
|
locations: [
|
|
@@ -1440,8 +1494,8 @@ const Ai = new $e({
|
|
|
1440
1494
|
locations: [x.INPUT_OBJECT],
|
|
1441
1495
|
args: {}
|
|
1442
1496
|
}), Zt = Object.freeze([
|
|
1443
|
-
Ai,
|
|
1444
1497
|
Ri,
|
|
1498
|
+
Ai,
|
|
1445
1499
|
hs,
|
|
1446
1500
|
ra,
|
|
1447
1501
|
sa
|
|
@@ -1476,7 +1530,7 @@ function jt(t, e) {
|
|
|
1476
1530
|
return jt(t, n);
|
|
1477
1531
|
}
|
|
1478
1532
|
if (de(e)) {
|
|
1479
|
-
if (!
|
|
1533
|
+
if (!qe(t))
|
|
1480
1534
|
return null;
|
|
1481
1535
|
const n = [];
|
|
1482
1536
|
for (const i of Object.values(e.getFields())) {
|
|
@@ -1495,7 +1549,7 @@ function jt(t, e) {
|
|
|
1495
1549
|
fields: n
|
|
1496
1550
|
};
|
|
1497
1551
|
}
|
|
1498
|
-
if (
|
|
1552
|
+
if (Be(e)) {
|
|
1499
1553
|
const n = e.serialize(t);
|
|
1500
1554
|
if (n == null)
|
|
1501
1555
|
return null;
|
|
@@ -1525,9 +1579,9 @@ function jt(t, e) {
|
|
|
1525
1579
|
kind: p.STRING,
|
|
1526
1580
|
value: n
|
|
1527
1581
|
};
|
|
1528
|
-
throw new TypeError(`Cannot convert value to AST: ${
|
|
1582
|
+
throw new TypeError(`Cannot convert value to AST: ${C(n)}.`);
|
|
1529
1583
|
}
|
|
1530
|
-
Le(!1, "Unexpected input type: " +
|
|
1584
|
+
Le(!1, "Unexpected input type: " + C(e));
|
|
1531
1585
|
}
|
|
1532
1586
|
const Xi = /^-?(?:0|[1-9][0-9]*)$/, ki = new ge({
|
|
1533
1587
|
name: "__Schema",
|
|
@@ -1692,7 +1746,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
1692
1746
|
description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
|
|
1693
1747
|
fields: () => ({
|
|
1694
1748
|
kind: {
|
|
1695
|
-
type: new M(
|
|
1749
|
+
type: new M(Es),
|
|
1696
1750
|
resolve(t) {
|
|
1697
1751
|
if (as(t))
|
|
1698
1752
|
return X.SCALAR;
|
|
@@ -1710,7 +1764,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
1710
1764
|
return X.LIST;
|
|
1711
1765
|
if (U(t))
|
|
1712
1766
|
return X.NON_NULL;
|
|
1713
|
-
Le(!1, `Unexpected type: "${
|
|
1767
|
+
Le(!1, `Unexpected type: "${C(t)}".`);
|
|
1714
1768
|
}
|
|
1715
1769
|
},
|
|
1716
1770
|
name: {
|
|
@@ -1758,7 +1812,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
1758
1812
|
}
|
|
1759
1813
|
},
|
|
1760
1814
|
enumValues: {
|
|
1761
|
-
type: new se(new M(
|
|
1815
|
+
type: new se(new M(Ts)),
|
|
1762
1816
|
args: {
|
|
1763
1817
|
includeDeprecated: {
|
|
1764
1818
|
type: te,
|
|
@@ -1871,7 +1925,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
1871
1925
|
resolve: (t) => t.deprecationReason
|
|
1872
1926
|
}
|
|
1873
1927
|
})
|
|
1874
|
-
}),
|
|
1928
|
+
}), Ts = new ge({
|
|
1875
1929
|
name: "__EnumValue",
|
|
1876
1930
|
description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
|
|
1877
1931
|
fields: () => ({
|
|
@@ -1897,7 +1951,7 @@ var X;
|
|
|
1897
1951
|
(function(t) {
|
|
1898
1952
|
t.SCALAR = "SCALAR", t.OBJECT = "OBJECT", t.INTERFACE = "INTERFACE", t.UNION = "UNION", t.ENUM = "ENUM", t.INPUT_OBJECT = "INPUT_OBJECT", t.LIST = "LIST", t.NON_NULL = "NON_NULL";
|
|
1899
1953
|
})(X || (X = {}));
|
|
1900
|
-
const
|
|
1954
|
+
const Es = new Wt({
|
|
1901
1955
|
name: "__TypeKind",
|
|
1902
1956
|
description: "An enum describing what kind of type a given `__Type` is.",
|
|
1903
1957
|
values: {
|
|
@@ -1934,7 +1988,7 @@ const Ts = new Wt({
|
|
|
1934
1988
|
description: "Indicates this type is a non-null. `ofType` is a valid field."
|
|
1935
1989
|
}
|
|
1936
1990
|
}
|
|
1937
|
-
}),
|
|
1991
|
+
}), Tn = {
|
|
1938
1992
|
name: "__schema",
|
|
1939
1993
|
type: new M(ki),
|
|
1940
1994
|
description: "Access the current type schema of this server.",
|
|
@@ -1943,7 +1997,7 @@ const Ts = new Wt({
|
|
|
1943
1997
|
deprecationReason: void 0,
|
|
1944
1998
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
1945
1999
|
astNode: void 0
|
|
1946
|
-
},
|
|
2000
|
+
}, En = {
|
|
1947
2001
|
name: "__type",
|
|
1948
2002
|
type: _e,
|
|
1949
2003
|
description: "Request the type information of a single type.",
|
|
@@ -1978,30 +2032,30 @@ const Ts = new Wt({
|
|
|
1978
2032
|
_e,
|
|
1979
2033
|
bs,
|
|
1980
2034
|
$n,
|
|
1981
|
-
|
|
1982
|
-
|
|
2035
|
+
Ts,
|
|
2036
|
+
Es
|
|
1983
2037
|
]);
|
|
1984
2038
|
function ws(t) {
|
|
1985
2039
|
return vs.some(({ name: e }) => t.name === e);
|
|
1986
2040
|
}
|
|
1987
2041
|
function Ss(t) {
|
|
1988
|
-
return ss(t,
|
|
2042
|
+
return ss(t, Ci);
|
|
1989
2043
|
}
|
|
1990
2044
|
function oa(t) {
|
|
1991
2045
|
if (!Ss(t))
|
|
1992
|
-
throw new Error(`Expected ${
|
|
2046
|
+
throw new Error(`Expected ${C(t)} to be a GraphQL schema.`);
|
|
1993
2047
|
return t;
|
|
1994
2048
|
}
|
|
1995
|
-
class
|
|
2049
|
+
class Ci {
|
|
1996
2050
|
// Used as a cache for validateSchema().
|
|
1997
2051
|
constructor(e) {
|
|
1998
2052
|
var n, i;
|
|
1999
|
-
this.__validationErrors = e.assumeValid === !0 ? [] : void 0,
|
|
2053
|
+
this.__validationErrors = e.assumeValid === !0 ? [] : void 0, qe(e) || tt(!1, "Must provide configuration object."), !e.types || Array.isArray(e.types) || tt(
|
|
2000
2054
|
!1,
|
|
2001
|
-
`"types" must be Array if provided but got: ${
|
|
2055
|
+
`"types" must be Array if provided but got: ${C(e.types)}.`
|
|
2002
2056
|
), !e.directives || Array.isArray(e.directives) || tt(
|
|
2003
2057
|
!1,
|
|
2004
|
-
`"directives" must be Array if provided but got: ${
|
|
2058
|
+
`"directives" must be Array if provided but got: ${C(e.directives)}.`
|
|
2005
2059
|
), this.description = e.description, this.extensions = os(e.extensions), this.astNode = e.astNode, this.extensionASTNodes = (n = e.extensionASTNodes) !== null && n !== void 0 ? n : [], this._queryType = e.query, this._mutationType = e.mutation, this._subscriptionType = e.subscription, this._directives = (i = e.directives) !== null && i !== void 0 ? i : Zt;
|
|
2006
2060
|
const r = new Set(e.types);
|
|
2007
2061
|
if (e.types != null)
|
|
@@ -2179,7 +2233,7 @@ function ua(t) {
|
|
|
2179
2233
|
else if (!K(n)) {
|
|
2180
2234
|
var i;
|
|
2181
2235
|
t.reportError(
|
|
2182
|
-
`Query root type must be Object type, it cannot be ${
|
|
2236
|
+
`Query root type must be Object type, it cannot be ${C(
|
|
2183
2237
|
n
|
|
2184
2238
|
)}.`,
|
|
2185
2239
|
(i = Jn(
|
|
@@ -2192,7 +2246,7 @@ function ua(t) {
|
|
|
2192
2246
|
if (r && !K(r)) {
|
|
2193
2247
|
var s;
|
|
2194
2248
|
t.reportError(
|
|
2195
|
-
`Mutation root type must be Object type if provided, it cannot be ${
|
|
2249
|
+
`Mutation root type must be Object type if provided, it cannot be ${C(r)}.`,
|
|
2196
2250
|
(s = Jn(
|
|
2197
2251
|
e,
|
|
2198
2252
|
ye.MUTATION
|
|
@@ -2203,7 +2257,7 @@ function ua(t) {
|
|
|
2203
2257
|
if (o && !K(o)) {
|
|
2204
2258
|
var a;
|
|
2205
2259
|
t.reportError(
|
|
2206
|
-
`Subscription root type must be Object type if provided, it cannot be ${
|
|
2260
|
+
`Subscription root type must be Object type if provided, it cannot be ${C(o)}.`,
|
|
2207
2261
|
(a = Jn(
|
|
2208
2262
|
e,
|
|
2209
2263
|
ye.SUBSCRIPTION
|
|
@@ -2228,7 +2282,7 @@ function ca(t) {
|
|
|
2228
2282
|
for (const n of t.schema.getDirectives()) {
|
|
2229
2283
|
if (!ps(n)) {
|
|
2230
2284
|
t.reportError(
|
|
2231
|
-
`Expected directive but got: ${
|
|
2285
|
+
`Expected directive but got: ${C(n)}.`,
|
|
2232
2286
|
n?.astNode
|
|
2233
2287
|
);
|
|
2234
2288
|
continue;
|
|
@@ -2239,14 +2293,14 @@ function ca(t) {
|
|
|
2239
2293
|
);
|
|
2240
2294
|
for (const i of n.args)
|
|
2241
2295
|
if (rt(t, i), Ne(i.type) || t.reportError(
|
|
2242
|
-
`The type of @${n.name}(${i.name}:) must be Input Type but got: ${
|
|
2296
|
+
`The type of @${n.name}(${i.name}:) must be Input Type but got: ${C(i.type)}.`,
|
|
2243
2297
|
i.astNode
|
|
2244
2298
|
), Yt(i) && i.deprecationReason != null) {
|
|
2245
2299
|
var e;
|
|
2246
2300
|
t.reportError(
|
|
2247
2301
|
`Required argument @${n.name}(${i.name}:) cannot be deprecated.`,
|
|
2248
2302
|
[
|
|
2249
|
-
|
|
2303
|
+
Fi(i.astNode),
|
|
2250
2304
|
(e = i.astNode) === null || e === void 0 ? void 0 : e.type
|
|
2251
2305
|
]
|
|
2252
2306
|
);
|
|
@@ -2264,7 +2318,7 @@ function fa(t) {
|
|
|
2264
2318
|
for (const i of Object.values(n)) {
|
|
2265
2319
|
if (!Uo(i)) {
|
|
2266
2320
|
t.reportError(
|
|
2267
|
-
`Expected GraphQL named type but got: ${
|
|
2321
|
+
`Expected GraphQL named type but got: ${C(i)}.`,
|
|
2268
2322
|
i.astNode
|
|
2269
2323
|
);
|
|
2270
2324
|
continue;
|
|
@@ -2282,7 +2336,7 @@ function Zi(t, e) {
|
|
|
2282
2336
|
if (rt(t, o), !dn(o.type)) {
|
|
2283
2337
|
var i;
|
|
2284
2338
|
t.reportError(
|
|
2285
|
-
`The type of ${e.name}.${o.name} must be Output Type but got: ${
|
|
2339
|
+
`The type of ${e.name}.${o.name} must be Output Type but got: ${C(o.type)}.`,
|
|
2286
2340
|
(i = o.astNode) === null || i === void 0 ? void 0 : i.type
|
|
2287
2341
|
);
|
|
2288
2342
|
}
|
|
@@ -2291,7 +2345,7 @@ function Zi(t, e) {
|
|
|
2291
2345
|
if (rt(t, a), !Ne(a.type)) {
|
|
2292
2346
|
var r;
|
|
2293
2347
|
t.reportError(
|
|
2294
|
-
`The type of ${e.name}.${o.name}(${l}:) must be Input Type but got: ${
|
|
2348
|
+
`The type of ${e.name}.${o.name}(${l}:) must be Input Type but got: ${C(a.type)}.`,
|
|
2295
2349
|
(r = a.astNode) === null || r === void 0 ? void 0 : r.type
|
|
2296
2350
|
);
|
|
2297
2351
|
}
|
|
@@ -2300,7 +2354,7 @@ function Zi(t, e) {
|
|
|
2300
2354
|
t.reportError(
|
|
2301
2355
|
`Required argument ${e.name}.${o.name}(${l}:) cannot be deprecated.`,
|
|
2302
2356
|
[
|
|
2303
|
-
|
|
2357
|
+
Fi(a.astNode),
|
|
2304
2358
|
(s = a.astNode) === null || s === void 0 ? void 0 : s.type
|
|
2305
2359
|
]
|
|
2306
2360
|
);
|
|
@@ -2313,7 +2367,7 @@ function er(t, e) {
|
|
|
2313
2367
|
for (const i of e.getInterfaces()) {
|
|
2314
2368
|
if (!ae(i)) {
|
|
2315
2369
|
t.reportError(
|
|
2316
|
-
`Type ${
|
|
2370
|
+
`Type ${C(e)} must only implement Interface types, it cannot implement ${C(i)}.`,
|
|
2317
2371
|
Qt(e, i)
|
|
2318
2372
|
);
|
|
2319
2373
|
continue;
|
|
@@ -2349,7 +2403,7 @@ function da(t, e, n) {
|
|
|
2349
2403
|
if (!St(t.schema, c.type, l.type)) {
|
|
2350
2404
|
var r, s;
|
|
2351
2405
|
t.reportError(
|
|
2352
|
-
`Interface field ${n.name}.${u} expects type ${
|
|
2406
|
+
`Interface field ${n.name}.${u} expects type ${C(l.type)} but ${e.name}.${u} is type ${C(c.type)}.`,
|
|
2353
2407
|
[
|
|
2354
2408
|
(r = l.astNode) === null || r === void 0 ? void 0 : r.type,
|
|
2355
2409
|
(s = c.astNode) === null || s === void 0 ? void 0 : s.type
|
|
@@ -2368,7 +2422,7 @@ function da(t, e, n) {
|
|
|
2368
2422
|
if (!gi(f.type, h.type)) {
|
|
2369
2423
|
var o, a;
|
|
2370
2424
|
t.reportError(
|
|
2371
|
-
`Interface field argument ${n.name}.${u}(${d}:) expects type ${
|
|
2425
|
+
`Interface field argument ${n.name}.${u}(${d}:) expects type ${C(f.type)} but ${e.name}.${u}(${d}:) is type ${C(h.type)}.`,
|
|
2372
2426
|
[
|
|
2373
2427
|
(o = f.astNode) === null || o === void 0 ? void 0 : o.type,
|
|
2374
2428
|
(a = h.astNode) === null || a === void 0 ? void 0 : a.type
|
|
@@ -2412,7 +2466,7 @@ function ha(t, e) {
|
|
|
2412
2466
|
continue;
|
|
2413
2467
|
}
|
|
2414
2468
|
i[r.name] = !0, K(r) || t.reportError(
|
|
2415
|
-
`Union type ${e.name} can only include Object types, it cannot include ${
|
|
2469
|
+
`Union type ${e.name} can only include Object types, it cannot include ${C(r)}.`,
|
|
2416
2470
|
tr(e, String(r))
|
|
2417
2471
|
);
|
|
2418
2472
|
}
|
|
@@ -2436,7 +2490,7 @@ function ga(t, e) {
|
|
|
2436
2490
|
if (rt(t, s), !Ne(s.type)) {
|
|
2437
2491
|
var i;
|
|
2438
2492
|
t.reportError(
|
|
2439
|
-
`The type of ${e.name}.${s.name} must be Input Type but got: ${
|
|
2493
|
+
`The type of ${e.name}.${s.name} must be Input Type but got: ${C(s.type)}.`,
|
|
2440
2494
|
(i = s.astNode) === null || i === void 0 ? void 0 : i.type
|
|
2441
2495
|
);
|
|
2442
2496
|
}
|
|
@@ -2445,7 +2499,7 @@ function ga(t, e) {
|
|
|
2445
2499
|
t.reportError(
|
|
2446
2500
|
`Required input field ${e.name}.${s.name} cannot be deprecated.`,
|
|
2447
2501
|
[
|
|
2448
|
-
|
|
2502
|
+
Fi(s.astNode),
|
|
2449
2503
|
(r = s.astNode) === null || r === void 0 ? void 0 : r.type
|
|
2450
2504
|
]
|
|
2451
2505
|
);
|
|
@@ -2511,7 +2565,7 @@ function tr(t, e) {
|
|
|
2511
2565
|
);
|
|
2512
2566
|
}).filter((s) => s.name.value === e);
|
|
2513
2567
|
}
|
|
2514
|
-
function
|
|
2568
|
+
function Fi(t) {
|
|
2515
2569
|
var e;
|
|
2516
2570
|
return t == null || (e = t.directives) === null || e === void 0 ? void 0 : e.find(
|
|
2517
2571
|
(n) => n.name.value === hs.name
|
|
@@ -2533,7 +2587,7 @@ function he(t, e) {
|
|
|
2533
2587
|
}
|
|
2534
2588
|
class _s {
|
|
2535
2589
|
constructor(e, n, i) {
|
|
2536
|
-
this._schema = e, this._typeStack = [], this._parentTypeStack = [], this._inputTypeStack = [], this._fieldDefStack = [], this._defaultValueStack = [], this._directive = null, this._argument = null, this._enumValue = null, this._getFieldDef = i ??
|
|
2590
|
+
this._schema = e, this._typeStack = [], this._parentTypeStack = [], this._inputTypeStack = [], this._fieldDefStack = [], this._defaultValueStack = [], this._directive = null, this._argument = null, this._enumValue = null, this._getFieldDef = i ?? Ta, n && (Ne(n) && this._inputTypeStack.push(n), Ge(n) && this._parentTypeStack.push(n), dn(n) && this._typeStack.push(n));
|
|
2537
2591
|
}
|
|
2538
2592
|
get [Symbol.toStringTag]() {
|
|
2539
2593
|
return "TypeInfo";
|
|
@@ -2577,7 +2631,7 @@ class _s {
|
|
|
2577
2631
|
case p.SELECTION_SET: {
|
|
2578
2632
|
const r = Ie(this.getType());
|
|
2579
2633
|
this._parentTypeStack.push(
|
|
2580
|
-
|
|
2634
|
+
Ge(r) ? r : void 0
|
|
2581
2635
|
);
|
|
2582
2636
|
break;
|
|
2583
2637
|
}
|
|
@@ -2672,13 +2726,13 @@ class _s {
|
|
|
2672
2726
|
}
|
|
2673
2727
|
}
|
|
2674
2728
|
}
|
|
2675
|
-
function
|
|
2729
|
+
function Ta(t, e, n) {
|
|
2676
2730
|
const i = n.name.value;
|
|
2677
|
-
if (i === En.name && t.getQueryType() === e)
|
|
2678
|
-
return En;
|
|
2679
2731
|
if (i === Tn.name && t.getQueryType() === e)
|
|
2680
2732
|
return Tn;
|
|
2681
|
-
if (i ===
|
|
2733
|
+
if (i === En.name && t.getQueryType() === e)
|
|
2734
|
+
return En;
|
|
2735
|
+
if (i === vn.name && Ge(e))
|
|
2682
2736
|
return vn;
|
|
2683
2737
|
if (K(e) || ae(e))
|
|
2684
2738
|
return e.getFields()[i];
|
|
@@ -2701,7 +2755,7 @@ function Os(t, e) {
|
|
|
2701
2755
|
}
|
|
2702
2756
|
};
|
|
2703
2757
|
}
|
|
2704
|
-
function
|
|
2758
|
+
function Ea(t) {
|
|
2705
2759
|
return t.kind === p.OPERATION_DEFINITION || t.kind === p.FRAGMENT_DEFINITION;
|
|
2706
2760
|
}
|
|
2707
2761
|
function va(t) {
|
|
@@ -2720,7 +2774,7 @@ function Sa(t) {
|
|
|
2720
2774
|
return {
|
|
2721
2775
|
Document(e) {
|
|
2722
2776
|
for (const n of e.definitions)
|
|
2723
|
-
if (!
|
|
2777
|
+
if (!Ea(n)) {
|
|
2724
2778
|
const i = n.kind === p.SCHEMA_DEFINITION || n.kind === p.SCHEMA_EXTENSION ? "schema" : '"' + n.name.value + '"';
|
|
2725
2779
|
t.reportError(
|
|
2726
2780
|
new _(`The ${i} definition is not executable.`, {
|
|
@@ -2774,7 +2828,7 @@ function _a(t, e, n) {
|
|
|
2774
2828
|
function Oa(t, e) {
|
|
2775
2829
|
if (K(t) || ae(t)) {
|
|
2776
2830
|
const n = Object.keys(t.getFields());
|
|
2777
|
-
return
|
|
2831
|
+
return Rt(e, n);
|
|
2778
2832
|
}
|
|
2779
2833
|
return [];
|
|
2780
2834
|
}
|
|
@@ -2784,7 +2838,7 @@ function Na(t) {
|
|
|
2784
2838
|
const n = e.typeCondition;
|
|
2785
2839
|
if (n) {
|
|
2786
2840
|
const i = he(t.getSchema(), n);
|
|
2787
|
-
if (i && !
|
|
2841
|
+
if (i && !Ge(i)) {
|
|
2788
2842
|
const r = Z(n);
|
|
2789
2843
|
t.reportError(
|
|
2790
2844
|
new _(
|
|
@@ -2799,7 +2853,7 @@ function Na(t) {
|
|
|
2799
2853
|
},
|
|
2800
2854
|
FragmentDefinition(e) {
|
|
2801
2855
|
const n = he(t.getSchema(), e.typeCondition);
|
|
2802
|
-
if (n && !
|
|
2856
|
+
if (n && !Ge(n)) {
|
|
2803
2857
|
const i = Z(e.typeCondition);
|
|
2804
2858
|
t.reportError(
|
|
2805
2859
|
new _(
|
|
@@ -2813,14 +2867,14 @@ function Na(t) {
|
|
|
2813
2867
|
}
|
|
2814
2868
|
};
|
|
2815
2869
|
}
|
|
2816
|
-
function
|
|
2870
|
+
function Ra(t) {
|
|
2817
2871
|
return {
|
|
2818
2872
|
// eslint-disable-next-line new-cap
|
|
2819
|
-
...
|
|
2873
|
+
...Aa(t),
|
|
2820
2874
|
Argument(e) {
|
|
2821
2875
|
const n = t.getArgument(), i = t.getFieldDef(), r = t.getParentType();
|
|
2822
2876
|
if (!n && i && r) {
|
|
2823
|
-
const s = e.name.value, o = i.args.map((l) => l.name), a =
|
|
2877
|
+
const s = e.name.value, o = i.args.map((l) => l.name), a = Rt(s, o);
|
|
2824
2878
|
t.reportError(
|
|
2825
2879
|
new _(
|
|
2826
2880
|
`Unknown argument "${s}" on field "${r.name}.${i.name}".` + it(a),
|
|
@@ -2833,7 +2887,7 @@ function Aa(t) {
|
|
|
2833
2887
|
}
|
|
2834
2888
|
};
|
|
2835
2889
|
}
|
|
2836
|
-
function
|
|
2890
|
+
function Aa(t) {
|
|
2837
2891
|
const e = /* @__PURE__ */ Object.create(null), n = t.getSchema(), i = n ? n.getDirectives() : Zt;
|
|
2838
2892
|
for (const o of i)
|
|
2839
2893
|
e[o.name] = o.args.map((a) => a.name);
|
|
@@ -2851,7 +2905,7 @@ function Ra(t) {
|
|
|
2851
2905
|
for (const u of o.arguments) {
|
|
2852
2906
|
const c = u.name.value;
|
|
2853
2907
|
if (!l.includes(c)) {
|
|
2854
|
-
const f =
|
|
2908
|
+
const f = Rt(c, l);
|
|
2855
2909
|
t.reportError(
|
|
2856
2910
|
new _(
|
|
2857
2911
|
`Unknown argument "${c}" on directive "@${a}".` + it(f),
|
|
@@ -2884,7 +2938,7 @@ function ka(t) {
|
|
|
2884
2938
|
);
|
|
2885
2939
|
return;
|
|
2886
2940
|
}
|
|
2887
|
-
const d =
|
|
2941
|
+
const d = Ca(u);
|
|
2888
2942
|
d && !f.includes(d) && t.reportError(
|
|
2889
2943
|
new _(
|
|
2890
2944
|
`Directive "@${c}" may not be used on ${d}.`,
|
|
@@ -2896,11 +2950,11 @@ function ka(t) {
|
|
|
2896
2950
|
}
|
|
2897
2951
|
};
|
|
2898
2952
|
}
|
|
2899
|
-
function
|
|
2953
|
+
function Ca(t) {
|
|
2900
2954
|
const e = t[t.length - 1];
|
|
2901
2955
|
switch ("kind" in e || Le(!1), e.kind) {
|
|
2902
2956
|
case p.OPERATION_DEFINITION:
|
|
2903
|
-
return
|
|
2957
|
+
return Fa(e.operation);
|
|
2904
2958
|
case p.FIELD:
|
|
2905
2959
|
return x.FIELD;
|
|
2906
2960
|
case p.FRAGMENT_SPREAD:
|
|
@@ -2943,10 +2997,10 @@ function Fa(t) {
|
|
|
2943
2997
|
// Not reachable, all possible types have been considered.
|
|
2944
2998
|
/* c8 ignore next */
|
|
2945
2999
|
default:
|
|
2946
|
-
Le(!1, "Unexpected kind: " +
|
|
3000
|
+
Le(!1, "Unexpected kind: " + C(e.kind));
|
|
2947
3001
|
}
|
|
2948
3002
|
}
|
|
2949
|
-
function
|
|
3003
|
+
function Fa(t) {
|
|
2950
3004
|
switch (t) {
|
|
2951
3005
|
case ye.QUERY:
|
|
2952
3006
|
return x.QUERY;
|
|
@@ -2984,7 +3038,7 @@ function Da(t) {
|
|
|
2984
3038
|
const d = (f = u[2]) !== null && f !== void 0 ? f : a, h = d != null && La(d);
|
|
2985
3039
|
if (h && nr.includes(c))
|
|
2986
3040
|
return;
|
|
2987
|
-
const v =
|
|
3041
|
+
const v = Rt(
|
|
2988
3042
|
c,
|
|
2989
3043
|
h ? nr.concat(r) : r
|
|
2990
3044
|
);
|
|
@@ -3210,13 +3264,13 @@ function Ba(t) {
|
|
|
3210
3264
|
(e, n) => Dn(e.name.value, n.name.value)
|
|
3211
3265
|
);
|
|
3212
3266
|
}
|
|
3213
|
-
function
|
|
3267
|
+
function Rs(t) {
|
|
3214
3268
|
return Array.isArray(t) ? t.map(
|
|
3215
|
-
([e, n]) => `subfields "${e}" conflict because ` +
|
|
3269
|
+
([e, n]) => `subfields "${e}" conflict because ` + Rs(n)
|
|
3216
3270
|
).join(" and ") : t;
|
|
3217
3271
|
}
|
|
3218
3272
|
function Ga(t) {
|
|
3219
|
-
const e = new
|
|
3273
|
+
const e = new Cs(), n = new Ja(), i = /* @__PURE__ */ new Map();
|
|
3220
3274
|
return {
|
|
3221
3275
|
SelectionSet(r) {
|
|
3222
3276
|
const s = Qa(
|
|
@@ -3228,7 +3282,7 @@ function Ga(t) {
|
|
|
3228
3282
|
r
|
|
3229
3283
|
);
|
|
3230
3284
|
for (const [[o, a], l, u] of s) {
|
|
3231
|
-
const c =
|
|
3285
|
+
const c = Rs(a);
|
|
3232
3286
|
t.reportError(
|
|
3233
3287
|
new _(
|
|
3234
3288
|
`Fields "${o}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,
|
|
@@ -3441,7 +3495,7 @@ function Ka(t, e, n, i, r, s) {
|
|
|
3441
3495
|
if (a.length > 1)
|
|
3442
3496
|
for (let l = 0; l < a.length; l++)
|
|
3443
3497
|
for (let u = l + 1; u < a.length; u++) {
|
|
3444
|
-
const c =
|
|
3498
|
+
const c = As(
|
|
3445
3499
|
t,
|
|
3446
3500
|
n,
|
|
3447
3501
|
i,
|
|
@@ -3461,7 +3515,7 @@ function Li(t, e, n, i, r, s, o, a) {
|
|
|
3461
3515
|
if (c)
|
|
3462
3516
|
for (const f of u)
|
|
3463
3517
|
for (const d of c) {
|
|
3464
|
-
const h =
|
|
3518
|
+
const h = As(
|
|
3465
3519
|
t,
|
|
3466
3520
|
n,
|
|
3467
3521
|
i,
|
|
@@ -3475,7 +3529,7 @@ function Li(t, e, n, i, r, s, o, a) {
|
|
|
3475
3529
|
}
|
|
3476
3530
|
}
|
|
3477
3531
|
}
|
|
3478
|
-
function
|
|
3532
|
+
function As(t, e, n, i, r, s, o, a) {
|
|
3479
3533
|
const [l, u, c] = o, [f, d, h] = a, v = r || l !== f && K(l) && K(f);
|
|
3480
3534
|
if (!v) {
|
|
3481
3535
|
const O = u.name.value, m = d.name.value;
|
|
@@ -3492,13 +3546,13 @@ function Rs(t, e, n, i, r, s, o, a) {
|
|
|
3492
3546
|
[d]
|
|
3493
3547
|
];
|
|
3494
3548
|
}
|
|
3495
|
-
const w = c?.type,
|
|
3496
|
-
if (w &&
|
|
3549
|
+
const w = c?.type, k = h?.type;
|
|
3550
|
+
if (w && k && yi(w, k))
|
|
3497
3551
|
return [
|
|
3498
3552
|
[
|
|
3499
3553
|
s,
|
|
3500
|
-
`they return conflicting types "${
|
|
3501
|
-
|
|
3554
|
+
`they return conflicting types "${C(w)}" and "${C(
|
|
3555
|
+
k
|
|
3502
3556
|
)}"`
|
|
3503
3557
|
],
|
|
3504
3558
|
[u],
|
|
@@ -3514,7 +3568,7 @@ function Rs(t, e, n, i, r, s, o, a) {
|
|
|
3514
3568
|
v,
|
|
3515
3569
|
Ie(w),
|
|
3516
3570
|
S,
|
|
3517
|
-
Ie(
|
|
3571
|
+
Ie(k),
|
|
3518
3572
|
L
|
|
3519
3573
|
);
|
|
3520
3574
|
return za(O, s, u, d);
|
|
@@ -3536,7 +3590,7 @@ function ir(t) {
|
|
|
3536
3590
|
return Z(Di(t));
|
|
3537
3591
|
}
|
|
3538
3592
|
function yi(t, e) {
|
|
3539
|
-
return oe(t) ? oe(e) ? yi(t.ofType, e.ofType) : !0 : oe(e) ? !0 : U(t) ? U(e) ? yi(t.ofType, e.ofType) : !0 : U(e) ? !0 :
|
|
3593
|
+
return oe(t) ? oe(e) ? yi(t.ofType, e.ofType) : !0 : oe(e) ? !0 : U(t) ? U(e) ? yi(t.ofType, e.ofType) : !0 : U(e) ? !0 : Be(t) || Be(e) ? t !== e : !1;
|
|
3540
3594
|
}
|
|
3541
3595
|
function In(t, e, n, i) {
|
|
3542
3596
|
const r = e.get(i);
|
|
@@ -3600,7 +3654,7 @@ function za(t, e, n, i) {
|
|
|
3600
3654
|
[i, ...t.map(([, , r]) => r).flat()]
|
|
3601
3655
|
];
|
|
3602
3656
|
}
|
|
3603
|
-
class
|
|
3657
|
+
class Cs {
|
|
3604
3658
|
constructor() {
|
|
3605
3659
|
this._data = /* @__PURE__ */ new Map();
|
|
3606
3660
|
}
|
|
@@ -3616,7 +3670,7 @@ class Fs {
|
|
|
3616
3670
|
}
|
|
3617
3671
|
class Ja {
|
|
3618
3672
|
constructor() {
|
|
3619
|
-
this._orderedPairSet = new
|
|
3673
|
+
this._orderedPairSet = new Cs();
|
|
3620
3674
|
}
|
|
3621
3675
|
has(e, n, i) {
|
|
3622
3676
|
return e < n ? this._orderedPairSet.has(e, n, i) : this._orderedPairSet.has(n, e, i);
|
|
@@ -3629,8 +3683,8 @@ function Ya(t) {
|
|
|
3629
3683
|
return {
|
|
3630
3684
|
InlineFragment(e) {
|
|
3631
3685
|
const n = t.getType(), i = t.getParentType();
|
|
3632
|
-
if (
|
|
3633
|
-
const r =
|
|
3686
|
+
if (Ge(n) && Ge(i) && !Yi(t.getSchema(), n, i)) {
|
|
3687
|
+
const r = C(i), s = C(n);
|
|
3634
3688
|
t.reportError(
|
|
3635
3689
|
new _(
|
|
3636
3690
|
`Fragment cannot be spread here as objects of type "${r}" can never be of type "${s}".`,
|
|
@@ -3644,7 +3698,7 @@ function Ya(t) {
|
|
|
3644
3698
|
FragmentSpread(e) {
|
|
3645
3699
|
const n = e.name.value, i = Xa(t, n), r = t.getParentType();
|
|
3646
3700
|
if (i && r && !Yi(t.getSchema(), i, r)) {
|
|
3647
|
-
const s =
|
|
3701
|
+
const s = C(r), o = C(i);
|
|
3648
3702
|
t.reportError(
|
|
3649
3703
|
new _(
|
|
3650
3704
|
`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,
|
|
@@ -3661,7 +3715,7 @@ function Xa(t, e) {
|
|
|
3661
3715
|
const n = t.getFragment(e);
|
|
3662
3716
|
if (n) {
|
|
3663
3717
|
const i = he(t.getSchema(), n.typeCondition);
|
|
3664
|
-
if (
|
|
3718
|
+
if (Ge(i))
|
|
3665
3719
|
return i;
|
|
3666
3720
|
}
|
|
3667
3721
|
}
|
|
@@ -3683,7 +3737,7 @@ function Za(t) {
|
|
|
3683
3737
|
);
|
|
3684
3738
|
for (const s of i.args)
|
|
3685
3739
|
if (!r.has(s.name) && Yt(s)) {
|
|
3686
|
-
const o =
|
|
3740
|
+
const o = C(s.type);
|
|
3687
3741
|
t.reportError(
|
|
3688
3742
|
new _(
|
|
3689
3743
|
`Field "${i.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,
|
|
@@ -3725,7 +3779,7 @@ function el(t) {
|
|
|
3725
3779
|
const f = (c = a.arguments) !== null && c !== void 0 ? c : [], d = new Set(f.map((h) => h.name.value));
|
|
3726
3780
|
for (const [h, v] of Object.entries(u))
|
|
3727
3781
|
if (!d.has(h)) {
|
|
3728
|
-
const w = Vo(v.type) ?
|
|
3782
|
+
const w = Vo(v.type) ? C(v.type) : Z(v.type);
|
|
3729
3783
|
t.reportError(
|
|
3730
3784
|
new _(
|
|
3731
3785
|
`Directive "@${l}" argument "${h}" of type "${w}" is required, but it was not provided.`,
|
|
@@ -3748,9 +3802,9 @@ function nl(t) {
|
|
|
3748
3802
|
Field(e) {
|
|
3749
3803
|
const n = t.getType(), i = e.selectionSet;
|
|
3750
3804
|
if (n)
|
|
3751
|
-
if (
|
|
3805
|
+
if (Be(Ie(n))) {
|
|
3752
3806
|
if (i) {
|
|
3753
|
-
const r = e.name.value, s =
|
|
3807
|
+
const r = e.name.value, s = C(n);
|
|
3754
3808
|
t.reportError(
|
|
3755
3809
|
new _(
|
|
3756
3810
|
`Field "${r}" must not have a selection since type "${s}" has no subfields.`,
|
|
@@ -3762,7 +3816,7 @@ function nl(t) {
|
|
|
3762
3816
|
}
|
|
3763
3817
|
} else if (i) {
|
|
3764
3818
|
if (i.selections.length === 0) {
|
|
3765
|
-
const r = e.name.value, s =
|
|
3819
|
+
const r = e.name.value, s = C(n);
|
|
3766
3820
|
t.reportError(
|
|
3767
3821
|
new _(
|
|
3768
3822
|
`Field "${r}" of type "${s}" must have at least one field selected.`,
|
|
@@ -3773,7 +3827,7 @@ function nl(t) {
|
|
|
3773
3827
|
);
|
|
3774
3828
|
}
|
|
3775
3829
|
} else {
|
|
3776
|
-
const r = e.name.value, s =
|
|
3830
|
+
const r = e.name.value, s = C(n);
|
|
3777
3831
|
t.reportError(
|
|
3778
3832
|
new _(
|
|
3779
3833
|
`Field "${r}" of type "${s}" must have a selection of subfields. Did you mean "${r} { ... }"?`,
|
|
@@ -3798,7 +3852,7 @@ function rr(t, e, n) {
|
|
|
3798
3852
|
typename: n
|
|
3799
3853
|
};
|
|
3800
3854
|
}
|
|
3801
|
-
function
|
|
3855
|
+
function Ce(t) {
|
|
3802
3856
|
const e = [];
|
|
3803
3857
|
let n = t;
|
|
3804
3858
|
for (; n; )
|
|
@@ -3809,7 +3863,7 @@ function rl(t, e, n = sl) {
|
|
|
3809
3863
|
return Ut(t, e, n, void 0);
|
|
3810
3864
|
}
|
|
3811
3865
|
function sl(t, e, n) {
|
|
3812
|
-
let i = "Invalid value " +
|
|
3866
|
+
let i = "Invalid value " + C(e);
|
|
3813
3867
|
throw t.length > 0 && (i += ` at "value${il(t)}"`), n.message = i + ": " + n.message, n;
|
|
3814
3868
|
}
|
|
3815
3869
|
function Ut(t, e, n, i) {
|
|
@@ -3817,10 +3871,10 @@ function Ut(t, e, n, i) {
|
|
|
3817
3871
|
if (t != null)
|
|
3818
3872
|
return Ut(t, e.ofType, n, i);
|
|
3819
3873
|
n(
|
|
3820
|
-
|
|
3874
|
+
Ce(i),
|
|
3821
3875
|
t,
|
|
3822
3876
|
new _(
|
|
3823
|
-
`Expected non-nullable type "${
|
|
3877
|
+
`Expected non-nullable type "${C(e)}" not to be null.`
|
|
3824
3878
|
)
|
|
3825
3879
|
);
|
|
3826
3880
|
return;
|
|
@@ -3835,9 +3889,9 @@ function Ut(t, e, n, i) {
|
|
|
3835
3889
|
}) : [Ut(t, r, n, i)];
|
|
3836
3890
|
}
|
|
3837
3891
|
if (de(e)) {
|
|
3838
|
-
if (!
|
|
3892
|
+
if (!qe(t) || Array.isArray(t)) {
|
|
3839
3893
|
n(
|
|
3840
|
-
|
|
3894
|
+
Ce(i),
|
|
3841
3895
|
t,
|
|
3842
3896
|
new _(`Expected type "${e.name}" to be an object.`)
|
|
3843
3897
|
);
|
|
@@ -3850,9 +3904,9 @@ function Ut(t, e, n, i) {
|
|
|
3850
3904
|
if (o.defaultValue !== void 0)
|
|
3851
3905
|
r[o.name] = o.defaultValue;
|
|
3852
3906
|
else if (U(o.type)) {
|
|
3853
|
-
const l =
|
|
3907
|
+
const l = C(o.type);
|
|
3854
3908
|
n(
|
|
3855
|
-
|
|
3909
|
+
Ce(i),
|
|
3856
3910
|
t,
|
|
3857
3911
|
new _(
|
|
3858
3912
|
`Field "${o.name}" of required type "${l}" was not provided.`
|
|
@@ -3870,12 +3924,12 @@ function Ut(t, e, n, i) {
|
|
|
3870
3924
|
}
|
|
3871
3925
|
for (const o of Object.keys(t))
|
|
3872
3926
|
if (!s[o]) {
|
|
3873
|
-
const a =
|
|
3927
|
+
const a = Rt(
|
|
3874
3928
|
o,
|
|
3875
3929
|
Object.keys(e.getFields())
|
|
3876
3930
|
);
|
|
3877
3931
|
n(
|
|
3878
|
-
|
|
3932
|
+
Ce(i),
|
|
3879
3933
|
t,
|
|
3880
3934
|
new _(
|
|
3881
3935
|
`Field "${o}" is not defined by type "${e.name}".` + it(a)
|
|
@@ -3885,7 +3939,7 @@ function Ut(t, e, n, i) {
|
|
|
3885
3939
|
if (e.isOneOf) {
|
|
3886
3940
|
const o = Object.keys(r);
|
|
3887
3941
|
o.length !== 1 && n(
|
|
3888
|
-
|
|
3942
|
+
Ce(i),
|
|
3889
3943
|
t,
|
|
3890
3944
|
new _(
|
|
3891
3945
|
`Exactly one key must be specified for OneOf type "${e.name}".`
|
|
@@ -3893,20 +3947,20 @@ function Ut(t, e, n, i) {
|
|
|
3893
3947
|
);
|
|
3894
3948
|
const a = o[0], l = r[a];
|
|
3895
3949
|
l === null && n(
|
|
3896
|
-
|
|
3950
|
+
Ce(i).concat(a),
|
|
3897
3951
|
l,
|
|
3898
3952
|
new _(`Field "${a}" must be non-null.`)
|
|
3899
3953
|
);
|
|
3900
3954
|
}
|
|
3901
3955
|
return r;
|
|
3902
3956
|
}
|
|
3903
|
-
if (
|
|
3957
|
+
if (Be(e)) {
|
|
3904
3958
|
let r;
|
|
3905
3959
|
try {
|
|
3906
3960
|
r = e.parseValue(t);
|
|
3907
3961
|
} catch (s) {
|
|
3908
|
-
s instanceof _ ? n(
|
|
3909
|
-
|
|
3962
|
+
s instanceof _ ? n(Ce(i), t, s) : n(
|
|
3963
|
+
Ce(i),
|
|
3910
3964
|
t,
|
|
3911
3965
|
new _(`Expected type "${e.name}". ` + s.message, {
|
|
3912
3966
|
originalError: s
|
|
@@ -3915,12 +3969,12 @@ function Ut(t, e, n, i) {
|
|
|
3915
3969
|
return;
|
|
3916
3970
|
}
|
|
3917
3971
|
return r === void 0 && n(
|
|
3918
|
-
|
|
3972
|
+
Ce(i),
|
|
3919
3973
|
t,
|
|
3920
3974
|
new _(`Expected type "${e.name}".`)
|
|
3921
3975
|
), r;
|
|
3922
3976
|
}
|
|
3923
|
-
Le(!1, "Unexpected input type: " +
|
|
3977
|
+
Le(!1, "Unexpected input type: " + C(e));
|
|
3924
3978
|
}
|
|
3925
3979
|
function nt(t, e, n) {
|
|
3926
3980
|
if (t) {
|
|
@@ -3980,7 +4034,7 @@ function nt(t, e, n) {
|
|
|
3980
4034
|
}
|
|
3981
4035
|
return i;
|
|
3982
4036
|
}
|
|
3983
|
-
if (
|
|
4037
|
+
if (Be(e)) {
|
|
3984
4038
|
let i;
|
|
3985
4039
|
try {
|
|
3986
4040
|
i = e.parseLiteral(t, n);
|
|
@@ -3989,7 +4043,7 @@ function nt(t, e, n) {
|
|
|
3989
4043
|
}
|
|
3990
4044
|
return i === void 0 ? void 0 : i;
|
|
3991
4045
|
}
|
|
3992
|
-
Le(!1, "Unexpected input type: " +
|
|
4046
|
+
Le(!1, "Unexpected input type: " + C(e));
|
|
3993
4047
|
}
|
|
3994
4048
|
}
|
|
3995
4049
|
function sr(t, e) {
|
|
@@ -4005,7 +4059,7 @@ function ol(t, e, n) {
|
|
|
4005
4059
|
r[l] = a.defaultValue;
|
|
4006
4060
|
else if (U(u))
|
|
4007
4061
|
throw new _(
|
|
4008
|
-
`Argument "${l}" of required type "${
|
|
4062
|
+
`Argument "${l}" of required type "${C(u)}" was not provided.`,
|
|
4009
4063
|
{
|
|
4010
4064
|
nodes: e
|
|
4011
4065
|
}
|
|
@@ -4021,7 +4075,7 @@ function ol(t, e, n) {
|
|
|
4021
4075
|
r[l] = a.defaultValue;
|
|
4022
4076
|
else if (U(u))
|
|
4023
4077
|
throw new _(
|
|
4024
|
-
`Argument "${l}" of required type "${
|
|
4078
|
+
`Argument "${l}" of required type "${C(u)}" was provided the variable "$${v}" which was not provided a runtime value.`,
|
|
4025
4079
|
{
|
|
4026
4080
|
nodes: f
|
|
4027
4081
|
}
|
|
@@ -4032,7 +4086,7 @@ function ol(t, e, n) {
|
|
|
4032
4086
|
}
|
|
4033
4087
|
if (d && U(u))
|
|
4034
4088
|
throw new _(
|
|
4035
|
-
`Argument "${l}" of non-null type "${
|
|
4089
|
+
`Argument "${l}" of non-null type "${C(u)}" must not be null.`,
|
|
4036
4090
|
{
|
|
4037
4091
|
nodes: f
|
|
4038
4092
|
}
|
|
@@ -4062,7 +4116,7 @@ function al(t, e) {
|
|
|
4062
4116
|
}
|
|
4063
4117
|
function ll(t, e, n, i, r) {
|
|
4064
4118
|
const s = /* @__PURE__ */ new Map();
|
|
4065
|
-
return
|
|
4119
|
+
return Ti(
|
|
4066
4120
|
t,
|
|
4067
4121
|
e,
|
|
4068
4122
|
n,
|
|
@@ -4072,7 +4126,7 @@ function ll(t, e, n, i, r) {
|
|
|
4072
4126
|
/* @__PURE__ */ new Set()
|
|
4073
4127
|
), s;
|
|
4074
4128
|
}
|
|
4075
|
-
function
|
|
4129
|
+
function Ti(t, e, n, i, r, s, o) {
|
|
4076
4130
|
for (const a of r.selections)
|
|
4077
4131
|
switch (a.kind) {
|
|
4078
4132
|
case p.FIELD: {
|
|
@@ -4085,7 +4139,7 @@ function Ei(t, e, n, i, r, s, o) {
|
|
|
4085
4139
|
case p.INLINE_FRAGMENT: {
|
|
4086
4140
|
if (!Yn(n, a) || !or(t, a, i))
|
|
4087
4141
|
continue;
|
|
4088
|
-
|
|
4142
|
+
Ti(
|
|
4089
4143
|
t,
|
|
4090
4144
|
e,
|
|
4091
4145
|
n,
|
|
@@ -4104,7 +4158,7 @@ function Ei(t, e, n, i, r, s, o) {
|
|
|
4104
4158
|
const u = e[l];
|
|
4105
4159
|
if (!u || !or(t, u, i))
|
|
4106
4160
|
continue;
|
|
4107
|
-
|
|
4161
|
+
Ti(
|
|
4108
4162
|
t,
|
|
4109
4163
|
e,
|
|
4110
4164
|
n,
|
|
@@ -4118,11 +4172,11 @@ function Ei(t, e, n, i, r, s, o) {
|
|
|
4118
4172
|
}
|
|
4119
4173
|
}
|
|
4120
4174
|
function Yn(t, e) {
|
|
4121
|
-
const n = Nt(
|
|
4175
|
+
const n = Nt(Ai, e, t);
|
|
4122
4176
|
if (n?.if === !0)
|
|
4123
4177
|
return !1;
|
|
4124
4178
|
const i = Nt(
|
|
4125
|
-
|
|
4179
|
+
Ri,
|
|
4126
4180
|
e,
|
|
4127
4181
|
t
|
|
4128
4182
|
);
|
|
@@ -4179,7 +4233,7 @@ function cl(t) {
|
|
|
4179
4233
|
}
|
|
4180
4234
|
};
|
|
4181
4235
|
}
|
|
4182
|
-
function
|
|
4236
|
+
function Fs(t, e) {
|
|
4183
4237
|
const n = /* @__PURE__ */ new Map();
|
|
4184
4238
|
for (const i of t) {
|
|
4185
4239
|
const r = e(i), s = n.get(r);
|
|
@@ -4194,7 +4248,7 @@ function fl(t) {
|
|
|
4194
4248
|
};
|
|
4195
4249
|
function e(n) {
|
|
4196
4250
|
var i;
|
|
4197
|
-
const r = (i = n.arguments) !== null && i !== void 0 ? i : [], s =
|
|
4251
|
+
const r = (i = n.arguments) !== null && i !== void 0 ? i : [], s = Fs(r, (o) => o.name.value);
|
|
4198
4252
|
for (const [o, a] of s)
|
|
4199
4253
|
a.length > 1 && t.reportError(
|
|
4200
4254
|
new _(
|
|
@@ -4310,7 +4364,7 @@ function gl(t) {
|
|
|
4310
4364
|
return {
|
|
4311
4365
|
OperationDefinition(e) {
|
|
4312
4366
|
var n;
|
|
4313
|
-
const i = (n = e.variableDefinitions) !== null && n !== void 0 ? n : [], r =
|
|
4367
|
+
const i = (n = e.variableDefinitions) !== null && n !== void 0 ? n : [], r = Fs(
|
|
4314
4368
|
i,
|
|
4315
4369
|
(s) => s.variable.name.value
|
|
4316
4370
|
);
|
|
@@ -4349,7 +4403,7 @@ function yl(t) {
|
|
|
4349
4403
|
const r = zt(n.fields, (s) => s.name.value);
|
|
4350
4404
|
for (const s of Object.values(i.getFields()))
|
|
4351
4405
|
if (!r[s.name] && ls(s)) {
|
|
4352
|
-
const a =
|
|
4406
|
+
const a = C(s.type);
|
|
4353
4407
|
t.reportError(
|
|
4354
4408
|
new _(
|
|
4355
4409
|
`Field "${i.name}.${s.name}" of required type "${a}" was not provided.`,
|
|
@@ -4359,18 +4413,12 @@ function yl(t) {
|
|
|
4359
4413
|
)
|
|
4360
4414
|
);
|
|
4361
4415
|
}
|
|
4362
|
-
i.isOneOf && bl(
|
|
4363
|
-
t,
|
|
4364
|
-
n,
|
|
4365
|
-
i,
|
|
4366
|
-
r,
|
|
4367
|
-
e
|
|
4368
|
-
);
|
|
4416
|
+
i.isOneOf && bl(t, n, i, r);
|
|
4369
4417
|
},
|
|
4370
4418
|
ObjectField(n) {
|
|
4371
4419
|
const i = Ie(t.getParentInputType());
|
|
4372
4420
|
if (!t.getInputType() && de(i)) {
|
|
4373
|
-
const s =
|
|
4421
|
+
const s = Rt(
|
|
4374
4422
|
n.name.value,
|
|
4375
4423
|
Object.keys(i.getFields())
|
|
4376
4424
|
);
|
|
@@ -4388,7 +4436,7 @@ function yl(t) {
|
|
|
4388
4436
|
const i = t.getInputType();
|
|
4389
4437
|
U(i) && t.reportError(
|
|
4390
4438
|
new _(
|
|
4391
|
-
`Expected value of type "${
|
|
4439
|
+
`Expected value of type "${C(i)}", found ${Z(n)}.`,
|
|
4392
4440
|
{
|
|
4393
4441
|
nodes: n
|
|
4394
4442
|
}
|
|
@@ -4407,8 +4455,8 @@ function We(t, e) {
|
|
|
4407
4455
|
if (!n)
|
|
4408
4456
|
return;
|
|
4409
4457
|
const i = Ie(n);
|
|
4410
|
-
if (!
|
|
4411
|
-
const r =
|
|
4458
|
+
if (!Be(i)) {
|
|
4459
|
+
const r = C(n);
|
|
4412
4460
|
t.reportError(
|
|
4413
4461
|
new _(
|
|
4414
4462
|
`Expected value of type "${r}", found ${Z(e)}.`,
|
|
@@ -4425,7 +4473,7 @@ function We(t, e) {
|
|
|
4425
4473
|
void 0
|
|
4426
4474
|
/* variables */
|
|
4427
4475
|
) === void 0) {
|
|
4428
|
-
const s =
|
|
4476
|
+
const s = C(n);
|
|
4429
4477
|
t.reportError(
|
|
4430
4478
|
new _(
|
|
4431
4479
|
`Expected value of type "${s}", found ${Z(e)}.`,
|
|
@@ -4436,7 +4484,7 @@ function We(t, e) {
|
|
|
4436
4484
|
);
|
|
4437
4485
|
}
|
|
4438
4486
|
} catch (r) {
|
|
4439
|
-
const s =
|
|
4487
|
+
const s = C(n);
|
|
4440
4488
|
r instanceof _ ? t.reportError(r) : t.reportError(
|
|
4441
4489
|
new _(
|
|
4442
4490
|
`Expected value of type "${s}", found ${Z(e)}; ` + r.message,
|
|
@@ -4448,10 +4496,10 @@ function We(t, e) {
|
|
|
4448
4496
|
);
|
|
4449
4497
|
}
|
|
4450
4498
|
}
|
|
4451
|
-
function bl(t, e, n, i
|
|
4452
|
-
var
|
|
4453
|
-
const
|
|
4454
|
-
if (
|
|
4499
|
+
function bl(t, e, n, i) {
|
|
4500
|
+
var r;
|
|
4501
|
+
const s = Object.keys(i);
|
|
4502
|
+
if (s.length !== 1) {
|
|
4455
4503
|
t.reportError(
|
|
4456
4504
|
new _(
|
|
4457
4505
|
`OneOf Input Object "${n.name}" must specify exactly one key.`,
|
|
@@ -4462,28 +4510,14 @@ function bl(t, e, n, i, r) {
|
|
|
4462
4510
|
);
|
|
4463
4511
|
return;
|
|
4464
4512
|
}
|
|
4465
|
-
const
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
);
|
|
4472
|
-
return;
|
|
4473
|
-
}
|
|
4474
|
-
if (c) {
|
|
4475
|
-
const f = l.name.value;
|
|
4476
|
-
r[f].type.kind !== p.NON_NULL_TYPE && t.reportError(
|
|
4477
|
-
new _(
|
|
4478
|
-
`Variable "${f}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,
|
|
4479
|
-
{
|
|
4480
|
-
nodes: [e]
|
|
4481
|
-
}
|
|
4482
|
-
)
|
|
4483
|
-
);
|
|
4484
|
-
}
|
|
4513
|
+
const a = (r = i[s[0]]) === null || r === void 0 ? void 0 : r.value;
|
|
4514
|
+
(!a || a.kind === p.NULL) && t.reportError(
|
|
4515
|
+
new _(`Field "${n.name}.${s[0]}" must be non-null.`, {
|
|
4516
|
+
nodes: [e]
|
|
4517
|
+
})
|
|
4518
|
+
);
|
|
4485
4519
|
}
|
|
4486
|
-
function
|
|
4520
|
+
function Tl(t) {
|
|
4487
4521
|
return {
|
|
4488
4522
|
VariableDefinition(e) {
|
|
4489
4523
|
const n = he(t.getSchema(), e.type);
|
|
@@ -4501,7 +4535,7 @@ function El(t) {
|
|
|
4501
4535
|
}
|
|
4502
4536
|
};
|
|
4503
4537
|
}
|
|
4504
|
-
function
|
|
4538
|
+
function El(t) {
|
|
4505
4539
|
let e = /* @__PURE__ */ Object.create(null);
|
|
4506
4540
|
return {
|
|
4507
4541
|
OperationDefinition: {
|
|
@@ -4521,7 +4555,7 @@ function Tl(t) {
|
|
|
4521
4555
|
s,
|
|
4522
4556
|
o
|
|
4523
4557
|
)) {
|
|
4524
|
-
const d =
|
|
4558
|
+
const d = C(f), h = C(s);
|
|
4525
4559
|
t.reportError(
|
|
4526
4560
|
new _(
|
|
4527
4561
|
`Variable "$${l}" of type "${d}" used in position expecting type "${h}".`,
|
|
@@ -4564,7 +4598,7 @@ const wl = Object.freeze([Ma]), xs = Object.freeze([
|
|
|
4564
4598
|
cl,
|
|
4565
4599
|
Da,
|
|
4566
4600
|
Na,
|
|
4567
|
-
|
|
4601
|
+
Tl,
|
|
4568
4602
|
nl,
|
|
4569
4603
|
Ia,
|
|
4570
4604
|
pl,
|
|
@@ -4577,11 +4611,11 @@ const wl = Object.freeze([Ma]), xs = Object.freeze([
|
|
|
4577
4611
|
qa,
|
|
4578
4612
|
ka,
|
|
4579
4613
|
dl,
|
|
4580
|
-
|
|
4614
|
+
Ra,
|
|
4581
4615
|
fl,
|
|
4582
4616
|
yl,
|
|
4583
4617
|
Za,
|
|
4584
|
-
|
|
4618
|
+
El,
|
|
4585
4619
|
Ga,
|
|
4586
4620
|
hl,
|
|
4587
4621
|
...wl
|
|
@@ -4741,13 +4775,13 @@ function Ol(t) {
|
|
|
4741
4775
|
}
|
|
4742
4776
|
class Nl extends Error {
|
|
4743
4777
|
constructor(e) {
|
|
4744
|
-
super("Unexpected error value: " +
|
|
4778
|
+
super("Unexpected error value: " + C(e)), this.name = "NonErrorThrown", this.thrownValue = e;
|
|
4745
4779
|
}
|
|
4746
4780
|
}
|
|
4747
4781
|
function ce(t, e, n) {
|
|
4748
4782
|
var i;
|
|
4749
4783
|
const r = Ol(t);
|
|
4750
|
-
return
|
|
4784
|
+
return Rl(r) ? r : new _(r.message, {
|
|
4751
4785
|
nodes: (i = r.nodes) !== null && i !== void 0 ? i : e,
|
|
4752
4786
|
source: r.source,
|
|
4753
4787
|
positions: r.positions,
|
|
@@ -4755,11 +4789,11 @@ function ce(t, e, n) {
|
|
|
4755
4789
|
originalError: r
|
|
4756
4790
|
});
|
|
4757
4791
|
}
|
|
4758
|
-
function
|
|
4792
|
+
function Rl(t) {
|
|
4759
4793
|
return Array.isArray(t.path);
|
|
4760
4794
|
}
|
|
4761
4795
|
const ar = function(t, e, n, i) {
|
|
4762
|
-
if (
|
|
4796
|
+
if (qe(t) && typeof t.__typename == "string")
|
|
4763
4797
|
return t.__typename;
|
|
4764
4798
|
const r = n.schema.getPossibleTypes(i), s = [];
|
|
4765
4799
|
for (let o = 0; o < r.length; o++) {
|
|
@@ -4769,7 +4803,8 @@ const ar = function(t, e, n, i) {
|
|
|
4769
4803
|
if (Zo(l))
|
|
4770
4804
|
s[o] = l;
|
|
4771
4805
|
else if (l)
|
|
4772
|
-
return
|
|
4806
|
+
return s.length && Promise.allSettled(s).catch(() => {
|
|
4807
|
+
}), a.name;
|
|
4773
4808
|
}
|
|
4774
4809
|
}
|
|
4775
4810
|
if (s.length)
|
|
@@ -4779,7 +4814,7 @@ const ar = function(t, e, n, i) {
|
|
|
4779
4814
|
return r[a].name;
|
|
4780
4815
|
});
|
|
4781
4816
|
}, hn = function(t, e, n, i) {
|
|
4782
|
-
if (
|
|
4817
|
+
if (qe(t) || typeof t == "function") {
|
|
4783
4818
|
const r = t[i.fieldName];
|
|
4784
4819
|
return typeof r == "function" ? t[i.fieldName](e, n, i) : r;
|
|
4785
4820
|
}
|
|
@@ -4798,13 +4833,13 @@ function Pi(t, e) {
|
|
|
4798
4833
|
}
|
|
4799
4834
|
return n;
|
|
4800
4835
|
}
|
|
4801
|
-
function
|
|
4836
|
+
function Al(t) {
|
|
4802
4837
|
const e = t.toConfig(), n = Go(
|
|
4803
4838
|
Xn(e.types),
|
|
4804
4839
|
(d) => d.name,
|
|
4805
4840
|
f
|
|
4806
4841
|
);
|
|
4807
|
-
return new
|
|
4842
|
+
return new Ci({
|
|
4808
4843
|
...e,
|
|
4809
4844
|
types: Object.values(n),
|
|
4810
4845
|
directives: Xn(e.directives).map(o),
|
|
@@ -4888,7 +4923,7 @@ function Rl(t) {
|
|
|
4888
4923
|
fields: () => u(h.fields)
|
|
4889
4924
|
});
|
|
4890
4925
|
}
|
|
4891
|
-
Le(!1, "Unexpected type: " +
|
|
4926
|
+
Le(!1, "Unexpected type: " + C(d));
|
|
4892
4927
|
}
|
|
4893
4928
|
}
|
|
4894
4929
|
function rn(t, e) {
|
|
@@ -4914,7 +4949,7 @@ function kl(t) {
|
|
|
4914
4949
|
const e = t;
|
|
4915
4950
|
return e && e.then && e.catch && e.finally;
|
|
4916
4951
|
}
|
|
4917
|
-
function
|
|
4952
|
+
function F(t, e, n, i) {
|
|
4918
4953
|
let r = B().then(t).then(e, n);
|
|
4919
4954
|
return $i(r);
|
|
4920
4955
|
}
|
|
@@ -4980,7 +5015,7 @@ function ue(t, e, n) {
|
|
|
4980
5015
|
function u() {
|
|
4981
5016
|
l = !0;
|
|
4982
5017
|
}
|
|
4983
|
-
return
|
|
5018
|
+
return F(function() {
|
|
4984
5019
|
return e(a, u, r++);
|
|
4985
5020
|
}, function(f) {
|
|
4986
5021
|
if (f && n?.push(f), !l)
|
|
@@ -5033,13 +5068,13 @@ function _n(t, e, n, i) {
|
|
|
5033
5068
|
return r.call(t).then(u, u);
|
|
5034
5069
|
});
|
|
5035
5070
|
function o(l) {
|
|
5036
|
-
return l.done ? l :
|
|
5071
|
+
return l.done ? l : F(() => l.value, (u) => F(() => e(u), lr, s));
|
|
5037
5072
|
}
|
|
5038
5073
|
let a;
|
|
5039
5074
|
if (n) {
|
|
5040
5075
|
let l;
|
|
5041
5076
|
const u = n;
|
|
5042
|
-
a = (c) => (l ||=
|
|
5077
|
+
a = (c) => (l ||= F(() => c, (f) => F(() => u(f), lr, s)), l);
|
|
5043
5078
|
}
|
|
5044
5079
|
return {
|
|
5045
5080
|
next() {
|
|
@@ -5059,10 +5094,10 @@ function _n(t, e, n, i) {
|
|
|
5059
5094
|
function lr(t) {
|
|
5060
5095
|
return { value: t, done: !1 };
|
|
5061
5096
|
}
|
|
5062
|
-
function
|
|
5097
|
+
function Cl(t) {
|
|
5063
5098
|
return t?.[Mn] === "resolved";
|
|
5064
5099
|
}
|
|
5065
|
-
function
|
|
5100
|
+
function Fl(t) {
|
|
5066
5101
|
return t?.[Mn] === "rejected";
|
|
5067
5102
|
}
|
|
5068
5103
|
function xl(t, e) {
|
|
@@ -5079,9 +5114,9 @@ function xl(t, e) {
|
|
|
5079
5114
|
});
|
|
5080
5115
|
}
|
|
5081
5116
|
function $i(t) {
|
|
5082
|
-
if (Fl(t))
|
|
5083
|
-
return t.__fakePromiseValue;
|
|
5084
5117
|
if (Cl(t))
|
|
5118
|
+
return t.__fakePromiseValue;
|
|
5119
|
+
if (Fl(t))
|
|
5085
5120
|
throw t.__fakeRejectError;
|
|
5086
5121
|
return t;
|
|
5087
5122
|
}
|
|
@@ -5111,7 +5146,7 @@ const On = (t) => ({
|
|
|
5111
5146
|
asyncFn(e, n) {
|
|
5112
5147
|
return e ? (...i) => {
|
|
5113
5148
|
let r;
|
|
5114
|
-
return
|
|
5149
|
+
return F(() => e(t, () => (r = n(...i), Q(r) ? r.then(() => {
|
|
5115
5150
|
}) : void 0)), () => r);
|
|
5116
5151
|
} : n;
|
|
5117
5152
|
}
|
|
@@ -5145,11 +5180,11 @@ function $l(t) {
|
|
|
5145
5180
|
};
|
|
5146
5181
|
}
|
|
5147
5182
|
const cr = (t) => ((...e) => t($l(e)));
|
|
5148
|
-
function
|
|
5183
|
+
function Re(t) {
|
|
5149
5184
|
return typeof t == "object" && t != null && typeof t[Symbol.asyncIterator] == "function";
|
|
5150
5185
|
}
|
|
5151
5186
|
function fr(t, e) {
|
|
5152
|
-
if (
|
|
5187
|
+
if (Re(t.result))
|
|
5153
5188
|
return { onNext: e };
|
|
5154
5189
|
e({
|
|
5155
5190
|
args: t.args,
|
|
@@ -5247,8 +5282,8 @@ function jl({ plugins: t }) {
|
|
|
5247
5282
|
execute: [],
|
|
5248
5283
|
context: []
|
|
5249
5284
|
};
|
|
5250
|
-
for (const { onContextBuilding: O, onExecute: m, onParse: g, onSubscribe: b, onValidate: A, onEnveloped: y, instrumentation:
|
|
5251
|
-
y && c.init.push(y), O && c.context.push(O), m && c.execute.push(m), g && c.parse.push(g), b && c.subscribe.push(b), A && c.validate.push(A),
|
|
5285
|
+
for (const { onContextBuilding: O, onExecute: m, onParse: g, onSubscribe: b, onValidate: A, onEnveloped: y, instrumentation: T } of t)
|
|
5286
|
+
y && c.init.push(y), O && c.context.push(O), m && c.execute.push(m), g && c.parse.push(g), b && c.subscribe.push(b), A && c.validate.push(A), T && (a = a ? Mi(a, T) : T);
|
|
5252
5287
|
const f = (O) => {
|
|
5253
5288
|
for (const [m, g] of c.init.entries())
|
|
5254
5289
|
g({
|
|
@@ -5260,9 +5295,9 @@ function jl({ plugins: t }) {
|
|
|
5260
5295
|
});
|
|
5261
5296
|
}, d = c.parse.length ? (O) => (m, g) => {
|
|
5262
5297
|
let b = null, A = i;
|
|
5263
|
-
const y = O,
|
|
5264
|
-
for (const
|
|
5265
|
-
const I =
|
|
5298
|
+
const y = O, T = [];
|
|
5299
|
+
for (const E of c.parse) {
|
|
5300
|
+
const I = E({
|
|
5266
5301
|
context: y,
|
|
5267
5302
|
extendContext: (N) => {
|
|
5268
5303
|
Object.assign(y, N);
|
|
@@ -5276,16 +5311,16 @@ function jl({ plugins: t }) {
|
|
|
5276
5311
|
b = N;
|
|
5277
5312
|
}
|
|
5278
5313
|
});
|
|
5279
|
-
I &&
|
|
5314
|
+
I && T.push(I);
|
|
5280
5315
|
}
|
|
5281
5316
|
if (b === null)
|
|
5282
5317
|
try {
|
|
5283
5318
|
b = A(m, g);
|
|
5284
|
-
} catch (
|
|
5285
|
-
b =
|
|
5319
|
+
} catch (E) {
|
|
5320
|
+
b = E;
|
|
5286
5321
|
}
|
|
5287
|
-
for (const
|
|
5288
|
-
|
|
5322
|
+
for (const E of T)
|
|
5323
|
+
E({
|
|
5289
5324
|
context: y,
|
|
5290
5325
|
extendContext: (I) => {
|
|
5291
5326
|
Object.assign(y, I);
|
|
@@ -5301,7 +5336,7 @@ function jl({ plugins: t }) {
|
|
|
5301
5336
|
throw b;
|
|
5302
5337
|
return Dl.set(b, m.toString()), b;
|
|
5303
5338
|
} : () => i, h = c.validate.length ? (O) => (m, g, b, A, y) => {
|
|
5304
|
-
let
|
|
5339
|
+
let T = b ? [...b] : void 0, E = r, I = null;
|
|
5305
5340
|
const N = O, P = [];
|
|
5306
5341
|
for (const j of c.validate) {
|
|
5307
5342
|
const q = j({
|
|
@@ -5312,16 +5347,16 @@ function jl({ plugins: t }) {
|
|
|
5312
5347
|
params: {
|
|
5313
5348
|
schema: m,
|
|
5314
5349
|
documentAST: g,
|
|
5315
|
-
rules:
|
|
5350
|
+
rules: T,
|
|
5316
5351
|
typeInfo: A,
|
|
5317
5352
|
options: y
|
|
5318
5353
|
},
|
|
5319
|
-
validateFn:
|
|
5354
|
+
validateFn: E,
|
|
5320
5355
|
addValidationRule: (J) => {
|
|
5321
|
-
|
|
5356
|
+
T || (T = []), T.push(J);
|
|
5322
5357
|
},
|
|
5323
5358
|
setValidationFn: (J) => {
|
|
5324
|
-
|
|
5359
|
+
E = J;
|
|
5325
5360
|
},
|
|
5326
5361
|
setResult: (J) => {
|
|
5327
5362
|
I = J;
|
|
@@ -5329,7 +5364,7 @@ function jl({ plugins: t }) {
|
|
|
5329
5364
|
});
|
|
5330
5365
|
q && P.push(q);
|
|
5331
5366
|
}
|
|
5332
|
-
if (I || (I =
|
|
5367
|
+
if (I || (I = E(m, g, T, A, y)), !I)
|
|
5333
5368
|
return;
|
|
5334
5369
|
const $ = I.length === 0;
|
|
5335
5370
|
for (const j of P)
|
|
@@ -5349,74 +5384,74 @@ function jl({ plugins: t }) {
|
|
|
5349
5384
|
const g = [], b = O;
|
|
5350
5385
|
m && Object.assign(b, m);
|
|
5351
5386
|
let A = !1;
|
|
5352
|
-
return
|
|
5387
|
+
return F(() => ue(c.context, (y, T) => y({
|
|
5353
5388
|
context: b,
|
|
5354
|
-
extendContext: (
|
|
5355
|
-
Object.assign(b,
|
|
5389
|
+
extendContext: (E) => {
|
|
5390
|
+
Object.assign(b, E);
|
|
5356
5391
|
},
|
|
5357
5392
|
breakContextBuilding: () => {
|
|
5358
|
-
A = !0,
|
|
5393
|
+
A = !0, T();
|
|
5359
5394
|
}
|
|
5360
|
-
}), g), () => A ? b :
|
|
5395
|
+
}), g), () => A ? b : F(() => ue(g, (y) => y({
|
|
5361
5396
|
context: b,
|
|
5362
|
-
extendContext(
|
|
5363
|
-
Object.assign(b,
|
|
5397
|
+
extendContext(T) {
|
|
5398
|
+
Object.assign(b, T);
|
|
5364
5399
|
}
|
|
5365
5400
|
})), () => b), (y) => {
|
|
5366
|
-
let
|
|
5367
|
-
for (const
|
|
5368
|
-
|
|
5401
|
+
let T = y;
|
|
5402
|
+
for (const E of u)
|
|
5403
|
+
E({
|
|
5369
5404
|
context: b,
|
|
5370
|
-
error:
|
|
5405
|
+
error: T,
|
|
5371
5406
|
setError: (I) => {
|
|
5372
|
-
|
|
5407
|
+
T = I;
|
|
5373
5408
|
}
|
|
5374
5409
|
});
|
|
5375
|
-
throw
|
|
5410
|
+
throw T;
|
|
5376
5411
|
});
|
|
5377
|
-
} : (O) => (m) => (m && Object.assign(O, m), O), w = c.subscribe.length,
|
|
5412
|
+
} : (O) => (m) => (m && Object.assign(O, m), O), w = c.subscribe.length, k = ur(w ? (O) => {
|
|
5378
5413
|
let m = o;
|
|
5379
5414
|
const g = [], b = O.contextValue || {};
|
|
5380
5415
|
let A;
|
|
5381
|
-
return
|
|
5416
|
+
return F(() => ue(c.subscribe, (y, T) => y({
|
|
5382
5417
|
subscribeFn: m,
|
|
5383
|
-
setSubscribeFn: (
|
|
5384
|
-
m =
|
|
5418
|
+
setSubscribeFn: (E) => {
|
|
5419
|
+
m = E;
|
|
5385
5420
|
},
|
|
5386
5421
|
context: b,
|
|
5387
|
-
extendContext: (
|
|
5388
|
-
Object.assign(b,
|
|
5422
|
+
extendContext: (E) => {
|
|
5423
|
+
Object.assign(b, E);
|
|
5389
5424
|
},
|
|
5390
5425
|
args: O,
|
|
5391
|
-
setResultAndStopExecution: (
|
|
5392
|
-
A =
|
|
5426
|
+
setResultAndStopExecution: (E) => {
|
|
5427
|
+
A = E, T();
|
|
5393
5428
|
}
|
|
5394
5429
|
}), g), () => {
|
|
5395
|
-
const y = [],
|
|
5396
|
-
for (const { onSubscribeResult:
|
|
5397
|
-
|
|
5398
|
-
return
|
|
5430
|
+
const y = [], T = [];
|
|
5431
|
+
for (const { onSubscribeResult: E, onSubscribeError: I } of g)
|
|
5432
|
+
E && y.push(E), I && T.push(I);
|
|
5433
|
+
return F(() => A || m(O), (E) => {
|
|
5399
5434
|
const I = [], N = [];
|
|
5400
5435
|
for (const P of y) {
|
|
5401
5436
|
const $ = P({
|
|
5402
5437
|
args: O,
|
|
5403
|
-
result:
|
|
5438
|
+
result: E,
|
|
5404
5439
|
setResult: (j) => {
|
|
5405
|
-
|
|
5440
|
+
E = j;
|
|
5406
5441
|
}
|
|
5407
5442
|
});
|
|
5408
5443
|
$ && ($.onNext && I.push($.onNext), $.onEnd && N.push($.onEnd));
|
|
5409
5444
|
}
|
|
5410
|
-
return I.length &&
|
|
5445
|
+
return I.length && Re(E) && (E = _n(E, (P) => F(() => ue(I, ($) => $({
|
|
5411
5446
|
args: O,
|
|
5412
5447
|
result: P,
|
|
5413
5448
|
setResult: (j) => P = j
|
|
5414
|
-
})), () => P))), N.length &&
|
|
5449
|
+
})), () => P))), N.length && Re(E) && (E = dr(E, () => {
|
|
5415
5450
|
for (const P of N)
|
|
5416
5451
|
P();
|
|
5417
|
-
})),
|
|
5452
|
+
})), T.length && Re(E) && (E = Ml(E, (P) => {
|
|
5418
5453
|
let $ = P;
|
|
5419
|
-
for (const j of
|
|
5454
|
+
for (const j of T)
|
|
5420
5455
|
j({
|
|
5421
5456
|
error: $,
|
|
5422
5457
|
setError: (q) => {
|
|
@@ -5424,19 +5459,19 @@ function jl({ plugins: t }) {
|
|
|
5424
5459
|
}
|
|
5425
5460
|
});
|
|
5426
5461
|
throw $;
|
|
5427
|
-
})),
|
|
5462
|
+
})), E;
|
|
5428
5463
|
});
|
|
5429
5464
|
});
|
|
5430
5465
|
} : o), S = c.execute.length, L = cr(S ? (O) => {
|
|
5431
5466
|
let m = s, g;
|
|
5432
5467
|
const b = [], A = [], y = O.contextValue || {};
|
|
5433
|
-
return
|
|
5468
|
+
return F(() => ue(c.execute, (T, E) => T({
|
|
5434
5469
|
executeFn: m,
|
|
5435
5470
|
setExecuteFn: (I) => {
|
|
5436
5471
|
m = I;
|
|
5437
5472
|
},
|
|
5438
5473
|
setResultAndStopExecution: (I) => {
|
|
5439
|
-
g = I,
|
|
5474
|
+
g = I, E();
|
|
5440
5475
|
},
|
|
5441
5476
|
context: y,
|
|
5442
5477
|
extendContext: (I) => {
|
|
@@ -5446,29 +5481,29 @@ function jl({ plugins: t }) {
|
|
|
5446
5481
|
throw new Error(`Invalid context extension provided! Expected "object", got: "${JSON.stringify(I)}" (${typeof I})`);
|
|
5447
5482
|
},
|
|
5448
5483
|
args: O
|
|
5449
|
-
}), b), () =>
|
|
5484
|
+
}), b), () => F(() => g || m({
|
|
5450
5485
|
...O,
|
|
5451
5486
|
contextValue: y
|
|
5452
|
-
}), (
|
|
5487
|
+
}), (T) => F(() => ue(b, (E) => E.onExecuteDone?.({
|
|
5453
5488
|
args: O,
|
|
5454
|
-
result:
|
|
5489
|
+
result: T,
|
|
5455
5490
|
setResult: (I) => {
|
|
5456
|
-
|
|
5491
|
+
T = I;
|
|
5457
5492
|
}
|
|
5458
5493
|
}), A), () => {
|
|
5459
|
-
const
|
|
5494
|
+
const E = [], I = [];
|
|
5460
5495
|
for (const { onNext: N, onEnd: P } of A)
|
|
5461
|
-
N &&
|
|
5462
|
-
return
|
|
5496
|
+
N && E.push(N), P && I.push(P);
|
|
5497
|
+
return E.length && Re(T) && (T = _n(T, (N) => F(() => ue(E, (P) => P({
|
|
5463
5498
|
args: O,
|
|
5464
5499
|
result: N,
|
|
5465
5500
|
setResult: ($) => {
|
|
5466
5501
|
N = $;
|
|
5467
5502
|
}
|
|
5468
|
-
})), () => N))), I.length &&
|
|
5503
|
+
})), () => N))), I.length && Re(T) && (T = dr(T, () => {
|
|
5469
5504
|
for (const N of I)
|
|
5470
5505
|
N();
|
|
5471
|
-
})),
|
|
5506
|
+
})), T;
|
|
5472
5507
|
})));
|
|
5473
5508
|
} : s);
|
|
5474
5509
|
if (n = !0, e)
|
|
@@ -5485,7 +5520,7 @@ function jl({ plugins: t }) {
|
|
|
5485
5520
|
parse: d,
|
|
5486
5521
|
validate: h,
|
|
5487
5522
|
execute: L,
|
|
5488
|
-
subscribe:
|
|
5523
|
+
subscribe: k,
|
|
5489
5524
|
contextFactory: v,
|
|
5490
5525
|
instrumentation: a
|
|
5491
5526
|
};
|
|
@@ -5597,7 +5632,7 @@ function Jl(t) {
|
|
|
5597
5632
|
}
|
|
5598
5633
|
const Yl = (t) => ({
|
|
5599
5634
|
onContextBuilding({ context: e, extendContext: n }) {
|
|
5600
|
-
return
|
|
5635
|
+
return F(() => t(e), (i) => n(i));
|
|
5601
5636
|
}
|
|
5602
5637
|
}), Xl = (t) => ({
|
|
5603
5638
|
onExecute: ({ setExecuteFn: e }) => {
|
|
@@ -5623,7 +5658,7 @@ class V extends jn {
|
|
|
5623
5658
|
super(e, n), this.name = "PothosSchemaError";
|
|
5624
5659
|
}
|
|
5625
5660
|
}
|
|
5626
|
-
const
|
|
5661
|
+
const At = Symbol.for("Pothos.outputShapeKey"), en = Symbol.for("Pothos.parentShapeKey"), Un = Symbol.for("Pothos.inputShapeKey"), $s = Symbol.for("Pothos.inputFieldShapeKey"), Zl = Symbol.for("Pothos.outputFieldShapeKey"), Nn = Symbol.for("Pothos.typeBrandKey");
|
|
5627
5662
|
function ut(t, e, n) {
|
|
5628
5663
|
return e in t ? Object.defineProperty(t, e, {
|
|
5629
5664
|
value: n,
|
|
@@ -5671,7 +5706,7 @@ class ne {
|
|
|
5671
5706
|
ut(this, "kind", void 0), ut(this, "name", void 0), ut(this, "association", null), ut(this, "configCallbacks", /* @__PURE__ */ new Set()), ut(this, "preparedForBuild", !1), ut(this, "currentConfig", void 0), this.kind = e, this.name = n, this.currentConfig = i ?? null;
|
|
5672
5707
|
}
|
|
5673
5708
|
}
|
|
5674
|
-
function
|
|
5709
|
+
function Ct(t, e, n) {
|
|
5675
5710
|
return e in t ? Object.defineProperty(t, e, {
|
|
5676
5711
|
value: n,
|
|
5677
5712
|
enumerable: !0,
|
|
@@ -5682,7 +5717,7 @@ function Ft(t, e, n) {
|
|
|
5682
5717
|
let eu = Un;
|
|
5683
5718
|
class Ms extends ne {
|
|
5684
5719
|
constructor(e, n) {
|
|
5685
|
-
super("InputList", `InputList<${String(e)}>`),
|
|
5720
|
+
super("InputList", `InputList<${String(e)}>`), Ct(this, "kind", "InputList"), Ct(this, eu, void 0), Ct(this, "$inferInput", void 0), Ct(this, "listType", void 0), Ct(this, "required", void 0), this.listType = e, this.required = n;
|
|
5686
5721
|
}
|
|
5687
5722
|
}
|
|
5688
5723
|
function ct(t, e, n) {
|
|
@@ -5693,7 +5728,7 @@ function ct(t, e, n) {
|
|
|
5693
5728
|
writable: !0
|
|
5694
5729
|
}) : t[e] = n, t;
|
|
5695
5730
|
}
|
|
5696
|
-
let tu =
|
|
5731
|
+
let tu = At, nu = en;
|
|
5697
5732
|
class js extends ne {
|
|
5698
5733
|
constructor(e, n) {
|
|
5699
5734
|
super("List", `List<${String(e)}>`), ct(this, "kind", "List"), ct(this, "$inferType", void 0), ct(this, tu, void 0), ct(this, nu, void 0), ct(this, "listType", void 0), ct(this, "nullable", void 0), this.listType = e, this.nullable = n;
|
|
@@ -5740,18 +5775,18 @@ function su(t, e) {
|
|
|
5740
5775
|
};
|
|
5741
5776
|
return n;
|
|
5742
5777
|
}
|
|
5743
|
-
function
|
|
5778
|
+
function Ei(t, e, n) {
|
|
5744
5779
|
const i = typeof n == "object" ? n.items : !1, r = typeof n == "object" ? n.list : !!n;
|
|
5745
5780
|
if (Array.isArray(t))
|
|
5746
5781
|
return {
|
|
5747
5782
|
kind: "List",
|
|
5748
|
-
type:
|
|
5783
|
+
type: Ei(t[0], e, i),
|
|
5749
5784
|
nullable: r
|
|
5750
5785
|
};
|
|
5751
5786
|
if (t instanceof js)
|
|
5752
5787
|
return {
|
|
5753
5788
|
kind: "List",
|
|
5754
|
-
type:
|
|
5789
|
+
type: Ei(t.listType, e, t.nullable),
|
|
5755
5790
|
nullable: r
|
|
5756
5791
|
};
|
|
5757
5792
|
const s = e.getOutputTypeRef(t), o = s instanceof ne ? s.kind : e.getTypeConfig(s).graphqlKind, a = s instanceof ne ? s.name : e.getTypeConfig(s).name;
|
|
@@ -5763,18 +5798,18 @@ function Ti(t, e, n) {
|
|
|
5763
5798
|
};
|
|
5764
5799
|
throw new V(`Expected input param ${a} to be an output type but got ${o}`);
|
|
5765
5800
|
}
|
|
5766
|
-
function
|
|
5801
|
+
function Rn(t, e, n) {
|
|
5767
5802
|
const i = typeof n == "object" ? n.items : !0, r = typeof n == "object" ? n.list : !!n;
|
|
5768
5803
|
if (Array.isArray(t))
|
|
5769
5804
|
return {
|
|
5770
5805
|
kind: "List",
|
|
5771
|
-
type:
|
|
5806
|
+
type: Rn(t[0], e, i),
|
|
5772
5807
|
required: r
|
|
5773
5808
|
};
|
|
5774
5809
|
if (t instanceof Ms)
|
|
5775
5810
|
return {
|
|
5776
5811
|
kind: "List",
|
|
5777
|
-
type:
|
|
5812
|
+
type: Rn(t.listType, e, t.required),
|
|
5778
5813
|
required: r
|
|
5779
5814
|
};
|
|
5780
5815
|
const s = e.getInputTypeRef(t), o = s instanceof ne ? s.kind : e.getTypeConfig(s).graphqlKind, a = s instanceof ne ? s.name : e.getTypeConfig(s).name;
|
|
@@ -5792,7 +5827,7 @@ function ou(t) {
|
|
|
5792
5827
|
function vi(t) {
|
|
5793
5828
|
return !!(t && (typeof t == "object" || typeof t == "function") && typeof t.then == "function");
|
|
5794
5829
|
}
|
|
5795
|
-
function
|
|
5830
|
+
function Fe(t) {
|
|
5796
5831
|
if (t === void 0)
|
|
5797
5832
|
throw new V(`Received undefined as a type ref.
|
|
5798
5833
|
|
|
@@ -5839,7 +5874,7 @@ function gr(t, e, n) {
|
|
|
5839
5874
|
}
|
|
5840
5875
|
return i(e, 0);
|
|
5841
5876
|
}
|
|
5842
|
-
function
|
|
5877
|
+
function Ft(t, e, n) {
|
|
5843
5878
|
return e in t ? Object.defineProperty(t, e, {
|
|
5844
5879
|
value: n,
|
|
5845
5880
|
enumerable: !0,
|
|
@@ -5963,7 +5998,7 @@ class lu {
|
|
|
5963
5998
|
return this.requestDataMap(e);
|
|
5964
5999
|
}
|
|
5965
6000
|
constructor(e, n) {
|
|
5966
|
-
|
|
6001
|
+
Ft(this, "name", void 0), Ft(this, "builder", void 0), Ft(this, "buildCache", void 0), Ft(this, "options", void 0), Ft(this, "requestDataMap", iu((i) => this.createRequestData(i))), this.name = n, this.builder = e.builder, this.buildCache = e, this.options = e.options;
|
|
5967
6002
|
}
|
|
5968
6003
|
}
|
|
5969
6004
|
function uu(t, e, n) {
|
|
@@ -6035,7 +6070,7 @@ function ft(t, e, n) {
|
|
|
6035
6070
|
writable: !0
|
|
6036
6071
|
}) : t[e] = n, t;
|
|
6037
6072
|
}
|
|
6038
|
-
let fu =
|
|
6073
|
+
let fu = At, du = en, pu = Un;
|
|
6039
6074
|
class Us extends ne {
|
|
6040
6075
|
constructor(e, n) {
|
|
6041
6076
|
super("Scalar", e, n), ft(this, "kind", "Scalar"), ft(this, "$inferType", void 0), ft(this, "$inferInput", void 0), ft(this, fu, void 0), ft(this, du, void 0), ft(this, pu, void 0);
|
|
@@ -6274,11 +6309,11 @@ class gu {
|
|
|
6274
6309
|
return i;
|
|
6275
6310
|
break;
|
|
6276
6311
|
case "Scalar":
|
|
6277
|
-
if (i instanceof
|
|
6312
|
+
if (i instanceof Ve)
|
|
6278
6313
|
return i;
|
|
6279
6314
|
break;
|
|
6280
6315
|
case "InputObject":
|
|
6281
|
-
if (i instanceof
|
|
6316
|
+
if (i instanceof Ve)
|
|
6282
6317
|
return i;
|
|
6283
6318
|
break;
|
|
6284
6319
|
}
|
|
@@ -6364,7 +6399,7 @@ class gu {
|
|
|
6364
6399
|
return n;
|
|
6365
6400
|
}
|
|
6366
6401
|
buildScalar(e) {
|
|
6367
|
-
return e.name === "ID" ? Pn : e.name === "Int" ? Ln : e.name === "Float" ? Ni : e.name === "Boolean" ? te : e.name === "String" ? G : new
|
|
6402
|
+
return e.name === "ID" ? Pn : e.name === "Int" ? Ln : e.name === "Float" ? Ni : e.name === "Boolean" ? te : e.name === "String" ? G : new Ve({
|
|
6368
6403
|
...e,
|
|
6369
6404
|
extensions: {
|
|
6370
6405
|
...e.extensions,
|
|
@@ -6410,7 +6445,7 @@ function ht(t, e, n) {
|
|
|
6410
6445
|
}) : t[e] = n, t;
|
|
6411
6446
|
}
|
|
6412
6447
|
let yu = Un;
|
|
6413
|
-
class
|
|
6448
|
+
class An extends ne {
|
|
6414
6449
|
addFields(e) {
|
|
6415
6450
|
this.fields.add(e);
|
|
6416
6451
|
for (const n of this.fieldCbs)
|
|
@@ -6427,7 +6462,7 @@ class Rn extends ne {
|
|
|
6427
6462
|
super("InputObject", e), ht(this, "kind", "InputObject"), ht(this, "$inferInput", void 0), ht(this, yu, void 0), ht(this, "fields", /* @__PURE__ */ new Set()), ht(this, "fieldCbs", /* @__PURE__ */ new Set());
|
|
6428
6463
|
}
|
|
6429
6464
|
}
|
|
6430
|
-
class bu extends
|
|
6465
|
+
class bu extends An {
|
|
6431
6466
|
implement(e) {
|
|
6432
6467
|
return this.builder.inputType(this, e), this;
|
|
6433
6468
|
}
|
|
@@ -6489,10 +6524,10 @@ function Vt(t, e, n) {
|
|
|
6489
6524
|
writable: !0
|
|
6490
6525
|
}) : t[e] = n, t;
|
|
6491
6526
|
}
|
|
6492
|
-
let
|
|
6527
|
+
let Tu = At, Eu = en;
|
|
6493
6528
|
class kn extends Vs {
|
|
6494
6529
|
constructor(e, n) {
|
|
6495
|
-
super("Interface", e, n), Vt(this, "kind", "Interface"), Vt(this, "$inferType", void 0), Vt(this,
|
|
6530
|
+
super("Interface", e, n), Vt(this, "kind", "Interface"), Vt(this, "$inferType", void 0), Vt(this, Tu, void 0), Vt(this, Eu, void 0);
|
|
6496
6531
|
}
|
|
6497
6532
|
}
|
|
6498
6533
|
class vu extends kn {
|
|
@@ -6511,7 +6546,7 @@ function qt(t, e, n) {
|
|
|
6511
6546
|
writable: !0
|
|
6512
6547
|
}) : t[e] = n, t;
|
|
6513
6548
|
}
|
|
6514
|
-
let wu =
|
|
6549
|
+
let wu = At, Su = en;
|
|
6515
6550
|
class st extends Vs {
|
|
6516
6551
|
constructor(e, n) {
|
|
6517
6552
|
super("Object", e, n), qt(this, "kind", "Object"), qt(this, "$inferType", void 0), qt(this, wu, void 0), qt(this, Su, void 0);
|
|
@@ -6560,7 +6595,7 @@ class Ou {
|
|
|
6560
6595
|
}
|
|
6561
6596
|
addInputFields(e, n) {
|
|
6562
6597
|
this.onTypeConfig(e, (i, r) => {
|
|
6563
|
-
if (!(r instanceof
|
|
6598
|
+
if (!(r instanceof An))
|
|
6564
6599
|
throw new V(`Can not add fields to ${r} because it is not an input object`);
|
|
6565
6600
|
r.addFields(n);
|
|
6566
6601
|
});
|
|
@@ -6601,7 +6636,7 @@ class Ou {
|
|
|
6601
6636
|
const i = this.implementors.get(n.name);
|
|
6602
6637
|
if (i && i !== e)
|
|
6603
6638
|
throw new V(`Duplicate typename: Another type with name ${n.name} already exists.`);
|
|
6604
|
-
if (i || (this.implementors.set(n.name, e), this.associateParamWithRef(e, n.name), (e instanceof st || e instanceof kn || e instanceof
|
|
6639
|
+
if (i || (this.implementors.set(n.name, e), this.associateParamWithRef(e, n.name), (e instanceof st || e instanceof kn || e instanceof An) && (this.fields.has(n.name) || this.fields.set(n.name, /* @__PURE__ */ new Map()), this.onPrepare(() => {
|
|
6605
6640
|
e.onField((r, s) => {
|
|
6606
6641
|
const o = this.fields.get(n.name);
|
|
6607
6642
|
if (o.has(r))
|
|
@@ -6716,7 +6751,7 @@ function ze(t, e, n) {
|
|
|
6716
6751
|
}) : t[e] = n, t;
|
|
6717
6752
|
}
|
|
6718
6753
|
let Nu = $s;
|
|
6719
|
-
class
|
|
6754
|
+
class Ru {
|
|
6720
6755
|
onConfig(e) {
|
|
6721
6756
|
this.pendingActions.push(e);
|
|
6722
6757
|
}
|
|
@@ -6747,7 +6782,7 @@ function Je(t, e, n) {
|
|
|
6747
6782
|
writable: !0
|
|
6748
6783
|
}) : t[e] = n, t;
|
|
6749
6784
|
}
|
|
6750
|
-
let
|
|
6785
|
+
let Au = $s;
|
|
6751
6786
|
class ku {
|
|
6752
6787
|
updateConfig(e) {
|
|
6753
6788
|
this.pendingActions.push(e);
|
|
@@ -6765,7 +6800,7 @@ class ku {
|
|
|
6765
6800
|
this.onUseCallbacks.add(e);
|
|
6766
6801
|
}
|
|
6767
6802
|
constructor(e) {
|
|
6768
|
-
Je(this, "kind", "InputObject"), Je(this, "fieldName", void 0), Je(this, "$inferInput", void 0), Je(this,
|
|
6803
|
+
Je(this, "kind", "InputObject"), Je(this, "fieldName", void 0), Je(this, "$inferInput", void 0), Je(this, Au, void 0), Je(this, "pendingActions", []), Je(this, "initConfig", void 0), Je(this, "onUseCallbacks", /* @__PURE__ */ new Set()), this.initConfig = e;
|
|
6769
6804
|
}
|
|
6770
6805
|
}
|
|
6771
6806
|
function me(t, e, n) {
|
|
@@ -6791,7 +6826,7 @@ class Si {
|
|
|
6791
6826
|
* @param {PothosSchemaTypes.InputFieldOptions} [options={}] - Options for this field
|
|
6792
6827
|
*/
|
|
6793
6828
|
field(e) {
|
|
6794
|
-
return this.kind === "Arg" ? new
|
|
6829
|
+
return this.kind === "Arg" ? new Ru((i, r, s) => {
|
|
6795
6830
|
const o = e;
|
|
6796
6831
|
var a, l;
|
|
6797
6832
|
return {
|
|
@@ -6800,7 +6835,7 @@ class Si {
|
|
|
6800
6835
|
kind: this.kind,
|
|
6801
6836
|
graphqlKind: this.kind,
|
|
6802
6837
|
parentType: s.name,
|
|
6803
|
-
type:
|
|
6838
|
+
type: Rn(o.type, this.builder.configStore, (a = o.required) !== null && a !== void 0 ? a : this.builder.defaultInputFieldRequiredness),
|
|
6804
6839
|
pothosOptions: o,
|
|
6805
6840
|
description: o.description,
|
|
6806
6841
|
deprecationReason: o.deprecationReason,
|
|
@@ -6816,7 +6851,7 @@ class Si {
|
|
|
6816
6851
|
kind: this.kind,
|
|
6817
6852
|
graphqlKind: this.kind,
|
|
6818
6853
|
parentType: r.name,
|
|
6819
|
-
type:
|
|
6854
|
+
type: Rn(s.type, this.builder.configStore, (o = s.required) !== null && o !== void 0 ? o : this.builder.defaultInputFieldRequiredness),
|
|
6820
6855
|
pothosOptions: s,
|
|
6821
6856
|
description: s.description,
|
|
6822
6857
|
deprecationReason: s.deprecationReason,
|
|
@@ -6859,8 +6894,8 @@ function Ye(t, e, n) {
|
|
|
6859
6894
|
writable: !0
|
|
6860
6895
|
}) : t[e] = n, t;
|
|
6861
6896
|
}
|
|
6862
|
-
let
|
|
6863
|
-
class
|
|
6897
|
+
let Cu = Zl;
|
|
6898
|
+
class Fu {
|
|
6864
6899
|
updateConfig(e) {
|
|
6865
6900
|
this.pendingActions.push(e);
|
|
6866
6901
|
}
|
|
@@ -6877,7 +6912,7 @@ class Cu {
|
|
|
6877
6912
|
this.onUseCallbacks.add(e);
|
|
6878
6913
|
}
|
|
6879
6914
|
constructor(e, n) {
|
|
6880
|
-
Ye(this, "kind", void 0), Ye(this, "fieldName", void 0), Ye(this, "$inferType", void 0), Ye(this,
|
|
6915
|
+
Ye(this, "kind", void 0), Ye(this, "fieldName", void 0), Ye(this, "$inferType", void 0), Ye(this, Cu, void 0), Ye(this, "pendingActions", []), Ye(this, "initConfig", void 0), Ye(this, "onUseCallbacks", /* @__PURE__ */ new Set()), this.kind = e, this.initConfig = n;
|
|
6881
6916
|
}
|
|
6882
6917
|
}
|
|
6883
6918
|
function ti(t, e, n) {
|
|
@@ -6890,7 +6925,7 @@ function ti(t, e, n) {
|
|
|
6890
6925
|
}
|
|
6891
6926
|
class xu {
|
|
6892
6927
|
createField(e) {
|
|
6893
|
-
return new
|
|
6928
|
+
return new Fu(this.kind, (i, r) => {
|
|
6894
6929
|
var s;
|
|
6895
6930
|
const o = {};
|
|
6896
6931
|
if (e.args)
|
|
@@ -6907,7 +6942,7 @@ class xu {
|
|
|
6907
6942
|
name: i,
|
|
6908
6943
|
args: o,
|
|
6909
6944
|
argMappers: [],
|
|
6910
|
-
type:
|
|
6945
|
+
type: Ei(e.type, this.builder.configStore, (u = e.nullable) !== null && u !== void 0 ? u : this.builder.defaultFieldNullability),
|
|
6911
6946
|
pothosOptions: e,
|
|
6912
6947
|
extensions: {
|
|
6913
6948
|
pothosOriginalResolve: a,
|
|
@@ -7253,7 +7288,7 @@ function Dt(t, e, n) {
|
|
|
7253
7288
|
writable: !0
|
|
7254
7289
|
}) : t[e] = n, t;
|
|
7255
7290
|
}
|
|
7256
|
-
let Lu =
|
|
7291
|
+
let Lu = At, Pu = Un;
|
|
7257
7292
|
class $u extends ne {
|
|
7258
7293
|
constructor(e, n) {
|
|
7259
7294
|
super("Enum", e, n), Dt(this, "kind", "Enum"), Dt(this, "$inferType", void 0), Dt(this, "$inferInput", void 0), Dt(this, Lu, void 0), Dt(this, Pu, void 0);
|
|
@@ -7267,7 +7302,7 @@ function Lt(t, e, n) {
|
|
|
7267
7302
|
writable: !0
|
|
7268
7303
|
}) : t[e] = n, t;
|
|
7269
7304
|
}
|
|
7270
|
-
let Mu =
|
|
7305
|
+
let Mu = At, ju = en;
|
|
7271
7306
|
class Uu extends ne {
|
|
7272
7307
|
addTypes(e) {
|
|
7273
7308
|
Array.isArray(e) && e.length === 0 || (this.preparedForBuild ? this.updateConfig((n) => ({
|
|
@@ -7306,7 +7341,7 @@ let qn = class mt {
|
|
|
7306
7341
|
mt.plugins[e] = n, i && mt.optionNormalizers.set(e, i);
|
|
7307
7342
|
}
|
|
7308
7343
|
objectType(e, n, i) {
|
|
7309
|
-
|
|
7344
|
+
Fe(e), mr(n.interfaces);
|
|
7310
7345
|
var r;
|
|
7311
7346
|
const s = typeof e == "string" ? e : (r = n.name) !== null && r !== void 0 ? r : e.name, o = e instanceof ne ? e : new st(s);
|
|
7312
7347
|
return o.updateConfig({
|
|
@@ -7324,10 +7359,10 @@ let qn = class mt {
|
|
|
7324
7359
|
}), this.configStore.addTypeRef(o), o;
|
|
7325
7360
|
}
|
|
7326
7361
|
objectFields(e, n) {
|
|
7327
|
-
|
|
7362
|
+
Fe(e), this.configStore.addFields(e, () => n(new ln(this)));
|
|
7328
7363
|
}
|
|
7329
7364
|
objectField(e, n, i) {
|
|
7330
|
-
|
|
7365
|
+
Fe(e), this.configStore.addFields(e, () => ({
|
|
7331
7366
|
[n]: i(new ln(this))
|
|
7332
7367
|
}));
|
|
7333
7368
|
}
|
|
@@ -7395,7 +7430,7 @@ let qn = class mt {
|
|
|
7395
7430
|
return e(new Si(this, "Arg"));
|
|
7396
7431
|
}
|
|
7397
7432
|
interfaceType(e, n, i) {
|
|
7398
|
-
|
|
7433
|
+
Fe(e), mr(n.interfaces);
|
|
7399
7434
|
var r;
|
|
7400
7435
|
const s = typeof e == "string" ? e : (r = n.name) !== null && r !== void 0 ? r : e.name, o = e instanceof ne ? e : new kn(s), a = o.name;
|
|
7401
7436
|
return o.updateConfig({
|
|
@@ -7410,10 +7445,10 @@ let qn = class mt {
|
|
|
7410
7445
|
}), this.configStore.addTypeRef(o), n.interfaces && o.addInterfaces(n.interfaces), o !== e && typeof e != "string" && this.configStore.associateParamWithRef(e, o), i && this.configStore.addFields(o, () => i(new on(this))), n.fields && this.configStore.addFields(o, () => n.fields(new on(this))), o;
|
|
7411
7446
|
}
|
|
7412
7447
|
interfaceFields(e, n) {
|
|
7413
|
-
|
|
7448
|
+
Fe(e), this.configStore.addFields(e, () => n(new on(this)));
|
|
7414
7449
|
}
|
|
7415
7450
|
interfaceField(e, n, i) {
|
|
7416
|
-
|
|
7451
|
+
Fe(e), this.configStore.addFields(e, () => ({
|
|
7417
7452
|
[n]: i(new on(this))
|
|
7418
7453
|
}));
|
|
7419
7454
|
}
|
|
@@ -7430,11 +7465,11 @@ let qn = class mt {
|
|
|
7430
7465
|
});
|
|
7431
7466
|
if (Array.isArray(n.types))
|
|
7432
7467
|
for (const r of n.types)
|
|
7433
|
-
|
|
7468
|
+
Fe(r);
|
|
7434
7469
|
return this.configStore.addTypeRef(i), i.addTypes(n.types), i;
|
|
7435
7470
|
}
|
|
7436
7471
|
enumType(e, n) {
|
|
7437
|
-
|
|
7472
|
+
Fe(e);
|
|
7438
7473
|
const i = typeof e == "string" ? e : n.name, r = typeof e == "object" ? su(e, n?.values) : ru(n.values), s = new $u(i, {
|
|
7439
7474
|
kind: "Enum",
|
|
7440
7475
|
graphqlKind: "Enum",
|
|
@@ -7472,8 +7507,8 @@ let qn = class mt {
|
|
|
7472
7507
|
});
|
|
7473
7508
|
}
|
|
7474
7509
|
inputType(e, n) {
|
|
7475
|
-
|
|
7476
|
-
const i = typeof e == "string" ? e : e.name, r = typeof e == "string" ? new
|
|
7510
|
+
Fe(e);
|
|
7511
|
+
const i = typeof e == "string" ? e : e.name, r = typeof e == "string" ? new An(i) : e;
|
|
7477
7512
|
return r.updateConfig({
|
|
7478
7513
|
kind: "InputObject",
|
|
7479
7514
|
graphqlKind: "InputObject",
|
|
@@ -7507,7 +7542,7 @@ let qn = class mt {
|
|
|
7507
7542
|
o.plugin.beforeBuild(), o.buildAll();
|
|
7508
7543
|
const a = [
|
|
7509
7544
|
...o.types.values()
|
|
7510
|
-
], l = this.configStore.hasConfig(this.queryRef) ? this.configStore.getTypeConfig(this.queryRef).name : "Query", u = this.configStore.hasConfig(this.mutationRef) ? this.configStore.getTypeConfig(this.mutationRef).name : "Mutation", c = this.configStore.hasConfig(this.subscriptionRef) ? this.configStore.getTypeConfig(this.subscriptionRef).name : "Subscription", f = new
|
|
7545
|
+
], l = this.configStore.hasConfig(this.queryRef) ? this.configStore.getTypeConfig(this.queryRef).name : "Query", u = this.configStore.hasConfig(this.mutationRef) ? this.configStore.getTypeConfig(this.mutationRef).name : "Mutation", c = this.configStore.hasConfig(this.subscriptionRef) ? this.configStore.getTypeConfig(this.subscriptionRef).name : "Subscription", f = new Ci({
|
|
7511
7546
|
query: o.types.get(l),
|
|
7512
7547
|
mutation: o.types.get(u),
|
|
7513
7548
|
subscription: o.types.get(c),
|
|
@@ -7515,7 +7550,7 @@ let qn = class mt {
|
|
|
7515
7550
|
directives: i,
|
|
7516
7551
|
types: a
|
|
7517
7552
|
}), d = o.plugin.afterBuild(f);
|
|
7518
|
-
return n.sortSchema === !1 ? d :
|
|
7553
|
+
return n.sortSchema === !1 ? d : Al(d);
|
|
7519
7554
|
}
|
|
7520
7555
|
constructor(e) {
|
|
7521
7556
|
we(this, "$inferSchemaTypes", void 0), we(this, "queryRef", new Bs("Query")), we(this, "mutationRef", new qs("Mutation")), we(this, "subscriptionRef", new Gs("Subscription")), we(this, "configStore", void 0), we(this, "options", void 0), we(this, "defaultFieldNullability", void 0), we(this, "defaultInputFieldRequiredness", void 0), this.options = [
|
|
@@ -7530,20 +7565,20 @@ let qn = class mt {
|
|
|
7530
7565
|
we(qn, "plugins", {});
|
|
7531
7566
|
we(qn, "optionNormalizers", /* @__PURE__ */ new Map());
|
|
7532
7567
|
we(qn, "allowPluginReRegistration", !1);
|
|
7533
|
-
const Vu = qn,
|
|
7568
|
+
const Vu = qn, Qe = {
|
|
7534
7569
|
red: "\x1B[31m",
|
|
7535
7570
|
yellow: "\x1B[33m",
|
|
7536
7571
|
magenta: "\x1B[35m",
|
|
7537
7572
|
cyan: "\x1B[36m",
|
|
7538
7573
|
reset: "\x1B[0m"
|
|
7539
|
-
}, yr =
|
|
7574
|
+
}, yr = Qe.yellow + "WARN" + Qe.reset, br = Qe.cyan + "INFO" + Qe.reset, Tr = Qe.red + "ERR" + Qe.reset, Er = Qe.magenta + "DEBUG" + Qe.reset, Pt = {
|
|
7540
7575
|
debug: 0,
|
|
7541
7576
|
info: 1,
|
|
7542
7577
|
warn: 2,
|
|
7543
7578
|
error: 3,
|
|
7544
7579
|
silent: 4
|
|
7545
7580
|
}, fn = () => {
|
|
7546
|
-
}, Bn = (t) => (...e) => console.log(t, ...e), qu = console.debug ? (...t) => console.debug(
|
|
7581
|
+
}, Bn = (t) => (...e) => console.log(t, ...e), qu = console.debug ? (...t) => console.debug(Er, ...t) : Bn(Er), Bu = console.info ? (...t) => console.info(br, ...t) : Bn(br), Gu = console.warn ? (...t) => console.warn(yr, ...t) : Bn(yr), Qu = console.error ? (...t) => console.error(Tr, ...t) : Bn(Tr), ni = (t = globalThis.process?.env.DEBUG === "1" ? "debug" : "info") => {
|
|
7547
7582
|
const e = Pt[t];
|
|
7548
7583
|
return {
|
|
7549
7584
|
debug: e > Pt.debug ? fn : qu,
|
|
@@ -7568,9 +7603,9 @@ function zu(t) {
|
|
|
7568
7603
|
return {
|
|
7569
7604
|
onRequest({ request: o, serverContext: a, fetchAPI: l, endResponse: u, url: c }) {
|
|
7570
7605
|
if (Ku(o) && (o.url.endsWith(t.graphqlEndpoint) || o.url.endsWith(`${t.graphqlEndpoint}/`) || c.pathname === t.graphqlEndpoint || c.pathname === `${t.graphqlEndpoint}/` || s(l).test(c)))
|
|
7571
|
-
return e.debug("Rendering GraphiQL"),
|
|
7606
|
+
return e.debug("Rendering GraphiQL"), F(() => n(o, a), (f) => {
|
|
7572
7607
|
if (f)
|
|
7573
|
-
return
|
|
7608
|
+
return F(() => i({
|
|
7574
7609
|
...f === !0 ? {} : f
|
|
7575
7610
|
}), (d) => {
|
|
7576
7611
|
const h = new l.Response(d, {
|
|
@@ -7601,7 +7636,7 @@ const Ju = (t) => {
|
|
|
7601
7636
|
return {
|
|
7602
7637
|
onRequestParseDone() {
|
|
7603
7638
|
if (!n)
|
|
7604
|
-
return
|
|
7639
|
+
return F(() => t, (i) => {
|
|
7605
7640
|
n = i;
|
|
7606
7641
|
});
|
|
7607
7642
|
}
|
|
@@ -7619,7 +7654,7 @@ const Ju = (t) => {
|
|
|
7619
7654
|
onRequestParse({ request: n, serverContext: i }) {
|
|
7620
7655
|
return {
|
|
7621
7656
|
onRequestParseDone() {
|
|
7622
|
-
return
|
|
7657
|
+
return F(() => t({
|
|
7623
7658
|
...i,
|
|
7624
7659
|
request: n
|
|
7625
7660
|
}), (r) => {
|
|
@@ -7727,7 +7762,7 @@ function Ks(t) {
|
|
|
7727
7762
|
function rc(t, e, n) {
|
|
7728
7763
|
let i = n;
|
|
7729
7764
|
for (const r of t)
|
|
7730
|
-
i =
|
|
7765
|
+
i = F(() => i, (s) => e(s, r));
|
|
7731
7766
|
return i;
|
|
7732
7767
|
}
|
|
7733
7768
|
function Ws(t, e) {
|
|
@@ -7825,8 +7860,8 @@ function oc(t) {
|
|
|
7825
7860
|
h.set(s, v);
|
|
7826
7861
|
const w = /* @__PURE__ */ new WeakMap();
|
|
7827
7862
|
v.set(o, w);
|
|
7828
|
-
const
|
|
7829
|
-
return w.set(a,
|
|
7863
|
+
const k = t(i, r, s, o, a);
|
|
7864
|
+
return w.set(a, k), k;
|
|
7830
7865
|
}
|
|
7831
7866
|
let u = l.get(r);
|
|
7832
7867
|
if (!u) {
|
|
@@ -7876,7 +7911,7 @@ const lc = Js(function(e) {
|
|
|
7876
7911
|
const s = e.getSubscriptionType();
|
|
7877
7912
|
return s && n.set("subscription", s), n;
|
|
7878
7913
|
});
|
|
7879
|
-
class
|
|
7914
|
+
class Cn extends Map {
|
|
7880
7915
|
get [Symbol.toStringTag]() {
|
|
7881
7916
|
return "AccumulatorMap";
|
|
7882
7917
|
}
|
|
@@ -7921,7 +7956,7 @@ const uc = new $e({
|
|
|
7921
7956
|
}
|
|
7922
7957
|
}
|
|
7923
7958
|
});
|
|
7924
|
-
function
|
|
7959
|
+
function Et(t, e, n, i, r, s, o, a) {
|
|
7925
7960
|
for (const l of r.selections)
|
|
7926
7961
|
switch (l.kind) {
|
|
7927
7962
|
case p.FIELD: {
|
|
@@ -7935,13 +7970,13 @@ function Tt(t, e, n, i, r, s, o, a) {
|
|
|
7935
7970
|
continue;
|
|
7936
7971
|
const u = Ir(n, l);
|
|
7937
7972
|
if (u) {
|
|
7938
|
-
const c = new
|
|
7939
|
-
|
|
7973
|
+
const c = new Cn();
|
|
7974
|
+
Et(t, e, n, i, l.selectionSet, c, o, a), o.push({
|
|
7940
7975
|
label: u.label,
|
|
7941
7976
|
fields: c
|
|
7942
7977
|
});
|
|
7943
7978
|
} else
|
|
7944
|
-
|
|
7979
|
+
Et(t, e, n, i, l.selectionSet, s, o, a);
|
|
7945
7980
|
break;
|
|
7946
7981
|
}
|
|
7947
7982
|
case p.FRAGMENT_SPREAD: {
|
|
@@ -7955,23 +7990,23 @@ function Tt(t, e, n, i, r, s, o, a) {
|
|
|
7955
7990
|
if (!f || !Sr(t, f, i))
|
|
7956
7991
|
continue;
|
|
7957
7992
|
if (c || a.add(u), c) {
|
|
7958
|
-
const d = new
|
|
7959
|
-
|
|
7993
|
+
const d = new Cn();
|
|
7994
|
+
Et(t, e, n, i, f.selectionSet, d, o, a), o.push({
|
|
7960
7995
|
label: c.label,
|
|
7961
7996
|
fields: d
|
|
7962
7997
|
});
|
|
7963
7998
|
} else
|
|
7964
|
-
|
|
7999
|
+
Et(t, e, n, i, f.selectionSet, s, o, a);
|
|
7965
8000
|
break;
|
|
7966
8001
|
}
|
|
7967
8002
|
}
|
|
7968
8003
|
}
|
|
7969
8004
|
function Ys(t, e, n, i, r) {
|
|
7970
|
-
const s = new
|
|
7971
|
-
return
|
|
8005
|
+
const s = new Cn(), o = [];
|
|
8006
|
+
return Et(t, e, n, i, r, s, o, /* @__PURE__ */ new Set()), { fields: s, patches: o };
|
|
7972
8007
|
}
|
|
7973
8008
|
function ii(t, e) {
|
|
7974
|
-
return !(Nt(
|
|
8009
|
+
return !(Nt(Ai, e, t)?.if === !0 || Nt(Ri, e, t)?.if === !1);
|
|
7975
8010
|
}
|
|
7976
8011
|
function Sr(t, e, n) {
|
|
7977
8012
|
const i = e.typeCondition;
|
|
@@ -7991,12 +8026,12 @@ function Ir(t, e) {
|
|
|
7991
8026
|
};
|
|
7992
8027
|
}
|
|
7993
8028
|
const dc = oc(function(e, n, i, r, s) {
|
|
7994
|
-
const o = new
|
|
8029
|
+
const o = new Cn(), a = /* @__PURE__ */ new Set(), l = [], u = {
|
|
7995
8030
|
fields: o,
|
|
7996
8031
|
patches: l
|
|
7997
8032
|
};
|
|
7998
8033
|
for (const c of s)
|
|
7999
|
-
c.selectionSet &&
|
|
8034
|
+
c.selectionSet && Et(e, n, i, r, c.selectionSet, o, l, a);
|
|
8000
8035
|
return u;
|
|
8001
8036
|
});
|
|
8002
8037
|
function Qn(t) {
|
|
@@ -8063,7 +8098,7 @@ class ji {
|
|
|
8063
8098
|
_iterateCallbacks() {
|
|
8064
8099
|
const e = this.callbacks.pop();
|
|
8065
8100
|
if (e)
|
|
8066
|
-
return
|
|
8101
|
+
return F(e, () => this._iterateCallbacks(), (n) => (this._error = this._error ? new yc(n, this._error) : n, this._iterateCallbacks()));
|
|
8067
8102
|
}
|
|
8068
8103
|
[le.asyncDispose]() {
|
|
8069
8104
|
const e = this._iterateCallbacks();
|
|
@@ -8082,7 +8117,7 @@ class ji {
|
|
|
8082
8117
|
[Symbol.toStringTag] = "AsyncDisposableStack";
|
|
8083
8118
|
}
|
|
8084
8119
|
const bc = globalThis.AsyncDisposableStack || ji;
|
|
8085
|
-
function
|
|
8120
|
+
function Ae(t) {
|
|
8086
8121
|
if (t instanceof Error)
|
|
8087
8122
|
return t;
|
|
8088
8123
|
if (typeof t == "object" && t != null && "message" in t && typeof t.message == "string") {
|
|
@@ -8093,7 +8128,7 @@ function Re(t) {
|
|
|
8093
8128
|
}
|
|
8094
8129
|
return new Error(String(t));
|
|
8095
8130
|
}
|
|
8096
|
-
function
|
|
8131
|
+
function Tc(t) {
|
|
8097
8132
|
const e = t[Symbol.asyncIterator]();
|
|
8098
8133
|
let n, i, r = !1;
|
|
8099
8134
|
async function s() {
|
|
@@ -8143,7 +8178,7 @@ function Or(t, e, n) {
|
|
|
8143
8178
|
e?.throwIfAborted();
|
|
8144
8179
|
const i = /* @__PURE__ */ Object.create(null), r = [];
|
|
8145
8180
|
for (const o in t) {
|
|
8146
|
-
const a =
|
|
8181
|
+
const a = F(() => t[o], (l) => {
|
|
8147
8182
|
i[o] = l;
|
|
8148
8183
|
});
|
|
8149
8184
|
Q(a) && r.push(a);
|
|
@@ -8153,7 +8188,7 @@ function Or(t, e, n) {
|
|
|
8153
8188
|
const s = r.length === 1 ? r[0] : Promise.all(r);
|
|
8154
8189
|
return n ? Promise.race([n, s]).then(() => i) : s.then(() => i);
|
|
8155
8190
|
}
|
|
8156
|
-
function
|
|
8191
|
+
function Ec(t, e, n, i) {
|
|
8157
8192
|
const r = [], s = i?.maxErrors;
|
|
8158
8193
|
try {
|
|
8159
8194
|
const o = vc(t, e, n, (a) => {
|
|
@@ -8222,7 +8257,7 @@ function Sc(t) {
|
|
|
8222
8257
|
};
|
|
8223
8258
|
}
|
|
8224
8259
|
function Xs(t) {
|
|
8225
|
-
return t.signal?.throwIfAborted(),
|
|
8260
|
+
return t.signal?.throwIfAborted(), F(() => Oc(t), (e) => {
|
|
8226
8261
|
const n = Nr(e, t.errors);
|
|
8227
8262
|
return t.subsequentPayloads.size > 0 ? {
|
|
8228
8263
|
initialResult: {
|
|
@@ -8277,20 +8312,20 @@ function Zs(t) {
|
|
|
8277
8312
|
}
|
|
8278
8313
|
})
|
|
8279
8314
|
];
|
|
8280
|
-
const h = d.variableDefinitions ?? [], v =
|
|
8315
|
+
const h = d.variableDefinitions ?? [], v = Ec(e, h, s ?? {}, {
|
|
8281
8316
|
maxErrors: 50
|
|
8282
8317
|
});
|
|
8283
8318
|
if (v.errors)
|
|
8284
8319
|
return v.errors;
|
|
8285
8320
|
c?.throwIfAborted();
|
|
8286
|
-
let w,
|
|
8321
|
+
let w, k;
|
|
8287
8322
|
if (c) {
|
|
8288
8323
|
const S = /* @__PURE__ */ new Set(), L = Ls();
|
|
8289
|
-
|
|
8324
|
+
k = L.promise;
|
|
8290
8325
|
const O = () => {
|
|
8291
8326
|
L.reject(c.reason), c.removeEventListener("abort", O);
|
|
8292
8327
|
};
|
|
8293
|
-
c.addEventListener("abort", O, { once: !0 }),
|
|
8328
|
+
c.addEventListener("abort", O, { once: !0 }), k.catch(() => {
|
|
8294
8329
|
for (const m of S)
|
|
8295
8330
|
m();
|
|
8296
8331
|
S.clear();
|
|
@@ -8305,14 +8340,14 @@ function Zs(t) {
|
|
|
8305
8340
|
contextValue: r,
|
|
8306
8341
|
operation: d,
|
|
8307
8342
|
variableValues: v.coerced,
|
|
8308
|
-
fieldResolver: a ??
|
|
8343
|
+
fieldResolver: a ?? Cr,
|
|
8309
8344
|
typeResolver: l ?? xc,
|
|
8310
|
-
subscribeFieldResolver: u ??
|
|
8345
|
+
subscribeFieldResolver: u ?? Cr,
|
|
8311
8346
|
subsequentPayloads: /* @__PURE__ */ new Set(),
|
|
8312
8347
|
errors: [],
|
|
8313
8348
|
signal: c,
|
|
8314
8349
|
onSignalAbort: w,
|
|
8315
|
-
signalPromise:
|
|
8350
|
+
signalPromise: k
|
|
8316
8351
|
};
|
|
8317
8352
|
}
|
|
8318
8353
|
function _c(t, e) {
|
|
@@ -8340,7 +8375,7 @@ function Oc(t) {
|
|
|
8340
8375
|
function Nc(t, e, n, i, r) {
|
|
8341
8376
|
return rc(r, (s, [o, a]) => {
|
|
8342
8377
|
const l = kt(i, o, e.name);
|
|
8343
|
-
return t.signal?.throwIfAborted(),
|
|
8378
|
+
return t.signal?.throwIfAborted(), F(() => eo(t, e, n, a, l), (u) => (u === void 0 || (s[o] = u), s));
|
|
8344
8379
|
}, /* @__PURE__ */ Object.create(null));
|
|
8345
8380
|
}
|
|
8346
8381
|
function Ui(t, e, n, i, r, s) {
|
|
@@ -8354,7 +8389,7 @@ function Ui(t, e, n, i, r, s) {
|
|
|
8354
8389
|
}
|
|
8355
8390
|
} catch (l) {
|
|
8356
8391
|
if (l !== t.signal?.reason && a)
|
|
8357
|
-
return
|
|
8392
|
+
return F(() => Or(o, t.signal), () => {
|
|
8358
8393
|
throw l;
|
|
8359
8394
|
}, () => {
|
|
8360
8395
|
throw l;
|
|
@@ -8372,31 +8407,31 @@ function eo(t, e, n, i, r, s) {
|
|
|
8372
8407
|
t.signal?.throwIfAborted();
|
|
8373
8408
|
const f = zs(a, i[0], t.variableValues), d = t.contextValue, h = u(n, f, d, c);
|
|
8374
8409
|
let v;
|
|
8375
|
-
return Q(h) ? v = h.then((w) =>
|
|
8410
|
+
return Q(h) ? v = h.then((w) => He(t, l, i, c, r, w, s)) : v = He(t, l, i, c, r, h, s), Q(v) ? v.then(void 0, (w) => {
|
|
8376
8411
|
if (w instanceof AggregateError) {
|
|
8377
8412
|
let L;
|
|
8378
8413
|
for (let O of w.errors) {
|
|
8379
|
-
O =
|
|
8414
|
+
O = Ae(O);
|
|
8380
8415
|
const m = ce(O, i, ie(r));
|
|
8381
8416
|
L = be(m, l, o), fe(t, r, s);
|
|
8382
8417
|
}
|
|
8383
8418
|
return L;
|
|
8384
8419
|
}
|
|
8385
|
-
w =
|
|
8386
|
-
const
|
|
8420
|
+
w = Ae(w);
|
|
8421
|
+
const k = ce(w, i, ie(r)), S = be(k, l, o);
|
|
8387
8422
|
return fe(t, r, s), S;
|
|
8388
8423
|
}) : v;
|
|
8389
8424
|
} catch (f) {
|
|
8390
8425
|
if (f instanceof AggregateError) {
|
|
8391
8426
|
let w;
|
|
8392
|
-
for (let
|
|
8393
|
-
|
|
8394
|
-
const S = ce(
|
|
8427
|
+
for (let k of f.errors) {
|
|
8428
|
+
k = Ae(k);
|
|
8429
|
+
const S = ce(k, i, ie(r));
|
|
8395
8430
|
w = be(S, l, o), fe(t, r, s);
|
|
8396
8431
|
}
|
|
8397
8432
|
return w;
|
|
8398
8433
|
}
|
|
8399
|
-
const d =
|
|
8434
|
+
const d = Ae(f), h = ce(d, i, ie(r)), v = be(h, l, o);
|
|
8400
8435
|
return fe(t, r, s), v;
|
|
8401
8436
|
}
|
|
8402
8437
|
}
|
|
@@ -8415,17 +8450,17 @@ function to(t, e, n, i, r) {
|
|
|
8415
8450
|
signal: t.signal
|
|
8416
8451
|
};
|
|
8417
8452
|
}
|
|
8418
|
-
const
|
|
8453
|
+
const Rc = "CRITICAL_ERROR";
|
|
8419
8454
|
function be(t, e, n) {
|
|
8420
|
-
if (U(e) || t.extensions?.[
|
|
8455
|
+
if (U(e) || t.extensions?.[Rc])
|
|
8421
8456
|
throw t;
|
|
8422
8457
|
return n.push(t), null;
|
|
8423
8458
|
}
|
|
8424
|
-
function
|
|
8459
|
+
function He(t, e, n, i, r, s, o) {
|
|
8425
8460
|
if (s instanceof Error)
|
|
8426
8461
|
throw s;
|
|
8427
8462
|
if (U(e)) {
|
|
8428
|
-
const a =
|
|
8463
|
+
const a = He(t, e.ofType, n, i, r, s, o);
|
|
8429
8464
|
if (a === null)
|
|
8430
8465
|
throw new Error(`Cannot return null for non-nullable field ${i.parentType.name}.${i.fieldName}.`);
|
|
8431
8466
|
return a;
|
|
@@ -8434,10 +8469,10 @@ function Qe(t, e, n, i, r, s, o) {
|
|
|
8434
8469
|
return null;
|
|
8435
8470
|
if (oe(e))
|
|
8436
8471
|
return kc(t, e, n, i, r, s, o);
|
|
8437
|
-
if (
|
|
8438
|
-
return
|
|
8472
|
+
if (Be(e))
|
|
8473
|
+
return Cc(e, s);
|
|
8439
8474
|
if (Pe(e))
|
|
8440
|
-
return
|
|
8475
|
+
return Fc(t, e, n, i, r, s, o);
|
|
8441
8476
|
if (K(e))
|
|
8442
8477
|
return Ii(t, e, n, i, r, s, o);
|
|
8443
8478
|
console.assert(!1, "Cannot complete value of unexpected output type: " + pe(e));
|
|
@@ -8452,7 +8487,7 @@ function no(t, e, n) {
|
|
|
8452
8487
|
label: typeof i.label == "string" ? i.label : void 0
|
|
8453
8488
|
};
|
|
8454
8489
|
}
|
|
8455
|
-
async function
|
|
8490
|
+
async function Ac(t, e, n, i, r, s, o) {
|
|
8456
8491
|
t.signal?.throwIfAborted(), s.return && t.onSignalAbort?.(() => {
|
|
8457
8492
|
s.return?.();
|
|
8458
8493
|
});
|
|
@@ -8471,8 +8506,8 @@ async function Rc(t, e, n, i, r, s, o) {
|
|
|
8471
8506
|
if (h = await s.next(), h.done)
|
|
8472
8507
|
break;
|
|
8473
8508
|
} catch (v) {
|
|
8474
|
-
const w =
|
|
8475
|
-
c.push(be(
|
|
8509
|
+
const w = Ae(v), k = ce(w, n, ie(d));
|
|
8510
|
+
c.push(be(k, e, a));
|
|
8476
8511
|
break;
|
|
8477
8512
|
}
|
|
8478
8513
|
io(h.value, c, a, t, e, n, i, d, o) && (u = !0), f += 1;
|
|
@@ -8483,7 +8518,7 @@ function kc(t, e, n, i, r, s, o) {
|
|
|
8483
8518
|
const a = e.ofType, l = o?.errors ?? t.errors;
|
|
8484
8519
|
if (Qn(s)) {
|
|
8485
8520
|
const v = s[Symbol.asyncIterator]();
|
|
8486
|
-
return
|
|
8521
|
+
return Ac(t, a, n, i, r, v, o);
|
|
8487
8522
|
}
|
|
8488
8523
|
if (!ic(s))
|
|
8489
8524
|
throw D(`Expected Iterable, but did not find one for field "${i.parentType.name}.${i.fieldName}".`);
|
|
@@ -8504,20 +8539,20 @@ function kc(t, e, n, i, r, s, o) {
|
|
|
8504
8539
|
function io(t, e, n, i, r, s, o, a, l) {
|
|
8505
8540
|
try {
|
|
8506
8541
|
let u;
|
|
8507
|
-
if (Q(t) ? u = t.then((c) =>
|
|
8542
|
+
if (Q(t) ? u = t.then((c) => He(i, r, s, o, a, c, l)) : u = He(i, r, s, o, a, t, l), Q(u))
|
|
8508
8543
|
return e.push(u.then(void 0, (c) => {
|
|
8509
|
-
c =
|
|
8544
|
+
c = Ae(c);
|
|
8510
8545
|
const f = ce(c, s, ie(a)), d = be(f, r, n);
|
|
8511
8546
|
return fe(i, a, l), d;
|
|
8512
8547
|
})), !0;
|
|
8513
8548
|
e.push(u);
|
|
8514
8549
|
} catch (u) {
|
|
8515
|
-
const c =
|
|
8550
|
+
const c = Ae(u), f = ce(c, s, ie(a)), d = be(f, r, n);
|
|
8516
8551
|
fe(i, a, l), e.push(d);
|
|
8517
8552
|
}
|
|
8518
8553
|
return !1;
|
|
8519
8554
|
}
|
|
8520
|
-
function
|
|
8555
|
+
function Cc(t, e) {
|
|
8521
8556
|
let n;
|
|
8522
8557
|
try {
|
|
8523
8558
|
n = t.serialize(e);
|
|
@@ -8528,11 +8563,11 @@ function Fc(t, e) {
|
|
|
8528
8563
|
throw new Error(`Expected \`${pe(t)}.serialize(${pe(e)})\` to return non-nullable value, returned: ${pe(n)}`);
|
|
8529
8564
|
return n;
|
|
8530
8565
|
}
|
|
8531
|
-
function
|
|
8566
|
+
function Fc(t, e, n, i, r, s, o) {
|
|
8532
8567
|
const a = e.resolveType ?? t.typeResolver, l = t.contextValue, u = a(s, l, i, e);
|
|
8533
|
-
return Q(u) ? u.then((c) => Ii(t,
|
|
8568
|
+
return Q(u) ? u.then((c) => Ii(t, Rr(c, t, e, n, i, s), n, i, r, s, o)) : Ii(t, Rr(u, t, e, n, i, s), n, i, r, s, o);
|
|
8534
8569
|
}
|
|
8535
|
-
function
|
|
8570
|
+
function Rr(t, e, n, i, r, s) {
|
|
8536
8571
|
if (t == null)
|
|
8537
8572
|
throw D(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${r.parentType.name}.${r.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, { nodes: i });
|
|
8538
8573
|
if (K(t)) {
|
|
@@ -8557,15 +8592,15 @@ function Ii(t, e, n, i, r, s, o) {
|
|
|
8557
8592
|
if (Q(a))
|
|
8558
8593
|
return a.then((l) => {
|
|
8559
8594
|
if (!l)
|
|
8560
|
-
throw
|
|
8595
|
+
throw Ar(e, s, n);
|
|
8561
8596
|
return kr(t, e, n, r, s, o);
|
|
8562
8597
|
});
|
|
8563
8598
|
if (!a)
|
|
8564
|
-
throw
|
|
8599
|
+
throw Ar(e, s, n);
|
|
8565
8600
|
}
|
|
8566
8601
|
return kr(t, e, n, r, s, o);
|
|
8567
8602
|
}
|
|
8568
|
-
function
|
|
8603
|
+
function Ar(t, e, n) {
|
|
8569
8604
|
return D(`Expected value of type "${t.name}" but got: ${pe(e)}.`, {
|
|
8570
8605
|
nodes: n
|
|
8571
8606
|
});
|
|
@@ -8598,7 +8633,7 @@ const xc = function(t, e, n, i) {
|
|
|
8598
8633
|
if (o[a])
|
|
8599
8634
|
return r[a].name;
|
|
8600
8635
|
});
|
|
8601
|
-
},
|
|
8636
|
+
}, Cr = function(t, e, n, i) {
|
|
8602
8637
|
if (Ks(t) || typeof t == "function") {
|
|
8603
8638
|
const r = t[i.fieldName];
|
|
8604
8639
|
return typeof r == "function" ? t[i.fieldName](e, n, i) : r;
|
|
@@ -8616,7 +8651,7 @@ function Dc(t) {
|
|
|
8616
8651
|
};
|
|
8617
8652
|
}
|
|
8618
8653
|
const n = $c(e);
|
|
8619
|
-
return Q(n) ? n.then((i) =>
|
|
8654
|
+
return Q(n) ? n.then((i) => Fr(e, i)) : Fr(e, n);
|
|
8620
8655
|
}
|
|
8621
8656
|
function Lc(t) {
|
|
8622
8657
|
return t?.initialResult;
|
|
@@ -8648,8 +8683,8 @@ function ro(t) {
|
|
|
8648
8683
|
async function* Pc(t) {
|
|
8649
8684
|
"initialResult" in t ? yield* ro(t) : yield t;
|
|
8650
8685
|
}
|
|
8651
|
-
function
|
|
8652
|
-
return Qn(e) ?
|
|
8686
|
+
function Fr(t, e) {
|
|
8687
|
+
return Qn(e) ? Tc(_n(e, (n) => F(() => Xs(_c(t, n)), Pc), (n) => {
|
|
8653
8688
|
throw n instanceof AggregateError ? new AggregateError(n.errors.map((i) => xr(i, t.operation)), n.message) : xr(n, t.operation);
|
|
8654
8689
|
})) : e;
|
|
8655
8690
|
}
|
|
@@ -8727,13 +8762,13 @@ function jc(t, e, n, i, r, s, o, a, l) {
|
|
|
8727
8762
|
let c;
|
|
8728
8763
|
try {
|
|
8729
8764
|
try {
|
|
8730
|
-
Q(n) ? c = n.then((d) =>
|
|
8731
|
-
d =
|
|
8765
|
+
Q(n) ? c = n.then((d) => He(i, o, r, s, e, d, u)) : c = He(i, o, r, s, e, n, u), Q(c) && (c = c.then(void 0, (d) => {
|
|
8766
|
+
d = Ae(d);
|
|
8732
8767
|
const h = ce(d, r, ie(e)), v = be(h, o, u.errors);
|
|
8733
8768
|
return fe(i, e, u), v;
|
|
8734
8769
|
}));
|
|
8735
8770
|
} catch (d) {
|
|
8736
|
-
const h =
|
|
8771
|
+
const h = Ae(d), v = ce(h, r, ie(e));
|
|
8737
8772
|
c = be(v, o, u.errors), fe(i, e, u);
|
|
8738
8773
|
}
|
|
8739
8774
|
} catch (d) {
|
|
@@ -8750,12 +8785,12 @@ async function Uc(t, e, n, i, r, s, o) {
|
|
|
8750
8785
|
return s.setIsCompletedIterator(), { done: c, value: void 0 };
|
|
8751
8786
|
a = u;
|
|
8752
8787
|
} catch (u) {
|
|
8753
|
-
const c =
|
|
8788
|
+
const c = Ae(u), f = ce(c, n, ie(o));
|
|
8754
8789
|
return { done: !0, value: be(f, r, s.errors) };
|
|
8755
8790
|
}
|
|
8756
8791
|
let l;
|
|
8757
8792
|
try {
|
|
8758
|
-
return l =
|
|
8793
|
+
return l = He(e, r, n, i, o, a, s), Q(l) && (l = l.then(void 0, (u) => {
|
|
8759
8794
|
const c = ce(u, n, ie(o)), f = be(c, r, s.errors);
|
|
8760
8795
|
return fe(e, o, s), f;
|
|
8761
8796
|
})), { done: !1, value: l };
|
|
@@ -8783,8 +8818,8 @@ async function Vc(t, e, n, i, r, s, o, a, l) {
|
|
|
8783
8818
|
return;
|
|
8784
8819
|
}
|
|
8785
8820
|
const { done: v, value: w } = h;
|
|
8786
|
-
let
|
|
8787
|
-
if (Q(w) ?
|
|
8821
|
+
let k;
|
|
8822
|
+
if (Q(w) ? k = w.then((S) => [S], (S) => (d.errors.push(S), fe(n, o, d), null)) : k = [w], d.addItems(k), v)
|
|
8788
8823
|
break;
|
|
8789
8824
|
c = d, u++;
|
|
8790
8825
|
}
|
|
@@ -8924,13 +8959,13 @@ function Vi(t) {
|
|
|
8924
8959
|
}
|
|
8925
8960
|
function ao(t, e, n) {
|
|
8926
8961
|
const i = n.name.value;
|
|
8927
|
-
return i ===
|
|
8962
|
+
return i === Tn.name && t.getQueryType() === e ? Tn : i === En.name && t.getQueryType() === e ? En : i === vn.name ? vn : e.getFields()[i];
|
|
8928
8963
|
}
|
|
8929
8964
|
function Lr(t) {
|
|
8930
8965
|
const e = Pi(t.document, t.operationName);
|
|
8931
8966
|
if (e == null)
|
|
8932
8967
|
throw new Error("Must provide an operation.");
|
|
8933
|
-
return e.operation === "subscription" ? Dc(t) :
|
|
8968
|
+
return e.operation === "subscription" ? Dc(t) : F(() => Sc(t), (n) => Lc(n) ? ro(n) : n);
|
|
8934
8969
|
}
|
|
8935
8970
|
var H = {}, Pr;
|
|
8936
8971
|
function Qc() {
|
|
@@ -9066,7 +9101,7 @@ function tf(t, e) {
|
|
|
9066
9101
|
});
|
|
9067
9102
|
const r = e[Symbol.asyncIterator](), s = () => r.next().then(({ done: o, value: a }) => {
|
|
9068
9103
|
if (!(n || o))
|
|
9069
|
-
return
|
|
9104
|
+
return F(() => Ht(a, t), () => n ? et(t) : s());
|
|
9070
9105
|
});
|
|
9071
9106
|
return s();
|
|
9072
9107
|
}
|
|
@@ -9116,7 +9151,7 @@ function rf(t, e, n, i) {
|
|
|
9116
9151
|
e.writeHead(t.status, t.statusText);
|
|
9117
9152
|
}
|
|
9118
9153
|
if (t.bodyType === "String")
|
|
9119
|
-
return
|
|
9154
|
+
return F(
|
|
9120
9155
|
// @ts-expect-error - bodyInit is a private property
|
|
9121
9156
|
() => Ht(t.bodyInit, e),
|
|
9122
9157
|
() => et(e)
|
|
@@ -9126,7 +9161,7 @@ function rf(t, e, n, i) {
|
|
|
9126
9161
|
t._buffer
|
|
9127
9162
|
);
|
|
9128
9163
|
if (r)
|
|
9129
|
-
return
|
|
9164
|
+
return F(() => Ht(r, e), () => et(e));
|
|
9130
9165
|
const s = t.body;
|
|
9131
9166
|
if (s == null) {
|
|
9132
9167
|
et(e);
|
|
@@ -9136,7 +9171,7 @@ function rf(t, e, n, i) {
|
|
|
9136
9171
|
// @ts-expect-error - Uint8Array is a valid body type
|
|
9137
9172
|
s[Symbol.toStringTag] === "Uint8Array"
|
|
9138
9173
|
)
|
|
9139
|
-
return
|
|
9174
|
+
return F(() => Ht(s, e), () => et(e));
|
|
9140
9175
|
if (ef(n), co(s)) {
|
|
9141
9176
|
e.once("close", () => {
|
|
9142
9177
|
s.destroy();
|
|
@@ -9156,7 +9191,7 @@ function sf(t, e, n) {
|
|
|
9156
9191
|
i.cancel(s);
|
|
9157
9192
|
});
|
|
9158
9193
|
function r() {
|
|
9159
|
-
return i.read().then(({ done: s, value: o }) => s ? et(e) :
|
|
9194
|
+
return i.read().then(({ done: s, value: o }) => s ? et(e) : F(() => Ht(o, e), r));
|
|
9160
9195
|
}
|
|
9161
9196
|
return r();
|
|
9162
9197
|
}
|
|
@@ -9344,7 +9379,7 @@ function df({ req: t, res: e, fetchAPI: n, controller: i }) {
|
|
|
9344
9379
|
let v = `http://localhost${t.getUrl()}`;
|
|
9345
9380
|
const w = t.getQuery();
|
|
9346
9381
|
w && (v += `?${w}`);
|
|
9347
|
-
let
|
|
9382
|
+
let k;
|
|
9348
9383
|
function S() {
|
|
9349
9384
|
return d ? u ? O() : d() : null;
|
|
9350
9385
|
}
|
|
@@ -9360,7 +9395,7 @@ function df({ req: t, res: e, fetchAPI: n, controller: i }) {
|
|
|
9360
9395
|
duplex: s
|
|
9361
9396
|
});
|
|
9362
9397
|
function O() {
|
|
9363
|
-
return
|
|
9398
|
+
return k || (k = o.length === 1 ? o[0] : Buffer.concat(o)), k;
|
|
9364
9399
|
}
|
|
9365
9400
|
function m() {
|
|
9366
9401
|
return u ? B(O()) : new Promise((g, b) => {
|
|
@@ -9482,32 +9517,32 @@ function yf(t, e) {
|
|
|
9482
9517
|
function d(y) {
|
|
9483
9518
|
Q(y) && (f(), u.add(y), y.then(() => {
|
|
9484
9519
|
u.delete(y);
|
|
9485
|
-
}, (
|
|
9486
|
-
console.error(`Unexpected error while waiting: ${
|
|
9520
|
+
}, (T) => {
|
|
9521
|
+
console.error(`Unexpected error while waiting: ${T.message || T}`), u.delete(y);
|
|
9487
9522
|
}));
|
|
9488
9523
|
}
|
|
9489
9524
|
if (e?.plugins != null)
|
|
9490
9525
|
for (const y of e.plugins) {
|
|
9491
9526
|
y.instrumentation && (l = l ? Mi(l, y.instrumentation) : y.instrumentation), y.onRequest && o.push(y.onRequest), y.onResponse && a.push(y.onResponse);
|
|
9492
|
-
const
|
|
9493
|
-
|
|
9494
|
-
const
|
|
9495
|
-
|
|
9527
|
+
const T = y[le.dispose];
|
|
9528
|
+
T && f().defer(T);
|
|
9529
|
+
const E = y[le.asyncDispose];
|
|
9530
|
+
E && f().defer(E), y.onDispose && f().defer(y.onDispose);
|
|
9496
9531
|
}
|
|
9497
|
-
let h = o.length > 0 || a.length > 0 ? function(
|
|
9532
|
+
let h = o.length > 0 || a.length > 0 ? function(T, E) {
|
|
9498
9533
|
let I = s, N;
|
|
9499
9534
|
if (o.length === 0)
|
|
9500
9535
|
return j();
|
|
9501
|
-
let P =
|
|
9536
|
+
let P = T.parsedUrl || new Proxy(gf, {
|
|
9502
9537
|
get(q, J, ee) {
|
|
9503
|
-
return P = new i.URL(
|
|
9538
|
+
return P = new i.URL(T.url, "http://localhost"), Reflect.get(P, J, P);
|
|
9504
9539
|
}
|
|
9505
9540
|
});
|
|
9506
9541
|
function $(q) {
|
|
9507
|
-
return a.length === 0 ? q :
|
|
9508
|
-
request:
|
|
9542
|
+
return a.length === 0 ? q : F(() => ue(a, (J) => J({
|
|
9543
|
+
request: T,
|
|
9509
9544
|
response: q,
|
|
9510
|
-
serverContext:
|
|
9545
|
+
serverContext: E,
|
|
9511
9546
|
setResponse(ee) {
|
|
9512
9547
|
q = ee;
|
|
9513
9548
|
},
|
|
@@ -9515,14 +9550,14 @@ function yf(t, e) {
|
|
|
9515
9550
|
})), () => q);
|
|
9516
9551
|
}
|
|
9517
9552
|
function j() {
|
|
9518
|
-
return N ? $(N) :
|
|
9553
|
+
return N ? $(N) : F(() => I(T, E), $);
|
|
9519
9554
|
}
|
|
9520
|
-
return
|
|
9521
|
-
request:
|
|
9555
|
+
return F(() => ue(o, (q, J) => q({
|
|
9556
|
+
request: T,
|
|
9522
9557
|
setRequest(ee) {
|
|
9523
|
-
|
|
9558
|
+
T = ee;
|
|
9524
9559
|
},
|
|
9525
|
-
serverContext:
|
|
9560
|
+
serverContext: E,
|
|
9526
9561
|
fetchAPI: i,
|
|
9527
9562
|
url: P,
|
|
9528
9563
|
requestHandler: I,
|
|
@@ -9536,34 +9571,34 @@ function yf(t, e) {
|
|
|
9536
9571
|
} : s;
|
|
9537
9572
|
if (l?.request) {
|
|
9538
9573
|
const y = h;
|
|
9539
|
-
h = (
|
|
9574
|
+
h = (T, E) => On({ request: T }).asyncFn(l.request, y)(T, E);
|
|
9540
9575
|
}
|
|
9541
|
-
function v(y, ...
|
|
9542
|
-
const
|
|
9543
|
-
|
|
9576
|
+
function v(y, ...T) {
|
|
9577
|
+
const E = T.length > 1 ? gt(...T) : T[0] || {};
|
|
9578
|
+
E.waitUntil || (E.waitUntil = d);
|
|
9544
9579
|
const I = $r(y, i, void 0, r);
|
|
9545
|
-
return h(I,
|
|
9580
|
+
return h(I, E);
|
|
9546
9581
|
}
|
|
9547
|
-
function w(y,
|
|
9548
|
-
const I =
|
|
9582
|
+
function w(y, T, ...E) {
|
|
9583
|
+
const I = T.raw || T, N = E.length > 1 ? gt(...E) : E[0] || {};
|
|
9549
9584
|
N.waitUntil || (N.waitUntil = d);
|
|
9550
9585
|
const P = $r(y, i, I, r);
|
|
9551
9586
|
return h(P, N);
|
|
9552
9587
|
}
|
|
9553
|
-
function
|
|
9588
|
+
function k(y, T, ...E) {
|
|
9554
9589
|
const I = {
|
|
9555
9590
|
req: y,
|
|
9556
|
-
res:
|
|
9591
|
+
res: T,
|
|
9557
9592
|
waitUntil: d
|
|
9558
9593
|
};
|
|
9559
|
-
return $i(B().then(() => w(y,
|
|
9594
|
+
return $i(B().then(() => w(y, T, I, ...E)).catch((N) => jr(N, i.Response)).then((N) => rf(N, T, y, n)).catch((N) => console.error(`Unexpected error while handling request: ${N.message || N}`)));
|
|
9560
9595
|
}
|
|
9561
|
-
function S(y,
|
|
9596
|
+
function S(y, T, ...E) {
|
|
9562
9597
|
const I = {
|
|
9563
9598
|
res: y,
|
|
9564
|
-
req:
|
|
9599
|
+
req: T,
|
|
9565
9600
|
waitUntil: d
|
|
9566
|
-
}, P =
|
|
9601
|
+
}, P = E.filter((Y) => Y != null).length > 0 ? gt(I, ...E) : I, $ = r ? fo() : new AbortController(), j = y.end.bind(y);
|
|
9567
9602
|
let q = !1;
|
|
9568
9603
|
y.end = function(Y) {
|
|
9569
9604
|
return q = !0, j(Y);
|
|
@@ -9573,58 +9608,58 @@ function yf(t, e) {
|
|
|
9573
9608
|
$.signal.addEventListener("abort", Y, { once: !0 });
|
|
9574
9609
|
};
|
|
9575
9610
|
const ee = df({
|
|
9576
|
-
req:
|
|
9611
|
+
req: T,
|
|
9577
9612
|
res: y,
|
|
9578
9613
|
fetchAPI: i,
|
|
9579
9614
|
controller: $
|
|
9580
9615
|
});
|
|
9581
|
-
return
|
|
9616
|
+
return F(() => F(() => h(ee, P), (Y) => Y, (Y) => jr(Y, i.Response)), (Y) => {
|
|
9582
9617
|
if (!$.signal.aborted && !q)
|
|
9583
|
-
return
|
|
9584
|
-
console.error(`Unexpected error while handling request: ${
|
|
9618
|
+
return F(() => hf(y, Y, $, i), (Te) => Te, (Te) => {
|
|
9619
|
+
console.error(`Unexpected error while handling request: ${Te.message || Te}`);
|
|
9585
9620
|
});
|
|
9586
9621
|
});
|
|
9587
9622
|
}
|
|
9588
|
-
function L(y, ...
|
|
9623
|
+
function L(y, ...T) {
|
|
9589
9624
|
if (!y.respondWith || !y.request)
|
|
9590
9625
|
throw new TypeError(`Expected FetchEvent, got ${y}`);
|
|
9591
|
-
const
|
|
9626
|
+
const E = T.filter((P) => P != null), I = E.length > 0 ? gt({}, y, ...E) : Ur(y), N = h(y.request, I);
|
|
9592
9627
|
y.respondWith(N);
|
|
9593
9628
|
}
|
|
9594
|
-
function O(y, ...
|
|
9595
|
-
const
|
|
9629
|
+
function O(y, ...T) {
|
|
9630
|
+
const E = T.filter((N) => N != null), I = E.length > 1 ? gt({}, ...E) : Ur(E[0], E[0] == null || E[0].waitUntil == null ? d : void 0);
|
|
9596
9631
|
return h(y, I);
|
|
9597
9632
|
}
|
|
9598
|
-
const m = (y, ...
|
|
9633
|
+
const m = (y, ...T) => {
|
|
9599
9634
|
if (typeof y == "string" || "href" in y) {
|
|
9600
|
-
const [I, ...N] =
|
|
9635
|
+
const [I, ...N] = T;
|
|
9601
9636
|
if (of(I)) {
|
|
9602
9637
|
const $ = new i.Request(y, I), j = O($, ...N), q = I.signal;
|
|
9603
9638
|
return q ? Vr(j, q) : j;
|
|
9604
9639
|
}
|
|
9605
9640
|
const P = new i.Request(y);
|
|
9606
|
-
return O(P, ...
|
|
9641
|
+
return O(P, ...T);
|
|
9607
9642
|
}
|
|
9608
|
-
const
|
|
9609
|
-
return Vr(
|
|
9610
|
-
}, g = (y, ...
|
|
9611
|
-
const [
|
|
9643
|
+
const E = O(y, ...T);
|
|
9644
|
+
return Vr(E, y.signal);
|
|
9645
|
+
}, g = (y, ...T) => {
|
|
9646
|
+
const [E, ...I] = T;
|
|
9612
9647
|
if (Yc(y)) {
|
|
9613
|
-
if (!Mr(
|
|
9614
|
-
throw new TypeError(`Expected ServerResponse, got ${
|
|
9615
|
-
return
|
|
9648
|
+
if (!Mr(E))
|
|
9649
|
+
throw new TypeError(`Expected ServerResponse, got ${E}`);
|
|
9650
|
+
return k(y, E, ...I);
|
|
9616
9651
|
}
|
|
9617
9652
|
if (ff(y))
|
|
9618
|
-
return S(y,
|
|
9619
|
-
if (Mr(
|
|
9653
|
+
return S(y, E, ...I);
|
|
9654
|
+
if (Mr(E))
|
|
9620
9655
|
throw new TypeError("Got Node response without Node request");
|
|
9621
|
-
return mf(y) ? Zc(y) ? L(y, ...
|
|
9656
|
+
return mf(y) ? Zc(y) ? L(y, ...T) : O(y.request, y, ...T) : m(y, ...T);
|
|
9622
9657
|
}, b = {
|
|
9623
9658
|
handleRequest: O,
|
|
9624
9659
|
fetch: m,
|
|
9625
9660
|
handleNodeRequest: v,
|
|
9626
9661
|
handleNodeRequestAndResponse: w,
|
|
9627
|
-
requestListener:
|
|
9662
|
+
requestListener: k,
|
|
9628
9663
|
handleEvent: L,
|
|
9629
9664
|
handleUWS: S,
|
|
9630
9665
|
handle: g,
|
|
@@ -9640,30 +9675,30 @@ function yf(t, e) {
|
|
|
9640
9675
|
waitUntil: d
|
|
9641
9676
|
}, A = new Proxy(g, {
|
|
9642
9677
|
// It should have all the attributes of the handler function and the server instance
|
|
9643
|
-
has: (y,
|
|
9644
|
-
get: (y,
|
|
9645
|
-
if (globalThis.Deno ||
|
|
9646
|
-
const N = Reflect.get(b,
|
|
9678
|
+
has: (y, T) => T in b || T in g || t && T in t,
|
|
9679
|
+
get: (y, T) => {
|
|
9680
|
+
if (globalThis.Deno || T === Symbol.asyncDispose || T === Symbol.dispose) {
|
|
9681
|
+
const N = Reflect.get(b, T, b);
|
|
9647
9682
|
if (N)
|
|
9648
9683
|
return N;
|
|
9649
9684
|
}
|
|
9650
|
-
const
|
|
9651
|
-
if (
|
|
9652
|
-
return
|
|
9653
|
-
const I = g[
|
|
9685
|
+
const E = b[T];
|
|
9686
|
+
if (E)
|
|
9687
|
+
return E.bind ? E.bind(b) : E;
|
|
9688
|
+
const I = g[T];
|
|
9654
9689
|
if (I)
|
|
9655
9690
|
return I.bind ? I.bind(g) : I;
|
|
9656
9691
|
if (t) {
|
|
9657
|
-
const N = t[
|
|
9692
|
+
const N = t[T];
|
|
9658
9693
|
if (N)
|
|
9659
9694
|
return N.bind ? function(...P) {
|
|
9660
|
-
const $ = t[
|
|
9695
|
+
const $ = t[T](...P);
|
|
9661
9696
|
return $ === t ? A : $;
|
|
9662
9697
|
} : N;
|
|
9663
9698
|
}
|
|
9664
9699
|
},
|
|
9665
|
-
apply(y,
|
|
9666
|
-
return g(...
|
|
9700
|
+
apply(y, T, E) {
|
|
9701
|
+
return g(...E);
|
|
9667
9702
|
}
|
|
9668
9703
|
});
|
|
9669
9704
|
return A;
|
|
@@ -9687,10 +9722,10 @@ function bf(t, e) {
|
|
|
9687
9722
|
}
|
|
9688
9723
|
return e.credentials != null ? e.credentials === !0 && (i["Access-Control-Allow-Credentials"] = "true") : i["Access-Control-Allow-Origin"] !== "*" && (i["Access-Control-Allow-Credentials"] = "true"), e.exposedHeaders && (i["Access-Control-Expose-Headers"] = e.exposedHeaders.join(", ")), e.maxAge && (i["Access-Control-Max-Age"] = e.maxAge.toString()), i;
|
|
9689
9724
|
}
|
|
9690
|
-
function
|
|
9691
|
-
return
|
|
9725
|
+
function Tf(t, e, n) {
|
|
9726
|
+
return F(() => e(t, n), (i) => bf(t, i));
|
|
9692
9727
|
}
|
|
9693
|
-
function
|
|
9728
|
+
function Ef(t) {
|
|
9694
9729
|
let e = () => ({});
|
|
9695
9730
|
if (t != null)
|
|
9696
9731
|
if (typeof t == "function")
|
|
@@ -9717,7 +9752,7 @@ function Tf(t) {
|
|
|
9717
9752
|
}
|
|
9718
9753
|
},
|
|
9719
9754
|
onResponse({ request: n, serverContext: i, response: r }) {
|
|
9720
|
-
return
|
|
9755
|
+
return F(() => Tf(n, e, i), (s) => {
|
|
9721
9756
|
if (s != null)
|
|
9722
9757
|
for (const o in s)
|
|
9723
9758
|
r.headers.set(o, s[o]);
|
|
@@ -9834,27 +9869,27 @@ function Jt(t, e) {
|
|
|
9834
9869
|
function Nf(t) {
|
|
9835
9870
|
return t.method === "GET";
|
|
9836
9871
|
}
|
|
9837
|
-
function
|
|
9872
|
+
function Rf(t) {
|
|
9838
9873
|
const e = t.url.substring(t.url.indexOf("?") + 1), n = new Hn.URLSearchParams(e);
|
|
9839
9874
|
return mo(n);
|
|
9840
9875
|
}
|
|
9841
|
-
function
|
|
9876
|
+
function Af(t) {
|
|
9842
9877
|
return t.method === "POST" && Jt(t, "application/x-www-form-urlencoded");
|
|
9843
9878
|
}
|
|
9844
9879
|
function kf(t) {
|
|
9845
9880
|
return t.text().then(Of);
|
|
9846
9881
|
}
|
|
9847
|
-
function
|
|
9882
|
+
function Cf(t) {
|
|
9848
9883
|
return t.method === "POST" && Jt(t, "application/graphql");
|
|
9849
9884
|
}
|
|
9850
|
-
function
|
|
9885
|
+
function Ff(t) {
|
|
9851
9886
|
return t.text().then((e) => ({ query: e }));
|
|
9852
9887
|
}
|
|
9853
9888
|
function xf(t) {
|
|
9854
9889
|
return t.method === "POST" && (Jt(t, "application/json") || Jt(t, "application/graphql+json"));
|
|
9855
9890
|
}
|
|
9856
9891
|
function Df(t) {
|
|
9857
|
-
return
|
|
9892
|
+
return F(() => t.json(), (e) => {
|
|
9858
9893
|
if (e == null)
|
|
9859
9894
|
throw D(`POST body is expected to be object but received ${e}`, {
|
|
9860
9895
|
extensions: {
|
|
@@ -9902,7 +9937,7 @@ function Pf(t) {
|
|
|
9902
9937
|
return t.method === "POST" && Jt(t, "multipart/form-data");
|
|
9903
9938
|
}
|
|
9904
9939
|
function $f(t) {
|
|
9905
|
-
return
|
|
9940
|
+
return F(() => t.formData(), (e) => {
|
|
9906
9941
|
const n = e.get("operations");
|
|
9907
9942
|
if (!n)
|
|
9908
9943
|
throw D('Missing multipart form field "operations"');
|
|
@@ -10175,8 +10210,8 @@ function zf({ id: t = Date.now().toString(), logger: e = console, endpoint: n =
|
|
|
10175
10210
|
const dt = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, go = /* @__PURE__ */ new Set(), _i = typeof process == "object" && process ? process : {}, yo = (t, e, n, i) => {
|
|
10176
10211
|
typeof _i.emitWarning == "function" ? _i.emitWarning(t, e, n, i) : console.error(`[${n}] ${e}: ${t}`);
|
|
10177
10212
|
};
|
|
10178
|
-
let
|
|
10179
|
-
if (typeof
|
|
10213
|
+
let Fn = globalThis.AbortController, Br = globalThis.AbortSignal;
|
|
10214
|
+
if (typeof Fn > "u") {
|
|
10180
10215
|
Br = class {
|
|
10181
10216
|
onabort;
|
|
10182
10217
|
_onabort = [];
|
|
@@ -10185,7 +10220,7 @@ if (typeof Cn > "u") {
|
|
|
10185
10220
|
addEventListener(i, r) {
|
|
10186
10221
|
this._onabort.push(r);
|
|
10187
10222
|
}
|
|
10188
|
-
},
|
|
10223
|
+
}, Fn = class {
|
|
10189
10224
|
constructor() {
|
|
10190
10225
|
e();
|
|
10191
10226
|
}
|
|
@@ -10204,7 +10239,7 @@ if (typeof Cn > "u") {
|
|
|
10204
10239
|
t && (t = !1, yo("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", e));
|
|
10205
10240
|
};
|
|
10206
10241
|
}
|
|
10207
|
-
const Jf = (t) => !go.has(t),
|
|
10242
|
+
const Jf = (t) => !go.has(t), je = (t) => t && t === Math.floor(t) && t > 0 && isFinite(t), bo = (t) => je(t) ? t <= Math.pow(2, 8) ? Uint8Array : t <= Math.pow(2, 16) ? Uint16Array : t <= Math.pow(2, 32) ? Uint32Array : t <= Number.MAX_SAFE_INTEGER ? yn : null : null;
|
|
10208
10243
|
class yn extends Array {
|
|
10209
10244
|
constructor(e) {
|
|
10210
10245
|
super(e), this.fill(0);
|
|
@@ -10242,7 +10277,7 @@ class Gi {
|
|
|
10242
10277
|
#m;
|
|
10243
10278
|
#g;
|
|
10244
10279
|
#k;
|
|
10245
|
-
#
|
|
10280
|
+
#C;
|
|
10246
10281
|
/**
|
|
10247
10282
|
* {@link LRUCache.OptionsBase.ttl}
|
|
10248
10283
|
*/
|
|
@@ -10315,8 +10350,8 @@ class Gi {
|
|
|
10315
10350
|
#s;
|
|
10316
10351
|
#b;
|
|
10317
10352
|
#o;
|
|
10318
|
-
#E;
|
|
10319
10353
|
#T;
|
|
10354
|
+
#E;
|
|
10320
10355
|
#p;
|
|
10321
10356
|
#v;
|
|
10322
10357
|
#O;
|
|
@@ -10333,9 +10368,9 @@ class Gi {
|
|
|
10333
10368
|
static unsafeExposeInternals(e) {
|
|
10334
10369
|
return {
|
|
10335
10370
|
// properties
|
|
10336
|
-
starts: e.#
|
|
10371
|
+
starts: e.#E,
|
|
10337
10372
|
ttls: e.#p,
|
|
10338
|
-
sizes: e.#
|
|
10373
|
+
sizes: e.#T,
|
|
10339
10374
|
keyMap: e.#i,
|
|
10340
10375
|
keyList: e.#n,
|
|
10341
10376
|
valList: e.#e,
|
|
@@ -10351,7 +10386,7 @@ class Gi {
|
|
|
10351
10386
|
// methods
|
|
10352
10387
|
isBackgroundFetch: (n) => e.#t(n),
|
|
10353
10388
|
backgroundFetch: (n, i, r, s) => e.#D(n, i, r, s),
|
|
10354
|
-
moveToTail: (n) => e.#
|
|
10389
|
+
moveToTail: (n) => e.#A(n),
|
|
10355
10390
|
indexes: (n) => e.#w(n),
|
|
10356
10391
|
rindexes: (n) => e.#S(n),
|
|
10357
10392
|
isStale: (n) => e.#h(n)
|
|
@@ -10389,7 +10424,7 @@ class Gi {
|
|
|
10389
10424
|
return this.#k;
|
|
10390
10425
|
}
|
|
10391
10426
|
get memoMethod() {
|
|
10392
|
-
return this.#
|
|
10427
|
+
return this.#C;
|
|
10393
10428
|
}
|
|
10394
10429
|
/**
|
|
10395
10430
|
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
|
@@ -10404,8 +10439,8 @@ class Gi {
|
|
|
10404
10439
|
return this.#g;
|
|
10405
10440
|
}
|
|
10406
10441
|
constructor(e) {
|
|
10407
|
-
const { max: n = 0, ttl: i, ttlResolution: r = 1, ttlAutopurge: s, updateAgeOnGet: o, updateAgeOnHas: a, allowStale: l, dispose: u, disposeAfter: c, noDisposeOnSet: f, noUpdateTTL: d, maxSize: h = 0, maxEntrySize: v = 0, sizeCalculation: w, fetchMethod:
|
|
10408
|
-
if (n !== 0 && !
|
|
10442
|
+
const { max: n = 0, ttl: i, ttlResolution: r = 1, ttlAutopurge: s, updateAgeOnGet: o, updateAgeOnHas: a, allowStale: l, dispose: u, disposeAfter: c, noDisposeOnSet: f, noUpdateTTL: d, maxSize: h = 0, maxEntrySize: v = 0, sizeCalculation: w, fetchMethod: k, memoMethod: S, noDeleteOnFetchRejection: L, noDeleteOnStaleGet: O, allowStaleOnFetchRejection: m, allowStaleOnFetchAbort: g, ignoreFetchAbort: b } = e;
|
|
10443
|
+
if (n !== 0 && !je(n))
|
|
10409
10444
|
throw new TypeError("max option must be a nonnegative integer");
|
|
10410
10445
|
const A = n ? bo(n) : Array;
|
|
10411
10446
|
if (!A)
|
|
@@ -10418,17 +10453,17 @@ class Gi {
|
|
|
10418
10453
|
}
|
|
10419
10454
|
if (S !== void 0 && typeof S != "function")
|
|
10420
10455
|
throw new TypeError("memoMethod must be a function if defined");
|
|
10421
|
-
if (this.#
|
|
10456
|
+
if (this.#C = S, k !== void 0 && typeof k != "function")
|
|
10422
10457
|
throw new TypeError("fetchMethod must be a function if specified");
|
|
10423
|
-
if (this.#k =
|
|
10424
|
-
if (this.#f !== 0 && !
|
|
10458
|
+
if (this.#k = k, this.#O = !!k, this.#i = /* @__PURE__ */ new Map(), this.#n = new Array(n).fill(void 0), this.#e = new Array(n).fill(void 0), this.#u = new A(n), this.#d = new A(n), this.#a = 0, this.#s = 0, this.#b = vt.create(n), this.#r = 0, this.#y = 0, typeof u == "function" && (this.#m = u), typeof c == "function" ? (this.#g = c, this.#o = []) : (this.#g = void 0, this.#o = void 0), this.#v = !!this.#m, this.#c = !!this.#g, this.noDisposeOnSet = !!f, this.noUpdateTTL = !!d, this.noDeleteOnFetchRejection = !!L, this.allowStaleOnFetchRejection = !!m, this.allowStaleOnFetchAbort = !!g, this.ignoreFetchAbort = !!b, this.maxEntrySize !== 0) {
|
|
10459
|
+
if (this.#f !== 0 && !je(this.#f))
|
|
10425
10460
|
throw new TypeError("maxSize must be a positive integer if specified");
|
|
10426
|
-
if (!
|
|
10461
|
+
if (!je(this.maxEntrySize))
|
|
10427
10462
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
10428
10463
|
this.#V();
|
|
10429
10464
|
}
|
|
10430
|
-
if (this.allowStale = !!l, this.noDeleteOnStaleGet = !!O, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!a, this.ttlResolution =
|
|
10431
|
-
if (!
|
|
10465
|
+
if (this.allowStale = !!l, this.noDeleteOnStaleGet = !!O, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!a, this.ttlResolution = je(r) || r === 0 ? r : 1, this.ttlAutopurge = !!s, this.ttl = i || 0, this.ttl) {
|
|
10466
|
+
if (!je(this.ttl))
|
|
10432
10467
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
10433
10468
|
this.#L();
|
|
10434
10469
|
}
|
|
@@ -10448,7 +10483,7 @@ class Gi {
|
|
|
10448
10483
|
}
|
|
10449
10484
|
#L() {
|
|
10450
10485
|
const e = new yn(this.#l), n = new yn(this.#l);
|
|
10451
|
-
this.#p = e, this.#
|
|
10486
|
+
this.#p = e, this.#E = n, this.#P = (s, o, a = dt.now()) => {
|
|
10452
10487
|
if (n[s] = o !== 0 ? a : 0, e[s] = o, o !== 0 && this.ttlAutopurge) {
|
|
10453
10488
|
const l = setTimeout(() => {
|
|
10454
10489
|
this.#h(s) && this.#I(this.#n[s], "expire");
|
|
@@ -10502,21 +10537,21 @@ class Gi {
|
|
|
10502
10537
|
#h = () => !1;
|
|
10503
10538
|
#V() {
|
|
10504
10539
|
const e = new yn(this.#l);
|
|
10505
|
-
this.#y = 0, this.#
|
|
10540
|
+
this.#y = 0, this.#T = e, this.#R = (n) => {
|
|
10506
10541
|
this.#y -= e[n], e[n] = 0;
|
|
10507
10542
|
}, this.#$ = (n, i, r, s) => {
|
|
10508
10543
|
if (this.#t(i))
|
|
10509
10544
|
return 0;
|
|
10510
|
-
if (!
|
|
10545
|
+
if (!je(r))
|
|
10511
10546
|
if (s) {
|
|
10512
10547
|
if (typeof s != "function")
|
|
10513
10548
|
throw new TypeError("sizeCalculation must be a function");
|
|
10514
|
-
if (r = s(i, n), !
|
|
10549
|
+
if (r = s(i, n), !je(r))
|
|
10515
10550
|
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
10516
10551
|
} else
|
|
10517
10552
|
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
10518
10553
|
return r;
|
|
10519
|
-
}, this.#
|
|
10554
|
+
}, this.#F = (n, i, r) => {
|
|
10520
10555
|
if (e[n] = i, this.#f) {
|
|
10521
10556
|
const s = this.#f - e[n];
|
|
10522
10557
|
for (; this.#y > s; )
|
|
@@ -10525,9 +10560,9 @@ class Gi {
|
|
|
10525
10560
|
this.#y += e[n], r && (r.entrySize = i, r.totalCalculatedSize = this.#y);
|
|
10526
10561
|
};
|
|
10527
10562
|
}
|
|
10528
|
-
#
|
|
10563
|
+
#R = (e) => {
|
|
10529
10564
|
};
|
|
10530
|
-
#
|
|
10565
|
+
#F = (e, n, i) => {
|
|
10531
10566
|
};
|
|
10532
10567
|
#$ = (e, n, i, r) => {
|
|
10533
10568
|
if (i || r)
|
|
@@ -10686,14 +10721,14 @@ class Gi {
|
|
|
10686
10721
|
if (r === void 0)
|
|
10687
10722
|
return;
|
|
10688
10723
|
const s = { value: r };
|
|
10689
|
-
if (this.#p && this.#
|
|
10690
|
-
const o = this.#p[n], a = this.#
|
|
10724
|
+
if (this.#p && this.#E) {
|
|
10725
|
+
const o = this.#p[n], a = this.#E[n];
|
|
10691
10726
|
if (o && a) {
|
|
10692
10727
|
const l = o - (dt.now() - a);
|
|
10693
10728
|
s.ttl = l, s.start = Date.now();
|
|
10694
10729
|
}
|
|
10695
10730
|
}
|
|
10696
|
-
return this.#
|
|
10731
|
+
return this.#T && (s.size = this.#T[n]), s;
|
|
10697
10732
|
}
|
|
10698
10733
|
/**
|
|
10699
10734
|
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
|
@@ -10715,12 +10750,12 @@ class Gi {
|
|
|
10715
10750
|
if (s === void 0 || i === void 0)
|
|
10716
10751
|
continue;
|
|
10717
10752
|
const o = { value: s };
|
|
10718
|
-
if (this.#p && this.#
|
|
10753
|
+
if (this.#p && this.#E) {
|
|
10719
10754
|
o.ttl = this.#p[n];
|
|
10720
|
-
const a = dt.now() - this.#
|
|
10755
|
+
const a = dt.now() - this.#E[n];
|
|
10721
10756
|
o.start = Math.floor(Date.now() - a);
|
|
10722
10757
|
}
|
|
10723
|
-
this.#
|
|
10758
|
+
this.#T && (o.size = this.#T[n]), e.unshift([i, o]);
|
|
10724
10759
|
}
|
|
10725
10760
|
return e;
|
|
10726
10761
|
}
|
|
@@ -10783,9 +10818,9 @@ class Gi {
|
|
|
10783
10818
|
return l && (l.set = "miss", l.maxEntrySizeExceeded = !0), this.#I(e, "set"), this;
|
|
10784
10819
|
let f = this.#r === 0 ? void 0 : this.#i.get(e);
|
|
10785
10820
|
if (f === void 0)
|
|
10786
|
-
f = this.#r === 0 ? this.#s : this.#b.length !== 0 ? this.#b.pop() : this.#r === this.#l ? this.#x(!1) : this.#r, this.#n[f] = e, this.#e[f] = n, this.#i.set(e, f), this.#u[this.#s] = f, this.#d[f] = this.#s, this.#s = f, this.#r++, this.#
|
|
10821
|
+
f = this.#r === 0 ? this.#s : this.#b.length !== 0 ? this.#b.pop() : this.#r === this.#l ? this.#x(!1) : this.#r, this.#n[f] = e, this.#e[f] = n, this.#i.set(e, f), this.#u[this.#s] = f, this.#d[f] = this.#s, this.#s = f, this.#r++, this.#F(f, c, l), l && (l.set = "add"), u = !1;
|
|
10787
10822
|
else {
|
|
10788
|
-
this.#
|
|
10823
|
+
this.#A(f);
|
|
10789
10824
|
const d = this.#e[f];
|
|
10790
10825
|
if (n !== d) {
|
|
10791
10826
|
if (this.#O && this.#t(d)) {
|
|
@@ -10793,7 +10828,7 @@ class Gi {
|
|
|
10793
10828
|
const { __staleWhileFetching: h } = d;
|
|
10794
10829
|
h !== void 0 && !o && (this.#v && this.#m?.(h, e, "set"), this.#c && this.#o?.push([h, e, "set"]));
|
|
10795
10830
|
} else o || (this.#v && this.#m?.(d, e, "set"), this.#c && this.#o?.push([d, e, "set"]));
|
|
10796
|
-
if (this.#
|
|
10831
|
+
if (this.#R(f), this.#F(f, c, l), this.#e[f] = n, l) {
|
|
10797
10832
|
l.set = "replace";
|
|
10798
10833
|
const h = d && this.#t(d) ? d.__staleWhileFetching : d;
|
|
10799
10834
|
h !== void 0 && (l.oldValue = h);
|
|
@@ -10833,7 +10868,7 @@ class Gi {
|
|
|
10833
10868
|
}
|
|
10834
10869
|
#x(e) {
|
|
10835
10870
|
const n = this.#a, i = this.#n[n], r = this.#e[n];
|
|
10836
|
-
return this.#O && this.#t(r) ? r.__abortController.abort(new Error("evicted")) : (this.#v || this.#c) && (this.#v && this.#m?.(r, i, "evict"), this.#c && this.#o?.push([r, i, "evict"])), this.#
|
|
10871
|
+
return this.#O && this.#t(r) ? r.__abortController.abort(new Error("evicted")) : (this.#v || this.#c) && (this.#v && this.#m?.(r, i, "evict"), this.#c && this.#o?.push([r, i, "evict"])), this.#R(n), e && (this.#n[n] = void 0, this.#e[n] = void 0, this.#b.push(n)), this.#r === 1 ? (this.#a = this.#s = 0, this.#b.length = 0) : this.#a = this.#u[n], this.#i.delete(i), this.#r--, n;
|
|
10837
10872
|
}
|
|
10838
10873
|
/**
|
|
10839
10874
|
* Check if a key is in the cache, without updating the recency of use.
|
|
@@ -10881,7 +10916,7 @@ class Gi {
|
|
|
10881
10916
|
const s = n === void 0 ? void 0 : this.#e[n];
|
|
10882
10917
|
if (this.#t(s))
|
|
10883
10918
|
return s;
|
|
10884
|
-
const o = new
|
|
10919
|
+
const o = new Fn(), { signal: a } = i;
|
|
10885
10920
|
a?.addEventListener("abort", () => o.abort(a.reason), {
|
|
10886
10921
|
signal: o.signal
|
|
10887
10922
|
});
|
|
@@ -10889,21 +10924,21 @@ class Gi {
|
|
|
10889
10924
|
signal: o.signal,
|
|
10890
10925
|
options: i,
|
|
10891
10926
|
context: r
|
|
10892
|
-
}, u = (w,
|
|
10927
|
+
}, u = (w, k = !1) => {
|
|
10893
10928
|
const { aborted: S } = o.signal, L = i.ignoreFetchAbort && w !== void 0;
|
|
10894
|
-
if (i.status && (S && !
|
|
10929
|
+
if (i.status && (S && !k ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, L && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), S && !L && !k)
|
|
10895
10930
|
return f(o.signal.reason);
|
|
10896
10931
|
const O = h;
|
|
10897
10932
|
return this.#e[n] === h && (w === void 0 ? O.__staleWhileFetching ? this.#e[n] = O.__staleWhileFetching : this.#I(e, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.set(e, w, l.options))), w;
|
|
10898
10933
|
}, c = (w) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = w), f(w)), f = (w) => {
|
|
10899
|
-
const { aborted:
|
|
10934
|
+
const { aborted: k } = o.signal, S = k && i.allowStaleOnFetchAbort, L = S || i.allowStaleOnFetchRejection, O = L || i.noDeleteOnFetchRejection, m = h;
|
|
10900
10935
|
if (this.#e[n] === h && (!O || m.__staleWhileFetching === void 0 ? this.#I(e, "fetch") : S || (this.#e[n] = m.__staleWhileFetching)), L)
|
|
10901
10936
|
return i.status && m.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), m.__staleWhileFetching;
|
|
10902
10937
|
if (m.__returned === m)
|
|
10903
10938
|
throw w;
|
|
10904
|
-
}, d = (w,
|
|
10939
|
+
}, d = (w, k) => {
|
|
10905
10940
|
const S = this.#k?.(e, s, l);
|
|
10906
|
-
S && S instanceof Promise && S.then((L) => w(L === void 0 ? void 0 : L),
|
|
10941
|
+
S && S instanceof Promise && S.then((L) => w(L === void 0 ? void 0 : L), k), o.signal.addEventListener("abort", () => {
|
|
10907
10942
|
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (w(void 0), i.allowStaleOnFetchAbort && (w = (L) => u(L, !0)));
|
|
10908
10943
|
});
|
|
10909
10944
|
};
|
|
@@ -10919,7 +10954,7 @@ class Gi {
|
|
|
10919
10954
|
if (!this.#O)
|
|
10920
10955
|
return !1;
|
|
10921
10956
|
const n = e;
|
|
10922
|
-
return !!n && n instanceof Promise && n.hasOwnProperty("__staleWhileFetching") && n.__abortController instanceof
|
|
10957
|
+
return !!n && n instanceof Promise && n.hasOwnProperty("__staleWhileFetching") && n.__abortController instanceof Fn;
|
|
10923
10958
|
}
|
|
10924
10959
|
async fetch(e, n = {}) {
|
|
10925
10960
|
const {
|
|
@@ -10939,7 +10974,7 @@ class Gi {
|
|
|
10939
10974
|
ignoreFetchAbort: h = this.ignoreFetchAbort,
|
|
10940
10975
|
allowStaleOnFetchAbort: v = this.allowStaleOnFetchAbort,
|
|
10941
10976
|
context: w,
|
|
10942
|
-
forceRefresh:
|
|
10977
|
+
forceRefresh: k = !1,
|
|
10943
10978
|
status: S,
|
|
10944
10979
|
signal: L
|
|
10945
10980
|
} = n;
|
|
@@ -10974,14 +11009,14 @@ class Gi {
|
|
|
10974
11009
|
} else {
|
|
10975
11010
|
const g = this.#e[m];
|
|
10976
11011
|
if (this.#t(g)) {
|
|
10977
|
-
const
|
|
10978
|
-
return S && (S.fetch = "inflight",
|
|
11012
|
+
const E = i && g.__staleWhileFetching !== void 0;
|
|
11013
|
+
return S && (S.fetch = "inflight", E && (S.returnedStale = !0)), E ? g.__staleWhileFetching : g.__returned = g;
|
|
10979
11014
|
}
|
|
10980
11015
|
const b = this.#h(m);
|
|
10981
|
-
if (!
|
|
10982
|
-
return S && (S.fetch = "hit"), this.#
|
|
10983
|
-
const A = this.#D(e, m, O, w),
|
|
10984
|
-
return S && (S.fetch = b ? "stale" : "refresh",
|
|
11016
|
+
if (!k && !b)
|
|
11017
|
+
return S && (S.fetch = "hit"), this.#A(m), r && this.#N(m), S && this.#_(S, m), g;
|
|
11018
|
+
const A = this.#D(e, m, O, w), T = A.__staleWhileFetching !== void 0 && i;
|
|
11019
|
+
return S && (S.fetch = b ? "stale" : "refresh", T && b && (S.returnedStale = !0)), T ? A.__staleWhileFetching : A.__returned = A;
|
|
10985
11020
|
}
|
|
10986
11021
|
}
|
|
10987
11022
|
async forceFetch(e, n = {}) {
|
|
@@ -10991,7 +11026,7 @@ class Gi {
|
|
|
10991
11026
|
return i;
|
|
10992
11027
|
}
|
|
10993
11028
|
memo(e, n = {}) {
|
|
10994
|
-
const i = this.#
|
|
11029
|
+
const i = this.#C;
|
|
10995
11030
|
if (!i)
|
|
10996
11031
|
throw new Error("no memoMethod provided to constructor");
|
|
10997
11032
|
const { context: r, forceRefresh: s, ...o } = n, a = this.get(e, o);
|
|
@@ -11013,13 +11048,13 @@ class Gi {
|
|
|
11013
11048
|
const { allowStale: i = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: s = this.noDeleteOnStaleGet, status: o } = n, a = this.#i.get(e);
|
|
11014
11049
|
if (a !== void 0) {
|
|
11015
11050
|
const l = this.#e[a], u = this.#t(l);
|
|
11016
|
-
return o && this.#_(o, a), this.#h(a) ? (o && (o.get = "stale"), u ? (o && i && l.__staleWhileFetching !== void 0 && (o.returnedStale = !0), i ? l.__staleWhileFetching : void 0) : (s || this.#I(e, "expire"), o && i && (o.returnedStale = !0), i ? l : void 0)) : (o && (o.get = "hit"), u ? l.__staleWhileFetching : (this.#
|
|
11051
|
+
return o && this.#_(o, a), this.#h(a) ? (o && (o.get = "stale"), u ? (o && i && l.__staleWhileFetching !== void 0 && (o.returnedStale = !0), i ? l.__staleWhileFetching : void 0) : (s || this.#I(e, "expire"), o && i && (o.returnedStale = !0), i ? l : void 0)) : (o && (o.get = "hit"), u ? l.__staleWhileFetching : (this.#A(a), r && this.#N(a), l));
|
|
11017
11052
|
} else o && (o.get = "miss");
|
|
11018
11053
|
}
|
|
11019
11054
|
#j(e, n) {
|
|
11020
11055
|
this.#d[n] = e, this.#u[e] = n;
|
|
11021
11056
|
}
|
|
11022
|
-
#
|
|
11057
|
+
#A(e) {
|
|
11023
11058
|
e !== this.#s && (e === this.#a ? this.#a = this.#u[e] : this.#j(this.#d[e], this.#u[e]), this.#j(this.#s, e), this.#s = e);
|
|
11024
11059
|
}
|
|
11025
11060
|
/**
|
|
@@ -11038,7 +11073,7 @@ class Gi {
|
|
|
11038
11073
|
if (i = !0, this.#r === 1)
|
|
11039
11074
|
this.#U(n);
|
|
11040
11075
|
else {
|
|
11041
|
-
this.#
|
|
11076
|
+
this.#R(r);
|
|
11042
11077
|
const s = this.#e[r];
|
|
11043
11078
|
if (this.#t(s) ? s.__abortController.abort(new Error("deleted")) : (this.#v || this.#c) && (this.#v && this.#m?.(s, e, n), this.#c && this.#o?.push([s, e, n])), this.#i.delete(e), this.#n[r] = void 0, this.#e[r] = void 0, r === this.#s)
|
|
11044
11079
|
this.#s = this.#d[r];
|
|
@@ -11077,7 +11112,7 @@ class Gi {
|
|
|
11077
11112
|
this.#v && this.#m?.(i, r, e), this.#c && this.#o?.push([i, r, e]);
|
|
11078
11113
|
}
|
|
11079
11114
|
}
|
|
11080
|
-
if (this.#i.clear(), this.#e.fill(void 0), this.#n.fill(void 0), this.#p && this.#
|
|
11115
|
+
if (this.#i.clear(), this.#e.fill(void 0), this.#n.fill(void 0), this.#p && this.#E && (this.#p.fill(0), this.#E.fill(0)), this.#T && this.#T.fill(0), this.#a = 0, this.#s = 0, this.#b.length = 0, this.#y = 0, this.#r = 0, this.#c && this.#o) {
|
|
11081
11116
|
const n = this.#o;
|
|
11082
11117
|
let i;
|
|
11083
11118
|
for (; i = n?.shift(); )
|
|
@@ -11161,7 +11196,7 @@ function Qi(t) {
|
|
|
11161
11196
|
function Gr(t) {
|
|
11162
11197
|
if (t.errors?.length || t.extensions?.http) {
|
|
11163
11198
|
const e = { ...t };
|
|
11164
|
-
if (e.errors &&= e.errors.map(
|
|
11199
|
+
if (e.errors &&= e.errors.map(To), e.extensions) {
|
|
11165
11200
|
const { http: n, ...i } = t.extensions;
|
|
11166
11201
|
e.extensions = Object.keys(i).length ? i : void 0;
|
|
11167
11202
|
}
|
|
@@ -11169,7 +11204,7 @@ function Gr(t) {
|
|
|
11169
11204
|
}
|
|
11170
11205
|
return t;
|
|
11171
11206
|
}
|
|
11172
|
-
function
|
|
11207
|
+
function To(t) {
|
|
11173
11208
|
if (ot(t)) {
|
|
11174
11209
|
const e = "toJSON" in t && typeof t.toJSON == "function" ? t.toJSON() : Object(t), { http: n, unexpected: i, ...r } = e.extensions || {};
|
|
11175
11210
|
return D(t.message, {
|
|
@@ -11177,7 +11212,7 @@ function Eo(t) {
|
|
|
11177
11212
|
source: t.source,
|
|
11178
11213
|
positions: t.positions,
|
|
11179
11214
|
path: t.path,
|
|
11180
|
-
originalError:
|
|
11215
|
+
originalError: To(t.originalError || void 0),
|
|
11181
11216
|
extensions: Object.keys(r).length ? r : void 0
|
|
11182
11217
|
});
|
|
11183
11218
|
}
|
|
@@ -11192,7 +11227,7 @@ function id(t, e) {
|
|
|
11192
11227
|
let r;
|
|
11193
11228
|
const s = new e.TextEncoder(), o = new e.ReadableStream({
|
|
11194
11229
|
start(a) {
|
|
11195
|
-
if (
|
|
11230
|
+
if (Re(t))
|
|
11196
11231
|
r = t[Symbol.asyncIterator]();
|
|
11197
11232
|
else {
|
|
11198
11233
|
let l = !1;
|
|
@@ -11204,7 +11239,7 @@ function id(t, e) {
|
|
|
11204
11239
|
`)), a.enqueue(s.encode("---"));
|
|
11205
11240
|
},
|
|
11206
11241
|
pull(a) {
|
|
11207
|
-
return
|
|
11242
|
+
return F(() => r.next(), ({ done: l, value: u }) => {
|
|
11208
11243
|
if (u != null) {
|
|
11209
11244
|
a.enqueue(s.encode(`\r
|
|
11210
11245
|
`)), a.enqueue(s.encode("Content-Type: application/json; charset=utf-8")), a.enqueue(s.encode(`\r
|
|
@@ -11223,7 +11258,7 @@ function id(t, e) {
|
|
|
11223
11258
|
},
|
|
11224
11259
|
cancel(a) {
|
|
11225
11260
|
if (r.return)
|
|
11226
|
-
return
|
|
11261
|
+
return F(() => r.return?.(a), () => {
|
|
11227
11262
|
});
|
|
11228
11263
|
}
|
|
11229
11264
|
});
|
|
@@ -11271,7 +11306,7 @@ function sd() {
|
|
|
11271
11306
|
c.enqueue(l.encode(`:
|
|
11272
11307
|
|
|
11273
11308
|
`));
|
|
11274
|
-
}, i),
|
|
11309
|
+
}, i), Re(e))
|
|
11275
11310
|
o = e[Symbol.asyncIterator]();
|
|
11276
11311
|
else {
|
|
11277
11312
|
let f = !1;
|
|
@@ -11281,7 +11316,7 @@ function sd() {
|
|
|
11281
11316
|
}
|
|
11282
11317
|
},
|
|
11283
11318
|
pull(c) {
|
|
11284
|
-
return
|
|
11319
|
+
return F(() => o.next(), (f) => {
|
|
11285
11320
|
if (f.value != null) {
|
|
11286
11321
|
c.enqueue(l.encode(`event: next
|
|
11287
11322
|
`));
|
|
@@ -11300,7 +11335,7 @@ function sd() {
|
|
|
11300
11335
|
},
|
|
11301
11336
|
cancel(c) {
|
|
11302
11337
|
if (clearInterval(a), o.return)
|
|
11303
|
-
return
|
|
11338
|
+
return F(() => o.return?.(c), () => {
|
|
11304
11339
|
});
|
|
11305
11340
|
}
|
|
11306
11341
|
});
|
|
@@ -11331,7 +11366,7 @@ function ld() {
|
|
|
11331
11366
|
r.request && t.set(r.request, !0);
|
|
11332
11367
|
},
|
|
11333
11368
|
onResultProcess({ request: r, result: s, acceptableMediaTypes: o, setResultProcessor: a }) {
|
|
11334
|
-
const u = t.get(r) ? i : n, c = td(r), f =
|
|
11369
|
+
const u = t.get(r) ? i : n, c = td(r), f = Re(s);
|
|
11335
11370
|
for (const d of u)
|
|
11336
11371
|
for (const h of c)
|
|
11337
11372
|
if (!(f && !d.asyncIterables))
|
|
@@ -11403,7 +11438,7 @@ function si({ request: t, result: e, fetchAPI: n, onResultProcessHooks: i, serve
|
|
|
11403
11438
|
let s;
|
|
11404
11439
|
const o = [];
|
|
11405
11440
|
let a = "*/*";
|
|
11406
|
-
return
|
|
11441
|
+
return F(() => ue(i, (l) => l({
|
|
11407
11442
|
request: t,
|
|
11408
11443
|
acceptableMediaTypes: o,
|
|
11409
11444
|
result: e,
|
|
@@ -11425,7 +11460,7 @@ function si({ request: t, result: e, fetchAPI: n, onResultProcessHooks: i, serve
|
|
|
11425
11460
|
}
|
|
11426
11461
|
function dd({ params: t, enveloped: e }) {
|
|
11427
11462
|
const n = e.parse(t.query), i = e.validate(e.schema, n);
|
|
11428
|
-
return i.length > 0 ? { errors: i } :
|
|
11463
|
+
return i.length > 0 ? { errors: i } : F(() => e.contextFactory(), (r) => {
|
|
11429
11464
|
const s = {
|
|
11430
11465
|
schema: e.schema,
|
|
11431
11466
|
document: n,
|
|
@@ -11512,7 +11547,7 @@ class hd {
|
|
|
11512
11547
|
logger: this.logger,
|
|
11513
11548
|
endpoint: e?.healthCheckEndpoint
|
|
11514
11549
|
}),
|
|
11515
|
-
e?.cors !== !1 &&
|
|
11550
|
+
e?.cors !== !1 && Ef(e?.cors),
|
|
11516
11551
|
e?.graphiql !== !1 && zu({
|
|
11517
11552
|
graphqlEndpoint: a,
|
|
11518
11553
|
options: e?.graphiql,
|
|
@@ -11522,7 +11557,7 @@ class hd {
|
|
|
11522
11557
|
// Middlewares before the GraphQL execution
|
|
11523
11558
|
$t({
|
|
11524
11559
|
match: Nf,
|
|
11525
|
-
parse:
|
|
11560
|
+
parse: Rf
|
|
11526
11561
|
}),
|
|
11527
11562
|
$t({
|
|
11528
11563
|
match: xf,
|
|
@@ -11533,11 +11568,11 @@ class hd {
|
|
|
11533
11568
|
parse: $f
|
|
11534
11569
|
}),
|
|
11535
11570
|
$t({
|
|
11536
|
-
match:
|
|
11537
|
-
parse:
|
|
11571
|
+
match: Cf,
|
|
11572
|
+
parse: Ff
|
|
11538
11573
|
}),
|
|
11539
11574
|
$t({
|
|
11540
|
-
match:
|
|
11575
|
+
match: Af,
|
|
11541
11576
|
parse: kf
|
|
11542
11577
|
}),
|
|
11543
11578
|
// Middlewares after the GraphQL execution
|
|
@@ -11587,9 +11622,9 @@ class hd {
|
|
|
11587
11622
|
};
|
|
11588
11623
|
Object.assign(n, r);
|
|
11589
11624
|
const s = this.getEnveloped(n);
|
|
11590
|
-
return this.logger.debug("Processing GraphQL Parameters"),
|
|
11625
|
+
return this.logger.debug("Processing GraphQL Parameters"), F(() => F(() => dd({ params: i, enveloped: s }), (o) => (this.logger.debug("Processing GraphQL Parameters done."), o), (o) => ({
|
|
11591
11626
|
errors: gn(o, this.maskedErrorsOpts, this.logger)
|
|
11592
|
-
})), (o) => (
|
|
11627
|
+
})), (o) => (Re(o) && (o = _n(o, (a) => a, (a) => {
|
|
11593
11628
|
if (a.name === "AbortError")
|
|
11594
11629
|
throw this.logger.debug("Request aborted"), a;
|
|
11595
11630
|
return {
|
|
@@ -11599,7 +11634,7 @@ class hd {
|
|
|
11599
11634
|
};
|
|
11600
11635
|
getResultForParams = ({ params: e, request: n }, i) => {
|
|
11601
11636
|
let r, s = this.handleParams;
|
|
11602
|
-
return
|
|
11637
|
+
return F(() => ue(this.onParamsHooks, (o) => o({
|
|
11603
11638
|
params: e,
|
|
11604
11639
|
request: n,
|
|
11605
11640
|
setParams(a) {
|
|
@@ -11614,11 +11649,11 @@ class hd {
|
|
|
11614
11649
|
},
|
|
11615
11650
|
fetchAPI: this.fetchAPI,
|
|
11616
11651
|
context: i
|
|
11617
|
-
})), () =>
|
|
11652
|
+
})), () => F(() => r || s({
|
|
11618
11653
|
request: n,
|
|
11619
11654
|
params: e,
|
|
11620
11655
|
context: i
|
|
11621
|
-
}), (o) =>
|
|
11656
|
+
}), (o) => F(() => ue(this.onExecutionResultHooks, (a) => a({
|
|
11622
11657
|
result: o,
|
|
11623
11658
|
setResult(l) {
|
|
11624
11659
|
o = l;
|
|
@@ -11632,7 +11667,7 @@ class hd {
|
|
|
11632
11667
|
get: (o, a, l) => (i = new this.fetchAPI.URL(e.url, "http://localhost"), Reflect.get(i, a, i))
|
|
11633
11668
|
}), r;
|
|
11634
11669
|
const s = [];
|
|
11635
|
-
return
|
|
11670
|
+
return F(() => ue(this.onRequestParseHooks, (o) => F(() => o({
|
|
11636
11671
|
request: e,
|
|
11637
11672
|
url: i,
|
|
11638
11673
|
requestParser: r,
|
|
@@ -11640,7 +11675,7 @@ class hd {
|
|
|
11640
11675
|
setRequestParser(a) {
|
|
11641
11676
|
r = a;
|
|
11642
11677
|
}
|
|
11643
|
-
}), (a) => a?.onRequestParseDone), s), () => (this.logger.debug("Parsing request to extract GraphQL parameters"), r ?
|
|
11678
|
+
}), (a) => a?.onRequestParseDone), s), () => (this.logger.debug("Parsing request to extract GraphQL parameters"), r ? F(() => r(e), (o) => F(() => ue(s, (a) => a({
|
|
11644
11679
|
requestParserResult: o,
|
|
11645
11680
|
setRequestParserResult(l) {
|
|
11646
11681
|
o = l;
|
|
@@ -11660,7 +11695,7 @@ class hd {
|
|
|
11660
11695
|
if (s)
|
|
11661
11696
|
return s;
|
|
11662
11697
|
const a = this.instrumentation?.operation ? (l, u) => On({ context: u, request: l.request }).asyncFn(this.instrumentation?.operation, this.getResultForParams)(l, u) : this.getResultForParams;
|
|
11663
|
-
return
|
|
11698
|
+
return F(() => Array.isArray(o) ? Promise.all(o.map((l) => a({
|
|
11664
11699
|
params: l,
|
|
11665
11700
|
request: e
|
|
11666
11701
|
}, Object.create(n)))) : a({
|
|
@@ -11717,7 +11752,7 @@ function Gt(t) {
|
|
|
11717
11752
|
return !1;
|
|
11718
11753
|
return !0;
|
|
11719
11754
|
}
|
|
11720
|
-
const
|
|
11755
|
+
const Td = [
|
|
11721
11756
|
"array",
|
|
11722
11757
|
"boolean",
|
|
11723
11758
|
"integer",
|
|
@@ -11726,15 +11761,15 @@ const Ed = [
|
|
|
11726
11761
|
"object",
|
|
11727
11762
|
"string"
|
|
11728
11763
|
];
|
|
11729
|
-
new Set(
|
|
11730
|
-
const
|
|
11764
|
+
new Set(Td);
|
|
11765
|
+
const Ed = [
|
|
11731
11766
|
"$defs",
|
|
11732
11767
|
"definitions",
|
|
11733
11768
|
"properties",
|
|
11734
11769
|
"patternProperties",
|
|
11735
11770
|
"dependencies"
|
|
11736
11771
|
];
|
|
11737
|
-
new Set(
|
|
11772
|
+
new Set(Ed);
|
|
11738
11773
|
const vd = [
|
|
11739
11774
|
"items",
|
|
11740
11775
|
"allOf",
|
|
@@ -11811,7 +11846,7 @@ function li(t) {
|
|
|
11811
11846
|
return 0;
|
|
11812
11847
|
};
|
|
11813
11848
|
}
|
|
11814
|
-
function
|
|
11849
|
+
function Eo(t, { threshold: e = 12 } = {}) {
|
|
11815
11850
|
return (n) => {
|
|
11816
11851
|
const i = n.length;
|
|
11817
11852
|
if (i === 0)
|
|
@@ -11869,11 +11904,11 @@ const zr = _d, vo = () => 0, Od = (t) => t === void 0, Nd = (t) => typeof t != "
|
|
|
11869
11904
|
number: 1,
|
|
11870
11905
|
string: 2
|
|
11871
11906
|
};
|
|
11872
|
-
function
|
|
11907
|
+
function Rd(t, e) {
|
|
11873
11908
|
const n = typeof t, i = typeof e;
|
|
11874
11909
|
return n === i ? wt(t, e) : Jr[n] - Jr[i];
|
|
11875
11910
|
}
|
|
11876
|
-
function
|
|
11911
|
+
function Ad(t, e) {
|
|
11877
11912
|
const n = t.length;
|
|
11878
11913
|
if (n === 0)
|
|
11879
11914
|
return e;
|
|
@@ -11897,18 +11932,18 @@ function Kn(t, e, n = vo) {
|
|
|
11897
11932
|
function bt(t) {
|
|
11898
11933
|
return Kn(Od, t);
|
|
11899
11934
|
}
|
|
11900
|
-
function
|
|
11935
|
+
function Ue(t, e) {
|
|
11901
11936
|
return Kn((n) => n === void 0 || t(n), e);
|
|
11902
11937
|
}
|
|
11903
11938
|
function ui(t, e) {
|
|
11904
11939
|
return Kn(Array.isArray, t, e);
|
|
11905
11940
|
}
|
|
11906
|
-
const z = bt(wt), ci =
|
|
11941
|
+
const z = bt(wt), ci = Ue((t) => t === 0, (t, e) => t - e);
|
|
11907
11942
|
function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysCache: e = /* @__PURE__ */ new WeakMap() } = {}) {
|
|
11908
11943
|
const n = zr(e, (w) => Object.keys(w).sort());
|
|
11909
11944
|
function i(w) {
|
|
11910
|
-
return (
|
|
11911
|
-
const L = n(
|
|
11945
|
+
return (k, S) => {
|
|
11946
|
+
const L = n(k), O = n(S), m = Math.min(L.length, O.length);
|
|
11912
11947
|
for (let g = 0; g < m; g++) {
|
|
11913
11948
|
const b = wt(L[g], O[g]);
|
|
11914
11949
|
if (b !== 0)
|
|
@@ -11917,7 +11952,7 @@ function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysC
|
|
|
11917
11952
|
if (L.length !== O.length)
|
|
11918
11953
|
return L.length - O.length;
|
|
11919
11954
|
for (let g = 0; g < m; g++) {
|
|
11920
|
-
const b = L[g], A = w(
|
|
11955
|
+
const b = L[g], A = w(k[b], S[b]);
|
|
11921
11956
|
if (A !== 0)
|
|
11922
11957
|
return A;
|
|
11923
11958
|
}
|
|
@@ -11925,37 +11960,37 @@ function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysC
|
|
|
11925
11960
|
};
|
|
11926
11961
|
}
|
|
11927
11962
|
function r(w) {
|
|
11928
|
-
const
|
|
11963
|
+
const k = li(w), S = zr(
|
|
11929
11964
|
t,
|
|
11930
11965
|
// NOTE: Always sort output
|
|
11931
|
-
|
|
11966
|
+
Eo(w, { threshold: 0 })
|
|
11932
11967
|
);
|
|
11933
|
-
return (L, O) =>
|
|
11968
|
+
return (L, O) => k(S(L), S(O));
|
|
11934
11969
|
}
|
|
11935
11970
|
const s = r(wt);
|
|
11936
|
-
function o(w,
|
|
11971
|
+
function o(w, k) {
|
|
11937
11972
|
if (bn(w)) {
|
|
11938
|
-
if (bn(
|
|
11939
|
-
const S = Object.keys(w), L = Object.keys(
|
|
11973
|
+
if (bn(k)) {
|
|
11974
|
+
const S = Object.keys(w), L = Object.keys(k), O = Ad(S, L), m = O.length;
|
|
11940
11975
|
for (let g = 0; g < m; g++) {
|
|
11941
11976
|
const b = O[g];
|
|
11942
|
-
if (w[b] ===
|
|
11977
|
+
if (w[b] === k[b])
|
|
11943
11978
|
continue;
|
|
11944
|
-
const y = (v[b] ?? a)(w[b],
|
|
11979
|
+
const y = (v[b] ?? a)(w[b], k[b]);
|
|
11945
11980
|
if (y !== 0)
|
|
11946
11981
|
return y;
|
|
11947
11982
|
}
|
|
11948
11983
|
return 0;
|
|
11949
11984
|
}
|
|
11950
|
-
return
|
|
11985
|
+
return k === !0 && Gt(w) ? 0 : 1;
|
|
11951
11986
|
}
|
|
11952
|
-
return bn(
|
|
11987
|
+
return bn(k) ? w === !0 && Gt(k) ? 0 : -1 : wt(w, k);
|
|
11953
11988
|
}
|
|
11954
|
-
const a = bt(u), l = Kn(Nd, ui(i(a), li(u)),
|
|
11955
|
-
function u(w,
|
|
11956
|
-
return w === null ? -1 :
|
|
11989
|
+
const a = bt(u), l = Kn(Nd, ui(i(a), li(u)), Rd);
|
|
11990
|
+
function u(w, k) {
|
|
11991
|
+
return w === null ? -1 : k === null ? 1 : l(w, k);
|
|
11957
11992
|
}
|
|
11958
|
-
const c = bt(o), f =
|
|
11993
|
+
const c = bt(o), f = Ue(Gt, i(c)), d = bt(r(o)), h = Ue(Oe, o), v = {
|
|
11959
11994
|
$id: z,
|
|
11960
11995
|
$comment: z,
|
|
11961
11996
|
$defs: f,
|
|
@@ -11987,17 +12022,17 @@ function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysC
|
|
|
11987
12022
|
then: c,
|
|
11988
12023
|
title: z,
|
|
11989
12024
|
writeOnly: z,
|
|
11990
|
-
uniqueItems:
|
|
12025
|
+
uniqueItems: Ue((w) => w === !1, vo),
|
|
11991
12026
|
minLength: ci,
|
|
11992
12027
|
minItems: ci,
|
|
11993
12028
|
minProperties: ci,
|
|
11994
|
-
required:
|
|
11995
|
-
enum:
|
|
11996
|
-
type: bt((w,
|
|
11997
|
-
const S = Array.isArray(w), L = Array.isArray(
|
|
11998
|
-
return !S && !L ? wt(w,
|
|
12029
|
+
required: Ue(Wr, s),
|
|
12030
|
+
enum: Ue(Wr, r(u)),
|
|
12031
|
+
type: bt((w, k) => {
|
|
12032
|
+
const S = Array.isArray(w), L = Array.isArray(k);
|
|
12033
|
+
return !S && !L ? wt(w, k) : s(S ? w : [w], L ? k : [k]);
|
|
11999
12034
|
}),
|
|
12000
|
-
items:
|
|
12035
|
+
items: Ue((w) => !Array.isArray(w) && Oe(w), ui(o, li(o))),
|
|
12001
12036
|
anyOf: d,
|
|
12002
12037
|
allOf: d,
|
|
12003
12038
|
oneOf: d,
|
|
@@ -12005,7 +12040,7 @@ function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysC
|
|
|
12005
12040
|
patternProperties: f,
|
|
12006
12041
|
additionalProperties: h,
|
|
12007
12042
|
additionalItems: h,
|
|
12008
|
-
dependencies:
|
|
12043
|
+
dependencies: Ue(Gt, i(bt(ui(o, s))))
|
|
12009
12044
|
};
|
|
12010
12045
|
return {
|
|
12011
12046
|
compareSchemaValues: u,
|
|
@@ -12015,8 +12050,8 @@ function kd({ deduplicationCache: t = /* @__PURE__ */ new WeakMap(), sortedKeysC
|
|
|
12015
12050
|
function Yr(t) {
|
|
12016
12051
|
return t;
|
|
12017
12052
|
}
|
|
12018
|
-
const wo = (t, e) => t ? wo(e % t, t) : e,
|
|
12019
|
-
function
|
|
12053
|
+
const wo = (t, e) => t ? wo(e % t, t) : e, Cd = (t, e) => Math.abs(t * e) / wo(t, e);
|
|
12054
|
+
function Fd(t, e) {
|
|
12020
12055
|
return t === e ? t : `^(?=.*(?:${t}))(?=.*(?:${e})).*$`;
|
|
12021
12056
|
}
|
|
12022
12057
|
function* fi(t, e, n) {
|
|
@@ -12137,7 +12172,7 @@ const Md = [
|
|
|
12137
12172
|
Ze("minItems", "maxItems", (t) => t.maxItems >= t.minItems),
|
|
12138
12173
|
Ze("minProperties", "maxProperties", (t) => t.maxProperties >= t.minProperties)
|
|
12139
12174
|
];
|
|
12140
|
-
function jd({ mergePatterns: t =
|
|
12175
|
+
function jd({ mergePatterns: t = Fd, isSubRegExp: e = Object.is, intersectJson: n = Sd, deduplicateJsonSchemaDef: i = Yr, defaultMerger: r = Yr, assigners: s = [], checks: o = Md, mergers: a } = {}) {
|
|
12141
12176
|
function l(m) {
|
|
12142
12177
|
const g = m.length;
|
|
12143
12178
|
let b = m[0];
|
|
@@ -12149,7 +12184,7 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12149
12184
|
}
|
|
12150
12185
|
return b;
|
|
12151
12186
|
}
|
|
12152
|
-
function u(m, g, b, A, y,
|
|
12187
|
+
function u(m, g, b, A, y, T, E) {
|
|
12153
12188
|
if (m.length = 0, b === !1)
|
|
12154
12189
|
return !1;
|
|
12155
12190
|
if (m.push(b), y !== void 0) {
|
|
@@ -12157,64 +12192,64 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12157
12192
|
return !1;
|
|
12158
12193
|
m.push(y);
|
|
12159
12194
|
}
|
|
12160
|
-
if (ts(m, g,
|
|
12195
|
+
if (ts(m, g, T))
|
|
12161
12196
|
return !1;
|
|
12162
12197
|
const N = m.length < 2;
|
|
12163
|
-
if (
|
|
12198
|
+
if (E === !1) {
|
|
12164
12199
|
if (N)
|
|
12165
12200
|
return;
|
|
12166
12201
|
if (ts(m, g, A))
|
|
12167
12202
|
return !1;
|
|
12168
|
-
} else N &&
|
|
12203
|
+
} else N && E !== void 0 && m.push(E);
|
|
12169
12204
|
return m.length === 1 ? m[0] : l(m);
|
|
12170
12205
|
}
|
|
12171
|
-
function c(m, g, b, A, y,
|
|
12172
|
-
const
|
|
12173
|
-
if (
|
|
12174
|
-
if (
|
|
12206
|
+
function c(m, g, b, A, y, T) {
|
|
12207
|
+
const E = b.length;
|
|
12208
|
+
if (E > 0 && y !== !1)
|
|
12209
|
+
if (T)
|
|
12175
12210
|
Object.assign(m, g);
|
|
12176
12211
|
else
|
|
12177
|
-
for (let I = 0; I <
|
|
12212
|
+
for (let I = 0; I < E; I++) {
|
|
12178
12213
|
const N = b[I];
|
|
12179
12214
|
A.has(N) || (m[N] = S(g[N], y));
|
|
12180
12215
|
}
|
|
12181
12216
|
return m;
|
|
12182
12217
|
}
|
|
12183
|
-
const f = (m, { properties: g = {}, patternProperties: b, additionalProperties: A = !0 }, { properties: y = {}, patternProperties:
|
|
12184
|
-
const I = Oe(A), N = Oe(
|
|
12218
|
+
const f = (m, { properties: g = {}, patternProperties: b, additionalProperties: A = !0 }, { properties: y = {}, patternProperties: T, additionalProperties: E = !0 }) => {
|
|
12219
|
+
const I = Oe(A), N = Oe(E);
|
|
12185
12220
|
if (I && N)
|
|
12186
|
-
return Xe(m, "properties", L(g, y)), Xe(m, "patternProperties", b &&
|
|
12187
|
-
const P = S(A,
|
|
12221
|
+
return Xe(m, "properties", L(g, y)), Xe(m, "patternProperties", b && T ? L(b, T) : b ?? T), delete m.additionalProperties, m;
|
|
12222
|
+
const P = S(A, E);
|
|
12188
12223
|
Xe(m, "additionalProperties", P);
|
|
12189
|
-
const $ = {}, j = Object.keys(g), q = j.length, [J, ee] = b ? Zr(b) : es, [Y,
|
|
12224
|
+
const $ = {}, j = Object.keys(g), q = j.length, [J, ee] = b ? Zr(b) : es, [Y, Te] = T ? Zr(T) : es, Ki = [], Wi = /* @__PURE__ */ new Set(), Ro = N ? void 0 : E;
|
|
12190
12225
|
for (let ke = 0; ke < q; ke++) {
|
|
12191
12226
|
const re = j[ke];
|
|
12192
12227
|
Wi.add(re);
|
|
12193
|
-
const
|
|
12194
|
-
|
|
12228
|
+
const Ee = u(Ki, re, g[re], J, y[re], Y, Ro);
|
|
12229
|
+
Ee !== void 0 && ($[re] = Ee);
|
|
12195
12230
|
}
|
|
12196
|
-
const zi = Object.keys(y),
|
|
12197
|
-
for (let ke = 0; ke <
|
|
12231
|
+
const zi = Object.keys(y), Ao = zi.length, ko = I ? void 0 : A;
|
|
12232
|
+
for (let ke = 0; ke < Ao; ke++) {
|
|
12198
12233
|
const re = zi[ke];
|
|
12199
12234
|
if (Wi.has(re))
|
|
12200
12235
|
continue;
|
|
12201
|
-
const
|
|
12202
|
-
|
|
12236
|
+
const Ee = u(Ki, re, y[re], Y, void 0, J, ko);
|
|
12237
|
+
Ee !== void 0 && ($[re] = Ee);
|
|
12203
12238
|
}
|
|
12204
12239
|
Xe(m, "properties", $);
|
|
12205
12240
|
let lt = {};
|
|
12206
12241
|
const tn = /* @__PURE__ */ new Set();
|
|
12207
|
-
if (ee.length > 0 &&
|
|
12208
|
-
const ke = fi(ee,
|
|
12209
|
-
e(re,
|
|
12242
|
+
if (ee.length > 0 && Te.length > 0) {
|
|
12243
|
+
const ke = fi(ee, Te, (re, Ee) => {
|
|
12244
|
+
e(re, Ee) && tn.add(re), e(Ee, re) && tn.add(Ee), lt[t(re, Ee)] = S(b[re], T[Ee]);
|
|
12210
12245
|
});
|
|
12211
12246
|
for (; !ke.next().done; )
|
|
12212
12247
|
;
|
|
12213
12248
|
}
|
|
12214
|
-
return lt = c(lt, b, ee, tn,
|
|
12249
|
+
return lt = c(lt, b, ee, tn, E, N), lt = c(lt, T, Te, tn, A, I), Xe(m, "patternProperties", lt), m;
|
|
12215
12250
|
}, d = (m, { items: g = [], additionalItems: b }, { items: A = [], additionalItems: y }) => {
|
|
12216
|
-
const
|
|
12217
|
-
if (m.items = I,
|
|
12251
|
+
const T = Array.isArray(g), E = Array.isArray(A), I = [];
|
|
12252
|
+
if (m.items = I, T && E) {
|
|
12218
12253
|
const [N, P, $] = g.length < A.length ? [g.length, b, A] : [A.length, y, g];
|
|
12219
12254
|
let j = 0;
|
|
12220
12255
|
for (; j < N; j++)
|
|
@@ -12227,8 +12262,8 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12227
12262
|
I.push(q ? $[j] : S($[j], P));
|
|
12228
12263
|
Xe(m, "additionalItems", b !== void 0 && y !== void 0 ? S(b, y) : b ?? y);
|
|
12229
12264
|
}
|
|
12230
|
-
} else if (
|
|
12231
|
-
const [N, P, $] =
|
|
12265
|
+
} else if (T || E) {
|
|
12266
|
+
const [N, P, $] = T ? [g, A, b] : [A, g, y];
|
|
12232
12267
|
Xe(m, "additionalItems", $ && S($, P));
|
|
12233
12268
|
for (let j = 0; j < N.length; j++)
|
|
12234
12269
|
I.push(S(N[j], P));
|
|
@@ -12248,7 +12283,7 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12248
12283
|
[Ld, d],
|
|
12249
12284
|
[Pd, h],
|
|
12250
12285
|
...s
|
|
12251
|
-
]),
|
|
12286
|
+
]), k = $d(o);
|
|
12252
12287
|
function S(m, g) {
|
|
12253
12288
|
if (m === !1 || g === !1)
|
|
12254
12289
|
return !1;
|
|
@@ -12257,17 +12292,17 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12257
12292
|
if (Oe(g))
|
|
12258
12293
|
return m;
|
|
12259
12294
|
let b = { ...m };
|
|
12260
|
-
const A = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(),
|
|
12261
|
-
for (let I = 0; I <
|
|
12262
|
-
const N =
|
|
12295
|
+
const A = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(), T = Object.keys(g), E = T.length;
|
|
12296
|
+
for (let I = 0; I < E; I++) {
|
|
12297
|
+
const N = T[I], P = g[N];
|
|
12263
12298
|
if (P === void 0)
|
|
12264
12299
|
continue;
|
|
12265
|
-
const $ =
|
|
12300
|
+
const $ = k.get(N);
|
|
12266
12301
|
if ($ !== void 0) {
|
|
12267
12302
|
const ee = $.length;
|
|
12268
12303
|
for (let Y = 0; Y < ee; Y++) {
|
|
12269
|
-
const
|
|
12270
|
-
m[
|
|
12304
|
+
const Te = $[Y];
|
|
12305
|
+
m[Te.oppositeKey] !== void 0 && y.add(Te.check);
|
|
12271
12306
|
}
|
|
12272
12307
|
}
|
|
12273
12308
|
const j = m[N];
|
|
@@ -12307,19 +12342,19 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12307
12342
|
} else if (b || A) {
|
|
12308
12343
|
const y = /* @__PURE__ */ new Set();
|
|
12309
12344
|
if (b && A)
|
|
12310
|
-
for (const
|
|
12311
|
-
|
|
12345
|
+
for (const E of fi(m, g, pi))
|
|
12346
|
+
E !== void 0 && y.add(E);
|
|
12312
12347
|
else {
|
|
12313
|
-
const
|
|
12348
|
+
const E = b ? m : g, I = b ? g : m, N = E.length;
|
|
12314
12349
|
for (let P = 0; P < N; P++) {
|
|
12315
|
-
const $ = pi(I,
|
|
12350
|
+
const $ = pi(I, E[P]);
|
|
12316
12351
|
$ !== void 0 && y.add($);
|
|
12317
12352
|
}
|
|
12318
12353
|
}
|
|
12319
|
-
const
|
|
12320
|
-
if (
|
|
12354
|
+
const T = y.size;
|
|
12355
|
+
if (T === 1)
|
|
12321
12356
|
return y.values().next().value;
|
|
12322
|
-
if (
|
|
12357
|
+
if (T > 1)
|
|
12323
12358
|
return Array.from(y);
|
|
12324
12359
|
}
|
|
12325
12360
|
throw new Error(`It is not possible to create an intersection of the following incompatible types: ${m.toString()}, ${g.toString()}`);
|
|
@@ -12359,7 +12394,7 @@ function jd({ mergePatterns: t = Cd, isSubRegExp: e = Object.is, intersectJson:
|
|
|
12359
12394
|
let b = 1;
|
|
12360
12395
|
for (; !Number.isInteger(m) || !Number.isInteger(g); )
|
|
12361
12396
|
b *= 10, m *= 10, g *= 10;
|
|
12362
|
-
return
|
|
12397
|
+
return Cd(m, g) / b;
|
|
12363
12398
|
},
|
|
12364
12399
|
exclusiveMaximum: Math.min,
|
|
12365
12400
|
maximum: Math.min,
|
|
@@ -12405,7 +12440,7 @@ const qd = async ({
|
|
|
12405
12440
|
}) => {
|
|
12406
12441
|
try {
|
|
12407
12442
|
const i = await n(t);
|
|
12408
|
-
return De(i, (s) => !s || typeof s != "object" || Array.isArray(s) ? s : "type" in s || "properties" in s || "allOf" in s || "anyOf" in s || "oneOf" in s ?
|
|
12443
|
+
return De(i, (s) => !s || typeof s != "object" || Array.isArray(s) ? s : "type" in s || "properties" in s || "allOf" in s || "anyOf" in s || "oneOf" in s ? Tt(s) : s);
|
|
12409
12444
|
} catch (i) {
|
|
12410
12445
|
return console.warn(
|
|
12411
12446
|
`Failed to flatten \`allOf\` in ${e}: ${i instanceof Error ? i.message : i}`
|
|
@@ -12413,24 +12448,24 @@ const qd = async ({
|
|
|
12413
12448
|
}
|
|
12414
12449
|
}, { compareSchemaDefinitions: Bd, compareSchemaValues: Gd } = kd(), { mergeArrayOfSchemaDefinitions: Qd } = jd({
|
|
12415
12450
|
intersectJson: Id(Gd),
|
|
12416
|
-
deduplicateJsonSchemaDef:
|
|
12451
|
+
deduplicateJsonSchemaDef: Eo(Bd)
|
|
12417
12452
|
}), Hd = Vd(
|
|
12418
12453
|
Qd
|
|
12419
|
-
),
|
|
12454
|
+
), Tt = (t) => {
|
|
12420
12455
|
const e = Hd(t);
|
|
12421
12456
|
if (e == null || typeof e != "object")
|
|
12422
12457
|
return e;
|
|
12423
12458
|
const { properties: n, items: i, additionalProperties: r } = e;
|
|
12424
12459
|
if (n != null && typeof n == "object")
|
|
12425
12460
|
for (const [s, o] of Object.entries(n))
|
|
12426
|
-
o && typeof o == "object" && (n[s] =
|
|
12461
|
+
o && typeof o == "object" && (n[s] = Tt(o));
|
|
12427
12462
|
i != null && typeof i == "object" && (Array.isArray(i) ? e.items = i.map(
|
|
12428
|
-
(s) => s && typeof s == "object" ?
|
|
12429
|
-
) : e.items =
|
|
12463
|
+
(s) => s && typeof s == "object" ? Tt(s) : s
|
|
12464
|
+
) : e.items = Tt(i)), r && typeof r == "object" && (e.additionalProperties = Tt(r));
|
|
12430
12465
|
for (const s of ["anyOf", "oneOf"]) {
|
|
12431
12466
|
const o = e[s];
|
|
12432
12467
|
Array.isArray(o) && (e[s] = o.map(
|
|
12433
|
-
(a) => typeof a == "object" && a != null ?
|
|
12468
|
+
(a) => typeof a == "object" && a != null ? Tt(a) : a
|
|
12434
12469
|
));
|
|
12435
12470
|
}
|
|
12436
12471
|
return e;
|
|
@@ -12565,7 +12600,7 @@ const Xd = Object.values(yd.OpenAPIV3.HttpMethods), Zd = async (t) => {
|
|
|
12565
12600
|
return t(n);
|
|
12566
12601
|
}, W = new Vu({
|
|
12567
12602
|
defaultFieldNullability: !1
|
|
12568
|
-
}), xn = W.addScalarType("JSON", Ko),
|
|
12603
|
+
}), xn = W.addScalarType("JSON", Ko), Ke = W.addScalarType("JSONObject", Wo), Hi = W.addScalarType("JSONSchema", zo), at = (t) => Object.fromEntries(
|
|
12569
12604
|
Object.entries(t).filter(([e]) => e.startsWith("x-"))
|
|
12570
12605
|
), is = (t, e) => {
|
|
12571
12606
|
const n = t.tags ?? [], i = new Set(
|
|
@@ -12660,7 +12695,7 @@ Kt.implement({
|
|
|
12660
12695
|
}
|
|
12661
12696
|
}),
|
|
12662
12697
|
extensions: t.field({
|
|
12663
|
-
type:
|
|
12698
|
+
type: Ke,
|
|
12664
12699
|
resolve: (e) => at(e),
|
|
12665
12700
|
nullable: !0
|
|
12666
12701
|
})
|
|
@@ -12681,7 +12716,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12681
12716
|
name: t.exposeString("name"),
|
|
12682
12717
|
description: t.exposeString("description", { nullable: !0 }),
|
|
12683
12718
|
extensions: t.field({
|
|
12684
|
-
type:
|
|
12719
|
+
type: Ke,
|
|
12685
12720
|
resolve: (e) => at(e),
|
|
12686
12721
|
nullable: !0
|
|
12687
12722
|
})
|
|
@@ -12690,7 +12725,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12690
12725
|
fields: (t) => ({
|
|
12691
12726
|
name: t.exposeString("name"),
|
|
12692
12727
|
contentType: t.exposeString("contentType", { nullable: !0 }),
|
|
12693
|
-
headers: t.expose("headers", { type:
|
|
12728
|
+
headers: t.expose("headers", { type: Ke, nullable: !0 }),
|
|
12694
12729
|
style: t.exposeString("style", { nullable: !0 }),
|
|
12695
12730
|
explode: t.exposeBoolean("explode", { nullable: !0 }),
|
|
12696
12731
|
allowReserved: t.exposeBoolean("allowReserved", { nullable: !0 })
|
|
@@ -12729,7 +12764,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12729
12764
|
}),
|
|
12730
12765
|
schema: t.expose("schema", { type: Hi, nullable: !0 }),
|
|
12731
12766
|
extensions: t.field({
|
|
12732
|
-
type:
|
|
12767
|
+
type: Ke,
|
|
12733
12768
|
resolve: (e) => at(e),
|
|
12734
12769
|
nullable: !0
|
|
12735
12770
|
})
|
|
@@ -12755,7 +12790,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12755
12790
|
headers: t.expose("headers", { type: xn, nullable: !0 }),
|
|
12756
12791
|
links: t.expose("links", { type: xn, nullable: !0 }),
|
|
12757
12792
|
extensions: t.field({
|
|
12758
|
-
type:
|
|
12793
|
+
type: Ke,
|
|
12759
12794
|
resolve: (e) => at(e),
|
|
12760
12795
|
nullable: !0
|
|
12761
12796
|
})
|
|
@@ -12841,7 +12876,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12841
12876
|
}),
|
|
12842
12877
|
deprecated: t.exposeBoolean("deprecated", { nullable: !0 }),
|
|
12843
12878
|
extensions: t.field({
|
|
12844
|
-
type:
|
|
12879
|
+
type: Ke,
|
|
12845
12880
|
resolve: (e) => at(e),
|
|
12846
12881
|
nullable: !0
|
|
12847
12882
|
})
|
|
@@ -12851,7 +12886,7 @@ const So = W.objectRef("Server").implement({
|
|
|
12851
12886
|
name: t.exposeString("name"),
|
|
12852
12887
|
schema: t.expose("schema", { type: Hi }),
|
|
12853
12888
|
extensions: t.expose("extensions", {
|
|
12854
|
-
type:
|
|
12889
|
+
type: Ke,
|
|
12855
12890
|
nullable: !0
|
|
12856
12891
|
})
|
|
12857
12892
|
})
|
|
@@ -12936,7 +12971,7 @@ const fp = W.objectRef("Schema").implement({
|
|
|
12936
12971
|
nullable: !0
|
|
12937
12972
|
}),
|
|
12938
12973
|
extensions: t.field({
|
|
12939
|
-
type:
|
|
12974
|
+
type: Ke,
|
|
12940
12975
|
resolve: (e) => at(e),
|
|
12941
12976
|
nullable: !0
|
|
12942
12977
|
})
|
|
@@ -12980,4 +13015,4 @@ const pp = W.toSchema(), hp = (t) => md({ schema: pp, batching: !0, ...t }), wp
|
|
|
12980
13015
|
export {
|
|
12981
13016
|
wp as createServer
|
|
12982
13017
|
};
|
|
12983
|
-
//# sourceMappingURL=createServer-
|
|
13018
|
+
//# sourceMappingURL=createServer-C5lXk4ba.js.map
|