@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,2361 @@
|
|
|
1
|
+
import { __exports as lib } from "../../../_virtual/index11.js";
|
|
2
|
+
import { __require as requireTypescript } from "../../typescript/lib/typescript.js";
|
|
3
|
+
var hasRequiredLib;
|
|
4
|
+
function requireLib() {
|
|
5
|
+
if (hasRequiredLib) return lib;
|
|
6
|
+
hasRequiredLib = 1;
|
|
7
|
+
var ts9 = requireTypescript();
|
|
8
|
+
function _interopDefault(e) {
|
|
9
|
+
return e && e.__esModule ? e : { default: e };
|
|
10
|
+
}
|
|
11
|
+
var ts9__default = /* @__PURE__ */ _interopDefault(ts9);
|
|
12
|
+
function forEachToken(node, callback, sourceFile = node.getSourceFile()) {
|
|
13
|
+
for (const token of iterateTokens(node, sourceFile)) {
|
|
14
|
+
callback(token);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function* iterateTokens(node, sourceFile = node.getSourceFile()) {
|
|
18
|
+
const queue = [];
|
|
19
|
+
while (true) {
|
|
20
|
+
if (ts9__default.default.isTokenKind(node.kind)) {
|
|
21
|
+
yield node;
|
|
22
|
+
} else {
|
|
23
|
+
const children = node.getChildren(sourceFile);
|
|
24
|
+
if (children.length === 1) {
|
|
25
|
+
node = children[0];
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
for (let i = children.length - 1; i >= 0; --i) {
|
|
29
|
+
queue.push(children[i]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (queue.length === 0) {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
node = queue.pop();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function forEachComment(node, callback, sourceFile = node.getSourceFile()) {
|
|
39
|
+
const fullText = sourceFile.text;
|
|
40
|
+
for (const { end, kind, pos } of iterateComments(node, sourceFile)) {
|
|
41
|
+
callback(fullText, { end, kind, pos });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function* iterateComments(node, sourceFile = node.getSourceFile()) {
|
|
45
|
+
const fullText = sourceFile.text;
|
|
46
|
+
const notJsx = sourceFile.languageVariant !== ts9__default.default.LanguageVariant.JSX;
|
|
47
|
+
for (const token of iterateTokens(node, sourceFile)) {
|
|
48
|
+
if (token.pos === token.end) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (token.kind !== ts9__default.default.SyntaxKind.JsxText) {
|
|
52
|
+
yield* collectComments((callback) => {
|
|
53
|
+
ts9__default.default.forEachLeadingCommentRange(
|
|
54
|
+
fullText,
|
|
55
|
+
// skip shebang at position 0
|
|
56
|
+
token.pos === 0 ? (ts9__default.default.getShebang(fullText) ?? "").length : token.pos,
|
|
57
|
+
callback
|
|
58
|
+
);
|
|
59
|
+
}, fullText);
|
|
60
|
+
}
|
|
61
|
+
if (notJsx || canHaveTrailingTrivia(token)) {
|
|
62
|
+
yield* collectComments((callback) => {
|
|
63
|
+
ts9__default.default.forEachTrailingCommentRange(fullText, token.end, callback);
|
|
64
|
+
}, fullText);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function canHaveTrailingTrivia(token) {
|
|
69
|
+
switch (token.kind) {
|
|
70
|
+
case ts9__default.default.SyntaxKind.CloseBraceToken:
|
|
71
|
+
return token.parent.kind !== ts9__default.default.SyntaxKind.JsxExpression || !isJsxElementOrFragment(token.parent.parent);
|
|
72
|
+
case ts9__default.default.SyntaxKind.GreaterThanToken:
|
|
73
|
+
switch (token.parent.kind) {
|
|
74
|
+
case ts9__default.default.SyntaxKind.JsxClosingElement:
|
|
75
|
+
case ts9__default.default.SyntaxKind.JsxClosingFragment:
|
|
76
|
+
return !isJsxElementOrFragment(token.parent.parent.parent);
|
|
77
|
+
case ts9__default.default.SyntaxKind.JsxOpeningElement:
|
|
78
|
+
return token.end !== token.parent.end;
|
|
79
|
+
case ts9__default.default.SyntaxKind.JsxOpeningFragment:
|
|
80
|
+
return false;
|
|
81
|
+
// would be inside the fragment
|
|
82
|
+
case ts9__default.default.SyntaxKind.JsxSelfClosingElement:
|
|
83
|
+
return token.end !== token.parent.end || // if end is not equal, this is part of the type arguments list
|
|
84
|
+
!isJsxElementOrFragment(token.parent.parent);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
function collectComments(execute, fullText) {
|
|
90
|
+
const comments = [];
|
|
91
|
+
execute((pos, end, kind) => {
|
|
92
|
+
const text = fullText.slice(pos, end);
|
|
93
|
+
const value = text.slice(
|
|
94
|
+
2,
|
|
95
|
+
kind === ts9__default.default.SyntaxKind.SingleLineCommentTrivia ? void 0 : -2
|
|
96
|
+
);
|
|
97
|
+
comments.push({ end, kind, pos, text, value });
|
|
98
|
+
});
|
|
99
|
+
return comments;
|
|
100
|
+
}
|
|
101
|
+
function isJsxElementOrFragment(node) {
|
|
102
|
+
return node.kind === ts9__default.default.SyntaxKind.JsxElement || node.kind === ts9__default.default.SyntaxKind.JsxFragment;
|
|
103
|
+
}
|
|
104
|
+
function isCompilerOptionEnabled(options, option) {
|
|
105
|
+
switch (option) {
|
|
106
|
+
case "allowJs":
|
|
107
|
+
return options.allowJs === void 0 ? isCompilerOptionEnabled(options, "checkJs") : options.allowJs;
|
|
108
|
+
case "allowSyntheticDefaultImports":
|
|
109
|
+
return options.allowSyntheticDefaultImports !== void 0 ? options.allowSyntheticDefaultImports : isCompilerOptionEnabled(options, "esModuleInterop") || options.module === ts9__default.default.ModuleKind.System;
|
|
110
|
+
case "alwaysStrict":
|
|
111
|
+
case "noImplicitAny":
|
|
112
|
+
case "noImplicitThis":
|
|
113
|
+
case "strictBindCallApply":
|
|
114
|
+
case "strictFunctionTypes":
|
|
115
|
+
case "strictNullChecks":
|
|
116
|
+
case "strictPropertyInitialization":
|
|
117
|
+
return isStrictCompilerOptionEnabled(
|
|
118
|
+
options,
|
|
119
|
+
option
|
|
120
|
+
);
|
|
121
|
+
case "declaration":
|
|
122
|
+
return options.declaration || isCompilerOptionEnabled(options, "composite");
|
|
123
|
+
case "declarationMap":
|
|
124
|
+
case "emitDeclarationOnly":
|
|
125
|
+
case "stripInternal":
|
|
126
|
+
return options[option] === true && isCompilerOptionEnabled(options, "declaration");
|
|
127
|
+
case "incremental":
|
|
128
|
+
return options.incremental === void 0 ? isCompilerOptionEnabled(options, "composite") : options.incremental;
|
|
129
|
+
case "noUncheckedIndexedAccess":
|
|
130
|
+
return options.noUncheckedIndexedAccess === true && isCompilerOptionEnabled(options, "strictNullChecks");
|
|
131
|
+
case "skipDefaultLibCheck":
|
|
132
|
+
return options.skipDefaultLibCheck || isCompilerOptionEnabled(options, "skipLibCheck");
|
|
133
|
+
case "suppressImplicitAnyIndexErrors":
|
|
134
|
+
return (
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
136
|
+
options.suppressImplicitAnyIndexErrors === true && isCompilerOptionEnabled(options, "noImplicitAny")
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return options[option] === true;
|
|
140
|
+
}
|
|
141
|
+
function isStrictCompilerOptionEnabled(options, option) {
|
|
142
|
+
return (options.strict ? options[option] !== false : options[option] === true) && (option !== "strictPropertyInitialization" || isStrictCompilerOptionEnabled(options, "strictNullChecks"));
|
|
143
|
+
}
|
|
144
|
+
function isModifierFlagSet(node, flag) {
|
|
145
|
+
return isFlagSet(ts9__default.default.getCombinedModifierFlags(node), flag);
|
|
146
|
+
}
|
|
147
|
+
function isFlagSet(allFlags, flag) {
|
|
148
|
+
return (allFlags & flag) !== 0;
|
|
149
|
+
}
|
|
150
|
+
function isFlagSetOnObject(obj, flag) {
|
|
151
|
+
return isFlagSet(obj.flags, flag);
|
|
152
|
+
}
|
|
153
|
+
var isNodeFlagSet = isFlagSetOnObject;
|
|
154
|
+
function isObjectFlagSet(objectType, flag) {
|
|
155
|
+
return isFlagSet(objectType.objectFlags, flag);
|
|
156
|
+
}
|
|
157
|
+
var isSymbolFlagSet = isFlagSetOnObject;
|
|
158
|
+
function isTransientSymbolLinksFlagSet(links, flag) {
|
|
159
|
+
return isFlagSet(links.checkFlags, flag);
|
|
160
|
+
}
|
|
161
|
+
var isTypeFlagSet = isFlagSetOnObject;
|
|
162
|
+
function includesModifier(modifiers, ...kinds) {
|
|
163
|
+
if (modifiers === void 0) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
for (const modifier of modifiers) {
|
|
167
|
+
if (kinds.includes(modifier.kind)) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
function isAssignmentKind(kind) {
|
|
174
|
+
return kind >= ts9__default.default.SyntaxKind.FirstAssignment && kind <= ts9__default.default.SyntaxKind.LastAssignment;
|
|
175
|
+
}
|
|
176
|
+
function isNumericPropertyName(name) {
|
|
177
|
+
return String(+name) === name;
|
|
178
|
+
}
|
|
179
|
+
function isValidPropertyAccess(text, languageVersion = ts9__default.default.ScriptTarget.Latest) {
|
|
180
|
+
if (text.length === 0) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
let ch = text.codePointAt(0);
|
|
184
|
+
if (!ts9__default.default.isIdentifierStart(ch, languageVersion)) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
for (let i = charSize(ch); i < text.length; i += charSize(ch)) {
|
|
188
|
+
ch = text.codePointAt(i);
|
|
189
|
+
if (!ts9__default.default.isIdentifierPart(ch, languageVersion)) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
function charSize(ch) {
|
|
196
|
+
return ch >= 65536 ? 2 : 1;
|
|
197
|
+
}
|
|
198
|
+
var AccessKind = /* @__PURE__ */ ((AccessKind2) => {
|
|
199
|
+
AccessKind2[AccessKind2["None"] = 0] = "None";
|
|
200
|
+
AccessKind2[AccessKind2["Read"] = 1] = "Read";
|
|
201
|
+
AccessKind2[AccessKind2["Write"] = 2] = "Write";
|
|
202
|
+
AccessKind2[AccessKind2["Delete"] = 4] = "Delete";
|
|
203
|
+
AccessKind2[AccessKind2["ReadWrite"] = 3] = "ReadWrite";
|
|
204
|
+
return AccessKind2;
|
|
205
|
+
})(AccessKind || {});
|
|
206
|
+
function getAccessKind(node) {
|
|
207
|
+
const parent = node.parent;
|
|
208
|
+
switch (parent.kind) {
|
|
209
|
+
case ts9__default.default.SyntaxKind.ArrayLiteralExpression:
|
|
210
|
+
case ts9__default.default.SyntaxKind.SpreadAssignment:
|
|
211
|
+
case ts9__default.default.SyntaxKind.SpreadElement:
|
|
212
|
+
return isInDestructuringAssignment(
|
|
213
|
+
parent
|
|
214
|
+
) ? 2 : 1;
|
|
215
|
+
case ts9__default.default.SyntaxKind.ArrowFunction:
|
|
216
|
+
return parent.body === node ? 1 : 2;
|
|
217
|
+
case ts9__default.default.SyntaxKind.AsExpression:
|
|
218
|
+
case ts9__default.default.SyntaxKind.NonNullExpression:
|
|
219
|
+
case ts9__default.default.SyntaxKind.ParenthesizedExpression:
|
|
220
|
+
case ts9__default.default.SyntaxKind.TypeAssertionExpression:
|
|
221
|
+
return getAccessKind(parent);
|
|
222
|
+
case ts9__default.default.SyntaxKind.AwaitExpression:
|
|
223
|
+
case ts9__default.default.SyntaxKind.CallExpression:
|
|
224
|
+
case ts9__default.default.SyntaxKind.CaseClause:
|
|
225
|
+
case ts9__default.default.SyntaxKind.ComputedPropertyName:
|
|
226
|
+
case ts9__default.default.SyntaxKind.ConditionalExpression:
|
|
227
|
+
case ts9__default.default.SyntaxKind.Decorator:
|
|
228
|
+
case ts9__default.default.SyntaxKind.DoStatement:
|
|
229
|
+
case ts9__default.default.SyntaxKind.ElementAccessExpression:
|
|
230
|
+
case ts9__default.default.SyntaxKind.ExpressionStatement:
|
|
231
|
+
case ts9__default.default.SyntaxKind.ForStatement:
|
|
232
|
+
case ts9__default.default.SyntaxKind.IfStatement:
|
|
233
|
+
case ts9__default.default.SyntaxKind.JsxElement:
|
|
234
|
+
case ts9__default.default.SyntaxKind.JsxExpression:
|
|
235
|
+
case ts9__default.default.SyntaxKind.JsxOpeningElement:
|
|
236
|
+
case ts9__default.default.SyntaxKind.JsxSelfClosingElement:
|
|
237
|
+
case ts9__default.default.SyntaxKind.JsxSpreadAttribute:
|
|
238
|
+
case ts9__default.default.SyntaxKind.NewExpression:
|
|
239
|
+
case ts9__default.default.SyntaxKind.ReturnStatement:
|
|
240
|
+
case ts9__default.default.SyntaxKind.SwitchStatement:
|
|
241
|
+
case ts9__default.default.SyntaxKind.TaggedTemplateExpression:
|
|
242
|
+
case ts9__default.default.SyntaxKind.TemplateSpan:
|
|
243
|
+
case ts9__default.default.SyntaxKind.ThrowStatement:
|
|
244
|
+
case ts9__default.default.SyntaxKind.TypeOfExpression:
|
|
245
|
+
case ts9__default.default.SyntaxKind.VoidExpression:
|
|
246
|
+
case ts9__default.default.SyntaxKind.WhileStatement:
|
|
247
|
+
case ts9__default.default.SyntaxKind.WithStatement:
|
|
248
|
+
case ts9__default.default.SyntaxKind.YieldExpression:
|
|
249
|
+
return 1;
|
|
250
|
+
case ts9__default.default.SyntaxKind.BinaryExpression:
|
|
251
|
+
return parent.right === node ? 1 : !isAssignmentKind(parent.operatorToken.kind) ? 1 : parent.operatorToken.kind === ts9__default.default.SyntaxKind.EqualsToken ? 2 : 3;
|
|
252
|
+
case ts9__default.default.SyntaxKind.BindingElement:
|
|
253
|
+
case ts9__default.default.SyntaxKind.EnumMember:
|
|
254
|
+
case ts9__default.default.SyntaxKind.JsxAttribute:
|
|
255
|
+
case ts9__default.default.SyntaxKind.Parameter:
|
|
256
|
+
case ts9__default.default.SyntaxKind.PropertyDeclaration:
|
|
257
|
+
case ts9__default.default.SyntaxKind.VariableDeclaration:
|
|
258
|
+
return parent.initializer === node ? 1 : 0;
|
|
259
|
+
case ts9__default.default.SyntaxKind.DeleteExpression:
|
|
260
|
+
return 4;
|
|
261
|
+
case ts9__default.default.SyntaxKind.ExportAssignment:
|
|
262
|
+
return parent.isExportEquals ? 1 : 0;
|
|
263
|
+
case ts9__default.default.SyntaxKind.ExpressionWithTypeArguments:
|
|
264
|
+
return parent.parent.token === ts9__default.default.SyntaxKind.ExtendsKeyword && parent.parent.parent.kind !== ts9__default.default.SyntaxKind.InterfaceDeclaration ? 1 : 0;
|
|
265
|
+
case ts9__default.default.SyntaxKind.ForInStatement:
|
|
266
|
+
case ts9__default.default.SyntaxKind.ForOfStatement:
|
|
267
|
+
return parent.initializer === node ? 2 : 1;
|
|
268
|
+
case ts9__default.default.SyntaxKind.PostfixUnaryExpression:
|
|
269
|
+
return 3;
|
|
270
|
+
case ts9__default.default.SyntaxKind.PrefixUnaryExpression:
|
|
271
|
+
return parent.operator === ts9__default.default.SyntaxKind.PlusPlusToken || parent.operator === ts9__default.default.SyntaxKind.MinusMinusToken ? 3 : 1;
|
|
272
|
+
case ts9__default.default.SyntaxKind.PropertyAccessExpression:
|
|
273
|
+
return parent.expression === node ? 1 : 0;
|
|
274
|
+
case ts9__default.default.SyntaxKind.PropertyAssignment:
|
|
275
|
+
return parent.name === node ? 0 : isInDestructuringAssignment(parent) ? 2 : 1;
|
|
276
|
+
case ts9__default.default.SyntaxKind.ShorthandPropertyAssignment:
|
|
277
|
+
return parent.objectAssignmentInitializer === node ? 1 : isInDestructuringAssignment(parent) ? 2 : 1;
|
|
278
|
+
}
|
|
279
|
+
return 0;
|
|
280
|
+
}
|
|
281
|
+
function isInDestructuringAssignment(node) {
|
|
282
|
+
switch (node.kind) {
|
|
283
|
+
case ts9__default.default.SyntaxKind.ShorthandPropertyAssignment:
|
|
284
|
+
if (node.objectAssignmentInitializer !== void 0) {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
// falls through
|
|
288
|
+
case ts9__default.default.SyntaxKind.PropertyAssignment:
|
|
289
|
+
case ts9__default.default.SyntaxKind.SpreadAssignment:
|
|
290
|
+
node = node.parent;
|
|
291
|
+
break;
|
|
292
|
+
case ts9__default.default.SyntaxKind.SpreadElement:
|
|
293
|
+
if (node.parent.kind !== ts9__default.default.SyntaxKind.ArrayLiteralExpression) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
node = node.parent;
|
|
297
|
+
}
|
|
298
|
+
while (true) {
|
|
299
|
+
switch (node.parent.kind) {
|
|
300
|
+
case ts9__default.default.SyntaxKind.ArrayLiteralExpression:
|
|
301
|
+
case ts9__default.default.SyntaxKind.ObjectLiteralExpression:
|
|
302
|
+
node = node.parent;
|
|
303
|
+
break;
|
|
304
|
+
case ts9__default.default.SyntaxKind.BinaryExpression:
|
|
305
|
+
return node.parent.left === node && node.parent.operatorToken.kind === ts9__default.default.SyntaxKind.EqualsToken;
|
|
306
|
+
case ts9__default.default.SyntaxKind.ForOfStatement:
|
|
307
|
+
return node.parent.initializer === node;
|
|
308
|
+
case ts9__default.default.SyntaxKind.PropertyAssignment:
|
|
309
|
+
case ts9__default.default.SyntaxKind.SpreadAssignment:
|
|
310
|
+
node = node.parent.parent;
|
|
311
|
+
break;
|
|
312
|
+
case ts9__default.default.SyntaxKind.SpreadElement:
|
|
313
|
+
if (node.parent.parent.kind !== ts9__default.default.SyntaxKind.ArrayLiteralExpression) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
node = node.parent.parent;
|
|
317
|
+
break;
|
|
318
|
+
default:
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function isAbstractKeyword(node) {
|
|
324
|
+
return node.kind === ts9__default.default.SyntaxKind.AbstractKeyword;
|
|
325
|
+
}
|
|
326
|
+
function isAccessorKeyword(node) {
|
|
327
|
+
return node.kind === ts9__default.default.SyntaxKind.AccessorKeyword;
|
|
328
|
+
}
|
|
329
|
+
function isAnyKeyword(node) {
|
|
330
|
+
return node.kind === ts9__default.default.SyntaxKind.AnyKeyword;
|
|
331
|
+
}
|
|
332
|
+
function isAssertKeyword(node) {
|
|
333
|
+
return node.kind === ts9__default.default.SyntaxKind.AssertKeyword;
|
|
334
|
+
}
|
|
335
|
+
function isAssertsKeyword(node) {
|
|
336
|
+
return node.kind === ts9__default.default.SyntaxKind.AssertsKeyword;
|
|
337
|
+
}
|
|
338
|
+
function isAsyncKeyword(node) {
|
|
339
|
+
return node.kind === ts9__default.default.SyntaxKind.AsyncKeyword;
|
|
340
|
+
}
|
|
341
|
+
function isAwaitKeyword(node) {
|
|
342
|
+
return node.kind === ts9__default.default.SyntaxKind.AwaitKeyword;
|
|
343
|
+
}
|
|
344
|
+
function isBigIntKeyword(node) {
|
|
345
|
+
return node.kind === ts9__default.default.SyntaxKind.BigIntKeyword;
|
|
346
|
+
}
|
|
347
|
+
function isBooleanKeyword(node) {
|
|
348
|
+
return node.kind === ts9__default.default.SyntaxKind.BooleanKeyword;
|
|
349
|
+
}
|
|
350
|
+
function isColonToken(node) {
|
|
351
|
+
return node.kind === ts9__default.default.SyntaxKind.ColonToken;
|
|
352
|
+
}
|
|
353
|
+
function isConstKeyword(node) {
|
|
354
|
+
return node.kind === ts9__default.default.SyntaxKind.ConstKeyword;
|
|
355
|
+
}
|
|
356
|
+
function isDeclareKeyword(node) {
|
|
357
|
+
return node.kind === ts9__default.default.SyntaxKind.DeclareKeyword;
|
|
358
|
+
}
|
|
359
|
+
function isDefaultKeyword(node) {
|
|
360
|
+
return node.kind === ts9__default.default.SyntaxKind.DefaultKeyword;
|
|
361
|
+
}
|
|
362
|
+
function isDotToken(node) {
|
|
363
|
+
return node.kind === ts9__default.default.SyntaxKind.DotToken;
|
|
364
|
+
}
|
|
365
|
+
function isEndOfFileToken(node) {
|
|
366
|
+
return node.kind === ts9__default.default.SyntaxKind.EndOfFileToken;
|
|
367
|
+
}
|
|
368
|
+
function isEqualsGreaterThanToken(node) {
|
|
369
|
+
return node.kind === ts9__default.default.SyntaxKind.EqualsGreaterThanToken;
|
|
370
|
+
}
|
|
371
|
+
function isEqualsToken(node) {
|
|
372
|
+
return node.kind === ts9__default.default.SyntaxKind.EqualsToken;
|
|
373
|
+
}
|
|
374
|
+
function isExclamationToken(node) {
|
|
375
|
+
return node.kind === ts9__default.default.SyntaxKind.ExclamationToken;
|
|
376
|
+
}
|
|
377
|
+
function isExportKeyword(node) {
|
|
378
|
+
return node.kind === ts9__default.default.SyntaxKind.ExportKeyword;
|
|
379
|
+
}
|
|
380
|
+
function isFalseKeyword(node) {
|
|
381
|
+
return node.kind === ts9__default.default.SyntaxKind.FalseKeyword;
|
|
382
|
+
}
|
|
383
|
+
function isFalseLiteral(node) {
|
|
384
|
+
return node.kind === ts9__default.default.SyntaxKind.FalseKeyword;
|
|
385
|
+
}
|
|
386
|
+
function isImportExpression(node) {
|
|
387
|
+
return node.kind === ts9__default.default.SyntaxKind.ImportKeyword;
|
|
388
|
+
}
|
|
389
|
+
function isImportKeyword(node) {
|
|
390
|
+
return node.kind === ts9__default.default.SyntaxKind.ImportKeyword;
|
|
391
|
+
}
|
|
392
|
+
function isInKeyword(node) {
|
|
393
|
+
return node.kind === ts9__default.default.SyntaxKind.InKeyword;
|
|
394
|
+
}
|
|
395
|
+
function isJSDocText(node) {
|
|
396
|
+
return node.kind === ts9__default.default.SyntaxKind.JSDocText;
|
|
397
|
+
}
|
|
398
|
+
function isJsonMinusNumericLiteral(node) {
|
|
399
|
+
return node.kind === ts9__default.default.SyntaxKind.PrefixUnaryExpression;
|
|
400
|
+
}
|
|
401
|
+
function isNeverKeyword(node) {
|
|
402
|
+
return node.kind === ts9__default.default.SyntaxKind.NeverKeyword;
|
|
403
|
+
}
|
|
404
|
+
function isNullKeyword(node) {
|
|
405
|
+
return node.kind === ts9__default.default.SyntaxKind.NullKeyword;
|
|
406
|
+
}
|
|
407
|
+
function isNullLiteral(node) {
|
|
408
|
+
return node.kind === ts9__default.default.SyntaxKind.NullKeyword;
|
|
409
|
+
}
|
|
410
|
+
function isNumberKeyword(node) {
|
|
411
|
+
return node.kind === ts9__default.default.SyntaxKind.NumberKeyword;
|
|
412
|
+
}
|
|
413
|
+
function isObjectKeyword(node) {
|
|
414
|
+
return node.kind === ts9__default.default.SyntaxKind.ObjectKeyword;
|
|
415
|
+
}
|
|
416
|
+
function isOutKeyword(node) {
|
|
417
|
+
return node.kind === ts9__default.default.SyntaxKind.OutKeyword;
|
|
418
|
+
}
|
|
419
|
+
function isOverrideKeyword(node) {
|
|
420
|
+
return node.kind === ts9__default.default.SyntaxKind.OverrideKeyword;
|
|
421
|
+
}
|
|
422
|
+
function isPrivateKeyword(node) {
|
|
423
|
+
return node.kind === ts9__default.default.SyntaxKind.PrivateKeyword;
|
|
424
|
+
}
|
|
425
|
+
function isProtectedKeyword(node) {
|
|
426
|
+
return node.kind === ts9__default.default.SyntaxKind.ProtectedKeyword;
|
|
427
|
+
}
|
|
428
|
+
function isPublicKeyword(node) {
|
|
429
|
+
return node.kind === ts9__default.default.SyntaxKind.PublicKeyword;
|
|
430
|
+
}
|
|
431
|
+
function isQuestionDotToken(node) {
|
|
432
|
+
return node.kind === ts9__default.default.SyntaxKind.QuestionDotToken;
|
|
433
|
+
}
|
|
434
|
+
function isQuestionToken(node) {
|
|
435
|
+
return node.kind === ts9__default.default.SyntaxKind.QuestionToken;
|
|
436
|
+
}
|
|
437
|
+
function isReadonlyKeyword(node) {
|
|
438
|
+
return node.kind === ts9__default.default.SyntaxKind.ReadonlyKeyword;
|
|
439
|
+
}
|
|
440
|
+
function isStaticKeyword(node) {
|
|
441
|
+
return node.kind === ts9__default.default.SyntaxKind.StaticKeyword;
|
|
442
|
+
}
|
|
443
|
+
function isStringKeyword(node) {
|
|
444
|
+
return node.kind === ts9__default.default.SyntaxKind.StringKeyword;
|
|
445
|
+
}
|
|
446
|
+
function isSuperExpression(node) {
|
|
447
|
+
return node.kind === ts9__default.default.SyntaxKind.SuperKeyword;
|
|
448
|
+
}
|
|
449
|
+
function isSuperKeyword(node) {
|
|
450
|
+
return node.kind === ts9__default.default.SyntaxKind.SuperKeyword;
|
|
451
|
+
}
|
|
452
|
+
function isSymbolKeyword(node) {
|
|
453
|
+
return node.kind === ts9__default.default.SyntaxKind.SymbolKeyword;
|
|
454
|
+
}
|
|
455
|
+
function isSyntaxList(node) {
|
|
456
|
+
return node.kind === ts9__default.default.SyntaxKind.SyntaxList;
|
|
457
|
+
}
|
|
458
|
+
function isThisExpression(node) {
|
|
459
|
+
return node.kind === ts9__default.default.SyntaxKind.ThisKeyword;
|
|
460
|
+
}
|
|
461
|
+
function isThisKeyword(node) {
|
|
462
|
+
return node.kind === ts9__default.default.SyntaxKind.ThisKeyword;
|
|
463
|
+
}
|
|
464
|
+
function isTrueKeyword(node) {
|
|
465
|
+
return node.kind === ts9__default.default.SyntaxKind.TrueKeyword;
|
|
466
|
+
}
|
|
467
|
+
function isTrueLiteral(node) {
|
|
468
|
+
return node.kind === ts9__default.default.SyntaxKind.TrueKeyword;
|
|
469
|
+
}
|
|
470
|
+
function isUndefinedKeyword(node) {
|
|
471
|
+
return node.kind === ts9__default.default.SyntaxKind.UndefinedKeyword;
|
|
472
|
+
}
|
|
473
|
+
function isUnknownKeyword(node) {
|
|
474
|
+
return node.kind === ts9__default.default.SyntaxKind.UnknownKeyword;
|
|
475
|
+
}
|
|
476
|
+
function isVoidKeyword(node) {
|
|
477
|
+
return node.kind === ts9__default.default.SyntaxKind.VoidKeyword;
|
|
478
|
+
}
|
|
479
|
+
var [tsMajor, tsMinor] = ts9__default.default.versionMajorMinor.split(".").map((raw) => Number.parseInt(raw, 10));
|
|
480
|
+
function isTsVersionAtLeast(major, minor = 0) {
|
|
481
|
+
return tsMajor > major || tsMajor === major && tsMinor >= minor;
|
|
482
|
+
}
|
|
483
|
+
function hasDecorators(node) {
|
|
484
|
+
return ts9__default.default.isParameter(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isMethodDeclaration(node) || ts9__default.default.isGetAccessorDeclaration(node) || ts9__default.default.isSetAccessorDeclaration(node) || ts9__default.default.isClassExpression(node) || ts9__default.default.isClassDeclaration(node);
|
|
485
|
+
}
|
|
486
|
+
function hasExpressionInitializer(node) {
|
|
487
|
+
return ts9__default.default.isVariableDeclaration(node) || ts9__default.default.isParameter(node) || ts9__default.default.isBindingElement(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isPropertyAssignment(node) || ts9__default.default.isEnumMember(node);
|
|
488
|
+
}
|
|
489
|
+
function hasInitializer(node) {
|
|
490
|
+
return hasExpressionInitializer(node) || ts9__default.default.isForStatement(node) || ts9__default.default.isForInStatement(node) || ts9__default.default.isForOfStatement(node) || ts9__default.default.isJsxAttribute(node);
|
|
491
|
+
}
|
|
492
|
+
function hasJSDoc(node) {
|
|
493
|
+
if (
|
|
494
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts <5
|
|
495
|
+
isAccessorDeclaration(node) || ts9__default.default.isArrowFunction(node) || ts9__default.default.isBlock(node) || ts9__default.default.isBreakStatement(node) || ts9__default.default.isCallSignatureDeclaration(node) || ts9__default.default.isCaseClause(node) || // eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts <5
|
|
496
|
+
isClassLikeDeclaration(node) || ts9__default.default.isConstructorDeclaration(node) || ts9__default.default.isConstructorTypeNode(node) || ts9__default.default.isConstructSignatureDeclaration(node) || ts9__default.default.isContinueStatement(node) || ts9__default.default.isDebuggerStatement(node) || ts9__default.default.isDoStatement(node) || ts9__default.default.isEmptyStatement(node) || isEndOfFileToken(node) || ts9__default.default.isEnumDeclaration(node) || ts9__default.default.isEnumMember(node) || ts9__default.default.isExportAssignment(node) || ts9__default.default.isExportDeclaration(node) || ts9__default.default.isExportSpecifier(node) || ts9__default.default.isExpressionStatement(node) || ts9__default.default.isForInStatement(node) || ts9__default.default.isForOfStatement(node) || ts9__default.default.isForStatement(node) || ts9__default.default.isFunctionDeclaration(node) || ts9__default.default.isFunctionExpression(node) || ts9__default.default.isFunctionTypeNode(node) || ts9__default.default.isIfStatement(node) || ts9__default.default.isImportDeclaration(node) || ts9__default.default.isImportEqualsDeclaration(node) || ts9__default.default.isIndexSignatureDeclaration(node) || ts9__default.default.isInterfaceDeclaration(node) || ts9__default.default.isJSDocFunctionType(node) || ts9__default.default.isLabeledStatement(node) || ts9__default.default.isMethodDeclaration(node) || ts9__default.default.isMethodSignature(node) || ts9__default.default.isModuleDeclaration(node) || ts9__default.default.isNamedTupleMember(node) || ts9__default.default.isNamespaceExportDeclaration(node) || ts9__default.default.isParameter(node) || ts9__default.default.isParenthesizedExpression(node) || ts9__default.default.isPropertyAssignment(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isPropertySignature(node) || ts9__default.default.isReturnStatement(node) || ts9__default.default.isShorthandPropertyAssignment(node) || ts9__default.default.isSpreadAssignment(node) || ts9__default.default.isSwitchStatement(node) || ts9__default.default.isThrowStatement(node) || ts9__default.default.isTryStatement(node) || ts9__default.default.isTypeAliasDeclaration(node) || ts9__default.default.isVariableDeclaration(node) || ts9__default.default.isVariableStatement(node) || ts9__default.default.isWhileStatement(node) || ts9__default.default.isWithStatement(node)
|
|
497
|
+
) {
|
|
498
|
+
return true;
|
|
499
|
+
}
|
|
500
|
+
if (isTsVersionAtLeast(4, 4) && ts9__default.default.isClassStaticBlockDeclaration(node)) {
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
if (isTsVersionAtLeast(5, 0) && (ts9__default.default.isBinaryExpression(node) || ts9__default.default.isElementAccessExpression(node) || ts9__default.default.isIdentifier(node) || ts9__default.default.isJSDocSignature(node) || ts9__default.default.isObjectLiteralExpression(node) || ts9__default.default.isPropertyAccessExpression(node) || ts9__default.default.isTypeParameterDeclaration(node))) {
|
|
504
|
+
return true;
|
|
505
|
+
}
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
function hasModifiers(node) {
|
|
509
|
+
return ts9__default.default.isTypeParameterDeclaration(node) || ts9__default.default.isParameter(node) || ts9__default.default.isConstructorTypeNode(node) || ts9__default.default.isPropertySignature(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isMethodSignature(node) || ts9__default.default.isMethodDeclaration(node) || ts9__default.default.isConstructorDeclaration(node) || ts9__default.default.isGetAccessorDeclaration(node) || ts9__default.default.isSetAccessorDeclaration(node) || ts9__default.default.isIndexSignatureDeclaration(node) || ts9__default.default.isFunctionExpression(node) || ts9__default.default.isArrowFunction(node) || ts9__default.default.isClassExpression(node) || ts9__default.default.isVariableStatement(node) || ts9__default.default.isFunctionDeclaration(node) || ts9__default.default.isClassDeclaration(node) || ts9__default.default.isInterfaceDeclaration(node) || ts9__default.default.isTypeAliasDeclaration(node) || ts9__default.default.isEnumDeclaration(node) || ts9__default.default.isModuleDeclaration(node) || ts9__default.default.isImportEqualsDeclaration(node) || ts9__default.default.isImportDeclaration(node) || ts9__default.default.isExportAssignment(node) || ts9__default.default.isExportDeclaration(node);
|
|
510
|
+
}
|
|
511
|
+
function hasType(node) {
|
|
512
|
+
return isSignatureDeclaration(node) || ts9__default.default.isVariableDeclaration(node) || ts9__default.default.isParameter(node) || ts9__default.default.isPropertySignature(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isTypePredicateNode(node) || ts9__default.default.isParenthesizedTypeNode(node) || ts9__default.default.isTypeOperatorNode(node) || ts9__default.default.isMappedTypeNode(node) || ts9__default.default.isAssertionExpression(node) || ts9__default.default.isTypeAliasDeclaration(node) || ts9__default.default.isJSDocTypeExpression(node) || ts9__default.default.isJSDocNonNullableType(node) || ts9__default.default.isJSDocNullableType(node) || ts9__default.default.isJSDocOptionalType(node) || ts9__default.default.isJSDocVariadicType(node);
|
|
513
|
+
}
|
|
514
|
+
function hasTypeArguments(node) {
|
|
515
|
+
return ts9__default.default.isCallExpression(node) || ts9__default.default.isNewExpression(node) || ts9__default.default.isTaggedTemplateExpression(node) || ts9__default.default.isJsxOpeningElement(node) || ts9__default.default.isJsxSelfClosingElement(node);
|
|
516
|
+
}
|
|
517
|
+
function isAccessExpression(node) {
|
|
518
|
+
return ts9__default.default.isPropertyAccessExpression(node) || ts9__default.default.isElementAccessExpression(node);
|
|
519
|
+
}
|
|
520
|
+
function isAccessibilityModifier(node) {
|
|
521
|
+
return isPublicKeyword(node) || isPrivateKeyword(node) || isProtectedKeyword(node);
|
|
522
|
+
}
|
|
523
|
+
function isAccessorDeclaration(node) {
|
|
524
|
+
return ts9__default.default.isGetAccessorDeclaration(node) || ts9__default.default.isSetAccessorDeclaration(node);
|
|
525
|
+
}
|
|
526
|
+
function isArrayBindingElement(node) {
|
|
527
|
+
return ts9__default.default.isBindingElement(node) || ts9__default.default.isOmittedExpression(node);
|
|
528
|
+
}
|
|
529
|
+
function isArrayBindingOrAssignmentPattern(node) {
|
|
530
|
+
return ts9__default.default.isArrayBindingPattern(node) || ts9__default.default.isArrayLiteralExpression(node);
|
|
531
|
+
}
|
|
532
|
+
function isAssignmentPattern(node) {
|
|
533
|
+
return ts9__default.default.isObjectLiteralExpression(node) || ts9__default.default.isArrayLiteralExpression(node);
|
|
534
|
+
}
|
|
535
|
+
function isBindingOrAssignmentElementRestIndicator(node) {
|
|
536
|
+
if (ts9__default.default.isSpreadElement(node) || ts9__default.default.isSpreadAssignment(node)) {
|
|
537
|
+
return true;
|
|
538
|
+
}
|
|
539
|
+
if (isTsVersionAtLeast(4, 4)) {
|
|
540
|
+
return ts9__default.default.isDotDotDotToken(node);
|
|
541
|
+
}
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
function isBindingOrAssignmentElementTarget(node) {
|
|
545
|
+
return isBindingOrAssignmentPattern(node) || ts9__default.default.isIdentifier(node) || ts9__default.default.isPropertyAccessExpression(node) || ts9__default.default.isElementAccessExpression(node) || ts9__default.default.isOmittedExpression(node);
|
|
546
|
+
}
|
|
547
|
+
function isBindingOrAssignmentPattern(node) {
|
|
548
|
+
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
549
|
+
}
|
|
550
|
+
function isBindingPattern(node) {
|
|
551
|
+
return ts9__default.default.isObjectBindingPattern(node) || ts9__default.default.isArrayBindingPattern(node);
|
|
552
|
+
}
|
|
553
|
+
function isBlockLike(node) {
|
|
554
|
+
return ts9__default.default.isSourceFile(node) || ts9__default.default.isBlock(node) || ts9__default.default.isModuleBlock(node) || ts9__default.default.isCaseOrDefaultClause(node);
|
|
555
|
+
}
|
|
556
|
+
function isBooleanLiteral(node) {
|
|
557
|
+
return isTrueLiteral(node) || isFalseLiteral(node);
|
|
558
|
+
}
|
|
559
|
+
function isClassLikeDeclaration(node) {
|
|
560
|
+
return ts9__default.default.isClassDeclaration(node) || ts9__default.default.isClassExpression(node);
|
|
561
|
+
}
|
|
562
|
+
function isClassMemberModifier(node) {
|
|
563
|
+
return isAccessibilityModifier(node) || isReadonlyKeyword(node) || isStaticKeyword(node) || isAccessorKeyword(node);
|
|
564
|
+
}
|
|
565
|
+
function isDeclarationName(node) {
|
|
566
|
+
return ts9__default.default.isIdentifier(node) || ts9__default.default.isPrivateIdentifier(node) || ts9__default.default.isStringLiteralLike(node) || ts9__default.default.isNumericLiteral(node) || ts9__default.default.isComputedPropertyName(node) || ts9__default.default.isElementAccessExpression(node) || isBindingPattern(node) || isEntityNameExpression(node);
|
|
567
|
+
}
|
|
568
|
+
function isDeclarationWithTypeParameterChildren(node) {
|
|
569
|
+
return isSignatureDeclaration(node) || // eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts <5
|
|
570
|
+
isClassLikeDeclaration(node) || ts9__default.default.isInterfaceDeclaration(node) || ts9__default.default.isTypeAliasDeclaration(node) || ts9__default.default.isJSDocTemplateTag(node);
|
|
571
|
+
}
|
|
572
|
+
function isDeclarationWithTypeParameters(node) {
|
|
573
|
+
return isDeclarationWithTypeParameterChildren(node) || ts9__default.default.isJSDocTypedefTag(node) || ts9__default.default.isJSDocCallbackTag(node) || ts9__default.default.isJSDocSignature(node);
|
|
574
|
+
}
|
|
575
|
+
function isDestructuringPattern(node) {
|
|
576
|
+
return isBindingPattern(node) || ts9__default.default.isObjectLiteralExpression(node) || ts9__default.default.isArrayLiteralExpression(node);
|
|
577
|
+
}
|
|
578
|
+
function isEntityNameExpression(node) {
|
|
579
|
+
return ts9__default.default.isIdentifier(node) || isPropertyAccessEntityNameExpression(node);
|
|
580
|
+
}
|
|
581
|
+
function isEntityNameOrEntityNameExpression(node) {
|
|
582
|
+
return ts9__default.default.isEntityName(node) || isEntityNameExpression(node);
|
|
583
|
+
}
|
|
584
|
+
function isForInOrOfStatement(node) {
|
|
585
|
+
return ts9__default.default.isForInStatement(node) || ts9__default.default.isForOfStatement(node);
|
|
586
|
+
}
|
|
587
|
+
function isFunctionLikeDeclaration(node) {
|
|
588
|
+
return ts9__default.default.isFunctionDeclaration(node) || ts9__default.default.isMethodDeclaration(node) || ts9__default.default.isGetAccessorDeclaration(node) || ts9__default.default.isSetAccessorDeclaration(node) || ts9__default.default.isConstructorDeclaration(node) || ts9__default.default.isFunctionExpression(node) || ts9__default.default.isArrowFunction(node);
|
|
589
|
+
}
|
|
590
|
+
function isJSDocComment(node) {
|
|
591
|
+
if (isJSDocText(node)) {
|
|
592
|
+
return true;
|
|
593
|
+
}
|
|
594
|
+
if (isTsVersionAtLeast(4, 4)) {
|
|
595
|
+
return ts9__default.default.isJSDocLink(node) || ts9__default.default.isJSDocLinkCode(node) || ts9__default.default.isJSDocLinkPlain(node);
|
|
596
|
+
}
|
|
597
|
+
return false;
|
|
598
|
+
}
|
|
599
|
+
function isJSDocNamespaceBody(node) {
|
|
600
|
+
return ts9__default.default.isIdentifier(node) || isJSDocNamespaceDeclaration(node);
|
|
601
|
+
}
|
|
602
|
+
function isJSDocTypeReferencingNode(node) {
|
|
603
|
+
return ts9__default.default.isJSDocVariadicType(node) || ts9__default.default.isJSDocOptionalType(node) || ts9__default.default.isJSDocNullableType(node) || ts9__default.default.isJSDocNonNullableType(node);
|
|
604
|
+
}
|
|
605
|
+
function isJsonObjectExpression(node) {
|
|
606
|
+
return ts9__default.default.isObjectLiteralExpression(node) || ts9__default.default.isArrayLiteralExpression(node) || isJsonMinusNumericLiteral(node) || ts9__default.default.isNumericLiteral(node) || ts9__default.default.isStringLiteral(node) || isBooleanLiteral(node) || isNullLiteral(node);
|
|
607
|
+
}
|
|
608
|
+
function isJsxAttributeLike(node) {
|
|
609
|
+
return ts9__default.default.isJsxAttribute(node) || ts9__default.default.isJsxSpreadAttribute(node);
|
|
610
|
+
}
|
|
611
|
+
function isJsxAttributeValue(node) {
|
|
612
|
+
return ts9__default.default.isStringLiteral(node) || ts9__default.default.isJsxExpression(node) || ts9__default.default.isJsxElement(node) || ts9__default.default.isJsxSelfClosingElement(node) || ts9__default.default.isJsxFragment(node);
|
|
613
|
+
}
|
|
614
|
+
function isJsxChild(node) {
|
|
615
|
+
return ts9__default.default.isJsxText(node) || ts9__default.default.isJsxExpression(node) || ts9__default.default.isJsxElement(node) || ts9__default.default.isJsxSelfClosingElement(node) || ts9__default.default.isJsxFragment(node);
|
|
616
|
+
}
|
|
617
|
+
function isJsxTagNameExpression(node) {
|
|
618
|
+
return ts9__default.default.isIdentifier(node) || isThisExpression(node) || isJsxTagNamePropertyAccess(node);
|
|
619
|
+
}
|
|
620
|
+
function isLiteralToken(node) {
|
|
621
|
+
return ts9__default.default.isNumericLiteral(node) || ts9__default.default.isBigIntLiteral(node) || ts9__default.default.isStringLiteral(node) || ts9__default.default.isJsxText(node) || ts9__default.default.isRegularExpressionLiteral(node) || ts9__default.default.isNoSubstitutionTemplateLiteral(node);
|
|
622
|
+
}
|
|
623
|
+
function isModuleBody(node) {
|
|
624
|
+
return isNamespaceBody(node) || isJSDocNamespaceBody(node);
|
|
625
|
+
}
|
|
626
|
+
function isModuleName(node) {
|
|
627
|
+
return ts9__default.default.isIdentifier(node) || ts9__default.default.isStringLiteral(node);
|
|
628
|
+
}
|
|
629
|
+
function isModuleReference(node) {
|
|
630
|
+
return ts9__default.default.isEntityName(node) || ts9__default.default.isExternalModuleReference(node);
|
|
631
|
+
}
|
|
632
|
+
function isNamedImportBindings(node) {
|
|
633
|
+
return ts9__default.default.isNamespaceImport(node) || ts9__default.default.isNamedImports(node);
|
|
634
|
+
}
|
|
635
|
+
function isNamedImportsOrExports(node) {
|
|
636
|
+
return ts9__default.default.isNamedImports(node) || ts9__default.default.isNamedExports(node);
|
|
637
|
+
}
|
|
638
|
+
function isNamespaceBody(node) {
|
|
639
|
+
return ts9__default.default.isModuleBlock(node) || isNamespaceDeclaration(node);
|
|
640
|
+
}
|
|
641
|
+
function isObjectBindingOrAssignmentElement(node) {
|
|
642
|
+
return ts9__default.default.isBindingElement(node) || ts9__default.default.isPropertyAssignment(node) || ts9__default.default.isShorthandPropertyAssignment(node) || ts9__default.default.isSpreadAssignment(node);
|
|
643
|
+
}
|
|
644
|
+
function isObjectBindingOrAssignmentPattern(node) {
|
|
645
|
+
return ts9__default.default.isObjectBindingPattern(node) || ts9__default.default.isObjectLiteralExpression(node);
|
|
646
|
+
}
|
|
647
|
+
function isObjectTypeDeclaration(node) {
|
|
648
|
+
return (
|
|
649
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts <5
|
|
650
|
+
isClassLikeDeclaration(node) || ts9__default.default.isInterfaceDeclaration(node) || ts9__default.default.isTypeLiteralNode(node)
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
function isParameterPropertyModifier(node) {
|
|
654
|
+
return isAccessibilityModifier(node) || isReadonlyKeyword(node);
|
|
655
|
+
}
|
|
656
|
+
function isPropertyNameLiteral(node) {
|
|
657
|
+
return ts9__default.default.isIdentifier(node) || ts9__default.default.isStringLiteralLike(node) || ts9__default.default.isNumericLiteral(node);
|
|
658
|
+
}
|
|
659
|
+
function isPseudoLiteralToken(node) {
|
|
660
|
+
return ts9__default.default.isTemplateHead(node) || ts9__default.default.isTemplateMiddle(node) || ts9__default.default.isTemplateTail(node);
|
|
661
|
+
}
|
|
662
|
+
function isSignatureDeclaration(node) {
|
|
663
|
+
return ts9__default.default.isCallSignatureDeclaration(node) || ts9__default.default.isConstructSignatureDeclaration(node) || ts9__default.default.isMethodSignature(node) || ts9__default.default.isIndexSignatureDeclaration(node) || ts9__default.default.isFunctionTypeNode(node) || ts9__default.default.isConstructorTypeNode(node) || ts9__default.default.isJSDocFunctionType(node) || ts9__default.default.isFunctionDeclaration(node) || ts9__default.default.isMethodDeclaration(node) || ts9__default.default.isConstructorDeclaration(node) || // eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts <5
|
|
664
|
+
isAccessorDeclaration(node) || ts9__default.default.isFunctionExpression(node) || ts9__default.default.isArrowFunction(node);
|
|
665
|
+
}
|
|
666
|
+
function isSuperProperty(node) {
|
|
667
|
+
return isSuperPropertyAccessExpression(node) || isSuperElementAccessExpression(node);
|
|
668
|
+
}
|
|
669
|
+
function isTypeOnlyCompatibleAliasDeclaration(node) {
|
|
670
|
+
if (ts9__default.default.isImportClause(node) || ts9__default.default.isImportEqualsDeclaration(node) || ts9__default.default.isNamespaceImport(node) || ts9__default.default.isImportOrExportSpecifier(node)) {
|
|
671
|
+
return true;
|
|
672
|
+
}
|
|
673
|
+
if (isTsVersionAtLeast(5, 0) && (ts9__default.default.isExportDeclaration(node) || ts9__default.default.isNamespaceExport(node))) {
|
|
674
|
+
return true;
|
|
675
|
+
}
|
|
676
|
+
return false;
|
|
677
|
+
}
|
|
678
|
+
function isTypeReferenceType(node) {
|
|
679
|
+
return ts9__default.default.isTypeReferenceNode(node) || ts9__default.default.isExpressionWithTypeArguments(node);
|
|
680
|
+
}
|
|
681
|
+
function isUnionOrIntersectionTypeNode(node) {
|
|
682
|
+
return ts9__default.default.isUnionTypeNode(node) || ts9__default.default.isIntersectionTypeNode(node);
|
|
683
|
+
}
|
|
684
|
+
function isVariableLikeDeclaration(node) {
|
|
685
|
+
return ts9__default.default.isVariableDeclaration(node) || ts9__default.default.isParameter(node) || ts9__default.default.isBindingElement(node) || ts9__default.default.isPropertyDeclaration(node) || ts9__default.default.isPropertyAssignment(node) || ts9__default.default.isPropertySignature(node) || ts9__default.default.isJsxAttribute(node) || ts9__default.default.isShorthandPropertyAssignment(node) || ts9__default.default.isEnumMember(node) || ts9__default.default.isJSDocPropertyTag(node) || ts9__default.default.isJSDocParameterTag(node);
|
|
686
|
+
}
|
|
687
|
+
function isConstAssertionExpression(node) {
|
|
688
|
+
return ts9__default.default.isTypeReferenceNode(node.type) && ts9__default.default.isIdentifier(node.type.typeName) && node.type.typeName.escapedText === "const";
|
|
689
|
+
}
|
|
690
|
+
function isIterationStatement(node) {
|
|
691
|
+
switch (node.kind) {
|
|
692
|
+
case ts9__default.default.SyntaxKind.DoStatement:
|
|
693
|
+
case ts9__default.default.SyntaxKind.ForInStatement:
|
|
694
|
+
case ts9__default.default.SyntaxKind.ForOfStatement:
|
|
695
|
+
case ts9__default.default.SyntaxKind.ForStatement:
|
|
696
|
+
case ts9__default.default.SyntaxKind.WhileStatement:
|
|
697
|
+
return true;
|
|
698
|
+
default:
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
function isJSDocNamespaceDeclaration(node) {
|
|
703
|
+
return ts9__default.default.isModuleDeclaration(node) && ts9__default.default.isIdentifier(node.name) && (node.body === void 0 || isJSDocNamespaceBody(node.body));
|
|
704
|
+
}
|
|
705
|
+
function isJsxTagNamePropertyAccess(node) {
|
|
706
|
+
return ts9__default.default.isPropertyAccessExpression(node) && // eslint-disable-next-line @typescript-eslint/no-deprecated -- Keep compatibility with ts < 5
|
|
707
|
+
isJsxTagNameExpression(node.expression);
|
|
708
|
+
}
|
|
709
|
+
function isNamedDeclarationWithName(node) {
|
|
710
|
+
return "name" in node && node.name !== void 0 && node.name !== null && isDeclarationName(node.name);
|
|
711
|
+
}
|
|
712
|
+
function isNamespaceDeclaration(node) {
|
|
713
|
+
return ts9__default.default.isModuleDeclaration(node) && ts9__default.default.isIdentifier(node.name) && node.body !== void 0 && isNamespaceBody(node.body);
|
|
714
|
+
}
|
|
715
|
+
function isNumericOrStringLikeLiteral(node) {
|
|
716
|
+
switch (node.kind) {
|
|
717
|
+
case ts9__default.default.SyntaxKind.NoSubstitutionTemplateLiteral:
|
|
718
|
+
case ts9__default.default.SyntaxKind.NumericLiteral:
|
|
719
|
+
case ts9__default.default.SyntaxKind.StringLiteral:
|
|
720
|
+
return true;
|
|
721
|
+
default:
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
function isPropertyAccessEntityNameExpression(node) {
|
|
726
|
+
return ts9__default.default.isPropertyAccessExpression(node) && ts9__default.default.isIdentifier(node.name) && isEntityNameExpression(node.expression);
|
|
727
|
+
}
|
|
728
|
+
function isSuperElementAccessExpression(node) {
|
|
729
|
+
return ts9__default.default.isElementAccessExpression(node) && isSuperExpression(node.expression);
|
|
730
|
+
}
|
|
731
|
+
function isSuperPropertyAccessExpression(node) {
|
|
732
|
+
return ts9__default.default.isPropertyAccessExpression(node) && isSuperExpression(node.expression);
|
|
733
|
+
}
|
|
734
|
+
function isFunctionScopeBoundary(node) {
|
|
735
|
+
switch (node.kind) {
|
|
736
|
+
case ts9__default.default.SyntaxKind.ArrowFunction:
|
|
737
|
+
case ts9__default.default.SyntaxKind.CallSignature:
|
|
738
|
+
case ts9__default.default.SyntaxKind.ClassDeclaration:
|
|
739
|
+
case ts9__default.default.SyntaxKind.ClassExpression:
|
|
740
|
+
case ts9__default.default.SyntaxKind.Constructor:
|
|
741
|
+
case ts9__default.default.SyntaxKind.ConstructorType:
|
|
742
|
+
case ts9__default.default.SyntaxKind.ConstructSignature:
|
|
743
|
+
case ts9__default.default.SyntaxKind.EnumDeclaration:
|
|
744
|
+
case ts9__default.default.SyntaxKind.FunctionDeclaration:
|
|
745
|
+
case ts9__default.default.SyntaxKind.FunctionExpression:
|
|
746
|
+
case ts9__default.default.SyntaxKind.FunctionType:
|
|
747
|
+
case ts9__default.default.SyntaxKind.GetAccessor:
|
|
748
|
+
case ts9__default.default.SyntaxKind.MethodDeclaration:
|
|
749
|
+
case ts9__default.default.SyntaxKind.MethodSignature:
|
|
750
|
+
case ts9__default.default.SyntaxKind.ModuleDeclaration:
|
|
751
|
+
case ts9__default.default.SyntaxKind.SetAccessor:
|
|
752
|
+
return true;
|
|
753
|
+
case ts9__default.default.SyntaxKind.SourceFile:
|
|
754
|
+
return ts9__default.default.isExternalModule(node);
|
|
755
|
+
default:
|
|
756
|
+
return false;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
function isIntrinsicAnyType(type) {
|
|
760
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Any);
|
|
761
|
+
}
|
|
762
|
+
function isIntrinsicBigIntType(type) {
|
|
763
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.BigInt);
|
|
764
|
+
}
|
|
765
|
+
function isIntrinsicBooleanType(type) {
|
|
766
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Boolean);
|
|
767
|
+
}
|
|
768
|
+
function isIntrinsicErrorType(type) {
|
|
769
|
+
return isIntrinsicType(type) && type.intrinsicName === "error";
|
|
770
|
+
}
|
|
771
|
+
function isIntrinsicESSymbolType(type) {
|
|
772
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.ESSymbol);
|
|
773
|
+
}
|
|
774
|
+
var IntrinsicTypeFlags = ts9__default.default.TypeFlags.Intrinsic ?? ts9__default.default.TypeFlags.Any | ts9__default.default.TypeFlags.Unknown | ts9__default.default.TypeFlags.String | ts9__default.default.TypeFlags.Number | ts9__default.default.TypeFlags.BigInt | ts9__default.default.TypeFlags.Boolean | ts9__default.default.TypeFlags.BooleanLiteral | ts9__default.default.TypeFlags.ESSymbol | ts9__default.default.TypeFlags.Void | ts9__default.default.TypeFlags.Undefined | ts9__default.default.TypeFlags.Null | ts9__default.default.TypeFlags.Never | ts9__default.default.TypeFlags.NonPrimitive;
|
|
775
|
+
function isIntrinsicNeverType(type) {
|
|
776
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Never);
|
|
777
|
+
}
|
|
778
|
+
function isIntrinsicNonPrimitiveType(type) {
|
|
779
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.NonPrimitive);
|
|
780
|
+
}
|
|
781
|
+
function isIntrinsicNullType(type) {
|
|
782
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Null);
|
|
783
|
+
}
|
|
784
|
+
function isIntrinsicNumberType(type) {
|
|
785
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Number);
|
|
786
|
+
}
|
|
787
|
+
function isIntrinsicStringType(type) {
|
|
788
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.String);
|
|
789
|
+
}
|
|
790
|
+
function isIntrinsicType(type) {
|
|
791
|
+
return isTypeFlagSet(type, IntrinsicTypeFlags);
|
|
792
|
+
}
|
|
793
|
+
function isIntrinsicUndefinedType(type) {
|
|
794
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Undefined);
|
|
795
|
+
}
|
|
796
|
+
function isIntrinsicUnknownType(type) {
|
|
797
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Unknown);
|
|
798
|
+
}
|
|
799
|
+
function isIntrinsicVoidType(type) {
|
|
800
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Void);
|
|
801
|
+
}
|
|
802
|
+
function isConditionalType(type) {
|
|
803
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Conditional);
|
|
804
|
+
}
|
|
805
|
+
function isEnumType(type) {
|
|
806
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Enum);
|
|
807
|
+
}
|
|
808
|
+
function isFreshableType(type) {
|
|
809
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Freshable);
|
|
810
|
+
}
|
|
811
|
+
function isIndexedAccessType(type) {
|
|
812
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.IndexedAccess);
|
|
813
|
+
}
|
|
814
|
+
function isIndexType(type) {
|
|
815
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Index);
|
|
816
|
+
}
|
|
817
|
+
function isInstantiableType(type) {
|
|
818
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Instantiable);
|
|
819
|
+
}
|
|
820
|
+
function isIntersectionType(type) {
|
|
821
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Intersection);
|
|
822
|
+
}
|
|
823
|
+
function isObjectType(type) {
|
|
824
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Object);
|
|
825
|
+
}
|
|
826
|
+
function isStringMappingType(type) {
|
|
827
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.StringMapping);
|
|
828
|
+
}
|
|
829
|
+
function isSubstitutionType(type) {
|
|
830
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Substitution);
|
|
831
|
+
}
|
|
832
|
+
function isTypeParameter(type) {
|
|
833
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.TypeParameter);
|
|
834
|
+
}
|
|
835
|
+
function isTypeVariable(type) {
|
|
836
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.TypeVariable);
|
|
837
|
+
}
|
|
838
|
+
function isUnionOrIntersectionType(type) {
|
|
839
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.UnionOrIntersection);
|
|
840
|
+
}
|
|
841
|
+
function isUnionType(type) {
|
|
842
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Union);
|
|
843
|
+
}
|
|
844
|
+
function isUniqueESSymbolType(type) {
|
|
845
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.UniqueESSymbol);
|
|
846
|
+
}
|
|
847
|
+
function isEvolvingArrayType(type) {
|
|
848
|
+
return isObjectType(type) && isObjectFlagSet(type, ts9__default.default.ObjectFlags.EvolvingArray);
|
|
849
|
+
}
|
|
850
|
+
function isTupleType(type) {
|
|
851
|
+
return isObjectType(type) && isObjectFlagSet(type, ts9__default.default.ObjectFlags.Tuple);
|
|
852
|
+
}
|
|
853
|
+
function isTypeReference(type) {
|
|
854
|
+
return isObjectType(type) && isObjectFlagSet(type, ts9__default.default.ObjectFlags.Reference);
|
|
855
|
+
}
|
|
856
|
+
function isFreshableIntrinsicType(type) {
|
|
857
|
+
return isIntrinsicType(type) && isFreshableType(type);
|
|
858
|
+
}
|
|
859
|
+
function isTupleTypeReference(type) {
|
|
860
|
+
return isTypeReference(type) && isTupleType(type.target);
|
|
861
|
+
}
|
|
862
|
+
function isBigIntLiteralType(type) {
|
|
863
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.BigIntLiteral);
|
|
864
|
+
}
|
|
865
|
+
function isBooleanLiteralType(type) {
|
|
866
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.BooleanLiteral);
|
|
867
|
+
}
|
|
868
|
+
function isFalseLiteralType(type) {
|
|
869
|
+
return isBooleanLiteralType(type) && type.intrinsicName === "false";
|
|
870
|
+
}
|
|
871
|
+
function isLiteralType(type) {
|
|
872
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.Literal);
|
|
873
|
+
}
|
|
874
|
+
function isNumberLiteralType(type) {
|
|
875
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.NumberLiteral);
|
|
876
|
+
}
|
|
877
|
+
function isStringLiteralType(type) {
|
|
878
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.StringLiteral);
|
|
879
|
+
}
|
|
880
|
+
function isTemplateLiteralType(type) {
|
|
881
|
+
return isTypeFlagSet(type, ts9__default.default.TypeFlags.TemplateLiteral);
|
|
882
|
+
}
|
|
883
|
+
function isTrueLiteralType(type) {
|
|
884
|
+
return isBooleanLiteralType(type) && type.intrinsicName === "true";
|
|
885
|
+
}
|
|
886
|
+
function getCallSignaturesOfType(type) {
|
|
887
|
+
if (isUnionType(type)) {
|
|
888
|
+
const signatures = [];
|
|
889
|
+
for (const subType of type.types) {
|
|
890
|
+
signatures.push(...getCallSignaturesOfType(subType));
|
|
891
|
+
}
|
|
892
|
+
return signatures;
|
|
893
|
+
}
|
|
894
|
+
if (isIntersectionType(type)) {
|
|
895
|
+
let signatures;
|
|
896
|
+
for (const subType of type.types) {
|
|
897
|
+
const sig = getCallSignaturesOfType(subType);
|
|
898
|
+
if (sig.length !== 0) {
|
|
899
|
+
if (signatures !== void 0) {
|
|
900
|
+
return [];
|
|
901
|
+
}
|
|
902
|
+
signatures = sig;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
return signatures === void 0 ? [] : signatures;
|
|
906
|
+
}
|
|
907
|
+
return type.getCallSignatures();
|
|
908
|
+
}
|
|
909
|
+
function getPropertyOfType(type, name) {
|
|
910
|
+
if (!name.startsWith("__")) {
|
|
911
|
+
return type.getProperty(name);
|
|
912
|
+
}
|
|
913
|
+
return type.getProperties().find((s) => s.escapedName === name);
|
|
914
|
+
}
|
|
915
|
+
function getWellKnownSymbolPropertyOfType(type, wellKnownSymbolName, typeChecker) {
|
|
916
|
+
const prefix = "__@" + wellKnownSymbolName;
|
|
917
|
+
for (const prop of type.getProperties()) {
|
|
918
|
+
if (!prop.name.startsWith(prefix)) {
|
|
919
|
+
continue;
|
|
920
|
+
}
|
|
921
|
+
const declaration = prop.valueDeclaration ?? prop.getDeclarations()?.[0];
|
|
922
|
+
if (!declaration || !isNamedDeclarationWithName(declaration) || declaration.name === void 0 || !ts9__default.default.isComputedPropertyName(declaration.name)) {
|
|
923
|
+
continue;
|
|
924
|
+
}
|
|
925
|
+
const globalSymbol = typeChecker.getApparentType(
|
|
926
|
+
typeChecker.getTypeAtLocation(declaration.name.expression)
|
|
927
|
+
).symbol;
|
|
928
|
+
if (prop.escapedName === getPropertyNameOfWellKnownSymbol(
|
|
929
|
+
typeChecker,
|
|
930
|
+
globalSymbol,
|
|
931
|
+
wellKnownSymbolName
|
|
932
|
+
)) {
|
|
933
|
+
return prop;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
return void 0;
|
|
937
|
+
}
|
|
938
|
+
function getPropertyNameOfWellKnownSymbol(typeChecker, symbolConstructor, symbolName) {
|
|
939
|
+
const knownSymbol = symbolConstructor && typeChecker.getTypeOfSymbolAtLocation(
|
|
940
|
+
symbolConstructor,
|
|
941
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
942
|
+
symbolConstructor.valueDeclaration
|
|
943
|
+
).getProperty(symbolName);
|
|
944
|
+
const knownSymbolType = knownSymbol && typeChecker.getTypeOfSymbolAtLocation(
|
|
945
|
+
knownSymbol,
|
|
946
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
947
|
+
knownSymbol.valueDeclaration
|
|
948
|
+
);
|
|
949
|
+
if (knownSymbolType && isUniqueESSymbolType(knownSymbolType)) {
|
|
950
|
+
return knownSymbolType.escapedName;
|
|
951
|
+
}
|
|
952
|
+
return "__@" + symbolName;
|
|
953
|
+
}
|
|
954
|
+
function isBindableObjectDefinePropertyCall(node) {
|
|
955
|
+
return node.arguments.length === 3 && isEntityNameExpression(node.arguments[0]) && isNumericOrStringLikeLiteral(node.arguments[1]) && ts9__default.default.isPropertyAccessExpression(node.expression) && node.expression.name.escapedText === "defineProperty" && ts9__default.default.isIdentifier(node.expression.expression) && node.expression.expression.escapedText === "Object";
|
|
956
|
+
}
|
|
957
|
+
function isInConstContext(node, typeChecker) {
|
|
958
|
+
let current = node;
|
|
959
|
+
while (true) {
|
|
960
|
+
const parent = current.parent;
|
|
961
|
+
outer: switch (parent.kind) {
|
|
962
|
+
case ts9__default.default.SyntaxKind.ArrayLiteralExpression:
|
|
963
|
+
case ts9__default.default.SyntaxKind.ObjectLiteralExpression:
|
|
964
|
+
case ts9__default.default.SyntaxKind.ParenthesizedExpression:
|
|
965
|
+
case ts9__default.default.SyntaxKind.TemplateExpression:
|
|
966
|
+
current = parent;
|
|
967
|
+
break;
|
|
968
|
+
case ts9__default.default.SyntaxKind.AsExpression:
|
|
969
|
+
case ts9__default.default.SyntaxKind.TypeAssertionExpression:
|
|
970
|
+
return isConstAssertionExpression(parent);
|
|
971
|
+
case ts9__default.default.SyntaxKind.CallExpression: {
|
|
972
|
+
if (!ts9__default.default.isExpression(current)) {
|
|
973
|
+
return false;
|
|
974
|
+
}
|
|
975
|
+
const functionSignature = typeChecker.getResolvedSignature(
|
|
976
|
+
parent
|
|
977
|
+
);
|
|
978
|
+
if (functionSignature === void 0) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
const argumentIndex = parent.arguments.indexOf(
|
|
982
|
+
current
|
|
983
|
+
);
|
|
984
|
+
if (argumentIndex < 0) {
|
|
985
|
+
return false;
|
|
986
|
+
}
|
|
987
|
+
const parameterSymbol = functionSignature.getParameters()[argumentIndex];
|
|
988
|
+
if (parameterSymbol === void 0 || !("links" in parameterSymbol)) {
|
|
989
|
+
return false;
|
|
990
|
+
}
|
|
991
|
+
const parameterSymbolLinks = parameterSymbol.links;
|
|
992
|
+
const propertySymbol = parameterSymbolLinks.type?.getProperties()?.[argumentIndex];
|
|
993
|
+
if (propertySymbol === void 0 || !("links" in propertySymbol)) {
|
|
994
|
+
return false;
|
|
995
|
+
}
|
|
996
|
+
return !!propertySymbol.links && isTransientSymbolLinksFlagSet(
|
|
997
|
+
propertySymbol.links,
|
|
998
|
+
ts9__default.default.CheckFlags.Readonly
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
case ts9__default.default.SyntaxKind.PrefixUnaryExpression:
|
|
1002
|
+
if (current.kind !== ts9__default.default.SyntaxKind.NumericLiteral) {
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
switch (parent.operator) {
|
|
1006
|
+
case ts9__default.default.SyntaxKind.MinusToken:
|
|
1007
|
+
case ts9__default.default.SyntaxKind.PlusToken:
|
|
1008
|
+
current = parent;
|
|
1009
|
+
break outer;
|
|
1010
|
+
default:
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
case ts9__default.default.SyntaxKind.PropertyAssignment:
|
|
1014
|
+
if (parent.initializer !== current) {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
current = parent.parent;
|
|
1018
|
+
break;
|
|
1019
|
+
case ts9__default.default.SyntaxKind.ShorthandPropertyAssignment:
|
|
1020
|
+
current = parent.parent;
|
|
1021
|
+
break;
|
|
1022
|
+
default:
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
function intersectionConstituents(type) {
|
|
1028
|
+
return isIntersectionType(type) ? type.types : [type];
|
|
1029
|
+
}
|
|
1030
|
+
var intersectionTypeParts = intersectionConstituents;
|
|
1031
|
+
function isFalsyType(type) {
|
|
1032
|
+
if (isTypeFlagSet(
|
|
1033
|
+
type,
|
|
1034
|
+
ts9__default.default.TypeFlags.Undefined | ts9__default.default.TypeFlags.Null | ts9__default.default.TypeFlags.Void
|
|
1035
|
+
)) {
|
|
1036
|
+
return true;
|
|
1037
|
+
}
|
|
1038
|
+
if (typeIsLiteral(type)) {
|
|
1039
|
+
if (typeof type.value === "object") {
|
|
1040
|
+
return type.value.base10Value === "0";
|
|
1041
|
+
} else {
|
|
1042
|
+
return !type.value;
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return isFalseLiteralType(type);
|
|
1046
|
+
}
|
|
1047
|
+
function isPropertyReadonlyInType(type, name, typeChecker) {
|
|
1048
|
+
let seenProperty = false;
|
|
1049
|
+
let seenReadonlySignature = false;
|
|
1050
|
+
for (const subType of unionConstituents(type)) {
|
|
1051
|
+
if (getPropertyOfType(subType, name) === void 0) {
|
|
1052
|
+
const index = (isNumericPropertyName(name) ? typeChecker.getIndexInfoOfType(subType, ts9__default.default.IndexKind.Number) : void 0) ?? typeChecker.getIndexInfoOfType(subType, ts9__default.default.IndexKind.String);
|
|
1053
|
+
if (index?.isReadonly) {
|
|
1054
|
+
if (seenProperty) {
|
|
1055
|
+
return true;
|
|
1056
|
+
}
|
|
1057
|
+
seenReadonlySignature = true;
|
|
1058
|
+
}
|
|
1059
|
+
} else if (seenReadonlySignature || isReadonlyPropertyIntersection(subType, name, typeChecker)) {
|
|
1060
|
+
return true;
|
|
1061
|
+
} else {
|
|
1062
|
+
seenProperty = true;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
return false;
|
|
1066
|
+
}
|
|
1067
|
+
function isThenableType(typeChecker, node, type = typeChecker.getTypeAtLocation(node)) {
|
|
1068
|
+
for (const constituent of unionConstituents(
|
|
1069
|
+
typeChecker.getApparentType(type)
|
|
1070
|
+
)) {
|
|
1071
|
+
const then = constituent.getProperty("then");
|
|
1072
|
+
if (then === void 0) {
|
|
1073
|
+
continue;
|
|
1074
|
+
}
|
|
1075
|
+
const thenType = typeChecker.getTypeOfSymbolAtLocation(then, node);
|
|
1076
|
+
for (const subConstituent of unionConstituents(thenType)) {
|
|
1077
|
+
for (const signature of subConstituent.getCallSignatures()) {
|
|
1078
|
+
if (signature.parameters.length !== 0 && isCallback(typeChecker, signature.parameters[0], node)) {
|
|
1079
|
+
return true;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
return false;
|
|
1085
|
+
}
|
|
1086
|
+
function symbolHasReadonlyDeclaration(symbol, typeChecker) {
|
|
1087
|
+
return !!((symbol.flags & ts9__default.default.SymbolFlags.Accessor) === ts9__default.default.SymbolFlags.GetAccessor || symbol.declarations?.some(
|
|
1088
|
+
(node) => isModifierFlagSet(node, ts9__default.default.ModifierFlags.Readonly) || ts9__default.default.isVariableDeclaration(node) && isNodeFlagSet(node.parent, ts9__default.default.NodeFlags.Const) || ts9__default.default.isCallExpression(node) && isReadonlyAssignmentDeclaration(node, typeChecker) || ts9__default.default.isEnumMember(node) || (ts9__default.default.isPropertyAssignment(node) || ts9__default.default.isShorthandPropertyAssignment(node)) && isInConstContext(node, typeChecker)
|
|
1089
|
+
));
|
|
1090
|
+
}
|
|
1091
|
+
function typeConstituents(type) {
|
|
1092
|
+
return isIntersectionType(type) || isUnionType(type) ? type.types : [type];
|
|
1093
|
+
}
|
|
1094
|
+
function typeIsLiteral(type) {
|
|
1095
|
+
if (isTsVersionAtLeast(5, 0)) {
|
|
1096
|
+
return type.isLiteral();
|
|
1097
|
+
} else {
|
|
1098
|
+
return isTypeFlagSet(
|
|
1099
|
+
type,
|
|
1100
|
+
ts9__default.default.TypeFlags.StringLiteral | ts9__default.default.TypeFlags.NumberLiteral | ts9__default.default.TypeFlags.BigIntLiteral
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
var typeParts = typeConstituents;
|
|
1105
|
+
function unionConstituents(type) {
|
|
1106
|
+
return isUnionType(type) ? type.types : [type];
|
|
1107
|
+
}
|
|
1108
|
+
var unionTypeParts = unionConstituents;
|
|
1109
|
+
function isCallback(typeChecker, param, node) {
|
|
1110
|
+
let type = typeChecker.getApparentType(
|
|
1111
|
+
typeChecker.getTypeOfSymbolAtLocation(param, node)
|
|
1112
|
+
);
|
|
1113
|
+
if (param.valueDeclaration.dotDotDotToken) {
|
|
1114
|
+
type = type.getNumberIndexType();
|
|
1115
|
+
if (type === void 0) {
|
|
1116
|
+
return false;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
for (const subType of unionConstituents(type)) {
|
|
1120
|
+
if (subType.getCallSignatures().length !== 0) {
|
|
1121
|
+
return true;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
return false;
|
|
1125
|
+
}
|
|
1126
|
+
function isReadonlyAssignmentDeclaration(node, typeChecker) {
|
|
1127
|
+
if (!isBindableObjectDefinePropertyCall(node)) {
|
|
1128
|
+
return false;
|
|
1129
|
+
}
|
|
1130
|
+
const descriptorType = typeChecker.getTypeAtLocation(node.arguments[2]);
|
|
1131
|
+
if (descriptorType.getProperty("value") === void 0) {
|
|
1132
|
+
return descriptorType.getProperty("set") === void 0;
|
|
1133
|
+
}
|
|
1134
|
+
const writableProp = descriptorType.getProperty("writable");
|
|
1135
|
+
if (writableProp === void 0) {
|
|
1136
|
+
return false;
|
|
1137
|
+
}
|
|
1138
|
+
const writableType = writableProp.valueDeclaration !== void 0 && ts9__default.default.isPropertyAssignment(writableProp.valueDeclaration) ? typeChecker.getTypeAtLocation(writableProp.valueDeclaration.initializer) : typeChecker.getTypeOfSymbolAtLocation(writableProp, node.arguments[2]);
|
|
1139
|
+
return isFalseLiteralType(writableType);
|
|
1140
|
+
}
|
|
1141
|
+
function isReadonlyPropertyFromMappedType(type, name, typeChecker) {
|
|
1142
|
+
if (!isObjectType(type) || !isObjectFlagSet(type, ts9__default.default.ObjectFlags.Mapped)) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
const declaration = type.symbol.declarations[0];
|
|
1146
|
+
if (declaration.readonlyToken !== void 0 && !/^__@[^@]+$/.test(name)) {
|
|
1147
|
+
return declaration.readonlyToken.kind !== ts9__default.default.SyntaxKind.MinusToken;
|
|
1148
|
+
}
|
|
1149
|
+
const { modifiersType } = type;
|
|
1150
|
+
return modifiersType && isPropertyReadonlyInType(modifiersType, name, typeChecker);
|
|
1151
|
+
}
|
|
1152
|
+
function isReadonlyPropertyIntersection(type, name, typeChecker) {
|
|
1153
|
+
const constituents = intersectionConstituents(type);
|
|
1154
|
+
return constituents.some((constituent) => {
|
|
1155
|
+
const prop = getPropertyOfType(constituent, name);
|
|
1156
|
+
if (prop === void 0) {
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
if (prop.flags & ts9__default.default.SymbolFlags.Transient) {
|
|
1160
|
+
if (/^(?:[1-9]\d*|0)$/.test(name) && isTupleTypeReference(constituent)) {
|
|
1161
|
+
return constituent.target.readonly;
|
|
1162
|
+
}
|
|
1163
|
+
switch (isReadonlyPropertyFromMappedType(constituent, name, typeChecker)) {
|
|
1164
|
+
case false:
|
|
1165
|
+
return false;
|
|
1166
|
+
case true:
|
|
1167
|
+
return true;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
return !!// members of namespace import
|
|
1171
|
+
(isSymbolFlagSet(prop, ts9__default.default.SymbolFlags.ValueModule) || // we unwrapped every mapped type, now we can check the actual declarations
|
|
1172
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- Will be made private-only soon.
|
|
1173
|
+
symbolHasReadonlyDeclaration(prop, typeChecker));
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
function identifierToKeywordKind(node) {
|
|
1177
|
+
return "originalKeywordKind" in node ? node.originalKeywordKind : ts9__default.default.identifierToKeywordKind(node);
|
|
1178
|
+
}
|
|
1179
|
+
var DeclarationDomain = /* @__PURE__ */ ((DeclarationDomain2) => {
|
|
1180
|
+
DeclarationDomain2[DeclarationDomain2["Namespace"] = 1] = "Namespace";
|
|
1181
|
+
DeclarationDomain2[DeclarationDomain2["Type"] = 2] = "Type";
|
|
1182
|
+
DeclarationDomain2[DeclarationDomain2["Value"] = 4] = "Value";
|
|
1183
|
+
DeclarationDomain2[DeclarationDomain2["Any"] = 7] = "Any";
|
|
1184
|
+
DeclarationDomain2[DeclarationDomain2["Import"] = 8] = "Import";
|
|
1185
|
+
return DeclarationDomain2;
|
|
1186
|
+
})(DeclarationDomain || {});
|
|
1187
|
+
function getDeclarationDomain(node) {
|
|
1188
|
+
switch (node.parent.kind) {
|
|
1189
|
+
case ts9__default.default.SyntaxKind.ClassDeclaration:
|
|
1190
|
+
case ts9__default.default.SyntaxKind.ClassExpression:
|
|
1191
|
+
return 2 | 4;
|
|
1192
|
+
case ts9__default.default.SyntaxKind.EnumDeclaration:
|
|
1193
|
+
return 7;
|
|
1194
|
+
case ts9__default.default.SyntaxKind.FunctionDeclaration:
|
|
1195
|
+
case ts9__default.default.SyntaxKind.FunctionExpression:
|
|
1196
|
+
return 4;
|
|
1197
|
+
case ts9__default.default.SyntaxKind.ImportClause:
|
|
1198
|
+
case ts9__default.default.SyntaxKind.NamespaceImport:
|
|
1199
|
+
return 7 | 8;
|
|
1200
|
+
// TODO handle type-only imports
|
|
1201
|
+
case ts9__default.default.SyntaxKind.ImportEqualsDeclaration:
|
|
1202
|
+
case ts9__default.default.SyntaxKind.ImportSpecifier:
|
|
1203
|
+
return node.parent.name === node ? 7 | 8 : void 0;
|
|
1204
|
+
case ts9__default.default.SyntaxKind.InterfaceDeclaration:
|
|
1205
|
+
case ts9__default.default.SyntaxKind.TypeAliasDeclaration:
|
|
1206
|
+
case ts9__default.default.SyntaxKind.TypeParameter:
|
|
1207
|
+
return 2;
|
|
1208
|
+
case ts9__default.default.SyntaxKind.ModuleDeclaration:
|
|
1209
|
+
return 1;
|
|
1210
|
+
case ts9__default.default.SyntaxKind.Parameter:
|
|
1211
|
+
if (node.parent.parent.kind === ts9__default.default.SyntaxKind.IndexSignature || identifierToKeywordKind(node) === ts9__default.default.SyntaxKind.ThisKeyword) {
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
// falls through
|
|
1215
|
+
case ts9__default.default.SyntaxKind.BindingElement:
|
|
1216
|
+
case ts9__default.default.SyntaxKind.VariableDeclaration:
|
|
1217
|
+
return node.parent.name === node ? 4 : void 0;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
function getPropertyName(propertyName) {
|
|
1221
|
+
if (propertyName.kind === ts9__default.default.SyntaxKind.ComputedPropertyName) {
|
|
1222
|
+
const expression = unwrapParentheses(propertyName.expression);
|
|
1223
|
+
if (ts9__default.default.isPrefixUnaryExpression(expression)) {
|
|
1224
|
+
let negate = false;
|
|
1225
|
+
switch (expression.operator) {
|
|
1226
|
+
case ts9__default.default.SyntaxKind.MinusToken:
|
|
1227
|
+
negate = true;
|
|
1228
|
+
// falls through
|
|
1229
|
+
case ts9__default.default.SyntaxKind.PlusToken:
|
|
1230
|
+
return ts9__default.default.isNumericLiteral(expression.operand) ? `${negate ? "-" : ""}${expression.operand.text}` : ts9__default.default.isBigIntLiteral(expression.operand) ? `${negate ? "-" : ""}${expression.operand.text.slice(0, -1)}` : void 0;
|
|
1231
|
+
default:
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if (ts9__default.default.isBigIntLiteral(expression)) {
|
|
1236
|
+
return expression.text.slice(0, -1);
|
|
1237
|
+
}
|
|
1238
|
+
if (isNumericOrStringLikeLiteral(expression)) {
|
|
1239
|
+
return expression.text;
|
|
1240
|
+
}
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
return propertyName.kind === ts9__default.default.SyntaxKind.PrivateIdentifier ? void 0 : propertyName.text;
|
|
1244
|
+
}
|
|
1245
|
+
function unwrapParentheses(node) {
|
|
1246
|
+
while (node.kind === ts9__default.default.SyntaxKind.ParenthesizedExpression) {
|
|
1247
|
+
node = node.expression;
|
|
1248
|
+
}
|
|
1249
|
+
return node;
|
|
1250
|
+
}
|
|
1251
|
+
var UsageDomain = /* @__PURE__ */ ((UsageDomain2) => {
|
|
1252
|
+
UsageDomain2[UsageDomain2["Namespace"] = 1] = "Namespace";
|
|
1253
|
+
UsageDomain2[UsageDomain2["Type"] = 2] = "Type";
|
|
1254
|
+
UsageDomain2[UsageDomain2["Value"] = 4] = "Value";
|
|
1255
|
+
UsageDomain2[UsageDomain2["Any"] = 7] = "Any";
|
|
1256
|
+
UsageDomain2[UsageDomain2["TypeQuery"] = 8] = "TypeQuery";
|
|
1257
|
+
UsageDomain2[UsageDomain2["ValueOrNamespace"] = 5] = "ValueOrNamespace";
|
|
1258
|
+
return UsageDomain2;
|
|
1259
|
+
})(UsageDomain || {});
|
|
1260
|
+
function getUsageDomain(node) {
|
|
1261
|
+
const parent = node.parent;
|
|
1262
|
+
switch (parent.kind) {
|
|
1263
|
+
// Value
|
|
1264
|
+
case ts9__default.default.SyntaxKind.BindingElement:
|
|
1265
|
+
if (parent.initializer === node) {
|
|
1266
|
+
return 5;
|
|
1267
|
+
}
|
|
1268
|
+
break;
|
|
1269
|
+
case ts9__default.default.SyntaxKind.BreakStatement:
|
|
1270
|
+
case ts9__default.default.SyntaxKind.ClassDeclaration:
|
|
1271
|
+
case ts9__default.default.SyntaxKind.ClassExpression:
|
|
1272
|
+
case ts9__default.default.SyntaxKind.ContinueStatement:
|
|
1273
|
+
case ts9__default.default.SyntaxKind.EnumDeclaration:
|
|
1274
|
+
case ts9__default.default.SyntaxKind.FunctionDeclaration:
|
|
1275
|
+
case ts9__default.default.SyntaxKind.FunctionExpression:
|
|
1276
|
+
case ts9__default.default.SyntaxKind.GetAccessor:
|
|
1277
|
+
case ts9__default.default.SyntaxKind.ImportClause:
|
|
1278
|
+
case ts9__default.default.SyntaxKind.ImportSpecifier:
|
|
1279
|
+
case ts9__default.default.SyntaxKind.InterfaceDeclaration:
|
|
1280
|
+
case ts9__default.default.SyntaxKind.JsxAttribute:
|
|
1281
|
+
case ts9__default.default.SyntaxKind.LabeledStatement:
|
|
1282
|
+
case ts9__default.default.SyntaxKind.MethodDeclaration:
|
|
1283
|
+
case ts9__default.default.SyntaxKind.MethodSignature:
|
|
1284
|
+
case ts9__default.default.SyntaxKind.ModuleDeclaration:
|
|
1285
|
+
case ts9__default.default.SyntaxKind.NamedTupleMember:
|
|
1286
|
+
case ts9__default.default.SyntaxKind.NamespaceExport:
|
|
1287
|
+
case ts9__default.default.SyntaxKind.NamespaceExportDeclaration:
|
|
1288
|
+
case ts9__default.default.SyntaxKind.NamespaceImport:
|
|
1289
|
+
case ts9__default.default.SyntaxKind.PropertySignature:
|
|
1290
|
+
case ts9__default.default.SyntaxKind.SetAccessor:
|
|
1291
|
+
case ts9__default.default.SyntaxKind.TypeAliasDeclaration:
|
|
1292
|
+
case ts9__default.default.SyntaxKind.TypeParameter:
|
|
1293
|
+
case ts9__default.default.SyntaxKind.TypePredicate:
|
|
1294
|
+
break;
|
|
1295
|
+
case ts9__default.default.SyntaxKind.EnumMember:
|
|
1296
|
+
case ts9__default.default.SyntaxKind.ImportEqualsDeclaration:
|
|
1297
|
+
case ts9__default.default.SyntaxKind.Parameter:
|
|
1298
|
+
case ts9__default.default.SyntaxKind.PropertyAccessExpression:
|
|
1299
|
+
case ts9__default.default.SyntaxKind.PropertyAssignment:
|
|
1300
|
+
case ts9__default.default.SyntaxKind.PropertyDeclaration:
|
|
1301
|
+
case ts9__default.default.SyntaxKind.VariableDeclaration:
|
|
1302
|
+
if (parent.name !== node) {
|
|
1303
|
+
return 5;
|
|
1304
|
+
}
|
|
1305
|
+
break;
|
|
1306
|
+
case ts9__default.default.SyntaxKind.ExportAssignment:
|
|
1307
|
+
return 7;
|
|
1308
|
+
case ts9__default.default.SyntaxKind.ExportSpecifier:
|
|
1309
|
+
if (parent.propertyName === void 0 || parent.propertyName === node) {
|
|
1310
|
+
return 7;
|
|
1311
|
+
}
|
|
1312
|
+
break;
|
|
1313
|
+
case ts9__default.default.SyntaxKind.ExpressionWithTypeArguments:
|
|
1314
|
+
return parent.parent.token === ts9__default.default.SyntaxKind.ImplementsKeyword || parent.parent.parent.kind === ts9__default.default.SyntaxKind.InterfaceDeclaration ? 2 : 4;
|
|
1315
|
+
case ts9__default.default.SyntaxKind.QualifiedName:
|
|
1316
|
+
if (parent.left === node) {
|
|
1317
|
+
if (getEntityNameParent(parent).kind === ts9__default.default.SyntaxKind.TypeQuery) {
|
|
1318
|
+
return 1 | 8;
|
|
1319
|
+
}
|
|
1320
|
+
return 1;
|
|
1321
|
+
}
|
|
1322
|
+
break;
|
|
1323
|
+
case ts9__default.default.SyntaxKind.TypeQuery:
|
|
1324
|
+
return 5 | 8;
|
|
1325
|
+
case ts9__default.default.SyntaxKind.TypeReference:
|
|
1326
|
+
return identifierToKeywordKind(node) !== ts9__default.default.SyntaxKind.ConstKeyword ? 2 : void 0;
|
|
1327
|
+
default:
|
|
1328
|
+
return 5;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
function getEntityNameParent(name) {
|
|
1332
|
+
let parent = name.parent;
|
|
1333
|
+
while (parent.kind === ts9__default.default.SyntaxKind.QualifiedName) {
|
|
1334
|
+
parent = parent.parent;
|
|
1335
|
+
}
|
|
1336
|
+
return parent;
|
|
1337
|
+
}
|
|
1338
|
+
function isBlockScopeBoundary(node) {
|
|
1339
|
+
switch (node.kind) {
|
|
1340
|
+
case ts9__default.default.SyntaxKind.Block: {
|
|
1341
|
+
const parent = node.parent;
|
|
1342
|
+
return parent.kind !== ts9__default.default.SyntaxKind.CatchClause && // blocks inside SourceFile are block scope boundaries
|
|
1343
|
+
(parent.kind === ts9__default.default.SyntaxKind.SourceFile || // blocks that are direct children of a function scope boundary are no scope boundary
|
|
1344
|
+
// for example the FunctionBlock is part of the function scope of the containing function
|
|
1345
|
+
!isFunctionScopeBoundary(parent)) ? 2 : 0;
|
|
1346
|
+
}
|
|
1347
|
+
case ts9__default.default.SyntaxKind.CaseBlock:
|
|
1348
|
+
case ts9__default.default.SyntaxKind.CatchClause:
|
|
1349
|
+
case ts9__default.default.SyntaxKind.ForInStatement:
|
|
1350
|
+
case ts9__default.default.SyntaxKind.ForOfStatement:
|
|
1351
|
+
case ts9__default.default.SyntaxKind.ForStatement:
|
|
1352
|
+
case ts9__default.default.SyntaxKind.WithStatement:
|
|
1353
|
+
return 2;
|
|
1354
|
+
default:
|
|
1355
|
+
return 0;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
var AbstractScope = class {
|
|
1359
|
+
constructor(global) {
|
|
1360
|
+
this.global = global;
|
|
1361
|
+
}
|
|
1362
|
+
namespaceScopes = void 0;
|
|
1363
|
+
uses = [];
|
|
1364
|
+
variables = /* @__PURE__ */ new Map();
|
|
1365
|
+
#enumScopes = void 0;
|
|
1366
|
+
addUse(use) {
|
|
1367
|
+
this.uses.push(use);
|
|
1368
|
+
}
|
|
1369
|
+
addVariable(identifier, name, selector, exported, domain) {
|
|
1370
|
+
const variables = this.getDestinationScope(selector).getVariables();
|
|
1371
|
+
const declaration = {
|
|
1372
|
+
declaration: name,
|
|
1373
|
+
domain,
|
|
1374
|
+
exported
|
|
1375
|
+
};
|
|
1376
|
+
const variable = variables.get(identifier);
|
|
1377
|
+
if (variable === void 0) {
|
|
1378
|
+
variables.set(identifier, {
|
|
1379
|
+
declarations: [declaration],
|
|
1380
|
+
domain,
|
|
1381
|
+
uses: []
|
|
1382
|
+
});
|
|
1383
|
+
} else {
|
|
1384
|
+
variable.domain |= domain;
|
|
1385
|
+
variable.declarations.push(declaration);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1389
|
+
createOrReuseEnumScope(name, _exported) {
|
|
1390
|
+
let scope;
|
|
1391
|
+
if (this.#enumScopes === void 0) {
|
|
1392
|
+
this.#enumScopes = /* @__PURE__ */ new Map();
|
|
1393
|
+
} else {
|
|
1394
|
+
scope = this.#enumScopes.get(name);
|
|
1395
|
+
}
|
|
1396
|
+
if (scope === void 0) {
|
|
1397
|
+
scope = new EnumScope(this);
|
|
1398
|
+
this.#enumScopes.set(name, scope);
|
|
1399
|
+
}
|
|
1400
|
+
return scope;
|
|
1401
|
+
}
|
|
1402
|
+
// only relevant for the root scope
|
|
1403
|
+
createOrReuseNamespaceScope(name, _exported, ambient, hasExportStatement) {
|
|
1404
|
+
let scope;
|
|
1405
|
+
if (this.namespaceScopes === void 0) {
|
|
1406
|
+
this.namespaceScopes = /* @__PURE__ */ new Map();
|
|
1407
|
+
} else {
|
|
1408
|
+
scope = this.namespaceScopes.get(name);
|
|
1409
|
+
}
|
|
1410
|
+
if (scope === void 0) {
|
|
1411
|
+
scope = new NamespaceScope(ambient, hasExportStatement, this);
|
|
1412
|
+
this.namespaceScopes.set(name, scope);
|
|
1413
|
+
} else {
|
|
1414
|
+
scope.refresh(ambient, hasExportStatement);
|
|
1415
|
+
}
|
|
1416
|
+
return scope;
|
|
1417
|
+
}
|
|
1418
|
+
end(cb) {
|
|
1419
|
+
if (this.namespaceScopes !== void 0) {
|
|
1420
|
+
this.namespaceScopes.forEach((value) => value.finish(cb));
|
|
1421
|
+
}
|
|
1422
|
+
this.namespaceScopes = this.#enumScopes = void 0;
|
|
1423
|
+
this.applyUses();
|
|
1424
|
+
this.variables.forEach((variable) => {
|
|
1425
|
+
for (const declaration of variable.declarations) {
|
|
1426
|
+
const result = {
|
|
1427
|
+
declarations: [],
|
|
1428
|
+
domain: declaration.domain,
|
|
1429
|
+
exported: declaration.exported,
|
|
1430
|
+
inGlobalScope: this.global,
|
|
1431
|
+
uses: []
|
|
1432
|
+
};
|
|
1433
|
+
for (const other of variable.declarations) {
|
|
1434
|
+
if (other.domain & declaration.domain) {
|
|
1435
|
+
result.declarations.push(other.declaration);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
for (const use of variable.uses) {
|
|
1439
|
+
if (use.domain & declaration.domain) {
|
|
1440
|
+
result.uses.push(use);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
cb(result, declaration.declaration, this);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
getFunctionScope() {
|
|
1448
|
+
return this;
|
|
1449
|
+
}
|
|
1450
|
+
getVariables() {
|
|
1451
|
+
return this.variables;
|
|
1452
|
+
}
|
|
1453
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
1454
|
+
markExported(_name) {
|
|
1455
|
+
}
|
|
1456
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
1457
|
+
addUseToParent(_use) {
|
|
1458
|
+
}
|
|
1459
|
+
applyUse(use, variables = this.variables) {
|
|
1460
|
+
const variable = variables.get(use.location.text);
|
|
1461
|
+
if (variable === void 0 || (variable.domain & use.domain) === 0) {
|
|
1462
|
+
return false;
|
|
1463
|
+
}
|
|
1464
|
+
variable.uses.push(use);
|
|
1465
|
+
return true;
|
|
1466
|
+
}
|
|
1467
|
+
applyUses() {
|
|
1468
|
+
for (const use of this.uses) {
|
|
1469
|
+
if (!this.applyUse(use)) {
|
|
1470
|
+
this.addUseToParent(use);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
this.uses = [];
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
var NonRootScope = class extends AbstractScope {
|
|
1477
|
+
constructor(parent, boundary) {
|
|
1478
|
+
super(false);
|
|
1479
|
+
this.parent = parent;
|
|
1480
|
+
this.boundary = boundary;
|
|
1481
|
+
}
|
|
1482
|
+
getDestinationScope(selector) {
|
|
1483
|
+
return this.boundary & selector ? this : this.parent.getDestinationScope(selector);
|
|
1484
|
+
}
|
|
1485
|
+
addUseToParent(use) {
|
|
1486
|
+
return this.parent.addUse(use, this);
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
var AbstractNamedExpressionScope = class extends NonRootScope {
|
|
1490
|
+
#domain;
|
|
1491
|
+
#name;
|
|
1492
|
+
constructor(name, domain, parent) {
|
|
1493
|
+
super(
|
|
1494
|
+
parent,
|
|
1495
|
+
1
|
|
1496
|
+
/* Function */
|
|
1497
|
+
);
|
|
1498
|
+
this.#name = name;
|
|
1499
|
+
this.#domain = domain;
|
|
1500
|
+
}
|
|
1501
|
+
addUse(use, source) {
|
|
1502
|
+
if (source !== this.innerScope) {
|
|
1503
|
+
return this.innerScope.addUse(use);
|
|
1504
|
+
}
|
|
1505
|
+
if (use.domain & this.#domain && use.location.text === this.#name.text) {
|
|
1506
|
+
this.uses.push(use);
|
|
1507
|
+
} else {
|
|
1508
|
+
return this.parent.addUse(use, this);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
end(cb) {
|
|
1512
|
+
this.innerScope.end(cb);
|
|
1513
|
+
return cb(
|
|
1514
|
+
{
|
|
1515
|
+
declarations: [this.#name],
|
|
1516
|
+
domain: this.#domain,
|
|
1517
|
+
exported: false,
|
|
1518
|
+
inGlobalScope: false,
|
|
1519
|
+
uses: this.uses
|
|
1520
|
+
},
|
|
1521
|
+
this.#name,
|
|
1522
|
+
this
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
getDestinationScope() {
|
|
1526
|
+
return this.innerScope;
|
|
1527
|
+
}
|
|
1528
|
+
getFunctionScope() {
|
|
1529
|
+
return this.innerScope;
|
|
1530
|
+
}
|
|
1531
|
+
};
|
|
1532
|
+
var BlockScope = class extends NonRootScope {
|
|
1533
|
+
#functionScope;
|
|
1534
|
+
constructor(functionScope, parent) {
|
|
1535
|
+
super(
|
|
1536
|
+
parent,
|
|
1537
|
+
2
|
|
1538
|
+
/* Block */
|
|
1539
|
+
);
|
|
1540
|
+
this.#functionScope = functionScope;
|
|
1541
|
+
}
|
|
1542
|
+
getFunctionScope() {
|
|
1543
|
+
return this.#functionScope;
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
var ClassExpressionScope = class extends AbstractNamedExpressionScope {
|
|
1547
|
+
innerScope = new NonRootScope(
|
|
1548
|
+
this,
|
|
1549
|
+
1
|
|
1550
|
+
/* Function */
|
|
1551
|
+
);
|
|
1552
|
+
constructor(name, parent) {
|
|
1553
|
+
super(name, 4 | 2, parent);
|
|
1554
|
+
}
|
|
1555
|
+
};
|
|
1556
|
+
var ConditionalTypeScope = class extends NonRootScope {
|
|
1557
|
+
#state = 0;
|
|
1558
|
+
constructor(parent) {
|
|
1559
|
+
super(
|
|
1560
|
+
parent,
|
|
1561
|
+
8
|
|
1562
|
+
/* ConditionalType */
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
addUse(use) {
|
|
1566
|
+
if (this.#state === 2) {
|
|
1567
|
+
return void this.uses.push(use);
|
|
1568
|
+
}
|
|
1569
|
+
return this.parent.addUse(use, this);
|
|
1570
|
+
}
|
|
1571
|
+
updateState(newState) {
|
|
1572
|
+
this.#state = newState;
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
var EnumScope = class extends NonRootScope {
|
|
1576
|
+
constructor(parent) {
|
|
1577
|
+
super(
|
|
1578
|
+
parent,
|
|
1579
|
+
1
|
|
1580
|
+
/* Function */
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
end() {
|
|
1584
|
+
this.applyUses();
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
var FunctionScope = class extends NonRootScope {
|
|
1588
|
+
constructor(parent) {
|
|
1589
|
+
super(
|
|
1590
|
+
parent,
|
|
1591
|
+
1
|
|
1592
|
+
/* Function */
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
beginBody() {
|
|
1596
|
+
this.applyUses();
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
var FunctionExpressionScope = class extends AbstractNamedExpressionScope {
|
|
1600
|
+
innerScope = new FunctionScope(this);
|
|
1601
|
+
constructor(name, parent) {
|
|
1602
|
+
super(name, 4, parent);
|
|
1603
|
+
}
|
|
1604
|
+
beginBody() {
|
|
1605
|
+
return this.innerScope.beginBody();
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
var NamespaceScope = class extends NonRootScope {
|
|
1609
|
+
#ambient;
|
|
1610
|
+
#exports = void 0;
|
|
1611
|
+
#hasExport;
|
|
1612
|
+
#innerScope = new NonRootScope(
|
|
1613
|
+
this,
|
|
1614
|
+
1
|
|
1615
|
+
/* Function */
|
|
1616
|
+
);
|
|
1617
|
+
constructor(ambient, hasExport, parent) {
|
|
1618
|
+
super(
|
|
1619
|
+
parent,
|
|
1620
|
+
1
|
|
1621
|
+
/* Function */
|
|
1622
|
+
);
|
|
1623
|
+
this.#ambient = ambient;
|
|
1624
|
+
this.#hasExport = hasExport;
|
|
1625
|
+
}
|
|
1626
|
+
addUse(use, source) {
|
|
1627
|
+
if (source !== this.#innerScope) {
|
|
1628
|
+
return this.#innerScope.addUse(use);
|
|
1629
|
+
}
|
|
1630
|
+
this.uses.push(use);
|
|
1631
|
+
}
|
|
1632
|
+
createOrReuseEnumScope(name, exported) {
|
|
1633
|
+
if (!exported && (!this.#ambient || this.#hasExport)) {
|
|
1634
|
+
return this.#innerScope.createOrReuseEnumScope(name, exported);
|
|
1635
|
+
}
|
|
1636
|
+
return super.createOrReuseEnumScope(name, exported);
|
|
1637
|
+
}
|
|
1638
|
+
createOrReuseNamespaceScope(name, exported, ambient, hasExportStatement) {
|
|
1639
|
+
if (!exported && (!this.#ambient || this.#hasExport)) {
|
|
1640
|
+
return this.#innerScope.createOrReuseNamespaceScope(
|
|
1641
|
+
name,
|
|
1642
|
+
exported,
|
|
1643
|
+
ambient || this.#ambient,
|
|
1644
|
+
hasExportStatement
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
return super.createOrReuseNamespaceScope(
|
|
1648
|
+
name,
|
|
1649
|
+
exported,
|
|
1650
|
+
ambient || this.#ambient,
|
|
1651
|
+
hasExportStatement
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
end(cb) {
|
|
1655
|
+
this.#innerScope.end((variable, key, scope) => {
|
|
1656
|
+
if (scope !== this.#innerScope || !variable.exported && (!this.#ambient || this.#exports !== void 0 && !this.#exports.has(key.text))) {
|
|
1657
|
+
return cb(variable, key, scope);
|
|
1658
|
+
}
|
|
1659
|
+
const namespaceVar = this.variables.get(key.text);
|
|
1660
|
+
if (namespaceVar === void 0) {
|
|
1661
|
+
this.variables.set(key.text, {
|
|
1662
|
+
declarations: variable.declarations.map(mapDeclaration),
|
|
1663
|
+
domain: variable.domain,
|
|
1664
|
+
uses: [...variable.uses]
|
|
1665
|
+
});
|
|
1666
|
+
} else {
|
|
1667
|
+
outer: for (const declaration of variable.declarations) {
|
|
1668
|
+
for (const existing of namespaceVar.declarations) {
|
|
1669
|
+
if (existing.declaration === declaration) {
|
|
1670
|
+
continue outer;
|
|
1671
|
+
}
|
|
1672
|
+
namespaceVar.declarations.push(mapDeclaration(declaration));
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
namespaceVar.domain |= variable.domain;
|
|
1676
|
+
for (const use of variable.uses) {
|
|
1677
|
+
if (namespaceVar.uses.includes(use)) {
|
|
1678
|
+
continue;
|
|
1679
|
+
}
|
|
1680
|
+
namespaceVar.uses.push(use);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
this.applyUses();
|
|
1685
|
+
this.#innerScope = new NonRootScope(
|
|
1686
|
+
this,
|
|
1687
|
+
1
|
|
1688
|
+
/* Function */
|
|
1689
|
+
);
|
|
1690
|
+
}
|
|
1691
|
+
finish(cb) {
|
|
1692
|
+
return super.end(cb);
|
|
1693
|
+
}
|
|
1694
|
+
getDestinationScope() {
|
|
1695
|
+
return this.#innerScope;
|
|
1696
|
+
}
|
|
1697
|
+
markExported(name) {
|
|
1698
|
+
if (this.#exports === void 0) {
|
|
1699
|
+
this.#exports = /* @__PURE__ */ new Set();
|
|
1700
|
+
}
|
|
1701
|
+
this.#exports.add(name.text);
|
|
1702
|
+
}
|
|
1703
|
+
refresh(ambient, hasExport) {
|
|
1704
|
+
this.#ambient = ambient;
|
|
1705
|
+
this.#hasExport = hasExport;
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
var RootScope = class extends AbstractScope {
|
|
1709
|
+
#exportAll;
|
|
1710
|
+
#exports = void 0;
|
|
1711
|
+
#innerScope = new NonRootScope(
|
|
1712
|
+
this,
|
|
1713
|
+
1
|
|
1714
|
+
/* Function */
|
|
1715
|
+
);
|
|
1716
|
+
constructor(exportAll, global) {
|
|
1717
|
+
super(global);
|
|
1718
|
+
this.#exportAll = exportAll;
|
|
1719
|
+
}
|
|
1720
|
+
addUse(use, origin) {
|
|
1721
|
+
if (origin === this.#innerScope) {
|
|
1722
|
+
return super.addUse(use);
|
|
1723
|
+
}
|
|
1724
|
+
return this.#innerScope.addUse(use);
|
|
1725
|
+
}
|
|
1726
|
+
addVariable(identifier, name, selector, exported, domain) {
|
|
1727
|
+
if (domain & 8) {
|
|
1728
|
+
return super.addVariable(identifier, name, selector, exported, domain);
|
|
1729
|
+
}
|
|
1730
|
+
return this.#innerScope.addVariable(
|
|
1731
|
+
identifier,
|
|
1732
|
+
name,
|
|
1733
|
+
selector,
|
|
1734
|
+
exported,
|
|
1735
|
+
domain
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1738
|
+
end(cb) {
|
|
1739
|
+
this.#innerScope.end((value, key) => {
|
|
1740
|
+
value.exported ||= this.#exportAll || this.#exports !== void 0 && this.#exports.includes(key.text);
|
|
1741
|
+
value.inGlobalScope = this.global;
|
|
1742
|
+
return cb(value, key, this);
|
|
1743
|
+
});
|
|
1744
|
+
return super.end((value, key, scope) => {
|
|
1745
|
+
value.exported ||= scope === this && this.#exports !== void 0 && this.#exports.includes(key.text);
|
|
1746
|
+
return cb(value, key, scope);
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
getDestinationScope() {
|
|
1750
|
+
return this;
|
|
1751
|
+
}
|
|
1752
|
+
markExported(id) {
|
|
1753
|
+
if (this.#exports === void 0) {
|
|
1754
|
+
this.#exports = [id.text];
|
|
1755
|
+
} else {
|
|
1756
|
+
this.#exports.push(id.text);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
};
|
|
1760
|
+
function mapDeclaration(declaration) {
|
|
1761
|
+
return {
|
|
1762
|
+
declaration,
|
|
1763
|
+
domain: getDeclarationDomain(declaration),
|
|
1764
|
+
exported: true
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
var UsageWalker = class {
|
|
1768
|
+
#result = /* @__PURE__ */ new Map();
|
|
1769
|
+
#scope;
|
|
1770
|
+
getUsage(sourceFile) {
|
|
1771
|
+
const variableCallback = (variable, key) => {
|
|
1772
|
+
this.#result.set(key, variable);
|
|
1773
|
+
};
|
|
1774
|
+
const isModule = ts9__default.default.isExternalModule(sourceFile);
|
|
1775
|
+
this.#scope = new RootScope(
|
|
1776
|
+
sourceFile.isDeclarationFile && isModule && !containsExportStatement(sourceFile),
|
|
1777
|
+
!isModule
|
|
1778
|
+
);
|
|
1779
|
+
const cb = (node) => {
|
|
1780
|
+
if (isBlockScopeBoundary(node)) {
|
|
1781
|
+
return continueWithScope(
|
|
1782
|
+
node,
|
|
1783
|
+
new BlockScope(this.#scope.getFunctionScope(), this.#scope),
|
|
1784
|
+
handleBlockScope
|
|
1785
|
+
);
|
|
1786
|
+
}
|
|
1787
|
+
switch (node.kind) {
|
|
1788
|
+
case ts9__default.default.SyntaxKind.ArrowFunction:
|
|
1789
|
+
case ts9__default.default.SyntaxKind.CallSignature:
|
|
1790
|
+
case ts9__default.default.SyntaxKind.Constructor:
|
|
1791
|
+
case ts9__default.default.SyntaxKind.ConstructorType:
|
|
1792
|
+
case ts9__default.default.SyntaxKind.ConstructSignature:
|
|
1793
|
+
case ts9__default.default.SyntaxKind.FunctionDeclaration:
|
|
1794
|
+
case ts9__default.default.SyntaxKind.FunctionExpression:
|
|
1795
|
+
case ts9__default.default.SyntaxKind.FunctionType:
|
|
1796
|
+
case ts9__default.default.SyntaxKind.GetAccessor:
|
|
1797
|
+
case ts9__default.default.SyntaxKind.MethodDeclaration:
|
|
1798
|
+
case ts9__default.default.SyntaxKind.MethodSignature:
|
|
1799
|
+
case ts9__default.default.SyntaxKind.SetAccessor:
|
|
1800
|
+
return this.#handleFunctionLikeDeclaration(
|
|
1801
|
+
node,
|
|
1802
|
+
cb,
|
|
1803
|
+
variableCallback
|
|
1804
|
+
);
|
|
1805
|
+
case ts9__default.default.SyntaxKind.ClassDeclaration:
|
|
1806
|
+
this.#handleDeclaration(
|
|
1807
|
+
node,
|
|
1808
|
+
true,
|
|
1809
|
+
4 | 2
|
|
1810
|
+
/* Type */
|
|
1811
|
+
);
|
|
1812
|
+
return continueWithScope(
|
|
1813
|
+
node,
|
|
1814
|
+
new NonRootScope(
|
|
1815
|
+
this.#scope,
|
|
1816
|
+
1
|
|
1817
|
+
/* Function */
|
|
1818
|
+
)
|
|
1819
|
+
);
|
|
1820
|
+
case ts9__default.default.SyntaxKind.ClassExpression:
|
|
1821
|
+
return continueWithScope(
|
|
1822
|
+
node,
|
|
1823
|
+
node.name !== void 0 ? new ClassExpressionScope(
|
|
1824
|
+
node.name,
|
|
1825
|
+
this.#scope
|
|
1826
|
+
) : new NonRootScope(
|
|
1827
|
+
this.#scope,
|
|
1828
|
+
1
|
|
1829
|
+
/* Function */
|
|
1830
|
+
)
|
|
1831
|
+
);
|
|
1832
|
+
case ts9__default.default.SyntaxKind.ConditionalType:
|
|
1833
|
+
return this.#handleConditionalType(
|
|
1834
|
+
node,
|
|
1835
|
+
cb,
|
|
1836
|
+
variableCallback
|
|
1837
|
+
);
|
|
1838
|
+
case ts9__default.default.SyntaxKind.EnumDeclaration:
|
|
1839
|
+
this.#handleDeclaration(
|
|
1840
|
+
node,
|
|
1841
|
+
true,
|
|
1842
|
+
7
|
|
1843
|
+
/* Any */
|
|
1844
|
+
);
|
|
1845
|
+
return continueWithScope(
|
|
1846
|
+
node,
|
|
1847
|
+
this.#scope.createOrReuseEnumScope(
|
|
1848
|
+
node.name.text,
|
|
1849
|
+
includesModifier(
|
|
1850
|
+
node.modifiers,
|
|
1851
|
+
ts9__default.default.SyntaxKind.ExportKeyword
|
|
1852
|
+
)
|
|
1853
|
+
)
|
|
1854
|
+
);
|
|
1855
|
+
case ts9__default.default.SyntaxKind.EnumMember:
|
|
1856
|
+
this.#scope.addVariable(
|
|
1857
|
+
getPropertyName(node.name),
|
|
1858
|
+
node.name,
|
|
1859
|
+
1,
|
|
1860
|
+
true,
|
|
1861
|
+
4
|
|
1862
|
+
/* Value */
|
|
1863
|
+
);
|
|
1864
|
+
break;
|
|
1865
|
+
case ts9__default.default.SyntaxKind.ExportAssignment:
|
|
1866
|
+
if (node.expression.kind === ts9__default.default.SyntaxKind.Identifier) {
|
|
1867
|
+
return this.#scope.markExported(
|
|
1868
|
+
node.expression
|
|
1869
|
+
);
|
|
1870
|
+
}
|
|
1871
|
+
break;
|
|
1872
|
+
case ts9__default.default.SyntaxKind.ExportSpecifier:
|
|
1873
|
+
if (node.propertyName !== void 0) {
|
|
1874
|
+
return this.#scope.markExported(
|
|
1875
|
+
node.propertyName,
|
|
1876
|
+
node.name
|
|
1877
|
+
);
|
|
1878
|
+
}
|
|
1879
|
+
return this.#scope.markExported(node.name);
|
|
1880
|
+
case ts9__default.default.SyntaxKind.Identifier: {
|
|
1881
|
+
const domain = getUsageDomain(node);
|
|
1882
|
+
if (domain !== void 0) {
|
|
1883
|
+
this.#scope.addUse({ domain, location: node });
|
|
1884
|
+
}
|
|
1885
|
+
return;
|
|
1886
|
+
}
|
|
1887
|
+
case ts9__default.default.SyntaxKind.ImportClause:
|
|
1888
|
+
case ts9__default.default.SyntaxKind.ImportEqualsDeclaration:
|
|
1889
|
+
case ts9__default.default.SyntaxKind.ImportSpecifier:
|
|
1890
|
+
case ts9__default.default.SyntaxKind.NamespaceImport:
|
|
1891
|
+
this.#handleDeclaration(
|
|
1892
|
+
node,
|
|
1893
|
+
false,
|
|
1894
|
+
7 | 8
|
|
1895
|
+
/* Import */
|
|
1896
|
+
);
|
|
1897
|
+
break;
|
|
1898
|
+
case ts9__default.default.SyntaxKind.InterfaceDeclaration:
|
|
1899
|
+
case ts9__default.default.SyntaxKind.TypeAliasDeclaration:
|
|
1900
|
+
this.#handleDeclaration(
|
|
1901
|
+
node,
|
|
1902
|
+
true,
|
|
1903
|
+
2
|
|
1904
|
+
/* Type */
|
|
1905
|
+
);
|
|
1906
|
+
return continueWithScope(
|
|
1907
|
+
node,
|
|
1908
|
+
new NonRootScope(
|
|
1909
|
+
this.#scope,
|
|
1910
|
+
4
|
|
1911
|
+
/* Type */
|
|
1912
|
+
)
|
|
1913
|
+
);
|
|
1914
|
+
case ts9__default.default.SyntaxKind.MappedType:
|
|
1915
|
+
return continueWithScope(
|
|
1916
|
+
node,
|
|
1917
|
+
new NonRootScope(
|
|
1918
|
+
this.#scope,
|
|
1919
|
+
4
|
|
1920
|
+
/* Type */
|
|
1921
|
+
)
|
|
1922
|
+
);
|
|
1923
|
+
case ts9__default.default.SyntaxKind.ModuleDeclaration:
|
|
1924
|
+
return this.#handleModule(
|
|
1925
|
+
node,
|
|
1926
|
+
continueWithScope
|
|
1927
|
+
);
|
|
1928
|
+
case ts9__default.default.SyntaxKind.Parameter:
|
|
1929
|
+
if (node.parent.kind !== ts9__default.default.SyntaxKind.IndexSignature && (node.name.kind !== ts9__default.default.SyntaxKind.Identifier || identifierToKeywordKind(
|
|
1930
|
+
node.name
|
|
1931
|
+
) !== ts9__default.default.SyntaxKind.ThisKeyword)) {
|
|
1932
|
+
this.#handleBindingName(
|
|
1933
|
+
node.name,
|
|
1934
|
+
false,
|
|
1935
|
+
false
|
|
1936
|
+
);
|
|
1937
|
+
}
|
|
1938
|
+
break;
|
|
1939
|
+
case ts9__default.default.SyntaxKind.TypeParameter:
|
|
1940
|
+
this.#scope.addVariable(
|
|
1941
|
+
node.name.text,
|
|
1942
|
+
node.name,
|
|
1943
|
+
node.parent.kind === ts9__default.default.SyntaxKind.InferType ? 8 : 7,
|
|
1944
|
+
false,
|
|
1945
|
+
2
|
|
1946
|
+
/* Type */
|
|
1947
|
+
);
|
|
1948
|
+
break;
|
|
1949
|
+
// End of Scope specific handling
|
|
1950
|
+
case ts9__default.default.SyntaxKind.VariableDeclarationList:
|
|
1951
|
+
this.#handleVariableDeclaration(node);
|
|
1952
|
+
break;
|
|
1953
|
+
}
|
|
1954
|
+
return ts9__default.default.forEachChild(node, cb);
|
|
1955
|
+
};
|
|
1956
|
+
const continueWithScope = (node, scope, next = forEachChild) => {
|
|
1957
|
+
const savedScope = this.#scope;
|
|
1958
|
+
this.#scope = scope;
|
|
1959
|
+
next(node);
|
|
1960
|
+
this.#scope.end(variableCallback);
|
|
1961
|
+
this.#scope = savedScope;
|
|
1962
|
+
};
|
|
1963
|
+
const handleBlockScope = (node) => {
|
|
1964
|
+
if (node.kind === ts9__default.default.SyntaxKind.CatchClause && node.variableDeclaration !== void 0) {
|
|
1965
|
+
this.#handleBindingName(
|
|
1966
|
+
node.variableDeclaration.name,
|
|
1967
|
+
true,
|
|
1968
|
+
false
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
return ts9__default.default.forEachChild(node, cb);
|
|
1972
|
+
};
|
|
1973
|
+
ts9__default.default.forEachChild(sourceFile, cb);
|
|
1974
|
+
this.#scope.end(variableCallback);
|
|
1975
|
+
return this.#result;
|
|
1976
|
+
function forEachChild(node) {
|
|
1977
|
+
return ts9__default.default.forEachChild(node, cb);
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
#handleBindingName(name, blockScoped, exported) {
|
|
1981
|
+
if (name.kind === ts9__default.default.SyntaxKind.Identifier) {
|
|
1982
|
+
return this.#scope.addVariable(
|
|
1983
|
+
name.text,
|
|
1984
|
+
name,
|
|
1985
|
+
blockScoped ? 3 : 1,
|
|
1986
|
+
exported,
|
|
1987
|
+
4
|
|
1988
|
+
/* Value */
|
|
1989
|
+
);
|
|
1990
|
+
}
|
|
1991
|
+
forEachDestructuringIdentifier(name, (declaration) => {
|
|
1992
|
+
this.#scope.addVariable(
|
|
1993
|
+
declaration.name.text,
|
|
1994
|
+
declaration.name,
|
|
1995
|
+
blockScoped ? 3 : 1,
|
|
1996
|
+
exported,
|
|
1997
|
+
4
|
|
1998
|
+
/* Value */
|
|
1999
|
+
);
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
#handleConditionalType(node, cb, varCb) {
|
|
2003
|
+
const savedScope = this.#scope;
|
|
2004
|
+
const scope = this.#scope = new ConditionalTypeScope(savedScope);
|
|
2005
|
+
cb(node.checkType);
|
|
2006
|
+
scope.updateState(
|
|
2007
|
+
1
|
|
2008
|
+
/* Extends */
|
|
2009
|
+
);
|
|
2010
|
+
cb(node.extendsType);
|
|
2011
|
+
scope.updateState(
|
|
2012
|
+
2
|
|
2013
|
+
/* TrueType */
|
|
2014
|
+
);
|
|
2015
|
+
cb(node.trueType);
|
|
2016
|
+
scope.updateState(
|
|
2017
|
+
3
|
|
2018
|
+
/* FalseType */
|
|
2019
|
+
);
|
|
2020
|
+
cb(node.falseType);
|
|
2021
|
+
scope.end(varCb);
|
|
2022
|
+
this.#scope = savedScope;
|
|
2023
|
+
}
|
|
2024
|
+
#handleDeclaration(node, blockScoped, domain) {
|
|
2025
|
+
if (node.name !== void 0) {
|
|
2026
|
+
this.#scope.addVariable(
|
|
2027
|
+
node.name.text,
|
|
2028
|
+
node.name,
|
|
2029
|
+
blockScoped ? 3 : 1,
|
|
2030
|
+
includesModifier(
|
|
2031
|
+
node.modifiers,
|
|
2032
|
+
ts9__default.default.SyntaxKind.ExportKeyword
|
|
2033
|
+
),
|
|
2034
|
+
domain
|
|
2035
|
+
);
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
#handleFunctionLikeDeclaration(node, cb, varCb) {
|
|
2039
|
+
if (ts9__default.default.canHaveDecorators(node)) {
|
|
2040
|
+
ts9__default.default.getDecorators(node)?.forEach(cb);
|
|
2041
|
+
}
|
|
2042
|
+
const savedScope = this.#scope;
|
|
2043
|
+
if (node.kind === ts9__default.default.SyntaxKind.FunctionDeclaration) {
|
|
2044
|
+
this.#handleDeclaration(
|
|
2045
|
+
node,
|
|
2046
|
+
false,
|
|
2047
|
+
4
|
|
2048
|
+
/* Value */
|
|
2049
|
+
);
|
|
2050
|
+
}
|
|
2051
|
+
const scope = this.#scope = node.kind === ts9__default.default.SyntaxKind.FunctionExpression && node.name !== void 0 ? new FunctionExpressionScope(node.name, savedScope) : new FunctionScope(savedScope);
|
|
2052
|
+
if (node.name !== void 0) {
|
|
2053
|
+
cb(node.name);
|
|
2054
|
+
}
|
|
2055
|
+
if (node.typeParameters !== void 0) {
|
|
2056
|
+
node.typeParameters.forEach(cb);
|
|
2057
|
+
}
|
|
2058
|
+
node.parameters.forEach(cb);
|
|
2059
|
+
if (node.type !== void 0) {
|
|
2060
|
+
cb(node.type);
|
|
2061
|
+
}
|
|
2062
|
+
if (node.body !== void 0) {
|
|
2063
|
+
scope.beginBody();
|
|
2064
|
+
cb(node.body);
|
|
2065
|
+
}
|
|
2066
|
+
scope.end(varCb);
|
|
2067
|
+
this.#scope = savedScope;
|
|
2068
|
+
}
|
|
2069
|
+
#handleModule(node, next) {
|
|
2070
|
+
if (node.flags & ts9__default.default.NodeFlags.GlobalAugmentation) {
|
|
2071
|
+
return next(
|
|
2072
|
+
node,
|
|
2073
|
+
this.#scope.createOrReuseNamespaceScope("-global", false, true, false)
|
|
2074
|
+
);
|
|
2075
|
+
}
|
|
2076
|
+
if (node.name.kind === ts9__default.default.SyntaxKind.Identifier) {
|
|
2077
|
+
const exported = isNamespaceExported(node);
|
|
2078
|
+
this.#scope.addVariable(
|
|
2079
|
+
node.name.text,
|
|
2080
|
+
node.name,
|
|
2081
|
+
1,
|
|
2082
|
+
exported,
|
|
2083
|
+
1 | 4
|
|
2084
|
+
/* Value */
|
|
2085
|
+
);
|
|
2086
|
+
const ambient = includesModifier(
|
|
2087
|
+
node.modifiers,
|
|
2088
|
+
ts9__default.default.SyntaxKind.DeclareKeyword
|
|
2089
|
+
);
|
|
2090
|
+
return next(
|
|
2091
|
+
node,
|
|
2092
|
+
this.#scope.createOrReuseNamespaceScope(
|
|
2093
|
+
node.name.text,
|
|
2094
|
+
exported,
|
|
2095
|
+
ambient,
|
|
2096
|
+
ambient && namespaceHasExportStatement(node)
|
|
2097
|
+
)
|
|
2098
|
+
);
|
|
2099
|
+
}
|
|
2100
|
+
return next(
|
|
2101
|
+
node,
|
|
2102
|
+
this.#scope.createOrReuseNamespaceScope(
|
|
2103
|
+
`"${node.name.text}"`,
|
|
2104
|
+
false,
|
|
2105
|
+
true,
|
|
2106
|
+
namespaceHasExportStatement(node)
|
|
2107
|
+
)
|
|
2108
|
+
);
|
|
2109
|
+
}
|
|
2110
|
+
#handleVariableDeclaration(declarationList) {
|
|
2111
|
+
const blockScoped = isBlockScopedVariableDeclarationList(declarationList);
|
|
2112
|
+
const exported = declarationList.parent.kind === ts9__default.default.SyntaxKind.VariableStatement && includesModifier(
|
|
2113
|
+
declarationList.parent.modifiers,
|
|
2114
|
+
ts9__default.default.SyntaxKind.ExportKeyword
|
|
2115
|
+
);
|
|
2116
|
+
for (const declaration of declarationList.declarations) {
|
|
2117
|
+
this.#handleBindingName(declaration.name, blockScoped, exported);
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
function containsExportStatement(block) {
|
|
2122
|
+
for (const statement of block.statements) {
|
|
2123
|
+
if (statement.kind === ts9__default.default.SyntaxKind.ExportDeclaration || statement.kind === ts9__default.default.SyntaxKind.ExportAssignment) {
|
|
2124
|
+
return true;
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
return false;
|
|
2128
|
+
}
|
|
2129
|
+
function forEachDestructuringIdentifier(pattern, fn) {
|
|
2130
|
+
for (const element of pattern.elements) {
|
|
2131
|
+
if (element.kind !== ts9__default.default.SyntaxKind.BindingElement) {
|
|
2132
|
+
continue;
|
|
2133
|
+
}
|
|
2134
|
+
let result;
|
|
2135
|
+
if (element.name.kind === ts9__default.default.SyntaxKind.Identifier) {
|
|
2136
|
+
result = fn(element);
|
|
2137
|
+
} else {
|
|
2138
|
+
result = forEachDestructuringIdentifier(element.name, fn);
|
|
2139
|
+
}
|
|
2140
|
+
if (result) {
|
|
2141
|
+
return result;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
function isBlockScopedVariableDeclarationList(declarationList) {
|
|
2146
|
+
return (declarationList.flags & ts9__default.default.NodeFlags.BlockScoped) !== 0;
|
|
2147
|
+
}
|
|
2148
|
+
function isNamespaceExported(node) {
|
|
2149
|
+
return node.parent.kind === ts9__default.default.SyntaxKind.ModuleDeclaration || includesModifier(node.modifiers, ts9__default.default.SyntaxKind.ExportKeyword);
|
|
2150
|
+
}
|
|
2151
|
+
function namespaceHasExportStatement(ns) {
|
|
2152
|
+
if (ns.body === void 0 || ns.body.kind !== ts9__default.default.SyntaxKind.ModuleBlock) {
|
|
2153
|
+
return false;
|
|
2154
|
+
}
|
|
2155
|
+
return containsExportStatement(ns.body);
|
|
2156
|
+
}
|
|
2157
|
+
function collectVariableUsage(sourceFile) {
|
|
2158
|
+
return new UsageWalker().getUsage(sourceFile);
|
|
2159
|
+
}
|
|
2160
|
+
lib.AccessKind = AccessKind;
|
|
2161
|
+
lib.DeclarationDomain = DeclarationDomain;
|
|
2162
|
+
lib.UsageDomain = UsageDomain;
|
|
2163
|
+
lib.collectVariableUsage = collectVariableUsage;
|
|
2164
|
+
lib.forEachComment = forEachComment;
|
|
2165
|
+
lib.forEachToken = forEachToken;
|
|
2166
|
+
lib.getAccessKind = getAccessKind;
|
|
2167
|
+
lib.getCallSignaturesOfType = getCallSignaturesOfType;
|
|
2168
|
+
lib.getPropertyOfType = getPropertyOfType;
|
|
2169
|
+
lib.getWellKnownSymbolPropertyOfType = getWellKnownSymbolPropertyOfType;
|
|
2170
|
+
lib.hasDecorators = hasDecorators;
|
|
2171
|
+
lib.hasExpressionInitializer = hasExpressionInitializer;
|
|
2172
|
+
lib.hasInitializer = hasInitializer;
|
|
2173
|
+
lib.hasJSDoc = hasJSDoc;
|
|
2174
|
+
lib.hasModifiers = hasModifiers;
|
|
2175
|
+
lib.hasType = hasType;
|
|
2176
|
+
lib.hasTypeArguments = hasTypeArguments;
|
|
2177
|
+
lib.includesModifier = includesModifier;
|
|
2178
|
+
lib.intersectionConstituents = intersectionConstituents;
|
|
2179
|
+
lib.intersectionTypeParts = intersectionTypeParts;
|
|
2180
|
+
lib.isAbstractKeyword = isAbstractKeyword;
|
|
2181
|
+
lib.isAccessExpression = isAccessExpression;
|
|
2182
|
+
lib.isAccessibilityModifier = isAccessibilityModifier;
|
|
2183
|
+
lib.isAccessorDeclaration = isAccessorDeclaration;
|
|
2184
|
+
lib.isAccessorKeyword = isAccessorKeyword;
|
|
2185
|
+
lib.isAnyKeyword = isAnyKeyword;
|
|
2186
|
+
lib.isArrayBindingElement = isArrayBindingElement;
|
|
2187
|
+
lib.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
|
|
2188
|
+
lib.isAssertKeyword = isAssertKeyword;
|
|
2189
|
+
lib.isAssertsKeyword = isAssertsKeyword;
|
|
2190
|
+
lib.isAssignmentKind = isAssignmentKind;
|
|
2191
|
+
lib.isAssignmentPattern = isAssignmentPattern;
|
|
2192
|
+
lib.isAsyncKeyword = isAsyncKeyword;
|
|
2193
|
+
lib.isAwaitKeyword = isAwaitKeyword;
|
|
2194
|
+
lib.isBigIntKeyword = isBigIntKeyword;
|
|
2195
|
+
lib.isBigIntLiteralType = isBigIntLiteralType;
|
|
2196
|
+
lib.isBindingOrAssignmentElementRestIndicator = isBindingOrAssignmentElementRestIndicator;
|
|
2197
|
+
lib.isBindingOrAssignmentElementTarget = isBindingOrAssignmentElementTarget;
|
|
2198
|
+
lib.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern;
|
|
2199
|
+
lib.isBindingPattern = isBindingPattern;
|
|
2200
|
+
lib.isBlockLike = isBlockLike;
|
|
2201
|
+
lib.isBooleanKeyword = isBooleanKeyword;
|
|
2202
|
+
lib.isBooleanLiteral = isBooleanLiteral;
|
|
2203
|
+
lib.isBooleanLiteralType = isBooleanLiteralType;
|
|
2204
|
+
lib.isClassLikeDeclaration = isClassLikeDeclaration;
|
|
2205
|
+
lib.isClassMemberModifier = isClassMemberModifier;
|
|
2206
|
+
lib.isColonToken = isColonToken;
|
|
2207
|
+
lib.isCompilerOptionEnabled = isCompilerOptionEnabled;
|
|
2208
|
+
lib.isConditionalType = isConditionalType;
|
|
2209
|
+
lib.isConstAssertionExpression = isConstAssertionExpression;
|
|
2210
|
+
lib.isConstKeyword = isConstKeyword;
|
|
2211
|
+
lib.isDeclarationName = isDeclarationName;
|
|
2212
|
+
lib.isDeclarationWithTypeParameterChildren = isDeclarationWithTypeParameterChildren;
|
|
2213
|
+
lib.isDeclarationWithTypeParameters = isDeclarationWithTypeParameters;
|
|
2214
|
+
lib.isDeclareKeyword = isDeclareKeyword;
|
|
2215
|
+
lib.isDefaultKeyword = isDefaultKeyword;
|
|
2216
|
+
lib.isDestructuringPattern = isDestructuringPattern;
|
|
2217
|
+
lib.isDotToken = isDotToken;
|
|
2218
|
+
lib.isEndOfFileToken = isEndOfFileToken;
|
|
2219
|
+
lib.isEntityNameExpression = isEntityNameExpression;
|
|
2220
|
+
lib.isEntityNameOrEntityNameExpression = isEntityNameOrEntityNameExpression;
|
|
2221
|
+
lib.isEnumType = isEnumType;
|
|
2222
|
+
lib.isEqualsGreaterThanToken = isEqualsGreaterThanToken;
|
|
2223
|
+
lib.isEqualsToken = isEqualsToken;
|
|
2224
|
+
lib.isEvolvingArrayType = isEvolvingArrayType;
|
|
2225
|
+
lib.isExclamationToken = isExclamationToken;
|
|
2226
|
+
lib.isExportKeyword = isExportKeyword;
|
|
2227
|
+
lib.isFalseKeyword = isFalseKeyword;
|
|
2228
|
+
lib.isFalseLiteral = isFalseLiteral;
|
|
2229
|
+
lib.isFalseLiteralType = isFalseLiteralType;
|
|
2230
|
+
lib.isFalsyType = isFalsyType;
|
|
2231
|
+
lib.isForInOrOfStatement = isForInOrOfStatement;
|
|
2232
|
+
lib.isFreshableIntrinsicType = isFreshableIntrinsicType;
|
|
2233
|
+
lib.isFreshableType = isFreshableType;
|
|
2234
|
+
lib.isFunctionLikeDeclaration = isFunctionLikeDeclaration;
|
|
2235
|
+
lib.isFunctionScopeBoundary = isFunctionScopeBoundary;
|
|
2236
|
+
lib.isImportExpression = isImportExpression;
|
|
2237
|
+
lib.isImportKeyword = isImportKeyword;
|
|
2238
|
+
lib.isInKeyword = isInKeyword;
|
|
2239
|
+
lib.isIndexType = isIndexType;
|
|
2240
|
+
lib.isIndexedAccessType = isIndexedAccessType;
|
|
2241
|
+
lib.isInstantiableType = isInstantiableType;
|
|
2242
|
+
lib.isIntersectionType = isIntersectionType;
|
|
2243
|
+
lib.isIntrinsicAnyType = isIntrinsicAnyType;
|
|
2244
|
+
lib.isIntrinsicBigIntType = isIntrinsicBigIntType;
|
|
2245
|
+
lib.isIntrinsicBooleanType = isIntrinsicBooleanType;
|
|
2246
|
+
lib.isIntrinsicESSymbolType = isIntrinsicESSymbolType;
|
|
2247
|
+
lib.isIntrinsicErrorType = isIntrinsicErrorType;
|
|
2248
|
+
lib.isIntrinsicNeverType = isIntrinsicNeverType;
|
|
2249
|
+
lib.isIntrinsicNonPrimitiveType = isIntrinsicNonPrimitiveType;
|
|
2250
|
+
lib.isIntrinsicNullType = isIntrinsicNullType;
|
|
2251
|
+
lib.isIntrinsicNumberType = isIntrinsicNumberType;
|
|
2252
|
+
lib.isIntrinsicStringType = isIntrinsicStringType;
|
|
2253
|
+
lib.isIntrinsicType = isIntrinsicType;
|
|
2254
|
+
lib.isIntrinsicUndefinedType = isIntrinsicUndefinedType;
|
|
2255
|
+
lib.isIntrinsicUnknownType = isIntrinsicUnknownType;
|
|
2256
|
+
lib.isIntrinsicVoidType = isIntrinsicVoidType;
|
|
2257
|
+
lib.isIterationStatement = isIterationStatement;
|
|
2258
|
+
lib.isJSDocComment = isJSDocComment;
|
|
2259
|
+
lib.isJSDocNamespaceBody = isJSDocNamespaceBody;
|
|
2260
|
+
lib.isJSDocNamespaceDeclaration = isJSDocNamespaceDeclaration;
|
|
2261
|
+
lib.isJSDocText = isJSDocText;
|
|
2262
|
+
lib.isJSDocTypeReferencingNode = isJSDocTypeReferencingNode;
|
|
2263
|
+
lib.isJsonMinusNumericLiteral = isJsonMinusNumericLiteral;
|
|
2264
|
+
lib.isJsonObjectExpression = isJsonObjectExpression;
|
|
2265
|
+
lib.isJsxAttributeLike = isJsxAttributeLike;
|
|
2266
|
+
lib.isJsxAttributeValue = isJsxAttributeValue;
|
|
2267
|
+
lib.isJsxChild = isJsxChild;
|
|
2268
|
+
lib.isJsxTagNameExpression = isJsxTagNameExpression;
|
|
2269
|
+
lib.isJsxTagNamePropertyAccess = isJsxTagNamePropertyAccess;
|
|
2270
|
+
lib.isLiteralToken = isLiteralToken;
|
|
2271
|
+
lib.isLiteralType = isLiteralType;
|
|
2272
|
+
lib.isModifierFlagSet = isModifierFlagSet;
|
|
2273
|
+
lib.isModuleBody = isModuleBody;
|
|
2274
|
+
lib.isModuleName = isModuleName;
|
|
2275
|
+
lib.isModuleReference = isModuleReference;
|
|
2276
|
+
lib.isNamedDeclarationWithName = isNamedDeclarationWithName;
|
|
2277
|
+
lib.isNamedImportBindings = isNamedImportBindings;
|
|
2278
|
+
lib.isNamedImportsOrExports = isNamedImportsOrExports;
|
|
2279
|
+
lib.isNamespaceBody = isNamespaceBody;
|
|
2280
|
+
lib.isNamespaceDeclaration = isNamespaceDeclaration;
|
|
2281
|
+
lib.isNeverKeyword = isNeverKeyword;
|
|
2282
|
+
lib.isNodeFlagSet = isNodeFlagSet;
|
|
2283
|
+
lib.isNullKeyword = isNullKeyword;
|
|
2284
|
+
lib.isNullLiteral = isNullLiteral;
|
|
2285
|
+
lib.isNumberKeyword = isNumberKeyword;
|
|
2286
|
+
lib.isNumberLiteralType = isNumberLiteralType;
|
|
2287
|
+
lib.isNumericOrStringLikeLiteral = isNumericOrStringLikeLiteral;
|
|
2288
|
+
lib.isNumericPropertyName = isNumericPropertyName;
|
|
2289
|
+
lib.isObjectBindingOrAssignmentElement = isObjectBindingOrAssignmentElement;
|
|
2290
|
+
lib.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern;
|
|
2291
|
+
lib.isObjectFlagSet = isObjectFlagSet;
|
|
2292
|
+
lib.isObjectKeyword = isObjectKeyword;
|
|
2293
|
+
lib.isObjectType = isObjectType;
|
|
2294
|
+
lib.isObjectTypeDeclaration = isObjectTypeDeclaration;
|
|
2295
|
+
lib.isOutKeyword = isOutKeyword;
|
|
2296
|
+
lib.isOverrideKeyword = isOverrideKeyword;
|
|
2297
|
+
lib.isParameterPropertyModifier = isParameterPropertyModifier;
|
|
2298
|
+
lib.isPrivateKeyword = isPrivateKeyword;
|
|
2299
|
+
lib.isPropertyAccessEntityNameExpression = isPropertyAccessEntityNameExpression;
|
|
2300
|
+
lib.isPropertyNameLiteral = isPropertyNameLiteral;
|
|
2301
|
+
lib.isPropertyReadonlyInType = isPropertyReadonlyInType;
|
|
2302
|
+
lib.isProtectedKeyword = isProtectedKeyword;
|
|
2303
|
+
lib.isPseudoLiteralToken = isPseudoLiteralToken;
|
|
2304
|
+
lib.isPublicKeyword = isPublicKeyword;
|
|
2305
|
+
lib.isQuestionDotToken = isQuestionDotToken;
|
|
2306
|
+
lib.isQuestionToken = isQuestionToken;
|
|
2307
|
+
lib.isReadonlyKeyword = isReadonlyKeyword;
|
|
2308
|
+
lib.isSignatureDeclaration = isSignatureDeclaration;
|
|
2309
|
+
lib.isStaticKeyword = isStaticKeyword;
|
|
2310
|
+
lib.isStrictCompilerOptionEnabled = isStrictCompilerOptionEnabled;
|
|
2311
|
+
lib.isStringKeyword = isStringKeyword;
|
|
2312
|
+
lib.isStringLiteralType = isStringLiteralType;
|
|
2313
|
+
lib.isStringMappingType = isStringMappingType;
|
|
2314
|
+
lib.isSubstitutionType = isSubstitutionType;
|
|
2315
|
+
lib.isSuperElementAccessExpression = isSuperElementAccessExpression;
|
|
2316
|
+
lib.isSuperExpression = isSuperExpression;
|
|
2317
|
+
lib.isSuperKeyword = isSuperKeyword;
|
|
2318
|
+
lib.isSuperProperty = isSuperProperty;
|
|
2319
|
+
lib.isSuperPropertyAccessExpression = isSuperPropertyAccessExpression;
|
|
2320
|
+
lib.isSymbolFlagSet = isSymbolFlagSet;
|
|
2321
|
+
lib.isSymbolKeyword = isSymbolKeyword;
|
|
2322
|
+
lib.isSyntaxList = isSyntaxList;
|
|
2323
|
+
lib.isTemplateLiteralType = isTemplateLiteralType;
|
|
2324
|
+
lib.isThenableType = isThenableType;
|
|
2325
|
+
lib.isThisExpression = isThisExpression;
|
|
2326
|
+
lib.isThisKeyword = isThisKeyword;
|
|
2327
|
+
lib.isTransientSymbolLinksFlagSet = isTransientSymbolLinksFlagSet;
|
|
2328
|
+
lib.isTrueKeyword = isTrueKeyword;
|
|
2329
|
+
lib.isTrueLiteral = isTrueLiteral;
|
|
2330
|
+
lib.isTrueLiteralType = isTrueLiteralType;
|
|
2331
|
+
lib.isTupleType = isTupleType;
|
|
2332
|
+
lib.isTupleTypeReference = isTupleTypeReference;
|
|
2333
|
+
lib.isTypeFlagSet = isTypeFlagSet;
|
|
2334
|
+
lib.isTypeOnlyCompatibleAliasDeclaration = isTypeOnlyCompatibleAliasDeclaration;
|
|
2335
|
+
lib.isTypeParameter = isTypeParameter;
|
|
2336
|
+
lib.isTypeReference = isTypeReference;
|
|
2337
|
+
lib.isTypeReferenceType = isTypeReferenceType;
|
|
2338
|
+
lib.isTypeVariable = isTypeVariable;
|
|
2339
|
+
lib.isUndefinedKeyword = isUndefinedKeyword;
|
|
2340
|
+
lib.isUnionOrIntersectionType = isUnionOrIntersectionType;
|
|
2341
|
+
lib.isUnionOrIntersectionTypeNode = isUnionOrIntersectionTypeNode;
|
|
2342
|
+
lib.isUnionType = isUnionType;
|
|
2343
|
+
lib.isUniqueESSymbolType = isUniqueESSymbolType;
|
|
2344
|
+
lib.isUnknownKeyword = isUnknownKeyword;
|
|
2345
|
+
lib.isValidPropertyAccess = isValidPropertyAccess;
|
|
2346
|
+
lib.isVariableLikeDeclaration = isVariableLikeDeclaration;
|
|
2347
|
+
lib.isVoidKeyword = isVoidKeyword;
|
|
2348
|
+
lib.iterateComments = iterateComments;
|
|
2349
|
+
lib.iterateTokens = iterateTokens;
|
|
2350
|
+
lib.symbolHasReadonlyDeclaration = symbolHasReadonlyDeclaration;
|
|
2351
|
+
lib.typeConstituents = typeConstituents;
|
|
2352
|
+
lib.typeIsLiteral = typeIsLiteral;
|
|
2353
|
+
lib.typeParts = typeParts;
|
|
2354
|
+
lib.unionConstituents = unionConstituents;
|
|
2355
|
+
lib.unionTypeParts = unionTypeParts;
|
|
2356
|
+
return lib;
|
|
2357
|
+
}
|
|
2358
|
+
export {
|
|
2359
|
+
requireLib as __require
|
|
2360
|
+
};
|
|
2361
|
+
//# sourceMappingURL=index.js.map
|