@weavelogic/knowledge-graph-agent 0.3.0 → 0.6.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/README.md +374 -427
- package/dist/_virtual/ExpiringCache.js +5 -0
- package/dist/_virtual/ExpiringCache.js.map +1 -0
- package/dist/_virtual/___vite-browser-external.js +7 -0
- package/dist/_virtual/___vite-browser-external.js.map +1 -0
- package/dist/_virtual/__vite-browser-external.js +5 -0
- package/dist/_virtual/__vite-browser-external.js.map +1 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +7 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +27 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/_virtual/assert-valid-pattern.js +5 -0
- package/dist/_virtual/assert-valid-pattern.js.map +1 -0
- package/dist/_virtual/ast-converter.js +5 -0
- package/dist/_virtual/ast-converter.js.map +1 -0
- package/dist/_virtual/ast-spec.js +5 -0
- package/dist/_virtual/ast-spec.js.map +1 -0
- package/dist/_virtual/ast.js +5 -0
- package/dist/_virtual/ast.js.map +1 -0
- package/dist/_virtual/brace-expressions.js +5 -0
- package/dist/_virtual/brace-expressions.js.map +1 -0
- package/dist/_virtual/browser.js +6 -0
- package/dist/_virtual/browser.js.map +1 -0
- package/dist/_virtual/browser2.js +5 -0
- package/dist/_virtual/browser2.js.map +1 -0
- package/dist/_virtual/candidateTSConfigRootDirs.js +5 -0
- package/dist/_virtual/candidateTSConfigRootDirs.js.map +1 -0
- package/dist/_virtual/check-modifiers.js +5 -0
- package/dist/_virtual/check-modifiers.js.map +1 -0
- package/dist/_virtual/clear-caches.js +5 -0
- package/dist/_virtual/clear-caches.js.map +1 -0
- package/dist/_virtual/compilerOptions.js +5 -0
- package/dist/_virtual/compilerOptions.js.map +1 -0
- package/dist/_virtual/convert-comments.js +5 -0
- package/dist/_virtual/convert-comments.js.map +1 -0
- package/dist/_virtual/convert.js +5 -0
- package/dist/_virtual/convert.js.map +1 -0
- package/dist/_virtual/createIsolatedProgram.js +5 -0
- package/dist/_virtual/createIsolatedProgram.js.map +1 -0
- package/dist/_virtual/createParseSettings.js +5 -0
- package/dist/_virtual/createParseSettings.js.map +1 -0
- package/dist/_virtual/createParserServices.js +5 -0
- package/dist/_virtual/createParserServices.js.map +1 -0
- package/dist/_virtual/createProjectProgram.js +5 -0
- package/dist/_virtual/createProjectProgram.js.map +1 -0
- package/dist/_virtual/createProjectProgramError.js +5 -0
- package/dist/_virtual/createProjectProgramError.js.map +1 -0
- package/dist/_virtual/createProjectService.js +5 -0
- package/dist/_virtual/createProjectService.js.map +1 -0
- package/dist/_virtual/createSourceFile.js +5 -0
- package/dist/_virtual/createSourceFile.js.map +1 -0
- package/dist/_virtual/describeFilePath.js +5 -0
- package/dist/_virtual/describeFilePath.js.map +1 -0
- package/dist/_virtual/escape.js +5 -0
- package/dist/_virtual/escape.js.map +1 -0
- package/dist/_virtual/eslint-visitor-keys.js +5 -0
- package/dist/_virtual/eslint-visitor-keys.js.map +1 -0
- package/dist/_virtual/estree-to-ts-node-types.js +5 -0
- package/dist/_virtual/estree-to-ts-node-types.js.map +1 -0
- package/dist/_virtual/get-keys.js +5 -0
- package/dist/_virtual/get-keys.js.map +1 -0
- package/dist/_virtual/getModifiers.js +5 -0
- package/dist/_virtual/getModifiers.js.map +1 -0
- package/dist/_virtual/getParsedConfigFile.js +5 -0
- package/dist/_virtual/getParsedConfigFile.js.map +1 -0
- package/dist/_virtual/getParsedConfigFileFromTSServer.js +5 -0
- package/dist/_virtual/getParsedConfigFileFromTSServer.js.map +1 -0
- package/dist/_virtual/getProjectConfigFiles.js +5 -0
- package/dist/_virtual/getProjectConfigFiles.js.map +1 -0
- package/dist/_virtual/getScriptKind.js +5 -0
- package/dist/_virtual/getScriptKind.js.map +1 -0
- package/dist/_virtual/getWatchProgramsForProjects.js +5 -0
- package/dist/_virtual/getWatchProgramsForProjects.js.map +1 -0
- package/dist/_virtual/global-ponyfill.js +9 -0
- package/dist/_virtual/global-ponyfill.js.map +1 -0
- package/dist/_virtual/global-ponyfill2.js +5 -0
- package/dist/_virtual/global-ponyfill2.js.map +1 -0
- package/dist/_virtual/index.js +2 -4
- package/dist/_virtual/index.js.map +1 -1
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/_virtual/inferSingleRun.js +5 -0
- package/dist/_virtual/inferSingleRun.js.map +1 -0
- package/dist/_virtual/lib.js +5 -0
- package/dist/_virtual/lib.js.map +1 -0
- package/dist/_virtual/node-utils.js +5 -0
- package/dist/_virtual/node-utils.js.map +1 -0
- package/dist/_virtual/parser-options.js +5 -0
- package/dist/_virtual/parser-options.js.map +1 -0
- package/dist/_virtual/parser.js +5 -0
- package/dist/_virtual/parser.js.map +1 -0
- package/dist/_virtual/re.js +5 -0
- package/dist/_virtual/re.js.map +1 -0
- package/dist/_virtual/resolveProjectList.js +5 -0
- package/dist/_virtual/resolveProjectList.js.map +1 -0
- package/dist/_virtual/semantic-or-syntactic-errors.js +5 -0
- package/dist/_virtual/semantic-or-syntactic-errors.js.map +1 -0
- package/dist/_virtual/shared.js +5 -0
- package/dist/_virtual/shared.js.map +1 -0
- package/dist/_virtual/simple-traverse.js +5 -0
- package/dist/_virtual/simple-traverse.js.map +1 -0
- package/dist/_virtual/source-files.js +5 -0
- package/dist/_virtual/source-files.js.map +1 -0
- package/dist/_virtual/ts-estree.js +5 -0
- package/dist/_virtual/ts-estree.js.map +1 -0
- package/dist/_virtual/ts-nodes.js +5 -0
- package/dist/_virtual/ts-nodes.js.map +1 -0
- package/dist/_virtual/tsserverlibrary.js +5 -0
- package/dist/_virtual/tsserverlibrary.js.map +1 -0
- package/dist/_virtual/typescript.js +5 -0
- package/dist/_virtual/typescript.js.map +1 -0
- package/dist/_virtual/unescape.js +5 -0
- package/dist/_virtual/unescape.js.map +1 -0
- package/dist/_virtual/useProgramFromProjectService.js +5 -0
- package/dist/_virtual/useProgramFromProjectService.js.map +1 -0
- package/dist/_virtual/useProvidedPrograms.js +5 -0
- package/dist/_virtual/useProvidedPrograms.js.map +1 -0
- package/dist/_virtual/utils.js +5 -0
- package/dist/_virtual/utils.js.map +1 -0
- package/dist/_virtual/validateDefaultProjectForFilesGlob.js +5 -0
- package/dist/_virtual/validateDefaultProjectForFilesGlob.js.map +1 -0
- package/dist/_virtual/version-check.js +5 -0
- package/dist/_virtual/version-check.js.map +1 -0
- package/dist/_virtual/version.js +5 -0
- package/dist/_virtual/version.js.map +1 -0
- package/dist/_virtual/visitor-keys.js +5 -0
- package/dist/_virtual/visitor-keys.js.map +1 -0
- package/dist/_virtual/warnAboutTSVersion.js +5 -0
- package/dist/_virtual/warnAboutTSVersion.js.map +1 -0
- package/dist/_virtual/withoutProjectParserOptions.js +5 -0
- package/dist/_virtual/withoutProjectParserOptions.js.map +1 -0
- package/dist/_virtual/xhtml-entities.js +5 -0
- package/dist/_virtual/xhtml-entities.js.map +1 -0
- package/dist/audit/config.d.ts +150 -0
- package/dist/audit/config.d.ts.map +1 -0
- package/dist/audit/config.js +111 -0
- package/dist/audit/config.js.map +1 -0
- package/dist/audit/index.d.ts +38 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/services/audit-chain.d.ts +276 -0
- package/dist/audit/services/audit-chain.d.ts.map +1 -0
- package/dist/audit/services/audit-chain.js +502 -0
- package/dist/audit/services/audit-chain.js.map +1 -0
- package/dist/audit/services/index.d.ts +11 -0
- package/dist/audit/services/index.d.ts.map +1 -0
- package/dist/audit/services/syndication.d.ts +334 -0
- package/dist/audit/services/syndication.d.ts.map +1 -0
- package/dist/audit/services/syndication.js +589 -0
- package/dist/audit/services/syndication.js.map +1 -0
- package/dist/audit/types.d.ts +453 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +21 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +621 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +14 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +271 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/plugin.d.ts +14 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +784 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +15 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +252 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/vector.d.ts +14 -0
- package/dist/cli/commands/vector.d.ts.map +1 -0
- package/dist/cli/commands/vector.js +429 -0
- package/dist/cli/commands/vector.js.map +1 -0
- package/dist/cli/commands/workflow.d.ts +12 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +471 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +54 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/config/manager.js +325 -0
- package/dist/config/manager.js.map +1 -0
- package/dist/dashboard-server/index.d.ts +31 -0
- package/dist/dashboard-server/index.d.ts.map +1 -0
- package/dist/dashboard-server/server.d.ts +205 -0
- package/dist/dashboard-server/server.d.ts.map +1 -0
- package/dist/dashboard-server/server.js +651 -0
- package/dist/dashboard-server/server.js.map +1 -0
- package/dist/database/schemas/index.d.ts +85 -0
- package/dist/database/schemas/index.d.ts.map +1 -0
- package/dist/graphql/context.d.ts +154 -0
- package/dist/graphql/context.d.ts.map +1 -0
- package/dist/graphql/context.js +168 -0
- package/dist/graphql/context.js.map +1 -0
- package/dist/graphql/index.d.ts +12 -0
- package/dist/graphql/index.d.ts.map +1 -0
- package/dist/graphql/pubsub.d.ts +282 -0
- package/dist/graphql/pubsub.d.ts.map +1 -0
- package/dist/graphql/resolvers/index.d.ts +519 -0
- package/dist/graphql/resolvers/index.d.ts.map +1 -0
- package/dist/graphql/resolvers/mutations.d.ts +255 -0
- package/dist/graphql/resolvers/mutations.d.ts.map +1 -0
- package/dist/graphql/resolvers/queries.d.ts +451 -0
- package/dist/graphql/resolvers/queries.d.ts.map +1 -0
- package/dist/graphql/resolvers/subscriptions.d.ts +399 -0
- package/dist/graphql/resolvers/subscriptions.d.ts.map +1 -0
- package/dist/graphql/scalars.d.ts +89 -0
- package/dist/graphql/scalars.d.ts.map +1 -0
- package/dist/graphql/scalars.js +242 -0
- package/dist/graphql/scalars.js.map +1 -0
- package/dist/graphql/server.d.ts +122 -0
- package/dist/graphql/server.d.ts.map +1 -0
- package/dist/graphql/server.js +368 -0
- package/dist/graphql/server.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +115 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/handlers/index.js +1 -1
- package/dist/mcp-server/server.js +2 -2
- package/dist/mcp-server/tools/audit/checkpoint.d.ts +58 -0
- package/dist/mcp-server/tools/audit/checkpoint.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/checkpoint.js +73 -0
- package/dist/mcp-server/tools/audit/checkpoint.js.map +1 -0
- package/dist/mcp-server/tools/audit/index.d.ts +53 -0
- package/dist/mcp-server/tools/audit/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/index.js +12 -0
- package/dist/mcp-server/tools/audit/index.js.map +1 -0
- package/dist/mcp-server/tools/audit/query.d.ts +58 -0
- package/dist/mcp-server/tools/audit/query.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/query.js +125 -0
- package/dist/mcp-server/tools/audit/query.js.map +1 -0
- package/dist/mcp-server/tools/audit/sync.d.ts +58 -0
- package/dist/mcp-server/tools/audit/sync.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/sync.js +126 -0
- package/dist/mcp-server/tools/audit/sync.js.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +3 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/registry.js +90 -0
- package/dist/mcp-server/tools/registry.js.map +1 -1
- package/dist/mcp-server/tools/vector/index.d.ts +12 -0
- package/dist/mcp-server/tools/vector/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/index.js +12 -0
- package/dist/mcp-server/tools/vector/index.js.map +1 -0
- package/dist/mcp-server/tools/vector/search.d.ts +41 -0
- package/dist/mcp-server/tools/vector/search.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/search.js +224 -0
- package/dist/mcp-server/tools/vector/search.js.map +1 -0
- package/dist/mcp-server/tools/vector/trajectory.d.ts +39 -0
- package/dist/mcp-server/tools/vector/trajectory.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/trajectory.js +170 -0
- package/dist/mcp-server/tools/vector/trajectory.js.map +1 -0
- package/dist/mcp-server/tools/vector/upsert.d.ts +44 -0
- package/dist/mcp-server/tools/vector/upsert.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/upsert.js +175 -0
- package/dist/mcp-server/tools/vector/upsert.js.map +1 -0
- package/dist/mcp-server/tools/workflow/index.d.ts +29 -0
- package/dist/mcp-server/tools/workflow/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/index.js +12 -0
- package/dist/mcp-server/tools/workflow/index.js.map +1 -0
- package/dist/mcp-server/tools/workflow/list.d.ts +41 -0
- package/dist/mcp-server/tools/workflow/list.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/list.js +195 -0
- package/dist/mcp-server/tools/workflow/list.js.map +1 -0
- package/dist/mcp-server/tools/workflow/start.d.ts +40 -0
- package/dist/mcp-server/tools/workflow/start.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/start.js +165 -0
- package/dist/mcp-server/tools/workflow/start.js.map +1 -0
- package/dist/mcp-server/tools/workflow/status.d.ts +38 -0
- package/dist/mcp-server/tools/workflow/status.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/status.js +97 -0
- package/dist/mcp-server/tools/workflow/status.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/create.js +31 -0
- package/dist/node_modules/@envelop/core/esm/create.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/document-string-map.js +5 -0
- package/dist/node_modules/@envelop/core/esm/document-string-map.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/orchestrator.js +407 -0
- package/dist/node_modules/@envelop/core/esm/orchestrator.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-engine.js +29 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-engine.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-extend-context.js +10 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-extend-context.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-masked-errors.js +86 -0
- package/dist/node_modules/@envelop/core/esm/plugins/use-masked-errors.js.map +1 -0
- package/dist/node_modules/@envelop/core/esm/utils.js +129 -0
- package/dist/node_modules/@envelop/core/esm/utils.js.map +1 -0
- package/dist/node_modules/@envelop/instrumentation/esm/instrumentation.js +51 -0
- package/dist/node_modules/@envelop/instrumentation/esm/instrumentation.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/coerceError.js +26 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/coerceError.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/execute.js +1101 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/execute.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/flattenAsyncIterable.js +72 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/flattenAsyncIterable.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/invariant.js +9 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/invariant.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/normalizedExecutor.js +22 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/normalizedExecutor.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/promiseForObject.js +26 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/promiseForObject.js.map +1 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/values.js +73 -0
- package/dist/node_modules/@graphql-tools/executor/esm/execution/values.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/extensions.js +46 -0
- package/dist/node_modules/@graphql-tools/merge/esm/extensions.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/links.js +142 -0
- package/dist/node_modules/@graphql-tools/merge/esm/links.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/merge-resolvers.js +27 -0
- package/dist/node_modules/@graphql-tools/merge/esm/merge-resolvers.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js +23 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js +113 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum-values.js +39 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum-values.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js +23 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/fields.js +74 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/fields.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js +27 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js +29 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-named-type-array.js +15 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-named-type-array.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js +81 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js +142 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js +21 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js +36 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js +29 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js +24 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js.map +1 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js +67 -0
- package/dist/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js.map +1 -0
- package/dist/node_modules/@graphql-tools/schema/esm/addResolversToSchema.js +287 -0
- package/dist/node_modules/@graphql-tools/schema/esm/addResolversToSchema.js.map +1 -0
- package/dist/node_modules/@graphql-tools/schema/esm/assertResolversPresent.js +42 -0
- package/dist/node_modules/@graphql-tools/schema/esm/assertResolversPresent.js.map +1 -0
- package/dist/node_modules/@graphql-tools/schema/esm/checkForResolveTypeResolver.js +22 -0
- package/dist/node_modules/@graphql-tools/schema/esm/checkForResolveTypeResolver.js.map +1 -0
- package/dist/node_modules/@graphql-tools/schema/esm/extendResolversFromInterfaces.js +34 -0
- package/dist/node_modules/@graphql-tools/schema/esm/extendResolversFromInterfaces.js.map +1 -0
- package/dist/node_modules/@graphql-tools/schema/esm/makeExecutableSchema.js +50 -0
- package/dist/node_modules/@graphql-tools/schema/esm/makeExecutableSchema.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/AccumulatorMap.js +17 -0
- package/dist/node_modules/@graphql-tools/utils/esm/AccumulatorMap.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/Interfaces.js +32 -0
- package/dist/node_modules/@graphql-tools/utils/esm/Interfaces.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/Path.js +21 -0
- package/dist/node_modules/@graphql-tools/utils/esm/Path.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromType.js +31 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromType.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromValue.js +70 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromValue.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js +56 -0
- package/dist/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/collectFields.js +137 -0
- package/dist/node_modules/@graphql-tools/utils/esm/collectFields.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/comments.js +337 -0
- package/dist/node_modules/@graphql-tools/utils/esm/comments.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/descriptionFromObject.js +20 -0
- package/dist/node_modules/@graphql-tools/utils/esm/descriptionFromObject.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/directives.js +46 -0
- package/dist/node_modules/@graphql-tools/utils/esm/directives.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/errors.js +52 -0
- package/dist/node_modules/@graphql-tools/utils/esm/errors.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/forEachDefaultValue.js +28 -0
- package/dist/node_modules/@graphql-tools/utils/esm/forEachDefaultValue.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/forEachField.js +18 -0
- package/dist/node_modules/@graphql-tools/utils/esm/forEachField.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/get-directives.js +12 -0
- package/dist/node_modules/@graphql-tools/utils/esm/get-directives.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getArgumentValues.js +61 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getArgumentValues.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getDirectiveExtensions.js +76 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getDirectiveExtensions.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getObjectTypeFromTypeMap.js +13 -0
- package/dist/node_modules/@graphql-tools/utils/esm/getObjectTypeFromTypeMap.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/heal.js +120 -0
- package/dist/node_modules/@graphql-tools/utils/esm/heal.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/helpers.js +42 -0
- package/dist/node_modules/@graphql-tools/utils/esm/helpers.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/isAsyncIterable.js +7 -0
- package/dist/node_modules/@graphql-tools/utils/esm/isAsyncIterable.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/isDocumentNode.js +8 -0
- package/dist/node_modules/@graphql-tools/utils/esm/isDocumentNode.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/jsutils.js +26 -0
- package/dist/node_modules/@graphql-tools/utils/esm/jsutils.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/mapSchema.js +439 -0
- package/dist/node_modules/@graphql-tools/utils/esm/mapSchema.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/memoize.js +104 -0
- package/dist/node_modules/@graphql-tools/utils/esm/memoize.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/mergeDeep.js +86 -0
- package/dist/node_modules/@graphql-tools/utils/esm/mergeDeep.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js +370 -0
- package/dist/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/rewire.js +155 -0
- package/dist/node_modules/@graphql-tools/utils/esm/rewire.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/rootTypes.js +33 -0
- package/dist/node_modules/@graphql-tools/utils/esm/rootTypes.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/stub.js +32 -0
- package/dist/node_modules/@graphql-tools/utils/esm/stub.js.map +1 -0
- package/dist/node_modules/@graphql-tools/utils/esm/transformInputValue.js +47 -0
- package/dist/node_modules/@graphql-tools/utils/esm/transformInputValue.js.map +1 -0
- package/dist/node_modules/@graphql-yoga/logger/esm/index.js +42 -0
- package/dist/node_modules/@graphql-yoga/logger/esm/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/createProjectService.js +126 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/createProjectService.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js +25 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/index.js +32 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js +20 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js +87 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js +34 -0
- package/dist/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +201 -0
- package/dist/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/types/dist/index.js +45 -0
- package/dist/node_modules/@typescript-eslint/types/dist/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/types/dist/lib.js +12 -0
- package/dist/node_modules/@typescript-eslint/types/dist/lib.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/types/dist/parser-options.js +12 -0
- package/dist/node_modules/@typescript-eslint/types/dist/parser-options.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/types/dist/ts-estree.js +52 -0
- package/dist/node_modules/@typescript-eslint/types/dist/ts-estree.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +54 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/check-modifiers.js +207 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/check-modifiers.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +34 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +81 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +2438 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +117 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +33 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js +82 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +84 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +31 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +90 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js +292 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +134 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +91 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js +35 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js +39 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +88 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/index.js +90 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js +268 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +533 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +50 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js +38 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +216 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +87 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js +53 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +89 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +92 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +132 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js +124 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +64 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js +63 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js +12 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js +46 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js +12 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js +205 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +75 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/version.js +15 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/version.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js +17 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +23 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js +495 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js +121 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js +17 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js +763 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js +17 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/package.json.js +9 -0
- package/dist/node_modules/@typescript-eslint/typescript-estree/package.json.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js +16 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/index.js +25 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/index.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +187 -0
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/AsyncDisposableStack.js +72 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/AsyncDisposableStack.js.map +1 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/SupressedError.js +16 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/SupressedError.js.map +1 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/index.js +6 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/index.js.map +1 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/symbols.js +12 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/symbols.js.map +1 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/utils.js +12 -0
- package/dist/node_modules/@whatwg-node/disposablestack/esm/utils.js.map +1 -0
- package/dist/node_modules/@whatwg-node/fetch/dist/global-ponyfill.js +33 -0
- package/dist/node_modules/@whatwg-node/fetch/dist/global-ponyfill.js.map +1 -0
- package/dist/node_modules/@whatwg-node/promise-helpers/esm/index.js +241 -0
- package/dist/node_modules/@whatwg-node/promise-helpers/esm/index.js.map +1 -0
- package/dist/node_modules/@whatwg-node/server/esm/createServerAdapter.js +333 -0
- package/dist/node_modules/@whatwg-node/server/esm/createServerAdapter.js.map +1 -0
- package/dist/node_modules/@whatwg-node/server/esm/plugins/useCors.js +106 -0
- package/dist/node_modules/@whatwg-node/server/esm/plugins/useCors.js.map +1 -0
- package/dist/node_modules/@whatwg-node/server/esm/utils.js +476 -0
- package/dist/node_modules/@whatwg-node/server/esm/utils.js.map +1 -0
- package/dist/node_modules/@whatwg-node/server/esm/uwebsockets.js +232 -0
- package/dist/node_modules/@whatwg-node/server/esm/uwebsockets.js.map +1 -0
- package/dist/node_modules/balanced-match/index.js +62 -0
- package/dist/node_modules/balanced-match/index.js.map +1 -0
- package/dist/node_modules/brace-expansion/index.js +156 -0
- package/dist/node_modules/brace-expansion/index.js.map +1 -0
- package/dist/node_modules/cross-inspect/esm/index.js +89 -0
- package/dist/node_modules/cross-inspect/esm/index.js.map +1 -0
- package/dist/node_modules/debug/src/browser.js +178 -0
- package/dist/node_modules/debug/src/browser.js.map +1 -0
- package/dist/node_modules/debug/src/common.js +183 -0
- package/dist/node_modules/debug/src/common.js.map +1 -0
- package/dist/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.js +353 -0
- package/dist/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.js.map +1 -0
- package/dist/node_modules/fdir/dist/index.js +540 -0
- package/dist/node_modules/fdir/dist/index.js.map +1 -0
- package/dist/node_modules/graphql/error/GraphQLError.js +154 -0
- package/dist/node_modules/graphql/error/GraphQLError.js.map +1 -0
- package/dist/node_modules/graphql/error/locatedError.js +23 -0
- package/dist/node_modules/graphql/error/locatedError.js.map +1 -0
- package/dist/node_modules/graphql/error/syntaxError.js +11 -0
- package/dist/node_modules/graphql/error/syntaxError.js.map +1 -0
- package/dist/node_modules/graphql/execution/collectFields.js +128 -0
- package/dist/node_modules/graphql/execution/collectFields.js.map +1 -0
- package/dist/node_modules/graphql/execution/execute.js +606 -0
- package/dist/node_modules/graphql/execution/execute.js.map +1 -0
- package/dist/node_modules/graphql/execution/mapAsyncIterator.js +46 -0
- package/dist/node_modules/graphql/execution/mapAsyncIterator.js.map +1 -0
- package/dist/node_modules/graphql/execution/subscribe.js +121 -0
- package/dist/node_modules/graphql/execution/subscribe.js.map +1 -0
- package/dist/node_modules/graphql/execution/values.js +184 -0
- package/dist/node_modules/graphql/execution/values.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/Path.js +21 -0
- package/dist/node_modules/graphql/jsutils/Path.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/devAssert.js +10 -0
- package/dist/node_modules/graphql/jsutils/devAssert.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/didYouMean.js +24 -0
- package/dist/node_modules/graphql/jsutils/didYouMean.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/groupBy.js +17 -0
- package/dist/node_modules/graphql/jsutils/groupBy.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/identityFunc.js +7 -0
- package/dist/node_modules/graphql/jsutils/identityFunc.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/inspect.js +85 -0
- package/dist/node_modules/graphql/jsutils/inspect.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/instanceOf.js +42 -0
- package/dist/node_modules/graphql/jsutils/instanceOf.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/invariant.js +12 -0
- package/dist/node_modules/graphql/jsutils/invariant.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/isAsyncIterable.js +7 -0
- package/dist/node_modules/graphql/jsutils/isAsyncIterable.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/isIterableObject.js +7 -0
- package/dist/node_modules/graphql/jsutils/isIterableObject.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/isObjectLike.js +7 -0
- package/dist/node_modules/graphql/jsutils/isObjectLike.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/isPromise.js +7 -0
- package/dist/node_modules/graphql/jsutils/isPromise.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/keyMap.js +11 -0
- package/dist/node_modules/graphql/jsutils/keyMap.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/keyValMap.js +11 -0
- package/dist/node_modules/graphql/jsutils/keyValMap.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/mapValue.js +11 -0
- package/dist/node_modules/graphql/jsutils/mapValue.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/memoize3.js +28 -0
- package/dist/node_modules/graphql/jsutils/memoize3.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/naturalCompare.js +47 -0
- package/dist/node_modules/graphql/jsutils/naturalCompare.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/printPathArray.js +9 -0
- package/dist/node_modules/graphql/jsutils/printPathArray.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/promiseForObject.js +13 -0
- package/dist/node_modules/graphql/jsutils/promiseForObject.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/promiseReduce.js +12 -0
- package/dist/node_modules/graphql/jsutils/promiseReduce.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/suggestionList.js +94 -0
- package/dist/node_modules/graphql/jsutils/suggestionList.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/toError.js +15 -0
- package/dist/node_modules/graphql/jsutils/toError.js.map +1 -0
- package/dist/node_modules/graphql/jsutils/toObjMap.js +17 -0
- package/dist/node_modules/graphql/jsutils/toObjMap.js.map +1 -0
- package/dist/node_modules/graphql/language/ast.js +189 -0
- package/dist/node_modules/graphql/language/ast.js.map +1 -0
- package/dist/node_modules/graphql/language/blockString.js +60 -0
- package/dist/node_modules/graphql/language/blockString.js.map +1 -0
- package/dist/node_modules/graphql/language/characterClasses.js +24 -0
- package/dist/node_modules/graphql/language/characterClasses.js.map +1 -0
- package/dist/node_modules/graphql/language/directiveLocation.js +26 -0
- package/dist/node_modules/graphql/language/directiveLocation.js.map +1 -0
- package/dist/node_modules/graphql/language/kinds.js +55 -0
- package/dist/node_modules/graphql/language/kinds.js.map +1 -0
- package/dist/node_modules/graphql/language/lexer.js +543 -0
- package/dist/node_modules/graphql/language/lexer.js.map +1 -0
- package/dist/node_modules/graphql/language/location.js +22 -0
- package/dist/node_modules/graphql/language/location.js.map +1 -0
- package/dist/node_modules/graphql/language/parser.js +1343 -0
- package/dist/node_modules/graphql/language/parser.js.map +1 -0
- package/dist/node_modules/graphql/language/predicates.js +28 -0
- package/dist/node_modules/graphql/language/predicates.js.map +1 -0
- package/dist/node_modules/graphql/language/printLocation.js +51 -0
- package/dist/node_modules/graphql/language/printLocation.js.map +1 -0
- package/dist/node_modules/graphql/language/printString.js +178 -0
- package/dist/node_modules/graphql/language/printString.js.map +1 -0
- package/dist/node_modules/graphql/language/printer.js +269 -0
- package/dist/node_modules/graphql/language/printer.js.map +1 -0
- package/dist/node_modules/graphql/language/source.js +33 -0
- package/dist/node_modules/graphql/language/source.js.map +1 -0
- package/dist/node_modules/graphql/language/tokenKind.js +30 -0
- package/dist/node_modules/graphql/language/tokenKind.js.map +1 -0
- package/dist/node_modules/graphql/language/visitor.js +192 -0
- package/dist/node_modules/graphql/language/visitor.js.map +1 -0
- package/dist/node_modules/graphql/type/assertName.js +34 -0
- package/dist/node_modules/graphql/type/assertName.js.map +1 -0
- package/dist/node_modules/graphql/type/definition.js +648 -0
- package/dist/node_modules/graphql/type/definition.js.map +1 -0
- package/dist/node_modules/graphql/type/directives.js +137 -0
- package/dist/node_modules/graphql/type/directives.js.map +1 -0
- package/dist/node_modules/graphql/type/introspection.js +506 -0
- package/dist/node_modules/graphql/type/introspection.js.map +1 -0
- package/dist/node_modules/graphql/type/scalars.js +248 -0
- package/dist/node_modules/graphql/type/scalars.js.map +1 -0
- package/dist/node_modules/graphql/type/schema.js +223 -0
- package/dist/node_modules/graphql/type/schema.js.map +1 -0
- package/dist/node_modules/graphql/type/validate.js +461 -0
- package/dist/node_modules/graphql/type/validate.js.map +1 -0
- package/dist/node_modules/graphql/utilities/TypeInfo.js +257 -0
- package/dist/node_modules/graphql/utilities/TypeInfo.js.map +1 -0
- package/dist/node_modules/graphql/utilities/astFromValue.js +111 -0
- package/dist/node_modules/graphql/utilities/astFromValue.js.map +1 -0
- package/dist/node_modules/graphql/utilities/buildASTSchema.js +65 -0
- package/dist/node_modules/graphql/utilities/buildASTSchema.js.map +1 -0
- package/dist/node_modules/graphql/utilities/coerceInputValue.js +154 -0
- package/dist/node_modules/graphql/utilities/coerceInputValue.js.map +1 -0
- package/dist/node_modules/graphql/utilities/extendSchema.js +456 -0
- package/dist/node_modules/graphql/utilities/extendSchema.js.map +1 -0
- package/dist/node_modules/graphql/utilities/getOperationAST.js +22 -0
- package/dist/node_modules/graphql/utilities/getOperationAST.js.map +1 -0
- package/dist/node_modules/graphql/utilities/sortValueNode.js +30 -0
- package/dist/node_modules/graphql/utilities/sortValueNode.js.map +1 -0
- package/dist/node_modules/graphql/utilities/typeComparators.js +58 -0
- package/dist/node_modules/graphql/utilities/typeComparators.js.map +1 -0
- package/dist/node_modules/graphql/utilities/typeFromAST.js +20 -0
- package/dist/node_modules/graphql/utilities/typeFromAST.js.map +1 -0
- package/dist/node_modules/graphql/utilities/valueFromAST.js +109 -0
- package/dist/node_modules/graphql/utilities/valueFromAST.js.map +1 -0
- package/dist/node_modules/graphql/utilities/valueFromASTUntyped.js +32 -0
- package/dist/node_modules/graphql/utilities/valueFromASTUntyped.js.map +1 -0
- package/dist/node_modules/graphql/validation/ValidationContext.js +171 -0
- package/dist/node_modules/graphql/validation/ValidationContext.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +24 -0
- package/dist/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +80 -0
- package/dist/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +43 -0
- package/dist/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +73 -0
- package/dist/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/KnownDirectivesRule.js +112 -0
- package/dist/node_modules/graphql/validation/rules/KnownDirectivesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +20 -0
- package/dist/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +55 -0
- package/dist/node_modules/graphql/validation/rules/KnownTypeNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +28 -0
- package/dist/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +34 -0
- package/dist/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +56 -0
- package/dist/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +53 -0
- package/dist/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +34 -0
- package/dist/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +41 -0
- package/dist/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +38 -0
- package/dist/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +519 -0
- package/dist/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +55 -0
- package/dist/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +113 -0
- package/dist/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +99 -0
- package/dist/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/ScalarLeafsRule.js +53 -0
- package/dist/node_modules/graphql/validation/rules/ScalarLeafsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +62 -0
- package/dist/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +47 -0
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +29 -0
- package/dist/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +38 -0
- package/dist/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +63 -0
- package/dist/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +50 -0
- package/dist/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +59 -0
- package/dist/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +27 -0
- package/dist/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +38 -0
- package/dist/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +32 -0
- package/dist/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +48 -0
- package/dist/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +41 -0
- package/dist/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +30 -0
- package/dist/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +170 -0
- package/dist/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +27 -0
- package/dist/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +74 -0
- package/dist/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js.map +1 -0
- package/dist/node_modules/graphql/validation/specifiedRules.js +88 -0
- package/dist/node_modules/graphql/validation/specifiedRules.js.map +1 -0
- package/dist/node_modules/graphql/validation/validate.js +65 -0
- package/dist/node_modules/graphql/validation/validate.js.map +1 -0
- package/dist/node_modules/graphql/version.js +10 -0
- package/dist/node_modules/graphql/version.js.map +1 -0
- package/dist/node_modules/graphql-ws/lib/common.js +127 -0
- package/dist/node_modules/graphql-ws/lib/common.js.map +1 -0
- package/dist/node_modules/graphql-ws/lib/server.js +257 -0
- package/dist/node_modules/graphql-ws/lib/server.js.map +1 -0
- package/dist/node_modules/graphql-ws/lib/use/ws.js +83 -0
- package/dist/node_modules/graphql-ws/lib/use/ws.js.map +1 -0
- package/dist/node_modules/graphql-ws/lib/utils.js +35 -0
- package/dist/node_modules/graphql-ws/lib/utils.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/error.js +127 -0
- package/dist/node_modules/graphql-yoga/esm/error.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/graphiql-html.js +5 -0
- package/dist/node_modules/graphql-yoga/esm/graphiql-html.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/landing-page-html.js +21 -0
- package/dist/node_modules/graphql-yoga/esm/landing-page-html.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/allowed-headers.js +26 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/allowed-headers.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/get.js +15 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/get.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-form-url-encoded.js +12 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-form-url-encoded.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-graphql-string.js +12 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-graphql-string.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-json.js +58 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-json.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-multipart.js +78 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/post-multipart.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/utils.js +28 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-parser/utils.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-check-graphql-query-params.js +131 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-check-graphql-query-params.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-check-method-for-graphql.js +28 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-check-method-for-graphql.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-http-validation-error.js +21 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-http-validation-error.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-limit-batching.js +37 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-limit-batching.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-prevent-mutation-via-get.js +61 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/request-validation/use-prevent-mutation-via-get.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/accept.js +28 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/accept.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/multipart.js +68 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/multipart.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js +29 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/sse.js +83 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/sse.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/stringify.js +47 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/result-processor/stringify.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-graphiql.js +55 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-graphiql.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-health-check.js +20 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-health-check.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-parser-and-validation-cache.js +63 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-parser-and-validation-cache.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-request-parser.js +15 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-request-parser.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-result-processor.js +58 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-result-processor.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-schema.js +76 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-schema.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-unhandled-route.js +52 -0
- package/dist/node_modules/graphql-yoga/esm/plugins/use-unhandled-route.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/process-request.js +56 -0
- package/dist/node_modules/graphql-yoga/esm/process-request.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/server.js +374 -0
- package/dist/node_modules/graphql-yoga/esm/server.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/utils/create-lru-cache.js +10 -0
- package/dist/node_modules/graphql-yoga/esm/utils/create-lru-cache.js.map +1 -0
- package/dist/node_modules/graphql-yoga/esm/utils/mask-error.js +47 -0
- package/dist/node_modules/graphql-yoga/esm/utils/mask-error.js.map +1 -0
- package/dist/node_modules/graphql-yoga/node_modules/lru-cache/dist/esm/index.js +1370 -0
- package/dist/node_modules/graphql-yoga/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/dist/node_modules/ms/index.js +121 -0
- package/dist/node_modules/ms/index.js.map +1 -0
- package/dist/node_modules/picomatch/index.js +23 -0
- package/dist/node_modules/picomatch/index.js.map +1 -0
- package/dist/node_modules/picomatch/lib/constants.js +203 -0
- package/dist/node_modules/picomatch/lib/constants.js.map +1 -0
- package/dist/node_modules/picomatch/lib/parse.js +774 -0
- package/dist/node_modules/picomatch/lib/parse.js.map +1 -0
- package/dist/node_modules/picomatch/lib/picomatch.js +148 -0
- package/dist/node_modules/picomatch/lib/picomatch.js.map +1 -0
- package/dist/node_modules/picomatch/lib/scan.js +336 -0
- package/dist/node_modules/picomatch/lib/scan.js.map +1 -0
- package/dist/node_modules/picomatch/lib/utils.js +71 -0
- package/dist/node_modules/picomatch/lib/utils.js.map +1 -0
- package/dist/node_modules/semver/classes/comparator.js +123 -0
- package/dist/node_modules/semver/classes/comparator.js.map +1 -0
- package/dist/node_modules/semver/classes/range.js +388 -0
- package/dist/node_modules/semver/classes/range.js.map +1 -0
- package/dist/node_modules/semver/classes/semver.js +288 -0
- package/dist/node_modules/semver/classes/semver.js.map +1 -0
- package/dist/node_modules/semver/functions/clean.js +18 -0
- package/dist/node_modules/semver/functions/clean.js.map +1 -0
- package/dist/node_modules/semver/functions/cmp.js +60 -0
- package/dist/node_modules/semver/functions/cmp.js.map +1 -0
- package/dist/node_modules/semver/functions/coerce.js +53 -0
- package/dist/node_modules/semver/functions/coerce.js.map +1 -0
- package/dist/node_modules/semver/functions/compare-build.js +19 -0
- package/dist/node_modules/semver/functions/compare-build.js.map +1 -0
- package/dist/node_modules/semver/functions/compare-loose.js +15 -0
- package/dist/node_modules/semver/functions/compare-loose.js.map +1 -0
- package/dist/node_modules/semver/functions/compare.js +15 -0
- package/dist/node_modules/semver/functions/compare.js.map +1 -0
- package/dist/node_modules/semver/functions/diff.js +49 -0
- package/dist/node_modules/semver/functions/diff.js.map +1 -0
- package/dist/node_modules/semver/functions/eq.js +15 -0
- package/dist/node_modules/semver/functions/eq.js.map +1 -0
- package/dist/node_modules/semver/functions/gt.js +15 -0
- package/dist/node_modules/semver/functions/gt.js.map +1 -0
- package/dist/node_modules/semver/functions/gte.js +15 -0
- package/dist/node_modules/semver/functions/gte.js.map +1 -0
- package/dist/node_modules/semver/functions/inc.js +29 -0
- package/dist/node_modules/semver/functions/inc.js.map +1 -0
- package/dist/node_modules/semver/functions/lt.js +15 -0
- package/dist/node_modules/semver/functions/lt.js.map +1 -0
- package/dist/node_modules/semver/functions/lte.js +15 -0
- package/dist/node_modules/semver/functions/lte.js.map +1 -0
- package/dist/node_modules/semver/functions/major.js +15 -0
- package/dist/node_modules/semver/functions/major.js.map +1 -0
- package/dist/node_modules/semver/functions/minor.js +15 -0
- package/dist/node_modules/semver/functions/minor.js.map +1 -0
- package/dist/node_modules/semver/functions/neq.js +15 -0
- package/dist/node_modules/semver/functions/neq.js.map +1 -0
- package/dist/node_modules/semver/functions/parse.js +27 -0
- package/dist/node_modules/semver/functions/parse.js.map +1 -0
- package/dist/node_modules/semver/functions/patch.js +15 -0
- package/dist/node_modules/semver/functions/patch.js.map +1 -0
- package/dist/node_modules/semver/functions/prerelease.js +18 -0
- package/dist/node_modules/semver/functions/prerelease.js.map +1 -0
- package/dist/node_modules/semver/functions/rcompare.js +15 -0
- package/dist/node_modules/semver/functions/rcompare.js.map +1 -0
- package/dist/node_modules/semver/functions/rsort.js +15 -0
- package/dist/node_modules/semver/functions/rsort.js.map +1 -0
- package/dist/node_modules/semver/functions/satisfies.js +22 -0
- package/dist/node_modules/semver/functions/satisfies.js.map +1 -0
- package/dist/node_modules/semver/functions/sort.js +15 -0
- package/dist/node_modules/semver/functions/sort.js.map +1 -0
- package/dist/node_modules/semver/functions/valid.js +18 -0
- package/dist/node_modules/semver/functions/valid.js.map +1 -0
- package/dist/node_modules/semver/index.js +140 -0
- package/dist/node_modules/semver/index.js.map +1 -0
- package/dist/node_modules/semver/internal/constants.js +36 -0
- package/dist/node_modules/semver/internal/constants.js.map +1 -0
- package/dist/node_modules/semver/internal/debug.js +14 -0
- package/dist/node_modules/semver/internal/debug.js.map +1 -0
- package/dist/node_modules/semver/internal/identifiers.js +29 -0
- package/dist/node_modules/semver/internal/identifiers.js.map +1 -0
- package/dist/node_modules/semver/internal/lrucache.js +42 -0
- package/dist/node_modules/semver/internal/lrucache.js.map +1 -0
- package/dist/node_modules/semver/internal/parse-options.js +23 -0
- package/dist/node_modules/semver/internal/parse-options.js.map +1 -0
- package/dist/node_modules/semver/internal/re.js +96 -0
- package/dist/node_modules/semver/internal/re.js.map +1 -0
- package/dist/node_modules/semver/ranges/gtr.js +15 -0
- package/dist/node_modules/semver/ranges/gtr.js.map +1 -0
- package/dist/node_modules/semver/ranges/intersects.js +19 -0
- package/dist/node_modules/semver/ranges/intersects.js.map +1 -0
- package/dist/node_modules/semver/ranges/ltr.js +15 -0
- package/dist/node_modules/semver/ranges/ltr.js.map +1 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +35 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js.map +1 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +35 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js.map +1 -0
- package/dist/node_modules/semver/ranges/min-version.js +66 -0
- package/dist/node_modules/semver/ranges/min-version.js.map +1 -0
- package/dist/node_modules/semver/ranges/outside.js +81 -0
- package/dist/node_modules/semver/ranges/outside.js.map +1 -0
- package/dist/node_modules/semver/ranges/simplify.js +56 -0
- package/dist/node_modules/semver/ranges/simplify.js.map +1 -0
- package/dist/node_modules/semver/ranges/subset.js +170 -0
- package/dist/node_modules/semver/ranges/subset.js.map +1 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +15 -0
- package/dist/node_modules/semver/ranges/to-comparators.js.map +1 -0
- package/dist/node_modules/semver/ranges/valid.js +21 -0
- package/dist/node_modules/semver/ranges/valid.js.map +1 -0
- package/dist/node_modules/tinyglobby/dist/index.js +332 -0
- package/dist/node_modules/tinyglobby/dist/index.js.map +1 -0
- package/dist/node_modules/ts-api-utils/lib/index.js +2361 -0
- package/dist/node_modules/ts-api-utils/lib/index.js.map +1 -0
- package/dist/node_modules/typescript/lib/tsserverlibrary.js +33 -0
- package/dist/node_modules/typescript/lib/tsserverlibrary.js.map +1 -0
- package/dist/node_modules/typescript/lib/typescript.js +210602 -0
- package/dist/node_modules/typescript/lib/typescript.js.map +1 -0
- package/dist/node_modules/ws/browser.js +16 -0
- package/dist/node_modules/ws/browser.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/analyzer.d.ts +105 -0
- package/dist/plugins/analyzers/code-complexity/analyzer.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/analyzer.js +507 -0
- package/dist/plugins/analyzers/code-complexity/analyzer.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/graph-generator.d.ts +70 -0
- package/dist/plugins/analyzers/code-complexity/graph-generator.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/graph-generator.js +405 -0
- package/dist/plugins/analyzers/code-complexity/graph-generator.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/index.d.ts +191 -0
- package/dist/plugins/analyzers/code-complexity/index.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/index.js +276 -0
- package/dist/plugins/analyzers/code-complexity/index.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/metrics.d.ts +77 -0
- package/dist/plugins/analyzers/code-complexity/metrics.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/metrics.js +514 -0
- package/dist/plugins/analyzers/code-complexity/metrics.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/plugin.d.ts +161 -0
- package/dist/plugins/analyzers/code-complexity/plugin.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/plugin.js +661 -0
- package/dist/plugins/analyzers/code-complexity/plugin.js.map +1 -0
- package/dist/plugins/analyzers/code-complexity/types.d.ts +360 -0
- package/dist/plugins/analyzers/code-complexity/types.d.ts.map +1 -0
- package/dist/plugins/analyzers/code-complexity/types.js +27 -0
- package/dist/plugins/analyzers/code-complexity/types.js.map +1 -0
- package/dist/plugins/analyzers/dependency-health/analyzer.d.ts +56 -0
- package/dist/plugins/analyzers/dependency-health/analyzer.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/analyzer.js +387 -0
- package/dist/plugins/analyzers/dependency-health/analyzer.js.map +1 -0
- package/dist/plugins/analyzers/dependency-health/graph-generator.d.ts +60 -0
- package/dist/plugins/analyzers/dependency-health/graph-generator.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/graph-generator.js +295 -0
- package/dist/plugins/analyzers/dependency-health/graph-generator.js.map +1 -0
- package/dist/plugins/analyzers/dependency-health/index.d.ts +201 -0
- package/dist/plugins/analyzers/dependency-health/index.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/index.js +857 -0
- package/dist/plugins/analyzers/dependency-health/index.js.map +1 -0
- package/dist/plugins/analyzers/dependency-health/npm-client.d.ts +68 -0
- package/dist/plugins/analyzers/dependency-health/npm-client.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/npm-client.js +226 -0
- package/dist/plugins/analyzers/dependency-health/npm-client.js.map +1 -0
- package/dist/plugins/analyzers/dependency-health/types.d.ts +462 -0
- package/dist/plugins/analyzers/dependency-health/types.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/vulnerability.d.ts +80 -0
- package/dist/plugins/analyzers/dependency-health/vulnerability.d.ts.map +1 -0
- package/dist/plugins/analyzers/dependency-health/vulnerability.js +215 -0
- package/dist/plugins/analyzers/dependency-health/vulnerability.js.map +1 -0
- package/dist/plugins/analyzers/index.d.ts +12 -0
- package/dist/plugins/analyzers/index.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +13 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/loader.d.ts +158 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +554 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/manager.d.ts +183 -0
- package/dist/plugins/manager.d.ts.map +1 -0
- package/dist/plugins/manager.js +876 -0
- package/dist/plugins/manager.js.map +1 -0
- package/dist/plugins/registry.d.ts +163 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +448 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/types.d.ts +930 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +43 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/server/container.d.ts +263 -0
- package/dist/server/container.d.ts.map +1 -0
- package/dist/server/container.js +605 -0
- package/dist/server/container.js.map +1 -0
- package/dist/server/event-bus.d.ts +418 -0
- package/dist/server/event-bus.d.ts.map +1 -0
- package/dist/server/event-bus.js +442 -0
- package/dist/server/event-bus.js.map +1 -0
- package/dist/server/index.d.ts +37 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/manager.d.ts +123 -0
- package/dist/server/manager.d.ts.map +1 -0
- package/dist/server/manager.js +742 -0
- package/dist/server/manager.js.map +1 -0
- package/dist/server/shared-services.d.ts +130 -0
- package/dist/server/shared-services.d.ts.map +1 -0
- package/dist/server/shared-services.js +476 -0
- package/dist/server/shared-services.js.map +1 -0
- package/dist/server/types.d.ts +320 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +13 -0
- package/dist/server/types.js.map +1 -0
- package/dist/services/manager.js +328 -0
- package/dist/services/manager.js.map +1 -0
- package/dist/vector/config.d.ts +300 -0
- package/dist/vector/config.d.ts.map +1 -0
- package/dist/vector/config.js +124 -0
- package/dist/vector/config.js.map +1 -0
- package/dist/vector/index.d.ts +50 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/dist/vector/services/index.d.ts +13 -0
- package/dist/vector/services/index.d.ts.map +1 -0
- package/dist/vector/services/trajectory-tracker.d.ts +405 -0
- package/dist/vector/services/trajectory-tracker.d.ts.map +1 -0
- package/dist/vector/services/trajectory-tracker.js +445 -0
- package/dist/vector/services/trajectory-tracker.js.map +1 -0
- package/dist/vector/services/vector-store.d.ts +339 -0
- package/dist/vector/services/vector-store.d.ts.map +1 -0
- package/dist/vector/services/vector-store.js +748 -0
- package/dist/vector/services/vector-store.js.map +1 -0
- package/dist/vector/types.d.ts +677 -0
- package/dist/vector/types.d.ts.map +1 -0
- package/dist/workflow/adapters/goap-adapter.d.ts +196 -0
- package/dist/workflow/adapters/goap-adapter.d.ts.map +1 -0
- package/dist/workflow/adapters/goap-adapter.js +706 -0
- package/dist/workflow/adapters/goap-adapter.js.map +1 -0
- package/dist/workflow/adapters/index.d.ts +10 -0
- package/dist/workflow/adapters/index.d.ts.map +1 -0
- package/dist/workflow/config.d.ts +135 -0
- package/dist/workflow/config.d.ts.map +1 -0
- package/dist/workflow/config.js +92 -0
- package/dist/workflow/config.js.map +1 -0
- package/dist/workflow/handlers/index.d.ts +9 -0
- package/dist/workflow/handlers/index.d.ts.map +1 -0
- package/dist/workflow/handlers/webhook-handlers.d.ts +397 -0
- package/dist/workflow/handlers/webhook-handlers.d.ts.map +1 -0
- package/dist/workflow/handlers/webhook-handlers.js +454 -0
- package/dist/workflow/handlers/webhook-handlers.js.map +1 -0
- package/dist/workflow/index.d.ts +42 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/services/index.d.ts +9 -0
- package/dist/workflow/services/index.d.ts.map +1 -0
- package/dist/workflow/services/workflow-service.d.ts +318 -0
- package/dist/workflow/services/workflow-service.d.ts.map +1 -0
- package/dist/workflow/services/workflow-service.js +577 -0
- package/dist/workflow/services/workflow-service.js.map +1 -0
- package/dist/workflow/types.d.ts +470 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/workflows/realtime-collab.d.ts +245 -0
- package/dist/workflow/workflows/realtime-collab.d.ts.map +1 -0
- package/package.json +29 -3
- package/dist/_virtual/additionalItems.js +0 -5
- package/dist/_virtual/additionalItems.js.map +0 -1
- package/dist/_virtual/additionalProperties.js +0 -5
- package/dist/_virtual/additionalProperties.js.map +0 -1
- package/dist/_virtual/ajv.js +0 -6
- package/dist/_virtual/ajv.js.map +0 -1
- package/dist/_virtual/ajv2.js +0 -5
- package/dist/_virtual/ajv2.js.map +0 -1
- package/dist/_virtual/allOf.js +0 -5
- package/dist/_virtual/allOf.js.map +0 -1
- package/dist/_virtual/anyOf.js +0 -5
- package/dist/_virtual/anyOf.js.map +0 -1
- package/dist/_virtual/applicability.js +0 -5
- package/dist/_virtual/applicability.js.map +0 -1
- package/dist/_virtual/boolSchema.js +0 -5
- package/dist/_virtual/boolSchema.js.map +0 -1
- package/dist/_virtual/code.js +0 -5
- package/dist/_virtual/code.js.map +0 -1
- package/dist/_virtual/code2.js +0 -5
- package/dist/_virtual/code2.js.map +0 -1
- package/dist/_virtual/const.js +0 -5
- package/dist/_virtual/const.js.map +0 -1
- package/dist/_virtual/contains.js +0 -5
- package/dist/_virtual/contains.js.map +0 -1
- package/dist/_virtual/core.js +0 -5
- package/dist/_virtual/core.js.map +0 -1
- package/dist/_virtual/dataType.js +0 -5
- package/dist/_virtual/dataType.js.map +0 -1
- package/dist/_virtual/defaults.js +0 -5
- package/dist/_virtual/defaults.js.map +0 -1
- package/dist/_virtual/dependencies.js +0 -5
- package/dist/_virtual/dependencies.js.map +0 -1
- package/dist/_virtual/draft7.js +0 -5
- package/dist/_virtual/draft7.js.map +0 -1
- package/dist/_virtual/enum.js +0 -5
- package/dist/_virtual/enum.js.map +0 -1
- package/dist/_virtual/equal.js +0 -5
- package/dist/_virtual/equal.js.map +0 -1
- package/dist/_virtual/errors.js +0 -5
- package/dist/_virtual/errors.js.map +0 -1
- package/dist/_virtual/format.js +0 -5
- package/dist/_virtual/format.js.map +0 -1
- package/dist/_virtual/formats.js +0 -5
- package/dist/_virtual/formats.js.map +0 -1
- package/dist/_virtual/id.js +0 -5
- package/dist/_virtual/id.js.map +0 -1
- package/dist/_virtual/if.js +0 -5
- package/dist/_virtual/if.js.map +0 -1
- package/dist/_virtual/index12.js +0 -5
- package/dist/_virtual/index12.js.map +0 -1
- package/dist/_virtual/items.js +0 -5
- package/dist/_virtual/items.js.map +0 -1
- package/dist/_virtual/items2020.js +0 -5
- package/dist/_virtual/items2020.js.map +0 -1
- package/dist/_virtual/keyword.js +0 -5
- package/dist/_virtual/keyword.js.map +0 -1
- package/dist/_virtual/limit.js +0 -5
- package/dist/_virtual/limit.js.map +0 -1
- package/dist/_virtual/limitItems.js +0 -5
- package/dist/_virtual/limitItems.js.map +0 -1
- package/dist/_virtual/limitLength.js +0 -5
- package/dist/_virtual/limitLength.js.map +0 -1
- package/dist/_virtual/limitNumber.js +0 -5
- package/dist/_virtual/limitNumber.js.map +0 -1
- package/dist/_virtual/limitProperties.js +0 -5
- package/dist/_virtual/limitProperties.js.map +0 -1
- package/dist/_virtual/metadata.js +0 -5
- package/dist/_virtual/metadata.js.map +0 -1
- package/dist/_virtual/multipleOf.js +0 -5
- package/dist/_virtual/multipleOf.js.map +0 -1
- package/dist/_virtual/names.js +0 -5
- package/dist/_virtual/names.js.map +0 -1
- package/dist/_virtual/not.js +0 -5
- package/dist/_virtual/not.js.map +0 -1
- package/dist/_virtual/oneOf.js +0 -5
- package/dist/_virtual/oneOf.js.map +0 -1
- package/dist/_virtual/pattern.js +0 -5
- package/dist/_virtual/pattern.js.map +0 -1
- package/dist/_virtual/patternProperties.js +0 -5
- package/dist/_virtual/patternProperties.js.map +0 -1
- package/dist/_virtual/prefixItems.js +0 -5
- package/dist/_virtual/prefixItems.js.map +0 -1
- package/dist/_virtual/properties.js +0 -5
- package/dist/_virtual/properties.js.map +0 -1
- package/dist/_virtual/propertyNames.js +0 -5
- package/dist/_virtual/propertyNames.js.map +0 -1
- package/dist/_virtual/ref.js +0 -5
- package/dist/_virtual/ref.js.map +0 -1
- package/dist/_virtual/ref_error.js +0 -5
- package/dist/_virtual/ref_error.js.map +0 -1
- package/dist/_virtual/required.js +0 -5
- package/dist/_virtual/required.js.map +0 -1
- package/dist/_virtual/resolve.js +0 -5
- package/dist/_virtual/resolve.js.map +0 -1
- package/dist/_virtual/rules.js +0 -5
- package/dist/_virtual/rules.js.map +0 -1
- package/dist/_virtual/scope.js +0 -5
- package/dist/_virtual/scope.js.map +0 -1
- package/dist/_virtual/subschema.js +0 -5
- package/dist/_virtual/subschema.js.map +0 -1
- package/dist/_virtual/thenElse.js +0 -5
- package/dist/_virtual/thenElse.js.map +0 -1
- package/dist/_virtual/types.js +0 -5
- package/dist/_virtual/types.js.map +0 -1
- package/dist/_virtual/ucs2length.js +0 -5
- package/dist/_virtual/ucs2length.js.map +0 -1
- package/dist/_virtual/uniqueItems.js +0 -5
- package/dist/_virtual/uniqueItems.js.map +0 -1
- package/dist/_virtual/uri.js +0 -5
- package/dist/_virtual/uri.js.map +0 -1
- package/dist/_virtual/util.js +0 -5
- package/dist/_virtual/util.js.map +0 -1
- package/dist/_virtual/validation_error.js +0 -5
- package/dist/_virtual/validation_error.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +0 -296
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +0 -71
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +0 -26
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +0 -407
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +0 -1332
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +0 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +0 -71
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +0 -1
- package/dist/node_modules/ajv/dist/ajv.js +0 -84
- package/dist/node_modules/ajv/dist/ajv.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -160
- package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -728
- package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -152
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/errors.js +0 -131
- package/dist/node_modules/ajv/dist/compile/errors.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/index.js +0 -234
- package/dist/node_modules/ajv/dist/compile/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/names.js +0 -44
- package/dist/node_modules/ajv/dist/compile/names.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -22
- package/dist/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/resolve.js +0 -163
- package/dist/node_modules/ajv/dist/compile/resolve.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/rules.js +0 -35
- package/dist/node_modules/ajv/dist/compile/rules.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/util.js +0 -173
- package/dist/node_modules/ajv/dist/compile/util.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -27
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -58
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -193
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -43
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -522
- package/dist/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -126
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -89
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
- package/dist/node_modules/ajv/dist/core.js +0 -628
- package/dist/node_modules/ajv/dist/core.js.map +0 -1
- package/dist/node_modules/ajv/dist/refs/data.json.js +0 -24
- package/dist/node_modules/ajv/dist/refs/data.json.js.map +0 -1
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -25
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/equal.js +0 -16
- package/dist/node_modules/ajv/dist/runtime/equal.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -30
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/uri.js +0 -16
- package/dist/node_modules/ajv/dist/runtime/uri.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -20
- package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -59
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -114
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -32
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -22
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -100
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -103
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -75
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -68
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -64
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -43
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -36
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -64
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -81
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -22
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -66
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -49
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -23
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -140
- package/dist/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -19
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -27
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -132
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -114
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -18
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -31
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -95
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -16
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -27
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -36
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -56
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -52
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -34
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -39
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -37
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -34
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -33
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -34
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -89
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -75
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
- package/dist/node_modules/ajv-formats/dist/formats.js +0 -209
- package/dist/node_modules/ajv-formats/dist/formats.js.map +0 -1
- package/dist/node_modules/ajv-formats/dist/index.js +0 -51
- package/dist/node_modules/ajv-formats/dist/index.js.map +0 -1
- package/dist/node_modules/ajv-formats/dist/limit.js +0 -80
- package/dist/node_modules/ajv-formats/dist/limit.js.map +0 -1
- package/dist/node_modules/fast-deep-equal/index.js +0 -39
- package/dist/node_modules/fast-deep-equal/index.js.map +0 -1
- package/dist/node_modules/fast-uri/index.js +0 -261
- package/dist/node_modules/fast-uri/index.js.map +0 -1
- package/dist/node_modules/fast-uri/lib/schemes.js +0 -215
- package/dist/node_modules/fast-uri/lib/schemes.js.map +0 -1
- package/dist/node_modules/fast-uri/lib/utils.js +0 -261
- package/dist/node_modules/fast-uri/lib/utils.js.map +0 -1
- package/dist/node_modules/json-schema-traverse/index.js +0 -92
- package/dist/node_modules/json-schema-traverse/index.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/errors.js +0 -37
- package/dist/node_modules/zod/v4/classic/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/iso.js +0 -43
- package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/parse.js +0 -13
- package/dist/node_modules/zod/v4/classic/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -688
- package/dist/node_modules/zod/v4/classic/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/api.js +0 -492
- package/dist/node_modules/zod/v4/core/api.js.map +0 -1
- package/dist/node_modules/zod/v4/core/checks.js +0 -405
- package/dist/node_modules/zod/v4/core/checks.js.map +0 -1
- package/dist/node_modules/zod/v4/core/core.js +0 -58
- package/dist/node_modules/zod/v4/core/core.js.map +0 -1
- package/dist/node_modules/zod/v4/core/doc.js +0 -38
- package/dist/node_modules/zod/v4/core/doc.js.map +0 -1
- package/dist/node_modules/zod/v4/core/errors.js +0 -82
- package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/core/parse.js +0 -60
- package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/core/regexes.js +0 -87
- package/dist/node_modules/zod/v4/core/regexes.js.map +0 -1
- package/dist/node_modules/zod/v4/core/registries.js +0 -52
- package/dist/node_modules/zod/v4/core/registries.js.map +0 -1
- package/dist/node_modules/zod/v4/core/schemas.js +0 -1283
- package/dist/node_modules/zod/v4/core/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/util.js +0 -341
- package/dist/node_modules/zod/v4/core/util.js.map +0 -1
- package/dist/node_modules/zod/v4/core/versions.js +0 -9
- package/dist/node_modules/zod/v4/core/versions.js.map +0 -1
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +0 -2
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +0 -1
|
@@ -0,0 +1,1343 @@
|
|
|
1
|
+
import { syntaxError } from "../error/syntaxError.js";
|
|
2
|
+
import { OperationTypeNode, Location } from "./ast.js";
|
|
3
|
+
import { DirectiveLocation } from "./directiveLocation.js";
|
|
4
|
+
import { Kind } from "./kinds.js";
|
|
5
|
+
import { Lexer, isPunctuatorTokenKind } from "./lexer.js";
|
|
6
|
+
import { isSource, Source } from "./source.js";
|
|
7
|
+
import { TokenKind } from "./tokenKind.js";
|
|
8
|
+
function parse(source, options) {
|
|
9
|
+
const parser = new Parser(source, options);
|
|
10
|
+
const document = parser.parseDocument();
|
|
11
|
+
Object.defineProperty(document, "tokenCount", {
|
|
12
|
+
enumerable: false,
|
|
13
|
+
value: parser.tokenCount
|
|
14
|
+
});
|
|
15
|
+
return document;
|
|
16
|
+
}
|
|
17
|
+
class Parser {
|
|
18
|
+
constructor(source, options = {}) {
|
|
19
|
+
const { lexer, ..._options } = options;
|
|
20
|
+
if (lexer) {
|
|
21
|
+
this._lexer = lexer;
|
|
22
|
+
} else {
|
|
23
|
+
const sourceObj = isSource(source) ? source : new Source(source);
|
|
24
|
+
this._lexer = new Lexer(sourceObj);
|
|
25
|
+
}
|
|
26
|
+
this._options = _options;
|
|
27
|
+
this._tokenCounter = 0;
|
|
28
|
+
}
|
|
29
|
+
get tokenCount() {
|
|
30
|
+
return this._tokenCounter;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Converts a name lex token into a name parse node.
|
|
34
|
+
*/
|
|
35
|
+
parseName() {
|
|
36
|
+
const token = this.expectToken(TokenKind.NAME);
|
|
37
|
+
return this.node(token, {
|
|
38
|
+
kind: Kind.NAME,
|
|
39
|
+
value: token.value
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// Implements the parsing rules in the Document section.
|
|
43
|
+
/**
|
|
44
|
+
* Document : Definition+
|
|
45
|
+
*/
|
|
46
|
+
parseDocument() {
|
|
47
|
+
return this.node(this._lexer.token, {
|
|
48
|
+
kind: Kind.DOCUMENT,
|
|
49
|
+
definitions: this.many(
|
|
50
|
+
TokenKind.SOF,
|
|
51
|
+
this.parseDefinition,
|
|
52
|
+
TokenKind.EOF
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Definition :
|
|
58
|
+
* - ExecutableDefinition
|
|
59
|
+
* - TypeSystemDefinition
|
|
60
|
+
* - TypeSystemExtension
|
|
61
|
+
*
|
|
62
|
+
* ExecutableDefinition :
|
|
63
|
+
* - OperationDefinition
|
|
64
|
+
* - FragmentDefinition
|
|
65
|
+
*
|
|
66
|
+
* TypeSystemDefinition :
|
|
67
|
+
* - SchemaDefinition
|
|
68
|
+
* - TypeDefinition
|
|
69
|
+
* - DirectiveDefinition
|
|
70
|
+
*
|
|
71
|
+
* TypeDefinition :
|
|
72
|
+
* - ScalarTypeDefinition
|
|
73
|
+
* - ObjectTypeDefinition
|
|
74
|
+
* - InterfaceTypeDefinition
|
|
75
|
+
* - UnionTypeDefinition
|
|
76
|
+
* - EnumTypeDefinition
|
|
77
|
+
* - InputObjectTypeDefinition
|
|
78
|
+
*/
|
|
79
|
+
parseDefinition() {
|
|
80
|
+
if (this.peek(TokenKind.BRACE_L)) {
|
|
81
|
+
return this.parseOperationDefinition();
|
|
82
|
+
}
|
|
83
|
+
const hasDescription = this.peekDescription();
|
|
84
|
+
const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token;
|
|
85
|
+
if (hasDescription && keywordToken.kind === TokenKind.BRACE_L) {
|
|
86
|
+
throw syntaxError(
|
|
87
|
+
this._lexer.source,
|
|
88
|
+
this._lexer.token.start,
|
|
89
|
+
"Unexpected description, descriptions are not supported on shorthand queries."
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (keywordToken.kind === TokenKind.NAME) {
|
|
93
|
+
switch (keywordToken.value) {
|
|
94
|
+
case "schema":
|
|
95
|
+
return this.parseSchemaDefinition();
|
|
96
|
+
case "scalar":
|
|
97
|
+
return this.parseScalarTypeDefinition();
|
|
98
|
+
case "type":
|
|
99
|
+
return this.parseObjectTypeDefinition();
|
|
100
|
+
case "interface":
|
|
101
|
+
return this.parseInterfaceTypeDefinition();
|
|
102
|
+
case "union":
|
|
103
|
+
return this.parseUnionTypeDefinition();
|
|
104
|
+
case "enum":
|
|
105
|
+
return this.parseEnumTypeDefinition();
|
|
106
|
+
case "input":
|
|
107
|
+
return this.parseInputObjectTypeDefinition();
|
|
108
|
+
case "directive":
|
|
109
|
+
return this.parseDirectiveDefinition();
|
|
110
|
+
}
|
|
111
|
+
switch (keywordToken.value) {
|
|
112
|
+
case "query":
|
|
113
|
+
case "mutation":
|
|
114
|
+
case "subscription":
|
|
115
|
+
return this.parseOperationDefinition();
|
|
116
|
+
case "fragment":
|
|
117
|
+
return this.parseFragmentDefinition();
|
|
118
|
+
}
|
|
119
|
+
if (hasDescription) {
|
|
120
|
+
throw syntaxError(
|
|
121
|
+
this._lexer.source,
|
|
122
|
+
this._lexer.token.start,
|
|
123
|
+
"Unexpected description, only GraphQL definitions support descriptions."
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
switch (keywordToken.value) {
|
|
127
|
+
case "extend":
|
|
128
|
+
return this.parseTypeSystemExtension();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
throw this.unexpected(keywordToken);
|
|
132
|
+
}
|
|
133
|
+
// Implements the parsing rules in the Operations section.
|
|
134
|
+
/**
|
|
135
|
+
* OperationDefinition :
|
|
136
|
+
* - SelectionSet
|
|
137
|
+
* - OperationType Name? VariableDefinitions? Directives? SelectionSet
|
|
138
|
+
*/
|
|
139
|
+
parseOperationDefinition() {
|
|
140
|
+
const start = this._lexer.token;
|
|
141
|
+
if (this.peek(TokenKind.BRACE_L)) {
|
|
142
|
+
return this.node(start, {
|
|
143
|
+
kind: Kind.OPERATION_DEFINITION,
|
|
144
|
+
operation: OperationTypeNode.QUERY,
|
|
145
|
+
description: void 0,
|
|
146
|
+
name: void 0,
|
|
147
|
+
variableDefinitions: [],
|
|
148
|
+
directives: [],
|
|
149
|
+
selectionSet: this.parseSelectionSet()
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
const description = this.parseDescription();
|
|
153
|
+
const operation = this.parseOperationType();
|
|
154
|
+
let name;
|
|
155
|
+
if (this.peek(TokenKind.NAME)) {
|
|
156
|
+
name = this.parseName();
|
|
157
|
+
}
|
|
158
|
+
return this.node(start, {
|
|
159
|
+
kind: Kind.OPERATION_DEFINITION,
|
|
160
|
+
operation,
|
|
161
|
+
description,
|
|
162
|
+
name,
|
|
163
|
+
variableDefinitions: this.parseVariableDefinitions(),
|
|
164
|
+
directives: this.parseDirectives(false),
|
|
165
|
+
selectionSet: this.parseSelectionSet()
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* OperationType : one of query mutation subscription
|
|
170
|
+
*/
|
|
171
|
+
parseOperationType() {
|
|
172
|
+
const operationToken = this.expectToken(TokenKind.NAME);
|
|
173
|
+
switch (operationToken.value) {
|
|
174
|
+
case "query":
|
|
175
|
+
return OperationTypeNode.QUERY;
|
|
176
|
+
case "mutation":
|
|
177
|
+
return OperationTypeNode.MUTATION;
|
|
178
|
+
case "subscription":
|
|
179
|
+
return OperationTypeNode.SUBSCRIPTION;
|
|
180
|
+
}
|
|
181
|
+
throw this.unexpected(operationToken);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* VariableDefinitions : ( VariableDefinition+ )
|
|
185
|
+
*/
|
|
186
|
+
parseVariableDefinitions() {
|
|
187
|
+
return this.optionalMany(
|
|
188
|
+
TokenKind.PAREN_L,
|
|
189
|
+
this.parseVariableDefinition,
|
|
190
|
+
TokenKind.PAREN_R
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
|
|
195
|
+
*/
|
|
196
|
+
parseVariableDefinition() {
|
|
197
|
+
return this.node(this._lexer.token, {
|
|
198
|
+
kind: Kind.VARIABLE_DEFINITION,
|
|
199
|
+
description: this.parseDescription(),
|
|
200
|
+
variable: this.parseVariable(),
|
|
201
|
+
type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),
|
|
202
|
+
defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseConstValueLiteral() : void 0,
|
|
203
|
+
directives: this.parseConstDirectives()
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Variable : $ Name
|
|
208
|
+
*/
|
|
209
|
+
parseVariable() {
|
|
210
|
+
const start = this._lexer.token;
|
|
211
|
+
this.expectToken(TokenKind.DOLLAR);
|
|
212
|
+
return this.node(start, {
|
|
213
|
+
kind: Kind.VARIABLE,
|
|
214
|
+
name: this.parseName()
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* ```
|
|
219
|
+
* SelectionSet : { Selection+ }
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
parseSelectionSet() {
|
|
223
|
+
return this.node(this._lexer.token, {
|
|
224
|
+
kind: Kind.SELECTION_SET,
|
|
225
|
+
selections: this.many(
|
|
226
|
+
TokenKind.BRACE_L,
|
|
227
|
+
this.parseSelection,
|
|
228
|
+
TokenKind.BRACE_R
|
|
229
|
+
)
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Selection :
|
|
234
|
+
* - Field
|
|
235
|
+
* - FragmentSpread
|
|
236
|
+
* - InlineFragment
|
|
237
|
+
*/
|
|
238
|
+
parseSelection() {
|
|
239
|
+
return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Field : Alias? Name Arguments? Directives? SelectionSet?
|
|
243
|
+
*
|
|
244
|
+
* Alias : Name :
|
|
245
|
+
*/
|
|
246
|
+
parseField() {
|
|
247
|
+
const start = this._lexer.token;
|
|
248
|
+
const nameOrAlias = this.parseName();
|
|
249
|
+
let alias;
|
|
250
|
+
let name;
|
|
251
|
+
if (this.expectOptionalToken(TokenKind.COLON)) {
|
|
252
|
+
alias = nameOrAlias;
|
|
253
|
+
name = this.parseName();
|
|
254
|
+
} else {
|
|
255
|
+
name = nameOrAlias;
|
|
256
|
+
}
|
|
257
|
+
return this.node(start, {
|
|
258
|
+
kind: Kind.FIELD,
|
|
259
|
+
alias,
|
|
260
|
+
name,
|
|
261
|
+
arguments: this.parseArguments(false),
|
|
262
|
+
directives: this.parseDirectives(false),
|
|
263
|
+
selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Arguments[Const] : ( Argument[?Const]+ )
|
|
268
|
+
*/
|
|
269
|
+
parseArguments(isConst) {
|
|
270
|
+
const item = isConst ? this.parseConstArgument : this.parseArgument;
|
|
271
|
+
return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Argument[Const] : Name : Value[?Const]
|
|
275
|
+
*/
|
|
276
|
+
parseArgument(isConst = false) {
|
|
277
|
+
const start = this._lexer.token;
|
|
278
|
+
const name = this.parseName();
|
|
279
|
+
this.expectToken(TokenKind.COLON);
|
|
280
|
+
return this.node(start, {
|
|
281
|
+
kind: Kind.ARGUMENT,
|
|
282
|
+
name,
|
|
283
|
+
value: this.parseValueLiteral(isConst)
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
parseConstArgument() {
|
|
287
|
+
return this.parseArgument(true);
|
|
288
|
+
}
|
|
289
|
+
// Implements the parsing rules in the Fragments section.
|
|
290
|
+
/**
|
|
291
|
+
* Corresponds to both FragmentSpread and InlineFragment in the spec.
|
|
292
|
+
*
|
|
293
|
+
* FragmentSpread : ... FragmentName Directives?
|
|
294
|
+
*
|
|
295
|
+
* InlineFragment : ... TypeCondition? Directives? SelectionSet
|
|
296
|
+
*/
|
|
297
|
+
parseFragment() {
|
|
298
|
+
const start = this._lexer.token;
|
|
299
|
+
this.expectToken(TokenKind.SPREAD);
|
|
300
|
+
const hasTypeCondition = this.expectOptionalKeyword("on");
|
|
301
|
+
if (!hasTypeCondition && this.peek(TokenKind.NAME)) {
|
|
302
|
+
return this.node(start, {
|
|
303
|
+
kind: Kind.FRAGMENT_SPREAD,
|
|
304
|
+
name: this.parseFragmentName(),
|
|
305
|
+
directives: this.parseDirectives(false)
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
return this.node(start, {
|
|
309
|
+
kind: Kind.INLINE_FRAGMENT,
|
|
310
|
+
typeCondition: hasTypeCondition ? this.parseNamedType() : void 0,
|
|
311
|
+
directives: this.parseDirectives(false),
|
|
312
|
+
selectionSet: this.parseSelectionSet()
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* FragmentDefinition :
|
|
317
|
+
* - fragment FragmentName on TypeCondition Directives? SelectionSet
|
|
318
|
+
*
|
|
319
|
+
* TypeCondition : NamedType
|
|
320
|
+
*/
|
|
321
|
+
parseFragmentDefinition() {
|
|
322
|
+
const start = this._lexer.token;
|
|
323
|
+
const description = this.parseDescription();
|
|
324
|
+
this.expectKeyword("fragment");
|
|
325
|
+
if (this._options.allowLegacyFragmentVariables === true) {
|
|
326
|
+
return this.node(start, {
|
|
327
|
+
kind: Kind.FRAGMENT_DEFINITION,
|
|
328
|
+
description,
|
|
329
|
+
name: this.parseFragmentName(),
|
|
330
|
+
variableDefinitions: this.parseVariableDefinitions(),
|
|
331
|
+
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
332
|
+
directives: this.parseDirectives(false),
|
|
333
|
+
selectionSet: this.parseSelectionSet()
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return this.node(start, {
|
|
337
|
+
kind: Kind.FRAGMENT_DEFINITION,
|
|
338
|
+
description,
|
|
339
|
+
name: this.parseFragmentName(),
|
|
340
|
+
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
341
|
+
directives: this.parseDirectives(false),
|
|
342
|
+
selectionSet: this.parseSelectionSet()
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* FragmentName : Name but not `on`
|
|
347
|
+
*/
|
|
348
|
+
parseFragmentName() {
|
|
349
|
+
if (this._lexer.token.value === "on") {
|
|
350
|
+
throw this.unexpected();
|
|
351
|
+
}
|
|
352
|
+
return this.parseName();
|
|
353
|
+
}
|
|
354
|
+
// Implements the parsing rules in the Values section.
|
|
355
|
+
/**
|
|
356
|
+
* Value[Const] :
|
|
357
|
+
* - [~Const] Variable
|
|
358
|
+
* - IntValue
|
|
359
|
+
* - FloatValue
|
|
360
|
+
* - StringValue
|
|
361
|
+
* - BooleanValue
|
|
362
|
+
* - NullValue
|
|
363
|
+
* - EnumValue
|
|
364
|
+
* - ListValue[?Const]
|
|
365
|
+
* - ObjectValue[?Const]
|
|
366
|
+
*
|
|
367
|
+
* BooleanValue : one of `true` `false`
|
|
368
|
+
*
|
|
369
|
+
* NullValue : `null`
|
|
370
|
+
*
|
|
371
|
+
* EnumValue : Name but not `true`, `false` or `null`
|
|
372
|
+
*/
|
|
373
|
+
parseValueLiteral(isConst) {
|
|
374
|
+
const token = this._lexer.token;
|
|
375
|
+
switch (token.kind) {
|
|
376
|
+
case TokenKind.BRACKET_L:
|
|
377
|
+
return this.parseList(isConst);
|
|
378
|
+
case TokenKind.BRACE_L:
|
|
379
|
+
return this.parseObject(isConst);
|
|
380
|
+
case TokenKind.INT:
|
|
381
|
+
this.advanceLexer();
|
|
382
|
+
return this.node(token, {
|
|
383
|
+
kind: Kind.INT,
|
|
384
|
+
value: token.value
|
|
385
|
+
});
|
|
386
|
+
case TokenKind.FLOAT:
|
|
387
|
+
this.advanceLexer();
|
|
388
|
+
return this.node(token, {
|
|
389
|
+
kind: Kind.FLOAT,
|
|
390
|
+
value: token.value
|
|
391
|
+
});
|
|
392
|
+
case TokenKind.STRING:
|
|
393
|
+
case TokenKind.BLOCK_STRING:
|
|
394
|
+
return this.parseStringLiteral();
|
|
395
|
+
case TokenKind.NAME:
|
|
396
|
+
this.advanceLexer();
|
|
397
|
+
switch (token.value) {
|
|
398
|
+
case "true":
|
|
399
|
+
return this.node(token, {
|
|
400
|
+
kind: Kind.BOOLEAN,
|
|
401
|
+
value: true
|
|
402
|
+
});
|
|
403
|
+
case "false":
|
|
404
|
+
return this.node(token, {
|
|
405
|
+
kind: Kind.BOOLEAN,
|
|
406
|
+
value: false
|
|
407
|
+
});
|
|
408
|
+
case "null":
|
|
409
|
+
return this.node(token, {
|
|
410
|
+
kind: Kind.NULL
|
|
411
|
+
});
|
|
412
|
+
default:
|
|
413
|
+
return this.node(token, {
|
|
414
|
+
kind: Kind.ENUM,
|
|
415
|
+
value: token.value
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
case TokenKind.DOLLAR:
|
|
419
|
+
if (isConst) {
|
|
420
|
+
this.expectToken(TokenKind.DOLLAR);
|
|
421
|
+
if (this._lexer.token.kind === TokenKind.NAME) {
|
|
422
|
+
const varName = this._lexer.token.value;
|
|
423
|
+
throw syntaxError(
|
|
424
|
+
this._lexer.source,
|
|
425
|
+
token.start,
|
|
426
|
+
`Unexpected variable "$${varName}" in constant value.`
|
|
427
|
+
);
|
|
428
|
+
} else {
|
|
429
|
+
throw this.unexpected(token);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return this.parseVariable();
|
|
433
|
+
default:
|
|
434
|
+
throw this.unexpected();
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
parseConstValueLiteral() {
|
|
438
|
+
return this.parseValueLiteral(true);
|
|
439
|
+
}
|
|
440
|
+
parseStringLiteral() {
|
|
441
|
+
const token = this._lexer.token;
|
|
442
|
+
this.advanceLexer();
|
|
443
|
+
return this.node(token, {
|
|
444
|
+
kind: Kind.STRING,
|
|
445
|
+
value: token.value,
|
|
446
|
+
block: token.kind === TokenKind.BLOCK_STRING
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* ListValue[Const] :
|
|
451
|
+
* - [ ]
|
|
452
|
+
* - [ Value[?Const]+ ]
|
|
453
|
+
*/
|
|
454
|
+
parseList(isConst) {
|
|
455
|
+
const item = () => this.parseValueLiteral(isConst);
|
|
456
|
+
return this.node(this._lexer.token, {
|
|
457
|
+
kind: Kind.LIST,
|
|
458
|
+
values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R)
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* ```
|
|
463
|
+
* ObjectValue[Const] :
|
|
464
|
+
* - { }
|
|
465
|
+
* - { ObjectField[?Const]+ }
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
parseObject(isConst) {
|
|
469
|
+
const item = () => this.parseObjectField(isConst);
|
|
470
|
+
return this.node(this._lexer.token, {
|
|
471
|
+
kind: Kind.OBJECT,
|
|
472
|
+
fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R)
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* ObjectField[Const] : Name : Value[?Const]
|
|
477
|
+
*/
|
|
478
|
+
parseObjectField(isConst) {
|
|
479
|
+
const start = this._lexer.token;
|
|
480
|
+
const name = this.parseName();
|
|
481
|
+
this.expectToken(TokenKind.COLON);
|
|
482
|
+
return this.node(start, {
|
|
483
|
+
kind: Kind.OBJECT_FIELD,
|
|
484
|
+
name,
|
|
485
|
+
value: this.parseValueLiteral(isConst)
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
// Implements the parsing rules in the Directives section.
|
|
489
|
+
/**
|
|
490
|
+
* Directives[Const] : Directive[?Const]+
|
|
491
|
+
*/
|
|
492
|
+
parseDirectives(isConst) {
|
|
493
|
+
const directives = [];
|
|
494
|
+
while (this.peek(TokenKind.AT)) {
|
|
495
|
+
directives.push(this.parseDirective(isConst));
|
|
496
|
+
}
|
|
497
|
+
return directives;
|
|
498
|
+
}
|
|
499
|
+
parseConstDirectives() {
|
|
500
|
+
return this.parseDirectives(true);
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* ```
|
|
504
|
+
* Directive[Const] : @ Name Arguments[?Const]?
|
|
505
|
+
* ```
|
|
506
|
+
*/
|
|
507
|
+
parseDirective(isConst) {
|
|
508
|
+
const start = this._lexer.token;
|
|
509
|
+
this.expectToken(TokenKind.AT);
|
|
510
|
+
return this.node(start, {
|
|
511
|
+
kind: Kind.DIRECTIVE,
|
|
512
|
+
name: this.parseName(),
|
|
513
|
+
arguments: this.parseArguments(isConst)
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
// Implements the parsing rules in the Types section.
|
|
517
|
+
/**
|
|
518
|
+
* Type :
|
|
519
|
+
* - NamedType
|
|
520
|
+
* - ListType
|
|
521
|
+
* - NonNullType
|
|
522
|
+
*/
|
|
523
|
+
parseTypeReference() {
|
|
524
|
+
const start = this._lexer.token;
|
|
525
|
+
let type;
|
|
526
|
+
if (this.expectOptionalToken(TokenKind.BRACKET_L)) {
|
|
527
|
+
const innerType = this.parseTypeReference();
|
|
528
|
+
this.expectToken(TokenKind.BRACKET_R);
|
|
529
|
+
type = this.node(start, {
|
|
530
|
+
kind: Kind.LIST_TYPE,
|
|
531
|
+
type: innerType
|
|
532
|
+
});
|
|
533
|
+
} else {
|
|
534
|
+
type = this.parseNamedType();
|
|
535
|
+
}
|
|
536
|
+
if (this.expectOptionalToken(TokenKind.BANG)) {
|
|
537
|
+
return this.node(start, {
|
|
538
|
+
kind: Kind.NON_NULL_TYPE,
|
|
539
|
+
type
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
return type;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* NamedType : Name
|
|
546
|
+
*/
|
|
547
|
+
parseNamedType() {
|
|
548
|
+
return this.node(this._lexer.token, {
|
|
549
|
+
kind: Kind.NAMED_TYPE,
|
|
550
|
+
name: this.parseName()
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
// Implements the parsing rules in the Type Definition section.
|
|
554
|
+
peekDescription() {
|
|
555
|
+
return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Description : StringValue
|
|
559
|
+
*/
|
|
560
|
+
parseDescription() {
|
|
561
|
+
if (this.peekDescription()) {
|
|
562
|
+
return this.parseStringLiteral();
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* ```
|
|
567
|
+
* SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
parseSchemaDefinition() {
|
|
571
|
+
const start = this._lexer.token;
|
|
572
|
+
const description = this.parseDescription();
|
|
573
|
+
this.expectKeyword("schema");
|
|
574
|
+
const directives = this.parseConstDirectives();
|
|
575
|
+
const operationTypes = this.many(
|
|
576
|
+
TokenKind.BRACE_L,
|
|
577
|
+
this.parseOperationTypeDefinition,
|
|
578
|
+
TokenKind.BRACE_R
|
|
579
|
+
);
|
|
580
|
+
return this.node(start, {
|
|
581
|
+
kind: Kind.SCHEMA_DEFINITION,
|
|
582
|
+
description,
|
|
583
|
+
directives,
|
|
584
|
+
operationTypes
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* OperationTypeDefinition : OperationType : NamedType
|
|
589
|
+
*/
|
|
590
|
+
parseOperationTypeDefinition() {
|
|
591
|
+
const start = this._lexer.token;
|
|
592
|
+
const operation = this.parseOperationType();
|
|
593
|
+
this.expectToken(TokenKind.COLON);
|
|
594
|
+
const type = this.parseNamedType();
|
|
595
|
+
return this.node(start, {
|
|
596
|
+
kind: Kind.OPERATION_TYPE_DEFINITION,
|
|
597
|
+
operation,
|
|
598
|
+
type
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* ScalarTypeDefinition : Description? scalar Name Directives[Const]?
|
|
603
|
+
*/
|
|
604
|
+
parseScalarTypeDefinition() {
|
|
605
|
+
const start = this._lexer.token;
|
|
606
|
+
const description = this.parseDescription();
|
|
607
|
+
this.expectKeyword("scalar");
|
|
608
|
+
const name = this.parseName();
|
|
609
|
+
const directives = this.parseConstDirectives();
|
|
610
|
+
return this.node(start, {
|
|
611
|
+
kind: Kind.SCALAR_TYPE_DEFINITION,
|
|
612
|
+
description,
|
|
613
|
+
name,
|
|
614
|
+
directives
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* ObjectTypeDefinition :
|
|
619
|
+
* Description?
|
|
620
|
+
* type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
|
|
621
|
+
*/
|
|
622
|
+
parseObjectTypeDefinition() {
|
|
623
|
+
const start = this._lexer.token;
|
|
624
|
+
const description = this.parseDescription();
|
|
625
|
+
this.expectKeyword("type");
|
|
626
|
+
const name = this.parseName();
|
|
627
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
628
|
+
const directives = this.parseConstDirectives();
|
|
629
|
+
const fields = this.parseFieldsDefinition();
|
|
630
|
+
return this.node(start, {
|
|
631
|
+
kind: Kind.OBJECT_TYPE_DEFINITION,
|
|
632
|
+
description,
|
|
633
|
+
name,
|
|
634
|
+
interfaces,
|
|
635
|
+
directives,
|
|
636
|
+
fields
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* ImplementsInterfaces :
|
|
641
|
+
* - implements `&`? NamedType
|
|
642
|
+
* - ImplementsInterfaces & NamedType
|
|
643
|
+
*/
|
|
644
|
+
parseImplementsInterfaces() {
|
|
645
|
+
return this.expectOptionalKeyword("implements") ? this.delimitedMany(TokenKind.AMP, this.parseNamedType) : [];
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* ```
|
|
649
|
+
* FieldsDefinition : { FieldDefinition+ }
|
|
650
|
+
* ```
|
|
651
|
+
*/
|
|
652
|
+
parseFieldsDefinition() {
|
|
653
|
+
return this.optionalMany(
|
|
654
|
+
TokenKind.BRACE_L,
|
|
655
|
+
this.parseFieldDefinition,
|
|
656
|
+
TokenKind.BRACE_R
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* FieldDefinition :
|
|
661
|
+
* - Description? Name ArgumentsDefinition? : Type Directives[Const]?
|
|
662
|
+
*/
|
|
663
|
+
parseFieldDefinition() {
|
|
664
|
+
const start = this._lexer.token;
|
|
665
|
+
const description = this.parseDescription();
|
|
666
|
+
const name = this.parseName();
|
|
667
|
+
const args = this.parseArgumentDefs();
|
|
668
|
+
this.expectToken(TokenKind.COLON);
|
|
669
|
+
const type = this.parseTypeReference();
|
|
670
|
+
const directives = this.parseConstDirectives();
|
|
671
|
+
return this.node(start, {
|
|
672
|
+
kind: Kind.FIELD_DEFINITION,
|
|
673
|
+
description,
|
|
674
|
+
name,
|
|
675
|
+
arguments: args,
|
|
676
|
+
type,
|
|
677
|
+
directives
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* ArgumentsDefinition : ( InputValueDefinition+ )
|
|
682
|
+
*/
|
|
683
|
+
parseArgumentDefs() {
|
|
684
|
+
return this.optionalMany(
|
|
685
|
+
TokenKind.PAREN_L,
|
|
686
|
+
this.parseInputValueDef,
|
|
687
|
+
TokenKind.PAREN_R
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* InputValueDefinition :
|
|
692
|
+
* - Description? Name : Type DefaultValue? Directives[Const]?
|
|
693
|
+
*/
|
|
694
|
+
parseInputValueDef() {
|
|
695
|
+
const start = this._lexer.token;
|
|
696
|
+
const description = this.parseDescription();
|
|
697
|
+
const name = this.parseName();
|
|
698
|
+
this.expectToken(TokenKind.COLON);
|
|
699
|
+
const type = this.parseTypeReference();
|
|
700
|
+
let defaultValue;
|
|
701
|
+
if (this.expectOptionalToken(TokenKind.EQUALS)) {
|
|
702
|
+
defaultValue = this.parseConstValueLiteral();
|
|
703
|
+
}
|
|
704
|
+
const directives = this.parseConstDirectives();
|
|
705
|
+
return this.node(start, {
|
|
706
|
+
kind: Kind.INPUT_VALUE_DEFINITION,
|
|
707
|
+
description,
|
|
708
|
+
name,
|
|
709
|
+
type,
|
|
710
|
+
defaultValue,
|
|
711
|
+
directives
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* InterfaceTypeDefinition :
|
|
716
|
+
* - Description? interface Name Directives[Const]? FieldsDefinition?
|
|
717
|
+
*/
|
|
718
|
+
parseInterfaceTypeDefinition() {
|
|
719
|
+
const start = this._lexer.token;
|
|
720
|
+
const description = this.parseDescription();
|
|
721
|
+
this.expectKeyword("interface");
|
|
722
|
+
const name = this.parseName();
|
|
723
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
724
|
+
const directives = this.parseConstDirectives();
|
|
725
|
+
const fields = this.parseFieldsDefinition();
|
|
726
|
+
return this.node(start, {
|
|
727
|
+
kind: Kind.INTERFACE_TYPE_DEFINITION,
|
|
728
|
+
description,
|
|
729
|
+
name,
|
|
730
|
+
interfaces,
|
|
731
|
+
directives,
|
|
732
|
+
fields
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* UnionTypeDefinition :
|
|
737
|
+
* - Description? union Name Directives[Const]? UnionMemberTypes?
|
|
738
|
+
*/
|
|
739
|
+
parseUnionTypeDefinition() {
|
|
740
|
+
const start = this._lexer.token;
|
|
741
|
+
const description = this.parseDescription();
|
|
742
|
+
this.expectKeyword("union");
|
|
743
|
+
const name = this.parseName();
|
|
744
|
+
const directives = this.parseConstDirectives();
|
|
745
|
+
const types = this.parseUnionMemberTypes();
|
|
746
|
+
return this.node(start, {
|
|
747
|
+
kind: Kind.UNION_TYPE_DEFINITION,
|
|
748
|
+
description,
|
|
749
|
+
name,
|
|
750
|
+
directives,
|
|
751
|
+
types
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* UnionMemberTypes :
|
|
756
|
+
* - = `|`? NamedType
|
|
757
|
+
* - UnionMemberTypes | NamedType
|
|
758
|
+
*/
|
|
759
|
+
parseUnionMemberTypes() {
|
|
760
|
+
return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* EnumTypeDefinition :
|
|
764
|
+
* - Description? enum Name Directives[Const]? EnumValuesDefinition?
|
|
765
|
+
*/
|
|
766
|
+
parseEnumTypeDefinition() {
|
|
767
|
+
const start = this._lexer.token;
|
|
768
|
+
const description = this.parseDescription();
|
|
769
|
+
this.expectKeyword("enum");
|
|
770
|
+
const name = this.parseName();
|
|
771
|
+
const directives = this.parseConstDirectives();
|
|
772
|
+
const values = this.parseEnumValuesDefinition();
|
|
773
|
+
return this.node(start, {
|
|
774
|
+
kind: Kind.ENUM_TYPE_DEFINITION,
|
|
775
|
+
description,
|
|
776
|
+
name,
|
|
777
|
+
directives,
|
|
778
|
+
values
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* ```
|
|
783
|
+
* EnumValuesDefinition : { EnumValueDefinition+ }
|
|
784
|
+
* ```
|
|
785
|
+
*/
|
|
786
|
+
parseEnumValuesDefinition() {
|
|
787
|
+
return this.optionalMany(
|
|
788
|
+
TokenKind.BRACE_L,
|
|
789
|
+
this.parseEnumValueDefinition,
|
|
790
|
+
TokenKind.BRACE_R
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* EnumValueDefinition : Description? EnumValue Directives[Const]?
|
|
795
|
+
*/
|
|
796
|
+
parseEnumValueDefinition() {
|
|
797
|
+
const start = this._lexer.token;
|
|
798
|
+
const description = this.parseDescription();
|
|
799
|
+
const name = this.parseEnumValueName();
|
|
800
|
+
const directives = this.parseConstDirectives();
|
|
801
|
+
return this.node(start, {
|
|
802
|
+
kind: Kind.ENUM_VALUE_DEFINITION,
|
|
803
|
+
description,
|
|
804
|
+
name,
|
|
805
|
+
directives
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* EnumValue : Name but not `true`, `false` or `null`
|
|
810
|
+
*/
|
|
811
|
+
parseEnumValueName() {
|
|
812
|
+
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") {
|
|
813
|
+
throw syntaxError(
|
|
814
|
+
this._lexer.source,
|
|
815
|
+
this._lexer.token.start,
|
|
816
|
+
`${getTokenDesc(
|
|
817
|
+
this._lexer.token
|
|
818
|
+
)} is reserved and cannot be used for an enum value.`
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
return this.parseName();
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* InputObjectTypeDefinition :
|
|
825
|
+
* - Description? input Name Directives[Const]? InputFieldsDefinition?
|
|
826
|
+
*/
|
|
827
|
+
parseInputObjectTypeDefinition() {
|
|
828
|
+
const start = this._lexer.token;
|
|
829
|
+
const description = this.parseDescription();
|
|
830
|
+
this.expectKeyword("input");
|
|
831
|
+
const name = this.parseName();
|
|
832
|
+
const directives = this.parseConstDirectives();
|
|
833
|
+
const fields = this.parseInputFieldsDefinition();
|
|
834
|
+
return this.node(start, {
|
|
835
|
+
kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
|
836
|
+
description,
|
|
837
|
+
name,
|
|
838
|
+
directives,
|
|
839
|
+
fields
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* ```
|
|
844
|
+
* InputFieldsDefinition : { InputValueDefinition+ }
|
|
845
|
+
* ```
|
|
846
|
+
*/
|
|
847
|
+
parseInputFieldsDefinition() {
|
|
848
|
+
return this.optionalMany(
|
|
849
|
+
TokenKind.BRACE_L,
|
|
850
|
+
this.parseInputValueDef,
|
|
851
|
+
TokenKind.BRACE_R
|
|
852
|
+
);
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* TypeSystemExtension :
|
|
856
|
+
* - SchemaExtension
|
|
857
|
+
* - TypeExtension
|
|
858
|
+
*
|
|
859
|
+
* TypeExtension :
|
|
860
|
+
* - ScalarTypeExtension
|
|
861
|
+
* - ObjectTypeExtension
|
|
862
|
+
* - InterfaceTypeExtension
|
|
863
|
+
* - UnionTypeExtension
|
|
864
|
+
* - EnumTypeExtension
|
|
865
|
+
* - InputObjectTypeDefinition
|
|
866
|
+
*/
|
|
867
|
+
parseTypeSystemExtension() {
|
|
868
|
+
const keywordToken = this._lexer.lookahead();
|
|
869
|
+
if (keywordToken.kind === TokenKind.NAME) {
|
|
870
|
+
switch (keywordToken.value) {
|
|
871
|
+
case "schema":
|
|
872
|
+
return this.parseSchemaExtension();
|
|
873
|
+
case "scalar":
|
|
874
|
+
return this.parseScalarTypeExtension();
|
|
875
|
+
case "type":
|
|
876
|
+
return this.parseObjectTypeExtension();
|
|
877
|
+
case "interface":
|
|
878
|
+
return this.parseInterfaceTypeExtension();
|
|
879
|
+
case "union":
|
|
880
|
+
return this.parseUnionTypeExtension();
|
|
881
|
+
case "enum":
|
|
882
|
+
return this.parseEnumTypeExtension();
|
|
883
|
+
case "input":
|
|
884
|
+
return this.parseInputObjectTypeExtension();
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
throw this.unexpected(keywordToken);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* ```
|
|
891
|
+
* SchemaExtension :
|
|
892
|
+
* - extend schema Directives[Const]? { OperationTypeDefinition+ }
|
|
893
|
+
* - extend schema Directives[Const]
|
|
894
|
+
* ```
|
|
895
|
+
*/
|
|
896
|
+
parseSchemaExtension() {
|
|
897
|
+
const start = this._lexer.token;
|
|
898
|
+
this.expectKeyword("extend");
|
|
899
|
+
this.expectKeyword("schema");
|
|
900
|
+
const directives = this.parseConstDirectives();
|
|
901
|
+
const operationTypes = this.optionalMany(
|
|
902
|
+
TokenKind.BRACE_L,
|
|
903
|
+
this.parseOperationTypeDefinition,
|
|
904
|
+
TokenKind.BRACE_R
|
|
905
|
+
);
|
|
906
|
+
if (directives.length === 0 && operationTypes.length === 0) {
|
|
907
|
+
throw this.unexpected();
|
|
908
|
+
}
|
|
909
|
+
return this.node(start, {
|
|
910
|
+
kind: Kind.SCHEMA_EXTENSION,
|
|
911
|
+
directives,
|
|
912
|
+
operationTypes
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* ScalarTypeExtension :
|
|
917
|
+
* - extend scalar Name Directives[Const]
|
|
918
|
+
*/
|
|
919
|
+
parseScalarTypeExtension() {
|
|
920
|
+
const start = this._lexer.token;
|
|
921
|
+
this.expectKeyword("extend");
|
|
922
|
+
this.expectKeyword("scalar");
|
|
923
|
+
const name = this.parseName();
|
|
924
|
+
const directives = this.parseConstDirectives();
|
|
925
|
+
if (directives.length === 0) {
|
|
926
|
+
throw this.unexpected();
|
|
927
|
+
}
|
|
928
|
+
return this.node(start, {
|
|
929
|
+
kind: Kind.SCALAR_TYPE_EXTENSION,
|
|
930
|
+
name,
|
|
931
|
+
directives
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* ObjectTypeExtension :
|
|
936
|
+
* - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
|
|
937
|
+
* - extend type Name ImplementsInterfaces? Directives[Const]
|
|
938
|
+
* - extend type Name ImplementsInterfaces
|
|
939
|
+
*/
|
|
940
|
+
parseObjectTypeExtension() {
|
|
941
|
+
const start = this._lexer.token;
|
|
942
|
+
this.expectKeyword("extend");
|
|
943
|
+
this.expectKeyword("type");
|
|
944
|
+
const name = this.parseName();
|
|
945
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
946
|
+
const directives = this.parseConstDirectives();
|
|
947
|
+
const fields = this.parseFieldsDefinition();
|
|
948
|
+
if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
|
|
949
|
+
throw this.unexpected();
|
|
950
|
+
}
|
|
951
|
+
return this.node(start, {
|
|
952
|
+
kind: Kind.OBJECT_TYPE_EXTENSION,
|
|
953
|
+
name,
|
|
954
|
+
interfaces,
|
|
955
|
+
directives,
|
|
956
|
+
fields
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* InterfaceTypeExtension :
|
|
961
|
+
* - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
|
|
962
|
+
* - extend interface Name ImplementsInterfaces? Directives[Const]
|
|
963
|
+
* - extend interface Name ImplementsInterfaces
|
|
964
|
+
*/
|
|
965
|
+
parseInterfaceTypeExtension() {
|
|
966
|
+
const start = this._lexer.token;
|
|
967
|
+
this.expectKeyword("extend");
|
|
968
|
+
this.expectKeyword("interface");
|
|
969
|
+
const name = this.parseName();
|
|
970
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
971
|
+
const directives = this.parseConstDirectives();
|
|
972
|
+
const fields = this.parseFieldsDefinition();
|
|
973
|
+
if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
|
|
974
|
+
throw this.unexpected();
|
|
975
|
+
}
|
|
976
|
+
return this.node(start, {
|
|
977
|
+
kind: Kind.INTERFACE_TYPE_EXTENSION,
|
|
978
|
+
name,
|
|
979
|
+
interfaces,
|
|
980
|
+
directives,
|
|
981
|
+
fields
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* UnionTypeExtension :
|
|
986
|
+
* - extend union Name Directives[Const]? UnionMemberTypes
|
|
987
|
+
* - extend union Name Directives[Const]
|
|
988
|
+
*/
|
|
989
|
+
parseUnionTypeExtension() {
|
|
990
|
+
const start = this._lexer.token;
|
|
991
|
+
this.expectKeyword("extend");
|
|
992
|
+
this.expectKeyword("union");
|
|
993
|
+
const name = this.parseName();
|
|
994
|
+
const directives = this.parseConstDirectives();
|
|
995
|
+
const types = this.parseUnionMemberTypes();
|
|
996
|
+
if (directives.length === 0 && types.length === 0) {
|
|
997
|
+
throw this.unexpected();
|
|
998
|
+
}
|
|
999
|
+
return this.node(start, {
|
|
1000
|
+
kind: Kind.UNION_TYPE_EXTENSION,
|
|
1001
|
+
name,
|
|
1002
|
+
directives,
|
|
1003
|
+
types
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* EnumTypeExtension :
|
|
1008
|
+
* - extend enum Name Directives[Const]? EnumValuesDefinition
|
|
1009
|
+
* - extend enum Name Directives[Const]
|
|
1010
|
+
*/
|
|
1011
|
+
parseEnumTypeExtension() {
|
|
1012
|
+
const start = this._lexer.token;
|
|
1013
|
+
this.expectKeyword("extend");
|
|
1014
|
+
this.expectKeyword("enum");
|
|
1015
|
+
const name = this.parseName();
|
|
1016
|
+
const directives = this.parseConstDirectives();
|
|
1017
|
+
const values = this.parseEnumValuesDefinition();
|
|
1018
|
+
if (directives.length === 0 && values.length === 0) {
|
|
1019
|
+
throw this.unexpected();
|
|
1020
|
+
}
|
|
1021
|
+
return this.node(start, {
|
|
1022
|
+
kind: Kind.ENUM_TYPE_EXTENSION,
|
|
1023
|
+
name,
|
|
1024
|
+
directives,
|
|
1025
|
+
values
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* InputObjectTypeExtension :
|
|
1030
|
+
* - extend input Name Directives[Const]? InputFieldsDefinition
|
|
1031
|
+
* - extend input Name Directives[Const]
|
|
1032
|
+
*/
|
|
1033
|
+
parseInputObjectTypeExtension() {
|
|
1034
|
+
const start = this._lexer.token;
|
|
1035
|
+
this.expectKeyword("extend");
|
|
1036
|
+
this.expectKeyword("input");
|
|
1037
|
+
const name = this.parseName();
|
|
1038
|
+
const directives = this.parseConstDirectives();
|
|
1039
|
+
const fields = this.parseInputFieldsDefinition();
|
|
1040
|
+
if (directives.length === 0 && fields.length === 0) {
|
|
1041
|
+
throw this.unexpected();
|
|
1042
|
+
}
|
|
1043
|
+
return this.node(start, {
|
|
1044
|
+
kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
|
|
1045
|
+
name,
|
|
1046
|
+
directives,
|
|
1047
|
+
fields
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* ```
|
|
1052
|
+
* DirectiveDefinition :
|
|
1053
|
+
* - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
|
|
1054
|
+
* ```
|
|
1055
|
+
*/
|
|
1056
|
+
parseDirectiveDefinition() {
|
|
1057
|
+
const start = this._lexer.token;
|
|
1058
|
+
const description = this.parseDescription();
|
|
1059
|
+
this.expectKeyword("directive");
|
|
1060
|
+
this.expectToken(TokenKind.AT);
|
|
1061
|
+
const name = this.parseName();
|
|
1062
|
+
const args = this.parseArgumentDefs();
|
|
1063
|
+
const repeatable = this.expectOptionalKeyword("repeatable");
|
|
1064
|
+
this.expectKeyword("on");
|
|
1065
|
+
const locations = this.parseDirectiveLocations();
|
|
1066
|
+
return this.node(start, {
|
|
1067
|
+
kind: Kind.DIRECTIVE_DEFINITION,
|
|
1068
|
+
description,
|
|
1069
|
+
name,
|
|
1070
|
+
arguments: args,
|
|
1071
|
+
repeatable,
|
|
1072
|
+
locations
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* DirectiveLocations :
|
|
1077
|
+
* - `|`? DirectiveLocation
|
|
1078
|
+
* - DirectiveLocations | DirectiveLocation
|
|
1079
|
+
*/
|
|
1080
|
+
parseDirectiveLocations() {
|
|
1081
|
+
return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);
|
|
1082
|
+
}
|
|
1083
|
+
/*
|
|
1084
|
+
* DirectiveLocation :
|
|
1085
|
+
* - ExecutableDirectiveLocation
|
|
1086
|
+
* - TypeSystemDirectiveLocation
|
|
1087
|
+
*
|
|
1088
|
+
* ExecutableDirectiveLocation : one of
|
|
1089
|
+
* `QUERY`
|
|
1090
|
+
* `MUTATION`
|
|
1091
|
+
* `SUBSCRIPTION`
|
|
1092
|
+
* `FIELD`
|
|
1093
|
+
* `FRAGMENT_DEFINITION`
|
|
1094
|
+
* `FRAGMENT_SPREAD`
|
|
1095
|
+
* `INLINE_FRAGMENT`
|
|
1096
|
+
*
|
|
1097
|
+
* TypeSystemDirectiveLocation : one of
|
|
1098
|
+
* `SCHEMA`
|
|
1099
|
+
* `SCALAR`
|
|
1100
|
+
* `OBJECT`
|
|
1101
|
+
* `FIELD_DEFINITION`
|
|
1102
|
+
* `ARGUMENT_DEFINITION`
|
|
1103
|
+
* `INTERFACE`
|
|
1104
|
+
* `UNION`
|
|
1105
|
+
* `ENUM`
|
|
1106
|
+
* `ENUM_VALUE`
|
|
1107
|
+
* `INPUT_OBJECT`
|
|
1108
|
+
* `INPUT_FIELD_DEFINITION`
|
|
1109
|
+
*/
|
|
1110
|
+
parseDirectiveLocation() {
|
|
1111
|
+
const start = this._lexer.token;
|
|
1112
|
+
const name = this.parseName();
|
|
1113
|
+
if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
|
|
1114
|
+
return name;
|
|
1115
|
+
}
|
|
1116
|
+
throw this.unexpected(start);
|
|
1117
|
+
}
|
|
1118
|
+
// Schema Coordinates
|
|
1119
|
+
/**
|
|
1120
|
+
* SchemaCoordinate :
|
|
1121
|
+
* - Name
|
|
1122
|
+
* - Name . Name
|
|
1123
|
+
* - Name . Name ( Name : )
|
|
1124
|
+
* - \@ Name
|
|
1125
|
+
* - \@ Name ( Name : )
|
|
1126
|
+
*/
|
|
1127
|
+
parseSchemaCoordinate() {
|
|
1128
|
+
const start = this._lexer.token;
|
|
1129
|
+
const ofDirective = this.expectOptionalToken(TokenKind.AT);
|
|
1130
|
+
const name = this.parseName();
|
|
1131
|
+
let memberName;
|
|
1132
|
+
if (!ofDirective && this.expectOptionalToken(TokenKind.DOT)) {
|
|
1133
|
+
memberName = this.parseName();
|
|
1134
|
+
}
|
|
1135
|
+
let argumentName;
|
|
1136
|
+
if ((ofDirective || memberName) && this.expectOptionalToken(TokenKind.PAREN_L)) {
|
|
1137
|
+
argumentName = this.parseName();
|
|
1138
|
+
this.expectToken(TokenKind.COLON);
|
|
1139
|
+
this.expectToken(TokenKind.PAREN_R);
|
|
1140
|
+
}
|
|
1141
|
+
if (ofDirective) {
|
|
1142
|
+
if (argumentName) {
|
|
1143
|
+
return this.node(start, {
|
|
1144
|
+
kind: Kind.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1145
|
+
name,
|
|
1146
|
+
argumentName
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
return this.node(start, {
|
|
1150
|
+
kind: Kind.DIRECTIVE_COORDINATE,
|
|
1151
|
+
name
|
|
1152
|
+
});
|
|
1153
|
+
} else if (memberName) {
|
|
1154
|
+
if (argumentName) {
|
|
1155
|
+
return this.node(start, {
|
|
1156
|
+
kind: Kind.ARGUMENT_COORDINATE,
|
|
1157
|
+
name,
|
|
1158
|
+
fieldName: memberName,
|
|
1159
|
+
argumentName
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
return this.node(start, {
|
|
1163
|
+
kind: Kind.MEMBER_COORDINATE,
|
|
1164
|
+
name,
|
|
1165
|
+
memberName
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
return this.node(start, {
|
|
1169
|
+
kind: Kind.TYPE_COORDINATE,
|
|
1170
|
+
name
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
// Core parsing utility functions
|
|
1174
|
+
/**
|
|
1175
|
+
* Returns a node that, if configured to do so, sets a "loc" field as a
|
|
1176
|
+
* location object, used to identify the place in the source that created a
|
|
1177
|
+
* given parsed object.
|
|
1178
|
+
*/
|
|
1179
|
+
node(startToken, node) {
|
|
1180
|
+
if (this._options.noLocation !== true) {
|
|
1181
|
+
node.loc = new Location(
|
|
1182
|
+
startToken,
|
|
1183
|
+
this._lexer.lastToken,
|
|
1184
|
+
this._lexer.source
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
return node;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Determines if the next token is of a given kind
|
|
1191
|
+
*/
|
|
1192
|
+
peek(kind) {
|
|
1193
|
+
return this._lexer.token.kind === kind;
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* If the next token is of the given kind, return that token after advancing the lexer.
|
|
1197
|
+
* Otherwise, do not change the parser state and throw an error.
|
|
1198
|
+
*/
|
|
1199
|
+
expectToken(kind) {
|
|
1200
|
+
const token = this._lexer.token;
|
|
1201
|
+
if (token.kind === kind) {
|
|
1202
|
+
this.advanceLexer();
|
|
1203
|
+
return token;
|
|
1204
|
+
}
|
|
1205
|
+
throw syntaxError(
|
|
1206
|
+
this._lexer.source,
|
|
1207
|
+
token.start,
|
|
1208
|
+
`Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* If the next token is of the given kind, return "true" after advancing the lexer.
|
|
1213
|
+
* Otherwise, do not change the parser state and return "false".
|
|
1214
|
+
*/
|
|
1215
|
+
expectOptionalToken(kind) {
|
|
1216
|
+
const token = this._lexer.token;
|
|
1217
|
+
if (token.kind === kind) {
|
|
1218
|
+
this.advanceLexer();
|
|
1219
|
+
return true;
|
|
1220
|
+
}
|
|
1221
|
+
return false;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* If the next token is a given keyword, advance the lexer.
|
|
1225
|
+
* Otherwise, do not change the parser state and throw an error.
|
|
1226
|
+
*/
|
|
1227
|
+
expectKeyword(value) {
|
|
1228
|
+
const token = this._lexer.token;
|
|
1229
|
+
if (token.kind === TokenKind.NAME && token.value === value) {
|
|
1230
|
+
this.advanceLexer();
|
|
1231
|
+
} else {
|
|
1232
|
+
throw syntaxError(
|
|
1233
|
+
this._lexer.source,
|
|
1234
|
+
token.start,
|
|
1235
|
+
`Expected "${value}", found ${getTokenDesc(token)}.`
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* If the next token is a given keyword, return "true" after advancing the lexer.
|
|
1241
|
+
* Otherwise, do not change the parser state and return "false".
|
|
1242
|
+
*/
|
|
1243
|
+
expectOptionalKeyword(value) {
|
|
1244
|
+
const token = this._lexer.token;
|
|
1245
|
+
if (token.kind === TokenKind.NAME && token.value === value) {
|
|
1246
|
+
this.advanceLexer();
|
|
1247
|
+
return true;
|
|
1248
|
+
}
|
|
1249
|
+
return false;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
1253
|
+
*/
|
|
1254
|
+
unexpected(atToken) {
|
|
1255
|
+
const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
|
|
1256
|
+
return syntaxError(
|
|
1257
|
+
this._lexer.source,
|
|
1258
|
+
token.start,
|
|
1259
|
+
`Unexpected ${getTokenDesc(token)}.`
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Returns a possibly empty list of parse nodes, determined by the parseFn.
|
|
1264
|
+
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1265
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1266
|
+
*/
|
|
1267
|
+
any(openKind, parseFn, closeKind) {
|
|
1268
|
+
this.expectToken(openKind);
|
|
1269
|
+
const nodes = [];
|
|
1270
|
+
while (!this.expectOptionalToken(closeKind)) {
|
|
1271
|
+
nodes.push(parseFn.call(this));
|
|
1272
|
+
}
|
|
1273
|
+
return nodes;
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Returns a list of parse nodes, determined by the parseFn.
|
|
1277
|
+
* It can be empty only if open token is missing otherwise it will always return non-empty list
|
|
1278
|
+
* that begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1279
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1280
|
+
*/
|
|
1281
|
+
optionalMany(openKind, parseFn, closeKind) {
|
|
1282
|
+
if (this.expectOptionalToken(openKind)) {
|
|
1283
|
+
const nodes = [];
|
|
1284
|
+
do {
|
|
1285
|
+
nodes.push(parseFn.call(this));
|
|
1286
|
+
} while (!this.expectOptionalToken(closeKind));
|
|
1287
|
+
return nodes;
|
|
1288
|
+
}
|
|
1289
|
+
return [];
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Returns a non-empty list of parse nodes, determined by the parseFn.
|
|
1293
|
+
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1294
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1295
|
+
*/
|
|
1296
|
+
many(openKind, parseFn, closeKind) {
|
|
1297
|
+
this.expectToken(openKind);
|
|
1298
|
+
const nodes = [];
|
|
1299
|
+
do {
|
|
1300
|
+
nodes.push(parseFn.call(this));
|
|
1301
|
+
} while (!this.expectOptionalToken(closeKind));
|
|
1302
|
+
return nodes;
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* Returns a non-empty list of parse nodes, determined by the parseFn.
|
|
1306
|
+
* This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
|
|
1307
|
+
* Advances the parser to the next lex token after last item in the list.
|
|
1308
|
+
*/
|
|
1309
|
+
delimitedMany(delimiterKind, parseFn) {
|
|
1310
|
+
this.expectOptionalToken(delimiterKind);
|
|
1311
|
+
const nodes = [];
|
|
1312
|
+
do {
|
|
1313
|
+
nodes.push(parseFn.call(this));
|
|
1314
|
+
} while (this.expectOptionalToken(delimiterKind));
|
|
1315
|
+
return nodes;
|
|
1316
|
+
}
|
|
1317
|
+
advanceLexer() {
|
|
1318
|
+
const { maxTokens } = this._options;
|
|
1319
|
+
const token = this._lexer.advance();
|
|
1320
|
+
if (token.kind !== TokenKind.EOF) {
|
|
1321
|
+
++this._tokenCounter;
|
|
1322
|
+
if (maxTokens !== void 0 && this._tokenCounter > maxTokens) {
|
|
1323
|
+
throw syntaxError(
|
|
1324
|
+
this._lexer.source,
|
|
1325
|
+
token.start,
|
|
1326
|
+
`Document contains more that ${maxTokens} tokens. Parsing aborted.`
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
function getTokenDesc(token) {
|
|
1333
|
+
const value = token.value;
|
|
1334
|
+
return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : "");
|
|
1335
|
+
}
|
|
1336
|
+
function getTokenKindDesc(kind) {
|
|
1337
|
+
return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind;
|
|
1338
|
+
}
|
|
1339
|
+
export {
|
|
1340
|
+
Parser,
|
|
1341
|
+
parse
|
|
1342
|
+
};
|
|
1343
|
+
//# sourceMappingURL=parser.js.map
|