From a9bca8e1f87bc8c8b01f502568637970de831853 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Wed, 10 Nov 2021 01:16:08 +0530 Subject: [PATCH] feat: initial graphql language definition --- packages/codemirror-lang-graphql/.gitignore | 5 + packages/codemirror-lang-graphql/.npmignore | 5 + packages/codemirror-lang-graphql/README.md | 1 + packages/codemirror-lang-graphql/package.json | 32 ++ .../codemirror-lang-graphql/rollup.config.js | 12 + packages/codemirror-lang-graphql/src/index.ts | 35 ++ .../src/syntax.grammar | 368 ++++++++++++++++++ .../codemirror-lang-graphql/test/cases.txt | 1 + packages/codemirror-lang-graphql/test/test.js | 17 + .../codemirror-lang-graphql/tsconfig.json | 11 + .../components/graphql/RequestOptions.vue | 2 +- .../helpers/editor/codemirror.ts | 3 + packages/hoppscotch-app/package.json | 1 + pnpm-lock.yaml | 284 +++++++++++++- 14 files changed, 769 insertions(+), 8 deletions(-) create mode 100644 packages/codemirror-lang-graphql/.gitignore create mode 100644 packages/codemirror-lang-graphql/.npmignore create mode 100644 packages/codemirror-lang-graphql/README.md create mode 100644 packages/codemirror-lang-graphql/package.json create mode 100644 packages/codemirror-lang-graphql/rollup.config.js create mode 100644 packages/codemirror-lang-graphql/src/index.ts create mode 100644 packages/codemirror-lang-graphql/src/syntax.grammar create mode 100644 packages/codemirror-lang-graphql/test/cases.txt create mode 100644 packages/codemirror-lang-graphql/test/test.js create mode 100644 packages/codemirror-lang-graphql/tsconfig.json diff --git a/packages/codemirror-lang-graphql/.gitignore b/packages/codemirror-lang-graphql/.gitignore new file mode 100644 index 000000000..a97c46617 --- /dev/null +++ b/packages/codemirror-lang-graphql/.gitignore @@ -0,0 +1,5 @@ +/node_modules +package-lock.json +/dist +/src/*.js +/src/*.d.ts diff --git a/packages/codemirror-lang-graphql/.npmignore b/packages/codemirror-lang-graphql/.npmignore new file mode 100644 index 000000000..9bd97602d --- /dev/null +++ b/packages/codemirror-lang-graphql/.npmignore @@ -0,0 +1,5 @@ +/src +/test +/node_modules +rollup.config.js +tsconfig.json diff --git a/packages/codemirror-lang-graphql/README.md b/packages/codemirror-lang-graphql/README.md new file mode 100644 index 000000000..613036ca4 --- /dev/null +++ b/packages/codemirror-lang-graphql/README.md @@ -0,0 +1 @@ +A [CodeMirror 6](https://codemirror.net/6) language plugin for GraphQL \ No newline at end of file diff --git a/packages/codemirror-lang-graphql/package.json b/packages/codemirror-lang-graphql/package.json new file mode 100644 index 000000000..c147de81b --- /dev/null +++ b/packages/codemirror-lang-graphql/package.json @@ -0,0 +1,32 @@ +{ + "name": "@hoppscotch/codemirror-lang-graphql", + "version": "0.1.0", + "description": "GraphQL language support for CodeMirror", + "scripts": { + "test": "mocha test/test.js", + "prepare": "rollup -c" + }, + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.js", + "exports": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + }, + "types": "dist/index.d.ts", + "sideEffects": false, + "dependencies": { + "@codemirror/highlight": "^0.19.0", + "@codemirror/language": "^0.19.0", + "@lezer/lr": "^0.15.0" + }, + "devDependencies": { + "@lezer/generator": "^0.15.0", + "mocha": "^9.0.1", + "rollup": "^2.35.1", + "rollup-plugin-dts": "^3.0.2", + "rollup-plugin-ts": "^1.4.0", + "typescript": "^4.3.4" + }, + "license": "MIT" +} diff --git a/packages/codemirror-lang-graphql/rollup.config.js b/packages/codemirror-lang-graphql/rollup.config.js new file mode 100644 index 000000000..d8d87c181 --- /dev/null +++ b/packages/codemirror-lang-graphql/rollup.config.js @@ -0,0 +1,12 @@ +import typescript from "rollup-plugin-ts" +import {lezer} from "@lezer/generator/rollup" + +export default { + input: "src/index.ts", + external: id => id != "tslib" && !/^(\.?\/|\w:)/.test(id), + output: [ + {file: "dist/index.cjs", format: "cjs"}, + {dir: "./dist", format: "es"} + ], + plugins: [lezer(), typescript()] +} diff --git a/packages/codemirror-lang-graphql/src/index.ts b/packages/codemirror-lang-graphql/src/index.ts new file mode 100644 index 000000000..f889a9b67 --- /dev/null +++ b/packages/codemirror-lang-graphql/src/index.ts @@ -0,0 +1,35 @@ +import {parser} from "./syntax.grammar" +import {LRLanguage, LanguageSupport, indentNodeProp, foldNodeProp, foldInside, delimitedIndent} from "@codemirror/language" +import {styleTags, tags as t} from "@codemirror/highlight" + +export const GQLLanguage = LRLanguage.define({ + parser: parser.configure({ + props: [ + indentNodeProp.add({ + Application: delimitedIndent({closing: ")", align: false}) + }), + foldNodeProp.add({ + Application: foldInside + }), + styleTags({ + Name: t.propertyName, + OperationType: t.keyword, + BooleanValue: t.bool, + StringValue: t.string, + IntValue: t.number, + FloatValue: t.number, + NullValue: t.null, + ObjectValue: t.brace, + Comment: t.lineComment, + }) + ] + }), + languageData: { + commentTokens: { line: "#" }, + closeBrackets: { brackets: ["(", "[", "{", '"', '"""'] } + } +}) + +export function GQL() { + return new LanguageSupport(GQLLanguage) +} diff --git a/packages/codemirror-lang-graphql/src/syntax.grammar b/packages/codemirror-lang-graphql/src/syntax.grammar new file mode 100644 index 000000000..42f25a51a --- /dev/null +++ b/packages/codemirror-lang-graphql/src/syntax.grammar @@ -0,0 +1,368 @@ +@top SourceFile { + Document +} + +@precedence { + fieldDef @right, + typeDef @right +} + +Document { + Definition+ +} + +Definition { + ExecutableDefinition | + TypeSystemDefinition | + TypeSystemExtension +} + +ExecutableDefinition { + OperationDefinition | + FragmentDefinition +} + +TypeSystemDefinition { + SchemaDefinition | + TypeDefinition | + DirectiveDefinition +} + +TypeSystemExtension { + SchemaExtension | + TypeExtension +} + +SchemaDefinition { + Description? @specialize Directives? "{" RootOperationTypeDefinition+ "}" +} + +SchemaExtension { + @specialize @specialize Directives? "{" RootOperationTypeDefinition "}" +} + +TypeExtension { + ScalarTypeExtension | + ObjectTypeExtension | + InterfaceTypeExtension | + UnionTypeExtension | + EnumTypeExtension | + InputObjectTypeExtension +} + +ScalarTypeExtension { + @specialize @specialize Name Directives +} + +ObjectTypeExtension /* precedence: right 0 */ { + @specialize @specialize Name ImplementsInterfaces? Directives? !typeDef FieldsDefinition | + @specialize @specialize Name ImplementsInterfaces? Directives? +} + +InterfaceTypeExtension /* precedence: right 0 */ { + @specialize @specialize Name ImplementsInterfaces? Directives? FieldsDefinition | + @specialize @specialize Name ImplementsInterfaces? Directives? +} + +UnionTypeExtension /* precedence: right 0 */ { + @specialize @specialize Name Directives? UnionMemberTypes | + @specialize @specialize Name Directives? +} + +EnumTypeExtension /* precedence: right 0 */ { + @specialize @specialize Name Directives? !typeDef EnumValuesDefinition | + @specialize @specialize Name Directives? +} + +InputObjectTypeExtension /* precedence: right 0 */ { + @specialize @specialize Name Directives? InputFieldsDefinition+ | + @specialize @specialize Name Directives? +} + +InputFieldsDefinition { + !fieldDef "{" InputValueDefinition+ "}" +} + +EnumValuesDefinition { + !fieldDef "{" EnumValueDefinition+ "}" +} + +EnumValueDefinition { + Description? EnumValue Directives? +} + +ImplementsInterfaces { + ImplementsInterfaces "&" NamedType | + @specialize "&"? NamedType +} + +FieldsDefinition { + !fieldDef "{" FieldDefinition+ "}" +} + +FieldDefinition { + Description? Name ArgumentsDefinition? ":" Type Directives? +} + +ArgumentsDefinition { + "(" InputValueDefinition+ ")" +} + +InputValueDefinition { + Description? Name ":" Type DefaultValue? Directives? +} + +DefaultValue { + "=" Value +} + +UnionMemberTypes { + UnionMemberTypes "|" NamedType | + "=" "|"? NamedType +} + +RootOperationTypeDefinition { + OperationType ":" NamedType +} + +OperationDefinition { + SelectionSet | + OperationType Name? VariableDefinitions? Directives? SelectionSet +} + +TypeDefinition { + ScalarTypeDefinition | + ObjectTypeDefinition | + InterfaceTypeDefinition | + UnionTypeDefinition | + EnumTypeDefinition | + InputObjectTypeDefinition +} + +ScalarTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name Directives? +} + +ObjectTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name ImplementsInterfaces? Directives? FieldsDefinition? +} + +InterfaceTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name ImplementsInterfaces? Directives? FieldsDefinition? +} + +UnionTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name Directives? UnionMemberTypes? +} + +EnumTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name Directives? !typeDef EnumValuesDefinition? +} + +InputObjectTypeDefinition /* precedence: right 0 */ { + Description? @specialize Name Directives? !typeDef InputFieldsDefinition? +} + +VariableDefinitions { + "(" VariableDefinition+ ")" +} + +VariableDefinition { + Variable ":" Type DefaultValue? Directives? Comma? +} + +SelectionSet { + "{" Selection+ "}" +} + +Selection { + Field | + InlineFragment | + FragmentSpread +} + +Field { + Alias? Name Arguments? Directive? SelectionSet? +} + +Alias { + Name ":" +} + +Arguments { + "(" Argument+ ")" +} + +Argument { + Name ":" Value +} + +Value { + Variable | + StringValue | + IntValue | + FloatValue | + BooleanValue | + NullValue | + EnumValue | + ListValue | + ObjectValue +} + +Variable { + "$" Name +} + +EnumValue { + Name +} + +ListValue { + "[" Value* "]" +} + +ObjectValue { + "{" ObjectField* "}" +} + +ObjectField { + Name ":" Value Comma? +} + +FragmentSpread { + "..." FragmentName Directives? +} + +FragmentDefinition { + @specialize FragmentName TypeCondition Directives? SelectionSet +} + +FragmentName { + Name +} + +InlineFragment { + "..." TypeCondition? Directives? SelectionSet +} + +TypeCondition { + @specialize NamedType +} + +Directives { + Directive+ +} + +Directive { + "@" Name Arguments? +} + +DirectiveDefinition /* precedence: right 1 */ { + Description? @specialize "@" Name ArgumentsDefinition? @specialize ? @specialize DirectiveLocations +} + +DirectiveLocations { + DirectiveLocations "|" DirectiveLocation | + "|"? DirectiveLocation +} + +DirectiveLocation { + ExecutableDirectiveLocation | + TypeSystemDirectiveLocation +} + +Type { + NamedType | + ListType | + NonNullType +} + +NamedType { + Name +} + +ListType { + "[" Type "]" +} + +NonNullType { + NamedType "!" | + ListType "!" +} + +Description { + StringValue +} + +OperationType { + @specialize + | @specialize + | @specialize +} + +BooleanValue { + @specialize + | @specialize +} + +NullValue { + @specialize +} + +ExecutableDirectiveLocation { + @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize +} + +TypeSystemDirectiveLocation { + @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize + | @specialize +} + +@skip { Whitespace | Comment } + +@tokens { + Whitespace { + std.whitespace + } + StringValue { + "\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\"" + } + IntValue { + "-"? "0" + | "-"? std.digit+ + } + + FloatValue { + IntValue ("." std.digit+ | ("e" | "E") IntValue+) + } + + @precedence { IntValue, FloatValue } + + Name { + $[_A-Za-z] $[_0-9A-Za-z]* + } + Comment { + "#" ![\n]* + } + Comma { + "," + } +} + +@detectDelim \ No newline at end of file diff --git a/packages/codemirror-lang-graphql/test/cases.txt b/packages/codemirror-lang-graphql/test/cases.txt new file mode 100644 index 000000000..0cc3621e7 --- /dev/null +++ b/packages/codemirror-lang-graphql/test/cases.txt @@ -0,0 +1 @@ +# TODO: Write Lezer Tests \ No newline at end of file diff --git a/packages/codemirror-lang-graphql/test/test.js b/packages/codemirror-lang-graphql/test/test.js new file mode 100644 index 000000000..5011a420b --- /dev/null +++ b/packages/codemirror-lang-graphql/test/test.js @@ -0,0 +1,17 @@ +import {GQLLanguage} from "../dist/index.js" +import {fileTests} from "lezer-generator/dist/test" + +import * as fs from "fs" +import * as path from "path" +import { fileURLToPath } from 'url'; +let caseDir = path.dirname(fileURLToPath(import.meta.url)) + +for (let file of fs.readdirSync(caseDir)) { + if (!/\.txt$/.test(file)) continue + + let name = /^[^\.]*/.exec(file)[0] + describe(name, () => { + for (let {name, run} of fileTests(fs.readFileSync(path.join(caseDir, file), "utf8"), file)) + it(name, () => run(GQLLanguage.parser)) + }) +} diff --git a/packages/codemirror-lang-graphql/tsconfig.json b/packages/codemirror-lang-graphql/tsconfig.json new file mode 100644 index 000000000..d87615219 --- /dev/null +++ b/packages/codemirror-lang-graphql/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "strict": true, + "target": "es6", + "module": "es2020", + "newLine": "lf", + "declaration": true, + "moduleResolution": "node" + }, + "include": ["src/*.ts"] +} diff --git a/packages/hoppscotch-app/components/graphql/RequestOptions.vue b/packages/hoppscotch-app/components/graphql/RequestOptions.vue index 782a6158b..77c751e38 100644 --- a/packages/hoppscotch-app/components/graphql/RequestOptions.vue +++ b/packages/hoppscotch-app/components/graphql/RequestOptions.vue @@ -307,7 +307,7 @@ import { makeGQLHistoryEntry, addGraphqlHistoryEntry } from "~/newstore/history" import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics" import { getCurrentStrategyID } from "~/helpers/network" import { makeGQLRequest } from "~/helpers/types/HoppGQLRequest" -import { useCodemirror } from "~/helpers/editor/codemirror" +import { useNewCodemirror as useCodemirror } from "~/helpers/editor/codemirror" import "codemirror/mode/javascript/javascript" import "~/helpers/editor/modes/graphql" import jsonLinter from "~/helpers/editor/linting/json" diff --git a/packages/hoppscotch-app/helpers/editor/codemirror.ts b/packages/hoppscotch-app/helpers/editor/codemirror.ts index 62a755f76..ac59e6ea0 100644 --- a/packages/hoppscotch-app/helpers/editor/codemirror.ts +++ b/packages/hoppscotch-app/helpers/editor/codemirror.ts @@ -43,6 +43,7 @@ import { watch, onMounted, ref, Ref, useContext } from "@nuxtjs/composition-api" import { javascriptLanguage } from "@codemirror/lang-javascript" import { jsonLanguage } from "@codemirror/lang-json" +import { GQLLanguage } from "@hoppscotch/codemirror-lang-graphql" import { onBeforeUnmount } from "@vue/runtime-dom" import { pipe } from "fp-ts/function" import * as O from "fp-ts/Option" @@ -304,6 +305,8 @@ const getLanguage = (langMime: string): Language | null => { return jsonLanguage } else if (langMime === "application/javascript") { return javascriptLanguage + } else if (langMime === "graphql") { + return GQLLanguage } // None matched, so return null diff --git a/packages/hoppscotch-app/package.json b/packages/hoppscotch-app/package.json index 5fb794e4b..30a2df3c3 100644 --- a/packages/hoppscotch-app/package.json +++ b/packages/hoppscotch-app/package.json @@ -45,6 +45,7 @@ "@codemirror/state": "^0.19.3", "@codemirror/text": "^0.19.5", "@codemirror/view": "^0.19.12", + "@hoppscotch/codemirror-lang-graphql": "workspace:^0.1.0", "@hoppscotch/js-sandbox": "workspace:^1.0.0", "@nuxtjs/axios": "^5.13.6", "@nuxtjs/composition-api": "^0.29.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0b70e12bf..8a1450980 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,6 +15,29 @@ importers: '@commitlint/cli': 14.1.0 '@commitlint/config-conventional': 14.1.0 + packages/codemirror-lang-graphql: + specifiers: + '@codemirror/highlight': ^0.19.0 + '@codemirror/language': ^0.19.0 + '@lezer/generator': ^0.15.0 + '@lezer/lr': ^0.15.0 + mocha: ^9.0.1 + rollup: ^2.35.1 + rollup-plugin-dts: ^3.0.2 + rollup-plugin-ts: ^1.4.0 + typescript: ^4.3.4 + dependencies: + '@codemirror/highlight': 0.19.6 + '@codemirror/language': 0.19.3 + '@lezer/lr': 0.15.4 + devDependencies: + '@lezer/generator': 0.15.2 + mocha: 9.1.3 + rollup: 2.59.0 + rollup-plugin-dts: 3.0.2_rollup@2.59.0+typescript@4.4.4 + rollup-plugin-ts: 1.4.7_rollup@2.59.0+typescript@4.4.4 + typescript: 4.4.4 + packages/hoppscotch-app: specifiers: '@apollo/client': ^3.4.16 @@ -39,6 +62,7 @@ importers: '@graphql-codegen/typescript-urql-graphcache': ^2.2.0 '@graphql-codegen/urql-introspection': ^2.1.0 '@graphql-typed-document-node/core': ^3.1.0 + '@hoppscotch/codemirror-lang-graphql': workspace:^0.1.0 '@hoppscotch/js-sandbox': workspace:^1.0.0 '@nuxt/types': ^2.15.8 '@nuxt/typescript-build': ^2.1.0 @@ -147,6 +171,7 @@ importers: '@codemirror/state': 0.19.3 '@codemirror/text': 0.19.5 '@codemirror/view': 0.19.12 + '@hoppscotch/codemirror-lang-graphql': link:../codemirror-lang-graphql '@hoppscotch/js-sandbox': link:../hoppscotch-js-sandbox '@nuxtjs/axios': 5.13.6 '@nuxtjs/composition-api': 0.29.3_nuxt@2.15.8 @@ -1446,7 +1471,6 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color - dev: false /@babel/plugin-transform-shorthand-properties/7.16.0_@babel+core@7.16.0: resolution: {integrity: sha512-iVb1mTcD8fuhSv3k99+5tlXu5N0v8/DPm2mO3WACLG6al1CGZH7v09HJyUb1TtYl/Z+KrM6pHSIJdZxP5A+xow==} @@ -3696,7 +3720,14 @@ packages: /@lezer/common/0.15.7: resolution: {integrity: sha512-Rw8TDJnBzZnkyzIXs1Tmmd241FrBLJBj8gkdy3y0joGFb8Z4I/joKEsR+gv1pb13o1TMsZxm3fmP+d/wPt2CTQ==} - dev: false + + /@lezer/generator/0.15.2: + resolution: {integrity: sha512-nxY6TTj0ZAcAvg1zEeaZnt1xODdyPhD0lTaPOgcGOVFHhwwx0Oz7CxZB7Rh+xRCXFr5kJWDtM1uXPp80UZjhAg==} + hasBin: true + dependencies: + '@lezer/common': 0.15.7 + '@lezer/lr': 0.15.4 + dev: true /@lezer/javascript/0.15.0: resolution: {integrity: sha512-euFjbbyYmxpBls9FyBAKnGLEjaMFqfHvhfueA7M1PitZdieHu8KSblutmcwjpWKIV4eH4uElMZO2cPVe0aFxXA==} @@ -3714,7 +3745,10 @@ packages: resolution: {integrity: sha512-vwgG80sihEGJn6wJp6VijXrnzVai/KPva/OzYKaWvIx0IiXKjoMQ8UAwcgpSBwfS4Fbz3IKOX/cCNXU3r1FvpQ==} dependencies: '@lezer/common': 0.15.7 - dev: false + + /@mdn/browser-compat-data/4.0.9: + resolution: {integrity: sha512-6Viqyrqpb7fVXJ5VoIIu5UdQR9ftk1kvh4X40FQhy5IOFnawQ38CpEZw34ZPOtpVed72W27m3gRSJo+4qAFuqA==} + dev: true /@microsoft/fetch-event-source/2.0.1: resolution: {integrity: sha512-W6CLUJ2eBMw3Rec70qrsEW0jOm/3twwJv21mrmj2yORiaVmVYGS4sSS5yUwvQc1ZlDLYGPnClVWmUUMagKNsfA==} @@ -5067,6 +5101,10 @@ packages: resolution: {integrity: sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA==} dev: false + /@types/node/15.14.9: + resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} + dev: true + /@types/node/16.11.6: resolution: {integrity: sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==} @@ -5074,6 +5112,10 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/object-path/0.11.1: + resolution: {integrity: sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==} + dev: true + /@types/optimize-css-assets-webpack-plugin/5.0.3: resolution: {integrity: sha512-PJgbI4KplJfyxKWVrBbEL+rePEBqeozJRMT0mBL3ynhvngASBV/XJ+BneLuJN74RjjMzO0gA5ns80mgubQdZAA==} dependencies: @@ -5130,6 +5172,10 @@ packages: '@types/node': 12.20.36 dev: false + /@types/semver/7.3.9: + resolution: {integrity: sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==} + dev: true + /@types/serve-static/1.13.9: resolution: {integrity: sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA==} dependencies: @@ -5189,6 +5235,10 @@ packages: /@types/throttle-debounce/2.1.0: resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==} + /@types/ua-parser-js/0.7.36: + resolution: {integrity: sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==} + dev: true + /@types/uglify-js/3.13.1: resolution: {integrity: sha512-O3MmRAk6ZuAKa9CHgg0Pr0+lUOqoMLpc9AS4R8ano2auvsg7IE8syF3Xh/NPr26TWklxYcqoEEFdzLLs1fV9PQ==} dependencies: @@ -5393,6 +5443,10 @@ packages: eslint-visitor-keys: 3.0.0 dev: true + /@ungap/promise-all-settled/1.1.2: + resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} + dev: true + /@urql/core/2.3.4_graphql@15.7.2: resolution: {integrity: sha512-KXeR55ONqkTZ2gwNgyFGJEGRp1/jEnyqkFjEguknnG6GFaikAwAX0TMijKcX6ZQ4qE59cDtVEtSbqpVkd9XNmA==} peerDependencies: @@ -5739,6 +5793,11 @@ packages: '@xtuc/long': 4.2.2 dev: false + /@wessberg/stringutil/1.0.19: + resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} + engines: {node: '>=8.0.0'} + dev: true + /@windicss/config/1.4.12: resolution: {integrity: sha512-+ckfkRoWC8wia5o7iCyDmydiJEkjX6lVEb6a2QVPI9WQ9Mi7hqfgOoStijOsEn0wIz95FDiOfVe5aSb1V4jEtw==} dependencies: @@ -7122,6 +7181,10 @@ packages: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} dev: true + /browser-stdout/1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + dev: true + /browserify-aes/1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} dependencies: @@ -7177,6 +7240,34 @@ packages: pako: 1.0.11 dev: false + /browserslist-generator/1.0.64: + resolution: {integrity: sha512-70g7RMq7eKVc2NnvybDtF+G6A6vVnF5fLXJ3qQqiquDb5t8O2OWUzux0F2/+Z7Cix9ZR1NdTfaAQl9AZyCB3Dw==} + engines: {node: '>=8.0.0'} + dependencies: + '@mdn/browser-compat-data': 4.0.9 + '@types/object-path': 0.11.1 + '@types/semver': 7.3.9 + '@types/ua-parser-js': 0.7.36 + browserslist: 4.17.1 + caniuse-lite: 1.0.30001274 + isbot: 3.3.3 + object-path: 0.11.8 + semver: 7.3.5 + ua-parser-js: 0.7.31 + dev: true + + /browserslist/4.17.1: + resolution: {integrity: sha512-aLD0ZMDSnF4lUt4ZDNgqi5BUn9BZ7YdQdI/cYlILrhdSSZJLU9aNZoD5/NBmM4SK34APB2e83MOsRt1EnkuyaQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001274 + electron-to-chromium: 1.3.886 + escalade: 3.1.1 + nanocolors: 0.1.12 + node-releases: 1.1.77 + dev: true + /browserslist/4.17.5: resolution: {integrity: sha512-I3ekeB92mmpctWBoLXe0d5wPS2cBuRvvW0JyyJHMrk9/HmP2ZjrTboNAZ8iuGqaEIlKguljbQY32OkOJIRrgoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -7925,6 +8016,16 @@ packages: dot-prop: 5.3.0 dev: true + /compatfactory/0.0.9_typescript@4.4.4: + resolution: {integrity: sha512-WzoRZSBtsC5TT2J+MZNlo4Qpssf7ofSaRJUT3hN8nNeGilKOnTjR707k+hUU7QhVbyg3cmfWJlabTfMZgZtvEA==} + engines: {node: '>=10.0.0'} + peerDependencies: + typescript: '>=3.x || >= 4.x' + dependencies: + helpertypes: 0.0.4 + typescript: 4.4.4 + dev: true + /component-bind/1.0.0: resolution: {integrity: sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=} dev: false @@ -8264,6 +8365,13 @@ packages: undici: 4.9.5 dev: true + /crosspath/0.0.9: + resolution: {integrity: sha512-lhDiWhqHk1IQ0BiGN9/Ji7qEr9LwCG8taDCTgihII/6b91my+GvTNXDB7eKh/FySz488tkt2IboqBJTSZtc4Fw==} + engines: {node: '>=10.0.0'} + dependencies: + '@types/node': 15.14.9 + dev: true + /crypto-browserify/3.12.0: resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} dependencies: @@ -8601,7 +8709,6 @@ packages: dependencies: ms: 2.1.2 supports-color: 8.1.1 - dev: false /decamelize-keys/1.1.0: resolution: {integrity: sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=} @@ -8615,6 +8722,11 @@ packages: resolution: {integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=} engines: {node: '>=0.10.0'} + /decamelize/4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + dev: true + /decimal.js/10.3.1: resolution: {integrity: sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==} dev: true @@ -8789,6 +8901,11 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + /diff/5.0.0: + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} + dev: true + /diffie-hellman/5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} dependencies: @@ -10478,7 +10595,6 @@ packages: minimatch: 3.0.4 once: 1.4.0 path-is-absolute: 1.0.1 - dev: false /glob/7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} @@ -10852,6 +10968,11 @@ packages: engines: {node: '>= 10.x'} dev: false + /growl/1.10.5: + resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} + engines: {node: '>=4.x'} + dev: true + /gzip-size/6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -11020,6 +11141,11 @@ packages: capital-case: 1.0.4 tslib: 2.3.1 + /helpertypes/0.0.4: + resolution: {integrity: sha512-q8f29R4Rdw9n5L4vGmUR8Ld6CXbxPxA7Xrcs4vto3K6w0LSF13TnWSm67uDrZRulf3t/ZHKCfeZ0qIletxSEow==} + engines: {node: '>=10.0.0'} + dev: true + /hex-color-regex/1.1.0: resolution: {integrity: sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==} dev: false @@ -11792,6 +11918,11 @@ packages: resolution: {integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4=} engines: {node: '>=0.10.0'} + /is-plain-obj/2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: true + /is-plain-obj/3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} @@ -11950,6 +12081,11 @@ packages: resolution: {integrity: sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=} dev: false + /isbot/3.3.3: + resolution: {integrity: sha512-a3HFPPsvtLroqpuTHHJTaUpPHUO0vjPbptJDzJYkymRvOI8tugWM6zE2oq22w5VOq4A5hrX+YRS7VdIPAgWLfw==} + engines: {node: '>=12'} + dev: true + /isexe/2.0.0: resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} @@ -13672,6 +13808,37 @@ packages: resolution: {integrity: sha512-+5DdpxP48PpfV/FcP4j/8TREPycnROCg0hX1nmD6aoZ2lD4FpZI4sxWG6l6YpUktXi/vckj8NaAl3DVQSkIn3w==} dev: true + /mocha/9.1.3: + resolution: {integrity: sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw==} + engines: {node: '>= 12.0.0'} + hasBin: true + dependencies: + '@ungap/promise-all-settled': 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.2 + debug: 4.3.2_supports-color@8.1.1 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.1.7 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 3.0.4 + ms: 2.1.3 + nanoid: 3.1.25 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.1.5 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + dev: true + /moment/2.29.1: resolution: {integrity: sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==} dev: false @@ -13739,6 +13906,16 @@ packages: dev: false optional: true + /nanocolors/0.1.12: + resolution: {integrity: sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==} + dev: true + + /nanoid/3.1.25: + resolution: {integrity: sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /nanoid/3.1.30: resolution: {integrity: sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -13880,6 +14057,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /node-releases/1.1.77: + resolution: {integrity: sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==} + dev: true + /node-releases/2.0.1: resolution: {integrity: sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==} @@ -14112,7 +14293,6 @@ packages: /object-path/0.11.8: resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} engines: {node: '>= 10.12.0'} - dev: false /object-treeify/1.1.33: resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==} @@ -15687,7 +15867,6 @@ packages: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 - dev: false /randomfill/1.0.4: resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} @@ -16135,6 +16314,62 @@ packages: sprintf-js: 1.1.2 dev: false + /rollup-plugin-dts/3.0.2_rollup@2.59.0+typescript@4.4.4: + resolution: {integrity: sha512-hswlsdWu/x7k5pXzaLP6OvKRKcx8Bzprksz9i9mUe72zvt8LvqAb/AZpzs6FkLgmyRaN8B6rUQOVtzA3yEt9Yw==} + engines: {node: '>=v12.22.1'} + peerDependencies: + rollup: ^2.48.0 + typescript: ^4.2.4 + dependencies: + magic-string: 0.25.7 + rollup: 2.59.0 + typescript: 4.4.4 + optionalDependencies: + '@babel/code-frame': 7.16.0 + dev: true + + /rollup-plugin-ts/1.4.7_rollup@2.59.0+typescript@4.4.4: + resolution: {integrity: sha512-Qvmu8GVQ1+F4wcfr+S9iWVcG2PCLZMZ85ZpCZm5zTFmX2Z7hLbXePOWuReWO+7/fS3F1ysUzj/smFYQd026Juw==} + engines: {node: '>=10.0.0'} + peerDependencies: + rollup: '>=1.x || >=2.x' + typescript: '>=3.2.x || >= 4.x' + dependencies: + '@babel/core': 7.16.0 + '@babel/plugin-proposal-async-generator-functions': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-proposal-json-strings': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-proposal-object-rest-spread': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-proposal-optional-catch-binding': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-proposal-unicode-property-regex': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.16.0 + '@babel/plugin-transform-runtime': 7.16.0_@babel+core@7.16.0 + '@babel/preset-env': 7.16.0_@babel+core@7.16.0 + '@babel/runtime': 7.16.0 + '@rollup/pluginutils': 4.1.1 + '@types/babel__core': 7.1.16 + '@wessberg/stringutil': 1.0.19 + browserslist: 4.17.5 + browserslist-generator: 1.0.64 + chalk: 4.1.2 + compatfactory: 0.0.9_typescript@4.4.4 + crosspath: 0.0.9 + magic-string: 0.25.7 + rollup: 2.59.0 + ts-clone-node: 0.3.28_typescript@4.4.4 + tslib: 2.3.1 + typescript: 4.4.4 + transitivePeerDependencies: + - supports-color + dev: true + + /rollup/2.59.0: + resolution: {integrity: sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /run-async/2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -16402,6 +16637,12 @@ packages: randombytes: 2.1.0 dev: false + /serialize-javascript/6.0.0: + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + dependencies: + randombytes: 2.1.0 + dev: true + /serve-placeholder/1.2.4: resolution: {integrity: sha512-jWD9cZXLcr4vHTTL5KEPIUBUYyOWN/z6v/tn0l6XxFhi9iqV3Fc5Y1aFeduUyz+cx8sALzGCUczkPfeOlrq9jg==} dependencies: @@ -17713,6 +17954,16 @@ packages: engines: {node: '>=8'} dev: true + /ts-clone-node/0.3.28_typescript@4.4.4: + resolution: {integrity: sha512-NHNYN/memcKz+9QDSO6+7r4QtlFQSV2lOWG1yZFWWO/3KrmRFdariuvgdwonvRMaKEuWScAk3ucPm3m312u4JQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + typescript: ^3.x || ^4.x + dependencies: + compatfactory: 0.0.9_typescript@4.4.4 + typescript: 4.4.4 + dev: true + /ts-invariant/0.3.3: resolution: {integrity: sha512-UReOKsrJFGC9tUblgSRWo+BsVNbEd77Cl6WiV/XpMlkifXwNIJbknViCucHvVZkXSC/mcWeRnIGdY7uprcwvdQ==} dependencies: @@ -18996,6 +19247,10 @@ packages: schema-utils: 3.1.1 dev: true + /workerpool/6.1.5: + resolution: {integrity: sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==} + dev: true + /wrap-ansi/3.0.1: resolution: {integrity: sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=} engines: {node: '>=4'} @@ -19189,10 +19444,25 @@ packages: camelcase: 5.3.1 decamelize: 1.2.0 + /yargs-parser/20.2.4: + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} + dev: true + /yargs-parser/20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} + /yargs-unparser/2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + dependencies: + camelcase: 6.2.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + dev: true + /yargs/15.4.1: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} engines: {node: '>=8'}