From 10e54d1a8cdef31bebeff98f95110d0e270f634f Mon Sep 17 00:00:00 2001 From: Salim Khraimeche Date: Fri, 22 Mar 2024 12:55:54 +0100 Subject: [PATCH] rm node --- node_modules/.bin/acorn | 13 +- node_modules/.bin/acorn.cmd | 17 - node_modules/.bin/acorn.ps1 | 28 - node_modules/.bin/ansi-html | 13 +- node_modules/.bin/ansi-html.cmd | 17 - node_modules/.bin/ansi-html.ps1 | 28 - node_modules/.bin/autoprefixer | 13 +- node_modules/.bin/autoprefixer.cmd | 17 - node_modules/.bin/autoprefixer.ps1 | 28 - node_modules/.bin/browserslist | 13 +- node_modules/.bin/browserslist.cmd | 17 - node_modules/.bin/browserslist.ps1 | 28 - node_modules/.bin/css-blank-pseudo | 13 +- node_modules/.bin/css-blank-pseudo.cmd | 17 - node_modules/.bin/css-blank-pseudo.ps1 | 28 - node_modules/.bin/css-has-pseudo | 13 +- node_modules/.bin/css-has-pseudo.cmd | 17 - node_modules/.bin/css-has-pseudo.ps1 | 28 - node_modules/.bin/css-prefers-color-scheme | 13 +- .../.bin/css-prefers-color-scheme.cmd | 17 - .../.bin/css-prefers-color-scheme.ps1 | 28 - node_modules/.bin/cssesc | 13 +- node_modules/.bin/cssesc.cmd | 17 - node_modules/.bin/cssesc.ps1 | 28 - node_modules/.bin/detect | 13 +- node_modules/.bin/detect-port | 13 +- node_modules/.bin/detect-port.cmd | 17 - node_modules/.bin/detect-port.ps1 | 28 - node_modules/.bin/detect.cmd | 17 - node_modules/.bin/detect.ps1 | 28 - node_modules/.bin/ejs | 13 +- node_modules/.bin/ejs.cmd | 17 - node_modules/.bin/ejs.ps1 | 28 - node_modules/.bin/escodegen | 13 +- node_modules/.bin/escodegen.cmd | 17 - node_modules/.bin/escodegen.ps1 | 28 - node_modules/.bin/esgenerate | 13 +- node_modules/.bin/esgenerate.cmd | 17 - node_modules/.bin/esgenerate.ps1 | 28 - node_modules/.bin/eslint | 13 +- node_modules/.bin/eslint.cmd | 17 - node_modules/.bin/eslint.ps1 | 28 - node_modules/.bin/esparse | 13 +- node_modules/.bin/esparse.cmd | 17 - node_modules/.bin/esparse.ps1 | 28 - node_modules/.bin/esvalidate | 13 +- node_modules/.bin/esvalidate.cmd | 17 - node_modules/.bin/esvalidate.ps1 | 28 - node_modules/.bin/he | 13 +- node_modules/.bin/he.cmd | 17 - node_modules/.bin/he.ps1 | 28 - node_modules/.bin/html-minifier-terser | 13 +- node_modules/.bin/html-minifier-terser.cmd | 17 - node_modules/.bin/html-minifier-terser.ps1 | 28 - node_modules/.bin/import-local-fixture | 13 +- node_modules/.bin/import-local-fixture.cmd | 17 - node_modules/.bin/import-local-fixture.ps1 | 28 - node_modules/.bin/is-docker | 13 +- node_modules/.bin/is-docker.cmd | 17 - node_modules/.bin/is-docker.ps1 | 28 - node_modules/.bin/jake | 13 +- node_modules/.bin/jake.cmd | 17 - node_modules/.bin/jake.ps1 | 28 - node_modules/.bin/jest | 13 +- node_modules/.bin/jest.cmd | 17 - node_modules/.bin/jest.ps1 | 28 - node_modules/.bin/jiti | 13 +- node_modules/.bin/jiti.cmd | 17 - node_modules/.bin/jiti.ps1 | 28 - node_modules/.bin/js-yaml | 13 +- node_modules/.bin/js-yaml.cmd | 17 - node_modules/.bin/js-yaml.ps1 | 28 - node_modules/.bin/jsesc | 13 +- node_modules/.bin/jsesc.cmd | 17 - node_modules/.bin/jsesc.ps1 | 28 - node_modules/.bin/json5 | 13 +- node_modules/.bin/json5.cmd | 17 - node_modules/.bin/json5.ps1 | 28 - node_modules/.bin/loose-envify | 13 +- node_modules/.bin/loose-envify.cmd | 17 - node_modules/.bin/loose-envify.ps1 | 28 - node_modules/.bin/lz-string | 13 +- node_modules/.bin/lz-string.cmd | 17 - node_modules/.bin/lz-string.ps1 | 28 - node_modules/.bin/mime | 13 +- node_modules/.bin/mime.cmd | 17 - node_modules/.bin/mime.ps1 | 28 - node_modules/.bin/mkdirp | 13 +- node_modules/.bin/mkdirp.cmd | 17 - node_modules/.bin/mkdirp.ps1 | 28 - node_modules/.bin/multicast-dns | 13 +- node_modules/.bin/multicast-dns.cmd | 17 - node_modules/.bin/multicast-dns.ps1 | 28 - node_modules/.bin/nanoid | 13 +- node_modules/.bin/nanoid.cmd | 17 - node_modules/.bin/nanoid.ps1 | 28 - node_modules/.bin/node-which | 13 +- node_modules/.bin/node-which.cmd | 17 - node_modules/.bin/node-which.ps1 | 28 - node_modules/.bin/parser | 13 +- node_modules/.bin/parser.cmd | 17 - node_modules/.bin/parser.ps1 | 28 - node_modules/.bin/react-scripts | 13 +- node_modules/.bin/react-scripts.cmd | 17 - node_modules/.bin/react-scripts.ps1 | 28 - node_modules/.bin/regjsparser | 13 +- node_modules/.bin/regjsparser.cmd | 17 - node_modules/.bin/regjsparser.ps1 | 28 - node_modules/.bin/resolve | 13 +- node_modules/.bin/resolve.cmd | 17 - node_modules/.bin/resolve.ps1 | 28 - node_modules/.bin/rimraf | 13 +- node_modules/.bin/rimraf.cmd | 17 - node_modules/.bin/rimraf.ps1 | 28 - node_modules/.bin/rollup | 13 +- node_modules/.bin/rollup.cmd | 17 - node_modules/.bin/rollup.ps1 | 28 - node_modules/.bin/semver | 13 +- node_modules/.bin/semver.cmd | 17 - node_modules/.bin/semver.ps1 | 28 - node_modules/.bin/sucrase | 13 +- node_modules/.bin/sucrase-node | 13 +- node_modules/.bin/sucrase-node.cmd | 17 - node_modules/.bin/sucrase-node.ps1 | 28 - node_modules/.bin/sucrase.cmd | 17 - node_modules/.bin/sucrase.ps1 | 28 - node_modules/.bin/svgo | 13 +- node_modules/.bin/svgo.cmd | 17 - node_modules/.bin/svgo.ps1 | 28 - node_modules/.bin/tailwind | 13 +- node_modules/.bin/tailwind.cmd | 17 - node_modules/.bin/tailwind.ps1 | 28 - node_modules/.bin/tailwindcss | 13 +- node_modules/.bin/tailwindcss.cmd | 17 - node_modules/.bin/tailwindcss.ps1 | 28 - node_modules/.bin/terser | 13 +- node_modules/.bin/terser.cmd | 17 - node_modules/.bin/terser.ps1 | 28 - node_modules/.bin/tsc | 13 +- node_modules/.bin/tsc.cmd | 17 - node_modules/.bin/tsc.ps1 | 28 - node_modules/.bin/tsserver | 13 +- node_modules/.bin/tsserver.cmd | 17 - node_modules/.bin/tsserver.ps1 | 28 - node_modules/.bin/update-browserslist-db | 13 +- node_modules/.bin/update-browserslist-db.cmd | 17 - node_modules/.bin/update-browserslist-db.ps1 | 28 - node_modules/.bin/uuid | 13 +- node_modules/.bin/uuid.cmd | 17 - node_modules/.bin/uuid.ps1 | 28 - node_modules/.bin/webpack | 13 +- node_modules/.bin/webpack-dev-server | 13 +- node_modules/.bin/webpack-dev-server.cmd | 17 - node_modules/.bin/webpack-dev-server.ps1 | 28 - node_modules/.bin/webpack.cmd | 17 - node_modules/.bin/webpack.ps1 | 28 - node_modules/.package-lock.json | 31 +- .../@babel/core/node_modules/.bin/semver | 13 +- .../@babel/core/node_modules/.bin/semver.cmd | 17 - .../@babel/core/node_modules/.bin/semver.ps1 | 28 - .../core/node_modules/semver/bin/semver.js | 0 .../eslint-parser/node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../@babel/parser/bin/babel-parser.js | 0 .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../preset-env/node_modules/.bin/semver | 13 +- .../preset-env/node_modules/.bin/semver.cmd | 17 - .../preset-env/node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../eslintrc/node_modules/.bin/js-yaml | 13 +- .../eslintrc/node_modules/.bin/js-yaml.cmd | 17 - .../eslintrc/node_modules/.bin/js-yaml.ps1 | 28 - .../node_modules/js-yaml/bin/js-yaml.js | 0 .../cliui/node_modules/wrap-ansi/index.js | 0 .../console/node_modules/color-name/LICENSE | 14 +- .../console/node_modules/color-name/README.md | 22 +- .../console/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../core/node_modules/color-name/LICENSE | 14 +- .../core/node_modules/color-name/README.md | 22 +- .../core/node_modules/color-name/index.js | 304 +- .../core/node_modules/color-name/package.json | 56 +- .../reporters/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../transform/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../types/node_modules/color-name/LICENSE | 14 +- .../types/node_modules/color-name/README.md | 22 +- .../types/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../@rollup/plugin-node-resolve/CHANGELOG.md | 0 .../@rollup/plugin-node-resolve/README.md | 0 .../plugin-node-resolve/types/index.d.ts | 0 .../@rollup/plugin-replace/CHANGELOG.md | 0 .../@rollup/plugin-replace/src/index.js | 0 .../@rollup/plugin-replace/types/index.d.ts | 0 node_modules/@rollup/pluginutils/CHANGELOG.md | 0 node_modules/@rollup/pluginutils/README.md | 0 .../node_modules/@types/estree/LICENSE | 42 +- .../node_modules/@types/estree/README.md | 32 +- .../node_modules/@types/estree/index.d.ts | 1096 +- .../@rollup/pluginutils/types/index.d.ts | 0 .../@sinclair/typebox/compiler/compiler.d.ts | 56 +- .../@sinclair/typebox/compiler/compiler.js | 818 +- .../@sinclair/typebox/compiler/index.d.ts | 4 +- .../@sinclair/typebox/compiler/index.js | 94 +- .../typebox/conditional/conditional.d.ts | 34 +- .../typebox/conditional/conditional.js | 182 +- .../@sinclair/typebox/conditional/index.d.ts | 4 +- .../@sinclair/typebox/conditional/index.js | 90 +- .../typebox/conditional/structural.d.ts | 22 +- .../typebox/conditional/structural.js | 1314 +- .../@sinclair/typebox/errors/errors.d.ts | 120 +- .../@sinclair/typebox/errors/errors.js | 796 +- .../@sinclair/typebox/errors/index.d.ts | 2 +- .../@sinclair/typebox/errors/index.js | 88 +- .../@sinclair/typebox/format/format.d.ts | 24 +- .../@sinclair/typebox/format/format.js | 110 +- .../@sinclair/typebox/format/index.d.ts | 2 +- .../@sinclair/typebox/format/index.js | 88 +- .../@sinclair/typebox/guard/guard.d.ts | 112 +- node_modules/@sinclair/typebox/guard/guard.js | 702 +- .../@sinclair/typebox/guard/index.d.ts | 2 +- node_modules/@sinclair/typebox/guard/index.js | 88 +- node_modules/@sinclair/typebox/license | 44 +- node_modules/@sinclair/typebox/package.json | 80 +- node_modules/@sinclair/typebox/readme.md | 2304 +-- node_modules/@sinclair/typebox/typebox.d.ts | 816 +- node_modules/@sinclair/typebox/typebox.js | 766 +- .../@sinclair/typebox/value/cast.d.ts | 52 +- node_modules/@sinclair/typebox/value/cast.js | 728 +- .../@sinclair/typebox/value/check.d.ts | 16 +- node_modules/@sinclair/typebox/value/check.js | 662 +- .../@sinclair/typebox/value/clone.d.ts | 6 +- node_modules/@sinclair/typebox/value/clone.js | 130 +- .../@sinclair/typebox/value/create.d.ts | 28 +- .../@sinclair/typebox/value/create.js | 714 +- .../@sinclair/typebox/value/delta.d.ts | 44 +- node_modules/@sinclair/typebox/value/delta.js | 336 +- .../@sinclair/typebox/value/equal.d.ts | 6 +- node_modules/@sinclair/typebox/value/equal.js | 148 +- .../@sinclair/typebox/value/index.d.ts | 6 +- node_modules/@sinclair/typebox/value/index.js | 96 +- node_modules/@sinclair/typebox/value/is.d.ts | 20 +- node_modules/@sinclair/typebox/value/is.js | 98 +- .../@sinclair/typebox/value/pointer.d.ts | 48 +- .../@sinclair/typebox/value/pointer.js | 284 +- .../@sinclair/typebox/value/value.d.ts | 62 +- node_modules/@sinclair/typebox/value/value.js | 162 +- .../dom/node_modules/color-name/LICENSE | 14 +- .../dom/node_modules/color-name/README.md | 22 +- .../dom/node_modules/color-name/index.js | 304 +- .../dom/node_modules/color-name/package.json | 56 +- .../jest-dom/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../jest-dom/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../react/node_modules/color-name/LICENSE | 14 +- .../react/node_modules/color-name/README.md | 22 +- .../react/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- node_modules/@types/aria-query/README.md | 30 +- node_modules/@types/babel__core/README.md | 30 +- .../@types/babel__generator/README.md | 30 +- node_modules/@types/babel__template/README.md | 30 +- node_modules/@types/babel__traverse/README.md | 30 +- node_modules/@types/body-parser/README.md | 30 +- node_modules/@types/bonjour/README.md | 30 +- .../connect-history-api-fallback/README.md | 38 +- node_modules/@types/connect/README.md | 30 +- node_modules/@types/eslint-scope/README.md | 38 +- node_modules/@types/eslint/README.md | 30 +- node_modules/@types/estree/README.md | 30 +- .../express-serve-static-core/README.md | 30 +- node_modules/@types/express/README.md | 30 +- node_modules/@types/graceful-fs/README.md | 38 +- .../@types/html-minifier-terser/LICENSE | 0 .../@types/html-minifier-terser/README.md | 32 +- .../@types/html-minifier-terser/index.d.ts | 0 .../@types/html-minifier-terser/package.json | 0 node_modules/@types/http-errors/README.md | 30 +- node_modules/@types/http-proxy/README.md | 30 +- .../@types/istanbul-lib-coverage/README.md | 30 +- .../@types/istanbul-lib-report/README.md | 30 +- .../@types/istanbul-reports/README.md | 38 +- node_modules/@types/jest/README.md | 30 +- .../node_modules/@sinclair/typebox/license | 44 +- .../@sinclair/typebox/package.json | 94 +- .../node_modules/@sinclair/typebox/readme.md | 2848 ++-- .../jest/node_modules/@types/yargs/README.md | 30 +- .../jest/node_modules/color-name/LICENSE | 14 +- .../jest/node_modules/color-name/README.md | 22 +- .../jest/node_modules/color-name/index.js | 304 +- .../jest/node_modules/color-name/package.json | 56 +- .../jest/node_modules/pretty-format/README.md | 0 node_modules/@types/json-schema/README.md | 30 +- node_modules/@types/json5/README.md | 36 +- node_modules/@types/mime/README.md | 30 +- node_modules/@types/node-forge/README.md | 30 +- node_modules/@types/node/README.md | 30 +- node_modules/@types/parse-json/README.md | 38 +- node_modules/@types/prettier/LICENSE | 0 node_modules/@types/prettier/README.md | 32 +- node_modules/@types/prettier/doc.d.ts | 0 node_modules/@types/prettier/index.d.ts | 0 node_modules/@types/prettier/package.json | 0 .../@types/prettier/parser-angular.d.ts | 0 .../@types/prettier/parser-babel.d.ts | 0 .../@types/prettier/parser-espree.d.ts | 0 node_modules/@types/prettier/parser-flow.d.ts | 0 .../@types/prettier/parser-glimmer.d.ts | 0 .../@types/prettier/parser-graphql.d.ts | 0 node_modules/@types/prettier/parser-html.d.ts | 0 .../@types/prettier/parser-markdown.d.ts | 0 .../@types/prettier/parser-meriyah.d.ts | 0 .../@types/prettier/parser-postcss.d.ts | 0 .../@types/prettier/parser-typescript.d.ts | 0 node_modules/@types/prettier/parser-yaml.d.ts | 0 node_modules/@types/prettier/standalone.d.ts | 0 node_modules/@types/prop-types/README.md | 30 +- node_modules/@types/q/README.md | 30 +- node_modules/@types/qs/README.md | 30 +- node_modules/@types/range-parser/README.md | 38 +- node_modules/@types/react-dom/README.md | 30 +- node_modules/@types/react/README.md | 30 +- node_modules/@types/resolve/README.md | 32 +- node_modules/@types/retry/LICENSE | 42 +- node_modules/@types/retry/README.md | 32 +- node_modules/@types/scheduler/README.md | 30 +- node_modules/@types/semver/README.md | 30 +- node_modules/@types/send/README.md | 30 +- node_modules/@types/serve-index/README.md | 38 +- node_modules/@types/serve-static/README.md | 30 +- node_modules/@types/sockjs/README.md | 38 +- node_modules/@types/stack-utils/README.md | 38 +- .../@types/testing-library__jest-dom/LICENSE | 0 .../testing-library__jest-dom/README.md | 32 +- .../testing-library__jest-dom/index.d.ts | 0 .../testing-library__jest-dom/matchers.d.ts | 0 .../testing-library__jest-dom/package.json | 0 node_modules/@types/trusted-types/README.md | 30 +- node_modules/@types/ws/README.md | 30 +- node_modules/@types/yargs-parser/README.md | 30 +- node_modules/@types/yargs/README.md | 30 +- .../experimental-utils/_ts3.4/dist/index.d.ts | 4 +- .../parser/_ts3.4/dist/index.d.ts | 16 +- .../parser/_ts3.4/dist/parser.d.ts | 44 +- .../_ts3.4/dist/containsAllTypesByName.d.ts | 20 +- .../dist/getConstrainedTypeAtLocation.d.ts | 12 +- .../_ts3.4/dist/getContextualType.d.ts | 16 +- .../_ts3.4/dist/getDeclaration.d.ts | 12 +- .../_ts3.4/dist/getSourceFileOfNode.d.ts | 12 +- .../_ts3.4/dist/getTokenAtPosition.d.ts | 6 +- .../_ts3.4/dist/getTypeArguments.d.ts | 6 +- .../type-utils/_ts3.4/dist/getTypeName.d.ts | 16 +- .../type-utils/_ts3.4/dist/index.d.ts | 32 +- .../_ts3.4/dist/isTypeReadonly.d.ts | 40 +- .../_ts3.4/dist/isUnsafeAssignment.d.ts | 34 +- .../type-utils/_ts3.4/dist/predicates.d.ts | 104 +- .../type-utils/_ts3.4/dist/propertyTypes.d.ts | 8 +- .../_ts3.4/dist/requiresQuoting.d.ts | 8 +- .../type-utils/_ts3.4/dist/typeFlagUtils.d.ts | 32 +- .../types/_ts3.4/dist/generated/ast-spec.d.ts | 3612 ++--- .../types/_ts3.4/dist/index.d.ts | 10 +- .../types/_ts3.4/dist/lib.d.ts | 6 +- .../types/_ts3.4/dist/parser-options.d.ts | 80 +- .../types/_ts3.4/dist/ts-estree.d.ts | 18 +- .../_ts3.4/dist/ast-converter.d.ts | 18 +- .../_ts3.4/dist/clear-caches.d.ts | 20 +- .../_ts3.4/dist/convert-comments.d.ts | 22 +- .../_ts3.4/dist/convert.d.ts | 318 +- .../WatchCompilerHostOfConfigFile.d.ts | 26 +- .../create-program/createDefaultProgram.d.ts | 18 +- .../create-program/createIsolatedProgram.d.ts | 18 +- .../create-program/createProjectProgram.d.ts | 18 +- .../dist/create-program/createSourceFile.d.ts | 10 +- .../dist/create-program/describeFilePath.d.ts | 4 +- .../dist/create-program/getScriptKind.d.ts | 10 +- .../getWatchProgramsForProjects.d.ts | 30 +- .../_ts3.4/dist/create-program/shared.d.ts | 58 +- .../create-program/useProvidedPrograms.d.ts | 26 +- .../_ts3.4/dist/getModifiers.d.ts | 8 +- .../typescript-estree/_ts3.4/dist/index.d.ts | 24 +- .../_ts3.4/dist/jsx/xhtml-entities.d.ts | 4 +- .../_ts3.4/dist/node-utils.d.ts | 462 +- .../dist/parseSettings/ExpiringCache.d.ts | 34 +- .../parseSettings/createParseSettings.d.ts | 10 +- .../parseSettings/getProjectConfigFiles.d.ts | 24 +- .../_ts3.4/dist/parseSettings/index.d.ts | 214 +- .../dist/parseSettings/inferSingleRun.d.ts | 30 +- .../parseSettings/resolveProjectList.d.ts | 38 +- .../parseSettings/warnAboutTSVersion.d.ts | 6 +- .../_ts3.4/dist/parser-options.d.ts | 362 +- .../typescript-estree/_ts3.4/dist/parser.d.ts | 50 +- .../dist/semantic-or-syntactic-errors.d.ts | 26 +- .../_ts3.4/dist/simple-traverse.d.ts | 18 +- .../ts-estree/estree-to-ts-node-types.d.ts | 356 +- .../_ts3.4/dist/ts-estree/index.d.ts | 8 +- .../_ts3.4/dist/ts-estree/ts-nodes.d.ts | 40 +- .../_ts3.4/dist/version-check.d.ts | 6 +- .../eslint-utils/PatternMatcher.d.ts | 96 +- .../eslint-utils/ReferenceTracker.d.ts | 152 +- .../ast-utils/eslint-utils/astUtilities.d.ts | 152 +- .../dist/ast-utils/eslint-utils/index.d.ts | 12 +- .../ast-utils/eslint-utils/predicates.d.ts | 64 +- .../ast-utils/eslint-utils/scopeAnalysis.d.ts | 36 +- .../utils/_ts3.4/dist/ast-utils/helpers.d.ts | 2414 +-- .../utils/_ts3.4/dist/ast-utils/index.d.ts | 10 +- .../utils/_ts3.4/dist/ast-utils/misc.d.ts | 16 +- .../_ts3.4/dist/ast-utils/predicates.d.ts | 140 +- .../dist/eslint-utils/InferTypesFromRule.d.ts | 22 +- .../_ts3.4/dist/eslint-utils/RuleCreator.d.ts | 70 +- .../dist/eslint-utils/applyDefault.d.ts | 20 +- .../eslint-utils/batchedSingleLineTests.d.ts | 48 +- .../_ts3.4/dist/eslint-utils/deepMerge.d.ts | 34 +- .../dist/eslint-utils/getParserServices.d.ts | 16 +- .../utils/_ts3.4/dist/eslint-utils/index.d.ts | 18 +- .../_ts3.4/dist/eslint-utils/nullThrows.d.ts | 28 +- .../eslint-utils/rule-tester/RuleTester.d.ts | 96 +- .../rule-tester/dependencyConstraints.d.ts | 34 +- .../utils/_ts3.4/dist/index.d.ts | 16 +- .../utils/_ts3.4/dist/json-schema.d.ts | 4 +- .../dist/ts-eslint-scope/Definition.d.ts | 38 +- .../_ts3.4/dist/ts-eslint-scope/Options.d.ts | 30 +- .../dist/ts-eslint-scope/PatternVisitor.d.ts | 50 +- .../dist/ts-eslint-scope/Reference.d.ts | 56 +- .../dist/ts-eslint-scope/Referencer.d.ts | 110 +- .../_ts3.4/dist/ts-eslint-scope/Scope.d.ts | 206 +- .../dist/ts-eslint-scope/ScopeManager.d.ts | 100 +- .../_ts3.4/dist/ts-eslint-scope/Variable.d.ts | 34 +- .../_ts3.4/dist/ts-eslint-scope/analyze.d.ts | 32 +- .../_ts3.4/dist/ts-eslint-scope/index.d.ts | 22 +- .../utils/_ts3.4/dist/ts-eslint/AST.d.ts | 18 +- .../_ts3.4/dist/ts-eslint/CLIEngine.d.ts | 274 +- .../utils/_ts3.4/dist/ts-eslint/ESLint.d.ts | 752 +- .../utils/_ts3.4/dist/ts-eslint/Linter.d.ts | 652 +- .../_ts3.4/dist/ts-eslint/ParserOptions.d.ts | 4 +- .../utils/_ts3.4/dist/ts-eslint/Rule.d.ts | 786 +- .../_ts3.4/dist/ts-eslint/RuleTester.d.ts | 316 +- .../utils/_ts3.4/dist/ts-eslint/Scope.d.ts | 88 +- .../_ts3.4/dist/ts-eslint/SourceCode.d.ts | 692 +- .../utils/_ts3.4/dist/ts-eslint/index.d.ts | 20 +- .../utils/_ts3.4/dist/ts-estree.d.ts | 6 +- .../visitor-keys/_ts3.4/dist/get-keys.d.ts | 8 +- .../visitor-keys/_ts3.4/dist/index.d.ts | 6 +- .../_ts3.4/dist/visitor-keys.d.ts | 12 +- .../floating-point-hex-parser/LICENSE | 40 +- .../acorn-globals/node_modules/.bin/acorn | 13 +- .../acorn-globals/node_modules/.bin/acorn.cmd | 17 - .../acorn-globals/node_modules/.bin/acorn.ps1 | 28 - .../node_modules/acorn/bin/acorn | 0 node_modules/acorn/bin/acorn | 0 .../ansi-html-community/bin/ansi-html | 0 node_modules/autoprefixer/bin/autoprefixer | 0 node_modules/axobject-query/LICENSE | 0 .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 node_modules/big.js/CHANGELOG.md | 292 +- node_modules/big.js/LICENCE | 46 +- node_modules/big.js/README.md | 402 +- node_modules/big.js/big.js | 1882 +-- node_modules/big.js/big.min.js | 2 +- node_modules/big.js/big.mjs | 1848 +-- node_modules/big.js/package.json | 98 +- node_modules/browserslist/cli.js | 0 node_modules/char-regex/LICENSE | 42 +- node_modules/char-regex/README.md | 54 +- node_modules/char-regex/index.d.ts | 26 +- node_modules/char-regex/index.js | 78 +- node_modules/char-regex/package.json | 88 +- node_modules/cjs-module-lexer/LICENSE | 20 +- node_modules/cjs-module-lexer/README.md | 922 +- node_modules/cjs-module-lexer/lexer.d.ts | 14 +- node_modules/cjs-module-lexer/lexer.js | 2876 ++-- node_modules/cjs-module-lexer/package.json | 90 +- node_modules/coa/coa.d.ts | 148 +- node_modules/color-name/.npmignore | 212 +- node_modules/color-name/LICENSE | 14 +- node_modules/color-name/README.md | 22 +- node_modules/color-name/index.js | 304 +- node_modules/color-name/test.js | 14 +- node_modules/colord/colord.d.ts | 206 +- node_modules/colord/constants.d.ts | 20 +- node_modules/colord/extend.d.ts | 8 +- node_modules/colord/helpers.d.ts | 40 +- node_modules/colord/index.d.ts | 10 +- node_modules/colord/parse.d.ts | 16 +- node_modules/colord/plugins/a11y.d.ts | 76 +- node_modules/colord/plugins/cmyk.d.ts | 48 +- node_modules/colord/plugins/harmonies.d.ts | 32 +- node_modules/colord/plugins/hwb.d.ts | 46 +- node_modules/colord/plugins/lab.d.ts | 46 +- node_modules/colord/plugins/lch.d.ts | 48 +- node_modules/colord/plugins/minify.d.ts | 40 +- node_modules/colord/plugins/mix.d.ts | 54 +- node_modules/colord/plugins/names.d.ts | 38 +- node_modules/colord/plugins/xyz.d.ts | 28 +- node_modules/colord/random.d.ts | 4 +- node_modules/colord/types.d.ts | 134 +- node_modules/css-blank-pseudo/dist/cli.cjs | 0 node_modules/css-has-pseudo/dist/cli.cjs | 0 .../css-prefers-color-scheme/dist/cli.cjs | 0 node_modules/css-tree/data/index.js | 0 node_modules/cssesc/bin/cssesc | 0 .../csso/node_modules/css-tree/data/index.js | 0 .../scripts/update-changelog.sh | 0 node_modules/decimal.js/LICENCE.md | 46 +- node_modules/decimal.js/README.md | 492 +- node_modules/decimal.js/decimal.d.ts | 598 +- node_modules/decimal.js/decimal.js | 9868 ++++++------ node_modules/decimal.js/decimal.mjs | 9796 ++++++------ node_modules/decimal.js/package.json | 110 +- node_modules/deep-equal/.editorconfig | 0 node_modules/deep-equal/.eslintrc | 0 node_modules/deep-equal/package.json | 0 node_modules/detect-port-alt/bin/detect-port | 0 node_modules/didyoumean/package.json | 0 node_modules/ejs/bin/cli.js | 0 node_modules/ejs/lib/ejs.js | 0 node_modules/emojis-list/LICENSE.md | 0 node_modules/emojis-list/README.md | 0 node_modules/es-module-lexer/LICENSE | 20 +- node_modules/es-module-lexer/README.md | 646 +- node_modules/es-module-lexer/lexer.js | 1848 +-- node_modules/es-module-lexer/package.json | 108 +- node_modules/es-module-lexer/types/lexer.d.ts | 306 +- node_modules/escodegen/bin/escodegen.js | 0 node_modules/escodegen/bin/esgenerate.js | 0 node_modules/eslint-plugin-flowtype/README.md | 16 +- .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 .../lib/rules/jsx-curly-brace-presence.js | 0 .../node_modules/.bin/resolve | 13 +- .../node_modules/.bin/resolve.cmd | 17 - .../node_modules/.bin/resolve.ps1 | 28 - .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/resolve/bin/resolve | 0 .../node_modules/semver/bin/semver.js | 0 node_modules/eslint/bin/eslint.js | 0 node_modules/eslint/node_modules/.bin/js-yaml | 13 +- .../eslint/node_modules/.bin/js-yaml.cmd | 17 - .../eslint/node_modules/.bin/js-yaml.ps1 | 28 - .../eslint/node_modules/color-name/LICENSE | 14 +- .../eslint/node_modules/color-name/README.md | 22 +- .../eslint/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/js-yaml/bin/js-yaml.js | 0 node_modules/esprima/bin/esparse.js | 0 node_modules/esprima/bin/esvalidate.js | 0 node_modules/esrecurse/package.json | 0 .../exit/test/fixtures/create-files.sh | 0 node_modules/filesize/LICENSE | 56 +- node_modules/filesize/README.md | 202 +- node_modules/filesize/filesize.d.ts | 262 +- node_modules/filesize/lib/filesize.es6.js | 322 +- node_modules/filesize/lib/filesize.esm.js | 322 +- node_modules/filesize/lib/filesize.js | 14 +- node_modules/filesize/package.json | 110 +- node_modules/flat-cache/changelog.md | 106 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- node_modules/fraction.js/fraction.d.ts | 120 +- node_modules/fs-monkey/README.md | 0 .../global-prefix/node_modules/.bin/which | 13 +- .../global-prefix/node_modules/.bin/which.cmd | 17 - .../global-prefix/node_modules/.bin/which.ps1 | 28 - .../node_modules/which/bin/which | 0 node_modules/he/bin/he | 0 node_modules/hpack.js/bin/benchmark | 0 node_modules/html-minifier-terser/cli.js | 0 node_modules/http-proxy/.auto-changelog | 10 +- node_modules/immer/dist/core/current.d.ts | 4 +- node_modules/immer/dist/core/finalize.d.ts | 4 +- node_modules/immer/dist/core/immerClass.d.ts | 104 +- node_modules/immer/dist/core/proxy.d.ts | 74 +- node_modules/immer/dist/core/scope.d.ts | 34 +- .../immer/dist/immer.cjs.development.js | 194 +- node_modules/immer/dist/immer.d.ts | 158 +- .../immer/dist/immer.umd.development.js | 194 +- node_modules/immer/dist/internal.d.ts | 22 +- node_modules/immer/dist/plugins/all.d.ts | 2 +- node_modules/immer/dist/plugins/es5.d.ts | 2 +- node_modules/immer/dist/plugins/mapset.d.ts | 2 +- node_modules/immer/dist/plugins/patches.d.ts | 2 +- .../immer/dist/types/types-external.d.ts | 212 +- .../immer/dist/types/types-internal.d.ts | 68 +- node_modules/immer/dist/utils/common.d.ts | 62 +- node_modules/immer/dist/utils/env.d.ts | 44 +- node_modules/immer/dist/utils/errors.d.ts | 56 +- node_modules/immer/dist/utils/plugins.d.ts | 122 +- node_modules/import-local/fixtures/cli.js | 0 node_modules/is-docker/cli.js | 0 .../is-potential-custom-element-name/index.js | 0 .../node_modules/.bin/semver | 13 +- .../node_modules/.bin/semver.cmd | 17 - .../node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 node_modules/jake/bin/bash_completion.sh | 0 node_modules/jake/bin/cli.js | 0 .../jake/node_modules/color-name/LICENSE | 14 +- .../jake/node_modules/color-name/README.md | 22 +- .../jake/node_modules/color-name/index.js | 304 +- .../jake/node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- node_modules/jest-cli/bin/jest.js | 0 .../jest-cli/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../jest-cli/node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../jest-diff/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../jest-each/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../jest-util/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/@types/yargs/README.md | 30 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../node_modules/pretty-format/README.md | 0 .../node_modules/char-regex/index.d.ts | 30 +- .../node_modules/char-regex/index.js | 94 +- .../node_modules/char-regex/license | 42 +- .../node_modules/char-regex/package.json | 74 +- .../node_modules/char-regex/readme.md | 50 +- .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- node_modules/jest/bin/jest.js | 0 node_modules/jiti/bin/jiti.js | 0 node_modules/js-yaml/bin/js-yaml.js | 0 node_modules/jsesc/bin/jsesc | 0 node_modules/json-schema/LICENSE | 390 +- node_modules/json-schema/README.md | 6 +- node_modules/json-schema/lib/links.js | 128 +- node_modules/json-schema/lib/validate.js | 542 +- node_modules/json-schema/package.json | 48 +- node_modules/json5/lib/cli.js | 0 node_modules/jsonpath/README.md | 0 node_modules/jsonpath/lib/grammar.js | 0 node_modules/jsonpath/lib/handlers.js | 0 node_modules/jsonpath/lib/index.js | 0 .../jsonpath/node_modules/.bin/esparse | 13 +- .../jsonpath/node_modules/.bin/esparse.cmd | 17 - .../jsonpath/node_modules/.bin/esparse.ps1 | 28 - .../jsonpath/node_modules/.bin/esvalidate | 13 +- .../jsonpath/node_modules/.bin/esvalidate.cmd | 17 - .../jsonpath/node_modules/.bin/esvalidate.ps1 | 28 - .../node_modules/esprima/bin/esparse.js | 0 .../node_modules/esprima/bin/esvalidate.js | 0 node_modules/loose-envify/cli.js | 0 node_modules/lz-string/bin/bin.js | 0 .../make-dir/node_modules/.bin/semver | 13 +- .../make-dir/node_modules/.bin/semver.cmd | 17 - .../make-dir/node_modules/.bin/semver.ps1 | 28 - .../node_modules/semver/bin/semver.js | 0 node_modules/micromatch/LICENSE | 0 node_modules/mime/cli.js | 0 node_modules/mime/src/build.js | 0 node_modules/mkdirp/bin/cmd.js | 0 node_modules/multicast-dns/cli.js | 0 node_modules/nanoid/bin/nanoid.cjs | 0 node_modules/open/xdg-open | 0 .../test/scripts/delayed-call.coffee | 0 .../test/scripts/delayed-require.coffee | 0 .../test/scripts/difference.coffee | 0 .../test/scripts/initial-value.coffee | 0 node_modules/postcss-calc/LICENSE | 0 node_modules/postcss-calc/README.md | 0 .../postcss-font-variant/CHANGELOG.md | 0 node_modules/postcss-font-variant/LICENSE | 0 node_modules/postcss-font-variant/README.md | 0 node_modules/postcss-font-variant/index.js | 0 node_modules/postcss-import/LICENSE | 0 node_modules/postcss-import/index.js | 0 .../node_modules/.bin/yaml | 13 +- .../node_modules/.bin/yaml.cmd | 17 - .../node_modules/.bin/yaml.ps1 | 28 - .../node_modules/yaml/bin.mjs | 0 .../dist/node_modules/tslib/tslib.es6.js | 26 +- .../postcss-replace-overflow-wrap/LICENSE | 40 +- .../postcss-svgo/node_modules/.bin/svgo | 13 +- .../postcss-svgo/node_modules/.bin/svgo.cmd | 17 - .../postcss-svgo/node_modules/.bin/svgo.ps1 | 28 - .../node_modules/css-tree/data/index.js | 0 .../postcss-svgo/node_modules/svgo/bin/svgo | 0 node_modules/postcss/package.json | 0 node_modules/pretty-format/README.md | 0 node_modules/prompts/readme.md | 0 node_modules/queue-microtask/LICENSE | 0 .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- .../react-scripts/bin/react-scripts.js | 0 node_modules/read-cache/README.md | 92 +- node_modules/read-cache/index.js | 156 +- .../regenerate-unicode-properties/index.js | 0 node_modules/regjsparser/bin/parser | 0 .../regjsparser/node_modules/.bin/jsesc | 13 +- .../regjsparser/node_modules/.bin/jsesc.cmd | 17 - .../regjsparser/node_modules/.bin/jsesc.ps1 | 28 - .../regjsparser/node_modules/jsesc/bin/jsesc | 0 node_modules/resolve/bin/resolve | 0 node_modules/rimraf/bin.js | 0 node_modules/rollup/dist/bin/rollup | 0 node_modules/semver/bin/semver.js | 0 node_modules/sisteransi/package.json | 0 node_modules/sisteransi/readme.md | 0 node_modules/sockjs/package.json | 86 +- .../static-eval/node_modules/.bin/escodegen | 13 +- .../node_modules/.bin/escodegen.cmd | 17 - .../node_modules/.bin/escodegen.ps1 | 28 - .../static-eval/node_modules/.bin/esgenerate | 13 +- .../node_modules/.bin/esgenerate.cmd | 17 - .../node_modules/.bin/esgenerate.ps1 | 28 - .../node_modules/escodegen/bin/escodegen.js | 0 .../node_modules/escodegen/bin/esgenerate.js | 0 node_modules/sucrase/bin/sucrase | 0 node_modules/sucrase/bin/sucrase-node | 0 node_modules/sucrase/node_modules/.bin/glob | 13 +- .../sucrase/node_modules/.bin/glob.cmd | 17 - .../sucrase/node_modules/.bin/glob.ps1 | 28 - .../node_modules/glob/dist/esm/bin.mjs | 0 node_modules/svgo/bin/svgo | 0 node_modules/svgo/lib/svgo.js | 0 node_modules/svgo/plugins/minifyStyles.js | 0 node_modules/svgo/plugins/prefixIds.js | 0 node_modules/tailwindcss/lib/cli.js | 0 node_modules/terser/bin/terser | 0 node_modules/terser/bin/uglifyjs | 0 .../tsconfig-paths/node_modules/.bin/json5 | 13 +- .../node_modules/.bin/json5.cmd | 17 - .../node_modules/.bin/json5.ps1 | 28 - .../node_modules/json5/lib/cli.js | 0 node_modules/tslib/CopyrightNotice.txt | 30 +- node_modules/tslib/LICENSE.txt | 22 +- node_modules/tslib/README.md | 328 +- node_modules/tslib/modules/index.js | 136 +- node_modules/tslib/modules/package.json | 4 +- node_modules/tslib/tslib.d.ts | 906 +- node_modules/tslib/tslib.es6.js | 740 +- node_modules/tslib/tslib.js | 842 +- node_modules/tsutils/LICENSE | 42 +- node_modules/tsutils/README.md | 122 +- node_modules/tsutils/index.d.ts | 4 +- node_modules/tsutils/index.js | 10 +- .../node_modules/tslib/CopyrightNotice.txt | 30 +- .../tsutils/node_modules/tslib/LICENSE.txt | 22 +- .../tsutils/node_modules/tslib/README.md | 284 +- .../node_modules/tslib/modules/index.js | 102 +- .../node_modules/tslib/modules/package.json | 4 +- .../tsutils/node_modules/tslib/tslib.d.ts | 72 +- .../tsutils/node_modules/tslib/tslib.es6.js | 436 +- .../tsutils/node_modules/tslib/tslib.js | 568 +- node_modules/tsutils/typeguard/2.8/index.d.ts | 4 +- node_modules/tsutils/typeguard/2.8/index.js | 10 +- node_modules/tsutils/typeguard/2.8/node.d.ts | 310 +- node_modules/tsutils/typeguard/2.8/node.js | 1426 +- node_modules/tsutils/typeguard/2.8/type.d.ts | 36 +- node_modules/tsutils/typeguard/2.8/type.js | 152 +- node_modules/tsutils/typeguard/2.9/index.d.ts | 4 +- node_modules/tsutils/typeguard/2.9/index.js | 10 +- node_modules/tsutils/typeguard/2.9/node.d.ts | 6 +- node_modules/tsutils/typeguard/2.9/node.js | 20 +- node_modules/tsutils/typeguard/2.9/type.d.ts | 2 +- node_modules/tsutils/typeguard/2.9/type.js | 8 +- node_modules/tsutils/typeguard/3.0/index.d.ts | 4 +- node_modules/tsutils/typeguard/3.0/index.js | 10 +- node_modules/tsutils/typeguard/3.0/node.d.ts | 10 +- node_modules/tsutils/typeguard/3.0/node.js | 36 +- node_modules/tsutils/typeguard/3.0/type.d.ts | 12 +- node_modules/tsutils/typeguard/3.0/type.js | 30 +- node_modules/tsutils/typeguard/3.2/index.d.ts | 4 +- node_modules/tsutils/typeguard/3.2/index.js | 10 +- node_modules/tsutils/typeguard/3.2/node.d.ts | 6 +- node_modules/tsutils/typeguard/3.2/node.js | 20 +- node_modules/tsutils/typeguard/3.2/type.d.ts | 2 +- node_modules/tsutils/typeguard/3.2/type.js | 8 +- node_modules/tsutils/typeguard/index.d.ts | 4 +- node_modules/tsutils/typeguard/index.js | 10 +- .../tsutils/typeguard/next/index.d.ts | 4 +- node_modules/tsutils/typeguard/next/index.js | 10 +- node_modules/tsutils/typeguard/next/node.d.ts | 2 +- node_modules/tsutils/typeguard/next/node.js | 8 +- node_modules/tsutils/typeguard/next/type.d.ts | 2 +- node_modules/tsutils/typeguard/next/type.js | 8 +- node_modules/tsutils/typeguard/node.d.ts | 2 +- node_modules/tsutils/typeguard/node.js | 8 +- node_modules/tsutils/typeguard/type.d.ts | 2 +- node_modules/tsutils/typeguard/type.js | 8 +- node_modules/tsutils/util/control-flow.d.ts | 48 +- node_modules/tsutils/util/control-flow.js | 590 +- node_modules/tsutils/util/convert-ast.d.ts | 66 +- node_modules/tsutils/util/convert-ast.js | 156 +- node_modules/tsutils/util/index.d.ts | 10 +- node_modules/tsutils/util/index.js | 16 +- node_modules/tsutils/util/type.d.ts | 70 +- node_modules/tsutils/util/type.js | 660 +- node_modules/tsutils/util/usage.d.ts | 60 +- node_modules/tsutils/util/usage.js | 1314 +- node_modules/tsutils/util/util.d.ts | 530 +- node_modules/tsutils/util/util.js | 3370 ++-- node_modules/typescript/LICENSE.txt | 110 +- node_modules/typescript/README.md | 102 +- .../typescript/ThirdPartyNoticeText.txt | 386 +- node_modules/typescript/bin/tsc | 0 node_modules/typescript/bin/tsserver | 0 node_modules/typescript/lib/lib.d.ts | 10 +- node_modules/typescript/lib/lib.dom.d.ts | 2 +- .../typescript/lib/lib.dom.iterable.d.ts | 2 +- .../typescript/lib/lib.es2015.collection.d.ts | 266 +- .../typescript/lib/lib.es2015.core.d.ts | 1084 +- node_modules/typescript/lib/lib.es2015.d.ts | 22 +- .../typescript/lib/lib.es2015.generator.d.ts | 120 +- .../typescript/lib/lib.es2015.iterable.d.ts | 962 +- .../typescript/lib/lib.es2015.promise.d.ts | 128 +- .../typescript/lib/lib.es2015.proxy.d.ts | 226 +- .../typescript/lib/lib.es2015.reflect.d.ts | 258 +- .../typescript/lib/lib.es2015.symbol.d.ts | 60 +- .../lib/lib.es2015.symbol.wellknown.d.ts | 614 +- .../lib/lib.es2016.array.include.d.ts | 200 +- node_modules/typescript/lib/lib.es2016.d.ts | 4 +- .../typescript/lib/lib.es2016.full.d.ts | 10 +- node_modules/typescript/lib/lib.es2017.d.ts | 14 +- .../typescript/lib/lib.es2017.full.d.ts | 10 +- .../typescript/lib/lib.es2017.intl.d.ts | 60 +- .../typescript/lib/lib.es2017.object.d.ts | 68 +- .../lib/lib.es2017.sharedmemory.d.ts | 240 +- .../typescript/lib/lib.es2017.string.d.ts | 60 +- .../lib/lib.es2017.typedarrays.d.ts | 76 +- .../lib/lib.es2018.asyncgenerator.d.ts | 120 +- .../lib/lib.es2018.asynciterable.d.ts | 54 +- node_modules/typescript/lib/lib.es2018.d.ts | 14 +- .../typescript/lib/lib.es2018.full.d.ts | 10 +- .../typescript/lib/lib.es2018.intl.d.ts | 112 +- .../typescript/lib/lib.es2018.promise.d.ts | 26 +- .../typescript/lib/lib.es2018.regexp.d.ts | 42 +- .../typescript/lib/lib.es2019.array.d.ts | 132 +- node_modules/typescript/lib/lib.es2019.d.ts | 14 +- .../typescript/lib/lib.es2019.full.d.ts | 12 +- .../typescript/lib/lib.es2019.intl.d.ts | 12 +- .../typescript/lib/lib.es2019.object.d.ts | 36 +- .../typescript/lib/lib.es2019.string.d.ts | 44 +- .../typescript/lib/lib.es2019.symbol.d.ts | 14 +- .../typescript/lib/lib.es2020.bigint.d.ts | 1426 +- node_modules/typescript/lib/lib.es2020.d.ts | 20 +- .../typescript/lib/lib.es2020.date.d.ts | 52 +- .../typescript/lib/lib.es2020.full.d.ts | 12 +- .../typescript/lib/lib.es2020.intl.d.ts | 832 +- .../typescript/lib/lib.es2020.number.d.ts | 26 +- .../typescript/lib/lib.es2020.promise.d.ts | 64 +- .../lib/lib.es2020.sharedmemory.d.ts | 164 +- .../typescript/lib/lib.es2020.string.d.ts | 26 +- .../lib/lib.es2020.symbol.wellknown.d.ts | 44 +- node_modules/typescript/lib/lib.es2021.d.ts | 12 +- .../typescript/lib/lib.es2021.full.d.ts | 12 +- .../typescript/lib/lib.es2021.intl.d.ts | 274 +- .../typescript/lib/lib.es2021.promise.d.ts | 66 +- .../typescript/lib/lib.es2021.string.d.ts | 36 +- .../typescript/lib/lib.es2021.weakref.d.ts | 116 +- .../typescript/lib/lib.es2022.array.d.ts | 212 +- node_modules/typescript/lib/lib.es2022.d.ts | 16 +- .../typescript/lib/lib.es2022.error.d.ts | 116 +- .../typescript/lib/lib.es2022.full.d.ts | 12 +- .../typescript/lib/lib.es2022.intl.d.ts | 188 +- .../typescript/lib/lib.es2022.object.d.ts | 18 +- .../lib/lib.es2022.sharedmemory.d.ts | 16 +- .../typescript/lib/lib.es2022.string.d.ts | 16 +- node_modules/typescript/lib/lib.es5.d.ts | 9018 +++++------ node_modules/typescript/lib/lib.es6.d.ts | 12 +- node_modules/typescript/lib/lib.esnext.d.ts | 6 +- .../typescript/lib/lib.esnext.full.d.ts | 10 +- .../typescript/lib/lib.esnext.intl.d.ts | 26 +- .../typescript/lib/lib.scripthost.d.ts | 620 +- .../typescript/lib/lib.webworker.d.ts | 2 +- .../lib/lib.webworker.importscripts.d.ts | 14 +- .../lib/lib.webworker.iterable.d.ts | 2 +- node_modules/typescript/lib/typesMap.json | 992 +- .../index.js | 0 .../index.js | 0 .../index.js | 0 .../index.js | 0 node_modules/upath/LICENSE | 0 node_modules/update-browserslist-db/cli.js | 0 node_modules/uri-js/LICENSE | 0 node_modules/uri-js/README.md | 0 node_modules/uri-js/dist/es5/uri.all.d.ts | 0 node_modules/uri-js/dist/es5/uri.all.js | 0 node_modules/uri-js/dist/es5/uri.all.js.map | 0 node_modules/uri-js/dist/es5/uri.all.min.d.ts | 0 node_modules/uri-js/dist/es5/uri.all.min.js | 0 .../uri-js/dist/es5/uri.all.min.js.map | 0 node_modules/uri-js/dist/esnext/index.d.ts | 0 node_modules/uri-js/dist/esnext/index.js | 0 node_modules/uri-js/dist/esnext/index.js.map | 0 .../uri-js/dist/esnext/regexps-iri.d.ts | 0 .../uri-js/dist/esnext/regexps-iri.js | 0 .../uri-js/dist/esnext/regexps-iri.js.map | 0 .../uri-js/dist/esnext/regexps-uri.d.ts | 0 .../uri-js/dist/esnext/regexps-uri.js | 0 .../uri-js/dist/esnext/regexps-uri.js.map | 0 .../uri-js/dist/esnext/schemes/http.d.ts | 0 .../uri-js/dist/esnext/schemes/http.js | 0 .../uri-js/dist/esnext/schemes/http.js.map | 0 .../uri-js/dist/esnext/schemes/https.d.ts | 0 .../uri-js/dist/esnext/schemes/https.js | 0 .../uri-js/dist/esnext/schemes/https.js.map | 0 .../uri-js/dist/esnext/schemes/mailto.d.ts | 0 .../uri-js/dist/esnext/schemes/mailto.js | 0 .../uri-js/dist/esnext/schemes/mailto.js.map | 0 .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 0 .../uri-js/dist/esnext/schemes/urn-uuid.js | 0 .../dist/esnext/schemes/urn-uuid.js.map | 0 .../uri-js/dist/esnext/schemes/urn.d.ts | 0 .../uri-js/dist/esnext/schemes/urn.js | 0 .../uri-js/dist/esnext/schemes/urn.js.map | 0 .../uri-js/dist/esnext/schemes/ws.d.ts | 0 node_modules/uri-js/dist/esnext/schemes/ws.js | 0 .../uri-js/dist/esnext/schemes/ws.js.map | 0 .../uri-js/dist/esnext/schemes/wss.d.ts | 0 .../uri-js/dist/esnext/schemes/wss.js | 0 .../uri-js/dist/esnext/schemes/wss.js.map | 0 node_modules/uri-js/dist/esnext/uri.d.ts | 0 node_modules/uri-js/dist/esnext/uri.js | 0 node_modules/uri-js/dist/esnext/uri.js.map | 0 node_modules/uri-js/dist/esnext/util.d.ts | 0 node_modules/uri-js/dist/esnext/util.js | 0 node_modules/uri-js/dist/esnext/util.js.map | 0 node_modules/uri-js/package.json | 0 node_modules/uri-js/yarn.lock | 0 node_modules/uuid/dist/bin/uuid | 0 .../bin/webpack-dev-server.js | 0 node_modules/webpack/bin/webpack.js | 0 node_modules/which/bin/node-which | 0 .../better-ajv-errors/dist/constants.d.ts | 10 +- .../better-ajv-errors/dist/index.d.ts | 22 +- .../better-ajv-errors/dist/lib/filter.d.ts | 4 +- .../dist/lib/suggestions.d.ts | 10 +- .../better-ajv-errors/dist/lib/utils.d.ts | 16 +- .../dist/types/ValidationError.d.ts | 20 +- .../workbox-cacheable-response/package.json | 0 .../workbox-navigation-preload/package.json | 0 .../workbox-range-requests/package.json | 0 node_modules/wrap-ansi-cjs/index.js | 0 .../node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- node_modules/wrap-ansi/index.js | 0 .../wrap-ansi/node_modules/color-name/LICENSE | 14 +- .../node_modules/color-name/README.md | 22 +- .../node_modules/color-name/index.js | 304 +- .../node_modules/color-name/package.json | 56 +- package-lock.json | 13022 +++++++++++++++- src/Composant/App.jsx | 3 +- 1036 files changed, 72243 insertions(+), 63575 deletions(-) mode change 100644 => 120000 node_modules/.bin/acorn delete mode 100644 node_modules/.bin/acorn.cmd delete mode 100644 node_modules/.bin/acorn.ps1 mode change 100644 => 120000 node_modules/.bin/ansi-html delete mode 100644 node_modules/.bin/ansi-html.cmd delete mode 100644 node_modules/.bin/ansi-html.ps1 mode change 100644 => 120000 node_modules/.bin/autoprefixer delete mode 100644 node_modules/.bin/autoprefixer.cmd delete mode 100644 node_modules/.bin/autoprefixer.ps1 mode change 100644 => 120000 node_modules/.bin/browserslist delete mode 100644 node_modules/.bin/browserslist.cmd delete mode 100644 node_modules/.bin/browserslist.ps1 mode change 100644 => 120000 node_modules/.bin/css-blank-pseudo delete mode 100644 node_modules/.bin/css-blank-pseudo.cmd delete mode 100644 node_modules/.bin/css-blank-pseudo.ps1 mode change 100644 => 120000 node_modules/.bin/css-has-pseudo delete mode 100644 node_modules/.bin/css-has-pseudo.cmd delete mode 100644 node_modules/.bin/css-has-pseudo.ps1 mode change 100644 => 120000 node_modules/.bin/css-prefers-color-scheme delete mode 100644 node_modules/.bin/css-prefers-color-scheme.cmd delete mode 100644 node_modules/.bin/css-prefers-color-scheme.ps1 mode change 100644 => 120000 node_modules/.bin/cssesc delete mode 100644 node_modules/.bin/cssesc.cmd delete mode 100644 node_modules/.bin/cssesc.ps1 mode change 100644 => 120000 node_modules/.bin/detect mode change 100644 => 120000 node_modules/.bin/detect-port delete mode 100644 node_modules/.bin/detect-port.cmd delete mode 100644 node_modules/.bin/detect-port.ps1 delete mode 100644 node_modules/.bin/detect.cmd delete mode 100644 node_modules/.bin/detect.ps1 mode change 100644 => 120000 node_modules/.bin/ejs delete mode 100644 node_modules/.bin/ejs.cmd delete mode 100644 node_modules/.bin/ejs.ps1 mode change 100644 => 120000 node_modules/.bin/escodegen delete mode 100644 node_modules/.bin/escodegen.cmd delete mode 100644 node_modules/.bin/escodegen.ps1 mode change 100644 => 120000 node_modules/.bin/esgenerate delete mode 100644 node_modules/.bin/esgenerate.cmd delete mode 100644 node_modules/.bin/esgenerate.ps1 mode change 100644 => 120000 node_modules/.bin/eslint delete mode 100644 node_modules/.bin/eslint.cmd delete mode 100644 node_modules/.bin/eslint.ps1 mode change 100644 => 120000 node_modules/.bin/esparse delete mode 100644 node_modules/.bin/esparse.cmd delete mode 100644 node_modules/.bin/esparse.ps1 mode change 100644 => 120000 node_modules/.bin/esvalidate delete mode 100644 node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/.bin/esvalidate.ps1 mode change 100644 => 120000 node_modules/.bin/he delete mode 100644 node_modules/.bin/he.cmd delete mode 100644 node_modules/.bin/he.ps1 mode change 100644 => 120000 node_modules/.bin/html-minifier-terser delete mode 100644 node_modules/.bin/html-minifier-terser.cmd delete mode 100644 node_modules/.bin/html-minifier-terser.ps1 mode change 100644 => 120000 node_modules/.bin/import-local-fixture delete mode 100644 node_modules/.bin/import-local-fixture.cmd delete mode 100644 node_modules/.bin/import-local-fixture.ps1 mode change 100644 => 120000 node_modules/.bin/is-docker delete mode 100644 node_modules/.bin/is-docker.cmd delete mode 100644 node_modules/.bin/is-docker.ps1 mode change 100644 => 120000 node_modules/.bin/jake delete mode 100644 node_modules/.bin/jake.cmd delete mode 100644 node_modules/.bin/jake.ps1 mode change 100644 => 120000 node_modules/.bin/jest delete mode 100644 node_modules/.bin/jest.cmd delete mode 100644 node_modules/.bin/jest.ps1 mode change 100644 => 120000 node_modules/.bin/jiti delete mode 100644 node_modules/.bin/jiti.cmd delete mode 100644 node_modules/.bin/jiti.ps1 mode change 100644 => 120000 node_modules/.bin/js-yaml delete mode 100644 node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/.bin/js-yaml.ps1 mode change 100644 => 120000 node_modules/.bin/jsesc delete mode 100644 node_modules/.bin/jsesc.cmd delete mode 100644 node_modules/.bin/jsesc.ps1 mode change 100644 => 120000 node_modules/.bin/json5 delete mode 100644 node_modules/.bin/json5.cmd delete mode 100644 node_modules/.bin/json5.ps1 mode change 100644 => 120000 node_modules/.bin/loose-envify delete mode 100644 node_modules/.bin/loose-envify.cmd delete mode 100644 node_modules/.bin/loose-envify.ps1 mode change 100644 => 120000 node_modules/.bin/lz-string delete mode 100644 node_modules/.bin/lz-string.cmd delete mode 100644 node_modules/.bin/lz-string.ps1 mode change 100644 => 120000 node_modules/.bin/mime delete mode 100644 node_modules/.bin/mime.cmd delete mode 100644 node_modules/.bin/mime.ps1 mode change 100644 => 120000 node_modules/.bin/mkdirp delete mode 100644 node_modules/.bin/mkdirp.cmd delete mode 100644 node_modules/.bin/mkdirp.ps1 mode change 100644 => 120000 node_modules/.bin/multicast-dns delete mode 100644 node_modules/.bin/multicast-dns.cmd delete mode 100644 node_modules/.bin/multicast-dns.ps1 mode change 100644 => 120000 node_modules/.bin/nanoid delete mode 100644 node_modules/.bin/nanoid.cmd delete mode 100644 node_modules/.bin/nanoid.ps1 mode change 100644 => 120000 node_modules/.bin/node-which delete mode 100644 node_modules/.bin/node-which.cmd delete mode 100644 node_modules/.bin/node-which.ps1 mode change 100644 => 120000 node_modules/.bin/parser delete mode 100644 node_modules/.bin/parser.cmd delete mode 100644 node_modules/.bin/parser.ps1 mode change 100644 => 120000 node_modules/.bin/react-scripts delete mode 100644 node_modules/.bin/react-scripts.cmd delete mode 100644 node_modules/.bin/react-scripts.ps1 mode change 100644 => 120000 node_modules/.bin/regjsparser delete mode 100644 node_modules/.bin/regjsparser.cmd delete mode 100644 node_modules/.bin/regjsparser.ps1 mode change 100644 => 120000 node_modules/.bin/resolve delete mode 100644 node_modules/.bin/resolve.cmd delete mode 100644 node_modules/.bin/resolve.ps1 mode change 100644 => 120000 node_modules/.bin/rimraf delete mode 100644 node_modules/.bin/rimraf.cmd delete mode 100644 node_modules/.bin/rimraf.ps1 mode change 100644 => 120000 node_modules/.bin/rollup delete mode 100644 node_modules/.bin/rollup.cmd delete mode 100644 node_modules/.bin/rollup.ps1 mode change 100644 => 120000 node_modules/.bin/semver delete mode 100644 node_modules/.bin/semver.cmd delete mode 100644 node_modules/.bin/semver.ps1 mode change 100644 => 120000 node_modules/.bin/sucrase mode change 100644 => 120000 node_modules/.bin/sucrase-node delete mode 100644 node_modules/.bin/sucrase-node.cmd delete mode 100644 node_modules/.bin/sucrase-node.ps1 delete mode 100644 node_modules/.bin/sucrase.cmd delete mode 100644 node_modules/.bin/sucrase.ps1 mode change 100644 => 120000 node_modules/.bin/svgo delete mode 100644 node_modules/.bin/svgo.cmd delete mode 100644 node_modules/.bin/svgo.ps1 mode change 100644 => 120000 node_modules/.bin/tailwind delete mode 100644 node_modules/.bin/tailwind.cmd delete mode 100644 node_modules/.bin/tailwind.ps1 mode change 100644 => 120000 node_modules/.bin/tailwindcss delete mode 100644 node_modules/.bin/tailwindcss.cmd delete mode 100644 node_modules/.bin/tailwindcss.ps1 mode change 100644 => 120000 node_modules/.bin/terser delete mode 100644 node_modules/.bin/terser.cmd delete mode 100644 node_modules/.bin/terser.ps1 mode change 100644 => 120000 node_modules/.bin/tsc delete mode 100644 node_modules/.bin/tsc.cmd delete mode 100644 node_modules/.bin/tsc.ps1 mode change 100644 => 120000 node_modules/.bin/tsserver delete mode 100644 node_modules/.bin/tsserver.cmd delete mode 100644 node_modules/.bin/tsserver.ps1 mode change 100644 => 120000 node_modules/.bin/update-browserslist-db delete mode 100644 node_modules/.bin/update-browserslist-db.cmd delete mode 100644 node_modules/.bin/update-browserslist-db.ps1 mode change 100644 => 120000 node_modules/.bin/uuid delete mode 100644 node_modules/.bin/uuid.cmd delete mode 100644 node_modules/.bin/uuid.ps1 mode change 100644 => 120000 node_modules/.bin/webpack mode change 100644 => 120000 node_modules/.bin/webpack-dev-server delete mode 100644 node_modules/.bin/webpack-dev-server.cmd delete mode 100644 node_modules/.bin/webpack-dev-server.ps1 delete mode 100644 node_modules/.bin/webpack.cmd delete mode 100644 node_modules/.bin/webpack.ps1 mode change 100644 => 120000 node_modules/@babel/core/node_modules/.bin/semver delete mode 100644 node_modules/@babel/core/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/core/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/core/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@babel/eslint-parser/node_modules/.bin/semver delete mode 100644 node_modules/@babel/eslint-parser/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/eslint-parser/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver delete mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/helper-compilation-targets/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver delete mode 100644 node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/helper-create-class-features-plugin/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver delete mode 100644 node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/@babel/parser/bin/babel-parser.js mode change 100644 => 120000 node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver delete mode 100644 node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/plugin-transform-runtime/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@babel/preset-env/node_modules/.bin/semver delete mode 100644 node_modules/@babel/preset-env/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/preset-env/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/@babel/preset-env/node_modules/semver/bin/semver.js mode change 100644 => 120000 node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml delete mode 100644 node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.ps1 mode change 100644 => 100755 node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js mode change 100644 => 100755 node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js mode change 100644 => 100755 node_modules/@rollup/plugin-node-resolve/CHANGELOG.md mode change 100644 => 100755 node_modules/@rollup/plugin-node-resolve/README.md mode change 100644 => 100755 node_modules/@rollup/plugin-node-resolve/types/index.d.ts mode change 100644 => 100755 node_modules/@rollup/plugin-replace/CHANGELOG.md mode change 100644 => 100755 node_modules/@rollup/plugin-replace/src/index.js mode change 100644 => 100755 node_modules/@rollup/plugin-replace/types/index.d.ts mode change 100644 => 100755 node_modules/@rollup/pluginutils/CHANGELOG.md mode change 100644 => 100755 node_modules/@rollup/pluginutils/README.md mode change 100644 => 100755 node_modules/@rollup/pluginutils/types/index.d.ts mode change 100644 => 100755 node_modules/@types/html-minifier-terser/LICENSE mode change 100644 => 100755 node_modules/@types/html-minifier-terser/README.md mode change 100644 => 100755 node_modules/@types/html-minifier-terser/index.d.ts mode change 100644 => 100755 node_modules/@types/html-minifier-terser/package.json mode change 100644 => 100755 node_modules/@types/jest/node_modules/pretty-format/README.md mode change 100644 => 100755 node_modules/@types/prettier/LICENSE mode change 100644 => 100755 node_modules/@types/prettier/README.md mode change 100644 => 100755 node_modules/@types/prettier/doc.d.ts mode change 100644 => 100755 node_modules/@types/prettier/index.d.ts mode change 100644 => 100755 node_modules/@types/prettier/package.json mode change 100644 => 100755 node_modules/@types/prettier/parser-angular.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-babel.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-espree.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-flow.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-glimmer.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-graphql.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-html.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-markdown.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-meriyah.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-postcss.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-typescript.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-yaml.d.ts mode change 100644 => 100755 node_modules/@types/prettier/standalone.d.ts mode change 100644 => 100755 node_modules/@types/testing-library__jest-dom/LICENSE mode change 100644 => 100755 node_modules/@types/testing-library__jest-dom/README.md mode change 100644 => 100755 node_modules/@types/testing-library__jest-dom/index.d.ts mode change 100644 => 100755 node_modules/@types/testing-library__jest-dom/matchers.d.ts mode change 100644 => 100755 node_modules/@types/testing-library__jest-dom/package.json mode change 100644 => 120000 node_modules/acorn-globals/node_modules/.bin/acorn delete mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn.cmd delete mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn.ps1 mode change 100644 => 100755 node_modules/acorn-globals/node_modules/acorn/bin/acorn mode change 100644 => 100755 node_modules/acorn/bin/acorn mode change 100644 => 100755 node_modules/ansi-html-community/bin/ansi-html mode change 100644 => 100755 node_modules/autoprefixer/bin/autoprefixer mode change 100644 => 100755 node_modules/axobject-query/LICENSE mode change 100644 => 120000 node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver delete mode 100644 node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.cmd delete mode 100644 node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/browserslist/cli.js mode change 100644 => 100755 node_modules/css-blank-pseudo/dist/cli.cjs mode change 100644 => 100755 node_modules/css-has-pseudo/dist/cli.cjs mode change 100644 => 100755 node_modules/css-prefers-color-scheme/dist/cli.cjs mode change 100644 => 100755 node_modules/css-tree/data/index.js mode change 100644 => 100755 node_modules/cssesc/bin/cssesc mode change 100644 => 100755 node_modules/csso/node_modules/css-tree/data/index.js mode change 100644 => 100755 node_modules/damerau-levenshtein/scripts/update-changelog.sh mode change 100644 => 100755 node_modules/deep-equal/.editorconfig mode change 100644 => 100755 node_modules/deep-equal/.eslintrc mode change 100644 => 100755 node_modules/deep-equal/package.json mode change 100644 => 100755 node_modules/detect-port-alt/bin/detect-port mode change 100644 => 100755 node_modules/didyoumean/package.json mode change 100644 => 100755 node_modules/ejs/bin/cli.js mode change 100644 => 100755 node_modules/ejs/lib/ejs.js mode change 100644 => 100755 node_modules/emojis-list/LICENSE.md mode change 100644 => 100755 node_modules/emojis-list/README.md mode change 100644 => 100755 node_modules/escodegen/bin/escodegen.js mode change 100644 => 100755 node_modules/escodegen/bin/esgenerate.js mode change 100644 => 120000 node_modules/eslint-plugin-import/node_modules/.bin/semver delete mode 100644 node_modules/eslint-plugin-import/node_modules/.bin/semver.cmd delete mode 100644 node_modules/eslint-plugin-import/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js mode change 100644 => 120000 node_modules/eslint-plugin-react/node_modules/.bin/resolve delete mode 100644 node_modules/eslint-plugin-react/node_modules/.bin/resolve.cmd delete mode 100644 node_modules/eslint-plugin-react/node_modules/.bin/resolve.ps1 mode change 100644 => 120000 node_modules/eslint-plugin-react/node_modules/.bin/semver delete mode 100644 node_modules/eslint-plugin-react/node_modules/.bin/semver.cmd delete mode 100644 node_modules/eslint-plugin-react/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/eslint-plugin-react/node_modules/resolve/bin/resolve mode change 100644 => 100755 node_modules/eslint-plugin-react/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/eslint/bin/eslint.js mode change 100644 => 120000 node_modules/eslint/node_modules/.bin/js-yaml delete mode 100644 node_modules/eslint/node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/eslint/node_modules/.bin/js-yaml.ps1 mode change 100644 => 100755 node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js mode change 100644 => 100755 node_modules/esprima/bin/esparse.js mode change 100644 => 100755 node_modules/esprima/bin/esvalidate.js mode change 100644 => 100755 node_modules/esrecurse/package.json mode change 100644 => 100755 node_modules/exit/test/fixtures/create-files.sh mode change 100644 => 100755 node_modules/fs-monkey/README.md mode change 100644 => 120000 node_modules/global-prefix/node_modules/.bin/which delete mode 100644 node_modules/global-prefix/node_modules/.bin/which.cmd delete mode 100644 node_modules/global-prefix/node_modules/.bin/which.ps1 mode change 100644 => 100755 node_modules/global-prefix/node_modules/which/bin/which mode change 100644 => 100755 node_modules/he/bin/he mode change 100644 => 100755 node_modules/hpack.js/bin/benchmark mode change 100644 => 100755 node_modules/html-minifier-terser/cli.js mode change 100644 => 100755 node_modules/import-local/fixtures/cli.js mode change 100644 => 100755 node_modules/is-docker/cli.js mode change 100644 => 100755 node_modules/is-potential-custom-element-name/index.js mode change 100644 => 120000 node_modules/istanbul-lib-instrument/node_modules/.bin/semver delete mode 100644 node_modules/istanbul-lib-instrument/node_modules/.bin/semver.cmd delete mode 100644 node_modules/istanbul-lib-instrument/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/istanbul-lib-instrument/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/jake/bin/bash_completion.sh mode change 100644 => 100755 node_modules/jake/bin/cli.js mode change 100644 => 100755 node_modules/jest-cli/bin/jest.js mode change 100644 => 100755 node_modules/jest-watch-typeahead/node_modules/pretty-format/README.md mode change 100644 => 100755 node_modules/jest/bin/jest.js mode change 100644 => 100755 node_modules/jiti/bin/jiti.js mode change 100644 => 100755 node_modules/js-yaml/bin/js-yaml.js mode change 100644 => 100755 node_modules/jsesc/bin/jsesc mode change 100644 => 100755 node_modules/json5/lib/cli.js mode change 100644 => 100755 node_modules/jsonpath/README.md mode change 100644 => 100755 node_modules/jsonpath/lib/grammar.js mode change 100644 => 100755 node_modules/jsonpath/lib/handlers.js mode change 100644 => 100755 node_modules/jsonpath/lib/index.js mode change 100644 => 120000 node_modules/jsonpath/node_modules/.bin/esparse delete mode 100644 node_modules/jsonpath/node_modules/.bin/esparse.cmd delete mode 100644 node_modules/jsonpath/node_modules/.bin/esparse.ps1 mode change 100644 => 120000 node_modules/jsonpath/node_modules/.bin/esvalidate delete mode 100644 node_modules/jsonpath/node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/jsonpath/node_modules/.bin/esvalidate.ps1 mode change 100644 => 100755 node_modules/jsonpath/node_modules/esprima/bin/esparse.js mode change 100644 => 100755 node_modules/jsonpath/node_modules/esprima/bin/esvalidate.js mode change 100644 => 100755 node_modules/loose-envify/cli.js mode change 100644 => 100755 node_modules/lz-string/bin/bin.js mode change 100644 => 120000 node_modules/make-dir/node_modules/.bin/semver delete mode 100644 node_modules/make-dir/node_modules/.bin/semver.cmd delete mode 100644 node_modules/make-dir/node_modules/.bin/semver.ps1 mode change 100644 => 100755 node_modules/make-dir/node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/micromatch/LICENSE mode change 100644 => 100755 node_modules/mime/cli.js mode change 100644 => 100755 node_modules/mime/src/build.js mode change 100644 => 100755 node_modules/mkdirp/bin/cmd.js mode change 100644 => 100755 node_modules/multicast-dns/cli.js mode change 100644 => 100755 node_modules/nanoid/bin/nanoid.cjs mode change 100644 => 100755 node_modules/open/xdg-open mode change 100644 => 100755 node_modules/performance-now/test/scripts/delayed-call.coffee mode change 100644 => 100755 node_modules/performance-now/test/scripts/delayed-require.coffee mode change 100644 => 100755 node_modules/performance-now/test/scripts/difference.coffee mode change 100644 => 100755 node_modules/performance-now/test/scripts/initial-value.coffee mode change 100644 => 100755 node_modules/postcss-calc/LICENSE mode change 100644 => 100755 node_modules/postcss-calc/README.md mode change 100644 => 100755 node_modules/postcss-font-variant/CHANGELOG.md mode change 100644 => 100755 node_modules/postcss-font-variant/LICENSE mode change 100644 => 100755 node_modules/postcss-font-variant/README.md mode change 100644 => 100755 node_modules/postcss-font-variant/index.js mode change 100644 => 100755 node_modules/postcss-import/LICENSE mode change 100644 => 100755 node_modules/postcss-import/index.js mode change 100644 => 120000 node_modules/postcss-load-config/node_modules/.bin/yaml delete mode 100644 node_modules/postcss-load-config/node_modules/.bin/yaml.cmd delete mode 100644 node_modules/postcss-load-config/node_modules/.bin/yaml.ps1 mode change 100644 => 100755 node_modules/postcss-load-config/node_modules/yaml/bin.mjs mode change 100644 => 120000 node_modules/postcss-svgo/node_modules/.bin/svgo delete mode 100644 node_modules/postcss-svgo/node_modules/.bin/svgo.cmd delete mode 100644 node_modules/postcss-svgo/node_modules/.bin/svgo.ps1 mode change 100644 => 100755 node_modules/postcss-svgo/node_modules/css-tree/data/index.js mode change 100644 => 100755 node_modules/postcss-svgo/node_modules/svgo/bin/svgo mode change 100644 => 100755 node_modules/postcss/package.json mode change 100644 => 100755 node_modules/pretty-format/README.md mode change 100644 => 100755 node_modules/prompts/readme.md mode change 100644 => 100755 node_modules/queue-microtask/LICENSE mode change 100644 => 100755 node_modules/react-scripts/bin/react-scripts.js mode change 100644 => 100755 node_modules/regenerate-unicode-properties/index.js mode change 100644 => 100755 node_modules/regjsparser/bin/parser mode change 100644 => 120000 node_modules/regjsparser/node_modules/.bin/jsesc delete mode 100644 node_modules/regjsparser/node_modules/.bin/jsesc.cmd delete mode 100644 node_modules/regjsparser/node_modules/.bin/jsesc.ps1 mode change 100644 => 100755 node_modules/regjsparser/node_modules/jsesc/bin/jsesc mode change 100644 => 100755 node_modules/resolve/bin/resolve mode change 100644 => 100755 node_modules/rimraf/bin.js mode change 100644 => 100755 node_modules/rollup/dist/bin/rollup mode change 100644 => 100755 node_modules/semver/bin/semver.js mode change 100644 => 100755 node_modules/sisteransi/package.json mode change 100644 => 100755 node_modules/sisteransi/readme.md mode change 100644 => 120000 node_modules/static-eval/node_modules/.bin/escodegen delete mode 100644 node_modules/static-eval/node_modules/.bin/escodegen.cmd delete mode 100644 node_modules/static-eval/node_modules/.bin/escodegen.ps1 mode change 100644 => 120000 node_modules/static-eval/node_modules/.bin/esgenerate delete mode 100644 node_modules/static-eval/node_modules/.bin/esgenerate.cmd delete mode 100644 node_modules/static-eval/node_modules/.bin/esgenerate.ps1 mode change 100644 => 100755 node_modules/static-eval/node_modules/escodegen/bin/escodegen.js mode change 100644 => 100755 node_modules/static-eval/node_modules/escodegen/bin/esgenerate.js mode change 100644 => 100755 node_modules/sucrase/bin/sucrase mode change 100644 => 100755 node_modules/sucrase/bin/sucrase-node mode change 100644 => 120000 node_modules/sucrase/node_modules/.bin/glob delete mode 100644 node_modules/sucrase/node_modules/.bin/glob.cmd delete mode 100644 node_modules/sucrase/node_modules/.bin/glob.ps1 mode change 100644 => 100755 node_modules/sucrase/node_modules/glob/dist/esm/bin.mjs mode change 100644 => 100755 node_modules/svgo/bin/svgo mode change 100644 => 100755 node_modules/svgo/lib/svgo.js mode change 100644 => 100755 node_modules/svgo/plugins/minifyStyles.js mode change 100644 => 100755 node_modules/svgo/plugins/prefixIds.js mode change 100644 => 100755 node_modules/tailwindcss/lib/cli.js mode change 100644 => 100755 node_modules/terser/bin/terser mode change 100644 => 100755 node_modules/terser/bin/uglifyjs mode change 100644 => 120000 node_modules/tsconfig-paths/node_modules/.bin/json5 delete mode 100644 node_modules/tsconfig-paths/node_modules/.bin/json5.cmd delete mode 100644 node_modules/tsconfig-paths/node_modules/.bin/json5.ps1 mode change 100644 => 100755 node_modules/tsconfig-paths/node_modules/json5/lib/cli.js mode change 100644 => 100755 node_modules/typescript/bin/tsc mode change 100644 => 100755 node_modules/typescript/bin/tsserver mode change 100644 => 100755 node_modules/unicode-canonical-property-names-ecmascript/index.js mode change 100644 => 100755 node_modules/unicode-match-property-ecmascript/index.js mode change 100644 => 100755 node_modules/unicode-match-property-value-ecmascript/index.js mode change 100644 => 100755 node_modules/unicode-property-aliases-ecmascript/index.js mode change 100644 => 100755 node_modules/upath/LICENSE mode change 100644 => 100755 node_modules/update-browserslist-db/cli.js mode change 100644 => 100755 node_modules/uri-js/LICENSE mode change 100644 => 100755 node_modules/uri-js/README.md mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.js mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.js.map mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.min.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.min.js mode change 100644 => 100755 node_modules/uri-js/dist/es5/uri.all.min.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/index.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/index.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/index.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-iri.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-iri.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-iri.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-uri.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-uri.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/regexps-uri.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/http.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/http.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/http.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/https.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/https.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/https.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/mailto.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/mailto.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/mailto.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/urn.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/ws.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/ws.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/ws.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/wss.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/wss.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/schemes/wss.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/uri.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/uri.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/uri.js.map mode change 100644 => 100755 node_modules/uri-js/dist/esnext/util.d.ts mode change 100644 => 100755 node_modules/uri-js/dist/esnext/util.js mode change 100644 => 100755 node_modules/uri-js/dist/esnext/util.js.map mode change 100644 => 100755 node_modules/uri-js/package.json mode change 100644 => 100755 node_modules/uri-js/yarn.lock mode change 100644 => 100755 node_modules/uuid/dist/bin/uuid mode change 100644 => 100755 node_modules/webpack-dev-server/bin/webpack-dev-server.js mode change 100644 => 100755 node_modules/webpack/bin/webpack.js mode change 100644 => 100755 node_modules/which/bin/node-which mode change 100644 => 100755 node_modules/workbox-cacheable-response/package.json mode change 100644 => 100755 node_modules/workbox-navigation-preload/package.json mode change 100644 => 100755 node_modules/workbox-range-requests/package.json mode change 100644 => 100755 node_modules/wrap-ansi-cjs/index.js mode change 100644 => 100755 node_modules/wrap-ansi/index.js diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 100644 index 46a3e61a..00000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" -else - exec node "$basedir/../acorn/bin/acorn" "$@" -fi diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 00000000..cf767603 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd deleted file mode 100644 index a9324df9..00000000 --- a/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/.bin/acorn.ps1 b/node_modules/.bin/acorn.ps1 deleted file mode 100644 index 6f6dcddf..00000000 --- a/node_modules/.bin/acorn.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ansi-html b/node_modules/.bin/ansi-html deleted file mode 100644 index 70835657..00000000 --- a/node_modules/.bin/ansi-html +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ansi-html-community/bin/ansi-html" "$@" -else - exec node "$basedir/../ansi-html-community/bin/ansi-html" "$@" -fi diff --git a/node_modules/.bin/ansi-html b/node_modules/.bin/ansi-html new file mode 120000 index 00000000..3bfd3c68 --- /dev/null +++ b/node_modules/.bin/ansi-html @@ -0,0 +1 @@ +../ansi-html-community/bin/ansi-html \ No newline at end of file diff --git a/node_modules/.bin/ansi-html.cmd b/node_modules/.bin/ansi-html.cmd deleted file mode 100644 index 5777d6f8..00000000 --- a/node_modules/.bin/ansi-html.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ansi-html-community\bin\ansi-html" %* diff --git a/node_modules/.bin/ansi-html.ps1 b/node_modules/.bin/ansi-html.ps1 deleted file mode 100644 index f4bc43c0..00000000 --- a/node_modules/.bin/ansi-html.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args - } else { - & "$basedir/node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args - } else { - & "node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/autoprefixer b/node_modules/.bin/autoprefixer deleted file mode 100644 index c6bc975d..00000000 --- a/node_modules/.bin/autoprefixer +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@" -else - exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@" -fi diff --git a/node_modules/.bin/autoprefixer b/node_modules/.bin/autoprefixer new file mode 120000 index 00000000..e876d81c --- /dev/null +++ b/node_modules/.bin/autoprefixer @@ -0,0 +1 @@ +../autoprefixer/bin/autoprefixer \ No newline at end of file diff --git a/node_modules/.bin/autoprefixer.cmd b/node_modules/.bin/autoprefixer.cmd deleted file mode 100644 index 7ed417d4..00000000 --- a/node_modules/.bin/autoprefixer.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\autoprefixer\bin\autoprefixer" %* diff --git a/node_modules/.bin/autoprefixer.ps1 b/node_modules/.bin/autoprefixer.ps1 deleted file mode 100644 index b0f0b6f7..00000000 --- a/node_modules/.bin/autoprefixer.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args - } else { - & "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args - } else { - & "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/browserslist b/node_modules/.bin/browserslist deleted file mode 100644 index 68dd69d4..00000000 --- a/node_modules/.bin/browserslist +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@" -else - exec node "$basedir/../browserslist/cli.js" "$@" -fi diff --git a/node_modules/.bin/browserslist b/node_modules/.bin/browserslist new file mode 120000 index 00000000..3cd991b2 --- /dev/null +++ b/node_modules/.bin/browserslist @@ -0,0 +1 @@ +../browserslist/cli.js \ No newline at end of file diff --git a/node_modules/.bin/browserslist.cmd b/node_modules/.bin/browserslist.cmd deleted file mode 100644 index f93c251e..00000000 --- a/node_modules/.bin/browserslist.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %* diff --git a/node_modules/.bin/browserslist.ps1 b/node_modules/.bin/browserslist.ps1 deleted file mode 100644 index 01e10a08..00000000 --- a/node_modules/.bin/browserslist.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../browserslist/cli.js" $args - } else { - & "node$exe" "$basedir/../browserslist/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/css-blank-pseudo b/node_modules/.bin/css-blank-pseudo deleted file mode 100644 index 197564e7..00000000 --- a/node_modules/.bin/css-blank-pseudo +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../css-blank-pseudo/dist/cli.cjs" "$@" -else - exec node "$basedir/../css-blank-pseudo/dist/cli.cjs" "$@" -fi diff --git a/node_modules/.bin/css-blank-pseudo b/node_modules/.bin/css-blank-pseudo new file mode 120000 index 00000000..7cfe2ff8 --- /dev/null +++ b/node_modules/.bin/css-blank-pseudo @@ -0,0 +1 @@ +../css-blank-pseudo/dist/cli.cjs \ No newline at end of file diff --git a/node_modules/.bin/css-blank-pseudo.cmd b/node_modules/.bin/css-blank-pseudo.cmd deleted file mode 100644 index f7241869..00000000 --- a/node_modules/.bin/css-blank-pseudo.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\css-blank-pseudo\dist\cli.cjs" %* diff --git a/node_modules/.bin/css-blank-pseudo.ps1 b/node_modules/.bin/css-blank-pseudo.ps1 deleted file mode 100644 index ecaa2748..00000000 --- a/node_modules/.bin/css-blank-pseudo.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../css-blank-pseudo/dist/cli.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../css-blank-pseudo/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../css-blank-pseudo/dist/cli.cjs" $args - } else { - & "node$exe" "$basedir/../css-blank-pseudo/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/css-has-pseudo b/node_modules/.bin/css-has-pseudo deleted file mode 100644 index 8db46c2b..00000000 --- a/node_modules/.bin/css-has-pseudo +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../css-has-pseudo/dist/cli.cjs" "$@" -else - exec node "$basedir/../css-has-pseudo/dist/cli.cjs" "$@" -fi diff --git a/node_modules/.bin/css-has-pseudo b/node_modules/.bin/css-has-pseudo new file mode 120000 index 00000000..42a729c2 --- /dev/null +++ b/node_modules/.bin/css-has-pseudo @@ -0,0 +1 @@ +../css-has-pseudo/dist/cli.cjs \ No newline at end of file diff --git a/node_modules/.bin/css-has-pseudo.cmd b/node_modules/.bin/css-has-pseudo.cmd deleted file mode 100644 index e0c2c87c..00000000 --- a/node_modules/.bin/css-has-pseudo.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\css-has-pseudo\dist\cli.cjs" %* diff --git a/node_modules/.bin/css-has-pseudo.ps1 b/node_modules/.bin/css-has-pseudo.ps1 deleted file mode 100644 index f94977c0..00000000 --- a/node_modules/.bin/css-has-pseudo.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../css-has-pseudo/dist/cli.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../css-has-pseudo/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../css-has-pseudo/dist/cli.cjs" $args - } else { - & "node$exe" "$basedir/../css-has-pseudo/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/css-prefers-color-scheme b/node_modules/.bin/css-prefers-color-scheme deleted file mode 100644 index b5c86a08..00000000 --- a/node_modules/.bin/css-prefers-color-scheme +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../css-prefers-color-scheme/dist/cli.cjs" "$@" -else - exec node "$basedir/../css-prefers-color-scheme/dist/cli.cjs" "$@" -fi diff --git a/node_modules/.bin/css-prefers-color-scheme b/node_modules/.bin/css-prefers-color-scheme new file mode 120000 index 00000000..1e88b38a --- /dev/null +++ b/node_modules/.bin/css-prefers-color-scheme @@ -0,0 +1 @@ +../css-prefers-color-scheme/dist/cli.cjs \ No newline at end of file diff --git a/node_modules/.bin/css-prefers-color-scheme.cmd b/node_modules/.bin/css-prefers-color-scheme.cmd deleted file mode 100644 index 978dd1a5..00000000 --- a/node_modules/.bin/css-prefers-color-scheme.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\css-prefers-color-scheme\dist\cli.cjs" %* diff --git a/node_modules/.bin/css-prefers-color-scheme.ps1 b/node_modules/.bin/css-prefers-color-scheme.ps1 deleted file mode 100644 index b1ad7d3c..00000000 --- a/node_modules/.bin/css-prefers-color-scheme.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../css-prefers-color-scheme/dist/cli.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../css-prefers-color-scheme/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../css-prefers-color-scheme/dist/cli.cjs" $args - } else { - & "node$exe" "$basedir/../css-prefers-color-scheme/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/cssesc b/node_modules/.bin/cssesc deleted file mode 100644 index c9b52142..00000000 --- a/node_modules/.bin/cssesc +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../cssesc/bin/cssesc" "$@" -else - exec node "$basedir/../cssesc/bin/cssesc" "$@" -fi diff --git a/node_modules/.bin/cssesc b/node_modules/.bin/cssesc new file mode 120000 index 00000000..487b6890 --- /dev/null +++ b/node_modules/.bin/cssesc @@ -0,0 +1 @@ +../cssesc/bin/cssesc \ No newline at end of file diff --git a/node_modules/.bin/cssesc.cmd b/node_modules/.bin/cssesc.cmd deleted file mode 100644 index b560b42b..00000000 --- a/node_modules/.bin/cssesc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cssesc\bin\cssesc" %* diff --git a/node_modules/.bin/cssesc.ps1 b/node_modules/.bin/cssesc.ps1 deleted file mode 100644 index 480aa17f..00000000 --- a/node_modules/.bin/cssesc.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args - } else { - & "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../cssesc/bin/cssesc" $args - } else { - & "node$exe" "$basedir/../cssesc/bin/cssesc" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/detect b/node_modules/.bin/detect deleted file mode 100644 index be4c7e8e..00000000 --- a/node_modules/.bin/detect +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../detect-port-alt/bin/detect-port" "$@" -else - exec node "$basedir/../detect-port-alt/bin/detect-port" "$@" -fi diff --git a/node_modules/.bin/detect b/node_modules/.bin/detect new file mode 120000 index 00000000..617e569c --- /dev/null +++ b/node_modules/.bin/detect @@ -0,0 +1 @@ +../detect-port-alt/bin/detect-port \ No newline at end of file diff --git a/node_modules/.bin/detect-port b/node_modules/.bin/detect-port deleted file mode 100644 index be4c7e8e..00000000 --- a/node_modules/.bin/detect-port +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../detect-port-alt/bin/detect-port" "$@" -else - exec node "$basedir/../detect-port-alt/bin/detect-port" "$@" -fi diff --git a/node_modules/.bin/detect-port b/node_modules/.bin/detect-port new file mode 120000 index 00000000..617e569c --- /dev/null +++ b/node_modules/.bin/detect-port @@ -0,0 +1 @@ +../detect-port-alt/bin/detect-port \ No newline at end of file diff --git a/node_modules/.bin/detect-port.cmd b/node_modules/.bin/detect-port.cmd deleted file mode 100644 index f2f079d2..00000000 --- a/node_modules/.bin/detect-port.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\detect-port-alt\bin\detect-port" %* diff --git a/node_modules/.bin/detect-port.ps1 b/node_modules/.bin/detect-port.ps1 deleted file mode 100644 index 36e12e95..00000000 --- a/node_modules/.bin/detect-port.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } else { - & "$basedir/node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } else { - & "node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/detect.cmd b/node_modules/.bin/detect.cmd deleted file mode 100644 index f2f079d2..00000000 --- a/node_modules/.bin/detect.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\detect-port-alt\bin\detect-port" %* diff --git a/node_modules/.bin/detect.ps1 b/node_modules/.bin/detect.ps1 deleted file mode 100644 index 36e12e95..00000000 --- a/node_modules/.bin/detect.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } else { - & "$basedir/node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } else { - & "node$exe" "$basedir/../detect-port-alt/bin/detect-port" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ejs b/node_modules/.bin/ejs deleted file mode 100644 index 002d2ac1..00000000 --- a/node_modules/.bin/ejs +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ejs/bin/cli.js" "$@" -else - exec node "$basedir/../ejs/bin/cli.js" "$@" -fi diff --git a/node_modules/.bin/ejs b/node_modules/.bin/ejs new file mode 120000 index 00000000..88e80d01 --- /dev/null +++ b/node_modules/.bin/ejs @@ -0,0 +1 @@ +../ejs/bin/cli.js \ No newline at end of file diff --git a/node_modules/.bin/ejs.cmd b/node_modules/.bin/ejs.cmd deleted file mode 100644 index 7cc2b567..00000000 --- a/node_modules/.bin/ejs.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ejs\bin\cli.js" %* diff --git a/node_modules/.bin/ejs.ps1 b/node_modules/.bin/ejs.ps1 deleted file mode 100644 index f31305eb..00000000 --- a/node_modules/.bin/ejs.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ejs/bin/cli.js" $args - } else { - & "node$exe" "$basedir/../ejs/bin/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen deleted file mode 100644 index 63c8e993..00000000 --- a/node_modules/.bin/escodegen +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@" -else - exec node "$basedir/../escodegen/bin/escodegen.js" "$@" -fi diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen new file mode 120000 index 00000000..01a7c325 --- /dev/null +++ b/node_modules/.bin/escodegen @@ -0,0 +1 @@ +../escodegen/bin/escodegen.js \ No newline at end of file diff --git a/node_modules/.bin/escodegen.cmd b/node_modules/.bin/escodegen.cmd deleted file mode 100644 index 9ac38a74..00000000 --- a/node_modules/.bin/escodegen.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %* diff --git a/node_modules/.bin/escodegen.ps1 b/node_modules/.bin/escodegen.ps1 deleted file mode 100644 index 61d258e1..00000000 --- a/node_modules/.bin/escodegen.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args - } else { - & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args - } else { - & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate deleted file mode 100644 index 710797a6..00000000 --- a/node_modules/.bin/esgenerate +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@" -else - exec node "$basedir/../escodegen/bin/esgenerate.js" "$@" -fi diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate new file mode 120000 index 00000000..7d0293e6 --- /dev/null +++ b/node_modules/.bin/esgenerate @@ -0,0 +1 @@ +../escodegen/bin/esgenerate.js \ No newline at end of file diff --git a/node_modules/.bin/esgenerate.cmd b/node_modules/.bin/esgenerate.cmd deleted file mode 100644 index 5c6426dd..00000000 --- a/node_modules/.bin/esgenerate.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %* diff --git a/node_modules/.bin/esgenerate.ps1 b/node_modules/.bin/esgenerate.ps1 deleted file mode 100644 index 8835d607..00000000 --- a/node_modules/.bin/esgenerate.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args - } else { - & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args - } else { - & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint deleted file mode 100644 index 4e7c1c90..00000000 --- a/node_modules/.bin/eslint +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" -else - exec node "$basedir/../eslint/bin/eslint.js" "$@" -fi diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint new file mode 120000 index 00000000..810e4bcb --- /dev/null +++ b/node_modules/.bin/eslint @@ -0,0 +1 @@ +../eslint/bin/eslint.js \ No newline at end of file diff --git a/node_modules/.bin/eslint.cmd b/node_modules/.bin/eslint.cmd deleted file mode 100644 index 032901a5..00000000 --- a/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %* diff --git a/node_modules/.bin/eslint.ps1 b/node_modules/.bin/eslint.ps1 deleted file mode 100644 index 155bec49..00000000 --- a/node_modules/.bin/eslint.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args - } else { - & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args - } else { - & "node$exe" "$basedir/../eslint/bin/eslint.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse deleted file mode 100644 index 1cc1c96f..00000000 --- a/node_modules/.bin/esparse +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" -else - exec node "$basedir/../esprima/bin/esparse.js" "$@" -fi diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse new file mode 120000 index 00000000..7423b18b --- /dev/null +++ b/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima/bin/esparse.js \ No newline at end of file diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd deleted file mode 100644 index 2ca6d502..00000000 --- a/node_modules/.bin/esparse.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esparse.js" %* diff --git a/node_modules/.bin/esparse.ps1 b/node_modules/.bin/esparse.ps1 deleted file mode 100644 index f19ed730..00000000 --- a/node_modules/.bin/esparse.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args - } else { - & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../esprima/bin/esparse.js" $args - } else { - & "node$exe" "$basedir/../esprima/bin/esparse.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate deleted file mode 100644 index 91a4c9b5..00000000 --- a/node_modules/.bin/esvalidate +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" -else - exec node "$basedir/../esprima/bin/esvalidate.js" "$@" -fi diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate new file mode 120000 index 00000000..16069eff --- /dev/null +++ b/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima/bin/esvalidate.js \ No newline at end of file diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd deleted file mode 100644 index 4c41643e..00000000 --- a/node_modules/.bin/esvalidate.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %* diff --git a/node_modules/.bin/esvalidate.ps1 b/node_modules/.bin/esvalidate.ps1 deleted file mode 100644 index 23699d11..00000000 --- a/node_modules/.bin/esvalidate.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args - } else { - & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args - } else { - & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/he b/node_modules/.bin/he deleted file mode 100644 index 70e18de9..00000000 --- a/node_modules/.bin/he +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../he/bin/he" "$@" -else - exec node "$basedir/../he/bin/he" "$@" -fi diff --git a/node_modules/.bin/he b/node_modules/.bin/he new file mode 120000 index 00000000..2a8eb5e0 --- /dev/null +++ b/node_modules/.bin/he @@ -0,0 +1 @@ +../he/bin/he \ No newline at end of file diff --git a/node_modules/.bin/he.cmd b/node_modules/.bin/he.cmd deleted file mode 100644 index 611a864a..00000000 --- a/node_modules/.bin/he.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\he\bin\he" %* diff --git a/node_modules/.bin/he.ps1 b/node_modules/.bin/he.ps1 deleted file mode 100644 index b0010bc6..00000000 --- a/node_modules/.bin/he.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../he/bin/he" $args - } else { - & "$basedir/node$exe" "$basedir/../he/bin/he" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../he/bin/he" $args - } else { - & "node$exe" "$basedir/../he/bin/he" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/html-minifier-terser b/node_modules/.bin/html-minifier-terser deleted file mode 100644 index b41bcf8e..00000000 --- a/node_modules/.bin/html-minifier-terser +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../html-minifier-terser/cli.js" "$@" -else - exec node "$basedir/../html-minifier-terser/cli.js" "$@" -fi diff --git a/node_modules/.bin/html-minifier-terser b/node_modules/.bin/html-minifier-terser new file mode 120000 index 00000000..bab06671 --- /dev/null +++ b/node_modules/.bin/html-minifier-terser @@ -0,0 +1 @@ +../html-minifier-terser/cli.js \ No newline at end of file diff --git a/node_modules/.bin/html-minifier-terser.cmd b/node_modules/.bin/html-minifier-terser.cmd deleted file mode 100644 index 8d037e4f..00000000 --- a/node_modules/.bin/html-minifier-terser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\html-minifier-terser\cli.js" %* diff --git a/node_modules/.bin/html-minifier-terser.ps1 b/node_modules/.bin/html-minifier-terser.ps1 deleted file mode 100644 index 6fec7c49..00000000 --- a/node_modules/.bin/html-minifier-terser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../html-minifier-terser/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../html-minifier-terser/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../html-minifier-terser/cli.js" $args - } else { - & "node$exe" "$basedir/../html-minifier-terser/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/import-local-fixture b/node_modules/.bin/import-local-fixture deleted file mode 100644 index 79e31800..00000000 --- a/node_modules/.bin/import-local-fixture +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../import-local/fixtures/cli.js" "$@" -else - exec node "$basedir/../import-local/fixtures/cli.js" "$@" -fi diff --git a/node_modules/.bin/import-local-fixture b/node_modules/.bin/import-local-fixture new file mode 120000 index 00000000..ff4b1048 --- /dev/null +++ b/node_modules/.bin/import-local-fixture @@ -0,0 +1 @@ +../import-local/fixtures/cli.js \ No newline at end of file diff --git a/node_modules/.bin/import-local-fixture.cmd b/node_modules/.bin/import-local-fixture.cmd deleted file mode 100644 index 5a3f6859..00000000 --- a/node_modules/.bin/import-local-fixture.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\import-local\fixtures\cli.js" %* diff --git a/node_modules/.bin/import-local-fixture.ps1 b/node_modules/.bin/import-local-fixture.ps1 deleted file mode 100644 index 01ef7842..00000000 --- a/node_modules/.bin/import-local-fixture.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../import-local/fixtures/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../import-local/fixtures/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../import-local/fixtures/cli.js" $args - } else { - & "node$exe" "$basedir/../import-local/fixtures/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker deleted file mode 100644 index 9e457930..00000000 --- a/node_modules/.bin/is-docker +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../is-docker/cli.js" "$@" -else - exec node "$basedir/../is-docker/cli.js" "$@" -fi diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker new file mode 120000 index 00000000..9896ba57 --- /dev/null +++ b/node_modules/.bin/is-docker @@ -0,0 +1 @@ +../is-docker/cli.js \ No newline at end of file diff --git a/node_modules/.bin/is-docker.cmd b/node_modules/.bin/is-docker.cmd deleted file mode 100644 index 79e76ca1..00000000 --- a/node_modules/.bin/is-docker.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\is-docker\cli.js" %* diff --git a/node_modules/.bin/is-docker.ps1 b/node_modules/.bin/is-docker.ps1 deleted file mode 100644 index 74276253..00000000 --- a/node_modules/.bin/is-docker.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../is-docker/cli.js" $args - } else { - & "node$exe" "$basedir/../is-docker/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/jake b/node_modules/.bin/jake deleted file mode 100644 index 8580efea..00000000 --- a/node_modules/.bin/jake +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../jake/bin/cli.js" "$@" -else - exec node "$basedir/../jake/bin/cli.js" "$@" -fi diff --git a/node_modules/.bin/jake b/node_modules/.bin/jake new file mode 120000 index 00000000..36267456 --- /dev/null +++ b/node_modules/.bin/jake @@ -0,0 +1 @@ +../jake/bin/cli.js \ No newline at end of file diff --git a/node_modules/.bin/jake.cmd b/node_modules/.bin/jake.cmd deleted file mode 100644 index 1ccccefb..00000000 --- a/node_modules/.bin/jake.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jake\bin\cli.js" %* diff --git a/node_modules/.bin/jake.ps1 b/node_modules/.bin/jake.ps1 deleted file mode 100644 index d86e1bdd..00000000 --- a/node_modules/.bin/jake.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../jake/bin/cli.js" $args - } else { - & "node$exe" "$basedir/../jake/bin/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/jest b/node_modules/.bin/jest deleted file mode 100644 index e6376e84..00000000 --- a/node_modules/.bin/jest +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../jest/bin/jest.js" "$@" -else - exec node "$basedir/../jest/bin/jest.js" "$@" -fi diff --git a/node_modules/.bin/jest b/node_modules/.bin/jest new file mode 120000 index 00000000..61c18615 --- /dev/null +++ b/node_modules/.bin/jest @@ -0,0 +1 @@ +../jest/bin/jest.js \ No newline at end of file diff --git a/node_modules/.bin/jest.cmd b/node_modules/.bin/jest.cmd deleted file mode 100644 index 67a602ac..00000000 --- a/node_modules/.bin/jest.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jest\bin\jest.js" %* diff --git a/node_modules/.bin/jest.ps1 b/node_modules/.bin/jest.ps1 deleted file mode 100644 index 78a25637..00000000 --- a/node_modules/.bin/jest.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../jest/bin/jest.js" $args - } else { - & "$basedir/node$exe" "$basedir/../jest/bin/jest.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../jest/bin/jest.js" $args - } else { - & "node$exe" "$basedir/../jest/bin/jest.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti deleted file mode 100644 index c37115ae..00000000 --- a/node_modules/.bin/jiti +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../jiti/bin/jiti.js" "$@" -else - exec node "$basedir/../jiti/bin/jiti.js" "$@" -fi diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 120000 index 00000000..031ee3fd --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1 @@ +../jiti/bin/jiti.js \ No newline at end of file diff --git a/node_modules/.bin/jiti.cmd b/node_modules/.bin/jiti.cmd deleted file mode 100644 index e54ba7de..00000000 --- a/node_modules/.bin/jiti.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\bin\jiti.js" %* diff --git a/node_modules/.bin/jiti.ps1 b/node_modules/.bin/jiti.ps1 deleted file mode 100644 index 44b2f0ca..00000000 --- a/node_modules/.bin/jiti.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../jiti/bin/jiti.js" $args - } else { - & "$basedir/node$exe" "$basedir/../jiti/bin/jiti.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../jiti/bin/jiti.js" $args - } else { - & "node$exe" "$basedir/../jiti/bin/jiti.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml deleted file mode 100644 index ed78a868..00000000 --- a/node_modules/.bin/js-yaml +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" -else - exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@" -fi diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml new file mode 120000 index 00000000..9dbd010d --- /dev/null +++ b/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/.bin/js-yaml.cmd b/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index 453312b6..00000000 --- a/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* diff --git a/node_modules/.bin/js-yaml.ps1 b/node_modules/.bin/js-yaml.ps1 deleted file mode 100644 index 2acfc61c..00000000 --- a/node_modules/.bin/js-yaml.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } else { - & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } else { - & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc deleted file mode 100644 index e7105da3..00000000 --- a/node_modules/.bin/jsesc +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" -else - exec node "$basedir/../jsesc/bin/jsesc" "$@" -fi diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc new file mode 120000 index 00000000..7237604c --- /dev/null +++ b/node_modules/.bin/jsesc @@ -0,0 +1 @@ +../jsesc/bin/jsesc \ No newline at end of file diff --git a/node_modules/.bin/jsesc.cmd b/node_modules/.bin/jsesc.cmd deleted file mode 100644 index eb41110f..00000000 --- a/node_modules/.bin/jsesc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %* diff --git a/node_modules/.bin/jsesc.ps1 b/node_modules/.bin/jsesc.ps1 deleted file mode 100644 index 6007e022..00000000 --- a/node_modules/.bin/jsesc.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args - } else { - & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args - } else { - & "node$exe" "$basedir/../jsesc/bin/jsesc" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 deleted file mode 100644 index 977b7507..00000000 --- a/node_modules/.bin/json5 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" -else - exec node "$basedir/../json5/lib/cli.js" "$@" -fi diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 new file mode 120000 index 00000000..217f3798 --- /dev/null +++ b/node_modules/.bin/json5 @@ -0,0 +1 @@ +../json5/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd deleted file mode 100644 index 95c137fe..00000000 --- a/node_modules/.bin/json5.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* diff --git a/node_modules/.bin/json5.ps1 b/node_modules/.bin/json5.ps1 deleted file mode 100644 index 8700ddbe..00000000 --- a/node_modules/.bin/json5.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify deleted file mode 100644 index 60598cb0..00000000 --- a/node_modules/.bin/loose-envify +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../loose-envify/cli.js" "$@" -else - exec node "$basedir/../loose-envify/cli.js" "$@" -fi diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify new file mode 120000 index 00000000..ed9009c5 --- /dev/null +++ b/node_modules/.bin/loose-envify @@ -0,0 +1 @@ +../loose-envify/cli.js \ No newline at end of file diff --git a/node_modules/.bin/loose-envify.cmd b/node_modules/.bin/loose-envify.cmd deleted file mode 100644 index 599576f9..00000000 --- a/node_modules/.bin/loose-envify.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\loose-envify\cli.js" %* diff --git a/node_modules/.bin/loose-envify.ps1 b/node_modules/.bin/loose-envify.ps1 deleted file mode 100644 index eb866fca..00000000 --- a/node_modules/.bin/loose-envify.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../loose-envify/cli.js" $args - } else { - & "node$exe" "$basedir/../loose-envify/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/lz-string b/node_modules/.bin/lz-string deleted file mode 100644 index 30c5b364..00000000 --- a/node_modules/.bin/lz-string +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../lz-string/bin/bin.js" "$@" -else - exec node "$basedir/../lz-string/bin/bin.js" "$@" -fi diff --git a/node_modules/.bin/lz-string b/node_modules/.bin/lz-string new file mode 120000 index 00000000..14bd70d2 --- /dev/null +++ b/node_modules/.bin/lz-string @@ -0,0 +1 @@ +../lz-string/bin/bin.js \ No newline at end of file diff --git a/node_modules/.bin/lz-string.cmd b/node_modules/.bin/lz-string.cmd deleted file mode 100644 index 3314abc3..00000000 --- a/node_modules/.bin/lz-string.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\lz-string\bin\bin.js" %* diff --git a/node_modules/.bin/lz-string.ps1 b/node_modules/.bin/lz-string.ps1 deleted file mode 100644 index aadcc348..00000000 --- a/node_modules/.bin/lz-string.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../lz-string/bin/bin.js" $args - } else { - & "$basedir/node$exe" "$basedir/../lz-string/bin/bin.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../lz-string/bin/bin.js" $args - } else { - & "node$exe" "$basedir/../lz-string/bin/bin.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 100644 index 0a62a1b1..00000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../mime/cli.js" "$@" -else - exec node "$basedir/../mime/cli.js" "$@" -fi diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 00000000..fbb7ee0e --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/mime.cmd b/node_modules/.bin/mime.cmd deleted file mode 100644 index 54491f12..00000000 --- a/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1 deleted file mode 100644 index 2222f40b..00000000 --- a/node_modules/.bin/mime.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../mime/cli.js" $args - } else { - & "node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 100644 index 6ba5765a..00000000 --- a/node_modules/.bin/mkdirp +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" -else - exec node "$basedir/../mkdirp/bin/cmd.js" "$@" -fi diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 00000000..017896ce --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd deleted file mode 100644 index a865dd9f..00000000 --- a/node_modules/.bin/mkdirp.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* diff --git a/node_modules/.bin/mkdirp.ps1 b/node_modules/.bin/mkdirp.ps1 deleted file mode 100644 index 911e8546..00000000 --- a/node_modules/.bin/mkdirp.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - } else { - & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - } else { - & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/multicast-dns b/node_modules/.bin/multicast-dns deleted file mode 100644 index 466f9038..00000000 --- a/node_modules/.bin/multicast-dns +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../multicast-dns/cli.js" "$@" -else - exec node "$basedir/../multicast-dns/cli.js" "$@" -fi diff --git a/node_modules/.bin/multicast-dns b/node_modules/.bin/multicast-dns new file mode 120000 index 00000000..801fc526 --- /dev/null +++ b/node_modules/.bin/multicast-dns @@ -0,0 +1 @@ +../multicast-dns/cli.js \ No newline at end of file diff --git a/node_modules/.bin/multicast-dns.cmd b/node_modules/.bin/multicast-dns.cmd deleted file mode 100644 index 4643dc4e..00000000 --- a/node_modules/.bin/multicast-dns.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\multicast-dns\cli.js" %* diff --git a/node_modules/.bin/multicast-dns.ps1 b/node_modules/.bin/multicast-dns.ps1 deleted file mode 100644 index ec44f13a..00000000 --- a/node_modules/.bin/multicast-dns.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../multicast-dns/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../multicast-dns/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../multicast-dns/cli.js" $args - } else { - & "node$exe" "$basedir/../multicast-dns/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid deleted file mode 100644 index 23254eb2..00000000 --- a/node_modules/.bin/nanoid +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@" -else - exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" -fi diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid new file mode 120000 index 00000000..e2be547b --- /dev/null +++ b/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/node_modules/.bin/nanoid.cmd b/node_modules/.bin/nanoid.cmd deleted file mode 100644 index 9c40107c..00000000 --- a/node_modules/.bin/nanoid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %* diff --git a/node_modules/.bin/nanoid.ps1 b/node_modules/.bin/nanoid.ps1 deleted file mode 100644 index d8a4d7ad..00000000 --- a/node_modules/.bin/nanoid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } else { - & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which deleted file mode 100644 index aece7353..00000000 --- a/node_modules/.bin/node-which +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../which/bin/node-which" "$@" -else - exec node "$basedir/../which/bin/node-which" "$@" -fi diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which new file mode 120000 index 00000000..6f8415ec --- /dev/null +++ b/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/node_modules/.bin/node-which.cmd b/node_modules/.bin/node-which.cmd deleted file mode 100644 index 8738aed8..00000000 --- a/node_modules/.bin/node-which.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %* diff --git a/node_modules/.bin/node-which.ps1 b/node_modules/.bin/node-which.ps1 deleted file mode 100644 index cfb09e84..00000000 --- a/node_modules/.bin/node-which.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args - } else { - & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../which/bin/node-which" $args - } else { - & "node$exe" "$basedir/../which/bin/node-which" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser deleted file mode 100644 index cb5b10d8..00000000 --- a/node_modules/.bin/parser +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" -else - exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" -fi diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser new file mode 120000 index 00000000..ce7bf97e --- /dev/null +++ b/node_modules/.bin/parser @@ -0,0 +1 @@ +../@babel/parser/bin/babel-parser.js \ No newline at end of file diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd deleted file mode 100644 index 1ad5c81c..00000000 --- a/node_modules/.bin/parser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/node_modules/.bin/parser.ps1 b/node_modules/.bin/parser.ps1 deleted file mode 100644 index 8926517b..00000000 --- a/node_modules/.bin/parser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } else { - & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/react-scripts b/node_modules/.bin/react-scripts deleted file mode 100644 index e708da36..00000000 --- a/node_modules/.bin/react-scripts +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../react-scripts/bin/react-scripts.js" "$@" -else - exec node "$basedir/../react-scripts/bin/react-scripts.js" "$@" -fi diff --git a/node_modules/.bin/react-scripts b/node_modules/.bin/react-scripts new file mode 120000 index 00000000..fe0fb709 --- /dev/null +++ b/node_modules/.bin/react-scripts @@ -0,0 +1 @@ +../react-scripts/bin/react-scripts.js \ No newline at end of file diff --git a/node_modules/.bin/react-scripts.cmd b/node_modules/.bin/react-scripts.cmd deleted file mode 100644 index 749cf2f5..00000000 --- a/node_modules/.bin/react-scripts.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\react-scripts\bin\react-scripts.js" %* diff --git a/node_modules/.bin/react-scripts.ps1 b/node_modules/.bin/react-scripts.ps1 deleted file mode 100644 index a4db7ef4..00000000 --- a/node_modules/.bin/react-scripts.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../react-scripts/bin/react-scripts.js" $args - } else { - & "$basedir/node$exe" "$basedir/../react-scripts/bin/react-scripts.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../react-scripts/bin/react-scripts.js" $args - } else { - & "node$exe" "$basedir/../react-scripts/bin/react-scripts.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/regjsparser b/node_modules/.bin/regjsparser deleted file mode 100644 index 04b07bc5..00000000 --- a/node_modules/.bin/regjsparser +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../regjsparser/bin/parser" "$@" -else - exec node "$basedir/../regjsparser/bin/parser" "$@" -fi diff --git a/node_modules/.bin/regjsparser b/node_modules/.bin/regjsparser new file mode 120000 index 00000000..91cec777 --- /dev/null +++ b/node_modules/.bin/regjsparser @@ -0,0 +1 @@ +../regjsparser/bin/parser \ No newline at end of file diff --git a/node_modules/.bin/regjsparser.cmd b/node_modules/.bin/regjsparser.cmd deleted file mode 100644 index 36b5e78d..00000000 --- a/node_modules/.bin/regjsparser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\regjsparser\bin\parser" %* diff --git a/node_modules/.bin/regjsparser.ps1 b/node_modules/.bin/regjsparser.ps1 deleted file mode 100644 index 7d45ef7d..00000000 --- a/node_modules/.bin/regjsparser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../regjsparser/bin/parser" $args - } else { - & "$basedir/node$exe" "$basedir/../regjsparser/bin/parser" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../regjsparser/bin/parser" $args - } else { - & "node$exe" "$basedir/../regjsparser/bin/parser" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve deleted file mode 100644 index 757d454a..00000000 --- a/node_modules/.bin/resolve +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../resolve/bin/resolve" "$@" -else - exec node "$basedir/../resolve/bin/resolve" "$@" -fi diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 00000000..b6afda6c --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/resolve.cmd b/node_modules/.bin/resolve.cmd deleted file mode 100644 index 1a017c40..00000000 --- a/node_modules/.bin/resolve.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\resolve\bin\resolve" %* diff --git a/node_modules/.bin/resolve.ps1 b/node_modules/.bin/resolve.ps1 deleted file mode 100644 index f22b2d31..00000000 --- a/node_modules/.bin/resolve.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args - } else { - & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../resolve/bin/resolve" $args - } else { - & "node$exe" "$basedir/../resolve/bin/resolve" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf deleted file mode 100644 index b8168255..00000000 --- a/node_modules/.bin/rimraf +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@" -else - exec node "$basedir/../rimraf/bin.js" "$@" -fi diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 120000 index 00000000..4cd49a49 --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/.bin/rimraf.cmd b/node_modules/.bin/rimraf.cmd deleted file mode 100644 index 13f45eca..00000000 --- a/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %* diff --git a/node_modules/.bin/rimraf.ps1 b/node_modules/.bin/rimraf.ps1 deleted file mode 100644 index 17167914..00000000 --- a/node_modules/.bin/rimraf.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args - } else { - & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../rimraf/bin.js" $args - } else { - & "node$exe" "$basedir/../rimraf/bin.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup deleted file mode 100644 index 11bd86d0..00000000 --- a/node_modules/.bin/rollup +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@" -else - exec node "$basedir/../rollup/dist/bin/rollup" "$@" -fi diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup new file mode 120000 index 00000000..5939621c --- /dev/null +++ b/node_modules/.bin/rollup @@ -0,0 +1 @@ +../rollup/dist/bin/rollup \ No newline at end of file diff --git a/node_modules/.bin/rollup.cmd b/node_modules/.bin/rollup.cmd deleted file mode 100644 index b3f110b3..00000000 --- a/node_modules/.bin/rollup.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %* diff --git a/node_modules/.bin/rollup.ps1 b/node_modules/.bin/rollup.ps1 deleted file mode 100644 index 10f657d7..00000000 --- a/node_modules/.bin/rollup.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args - } else { - & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args - } else { - & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/sucrase b/node_modules/.bin/sucrase deleted file mode 100644 index e5c30f49..00000000 --- a/node_modules/.bin/sucrase +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../sucrase/bin/sucrase" "$@" -else - exec node "$basedir/../sucrase/bin/sucrase" "$@" -fi diff --git a/node_modules/.bin/sucrase b/node_modules/.bin/sucrase new file mode 120000 index 00000000..0ac7e775 --- /dev/null +++ b/node_modules/.bin/sucrase @@ -0,0 +1 @@ +../sucrase/bin/sucrase \ No newline at end of file diff --git a/node_modules/.bin/sucrase-node b/node_modules/.bin/sucrase-node deleted file mode 100644 index 6f950d3b..00000000 --- a/node_modules/.bin/sucrase-node +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../sucrase/bin/sucrase-node" "$@" -else - exec node "$basedir/../sucrase/bin/sucrase-node" "$@" -fi diff --git a/node_modules/.bin/sucrase-node b/node_modules/.bin/sucrase-node new file mode 120000 index 00000000..8b96fae2 --- /dev/null +++ b/node_modules/.bin/sucrase-node @@ -0,0 +1 @@ +../sucrase/bin/sucrase-node \ No newline at end of file diff --git a/node_modules/.bin/sucrase-node.cmd b/node_modules/.bin/sucrase-node.cmd deleted file mode 100644 index 7319f3ab..00000000 --- a/node_modules/.bin/sucrase-node.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sucrase\bin\sucrase-node" %* diff --git a/node_modules/.bin/sucrase-node.ps1 b/node_modules/.bin/sucrase-node.ps1 deleted file mode 100644 index 9ec0672b..00000000 --- a/node_modules/.bin/sucrase-node.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase-node" $args - } else { - & "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase-node" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../sucrase/bin/sucrase-node" $args - } else { - & "node$exe" "$basedir/../sucrase/bin/sucrase-node" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/sucrase.cmd b/node_modules/.bin/sucrase.cmd deleted file mode 100644 index 3cd8928b..00000000 --- a/node_modules/.bin/sucrase.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sucrase\bin\sucrase" %* diff --git a/node_modules/.bin/sucrase.ps1 b/node_modules/.bin/sucrase.ps1 deleted file mode 100644 index 667bb840..00000000 --- a/node_modules/.bin/sucrase.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase" $args - } else { - & "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../sucrase/bin/sucrase" $args - } else { - & "node$exe" "$basedir/../sucrase/bin/sucrase" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/svgo b/node_modules/.bin/svgo deleted file mode 100644 index 96eb5601..00000000 --- a/node_modules/.bin/svgo +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../svgo/bin/svgo" "$@" -else - exec node "$basedir/../svgo/bin/svgo" "$@" -fi diff --git a/node_modules/.bin/svgo b/node_modules/.bin/svgo new file mode 120000 index 00000000..d6a228b7 --- /dev/null +++ b/node_modules/.bin/svgo @@ -0,0 +1 @@ +../svgo/bin/svgo \ No newline at end of file diff --git a/node_modules/.bin/svgo.cmd b/node_modules/.bin/svgo.cmd deleted file mode 100644 index 3624a53c..00000000 --- a/node_modules/.bin/svgo.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svgo\bin\svgo" %* diff --git a/node_modules/.bin/svgo.ps1 b/node_modules/.bin/svgo.ps1 deleted file mode 100644 index a249bd9b..00000000 --- a/node_modules/.bin/svgo.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../svgo/bin/svgo" $args - } else { - & "$basedir/node$exe" "$basedir/../svgo/bin/svgo" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../svgo/bin/svgo" $args - } else { - & "node$exe" "$basedir/../svgo/bin/svgo" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tailwind b/node_modules/.bin/tailwind deleted file mode 100644 index afd8c186..00000000 --- a/node_modules/.bin/tailwind +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@" -else - exec node "$basedir/../tailwindcss/lib/cli.js" "$@" -fi diff --git a/node_modules/.bin/tailwind b/node_modules/.bin/tailwind new file mode 120000 index 00000000..d4977975 --- /dev/null +++ b/node_modules/.bin/tailwind @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tailwind.cmd b/node_modules/.bin/tailwind.cmd deleted file mode 100644 index 338176a8..00000000 --- a/node_modules/.bin/tailwind.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\tailwindcss\lib\cli.js" %* diff --git a/node_modules/.bin/tailwind.ps1 b/node_modules/.bin/tailwind.ps1 deleted file mode 100644 index 5d60befa..00000000 --- a/node_modules/.bin/tailwind.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } else { - & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tailwindcss b/node_modules/.bin/tailwindcss deleted file mode 100644 index afd8c186..00000000 --- a/node_modules/.bin/tailwindcss +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@" -else - exec node "$basedir/../tailwindcss/lib/cli.js" "$@" -fi diff --git a/node_modules/.bin/tailwindcss b/node_modules/.bin/tailwindcss new file mode 120000 index 00000000..d4977975 --- /dev/null +++ b/node_modules/.bin/tailwindcss @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tailwindcss.cmd b/node_modules/.bin/tailwindcss.cmd deleted file mode 100644 index 338176a8..00000000 --- a/node_modules/.bin/tailwindcss.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\tailwindcss\lib\cli.js" %* diff --git a/node_modules/.bin/tailwindcss.ps1 b/node_modules/.bin/tailwindcss.ps1 deleted file mode 100644 index 5d60befa..00000000 --- a/node_modules/.bin/tailwindcss.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } else { - & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/terser b/node_modules/.bin/terser deleted file mode 100644 index 2d3fa890..00000000 --- a/node_modules/.bin/terser +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../terser/bin/terser" "$@" -else - exec node "$basedir/../terser/bin/terser" "$@" -fi diff --git a/node_modules/.bin/terser b/node_modules/.bin/terser new file mode 120000 index 00000000..0792ff47 --- /dev/null +++ b/node_modules/.bin/terser @@ -0,0 +1 @@ +../terser/bin/terser \ No newline at end of file diff --git a/node_modules/.bin/terser.cmd b/node_modules/.bin/terser.cmd deleted file mode 100644 index abf66a82..00000000 --- a/node_modules/.bin/terser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %* diff --git a/node_modules/.bin/terser.ps1 b/node_modules/.bin/terser.ps1 deleted file mode 100644 index 0bbfff61..00000000 --- a/node_modules/.bin/terser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args - } else { - & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../terser/bin/terser" $args - } else { - & "node$exe" "$basedir/../terser/bin/terser" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc deleted file mode 100644 index 49798517..00000000 --- a/node_modules/.bin/tsc +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" -else - exec node "$basedir/../typescript/bin/tsc" "$@" -fi diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 120000 index 00000000..0863208a --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/node_modules/.bin/tsc.cmd b/node_modules/.bin/tsc.cmd deleted file mode 100644 index 40bf1284..00000000 --- a/node_modules/.bin/tsc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %* diff --git a/node_modules/.bin/tsc.ps1 b/node_modules/.bin/tsc.ps1 deleted file mode 100644 index 112413b5..00000000 --- a/node_modules/.bin/tsc.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args - } else { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args - } else { - & "node$exe" "$basedir/../typescript/bin/tsc" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver deleted file mode 100644 index cc53aac9..00000000 --- a/node_modules/.bin/tsserver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" -else - exec node "$basedir/../typescript/bin/tsserver" "$@" -fi diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver new file mode 120000 index 00000000..f8f8f1a0 --- /dev/null +++ b/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/node_modules/.bin/tsserver.cmd b/node_modules/.bin/tsserver.cmd deleted file mode 100644 index 57f851fd..00000000 --- a/node_modules/.bin/tsserver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* diff --git a/node_modules/.bin/tsserver.ps1 b/node_modules/.bin/tsserver.ps1 deleted file mode 100644 index 249f417d..00000000 --- a/node_modules/.bin/tsserver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args - } else { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args - } else { - & "node$exe" "$basedir/../typescript/bin/tsserver" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/update-browserslist-db b/node_modules/.bin/update-browserslist-db deleted file mode 100644 index 8cde7e33..00000000 --- a/node_modules/.bin/update-browserslist-db +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@" -else - exec node "$basedir/../update-browserslist-db/cli.js" "$@" -fi diff --git a/node_modules/.bin/update-browserslist-db b/node_modules/.bin/update-browserslist-db new file mode 120000 index 00000000..b11e16f3 --- /dev/null +++ b/node_modules/.bin/update-browserslist-db @@ -0,0 +1 @@ +../update-browserslist-db/cli.js \ No newline at end of file diff --git a/node_modules/.bin/update-browserslist-db.cmd b/node_modules/.bin/update-browserslist-db.cmd deleted file mode 100644 index 2e14905f..00000000 --- a/node_modules/.bin/update-browserslist-db.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %* diff --git a/node_modules/.bin/update-browserslist-db.ps1 b/node_modules/.bin/update-browserslist-db.ps1 deleted file mode 100644 index 7abdf26d..00000000 --- a/node_modules/.bin/update-browserslist-db.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args - } else { - & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 100644 index c3ec0035..00000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist/bin/uuid" "$@" -fi diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 00000000..588f70ec --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd deleted file mode 100644 index 0f2376ea..00000000 --- a/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 78046284..00000000 --- a/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/webpack b/node_modules/.bin/webpack deleted file mode 100644 index e6748011..00000000 --- a/node_modules/.bin/webpack +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../webpack/bin/webpack.js" "$@" -else - exec node "$basedir/../webpack/bin/webpack.js" "$@" -fi diff --git a/node_modules/.bin/webpack b/node_modules/.bin/webpack new file mode 120000 index 00000000..d462c1d1 --- /dev/null +++ b/node_modules/.bin/webpack @@ -0,0 +1 @@ +../webpack/bin/webpack.js \ No newline at end of file diff --git a/node_modules/.bin/webpack-dev-server b/node_modules/.bin/webpack-dev-server deleted file mode 100644 index 36862cd0..00000000 --- a/node_modules/.bin/webpack-dev-server +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" "$@" -else - exec node "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" "$@" -fi diff --git a/node_modules/.bin/webpack-dev-server b/node_modules/.bin/webpack-dev-server new file mode 120000 index 00000000..242fe0a6 --- /dev/null +++ b/node_modules/.bin/webpack-dev-server @@ -0,0 +1 @@ +../webpack-dev-server/bin/webpack-dev-server.js \ No newline at end of file diff --git a/node_modules/.bin/webpack-dev-server.cmd b/node_modules/.bin/webpack-dev-server.cmd deleted file mode 100644 index ba9e4e6f..00000000 --- a/node_modules/.bin/webpack-dev-server.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\webpack-dev-server\bin\webpack-dev-server.js" %* diff --git a/node_modules/.bin/webpack-dev-server.ps1 b/node_modules/.bin/webpack-dev-server.ps1 deleted file mode 100644 index 9e472e6a..00000000 --- a/node_modules/.bin/webpack-dev-server.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" $args - } else { - & "$basedir/node$exe" "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" $args - } else { - & "node$exe" "$basedir/../webpack-dev-server/bin/webpack-dev-server.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/webpack.cmd b/node_modules/.bin/webpack.cmd deleted file mode 100644 index 5b1e07b9..00000000 --- a/node_modules/.bin/webpack.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\webpack\bin\webpack.js" %* diff --git a/node_modules/.bin/webpack.ps1 b/node_modules/.bin/webpack.ps1 deleted file mode 100644 index 57bb5253..00000000 --- a/node_modules/.bin/webpack.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../webpack/bin/webpack.js" $args - } else { - & "$basedir/node$exe" "$basedir/../webpack/bin/webpack.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../webpack/bin/webpack.js" $args - } else { - & "node$exe" "$basedir/../webpack/bin/webpack.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 3c74f692..59e5142d 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,7 +1,7 @@ { "name": "mon-projet-react", "version": "0.1.0", - "lockfileVersion": 3, + "lockfileVersion": 2, "requires": true, "packages": { "node_modules/@aashutoshrathi/word-wrap": { @@ -6076,6 +6076,7 @@ "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", + "fsevents": "~2.3.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -7552,7 +7553,8 @@ "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", - "esutils": "^2.0.2" + "esutils": "^2.0.2", + "source-map": "~0.6.1" }, "bin": { "escodegen": "bin/escodegen.js", @@ -8850,6 +8852,19 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -10182,7 +10197,8 @@ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dependencies": { - "@isaacs/cliui": "^8.0.2" + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" }, "engines": { "node": ">=14" @@ -10827,6 +10843,7 @@ "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^27.5.1", "jest-serializer": "^27.5.1", @@ -12274,6 +12291,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dependencies": { + "graceful-fs": "^4.1.6", "universalify": "^2.0.0" }, "optionalDependencies": { @@ -15125,6 +15143,7 @@ "eslint-webpack-plugin": "^3.1.1", "file-loader": "^6.2.0", "fs-extra": "^10.0.0", + "fsevents": "^2.3.2", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", "jest": "^27.4.3", @@ -15513,6 +15532,9 @@ "version": "2.79.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dependencies": { + "fsevents": "~2.3.2" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -16170,7 +16192,8 @@ "esprima": "^4.0.1", "estraverse": "^4.2.0", "esutils": "^2.0.2", - "optionator": "^0.8.1" + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "bin": { "escodegen": "bin/escodegen.js", diff --git a/node_modules/@babel/core/node_modules/.bin/semver b/node_modules/@babel/core/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/core/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/core/node_modules/.bin/semver b/node_modules/@babel/core/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/core/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/.bin/semver.cmd b/node_modules/@babel/core/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/core/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/core/node_modules/.bin/semver.ps1 b/node_modules/@babel/core/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/core/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/core/node_modules/semver/bin/semver.js b/node_modules/@babel/core/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/eslint-parser/node_modules/.bin/semver b/node_modules/@babel/eslint-parser/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/eslint-parser/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/eslint-parser/node_modules/.bin/semver b/node_modules/@babel/eslint-parser/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/eslint-parser/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/eslint-parser/node_modules/.bin/semver.cmd b/node_modules/@babel/eslint-parser/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/eslint-parser/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/eslint-parser/node_modules/.bin/semver.ps1 b/node_modules/@babel/eslint-parser/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/eslint-parser/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js b/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver b/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver b/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.cmd b/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.ps1 b/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/semver/bin/semver.js b/node_modules/@babel/helper-compilation-targets/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver b/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver b/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.cmd b/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.ps1 b/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/helper-create-class-features-plugin/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/helper-create-class-features-plugin/node_modules/semver/bin/semver.js b/node_modules/@babel/helper-create-class-features-plugin/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.cmd b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.ps1 b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver/bin/semver.js b/node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/parser/bin/babel-parser.js b/node_modules/@babel/parser/bin/babel-parser.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver b/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver b/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.cmd b/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.ps1 b/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/plugin-transform-runtime/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/plugin-transform-runtime/node_modules/semver/bin/semver.js b/node_modules/@babel/plugin-transform-runtime/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@babel/preset-env/node_modules/.bin/semver b/node_modules/@babel/preset-env/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/@babel/preset-env/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/@babel/preset-env/node_modules/.bin/semver b/node_modules/@babel/preset-env/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/@babel/preset-env/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@babel/preset-env/node_modules/.bin/semver.cmd b/node_modules/@babel/preset-env/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/@babel/preset-env/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/@babel/preset-env/node_modules/.bin/semver.ps1 b/node_modules/@babel/preset-env/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/@babel/preset-env/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@babel/preset-env/node_modules/semver/bin/semver.js b/node_modules/@babel/preset-env/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml deleted file mode 100644 index ed78a868..00000000 --- a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" -else - exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@" -fi diff --git a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml new file mode 120000 index 00000000..9dbd010d --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index 453312b6..00000000 --- a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* diff --git a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.ps1 b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.ps1 deleted file mode 100644 index 2acfc61c..00000000 --- a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } else { - & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } else { - & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js old mode 100644 new mode 100755 diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js old mode 100644 new mode 100755 diff --git a/node_modules/@jest/console/node_modules/color-name/LICENSE b/node_modules/@jest/console/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@jest/console/node_modules/color-name/LICENSE +++ b/node_modules/@jest/console/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jest/console/node_modules/color-name/README.md b/node_modules/@jest/console/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@jest/console/node_modules/color-name/README.md +++ b/node_modules/@jest/console/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@jest/console/node_modules/color-name/index.js b/node_modules/@jest/console/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@jest/console/node_modules/color-name/index.js +++ b/node_modules/@jest/console/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@jest/console/node_modules/color-name/package.json b/node_modules/@jest/console/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@jest/console/node_modules/color-name/package.json +++ b/node_modules/@jest/console/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@jest/core/node_modules/color-name/LICENSE b/node_modules/@jest/core/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@jest/core/node_modules/color-name/LICENSE +++ b/node_modules/@jest/core/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jest/core/node_modules/color-name/README.md b/node_modules/@jest/core/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@jest/core/node_modules/color-name/README.md +++ b/node_modules/@jest/core/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@jest/core/node_modules/color-name/index.js b/node_modules/@jest/core/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@jest/core/node_modules/color-name/index.js +++ b/node_modules/@jest/core/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@jest/core/node_modules/color-name/package.json b/node_modules/@jest/core/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@jest/core/node_modules/color-name/package.json +++ b/node_modules/@jest/core/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@jest/reporters/node_modules/color-name/LICENSE b/node_modules/@jest/reporters/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@jest/reporters/node_modules/color-name/LICENSE +++ b/node_modules/@jest/reporters/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jest/reporters/node_modules/color-name/README.md b/node_modules/@jest/reporters/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@jest/reporters/node_modules/color-name/README.md +++ b/node_modules/@jest/reporters/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@jest/reporters/node_modules/color-name/index.js b/node_modules/@jest/reporters/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@jest/reporters/node_modules/color-name/index.js +++ b/node_modules/@jest/reporters/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@jest/reporters/node_modules/color-name/package.json b/node_modules/@jest/reporters/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@jest/reporters/node_modules/color-name/package.json +++ b/node_modules/@jest/reporters/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@jest/transform/node_modules/color-name/LICENSE b/node_modules/@jest/transform/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@jest/transform/node_modules/color-name/LICENSE +++ b/node_modules/@jest/transform/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jest/transform/node_modules/color-name/README.md b/node_modules/@jest/transform/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@jest/transform/node_modules/color-name/README.md +++ b/node_modules/@jest/transform/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@jest/transform/node_modules/color-name/index.js b/node_modules/@jest/transform/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@jest/transform/node_modules/color-name/index.js +++ b/node_modules/@jest/transform/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@jest/transform/node_modules/color-name/package.json b/node_modules/@jest/transform/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@jest/transform/node_modules/color-name/package.json +++ b/node_modules/@jest/transform/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@jest/types/node_modules/color-name/LICENSE b/node_modules/@jest/types/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@jest/types/node_modules/color-name/LICENSE +++ b/node_modules/@jest/types/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jest/types/node_modules/color-name/README.md b/node_modules/@jest/types/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@jest/types/node_modules/color-name/README.md +++ b/node_modules/@jest/types/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@jest/types/node_modules/color-name/index.js b/node_modules/@jest/types/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@jest/types/node_modules/color-name/index.js +++ b/node_modules/@jest/types/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@jest/types/node_modules/color-name/package.json b/node_modules/@jest/types/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@jest/types/node_modules/color-name/package.json +++ b/node_modules/@jest/types/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md b/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/plugin-node-resolve/README.md b/node_modules/@rollup/plugin-node-resolve/README.md old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/plugin-node-resolve/types/index.d.ts b/node_modules/@rollup/plugin-node-resolve/types/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/plugin-replace/CHANGELOG.md b/node_modules/@rollup/plugin-replace/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/plugin-replace/src/index.js b/node_modules/@rollup/plugin-replace/src/index.js old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/plugin-replace/types/index.d.ts b/node_modules/@rollup/plugin-replace/types/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/pluginutils/CHANGELOG.md b/node_modules/@rollup/pluginutils/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/pluginutils/README.md b/node_modules/@rollup/pluginutils/README.md old mode 100644 new mode 100755 diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE b/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE index 21071075..4b1ad51b 100644 --- a/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE +++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE @@ -1,21 +1,21 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md b/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md index 2a22bde8..3ec0d396 100644 --- a/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md +++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for ESTree AST specification (https://github.com/estree/estree). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree - -Additional Details - * Last updated: Tue, 17 Apr 2018 20:22:09 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by RReverser . +# Installation +> `npm install --save @types/estree` + +# Summary +This package contains type definitions for ESTree AST specification (https://github.com/estree/estree). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree + +Additional Details + * Last updated: Tue, 17 Apr 2018 20:22:09 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by RReverser . diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts b/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts index 0133991c..9109295d 100644 --- a/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts +++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts @@ -1,548 +1,548 @@ -// Type definitions for ESTree AST specification -// Project: https://github.com/estree/estree -// Definitions by: RReverser -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// This definition file follows a somewhat unusual format. ESTree allows -// runtime type checks based on the `type` parameter. In order to explain this -// to typescript we want to use discriminated union types: -// https://github.com/Microsoft/TypeScript/pull/9163 -// -// For ESTree this is a bit tricky because the high level interfaces like -// Node or Function are pulling double duty. We want to pass common fields down -// to the interfaces that extend them (like Identifier or -// ArrowFunctionExpression), but you can't extend a type union or enforce -// common fields on them. So we've split the high level interfaces into two -// types, a base type which passes down inhereted fields, and a type union of -// all types which extend the base type. Only the type union is exported, and -// the union is how other types refer to the collection of inheriting types. -// -// This makes the definitions file here somewhat more difficult to maintain, -// but it has the notable advantage of making ESTree much easier to use as -// an end user. - -interface BaseNodeWithoutComments { - // Every leaf interface that extends BaseNode must specify a type property. - // The type property should be a string literal. For example, Identifier - // has: `type: "Identifier"` - type: string; - loc?: SourceLocation | null; - range?: [number, number]; -} - -interface BaseNode extends BaseNodeWithoutComments { - leadingComments?: Array; - trailingComments?: Array; -} - -export type Node = - Identifier | Literal | Program | Function | SwitchCase | CatchClause | - VariableDeclarator | Statement | Expression | Property | - AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern | - ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier; - -export interface Comment extends BaseNodeWithoutComments { - type: "Line" | "Block"; - value: string; -} - -interface SourceLocation { - source?: string | null; - start: Position; - end: Position; -} - -export interface Position { - /** >= 1 */ - line: number; - /** >= 0 */ - column: number; -} - -export interface Program extends BaseNode { - type: "Program"; - sourceType: "script" | "module"; - body: Array; - comments?: Array; -} - -interface BaseFunction extends BaseNode { - params: Array; - generator?: boolean; - async?: boolean; - // The body is either BlockStatement or Expression because arrow functions - // can have a body that's either. FunctionDeclarations and - // FunctionExpressions have only BlockStatement bodies. - body: BlockStatement | Expression; -} - -export type Function = - FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; - -export type Statement = - ExpressionStatement | BlockStatement | EmptyStatement | - DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | - BreakStatement | ContinueStatement | IfStatement | SwitchStatement | - ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | - ForStatement | ForInStatement | ForOfStatement | Declaration; - -interface BaseStatement extends BaseNode { } - -export interface EmptyStatement extends BaseStatement { - type: "EmptyStatement"; -} - -export interface BlockStatement extends BaseStatement { - type: "BlockStatement"; - body: Array; - innerComments?: Array; -} - -export interface ExpressionStatement extends BaseStatement { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface IfStatement extends BaseStatement { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate?: Statement | null; -} - -export interface LabeledStatement extends BaseStatement { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface BreakStatement extends BaseStatement { - type: "BreakStatement"; - label?: Identifier | null; -} - -export interface ContinueStatement extends BaseStatement { - type: "ContinueStatement"; - label?: Identifier | null; -} - -export interface WithStatement extends BaseStatement { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface SwitchStatement extends BaseStatement { - type: "SwitchStatement"; - discriminant: Expression; - cases: Array; -} - -export interface ReturnStatement extends BaseStatement { - type: "ReturnStatement"; - argument?: Expression | null; -} - -export interface ThrowStatement extends BaseStatement { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseStatement { - type: "TryStatement"; - block: BlockStatement; - handler?: CatchClause | null; - finalizer?: BlockStatement | null; -} - -export interface WhileStatement extends BaseStatement { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface DoWhileStatement extends BaseStatement { - type: "DoWhileStatement"; - body: Statement; - test: Expression; -} - -export interface ForStatement extends BaseStatement { - type: "ForStatement"; - init?: VariableDeclaration | Expression | null; - test?: Expression | null; - update?: Expression | null; - body: Statement; -} - -interface BaseForXStatement extends BaseStatement { - left: VariableDeclaration | Pattern; - right: Expression; - body: Statement; -} - -export interface ForInStatement extends BaseForXStatement { - type: "ForInStatement"; -} - -export interface DebuggerStatement extends BaseStatement { - type: "DebuggerStatement"; -} - -export type Declaration = - FunctionDeclaration | VariableDeclaration | ClassDeclaration; - -interface BaseDeclaration extends BaseStatement { } - -export interface FunctionDeclaration extends BaseFunction, BaseDeclaration { - type: "FunctionDeclaration"; - /** It is null when a function declaration is a part of the `export default function` statement */ - id: Identifier | null; - body: BlockStatement; -} - -export interface VariableDeclaration extends BaseDeclaration { - type: "VariableDeclaration"; - declarations: Array; - kind: "var" | "let" | "const"; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: Pattern; - init?: Expression | null; -} - -type Expression = - ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | - ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression | - UpdateExpression | BinaryExpression | AssignmentExpression | - LogicalExpression | MemberExpression | ConditionalExpression | - CallExpression | NewExpression | SequenceExpression | TemplateLiteral | - TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier | - AwaitExpression; - -export interface BaseExpression extends BaseNode { } - -export interface ThisExpression extends BaseExpression { - type: "ThisExpression"; -} - -export interface ArrayExpression extends BaseExpression { - type: "ArrayExpression"; - elements: Array; -} - -export interface ObjectExpression extends BaseExpression { - type: "ObjectExpression"; - properties: Array; -} - -export interface Property extends BaseNode { - type: "Property"; - key: Expression; - value: Expression | Pattern; // Could be an AssignmentProperty - kind: "init" | "get" | "set"; - method: boolean; - shorthand: boolean; - computed: boolean; -} - -export interface FunctionExpression extends BaseFunction, BaseExpression { - id?: Identifier | null; - type: "FunctionExpression"; - body: BlockStatement; -} - -export interface SequenceExpression extends BaseExpression { - type: "SequenceExpression"; - expressions: Array; -} - -export interface UnaryExpression extends BaseExpression { - type: "UnaryExpression"; - operator: UnaryOperator; - prefix: true; - argument: Expression; -} - -export interface BinaryExpression extends BaseExpression { - type: "BinaryExpression"; - operator: BinaryOperator; - left: Expression; - right: Expression; -} - -export interface AssignmentExpression extends BaseExpression { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: Pattern | MemberExpression; - right: Expression; -} - -export interface UpdateExpression extends BaseExpression { - type: "UpdateExpression"; - operator: UpdateOperator; - argument: Expression; - prefix: boolean; -} - -export interface LogicalExpression extends BaseExpression { - type: "LogicalExpression"; - operator: LogicalOperator; - left: Expression; - right: Expression; -} - -export interface ConditionalExpression extends BaseExpression { - type: "ConditionalExpression"; - test: Expression; - alternate: Expression; - consequent: Expression; -} - -interface BaseCallExpression extends BaseExpression { - callee: Expression | Super; - arguments: Array; -} -export type CallExpression = SimpleCallExpression | NewExpression; - -export interface SimpleCallExpression extends BaseCallExpression { - type: "CallExpression"; -} - -export interface NewExpression extends BaseCallExpression { - type: "NewExpression"; -} - -export interface MemberExpression extends BaseExpression, BasePattern { - type: "MemberExpression"; - object: Expression | Super; - property: Expression; - computed: boolean; -} - -export type Pattern = - Identifier | ObjectPattern | ArrayPattern | RestElement | - AssignmentPattern | MemberExpression; - -interface BasePattern extends BaseNode { } - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test?: Expression | null; - consequent: Array; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Pattern; - body: BlockStatement; -} - -export interface Identifier extends BaseNode, BaseExpression, BasePattern { - type: "Identifier"; - name: string; -} - -export type Literal = SimpleLiteral | RegExpLiteral; - -export interface SimpleLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value: string | boolean | number | null; - raw?: string; -} - -export interface RegExpLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: RegExp | null; - regex: { - pattern: string; - flags: string; - }; - raw?: string; -} - -export type UnaryOperator = - "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - -export type BinaryOperator = - "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | - ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | - "instanceof"; - -export type LogicalOperator = "||" | "&&"; - -export type AssignmentOperator = - "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | - "|=" | "^=" | "&="; - -export type UpdateOperator = "++" | "--"; - -export interface ForOfStatement extends BaseForXStatement { - type: "ForOfStatement"; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { - type: "ArrowFunctionExpression"; - expression: boolean; - body: BlockStatement | Expression; -} - -export interface YieldExpression extends BaseExpression { - type: "YieldExpression"; - argument?: Expression | null; - delegate: boolean; -} - -export interface TemplateLiteral extends BaseExpression { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -export interface TaggedTemplateExpression extends BaseExpression { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - tail: boolean; - value: { - cooked: string; - raw: string; - }; -} - -export interface AssignmentProperty extends Property { - value: Pattern; - kind: "init"; - method: boolean; // false -} - -export interface ObjectPattern extends BasePattern { - type: "ObjectPattern"; - properties: Array; -} - -export interface ArrayPattern extends BasePattern { - type: "ArrayPattern"; - elements: Array; -} - -export interface RestElement extends BasePattern { - type: "RestElement"; - argument: Pattern; -} - -export interface AssignmentPattern extends BasePattern { - type: "AssignmentPattern"; - left: Pattern; - right: Expression; -} - -export type Class = ClassDeclaration | ClassExpression; -interface BaseClass extends BaseNode { - superClass?: Expression | null; - body: ClassBody; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface MethodDefinition extends BaseNode { - type: "MethodDefinition"; - key: Expression; - value: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; -} - -export interface ClassDeclaration extends BaseClass, BaseDeclaration { - type: "ClassDeclaration"; - /** It is null when a class declaration is a part of the `export default class` statement */ - id: Identifier | null; -} - -export interface ClassExpression extends BaseClass, BaseExpression { - type: "ClassExpression"; - id?: Identifier | null; -} - -export interface MetaProperty extends BaseExpression { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export type ModuleDeclaration = - ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | - ExportAllDeclaration; -interface BaseModuleDeclaration extends BaseNode { } - -export type ModuleSpecifier = - ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | - ExportSpecifier; -interface BaseModuleSpecifier extends BaseNode { - local: Identifier; -} - -export interface ImportDeclaration extends BaseModuleDeclaration { - type: "ImportDeclaration"; - specifiers: Array; - source: Literal; -} - -export interface ImportSpecifier extends BaseModuleSpecifier { - type: "ImportSpecifier"; - imported: Identifier; -} - -export interface ImportDefaultSpecifier extends BaseModuleSpecifier { - type: "ImportDefaultSpecifier"; -} - -export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { - type: "ImportNamespaceSpecifier"; -} - -export interface ExportNamedDeclaration extends BaseModuleDeclaration { - type: "ExportNamedDeclaration"; - declaration?: Declaration | null; - specifiers: Array; - source?: Literal | null; -} - -export interface ExportSpecifier extends BaseModuleSpecifier { - type: "ExportSpecifier"; - exported: Identifier; -} - -export interface ExportDefaultDeclaration extends BaseModuleDeclaration { - type: "ExportDefaultDeclaration"; - declaration: Declaration | Expression; -} - -export interface ExportAllDeclaration extends BaseModuleDeclaration { - type: "ExportAllDeclaration"; - source: Literal; -} - -export interface AwaitExpression extends BaseExpression { - type: "AwaitExpression"; - argument: Expression; -} +// Type definitions for ESTree AST specification +// Project: https://github.com/estree/estree +// Definitions by: RReverser +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// This definition file follows a somewhat unusual format. ESTree allows +// runtime type checks based on the `type` parameter. In order to explain this +// to typescript we want to use discriminated union types: +// https://github.com/Microsoft/TypeScript/pull/9163 +// +// For ESTree this is a bit tricky because the high level interfaces like +// Node or Function are pulling double duty. We want to pass common fields down +// to the interfaces that extend them (like Identifier or +// ArrowFunctionExpression), but you can't extend a type union or enforce +// common fields on them. So we've split the high level interfaces into two +// types, a base type which passes down inhereted fields, and a type union of +// all types which extend the base type. Only the type union is exported, and +// the union is how other types refer to the collection of inheriting types. +// +// This makes the definitions file here somewhat more difficult to maintain, +// but it has the notable advantage of making ESTree much easier to use as +// an end user. + +interface BaseNodeWithoutComments { + // Every leaf interface that extends BaseNode must specify a type property. + // The type property should be a string literal. For example, Identifier + // has: `type: "Identifier"` + type: string; + loc?: SourceLocation | null; + range?: [number, number]; +} + +interface BaseNode extends BaseNodeWithoutComments { + leadingComments?: Array; + trailingComments?: Array; +} + +export type Node = + Identifier | Literal | Program | Function | SwitchCase | CatchClause | + VariableDeclarator | Statement | Expression | Property | + AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern | + ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier; + +export interface Comment extends BaseNodeWithoutComments { + type: "Line" | "Block"; + value: string; +} + +interface SourceLocation { + source?: string | null; + start: Position; + end: Position; +} + +export interface Position { + /** >= 1 */ + line: number; + /** >= 0 */ + column: number; +} + +export interface Program extends BaseNode { + type: "Program"; + sourceType: "script" | "module"; + body: Array; + comments?: Array; +} + +interface BaseFunction extends BaseNode { + params: Array; + generator?: boolean; + async?: boolean; + // The body is either BlockStatement or Expression because arrow functions + // can have a body that's either. FunctionDeclarations and + // FunctionExpressions have only BlockStatement bodies. + body: BlockStatement | Expression; +} + +export type Function = + FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; + +export type Statement = + ExpressionStatement | BlockStatement | EmptyStatement | + DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | + BreakStatement | ContinueStatement | IfStatement | SwitchStatement | + ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | + ForStatement | ForInStatement | ForOfStatement | Declaration; + +interface BaseStatement extends BaseNode { } + +export interface EmptyStatement extends BaseStatement { + type: "EmptyStatement"; +} + +export interface BlockStatement extends BaseStatement { + type: "BlockStatement"; + body: Array; + innerComments?: Array; +} + +export interface ExpressionStatement extends BaseStatement { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface IfStatement extends BaseStatement { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement | null; +} + +export interface LabeledStatement extends BaseStatement { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface BreakStatement extends BaseStatement { + type: "BreakStatement"; + label?: Identifier | null; +} + +export interface ContinueStatement extends BaseStatement { + type: "ContinueStatement"; + label?: Identifier | null; +} + +export interface WithStatement extends BaseStatement { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface SwitchStatement extends BaseStatement { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array; +} + +export interface ReturnStatement extends BaseStatement { + type: "ReturnStatement"; + argument?: Expression | null; +} + +export interface ThrowStatement extends BaseStatement { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseStatement { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause | null; + finalizer?: BlockStatement | null; +} + +export interface WhileStatement extends BaseStatement { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface DoWhileStatement extends BaseStatement { + type: "DoWhileStatement"; + body: Statement; + test: Expression; +} + +export interface ForStatement extends BaseStatement { + type: "ForStatement"; + init?: VariableDeclaration | Expression | null; + test?: Expression | null; + update?: Expression | null; + body: Statement; +} + +interface BaseForXStatement extends BaseStatement { + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} + +export interface ForInStatement extends BaseForXStatement { + type: "ForInStatement"; +} + +export interface DebuggerStatement extends BaseStatement { + type: "DebuggerStatement"; +} + +export type Declaration = + FunctionDeclaration | VariableDeclaration | ClassDeclaration; + +interface BaseDeclaration extends BaseStatement { } + +export interface FunctionDeclaration extends BaseFunction, BaseDeclaration { + type: "FunctionDeclaration"; + /** It is null when a function declaration is a part of the `export default function` statement */ + id: Identifier | null; + body: BlockStatement; +} + +export interface VariableDeclaration extends BaseDeclaration { + type: "VariableDeclaration"; + declarations: Array; + kind: "var" | "let" | "const"; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: Pattern; + init?: Expression | null; +} + +type Expression = + ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | + ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression | + UpdateExpression | BinaryExpression | AssignmentExpression | + LogicalExpression | MemberExpression | ConditionalExpression | + CallExpression | NewExpression | SequenceExpression | TemplateLiteral | + TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier | + AwaitExpression; + +export interface BaseExpression extends BaseNode { } + +export interface ThisExpression extends BaseExpression { + type: "ThisExpression"; +} + +export interface ArrayExpression extends BaseExpression { + type: "ArrayExpression"; + elements: Array; +} + +export interface ObjectExpression extends BaseExpression { + type: "ObjectExpression"; + properties: Array; +} + +export interface Property extends BaseNode { + type: "Property"; + key: Expression; + value: Expression | Pattern; // Could be an AssignmentProperty + kind: "init" | "get" | "set"; + method: boolean; + shorthand: boolean; + computed: boolean; +} + +export interface FunctionExpression extends BaseFunction, BaseExpression { + id?: Identifier | null; + type: "FunctionExpression"; + body: BlockStatement; +} + +export interface SequenceExpression extends BaseExpression { + type: "SequenceExpression"; + expressions: Array; +} + +export interface UnaryExpression extends BaseExpression { + type: "UnaryExpression"; + operator: UnaryOperator; + prefix: true; + argument: Expression; +} + +export interface BinaryExpression extends BaseExpression { + type: "BinaryExpression"; + operator: BinaryOperator; + left: Expression; + right: Expression; +} + +export interface AssignmentExpression extends BaseExpression { + type: "AssignmentExpression"; + operator: AssignmentOperator; + left: Pattern | MemberExpression; + right: Expression; +} + +export interface UpdateExpression extends BaseExpression { + type: "UpdateExpression"; + operator: UpdateOperator; + argument: Expression; + prefix: boolean; +} + +export interface LogicalExpression extends BaseExpression { + type: "LogicalExpression"; + operator: LogicalOperator; + left: Expression; + right: Expression; +} + +export interface ConditionalExpression extends BaseExpression { + type: "ConditionalExpression"; + test: Expression; + alternate: Expression; + consequent: Expression; +} + +interface BaseCallExpression extends BaseExpression { + callee: Expression | Super; + arguments: Array; +} +export type CallExpression = SimpleCallExpression | NewExpression; + +export interface SimpleCallExpression extends BaseCallExpression { + type: "CallExpression"; +} + +export interface NewExpression extends BaseCallExpression { + type: "NewExpression"; +} + +export interface MemberExpression extends BaseExpression, BasePattern { + type: "MemberExpression"; + object: Expression | Super; + property: Expression; + computed: boolean; +} + +export type Pattern = + Identifier | ObjectPattern | ArrayPattern | RestElement | + AssignmentPattern | MemberExpression; + +interface BasePattern extends BaseNode { } + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test?: Expression | null; + consequent: Array; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Pattern; + body: BlockStatement; +} + +export interface Identifier extends BaseNode, BaseExpression, BasePattern { + type: "Identifier"; + name: string; +} + +export type Literal = SimpleLiteral | RegExpLiteral; + +export interface SimpleLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value: string | boolean | number | null; + raw?: string; +} + +export interface RegExpLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: RegExp | null; + regex: { + pattern: string; + flags: string; + }; + raw?: string; +} + +export type UnaryOperator = + "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + +export type BinaryOperator = + "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | + ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | + "instanceof"; + +export type LogicalOperator = "||" | "&&"; + +export type AssignmentOperator = + "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | + "|=" | "^=" | "&="; + +export type UpdateOperator = "++" | "--"; + +export interface ForOfStatement extends BaseForXStatement { + type: "ForOfStatement"; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { + type: "ArrowFunctionExpression"; + expression: boolean; + body: BlockStatement | Expression; +} + +export interface YieldExpression extends BaseExpression { + type: "YieldExpression"; + argument?: Expression | null; + delegate: boolean; +} + +export interface TemplateLiteral extends BaseExpression { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +export interface TaggedTemplateExpression extends BaseExpression { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + tail: boolean; + value: { + cooked: string; + raw: string; + }; +} + +export interface AssignmentProperty extends Property { + value: Pattern; + kind: "init"; + method: boolean; // false +} + +export interface ObjectPattern extends BasePattern { + type: "ObjectPattern"; + properties: Array; +} + +export interface ArrayPattern extends BasePattern { + type: "ArrayPattern"; + elements: Array; +} + +export interface RestElement extends BasePattern { + type: "RestElement"; + argument: Pattern; +} + +export interface AssignmentPattern extends BasePattern { + type: "AssignmentPattern"; + left: Pattern; + right: Expression; +} + +export type Class = ClassDeclaration | ClassExpression; +interface BaseClass extends BaseNode { + superClass?: Expression | null; + body: ClassBody; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface MethodDefinition extends BaseNode { + type: "MethodDefinition"; + key: Expression; + value: FunctionExpression; + kind: "constructor" | "method" | "get" | "set"; + computed: boolean; + static: boolean; +} + +export interface ClassDeclaration extends BaseClass, BaseDeclaration { + type: "ClassDeclaration"; + /** It is null when a class declaration is a part of the `export default class` statement */ + id: Identifier | null; +} + +export interface ClassExpression extends BaseClass, BaseExpression { + type: "ClassExpression"; + id?: Identifier | null; +} + +export interface MetaProperty extends BaseExpression { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export type ModuleDeclaration = + ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | + ExportAllDeclaration; +interface BaseModuleDeclaration extends BaseNode { } + +export type ModuleSpecifier = + ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | + ExportSpecifier; +interface BaseModuleSpecifier extends BaseNode { + local: Identifier; +} + +export interface ImportDeclaration extends BaseModuleDeclaration { + type: "ImportDeclaration"; + specifiers: Array; + source: Literal; +} + +export interface ImportSpecifier extends BaseModuleSpecifier { + type: "ImportSpecifier"; + imported: Identifier; +} + +export interface ImportDefaultSpecifier extends BaseModuleSpecifier { + type: "ImportDefaultSpecifier"; +} + +export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { + type: "ImportNamespaceSpecifier"; +} + +export interface ExportNamedDeclaration extends BaseModuleDeclaration { + type: "ExportNamedDeclaration"; + declaration?: Declaration | null; + specifiers: Array; + source?: Literal | null; +} + +export interface ExportSpecifier extends BaseModuleSpecifier { + type: "ExportSpecifier"; + exported: Identifier; +} + +export interface ExportDefaultDeclaration extends BaseModuleDeclaration { + type: "ExportDefaultDeclaration"; + declaration: Declaration | Expression; +} + +export interface ExportAllDeclaration extends BaseModuleDeclaration { + type: "ExportAllDeclaration"; + source: Literal; +} + +export interface AwaitExpression extends BaseExpression { + type: "AwaitExpression"; + argument: Expression; +} diff --git a/node_modules/@rollup/pluginutils/types/index.d.ts b/node_modules/@rollup/pluginutils/types/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@sinclair/typebox/compiler/compiler.d.ts b/node_modules/@sinclair/typebox/compiler/compiler.d.ts index bcdb587f..c948acd6 100644 --- a/node_modules/@sinclair/typebox/compiler/compiler.d.ts +++ b/node_modules/@sinclair/typebox/compiler/compiler.d.ts @@ -1,28 +1,28 @@ -import { ValueError } from '../errors/index'; -import * as Types from '../typebox'; -export declare type CheckFunction = (value: unknown) => boolean; -export declare class TypeCheck { - private readonly schema; - private readonly references; - private readonly checkFunc; - private readonly code; - constructor(schema: T, references: Types.TSchema[], checkFunc: CheckFunction, code: string); - /** Returns the generated validation code used to validate this type. */ - Code(): string; - /** Returns an iterator for each error in this value. */ - Errors(value: unknown): IterableIterator; - /** Returns true if the value matches the given type. */ - Check(value: unknown): value is Types.Static; -} -export declare namespace Property { - function Check(propertyName: string): boolean; -} -export declare class TypeCompilerUnknownTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -/** Compiles Types for Runtime Type Checking */ -export declare namespace TypeCompiler { - /** Compiles the given type for runtime type checking. This compiler only accepts known TypeBox types non-inclusive of unsafe types. */ - function Compile(schema: T, references?: Types.TSchema[]): TypeCheck; -} +import { ValueError } from '../errors/index'; +import * as Types from '../typebox'; +export declare type CheckFunction = (value: unknown) => boolean; +export declare class TypeCheck { + private readonly schema; + private readonly references; + private readonly checkFunc; + private readonly code; + constructor(schema: T, references: Types.TSchema[], checkFunc: CheckFunction, code: string); + /** Returns the generated validation code used to validate this type. */ + Code(): string; + /** Returns an iterator for each error in this value. */ + Errors(value: unknown): IterableIterator; + /** Returns true if the value matches the given type. */ + Check(value: unknown): value is Types.Static; +} +export declare namespace Property { + function Check(propertyName: string): boolean; +} +export declare class TypeCompilerUnknownTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +/** Compiles Types for Runtime Type Checking */ +export declare namespace TypeCompiler { + /** Compiles the given type for runtime type checking. This compiler only accepts known TypeBox types non-inclusive of unsafe types. */ + function Compile(schema: T, references?: Types.TSchema[]): TypeCheck; +} diff --git a/node_modules/@sinclair/typebox/compiler/compiler.js b/node_modules/@sinclair/typebox/compiler/compiler.js index 1f9496df..4d37607b 100644 --- a/node_modules/@sinclair/typebox/compiler/compiler.js +++ b/node_modules/@sinclair/typebox/compiler/compiler.js @@ -1,409 +1,409 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/compiler - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TypeCompiler = exports.TypeCompilerUnknownTypeError = exports.Property = exports.TypeCheck = void 0; -const index_1 = require("../errors/index"); -const index_2 = require("../guard/index"); -const index_3 = require("../format/index"); -const Types = require("../typebox"); -// ------------------------------------------------------------------- -// TypeCheck -// ------------------------------------------------------------------- -class TypeCheck { - constructor(schema, references, checkFunc, code) { - this.schema = schema; - this.references = references; - this.checkFunc = checkFunc; - this.code = code; - } - /** Returns the generated validation code used to validate this type. */ - Code() { - return this.code; - } - /** Returns an iterator for each error in this value. */ - Errors(value) { - return index_1.ValueErrors.Errors(this.schema, this.references, value); - } - /** Returns true if the value matches the given type. */ - Check(value) { - return this.checkFunc(value); - } -} -exports.TypeCheck = TypeCheck; -// ------------------------------------------------------------------- -// Property -// ------------------------------------------------------------------- -var Property; -(function (Property) { - function DollarSign(code) { - return code === 36; - } - function Underscore(code) { - return code === 95; - } - function Numeric(code) { - return code >= 48 && code <= 57; - } - function Alpha(code) { - return (code >= 65 && code <= 90) || (code >= 97 && code <= 122); - } - function Check(propertyName) { - if (propertyName.length === 0) - return false; - { - const code = propertyName.charCodeAt(0); - if (!(DollarSign(code) || Underscore(code) || Alpha(code))) { - return false; - } - } - for (let i = 1; i < propertyName.length; i++) { - const code = propertyName.charCodeAt(i); - if (!(DollarSign(code) || Underscore(code) || Alpha(code) || Numeric(code))) { - return false; - } - } - return true; - } - Property.Check = Check; -})(Property = exports.Property || (exports.Property = {})); -// ------------------------------------------------------------------- -// TypeCompiler -// ------------------------------------------------------------------- -class TypeCompilerUnknownTypeError extends Error { - constructor(schema) { - super('TypeCompiler: Unknown type'); - this.schema = schema; - } -} -exports.TypeCompilerUnknownTypeError = TypeCompilerUnknownTypeError; -/** Compiles Types for Runtime Type Checking */ -var TypeCompiler; -(function (TypeCompiler) { - // ------------------------------------------------------------------- - // Types - // ------------------------------------------------------------------- - function* Any(schema, value) { - yield '(true)'; - } - function* Array(schema, value) { - const expression = CreateExpression(schema.items, 'value'); - if (schema.minItems !== undefined) - yield `(${value}.length >= ${schema.minItems})`; - if (schema.maxItems !== undefined) - yield `(${value}.length <= ${schema.maxItems})`; - if (schema.uniqueItems !== undefined) - yield `(new Set(${value}).size === ${value}.length)`; - yield `(Array.isArray(${value}) && ${value}.every(value => ${expression}))`; - } - function* Boolean(schema, value) { - yield `(typeof ${value} === 'boolean')`; - } - function* Constructor(schema, value) { - yield* Visit(schema.returns, `${value}.prototype`); - } - function* Function(schema, value) { - yield `(typeof ${value} === 'function')`; - } - function* Integer(schema, value) { - yield `(typeof ${value} === 'number' && Number.isInteger(${value}))`; - if (schema.multipleOf !== undefined) - yield `(${value} % ${schema.multipleOf} === 0)`; - if (schema.exclusiveMinimum !== undefined) - yield `(${value} > ${schema.exclusiveMinimum})`; - if (schema.exclusiveMaximum !== undefined) - yield `(${value} < ${schema.exclusiveMaximum})`; - if (schema.minimum !== undefined) - yield `(${value} >= ${schema.minimum})`; - if (schema.maximum !== undefined) - yield `(${value} <= ${schema.maximum})`; - } - function* Literal(schema, value) { - if (typeof schema.const === 'number' || typeof schema.const === 'boolean') { - yield `(${value} === ${schema.const})`; - } - else { - yield `(${value} === '${schema.const}')`; - } - } - function* Never(schema, value) { - yield `(false)`; - } - function* Null(schema, value) { - yield `(${value} === null)`; - } - function* Number(schema, value) { - yield `(typeof ${value} === 'number')`; - if (schema.multipleOf !== undefined) - yield `(${value} % ${schema.multipleOf} === 0)`; - if (schema.exclusiveMinimum !== undefined) - yield `(${value} > ${schema.exclusiveMinimum})`; - if (schema.exclusiveMaximum !== undefined) - yield `(${value} < ${schema.exclusiveMaximum})`; - if (schema.minimum !== undefined) - yield `(${value} >= ${schema.minimum})`; - if (schema.maximum !== undefined) - yield `(${value} <= ${schema.maximum})`; - } - function* Object(schema, value) { - yield `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))`; - if (schema.minProperties !== undefined) - yield `(Object.keys(${value}).length >= ${schema.minProperties})`; - if (schema.maxProperties !== undefined) - yield `(Object.keys(${value}).length <= ${schema.maxProperties})`; - const propertyKeys = globalThis.Object.keys(schema.properties); - if (schema.additionalProperties === false) { - // Optimization: If the property key length matches the required keys length - // then we only need check that the values property key length matches that - // of the property key length. This is because exhaustive testing for values - // will occur in subsequent property tests. - if (schema.required && schema.required.length === propertyKeys.length) { - yield `(Object.keys(${value}).length === ${propertyKeys.length})`; - } - else { - const keys = `[${propertyKeys.map((key) => `'${key}'`).join(', ')}]`; - yield `(Object.keys(${value}).every(key => ${keys}.includes(key)))`; - } - } - if (index_2.TypeGuard.TSchema(schema.additionalProperties)) { - const expression = CreateExpression(schema.additionalProperties, 'value[key]'); - const keys = `[${propertyKeys.map((key) => `'${key}'`).join(', ')}]`; - yield `(Object.keys(${value}).every(key => ${keys}.includes(key) || ${expression}))`; - } - for (const propertyKey of propertyKeys) { - const memberExpression = Property.Check(propertyKey) ? `${value}.${propertyKey}` : `${value}['${propertyKey}']`; - const propertySchema = schema.properties[propertyKey]; - if (schema.required && schema.required.includes(propertyKey)) { - yield* Visit(propertySchema, memberExpression); - } - else { - const expression = CreateExpression(propertySchema, memberExpression); - yield `(${memberExpression} === undefined ? true : (${expression}))`; - } - } - } - function* Promise(schema, value) { - yield `(typeof value === 'object' && typeof ${value}.then === 'function')`; - } - function* Record(schema, value) { - yield `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))`; - const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; - const local = PushLocal(`new RegExp(/${keyPattern}/)`); - yield `(Object.keys(${value}).every(key => ${local}.test(key)))`; - const expression = CreateExpression(valueSchema, 'value'); - yield `(Object.values(${value}).every(value => ${expression}))`; - } - function* Ref(schema, value) { - // Reference: If we have seen this reference before we can just yield and return - // the function call. If this isn't the case we defer to visit to generate and - // set the function for subsequent passes. Consider for refactor. - if (names.has(schema.$ref)) - return yield `(${CreateFunctionName(schema.$ref)}(${value}))`; - if (!referenceMap.has(schema.$ref)) - throw Error(`TypeCompiler.Ref: Cannot de-reference schema with $id '${schema.$ref}'`); - const reference = referenceMap.get(schema.$ref); - yield* Visit(reference, value); - } - function* Self(schema, value) { - const func = CreateFunctionName(schema.$ref); - yield `(${func}(${value}))`; - } - function* String(schema, value) { - yield `(typeof ${value} === 'string')`; - if (schema.minLength !== undefined) { - yield `(${value}.length >= ${schema.minLength})`; - } - if (schema.maxLength !== undefined) { - yield `(${value}.length <= ${schema.maxLength})`; - } - if (schema.pattern !== undefined) { - const local = PushLocal(`new RegExp(/${schema.pattern}/);`); - yield `(${local}.test(${value}))`; - } - if (schema.format !== undefined) { - yield `(format('${schema.format}', ${value}))`; - } - } - function* Tuple(schema, value) { - yield `(Array.isArray(${value}))`; - if (schema.items === undefined) - return yield `(${value}.length === 0)`; - yield `(${value}.length === ${schema.maxItems})`; - for (let i = 0; i < schema.items.length; i++) { - const expression = CreateExpression(schema.items[i], `${value}[${i}]`); - yield `(${expression})`; - } - } - function* Undefined(schema, value) { - yield `(${value} === undefined)`; - } - function* Union(schema, value) { - const expressions = schema.anyOf.map((schema) => CreateExpression(schema, value)); - yield `(${expressions.join(' || ')})`; - } - function* Uint8Array(schema, value) { - yield `(${value} instanceof Uint8Array)`; - if (schema.maxByteLength) - yield `(${value}.length <= ${schema.maxByteLength})`; - if (schema.minByteLength) - yield `(${value}.length >= ${schema.minByteLength})`; - } - function* Unknown(schema, value) { - yield '(true)'; - } - function* Void(schema, value) { - yield `(${value} === null)`; - } - function* Visit(schema, value) { - // Reference: Referenced schemas can originate from either additional schemas - // or inline in the schema itself. Ideally the recursive path should align to - // reference path. Consider for refactor. - if (schema.$id && !names.has(schema.$id)) { - names.add(schema.$id); - const name = CreateFunctionName(schema.$id); - const body = CreateFunction(name, schema, 'value'); - PushFunction(body); - yield `(${name}(${value}))`; - return; - } - const anySchema = schema; - switch (anySchema[Types.Kind]) { - case 'Any': - return yield* Any(anySchema, value); - case 'Array': - return yield* Array(anySchema, value); - case 'Boolean': - return yield* Boolean(anySchema, value); - case 'Constructor': - return yield* Constructor(anySchema, value); - case 'Function': - return yield* Function(anySchema, value); - case 'Integer': - return yield* Integer(anySchema, value); - case 'Literal': - return yield* Literal(anySchema, value); - case 'Never': - return yield* Never(anySchema, value); - case 'Null': - return yield* Null(anySchema, value); - case 'Number': - return yield* Number(anySchema, value); - case 'Object': - return yield* Object(anySchema, value); - case 'Promise': - return yield* Promise(anySchema, value); - case 'Record': - return yield* Record(anySchema, value); - case 'Ref': - return yield* Ref(anySchema, value); - case 'Self': - return yield* Self(anySchema, value); - case 'String': - return yield* String(anySchema, value); - case 'Tuple': - return yield* Tuple(anySchema, value); - case 'Undefined': - return yield* Undefined(anySchema, value); - case 'Union': - return yield* Union(anySchema, value); - case 'Uint8Array': - return yield* Uint8Array(anySchema, value); - case 'Unknown': - return yield* Unknown(anySchema, value); - case 'Void': - return yield* Void(anySchema, value); - default: - throw new TypeCompilerUnknownTypeError(schema); - } - } - // ------------------------------------------------------------------- - // Compile State - // ------------------------------------------------------------------- - const referenceMap = new Map(); - const locals = new Set(); // local variables and functions - const names = new Set(); // cache of local functions - function ResetCompiler() { - referenceMap.clear(); - locals.clear(); - names.clear(); - } - function AddReferences(schemas = []) { - for (const schema of schemas) { - if (!schema.$id) - throw new Error(`TypeCompiler: Referenced schemas must specify an $id.`); - if (referenceMap.has(schema.$id)) - throw new Error(`TypeCompiler: Duplicate schema $id found for '${schema.$id}'`); - referenceMap.set(schema.$id, schema); - } - } - function CreateExpression(schema, value) { - return [...Visit(schema, value)].join(' && '); - } - function CreateFunctionName($id) { - return `check_${$id.replace(/-/g, '_')}`; - } - function CreateFunction(name, schema, value) { - const expression = [...Visit(schema, value)].map((condition) => ` ${condition}`).join(' &&\n'); - return `function ${name}(value) {\n return (\n${expression}\n )\n}`; - } - function PushFunction(functionBody) { - locals.add(functionBody); - } - function PushLocal(expression) { - const local = `local_${locals.size}`; - locals.add(`const ${local} = ${expression}`); - return local; - } - function GetLocals() { - return [...locals.values()]; - } - // ------------------------------------------------------------------- - // Compile - // ------------------------------------------------------------------- - function Build(schema, references = []) { - ResetCompiler(); - AddReferences(references); - const check = CreateFunction('check', schema, 'value'); - const locals = GetLocals(); - return `${locals.join('\n')}\nreturn ${check}`; - } - /** Compiles the given type for runtime type checking. This compiler only accepts known TypeBox types non-inclusive of unsafe types. */ - function Compile(schema, references = []) { - index_2.TypeGuard.Assert(schema, references); - const code = Build(schema, references); - const func1 = globalThis.Function('format', code); - const func2 = func1((format, value) => { - if (!index_3.Format.Has(format)) - return false; - const func = index_3.Format.Get(format); - return func(value); - }); - return new TypeCheck(schema, references, func2, code); - } - TypeCompiler.Compile = Compile; -})(TypeCompiler = exports.TypeCompiler || (exports.TypeCompiler = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/compiler + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeCompiler = exports.TypeCompilerUnknownTypeError = exports.Property = exports.TypeCheck = void 0; +const index_1 = require("../errors/index"); +const index_2 = require("../guard/index"); +const index_3 = require("../format/index"); +const Types = require("../typebox"); +// ------------------------------------------------------------------- +// TypeCheck +// ------------------------------------------------------------------- +class TypeCheck { + constructor(schema, references, checkFunc, code) { + this.schema = schema; + this.references = references; + this.checkFunc = checkFunc; + this.code = code; + } + /** Returns the generated validation code used to validate this type. */ + Code() { + return this.code; + } + /** Returns an iterator for each error in this value. */ + Errors(value) { + return index_1.ValueErrors.Errors(this.schema, this.references, value); + } + /** Returns true if the value matches the given type. */ + Check(value) { + return this.checkFunc(value); + } +} +exports.TypeCheck = TypeCheck; +// ------------------------------------------------------------------- +// Property +// ------------------------------------------------------------------- +var Property; +(function (Property) { + function DollarSign(code) { + return code === 36; + } + function Underscore(code) { + return code === 95; + } + function Numeric(code) { + return code >= 48 && code <= 57; + } + function Alpha(code) { + return (code >= 65 && code <= 90) || (code >= 97 && code <= 122); + } + function Check(propertyName) { + if (propertyName.length === 0) + return false; + { + const code = propertyName.charCodeAt(0); + if (!(DollarSign(code) || Underscore(code) || Alpha(code))) { + return false; + } + } + for (let i = 1; i < propertyName.length; i++) { + const code = propertyName.charCodeAt(i); + if (!(DollarSign(code) || Underscore(code) || Alpha(code) || Numeric(code))) { + return false; + } + } + return true; + } + Property.Check = Check; +})(Property = exports.Property || (exports.Property = {})); +// ------------------------------------------------------------------- +// TypeCompiler +// ------------------------------------------------------------------- +class TypeCompilerUnknownTypeError extends Error { + constructor(schema) { + super('TypeCompiler: Unknown type'); + this.schema = schema; + } +} +exports.TypeCompilerUnknownTypeError = TypeCompilerUnknownTypeError; +/** Compiles Types for Runtime Type Checking */ +var TypeCompiler; +(function (TypeCompiler) { + // ------------------------------------------------------------------- + // Types + // ------------------------------------------------------------------- + function* Any(schema, value) { + yield '(true)'; + } + function* Array(schema, value) { + const expression = CreateExpression(schema.items, 'value'); + if (schema.minItems !== undefined) + yield `(${value}.length >= ${schema.minItems})`; + if (schema.maxItems !== undefined) + yield `(${value}.length <= ${schema.maxItems})`; + if (schema.uniqueItems !== undefined) + yield `(new Set(${value}).size === ${value}.length)`; + yield `(Array.isArray(${value}) && ${value}.every(value => ${expression}))`; + } + function* Boolean(schema, value) { + yield `(typeof ${value} === 'boolean')`; + } + function* Constructor(schema, value) { + yield* Visit(schema.returns, `${value}.prototype`); + } + function* Function(schema, value) { + yield `(typeof ${value} === 'function')`; + } + function* Integer(schema, value) { + yield `(typeof ${value} === 'number' && Number.isInteger(${value}))`; + if (schema.multipleOf !== undefined) + yield `(${value} % ${schema.multipleOf} === 0)`; + if (schema.exclusiveMinimum !== undefined) + yield `(${value} > ${schema.exclusiveMinimum})`; + if (schema.exclusiveMaximum !== undefined) + yield `(${value} < ${schema.exclusiveMaximum})`; + if (schema.minimum !== undefined) + yield `(${value} >= ${schema.minimum})`; + if (schema.maximum !== undefined) + yield `(${value} <= ${schema.maximum})`; + } + function* Literal(schema, value) { + if (typeof schema.const === 'number' || typeof schema.const === 'boolean') { + yield `(${value} === ${schema.const})`; + } + else { + yield `(${value} === '${schema.const}')`; + } + } + function* Never(schema, value) { + yield `(false)`; + } + function* Null(schema, value) { + yield `(${value} === null)`; + } + function* Number(schema, value) { + yield `(typeof ${value} === 'number')`; + if (schema.multipleOf !== undefined) + yield `(${value} % ${schema.multipleOf} === 0)`; + if (schema.exclusiveMinimum !== undefined) + yield `(${value} > ${schema.exclusiveMinimum})`; + if (schema.exclusiveMaximum !== undefined) + yield `(${value} < ${schema.exclusiveMaximum})`; + if (schema.minimum !== undefined) + yield `(${value} >= ${schema.minimum})`; + if (schema.maximum !== undefined) + yield `(${value} <= ${schema.maximum})`; + } + function* Object(schema, value) { + yield `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))`; + if (schema.minProperties !== undefined) + yield `(Object.keys(${value}).length >= ${schema.minProperties})`; + if (schema.maxProperties !== undefined) + yield `(Object.keys(${value}).length <= ${schema.maxProperties})`; + const propertyKeys = globalThis.Object.keys(schema.properties); + if (schema.additionalProperties === false) { + // Optimization: If the property key length matches the required keys length + // then we only need check that the values property key length matches that + // of the property key length. This is because exhaustive testing for values + // will occur in subsequent property tests. + if (schema.required && schema.required.length === propertyKeys.length) { + yield `(Object.keys(${value}).length === ${propertyKeys.length})`; + } + else { + const keys = `[${propertyKeys.map((key) => `'${key}'`).join(', ')}]`; + yield `(Object.keys(${value}).every(key => ${keys}.includes(key)))`; + } + } + if (index_2.TypeGuard.TSchema(schema.additionalProperties)) { + const expression = CreateExpression(schema.additionalProperties, 'value[key]'); + const keys = `[${propertyKeys.map((key) => `'${key}'`).join(', ')}]`; + yield `(Object.keys(${value}).every(key => ${keys}.includes(key) || ${expression}))`; + } + for (const propertyKey of propertyKeys) { + const memberExpression = Property.Check(propertyKey) ? `${value}.${propertyKey}` : `${value}['${propertyKey}']`; + const propertySchema = schema.properties[propertyKey]; + if (schema.required && schema.required.includes(propertyKey)) { + yield* Visit(propertySchema, memberExpression); + } + else { + const expression = CreateExpression(propertySchema, memberExpression); + yield `(${memberExpression} === undefined ? true : (${expression}))`; + } + } + } + function* Promise(schema, value) { + yield `(typeof value === 'object' && typeof ${value}.then === 'function')`; + } + function* Record(schema, value) { + yield `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))`; + const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; + const local = PushLocal(`new RegExp(/${keyPattern}/)`); + yield `(Object.keys(${value}).every(key => ${local}.test(key)))`; + const expression = CreateExpression(valueSchema, 'value'); + yield `(Object.values(${value}).every(value => ${expression}))`; + } + function* Ref(schema, value) { + // Reference: If we have seen this reference before we can just yield and return + // the function call. If this isn't the case we defer to visit to generate and + // set the function for subsequent passes. Consider for refactor. + if (names.has(schema.$ref)) + return yield `(${CreateFunctionName(schema.$ref)}(${value}))`; + if (!referenceMap.has(schema.$ref)) + throw Error(`TypeCompiler.Ref: Cannot de-reference schema with $id '${schema.$ref}'`); + const reference = referenceMap.get(schema.$ref); + yield* Visit(reference, value); + } + function* Self(schema, value) { + const func = CreateFunctionName(schema.$ref); + yield `(${func}(${value}))`; + } + function* String(schema, value) { + yield `(typeof ${value} === 'string')`; + if (schema.minLength !== undefined) { + yield `(${value}.length >= ${schema.minLength})`; + } + if (schema.maxLength !== undefined) { + yield `(${value}.length <= ${schema.maxLength})`; + } + if (schema.pattern !== undefined) { + const local = PushLocal(`new RegExp(/${schema.pattern}/);`); + yield `(${local}.test(${value}))`; + } + if (schema.format !== undefined) { + yield `(format('${schema.format}', ${value}))`; + } + } + function* Tuple(schema, value) { + yield `(Array.isArray(${value}))`; + if (schema.items === undefined) + return yield `(${value}.length === 0)`; + yield `(${value}.length === ${schema.maxItems})`; + for (let i = 0; i < schema.items.length; i++) { + const expression = CreateExpression(schema.items[i], `${value}[${i}]`); + yield `(${expression})`; + } + } + function* Undefined(schema, value) { + yield `(${value} === undefined)`; + } + function* Union(schema, value) { + const expressions = schema.anyOf.map((schema) => CreateExpression(schema, value)); + yield `(${expressions.join(' || ')})`; + } + function* Uint8Array(schema, value) { + yield `(${value} instanceof Uint8Array)`; + if (schema.maxByteLength) + yield `(${value}.length <= ${schema.maxByteLength})`; + if (schema.minByteLength) + yield `(${value}.length >= ${schema.minByteLength})`; + } + function* Unknown(schema, value) { + yield '(true)'; + } + function* Void(schema, value) { + yield `(${value} === null)`; + } + function* Visit(schema, value) { + // Reference: Referenced schemas can originate from either additional schemas + // or inline in the schema itself. Ideally the recursive path should align to + // reference path. Consider for refactor. + if (schema.$id && !names.has(schema.$id)) { + names.add(schema.$id); + const name = CreateFunctionName(schema.$id); + const body = CreateFunction(name, schema, 'value'); + PushFunction(body); + yield `(${name}(${value}))`; + return; + } + const anySchema = schema; + switch (anySchema[Types.Kind]) { + case 'Any': + return yield* Any(anySchema, value); + case 'Array': + return yield* Array(anySchema, value); + case 'Boolean': + return yield* Boolean(anySchema, value); + case 'Constructor': + return yield* Constructor(anySchema, value); + case 'Function': + return yield* Function(anySchema, value); + case 'Integer': + return yield* Integer(anySchema, value); + case 'Literal': + return yield* Literal(anySchema, value); + case 'Never': + return yield* Never(anySchema, value); + case 'Null': + return yield* Null(anySchema, value); + case 'Number': + return yield* Number(anySchema, value); + case 'Object': + return yield* Object(anySchema, value); + case 'Promise': + return yield* Promise(anySchema, value); + case 'Record': + return yield* Record(anySchema, value); + case 'Ref': + return yield* Ref(anySchema, value); + case 'Self': + return yield* Self(anySchema, value); + case 'String': + return yield* String(anySchema, value); + case 'Tuple': + return yield* Tuple(anySchema, value); + case 'Undefined': + return yield* Undefined(anySchema, value); + case 'Union': + return yield* Union(anySchema, value); + case 'Uint8Array': + return yield* Uint8Array(anySchema, value); + case 'Unknown': + return yield* Unknown(anySchema, value); + case 'Void': + return yield* Void(anySchema, value); + default: + throw new TypeCompilerUnknownTypeError(schema); + } + } + // ------------------------------------------------------------------- + // Compile State + // ------------------------------------------------------------------- + const referenceMap = new Map(); + const locals = new Set(); // local variables and functions + const names = new Set(); // cache of local functions + function ResetCompiler() { + referenceMap.clear(); + locals.clear(); + names.clear(); + } + function AddReferences(schemas = []) { + for (const schema of schemas) { + if (!schema.$id) + throw new Error(`TypeCompiler: Referenced schemas must specify an $id.`); + if (referenceMap.has(schema.$id)) + throw new Error(`TypeCompiler: Duplicate schema $id found for '${schema.$id}'`); + referenceMap.set(schema.$id, schema); + } + } + function CreateExpression(schema, value) { + return [...Visit(schema, value)].join(' && '); + } + function CreateFunctionName($id) { + return `check_${$id.replace(/-/g, '_')}`; + } + function CreateFunction(name, schema, value) { + const expression = [...Visit(schema, value)].map((condition) => ` ${condition}`).join(' &&\n'); + return `function ${name}(value) {\n return (\n${expression}\n )\n}`; + } + function PushFunction(functionBody) { + locals.add(functionBody); + } + function PushLocal(expression) { + const local = `local_${locals.size}`; + locals.add(`const ${local} = ${expression}`); + return local; + } + function GetLocals() { + return [...locals.values()]; + } + // ------------------------------------------------------------------- + // Compile + // ------------------------------------------------------------------- + function Build(schema, references = []) { + ResetCompiler(); + AddReferences(references); + const check = CreateFunction('check', schema, 'value'); + const locals = GetLocals(); + return `${locals.join('\n')}\nreturn ${check}`; + } + /** Compiles the given type for runtime type checking. This compiler only accepts known TypeBox types non-inclusive of unsafe types. */ + function Compile(schema, references = []) { + index_2.TypeGuard.Assert(schema, references); + const code = Build(schema, references); + const func1 = globalThis.Function('format', code); + const func2 = func1((format, value) => { + if (!index_3.Format.Has(format)) + return false; + const func = index_3.Format.Get(format); + return func(value); + }); + return new TypeCheck(schema, references, func2, code); + } + TypeCompiler.Compile = Compile; +})(TypeCompiler = exports.TypeCompiler || (exports.TypeCompiler = {})); diff --git a/node_modules/@sinclair/typebox/compiler/index.d.ts b/node_modules/@sinclair/typebox/compiler/index.d.ts index 4062a62f..b89fc987 100644 --- a/node_modules/@sinclair/typebox/compiler/index.d.ts +++ b/node_modules/@sinclair/typebox/compiler/index.d.ts @@ -1,2 +1,2 @@ -export { ValueError, ValueErrorType } from '../errors/index'; -export * from './compiler'; +export { ValueError, ValueErrorType } from '../errors/index'; +export * from './compiler'; diff --git a/node_modules/@sinclair/typebox/compiler/index.js b/node_modules/@sinclair/typebox/compiler/index.js index deeb16fe..f381f8f8 100644 --- a/node_modules/@sinclair/typebox/compiler/index.js +++ b/node_modules/@sinclair/typebox/compiler/index.js @@ -1,47 +1,47 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/compiler - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueErrorType = void 0; -var index_1 = require("../errors/index"); -Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return index_1.ValueErrorType; } }); -__exportStar(require("./compiler"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/compiler + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueErrorType = void 0; +var index_1 = require("../errors/index"); +Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return index_1.ValueErrorType; } }); +__exportStar(require("./compiler"), exports); diff --git a/node_modules/@sinclair/typebox/conditional/conditional.d.ts b/node_modules/@sinclair/typebox/conditional/conditional.d.ts index d078ca04..085d9379 100644 --- a/node_modules/@sinclair/typebox/conditional/conditional.d.ts +++ b/node_modules/@sinclair/typebox/conditional/conditional.d.ts @@ -1,17 +1,17 @@ -import * as Types from '../typebox'; -export declare type TExtends = Types.Static extends Types.Static ? T : U; -export interface TExclude extends Types.TUnion { - static: Exclude, Types.Static>; -} -export interface TExtract extends Types.TUnion { - static: Extract, Types.Static>; -} -/** Conditional Types */ -export declare namespace Conditional { - /** (Experimental) Creates a conditional expression type */ - function Extends(left: L, right: R, ok: T, fail: U): TExtends; - /** (Experimental) Constructs a type by excluding from UnionType all union members that are assignable to ExcludedMembers. */ - function Exclude(unionType: T, excludedMembers: U, options?: Types.SchemaOptions): TExclude; - /** (Experimental) Constructs a type by extracting from Type all union members that are assignable to Union. */ - function Extract(type: T, union: U, options?: Types.SchemaOptions): TExtract; -} +import * as Types from '../typebox'; +export declare type TExtends = Types.Static extends Types.Static ? T : U; +export interface TExclude extends Types.TUnion { + static: Exclude, Types.Static>; +} +export interface TExtract extends Types.TUnion { + static: Extract, Types.Static>; +} +/** Conditional Types */ +export declare namespace Conditional { + /** (Experimental) Creates a conditional expression type */ + function Extends(left: L, right: R, ok: T, fail: U): TExtends; + /** (Experimental) Constructs a type by excluding from UnionType all union members that are assignable to ExcludedMembers. */ + function Exclude(unionType: T, excludedMembers: U, options?: Types.SchemaOptions): TExclude; + /** (Experimental) Constructs a type by extracting from Type all union members that are assignable to Union. */ + function Extract(type: T, union: U, options?: Types.SchemaOptions): TExtract; +} diff --git a/node_modules/@sinclair/typebox/conditional/conditional.js b/node_modules/@sinclair/typebox/conditional/conditional.js index 59d297c9..9f8a95db 100644 --- a/node_modules/@sinclair/typebox/conditional/conditional.js +++ b/node_modules/@sinclair/typebox/conditional/conditional.js @@ -1,91 +1,91 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/conditional - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Conditional = void 0; -const Types = require("../typebox"); -const structural_1 = require("./structural"); -const index_1 = require("../guard/index"); -/** Conditional Types */ -var Conditional; -(function (Conditional) { - /** (Experimental) Creates a conditional expression type */ - function Extends(left, right, ok, fail) { - switch (structural_1.Structural.Check(left, right)) { - case structural_1.StructuralResult.Union: - return Types.Type.Union([Clone(ok), Clone(fail)]); - case structural_1.StructuralResult.True: - return Clone(ok); - case structural_1.StructuralResult.False: - return Clone(fail); - } - } - Conditional.Extends = Extends; - /** (Experimental) Constructs a type by excluding from UnionType all union members that are assignable to ExcludedMembers. */ - function Exclude(unionType, excludedMembers, options = {}) { - const anyOf = unionType.anyOf - .filter((schema) => { - const check = structural_1.Structural.Check(schema, excludedMembers); - return !(check === structural_1.StructuralResult.True || check === structural_1.StructuralResult.Union); - }) - .map((schema) => Clone(schema)); - return { ...options, [Types.Kind]: 'Union', anyOf }; - } - Conditional.Exclude = Exclude; - /** (Experimental) Constructs a type by extracting from Type all union members that are assignable to Union. */ - function Extract(type, union, options = {}) { - if (index_1.TypeGuard.TUnion(type)) { - const anyOf = type.anyOf.filter((schema) => structural_1.Structural.Check(schema, union) === structural_1.StructuralResult.True).map((schema) => Clone(schema)); - return { ...options, [Types.Kind]: 'Union', anyOf }; - } - else { - const anyOf = union.anyOf.filter((schema) => structural_1.Structural.Check(type, schema) === structural_1.StructuralResult.True).map((schema) => Clone(schema)); - return { ...options, [Types.Kind]: 'Union', anyOf }; - } - } - Conditional.Extract = Extract; - function Clone(value) { - const isObject = (object) => typeof object === 'object' && object !== null && !Array.isArray(object); - const isArray = (object) => typeof object === 'object' && object !== null && Array.isArray(object); - if (isObject(value)) { - return Object.keys(value).reduce((acc, key) => ({ - ...acc, - [key]: Clone(value[key]), - }), Object.getOwnPropertySymbols(value).reduce((acc, key) => ({ - ...acc, - [key]: Clone(value[key]), - }), {})); - } - else if (isArray(value)) { - return value.map((item) => Clone(item)); - } - else { - return value; - } - } -})(Conditional = exports.Conditional || (exports.Conditional = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/conditional + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Conditional = void 0; +const Types = require("../typebox"); +const structural_1 = require("./structural"); +const index_1 = require("../guard/index"); +/** Conditional Types */ +var Conditional; +(function (Conditional) { + /** (Experimental) Creates a conditional expression type */ + function Extends(left, right, ok, fail) { + switch (structural_1.Structural.Check(left, right)) { + case structural_1.StructuralResult.Union: + return Types.Type.Union([Clone(ok), Clone(fail)]); + case structural_1.StructuralResult.True: + return Clone(ok); + case structural_1.StructuralResult.False: + return Clone(fail); + } + } + Conditional.Extends = Extends; + /** (Experimental) Constructs a type by excluding from UnionType all union members that are assignable to ExcludedMembers. */ + function Exclude(unionType, excludedMembers, options = {}) { + const anyOf = unionType.anyOf + .filter((schema) => { + const check = structural_1.Structural.Check(schema, excludedMembers); + return !(check === structural_1.StructuralResult.True || check === structural_1.StructuralResult.Union); + }) + .map((schema) => Clone(schema)); + return { ...options, [Types.Kind]: 'Union', anyOf }; + } + Conditional.Exclude = Exclude; + /** (Experimental) Constructs a type by extracting from Type all union members that are assignable to Union. */ + function Extract(type, union, options = {}) { + if (index_1.TypeGuard.TUnion(type)) { + const anyOf = type.anyOf.filter((schema) => structural_1.Structural.Check(schema, union) === structural_1.StructuralResult.True).map((schema) => Clone(schema)); + return { ...options, [Types.Kind]: 'Union', anyOf }; + } + else { + const anyOf = union.anyOf.filter((schema) => structural_1.Structural.Check(type, schema) === structural_1.StructuralResult.True).map((schema) => Clone(schema)); + return { ...options, [Types.Kind]: 'Union', anyOf }; + } + } + Conditional.Extract = Extract; + function Clone(value) { + const isObject = (object) => typeof object === 'object' && object !== null && !Array.isArray(object); + const isArray = (object) => typeof object === 'object' && object !== null && Array.isArray(object); + if (isObject(value)) { + return Object.keys(value).reduce((acc, key) => ({ + ...acc, + [key]: Clone(value[key]), + }), Object.getOwnPropertySymbols(value).reduce((acc, key) => ({ + ...acc, + [key]: Clone(value[key]), + }), {})); + } + else if (isArray(value)) { + return value.map((item) => Clone(item)); + } + else { + return value; + } + } +})(Conditional = exports.Conditional || (exports.Conditional = {})); diff --git a/node_modules/@sinclair/typebox/conditional/index.d.ts b/node_modules/@sinclair/typebox/conditional/index.d.ts index 773425d2..d9c36d74 100644 --- a/node_modules/@sinclair/typebox/conditional/index.d.ts +++ b/node_modules/@sinclair/typebox/conditional/index.d.ts @@ -1,2 +1,2 @@ -export * from './conditional'; -export * from './structural'; +export * from './conditional'; +export * from './structural'; diff --git a/node_modules/@sinclair/typebox/conditional/index.js b/node_modules/@sinclair/typebox/conditional/index.js index 621910b5..f2275bc5 100644 --- a/node_modules/@sinclair/typebox/conditional/index.js +++ b/node_modules/@sinclair/typebox/conditional/index.js @@ -1,45 +1,45 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/conditional - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./conditional"), exports); -__exportStar(require("./structural"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/conditional + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./conditional"), exports); +__exportStar(require("./structural"), exports); diff --git a/node_modules/@sinclair/typebox/conditional/structural.d.ts b/node_modules/@sinclair/typebox/conditional/structural.d.ts index 7ba8fc79..c32c5d10 100644 --- a/node_modules/@sinclair/typebox/conditional/structural.d.ts +++ b/node_modules/@sinclair/typebox/conditional/structural.d.ts @@ -1,11 +1,11 @@ -import * as Types from '../typebox'; -export declare enum StructuralResult { - Union = 0, - True = 1, - False = 2 -} -/** Performs structural equivalence checks against TypeBox types. */ -export declare namespace Structural { - /** Structurally tests if the left schema extends the right. */ - function Check(left: Types.TSchema, right: Types.TSchema): StructuralResult; -} +import * as Types from '../typebox'; +export declare enum StructuralResult { + Union = 0, + True = 1, + False = 2 +} +/** Performs structural equivalence checks against TypeBox types. */ +export declare namespace Structural { + /** Structurally tests if the left schema extends the right. */ + function Check(left: Types.TSchema, right: Types.TSchema): StructuralResult; +} diff --git a/node_modules/@sinclair/typebox/conditional/structural.js b/node_modules/@sinclair/typebox/conditional/structural.js index cdd4ba07..09c7b347 100644 --- a/node_modules/@sinclair/typebox/conditional/structural.js +++ b/node_modules/@sinclair/typebox/conditional/structural.js @@ -1,657 +1,657 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/conditional - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Structural = exports.StructuralResult = void 0; -const Types = require("../typebox"); -const guard_1 = require("../guard"); -// -------------------------------------------------------------------------- -// StructuralResult -// -------------------------------------------------------------------------- -var StructuralResult; -(function (StructuralResult) { - StructuralResult[StructuralResult["Union"] = 0] = "Union"; - StructuralResult[StructuralResult["True"] = 1] = "True"; - StructuralResult[StructuralResult["False"] = 2] = "False"; -})(StructuralResult = exports.StructuralResult || (exports.StructuralResult = {})); -// -------------------------------------------------------------------------- -// Structural -// -------------------------------------------------------------------------- -/** Performs structural equivalence checks against TypeBox types. */ -var Structural; -(function (Structural) { - const referenceMap = new Map(); - // ------------------------------------------------------------------------ - // Rules - // ------------------------------------------------------------------------ - function AnyOrUnknownRule(right) { - // https://github.com/microsoft/TypeScript/issues/40049 - if (right[Types.Kind] === 'Union' && right.anyOf.some((schema) => schema[Types.Kind] === 'Any' || schema[Types.Kind] === 'Unknown')) - return true; - if (right[Types.Kind] === 'Unknown') - return true; - if (right[Types.Kind] === 'Any') - return true; - return false; - } - function ObjectRightRule(left, right) { - // type A = boolean extends {} ? 1 : 2 // additionalProperties: false - // type B = boolean extends object ? 1 : 2 // additionalProperties: true - const additionalProperties = right.additionalProperties; - const propertyLength = globalThis.Object.keys(right.properties).length; - return additionalProperties === false && propertyLength === 0; - } - function UnionRightRule(left, right) { - const result = right.anyOf.some((right) => Visit(left, right) !== StructuralResult.False); - return result ? StructuralResult.True : StructuralResult.False; - } - // ------------------------------------------------------------------------ - // Records - // ------------------------------------------------------------------------ - function RecordPattern(schema) { - return globalThis.Object.keys(schema.patternProperties)[0]; - } - function RecordNumberOrStringKey(schema) { - const pattern = RecordPattern(schema); - return pattern === '^.*$' || pattern === '^(0|[1-9][0-9]*)$'; - } - function RecordValue(schema) { - const pattern = RecordPattern(schema); - return schema.patternProperties[pattern]; - } - function RecordKey(schema) { - const pattern = RecordPattern(schema); - if (pattern === '^.*$') { - return Types.Type.String(); - } - else if (pattern === '^(0|[1-9][0-9]*)$') { - return Types.Type.Number(); - } - else { - const keys = pattern.slice(1, pattern.length - 1).split('|'); - const schemas = keys.map((key) => (isNaN(+key) ? Types.Type.Literal(key) : Types.Type.Literal(parseFloat(key)))); - return Types.Type.Union(schemas); - } - } - function PropertyMap(schema) { - const comparable = new Map(); - if (guard_1.TypeGuard.TRecord(schema)) { - const propertyPattern = RecordPattern(schema); - if (propertyPattern === '^.*$' || propertyPattern === '^(0|[1-9][0-9]*)$') - throw Error('Cannot extract record properties without property constraints'); - const propertySchema = schema.patternProperties[propertyPattern]; - const propertyKeys = propertyPattern.slice(1, propertyPattern.length - 1).split('|'); - propertyKeys.forEach((propertyKey) => { - comparable.set(propertyKey, propertySchema); - }); - } - else { - globalThis.Object.entries(schema.properties).forEach(([propertyKey, propertySchema]) => { - comparable.set(propertyKey, propertySchema); - }); - } - return comparable; - } - // ------------------------------------------------------------------------ - // Indexable - // ------------------------------------------------------------------------ - function Indexable(left, right) { - if (guard_1.TypeGuard.TUnion(right)) { - return StructuralResult.False; - } - else { - return Visit(left, right); - } - } - // ------------------------------------------------------------------------ - // Checks - // ------------------------------------------------------------------------ - function Any(left, right) { - return AnyOrUnknownRule(right) ? StructuralResult.True : StructuralResult.Union; - } - function Array(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - if (right.properties['length'] !== undefined && right.properties['length'][Types.Kind] === 'Number') - return StructuralResult.True; - if (globalThis.Object.keys(right.properties).length === 0) - return StructuralResult.True; - return StructuralResult.False; - } - else if (!guard_1.TypeGuard.TArray(right)) { - return StructuralResult.False; - } - else if (left.items === undefined && right.items !== undefined) { - return StructuralResult.False; - } - else if (left.items !== undefined && right.items === undefined) { - return StructuralResult.False; - } - else if (left.items === undefined && right.items === undefined) { - return StructuralResult.False; - } - else { - const result = Visit(left.items, right.items) !== StructuralResult.False; - return result ? StructuralResult.True : StructuralResult.False; - } - } - function Boolean(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TBoolean(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Constructor(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && globalThis.Object.keys(right.properties).length === 0) { - return StructuralResult.True; - } - else if (!guard_1.TypeGuard.TConstructor(right)) { - return StructuralResult.False; - } - else if (right.parameters.length < left.parameters.length) { - return StructuralResult.False; - } - else { - if (Visit(left.returns, right.returns) === StructuralResult.False) { - return StructuralResult.False; - } - for (let i = 0; i < left.parameters.length; i++) { - const result = Visit(right.parameters[i], left.parameters[i]); - if (result === StructuralResult.False) - return StructuralResult.False; - } - return StructuralResult.True; - } - } - function Function(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - if (right.properties['length'] !== undefined && right.properties['length'][Types.Kind] === 'Number') - return StructuralResult.True; - if (globalThis.Object.keys(right.properties).length === 0) - return StructuralResult.True; - return StructuralResult.False; - } - else if (!guard_1.TypeGuard.TFunction(right)) { - return StructuralResult.False; - } - else if (right.parameters.length < left.parameters.length) { - return StructuralResult.False; - } - else if (Visit(left.returns, right.returns) === StructuralResult.False) { - return StructuralResult.False; - } - else { - for (let i = 0; i < left.parameters.length; i++) { - const result = Visit(right.parameters[i], left.parameters[i]); - if (result === StructuralResult.False) - return StructuralResult.False; - } - return StructuralResult.True; - } - } - function Integer(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TInteger(right) || guard_1.TypeGuard.TNumber(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Literal(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TRecord(right)) { - if (typeof left.const === 'string') { - return Indexable(left, RecordValue(right)); - } - else { - return StructuralResult.False; - } - } - else if (guard_1.TypeGuard.TLiteral(right) && left.const === right.const) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TString(right) && typeof left.const === 'string') { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TNumber(right) && typeof left.const === 'number') { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TInteger(right) && typeof left.const === 'number') { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TBoolean(right) && typeof left.const === 'boolean') { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Number(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TNumber(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TInteger(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Null(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TNull(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Properties(left, right) { - if (right.size > left.size) - return StructuralResult.False; - if (![...right.keys()].every((rightKey) => left.has(rightKey))) - return StructuralResult.False; - for (const rightKey of right.keys()) { - const leftProp = left.get(rightKey); - const rightProp = right.get(rightKey); - if (Visit(leftProp, rightProp) === StructuralResult.False) { - return StructuralResult.False; - } - } - return StructuralResult.True; - } - function Object(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - return Properties(PropertyMap(left), PropertyMap(right)); - } - else if (guard_1.TypeGuard.TRecord(right)) { - if (!RecordNumberOrStringKey(right)) { - return Properties(PropertyMap(left), PropertyMap(right)); - } - else { - return StructuralResult.True; - } - } - else { - return StructuralResult.False; - } - } - function Promise(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - if (ObjectRightRule(left, right) || globalThis.Object.keys(right.properties).length === 0) { - return StructuralResult.True; - } - else { - return StructuralResult.False; - } - } - else if (!guard_1.TypeGuard.TPromise(right)) { - return StructuralResult.False; - } - else { - const result = Visit(left.item, right.item) !== StructuralResult.False; - return result ? StructuralResult.True : StructuralResult.False; - } - } - function Record(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - if (RecordPattern(left) === '^.*$' && right[Types.Hint] === 'Record') { - return StructuralResult.True; - } - else if (RecordPattern(left) === '^.*$') { - return StructuralResult.False; - } - else { - return globalThis.Object.keys(right.properties).length === 0 ? StructuralResult.True : StructuralResult.False; - } - } - else if (guard_1.TypeGuard.TRecord(right)) { - if (!RecordNumberOrStringKey(left) && !RecordNumberOrStringKey(right)) { - return Properties(PropertyMap(left), PropertyMap(right)); - } - else if (RecordNumberOrStringKey(left) && !RecordNumberOrStringKey(right)) { - const leftKey = RecordKey(left); - const rightKey = RecordKey(right); - if (Visit(rightKey, leftKey) === StructuralResult.False) { - return StructuralResult.False; - } - else { - return StructuralResult.True; - } - } - else { - return StructuralResult.True; - } - } - else { - return StructuralResult.False; - } - } - function Ref(left, right) { - if (!referenceMap.has(left.$ref)) - throw Error(`Cannot locate referenced $id '${left.$ref}'`); - const resolved = referenceMap.get(left.$ref); - return Visit(resolved, right); - } - function Self(left, right) { - if (!referenceMap.has(left.$ref)) - throw Error(`Cannot locate referenced self $id '${left.$ref}'`); - const resolved = referenceMap.get(left.$ref); - return Visit(resolved, right); - } - function String(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TRecord(right)) { - return Indexable(left, RecordValue(right)); - } - else if (guard_1.TypeGuard.TString(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Tuple(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right)) { - const result = ObjectRightRule(left, right) || globalThis.Object.keys(right.properties).length === 0; - return result ? StructuralResult.True : StructuralResult.False; - } - else if (guard_1.TypeGuard.TRecord(right)) { - return Indexable(left, RecordValue(right)); - } - else if (guard_1.TypeGuard.TArray(right)) { - if (right.items === undefined) { - return StructuralResult.False; - } - else if (guard_1.TypeGuard.TUnion(right.items) && left.items) { - const result = left.items.every((left) => UnionRightRule(left, right.items) !== StructuralResult.False); - return result ? StructuralResult.True : StructuralResult.False; - } - else if (guard_1.TypeGuard.TAny(right.items)) { - return StructuralResult.True; - } - else { - return StructuralResult.False; - } - } - if (!guard_1.TypeGuard.TTuple(right)) - return StructuralResult.False; - if (left.items === undefined && right.items === undefined) - return StructuralResult.True; - if (left.items === undefined && right.items !== undefined) - return StructuralResult.False; - if (left.items !== undefined && right.items === undefined) - return StructuralResult.False; - if (left.items === undefined && right.items === undefined) - return StructuralResult.True; - if (left.minItems !== right.minItems || left.maxItems !== right.maxItems) - return StructuralResult.False; - for (let i = 0; i < left.items.length; i++) { - if (Visit(left.items[i], right.items[i]) === StructuralResult.False) - return StructuralResult.False; - } - return StructuralResult.True; - } - function Uint8Array(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TRecord(right)) { - return Indexable(left, RecordValue(right)); - } - else if (guard_1.TypeGuard.TUint8Array(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Undefined(left, right) { - if (AnyOrUnknownRule(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUndefined(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TVoid(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnion(right)) { - return UnionRightRule(left, right); - } - else { - return StructuralResult.False; - } - } - function Union(left, right) { - if (left.anyOf.some((left) => guard_1.TypeGuard.TAny(left))) { - return StructuralResult.Union; - } - else if (guard_1.TypeGuard.TUnion(right)) { - const result = left.anyOf.every((left) => right.anyOf.some((right) => Visit(left, right) !== StructuralResult.False)); - return result ? StructuralResult.True : StructuralResult.False; - } - else { - const result = left.anyOf.every((left) => Visit(left, right) !== StructuralResult.False); - return result ? StructuralResult.True : StructuralResult.False; - } - } - function Unknown(left, right) { - if (guard_1.TypeGuard.TUnion(right)) { - const result = right.anyOf.some((right) => guard_1.TypeGuard.TAny(right) || guard_1.TypeGuard.TUnknown(right)); - return result ? StructuralResult.True : StructuralResult.False; - } - else if (guard_1.TypeGuard.TAny(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnknown(right)) { - return StructuralResult.True; - } - else { - return StructuralResult.False; - } - } - function Void(left, right) { - if (guard_1.TypeGuard.TUnion(right)) { - const result = right.anyOf.some((right) => guard_1.TypeGuard.TAny(right) || guard_1.TypeGuard.TUnknown(right)); - return result ? StructuralResult.True : StructuralResult.False; - } - else if (guard_1.TypeGuard.TAny(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TUnknown(right)) { - return StructuralResult.True; - } - else if (guard_1.TypeGuard.TVoid(right)) { - return StructuralResult.True; - } - else { - return StructuralResult.False; - } - } - let recursionDepth = 0; - function Visit(left, right) { - recursionDepth += 1; - if (recursionDepth >= 1000) - return StructuralResult.True; - if (left.$id !== undefined) - referenceMap.set(left.$id, left); - if (right.$id !== undefined) - referenceMap.set(right.$id, right); - const resolvedRight = right[Types.Kind] === 'Self' ? referenceMap.get(right.$ref) : right; - if (guard_1.TypeGuard.TAny(left)) { - return Any(left, resolvedRight); - } - else if (guard_1.TypeGuard.TArray(left)) { - return Array(left, resolvedRight); - } - else if (guard_1.TypeGuard.TBoolean(left)) { - return Boolean(left, resolvedRight); - } - else if (guard_1.TypeGuard.TConstructor(left)) { - return Constructor(left, resolvedRight); - } - else if (guard_1.TypeGuard.TFunction(left)) { - return Function(left, resolvedRight); - } - else if (guard_1.TypeGuard.TInteger(left)) { - return Integer(left, resolvedRight); - } - else if (guard_1.TypeGuard.TLiteral(left)) { - return Literal(left, resolvedRight); - } - else if (guard_1.TypeGuard.TNull(left)) { - return Null(left, resolvedRight); - } - else if (guard_1.TypeGuard.TNumber(left)) { - return Number(left, resolvedRight); - } - else if (guard_1.TypeGuard.TObject(left)) { - return Object(left, resolvedRight); - } - else if (guard_1.TypeGuard.TPromise(left)) { - return Promise(left, resolvedRight); - } - else if (guard_1.TypeGuard.TRecord(left)) { - return Record(left, resolvedRight); - } - else if (guard_1.TypeGuard.TRef(left)) { - return Ref(left, resolvedRight); - } - else if (guard_1.TypeGuard.TSelf(left)) { - return Self(left, resolvedRight); - } - else if (guard_1.TypeGuard.TString(left)) { - return String(left, resolvedRight); - } - else if (guard_1.TypeGuard.TTuple(left)) { - return Tuple(left, resolvedRight); - } - else if (guard_1.TypeGuard.TUndefined(left)) { - return Undefined(left, resolvedRight); - } - else if (guard_1.TypeGuard.TUint8Array(left)) { - return Uint8Array(left, resolvedRight); - } - else if (guard_1.TypeGuard.TUnion(left)) { - return Union(left, resolvedRight); - } - else if (guard_1.TypeGuard.TUnknown(left)) { - return Unknown(left, resolvedRight); - } - else if (guard_1.TypeGuard.TVoid(left)) { - return Void(left, resolvedRight); - } - else { - throw Error(`Structural: Unknown left operand '${left[Types.Kind]}'`); - } - } - /** Structurally tests if the left schema extends the right. */ - function Check(left, right) { - referenceMap.clear(); - recursionDepth = 0; - return Visit(left, right); - } - Structural.Check = Check; -})(Structural = exports.Structural || (exports.Structural = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/conditional + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Structural = exports.StructuralResult = void 0; +const Types = require("../typebox"); +const guard_1 = require("../guard"); +// -------------------------------------------------------------------------- +// StructuralResult +// -------------------------------------------------------------------------- +var StructuralResult; +(function (StructuralResult) { + StructuralResult[StructuralResult["Union"] = 0] = "Union"; + StructuralResult[StructuralResult["True"] = 1] = "True"; + StructuralResult[StructuralResult["False"] = 2] = "False"; +})(StructuralResult = exports.StructuralResult || (exports.StructuralResult = {})); +// -------------------------------------------------------------------------- +// Structural +// -------------------------------------------------------------------------- +/** Performs structural equivalence checks against TypeBox types. */ +var Structural; +(function (Structural) { + const referenceMap = new Map(); + // ------------------------------------------------------------------------ + // Rules + // ------------------------------------------------------------------------ + function AnyOrUnknownRule(right) { + // https://github.com/microsoft/TypeScript/issues/40049 + if (right[Types.Kind] === 'Union' && right.anyOf.some((schema) => schema[Types.Kind] === 'Any' || schema[Types.Kind] === 'Unknown')) + return true; + if (right[Types.Kind] === 'Unknown') + return true; + if (right[Types.Kind] === 'Any') + return true; + return false; + } + function ObjectRightRule(left, right) { + // type A = boolean extends {} ? 1 : 2 // additionalProperties: false + // type B = boolean extends object ? 1 : 2 // additionalProperties: true + const additionalProperties = right.additionalProperties; + const propertyLength = globalThis.Object.keys(right.properties).length; + return additionalProperties === false && propertyLength === 0; + } + function UnionRightRule(left, right) { + const result = right.anyOf.some((right) => Visit(left, right) !== StructuralResult.False); + return result ? StructuralResult.True : StructuralResult.False; + } + // ------------------------------------------------------------------------ + // Records + // ------------------------------------------------------------------------ + function RecordPattern(schema) { + return globalThis.Object.keys(schema.patternProperties)[0]; + } + function RecordNumberOrStringKey(schema) { + const pattern = RecordPattern(schema); + return pattern === '^.*$' || pattern === '^(0|[1-9][0-9]*)$'; + } + function RecordValue(schema) { + const pattern = RecordPattern(schema); + return schema.patternProperties[pattern]; + } + function RecordKey(schema) { + const pattern = RecordPattern(schema); + if (pattern === '^.*$') { + return Types.Type.String(); + } + else if (pattern === '^(0|[1-9][0-9]*)$') { + return Types.Type.Number(); + } + else { + const keys = pattern.slice(1, pattern.length - 1).split('|'); + const schemas = keys.map((key) => (isNaN(+key) ? Types.Type.Literal(key) : Types.Type.Literal(parseFloat(key)))); + return Types.Type.Union(schemas); + } + } + function PropertyMap(schema) { + const comparable = new Map(); + if (guard_1.TypeGuard.TRecord(schema)) { + const propertyPattern = RecordPattern(schema); + if (propertyPattern === '^.*$' || propertyPattern === '^(0|[1-9][0-9]*)$') + throw Error('Cannot extract record properties without property constraints'); + const propertySchema = schema.patternProperties[propertyPattern]; + const propertyKeys = propertyPattern.slice(1, propertyPattern.length - 1).split('|'); + propertyKeys.forEach((propertyKey) => { + comparable.set(propertyKey, propertySchema); + }); + } + else { + globalThis.Object.entries(schema.properties).forEach(([propertyKey, propertySchema]) => { + comparable.set(propertyKey, propertySchema); + }); + } + return comparable; + } + // ------------------------------------------------------------------------ + // Indexable + // ------------------------------------------------------------------------ + function Indexable(left, right) { + if (guard_1.TypeGuard.TUnion(right)) { + return StructuralResult.False; + } + else { + return Visit(left, right); + } + } + // ------------------------------------------------------------------------ + // Checks + // ------------------------------------------------------------------------ + function Any(left, right) { + return AnyOrUnknownRule(right) ? StructuralResult.True : StructuralResult.Union; + } + function Array(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + if (right.properties['length'] !== undefined && right.properties['length'][Types.Kind] === 'Number') + return StructuralResult.True; + if (globalThis.Object.keys(right.properties).length === 0) + return StructuralResult.True; + return StructuralResult.False; + } + else if (!guard_1.TypeGuard.TArray(right)) { + return StructuralResult.False; + } + else if (left.items === undefined && right.items !== undefined) { + return StructuralResult.False; + } + else if (left.items !== undefined && right.items === undefined) { + return StructuralResult.False; + } + else if (left.items === undefined && right.items === undefined) { + return StructuralResult.False; + } + else { + const result = Visit(left.items, right.items) !== StructuralResult.False; + return result ? StructuralResult.True : StructuralResult.False; + } + } + function Boolean(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TBoolean(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Constructor(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && globalThis.Object.keys(right.properties).length === 0) { + return StructuralResult.True; + } + else if (!guard_1.TypeGuard.TConstructor(right)) { + return StructuralResult.False; + } + else if (right.parameters.length < left.parameters.length) { + return StructuralResult.False; + } + else { + if (Visit(left.returns, right.returns) === StructuralResult.False) { + return StructuralResult.False; + } + for (let i = 0; i < left.parameters.length; i++) { + const result = Visit(right.parameters[i], left.parameters[i]); + if (result === StructuralResult.False) + return StructuralResult.False; + } + return StructuralResult.True; + } + } + function Function(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + if (right.properties['length'] !== undefined && right.properties['length'][Types.Kind] === 'Number') + return StructuralResult.True; + if (globalThis.Object.keys(right.properties).length === 0) + return StructuralResult.True; + return StructuralResult.False; + } + else if (!guard_1.TypeGuard.TFunction(right)) { + return StructuralResult.False; + } + else if (right.parameters.length < left.parameters.length) { + return StructuralResult.False; + } + else if (Visit(left.returns, right.returns) === StructuralResult.False) { + return StructuralResult.False; + } + else { + for (let i = 0; i < left.parameters.length; i++) { + const result = Visit(right.parameters[i], left.parameters[i]); + if (result === StructuralResult.False) + return StructuralResult.False; + } + return StructuralResult.True; + } + } + function Integer(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TInteger(right) || guard_1.TypeGuard.TNumber(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Literal(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TRecord(right)) { + if (typeof left.const === 'string') { + return Indexable(left, RecordValue(right)); + } + else { + return StructuralResult.False; + } + } + else if (guard_1.TypeGuard.TLiteral(right) && left.const === right.const) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TString(right) && typeof left.const === 'string') { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TNumber(right) && typeof left.const === 'number') { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TInteger(right) && typeof left.const === 'number') { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TBoolean(right) && typeof left.const === 'boolean') { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Number(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TNumber(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TInteger(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Null(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TNull(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Properties(left, right) { + if (right.size > left.size) + return StructuralResult.False; + if (![...right.keys()].every((rightKey) => left.has(rightKey))) + return StructuralResult.False; + for (const rightKey of right.keys()) { + const leftProp = left.get(rightKey); + const rightProp = right.get(rightKey); + if (Visit(leftProp, rightProp) === StructuralResult.False) { + return StructuralResult.False; + } + } + return StructuralResult.True; + } + function Object(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + return Properties(PropertyMap(left), PropertyMap(right)); + } + else if (guard_1.TypeGuard.TRecord(right)) { + if (!RecordNumberOrStringKey(right)) { + return Properties(PropertyMap(left), PropertyMap(right)); + } + else { + return StructuralResult.True; + } + } + else { + return StructuralResult.False; + } + } + function Promise(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + if (ObjectRightRule(left, right) || globalThis.Object.keys(right.properties).length === 0) { + return StructuralResult.True; + } + else { + return StructuralResult.False; + } + } + else if (!guard_1.TypeGuard.TPromise(right)) { + return StructuralResult.False; + } + else { + const result = Visit(left.item, right.item) !== StructuralResult.False; + return result ? StructuralResult.True : StructuralResult.False; + } + } + function Record(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + if (RecordPattern(left) === '^.*$' && right[Types.Hint] === 'Record') { + return StructuralResult.True; + } + else if (RecordPattern(left) === '^.*$') { + return StructuralResult.False; + } + else { + return globalThis.Object.keys(right.properties).length === 0 ? StructuralResult.True : StructuralResult.False; + } + } + else if (guard_1.TypeGuard.TRecord(right)) { + if (!RecordNumberOrStringKey(left) && !RecordNumberOrStringKey(right)) { + return Properties(PropertyMap(left), PropertyMap(right)); + } + else if (RecordNumberOrStringKey(left) && !RecordNumberOrStringKey(right)) { + const leftKey = RecordKey(left); + const rightKey = RecordKey(right); + if (Visit(rightKey, leftKey) === StructuralResult.False) { + return StructuralResult.False; + } + else { + return StructuralResult.True; + } + } + else { + return StructuralResult.True; + } + } + else { + return StructuralResult.False; + } + } + function Ref(left, right) { + if (!referenceMap.has(left.$ref)) + throw Error(`Cannot locate referenced $id '${left.$ref}'`); + const resolved = referenceMap.get(left.$ref); + return Visit(resolved, right); + } + function Self(left, right) { + if (!referenceMap.has(left.$ref)) + throw Error(`Cannot locate referenced self $id '${left.$ref}'`); + const resolved = referenceMap.get(left.$ref); + return Visit(resolved, right); + } + function String(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TRecord(right)) { + return Indexable(left, RecordValue(right)); + } + else if (guard_1.TypeGuard.TString(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Tuple(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right)) { + const result = ObjectRightRule(left, right) || globalThis.Object.keys(right.properties).length === 0; + return result ? StructuralResult.True : StructuralResult.False; + } + else if (guard_1.TypeGuard.TRecord(right)) { + return Indexable(left, RecordValue(right)); + } + else if (guard_1.TypeGuard.TArray(right)) { + if (right.items === undefined) { + return StructuralResult.False; + } + else if (guard_1.TypeGuard.TUnion(right.items) && left.items) { + const result = left.items.every((left) => UnionRightRule(left, right.items) !== StructuralResult.False); + return result ? StructuralResult.True : StructuralResult.False; + } + else if (guard_1.TypeGuard.TAny(right.items)) { + return StructuralResult.True; + } + else { + return StructuralResult.False; + } + } + if (!guard_1.TypeGuard.TTuple(right)) + return StructuralResult.False; + if (left.items === undefined && right.items === undefined) + return StructuralResult.True; + if (left.items === undefined && right.items !== undefined) + return StructuralResult.False; + if (left.items !== undefined && right.items === undefined) + return StructuralResult.False; + if (left.items === undefined && right.items === undefined) + return StructuralResult.True; + if (left.minItems !== right.minItems || left.maxItems !== right.maxItems) + return StructuralResult.False; + for (let i = 0; i < left.items.length; i++) { + if (Visit(left.items[i], right.items[i]) === StructuralResult.False) + return StructuralResult.False; + } + return StructuralResult.True; + } + function Uint8Array(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TObject(right) && ObjectRightRule(left, right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TRecord(right)) { + return Indexable(left, RecordValue(right)); + } + else if (guard_1.TypeGuard.TUint8Array(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Undefined(left, right) { + if (AnyOrUnknownRule(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUndefined(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TVoid(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnion(right)) { + return UnionRightRule(left, right); + } + else { + return StructuralResult.False; + } + } + function Union(left, right) { + if (left.anyOf.some((left) => guard_1.TypeGuard.TAny(left))) { + return StructuralResult.Union; + } + else if (guard_1.TypeGuard.TUnion(right)) { + const result = left.anyOf.every((left) => right.anyOf.some((right) => Visit(left, right) !== StructuralResult.False)); + return result ? StructuralResult.True : StructuralResult.False; + } + else { + const result = left.anyOf.every((left) => Visit(left, right) !== StructuralResult.False); + return result ? StructuralResult.True : StructuralResult.False; + } + } + function Unknown(left, right) { + if (guard_1.TypeGuard.TUnion(right)) { + const result = right.anyOf.some((right) => guard_1.TypeGuard.TAny(right) || guard_1.TypeGuard.TUnknown(right)); + return result ? StructuralResult.True : StructuralResult.False; + } + else if (guard_1.TypeGuard.TAny(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnknown(right)) { + return StructuralResult.True; + } + else { + return StructuralResult.False; + } + } + function Void(left, right) { + if (guard_1.TypeGuard.TUnion(right)) { + const result = right.anyOf.some((right) => guard_1.TypeGuard.TAny(right) || guard_1.TypeGuard.TUnknown(right)); + return result ? StructuralResult.True : StructuralResult.False; + } + else if (guard_1.TypeGuard.TAny(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TUnknown(right)) { + return StructuralResult.True; + } + else if (guard_1.TypeGuard.TVoid(right)) { + return StructuralResult.True; + } + else { + return StructuralResult.False; + } + } + let recursionDepth = 0; + function Visit(left, right) { + recursionDepth += 1; + if (recursionDepth >= 1000) + return StructuralResult.True; + if (left.$id !== undefined) + referenceMap.set(left.$id, left); + if (right.$id !== undefined) + referenceMap.set(right.$id, right); + const resolvedRight = right[Types.Kind] === 'Self' ? referenceMap.get(right.$ref) : right; + if (guard_1.TypeGuard.TAny(left)) { + return Any(left, resolvedRight); + } + else if (guard_1.TypeGuard.TArray(left)) { + return Array(left, resolvedRight); + } + else if (guard_1.TypeGuard.TBoolean(left)) { + return Boolean(left, resolvedRight); + } + else if (guard_1.TypeGuard.TConstructor(left)) { + return Constructor(left, resolvedRight); + } + else if (guard_1.TypeGuard.TFunction(left)) { + return Function(left, resolvedRight); + } + else if (guard_1.TypeGuard.TInteger(left)) { + return Integer(left, resolvedRight); + } + else if (guard_1.TypeGuard.TLiteral(left)) { + return Literal(left, resolvedRight); + } + else if (guard_1.TypeGuard.TNull(left)) { + return Null(left, resolvedRight); + } + else if (guard_1.TypeGuard.TNumber(left)) { + return Number(left, resolvedRight); + } + else if (guard_1.TypeGuard.TObject(left)) { + return Object(left, resolvedRight); + } + else if (guard_1.TypeGuard.TPromise(left)) { + return Promise(left, resolvedRight); + } + else if (guard_1.TypeGuard.TRecord(left)) { + return Record(left, resolvedRight); + } + else if (guard_1.TypeGuard.TRef(left)) { + return Ref(left, resolvedRight); + } + else if (guard_1.TypeGuard.TSelf(left)) { + return Self(left, resolvedRight); + } + else if (guard_1.TypeGuard.TString(left)) { + return String(left, resolvedRight); + } + else if (guard_1.TypeGuard.TTuple(left)) { + return Tuple(left, resolvedRight); + } + else if (guard_1.TypeGuard.TUndefined(left)) { + return Undefined(left, resolvedRight); + } + else if (guard_1.TypeGuard.TUint8Array(left)) { + return Uint8Array(left, resolvedRight); + } + else if (guard_1.TypeGuard.TUnion(left)) { + return Union(left, resolvedRight); + } + else if (guard_1.TypeGuard.TUnknown(left)) { + return Unknown(left, resolvedRight); + } + else if (guard_1.TypeGuard.TVoid(left)) { + return Void(left, resolvedRight); + } + else { + throw Error(`Structural: Unknown left operand '${left[Types.Kind]}'`); + } + } + /** Structurally tests if the left schema extends the right. */ + function Check(left, right) { + referenceMap.clear(); + recursionDepth = 0; + return Visit(left, right); + } + Structural.Check = Check; +})(Structural = exports.Structural || (exports.Structural = {})); diff --git a/node_modules/@sinclair/typebox/errors/errors.d.ts b/node_modules/@sinclair/typebox/errors/errors.d.ts index 8c250d97..c7dae53f 100644 --- a/node_modules/@sinclair/typebox/errors/errors.d.ts +++ b/node_modules/@sinclair/typebox/errors/errors.d.ts @@ -1,60 +1,60 @@ -import * as Types from '../typebox'; -export declare enum ValueErrorType { - Array = 0, - ArrayMinItems = 1, - ArrayMaxItems = 2, - ArrayUniqueItems = 3, - Boolean = 4, - Function = 5, - Integer = 6, - IntegerMultipleOf = 7, - IntegerExclusiveMinimum = 8, - IntegerExclusiveMaximum = 9, - IntegerMinimum = 10, - IntegerMaximum = 11, - Literal = 12, - Never = 13, - Null = 14, - Number = 15, - NumberMultipleOf = 16, - NumberExclusiveMinimum = 17, - NumberExclusiveMaximum = 18, - NumberMinumum = 19, - NumberMaximum = 20, - Object = 21, - ObjectMinProperties = 22, - ObjectMaxProperties = 23, - ObjectAdditionalProperties = 24, - ObjectRequiredProperties = 25, - Promise = 26, - RecordKeyNumeric = 27, - RecordKeyString = 28, - String = 29, - StringMinLength = 30, - StringMaxLength = 31, - StringPattern = 32, - StringFormatUnknown = 33, - StringFormat = 34, - TupleZeroLength = 35, - TupleLength = 36, - Undefined = 37, - Union = 38, - Uint8Array = 39, - Uint8ArrayMinByteLength = 40, - Uint8ArrayMaxByteLength = 41, - Void = 42 -} -export interface ValueError { - type: ValueErrorType; - schema: Types.TSchema; - path: string; - value: unknown; - message: string; -} -export declare class ValueErrorsUnknownTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare namespace ValueErrors { - function Errors(schema: T, references: Types.TSchema[], value: any): IterableIterator; -} +import * as Types from '../typebox'; +export declare enum ValueErrorType { + Array = 0, + ArrayMinItems = 1, + ArrayMaxItems = 2, + ArrayUniqueItems = 3, + Boolean = 4, + Function = 5, + Integer = 6, + IntegerMultipleOf = 7, + IntegerExclusiveMinimum = 8, + IntegerExclusiveMaximum = 9, + IntegerMinimum = 10, + IntegerMaximum = 11, + Literal = 12, + Never = 13, + Null = 14, + Number = 15, + NumberMultipleOf = 16, + NumberExclusiveMinimum = 17, + NumberExclusiveMaximum = 18, + NumberMinumum = 19, + NumberMaximum = 20, + Object = 21, + ObjectMinProperties = 22, + ObjectMaxProperties = 23, + ObjectAdditionalProperties = 24, + ObjectRequiredProperties = 25, + Promise = 26, + RecordKeyNumeric = 27, + RecordKeyString = 28, + String = 29, + StringMinLength = 30, + StringMaxLength = 31, + StringPattern = 32, + StringFormatUnknown = 33, + StringFormat = 34, + TupleZeroLength = 35, + TupleLength = 36, + Undefined = 37, + Union = 38, + Uint8Array = 39, + Uint8ArrayMinByteLength = 40, + Uint8ArrayMaxByteLength = 41, + Void = 42 +} +export interface ValueError { + type: ValueErrorType; + schema: Types.TSchema; + path: string; + value: unknown; + message: string; +} +export declare class ValueErrorsUnknownTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare namespace ValueErrors { + function Errors(schema: T, references: Types.TSchema[], value: any): IterableIterator; +} diff --git a/node_modules/@sinclair/typebox/errors/errors.js b/node_modules/@sinclair/typebox/errors/errors.js index 79344b61..608986fe 100644 --- a/node_modules/@sinclair/typebox/errors/errors.js +++ b/node_modules/@sinclair/typebox/errors/errors.js @@ -1,398 +1,398 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/errors - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueErrors = exports.ValueErrorsUnknownTypeError = exports.ValueErrorType = void 0; -const Types = require("../typebox"); -const index_1 = require("../format/index"); -// ------------------------------------------------------------------- -// ValueErrorType -// ------------------------------------------------------------------- -var ValueErrorType; -(function (ValueErrorType) { - ValueErrorType[ValueErrorType["Array"] = 0] = "Array"; - ValueErrorType[ValueErrorType["ArrayMinItems"] = 1] = "ArrayMinItems"; - ValueErrorType[ValueErrorType["ArrayMaxItems"] = 2] = "ArrayMaxItems"; - ValueErrorType[ValueErrorType["ArrayUniqueItems"] = 3] = "ArrayUniqueItems"; - ValueErrorType[ValueErrorType["Boolean"] = 4] = "Boolean"; - ValueErrorType[ValueErrorType["Function"] = 5] = "Function"; - ValueErrorType[ValueErrorType["Integer"] = 6] = "Integer"; - ValueErrorType[ValueErrorType["IntegerMultipleOf"] = 7] = "IntegerMultipleOf"; - ValueErrorType[ValueErrorType["IntegerExclusiveMinimum"] = 8] = "IntegerExclusiveMinimum"; - ValueErrorType[ValueErrorType["IntegerExclusiveMaximum"] = 9] = "IntegerExclusiveMaximum"; - ValueErrorType[ValueErrorType["IntegerMinimum"] = 10] = "IntegerMinimum"; - ValueErrorType[ValueErrorType["IntegerMaximum"] = 11] = "IntegerMaximum"; - ValueErrorType[ValueErrorType["Literal"] = 12] = "Literal"; - ValueErrorType[ValueErrorType["Never"] = 13] = "Never"; - ValueErrorType[ValueErrorType["Null"] = 14] = "Null"; - ValueErrorType[ValueErrorType["Number"] = 15] = "Number"; - ValueErrorType[ValueErrorType["NumberMultipleOf"] = 16] = "NumberMultipleOf"; - ValueErrorType[ValueErrorType["NumberExclusiveMinimum"] = 17] = "NumberExclusiveMinimum"; - ValueErrorType[ValueErrorType["NumberExclusiveMaximum"] = 18] = "NumberExclusiveMaximum"; - ValueErrorType[ValueErrorType["NumberMinumum"] = 19] = "NumberMinumum"; - ValueErrorType[ValueErrorType["NumberMaximum"] = 20] = "NumberMaximum"; - ValueErrorType[ValueErrorType["Object"] = 21] = "Object"; - ValueErrorType[ValueErrorType["ObjectMinProperties"] = 22] = "ObjectMinProperties"; - ValueErrorType[ValueErrorType["ObjectMaxProperties"] = 23] = "ObjectMaxProperties"; - ValueErrorType[ValueErrorType["ObjectAdditionalProperties"] = 24] = "ObjectAdditionalProperties"; - ValueErrorType[ValueErrorType["ObjectRequiredProperties"] = 25] = "ObjectRequiredProperties"; - ValueErrorType[ValueErrorType["Promise"] = 26] = "Promise"; - ValueErrorType[ValueErrorType["RecordKeyNumeric"] = 27] = "RecordKeyNumeric"; - ValueErrorType[ValueErrorType["RecordKeyString"] = 28] = "RecordKeyString"; - ValueErrorType[ValueErrorType["String"] = 29] = "String"; - ValueErrorType[ValueErrorType["StringMinLength"] = 30] = "StringMinLength"; - ValueErrorType[ValueErrorType["StringMaxLength"] = 31] = "StringMaxLength"; - ValueErrorType[ValueErrorType["StringPattern"] = 32] = "StringPattern"; - ValueErrorType[ValueErrorType["StringFormatUnknown"] = 33] = "StringFormatUnknown"; - ValueErrorType[ValueErrorType["StringFormat"] = 34] = "StringFormat"; - ValueErrorType[ValueErrorType["TupleZeroLength"] = 35] = "TupleZeroLength"; - ValueErrorType[ValueErrorType["TupleLength"] = 36] = "TupleLength"; - ValueErrorType[ValueErrorType["Undefined"] = 37] = "Undefined"; - ValueErrorType[ValueErrorType["Union"] = 38] = "Union"; - ValueErrorType[ValueErrorType["Uint8Array"] = 39] = "Uint8Array"; - ValueErrorType[ValueErrorType["Uint8ArrayMinByteLength"] = 40] = "Uint8ArrayMinByteLength"; - ValueErrorType[ValueErrorType["Uint8ArrayMaxByteLength"] = 41] = "Uint8ArrayMaxByteLength"; - ValueErrorType[ValueErrorType["Void"] = 42] = "Void"; -})(ValueErrorType = exports.ValueErrorType || (exports.ValueErrorType = {})); -// ------------------------------------------------------------------- -// ValueErrors -// ------------------------------------------------------------------- -class ValueErrorsUnknownTypeError extends Error { - constructor(schema) { - super('ValueErrors: Unknown type'); - this.schema = schema; - } -} -exports.ValueErrorsUnknownTypeError = ValueErrorsUnknownTypeError; -var ValueErrors; -(function (ValueErrors) { - function* Any(schema, references, path, value) { } - function* Array(schema, references, path, value) { - if (!globalThis.Array.isArray(value)) { - return yield { type: ValueErrorType.Array, schema, path, value, message: `Expected array` }; - } - if (schema.minItems !== undefined && !(value.length >= schema.minItems)) { - yield { type: ValueErrorType.ArrayMinItems, schema, path, value, message: `Expected array length to be greater or equal to ${schema.minItems}` }; - } - if (schema.maxItems !== undefined && !(value.length <= schema.maxItems)) { - yield { type: ValueErrorType.ArrayMinItems, schema, path, value, message: `Expected array length to be less or equal to ${schema.maxItems}` }; - } - if (schema.uniqueItems === true && !(new Set(value).size === value.length)) { - yield { type: ValueErrorType.ArrayUniqueItems, schema, path, value, message: `Expected array elements to be unique` }; - } - for (let i = 0; i < value.length; i++) { - yield* Visit(schema.items, references, `${path}/${i}`, value[i]); - } - } - function* Boolean(schema, references, path, value) { - if (!(typeof value === 'boolean')) { - return yield { type: ValueErrorType.Boolean, schema, path, value, message: `Expected boolean` }; - } - } - function* Constructor(schema, references, path, value) { - yield* Visit(schema.returns, references, path, value.prototype); - } - function* Function(schema, references, path, value) { - if (!(typeof value === 'function')) { - return yield { type: ValueErrorType.Function, schema, path, value, message: `Expected function` }; - } - } - function* Integer(schema, references, path, value) { - if (!(typeof value === 'number')) { - return yield { type: ValueErrorType.Number, schema, path, value, message: `Expected number` }; - } - if (!globalThis.Number.isInteger(value)) { - yield { type: ValueErrorType.Integer, schema, path, value, message: `Expected integer` }; - } - if (schema.multipleOf && !(value % schema.multipleOf === 0)) { - yield { type: ValueErrorType.IntegerMultipleOf, schema, path, value, message: `Expected integer to be a multiple of ${schema.multipleOf}` }; - } - if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { - yield { type: ValueErrorType.IntegerExclusiveMinimum, schema, path, value, message: `Expected integer to be greater than ${schema.exclusiveMinimum}` }; - } - if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { - yield { type: ValueErrorType.IntegerExclusiveMaximum, schema, path, value, message: `Expected integer to be less than ${schema.exclusiveMaximum}` }; - } - if (schema.minimum && !(value >= schema.minimum)) { - yield { type: ValueErrorType.IntegerMinimum, schema, path, value, message: `Expected integer to be greater or equal to ${schema.minimum}` }; - } - if (schema.maximum && !(value <= schema.maximum)) { - yield { type: ValueErrorType.IntegerMaximum, schema, path, value, message: `Expected integer to be less or equal to ${schema.maximum}` }; - } - } - function* Literal(schema, references, path, value) { - if (!(value === schema.const)) { - const error = typeof schema.const === 'string' ? `'${schema.const}'` : schema.const; - return yield { type: ValueErrorType.Literal, schema, path, value, message: `Expected ${error}` }; - } - } - function* Never(schema, references, path, value) { - yield { type: ValueErrorType.Never, schema, path, value, message: `Value cannot be validated` }; - } - function* Null(schema, references, path, value) { - if (!(value === null)) { - return yield { type: ValueErrorType.Null, schema, path, value, message: `Expected null` }; - } - } - function* Number(schema, references, path, value) { - if (!(typeof value === 'number')) { - return yield { type: ValueErrorType.Number, schema, path, value, message: `Expected number` }; - } - if (schema.multipleOf && !(value % schema.multipleOf === 0)) { - yield { type: ValueErrorType.NumberMultipleOf, schema, path, value, message: `Expected number to be a multiple of ${schema.multipleOf}` }; - } - if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { - yield { type: ValueErrorType.NumberExclusiveMinimum, schema, path, value, message: `Expected number to be greater than ${schema.exclusiveMinimum}` }; - } - if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { - yield { type: ValueErrorType.NumberExclusiveMaximum, schema, path, value, message: `Expected number to be less than ${schema.exclusiveMaximum}` }; - } - if (schema.minimum && !(value >= schema.minimum)) { - yield { type: ValueErrorType.NumberMaximum, schema, path, value, message: `Expected number to be greater or equal to ${schema.minimum}` }; - } - if (schema.maximum && !(value <= schema.maximum)) { - yield { type: ValueErrorType.NumberMinumum, schema, path, value, message: `Expected number to be less or equal to ${schema.maximum}` }; - } - } - function* Object(schema, references, path, value) { - if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { - return yield { type: ValueErrorType.Object, schema, path, value, message: `Expected object` }; - } - if (schema.minProperties !== undefined && !(globalThis.Object.keys(value).length >= schema.minProperties)) { - yield { type: ValueErrorType.ObjectMinProperties, schema, path, value, message: `Expected object to have at least ${schema.minProperties} properties` }; - } - if (schema.maxProperties !== undefined && !(globalThis.Object.keys(value).length <= schema.maxProperties)) { - yield { type: ValueErrorType.ObjectMaxProperties, schema, path, value, message: `Expected object to have less than ${schema.minProperties} properties` }; - } - const propertyKeys = globalThis.Object.keys(schema.properties); - if (schema.additionalProperties === false) { - for (const objectKey of globalThis.Object.keys(value)) { - if (!propertyKeys.includes(objectKey)) { - yield { type: ValueErrorType.ObjectAdditionalProperties, schema, path: `${path}/${objectKey}`, value: value[objectKey], message: `Unexpected property` }; - } - } - } - if (schema.required && schema.required.length > 0) { - const objectKeys = globalThis.Object.keys(value); - for (const requiredKey of schema.required) { - if (objectKeys.includes(requiredKey)) - continue; - yield { type: ValueErrorType.ObjectRequiredProperties, schema: schema.properties[requiredKey], path: `${path}/${requiredKey}`, value: undefined, message: `Expected required property` }; - } - } - if (typeof schema.additionalProperties === 'object') { - for (const objectKey of globalThis.Object.keys(value)) { - if (propertyKeys.includes(objectKey)) - continue; - yield* Visit(schema.additionalProperties, references, `${path}/${objectKey}`, value[objectKey]); - } - } - for (const propertyKey of propertyKeys) { - const propertySchema = schema.properties[propertyKey]; - if (schema.required && schema.required.includes(propertyKey)) { - yield* Visit(propertySchema, references, `${path}/${propertyKey}`, value[propertyKey]); - } - else { - if (value[propertyKey] !== undefined) { - yield* Visit(propertySchema, references, `${path}/${propertyKey}`, value[propertyKey]); - } - } - } - } - function* Promise(schema, references, path, value) { - if (!(typeof value === 'object' && typeof value.then === 'function')) { - yield { type: ValueErrorType.Promise, schema, path, value, message: `Expected Promise` }; - } - } - function* Record(schema, references, path, value) { - if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { - return yield { type: ValueErrorType.Object, schema, path, value, message: `Expected object` }; - } - const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; - const regex = new RegExp(keyPattern); - if (!globalThis.Object.keys(value).every((key) => regex.test(key))) { - const numeric = keyPattern === '^(0|[1-9][0-9]*)$'; - const type = numeric ? ValueErrorType.RecordKeyNumeric : ValueErrorType.RecordKeyString; - const message = numeric ? 'Expected all object property keys to be numeric' : 'Expected all object property keys to be strings'; - return yield { type, schema, path, value, message }; - } - for (const [propKey, propValue] of globalThis.Object.entries(value)) { - yield* Visit(valueSchema, references, `${path}/${propKey}`, propValue); - } - } - function* Ref(schema, references, path, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueErrors.Ref: Cannot find schema with $id '${schema.$ref}'.`); - yield* Visit(reference, references, path, value); - } - function* Self(schema, references, path, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueErrors.Self: Cannot find schema with $id '${schema.$ref}'.`); - yield* Visit(reference, references, path, value); - } - function* String(schema, references, path, value) { - if (!(typeof value === 'string')) { - return yield { type: ValueErrorType.String, schema, path, value, message: 'Expected string' }; - } - if (schema.minLength !== undefined && !(value.length >= schema.minLength)) { - yield { type: ValueErrorType.StringMinLength, schema, path, value, message: `Expected string length greater or equal to ${schema.minLength}` }; - } - if (schema.maxLength !== undefined && !(value.length <= schema.maxLength)) { - yield { type: ValueErrorType.StringMaxLength, schema, path, value, message: `Expected string length less or equal to ${schema.maxLength}` }; - } - if (schema.pattern !== undefined) { - const regex = new RegExp(schema.pattern); - if (!regex.test(value)) { - yield { type: ValueErrorType.StringPattern, schema, path, value, message: `Expected string to match pattern ${schema.pattern}` }; - } - } - if (schema.format !== undefined) { - if (!index_1.Format.Has(schema.format)) { - yield { type: ValueErrorType.StringFormatUnknown, schema, path, value, message: `Unknown string format '${schema.format}'` }; - } - else { - const format = index_1.Format.Get(schema.format); - if (!format(value)) { - yield { type: ValueErrorType.StringFormat, schema, path, value, message: `Expected string to match format '${schema.format}'` }; - } - } - } - } - function* Tuple(schema, references, path, value) { - if (!globalThis.Array.isArray(value)) { - return yield { type: ValueErrorType.Array, schema, path, value, message: 'Expected Array' }; - } - if (schema.items === undefined && !(value.length === 0)) { - return yield { type: ValueErrorType.TupleZeroLength, schema, path, value, message: 'Expected tuple to have 0 elements' }; - } - if (!(value.length === schema.maxItems)) { - yield { type: ValueErrorType.TupleLength, schema, path, value, message: `Expected tuple to have ${schema.maxItems} elements` }; - } - if (!schema.items) { - return; - } - for (let i = 0; i < schema.items.length; i++) { - yield* Visit(schema.items[i], references, `${path}/${i}`, value[i]); - } - } - function* Undefined(schema, references, path, value) { - if (!(value === undefined)) { - yield { type: ValueErrorType.Undefined, schema, path, value, message: `Expected undefined` }; - } - } - function* Union(schema, references, path, value) { - const errors = []; - for (const inner of schema.anyOf) { - const variantErrors = [...Visit(inner, references, path, value)]; - if (variantErrors.length === 0) - return; - errors.push(...variantErrors); - } - for (const error of errors) { - yield error; - } - if (errors.length > 0) { - yield { type: ValueErrorType.Union, schema, path, value, message: 'Expected value of union' }; - } - } - function* Uint8Array(schema, references, path, value) { - if (!(value instanceof globalThis.Uint8Array)) { - return yield { type: ValueErrorType.Uint8Array, schema, path, value, message: `Expected Uint8Array` }; - } - if (schema.maxByteLength && !(value.length <= schema.maxByteLength)) { - yield { type: ValueErrorType.Uint8ArrayMaxByteLength, schema, path, value, message: `Expected Uint8Array to have a byte length less or equal to ${schema.maxByteLength}` }; - } - if (schema.minByteLength && !(value.length >= schema.minByteLength)) { - yield { type: ValueErrorType.Uint8ArrayMinByteLength, schema, path, value, message: `Expected Uint8Array to have a byte length greater or equal to ${schema.maxByteLength}` }; - } - } - function* Unknown(schema, references, path, value) { } - function* Void(schema, references, path, value) { - if (!(value === null)) { - return yield { type: ValueErrorType.Void, schema, path, value, message: `Expected null` }; - } - } - function* Visit(schema, references, path, value) { - const anyReferences = schema.$id === undefined ? references : [schema, ...references]; - const anySchema = schema; - switch (anySchema[Types.Kind]) { - case 'Any': - return yield* Any(anySchema, anyReferences, path, value); - case 'Array': - return yield* Array(anySchema, anyReferences, path, value); - case 'Boolean': - return yield* Boolean(anySchema, anyReferences, path, value); - case 'Constructor': - return yield* Constructor(anySchema, anyReferences, path, value); - case 'Function': - return yield* Function(anySchema, anyReferences, path, value); - case 'Integer': - return yield* Integer(anySchema, anyReferences, path, value); - case 'Literal': - return yield* Literal(anySchema, anyReferences, path, value); - case 'Never': - return yield* Never(anySchema, anyReferences, path, value); - case 'Null': - return yield* Null(anySchema, anyReferences, path, value); - case 'Number': - return yield* Number(anySchema, anyReferences, path, value); - case 'Object': - return yield* Object(anySchema, anyReferences, path, value); - case 'Promise': - return yield* Promise(anySchema, anyReferences, path, value); - case 'Record': - return yield* Record(anySchema, anyReferences, path, value); - case 'Ref': - return yield* Ref(anySchema, anyReferences, path, value); - case 'Self': - return yield* Self(anySchema, anyReferences, path, value); - case 'String': - return yield* String(anySchema, anyReferences, path, value); - case 'Tuple': - return yield* Tuple(anySchema, anyReferences, path, value); - case 'Undefined': - return yield* Undefined(anySchema, anyReferences, path, value); - case 'Union': - return yield* Union(anySchema, anyReferences, path, value); - case 'Uint8Array': - return yield* Uint8Array(anySchema, anyReferences, path, value); - case 'Unknown': - return yield* Unknown(anySchema, anyReferences, path, value); - case 'Void': - return yield* Void(anySchema, anyReferences, path, value); - default: - throw new ValueErrorsUnknownTypeError(schema); - } - } - function* Errors(schema, references, value) { - yield* Visit(schema, references, '', value); - } - ValueErrors.Errors = Errors; -})(ValueErrors = exports.ValueErrors || (exports.ValueErrors = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/errors + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueErrors = exports.ValueErrorsUnknownTypeError = exports.ValueErrorType = void 0; +const Types = require("../typebox"); +const index_1 = require("../format/index"); +// ------------------------------------------------------------------- +// ValueErrorType +// ------------------------------------------------------------------- +var ValueErrorType; +(function (ValueErrorType) { + ValueErrorType[ValueErrorType["Array"] = 0] = "Array"; + ValueErrorType[ValueErrorType["ArrayMinItems"] = 1] = "ArrayMinItems"; + ValueErrorType[ValueErrorType["ArrayMaxItems"] = 2] = "ArrayMaxItems"; + ValueErrorType[ValueErrorType["ArrayUniqueItems"] = 3] = "ArrayUniqueItems"; + ValueErrorType[ValueErrorType["Boolean"] = 4] = "Boolean"; + ValueErrorType[ValueErrorType["Function"] = 5] = "Function"; + ValueErrorType[ValueErrorType["Integer"] = 6] = "Integer"; + ValueErrorType[ValueErrorType["IntegerMultipleOf"] = 7] = "IntegerMultipleOf"; + ValueErrorType[ValueErrorType["IntegerExclusiveMinimum"] = 8] = "IntegerExclusiveMinimum"; + ValueErrorType[ValueErrorType["IntegerExclusiveMaximum"] = 9] = "IntegerExclusiveMaximum"; + ValueErrorType[ValueErrorType["IntegerMinimum"] = 10] = "IntegerMinimum"; + ValueErrorType[ValueErrorType["IntegerMaximum"] = 11] = "IntegerMaximum"; + ValueErrorType[ValueErrorType["Literal"] = 12] = "Literal"; + ValueErrorType[ValueErrorType["Never"] = 13] = "Never"; + ValueErrorType[ValueErrorType["Null"] = 14] = "Null"; + ValueErrorType[ValueErrorType["Number"] = 15] = "Number"; + ValueErrorType[ValueErrorType["NumberMultipleOf"] = 16] = "NumberMultipleOf"; + ValueErrorType[ValueErrorType["NumberExclusiveMinimum"] = 17] = "NumberExclusiveMinimum"; + ValueErrorType[ValueErrorType["NumberExclusiveMaximum"] = 18] = "NumberExclusiveMaximum"; + ValueErrorType[ValueErrorType["NumberMinumum"] = 19] = "NumberMinumum"; + ValueErrorType[ValueErrorType["NumberMaximum"] = 20] = "NumberMaximum"; + ValueErrorType[ValueErrorType["Object"] = 21] = "Object"; + ValueErrorType[ValueErrorType["ObjectMinProperties"] = 22] = "ObjectMinProperties"; + ValueErrorType[ValueErrorType["ObjectMaxProperties"] = 23] = "ObjectMaxProperties"; + ValueErrorType[ValueErrorType["ObjectAdditionalProperties"] = 24] = "ObjectAdditionalProperties"; + ValueErrorType[ValueErrorType["ObjectRequiredProperties"] = 25] = "ObjectRequiredProperties"; + ValueErrorType[ValueErrorType["Promise"] = 26] = "Promise"; + ValueErrorType[ValueErrorType["RecordKeyNumeric"] = 27] = "RecordKeyNumeric"; + ValueErrorType[ValueErrorType["RecordKeyString"] = 28] = "RecordKeyString"; + ValueErrorType[ValueErrorType["String"] = 29] = "String"; + ValueErrorType[ValueErrorType["StringMinLength"] = 30] = "StringMinLength"; + ValueErrorType[ValueErrorType["StringMaxLength"] = 31] = "StringMaxLength"; + ValueErrorType[ValueErrorType["StringPattern"] = 32] = "StringPattern"; + ValueErrorType[ValueErrorType["StringFormatUnknown"] = 33] = "StringFormatUnknown"; + ValueErrorType[ValueErrorType["StringFormat"] = 34] = "StringFormat"; + ValueErrorType[ValueErrorType["TupleZeroLength"] = 35] = "TupleZeroLength"; + ValueErrorType[ValueErrorType["TupleLength"] = 36] = "TupleLength"; + ValueErrorType[ValueErrorType["Undefined"] = 37] = "Undefined"; + ValueErrorType[ValueErrorType["Union"] = 38] = "Union"; + ValueErrorType[ValueErrorType["Uint8Array"] = 39] = "Uint8Array"; + ValueErrorType[ValueErrorType["Uint8ArrayMinByteLength"] = 40] = "Uint8ArrayMinByteLength"; + ValueErrorType[ValueErrorType["Uint8ArrayMaxByteLength"] = 41] = "Uint8ArrayMaxByteLength"; + ValueErrorType[ValueErrorType["Void"] = 42] = "Void"; +})(ValueErrorType = exports.ValueErrorType || (exports.ValueErrorType = {})); +// ------------------------------------------------------------------- +// ValueErrors +// ------------------------------------------------------------------- +class ValueErrorsUnknownTypeError extends Error { + constructor(schema) { + super('ValueErrors: Unknown type'); + this.schema = schema; + } +} +exports.ValueErrorsUnknownTypeError = ValueErrorsUnknownTypeError; +var ValueErrors; +(function (ValueErrors) { + function* Any(schema, references, path, value) { } + function* Array(schema, references, path, value) { + if (!globalThis.Array.isArray(value)) { + return yield { type: ValueErrorType.Array, schema, path, value, message: `Expected array` }; + } + if (schema.minItems !== undefined && !(value.length >= schema.minItems)) { + yield { type: ValueErrorType.ArrayMinItems, schema, path, value, message: `Expected array length to be greater or equal to ${schema.minItems}` }; + } + if (schema.maxItems !== undefined && !(value.length <= schema.maxItems)) { + yield { type: ValueErrorType.ArrayMinItems, schema, path, value, message: `Expected array length to be less or equal to ${schema.maxItems}` }; + } + if (schema.uniqueItems === true && !(new Set(value).size === value.length)) { + yield { type: ValueErrorType.ArrayUniqueItems, schema, path, value, message: `Expected array elements to be unique` }; + } + for (let i = 0; i < value.length; i++) { + yield* Visit(schema.items, references, `${path}/${i}`, value[i]); + } + } + function* Boolean(schema, references, path, value) { + if (!(typeof value === 'boolean')) { + return yield { type: ValueErrorType.Boolean, schema, path, value, message: `Expected boolean` }; + } + } + function* Constructor(schema, references, path, value) { + yield* Visit(schema.returns, references, path, value.prototype); + } + function* Function(schema, references, path, value) { + if (!(typeof value === 'function')) { + return yield { type: ValueErrorType.Function, schema, path, value, message: `Expected function` }; + } + } + function* Integer(schema, references, path, value) { + if (!(typeof value === 'number')) { + return yield { type: ValueErrorType.Number, schema, path, value, message: `Expected number` }; + } + if (!globalThis.Number.isInteger(value)) { + yield { type: ValueErrorType.Integer, schema, path, value, message: `Expected integer` }; + } + if (schema.multipleOf && !(value % schema.multipleOf === 0)) { + yield { type: ValueErrorType.IntegerMultipleOf, schema, path, value, message: `Expected integer to be a multiple of ${schema.multipleOf}` }; + } + if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { + yield { type: ValueErrorType.IntegerExclusiveMinimum, schema, path, value, message: `Expected integer to be greater than ${schema.exclusiveMinimum}` }; + } + if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { + yield { type: ValueErrorType.IntegerExclusiveMaximum, schema, path, value, message: `Expected integer to be less than ${schema.exclusiveMaximum}` }; + } + if (schema.minimum && !(value >= schema.minimum)) { + yield { type: ValueErrorType.IntegerMinimum, schema, path, value, message: `Expected integer to be greater or equal to ${schema.minimum}` }; + } + if (schema.maximum && !(value <= schema.maximum)) { + yield { type: ValueErrorType.IntegerMaximum, schema, path, value, message: `Expected integer to be less or equal to ${schema.maximum}` }; + } + } + function* Literal(schema, references, path, value) { + if (!(value === schema.const)) { + const error = typeof schema.const === 'string' ? `'${schema.const}'` : schema.const; + return yield { type: ValueErrorType.Literal, schema, path, value, message: `Expected ${error}` }; + } + } + function* Never(schema, references, path, value) { + yield { type: ValueErrorType.Never, schema, path, value, message: `Value cannot be validated` }; + } + function* Null(schema, references, path, value) { + if (!(value === null)) { + return yield { type: ValueErrorType.Null, schema, path, value, message: `Expected null` }; + } + } + function* Number(schema, references, path, value) { + if (!(typeof value === 'number')) { + return yield { type: ValueErrorType.Number, schema, path, value, message: `Expected number` }; + } + if (schema.multipleOf && !(value % schema.multipleOf === 0)) { + yield { type: ValueErrorType.NumberMultipleOf, schema, path, value, message: `Expected number to be a multiple of ${schema.multipleOf}` }; + } + if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { + yield { type: ValueErrorType.NumberExclusiveMinimum, schema, path, value, message: `Expected number to be greater than ${schema.exclusiveMinimum}` }; + } + if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { + yield { type: ValueErrorType.NumberExclusiveMaximum, schema, path, value, message: `Expected number to be less than ${schema.exclusiveMaximum}` }; + } + if (schema.minimum && !(value >= schema.minimum)) { + yield { type: ValueErrorType.NumberMaximum, schema, path, value, message: `Expected number to be greater or equal to ${schema.minimum}` }; + } + if (schema.maximum && !(value <= schema.maximum)) { + yield { type: ValueErrorType.NumberMinumum, schema, path, value, message: `Expected number to be less or equal to ${schema.maximum}` }; + } + } + function* Object(schema, references, path, value) { + if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { + return yield { type: ValueErrorType.Object, schema, path, value, message: `Expected object` }; + } + if (schema.minProperties !== undefined && !(globalThis.Object.keys(value).length >= schema.minProperties)) { + yield { type: ValueErrorType.ObjectMinProperties, schema, path, value, message: `Expected object to have at least ${schema.minProperties} properties` }; + } + if (schema.maxProperties !== undefined && !(globalThis.Object.keys(value).length <= schema.maxProperties)) { + yield { type: ValueErrorType.ObjectMaxProperties, schema, path, value, message: `Expected object to have less than ${schema.minProperties} properties` }; + } + const propertyKeys = globalThis.Object.keys(schema.properties); + if (schema.additionalProperties === false) { + for (const objectKey of globalThis.Object.keys(value)) { + if (!propertyKeys.includes(objectKey)) { + yield { type: ValueErrorType.ObjectAdditionalProperties, schema, path: `${path}/${objectKey}`, value: value[objectKey], message: `Unexpected property` }; + } + } + } + if (schema.required && schema.required.length > 0) { + const objectKeys = globalThis.Object.keys(value); + for (const requiredKey of schema.required) { + if (objectKeys.includes(requiredKey)) + continue; + yield { type: ValueErrorType.ObjectRequiredProperties, schema: schema.properties[requiredKey], path: `${path}/${requiredKey}`, value: undefined, message: `Expected required property` }; + } + } + if (typeof schema.additionalProperties === 'object') { + for (const objectKey of globalThis.Object.keys(value)) { + if (propertyKeys.includes(objectKey)) + continue; + yield* Visit(schema.additionalProperties, references, `${path}/${objectKey}`, value[objectKey]); + } + } + for (const propertyKey of propertyKeys) { + const propertySchema = schema.properties[propertyKey]; + if (schema.required && schema.required.includes(propertyKey)) { + yield* Visit(propertySchema, references, `${path}/${propertyKey}`, value[propertyKey]); + } + else { + if (value[propertyKey] !== undefined) { + yield* Visit(propertySchema, references, `${path}/${propertyKey}`, value[propertyKey]); + } + } + } + } + function* Promise(schema, references, path, value) { + if (!(typeof value === 'object' && typeof value.then === 'function')) { + yield { type: ValueErrorType.Promise, schema, path, value, message: `Expected Promise` }; + } + } + function* Record(schema, references, path, value) { + if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { + return yield { type: ValueErrorType.Object, schema, path, value, message: `Expected object` }; + } + const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; + const regex = new RegExp(keyPattern); + if (!globalThis.Object.keys(value).every((key) => regex.test(key))) { + const numeric = keyPattern === '^(0|[1-9][0-9]*)$'; + const type = numeric ? ValueErrorType.RecordKeyNumeric : ValueErrorType.RecordKeyString; + const message = numeric ? 'Expected all object property keys to be numeric' : 'Expected all object property keys to be strings'; + return yield { type, schema, path, value, message }; + } + for (const [propKey, propValue] of globalThis.Object.entries(value)) { + yield* Visit(valueSchema, references, `${path}/${propKey}`, propValue); + } + } + function* Ref(schema, references, path, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueErrors.Ref: Cannot find schema with $id '${schema.$ref}'.`); + yield* Visit(reference, references, path, value); + } + function* Self(schema, references, path, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueErrors.Self: Cannot find schema with $id '${schema.$ref}'.`); + yield* Visit(reference, references, path, value); + } + function* String(schema, references, path, value) { + if (!(typeof value === 'string')) { + return yield { type: ValueErrorType.String, schema, path, value, message: 'Expected string' }; + } + if (schema.minLength !== undefined && !(value.length >= schema.minLength)) { + yield { type: ValueErrorType.StringMinLength, schema, path, value, message: `Expected string length greater or equal to ${schema.minLength}` }; + } + if (schema.maxLength !== undefined && !(value.length <= schema.maxLength)) { + yield { type: ValueErrorType.StringMaxLength, schema, path, value, message: `Expected string length less or equal to ${schema.maxLength}` }; + } + if (schema.pattern !== undefined) { + const regex = new RegExp(schema.pattern); + if (!regex.test(value)) { + yield { type: ValueErrorType.StringPattern, schema, path, value, message: `Expected string to match pattern ${schema.pattern}` }; + } + } + if (schema.format !== undefined) { + if (!index_1.Format.Has(schema.format)) { + yield { type: ValueErrorType.StringFormatUnknown, schema, path, value, message: `Unknown string format '${schema.format}'` }; + } + else { + const format = index_1.Format.Get(schema.format); + if (!format(value)) { + yield { type: ValueErrorType.StringFormat, schema, path, value, message: `Expected string to match format '${schema.format}'` }; + } + } + } + } + function* Tuple(schema, references, path, value) { + if (!globalThis.Array.isArray(value)) { + return yield { type: ValueErrorType.Array, schema, path, value, message: 'Expected Array' }; + } + if (schema.items === undefined && !(value.length === 0)) { + return yield { type: ValueErrorType.TupleZeroLength, schema, path, value, message: 'Expected tuple to have 0 elements' }; + } + if (!(value.length === schema.maxItems)) { + yield { type: ValueErrorType.TupleLength, schema, path, value, message: `Expected tuple to have ${schema.maxItems} elements` }; + } + if (!schema.items) { + return; + } + for (let i = 0; i < schema.items.length; i++) { + yield* Visit(schema.items[i], references, `${path}/${i}`, value[i]); + } + } + function* Undefined(schema, references, path, value) { + if (!(value === undefined)) { + yield { type: ValueErrorType.Undefined, schema, path, value, message: `Expected undefined` }; + } + } + function* Union(schema, references, path, value) { + const errors = []; + for (const inner of schema.anyOf) { + const variantErrors = [...Visit(inner, references, path, value)]; + if (variantErrors.length === 0) + return; + errors.push(...variantErrors); + } + for (const error of errors) { + yield error; + } + if (errors.length > 0) { + yield { type: ValueErrorType.Union, schema, path, value, message: 'Expected value of union' }; + } + } + function* Uint8Array(schema, references, path, value) { + if (!(value instanceof globalThis.Uint8Array)) { + return yield { type: ValueErrorType.Uint8Array, schema, path, value, message: `Expected Uint8Array` }; + } + if (schema.maxByteLength && !(value.length <= schema.maxByteLength)) { + yield { type: ValueErrorType.Uint8ArrayMaxByteLength, schema, path, value, message: `Expected Uint8Array to have a byte length less or equal to ${schema.maxByteLength}` }; + } + if (schema.minByteLength && !(value.length >= schema.minByteLength)) { + yield { type: ValueErrorType.Uint8ArrayMinByteLength, schema, path, value, message: `Expected Uint8Array to have a byte length greater or equal to ${schema.maxByteLength}` }; + } + } + function* Unknown(schema, references, path, value) { } + function* Void(schema, references, path, value) { + if (!(value === null)) { + return yield { type: ValueErrorType.Void, schema, path, value, message: `Expected null` }; + } + } + function* Visit(schema, references, path, value) { + const anyReferences = schema.$id === undefined ? references : [schema, ...references]; + const anySchema = schema; + switch (anySchema[Types.Kind]) { + case 'Any': + return yield* Any(anySchema, anyReferences, path, value); + case 'Array': + return yield* Array(anySchema, anyReferences, path, value); + case 'Boolean': + return yield* Boolean(anySchema, anyReferences, path, value); + case 'Constructor': + return yield* Constructor(anySchema, anyReferences, path, value); + case 'Function': + return yield* Function(anySchema, anyReferences, path, value); + case 'Integer': + return yield* Integer(anySchema, anyReferences, path, value); + case 'Literal': + return yield* Literal(anySchema, anyReferences, path, value); + case 'Never': + return yield* Never(anySchema, anyReferences, path, value); + case 'Null': + return yield* Null(anySchema, anyReferences, path, value); + case 'Number': + return yield* Number(anySchema, anyReferences, path, value); + case 'Object': + return yield* Object(anySchema, anyReferences, path, value); + case 'Promise': + return yield* Promise(anySchema, anyReferences, path, value); + case 'Record': + return yield* Record(anySchema, anyReferences, path, value); + case 'Ref': + return yield* Ref(anySchema, anyReferences, path, value); + case 'Self': + return yield* Self(anySchema, anyReferences, path, value); + case 'String': + return yield* String(anySchema, anyReferences, path, value); + case 'Tuple': + return yield* Tuple(anySchema, anyReferences, path, value); + case 'Undefined': + return yield* Undefined(anySchema, anyReferences, path, value); + case 'Union': + return yield* Union(anySchema, anyReferences, path, value); + case 'Uint8Array': + return yield* Uint8Array(anySchema, anyReferences, path, value); + case 'Unknown': + return yield* Unknown(anySchema, anyReferences, path, value); + case 'Void': + return yield* Void(anySchema, anyReferences, path, value); + default: + throw new ValueErrorsUnknownTypeError(schema); + } + } + function* Errors(schema, references, value) { + yield* Visit(schema, references, '', value); + } + ValueErrors.Errors = Errors; +})(ValueErrors = exports.ValueErrors || (exports.ValueErrors = {})); diff --git a/node_modules/@sinclair/typebox/errors/index.d.ts b/node_modules/@sinclair/typebox/errors/index.d.ts index f72bc43e..ed7caeda 100644 --- a/node_modules/@sinclair/typebox/errors/index.d.ts +++ b/node_modules/@sinclair/typebox/errors/index.d.ts @@ -1 +1 @@ -export * from './errors'; +export * from './errors'; diff --git a/node_modules/@sinclair/typebox/errors/index.js b/node_modules/@sinclair/typebox/errors/index.js index 5f1dd1b5..46873b79 100644 --- a/node_modules/@sinclair/typebox/errors/index.js +++ b/node_modules/@sinclair/typebox/errors/index.js @@ -1,44 +1,44 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/errors - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./errors"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/errors + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./errors"), exports); diff --git a/node_modules/@sinclair/typebox/format/format.d.ts b/node_modules/@sinclair/typebox/format/format.d.ts index a1f3406c..b48e1c6c 100644 --- a/node_modules/@sinclair/typebox/format/format.d.ts +++ b/node_modules/@sinclair/typebox/format/format.d.ts @@ -1,12 +1,12 @@ -export declare type FormatValidationFunction = (value: string) => boolean; -/** Shared string formats used by the TypeCompiler and Value modules */ -export declare namespace Format { - /** Clears all formats */ - function Clear(): void; - /** Returns true if the string format exists */ - function Has(format: string): boolean; - /** Sets a string format validation function */ - function Set(format: string, func: FormatValidationFunction): void; - /** Gets a string format validation function */ - function Get(format: string): FormatValidationFunction | undefined; -} +export declare type FormatValidationFunction = (value: string) => boolean; +/** Shared string formats used by the TypeCompiler and Value modules */ +export declare namespace Format { + /** Clears all formats */ + function Clear(): void; + /** Returns true if the string format exists */ + function Has(format: string): boolean; + /** Sets a string format validation function */ + function Set(format: string, func: FormatValidationFunction): void; + /** Gets a string format validation function */ + function Get(format: string): FormatValidationFunction | undefined; +} diff --git a/node_modules/@sinclair/typebox/format/format.js b/node_modules/@sinclair/typebox/format/format.js index df8dccf1..aafab7a2 100644 --- a/node_modules/@sinclair/typebox/format/format.js +++ b/node_modules/@sinclair/typebox/format/format.js @@ -1,55 +1,55 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/format - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Format = void 0; -/** Shared string formats used by the TypeCompiler and Value modules */ -var Format; -(function (Format) { - const formats = new Map(); - /** Clears all formats */ - function Clear() { - return formats.clear(); - } - Format.Clear = Clear; - /** Returns true if the string format exists */ - function Has(format) { - return formats.has(format); - } - Format.Has = Has; - /** Sets a string format validation function */ - function Set(format, func) { - formats.set(format, func); - } - Format.Set = Set; - /** Gets a string format validation function */ - function Get(format) { - return formats.get(format); - } - Format.Get = Get; -})(Format = exports.Format || (exports.Format = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/format + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Format = void 0; +/** Shared string formats used by the TypeCompiler and Value modules */ +var Format; +(function (Format) { + const formats = new Map(); + /** Clears all formats */ + function Clear() { + return formats.clear(); + } + Format.Clear = Clear; + /** Returns true if the string format exists */ + function Has(format) { + return formats.has(format); + } + Format.Has = Has; + /** Sets a string format validation function */ + function Set(format, func) { + formats.set(format, func); + } + Format.Set = Set; + /** Gets a string format validation function */ + function Get(format) { + return formats.get(format); + } + Format.Get = Get; +})(Format = exports.Format || (exports.Format = {})); diff --git a/node_modules/@sinclair/typebox/format/index.d.ts b/node_modules/@sinclair/typebox/format/index.d.ts index 16c5b2b5..01ff7ec0 100644 --- a/node_modules/@sinclair/typebox/format/index.d.ts +++ b/node_modules/@sinclair/typebox/format/index.d.ts @@ -1 +1 @@ -export * from './format'; +export * from './format'; diff --git a/node_modules/@sinclair/typebox/format/index.js b/node_modules/@sinclair/typebox/format/index.js index f1bcb1d9..382b01be 100644 --- a/node_modules/@sinclair/typebox/format/index.js +++ b/node_modules/@sinclair/typebox/format/index.js @@ -1,44 +1,44 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/format - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./format"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/format + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./format"), exports); diff --git a/node_modules/@sinclair/typebox/guard/guard.d.ts b/node_modules/@sinclair/typebox/guard/guard.d.ts index 9a4eb4d6..bcb4a4e0 100644 --- a/node_modules/@sinclair/typebox/guard/guard.d.ts +++ b/node_modules/@sinclair/typebox/guard/guard.d.ts @@ -1,56 +1,56 @@ -import * as Types from '../typebox'; -export declare class TypeGuardInvalidTypeError extends Error { - readonly schema: unknown; - constructor(schema: unknown); -} -/** TypeGuard tests that values conform to a known TypeBox type specification */ -export declare namespace TypeGuard { - /** Returns true if the given schema is TAny */ - function TAny(schema: unknown): schema is Types.TAny; - /** Returns true if the given schema is TArray */ - function TArray(schema: unknown): schema is Types.TArray; - /** Returns true if the given schema is TBoolean */ - function TBoolean(schema: unknown): schema is Types.TBoolean; - /** Returns true if the given schema is TConstructor */ - function TConstructor(schema: unknown): schema is Types.TConstructor; - /** Returns true if the given schema is TFunction */ - function TFunction(schema: unknown): schema is Types.TFunction; - /** Returns true if the given schema is TInteger */ - function TInteger(schema: unknown): schema is Types.TInteger; - /** Returns true if the given schema is TLiteral */ - function TLiteral(schema: unknown): schema is Types.TLiteral; - /** Returns true if the given schema is TNever */ - function TNever(schema: unknown): schema is Types.TNever; - /** Returns true if the given schema is TNull */ - function TNull(schema: unknown): schema is Types.TNull; - /** Returns true if the given schema is TNumber */ - function TNumber(schema: unknown): schema is Types.TNumber; - /** Returns true if the given schema is TObject */ - function TObject(schema: unknown): schema is Types.TObject; - /** Returns true if the given schema is TPromise */ - function TPromise(schema: unknown): schema is Types.TPromise; - /** Returns true if the given schema is TRecord */ - function TRecord(schema: unknown): schema is Types.TRecord; - /** Returns true if the given schema is TSelf */ - function TSelf(schema: unknown): schema is Types.TSelf; - /** Returns true if the given schema is TRef */ - function TRef(schema: unknown): schema is Types.TRef; - /** Returns true if the given schema is TString */ - function TString(schema: unknown): schema is Types.TString; - /** Returns true if the given schema is TTuple */ - function TTuple(schema: unknown): schema is Types.TTuple; - /** Returns true if the given schema is TUndefined */ - function TUndefined(schema: unknown): schema is Types.TUndefined; - /** Returns true if the given schema is TUnion */ - function TUnion(schema: unknown): schema is Types.TUnion; - /** Returns true if the given schema is TUint8Array */ - function TUint8Array(schema: unknown): schema is Types.TUint8Array; - /** Returns true if the given schema is TUnknown */ - function TUnknown(schema: unknown): schema is Types.TUnknown; - /** Returns true if the given schema is TVoid */ - function TVoid(schema: unknown): schema is Types.TVoid; - /** Returns true if the given schema is TSchema */ - function TSchema(schema: unknown): schema is Types.TSchema; - /** Asserts if this schema and associated references are valid. */ - function Assert(schema: T, references?: Types.TSchema[]): void; -} +import * as Types from '../typebox'; +export declare class TypeGuardInvalidTypeError extends Error { + readonly schema: unknown; + constructor(schema: unknown); +} +/** TypeGuard tests that values conform to a known TypeBox type specification */ +export declare namespace TypeGuard { + /** Returns true if the given schema is TAny */ + function TAny(schema: unknown): schema is Types.TAny; + /** Returns true if the given schema is TArray */ + function TArray(schema: unknown): schema is Types.TArray; + /** Returns true if the given schema is TBoolean */ + function TBoolean(schema: unknown): schema is Types.TBoolean; + /** Returns true if the given schema is TConstructor */ + function TConstructor(schema: unknown): schema is Types.TConstructor; + /** Returns true if the given schema is TFunction */ + function TFunction(schema: unknown): schema is Types.TFunction; + /** Returns true if the given schema is TInteger */ + function TInteger(schema: unknown): schema is Types.TInteger; + /** Returns true if the given schema is TLiteral */ + function TLiteral(schema: unknown): schema is Types.TLiteral; + /** Returns true if the given schema is TNever */ + function TNever(schema: unknown): schema is Types.TNever; + /** Returns true if the given schema is TNull */ + function TNull(schema: unknown): schema is Types.TNull; + /** Returns true if the given schema is TNumber */ + function TNumber(schema: unknown): schema is Types.TNumber; + /** Returns true if the given schema is TObject */ + function TObject(schema: unknown): schema is Types.TObject; + /** Returns true if the given schema is TPromise */ + function TPromise(schema: unknown): schema is Types.TPromise; + /** Returns true if the given schema is TRecord */ + function TRecord(schema: unknown): schema is Types.TRecord; + /** Returns true if the given schema is TSelf */ + function TSelf(schema: unknown): schema is Types.TSelf; + /** Returns true if the given schema is TRef */ + function TRef(schema: unknown): schema is Types.TRef; + /** Returns true if the given schema is TString */ + function TString(schema: unknown): schema is Types.TString; + /** Returns true if the given schema is TTuple */ + function TTuple(schema: unknown): schema is Types.TTuple; + /** Returns true if the given schema is TUndefined */ + function TUndefined(schema: unknown): schema is Types.TUndefined; + /** Returns true if the given schema is TUnion */ + function TUnion(schema: unknown): schema is Types.TUnion; + /** Returns true if the given schema is TUint8Array */ + function TUint8Array(schema: unknown): schema is Types.TUint8Array; + /** Returns true if the given schema is TUnknown */ + function TUnknown(schema: unknown): schema is Types.TUnknown; + /** Returns true if the given schema is TVoid */ + function TVoid(schema: unknown): schema is Types.TVoid; + /** Returns true if the given schema is TSchema */ + function TSchema(schema: unknown): schema is Types.TSchema; + /** Asserts if this schema and associated references are valid. */ + function Assert(schema: T, references?: Types.TSchema[]): void; +} diff --git a/node_modules/@sinclair/typebox/guard/guard.js b/node_modules/@sinclair/typebox/guard/guard.js index 82b25f8a..cc4a41dd 100644 --- a/node_modules/@sinclair/typebox/guard/guard.js +++ b/node_modules/@sinclair/typebox/guard/guard.js @@ -1,351 +1,351 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/guard - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, dTribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TypeGuard = exports.TypeGuardInvalidTypeError = void 0; -const Types = require("../typebox"); -class TypeGuardInvalidTypeError extends Error { - constructor(schema) { - super('TypeGuard: Invalid type'); - this.schema = schema; - } -} -exports.TypeGuardInvalidTypeError = TypeGuardInvalidTypeError; -/** TypeGuard tests that values conform to a known TypeBox type specification */ -var TypeGuard; -(function (TypeGuard) { - function IsObject(value) { - return typeof value === 'object' && value !== null && !Array.isArray(value); - } - function IsArray(value) { - return typeof value === 'object' && value !== null && Array.isArray(value); - } - function IsPattern(value) { - try { - new RegExp(value); - return true; - } - catch { - return false; - } - } - function IsControlCharacterFree(value) { - if (typeof value !== 'string') - return false; - for (let i = 0; i < value.length; i++) { - const code = value.charCodeAt(i); - if ((code >= 7 && code <= 13) || code === 27 || code === 127) { - return false; - } - } - return true; - } - function IsString(value) { - return typeof value === 'string'; - } - function IsNumber(value) { - return typeof value === 'number'; - } - function IsBoolean(value) { - return typeof value === 'boolean'; - } - function IsOptionalNumber(value) { - return value === undefined || (value !== undefined && IsNumber(value)); - } - function IsOptionalBoolean(value) { - return value === undefined || (value !== undefined && IsBoolean(value)); - } - function IsOptionalString(value) { - return value === undefined || (value !== undefined && IsString(value)); - } - function IsOptionalPattern(value) { - return value === undefined || (value !== undefined && IsString(value) && IsControlCharacterFree(value) && IsPattern(value)); - } - function IsOptionalFormat(value) { - return value === undefined || (value !== undefined && IsString(value) && IsControlCharacterFree(value)); - } - function IsOptionalSchema(value) { - return value === undefined || TSchema(value); - } - /** Returns true if the given schema is TAny */ - function TAny(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Any' && IsOptionalString(schema.$id); - } - TypeGuard.TAny = TAny; - /** Returns true if the given schema is TArray */ - function TArray(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'Array' && - schema.type === 'array' && - IsOptionalString(schema.$id) && - TSchema(schema.items) && - IsOptionalNumber(schema.minItems) && - IsOptionalNumber(schema.maxItems) && - IsOptionalBoolean(schema.uniqueItems)); - } - TypeGuard.TArray = TArray; - /** Returns true if the given schema is TBoolean */ - function TBoolean(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Boolean' && schema.type === 'boolean' && IsOptionalString(schema.$id); - } - TypeGuard.TBoolean = TBoolean; - /** Returns true if the given schema is TConstructor */ - function TConstructor(schema) { - if (!(IsObject(schema) && schema[Types.Kind] === 'Constructor' && schema.type === 'constructor' && IsOptionalString(schema.$id) && IsArray(schema.parameters) && TSchema(schema.returns))) { - return false; - } - for (const parameter of schema.parameters) { - if (!TSchema(parameter)) - return false; - } - return true; - } - TypeGuard.TConstructor = TConstructor; - /** Returns true if the given schema is TFunction */ - function TFunction(schema) { - if (!(IsObject(schema) && schema[Types.Kind] === 'Function' && schema.type === 'function' && IsOptionalString(schema.$id) && IsArray(schema.parameters) && TSchema(schema.returns))) { - return false; - } - for (const parameter of schema.parameters) { - if (!TSchema(parameter)) - return false; - } - return true; - } - TypeGuard.TFunction = TFunction; - /** Returns true if the given schema is TInteger */ - function TInteger(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'Integer' && - schema.type === 'integer' && - IsOptionalString(schema.$id) && - IsOptionalNumber(schema.multipleOf) && - IsOptionalNumber(schema.minimum) && - IsOptionalNumber(schema.maximum) && - IsOptionalNumber(schema.exclusiveMinimum) && - IsOptionalNumber(schema.exclusiveMaximum)); - } - TypeGuard.TInteger = TInteger; - /** Returns true if the given schema is TLiteral */ - function TLiteral(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Literal' && IsOptionalString(schema.$id) && (IsString(schema.const) || IsNumber(schema.const) || IsBoolean(schema.const)); - } - TypeGuard.TLiteral = TLiteral; - /** Returns true if the given schema is TNever */ - function TNever(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'Never' && - IsArray(schema.allOf) && - schema.allOf.length === 2 && - IsObject(schema.allOf[0]) && - IsString(schema.allOf[0].type) && - schema.allOf[0].type === 'boolean' && - schema.allOf[0].const === false && - IsObject(schema.allOf[1]) && - IsString(schema.allOf[1].type) && - schema.allOf[1].type === 'boolean' && - schema.allOf[1].const === true); - } - TypeGuard.TNever = TNever; - /** Returns true if the given schema is TNull */ - function TNull(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Null' && schema.type === 'null' && IsOptionalString(schema.$id); - } - TypeGuard.TNull = TNull; - /** Returns true if the given schema is TNumber */ - function TNumber(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'Number' && - schema.type === 'number' && - IsOptionalString(schema.$id) && - IsOptionalNumber(schema.multipleOf) && - IsOptionalNumber(schema.minimum) && - IsOptionalNumber(schema.maximum) && - IsOptionalNumber(schema.exclusiveMinimum) && - IsOptionalNumber(schema.exclusiveMaximum)); - } - TypeGuard.TNumber = TNumber; - /** Returns true if the given schema is TObject */ - function TObject(schema) { - if (!(IsObject(schema) && - schema[Types.Kind] === 'Object' && - schema.type === 'object' && - IsOptionalString(schema.$id) && - IsObject(schema.properties) && - (IsOptionalBoolean(schema.additionalProperties) || IsOptionalSchema(schema.additionalProperties)) && - IsOptionalNumber(schema.minProperties) && - IsOptionalNumber(schema.maxProperties))) { - return false; - } - for (const [key, value] of Object.entries(schema.properties)) { - if (!IsControlCharacterFree(key)) - return false; - if (!TSchema(value)) - return false; - } - return true; - } - TypeGuard.TObject = TObject; - /** Returns true if the given schema is TPromise */ - function TPromise(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Promise' && schema.type === 'promise' && IsOptionalString(schema.$id) && TSchema(schema.item); - } - TypeGuard.TPromise = TPromise; - /** Returns true if the given schema is TRecord */ - function TRecord(schema) { - if (!(IsObject(schema) && schema[Types.Kind] === 'Record' && schema.type === 'object' && IsOptionalString(schema.$id) && schema.additionalProperties === false && IsObject(schema.patternProperties))) { - return false; - } - const keys = Object.keys(schema.patternProperties); - if (keys.length !== 1) { - return false; - } - if (!IsPattern(keys[0])) { - return false; - } - if (!TSchema(schema.patternProperties[keys[0]])) { - return false; - } - return true; - } - TypeGuard.TRecord = TRecord; - /** Returns true if the given schema is TSelf */ - function TSelf(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Self' && IsOptionalString(schema.$id) && IsString(schema.$ref); - } - TypeGuard.TSelf = TSelf; - /** Returns true if the given schema is TRef */ - function TRef(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Ref' && IsOptionalString(schema.$id) && IsString(schema.$ref); - } - TypeGuard.TRef = TRef; - /** Returns true if the given schema is TString */ - function TString(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'String' && - schema.type === 'string' && - IsOptionalString(schema.$id) && - IsOptionalNumber(schema.minLength) && - IsOptionalNumber(schema.maxLength) && - IsOptionalPattern(schema.pattern) && - IsOptionalFormat(schema.format)); - } - TypeGuard.TString = TString; - /** Returns true if the given schema is TTuple */ - function TTuple(schema) { - if (!(IsObject(schema) && schema[Types.Kind] === 'Tuple' && schema.type === 'array' && IsOptionalString(schema.$id) && IsNumber(schema.minItems) && IsNumber(schema.maxItems) && schema.minItems === schema.maxItems)) { - return false; - } - if (schema.items === undefined && schema.additionalItems === undefined && schema.minItems === 0) { - return true; - } - if (!IsArray(schema.items)) { - return false; - } - for (const inner of schema.items) { - if (!TSchema(inner)) - return false; - } - return true; - } - TypeGuard.TTuple = TTuple; - /** Returns true if the given schema is TUndefined */ - function TUndefined(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Undefined' && schema.type === 'object' && IsOptionalString(schema.$id) && schema.specialized === 'Undefined'; - } - TypeGuard.TUndefined = TUndefined; - /** Returns true if the given schema is TUnion */ - function TUnion(schema) { - if (!(IsObject(schema) && schema[Types.Kind] === 'Union' && IsArray(schema.anyOf) && IsOptionalString(schema.$id))) { - return false; - } - for (const inner of schema.anyOf) { - if (!TSchema(inner)) - return false; - } - return true; - } - TypeGuard.TUnion = TUnion; - /** Returns true if the given schema is TUint8Array */ - function TUint8Array(schema) { - return (IsObject(schema) && - schema[Types.Kind] === 'Uint8Array' && - schema.type === 'object' && - IsOptionalString(schema.$id) && - schema.specialized === 'Uint8Array' && - IsOptionalNumber(schema.minByteLength) && - IsOptionalNumber(schema.maxByteLength)); - } - TypeGuard.TUint8Array = TUint8Array; - /** Returns true if the given schema is TUnknown */ - function TUnknown(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Unknown' && IsOptionalString(schema.$id); - } - TypeGuard.TUnknown = TUnknown; - /** Returns true if the given schema is TVoid */ - function TVoid(schema) { - return IsObject(schema) && schema[Types.Kind] === 'Void' && schema.type === 'null' && IsOptionalString(schema.$id); - } - TypeGuard.TVoid = TVoid; - /** Returns true if the given schema is TSchema */ - function TSchema(schema) { - return (TAny(schema) || - TArray(schema) || - TBoolean(schema) || - TConstructor(schema) || - TFunction(schema) || - TInteger(schema) || - TLiteral(schema) || - TNever(schema) || - TNull(schema) || - TNumber(schema) || - TObject(schema) || - TPromise(schema) || - TRecord(schema) || - TSelf(schema) || - TRef(schema) || - TString(schema) || - TTuple(schema) || - TUndefined(schema) || - TUnion(schema) || - TUint8Array(schema) || - TUnknown(schema) || - TVoid(schema)); - } - TypeGuard.TSchema = TSchema; - /** Asserts if this schema and associated references are valid. */ - function Assert(schema, references = []) { - if (!TSchema(schema)) - throw new TypeGuardInvalidTypeError(schema); - for (const schema of references) { - if (!TSchema(schema)) - throw new TypeGuardInvalidTypeError(schema); - } - } - TypeGuard.Assert = Assert; -})(TypeGuard = exports.TypeGuard || (exports.TypeGuard = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/guard + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, dTribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeGuard = exports.TypeGuardInvalidTypeError = void 0; +const Types = require("../typebox"); +class TypeGuardInvalidTypeError extends Error { + constructor(schema) { + super('TypeGuard: Invalid type'); + this.schema = schema; + } +} +exports.TypeGuardInvalidTypeError = TypeGuardInvalidTypeError; +/** TypeGuard tests that values conform to a known TypeBox type specification */ +var TypeGuard; +(function (TypeGuard) { + function IsObject(value) { + return typeof value === 'object' && value !== null && !Array.isArray(value); + } + function IsArray(value) { + return typeof value === 'object' && value !== null && Array.isArray(value); + } + function IsPattern(value) { + try { + new RegExp(value); + return true; + } + catch { + return false; + } + } + function IsControlCharacterFree(value) { + if (typeof value !== 'string') + return false; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if ((code >= 7 && code <= 13) || code === 27 || code === 127) { + return false; + } + } + return true; + } + function IsString(value) { + return typeof value === 'string'; + } + function IsNumber(value) { + return typeof value === 'number'; + } + function IsBoolean(value) { + return typeof value === 'boolean'; + } + function IsOptionalNumber(value) { + return value === undefined || (value !== undefined && IsNumber(value)); + } + function IsOptionalBoolean(value) { + return value === undefined || (value !== undefined && IsBoolean(value)); + } + function IsOptionalString(value) { + return value === undefined || (value !== undefined && IsString(value)); + } + function IsOptionalPattern(value) { + return value === undefined || (value !== undefined && IsString(value) && IsControlCharacterFree(value) && IsPattern(value)); + } + function IsOptionalFormat(value) { + return value === undefined || (value !== undefined && IsString(value) && IsControlCharacterFree(value)); + } + function IsOptionalSchema(value) { + return value === undefined || TSchema(value); + } + /** Returns true if the given schema is TAny */ + function TAny(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Any' && IsOptionalString(schema.$id); + } + TypeGuard.TAny = TAny; + /** Returns true if the given schema is TArray */ + function TArray(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'Array' && + schema.type === 'array' && + IsOptionalString(schema.$id) && + TSchema(schema.items) && + IsOptionalNumber(schema.minItems) && + IsOptionalNumber(schema.maxItems) && + IsOptionalBoolean(schema.uniqueItems)); + } + TypeGuard.TArray = TArray; + /** Returns true if the given schema is TBoolean */ + function TBoolean(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Boolean' && schema.type === 'boolean' && IsOptionalString(schema.$id); + } + TypeGuard.TBoolean = TBoolean; + /** Returns true if the given schema is TConstructor */ + function TConstructor(schema) { + if (!(IsObject(schema) && schema[Types.Kind] === 'Constructor' && schema.type === 'constructor' && IsOptionalString(schema.$id) && IsArray(schema.parameters) && TSchema(schema.returns))) { + return false; + } + for (const parameter of schema.parameters) { + if (!TSchema(parameter)) + return false; + } + return true; + } + TypeGuard.TConstructor = TConstructor; + /** Returns true if the given schema is TFunction */ + function TFunction(schema) { + if (!(IsObject(schema) && schema[Types.Kind] === 'Function' && schema.type === 'function' && IsOptionalString(schema.$id) && IsArray(schema.parameters) && TSchema(schema.returns))) { + return false; + } + for (const parameter of schema.parameters) { + if (!TSchema(parameter)) + return false; + } + return true; + } + TypeGuard.TFunction = TFunction; + /** Returns true if the given schema is TInteger */ + function TInteger(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'Integer' && + schema.type === 'integer' && + IsOptionalString(schema.$id) && + IsOptionalNumber(schema.multipleOf) && + IsOptionalNumber(schema.minimum) && + IsOptionalNumber(schema.maximum) && + IsOptionalNumber(schema.exclusiveMinimum) && + IsOptionalNumber(schema.exclusiveMaximum)); + } + TypeGuard.TInteger = TInteger; + /** Returns true if the given schema is TLiteral */ + function TLiteral(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Literal' && IsOptionalString(schema.$id) && (IsString(schema.const) || IsNumber(schema.const) || IsBoolean(schema.const)); + } + TypeGuard.TLiteral = TLiteral; + /** Returns true if the given schema is TNever */ + function TNever(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'Never' && + IsArray(schema.allOf) && + schema.allOf.length === 2 && + IsObject(schema.allOf[0]) && + IsString(schema.allOf[0].type) && + schema.allOf[0].type === 'boolean' && + schema.allOf[0].const === false && + IsObject(schema.allOf[1]) && + IsString(schema.allOf[1].type) && + schema.allOf[1].type === 'boolean' && + schema.allOf[1].const === true); + } + TypeGuard.TNever = TNever; + /** Returns true if the given schema is TNull */ + function TNull(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Null' && schema.type === 'null' && IsOptionalString(schema.$id); + } + TypeGuard.TNull = TNull; + /** Returns true if the given schema is TNumber */ + function TNumber(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'Number' && + schema.type === 'number' && + IsOptionalString(schema.$id) && + IsOptionalNumber(schema.multipleOf) && + IsOptionalNumber(schema.minimum) && + IsOptionalNumber(schema.maximum) && + IsOptionalNumber(schema.exclusiveMinimum) && + IsOptionalNumber(schema.exclusiveMaximum)); + } + TypeGuard.TNumber = TNumber; + /** Returns true if the given schema is TObject */ + function TObject(schema) { + if (!(IsObject(schema) && + schema[Types.Kind] === 'Object' && + schema.type === 'object' && + IsOptionalString(schema.$id) && + IsObject(schema.properties) && + (IsOptionalBoolean(schema.additionalProperties) || IsOptionalSchema(schema.additionalProperties)) && + IsOptionalNumber(schema.minProperties) && + IsOptionalNumber(schema.maxProperties))) { + return false; + } + for (const [key, value] of Object.entries(schema.properties)) { + if (!IsControlCharacterFree(key)) + return false; + if (!TSchema(value)) + return false; + } + return true; + } + TypeGuard.TObject = TObject; + /** Returns true if the given schema is TPromise */ + function TPromise(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Promise' && schema.type === 'promise' && IsOptionalString(schema.$id) && TSchema(schema.item); + } + TypeGuard.TPromise = TPromise; + /** Returns true if the given schema is TRecord */ + function TRecord(schema) { + if (!(IsObject(schema) && schema[Types.Kind] === 'Record' && schema.type === 'object' && IsOptionalString(schema.$id) && schema.additionalProperties === false && IsObject(schema.patternProperties))) { + return false; + } + const keys = Object.keys(schema.patternProperties); + if (keys.length !== 1) { + return false; + } + if (!IsPattern(keys[0])) { + return false; + } + if (!TSchema(schema.patternProperties[keys[0]])) { + return false; + } + return true; + } + TypeGuard.TRecord = TRecord; + /** Returns true if the given schema is TSelf */ + function TSelf(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Self' && IsOptionalString(schema.$id) && IsString(schema.$ref); + } + TypeGuard.TSelf = TSelf; + /** Returns true if the given schema is TRef */ + function TRef(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Ref' && IsOptionalString(schema.$id) && IsString(schema.$ref); + } + TypeGuard.TRef = TRef; + /** Returns true if the given schema is TString */ + function TString(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'String' && + schema.type === 'string' && + IsOptionalString(schema.$id) && + IsOptionalNumber(schema.minLength) && + IsOptionalNumber(schema.maxLength) && + IsOptionalPattern(schema.pattern) && + IsOptionalFormat(schema.format)); + } + TypeGuard.TString = TString; + /** Returns true if the given schema is TTuple */ + function TTuple(schema) { + if (!(IsObject(schema) && schema[Types.Kind] === 'Tuple' && schema.type === 'array' && IsOptionalString(schema.$id) && IsNumber(schema.minItems) && IsNumber(schema.maxItems) && schema.minItems === schema.maxItems)) { + return false; + } + if (schema.items === undefined && schema.additionalItems === undefined && schema.minItems === 0) { + return true; + } + if (!IsArray(schema.items)) { + return false; + } + for (const inner of schema.items) { + if (!TSchema(inner)) + return false; + } + return true; + } + TypeGuard.TTuple = TTuple; + /** Returns true if the given schema is TUndefined */ + function TUndefined(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Undefined' && schema.type === 'object' && IsOptionalString(schema.$id) && schema.specialized === 'Undefined'; + } + TypeGuard.TUndefined = TUndefined; + /** Returns true if the given schema is TUnion */ + function TUnion(schema) { + if (!(IsObject(schema) && schema[Types.Kind] === 'Union' && IsArray(schema.anyOf) && IsOptionalString(schema.$id))) { + return false; + } + for (const inner of schema.anyOf) { + if (!TSchema(inner)) + return false; + } + return true; + } + TypeGuard.TUnion = TUnion; + /** Returns true if the given schema is TUint8Array */ + function TUint8Array(schema) { + return (IsObject(schema) && + schema[Types.Kind] === 'Uint8Array' && + schema.type === 'object' && + IsOptionalString(schema.$id) && + schema.specialized === 'Uint8Array' && + IsOptionalNumber(schema.minByteLength) && + IsOptionalNumber(schema.maxByteLength)); + } + TypeGuard.TUint8Array = TUint8Array; + /** Returns true if the given schema is TUnknown */ + function TUnknown(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Unknown' && IsOptionalString(schema.$id); + } + TypeGuard.TUnknown = TUnknown; + /** Returns true if the given schema is TVoid */ + function TVoid(schema) { + return IsObject(schema) && schema[Types.Kind] === 'Void' && schema.type === 'null' && IsOptionalString(schema.$id); + } + TypeGuard.TVoid = TVoid; + /** Returns true if the given schema is TSchema */ + function TSchema(schema) { + return (TAny(schema) || + TArray(schema) || + TBoolean(schema) || + TConstructor(schema) || + TFunction(schema) || + TInteger(schema) || + TLiteral(schema) || + TNever(schema) || + TNull(schema) || + TNumber(schema) || + TObject(schema) || + TPromise(schema) || + TRecord(schema) || + TSelf(schema) || + TRef(schema) || + TString(schema) || + TTuple(schema) || + TUndefined(schema) || + TUnion(schema) || + TUint8Array(schema) || + TUnknown(schema) || + TVoid(schema)); + } + TypeGuard.TSchema = TSchema; + /** Asserts if this schema and associated references are valid. */ + function Assert(schema, references = []) { + if (!TSchema(schema)) + throw new TypeGuardInvalidTypeError(schema); + for (const schema of references) { + if (!TSchema(schema)) + throw new TypeGuardInvalidTypeError(schema); + } + } + TypeGuard.Assert = Assert; +})(TypeGuard = exports.TypeGuard || (exports.TypeGuard = {})); diff --git a/node_modules/@sinclair/typebox/guard/index.d.ts b/node_modules/@sinclair/typebox/guard/index.d.ts index def49623..753ccec0 100644 --- a/node_modules/@sinclair/typebox/guard/index.d.ts +++ b/node_modules/@sinclair/typebox/guard/index.d.ts @@ -1 +1 @@ -export * from './guard'; +export * from './guard'; diff --git a/node_modules/@sinclair/typebox/guard/index.js b/node_modules/@sinclair/typebox/guard/index.js index 872c8dde..3934c6ec 100644 --- a/node_modules/@sinclair/typebox/guard/index.js +++ b/node_modules/@sinclair/typebox/guard/index.js @@ -1,44 +1,44 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/guards - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./guard"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/guards + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./guard"), exports); diff --git a/node_modules/@sinclair/typebox/license b/node_modules/@sinclair/typebox/license index cd929d32..fd6e9cb7 100644 --- a/node_modules/@sinclair/typebox/license +++ b/node_modules/@sinclair/typebox/license @@ -1,23 +1,23 @@ -TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@sinclair/typebox/package.json b/node_modules/@sinclair/typebox/package.json index a4b4814d..03995adc 100644 --- a/node_modules/@sinclair/typebox/package.json +++ b/node_modules/@sinclair/typebox/package.json @@ -1,40 +1,40 @@ -{ - "name": "@sinclair/typebox", - "version": "0.24.51", - "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", - "keywords": [ - "typescript", - "json-schema", - "validate", - "typecheck" - ], - "author": "sinclairzx81", - "license": "MIT", - "main": "./typebox.js", - "types": "./typebox.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/sinclairzx81/typebox" - }, - "scripts": { - "clean": "hammer task clean", - "format": "hammer task format", - "start": "hammer task start", - "test": "hammer task test", - "benchmark": "hammer task benchmark", - "build": "hammer task build", - "publish": "hammer task publish" - }, - "devDependencies": { - "@sinclair/hammer": "^0.17.1", - "@types/chai": "^4.3.3", - "@types/mocha": "^9.1.1", - "@types/node": "^18.7.13", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1", - "chai": "^4.3.6", - "mocha": "^9.2.2", - "prettier": "^2.7.1", - "typescript": "^4.8.2" - } -} +{ + "name": "@sinclair/typebox", + "version": "0.24.51", + "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", + "keywords": [ + "typescript", + "json-schema", + "validate", + "typecheck" + ], + "author": "sinclairzx81", + "license": "MIT", + "main": "./typebox.js", + "types": "./typebox.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/sinclairzx81/typebox" + }, + "scripts": { + "clean": "hammer task clean", + "format": "hammer task format", + "start": "hammer task start", + "test": "hammer task test", + "benchmark": "hammer task benchmark", + "build": "hammer task build", + "publish": "hammer task publish" + }, + "devDependencies": { + "@sinclair/hammer": "^0.17.1", + "@types/chai": "^4.3.3", + "@types/mocha": "^9.1.1", + "@types/node": "^18.7.13", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "chai": "^4.3.6", + "mocha": "^9.2.2", + "prettier": "^2.7.1", + "typescript": "^4.8.2" + } +} diff --git a/node_modules/@sinclair/typebox/readme.md b/node_modules/@sinclair/typebox/readme.md index a5bc4caa..8271b86d 100644 --- a/node_modules/@sinclair/typebox/readme.md +++ b/node_modules/@sinclair/typebox/readme.md @@ -1,1152 +1,1152 @@ -
- -

TypeBox

- -

JSON Schema Type Builder with Static Type Resolution for TypeScript

- - - -
-
- -[![npm version](https://badge.fury.io/js/%40sinclair%2Ftypebox.svg)](https://badge.fury.io/js/%40sinclair%2Ftypebox) -[![Downloads](https://img.shields.io/npm/dm/%40sinclair%2Ftypebox.svg)](https://www.npmjs.com/package/%40sinclair%2Ftypebox) -[![GitHub CI](https://github.com/sinclairzx81/typebox/workflows/GitHub%20CI/badge.svg)](https://github.com/sinclairzx81/typebox/actions) - -
- - - -## Install - -Node - -```bash -$ npm install @sinclair/typebox --save -``` - -Deno and ESM - -```typescript -import { Static, Type } from 'https://esm.sh/@sinclair/typebox' -``` - -## Example - -```typescript -import { Static, Type } from '@sinclair/typebox' - -const T = Type.String() // const T = { type: 'string' } - -type T = Static // type T = string -``` - - - -## Overview - -TypeBox is a type builder library that creates in-memory JSON Schema objects that can be statically inferred as TypeScript types. The schemas produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox enables one to create a unified type that can be statically checked by TypeScript and runtime asserted using standard JSON Schema validation. - -TypeBox is designed to enable JSON schema to compose with the same flexibility as TypeScript's type system. It can be used either as a simple tool to build up complex schemas or integrated into REST and RPC services to help validate data received over the wire. - -License MIT - -## Contents -- [Install](#install) -- [Overview](#overview) -- [Usage](#usage) -- [Types](#types) - - [Standard](#types-standard) - - [Modifiers](#types-modifiers) - - [Options](#types-options) - - [Extended](#types-extended) - - [Reference](#types-reference) - - [Recursive](#types-recursive) - - [Generic](#types-generic) - - [Conditional](#types-conditional) - - [Unsafe](#types-unsafe) - - [Guards](#types-guards) - - [Strict](#types-strict) -- [Values](#values) - - [Create](#values-create) - - [Clone](#values-clone) - - [Check](#values-check) - - [Cast](#values-cast) - - [Equal](#values-equal) - - [Diff](#values-diff) - - [Patch](#values-patch) - - [Errors](#values-errors) - - [Pointer](#values-pointer) -- [TypeCheck](#typecheck) - - [Ajv](#typecheck-ajv) - - [Compiler](#typecheck-compiler) - - [Formats](#typecheck-formats) -- [Benchmark](#benchmark) - - [Compile](#benchmark-compile) - - [Validate](#benchmark-validate) - - [Compression](#benchmark-compression) -- [Contribute](#contribute) - - - -## Usage - -The following demonstrates TypeBox's general usage. - -```typescript - -import { Static, Type } from '@sinclair/typebox' - -//-------------------------------------------------------------------------------------------- -// -// Let's say you have the following type ... -// -//-------------------------------------------------------------------------------------------- - -type T = { - id: string, - name: string, - timestamp: number -} - -//-------------------------------------------------------------------------------------------- -// -// ... you can express this type in the following way. -// -//-------------------------------------------------------------------------------------------- - -const T = Type.Object({ // const T = { - id: Type.String(), // type: 'object', - name: Type.String(), // properties: { - timestamp: Type.Integer() // id: { -}) // type: 'string' - // }, - // name: { - // type: 'string' - // }, - // timestamp: { - // type: 'integer' - // } - // }, - // required: [ - // 'id', - // 'name', - // 'timestamp' - // ] - // } - -//-------------------------------------------------------------------------------------------- -// -// ... then infer back to the original static type this way. -// -//-------------------------------------------------------------------------------------------- - -type T = Static // type T = { - // id: string, - // name: string, - // timestamp: number - // } - -//-------------------------------------------------------------------------------------------- -// -// ... then use the type both as JSON schema and as a TypeScript type. -// -//-------------------------------------------------------------------------------------------- - -function receive(value: T) { // ... as a Type - - if(JSON.validate(T, value)) { // ... as a Schema - - // ok... - } -} -``` - - - -## Types - -TypeBox provides a set of functions that allow you to compose JSON Schema similar to how you would compose static types with TypeScript. Each function creates a JSON schema fragment which can compose into more complex types. The schemas produced by TypeBox can be passed directly to any JSON Schema compliant validator, or used to reflect runtime metadata for a type. - - - -### Standard - -The following table lists the standard TypeBox types. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ JSON Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Any() │ type T = any │ const T = { } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Unknown() │ type T = unknown │ const T = { } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.String() │ type T = string │ const T = { │ -│ │ │ type: 'string' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Number() │ type T = number │ const T = { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Integer() │ type T = number │ const T = { │ -│ │ │ type: 'integer' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Boolean() │ type T = boolean │ const T = { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Null() │ type T = null │ const T = { │ -│ │ │ type: 'null' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.RegEx(/foo/) │ type T = string │ const T = { │ -│ │ │ type: 'string', │ -│ │ │ pattern: 'foo' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Literal(42) │ type T = 42 │ const T = { │ -│ │ │ const: 42, │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Array( │ type T = number[] │ const T = { │ -│ Type.Number() │ │ type: 'array', │ -│ ) │ │ items: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ x: Type.Number(), │ x: number, │ type: 'object', │ -│ y: Type.Number() │ y: number │ properties: { │ -│ }) │ } │ x: { │ -│ │ │ type: 'number' │ -│ │ │ }, │ -│ │ │ y: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ }, │ -│ │ │ required: ['x', 'y'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │ -│ Type.Number(), │ │ type: 'array', │ -│ Type.Number() │ │ items: [{ │ -│ ]) │ │ type: 'number' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ additionalItems: false, │ -│ │ │ minItems: 2, │ -│ │ │ maxItems: 2 │ -│ │ │ } │ -│ │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ enum Foo { │ enum Foo { │ const T = { │ -│ A, │ A, │ anyOf: [{ │ -│ B │ B │ type: 'number', │ -│ } │ } │ const: 0 │ -│ │ │ }, { │ -│ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │ -│ │ │ const: 1 │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.KeyOf( │ type T = keyof { │ const T = { │ -│ Type.Object({ │ x: number, │ anyOf: [{ │ -│ x: Type.Number(), │ y: number │ type: 'string', │ -│ y: Type.Number() │ } │ const: 'x' │ -│ }) │ │ }, { │ -│ ) │ │ type: 'string', │ -│ │ │ const: 'y' │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Union([ │ type T = string | number │ const T = { │ -│ Type.String(), │ │ anyOf: [{ │ -│ Type.Number() │ │ type: 'string' │ -│ ]) │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Intersect([ │ type T = { │ const T = { │ -│ Type.Object({ │ x: number │ type: 'object', │ -│ x: Type.Number() │ } & { │ properties: { │ -│ }), │ y: number │ x: { │ -│ Type.Object({ │ } │ type: 'number' │ -│ y: Type.Number() │ │ }, │ -│ }) │ │ y: { │ -│ ]) │ │ type: 'number' │ -│ │ │ } │ -│ │ │ }, │ -│ │ │ required: ['x', 'y'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Never() │ type T = never │ const T = { │ -│ │ │ allOf: [{ │ -│ │ │ type: 'boolean', │ -│ │ │ const: false │ -│ │ │ }, { │ -│ │ │ type: 'boolean', │ -│ │ │ const: true │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Record( │ type T = Record< │ const T = { │ -│ Type.String(), │ string, │ type: 'object', │ -│ Type.Number() │ number, │ patternProperties: { │ -│ ) │ > │ '^.*$': { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Partial( │ type T = Partial<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ properties: { │ -│ y: Type.Number() | }> │ x: { │ -│ }) │ │ type: 'number' │ -│ ) │ │ }, │ -│ │ │ y: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Required( │ type T = Required<{ │ const T = { │ -│ Type.Object({ │ x?: number, │ type: 'object', │ -│ x: Type.Optional( │ y?: number │ properties: { │ -│ Type.Number() | }> │ x: { │ -│ ), │ │ type: 'number' │ -│ y: Type.Optional( │ │ }, │ -│ Type.Number() │ │ y: { │ -│ ) │ │ type: 'number' │ -│ }) │ │ } │ -│ ) │ │ }, │ -│ │ │ required: ['x', 'y'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Pick( │ type T = Pick<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ properties: { │ -│ y: Type.Number() | }, 'x'> │ x: { │ -│ }), ['x'] │ │ type: 'number' │ -│ ) │ │ } │ -│ │ │ }, │ -│ │ │ required: ['x'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Omit( │ type T = Omit<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ properties: { │ -│ y: Type.Number() | }, 'x'> │ y: { │ -│ }), ['x'] │ │ type: 'number' │ -│ ) │ │ } │ -│ │ │ }, │ -│ │ │ required: ['y'] │ -│ │ │ } │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Modifiers - -TypeBox provides modifiers that can be applied to an objects properties. This allows for `optional` and `readonly` to be applied to that property. The following table illustates how they map between TypeScript and JSON Schema. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ JSON Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.Optional( │ name?: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.Readonly( │ readonly name: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ }, │ -│ │ │ required: ['name'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Options - -You can pass additional JSON schema options on the last argument of any given type. The following are some examples. - -```typescript -// string must be an email -const T = Type.String({ format: 'email' }) - -// number must be a multiple of 2 -const T = Type.Number({ multipleOf: 2 }) - -// array must have at least 5 integer values -const T = Type.Array(Type.Integer(), { minItems: 5 }) -``` - - - -### Extended - -In addition to JSON schema types, TypeBox provides several extended types that allow for the composition of `function` and `constructor` types. These additional types are not valid JSON Schema and will not validate using typical JSON Schema validation. However, these types can be used to frame JSON schema and describe callable interfaces that may receive JSON validated data. These types are as follows. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ Extended Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Constructor([ │ type T = new ( │ const T = { │ -│ Type.String(), │ arg0: string, │ type: 'constructor' │ -│ Type.Number() │ arg1: number │ parameters: [{ │ -│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ return: { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Function([ │ type T = ( │ const T = { │ -| Type.String(), │ arg0: string, │ type : 'function', │ -│ Type.Number() │ arg1: number │ parameters: [{ │ -│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ return: { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │ -│ │ │ type: 'object', │ -│ │ │ specialized: 'Uint8Array' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Promise( │ type T = Promise │ const T = { │ -│ Type.String() │ │ type: 'promise', │ -│ ) │ │ item: { │ -│ │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Undefined() │ type T = undefined │ const T = { │ -│ │ │ type: 'object', │ -│ │ │ specialized: 'Undefined' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Void() │ type T = void │ const T = { │ -│ │ │ type: 'null' │ -│ │ │ } │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Reference - -Use `Type.Ref(...)` to create referenced types. The target type must specify an `$id`. - -```typescript -const T = Type.String({ $id: 'T' }) // const T = { - // $id: 'T', - // type: 'string' - // } - -const R = Type.Ref(T) // const R = { - // $ref: 'T' - // } -``` - - - -### Recursive - -Use `Type.Recursive(...)` to create recursive types. - -```typescript -const Node = Type.Recursive(Node => Type.Object({ // const Node = { - id: Type.String(), // $id: 'Node', - nodes: Type.Array(Node) // type: 'object', -}), { $id: 'Node' }) // properties: { - // id: { - // type: 'string' - // }, - // nodes: { - // type: 'array', - // items: { - // $ref: 'Node' - // } - // } - // }, - // required: [ - // 'id', - // 'nodes' - // ] - // } - -type Node = Static // type Node = { - // id: string - // nodes: Node[] - // } - -function test(node: Node) { - const id = node.nodes[0].nodes[0] // id is string - .nodes[0].nodes[0] - .id -} -``` - - - -### Generic - -Use functions to create generic types. The following creates a generic `Nullable` type. - -```typescript -import { Type, Static, TSchema } from '@sinclair/typebox' - -const Nullable = (type: T) => Type.Union([type, Type.Null()]) - -const T = Nullable(Type.String()) // const T = { - // anyOf: [{ - // type: 'string' - // }, { - // type: 'null' - // }] - // } - -type T = Static // type T = string | null - -const U = Nullable(Type.Number()) // const U = { - // anyOf: [{ - // type: 'number' - // }, { - // type: 'null' - // }] - // } - -type U = Static // type U = number | null -``` - - - -### Conditional - -Use the conditional module to create [Conditional Types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html). This module implements TypeScript's structural equivalence checks to enable TypeBox types to be conditionally inferred at runtime. This module also provides the [Extract](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union) and [Exclude](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers) utility types which are expressed as conditional types in TypeScript. - -The conditional module is provided as an optional import. - -```typescript -import { Conditional } from '@sinclair/typebox/conditional' -``` -The following table shows the TypeBox mappings between TypeScript and JSON schema. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ JSON Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Conditional.Extends( │ type T = │ const T = { │ -│ Type.String(), │ string extends number │ const: false, │ -│ Type.Number(), │ true : false │ type: 'boolean' │ -│ Type.Literal(true), │ │ } │ -│ Type.Literal(false) │ │ │ -│ ) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Conditional.Extract( │ type T = Extract< │ const T = { │ -│ Type.Union([ │ 'a' | 'b' | 'c', │ anyOf: [{ │ -│ Type.Literal('a'), │ 'a' | 'f' │ const: 'a' │ -│ Type.Literal('b'), │ > │ type: 'string' │ -│ Type.Literal('c') │ │ }] │ -│ ]), │ │ } │ -│ Type.Union([ │ │ │ -│ Type.Literal('a'), │ │ │ -│ Type.Literal('f') │ │ │ -│ ]) │ │ │ -│ ) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Conditional.Exclude( │ type T = Exclude< │ const T = { │ -│ Type.Union([ │ 'a' | 'b' | 'c', │ anyOf: [{ │ -│ Type.Literal('a'), │ 'a' │ const: 'b', │ -│ Type.Literal('b'), │ > │ type: 'string' │ -│ Type.Literal('c') │ │ }, { │ -│ ]), │ │ const: 'c', │ -│ Type.Union([ │ │ type: 'string' │ -│ Type.Literal('a') │ │ }] │ -│ ]) │ │ } │ -│ ) │ │ │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Unsafe - -Use `Type.Unsafe(...)` to create custom schemas with user defined inference rules. - -```typescript -const T = Type.Unsafe({ type: 'number' }) // const T = { - // type: 'number' - // } - -type T = Static // type T = string -``` - -This function can be used to create custom schemas for validators that require specific schema representations. An example of this might be OpenAPI's `nullable` and `enum` schemas which are not provided by TypeBox. The following demonstrates using `Type.Unsafe(...)` to create these types. - -```typescript -import { Type, Static, TSchema } from '@sinclair/typebox' - -//-------------------------------------------------------------------------------------------- -// -// Nullable -// -//-------------------------------------------------------------------------------------------- - -function Nullable(schema: T) { - return Type.Unsafe | null>({ ...schema, nullable: true }) -} - -const T = Nullable(Type.String()) // const T = { - // type: 'string', - // nullable: true - // } - -type T = Static // type T = string | null - - -//-------------------------------------------------------------------------------------------- -// -// StringEnum -// -//-------------------------------------------------------------------------------------------- - -function StringEnum(values: [...T]) { - return Type.Unsafe({ type: 'string', enum: values }) -} - -const T = StringEnum(['A', 'B', 'C']) // const T = { - // enum: ['A', 'B', 'C'] - // } - -type T = Static // type T = 'A' | 'B' | 'C' -``` - - - -### Guards - -Use the guard module to test if values are TypeBox types. - -```typescript -import { TypeGuard } from '@sinclair/typebox/guard' - -const T = Type.String() - -if(TypeGuard.TString(T)) { - - // T is TString -} -``` - - - -### Strict - -TypeBox schemas contain the `Kind` and `Modifier` symbol properties. These properties are provided to enable runtime type reflection on schemas, as well as helping TypeBox internally compose types. These properties are not strictly valid JSON schema; so in some cases it may be desirable to omit them. TypeBox provides a `Type.Strict()` function that will omit these properties if necessary. - -```typescript -const T = Type.Object({ // const T = { - name: Type.Optional(Type.String()) // [Kind]: 'Object', -}) // type: 'object', - // properties: { - // name: { - // [Kind]: 'String', - // type: 'string', - // [Modifier]: 'Optional' - // } - // } - // } - -const U = Type.Strict(T) // const U = { - // type: 'object', - // properties: { - // name: { - // type: 'string' - // } - // } - // } -``` - - - -## Values - -TypeBox includes an optional values module that can be used to perform common operations on JavaScript values. This module enables one to create, check and cast values from types. It also provides functionality to check equality, clone and diff and patch JavaScript values. The value module is provided as an optional import. - -```typescript -import { Value } from '@sinclair/typebox/value' -``` - - - -### Create - -Use the Create function to create a value from a TypeBox type. TypeBox will use default values if specified. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) }) - -const A = Value.Create(T) // const A = { x: 0, y: 42 } -``` - - - -### Clone - -Use the Clone function to deeply clone a value - -```typescript -const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 } -``` - - - -### Check - -Use the Check function to type check a value - -```typescript -const T = Type.Object({ x: Type.Number() }) - -const R = Value.Check(T, { x: 1 }) // const R = true -``` - - - -### Cast - -Use the Cast function to cast a value into a type. The cast function will retain as much information as possible from the original value. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false }) - -const X = Value.Cast(T, null) // const X = { x: 0, y: 0 } - -const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 } - -const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 } -``` - - - -### Equal - -Use the Equal function to deeply check for value equality. - -```typescript -const R = Value.Equal( // const R = true - { x: 1, y: 2, z: 3 }, - { x: 1, y: 2, z: 3 } -) -``` - - - -### Diff - -Use the Diff function to produce a sequence of edits to transform one value into another. - -```typescript -const E = Value.Diff( // const E = [ - { x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 }, - { y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 }, -) // { type: 'insert', path: '/w', value: 6 }, - // { type: 'delete', path: '/x' } - // ] -``` - - - -### Patch - -Use the Patch function to apply edits - -```typescript -const A = { x: 1, y: 2 } - -const B = { x: 3 } - -const E = Value.Diff(A, B) // const E = [ - // { type: 'update', path: '/x', value: 3 }, - // { type: 'delete', path: '/y' } - // ] - -const C = Value.Patch(A, E) // const C = { x: 3 } -``` - - - - -### Errors - -Use the Errors function enumerate validation errors. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number() }) - -const R = [...Value.Errors(T, { x: '42' })] // const R = [{ - // schema: { type: 'number' }, - // path: '/x', - // value: '42', - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/y', - // value: undefined, - // message: 'Expected number' - // }] -``` - - - -### Pointer - -Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) Json Pointers. - -```typescript -import { ValuePointer } from '@sinclair/typebox/value' - -const A = { x: 0, y: 0, z: 0 } - -ValuePointer.Set(A, '/x', 1) // const A = { x: 1, y: 0, z: 0 } -ValuePointer.Set(A, '/y', 1) // const A = { x: 1, y: 1, z: 0 } -ValuePointer.Set(A, '/z', 1) // const A = { x: 1, y: 1, z: 1 } -``` - - -## TypeCheck - -TypeBox is written to target JSON Schema Draft 6 and can be used with any Draft 6 compliant validator. TypeBox is developed and tested against Ajv and can be used in any application already making use of this validator. Additionally, TypeBox also provides an optional type compiler that can be used to attain improved compilation and validation performance for certain application types. - - - -### Ajv - -The following example shows setting up Ajv to work with TypeBox. - -```bash -$ npm install ajv ajv-formats --save -``` - -```typescript -import { Type } from '@sinclair/typebox' -import addFormats from 'ajv-formats' -import Ajv from 'ajv' - -//-------------------------------------------------------------------------------------------- -// -// Setup Ajv validator with the following options and formats -// -//-------------------------------------------------------------------------------------------- - -const ajv = addFormats(new Ajv({}), [ - 'date-time', - 'time', - 'date', - 'email', - 'hostname', - 'ipv4', - 'ipv6', - 'uri', - 'uri-reference', - 'uuid', - 'uri-template', - 'json-pointer', - 'relative-json-pointer', - 'regex' -]) - -//-------------------------------------------------------------------------------------------- -// -// Create a TypeBox type -// -//-------------------------------------------------------------------------------------------- - -const T = Type.Object({ - x: Type.Number(), - y: Type.Number(), - z: Type.Number() -}) - -//-------------------------------------------------------------------------------------------- -// -// Validate Data -// -//-------------------------------------------------------------------------------------------- - -const R = ajv.validate(T, { x: 1, y: 2, z: 3 }) // const R = true -``` - - - -### Compiler - -TypeBox provides an optional high performance just-in-time (JIT) compiler and type checker that can be used in applications that require extremely fast validation. Note that this compiler is optimized for TypeBox types only where the schematics are known in advance. If defining custom types with `Type.Unsafe` please consider Ajv. - -The compiler module is provided as an optional import. - -```typescript -import { TypeCompiler } from '@sinclair/typebox/compiler' -``` - -Use the `Compile(...)` function to compile a type. - -```typescript -const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> - -const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true -``` - -Validation errors can be read with the `Errors(...)` function. - -```typescript -const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> - -const value = { } - -const errors = [...C.Errors(value)] // const errors = [{ - // schema: { type: 'number' }, - // path: '/x', - // value: undefined, - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/y', - // value: undefined, - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/z', - // value: undefined, - // message: 'Expected number' - // }] -``` - -Compiled routines can be inspected with the `.Code()` function. - -```typescript -const C = TypeCompiler.Compile(Type.String()) // const C: TypeCheck - -console.log(C.Code()) // return function check(value) { - // return ( - // (typeof value === 'string') - // ) - // } -``` - - - -### Formats - -Use the format module to create user defined string formats. The format module is used by the Value and TypeCompiler modules only. If using Ajv, please refer to the official Ajv format documentation located [here](https://ajv.js.org/guide/formats.html). - -The format module is an optional import. - -```typescript -import { Format } from '@sinclair/typebox/format' -``` - -The following creates a `palindrome` string format. - -```typescript -Format.Set('palindrome', value => value === value.split('').reverse().join('')) -``` - -Once set, this format can then be used by the TypeCompiler and Value modules. - -```typescript -const T = Type.String({ format: 'palindrome' }) - -const A = TypeCompiler.Compile(T).Check('engine') // const A = false - -const B = Value.Check(T, 'kayak') // const B = true -``` - - - -## Benchmark - -This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.11.0. - -For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/). - - - -### Compile - -This benchmark measures compilation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/compile.ts). - -```typescript -┌──────────────────┬────────────┬──────────────┬──────────────┬──────────────┠-│ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │ -├──────────────────┼────────────┼──────────────┼──────────────┼──────────────┤ -│ Number │ 2000 │ ' 428 ms' │ ' 12 ms' │ ' 35.67 x' │ -│ String │ 2000 │ ' 337 ms' │ ' 12 ms' │ ' 28.08 x' │ -│ Boolean │ 2000 │ ' 317 ms' │ ' 11 ms' │ ' 28.82 x' │ -│ Null │ 2000 │ ' 274 ms' │ ' 10 ms' │ ' 27.40 x' │ -│ RegEx │ 2000 │ ' 500 ms' │ ' 18 ms' │ ' 27.78 x' │ -│ ObjectA │ 2000 │ ' 2717 ms' │ ' 49 ms' │ ' 55.45 x' │ -│ ObjectB │ 2000 │ ' 2854 ms' │ ' 37 ms' │ ' 77.14 x' │ -│ Tuple │ 2000 │ ' 1224 ms' │ ' 21 ms' │ ' 58.29 x' │ -│ Union │ 2000 │ ' 1266 ms' │ ' 23 ms' │ ' 55.04 x' │ -│ Vector4 │ 2000 │ ' 1513 ms' │ ' 19 ms' │ ' 79.63 x' │ -│ Matrix4 │ 2000 │ ' 841 ms' │ ' 12 ms' │ ' 70.08 x' │ -│ Literal_String │ 2000 │ ' 327 ms' │ ' 8 ms' │ ' 40.88 x' │ -│ Literal_Number │ 2000 │ ' 358 ms' │ ' 6 ms' │ ' 59.67 x' │ -│ Literal_Boolean │ 2000 │ ' 355 ms' │ ' 5 ms' │ ' 71.00 x' │ -│ Array_Number │ 2000 │ ' 685 ms' │ ' 7 ms' │ ' 97.86 x' │ -│ Array_String │ 2000 │ ' 716 ms' │ ' 11 ms' │ ' 65.09 x' │ -│ Array_Boolean │ 2000 │ ' 732 ms' │ ' 6 ms' │ ' 122.00 x' │ -│ Array_ObjectA │ 2000 │ ' 3503 ms' │ ' 34 ms' │ ' 103.03 x' │ -│ Array_ObjectB │ 2000 │ ' 3626 ms' │ ' 38 ms' │ ' 95.42 x' │ -│ Array_Tuple │ 2000 │ ' 2095 ms' │ ' 21 ms' │ ' 99.76 x' │ -│ Array_Union │ 2000 │ ' 1577 ms' │ ' 22 ms' │ ' 71.68 x' │ -│ Array_Vector4 │ 2000 │ ' 2172 ms' │ ' 17 ms' │ ' 127.76 x' │ -│ Array_Matrix4 │ 2000 │ ' 1468 ms' │ ' 19 ms' │ ' 77.26 x' │ -└──────────────────┴────────────┴──────────────┴──────────────┴──────────────┘ -``` - - - -### Validate - -This benchmark measures validation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/check.ts). - -```typescript -┌──────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┠-│ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │ -├──────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤ -│ Number │ 1000000 │ ' 24 ms' │ ' 9 ms' │ ' 6 ms' │ ' 1.50 x' │ -│ String │ 1000000 │ ' 23 ms' │ ' 19 ms' │ ' 12 ms' │ ' 1.58 x' │ -│ Boolean │ 1000000 │ ' 24 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ -│ Null │ 1000000 │ ' 23 ms' │ ' 18 ms' │ ' 9 ms' │ ' 2.00 x' │ -│ RegEx │ 1000000 │ ' 164 ms' │ ' 46 ms' │ ' 38 ms' │ ' 1.21 x' │ -│ ObjectA │ 1000000 │ ' 548 ms' │ ' 36 ms' │ ' 22 ms' │ ' 1.64 x' │ -│ ObjectB │ 1000000 │ ' 1118 ms' │ ' 51 ms' │ ' 38 ms' │ ' 1.34 x' │ -│ Tuple │ 1000000 │ ' 136 ms' │ ' 25 ms' │ ' 14 ms' │ ' 1.79 x' │ -│ Union │ 1000000 │ ' 338 ms' │ ' 27 ms' │ ' 16 ms' │ ' 1.69 x' │ -│ Recursive │ 1000000 │ ' 3251 ms' │ ' 416 ms' │ ' 98 ms' │ ' 4.24 x' │ -│ Vector4 │ 1000000 │ ' 146 ms' │ ' 23 ms' │ ' 12 ms' │ ' 1.92 x' │ -│ Matrix4 │ 1000000 │ ' 584 ms' │ ' 40 ms' │ ' 25 ms' │ ' 1.60 x' │ -│ Literal_String │ 1000000 │ ' 46 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ -│ Literal_Number │ 1000000 │ ' 46 ms' │ ' 20 ms' │ ' 10 ms' │ ' 2.00 x' │ -│ Literal_Boolean │ 1000000 │ ' 47 ms' │ ' 21 ms' │ ' 10 ms' │ ' 2.10 x' │ -│ Array_Number │ 1000000 │ ' 456 ms' │ ' 31 ms' │ ' 19 ms' │ ' 1.63 x' │ -│ Array_String │ 1000000 │ ' 489 ms' │ ' 40 ms' │ ' 25 ms' │ ' 1.60 x' │ -│ Array_Boolean │ 1000000 │ ' 458 ms' │ ' 35 ms' │ ' 27 ms' │ ' 1.30 x' │ -│ Array_ObjectA │ 1000000 │ ' 13559 ms' │ ' 2568 ms' │ ' 1564 ms' │ ' 1.64 x' │ -│ Array_ObjectB │ 1000000 │ ' 15863 ms' │ ' 2744 ms' │ ' 2060 ms' │ ' 1.33 x' │ -│ Array_Tuple │ 1000000 │ ' 1694 ms' │ ' 96 ms' │ ' 63 ms' │ ' 1.52 x' │ -│ Array_Union │ 1000000 │ ' 4736 ms' │ ' 229 ms' │ ' 86 ms' │ ' 2.66 x' │ -│ Array_Recursive │ 1000000 │ ' 53804 ms' │ ' 6744 ms' │ ' 1167 ms' │ ' 5.78 x' │ -│ Array_Vector4 │ 1000000 │ ' 2244 ms' │ ' 99 ms' │ ' 46 ms' │ ' 2.15 x' │ -│ Array_Matrix4 │ 1000000 │ ' 11966 ms' │ ' 378 ms' │ ' 229 ms' │ ' 1.65 x' │ -└──────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘ -``` - - - -### Compression - -The following table lists esbuild compiled and minified sizes for each TypeBox module. - -```typescript -┌──────────────────────┬────────────┬────────────┬─────────────┠-│ (index) │ Compiled │ Minified │ Compression │ -├──────────────────────┼────────────┼────────────┼─────────────┤ -│ typebox/compiler │ ' 51 kb' │ ' 25 kb' │ '2.00 x' │ -│ typebox/conditional │ ' 42 kb' │ ' 17 kb' │ '2.46 x' │ -│ typebox/format │ ' 0 kb' │ ' 0 kb' │ '2.66 x' │ -│ typebox/guard │ ' 21 kb' │ ' 10 kb' │ '2.08 x' │ -│ typebox/value │ ' 74 kb' │ ' 34 kb' │ '2.16 x' │ -│ typebox │ ' 11 kb' │ ' 6 kb' │ '1.91 x' │ -└──────────────────────┴────────────┴────────────┴─────────────┘ -``` - - - -## Contribute - -TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project preferences open community discussion prior to accepting new features. +
+ +

TypeBox

+ +

JSON Schema Type Builder with Static Type Resolution for TypeScript

+ + + +
+
+ +[![npm version](https://badge.fury.io/js/%40sinclair%2Ftypebox.svg)](https://badge.fury.io/js/%40sinclair%2Ftypebox) +[![Downloads](https://img.shields.io/npm/dm/%40sinclair%2Ftypebox.svg)](https://www.npmjs.com/package/%40sinclair%2Ftypebox) +[![GitHub CI](https://github.com/sinclairzx81/typebox/workflows/GitHub%20CI/badge.svg)](https://github.com/sinclairzx81/typebox/actions) + +
+ + + +## Install + +Node + +```bash +$ npm install @sinclair/typebox --save +``` + +Deno and ESM + +```typescript +import { Static, Type } from 'https://esm.sh/@sinclair/typebox' +``` + +## Example + +```typescript +import { Static, Type } from '@sinclair/typebox' + +const T = Type.String() // const T = { type: 'string' } + +type T = Static // type T = string +``` + + + +## Overview + +TypeBox is a type builder library that creates in-memory JSON Schema objects that can be statically inferred as TypeScript types. The schemas produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox enables one to create a unified type that can be statically checked by TypeScript and runtime asserted using standard JSON Schema validation. + +TypeBox is designed to enable JSON schema to compose with the same flexibility as TypeScript's type system. It can be used either as a simple tool to build up complex schemas or integrated into REST and RPC services to help validate data received over the wire. + +License MIT + +## Contents +- [Install](#install) +- [Overview](#overview) +- [Usage](#usage) +- [Types](#types) + - [Standard](#types-standard) + - [Modifiers](#types-modifiers) + - [Options](#types-options) + - [Extended](#types-extended) + - [Reference](#types-reference) + - [Recursive](#types-recursive) + - [Generic](#types-generic) + - [Conditional](#types-conditional) + - [Unsafe](#types-unsafe) + - [Guards](#types-guards) + - [Strict](#types-strict) +- [Values](#values) + - [Create](#values-create) + - [Clone](#values-clone) + - [Check](#values-check) + - [Cast](#values-cast) + - [Equal](#values-equal) + - [Diff](#values-diff) + - [Patch](#values-patch) + - [Errors](#values-errors) + - [Pointer](#values-pointer) +- [TypeCheck](#typecheck) + - [Ajv](#typecheck-ajv) + - [Compiler](#typecheck-compiler) + - [Formats](#typecheck-formats) +- [Benchmark](#benchmark) + - [Compile](#benchmark-compile) + - [Validate](#benchmark-validate) + - [Compression](#benchmark-compression) +- [Contribute](#contribute) + + + +## Usage + +The following demonstrates TypeBox's general usage. + +```typescript + +import { Static, Type } from '@sinclair/typebox' + +//-------------------------------------------------------------------------------------------- +// +// Let's say you have the following type ... +// +//-------------------------------------------------------------------------------------------- + +type T = { + id: string, + name: string, + timestamp: number +} + +//-------------------------------------------------------------------------------------------- +// +// ... you can express this type in the following way. +// +//-------------------------------------------------------------------------------------------- + +const T = Type.Object({ // const T = { + id: Type.String(), // type: 'object', + name: Type.String(), // properties: { + timestamp: Type.Integer() // id: { +}) // type: 'string' + // }, + // name: { + // type: 'string' + // }, + // timestamp: { + // type: 'integer' + // } + // }, + // required: [ + // 'id', + // 'name', + // 'timestamp' + // ] + // } + +//-------------------------------------------------------------------------------------------- +// +// ... then infer back to the original static type this way. +// +//-------------------------------------------------------------------------------------------- + +type T = Static // type T = { + // id: string, + // name: string, + // timestamp: number + // } + +//-------------------------------------------------------------------------------------------- +// +// ... then use the type both as JSON schema and as a TypeScript type. +// +//-------------------------------------------------------------------------------------------- + +function receive(value: T) { // ... as a Type + + if(JSON.validate(T, value)) { // ... as a Schema + + // ok... + } +} +``` + + + +## Types + +TypeBox provides a set of functions that allow you to compose JSON Schema similar to how you would compose static types with TypeScript. Each function creates a JSON schema fragment which can compose into more complex types. The schemas produced by TypeBox can be passed directly to any JSON Schema compliant validator, or used to reflect runtime metadata for a type. + + + +### Standard + +The following table lists the standard TypeBox types. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ JSON Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Any() │ type T = any │ const T = { } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Unknown() │ type T = unknown │ const T = { } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.String() │ type T = string │ const T = { │ +│ │ │ type: 'string' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Number() │ type T = number │ const T = { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Integer() │ type T = number │ const T = { │ +│ │ │ type: 'integer' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Boolean() │ type T = boolean │ const T = { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Null() │ type T = null │ const T = { │ +│ │ │ type: 'null' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.RegEx(/foo/) │ type T = string │ const T = { │ +│ │ │ type: 'string', │ +│ │ │ pattern: 'foo' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Literal(42) │ type T = 42 │ const T = { │ +│ │ │ const: 42, │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Array( │ type T = number[] │ const T = { │ +│ Type.Number() │ │ type: 'array', │ +│ ) │ │ items: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ x: Type.Number(), │ x: number, │ type: 'object', │ +│ y: Type.Number() │ y: number │ properties: { │ +│ }) │ } │ x: { │ +│ │ │ type: 'number' │ +│ │ │ }, │ +│ │ │ y: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ }, │ +│ │ │ required: ['x', 'y'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │ +│ Type.Number(), │ │ type: 'array', │ +│ Type.Number() │ │ items: [{ │ +│ ]) │ │ type: 'number' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ additionalItems: false, │ +│ │ │ minItems: 2, │ +│ │ │ maxItems: 2 │ +│ │ │ } │ +│ │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ enum Foo { │ enum Foo { │ const T = { │ +│ A, │ A, │ anyOf: [{ │ +│ B │ B │ type: 'number', │ +│ } │ } │ const: 0 │ +│ │ │ }, { │ +│ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │ +│ │ │ const: 1 │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.KeyOf( │ type T = keyof { │ const T = { │ +│ Type.Object({ │ x: number, │ anyOf: [{ │ +│ x: Type.Number(), │ y: number │ type: 'string', │ +│ y: Type.Number() │ } │ const: 'x' │ +│ }) │ │ }, { │ +│ ) │ │ type: 'string', │ +│ │ │ const: 'y' │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Union([ │ type T = string | number │ const T = { │ +│ Type.String(), │ │ anyOf: [{ │ +│ Type.Number() │ │ type: 'string' │ +│ ]) │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Intersect([ │ type T = { │ const T = { │ +│ Type.Object({ │ x: number │ type: 'object', │ +│ x: Type.Number() │ } & { │ properties: { │ +│ }), │ y: number │ x: { │ +│ Type.Object({ │ } │ type: 'number' │ +│ y: Type.Number() │ │ }, │ +│ }) │ │ y: { │ +│ ]) │ │ type: 'number' │ +│ │ │ } │ +│ │ │ }, │ +│ │ │ required: ['x', 'y'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Never() │ type T = never │ const T = { │ +│ │ │ allOf: [{ │ +│ │ │ type: 'boolean', │ +│ │ │ const: false │ +│ │ │ }, { │ +│ │ │ type: 'boolean', │ +│ │ │ const: true │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Record( │ type T = Record< │ const T = { │ +│ Type.String(), │ string, │ type: 'object', │ +│ Type.Number() │ number, │ patternProperties: { │ +│ ) │ > │ '^.*$': { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Partial( │ type T = Partial<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ properties: { │ +│ y: Type.Number() | }> │ x: { │ +│ }) │ │ type: 'number' │ +│ ) │ │ }, │ +│ │ │ y: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Required( │ type T = Required<{ │ const T = { │ +│ Type.Object({ │ x?: number, │ type: 'object', │ +│ x: Type.Optional( │ y?: number │ properties: { │ +│ Type.Number() | }> │ x: { │ +│ ), │ │ type: 'number' │ +│ y: Type.Optional( │ │ }, │ +│ Type.Number() │ │ y: { │ +│ ) │ │ type: 'number' │ +│ }) │ │ } │ +│ ) │ │ }, │ +│ │ │ required: ['x', 'y'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Pick( │ type T = Pick<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ properties: { │ +│ y: Type.Number() | }, 'x'> │ x: { │ +│ }), ['x'] │ │ type: 'number' │ +│ ) │ │ } │ +│ │ │ }, │ +│ │ │ required: ['x'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Omit( │ type T = Omit<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ properties: { │ +│ y: Type.Number() | }, 'x'> │ y: { │ +│ }), ['x'] │ │ type: 'number' │ +│ ) │ │ } │ +│ │ │ }, │ +│ │ │ required: ['y'] │ +│ │ │ } │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Modifiers + +TypeBox provides modifiers that can be applied to an objects properties. This allows for `optional` and `readonly` to be applied to that property. The following table illustates how they map between TypeScript and JSON Schema. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ JSON Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.Optional( │ name?: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.Readonly( │ readonly name: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ }, │ +│ │ │ required: ['name'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Options + +You can pass additional JSON schema options on the last argument of any given type. The following are some examples. + +```typescript +// string must be an email +const T = Type.String({ format: 'email' }) + +// number must be a multiple of 2 +const T = Type.Number({ multipleOf: 2 }) + +// array must have at least 5 integer values +const T = Type.Array(Type.Integer(), { minItems: 5 }) +``` + + + +### Extended + +In addition to JSON schema types, TypeBox provides several extended types that allow for the composition of `function` and `constructor` types. These additional types are not valid JSON Schema and will not validate using typical JSON Schema validation. However, these types can be used to frame JSON schema and describe callable interfaces that may receive JSON validated data. These types are as follows. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ Extended Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Constructor([ │ type T = new ( │ const T = { │ +│ Type.String(), │ arg0: string, │ type: 'constructor' │ +│ Type.Number() │ arg1: number │ parameters: [{ │ +│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ return: { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Function([ │ type T = ( │ const T = { │ +| Type.String(), │ arg0: string, │ type : 'function', │ +│ Type.Number() │ arg1: number │ parameters: [{ │ +│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ return: { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │ +│ │ │ type: 'object', │ +│ │ │ specialized: 'Uint8Array' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Promise( │ type T = Promise │ const T = { │ +│ Type.String() │ │ type: 'promise', │ +│ ) │ │ item: { │ +│ │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Undefined() │ type T = undefined │ const T = { │ +│ │ │ type: 'object', │ +│ │ │ specialized: 'Undefined' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Void() │ type T = void │ const T = { │ +│ │ │ type: 'null' │ +│ │ │ } │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Reference + +Use `Type.Ref(...)` to create referenced types. The target type must specify an `$id`. + +```typescript +const T = Type.String({ $id: 'T' }) // const T = { + // $id: 'T', + // type: 'string' + // } + +const R = Type.Ref(T) // const R = { + // $ref: 'T' + // } +``` + + + +### Recursive + +Use `Type.Recursive(...)` to create recursive types. + +```typescript +const Node = Type.Recursive(Node => Type.Object({ // const Node = { + id: Type.String(), // $id: 'Node', + nodes: Type.Array(Node) // type: 'object', +}), { $id: 'Node' }) // properties: { + // id: { + // type: 'string' + // }, + // nodes: { + // type: 'array', + // items: { + // $ref: 'Node' + // } + // } + // }, + // required: [ + // 'id', + // 'nodes' + // ] + // } + +type Node = Static // type Node = { + // id: string + // nodes: Node[] + // } + +function test(node: Node) { + const id = node.nodes[0].nodes[0] // id is string + .nodes[0].nodes[0] + .id +} +``` + + + +### Generic + +Use functions to create generic types. The following creates a generic `Nullable` type. + +```typescript +import { Type, Static, TSchema } from '@sinclair/typebox' + +const Nullable = (type: T) => Type.Union([type, Type.Null()]) + +const T = Nullable(Type.String()) // const T = { + // anyOf: [{ + // type: 'string' + // }, { + // type: 'null' + // }] + // } + +type T = Static // type T = string | null + +const U = Nullable(Type.Number()) // const U = { + // anyOf: [{ + // type: 'number' + // }, { + // type: 'null' + // }] + // } + +type U = Static // type U = number | null +``` + + + +### Conditional + +Use the conditional module to create [Conditional Types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html). This module implements TypeScript's structural equivalence checks to enable TypeBox types to be conditionally inferred at runtime. This module also provides the [Extract](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union) and [Exclude](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers) utility types which are expressed as conditional types in TypeScript. + +The conditional module is provided as an optional import. + +```typescript +import { Conditional } from '@sinclair/typebox/conditional' +``` +The following table shows the TypeBox mappings between TypeScript and JSON schema. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ JSON Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Conditional.Extends( │ type T = │ const T = { │ +│ Type.String(), │ string extends number │ const: false, │ +│ Type.Number(), │ true : false │ type: 'boolean' │ +│ Type.Literal(true), │ │ } │ +│ Type.Literal(false) │ │ │ +│ ) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Conditional.Extract( │ type T = Extract< │ const T = { │ +│ Type.Union([ │ 'a' | 'b' | 'c', │ anyOf: [{ │ +│ Type.Literal('a'), │ 'a' | 'f' │ const: 'a' │ +│ Type.Literal('b'), │ > │ type: 'string' │ +│ Type.Literal('c') │ │ }] │ +│ ]), │ │ } │ +│ Type.Union([ │ │ │ +│ Type.Literal('a'), │ │ │ +│ Type.Literal('f') │ │ │ +│ ]) │ │ │ +│ ) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Conditional.Exclude( │ type T = Exclude< │ const T = { │ +│ Type.Union([ │ 'a' | 'b' | 'c', │ anyOf: [{ │ +│ Type.Literal('a'), │ 'a' │ const: 'b', │ +│ Type.Literal('b'), │ > │ type: 'string' │ +│ Type.Literal('c') │ │ }, { │ +│ ]), │ │ const: 'c', │ +│ Type.Union([ │ │ type: 'string' │ +│ Type.Literal('a') │ │ }] │ +│ ]) │ │ } │ +│ ) │ │ │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Unsafe + +Use `Type.Unsafe(...)` to create custom schemas with user defined inference rules. + +```typescript +const T = Type.Unsafe({ type: 'number' }) // const T = { + // type: 'number' + // } + +type T = Static // type T = string +``` + +This function can be used to create custom schemas for validators that require specific schema representations. An example of this might be OpenAPI's `nullable` and `enum` schemas which are not provided by TypeBox. The following demonstrates using `Type.Unsafe(...)` to create these types. + +```typescript +import { Type, Static, TSchema } from '@sinclair/typebox' + +//-------------------------------------------------------------------------------------------- +// +// Nullable +// +//-------------------------------------------------------------------------------------------- + +function Nullable(schema: T) { + return Type.Unsafe | null>({ ...schema, nullable: true }) +} + +const T = Nullable(Type.String()) // const T = { + // type: 'string', + // nullable: true + // } + +type T = Static // type T = string | null + + +//-------------------------------------------------------------------------------------------- +// +// StringEnum +// +//-------------------------------------------------------------------------------------------- + +function StringEnum(values: [...T]) { + return Type.Unsafe({ type: 'string', enum: values }) +} + +const T = StringEnum(['A', 'B', 'C']) // const T = { + // enum: ['A', 'B', 'C'] + // } + +type T = Static // type T = 'A' | 'B' | 'C' +``` + + + +### Guards + +Use the guard module to test if values are TypeBox types. + +```typescript +import { TypeGuard } from '@sinclair/typebox/guard' + +const T = Type.String() + +if(TypeGuard.TString(T)) { + + // T is TString +} +``` + + + +### Strict + +TypeBox schemas contain the `Kind` and `Modifier` symbol properties. These properties are provided to enable runtime type reflection on schemas, as well as helping TypeBox internally compose types. These properties are not strictly valid JSON schema; so in some cases it may be desirable to omit them. TypeBox provides a `Type.Strict()` function that will omit these properties if necessary. + +```typescript +const T = Type.Object({ // const T = { + name: Type.Optional(Type.String()) // [Kind]: 'Object', +}) // type: 'object', + // properties: { + // name: { + // [Kind]: 'String', + // type: 'string', + // [Modifier]: 'Optional' + // } + // } + // } + +const U = Type.Strict(T) // const U = { + // type: 'object', + // properties: { + // name: { + // type: 'string' + // } + // } + // } +``` + + + +## Values + +TypeBox includes an optional values module that can be used to perform common operations on JavaScript values. This module enables one to create, check and cast values from types. It also provides functionality to check equality, clone and diff and patch JavaScript values. The value module is provided as an optional import. + +```typescript +import { Value } from '@sinclair/typebox/value' +``` + + + +### Create + +Use the Create function to create a value from a TypeBox type. TypeBox will use default values if specified. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) }) + +const A = Value.Create(T) // const A = { x: 0, y: 42 } +``` + + + +### Clone + +Use the Clone function to deeply clone a value + +```typescript +const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 } +``` + + + +### Check + +Use the Check function to type check a value + +```typescript +const T = Type.Object({ x: Type.Number() }) + +const R = Value.Check(T, { x: 1 }) // const R = true +``` + + + +### Cast + +Use the Cast function to cast a value into a type. The cast function will retain as much information as possible from the original value. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false }) + +const X = Value.Cast(T, null) // const X = { x: 0, y: 0 } + +const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 } + +const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 } +``` + + + +### Equal + +Use the Equal function to deeply check for value equality. + +```typescript +const R = Value.Equal( // const R = true + { x: 1, y: 2, z: 3 }, + { x: 1, y: 2, z: 3 } +) +``` + + + +### Diff + +Use the Diff function to produce a sequence of edits to transform one value into another. + +```typescript +const E = Value.Diff( // const E = [ + { x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 }, + { y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 }, +) // { type: 'insert', path: '/w', value: 6 }, + // { type: 'delete', path: '/x' } + // ] +``` + + + +### Patch + +Use the Patch function to apply edits + +```typescript +const A = { x: 1, y: 2 } + +const B = { x: 3 } + +const E = Value.Diff(A, B) // const E = [ + // { type: 'update', path: '/x', value: 3 }, + // { type: 'delete', path: '/y' } + // ] + +const C = Value.Patch(A, E) // const C = { x: 3 } +``` + + + + +### Errors + +Use the Errors function enumerate validation errors. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number() }) + +const R = [...Value.Errors(T, { x: '42' })] // const R = [{ + // schema: { type: 'number' }, + // path: '/x', + // value: '42', + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/y', + // value: undefined, + // message: 'Expected number' + // }] +``` + + + +### Pointer + +Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) Json Pointers. + +```typescript +import { ValuePointer } from '@sinclair/typebox/value' + +const A = { x: 0, y: 0, z: 0 } + +ValuePointer.Set(A, '/x', 1) // const A = { x: 1, y: 0, z: 0 } +ValuePointer.Set(A, '/y', 1) // const A = { x: 1, y: 1, z: 0 } +ValuePointer.Set(A, '/z', 1) // const A = { x: 1, y: 1, z: 1 } +``` + + +## TypeCheck + +TypeBox is written to target JSON Schema Draft 6 and can be used with any Draft 6 compliant validator. TypeBox is developed and tested against Ajv and can be used in any application already making use of this validator. Additionally, TypeBox also provides an optional type compiler that can be used to attain improved compilation and validation performance for certain application types. + + + +### Ajv + +The following example shows setting up Ajv to work with TypeBox. + +```bash +$ npm install ajv ajv-formats --save +``` + +```typescript +import { Type } from '@sinclair/typebox' +import addFormats from 'ajv-formats' +import Ajv from 'ajv' + +//-------------------------------------------------------------------------------------------- +// +// Setup Ajv validator with the following options and formats +// +//-------------------------------------------------------------------------------------------- + +const ajv = addFormats(new Ajv({}), [ + 'date-time', + 'time', + 'date', + 'email', + 'hostname', + 'ipv4', + 'ipv6', + 'uri', + 'uri-reference', + 'uuid', + 'uri-template', + 'json-pointer', + 'relative-json-pointer', + 'regex' +]) + +//-------------------------------------------------------------------------------------------- +// +// Create a TypeBox type +// +//-------------------------------------------------------------------------------------------- + +const T = Type.Object({ + x: Type.Number(), + y: Type.Number(), + z: Type.Number() +}) + +//-------------------------------------------------------------------------------------------- +// +// Validate Data +// +//-------------------------------------------------------------------------------------------- + +const R = ajv.validate(T, { x: 1, y: 2, z: 3 }) // const R = true +``` + + + +### Compiler + +TypeBox provides an optional high performance just-in-time (JIT) compiler and type checker that can be used in applications that require extremely fast validation. Note that this compiler is optimized for TypeBox types only where the schematics are known in advance. If defining custom types with `Type.Unsafe` please consider Ajv. + +The compiler module is provided as an optional import. + +```typescript +import { TypeCompiler } from '@sinclair/typebox/compiler' +``` + +Use the `Compile(...)` function to compile a type. + +```typescript +const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> + +const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true +``` + +Validation errors can be read with the `Errors(...)` function. + +```typescript +const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> + +const value = { } + +const errors = [...C.Errors(value)] // const errors = [{ + // schema: { type: 'number' }, + // path: '/x', + // value: undefined, + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/y', + // value: undefined, + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/z', + // value: undefined, + // message: 'Expected number' + // }] +``` + +Compiled routines can be inspected with the `.Code()` function. + +```typescript +const C = TypeCompiler.Compile(Type.String()) // const C: TypeCheck + +console.log(C.Code()) // return function check(value) { + // return ( + // (typeof value === 'string') + // ) + // } +``` + + + +### Formats + +Use the format module to create user defined string formats. The format module is used by the Value and TypeCompiler modules only. If using Ajv, please refer to the official Ajv format documentation located [here](https://ajv.js.org/guide/formats.html). + +The format module is an optional import. + +```typescript +import { Format } from '@sinclair/typebox/format' +``` + +The following creates a `palindrome` string format. + +```typescript +Format.Set('palindrome', value => value === value.split('').reverse().join('')) +``` + +Once set, this format can then be used by the TypeCompiler and Value modules. + +```typescript +const T = Type.String({ format: 'palindrome' }) + +const A = TypeCompiler.Compile(T).Check('engine') // const A = false + +const B = Value.Check(T, 'kayak') // const B = true +``` + + + +## Benchmark + +This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.11.0. + +For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/). + + + +### Compile + +This benchmark measures compilation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/compile.ts). + +```typescript +┌──────────────────┬────────────┬──────────────┬──────────────┬──────────────┠+│ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │ +├──────────────────┼────────────┼──────────────┼──────────────┼──────────────┤ +│ Number │ 2000 │ ' 428 ms' │ ' 12 ms' │ ' 35.67 x' │ +│ String │ 2000 │ ' 337 ms' │ ' 12 ms' │ ' 28.08 x' │ +│ Boolean │ 2000 │ ' 317 ms' │ ' 11 ms' │ ' 28.82 x' │ +│ Null │ 2000 │ ' 274 ms' │ ' 10 ms' │ ' 27.40 x' │ +│ RegEx │ 2000 │ ' 500 ms' │ ' 18 ms' │ ' 27.78 x' │ +│ ObjectA │ 2000 │ ' 2717 ms' │ ' 49 ms' │ ' 55.45 x' │ +│ ObjectB │ 2000 │ ' 2854 ms' │ ' 37 ms' │ ' 77.14 x' │ +│ Tuple │ 2000 │ ' 1224 ms' │ ' 21 ms' │ ' 58.29 x' │ +│ Union │ 2000 │ ' 1266 ms' │ ' 23 ms' │ ' 55.04 x' │ +│ Vector4 │ 2000 │ ' 1513 ms' │ ' 19 ms' │ ' 79.63 x' │ +│ Matrix4 │ 2000 │ ' 841 ms' │ ' 12 ms' │ ' 70.08 x' │ +│ Literal_String │ 2000 │ ' 327 ms' │ ' 8 ms' │ ' 40.88 x' │ +│ Literal_Number │ 2000 │ ' 358 ms' │ ' 6 ms' │ ' 59.67 x' │ +│ Literal_Boolean │ 2000 │ ' 355 ms' │ ' 5 ms' │ ' 71.00 x' │ +│ Array_Number │ 2000 │ ' 685 ms' │ ' 7 ms' │ ' 97.86 x' │ +│ Array_String │ 2000 │ ' 716 ms' │ ' 11 ms' │ ' 65.09 x' │ +│ Array_Boolean │ 2000 │ ' 732 ms' │ ' 6 ms' │ ' 122.00 x' │ +│ Array_ObjectA │ 2000 │ ' 3503 ms' │ ' 34 ms' │ ' 103.03 x' │ +│ Array_ObjectB │ 2000 │ ' 3626 ms' │ ' 38 ms' │ ' 95.42 x' │ +│ Array_Tuple │ 2000 │ ' 2095 ms' │ ' 21 ms' │ ' 99.76 x' │ +│ Array_Union │ 2000 │ ' 1577 ms' │ ' 22 ms' │ ' 71.68 x' │ +│ Array_Vector4 │ 2000 │ ' 2172 ms' │ ' 17 ms' │ ' 127.76 x' │ +│ Array_Matrix4 │ 2000 │ ' 1468 ms' │ ' 19 ms' │ ' 77.26 x' │ +└──────────────────┴────────────┴──────────────┴──────────────┴──────────────┘ +``` + + + +### Validate + +This benchmark measures validation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/check.ts). + +```typescript +┌──────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┠+│ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │ +├──────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤ +│ Number │ 1000000 │ ' 24 ms' │ ' 9 ms' │ ' 6 ms' │ ' 1.50 x' │ +│ String │ 1000000 │ ' 23 ms' │ ' 19 ms' │ ' 12 ms' │ ' 1.58 x' │ +│ Boolean │ 1000000 │ ' 24 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ +│ Null │ 1000000 │ ' 23 ms' │ ' 18 ms' │ ' 9 ms' │ ' 2.00 x' │ +│ RegEx │ 1000000 │ ' 164 ms' │ ' 46 ms' │ ' 38 ms' │ ' 1.21 x' │ +│ ObjectA │ 1000000 │ ' 548 ms' │ ' 36 ms' │ ' 22 ms' │ ' 1.64 x' │ +│ ObjectB │ 1000000 │ ' 1118 ms' │ ' 51 ms' │ ' 38 ms' │ ' 1.34 x' │ +│ Tuple │ 1000000 │ ' 136 ms' │ ' 25 ms' │ ' 14 ms' │ ' 1.79 x' │ +│ Union │ 1000000 │ ' 338 ms' │ ' 27 ms' │ ' 16 ms' │ ' 1.69 x' │ +│ Recursive │ 1000000 │ ' 3251 ms' │ ' 416 ms' │ ' 98 ms' │ ' 4.24 x' │ +│ Vector4 │ 1000000 │ ' 146 ms' │ ' 23 ms' │ ' 12 ms' │ ' 1.92 x' │ +│ Matrix4 │ 1000000 │ ' 584 ms' │ ' 40 ms' │ ' 25 ms' │ ' 1.60 x' │ +│ Literal_String │ 1000000 │ ' 46 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ +│ Literal_Number │ 1000000 │ ' 46 ms' │ ' 20 ms' │ ' 10 ms' │ ' 2.00 x' │ +│ Literal_Boolean │ 1000000 │ ' 47 ms' │ ' 21 ms' │ ' 10 ms' │ ' 2.10 x' │ +│ Array_Number │ 1000000 │ ' 456 ms' │ ' 31 ms' │ ' 19 ms' │ ' 1.63 x' │ +│ Array_String │ 1000000 │ ' 489 ms' │ ' 40 ms' │ ' 25 ms' │ ' 1.60 x' │ +│ Array_Boolean │ 1000000 │ ' 458 ms' │ ' 35 ms' │ ' 27 ms' │ ' 1.30 x' │ +│ Array_ObjectA │ 1000000 │ ' 13559 ms' │ ' 2568 ms' │ ' 1564 ms' │ ' 1.64 x' │ +│ Array_ObjectB │ 1000000 │ ' 15863 ms' │ ' 2744 ms' │ ' 2060 ms' │ ' 1.33 x' │ +│ Array_Tuple │ 1000000 │ ' 1694 ms' │ ' 96 ms' │ ' 63 ms' │ ' 1.52 x' │ +│ Array_Union │ 1000000 │ ' 4736 ms' │ ' 229 ms' │ ' 86 ms' │ ' 2.66 x' │ +│ Array_Recursive │ 1000000 │ ' 53804 ms' │ ' 6744 ms' │ ' 1167 ms' │ ' 5.78 x' │ +│ Array_Vector4 │ 1000000 │ ' 2244 ms' │ ' 99 ms' │ ' 46 ms' │ ' 2.15 x' │ +│ Array_Matrix4 │ 1000000 │ ' 11966 ms' │ ' 378 ms' │ ' 229 ms' │ ' 1.65 x' │ +└──────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘ +``` + + + +### Compression + +The following table lists esbuild compiled and minified sizes for each TypeBox module. + +```typescript +┌──────────────────────┬────────────┬────────────┬─────────────┠+│ (index) │ Compiled │ Minified │ Compression │ +├──────────────────────┼────────────┼────────────┼─────────────┤ +│ typebox/compiler │ ' 51 kb' │ ' 25 kb' │ '2.00 x' │ +│ typebox/conditional │ ' 42 kb' │ ' 17 kb' │ '2.46 x' │ +│ typebox/format │ ' 0 kb' │ ' 0 kb' │ '2.66 x' │ +│ typebox/guard │ ' 21 kb' │ ' 10 kb' │ '2.08 x' │ +│ typebox/value │ ' 74 kb' │ ' 34 kb' │ '2.16 x' │ +│ typebox │ ' 11 kb' │ ' 6 kb' │ '1.91 x' │ +└──────────────────────┴────────────┴────────────┴─────────────┘ +``` + + + +## Contribute + +TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project preferences open community discussion prior to accepting new features. diff --git a/node_modules/@sinclair/typebox/typebox.d.ts b/node_modules/@sinclair/typebox/typebox.d.ts index 0ace42a1..92ca2487 100644 --- a/node_modules/@sinclair/typebox/typebox.d.ts +++ b/node_modules/@sinclair/typebox/typebox.d.ts @@ -1,408 +1,408 @@ -export declare const Kind: unique symbol; -export declare const Hint: unique symbol; -export declare const Modifier: unique symbol; -export declare type TModifier = TReadonlyOptional | TOptional | TReadonly; -export declare type TReadonly = T & { - [Modifier]: 'Readonly'; -}; -export declare type TOptional = T & { - [Modifier]: 'Optional'; -}; -export declare type TReadonlyOptional = T & { - [Modifier]: 'ReadonlyOptional'; -}; -export interface SchemaOptions { - $schema?: string; - /** Id for this schema */ - $id?: string; - /** Title of this schema */ - title?: string; - /** Description of this schema */ - description?: string; - /** Default value for this schema */ - default?: any; - /** Example values matching this schema. */ - examples?: any; - [prop: string]: any; -} -export interface TSchema extends SchemaOptions { - [Kind]: string; - [Hint]?: string; - [Modifier]?: string; - params: unknown[]; - static: unknown; -} -export declare type TAnySchema = TSchema | TAny | TArray | TBoolean | TConstructor | TEnum | TFunction | TInteger | TLiteral | TNull | TNumber | TObject | TPromise | TRecord | TSelf | TRef | TString | TTuple | TUndefined | TUnion | TUint8Array | TUnknown | TVoid; -export interface NumericOptions extends SchemaOptions { - exclusiveMaximum?: number; - exclusiveMinimum?: number; - maximum?: number; - minimum?: number; - multipleOf?: number; -} -export declare type TNumeric = TInteger | TNumber; -export interface TAny extends TSchema { - [Kind]: 'Any'; - static: any; -} -export interface ArrayOptions extends SchemaOptions { - uniqueItems?: boolean; - minItems?: number; - maxItems?: number; -} -export interface TArray extends TSchema, ArrayOptions { - [Kind]: 'Array'; - static: Array>; - type: 'array'; - items: T; -} -export interface TBoolean extends TSchema { - [Kind]: 'Boolean'; - static: boolean; - type: 'boolean'; -} -export declare type TConstructorParameters> = TTuple; -export declare type TInstanceType> = T['returns']; -export declare type StaticContructorParameters = [...{ - [K in keyof T]: T[K] extends TSchema ? Static : never; -}]; -export interface TConstructor extends TSchema { - [Kind]: 'Constructor'; - static: new (...param: StaticContructorParameters) => Static; - type: 'constructor'; - parameters: T; - returns: U; -} -export interface TEnumOption { - type: 'number' | 'string'; - const: T; -} -export interface TEnum = Record> extends TSchema { - [Kind]: 'Union'; - static: T[keyof T]; - anyOf: TLiteral[]; -} -export declare type TParameters = TTuple; -export declare type TReturnType = T['returns']; -export declare type StaticFunctionParameters = [...{ - [K in keyof T]: T[K] extends TSchema ? Static : never; -}]; -export interface TFunction extends TSchema { - [Kind]: 'Function'; - static: (...param: StaticFunctionParameters) => Static; - type: 'function'; - parameters: T; - returns: U; -} -export interface TInteger extends TSchema, NumericOptions { - [Kind]: 'Integer'; - static: number; - type: 'integer'; -} -export declare type IntersectReduce = T extends [infer A, ...infer B] ? IntersectReduce : I extends object ? I : {}; -export declare type IntersectEvaluate = { - [K in keyof T]: T[K] extends TSchema ? Static : never; -}; -export declare type IntersectProperties = { - [K in keyof T]: T[K] extends TObject ? P : {}; -}; -export interface TIntersect extends TObject { - static: IntersectReduce>; - properties: IntersectReduce>; -} -export declare type UnionToIntersect = (U extends unknown ? (arg: U) => 0 : never) extends (arg: infer I) => 0 ? I : never; -export declare type UnionLast = UnionToIntersect 0 : never> extends (x: infer L) => 0 ? L : never; -export declare type UnionToTuple> = [U] extends [never] ? [] : [...UnionToTuple>, L]; -export declare type UnionStringLiteralToTuple = T extends TUnion ? { - [I in keyof L]: L[I] extends TLiteral ? C : never; -} : never; -export declare type UnionLiteralsFromObject = { - [K in ObjectPropertyKeys]: TLiteral; -} extends infer R ? UnionToTuple : never; -export interface TKeyOf extends TUnion> { -} -export declare type TLiteralValue = string | number | boolean; -export interface TLiteral extends TSchema { - [Kind]: 'Literal'; - static: T; - const: T; -} -export interface TNever extends TSchema { - [Kind]: 'Never'; - static: never; - allOf: [{ - type: 'boolean'; - const: false; - }, { - type: 'boolean'; - const: true; - }]; -} -export interface TNull extends TSchema { - [Kind]: 'Null'; - static: null; - type: 'null'; -} -export interface TNumber extends TSchema, NumericOptions { - [Kind]: 'Number'; - static: number; - type: 'number'; -} -export declare type ReadonlyOptionalPropertyKeys = { - [K in keyof T]: T[K] extends TReadonlyOptional ? K : never; -}[keyof T]; -export declare type ReadonlyPropertyKeys = { - [K in keyof T]: T[K] extends TReadonly ? K : never; -}[keyof T]; -export declare type OptionalPropertyKeys = { - [K in keyof T]: T[K] extends TOptional ? K : never; -}[keyof T]; -export declare type RequiredPropertyKeys = keyof Omit | ReadonlyPropertyKeys | OptionalPropertyKeys>; -export declare type PropertiesReduce = { - readonly [K in ReadonlyOptionalPropertyKeys]?: Static; -} & { - readonly [K in ReadonlyPropertyKeys]: Static; -} & { - [K in OptionalPropertyKeys]?: Static; -} & { - [K in RequiredPropertyKeys]: Static; -} extends infer R ? { - [K in keyof R]: R[K]; -} : never; -export declare type TRecordProperties, T extends TSchema> = Static extends string ? { - [X in Static]: T; -} : never; -export interface TProperties { - [key: string]: TSchema; -} -export declare type ObjectProperties = T extends TObject ? U : never; -export declare type ObjectPropertyKeys = T extends TObject ? keyof U : never; -export declare type TAdditionalProperties = undefined | TSchema | boolean; -export interface ObjectOptions extends SchemaOptions { - additionalProperties?: TAdditionalProperties; - minProperties?: number; - maxProperties?: number; -} -export interface TObject extends TSchema, ObjectOptions { - [Kind]: 'Object'; - static: PropertiesReduce; - additionalProperties?: TAdditionalProperties; - type: 'object'; - properties: T; - required?: string[]; -} -export interface TOmit[]> extends TObject, ObjectOptions { - static: Omit, Properties[number]>; - properties: T extends TObject ? Omit : never; -} -export interface TPartial extends TObject { - static: Partial>; - properties: { - [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional ? TReadonlyOptional : T['properties'][K] extends TReadonly ? TReadonlyOptional : T['properties'][K] extends TOptional ? TOptional : TOptional; - }; -} -export declare type TPick[]> = TObject<{ - [K in Properties[number]]: T['properties'][K]; -}>; -export interface TPromise extends TSchema { - [Kind]: 'Promise'; - static: Promise>; - type: 'promise'; - item: TSchema; -} -export declare type TRecordKey = TString | TNumeric | TUnion[]>; -export interface TRecord extends TSchema { - [Kind]: 'Record'; - static: Record, Static>; - type: 'object'; - patternProperties: { - [pattern: string]: T; - }; - additionalProperties: false; -} -export interface TSelf extends TSchema { - [Kind]: 'Self'; - static: this['params'][0]; - $ref: string; -} -export declare type TRecursiveReduce = Static]>; -export interface TRecursive extends TSchema { - static: TRecursiveReduce; -} -export interface TRef extends TSchema { - [Kind]: 'Ref'; - static: Static; - $ref: string; -} -export interface TRequired> extends TObject { - static: Required>; - properties: { - [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional ? TReadonly : T['properties'][K] extends TReadonly ? TReadonly : T['properties'][K] extends TOptional ? U : T['properties'][K]; - }; -} -export declare type StringFormatOption = 'date-time' | 'time' | 'date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'iri' | 'uuid' | 'iri-reference' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex'; -export interface StringOptions extends SchemaOptions { - minLength?: number; - maxLength?: number; - pattern?: string; - format?: Format; - contentEncoding?: '7bit' | '8bit' | 'binary' | 'quoted-printable' | 'base64'; - contentMediaType?: string; -} -export interface TString extends TSchema, StringOptions { - [Kind]: 'String'; - static: string; - type: 'string'; -} -export declare type TupleToArray> = T extends TTuple ? R : never; -export interface TTuple extends TSchema { - [Kind]: 'Tuple'; - static: { - [K in keyof T]: T[K] extends TSchema ? Static : T[K]; - }; - type: 'array'; - items?: T; - additionalItems?: false; - minItems: number; - maxItems: number; -} -export interface TUndefined extends TSchema { - [Kind]: 'Undefined'; - specialized: 'Undefined'; - static: undefined; - type: 'object'; -} -export interface TUnion extends TSchema { - [Kind]: 'Union'; - static: { - [K in keyof T]: T[K] extends TSchema ? Static : never; - }[number]; - anyOf: T; -} -export interface Uint8ArrayOptions extends SchemaOptions { - maxByteLength?: number; - minByteLength?: number; -} -export interface TUint8Array extends TSchema, Uint8ArrayOptions { - [Kind]: 'Uint8Array'; - static: Uint8Array; - specialized: 'Uint8Array'; - type: 'object'; -} -export interface TUnknown extends TSchema { - [Kind]: 'Unknown'; - static: unknown; -} -export interface UnsafeOptions extends SchemaOptions { - [Kind]?: string; -} -export interface TUnsafe extends TSchema { - [Kind]: string; - static: T; -} -export interface TVoid extends TSchema { - [Kind]: 'Void'; - static: void; - type: 'null'; -} -/** Creates a static type from a TypeBox type */ -export declare type Static = (T & { - params: P; -})['static']; -export declare class TypeBuilder { - /** Creates a readonly optional property */ - ReadonlyOptional(item: T): TReadonlyOptional; - /** Creates a readonly property */ - Readonly(item: T): TReadonly; - /** Creates a optional property */ - Optional(item: T): TOptional; - /** Creates a any type */ - Any(options?: SchemaOptions): TAny; - /** Creates a array type */ - Array(items: T, options?: ArrayOptions): TArray; - /** Creates a boolean type */ - Boolean(options?: SchemaOptions): TBoolean; - /** Creates a tuple type from this constructors parameters */ - ConstructorParameters>(schema: T, options?: SchemaOptions): TConstructorParameters; - /** Creates a constructor type */ - Constructor, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TConstructor, U>; - /** Creates a constructor type */ - Constructor(parameters: [...T], returns: U, options?: SchemaOptions): TConstructor; - /** Creates a enum type */ - Enum>(item: T, options?: SchemaOptions): TEnum; - /** Creates a function type */ - Function, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TFunction, U>; - /** Creates a function type */ - Function(parameters: [...T], returns: U, options?: SchemaOptions): TFunction; - /** Creates a type from this constructors instance type */ - InstanceType>(schema: T, options?: SchemaOptions): TInstanceType; - /** Creates a integer type */ - Integer(options?: NumericOptions): TInteger; - /** Creates a intersect type. */ - Intersect(objects: [...T], options?: ObjectOptions): TIntersect; - /** Creates a keyof type */ - KeyOf(object: T, options?: SchemaOptions): TKeyOf; - /** Creates a literal type. */ - Literal(value: T, options?: SchemaOptions): TLiteral; - /** Creates a never type */ - Never(options?: SchemaOptions): TNever; - /** Creates a null type */ - Null(options?: SchemaOptions): TNull; - /** Creates a number type */ - Number(options?: NumericOptions): TNumber; - /** Creates an object type with the given properties */ - Object(properties: T, options?: ObjectOptions): TObject; - /** Creates a new object whose properties are omitted from the given object */ - Omit[]>>(schema: T, keys: K, options?: ObjectOptions): TOmit>; - /** Creates a new object whose properties are omitted from the given object */ - Omit[]>(schema: T, keys: readonly [...K], options?: ObjectOptions): TOmit; - /** Creates a tuple type from this functions parameters */ - Parameters>(schema: T, options?: SchemaOptions): TParameters; - /** Creates an object type whose properties are all optional */ - Partial(schema: T, options?: ObjectOptions): TPartial; - /** Creates a object whose properties are picked from the given object */ - Pick[]>>(schema: T, keys: K, options?: ObjectOptions): TPick>; - /** Creates a object whose properties are picked from the given object */ - Pick[]>(schema: T, keys: readonly [...K], options?: ObjectOptions): TPick; - /** Creates a promise type. This type cannot be represented in schema. */ - Promise(item: T, options?: SchemaOptions): TPromise; - /** Creates an object whose properties are derived from the given string literal union. */ - Record, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): TObject>; - /** Creates a record type */ - Record(key: K, schema: T, options?: ObjectOptions): TRecord; - /** Creates a recursive object type */ - Recursive(callback: (self: TSelf) => T, options?: SchemaOptions): TRecursive; - /** Creates a reference schema */ - Ref(schema: T, options?: SchemaOptions): TRef; - /** Creates a string type from a regular expression */ - RegEx(regex: RegExp, options?: SchemaOptions): TString; - /** Creates an object type whose properties are all required */ - Required(schema: T, options?: SchemaOptions): TRequired; - /** Creates a type from this functions return type */ - ReturnType>(schema: T, options?: SchemaOptions): TReturnType; - /** Removes Kind and Modifier symbol property keys from this schema */ - Strict(schema: T): T; - /** Creates a string type */ - String(options?: StringOptions): TString; - /** Creates a tuple type */ - Tuple(items: [...T], options?: SchemaOptions): TTuple; - /** Creates a undefined type */ - Undefined(options?: SchemaOptions): TUndefined; - /** Creates a union type */ - Union(items: [], options?: SchemaOptions): TNever; - Union(items: [...T], options?: SchemaOptions): TUnion; - /** Creates a Uint8Array type */ - Uint8Array(options?: Uint8ArrayOptions): TUint8Array; - /** Creates an unknown type */ - Unknown(options?: SchemaOptions): TUnknown; - /** Creates a user defined schema that infers as type T */ - Unsafe(options?: UnsafeOptions): TUnsafe; - /** Creates a void type */ - Void(options?: SchemaOptions): TVoid; - /** Use this function to return TSchema with static and params omitted */ - protected Create(schema: Omit): T; - /** Clones the given value */ - protected Clone(value: any): any; -} -/** JSON Schema Type Builder with Static Type Resolution for TypeScript */ -export declare const Type: TypeBuilder; +export declare const Kind: unique symbol; +export declare const Hint: unique symbol; +export declare const Modifier: unique symbol; +export declare type TModifier = TReadonlyOptional | TOptional | TReadonly; +export declare type TReadonly = T & { + [Modifier]: 'Readonly'; +}; +export declare type TOptional = T & { + [Modifier]: 'Optional'; +}; +export declare type TReadonlyOptional = T & { + [Modifier]: 'ReadonlyOptional'; +}; +export interface SchemaOptions { + $schema?: string; + /** Id for this schema */ + $id?: string; + /** Title of this schema */ + title?: string; + /** Description of this schema */ + description?: string; + /** Default value for this schema */ + default?: any; + /** Example values matching this schema. */ + examples?: any; + [prop: string]: any; +} +export interface TSchema extends SchemaOptions { + [Kind]: string; + [Hint]?: string; + [Modifier]?: string; + params: unknown[]; + static: unknown; +} +export declare type TAnySchema = TSchema | TAny | TArray | TBoolean | TConstructor | TEnum | TFunction | TInteger | TLiteral | TNull | TNumber | TObject | TPromise | TRecord | TSelf | TRef | TString | TTuple | TUndefined | TUnion | TUint8Array | TUnknown | TVoid; +export interface NumericOptions extends SchemaOptions { + exclusiveMaximum?: number; + exclusiveMinimum?: number; + maximum?: number; + minimum?: number; + multipleOf?: number; +} +export declare type TNumeric = TInteger | TNumber; +export interface TAny extends TSchema { + [Kind]: 'Any'; + static: any; +} +export interface ArrayOptions extends SchemaOptions { + uniqueItems?: boolean; + minItems?: number; + maxItems?: number; +} +export interface TArray extends TSchema, ArrayOptions { + [Kind]: 'Array'; + static: Array>; + type: 'array'; + items: T; +} +export interface TBoolean extends TSchema { + [Kind]: 'Boolean'; + static: boolean; + type: 'boolean'; +} +export declare type TConstructorParameters> = TTuple; +export declare type TInstanceType> = T['returns']; +export declare type StaticContructorParameters = [...{ + [K in keyof T]: T[K] extends TSchema ? Static : never; +}]; +export interface TConstructor extends TSchema { + [Kind]: 'Constructor'; + static: new (...param: StaticContructorParameters) => Static; + type: 'constructor'; + parameters: T; + returns: U; +} +export interface TEnumOption { + type: 'number' | 'string'; + const: T; +} +export interface TEnum = Record> extends TSchema { + [Kind]: 'Union'; + static: T[keyof T]; + anyOf: TLiteral[]; +} +export declare type TParameters = TTuple; +export declare type TReturnType = T['returns']; +export declare type StaticFunctionParameters = [...{ + [K in keyof T]: T[K] extends TSchema ? Static : never; +}]; +export interface TFunction extends TSchema { + [Kind]: 'Function'; + static: (...param: StaticFunctionParameters) => Static; + type: 'function'; + parameters: T; + returns: U; +} +export interface TInteger extends TSchema, NumericOptions { + [Kind]: 'Integer'; + static: number; + type: 'integer'; +} +export declare type IntersectReduce = T extends [infer A, ...infer B] ? IntersectReduce : I extends object ? I : {}; +export declare type IntersectEvaluate = { + [K in keyof T]: T[K] extends TSchema ? Static : never; +}; +export declare type IntersectProperties = { + [K in keyof T]: T[K] extends TObject ? P : {}; +}; +export interface TIntersect extends TObject { + static: IntersectReduce>; + properties: IntersectReduce>; +} +export declare type UnionToIntersect = (U extends unknown ? (arg: U) => 0 : never) extends (arg: infer I) => 0 ? I : never; +export declare type UnionLast = UnionToIntersect 0 : never> extends (x: infer L) => 0 ? L : never; +export declare type UnionToTuple> = [U] extends [never] ? [] : [...UnionToTuple>, L]; +export declare type UnionStringLiteralToTuple = T extends TUnion ? { + [I in keyof L]: L[I] extends TLiteral ? C : never; +} : never; +export declare type UnionLiteralsFromObject = { + [K in ObjectPropertyKeys]: TLiteral; +} extends infer R ? UnionToTuple : never; +export interface TKeyOf extends TUnion> { +} +export declare type TLiteralValue = string | number | boolean; +export interface TLiteral extends TSchema { + [Kind]: 'Literal'; + static: T; + const: T; +} +export interface TNever extends TSchema { + [Kind]: 'Never'; + static: never; + allOf: [{ + type: 'boolean'; + const: false; + }, { + type: 'boolean'; + const: true; + }]; +} +export interface TNull extends TSchema { + [Kind]: 'Null'; + static: null; + type: 'null'; +} +export interface TNumber extends TSchema, NumericOptions { + [Kind]: 'Number'; + static: number; + type: 'number'; +} +export declare type ReadonlyOptionalPropertyKeys = { + [K in keyof T]: T[K] extends TReadonlyOptional ? K : never; +}[keyof T]; +export declare type ReadonlyPropertyKeys = { + [K in keyof T]: T[K] extends TReadonly ? K : never; +}[keyof T]; +export declare type OptionalPropertyKeys = { + [K in keyof T]: T[K] extends TOptional ? K : never; +}[keyof T]; +export declare type RequiredPropertyKeys = keyof Omit | ReadonlyPropertyKeys | OptionalPropertyKeys>; +export declare type PropertiesReduce = { + readonly [K in ReadonlyOptionalPropertyKeys]?: Static; +} & { + readonly [K in ReadonlyPropertyKeys]: Static; +} & { + [K in OptionalPropertyKeys]?: Static; +} & { + [K in RequiredPropertyKeys]: Static; +} extends infer R ? { + [K in keyof R]: R[K]; +} : never; +export declare type TRecordProperties, T extends TSchema> = Static extends string ? { + [X in Static]: T; +} : never; +export interface TProperties { + [key: string]: TSchema; +} +export declare type ObjectProperties = T extends TObject ? U : never; +export declare type ObjectPropertyKeys = T extends TObject ? keyof U : never; +export declare type TAdditionalProperties = undefined | TSchema | boolean; +export interface ObjectOptions extends SchemaOptions { + additionalProperties?: TAdditionalProperties; + minProperties?: number; + maxProperties?: number; +} +export interface TObject extends TSchema, ObjectOptions { + [Kind]: 'Object'; + static: PropertiesReduce; + additionalProperties?: TAdditionalProperties; + type: 'object'; + properties: T; + required?: string[]; +} +export interface TOmit[]> extends TObject, ObjectOptions { + static: Omit, Properties[number]>; + properties: T extends TObject ? Omit : never; +} +export interface TPartial extends TObject { + static: Partial>; + properties: { + [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional ? TReadonlyOptional : T['properties'][K] extends TReadonly ? TReadonlyOptional : T['properties'][K] extends TOptional ? TOptional : TOptional; + }; +} +export declare type TPick[]> = TObject<{ + [K in Properties[number]]: T['properties'][K]; +}>; +export interface TPromise extends TSchema { + [Kind]: 'Promise'; + static: Promise>; + type: 'promise'; + item: TSchema; +} +export declare type TRecordKey = TString | TNumeric | TUnion[]>; +export interface TRecord extends TSchema { + [Kind]: 'Record'; + static: Record, Static>; + type: 'object'; + patternProperties: { + [pattern: string]: T; + }; + additionalProperties: false; +} +export interface TSelf extends TSchema { + [Kind]: 'Self'; + static: this['params'][0]; + $ref: string; +} +export declare type TRecursiveReduce = Static]>; +export interface TRecursive extends TSchema { + static: TRecursiveReduce; +} +export interface TRef extends TSchema { + [Kind]: 'Ref'; + static: Static; + $ref: string; +} +export interface TRequired> extends TObject { + static: Required>; + properties: { + [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional ? TReadonly : T['properties'][K] extends TReadonly ? TReadonly : T['properties'][K] extends TOptional ? U : T['properties'][K]; + }; +} +export declare type StringFormatOption = 'date-time' | 'time' | 'date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'iri' | 'uuid' | 'iri-reference' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex'; +export interface StringOptions extends SchemaOptions { + minLength?: number; + maxLength?: number; + pattern?: string; + format?: Format; + contentEncoding?: '7bit' | '8bit' | 'binary' | 'quoted-printable' | 'base64'; + contentMediaType?: string; +} +export interface TString extends TSchema, StringOptions { + [Kind]: 'String'; + static: string; + type: 'string'; +} +export declare type TupleToArray> = T extends TTuple ? R : never; +export interface TTuple extends TSchema { + [Kind]: 'Tuple'; + static: { + [K in keyof T]: T[K] extends TSchema ? Static : T[K]; + }; + type: 'array'; + items?: T; + additionalItems?: false; + minItems: number; + maxItems: number; +} +export interface TUndefined extends TSchema { + [Kind]: 'Undefined'; + specialized: 'Undefined'; + static: undefined; + type: 'object'; +} +export interface TUnion extends TSchema { + [Kind]: 'Union'; + static: { + [K in keyof T]: T[K] extends TSchema ? Static : never; + }[number]; + anyOf: T; +} +export interface Uint8ArrayOptions extends SchemaOptions { + maxByteLength?: number; + minByteLength?: number; +} +export interface TUint8Array extends TSchema, Uint8ArrayOptions { + [Kind]: 'Uint8Array'; + static: Uint8Array; + specialized: 'Uint8Array'; + type: 'object'; +} +export interface TUnknown extends TSchema { + [Kind]: 'Unknown'; + static: unknown; +} +export interface UnsafeOptions extends SchemaOptions { + [Kind]?: string; +} +export interface TUnsafe extends TSchema { + [Kind]: string; + static: T; +} +export interface TVoid extends TSchema { + [Kind]: 'Void'; + static: void; + type: 'null'; +} +/** Creates a static type from a TypeBox type */ +export declare type Static = (T & { + params: P; +})['static']; +export declare class TypeBuilder { + /** Creates a readonly optional property */ + ReadonlyOptional(item: T): TReadonlyOptional; + /** Creates a readonly property */ + Readonly(item: T): TReadonly; + /** Creates a optional property */ + Optional(item: T): TOptional; + /** Creates a any type */ + Any(options?: SchemaOptions): TAny; + /** Creates a array type */ + Array(items: T, options?: ArrayOptions): TArray; + /** Creates a boolean type */ + Boolean(options?: SchemaOptions): TBoolean; + /** Creates a tuple type from this constructors parameters */ + ConstructorParameters>(schema: T, options?: SchemaOptions): TConstructorParameters; + /** Creates a constructor type */ + Constructor, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TConstructor, U>; + /** Creates a constructor type */ + Constructor(parameters: [...T], returns: U, options?: SchemaOptions): TConstructor; + /** Creates a enum type */ + Enum>(item: T, options?: SchemaOptions): TEnum; + /** Creates a function type */ + Function, U extends TSchema>(parameters: T, returns: U, options?: SchemaOptions): TFunction, U>; + /** Creates a function type */ + Function(parameters: [...T], returns: U, options?: SchemaOptions): TFunction; + /** Creates a type from this constructors instance type */ + InstanceType>(schema: T, options?: SchemaOptions): TInstanceType; + /** Creates a integer type */ + Integer(options?: NumericOptions): TInteger; + /** Creates a intersect type. */ + Intersect(objects: [...T], options?: ObjectOptions): TIntersect; + /** Creates a keyof type */ + KeyOf(object: T, options?: SchemaOptions): TKeyOf; + /** Creates a literal type. */ + Literal(value: T, options?: SchemaOptions): TLiteral; + /** Creates a never type */ + Never(options?: SchemaOptions): TNever; + /** Creates a null type */ + Null(options?: SchemaOptions): TNull; + /** Creates a number type */ + Number(options?: NumericOptions): TNumber; + /** Creates an object type with the given properties */ + Object(properties: T, options?: ObjectOptions): TObject; + /** Creates a new object whose properties are omitted from the given object */ + Omit[]>>(schema: T, keys: K, options?: ObjectOptions): TOmit>; + /** Creates a new object whose properties are omitted from the given object */ + Omit[]>(schema: T, keys: readonly [...K], options?: ObjectOptions): TOmit; + /** Creates a tuple type from this functions parameters */ + Parameters>(schema: T, options?: SchemaOptions): TParameters; + /** Creates an object type whose properties are all optional */ + Partial(schema: T, options?: ObjectOptions): TPartial; + /** Creates a object whose properties are picked from the given object */ + Pick[]>>(schema: T, keys: K, options?: ObjectOptions): TPick>; + /** Creates a object whose properties are picked from the given object */ + Pick[]>(schema: T, keys: readonly [...K], options?: ObjectOptions): TPick; + /** Creates a promise type. This type cannot be represented in schema. */ + Promise(item: T, options?: SchemaOptions): TPromise; + /** Creates an object whose properties are derived from the given string literal union. */ + Record, T extends TSchema>(key: K, schema: T, options?: ObjectOptions): TObject>; + /** Creates a record type */ + Record(key: K, schema: T, options?: ObjectOptions): TRecord; + /** Creates a recursive object type */ + Recursive(callback: (self: TSelf) => T, options?: SchemaOptions): TRecursive; + /** Creates a reference schema */ + Ref(schema: T, options?: SchemaOptions): TRef; + /** Creates a string type from a regular expression */ + RegEx(regex: RegExp, options?: SchemaOptions): TString; + /** Creates an object type whose properties are all required */ + Required(schema: T, options?: SchemaOptions): TRequired; + /** Creates a type from this functions return type */ + ReturnType>(schema: T, options?: SchemaOptions): TReturnType; + /** Removes Kind and Modifier symbol property keys from this schema */ + Strict(schema: T): T; + /** Creates a string type */ + String(options?: StringOptions): TString; + /** Creates a tuple type */ + Tuple(items: [...T], options?: SchemaOptions): TTuple; + /** Creates a undefined type */ + Undefined(options?: SchemaOptions): TUndefined; + /** Creates a union type */ + Union(items: [], options?: SchemaOptions): TNever; + Union(items: [...T], options?: SchemaOptions): TUnion; + /** Creates a Uint8Array type */ + Uint8Array(options?: Uint8ArrayOptions): TUint8Array; + /** Creates an unknown type */ + Unknown(options?: SchemaOptions): TUnknown; + /** Creates a user defined schema that infers as type T */ + Unsafe(options?: UnsafeOptions): TUnsafe; + /** Creates a void type */ + Void(options?: SchemaOptions): TVoid; + /** Use this function to return TSchema with static and params omitted */ + protected Create(schema: Omit): T; + /** Clones the given value */ + protected Clone(value: any): any; +} +/** JSON Schema Type Builder with Static Type Resolution for TypeScript */ +export declare const Type: TypeBuilder; diff --git a/node_modules/@sinclair/typebox/typebox.js b/node_modules/@sinclair/typebox/typebox.js index 98563901..78a4b04a 100644 --- a/node_modules/@sinclair/typebox/typebox.js +++ b/node_modules/@sinclair/typebox/typebox.js @@ -1,383 +1,383 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Type = exports.TypeBuilder = exports.Modifier = exports.Hint = exports.Kind = void 0; -// -------------------------------------------------------------------------- -// Symbols -// -------------------------------------------------------------------------- -exports.Kind = Symbol.for('TypeBox.Kind'); -exports.Hint = Symbol.for('TypeBox.Hint'); -exports.Modifier = Symbol.for('TypeBox.Modifier'); -// -------------------------------------------------------------------------- -// TypeBuilder -// -------------------------------------------------------------------------- -let TypeOrdinal = 0; -class TypeBuilder { - // ---------------------------------------------------------------------- - // Modifiers - // ---------------------------------------------------------------------- - /** Creates a readonly optional property */ - ReadonlyOptional(item) { - return { [exports.Modifier]: 'ReadonlyOptional', ...item }; - } - /** Creates a readonly property */ - Readonly(item) { - return { [exports.Modifier]: 'Readonly', ...item }; - } - /** Creates a optional property */ - Optional(item) { - return { [exports.Modifier]: 'Optional', ...item }; - } - // ---------------------------------------------------------------------- - // Types - // ---------------------------------------------------------------------- - /** Creates a any type */ - Any(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Any' }); - } - /** Creates a array type */ - Array(items, options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Array', type: 'array', items }); - } - /** Creates a boolean type */ - Boolean(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Boolean', type: 'boolean' }); - } - /** Creates a tuple type from this constructors parameters */ - ConstructorParameters(schema, options = {}) { - return this.Tuple([...schema.parameters], { ...options }); - } - /** Creates a constructor type */ - Constructor(parameters, returns, options = {}) { - if (parameters[exports.Kind] === 'Tuple') { - const inner = parameters.items === undefined ? [] : parameters.items; - return this.Create({ ...options, [exports.Kind]: 'Constructor', type: 'constructor', parameters: inner, returns }); - } - else if (globalThis.Array.isArray(parameters)) { - return this.Create({ ...options, [exports.Kind]: 'Constructor', type: 'constructor', parameters, returns }); - } - else { - throw new Error('TypeBuilder.Constructor: Invalid parameters'); - } - } - /** Creates a enum type */ - Enum(item, options = {}) { - const values = Object.keys(item) - .filter((key) => isNaN(key)) - .map((key) => item[key]); - const anyOf = values.map((value) => (typeof value === 'string' ? { [exports.Kind]: 'Literal', type: 'string', const: value } : { [exports.Kind]: 'Literal', type: 'number', const: value })); - return this.Create({ ...options, [exports.Kind]: 'Union', [exports.Hint]: 'Enum', anyOf }); - } - /** Creates a function type */ - Function(parameters, returns, options = {}) { - if (parameters[exports.Kind] === 'Tuple') { - const inner = parameters.items === undefined ? [] : parameters.items; - return this.Create({ ...options, [exports.Kind]: 'Function', type: 'function', parameters: inner, returns }); - } - else if (globalThis.Array.isArray(parameters)) { - return this.Create({ ...options, [exports.Kind]: 'Function', type: 'function', parameters, returns }); - } - else { - throw new Error('TypeBuilder.Function: Invalid parameters'); - } - } - /** Creates a type from this constructors instance type */ - InstanceType(schema, options = {}) { - return { ...options, ...this.Clone(schema.returns) }; - } - /** Creates a integer type */ - Integer(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Integer', type: 'integer' }); - } - /** Creates a intersect type. */ - Intersect(objects, options = {}) { - const isOptional = (schema) => (schema[exports.Modifier] && schema[exports.Modifier] === 'Optional') || schema[exports.Modifier] === 'ReadonlyOptional'; - const [required, optional] = [new Set(), new Set()]; - for (const object of objects) { - for (const [key, schema] of Object.entries(object.properties)) { - if (isOptional(schema)) - optional.add(key); - } - } - for (const object of objects) { - for (const key of Object.keys(object.properties)) { - if (!optional.has(key)) - required.add(key); - } - } - const properties = {}; - for (const object of objects) { - for (const [key, schema] of Object.entries(object.properties)) { - properties[key] = properties[key] === undefined ? schema : { [exports.Kind]: 'Union', anyOf: [properties[key], { ...schema }] }; - } - } - if (required.size > 0) { - return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties, required: [...required] }); - } - else { - return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties }); - } - } - /** Creates a keyof type */ - KeyOf(object, options = {}) { - const items = Object.keys(object.properties).map((key) => this.Create({ ...options, [exports.Kind]: 'Literal', type: 'string', const: key })); - return this.Create({ ...options, [exports.Kind]: 'Union', [exports.Hint]: 'KeyOf', anyOf: items }); - } - /** Creates a literal type. */ - Literal(value, options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Literal', const: value, type: typeof value }); - } - /** Creates a never type */ - Never(options = {}) { - return this.Create({ - ...options, - [exports.Kind]: 'Never', - allOf: [ - { type: 'boolean', const: false }, - { type: 'boolean', const: true }, - ], - }); - } - /** Creates a null type */ - Null(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Null', type: 'null' }); - } - /** Creates a number type */ - Number(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Number', type: 'number' }); - } - /** Creates an object type with the given properties */ - Object(properties, options = {}) { - const property_names = Object.keys(properties); - const optional = property_names.filter((name) => { - const property = properties[name]; - const modifier = property[exports.Modifier]; - return modifier && (modifier === 'Optional' || modifier === 'ReadonlyOptional'); - }); - const required = property_names.filter((name) => !optional.includes(name)); - if (required.length > 0) { - return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties, required }); - } - else { - return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties }); - } - } - /** Creates a new object whose properties are omitted from the given object */ - Omit(schema, keys, options = {}) { - const select = keys[exports.Kind] === 'Union' ? keys.anyOf.map((schema) => schema.const) : keys; - const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Omit' }; - if (next.required) { - next.required = next.required.filter((key) => !select.includes(key)); - if (next.required.length === 0) - delete next.required; - } - for (const key of Object.keys(next.properties)) { - if (select.includes(key)) - delete next.properties[key]; - } - return this.Create(next); - } - /** Creates a tuple type from this functions parameters */ - Parameters(schema, options = {}) { - return exports.Type.Tuple(schema.parameters, { ...options }); - } - /** Creates an object type whose properties are all optional */ - Partial(schema, options = {}) { - const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Partial' }; - delete next.required; - for (const key of Object.keys(next.properties)) { - const property = next.properties[key]; - const modifer = property[exports.Modifier]; - switch (modifer) { - case 'ReadonlyOptional': - property[exports.Modifier] = 'ReadonlyOptional'; - break; - case 'Readonly': - property[exports.Modifier] = 'ReadonlyOptional'; - break; - case 'Optional': - property[exports.Modifier] = 'Optional'; - break; - default: - property[exports.Modifier] = 'Optional'; - break; - } - } - return this.Create(next); - } - /** Creates a object whose properties are picked from the given object */ - Pick(schema, keys, options = {}) { - const select = keys[exports.Kind] === 'Union' ? keys.anyOf.map((schema) => schema.const) : keys; - const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Pick' }; - if (next.required) { - next.required = next.required.filter((key) => select.includes(key)); - if (next.required.length === 0) - delete next.required; - } - for (const key of Object.keys(next.properties)) { - if (!select.includes(key)) - delete next.properties[key]; - } - return this.Create(next); - } - /** Creates a promise type. This type cannot be represented in schema. */ - Promise(item, options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Promise', type: 'promise', item }); - } - /** Creates a record type */ - Record(key, value, options = {}) { - // If string literal union return TObject with properties extracted from union. - if (key[exports.Kind] === 'Union') { - return this.Object(key.anyOf.reduce((acc, literal) => { - return { ...acc, [literal.const]: value }; - }, {}), { ...options, [exports.Hint]: 'Record' }); - } - // otherwise return TRecord with patternProperties - const pattern = ['Integer', 'Number'].includes(key[exports.Kind]) ? '^(0|[1-9][0-9]*)$' : key[exports.Kind] === 'String' && key.pattern ? key.pattern : '^.*$'; - return this.Create({ - ...options, - [exports.Kind]: 'Record', - type: 'object', - patternProperties: { [pattern]: value }, - additionalProperties: false, - }); - } - /** Creates a recursive object type */ - Recursive(callback, options = {}) { - if (options.$id === undefined) - options.$id = `T${TypeOrdinal++}`; - const self = callback({ [exports.Kind]: 'Self', $ref: `${options.$id}` }); - self.$id = options.$id; - return this.Create({ ...options, ...self }); - } - /** Creates a reference schema */ - Ref(schema, options = {}) { - if (schema.$id === undefined) - throw Error('TypeBuilder.Ref: Referenced schema must specify an $id'); - return this.Create({ ...options, [exports.Kind]: 'Ref', $ref: schema.$id }); - } - /** Creates a string type from a regular expression */ - RegEx(regex, options = {}) { - return this.Create({ ...options, [exports.Kind]: 'String', type: 'string', pattern: regex.source }); - } - /** Creates an object type whose properties are all required */ - Required(schema, options = {}) { - const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Required' }; - next.required = Object.keys(next.properties); - for (const key of Object.keys(next.properties)) { - const property = next.properties[key]; - const modifier = property[exports.Modifier]; - switch (modifier) { - case 'ReadonlyOptional': - property[exports.Modifier] = 'Readonly'; - break; - case 'Readonly': - property[exports.Modifier] = 'Readonly'; - break; - case 'Optional': - delete property[exports.Modifier]; - break; - default: - delete property[exports.Modifier]; - break; - } - } - return this.Create(next); - } - /** Creates a type from this functions return type */ - ReturnType(schema, options = {}) { - return { ...options, ...this.Clone(schema.returns) }; - } - /** Removes Kind and Modifier symbol property keys from this schema */ - Strict(schema) { - return JSON.parse(JSON.stringify(schema)); - } - /** Creates a string type */ - String(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'String', type: 'string' }); - } - /** Creates a tuple type */ - Tuple(items, options = {}) { - const additionalItems = false; - const minItems = items.length; - const maxItems = items.length; - const schema = (items.length > 0 ? { ...options, [exports.Kind]: 'Tuple', type: 'array', items, additionalItems, minItems, maxItems } : { ...options, [exports.Kind]: 'Tuple', type: 'array', minItems, maxItems }); - return this.Create(schema); - } - /** Creates a undefined type */ - Undefined(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Undefined', type: 'object', specialized: 'Undefined' }); - } - Union(items, options = {}) { - return items.length === 0 ? exports.Type.Never({ ...options }) : this.Create({ ...options, [exports.Kind]: 'Union', anyOf: items }); - } - /** Creates a Uint8Array type */ - Uint8Array(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Uint8Array', type: 'object', specialized: 'Uint8Array' }); - } - /** Creates an unknown type */ - Unknown(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Unknown' }); - } - /** Creates a user defined schema that infers as type T */ - Unsafe(options = {}) { - return this.Create({ ...options, [exports.Kind]: options[exports.Kind] || 'Unsafe' }); - } - /** Creates a void type */ - Void(options = {}) { - return this.Create({ ...options, [exports.Kind]: 'Void', type: 'null' }); - } - /** Use this function to return TSchema with static and params omitted */ - Create(schema) { - return schema; - } - /** Clones the given value */ - Clone(value) { - const isObject = (object) => typeof object === 'object' && object !== null && !Array.isArray(object); - const isArray = (object) => typeof object === 'object' && object !== null && Array.isArray(object); - if (isObject(value)) { - return Object.keys(value).reduce((acc, key) => ({ - ...acc, - [key]: this.Clone(value[key]), - }), Object.getOwnPropertySymbols(value).reduce((acc, key) => ({ - ...acc, - [key]: this.Clone(value[key]), - }), {})); - } - else if (isArray(value)) { - return value.map((item) => this.Clone(item)); - } - else { - return value; - } - } -} -exports.TypeBuilder = TypeBuilder; -/** JSON Schema Type Builder with Static Type Resolution for TypeScript */ -exports.Type = new TypeBuilder(); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Type = exports.TypeBuilder = exports.Modifier = exports.Hint = exports.Kind = void 0; +// -------------------------------------------------------------------------- +// Symbols +// -------------------------------------------------------------------------- +exports.Kind = Symbol.for('TypeBox.Kind'); +exports.Hint = Symbol.for('TypeBox.Hint'); +exports.Modifier = Symbol.for('TypeBox.Modifier'); +// -------------------------------------------------------------------------- +// TypeBuilder +// -------------------------------------------------------------------------- +let TypeOrdinal = 0; +class TypeBuilder { + // ---------------------------------------------------------------------- + // Modifiers + // ---------------------------------------------------------------------- + /** Creates a readonly optional property */ + ReadonlyOptional(item) { + return { [exports.Modifier]: 'ReadonlyOptional', ...item }; + } + /** Creates a readonly property */ + Readonly(item) { + return { [exports.Modifier]: 'Readonly', ...item }; + } + /** Creates a optional property */ + Optional(item) { + return { [exports.Modifier]: 'Optional', ...item }; + } + // ---------------------------------------------------------------------- + // Types + // ---------------------------------------------------------------------- + /** Creates a any type */ + Any(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Any' }); + } + /** Creates a array type */ + Array(items, options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Array', type: 'array', items }); + } + /** Creates a boolean type */ + Boolean(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Boolean', type: 'boolean' }); + } + /** Creates a tuple type from this constructors parameters */ + ConstructorParameters(schema, options = {}) { + return this.Tuple([...schema.parameters], { ...options }); + } + /** Creates a constructor type */ + Constructor(parameters, returns, options = {}) { + if (parameters[exports.Kind] === 'Tuple') { + const inner = parameters.items === undefined ? [] : parameters.items; + return this.Create({ ...options, [exports.Kind]: 'Constructor', type: 'constructor', parameters: inner, returns }); + } + else if (globalThis.Array.isArray(parameters)) { + return this.Create({ ...options, [exports.Kind]: 'Constructor', type: 'constructor', parameters, returns }); + } + else { + throw new Error('TypeBuilder.Constructor: Invalid parameters'); + } + } + /** Creates a enum type */ + Enum(item, options = {}) { + const values = Object.keys(item) + .filter((key) => isNaN(key)) + .map((key) => item[key]); + const anyOf = values.map((value) => (typeof value === 'string' ? { [exports.Kind]: 'Literal', type: 'string', const: value } : { [exports.Kind]: 'Literal', type: 'number', const: value })); + return this.Create({ ...options, [exports.Kind]: 'Union', [exports.Hint]: 'Enum', anyOf }); + } + /** Creates a function type */ + Function(parameters, returns, options = {}) { + if (parameters[exports.Kind] === 'Tuple') { + const inner = parameters.items === undefined ? [] : parameters.items; + return this.Create({ ...options, [exports.Kind]: 'Function', type: 'function', parameters: inner, returns }); + } + else if (globalThis.Array.isArray(parameters)) { + return this.Create({ ...options, [exports.Kind]: 'Function', type: 'function', parameters, returns }); + } + else { + throw new Error('TypeBuilder.Function: Invalid parameters'); + } + } + /** Creates a type from this constructors instance type */ + InstanceType(schema, options = {}) { + return { ...options, ...this.Clone(schema.returns) }; + } + /** Creates a integer type */ + Integer(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Integer', type: 'integer' }); + } + /** Creates a intersect type. */ + Intersect(objects, options = {}) { + const isOptional = (schema) => (schema[exports.Modifier] && schema[exports.Modifier] === 'Optional') || schema[exports.Modifier] === 'ReadonlyOptional'; + const [required, optional] = [new Set(), new Set()]; + for (const object of objects) { + for (const [key, schema] of Object.entries(object.properties)) { + if (isOptional(schema)) + optional.add(key); + } + } + for (const object of objects) { + for (const key of Object.keys(object.properties)) { + if (!optional.has(key)) + required.add(key); + } + } + const properties = {}; + for (const object of objects) { + for (const [key, schema] of Object.entries(object.properties)) { + properties[key] = properties[key] === undefined ? schema : { [exports.Kind]: 'Union', anyOf: [properties[key], { ...schema }] }; + } + } + if (required.size > 0) { + return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties, required: [...required] }); + } + else { + return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties }); + } + } + /** Creates a keyof type */ + KeyOf(object, options = {}) { + const items = Object.keys(object.properties).map((key) => this.Create({ ...options, [exports.Kind]: 'Literal', type: 'string', const: key })); + return this.Create({ ...options, [exports.Kind]: 'Union', [exports.Hint]: 'KeyOf', anyOf: items }); + } + /** Creates a literal type. */ + Literal(value, options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Literal', const: value, type: typeof value }); + } + /** Creates a never type */ + Never(options = {}) { + return this.Create({ + ...options, + [exports.Kind]: 'Never', + allOf: [ + { type: 'boolean', const: false }, + { type: 'boolean', const: true }, + ], + }); + } + /** Creates a null type */ + Null(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Null', type: 'null' }); + } + /** Creates a number type */ + Number(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Number', type: 'number' }); + } + /** Creates an object type with the given properties */ + Object(properties, options = {}) { + const property_names = Object.keys(properties); + const optional = property_names.filter((name) => { + const property = properties[name]; + const modifier = property[exports.Modifier]; + return modifier && (modifier === 'Optional' || modifier === 'ReadonlyOptional'); + }); + const required = property_names.filter((name) => !optional.includes(name)); + if (required.length > 0) { + return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties, required }); + } + else { + return this.Create({ ...options, [exports.Kind]: 'Object', type: 'object', properties }); + } + } + /** Creates a new object whose properties are omitted from the given object */ + Omit(schema, keys, options = {}) { + const select = keys[exports.Kind] === 'Union' ? keys.anyOf.map((schema) => schema.const) : keys; + const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Omit' }; + if (next.required) { + next.required = next.required.filter((key) => !select.includes(key)); + if (next.required.length === 0) + delete next.required; + } + for (const key of Object.keys(next.properties)) { + if (select.includes(key)) + delete next.properties[key]; + } + return this.Create(next); + } + /** Creates a tuple type from this functions parameters */ + Parameters(schema, options = {}) { + return exports.Type.Tuple(schema.parameters, { ...options }); + } + /** Creates an object type whose properties are all optional */ + Partial(schema, options = {}) { + const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Partial' }; + delete next.required; + for (const key of Object.keys(next.properties)) { + const property = next.properties[key]; + const modifer = property[exports.Modifier]; + switch (modifer) { + case 'ReadonlyOptional': + property[exports.Modifier] = 'ReadonlyOptional'; + break; + case 'Readonly': + property[exports.Modifier] = 'ReadonlyOptional'; + break; + case 'Optional': + property[exports.Modifier] = 'Optional'; + break; + default: + property[exports.Modifier] = 'Optional'; + break; + } + } + return this.Create(next); + } + /** Creates a object whose properties are picked from the given object */ + Pick(schema, keys, options = {}) { + const select = keys[exports.Kind] === 'Union' ? keys.anyOf.map((schema) => schema.const) : keys; + const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Pick' }; + if (next.required) { + next.required = next.required.filter((key) => select.includes(key)); + if (next.required.length === 0) + delete next.required; + } + for (const key of Object.keys(next.properties)) { + if (!select.includes(key)) + delete next.properties[key]; + } + return this.Create(next); + } + /** Creates a promise type. This type cannot be represented in schema. */ + Promise(item, options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Promise', type: 'promise', item }); + } + /** Creates a record type */ + Record(key, value, options = {}) { + // If string literal union return TObject with properties extracted from union. + if (key[exports.Kind] === 'Union') { + return this.Object(key.anyOf.reduce((acc, literal) => { + return { ...acc, [literal.const]: value }; + }, {}), { ...options, [exports.Hint]: 'Record' }); + } + // otherwise return TRecord with patternProperties + const pattern = ['Integer', 'Number'].includes(key[exports.Kind]) ? '^(0|[1-9][0-9]*)$' : key[exports.Kind] === 'String' && key.pattern ? key.pattern : '^.*$'; + return this.Create({ + ...options, + [exports.Kind]: 'Record', + type: 'object', + patternProperties: { [pattern]: value }, + additionalProperties: false, + }); + } + /** Creates a recursive object type */ + Recursive(callback, options = {}) { + if (options.$id === undefined) + options.$id = `T${TypeOrdinal++}`; + const self = callback({ [exports.Kind]: 'Self', $ref: `${options.$id}` }); + self.$id = options.$id; + return this.Create({ ...options, ...self }); + } + /** Creates a reference schema */ + Ref(schema, options = {}) { + if (schema.$id === undefined) + throw Error('TypeBuilder.Ref: Referenced schema must specify an $id'); + return this.Create({ ...options, [exports.Kind]: 'Ref', $ref: schema.$id }); + } + /** Creates a string type from a regular expression */ + RegEx(regex, options = {}) { + return this.Create({ ...options, [exports.Kind]: 'String', type: 'string', pattern: regex.source }); + } + /** Creates an object type whose properties are all required */ + Required(schema, options = {}) { + const next = { ...this.Clone(schema), ...options, [exports.Hint]: 'Required' }; + next.required = Object.keys(next.properties); + for (const key of Object.keys(next.properties)) { + const property = next.properties[key]; + const modifier = property[exports.Modifier]; + switch (modifier) { + case 'ReadonlyOptional': + property[exports.Modifier] = 'Readonly'; + break; + case 'Readonly': + property[exports.Modifier] = 'Readonly'; + break; + case 'Optional': + delete property[exports.Modifier]; + break; + default: + delete property[exports.Modifier]; + break; + } + } + return this.Create(next); + } + /** Creates a type from this functions return type */ + ReturnType(schema, options = {}) { + return { ...options, ...this.Clone(schema.returns) }; + } + /** Removes Kind and Modifier symbol property keys from this schema */ + Strict(schema) { + return JSON.parse(JSON.stringify(schema)); + } + /** Creates a string type */ + String(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'String', type: 'string' }); + } + /** Creates a tuple type */ + Tuple(items, options = {}) { + const additionalItems = false; + const minItems = items.length; + const maxItems = items.length; + const schema = (items.length > 0 ? { ...options, [exports.Kind]: 'Tuple', type: 'array', items, additionalItems, minItems, maxItems } : { ...options, [exports.Kind]: 'Tuple', type: 'array', minItems, maxItems }); + return this.Create(schema); + } + /** Creates a undefined type */ + Undefined(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Undefined', type: 'object', specialized: 'Undefined' }); + } + Union(items, options = {}) { + return items.length === 0 ? exports.Type.Never({ ...options }) : this.Create({ ...options, [exports.Kind]: 'Union', anyOf: items }); + } + /** Creates a Uint8Array type */ + Uint8Array(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Uint8Array', type: 'object', specialized: 'Uint8Array' }); + } + /** Creates an unknown type */ + Unknown(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Unknown' }); + } + /** Creates a user defined schema that infers as type T */ + Unsafe(options = {}) { + return this.Create({ ...options, [exports.Kind]: options[exports.Kind] || 'Unsafe' }); + } + /** Creates a void type */ + Void(options = {}) { + return this.Create({ ...options, [exports.Kind]: 'Void', type: 'null' }); + } + /** Use this function to return TSchema with static and params omitted */ + Create(schema) { + return schema; + } + /** Clones the given value */ + Clone(value) { + const isObject = (object) => typeof object === 'object' && object !== null && !Array.isArray(object); + const isArray = (object) => typeof object === 'object' && object !== null && Array.isArray(object); + if (isObject(value)) { + return Object.keys(value).reduce((acc, key) => ({ + ...acc, + [key]: this.Clone(value[key]), + }), Object.getOwnPropertySymbols(value).reduce((acc, key) => ({ + ...acc, + [key]: this.Clone(value[key]), + }), {})); + } + else if (isArray(value)) { + return value.map((item) => this.Clone(item)); + } + else { + return value; + } + } +} +exports.TypeBuilder = TypeBuilder; +/** JSON Schema Type Builder with Static Type Resolution for TypeScript */ +exports.Type = new TypeBuilder(); diff --git a/node_modules/@sinclair/typebox/value/cast.d.ts b/node_modules/@sinclair/typebox/value/cast.d.ts index 0ab8ef63..489979a5 100644 --- a/node_modules/@sinclair/typebox/value/cast.d.ts +++ b/node_modules/@sinclair/typebox/value/cast.d.ts @@ -1,26 +1,26 @@ -import * as Types from '../typebox'; -export declare class ValueCastReferenceTypeError extends Error { - readonly schema: Types.TRef | Types.TSelf; - constructor(schema: Types.TRef | Types.TSelf); -} -export declare class ValueCastArrayUniqueItemsTypeError extends Error { - readonly schema: Types.TSchema; - readonly value: unknown; - constructor(schema: Types.TSchema, value: unknown); -} -export declare class ValueCastNeverTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare class ValueCastRecursiveTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare class ValueCastUnknownTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare namespace ValueCast { - function Visit(schema: Types.TSchema, references: Types.TSchema[], value: any): any; - function Cast(schema: T, references: [...R], value: any): Types.Static; -} +import * as Types from '../typebox'; +export declare class ValueCastReferenceTypeError extends Error { + readonly schema: Types.TRef | Types.TSelf; + constructor(schema: Types.TRef | Types.TSelf); +} +export declare class ValueCastArrayUniqueItemsTypeError extends Error { + readonly schema: Types.TSchema; + readonly value: unknown; + constructor(schema: Types.TSchema, value: unknown); +} +export declare class ValueCastNeverTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare class ValueCastRecursiveTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare class ValueCastUnknownTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare namespace ValueCast { + function Visit(schema: Types.TSchema, references: Types.TSchema[], value: any): any; + function Cast(schema: T, references: [...R], value: any): Types.Static; +} diff --git a/node_modules/@sinclair/typebox/value/cast.js b/node_modules/@sinclair/typebox/value/cast.js index f04e2d68..a1095319 100644 --- a/node_modules/@sinclair/typebox/value/cast.js +++ b/node_modules/@sinclair/typebox/value/cast.js @@ -1,364 +1,364 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueCast = exports.ValueCastUnknownTypeError = exports.ValueCastRecursiveTypeError = exports.ValueCastNeverTypeError = exports.ValueCastArrayUniqueItemsTypeError = exports.ValueCastReferenceTypeError = void 0; -const Types = require("../typebox"); -const create_1 = require("./create"); -const check_1 = require("./check"); -const clone_1 = require("./clone"); -var UnionValueCast; -(function (UnionValueCast) { - // ---------------------------------------------------------------------------------------------- - // The following will score a schema against a value. For objects, the score is the tally of - // points awarded for each property of the value. Property points are (1.0 / propertyCount) - // to prevent large property counts biasing results. Properties that match literal values are - // maximally awarded as literals are typically used as union discriminator fields. - // ---------------------------------------------------------------------------------------------- - function Score(schema, references, value) { - if (schema[Types.Kind] === 'Object' && typeof value === 'object' && value !== null) { - const object = schema; - const keys = Object.keys(value); - const entries = globalThis.Object.entries(object.properties); - const [point, max] = [1 / entries.length, entries.length]; - return entries.reduce((acc, [key, schema]) => { - const literal = schema[Types.Kind] === 'Literal' && schema.const === value[key] ? max : 0; - const checks = check_1.ValueCheck.Check(schema, references, value[key]) ? point : 0; - const exists = keys.includes(key) ? point : 0; - return acc + (literal + checks + exists); - }, 0); - } - else { - return check_1.ValueCheck.Check(schema, references, value) ? 1 : 0; - } - } - function Select(union, references, value) { - let [select, best] = [union.anyOf[0], 0]; - for (const schema of union.anyOf) { - const score = Score(schema, references, value); - if (score > best) { - select = schema; - best = score; - } - } - return select; - } - function Create(union, references, value) { - return check_1.ValueCheck.Check(union, references, value) ? clone_1.ValueClone.Clone(value) : ValueCast.Cast(Select(union, references, value), references, value); - } - UnionValueCast.Create = Create; -})(UnionValueCast || (UnionValueCast = {})); -// ----------------------------------------------------------- -// Errors -// ----------------------------------------------------------- -class ValueCastReferenceTypeError extends Error { - constructor(schema) { - super(`ValueCast: Cannot locate referenced schema with $id '${schema.$ref}'`); - this.schema = schema; - } -} -exports.ValueCastReferenceTypeError = ValueCastReferenceTypeError; -class ValueCastArrayUniqueItemsTypeError extends Error { - constructor(schema, value) { - super('ValueCast: Array cast produced invalid data due to uniqueItems constraint'); - this.schema = schema; - this.value = value; - } -} -exports.ValueCastArrayUniqueItemsTypeError = ValueCastArrayUniqueItemsTypeError; -class ValueCastNeverTypeError extends Error { - constructor(schema) { - super('ValueCast: Never types cannot be cast'); - this.schema = schema; - } -} -exports.ValueCastNeverTypeError = ValueCastNeverTypeError; -class ValueCastRecursiveTypeError extends Error { - constructor(schema) { - super('ValueCast.Recursive: Cannot cast recursive schemas'); - this.schema = schema; - } -} -exports.ValueCastRecursiveTypeError = ValueCastRecursiveTypeError; -class ValueCastUnknownTypeError extends Error { - constructor(schema) { - super('ValueCast: Unknown type'); - this.schema = schema; - } -} -exports.ValueCastUnknownTypeError = ValueCastUnknownTypeError; -var ValueCast; -(function (ValueCast) { - // ----------------------------------------------------------- - // Guards - // ----------------------------------------------------------- - function IsArray(value) { - return typeof value === 'object' && globalThis.Array.isArray(value); - } - function IsString(value) { - return typeof value === 'string'; - } - function IsBoolean(value) { - return typeof value === 'boolean'; - } - function IsBigInt(value) { - return typeof value === 'bigint'; - } - function IsNumber(value) { - return typeof value === 'number'; - } - function IsStringNumeric(value) { - return IsString(value) && !isNaN(value) && !isNaN(parseFloat(value)); - } - function IsValueToString(value) { - return IsBigInt(value) || IsBoolean(value) || IsNumber(value); - } - function IsValueTrue(value) { - return value === true || (IsNumber(value) && value === 1) || (IsBigInt(value) && value === 1n) || (IsString(value) && (value.toLowerCase() === 'true' || value === '1')); - } - function IsValueFalse(value) { - return value === false || (IsNumber(value) && value === 0) || (IsBigInt(value) && value === 0n) || (IsString(value) && (value.toLowerCase() === 'false' || value === '0')); - } - // ----------------------------------------------------------- - // Convert - // ----------------------------------------------------------- - function TryConvertString(value) { - return IsValueToString(value) ? value.toString() : value; - } - function TryConvertNumber(value) { - return IsStringNumeric(value) ? parseFloat(value) : IsValueTrue(value) ? 1 : value; - } - function TryConvertInteger(value) { - return IsStringNumeric(value) ? parseInt(value) : IsValueTrue(value) ? 1 : value; - } - function TryConvertBoolean(value) { - return IsValueTrue(value) ? true : IsValueFalse(value) ? false : value; - } - // ----------------------------------------------------------- - // Cast - // ----------------------------------------------------------- - function Any(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Array(schema, references, value) { - if (check_1.ValueCheck.Check(schema, references, value)) - return clone_1.ValueClone.Clone(value); - const created = IsArray(value) ? clone_1.ValueClone.Clone(value) : create_1.ValueCreate.Create(schema, references); - const minimum = IsNumber(schema.minItems) && created.length < schema.minItems ? [...created, ...globalThis.Array.from({ length: schema.minItems - created.length }, () => null)] : created; - const maximum = IsNumber(schema.maxItems) && minimum.length > schema.maxItems ? minimum.slice(0, schema.maxItems) : minimum; - const casted = maximum.map((value) => Visit(schema.items, references, value)); - if (schema.uniqueItems !== true) - return casted; - const unique = [...new Set(casted)]; - if (!check_1.ValueCheck.Check(schema, references, unique)) - throw new ValueCastArrayUniqueItemsTypeError(schema, unique); - return unique; - } - function Boolean(schema, references, value) { - const conversion = TryConvertBoolean(value); - return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); - } - function Constructor(schema, references, value) { - if (check_1.ValueCheck.Check(schema, references, value)) - return create_1.ValueCreate.Create(schema, references); - const required = new Set(schema.returns.required || []); - const result = function () { }; - for (const [key, property] of globalThis.Object.entries(schema.returns.properties)) { - if (!required.has(key) && value.prototype[key] === undefined) - continue; - result.prototype[key] = Visit(property, references, value.prototype[key]); - } - return result; - } - function Enum(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Function(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Integer(schema, references, value) { - const conversion = TryConvertInteger(value); - return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); - } - function Literal(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Never(schema, references, value) { - throw new ValueCastNeverTypeError(schema); - } - function Null(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Number(schema, references, value) { - const conversion = TryConvertNumber(value); - return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); - } - function Object(schema, references, value) { - if (check_1.ValueCheck.Check(schema, references, value)) - return clone_1.ValueClone.Clone(value); - if (value === null || typeof value !== 'object') - return create_1.ValueCreate.Create(schema, references); - const required = new Set(schema.required || []); - const result = {}; - for (const [key, property] of globalThis.Object.entries(schema.properties)) { - if (!required.has(key) && value[key] === undefined) - continue; - result[key] = Visit(property, references, value[key]); - } - // additional schema properties - if (typeof schema.additionalProperties === 'object') { - const propertyKeys = globalThis.Object.keys(schema.properties); - for (const objectKey of globalThis.Object.keys(value)) { - if (propertyKeys.includes(objectKey)) - continue; - result[objectKey] = Visit(schema.additionalProperties, references, value[objectKey]); - } - } - return result; - } - function Promise(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Record(schema, references, value) { - if (check_1.ValueCheck.Check(schema, references, value)) - return clone_1.ValueClone.Clone(value); - if (value === null || typeof value !== 'object' || globalThis.Array.isArray(value)) - return create_1.ValueCreate.Create(schema, references); - const subschemaKey = globalThis.Object.keys(schema.patternProperties)[0]; - const subschema = schema.patternProperties[subschemaKey]; - const result = {}; - for (const [propKey, propValue] of globalThis.Object.entries(value)) { - result[propKey] = Visit(subschema, references, propValue); - } - return result; - } - function Recursive(schema, references, value) { - throw new ValueCastRecursiveTypeError(schema); - } - function Ref(schema, references, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new ValueCastReferenceTypeError(schema); - return Visit(reference, references, value); - } - function Self(schema, references, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new ValueCastReferenceTypeError(schema); - return Visit(reference, references, value); - } - function String(schema, references, value) { - const conversion = TryConvertString(value); - return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); - } - function Tuple(schema, references, value) { - if (check_1.ValueCheck.Check(schema, references, value)) - return clone_1.ValueClone.Clone(value); - if (!globalThis.Array.isArray(value)) - return create_1.ValueCreate.Create(schema, references); - if (schema.items === undefined) - return []; - return schema.items.map((schema, index) => Visit(schema, references, value[index])); - } - function Undefined(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Union(schema, references, value) { - return UnionValueCast.Create(schema, references, value); - } - function Uint8Array(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Unknown(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Void(schema, references, value) { - return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); - } - function Visit(schema, references, value) { - const anyReferences = schema.$id === undefined ? references : [schema, ...references]; - const anySchema = schema; - switch (schema[Types.Kind]) { - case 'Any': - return Any(anySchema, anyReferences, value); - case 'Array': - return Array(anySchema, anyReferences, value); - case 'Boolean': - return Boolean(anySchema, anyReferences, value); - case 'Constructor': - return Constructor(anySchema, anyReferences, value); - case 'Enum': - return Enum(anySchema, anyReferences, value); - case 'Function': - return Function(anySchema, anyReferences, value); - case 'Integer': - return Integer(anySchema, anyReferences, value); - case 'Literal': - return Literal(anySchema, anyReferences, value); - case 'Never': - return Never(anySchema, anyReferences, value); - case 'Null': - return Null(anySchema, anyReferences, value); - case 'Number': - return Number(anySchema, anyReferences, value); - case 'Object': - return Object(anySchema, anyReferences, value); - case 'Promise': - return Promise(anySchema, anyReferences, value); - case 'Record': - return Record(anySchema, anyReferences, value); - case 'Rec': - return Recursive(anySchema, anyReferences, value); - case 'Ref': - return Ref(anySchema, anyReferences, value); - case 'Self': - return Self(anySchema, anyReferences, value); - case 'String': - return String(anySchema, anyReferences, value); - case 'Tuple': - return Tuple(anySchema, anyReferences, value); - case 'Undefined': - return Undefined(anySchema, anyReferences, value); - case 'Union': - return Union(anySchema, anyReferences, value); - case 'Uint8Array': - return Uint8Array(anySchema, anyReferences, value); - case 'Unknown': - return Unknown(anySchema, anyReferences, value); - case 'Void': - return Void(anySchema, anyReferences, value); - default: - throw new ValueCastUnknownTypeError(anySchema); - } - } - ValueCast.Visit = Visit; - function Cast(schema, references, value) { - return schema.$id === undefined ? Visit(schema, references, value) : Visit(schema, [schema, ...references], value); - } - ValueCast.Cast = Cast; -})(ValueCast = exports.ValueCast || (exports.ValueCast = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueCast = exports.ValueCastUnknownTypeError = exports.ValueCastRecursiveTypeError = exports.ValueCastNeverTypeError = exports.ValueCastArrayUniqueItemsTypeError = exports.ValueCastReferenceTypeError = void 0; +const Types = require("../typebox"); +const create_1 = require("./create"); +const check_1 = require("./check"); +const clone_1 = require("./clone"); +var UnionValueCast; +(function (UnionValueCast) { + // ---------------------------------------------------------------------------------------------- + // The following will score a schema against a value. For objects, the score is the tally of + // points awarded for each property of the value. Property points are (1.0 / propertyCount) + // to prevent large property counts biasing results. Properties that match literal values are + // maximally awarded as literals are typically used as union discriminator fields. + // ---------------------------------------------------------------------------------------------- + function Score(schema, references, value) { + if (schema[Types.Kind] === 'Object' && typeof value === 'object' && value !== null) { + const object = schema; + const keys = Object.keys(value); + const entries = globalThis.Object.entries(object.properties); + const [point, max] = [1 / entries.length, entries.length]; + return entries.reduce((acc, [key, schema]) => { + const literal = schema[Types.Kind] === 'Literal' && schema.const === value[key] ? max : 0; + const checks = check_1.ValueCheck.Check(schema, references, value[key]) ? point : 0; + const exists = keys.includes(key) ? point : 0; + return acc + (literal + checks + exists); + }, 0); + } + else { + return check_1.ValueCheck.Check(schema, references, value) ? 1 : 0; + } + } + function Select(union, references, value) { + let [select, best] = [union.anyOf[0], 0]; + for (const schema of union.anyOf) { + const score = Score(schema, references, value); + if (score > best) { + select = schema; + best = score; + } + } + return select; + } + function Create(union, references, value) { + return check_1.ValueCheck.Check(union, references, value) ? clone_1.ValueClone.Clone(value) : ValueCast.Cast(Select(union, references, value), references, value); + } + UnionValueCast.Create = Create; +})(UnionValueCast || (UnionValueCast = {})); +// ----------------------------------------------------------- +// Errors +// ----------------------------------------------------------- +class ValueCastReferenceTypeError extends Error { + constructor(schema) { + super(`ValueCast: Cannot locate referenced schema with $id '${schema.$ref}'`); + this.schema = schema; + } +} +exports.ValueCastReferenceTypeError = ValueCastReferenceTypeError; +class ValueCastArrayUniqueItemsTypeError extends Error { + constructor(schema, value) { + super('ValueCast: Array cast produced invalid data due to uniqueItems constraint'); + this.schema = schema; + this.value = value; + } +} +exports.ValueCastArrayUniqueItemsTypeError = ValueCastArrayUniqueItemsTypeError; +class ValueCastNeverTypeError extends Error { + constructor(schema) { + super('ValueCast: Never types cannot be cast'); + this.schema = schema; + } +} +exports.ValueCastNeverTypeError = ValueCastNeverTypeError; +class ValueCastRecursiveTypeError extends Error { + constructor(schema) { + super('ValueCast.Recursive: Cannot cast recursive schemas'); + this.schema = schema; + } +} +exports.ValueCastRecursiveTypeError = ValueCastRecursiveTypeError; +class ValueCastUnknownTypeError extends Error { + constructor(schema) { + super('ValueCast: Unknown type'); + this.schema = schema; + } +} +exports.ValueCastUnknownTypeError = ValueCastUnknownTypeError; +var ValueCast; +(function (ValueCast) { + // ----------------------------------------------------------- + // Guards + // ----------------------------------------------------------- + function IsArray(value) { + return typeof value === 'object' && globalThis.Array.isArray(value); + } + function IsString(value) { + return typeof value === 'string'; + } + function IsBoolean(value) { + return typeof value === 'boolean'; + } + function IsBigInt(value) { + return typeof value === 'bigint'; + } + function IsNumber(value) { + return typeof value === 'number'; + } + function IsStringNumeric(value) { + return IsString(value) && !isNaN(value) && !isNaN(parseFloat(value)); + } + function IsValueToString(value) { + return IsBigInt(value) || IsBoolean(value) || IsNumber(value); + } + function IsValueTrue(value) { + return value === true || (IsNumber(value) && value === 1) || (IsBigInt(value) && value === 1n) || (IsString(value) && (value.toLowerCase() === 'true' || value === '1')); + } + function IsValueFalse(value) { + return value === false || (IsNumber(value) && value === 0) || (IsBigInt(value) && value === 0n) || (IsString(value) && (value.toLowerCase() === 'false' || value === '0')); + } + // ----------------------------------------------------------- + // Convert + // ----------------------------------------------------------- + function TryConvertString(value) { + return IsValueToString(value) ? value.toString() : value; + } + function TryConvertNumber(value) { + return IsStringNumeric(value) ? parseFloat(value) : IsValueTrue(value) ? 1 : value; + } + function TryConvertInteger(value) { + return IsStringNumeric(value) ? parseInt(value) : IsValueTrue(value) ? 1 : value; + } + function TryConvertBoolean(value) { + return IsValueTrue(value) ? true : IsValueFalse(value) ? false : value; + } + // ----------------------------------------------------------- + // Cast + // ----------------------------------------------------------- + function Any(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Array(schema, references, value) { + if (check_1.ValueCheck.Check(schema, references, value)) + return clone_1.ValueClone.Clone(value); + const created = IsArray(value) ? clone_1.ValueClone.Clone(value) : create_1.ValueCreate.Create(schema, references); + const minimum = IsNumber(schema.minItems) && created.length < schema.minItems ? [...created, ...globalThis.Array.from({ length: schema.minItems - created.length }, () => null)] : created; + const maximum = IsNumber(schema.maxItems) && minimum.length > schema.maxItems ? minimum.slice(0, schema.maxItems) : minimum; + const casted = maximum.map((value) => Visit(schema.items, references, value)); + if (schema.uniqueItems !== true) + return casted; + const unique = [...new Set(casted)]; + if (!check_1.ValueCheck.Check(schema, references, unique)) + throw new ValueCastArrayUniqueItemsTypeError(schema, unique); + return unique; + } + function Boolean(schema, references, value) { + const conversion = TryConvertBoolean(value); + return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); + } + function Constructor(schema, references, value) { + if (check_1.ValueCheck.Check(schema, references, value)) + return create_1.ValueCreate.Create(schema, references); + const required = new Set(schema.returns.required || []); + const result = function () { }; + for (const [key, property] of globalThis.Object.entries(schema.returns.properties)) { + if (!required.has(key) && value.prototype[key] === undefined) + continue; + result.prototype[key] = Visit(property, references, value.prototype[key]); + } + return result; + } + function Enum(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Function(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Integer(schema, references, value) { + const conversion = TryConvertInteger(value); + return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); + } + function Literal(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Never(schema, references, value) { + throw new ValueCastNeverTypeError(schema); + } + function Null(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Number(schema, references, value) { + const conversion = TryConvertNumber(value); + return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); + } + function Object(schema, references, value) { + if (check_1.ValueCheck.Check(schema, references, value)) + return clone_1.ValueClone.Clone(value); + if (value === null || typeof value !== 'object') + return create_1.ValueCreate.Create(schema, references); + const required = new Set(schema.required || []); + const result = {}; + for (const [key, property] of globalThis.Object.entries(schema.properties)) { + if (!required.has(key) && value[key] === undefined) + continue; + result[key] = Visit(property, references, value[key]); + } + // additional schema properties + if (typeof schema.additionalProperties === 'object') { + const propertyKeys = globalThis.Object.keys(schema.properties); + for (const objectKey of globalThis.Object.keys(value)) { + if (propertyKeys.includes(objectKey)) + continue; + result[objectKey] = Visit(schema.additionalProperties, references, value[objectKey]); + } + } + return result; + } + function Promise(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Record(schema, references, value) { + if (check_1.ValueCheck.Check(schema, references, value)) + return clone_1.ValueClone.Clone(value); + if (value === null || typeof value !== 'object' || globalThis.Array.isArray(value)) + return create_1.ValueCreate.Create(schema, references); + const subschemaKey = globalThis.Object.keys(schema.patternProperties)[0]; + const subschema = schema.patternProperties[subschemaKey]; + const result = {}; + for (const [propKey, propValue] of globalThis.Object.entries(value)) { + result[propKey] = Visit(subschema, references, propValue); + } + return result; + } + function Recursive(schema, references, value) { + throw new ValueCastRecursiveTypeError(schema); + } + function Ref(schema, references, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new ValueCastReferenceTypeError(schema); + return Visit(reference, references, value); + } + function Self(schema, references, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new ValueCastReferenceTypeError(schema); + return Visit(reference, references, value); + } + function String(schema, references, value) { + const conversion = TryConvertString(value); + return check_1.ValueCheck.Check(schema, references, conversion) ? conversion : create_1.ValueCreate.Create(schema, references); + } + function Tuple(schema, references, value) { + if (check_1.ValueCheck.Check(schema, references, value)) + return clone_1.ValueClone.Clone(value); + if (!globalThis.Array.isArray(value)) + return create_1.ValueCreate.Create(schema, references); + if (schema.items === undefined) + return []; + return schema.items.map((schema, index) => Visit(schema, references, value[index])); + } + function Undefined(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Union(schema, references, value) { + return UnionValueCast.Create(schema, references, value); + } + function Uint8Array(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Unknown(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Void(schema, references, value) { + return check_1.ValueCheck.Check(schema, references, value) ? value : create_1.ValueCreate.Create(schema, references); + } + function Visit(schema, references, value) { + const anyReferences = schema.$id === undefined ? references : [schema, ...references]; + const anySchema = schema; + switch (schema[Types.Kind]) { + case 'Any': + return Any(anySchema, anyReferences, value); + case 'Array': + return Array(anySchema, anyReferences, value); + case 'Boolean': + return Boolean(anySchema, anyReferences, value); + case 'Constructor': + return Constructor(anySchema, anyReferences, value); + case 'Enum': + return Enum(anySchema, anyReferences, value); + case 'Function': + return Function(anySchema, anyReferences, value); + case 'Integer': + return Integer(anySchema, anyReferences, value); + case 'Literal': + return Literal(anySchema, anyReferences, value); + case 'Never': + return Never(anySchema, anyReferences, value); + case 'Null': + return Null(anySchema, anyReferences, value); + case 'Number': + return Number(anySchema, anyReferences, value); + case 'Object': + return Object(anySchema, anyReferences, value); + case 'Promise': + return Promise(anySchema, anyReferences, value); + case 'Record': + return Record(anySchema, anyReferences, value); + case 'Rec': + return Recursive(anySchema, anyReferences, value); + case 'Ref': + return Ref(anySchema, anyReferences, value); + case 'Self': + return Self(anySchema, anyReferences, value); + case 'String': + return String(anySchema, anyReferences, value); + case 'Tuple': + return Tuple(anySchema, anyReferences, value); + case 'Undefined': + return Undefined(anySchema, anyReferences, value); + case 'Union': + return Union(anySchema, anyReferences, value); + case 'Uint8Array': + return Uint8Array(anySchema, anyReferences, value); + case 'Unknown': + return Unknown(anySchema, anyReferences, value); + case 'Void': + return Void(anySchema, anyReferences, value); + default: + throw new ValueCastUnknownTypeError(anySchema); + } + } + ValueCast.Visit = Visit; + function Cast(schema, references, value) { + return schema.$id === undefined ? Visit(schema, references, value) : Visit(schema, [schema, ...references], value); + } + ValueCast.Cast = Cast; +})(ValueCast = exports.ValueCast || (exports.ValueCast = {})); diff --git a/node_modules/@sinclair/typebox/value/check.d.ts b/node_modules/@sinclair/typebox/value/check.d.ts index b1f77429..087e8432 100644 --- a/node_modules/@sinclair/typebox/value/check.d.ts +++ b/node_modules/@sinclair/typebox/value/check.d.ts @@ -1,8 +1,8 @@ -import * as Types from '../typebox'; -export declare class ValueCheckUnknownTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare namespace ValueCheck { - function Check(schema: T, references: [...R], value: any): boolean; -} +import * as Types from '../typebox'; +export declare class ValueCheckUnknownTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare namespace ValueCheck { + function Check(schema: T, references: [...R], value: any): boolean; +} diff --git a/node_modules/@sinclair/typebox/value/check.js b/node_modules/@sinclair/typebox/value/check.js index 346ca3c3..fe063503 100644 --- a/node_modules/@sinclair/typebox/value/check.js +++ b/node_modules/@sinclair/typebox/value/check.js @@ -1,331 +1,331 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueCheck = exports.ValueCheckUnknownTypeError = void 0; -const Types = require("../typebox"); -const format_1 = require("../format"); -class ValueCheckUnknownTypeError extends Error { - constructor(schema) { - super('ValueCheck: Unknown type'); - this.schema = schema; - } -} -exports.ValueCheckUnknownTypeError = ValueCheckUnknownTypeError; -var ValueCheck; -(function (ValueCheck) { - function Any(schema, references, value) { - return true; - } - function Array(schema, references, value) { - if (!globalThis.Array.isArray(value)) { - return false; - } - if (schema.minItems !== undefined && !(value.length >= schema.minItems)) { - return false; - } - if (schema.maxItems !== undefined && !(value.length <= schema.maxItems)) { - return false; - } - if (schema.uniqueItems === true && !(new Set(value).size === value.length)) { - return false; - } - return value.every((val) => Visit(schema.items, references, val)); - } - function Boolean(schema, references, value) { - return typeof value === 'boolean'; - } - function Constructor(schema, references, value) { - return Visit(schema.returns, references, value.prototype); - } - function Function(schema, references, value) { - return typeof value === 'function'; - } - function Integer(schema, references, value) { - if (!(typeof value === 'number')) { - return false; - } - if (!globalThis.Number.isInteger(value)) { - return false; - } - if (schema.multipleOf !== undefined && !(value % schema.multipleOf === 0)) { - return false; - } - if (schema.exclusiveMinimum !== undefined && !(value > schema.exclusiveMinimum)) { - return false; - } - if (schema.exclusiveMaximum !== undefined && !(value < schema.exclusiveMaximum)) { - return false; - } - if (schema.minimum !== undefined && !(value >= schema.minimum)) { - return false; - } - if (schema.maximum !== undefined && !(value <= schema.maximum)) { - return false; - } - return true; - } - function Literal(schema, references, value) { - return value === schema.const; - } - function Never(schema, references, value) { - return false; - } - function Null(schema, references, value) { - return value === null; - } - function Number(schema, references, value) { - if (!(typeof value === 'number')) { - return false; - } - if (schema.multipleOf && !(value % schema.multipleOf === 0)) { - return false; - } - if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { - return false; - } - if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { - return false; - } - if (schema.minimum && !(value >= schema.minimum)) { - return false; - } - if (schema.maximum && !(value <= schema.maximum)) { - return false; - } - return true; - } - function Object(schema, references, value) { - if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { - return false; - } - if (schema.minProperties !== undefined && !(globalThis.Object.keys(value).length >= schema.minProperties)) { - return false; - } - if (schema.maxProperties !== undefined && !(globalThis.Object.keys(value).length <= schema.maxProperties)) { - return false; - } - const propertyKeys = globalThis.Object.keys(schema.properties); - if (schema.additionalProperties === false) { - // optimization: If the property key length matches the required keys length - // then we only need check that the values property key length matches that - // of the property key length. This is because exhaustive testing for values - // will occur in subsequent property tests. - if (schema.required && schema.required.length === propertyKeys.length && !(globalThis.Object.keys(value).length === propertyKeys.length)) { - return false; - } - else { - if (!globalThis.Object.keys(value).every((key) => propertyKeys.includes(key))) { - return false; - } - } - } - if (typeof schema.additionalProperties === 'object') { - for (const objectKey of globalThis.Object.keys(value)) { - if (propertyKeys.includes(objectKey)) - continue; - if (!Visit(schema.additionalProperties, references, value[objectKey])) { - return false; - } - } - } - for (const propertyKey of propertyKeys) { - const propertySchema = schema.properties[propertyKey]; - if (schema.required && schema.required.includes(propertyKey)) { - if (!Visit(propertySchema, references, value[propertyKey])) { - return false; - } - } - else { - if (value[propertyKey] !== undefined) { - if (!Visit(propertySchema, references, value[propertyKey])) { - return false; - } - } - } - } - return true; - } - function Promise(schema, references, value) { - return typeof value === 'object' && typeof value.then === 'function'; - } - function Record(schema, references, value) { - if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { - return false; - } - const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; - const regex = new RegExp(keyPattern); - if (!globalThis.Object.keys(value).every((key) => regex.test(key))) { - return false; - } - for (const propValue of globalThis.Object.values(value)) { - if (!Visit(valueSchema, references, propValue)) - return false; - } - return true; - } - function Ref(schema, references, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueCheck.Ref: Cannot find schema with $id '${schema.$ref}'.`); - return Visit(reference, references, value); - } - function Self(schema, references, value) { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueCheck.Self: Cannot find schema with $id '${schema.$ref}'.`); - return Visit(reference, references, value); - } - function String(schema, references, value) { - if (!(typeof value === 'string')) { - return false; - } - if (schema.minLength !== undefined) { - if (!(value.length >= schema.minLength)) - return false; - } - if (schema.maxLength !== undefined) { - if (!(value.length <= schema.maxLength)) - return false; - } - if (schema.pattern !== undefined) { - const regex = new RegExp(schema.pattern); - if (!regex.test(value)) - return false; - } - if (schema.format !== undefined) { - if (!format_1.Format.Has(schema.format)) - return false; - const func = format_1.Format.Get(schema.format); - return func(value); - } - return true; - } - function Tuple(schema, references, value) { - if (!globalThis.Array.isArray(value)) { - return false; - } - if (schema.items === undefined && !(value.length === 0)) { - return false; - } - if (!(value.length === schema.maxItems)) { - return false; - } - if (!schema.items) { - return true; - } - for (let i = 0; i < schema.items.length; i++) { - if (!Visit(schema.items[i], references, value[i])) - return false; - } - return true; - } - function Undefined(schema, references, value) { - return value === undefined; - } - function Union(schema, references, value) { - return schema.anyOf.some((inner) => Visit(inner, references, value)); - } - function Uint8Array(schema, references, value) { - if (!(value instanceof globalThis.Uint8Array)) { - return false; - } - if (schema.maxByteLength && !(value.length <= schema.maxByteLength)) { - return false; - } - if (schema.minByteLength && !(value.length >= schema.minByteLength)) { - return false; - } - return true; - } - function Unknown(schema, references, value) { - return true; - } - function Void(schema, references, value) { - return value === null; - } - function Visit(schema, references, value) { - const anyReferences = schema.$id === undefined ? references : [schema, ...references]; - const anySchema = schema; - switch (anySchema[Types.Kind]) { - case 'Any': - return Any(anySchema, anyReferences, value); - case 'Array': - return Array(anySchema, anyReferences, value); - case 'Boolean': - return Boolean(anySchema, anyReferences, value); - case 'Constructor': - return Constructor(anySchema, anyReferences, value); - case 'Function': - return Function(anySchema, anyReferences, value); - case 'Integer': - return Integer(anySchema, anyReferences, value); - case 'Literal': - return Literal(anySchema, anyReferences, value); - case 'Never': - return Never(anySchema, anyReferences, value); - case 'Null': - return Null(anySchema, anyReferences, value); - case 'Number': - return Number(anySchema, anyReferences, value); - case 'Object': - return Object(anySchema, anyReferences, value); - case 'Promise': - return Promise(anySchema, anyReferences, value); - case 'Record': - return Record(anySchema, anyReferences, value); - case 'Ref': - return Ref(anySchema, anyReferences, value); - case 'Self': - return Self(anySchema, anyReferences, value); - case 'String': - return String(anySchema, anyReferences, value); - case 'Tuple': - return Tuple(anySchema, anyReferences, value); - case 'Undefined': - return Undefined(anySchema, anyReferences, value); - case 'Union': - return Union(anySchema, anyReferences, value); - case 'Uint8Array': - return Uint8Array(anySchema, anyReferences, value); - case 'Unknown': - return Unknown(anySchema, anyReferences, value); - case 'Void': - return Void(anySchema, anyReferences, value); - default: - throw new ValueCheckUnknownTypeError(anySchema); - } - } - // ------------------------------------------------------------------------- - // Check - // ------------------------------------------------------------------------- - function Check(schema, references, value) { - return schema.$id === undefined ? Visit(schema, references, value) : Visit(schema, [schema, ...references], value); - } - ValueCheck.Check = Check; -})(ValueCheck = exports.ValueCheck || (exports.ValueCheck = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueCheck = exports.ValueCheckUnknownTypeError = void 0; +const Types = require("../typebox"); +const format_1 = require("../format"); +class ValueCheckUnknownTypeError extends Error { + constructor(schema) { + super('ValueCheck: Unknown type'); + this.schema = schema; + } +} +exports.ValueCheckUnknownTypeError = ValueCheckUnknownTypeError; +var ValueCheck; +(function (ValueCheck) { + function Any(schema, references, value) { + return true; + } + function Array(schema, references, value) { + if (!globalThis.Array.isArray(value)) { + return false; + } + if (schema.minItems !== undefined && !(value.length >= schema.minItems)) { + return false; + } + if (schema.maxItems !== undefined && !(value.length <= schema.maxItems)) { + return false; + } + if (schema.uniqueItems === true && !(new Set(value).size === value.length)) { + return false; + } + return value.every((val) => Visit(schema.items, references, val)); + } + function Boolean(schema, references, value) { + return typeof value === 'boolean'; + } + function Constructor(schema, references, value) { + return Visit(schema.returns, references, value.prototype); + } + function Function(schema, references, value) { + return typeof value === 'function'; + } + function Integer(schema, references, value) { + if (!(typeof value === 'number')) { + return false; + } + if (!globalThis.Number.isInteger(value)) { + return false; + } + if (schema.multipleOf !== undefined && !(value % schema.multipleOf === 0)) { + return false; + } + if (schema.exclusiveMinimum !== undefined && !(value > schema.exclusiveMinimum)) { + return false; + } + if (schema.exclusiveMaximum !== undefined && !(value < schema.exclusiveMaximum)) { + return false; + } + if (schema.minimum !== undefined && !(value >= schema.minimum)) { + return false; + } + if (schema.maximum !== undefined && !(value <= schema.maximum)) { + return false; + } + return true; + } + function Literal(schema, references, value) { + return value === schema.const; + } + function Never(schema, references, value) { + return false; + } + function Null(schema, references, value) { + return value === null; + } + function Number(schema, references, value) { + if (!(typeof value === 'number')) { + return false; + } + if (schema.multipleOf && !(value % schema.multipleOf === 0)) { + return false; + } + if (schema.exclusiveMinimum && !(value > schema.exclusiveMinimum)) { + return false; + } + if (schema.exclusiveMaximum && !(value < schema.exclusiveMaximum)) { + return false; + } + if (schema.minimum && !(value >= schema.minimum)) { + return false; + } + if (schema.maximum && !(value <= schema.maximum)) { + return false; + } + return true; + } + function Object(schema, references, value) { + if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { + return false; + } + if (schema.minProperties !== undefined && !(globalThis.Object.keys(value).length >= schema.minProperties)) { + return false; + } + if (schema.maxProperties !== undefined && !(globalThis.Object.keys(value).length <= schema.maxProperties)) { + return false; + } + const propertyKeys = globalThis.Object.keys(schema.properties); + if (schema.additionalProperties === false) { + // optimization: If the property key length matches the required keys length + // then we only need check that the values property key length matches that + // of the property key length. This is because exhaustive testing for values + // will occur in subsequent property tests. + if (schema.required && schema.required.length === propertyKeys.length && !(globalThis.Object.keys(value).length === propertyKeys.length)) { + return false; + } + else { + if (!globalThis.Object.keys(value).every((key) => propertyKeys.includes(key))) { + return false; + } + } + } + if (typeof schema.additionalProperties === 'object') { + for (const objectKey of globalThis.Object.keys(value)) { + if (propertyKeys.includes(objectKey)) + continue; + if (!Visit(schema.additionalProperties, references, value[objectKey])) { + return false; + } + } + } + for (const propertyKey of propertyKeys) { + const propertySchema = schema.properties[propertyKey]; + if (schema.required && schema.required.includes(propertyKey)) { + if (!Visit(propertySchema, references, value[propertyKey])) { + return false; + } + } + else { + if (value[propertyKey] !== undefined) { + if (!Visit(propertySchema, references, value[propertyKey])) { + return false; + } + } + } + } + return true; + } + function Promise(schema, references, value) { + return typeof value === 'object' && typeof value.then === 'function'; + } + function Record(schema, references, value) { + if (!(typeof value === 'object' && value !== null && !globalThis.Array.isArray(value))) { + return false; + } + const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; + const regex = new RegExp(keyPattern); + if (!globalThis.Object.keys(value).every((key) => regex.test(key))) { + return false; + } + for (const propValue of globalThis.Object.values(value)) { + if (!Visit(valueSchema, references, propValue)) + return false; + } + return true; + } + function Ref(schema, references, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueCheck.Ref: Cannot find schema with $id '${schema.$ref}'.`); + return Visit(reference, references, value); + } + function Self(schema, references, value) { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueCheck.Self: Cannot find schema with $id '${schema.$ref}'.`); + return Visit(reference, references, value); + } + function String(schema, references, value) { + if (!(typeof value === 'string')) { + return false; + } + if (schema.minLength !== undefined) { + if (!(value.length >= schema.minLength)) + return false; + } + if (schema.maxLength !== undefined) { + if (!(value.length <= schema.maxLength)) + return false; + } + if (schema.pattern !== undefined) { + const regex = new RegExp(schema.pattern); + if (!regex.test(value)) + return false; + } + if (schema.format !== undefined) { + if (!format_1.Format.Has(schema.format)) + return false; + const func = format_1.Format.Get(schema.format); + return func(value); + } + return true; + } + function Tuple(schema, references, value) { + if (!globalThis.Array.isArray(value)) { + return false; + } + if (schema.items === undefined && !(value.length === 0)) { + return false; + } + if (!(value.length === schema.maxItems)) { + return false; + } + if (!schema.items) { + return true; + } + for (let i = 0; i < schema.items.length; i++) { + if (!Visit(schema.items[i], references, value[i])) + return false; + } + return true; + } + function Undefined(schema, references, value) { + return value === undefined; + } + function Union(schema, references, value) { + return schema.anyOf.some((inner) => Visit(inner, references, value)); + } + function Uint8Array(schema, references, value) { + if (!(value instanceof globalThis.Uint8Array)) { + return false; + } + if (schema.maxByteLength && !(value.length <= schema.maxByteLength)) { + return false; + } + if (schema.minByteLength && !(value.length >= schema.minByteLength)) { + return false; + } + return true; + } + function Unknown(schema, references, value) { + return true; + } + function Void(schema, references, value) { + return value === null; + } + function Visit(schema, references, value) { + const anyReferences = schema.$id === undefined ? references : [schema, ...references]; + const anySchema = schema; + switch (anySchema[Types.Kind]) { + case 'Any': + return Any(anySchema, anyReferences, value); + case 'Array': + return Array(anySchema, anyReferences, value); + case 'Boolean': + return Boolean(anySchema, anyReferences, value); + case 'Constructor': + return Constructor(anySchema, anyReferences, value); + case 'Function': + return Function(anySchema, anyReferences, value); + case 'Integer': + return Integer(anySchema, anyReferences, value); + case 'Literal': + return Literal(anySchema, anyReferences, value); + case 'Never': + return Never(anySchema, anyReferences, value); + case 'Null': + return Null(anySchema, anyReferences, value); + case 'Number': + return Number(anySchema, anyReferences, value); + case 'Object': + return Object(anySchema, anyReferences, value); + case 'Promise': + return Promise(anySchema, anyReferences, value); + case 'Record': + return Record(anySchema, anyReferences, value); + case 'Ref': + return Ref(anySchema, anyReferences, value); + case 'Self': + return Self(anySchema, anyReferences, value); + case 'String': + return String(anySchema, anyReferences, value); + case 'Tuple': + return Tuple(anySchema, anyReferences, value); + case 'Undefined': + return Undefined(anySchema, anyReferences, value); + case 'Union': + return Union(anySchema, anyReferences, value); + case 'Uint8Array': + return Uint8Array(anySchema, anyReferences, value); + case 'Unknown': + return Unknown(anySchema, anyReferences, value); + case 'Void': + return Void(anySchema, anyReferences, value); + default: + throw new ValueCheckUnknownTypeError(anySchema); + } + } + // ------------------------------------------------------------------------- + // Check + // ------------------------------------------------------------------------- + function Check(schema, references, value) { + return schema.$id === undefined ? Visit(schema, references, value) : Visit(schema, [schema, ...references], value); + } + ValueCheck.Check = Check; +})(ValueCheck = exports.ValueCheck || (exports.ValueCheck = {})); diff --git a/node_modules/@sinclair/typebox/value/clone.d.ts b/node_modules/@sinclair/typebox/value/clone.d.ts index 5ca0adf1..9eb9b9b6 100644 --- a/node_modules/@sinclair/typebox/value/clone.d.ts +++ b/node_modules/@sinclair/typebox/value/clone.d.ts @@ -1,3 +1,3 @@ -export declare namespace ValueClone { - function Clone(value: T): T; -} +export declare namespace ValueClone { + function Clone(value: T): T; +} diff --git a/node_modules/@sinclair/typebox/value/clone.js b/node_modules/@sinclair/typebox/value/clone.js index 503b3fd0..b41a3ad9 100644 --- a/node_modules/@sinclair/typebox/value/clone.js +++ b/node_modules/@sinclair/typebox/value/clone.js @@ -1,65 +1,65 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueClone = void 0; -const is_1 = require("./is"); -var ValueClone; -(function (ValueClone) { - function Object(value) { - const keys = [...globalThis.Object.keys(value), ...globalThis.Object.getOwnPropertySymbols(value)]; - return keys.reduce((acc, key) => ({ ...acc, [key]: Clone(value[key]) }), {}); - } - function Array(value) { - return value.map((element) => Clone(element)); - } - function TypedArray(value) { - return value.slice(); - } - function Value(value) { - return value; - } - function Clone(value) { - if (is_1.Is.Object(value)) { - return Object(value); - } - else if (is_1.Is.Array(value)) { - return Array(value); - } - else if (is_1.Is.TypedArray(value)) { - return TypedArray(value); - } - else if (is_1.Is.Value(value)) { - return Value(value); - } - else { - throw new Error('ValueClone: Unable to clone value'); - } - } - ValueClone.Clone = Clone; -})(ValueClone = exports.ValueClone || (exports.ValueClone = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueClone = void 0; +const is_1 = require("./is"); +var ValueClone; +(function (ValueClone) { + function Object(value) { + const keys = [...globalThis.Object.keys(value), ...globalThis.Object.getOwnPropertySymbols(value)]; + return keys.reduce((acc, key) => ({ ...acc, [key]: Clone(value[key]) }), {}); + } + function Array(value) { + return value.map((element) => Clone(element)); + } + function TypedArray(value) { + return value.slice(); + } + function Value(value) { + return value; + } + function Clone(value) { + if (is_1.Is.Object(value)) { + return Object(value); + } + else if (is_1.Is.Array(value)) { + return Array(value); + } + else if (is_1.Is.TypedArray(value)) { + return TypedArray(value); + } + else if (is_1.Is.Value(value)) { + return Value(value); + } + else { + throw new Error('ValueClone: Unable to clone value'); + } + } + ValueClone.Clone = Clone; +})(ValueClone = exports.ValueClone || (exports.ValueClone = {})); diff --git a/node_modules/@sinclair/typebox/value/create.d.ts b/node_modules/@sinclair/typebox/value/create.d.ts index 9ac78789..dfe66b22 100644 --- a/node_modules/@sinclair/typebox/value/create.d.ts +++ b/node_modules/@sinclair/typebox/value/create.d.ts @@ -1,14 +1,14 @@ -import * as Types from '../typebox'; -export declare class ValueCreateUnknownTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare class ValueCreateNeverTypeError extends Error { - readonly schema: Types.TSchema; - constructor(schema: Types.TSchema); -} -export declare namespace ValueCreate { - /** Creates a value from the given schema. If the schema specifies a default value, then that value is returned. */ - function Visit(schema: T, references: Types.TSchema[]): Types.Static; - function Create(schema: T, references: [...R]): Types.Static; -} +import * as Types from '../typebox'; +export declare class ValueCreateUnknownTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare class ValueCreateNeverTypeError extends Error { + readonly schema: Types.TSchema; + constructor(schema: Types.TSchema); +} +export declare namespace ValueCreate { + /** Creates a value from the given schema. If the schema specifies a default value, then that value is returned. */ + function Visit(schema: T, references: Types.TSchema[]): Types.Static; + function Create(schema: T, references: [...R]): Types.Static; +} diff --git a/node_modules/@sinclair/typebox/value/create.js b/node_modules/@sinclair/typebox/value/create.js index 58a5f258..f5f13ae3 100644 --- a/node_modules/@sinclair/typebox/value/create.js +++ b/node_modules/@sinclair/typebox/value/create.js @@ -1,357 +1,357 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueCreate = exports.ValueCreateNeverTypeError = exports.ValueCreateUnknownTypeError = void 0; -const Types = require("../typebox"); -class ValueCreateUnknownTypeError extends Error { - constructor(schema) { - super('ValueCreate: Unknown type'); - this.schema = schema; - } -} -exports.ValueCreateUnknownTypeError = ValueCreateUnknownTypeError; -class ValueCreateNeverTypeError extends Error { - constructor(schema) { - super('ValueCreate: Never types cannot be created'); - this.schema = schema; - } -} -exports.ValueCreateNeverTypeError = ValueCreateNeverTypeError; -var ValueCreate; -(function (ValueCreate) { - function Any(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - return {}; - } - } - function Array(schema, references) { - if (schema.uniqueItems === true && schema.default === undefined) { - throw new Error('ValueCreate.Array: Arrays with uniqueItems require a default value'); - } - else if (schema.default !== undefined) { - return schema.default; - } - else if (schema.minItems !== undefined) { - return globalThis.Array.from({ length: schema.minItems }).map((item) => { - return ValueCreate.Create(schema.items, references); - }); - } - else { - return []; - } - } - function Boolean(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - return false; - } - } - function Constructor(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - const value = ValueCreate.Create(schema.returns, references); - if (typeof value === 'object' && !globalThis.Array.isArray(value)) { - return class { - constructor() { - for (const [key, val] of globalThis.Object.entries(value)) { - const self = this; - self[key] = val; - } - } - }; - } - else { - return class { - }; - } - } - } - function Enum(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.anyOf.length === 0) { - throw new Error('ValueCreate.Enum: Cannot create default enum value as this enum has no items'); - } - else { - return schema.anyOf[0].const; - } - } - function Function(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - return () => ValueCreate.Create(schema.returns, references); - } - } - function Integer(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.minimum !== undefined) { - return schema.minimum; - } - else { - return 0; - } - } - function Literal(schema, references) { - return schema.const; - } - function Never(schema, references) { - throw new ValueCreateNeverTypeError(schema); - } - function Null(schema, references) { - return null; - } - function Number(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.minimum !== undefined) { - return schema.minimum; - } - else { - return 0; - } - } - function Object(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - const required = new Set(schema.required); - return (schema.default || - globalThis.Object.entries(schema.properties).reduce((acc, [key, schema]) => { - return required.has(key) ? { ...acc, [key]: ValueCreate.Create(schema, references) } : { ...acc }; - }, {})); - } - } - function Promise(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - return globalThis.Promise.resolve(ValueCreate.Create(schema.item, references)); - } - } - function Record(schema, references) { - const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; - if (schema.default !== undefined) { - return schema.default; - } - else if (!(keyPattern === '^.*$' || keyPattern === '^(0|[1-9][0-9]*)$')) { - const propertyKeys = keyPattern.slice(1, keyPattern.length - 1).split('|'); - return propertyKeys.reduce((acc, key) => { - return { ...acc, [key]: Create(valueSchema, references) }; - }, {}); - } - else { - return {}; - } - } - function Recursive(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - throw new Error('ValueCreate.Recursive: Recursive types require a default value'); - } - } - function Ref(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueCreate.Ref: Cannot find schema with $id '${schema.$ref}'.`); - return Visit(reference, references); - } - } - function Self(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - const reference = references.find((reference) => reference.$id === schema.$ref); - if (reference === undefined) - throw new Error(`ValueCreate.Self: Cannot locate schema with $id '${schema.$ref}'`); - return Visit(reference, references); - } - } - function String(schema, references) { - if (schema.pattern !== undefined) { - if (schema.default === undefined) { - throw new Error('ValueCreate.String: String types with patterns must specify a default value'); - } - else { - return schema.default; - } - } - else if (schema.format !== undefined) { - if (schema.default === undefined) { - throw new Error('ValueCreate.String: String types with formats must specify a default value'); - } - else { - return schema.default; - } - } - else { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.minLength !== undefined) { - return globalThis.Array.from({ length: schema.minLength }) - .map(() => '.') - .join(''); - } - else { - return ''; - } - } - } - function Tuple(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - if (schema.items === undefined) { - return []; - } - else { - return globalThis.Array.from({ length: schema.minItems }).map((_, index) => ValueCreate.Create(schema.items[index], references)); - } - } - function Undefined(schema, references) { - return undefined; - } - function Union(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.anyOf.length === 0) { - throw new Error('ValueCreate.Union: Cannot create Union with zero variants'); - } - else { - return ValueCreate.Create(schema.anyOf[0], references); - } - } - function Uint8Array(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else if (schema.minByteLength !== undefined) { - return new globalThis.Uint8Array(schema.minByteLength); - } - else { - return new globalThis.Uint8Array(0); - } - } - function Unknown(schema, references) { - if (schema.default !== undefined) { - return schema.default; - } - else { - return {}; - } - } - function Void(schema, references) { - return null; - } - /** Creates a value from the given schema. If the schema specifies a default value, then that value is returned. */ - function Visit(schema, references) { - const anyReferences = schema.$id === undefined ? references : [schema, ...references]; - const anySchema = schema; - switch (anySchema[Types.Kind]) { - case 'Any': - return Any(anySchema, anyReferences); - case 'Array': - return Array(anySchema, anyReferences); - case 'Boolean': - return Boolean(anySchema, anyReferences); - case 'Constructor': - return Constructor(anySchema, anyReferences); - case 'Enum': - return Enum(anySchema, anyReferences); - case 'Function': - return Function(anySchema, anyReferences); - case 'Integer': - return Integer(anySchema, anyReferences); - case 'Literal': - return Literal(anySchema, anyReferences); - case 'Never': - return Never(anySchema, anyReferences); - case 'Null': - return Null(anySchema, anyReferences); - case 'Number': - return Number(anySchema, anyReferences); - case 'Object': - return Object(anySchema, anyReferences); - case 'Promise': - return Promise(anySchema, anyReferences); - case 'Record': - return Record(anySchema, anyReferences); - case 'Rec': - return Recursive(anySchema, anyReferences); - case 'Ref': - return Ref(anySchema, anyReferences); - case 'Self': - return Self(anySchema, anyReferences); - case 'String': - return String(anySchema, anyReferences); - case 'Tuple': - return Tuple(anySchema, anyReferences); - case 'Undefined': - return Undefined(anySchema, anyReferences); - case 'Union': - return Union(anySchema, anyReferences); - case 'Uint8Array': - return Uint8Array(anySchema, anyReferences); - case 'Unknown': - return Unknown(anySchema, anyReferences); - case 'Void': - return Void(anySchema, anyReferences); - default: - throw new ValueCreateUnknownTypeError(anySchema); - } - } - ValueCreate.Visit = Visit; - function Create(schema, references) { - return Visit(schema, references); - } - ValueCreate.Create = Create; -})(ValueCreate = exports.ValueCreate || (exports.ValueCreate = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueCreate = exports.ValueCreateNeverTypeError = exports.ValueCreateUnknownTypeError = void 0; +const Types = require("../typebox"); +class ValueCreateUnknownTypeError extends Error { + constructor(schema) { + super('ValueCreate: Unknown type'); + this.schema = schema; + } +} +exports.ValueCreateUnknownTypeError = ValueCreateUnknownTypeError; +class ValueCreateNeverTypeError extends Error { + constructor(schema) { + super('ValueCreate: Never types cannot be created'); + this.schema = schema; + } +} +exports.ValueCreateNeverTypeError = ValueCreateNeverTypeError; +var ValueCreate; +(function (ValueCreate) { + function Any(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + return {}; + } + } + function Array(schema, references) { + if (schema.uniqueItems === true && schema.default === undefined) { + throw new Error('ValueCreate.Array: Arrays with uniqueItems require a default value'); + } + else if (schema.default !== undefined) { + return schema.default; + } + else if (schema.minItems !== undefined) { + return globalThis.Array.from({ length: schema.minItems }).map((item) => { + return ValueCreate.Create(schema.items, references); + }); + } + else { + return []; + } + } + function Boolean(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + return false; + } + } + function Constructor(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + const value = ValueCreate.Create(schema.returns, references); + if (typeof value === 'object' && !globalThis.Array.isArray(value)) { + return class { + constructor() { + for (const [key, val] of globalThis.Object.entries(value)) { + const self = this; + self[key] = val; + } + } + }; + } + else { + return class { + }; + } + } + } + function Enum(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.anyOf.length === 0) { + throw new Error('ValueCreate.Enum: Cannot create default enum value as this enum has no items'); + } + else { + return schema.anyOf[0].const; + } + } + function Function(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + return () => ValueCreate.Create(schema.returns, references); + } + } + function Integer(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.minimum !== undefined) { + return schema.minimum; + } + else { + return 0; + } + } + function Literal(schema, references) { + return schema.const; + } + function Never(schema, references) { + throw new ValueCreateNeverTypeError(schema); + } + function Null(schema, references) { + return null; + } + function Number(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.minimum !== undefined) { + return schema.minimum; + } + else { + return 0; + } + } + function Object(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + const required = new Set(schema.required); + return (schema.default || + globalThis.Object.entries(schema.properties).reduce((acc, [key, schema]) => { + return required.has(key) ? { ...acc, [key]: ValueCreate.Create(schema, references) } : { ...acc }; + }, {})); + } + } + function Promise(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + return globalThis.Promise.resolve(ValueCreate.Create(schema.item, references)); + } + } + function Record(schema, references) { + const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; + if (schema.default !== undefined) { + return schema.default; + } + else if (!(keyPattern === '^.*$' || keyPattern === '^(0|[1-9][0-9]*)$')) { + const propertyKeys = keyPattern.slice(1, keyPattern.length - 1).split('|'); + return propertyKeys.reduce((acc, key) => { + return { ...acc, [key]: Create(valueSchema, references) }; + }, {}); + } + else { + return {}; + } + } + function Recursive(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + throw new Error('ValueCreate.Recursive: Recursive types require a default value'); + } + } + function Ref(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueCreate.Ref: Cannot find schema with $id '${schema.$ref}'.`); + return Visit(reference, references); + } + } + function Self(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + const reference = references.find((reference) => reference.$id === schema.$ref); + if (reference === undefined) + throw new Error(`ValueCreate.Self: Cannot locate schema with $id '${schema.$ref}'`); + return Visit(reference, references); + } + } + function String(schema, references) { + if (schema.pattern !== undefined) { + if (schema.default === undefined) { + throw new Error('ValueCreate.String: String types with patterns must specify a default value'); + } + else { + return schema.default; + } + } + else if (schema.format !== undefined) { + if (schema.default === undefined) { + throw new Error('ValueCreate.String: String types with formats must specify a default value'); + } + else { + return schema.default; + } + } + else { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.minLength !== undefined) { + return globalThis.Array.from({ length: schema.minLength }) + .map(() => '.') + .join(''); + } + else { + return ''; + } + } + } + function Tuple(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + if (schema.items === undefined) { + return []; + } + else { + return globalThis.Array.from({ length: schema.minItems }).map((_, index) => ValueCreate.Create(schema.items[index], references)); + } + } + function Undefined(schema, references) { + return undefined; + } + function Union(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.anyOf.length === 0) { + throw new Error('ValueCreate.Union: Cannot create Union with zero variants'); + } + else { + return ValueCreate.Create(schema.anyOf[0], references); + } + } + function Uint8Array(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else if (schema.minByteLength !== undefined) { + return new globalThis.Uint8Array(schema.minByteLength); + } + else { + return new globalThis.Uint8Array(0); + } + } + function Unknown(schema, references) { + if (schema.default !== undefined) { + return schema.default; + } + else { + return {}; + } + } + function Void(schema, references) { + return null; + } + /** Creates a value from the given schema. If the schema specifies a default value, then that value is returned. */ + function Visit(schema, references) { + const anyReferences = schema.$id === undefined ? references : [schema, ...references]; + const anySchema = schema; + switch (anySchema[Types.Kind]) { + case 'Any': + return Any(anySchema, anyReferences); + case 'Array': + return Array(anySchema, anyReferences); + case 'Boolean': + return Boolean(anySchema, anyReferences); + case 'Constructor': + return Constructor(anySchema, anyReferences); + case 'Enum': + return Enum(anySchema, anyReferences); + case 'Function': + return Function(anySchema, anyReferences); + case 'Integer': + return Integer(anySchema, anyReferences); + case 'Literal': + return Literal(anySchema, anyReferences); + case 'Never': + return Never(anySchema, anyReferences); + case 'Null': + return Null(anySchema, anyReferences); + case 'Number': + return Number(anySchema, anyReferences); + case 'Object': + return Object(anySchema, anyReferences); + case 'Promise': + return Promise(anySchema, anyReferences); + case 'Record': + return Record(anySchema, anyReferences); + case 'Rec': + return Recursive(anySchema, anyReferences); + case 'Ref': + return Ref(anySchema, anyReferences); + case 'Self': + return Self(anySchema, anyReferences); + case 'String': + return String(anySchema, anyReferences); + case 'Tuple': + return Tuple(anySchema, anyReferences); + case 'Undefined': + return Undefined(anySchema, anyReferences); + case 'Union': + return Union(anySchema, anyReferences); + case 'Uint8Array': + return Uint8Array(anySchema, anyReferences); + case 'Unknown': + return Unknown(anySchema, anyReferences); + case 'Void': + return Void(anySchema, anyReferences); + default: + throw new ValueCreateUnknownTypeError(anySchema); + } + } + ValueCreate.Visit = Visit; + function Create(schema, references) { + return Visit(schema, references); + } + ValueCreate.Create = Create; +})(ValueCreate = exports.ValueCreate || (exports.ValueCreate = {})); diff --git a/node_modules/@sinclair/typebox/value/delta.d.ts b/node_modules/@sinclair/typebox/value/delta.d.ts index cb60b01d..bd58a37d 100644 --- a/node_modules/@sinclair/typebox/value/delta.d.ts +++ b/node_modules/@sinclair/typebox/value/delta.d.ts @@ -1,22 +1,22 @@ -export declare type Edit = Insert | Update | Delete; -export interface Insert { - brand: T; - type: 'insert'; - path: string; - value: any; -} -export interface Update { - brand: T; - type: 'update'; - path: string; - value: any; -} -export interface Delete { - brand: T; - type: 'delete'; - path: string; -} -export declare namespace ValueDelta { - function Diff(current: T, next: T): Edit[]; - function Patch(current: T, edits: Edit[]): T; -} +export declare type Edit = Insert | Update | Delete; +export interface Insert { + brand: T; + type: 'insert'; + path: string; + value: any; +} +export interface Update { + brand: T; + type: 'update'; + path: string; + value: any; +} +export interface Delete { + brand: T; + type: 'delete'; + path: string; +} +export declare namespace ValueDelta { + function Diff(current: T, next: T): Edit[]; + function Patch(current: T, edits: Edit[]): T; +} diff --git a/node_modules/@sinclair/typebox/value/delta.js b/node_modules/@sinclair/typebox/value/delta.js index c1a68ed6..640a8545 100644 --- a/node_modules/@sinclair/typebox/value/delta.js +++ b/node_modules/@sinclair/typebox/value/delta.js @@ -1,168 +1,168 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueDelta = void 0; -const is_1 = require("./is"); -const clone_1 = require("./clone"); -const pointer_1 = require("./pointer"); -var ValueDelta; -(function (ValueDelta) { - // --------------------------------------------------------------------- - // Edits - // --------------------------------------------------------------------- - function Update(path, value) { - return { type: 'update', path, value }; - } - function Insert(path, value) { - return { type: 'insert', path, value }; - } - function Delete(path) { - return { type: 'delete', path }; - } - // --------------------------------------------------------------------- - // Diff - // --------------------------------------------------------------------- - function* Object(path, current, next) { - if (!is_1.Is.Object(next)) - return yield Update(path, next); - const currentKeys = [...globalThis.Object.keys(current), ...globalThis.Object.getOwnPropertySymbols(current)]; - const nextKeys = [...globalThis.Object.keys(next), ...globalThis.Object.getOwnPropertySymbols(next)]; - for (const key of currentKeys) { - if (typeof key === 'symbol') - throw Error('ValueDelta: Cannot produce diff symbol keys'); - if (next[key] === undefined && nextKeys.includes(key)) - yield Update(`${path}/${String(key)}`, undefined); - } - for (const key of nextKeys) { - if (current[key] === undefined || next[key] === undefined) - continue; - if (typeof key === 'symbol') - throw Error('ValueDelta: Cannot produce diff symbol keys'); - yield* Visit(`${path}/${String(key)}`, current[key], next[key]); - } - for (const key of nextKeys) { - if (typeof key === 'symbol') - throw Error('ValueDelta: Cannot produce diff symbol keys'); - if (current[key] === undefined) - yield Insert(`${path}/${String(key)}`, next[key]); - } - for (const key of currentKeys.reverse()) { - if (typeof key === 'symbol') - throw Error('ValueDelta: Cannot produce diff symbol keys'); - if (next[key] === undefined && !nextKeys.includes(key)) - yield Delete(`${path}/${String(key)}`); - } - } - function* Array(path, current, next) { - if (!is_1.Is.Array(next)) - return yield Update(path, next); - for (let i = 0; i < Math.min(current.length, next.length); i++) { - yield* Visit(`${path}/${i}`, current[i], next[i]); - } - for (let i = 0; i < next.length; i++) { - if (i < current.length) - continue; - yield Insert(`${path}/${i}`, next[i]); - } - for (let i = current.length - 1; i >= 0; i--) { - if (i < next.length) - continue; - yield Delete(`${path}/${i}`); - } - } - function* TypedArray(path, current, next) { - if (!is_1.Is.TypedArray(next) || current.length !== next.length || globalThis.Object.getPrototypeOf(current).constructor.name !== globalThis.Object.getPrototypeOf(next).constructor.name) - return yield Update(path, next); - for (let i = 0; i < Math.min(current.length, next.length); i++) { - yield* Visit(`${path}/${i}`, current[i], next[i]); - } - } - function* Value(path, current, next) { - if (current === next) - return; - yield Update(path, next); - } - function* Visit(path, current, next) { - if (is_1.Is.Object(current)) { - return yield* Object(path, current, next); - } - else if (is_1.Is.Array(current)) { - return yield* Array(path, current, next); - } - else if (is_1.Is.TypedArray(current)) { - return yield* TypedArray(path, current, next); - } - else if (is_1.Is.Value(current)) { - return yield* Value(path, current, next); - } - else { - throw new Error('ValueDelta: Cannot produce edits for value'); - } - } - function Diff(current, next) { - return [...Visit('', current, next)]; - } - ValueDelta.Diff = Diff; - // --------------------------------------------------------------------- - // Patch - // --------------------------------------------------------------------- - function IsRootUpdate(edits) { - return edits.length > 0 && edits[0].path === '' && edits[0].type === 'update'; - } - function IsIdentity(edits) { - return edits.length === 0; - } - function Patch(current, edits) { - if (IsRootUpdate(edits)) { - return clone_1.ValueClone.Clone(edits[0].value); - } - if (IsIdentity(edits)) { - return clone_1.ValueClone.Clone(current); - } - const clone = clone_1.ValueClone.Clone(current); - for (const edit of edits) { - switch (edit.type) { - case 'insert': { - pointer_1.ValuePointer.Set(clone, edit.path, edit.value); - break; - } - case 'update': { - pointer_1.ValuePointer.Set(clone, edit.path, edit.value); - break; - } - case 'delete': { - pointer_1.ValuePointer.Delete(clone, edit.path); - break; - } - } - } - return clone; - } - ValueDelta.Patch = Patch; -})(ValueDelta = exports.ValueDelta || (exports.ValueDelta = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueDelta = void 0; +const is_1 = require("./is"); +const clone_1 = require("./clone"); +const pointer_1 = require("./pointer"); +var ValueDelta; +(function (ValueDelta) { + // --------------------------------------------------------------------- + // Edits + // --------------------------------------------------------------------- + function Update(path, value) { + return { type: 'update', path, value }; + } + function Insert(path, value) { + return { type: 'insert', path, value }; + } + function Delete(path) { + return { type: 'delete', path }; + } + // --------------------------------------------------------------------- + // Diff + // --------------------------------------------------------------------- + function* Object(path, current, next) { + if (!is_1.Is.Object(next)) + return yield Update(path, next); + const currentKeys = [...globalThis.Object.keys(current), ...globalThis.Object.getOwnPropertySymbols(current)]; + const nextKeys = [...globalThis.Object.keys(next), ...globalThis.Object.getOwnPropertySymbols(next)]; + for (const key of currentKeys) { + if (typeof key === 'symbol') + throw Error('ValueDelta: Cannot produce diff symbol keys'); + if (next[key] === undefined && nextKeys.includes(key)) + yield Update(`${path}/${String(key)}`, undefined); + } + for (const key of nextKeys) { + if (current[key] === undefined || next[key] === undefined) + continue; + if (typeof key === 'symbol') + throw Error('ValueDelta: Cannot produce diff symbol keys'); + yield* Visit(`${path}/${String(key)}`, current[key], next[key]); + } + for (const key of nextKeys) { + if (typeof key === 'symbol') + throw Error('ValueDelta: Cannot produce diff symbol keys'); + if (current[key] === undefined) + yield Insert(`${path}/${String(key)}`, next[key]); + } + for (const key of currentKeys.reverse()) { + if (typeof key === 'symbol') + throw Error('ValueDelta: Cannot produce diff symbol keys'); + if (next[key] === undefined && !nextKeys.includes(key)) + yield Delete(`${path}/${String(key)}`); + } + } + function* Array(path, current, next) { + if (!is_1.Is.Array(next)) + return yield Update(path, next); + for (let i = 0; i < Math.min(current.length, next.length); i++) { + yield* Visit(`${path}/${i}`, current[i], next[i]); + } + for (let i = 0; i < next.length; i++) { + if (i < current.length) + continue; + yield Insert(`${path}/${i}`, next[i]); + } + for (let i = current.length - 1; i >= 0; i--) { + if (i < next.length) + continue; + yield Delete(`${path}/${i}`); + } + } + function* TypedArray(path, current, next) { + if (!is_1.Is.TypedArray(next) || current.length !== next.length || globalThis.Object.getPrototypeOf(current).constructor.name !== globalThis.Object.getPrototypeOf(next).constructor.name) + return yield Update(path, next); + for (let i = 0; i < Math.min(current.length, next.length); i++) { + yield* Visit(`${path}/${i}`, current[i], next[i]); + } + } + function* Value(path, current, next) { + if (current === next) + return; + yield Update(path, next); + } + function* Visit(path, current, next) { + if (is_1.Is.Object(current)) { + return yield* Object(path, current, next); + } + else if (is_1.Is.Array(current)) { + return yield* Array(path, current, next); + } + else if (is_1.Is.TypedArray(current)) { + return yield* TypedArray(path, current, next); + } + else if (is_1.Is.Value(current)) { + return yield* Value(path, current, next); + } + else { + throw new Error('ValueDelta: Cannot produce edits for value'); + } + } + function Diff(current, next) { + return [...Visit('', current, next)]; + } + ValueDelta.Diff = Diff; + // --------------------------------------------------------------------- + // Patch + // --------------------------------------------------------------------- + function IsRootUpdate(edits) { + return edits.length > 0 && edits[0].path === '' && edits[0].type === 'update'; + } + function IsIdentity(edits) { + return edits.length === 0; + } + function Patch(current, edits) { + if (IsRootUpdate(edits)) { + return clone_1.ValueClone.Clone(edits[0].value); + } + if (IsIdentity(edits)) { + return clone_1.ValueClone.Clone(current); + } + const clone = clone_1.ValueClone.Clone(current); + for (const edit of edits) { + switch (edit.type) { + case 'insert': { + pointer_1.ValuePointer.Set(clone, edit.path, edit.value); + break; + } + case 'update': { + pointer_1.ValuePointer.Set(clone, edit.path, edit.value); + break; + } + case 'delete': { + pointer_1.ValuePointer.Delete(clone, edit.path); + break; + } + } + } + return clone; + } + ValueDelta.Patch = Patch; +})(ValueDelta = exports.ValueDelta || (exports.ValueDelta = {})); diff --git a/node_modules/@sinclair/typebox/value/equal.d.ts b/node_modules/@sinclair/typebox/value/equal.d.ts index 785c2b8d..e41bca5b 100644 --- a/node_modules/@sinclair/typebox/value/equal.d.ts +++ b/node_modules/@sinclair/typebox/value/equal.d.ts @@ -1,3 +1,3 @@ -export declare namespace ValueEqual { - function Equal(left: T, right: unknown): right is T; -} +export declare namespace ValueEqual { + function Equal(left: T, right: unknown): right is T; +} diff --git a/node_modules/@sinclair/typebox/value/equal.js b/node_modules/@sinclair/typebox/value/equal.js index a0dc1164..fd1f550e 100644 --- a/node_modules/@sinclair/typebox/value/equal.js +++ b/node_modules/@sinclair/typebox/value/equal.js @@ -1,74 +1,74 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueEqual = void 0; -const is_1 = require("./is"); -var ValueEqual; -(function (ValueEqual) { - function Object(left, right) { - if (!is_1.Is.Object(right)) - return false; - const leftKeys = [...globalThis.Object.keys(left), ...globalThis.Object.getOwnPropertySymbols(left)]; - const rightKeys = [...globalThis.Object.keys(right), ...globalThis.Object.getOwnPropertySymbols(right)]; - if (leftKeys.length !== rightKeys.length) - return false; - return leftKeys.every((key) => Equal(left[key], right[key])); - } - function Array(left, right) { - if (!is_1.Is.Array(right) || left.length !== right.length) - return false; - return left.every((value, index) => Equal(value, right[index])); - } - function TypedArray(left, right) { - if (!is_1.Is.TypedArray(right) || left.length !== right.length || globalThis.Object.getPrototypeOf(left).constructor.name !== globalThis.Object.getPrototypeOf(right).constructor.name) - return false; - return left.every((value, index) => Equal(value, right[index])); - } - function Value(left, right) { - return left === right; - } - function Equal(left, right) { - if (is_1.Is.Object(left)) { - return Object(left, right); - } - else if (is_1.Is.TypedArray(left)) { - return TypedArray(left, right); - } - else if (is_1.Is.Array(left)) { - return Array(left, right); - } - else if (is_1.Is.Value(left)) { - return Value(left, right); - } - else { - throw new Error('ValueEquals: Unable to compare value'); - } - } - ValueEqual.Equal = Equal; -})(ValueEqual = exports.ValueEqual || (exports.ValueEqual = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueEqual = void 0; +const is_1 = require("./is"); +var ValueEqual; +(function (ValueEqual) { + function Object(left, right) { + if (!is_1.Is.Object(right)) + return false; + const leftKeys = [...globalThis.Object.keys(left), ...globalThis.Object.getOwnPropertySymbols(left)]; + const rightKeys = [...globalThis.Object.keys(right), ...globalThis.Object.getOwnPropertySymbols(right)]; + if (leftKeys.length !== rightKeys.length) + return false; + return leftKeys.every((key) => Equal(left[key], right[key])); + } + function Array(left, right) { + if (!is_1.Is.Array(right) || left.length !== right.length) + return false; + return left.every((value, index) => Equal(value, right[index])); + } + function TypedArray(left, right) { + if (!is_1.Is.TypedArray(right) || left.length !== right.length || globalThis.Object.getPrototypeOf(left).constructor.name !== globalThis.Object.getPrototypeOf(right).constructor.name) + return false; + return left.every((value, index) => Equal(value, right[index])); + } + function Value(left, right) { + return left === right; + } + function Equal(left, right) { + if (is_1.Is.Object(left)) { + return Object(left, right); + } + else if (is_1.Is.TypedArray(left)) { + return TypedArray(left, right); + } + else if (is_1.Is.Array(left)) { + return Array(left, right); + } + else if (is_1.Is.Value(left)) { + return Value(left, right); + } + else { + throw new Error('ValueEquals: Unable to compare value'); + } + } + ValueEqual.Equal = Equal; +})(ValueEqual = exports.ValueEqual || (exports.ValueEqual = {})); diff --git a/node_modules/@sinclair/typebox/value/index.d.ts b/node_modules/@sinclair/typebox/value/index.d.ts index 4cfd5e33..5d385a0f 100644 --- a/node_modules/@sinclair/typebox/value/index.d.ts +++ b/node_modules/@sinclair/typebox/value/index.d.ts @@ -1,3 +1,3 @@ -export { ValueError, ValueErrorType } from '../errors/index'; -export * from './pointer'; -export * from './value'; +export { ValueError, ValueErrorType } from '../errors/index'; +export * from './pointer'; +export * from './value'; diff --git a/node_modules/@sinclair/typebox/value/index.js b/node_modules/@sinclair/typebox/value/index.js index 801ed4fe..6d98b065 100644 --- a/node_modules/@sinclair/typebox/value/index.js +++ b/node_modules/@sinclair/typebox/value/index.js @@ -1,48 +1,48 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueErrorType = void 0; -var index_1 = require("../errors/index"); -Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return index_1.ValueErrorType; } }); -__exportStar(require("./pointer"), exports); -__exportStar(require("./value"), exports); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValueErrorType = void 0; +var index_1 = require("../errors/index"); +Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return index_1.ValueErrorType; } }); +__exportStar(require("./pointer"), exports); +__exportStar(require("./value"), exports); diff --git a/node_modules/@sinclair/typebox/value/is.d.ts b/node_modules/@sinclair/typebox/value/is.d.ts index 57da7940..3b423ec6 100644 --- a/node_modules/@sinclair/typebox/value/is.d.ts +++ b/node_modules/@sinclair/typebox/value/is.d.ts @@ -1,10 +1,10 @@ -export declare type ValueType = null | undefined | Function | symbol | bigint | number | boolean | string; -export declare type ObjectType = Record; -export declare type TypedArrayType = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array; -export declare type ArrayType = unknown[]; -export declare namespace Is { - function Object(value: unknown): value is ObjectType; - function Array(value: unknown): value is ArrayType; - function Value(value: unknown): value is ValueType; - function TypedArray(value: unknown): value is TypedArrayType; -} +export declare type ValueType = null | undefined | Function | symbol | bigint | number | boolean | string; +export declare type ObjectType = Record; +export declare type TypedArrayType = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array; +export declare type ArrayType = unknown[]; +export declare namespace Is { + function Object(value: unknown): value is ObjectType; + function Array(value: unknown): value is ArrayType; + function Value(value: unknown): value is ValueType; + function TypedArray(value: unknown): value is TypedArrayType; +} diff --git a/node_modules/@sinclair/typebox/value/is.js b/node_modules/@sinclair/typebox/value/is.js index a96b05d8..0d1fea63 100644 --- a/node_modules/@sinclair/typebox/value/is.js +++ b/node_modules/@sinclair/typebox/value/is.js @@ -1,49 +1,49 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Is = void 0; -var Is; -(function (Is) { - function Object(value) { - return value !== null && typeof value === 'object' && !globalThis.Array.isArray(value) && !ArrayBuffer.isView(value); - } - Is.Object = Object; - function Array(value) { - return globalThis.Array.isArray(value) && !ArrayBuffer.isView(value); - } - Is.Array = Array; - function Value(value) { - return value === null || value === undefined || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'bigint' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'string'; - } - Is.Value = Value; - function TypedArray(value) { - return ArrayBuffer.isView(value); - } - Is.TypedArray = TypedArray; -})(Is = exports.Is || (exports.Is = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Is = void 0; +var Is; +(function (Is) { + function Object(value) { + return value !== null && typeof value === 'object' && !globalThis.Array.isArray(value) && !ArrayBuffer.isView(value); + } + Is.Object = Object; + function Array(value) { + return globalThis.Array.isArray(value) && !ArrayBuffer.isView(value); + } + Is.Array = Array; + function Value(value) { + return value === null || value === undefined || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'bigint' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'string'; + } + Is.Value = Value; + function TypedArray(value) { + return ArrayBuffer.isView(value); + } + Is.TypedArray = TypedArray; +})(Is = exports.Is || (exports.Is = {})); diff --git a/node_modules/@sinclair/typebox/value/pointer.d.ts b/node_modules/@sinclair/typebox/value/pointer.d.ts index d548b3d4..d3256da0 100644 --- a/node_modules/@sinclair/typebox/value/pointer.d.ts +++ b/node_modules/@sinclair/typebox/value/pointer.d.ts @@ -1,24 +1,24 @@ -export declare class ValuePointerRootSetError extends Error { - readonly value: unknown; - readonly path: string; - readonly update: unknown; - constructor(value: unknown, path: string, update: unknown); -} -export declare class ValuePointerRootDeleteError extends Error { - readonly value: unknown; - readonly path: string; - constructor(value: unknown, path: string); -} -/** ValuePointer performs mutable operations on values using RFC6901 Json Pointers */ -export declare namespace ValuePointer { - /** Formats the given pointer into navigable key components */ - function Format(pointer: string): IterableIterator; - /** Sets the value at the given pointer. If the value at the pointer does not exist it is created */ - function Set(value: any, pointer: string, update: unknown): void; - /** Deletes a value at the given pointer */ - function Delete(value: any, pointer: string): void; - /** Returns true if a value exists at the given pointer */ - function Has(value: any, pointer: string): boolean; - /** Gets the value at the given pointer */ - function Get(value: any, pointer: string): any; -} +export declare class ValuePointerRootSetError extends Error { + readonly value: unknown; + readonly path: string; + readonly update: unknown; + constructor(value: unknown, path: string, update: unknown); +} +export declare class ValuePointerRootDeleteError extends Error { + readonly value: unknown; + readonly path: string; + constructor(value: unknown, path: string); +} +/** ValuePointer performs mutable operations on values using RFC6901 Json Pointers */ +export declare namespace ValuePointer { + /** Formats the given pointer into navigable key components */ + function Format(pointer: string): IterableIterator; + /** Sets the value at the given pointer. If the value at the pointer does not exist it is created */ + function Set(value: any, pointer: string, update: unknown): void; + /** Deletes a value at the given pointer */ + function Delete(value: any, pointer: string): void; + /** Returns true if a value exists at the given pointer */ + function Has(value: any, pointer: string): boolean; + /** Gets the value at the given pointer */ + function Get(value: any, pointer: string): any; +} diff --git a/node_modules/@sinclair/typebox/value/pointer.js b/node_modules/@sinclair/typebox/value/pointer.js index e69e1a5e..db547b87 100644 --- a/node_modules/@sinclair/typebox/value/pointer.js +++ b/node_modules/@sinclair/typebox/value/pointer.js @@ -1,142 +1,142 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValuePointer = exports.ValuePointerRootDeleteError = exports.ValuePointerRootSetError = void 0; -class ValuePointerRootSetError extends Error { - constructor(value, path, update) { - super('ValuePointer: Cannot set root value'); - this.value = value; - this.path = path; - this.update = update; - } -} -exports.ValuePointerRootSetError = ValuePointerRootSetError; -class ValuePointerRootDeleteError extends Error { - constructor(value, path) { - super('ValuePointer: Cannot delete root value'); - this.value = value; - this.path = path; - } -} -exports.ValuePointerRootDeleteError = ValuePointerRootDeleteError; -/** ValuePointer performs mutable operations on values using RFC6901 Json Pointers */ -var ValuePointer; -(function (ValuePointer) { - function Escape(component) { - return component.indexOf('~') === -1 ? component : component.replace(/~1/g, '/').replace(/~0/g, '~'); - } - /** Formats the given pointer into navigable key components */ - function* Format(pointer) { - if (pointer === '') - return; - let [start, end] = [0, 0]; - for (let i = 0; i < pointer.length; i++) { - const char = pointer.charAt(i); - if (char === '/') { - if (i === 0) { - start = i + 1; - } - else { - end = i; - yield Escape(pointer.slice(start, end)); - start = i + 1; - } - } - else { - end = i; - } - } - yield Escape(pointer.slice(start)); - } - ValuePointer.Format = Format; - /** Sets the value at the given pointer. If the value at the pointer does not exist it is created */ - function Set(value, pointer, update) { - if (pointer === '') - throw new ValuePointerRootSetError(value, pointer, update); - let [owner, next, key] = [null, value, '']; - for (const component of Format(pointer)) { - if (next[component] === undefined) - next[component] = {}; - owner = next; - next = next[component]; - key = component; - } - owner[key] = update; - } - ValuePointer.Set = Set; - /** Deletes a value at the given pointer */ - function Delete(value, pointer) { - if (pointer === '') - throw new ValuePointerRootDeleteError(value, pointer); - let [owner, next, key] = [null, value, '']; - for (const component of Format(pointer)) { - if (next[component] === undefined || next[component] === null) - return; - owner = next; - next = next[component]; - key = component; - } - if (globalThis.Array.isArray(owner)) { - const index = parseInt(key); - owner.splice(index, 1); - } - else { - delete owner[key]; - } - } - ValuePointer.Delete = Delete; - /** Returns true if a value exists at the given pointer */ - function Has(value, pointer) { - if (pointer === '') - return true; - let [owner, next, key] = [null, value, '']; - for (const component of Format(pointer)) { - if (next[component] === undefined) - return false; - owner = next; - next = next[component]; - key = component; - } - return globalThis.Object.getOwnPropertyNames(owner).includes(key); - } - ValuePointer.Has = Has; - /** Gets the value at the given pointer */ - function Get(value, pointer) { - if (pointer === '') - return value; - let current = value; - for (const component of Format(pointer)) { - if (current[component] === undefined) - return undefined; - current = current[component]; - } - return current; - } - ValuePointer.Get = Get; -})(ValuePointer = exports.ValuePointer || (exports.ValuePointer = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValuePointer = exports.ValuePointerRootDeleteError = exports.ValuePointerRootSetError = void 0; +class ValuePointerRootSetError extends Error { + constructor(value, path, update) { + super('ValuePointer: Cannot set root value'); + this.value = value; + this.path = path; + this.update = update; + } +} +exports.ValuePointerRootSetError = ValuePointerRootSetError; +class ValuePointerRootDeleteError extends Error { + constructor(value, path) { + super('ValuePointer: Cannot delete root value'); + this.value = value; + this.path = path; + } +} +exports.ValuePointerRootDeleteError = ValuePointerRootDeleteError; +/** ValuePointer performs mutable operations on values using RFC6901 Json Pointers */ +var ValuePointer; +(function (ValuePointer) { + function Escape(component) { + return component.indexOf('~') === -1 ? component : component.replace(/~1/g, '/').replace(/~0/g, '~'); + } + /** Formats the given pointer into navigable key components */ + function* Format(pointer) { + if (pointer === '') + return; + let [start, end] = [0, 0]; + for (let i = 0; i < pointer.length; i++) { + const char = pointer.charAt(i); + if (char === '/') { + if (i === 0) { + start = i + 1; + } + else { + end = i; + yield Escape(pointer.slice(start, end)); + start = i + 1; + } + } + else { + end = i; + } + } + yield Escape(pointer.slice(start)); + } + ValuePointer.Format = Format; + /** Sets the value at the given pointer. If the value at the pointer does not exist it is created */ + function Set(value, pointer, update) { + if (pointer === '') + throw new ValuePointerRootSetError(value, pointer, update); + let [owner, next, key] = [null, value, '']; + for (const component of Format(pointer)) { + if (next[component] === undefined) + next[component] = {}; + owner = next; + next = next[component]; + key = component; + } + owner[key] = update; + } + ValuePointer.Set = Set; + /** Deletes a value at the given pointer */ + function Delete(value, pointer) { + if (pointer === '') + throw new ValuePointerRootDeleteError(value, pointer); + let [owner, next, key] = [null, value, '']; + for (const component of Format(pointer)) { + if (next[component] === undefined || next[component] === null) + return; + owner = next; + next = next[component]; + key = component; + } + if (globalThis.Array.isArray(owner)) { + const index = parseInt(key); + owner.splice(index, 1); + } + else { + delete owner[key]; + } + } + ValuePointer.Delete = Delete; + /** Returns true if a value exists at the given pointer */ + function Has(value, pointer) { + if (pointer === '') + return true; + let [owner, next, key] = [null, value, '']; + for (const component of Format(pointer)) { + if (next[component] === undefined) + return false; + owner = next; + next = next[component]; + key = component; + } + return globalThis.Object.getOwnPropertyNames(owner).includes(key); + } + ValuePointer.Has = Has; + /** Gets the value at the given pointer */ + function Get(value, pointer) { + if (pointer === '') + return value; + let current = value; + for (const component of Format(pointer)) { + if (current[component] === undefined) + return undefined; + current = current[component]; + } + return current; + } + ValuePointer.Get = Get; +})(ValuePointer = exports.ValuePointer || (exports.ValuePointer = {})); diff --git a/node_modules/@sinclair/typebox/value/value.d.ts b/node_modules/@sinclair/typebox/value/value.d.ts index 3525caeb..84664c52 100644 --- a/node_modules/@sinclair/typebox/value/value.d.ts +++ b/node_modules/@sinclair/typebox/value/value.d.ts @@ -1,31 +1,31 @@ -import * as Types from '../typebox'; -import { ValueError } from '../errors/index'; -import { Edit } from './delta'; -export type { Edit } from './delta'; -/** Value performs immutable operations on values */ -export declare namespace Value { - /** Casts a value into a given type. The return value will retain as much information of the original value as possible. Cast will convert string, number and boolean values if a reasonable conversion is possible. */ - function Cast(schema: T, references: [...R], value: unknown): Types.Static; - /** Casts a value into a given type. The return value will retain as much information of the original value as possible. Cast will convert string, number and boolean values if a reasonable conversion is possible. */ - function Cast(schema: T, value: unknown): Types.Static; - /** Creates a value from the given type */ - function Create(schema: T, references: [...R]): Types.Static; - /** Creates a value from the given type */ - function Create(schema: T): Types.Static; - /** Returns true if the value matches the given type. */ - function Check(schema: T, references: [...R], value: unknown): value is Types.Static; - /** Returns true if the value matches the given type. */ - function Check(schema: T, value: unknown): value is Types.Static; - /** Returns an iterator for each error in this value. */ - function Errors(schema: T, references: [...R], value: unknown): IterableIterator; - /** Returns an iterator for each error in this value. */ - function Errors(schema: T, value: unknown): IterableIterator; - /** Returns true if left and right values are structurally equal */ - function Equal(left: T, right: unknown): right is T; - /** Returns a structural clone of the given value */ - function Clone(value: T): T; - /** Returns edits to transform the current value into the next value */ - function Diff(current: T, next: T): Edit[]; - /** Returns a new value with edits applied to the given value */ - function Patch(current: T, edits: Edit[]): T; -} +import * as Types from '../typebox'; +import { ValueError } from '../errors/index'; +import { Edit } from './delta'; +export type { Edit } from './delta'; +/** Value performs immutable operations on values */ +export declare namespace Value { + /** Casts a value into a given type. The return value will retain as much information of the original value as possible. Cast will convert string, number and boolean values if a reasonable conversion is possible. */ + function Cast(schema: T, references: [...R], value: unknown): Types.Static; + /** Casts a value into a given type. The return value will retain as much information of the original value as possible. Cast will convert string, number and boolean values if a reasonable conversion is possible. */ + function Cast(schema: T, value: unknown): Types.Static; + /** Creates a value from the given type */ + function Create(schema: T, references: [...R]): Types.Static; + /** Creates a value from the given type */ + function Create(schema: T): Types.Static; + /** Returns true if the value matches the given type. */ + function Check(schema: T, references: [...R], value: unknown): value is Types.Static; + /** Returns true if the value matches the given type. */ + function Check(schema: T, value: unknown): value is Types.Static; + /** Returns an iterator for each error in this value. */ + function Errors(schema: T, references: [...R], value: unknown): IterableIterator; + /** Returns an iterator for each error in this value. */ + function Errors(schema: T, value: unknown): IterableIterator; + /** Returns true if left and right values are structurally equal */ + function Equal(left: T, right: unknown): right is T; + /** Returns a structural clone of the given value */ + function Clone(value: T): T; + /** Returns edits to transform the current value into the next value */ + function Diff(current: T, next: T): Edit[]; + /** Returns a new value with edits applied to the given value */ + function Patch(current: T, edits: Edit[]): T; +} diff --git a/node_modules/@sinclair/typebox/value/value.js b/node_modules/@sinclair/typebox/value/value.js index b7dbff36..4b63d17c 100644 --- a/node_modules/@sinclair/typebox/value/value.js +++ b/node_modules/@sinclair/typebox/value/value.js @@ -1,81 +1,81 @@ -"use strict"; -/*-------------------------------------------------------------------------- - -@sinclair/typebox/value - -The MIT License (MIT) - -Copyright (c) 2022 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Value = void 0; -const index_1 = require("../errors/index"); -const equal_1 = require("./equal"); -const cast_1 = require("./cast"); -const clone_1 = require("./clone"); -const create_1 = require("./create"); -const check_1 = require("./check"); -const delta_1 = require("./delta"); -/** Value performs immutable operations on values */ -var Value; -(function (Value) { - function Cast(...args) { - const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; - return cast_1.ValueCast.Cast(schema, references, value); - } - Value.Cast = Cast; - function Create(...args) { - const [schema, references] = args.length === 2 ? [args[0], args[1]] : [args[0], []]; - return create_1.ValueCreate.Create(schema, references); - } - Value.Create = Create; - function Check(...args) { - const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; - return check_1.ValueCheck.Check(schema, references, value); - } - Value.Check = Check; - function* Errors(...args) { - const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; - yield* index_1.ValueErrors.Errors(schema, references, value); - } - Value.Errors = Errors; - /** Returns true if left and right values are structurally equal */ - function Equal(left, right) { - return equal_1.ValueEqual.Equal(left, right); - } - Value.Equal = Equal; - /** Returns a structural clone of the given value */ - function Clone(value) { - return clone_1.ValueClone.Clone(value); - } - Value.Clone = Clone; - /** Returns edits to transform the current value into the next value */ - function Diff(current, next) { - return delta_1.ValueDelta.Diff(current, next); - } - Value.Diff = Diff; - /** Returns a new value with edits applied to the given value */ - function Patch(current, edits) { - return delta_1.ValueDelta.Patch(current, edits); - } - Value.Patch = Patch; -})(Value = exports.Value || (exports.Value = {})); +"use strict"; +/*-------------------------------------------------------------------------- + +@sinclair/typebox/value + +The MIT License (MIT) + +Copyright (c) 2022 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Value = void 0; +const index_1 = require("../errors/index"); +const equal_1 = require("./equal"); +const cast_1 = require("./cast"); +const clone_1 = require("./clone"); +const create_1 = require("./create"); +const check_1 = require("./check"); +const delta_1 = require("./delta"); +/** Value performs immutable operations on values */ +var Value; +(function (Value) { + function Cast(...args) { + const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; + return cast_1.ValueCast.Cast(schema, references, value); + } + Value.Cast = Cast; + function Create(...args) { + const [schema, references] = args.length === 2 ? [args[0], args[1]] : [args[0], []]; + return create_1.ValueCreate.Create(schema, references); + } + Value.Create = Create; + function Check(...args) { + const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; + return check_1.ValueCheck.Check(schema, references, value); + } + Value.Check = Check; + function* Errors(...args) { + const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]]; + yield* index_1.ValueErrors.Errors(schema, references, value); + } + Value.Errors = Errors; + /** Returns true if left and right values are structurally equal */ + function Equal(left, right) { + return equal_1.ValueEqual.Equal(left, right); + } + Value.Equal = Equal; + /** Returns a structural clone of the given value */ + function Clone(value) { + return clone_1.ValueClone.Clone(value); + } + Value.Clone = Clone; + /** Returns edits to transform the current value into the next value */ + function Diff(current, next) { + return delta_1.ValueDelta.Diff(current, next); + } + Value.Diff = Diff; + /** Returns a new value with edits applied to the given value */ + function Patch(current, edits) { + return delta_1.ValueDelta.Patch(current, edits); + } + Value.Patch = Patch; +})(Value = exports.Value || (exports.Value = {})); diff --git a/node_modules/@testing-library/dom/node_modules/color-name/LICENSE b/node_modules/@testing-library/dom/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@testing-library/dom/node_modules/color-name/LICENSE +++ b/node_modules/@testing-library/dom/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@testing-library/dom/node_modules/color-name/README.md b/node_modules/@testing-library/dom/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@testing-library/dom/node_modules/color-name/README.md +++ b/node_modules/@testing-library/dom/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@testing-library/dom/node_modules/color-name/index.js b/node_modules/@testing-library/dom/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@testing-library/dom/node_modules/color-name/index.js +++ b/node_modules/@testing-library/dom/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@testing-library/dom/node_modules/color-name/package.json b/node_modules/@testing-library/dom/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@testing-library/dom/node_modules/color-name/package.json +++ b/node_modules/@testing-library/dom/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@testing-library/jest-dom/node_modules/color-name/LICENSE b/node_modules/@testing-library/jest-dom/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@testing-library/jest-dom/node_modules/color-name/LICENSE +++ b/node_modules/@testing-library/jest-dom/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@testing-library/jest-dom/node_modules/color-name/README.md b/node_modules/@testing-library/jest-dom/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@testing-library/jest-dom/node_modules/color-name/README.md +++ b/node_modules/@testing-library/jest-dom/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@testing-library/jest-dom/node_modules/color-name/index.js b/node_modules/@testing-library/jest-dom/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@testing-library/jest-dom/node_modules/color-name/index.js +++ b/node_modules/@testing-library/jest-dom/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@testing-library/jest-dom/node_modules/color-name/package.json b/node_modules/@testing-library/jest-dom/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@testing-library/jest-dom/node_modules/color-name/package.json +++ b/node_modules/@testing-library/jest-dom/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@testing-library/react/node_modules/color-name/LICENSE b/node_modules/@testing-library/react/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@testing-library/react/node_modules/color-name/LICENSE +++ b/node_modules/@testing-library/react/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@testing-library/react/node_modules/color-name/README.md b/node_modules/@testing-library/react/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@testing-library/react/node_modules/color-name/README.md +++ b/node_modules/@testing-library/react/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@testing-library/react/node_modules/color-name/index.js b/node_modules/@testing-library/react/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@testing-library/react/node_modules/color-name/index.js +++ b/node_modules/@testing-library/react/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@testing-library/react/node_modules/color-name/package.json b/node_modules/@testing-library/react/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@testing-library/react/node_modules/color-name/package.json +++ b/node_modules/@testing-library/react/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@types/aria-query/README.md b/node_modules/@types/aria-query/README.md index 197aa072..4f98f5eb 100644 --- a/node_modules/@types/aria-query/README.md +++ b/node_modules/@types/aria-query/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/aria-query` - -# Summary -This package contains type definitions for aria-query (https://github.com/A11yance/aria-query#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aria-query. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:04 GMT - * Dependencies: none - -# Credits -These definitions were written by [Sebastian Silbermann](https://github.com/eps1lon). +# Installation +> `npm install --save @types/aria-query` + +# Summary +This package contains type definitions for aria-query (https://github.com/A11yance/aria-query#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aria-query. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:04 GMT + * Dependencies: none + +# Credits +These definitions were written by [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/babel__core/README.md b/node_modules/@types/babel__core/README.md index 5121fc3a..3e4c0244 100644 --- a/node_modules/@types/babel__core/README.md +++ b/node_modules/@types/babel__core/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/babel__core` - -# Summary -This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:23 GMT - * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types), [@types/babel__generator](https://npmjs.com/package/@types/babel__generator), [@types/babel__template](https://npmjs.com/package/@types/babel__template), [@types/babel__traverse](https://npmjs.com/package/@types/babel__traverse) - -# Credits -These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), [Jessica Franco](https://github.com/Jessidhia), and [Ifiok Jr.](https://github.com/ifiokjr). +# Installation +> `npm install --save @types/babel__core` + +# Summary +This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:23 GMT + * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types), [@types/babel__generator](https://npmjs.com/package/@types/babel__generator), [@types/babel__template](https://npmjs.com/package/@types/babel__template), [@types/babel__traverse](https://npmjs.com/package/@types/babel__traverse) + +# Credits +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), [Jessica Franco](https://github.com/Jessidhia), and [Ifiok Jr.](https://github.com/ifiokjr). diff --git a/node_modules/@types/babel__generator/README.md b/node_modules/@types/babel__generator/README.md index d11335c0..f212e5e9 100644 --- a/node_modules/@types/babel__generator/README.md +++ b/node_modules/@types/babel__generator/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/babel__generator` - -# Summary -This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator. - -### Additional Details - * Last updated: Sat, 16 Dec 2023 09:06:45 GMT - * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) - -# Credits -These definitions were written by [Troy Gerwien](https://github.com/yortus), [Melvin Groenhoff](https://github.com/mgroenhoff), [Cameron Yan](https://github.com/khell), and [Lyanbin](https://github.com/Lyanbin). +# Installation +> `npm install --save @types/babel__generator` + +# Summary +This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator. + +### Additional Details + * Last updated: Sat, 16 Dec 2023 09:06:45 GMT + * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) + +# Credits +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Melvin Groenhoff](https://github.com/mgroenhoff), [Cameron Yan](https://github.com/khell), and [Lyanbin](https://github.com/Lyanbin). diff --git a/node_modules/@types/babel__template/README.md b/node_modules/@types/babel__template/README.md index 63be1568..bc4ea0ba 100644 --- a/node_modules/@types/babel__template/README.md +++ b/node_modules/@types/babel__template/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/babel__template` - -# Summary -This package contains type definitions for @babel/template (https://github.com/babel/babel/tree/master/packages/babel-template). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:04 GMT - * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types) - -# Credits -These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), and [ExE Boss](https://github.com/ExE-Boss). +# Installation +> `npm install --save @types/babel__template` + +# Summary +This package contains type definitions for @babel/template (https://github.com/babel/babel/tree/master/packages/babel-template). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:04 GMT + * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types) + +# Credits +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), and [ExE Boss](https://github.com/ExE-Boss). diff --git a/node_modules/@types/babel__traverse/README.md b/node_modules/@types/babel__traverse/README.md index 3cf97647..e86e22ea 100644 --- a/node_modules/@types/babel__traverse/README.md +++ b/node_modules/@types/babel__traverse/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/babel__traverse` - -# Summary -This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse. - -### Additional Details - * Last updated: Sat, 30 Dec 2023 13:06:53 GMT - * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) - -# Credits -These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez). +# Installation +> `npm install --save @types/babel__traverse` + +# Summary +This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse. + +### Additional Details + * Last updated: Sat, 30 Dec 2023 13:06:53 GMT + * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) + +# Credits +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez). diff --git a/node_modules/@types/body-parser/README.md b/node_modules/@types/body-parser/README.md index 1324318a..0d280422 100644 --- a/node_modules/@types/body-parser/README.md +++ b/node_modules/@types/body-parser/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/body-parser` - -# Summary -This package contains type definitions for body-parser (https://github.com/expressjs/body-parser). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Åaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). +# Installation +> `npm install --save @types/body-parser` + +# Summary +This package contains type definitions for body-parser (https://github.com/expressjs/body-parser). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Åaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). diff --git a/node_modules/@types/bonjour/README.md b/node_modules/@types/bonjour/README.md index 08066db1..3bfd1e48 100644 --- a/node_modules/@types/bonjour/README.md +++ b/node_modules/@types/bonjour/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/bonjour` - -# Summary -This package contains type definitions for bonjour (https://github.com/watson/bonjour). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bonjour. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Quentin Lampin](https://github.com/quentin-ol). +# Installation +> `npm install --save @types/bonjour` + +# Summary +This package contains type definitions for bonjour (https://github.com/watson/bonjour). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bonjour. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Quentin Lampin](https://github.com/quentin-ol). diff --git a/node_modules/@types/connect-history-api-fallback/README.md b/node_modules/@types/connect-history-api-fallback/README.md index c760e27a..02448882 100644 --- a/node_modules/@types/connect-history-api-fallback/README.md +++ b/node_modules/@types/connect-history-api-fallback/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/connect-history-api-fallback` - -# Summary -This package contains type definitions for connect-history-api-fallback (https://github.com/bripkens/connect-history-api-fallback#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback/index.d.ts) -````ts +# Installation +> `npm install --save @types/connect-history-api-fallback` + +# Summary +This package contains type definitions for connect-history-api-fallback (https://github.com/bripkens/connect-history-api-fallback#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback/index.d.ts) +````ts /// import { Url } from "url"; @@ -40,12 +40,12 @@ declare namespace historyApiFallback { readonly to: string | RegExp | RewriteTo; } } - -```` - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Douglas Duteil](https://github.com/douglasduteil). + +```` + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Douglas Duteil](https://github.com/douglasduteil). diff --git a/node_modules/@types/connect/README.md b/node_modules/@types/connect/README.md index e229a837..1746fab0 100644 --- a/node_modules/@types/connect/README.md +++ b/node_modules/@types/connect/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/connect` - -# Summary -This package contains type definitions for connect (https://github.com/senchalabs/connect). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn). +# Installation +> `npm install --save @types/connect` + +# Summary +This package contains type definitions for connect (https://github.com/senchalabs/connect). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn). diff --git a/node_modules/@types/eslint-scope/README.md b/node_modules/@types/eslint-scope/README.md index d06f926c..cae6d8b2 100644 --- a/node_modules/@types/eslint-scope/README.md +++ b/node_modules/@types/eslint-scope/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/eslint-scope` - -# Summary -This package contains type definitions for eslint-scope (https://github.com/eslint/eslint-scope). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope/index.d.ts) -````ts +# Installation +> `npm install --save @types/eslint-scope` + +# Summary +This package contains type definitions for eslint-scope (https://github.com/eslint/eslint-scope). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope/index.d.ts) +````ts import * as eslint from "eslint"; import * as estree from "estree"; @@ -79,12 +79,12 @@ export interface AnalysisOptions { } export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager; - -```` - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/eslint](https://npmjs.com/package/@types/eslint), [@types/estree](https://npmjs.com/package/@types/estree) - -# Credits -These definitions were written by [Toru Nagashima](https://github.com/mysticatea). + +```` + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: [@types/eslint](https://npmjs.com/package/@types/eslint), [@types/estree](https://npmjs.com/package/@types/estree) + +# Credits +These definitions were written by [Toru Nagashima](https://github.com/mysticatea). diff --git a/node_modules/@types/eslint/README.md b/node_modules/@types/eslint/README.md index bda315c4..db6234db 100644 --- a/node_modules/@types/eslint/README.md +++ b/node_modules/@types/eslint/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/eslint` - -# Summary -This package contains type definitions for eslint (https://eslint.org). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint. - -### Additional Details - * Last updated: Tue, 19 Mar 2024 09:36:07 GMT - * Dependencies: [@types/estree](https://npmjs.com/package/@types/estree), [@types/json-schema](https://npmjs.com/package/@types/json-schema) - -# Credits -These definitions were written by [Pierre-Marie Dartus](https://github.com/pmdartus), [Jed Fox](https://github.com/j-f1), [Saad Quadri](https://github.com/saadq), [Jason Kwok](https://github.com/JasonHK), [Brad Zacher](https://github.com/bradzacher), [JounQin](https://github.com/JounQin), and [Bryan Mishkin](https://github.com/bmish). +# Installation +> `npm install --save @types/eslint` + +# Summary +This package contains type definitions for eslint (https://eslint.org). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint. + +### Additional Details + * Last updated: Tue, 19 Mar 2024 09:36:07 GMT + * Dependencies: [@types/estree](https://npmjs.com/package/@types/estree), [@types/json-schema](https://npmjs.com/package/@types/json-schema) + +# Credits +These definitions were written by [Pierre-Marie Dartus](https://github.com/pmdartus), [Jed Fox](https://github.com/j-f1), [Saad Quadri](https://github.com/saadq), [Jason Kwok](https://github.com/JasonHK), [Brad Zacher](https://github.com/bradzacher), [JounQin](https://github.com/JounQin), and [Bryan Mishkin](https://github.com/bmish). diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md index c9bc4d5f..90732ebf 100644 --- a/node_modules/@types/estree/README.md +++ b/node_modules/@types/estree/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for estree (https://github.com/estree/estree). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: none - -# Credits -These definitions were written by [RReverser](https://github.com/RReverser). +# Installation +> `npm install --save @types/estree` + +# Summary +This package contains type definitions for estree (https://github.com/estree/estree). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: none + +# Credits +These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/node_modules/@types/express-serve-static-core/README.md b/node_modules/@types/express-serve-static-core/README.md index dd23d75e..d6032c35 100644 --- a/node_modules/@types/express-serve-static-core/README.md +++ b/node_modules/@types/express-serve-static-core/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/express-serve-static-core` - -# Summary -This package contains type definitions for express-serve-static-core (http://expressjs.com). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core. - -### Additional Details - * Last updated: Sat, 03 Feb 2024 13:07:19 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send) - -# Credits -These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Sami Jaber](https://github.com/samijaber), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11). +# Installation +> `npm install --save @types/express-serve-static-core` + +# Summary +This package contains type definitions for express-serve-static-core (http://expressjs.com). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core. + +### Additional Details + * Last updated: Sat, 03 Feb 2024 13:07:19 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send) + +# Credits +These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Sami Jaber](https://github.com/samijaber), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11). diff --git a/node_modules/@types/express/README.md b/node_modules/@types/express/README.md index 5b61e258..1e95940a 100644 --- a/node_modules/@types/express/README.md +++ b/node_modules/@types/express/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/express` - -# Summary -This package contains type definitions for express (http://expressjs.com). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:36 GMT - * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static) - -# Credits -These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland). +# Installation +> `npm install --save @types/express` + +# Summary +This package contains type definitions for express (http://expressjs.com). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:36 GMT + * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static) + +# Credits +These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland). diff --git a/node_modules/@types/graceful-fs/README.md b/node_modules/@types/graceful-fs/README.md index b43f9715..0f3ceec2 100644 --- a/node_modules/@types/graceful-fs/README.md +++ b/node_modules/@types/graceful-fs/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/graceful-fs` - -# Summary -This package contains type definitions for graceful-fs (https://github.com/isaacs/node-graceful-fs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graceful-fs. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graceful-fs/index.d.ts) -````ts +# Installation +> `npm install --save @types/graceful-fs` + +# Summary +This package contains type definitions for graceful-fs (https://github.com/isaacs/node-graceful-fs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graceful-fs. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graceful-fs/index.d.ts) +````ts /// export * from "fs"; @@ -20,12 +20,12 @@ export * from "fs"; * @param fsModule The reference to the fs module or an fs-like module. */ export function gracefulify(fsModule: T): T; - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), and [BendingBender](https://github.com/BendingBender). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), and [BendingBender](https://github.com/BendingBender). diff --git a/node_modules/@types/html-minifier-terser/LICENSE b/node_modules/@types/html-minifier-terser/LICENSE old mode 100644 new mode 100755 diff --git a/node_modules/@types/html-minifier-terser/README.md b/node_modules/@types/html-minifier-terser/README.md old mode 100644 new mode 100755 index eadf47cf..08b0e997 --- a/node_modules/@types/html-minifier-terser/README.md +++ b/node_modules/@types/html-minifier-terser/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/html-minifier-terser` - -# Summary -This package contains type definitions for html-minifier-terser (https://github.com/terser/html-minifier-terser#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-minifier-terser. - -### Additional Details - * Last updated: Tue, 23 Nov 2021 21:01:04 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). +# Installation +> `npm install --save @types/html-minifier-terser` + +# Summary +This package contains type definitions for html-minifier-terser (https://github.com/terser/html-minifier-terser#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-minifier-terser. + +### Additional Details + * Last updated: Tue, 23 Nov 2021 21:01:04 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). diff --git a/node_modules/@types/html-minifier-terser/index.d.ts b/node_modules/@types/html-minifier-terser/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/html-minifier-terser/package.json b/node_modules/@types/html-minifier-terser/package.json old mode 100644 new mode 100755 diff --git a/node_modules/@types/http-errors/README.md b/node_modules/@types/http-errors/README.md index 525e2f02..0de54023 100644 --- a/node_modules/@types/http-errors/README.md +++ b/node_modules/@types/http-errors/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/http-errors` - -# Summary -This package contains type definitions for http-errors (https://github.com/jshttp/http-errors). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: none - -# Credits -These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender). +# Installation +> `npm install --save @types/http-errors` + +# Summary +This package contains type definitions for http-errors (https://github.com/jshttp/http-errors). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: none + +# Credits +These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender). diff --git a/node_modules/@types/http-proxy/README.md b/node_modules/@types/http-proxy/README.md index 74a58b30..a8dbabf6 100644 --- a/node_modules/@types/http-proxy/README.md +++ b/node_modules/@types/http-proxy/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/http-proxy` - -# Summary -This package contains type definitions for http-proxy (https://github.com/nodejitsu/node-http-proxy). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-proxy. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Florian Oellerich](https://github.com/Raigen), [Daniel Schmidt](https://github.com/DanielMSchmidt), [Jordan Abreu](https://github.com/jabreu610), and [Samuel Bodin](https://github.com/bodinsamuel). +# Installation +> `npm install --save @types/http-proxy` + +# Summary +This package contains type definitions for http-proxy (https://github.com/nodejitsu/node-http-proxy). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-proxy. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Florian Oellerich](https://github.com/Raigen), [Daniel Schmidt](https://github.com/DanielMSchmidt), [Jordan Abreu](https://github.com/jabreu610), and [Samuel Bodin](https://github.com/bodinsamuel). diff --git a/node_modules/@types/istanbul-lib-coverage/README.md b/node_modules/@types/istanbul-lib-coverage/README.md index d575d2ac..73a62312 100644 --- a/node_modules/@types/istanbul-lib-coverage/README.md +++ b/node_modules/@types/istanbul-lib-coverage/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/istanbul-lib-coverage` - -# Summary -This package contains type definitions for istanbul-lib-coverage (https://istanbul.js.org). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: none - -# Credits -These definitions were written by [Jason Cheatham](https://github.com/jason0x43). +# Installation +> `npm install --save @types/istanbul-lib-coverage` + +# Summary +This package contains type definitions for istanbul-lib-coverage (https://istanbul.js.org). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: none + +# Credits +These definitions were written by [Jason Cheatham](https://github.com/jason0x43). diff --git a/node_modules/@types/istanbul-lib-report/README.md b/node_modules/@types/istanbul-lib-report/README.md index 3c9af87a..26baae19 100644 --- a/node_modules/@types/istanbul-lib-report/README.md +++ b/node_modules/@types/istanbul-lib-report/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/istanbul-lib-report` - -# Summary -This package contains type definitions for istanbul-lib-report (https://istanbul.js.org). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-report. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: [@types/istanbul-lib-coverage](https://npmjs.com/package/@types/istanbul-lib-coverage) - -# Credits -These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Zacharias Björngren](https://github.com/zache). +# Installation +> `npm install --save @types/istanbul-lib-report` + +# Summary +This package contains type definitions for istanbul-lib-report (https://istanbul.js.org). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-report. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: [@types/istanbul-lib-coverage](https://npmjs.com/package/@types/istanbul-lib-coverage) + +# Credits +These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Zacharias Björngren](https://github.com/zache). diff --git a/node_modules/@types/istanbul-reports/README.md b/node_modules/@types/istanbul-reports/README.md index f9182279..8a4946c1 100644 --- a/node_modules/@types/istanbul-reports/README.md +++ b/node_modules/@types/istanbul-reports/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/istanbul-reports` - -# Summary -This package contains type definitions for istanbul-reports (https://github.com/istanbuljs/istanbuljs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports/index.d.ts) -````ts +# Installation +> `npm install --save @types/istanbul-reports` + +# Summary +This package contains type definitions for istanbul-reports (https://github.com/istanbuljs/istanbuljs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports/index.d.ts) +````ts import { Node, ReportBase } from "istanbul-lib-report"; export function create(name: T, options?: Partial): ReportBase; @@ -75,12 +75,12 @@ export interface LinkMapper { relativePath(source: string | Node, target: string | Node): string; assetPath(node: Node, name: string): string; } - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: [@types/istanbul-lib-report](https://npmjs.com/package/@types/istanbul-lib-report) - -# Credits -These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Elena Shcherbakova](https://github.com/not-a-doctor). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: [@types/istanbul-lib-report](https://npmjs.com/package/@types/istanbul-lib-report) + +# Credits +These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Elena Shcherbakova](https://github.com/not-a-doctor). diff --git a/node_modules/@types/jest/README.md b/node_modules/@types/jest/README.md index 1d01347b..cd4e03e9 100644 --- a/node_modules/@types/jest/README.md +++ b/node_modules/@types/jest/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/jest` - -# Summary -This package contains type definitions for jest (https://jestjs.io/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest. - -### Additional Details - * Last updated: Thu, 01 Feb 2024 17:07:05 GMT - * Dependencies: [expect](https://npmjs.com/package/expect), [pretty-format](https://npmjs.com/package/pretty-format) - -# Credits +# Installation +> `npm install --save @types/jest` + +# Summary +This package contains type definitions for jest (https://jestjs.io/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest. + +### Additional Details + * Last updated: Thu, 01 Feb 2024 17:07:05 GMT + * Dependencies: [expect](https://npmjs.com/package/expect), [pretty-format](https://npmjs.com/package/pretty-format) + +# Credits These definitions were written by [Asana (https://asana.com) -// Ivo Stratev](https://github.com/NoHomey), [jwbay](https://github.com/jwbay), [Alexey Svetliakov](https://github.com/asvetliakov), [Alex Jover Morales](https://github.com/alexjoverm), [Allan Lukwago](https://github.com/epicallan), [Ika](https://github.com/ikatyang), [Waseem Dahman](https://github.com/wsmd), [Jamie Mason](https://github.com/JamieMason), [Douglas Duteil](https://github.com/douglasduteil), [Ahn](https://github.com/ahnpnl), [Jeff Lau](https://github.com/UselessPickles), [Andrew Makarov](https://github.com/r3nya), [Martin Hochel](https://github.com/hotell), [Sebastian Sebald](https://github.com/sebald), [Andy](https://github.com/andys8), [Antoine Brault](https://github.com/antoinebrault), [Gregor Stamać](https://github.com/gstamac), [ExE Boss](https://github.com/ExE-Boss), [Alex Bolenok](https://github.com/quassnoi), [Mario Beltrán Alarcón](https://github.com/Belco90), [Tony Hallett](https://github.com/tonyhallett), [Jason Yu](https://github.com/ycmjason), [Pawel Fajfer](https://github.com/pawfa), [Alexandre Germain](https://github.com/gerkindev), [Adam Jones](https://github.com/domdomegg), and [Tom Mrazauskas](https://github.com/mrazauskas). +// Ivo Stratev](https://github.com/NoHomey), [jwbay](https://github.com/jwbay), [Alexey Svetliakov](https://github.com/asvetliakov), [Alex Jover Morales](https://github.com/alexjoverm), [Allan Lukwago](https://github.com/epicallan), [Ika](https://github.com/ikatyang), [Waseem Dahman](https://github.com/wsmd), [Jamie Mason](https://github.com/JamieMason), [Douglas Duteil](https://github.com/douglasduteil), [Ahn](https://github.com/ahnpnl), [Jeff Lau](https://github.com/UselessPickles), [Andrew Makarov](https://github.com/r3nya), [Martin Hochel](https://github.com/hotell), [Sebastian Sebald](https://github.com/sebald), [Andy](https://github.com/andys8), [Antoine Brault](https://github.com/antoinebrault), [Gregor Stamać](https://github.com/gstamac), [ExE Boss](https://github.com/ExE-Boss), [Alex Bolenok](https://github.com/quassnoi), [Mario Beltrán Alarcón](https://github.com/Belco90), [Tony Hallett](https://github.com/tonyhallett), [Jason Yu](https://github.com/ycmjason), [Pawel Fajfer](https://github.com/pawfa), [Alexandre Germain](https://github.com/gerkindev), [Adam Jones](https://github.com/domdomegg), and [Tom Mrazauskas](https://github.com/mrazauskas). diff --git a/node_modules/@types/jest/node_modules/@sinclair/typebox/license b/node_modules/@types/jest/node_modules/@sinclair/typebox/license index 08641fd6..1aa53980 100644 --- a/node_modules/@types/jest/node_modules/@sinclair/typebox/license +++ b/node_modules/@types/jest/node_modules/@sinclair/typebox/license @@ -1,23 +1,23 @@ -TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript - -The MIT License (MIT) - -Copyright (c) 2017-2023 Haydn Paterson (sinclair) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript + +The MIT License (MIT) + +Copyright (c) 2017-2023 Haydn Paterson (sinclair) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@types/jest/node_modules/@sinclair/typebox/package.json b/node_modules/@types/jest/node_modules/@sinclair/typebox/package.json index eeff01d9..fff6589e 100644 --- a/node_modules/@types/jest/node_modules/@sinclair/typebox/package.json +++ b/node_modules/@types/jest/node_modules/@sinclair/typebox/package.json @@ -1,47 +1,47 @@ -{ - "name": "@sinclair/typebox", - "version": "0.27.8", - "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", - "keywords": [ - "typescript", - "json-schema", - "validate", - "typecheck" - ], - "author": "sinclairzx81", - "license": "MIT", - "main": "./typebox.js", - "types": "./typebox.d.ts", - "exports": { - "./compiler": "./compiler/index.js", - "./errors": "./errors/index.js", - "./system": "./system/index.js", - "./value": "./value/index.js", - ".": "./typebox.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/sinclairzx81/typebox" - }, - "scripts": { - "clean": "hammer task clean", - "format": "hammer task format", - "start": "hammer task start", - "test": "hammer task test", - "benchmark": "hammer task benchmark", - "build": "hammer task build", - "publish": "hammer task publish" - }, - "devDependencies": { - "@sinclair/hammer": "^0.17.1", - "@types/chai": "^4.3.3", - "@types/mocha": "^9.1.1", - "@types/node": "^18.11.9", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "chai": "^4.3.6", - "mocha": "^9.2.2", - "prettier": "^2.7.1", - "typescript": "^5.0.2" - } -} +{ + "name": "@sinclair/typebox", + "version": "0.27.8", + "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", + "keywords": [ + "typescript", + "json-schema", + "validate", + "typecheck" + ], + "author": "sinclairzx81", + "license": "MIT", + "main": "./typebox.js", + "types": "./typebox.d.ts", + "exports": { + "./compiler": "./compiler/index.js", + "./errors": "./errors/index.js", + "./system": "./system/index.js", + "./value": "./value/index.js", + ".": "./typebox.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/sinclairzx81/typebox" + }, + "scripts": { + "clean": "hammer task clean", + "format": "hammer task format", + "start": "hammer task start", + "test": "hammer task test", + "benchmark": "hammer task benchmark", + "build": "hammer task build", + "publish": "hammer task publish" + }, + "devDependencies": { + "@sinclair/hammer": "^0.17.1", + "@types/chai": "^4.3.3", + "@types/mocha": "^9.1.1", + "@types/node": "^18.11.9", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "chai": "^4.3.6", + "mocha": "^9.2.2", + "prettier": "^2.7.1", + "typescript": "^5.0.2" + } +} diff --git a/node_modules/@types/jest/node_modules/@sinclair/typebox/readme.md b/node_modules/@types/jest/node_modules/@sinclair/typebox/readme.md index c5120a9d..8e71d68d 100644 --- a/node_modules/@types/jest/node_modules/@sinclair/typebox/readme.md +++ b/node_modules/@types/jest/node_modules/@sinclair/typebox/readme.md @@ -1,1424 +1,1424 @@ -
- -

TypeBox

- -

JSON Schema Type Builder with Static Type Resolution for TypeScript

- - - -
-
- -[![npm version](https://badge.fury.io/js/%40sinclair%2Ftypebox.svg)](https://badge.fury.io/js/%40sinclair%2Ftypebox) -[![Downloads](https://img.shields.io/npm/dm/%40sinclair%2Ftypebox.svg)](https://www.npmjs.com/package/%40sinclair%2Ftypebox) -[![GitHub CI](https://github.com/sinclairzx81/typebox/workflows/GitHub%20CI/badge.svg)](https://github.com/sinclairzx81/typebox/actions) - -
- - - -## Install - -#### Npm -```bash -$ npm install @sinclair/typebox --save -``` - -#### Deno -```typescript -import { Static, Type } from 'npm:@sinclair/typebox' -``` - -#### Esm - -```typescript -import { Static, Type } from 'https://esm.sh/@sinclair/typebox' -``` - -## Example - -```typescript -import { Static, Type } from '@sinclair/typebox' - -const T = Type.Object({ // const T = { - x: Type.Number(), // type: 'object', - y: Type.Number(), // required: ['x', 'y', 'z'], - z: Type.Number() // properties: { -}) // x: { type: 'number' }, - // y: { type: 'number' }, - // z: { type: 'number' } - // } - // } - -type T = Static // type T = { - // x: number, - // y: number, - // z: number - // } -``` - - - - -## Overview - -TypeBox is a runtime type builder that creates in-memory JSON Schema objects that can be statically inferred as TypeScript types. The schemas produced by this library are designed to match the static type assertion rules of the TypeScript compiler. TypeBox enables one to create a unified type that can be statically checked by TypeScript and runtime asserted using standard JSON Schema validation. - -This library is designed to enable JSON schema to compose with the same flexibility as TypeScript's type system. It can be used as a simple tool to build up complex schemas or integrated into REST or RPC services to help validate data received over the wire. - -License MIT - -## Contents -- [Install](#install) -- [Overview](#overview) -- [Usage](#usage) -- [Types](#types) - - [Standard](#types-standard) - - [Extended](#types-extended) - - [Modifiers](#types-modifiers) - - [Options](#types-options) - - [Generics](#types-generics) - - [References](#types-references) - - [Recursive](#types-recursive) - - [Conditional](#types-conditional) - - [Template Literal](#types-template-literal) - - [Guards](#types-guards) - - [Unsafe](#types-unsafe) - - [Strict](#types-strict) -- [Values](#values) - - [Create](#values-create) - - [Clone](#values-clone) - - [Check](#values-check) - - [Convert](#values-convert) - - [Cast](#values-cast) - - [Equal](#values-equal) - - [Hash](#values-hash) - - [Diff](#values-diff) - - [Patch](#values-patch) - - [Errors](#values-errors) - - [Mutate](#values-mutate) - - [Pointer](#values-pointer) -- [TypeCheck](#typecheck) - - [Ajv](#typecheck-ajv) - - [TypeCompiler](#typecheck-typecompiler) -- [TypeSystem](#typesystem) - - [Types](#typesystem-types) - - [Formats](#typesystem-formats) - - [Policies](#typesystem-policies) -- [Benchmark](#benchmark) - - [Compile](#benchmark-compile) - - [Validate](#benchmark-validate) - - [Compression](#benchmark-compression) -- [Contribute](#contribute) - - - -## Usage - -The following shows general usage. - -```typescript -import { Static, Type } from '@sinclair/typebox' - -//-------------------------------------------------------------------------------------------- -// -// Let's say you have the following type ... -// -//-------------------------------------------------------------------------------------------- - -type T = { - id: string, - name: string, - timestamp: number -} - -//-------------------------------------------------------------------------------------------- -// -// ... you can express this type in the following way. -// -//-------------------------------------------------------------------------------------------- - -const T = Type.Object({ // const T = { - id: Type.String(), // type: 'object', - name: Type.String(), // properties: { - timestamp: Type.Integer() // id: { -}) // type: 'string' - // }, - // name: { - // type: 'string' - // }, - // timestamp: { - // type: 'integer' - // } - // }, - // required: [ - // 'id', - // 'name', - // 'timestamp' - // ] - // } - -//-------------------------------------------------------------------------------------------- -// -// ... then infer back to the original static type this way. -// -//-------------------------------------------------------------------------------------------- - -type T = Static // type T = { - // id: string, - // name: string, - // timestamp: number - // } - -//-------------------------------------------------------------------------------------------- -// -// ... then use the type both as JSON schema and as a TypeScript type. -// -//-------------------------------------------------------------------------------------------- - -import { Value } from '@sinclair/typebox/value' - -function receive(value: T) { // ... as a Static Type - - if(Value.Check(T, value)) { // ... as a JSON Schema - - // ok... - } -} -``` - - - -## Types - -TypeBox types are JSON schema fragments that can be composed into more complex types. Each fragment is structured such that a JSON schema compliant validator can runtime assert a value the same way TypeScript will statically assert a type. TypeBox provides a set of Standard types which are used create JSON schema compliant schematics as well as an Extended type set used to create schematics for constructs native to JavaScript. - - - -### Standard Types - -The following table lists the Standard TypeBox types. These types are fully compatible with the JSON Schema Draft 6 specification. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ JSON Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Any() │ type T = any │ const T = { } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Unknown() │ type T = unknown │ const T = { } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.String() │ type T = string │ const T = { │ -│ │ │ type: 'string' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Number() │ type T = number │ const T = { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Integer() │ type T = number │ const T = { │ -│ │ │ type: 'integer' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Boolean() │ type T = boolean │ const T = { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Null() │ type T = null │ const T = { │ -│ │ │ type: 'null' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Literal(42) │ type T = 42 │ const T = { │ -│ │ │ const: 42, │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Array( │ type T = number[] │ const T = { │ -│ Type.Number() │ │ type: 'array', │ -│ ) │ │ items: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ x: Type.Number(), │ x: number, │ type: 'object', │ -│ y: Type.Number() │ y: number │ required: ['x', 'y'], │ -│ }) │ } │ properties: { │ -│ │ │ x: { │ -│ │ │ type: 'number' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │ -│ Type.Number(), │ │ type: 'array', │ -│ Type.Number() │ │ items: [{ │ -│ ]) │ │ type: 'number' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ additionalItems: false, │ -│ │ │ minItems: 2, │ -│ │ │ maxItems: 2 │ -│ │ │ } │ -│ │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ enum Foo { │ enum Foo { │ const T = { │ -│ A, │ A, │ anyOf: [{ │ -│ B │ B │ type: 'number', │ -│ } │ } │ const: 0 │ -│ │ │ }, { │ -│ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │ -│ │ │ const: 1 │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.KeyOf( │ type T = keyof { │ const T = { │ -│ Type.Object({ │ x: number, │ anyOf: [{ │ -│ x: Type.Number(), │ y: number │ type: 'string', │ -│ y: Type.Number() │ } │ const: 'x' │ -│ }) │ │ }, { │ -│ ) │ │ type: 'string', │ -│ │ │ const: 'y' │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Union([ │ type T = string | number │ const T = { │ -│ Type.String(), │ │ anyOf: [{ │ -│ Type.Number() │ │ type: 'string' │ -│ ]) │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Intersect([ │ type T = { │ const T = { │ -│ Type.Object({ │ x: number │ allOf: [{ │ -│ x: Type.Number() │ } & { │ type: 'object', │ -│ }), │ y: number │ required: ['x'], │ -│ Type.Object({ │ } │ properties: { │ -│ y: Type.Number() │ │ x: { │ -│ ]) │ │ type: 'number' │ -│ ]) │ │ } │ -│ │ │ } │ -│ │ │ }, { │ -│ │ │ type: 'object', | -│ │ │ required: ['y'], │ -│ │ │ properties: { │ -│ │ │ y: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Composite([ │ type I = { │ const T = { │ -│ Type.Object({ │ x: number │ type: 'object', │ -│ x: Type.Number() │ } & { │ required: ['x', 'y'], │ -│ }), │ y: number │ properties: { │ -│ Type.Object({ │ } │ x: { │ -│ y: Type.Number() │ │ type: 'number' │ -│ }) │ type T = { │ }, │ -│ ]) │ [K in keyof I]: I[K] │ y: { │ -│ │ } │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Never() │ type T = never │ const T = { │ -│ │ │ not: {} │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Not( | type T = string │ const T = { │ -| Type.Union([ │ │ allOf: [{ │ -│ Type.Literal('x'), │ │ not: { │ -│ Type.Literal('y'), │ │ anyOf: [ │ -│ Type.Literal('z') │ │ { const: 'x' }, │ -│ ]), │ │ { const: 'y' }, │ -│ Type.String() │ │ { const: 'z' } │ -│ ) │ │ ] │ -│ │ │ } │ -│ │ │ }, { │ -│ │ │ type: 'string' │ -│ │ │ }] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Extends( │ type T = │ const T = { │ -│ Type.String(), │ string extends number │ const: false, │ -│ Type.Number(), │ true : false │ type: 'boolean' │ -│ Type.Literal(true), │ │ } │ -│ Type.Literal(false) │ │ │ -│ ) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Extract( │ type T = Extract< │ const T = { │ -│ Type.Union([ │ string | number, │ type: 'string' │ -│ Type.String(), │ string │ } │ -│ Type.Number(), │ > │ │ -│ ]), │ │ │ -│ Type.String() │ │ │ -│ ) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Exclude( │ type T = Exclude< │ const T = { │ -│ Type.Union([ │ string | number, │ type: 'number' │ -│ Type.String(), │ string │ } │ -│ Type.Number(), │ > │ │ -│ ]), │ │ │ -│ Type.String() │ │ │ -│ ) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const U = Type.Union([ │ type U = 'open' | 'close' │ const T = { │ -│ Type.Literal('open'), │ │ type: 'string', │ -│ Type.Literal('close') │ type T = `on${U}` │ pattern: '^on(open|close)$' │ -│ ]) │ │ } │ -│ │ │ │ -│ const T = Type │ │ │ -│ .TemplateLiteral([ │ │ │ -│ Type.Literal('on'), │ │ │ -│ U │ │ │ -│ ]) │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Record( │ type T = Record< │ const T = { │ -│ Type.String(), │ string, │ type: 'object', │ -│ Type.Number() │ number │ patternProperties: { │ -│ ) │ > │ '^.*$': { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Partial( │ type T = Partial<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ properties: { │ -│ y: Type.Number() | }> │ x: { │ -│ }) │ │ type: 'number' │ -│ ) │ │ }, │ -│ │ │ y: { │ -│ │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Required( │ type T = Required<{ │ const T = { │ -│ Type.Object({ │ x?: number, │ type: 'object', │ -│ x: Type.Optional( │ y?: number │ required: ['x', 'y'], │ -│ Type.Number() | }> │ properties: { │ -│ ), │ │ x: { │ -│ y: Type.Optional( │ │ type: 'number' │ -│ Type.Number() │ │ }, │ -│ ) │ │ y: { │ -│ }) │ │ type: 'number' │ -│ ) │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Pick( │ type T = Pick<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ required: ['x'], │ -│ y: Type.Number() │ }, 'x'> │ properties: { │ -│ }), ['x'] | │ x: { │ -│ ) │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Omit( │ type T = Omit<{ │ const T = { │ -│ Type.Object({ │ x: number, │ type: 'object', │ -│ x: Type.Number(), │ y: number │ required: ['y'], │ -│ y: Type.Number() │ }, 'x'> │ properties: { │ -│ }), ['x'] | │ y: { │ -│ ) │ │ type: 'number' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const R = { │ -│ x: Type.Number(), │ x: number, │ $ref: 'T' │ -│ y: Type.Number() │ y: number │ } │ -│ }, { $id: 'T' }) | } │ │ -│ │ │ │ -│ const R = Type.Ref(T) │ type R = T │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Extended Types - -TypeBox provides several extended types that can be used to produce schematics for common JavaScript constructs. These types can not be used with standard JSON schema validators; but are useful to help frame schematics for RPC interfaces that may receive JSON validated data. Extended types are prefixed with the `[Extended]` doc comment for convenience. The following table lists the supported types. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ Extended Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Constructor([ │ type T = new ( │ const T = { │ -│ Type.String(), │ arg0: string, │ type: 'object', │ -│ Type.Number() │ arg1: number │ instanceOf: 'Constructor', │ -│ ], Type.Boolean()) │ ) => boolean │ parameters: [{ │ -│ │ │ type: 'string' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ return: { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Function([ │ type T = ( │ const T = { │ -| Type.String(), │ arg0: string, │ type : 'object', │ -│ Type.Number() │ arg1: number │ instanceOf: 'Function', │ -│ ], Type.Boolean()) │ ) => boolean │ parameters: [{ │ -│ │ │ type: 'string' │ -│ │ │ }, { │ -│ │ │ type: 'number' │ -│ │ │ }], │ -│ │ │ return: { │ -│ │ │ type: 'boolean' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Promise( │ type T = Promise │ const T = { │ -│ Type.String() │ │ type: 'object', │ -│ ) │ │ instanceOf: 'Promise', │ -│ │ │ item: { │ -│ │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │ -│ │ │ type: 'object', │ -│ │ │ instanceOf: 'Uint8Array' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Date() │ type T = Date │ const T = { │ -│ │ │ type: 'object', │ -│ │ │ instanceOf: 'Date' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Undefined() │ type T = undefined │ const T = { │ -│ │ │ type: 'null', │ -│ │ │ typeOf: 'Undefined' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.RegEx(/foo/) │ type T = string │ const T = { │ -│ │ │ type: 'string', │ -│ │ │ pattern: 'foo' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Symbol() │ type T = symbol │ const T = { │ -│ │ │ type: 'null', │ -│ │ │ typeOf: 'Symbol' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.BigInt() │ type T = bigint │ const T = { │ -│ │ │ type: 'null', │ -│ │ │ typeOf: 'BigInt' │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Void() │ type T = void │ const T = { │ -│ │ │ type: 'null' │ -│ │ │ typeOf: 'Void' │ -│ │ │ } │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Modifiers - -TypeBox provides modifiers that allow schema properties to be statically inferred as `readonly` or `optional`. The following table shows the supported modifiers and how they map between TypeScript and JSON Schema. - -```typescript -┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠-│ TypeBox │ TypeScript │ JSON Schema │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.Optional( │ name?: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.Readonly( │ readonly name: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ }, │ -│ │ │ required: ['name'] │ -│ │ │ } │ -│ │ │ │ -├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Object({ │ type T = { │ const T = { │ -│ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │ -│ Type.String() │ } │ properties: { │ -│ ) │ │ name: { │ -│ }) │ │ type: 'string' │ -│ │ │ } │ -│ │ │ } │ -│ │ │ } │ -│ │ │ │ -└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ -``` - - - -### Options - -You can pass JSON Schema options on the last argument of any type. Option hints specific to each type are provided for convenience. - -```typescript -// String must be an email -const T = Type.String({ // const T = { - format: 'email' // type: 'string', -}) // format: 'email' - // } - -// Mumber must be a multiple of 2 -const T = Type.Number({ // const T = { - multipleOf: 2 // type: 'number', -}) // multipleOf: 2 - // } - -// Array must have at least 5 integer values -const T = Type.Array(Type.Integer(), { // const T = { - minItems: 5 // type: 'array', -}) // minItems: 5, - // items: { - // type: 'integer' - // } - // } - -``` - - - -### Generic Types - -Generic types can be created with generic functions constrained to type `TSchema`. The following creates a generic `Vector` type. - -```typescript -import { Type, Static, TSchema } from '@sinclair/typebox' - -const Vector = (t: T) => Type.Object({ x: t, y: t, z: t }) - -const NumberVector = Vector(Type.Number()) // const NumberVector = { - // type: 'object', - // required: ['x', 'y', 'z'], - // properties: { - // x: { type: 'number' }, - // y: { type: 'number' }, - // z: { type: 'number' } - // } - // } - -type NumberVector = Static // type NumberVector = { - // x: number, - // y: number, - // z: number - // } - -const BooleanVector = Vector(Type.Boolean()) // const BooleanVector = { - // type: 'object', - // required: ['x', 'y', 'z'], - // properties: { - // x: { type: 'boolean' }, - // y: { type: 'boolean' }, - // z: { type: 'boolean' } - // } - // } - -type BooleanVector = Static // type BooleanVector = { - // x: boolean, - // y: boolean, - // z: boolean - // } -``` - -The following creates a generic `Nullable` type. - -```typescript -const Nullable = (schema: T) => Type.Union([schema, Type.Null()]) - -const T = Nullable(Type.String()) // const T = { - // anyOf: [ - // { type: 'string' }, - // { type: 'null' } - // ] - // } - -type T = Static // type T = string | null -``` - - - -### Reference Types - -Reference types are supported with `Type.Ref`. The target type must specify a valid `$id`. - -```typescript -const T = Type.String({ $id: 'T' }) // const T = { - // $id: 'T', - // type: 'string' - // } - -const R = Type.Ref(T) // const R = { - // $ref: 'T' - // } -``` - - - -### Recursive Types - -Recursive types are supported with `Type.Recursive` - -```typescript -const Node = Type.Recursive(Node => Type.Object({ // const Node = { - id: Type.String(), // $id: 'Node', - nodes: Type.Array(Node) // type: 'object', -}), { $id: 'Node' }) // properties: { - // id: { - // type: 'string' - // }, - // nodes: { - // type: 'array', - // items: { - // $ref: 'Node' - // } - // } - // }, - // required: [ - // 'id', - // 'nodes' - // ] - // } - -type Node = Static // type Node = { - // id: string - // nodes: Node[] - // } - -function test(node: Node) { - const id = node.nodes[0].nodes[0].id // id is string -} -``` - - - -### Conditional Types - -Conditional types are supported with `Type.Extends`, `Type.Exclude` and `Type.Extract` - -```typescript -// TypeScript - -type T0 = string extends number ? true : false // type T0 = false - -type T1 = Extract // type T1 = number - -type T2 = Exclude // type T2 = string - -// TypeBox - -const T0 = Type.Extends(Type.String(), Type.Number(), Type.Literal(true), Type.Literal(false)) - -const T1 = Type.Extract(Type.Union([Type.String(), Type.Number()]), Type.Number()) - -const T2 = Type.Exclude(Type.Union([Type.String(), Type.Number()]), Type.Number()) - - -type T0 = Static // type T0 = false - -type T1 = Static // type T1 = number - -type T2 = Static // type T2 = string -``` - - - -### Template Literal Types - -Template Literal types are supported with `Type.TemplateLiteral` - -```typescript -// TypeScript - -type T = `option${'A'|'B'}` // type T = 'optionA' | 'optionB' - -type R = Record // type R = { - // optionA: string - // optionB: string - // } - -// TypeBox - -const T = Type.TemplateLiteral([ // const T = { - Type.Literal('option'), // pattern: '^option(A|B)$', - Type.Union([ // type: 'string' - Type.Literal('A'), // } - Type.Literal('B') - ]) -]) - -const R = Type.Record(T, Type.String()) // const R = { - // type: 'object', - // required: ['optionA', 'optionB'], - // properties: { - // optionA: { - // type: 'string' - // }, - // optionB: { - // type: 'string' - // } - // } - // } - -type T = Static // type T = 'optionA' | 'optionB' - -type R = Static // type R = { - // optionA: string - // optionB: string - // } -``` - - - -### Unsafe - -Use `Type.Unsafe` to create custom schematics with user defined inference rules. - -```typescript -const T = Type.Unsafe({ type: 'number' }) // const T = { - // type: 'number' - // } - -type T = Static // type T = string -``` - -The `Type.Unsafe` type can be useful to express specific OpenAPI schema representations. - -```typescript -import { Type, Static, TSchema } from '@sinclair/typebox' - -// Nullable - -function Nullable(schema: T) { - return Type.Unsafe | null>({ ...schema, nullable: true }) -} - -const T = Nullable(Type.String()) // const T = { - // type: 'string', - // nullable: true - // } - -type T = Static // type T = string | null - -// StringEnum - -function StringEnum(values: [...T]) { - return Type.Unsafe({ type: 'string', enum: values }) -} - -const T = StringEnum(['A', 'B', 'C']) // const T = { - // enum: ['A', 'B', 'C'] - // } - -type T = Static // type T = 'A' | 'B' | 'C' -``` - - - -### Guards - -TypeBox provides a `TypeGuard` module that can be used for reflection and asserting values as types. - -```typescript -import { Type, TypeGuard } from '@sinclair/typebox' - -const T = Type.String() - -if(TypeGuard.TString(T)) { - - // T is TString -} -``` - - - -### Strict - -TypeBox schemas contain the `Kind` and `Modifier` symbol properties. These properties are used for type composition and reflection. These properties are not strictly valid JSON schema; so in some cases it may be desirable to omit them. TypeBox provides a `Type.Strict` function that will omit these properties if necessary. - -```typescript -const T = Type.Object({ // const T = { - name: Type.Optional(Type.String()) // [Kind]: 'Object', -}) // type: 'object', - // properties: { - // name: { - // [Kind]: 'String', - // type: 'string', - // [Modifier]: 'Optional' - // } - // } - // } - -const U = Type.Strict(T) // const U = { - // type: 'object', - // properties: { - // name: { - // type: 'string' - // } - // } - // } -``` - - - -## Values - -TypeBox provides an optional utility module that can be used to perform common operations on JavaScript values. This module includes functionality to create, check and cast values from types as well as check equality, clone, diff and patch JavaScript values. This module is provided via optional import. - -```typescript -import { Value } from '@sinclair/typebox/value' -``` - - - -### Create - -Use the Create function to create a value from a type. TypeBox will use default values if specified. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) }) - -const A = Value.Create(T) // const A = { x: 0, y: 42 } -``` - - - -### Clone - -Use the Clone function to deeply clone a value - -```typescript -const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 } -``` - - - -### Check - -Use the Check function to type check a value - -```typescript -const T = Type.Object({ x: Type.Number() }) - -const R = Value.Check(T, { x: 1 }) // const R = true -``` - - - -### Convert - -Use the Convert function to convert a value into its target type if a reasonable conversion is possible. - -```typescript -const T = Type.Object({ x: Type.Number() }) - -const R1 = Value.Convert(T, { x: '3.14' }) // const R1 = { x: 3.14 } - -const R2 = Value.Convert(T, { x: 'not a number' }) // const R2 = { x: 'not a number' } -``` - - - -### Cast - -Use the Cast function to cast a value into a type. The cast function will retain as much information as possible from the original value. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false }) - -const X = Value.Cast(T, null) // const X = { x: 0, y: 0 } - -const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 } - -const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 } -``` - - - -### Equal - -Use the Equal function to deeply check for value equality. - -```typescript -const R = Value.Equal( // const R = true - { x: 1, y: 2, z: 3 }, - { x: 1, y: 2, z: 3 } -) -``` - - - -### Hash - -Use the Hash function to create a [FNV1A-64](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non cryptographic hash of a value. - -```typescript -const A = Value.Hash({ x: 1, y: 2, z: 3 }) // const A = 2910466848807138541n - -const B = Value.Hash({ x: 1, y: 4, z: 3 }) // const B = 1418369778807423581n -``` - - - -### Diff - -Use the Diff function to produce a sequence of edits to transform one value into another. - -```typescript -const E = Value.Diff( // const E = [ - { x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 }, - { y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 }, -) // { type: 'insert', path: '/w', value: 6 }, - // { type: 'delete', path: '/x' } - // ] -``` - - - -### Patch - -Use the Patch function to apply edits - -```typescript -const A = { x: 1, y: 2 } - -const B = { x: 3 } - -const E = Value.Diff(A, B) // const E = [ - // { type: 'update', path: '/x', value: 3 }, - // { type: 'delete', path: '/y' } - // ] - -const C = Value.Patch(A, E) // const C = { x: 3 } -``` - - - -### Errors - -Use the Errors function enumerate validation errors. - -```typescript -const T = Type.Object({ x: Type.Number(), y: Type.Number() }) - -const R = [...Value.Errors(T, { x: '42' })] // const R = [{ - // schema: { type: 'number' }, - // path: '/x', - // value: '42', - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/y', - // value: undefined, - // message: 'Expected number' - // }] -``` - - - -### Mutate - -Use the Mutate function to perform a deep mutable value assignment while retaining internal references. - -```typescript -const Y = { z: 1 } // const Y = { z: 1 } - -const X = { y: Y } // const X = { y: { z: 1 } } - -const A = { x: X } // const A = { x: { y: { z: 1 } } } - - -Value.Mutate(A, { x: { y: { z: 2 } } }) // const A' = { x: { y: { z: 2 } } } - -const R0 = A.x.y.z === 2 // const R0 = 2 - -const R1 = A.x.y === Y // const R1 = true - -const R2 = A.x === X // const R2 = true -``` - - - -### Pointer - -Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) JSON Pointers. - -```typescript -import { ValuePointer } from '@sinclair/typebox/value' - -const A = { x: 0, y: 0, z: 0 } - -ValuePointer.Set(A, '/x', 1) // const A' = { x: 1, y: 0, z: 0 } - -ValuePointer.Set(A, '/y', 1) // const A' = { x: 1, y: 1, z: 0 } - -ValuePointer.Set(A, '/z', 1) // const A' = { x: 1, y: 1, z: 1 } -``` - - - -## TypeCheck - -TypeBox types target JSON Schema draft 6 so are compatible with any validator that supports this specification. TypeBox also provides a built in type checking compiler designed specifically for high performance compilation and value assertion. - -The following sections detail using Ajv and TypeBox's compiler infrastructure. - - - -## Ajv - -The following shows the recommended setup for Ajv. - -```bash -$ npm install ajv ajv-formats --save -``` - -```typescript -import { Type } from '@sinclair/typebox' -import addFormats from 'ajv-formats' -import Ajv from 'ajv' - -const ajv = addFormats(new Ajv({}), [ - 'date-time', - 'time', - 'date', - 'email', - 'hostname', - 'ipv4', - 'ipv6', - 'uri', - 'uri-reference', - 'uuid', - 'uri-template', - 'json-pointer', - 'relative-json-pointer', - 'regex' -]) - -const C = ajv.compile(Type.Object({ - x: Type.Number(), - y: Type.Number(), - z: Type.Number() -})) - -const R = C({ x: 1, y: 2, z: 3 }) // const R = true -``` - - - -### TypeCompiler - -The TypeBox TypeCompiler is a high performance JIT compiler that transforms TypeBox types into optimized JavaScript validation routines. The compiler is tuned for fast compilation as well as fast value assertion. It is designed to serve as a validation backend that can be integrated into larger applications; but can also be used as a general purpose validator. - -The TypeCompiler is provided as an optional import. - -```typescript -import { TypeCompiler } from '@sinclair/typebox/compiler' -``` - -Use the `Compile(...)` function to compile a type. - -```typescript -const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> - -const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true -``` - -Use the `Errors(...)` function to produce diagnostic errors for a value. The `Errors(...)` function will return an iterator that if enumerated; will perform an exhaustive check across the entire value and yield any error found. For performance, this function should only be called after failed `Check(...)`. Applications may also choose to yield only the first value to avoid exhaustive error generation. - -```typescript -const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> - -const value = { } - -const errors = [...C.Errors(value)] // const errors = [{ - // schema: { type: 'number' }, - // path: '/x', - // value: undefined, - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/y', - // value: undefined, - // message: 'Expected number' - // }, { - // schema: { type: 'number' }, - // path: '/z', - // value: undefined, - // message: 'Expected number' - // }] -``` - -Compiled routines can be inspected with the `.Code()` function. - -```typescript -const C = TypeCompiler.Compile(Type.String()) // const C: TypeCheck - -console.log(C.Code()) // return function check(value) { - // return ( - // (typeof value === 'string') - // ) - // } -``` - - - -## TypeSystem - -The TypeBox TypeSystem module provides functionality to define types above and beyond the Standard and Extended type sets as well as control various assertion polices. Configurations made to the TypeSystem module are observed by both `TypeCompiler` and `Value` modules. - -The TypeSystem module is provided as an optional import. - -```typescript -import { TypeSystem } from '@sinclair/typebox/system' -``` - - - -### Types - -Use the `Type(...)` function to create a custom type. This function will return a type factory function that can be used to construct the type. The following creates a Point type. - -```typescript -type PointOptions = { } // The Type Options - -type PointType = { x: number, y: number } // The Static Type - -const Point = TypeSystem.Type('Point', (options, value) => { - return ( - typeof value === 'object' && value !== null && - typeof value.x === 'number' && - typeof value.y === 'number' - ) -}) - -const T = Point() - -type T = Static // type T = { x: number, y: number } - -const R = Value.Check(T, { x: 1, y: 2 }) // const R = true -``` - - - -### Formats - -Use the `Format(...)` function to create a custom string format. The following creates a format that checks for lowercase strings. - -```typescript -TypeSystem.Format('lowercase', value => value === value.toLowerCase()) // format should be lowercase - -const T = Type.String({ format: 'lowercase' }) - -const A = Value.Check(T, 'Hello') // const A = false - -const B = Value.Check(T, 'hello') // const B = true -``` - - - -### Policies - -TypeBox validates using JSON Schema assertion policies by default. It is possible to override these policies and have TypeBox assert using TypeScript policies. The following overrides are available. - -```typescript -// Allow arrays to validate as object types (default is false) -// -// const A: {} = [] - allowed in TS - -TypeSystem.AllowArrayObjects = true - -// Allow numeric values to be NaN or + or - Infinity (default is false) -// -// const A: number = NaN - allowed in TS - -TypeSystem.AllowNaN = true -``` - - - -## Benchmark - -This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.12.0. - -For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/). - - - -### Compile - -This benchmark measures compilation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/compile.ts). - -```typescript -┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┠-│ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │ -├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┤ -│ Literal_String │ 1000 │ ' 257 ms' │ ' 8 ms' │ ' 32.13 x' │ -│ Literal_Number │ 1000 │ ' 203 ms' │ ' 4 ms' │ ' 50.75 x' │ -│ Literal_Boolean │ 1000 │ ' 183 ms' │ ' 4 ms' │ ' 45.75 x' │ -│ Primitive_Number │ 1000 │ ' 174 ms' │ ' 8 ms' │ ' 21.75 x' │ -│ Primitive_String │ 1000 │ ' 158 ms' │ ' 9 ms' │ ' 17.56 x' │ -│ Primitive_String_Pattern │ 1000 │ ' 213 ms' │ ' 13 ms' │ ' 16.38 x' │ -│ Primitive_Boolean │ 1000 │ ' 136 ms' │ ' 6 ms' │ ' 22.67 x' │ -│ Primitive_Null │ 1000 │ ' 144 ms' │ ' 6 ms' │ ' 24.00 x' │ -│ Object_Unconstrained │ 1000 │ ' 1176 ms' │ ' 38 ms' │ ' 30.95 x' │ -│ Object_Constrained │ 1000 │ ' 1181 ms' │ ' 31 ms' │ ' 38.10 x' │ -│ Object_Vector3 │ 1000 │ ' 387 ms' │ ' 8 ms' │ ' 48.38 x' │ -│ Object_Box3D │ 1000 │ ' 1693 ms' │ ' 25 ms' │ ' 67.72 x' │ -│ Tuple_Primitive │ 1000 │ ' 470 ms' │ ' 15 ms' │ ' 31.33 x' │ -│ Tuple_Object │ 1000 │ ' 1206 ms' │ ' 17 ms' │ ' 70.94 x' │ -│ Composite_Intersect │ 1000 │ ' 567 ms' │ ' 20 ms' │ ' 28.35 x' │ -│ Composite_Union │ 1000 │ ' 515 ms' │ ' 21 ms' │ ' 24.52 x' │ -│ Math_Vector4 │ 1000 │ ' 787 ms' │ ' 10 ms' │ ' 78.70 x' │ -│ Math_Matrix4 │ 1000 │ ' 386 ms' │ ' 8 ms' │ ' 48.25 x' │ -│ Array_Primitive_Number │ 1000 │ ' 349 ms' │ ' 7 ms' │ ' 49.86 x' │ -│ Array_Primitive_String │ 1000 │ ' 336 ms' │ ' 4 ms' │ ' 84.00 x' │ -│ Array_Primitive_Boolean │ 1000 │ ' 284 ms' │ ' 3 ms' │ ' 94.67 x' │ -│ Array_Object_Unconstrained │ 1000 │ ' 1704 ms' │ ' 19 ms' │ ' 89.68 x' │ -│ Array_Object_Constrained │ 1000 │ ' 1456 ms' │ ' 18 ms' │ ' 80.89 x' │ -│ Array_Tuple_Primitive │ 1000 │ ' 792 ms' │ ' 15 ms' │ ' 52.80 x' │ -│ Array_Tuple_Object │ 1000 │ ' 1552 ms' │ ' 17 ms' │ ' 91.29 x' │ -│ Array_Composite_Intersect │ 1000 │ ' 744 ms' │ ' 18 ms' │ ' 41.33 x' │ -│ Array_Composite_Union │ 1000 │ ' 783 ms' │ ' 15 ms' │ ' 52.20 x' │ -│ Array_Math_Vector4 │ 1000 │ ' 1093 ms' │ ' 14 ms' │ ' 78.07 x' │ -│ Array_Math_Matrix4 │ 1000 │ ' 684 ms' │ ' 6 ms' │ ' 114.00 x' │ -└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┘ -``` - - - -### Validate - -This benchmark measures validation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/check.ts). - -```typescript -┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┠-│ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │ -├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤ -│ Literal_String │ 1000000 │ ' 27 ms' │ ' 6 ms' │ ' 5 ms' │ ' 1.20 x' │ -│ Literal_Number │ 1000000 │ ' 23 ms' │ ' 21 ms' │ ' 11 ms' │ ' 1.91 x' │ -│ Literal_Boolean │ 1000000 │ ' 21 ms' │ ' 20 ms' │ ' 10 ms' │ ' 2.00 x' │ -│ Primitive_Number │ 1000000 │ ' 26 ms' │ ' 19 ms' │ ' 11 ms' │ ' 1.73 x' │ -│ Primitive_String │ 1000000 │ ' 25 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ -│ Primitive_String_Pattern │ 1000000 │ ' 155 ms' │ ' 49 ms' │ ' 43 ms' │ ' 1.14 x' │ -│ Primitive_Boolean │ 1000000 │ ' 23 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ -│ Primitive_Null │ 1000000 │ ' 24 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ -│ Object_Unconstrained │ 1000000 │ ' 804 ms' │ ' 35 ms' │ ' 28 ms' │ ' 1.25 x' │ -│ Object_Constrained │ 1000000 │ ' 1041 ms' │ ' 55 ms' │ ' 41 ms' │ ' 1.34 x' │ -│ Object_Vector3 │ 1000000 │ ' 380 ms' │ ' 26 ms' │ ' 20 ms' │ ' 1.30 x' │ -│ Object_Box3D │ 1000000 │ ' 1785 ms' │ ' 65 ms' │ ' 52 ms' │ ' 1.25 x' │ -│ Object_Recursive │ 1000000 │ ' 4984 ms' │ ' 396 ms' │ ' 114 ms' │ ' 3.47 x' │ -│ Tuple_Primitive │ 1000000 │ ' 168 ms' │ ' 24 ms' │ ' 16 ms' │ ' 1.50 x' │ -│ Tuple_Object │ 1000000 │ ' 673 ms' │ ' 30 ms' │ ' 26 ms' │ ' 1.15 x' │ -│ Composite_Intersect │ 1000000 │ ' 751 ms' │ ' 28 ms' │ ' 20 ms' │ ' 1.40 x' │ -│ Composite_Union │ 1000000 │ ' 489 ms' │ ' 24 ms' │ ' 16 ms' │ ' 1.50 x' │ -│ Math_Vector4 │ 1000000 │ ' 259 ms' │ ' 23 ms' │ ' 13 ms' │ ' 1.77 x' │ -│ Math_Matrix4 │ 1000000 │ ' 1002 ms' │ ' 40 ms' │ ' 30 ms' │ ' 1.33 x' │ -│ Array_Primitive_Number │ 1000000 │ ' 252 ms' │ ' 22 ms' │ ' 15 ms' │ ' 1.47 x' │ -│ Array_Primitive_String │ 1000000 │ ' 227 ms' │ ' 22 ms' │ ' 18 ms' │ ' 1.22 x' │ -│ Array_Primitive_Boolean │ 1000000 │ ' 150 ms' │ ' 23 ms' │ ' 22 ms' │ ' 1.05 x' │ -│ Array_Object_Unconstrained │ 1000000 │ ' 4754 ms' │ ' 71 ms' │ ' 64 ms' │ ' 1.11 x' │ -│ Array_Object_Constrained │ 1000000 │ ' 4787 ms' │ ' 142 ms' │ ' 123 ms' │ ' 1.15 x' │ -│ Array_Object_Recursive │ 1000000 │ ' 19088 ms' │ ' 1735 ms' │ ' 314 ms' │ ' 5.53 x' │ -│ Array_Tuple_Primitive │ 1000000 │ ' 650 ms' │ ' 41 ms' │ ' 31 ms' │ ' 1.32 x' │ -│ Array_Tuple_Object │ 1000000 │ ' 2770 ms' │ ' 67 ms' │ ' 55 ms' │ ' 1.22 x' │ -│ Array_Composite_Intersect │ 1000000 │ ' 2693 ms' │ ' 50 ms' │ ' 39 ms' │ ' 1.28 x' │ -│ Array_Composite_Union │ 1000000 │ ' 1982 ms' │ ' 72 ms' │ ' 33 ms' │ ' 2.18 x' │ -│ Array_Math_Vector4 │ 1000000 │ ' 1068 ms' │ ' 40 ms' │ ' 26 ms' │ ' 1.54 x' │ -│ Array_Math_Matrix4 │ 1000000 │ ' 4609 ms' │ ' 115 ms' │ ' 88 ms' │ ' 1.31 x' │ -└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘ -``` - - - -### Compression - -The following table lists esbuild compiled and minified sizes for each TypeBox module. - -```typescript -┌──────────────────────┬────────────┬────────────┬─────────────┠-│ (index) │ Compiled │ Minified │ Compression │ -├──────────────────────┼────────────┼────────────┼─────────────┤ -│ typebox/compiler │ '124.3 kb' │ ' 55.7 kb' │ '2.23 x' │ -│ typebox/errors │ '107.8 kb' │ ' 47.9 kb' │ '2.25 x' │ -│ typebox/system │ ' 73.3 kb' │ ' 30.2 kb' │ '2.43 x' │ -│ typebox/value │ '170.7 kb' │ ' 74.2 kb' │ '2.30 x' │ -│ typebox │ ' 72.0 kb' │ ' 29.7 kb' │ '2.43 x' │ -└──────────────────────┴────────────┴────────────┴─────────────┘ -``` - - - -## Contribute - -TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project preferences open community discussion prior to accepting new features. +
+ +

TypeBox

+ +

JSON Schema Type Builder with Static Type Resolution for TypeScript

+ + + +
+
+ +[![npm version](https://badge.fury.io/js/%40sinclair%2Ftypebox.svg)](https://badge.fury.io/js/%40sinclair%2Ftypebox) +[![Downloads](https://img.shields.io/npm/dm/%40sinclair%2Ftypebox.svg)](https://www.npmjs.com/package/%40sinclair%2Ftypebox) +[![GitHub CI](https://github.com/sinclairzx81/typebox/workflows/GitHub%20CI/badge.svg)](https://github.com/sinclairzx81/typebox/actions) + +
+ + + +## Install + +#### Npm +```bash +$ npm install @sinclair/typebox --save +``` + +#### Deno +```typescript +import { Static, Type } from 'npm:@sinclair/typebox' +``` + +#### Esm + +```typescript +import { Static, Type } from 'https://esm.sh/@sinclair/typebox' +``` + +## Example + +```typescript +import { Static, Type } from '@sinclair/typebox' + +const T = Type.Object({ // const T = { + x: Type.Number(), // type: 'object', + y: Type.Number(), // required: ['x', 'y', 'z'], + z: Type.Number() // properties: { +}) // x: { type: 'number' }, + // y: { type: 'number' }, + // z: { type: 'number' } + // } + // } + +type T = Static // type T = { + // x: number, + // y: number, + // z: number + // } +``` + + + + +## Overview + +TypeBox is a runtime type builder that creates in-memory JSON Schema objects that can be statically inferred as TypeScript types. The schemas produced by this library are designed to match the static type assertion rules of the TypeScript compiler. TypeBox enables one to create a unified type that can be statically checked by TypeScript and runtime asserted using standard JSON Schema validation. + +This library is designed to enable JSON schema to compose with the same flexibility as TypeScript's type system. It can be used as a simple tool to build up complex schemas or integrated into REST or RPC services to help validate data received over the wire. + +License MIT + +## Contents +- [Install](#install) +- [Overview](#overview) +- [Usage](#usage) +- [Types](#types) + - [Standard](#types-standard) + - [Extended](#types-extended) + - [Modifiers](#types-modifiers) + - [Options](#types-options) + - [Generics](#types-generics) + - [References](#types-references) + - [Recursive](#types-recursive) + - [Conditional](#types-conditional) + - [Template Literal](#types-template-literal) + - [Guards](#types-guards) + - [Unsafe](#types-unsafe) + - [Strict](#types-strict) +- [Values](#values) + - [Create](#values-create) + - [Clone](#values-clone) + - [Check](#values-check) + - [Convert](#values-convert) + - [Cast](#values-cast) + - [Equal](#values-equal) + - [Hash](#values-hash) + - [Diff](#values-diff) + - [Patch](#values-patch) + - [Errors](#values-errors) + - [Mutate](#values-mutate) + - [Pointer](#values-pointer) +- [TypeCheck](#typecheck) + - [Ajv](#typecheck-ajv) + - [TypeCompiler](#typecheck-typecompiler) +- [TypeSystem](#typesystem) + - [Types](#typesystem-types) + - [Formats](#typesystem-formats) + - [Policies](#typesystem-policies) +- [Benchmark](#benchmark) + - [Compile](#benchmark-compile) + - [Validate](#benchmark-validate) + - [Compression](#benchmark-compression) +- [Contribute](#contribute) + + + +## Usage + +The following shows general usage. + +```typescript +import { Static, Type } from '@sinclair/typebox' + +//-------------------------------------------------------------------------------------------- +// +// Let's say you have the following type ... +// +//-------------------------------------------------------------------------------------------- + +type T = { + id: string, + name: string, + timestamp: number +} + +//-------------------------------------------------------------------------------------------- +// +// ... you can express this type in the following way. +// +//-------------------------------------------------------------------------------------------- + +const T = Type.Object({ // const T = { + id: Type.String(), // type: 'object', + name: Type.String(), // properties: { + timestamp: Type.Integer() // id: { +}) // type: 'string' + // }, + // name: { + // type: 'string' + // }, + // timestamp: { + // type: 'integer' + // } + // }, + // required: [ + // 'id', + // 'name', + // 'timestamp' + // ] + // } + +//-------------------------------------------------------------------------------------------- +// +// ... then infer back to the original static type this way. +// +//-------------------------------------------------------------------------------------------- + +type T = Static // type T = { + // id: string, + // name: string, + // timestamp: number + // } + +//-------------------------------------------------------------------------------------------- +// +// ... then use the type both as JSON schema and as a TypeScript type. +// +//-------------------------------------------------------------------------------------------- + +import { Value } from '@sinclair/typebox/value' + +function receive(value: T) { // ... as a Static Type + + if(Value.Check(T, value)) { // ... as a JSON Schema + + // ok... + } +} +``` + + + +## Types + +TypeBox types are JSON schema fragments that can be composed into more complex types. Each fragment is structured such that a JSON schema compliant validator can runtime assert a value the same way TypeScript will statically assert a type. TypeBox provides a set of Standard types which are used create JSON schema compliant schematics as well as an Extended type set used to create schematics for constructs native to JavaScript. + + + +### Standard Types + +The following table lists the Standard TypeBox types. These types are fully compatible with the JSON Schema Draft 6 specification. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ JSON Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Any() │ type T = any │ const T = { } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Unknown() │ type T = unknown │ const T = { } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.String() │ type T = string │ const T = { │ +│ │ │ type: 'string' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Number() │ type T = number │ const T = { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Integer() │ type T = number │ const T = { │ +│ │ │ type: 'integer' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Boolean() │ type T = boolean │ const T = { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Null() │ type T = null │ const T = { │ +│ │ │ type: 'null' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Literal(42) │ type T = 42 │ const T = { │ +│ │ │ const: 42, │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Array( │ type T = number[] │ const T = { │ +│ Type.Number() │ │ type: 'array', │ +│ ) │ │ items: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ x: Type.Number(), │ x: number, │ type: 'object', │ +│ y: Type.Number() │ y: number │ required: ['x', 'y'], │ +│ }) │ } │ properties: { │ +│ │ │ x: { │ +│ │ │ type: 'number' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │ +│ Type.Number(), │ │ type: 'array', │ +│ Type.Number() │ │ items: [{ │ +│ ]) │ │ type: 'number' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ additionalItems: false, │ +│ │ │ minItems: 2, │ +│ │ │ maxItems: 2 │ +│ │ │ } │ +│ │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ enum Foo { │ enum Foo { │ const T = { │ +│ A, │ A, │ anyOf: [{ │ +│ B │ B │ type: 'number', │ +│ } │ } │ const: 0 │ +│ │ │ }, { │ +│ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │ +│ │ │ const: 1 │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.KeyOf( │ type T = keyof { │ const T = { │ +│ Type.Object({ │ x: number, │ anyOf: [{ │ +│ x: Type.Number(), │ y: number │ type: 'string', │ +│ y: Type.Number() │ } │ const: 'x' │ +│ }) │ │ }, { │ +│ ) │ │ type: 'string', │ +│ │ │ const: 'y' │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Union([ │ type T = string | number │ const T = { │ +│ Type.String(), │ │ anyOf: [{ │ +│ Type.Number() │ │ type: 'string' │ +│ ]) │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Intersect([ │ type T = { │ const T = { │ +│ Type.Object({ │ x: number │ allOf: [{ │ +│ x: Type.Number() │ } & { │ type: 'object', │ +│ }), │ y: number │ required: ['x'], │ +│ Type.Object({ │ } │ properties: { │ +│ y: Type.Number() │ │ x: { │ +│ ]) │ │ type: 'number' │ +│ ]) │ │ } │ +│ │ │ } │ +│ │ │ }, { │ +│ │ │ type: 'object', | +│ │ │ required: ['y'], │ +│ │ │ properties: { │ +│ │ │ y: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Composite([ │ type I = { │ const T = { │ +│ Type.Object({ │ x: number │ type: 'object', │ +│ x: Type.Number() │ } & { │ required: ['x', 'y'], │ +│ }), │ y: number │ properties: { │ +│ Type.Object({ │ } │ x: { │ +│ y: Type.Number() │ │ type: 'number' │ +│ }) │ type T = { │ }, │ +│ ]) │ [K in keyof I]: I[K] │ y: { │ +│ │ } │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Never() │ type T = never │ const T = { │ +│ │ │ not: {} │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Not( | type T = string │ const T = { │ +| Type.Union([ │ │ allOf: [{ │ +│ Type.Literal('x'), │ │ not: { │ +│ Type.Literal('y'), │ │ anyOf: [ │ +│ Type.Literal('z') │ │ { const: 'x' }, │ +│ ]), │ │ { const: 'y' }, │ +│ Type.String() │ │ { const: 'z' } │ +│ ) │ │ ] │ +│ │ │ } │ +│ │ │ }, { │ +│ │ │ type: 'string' │ +│ │ │ }] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Extends( │ type T = │ const T = { │ +│ Type.String(), │ string extends number │ const: false, │ +│ Type.Number(), │ true : false │ type: 'boolean' │ +│ Type.Literal(true), │ │ } │ +│ Type.Literal(false) │ │ │ +│ ) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Extract( │ type T = Extract< │ const T = { │ +│ Type.Union([ │ string | number, │ type: 'string' │ +│ Type.String(), │ string │ } │ +│ Type.Number(), │ > │ │ +│ ]), │ │ │ +│ Type.String() │ │ │ +│ ) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Exclude( │ type T = Exclude< │ const T = { │ +│ Type.Union([ │ string | number, │ type: 'number' │ +│ Type.String(), │ string │ } │ +│ Type.Number(), │ > │ │ +│ ]), │ │ │ +│ Type.String() │ │ │ +│ ) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const U = Type.Union([ │ type U = 'open' | 'close' │ const T = { │ +│ Type.Literal('open'), │ │ type: 'string', │ +│ Type.Literal('close') │ type T = `on${U}` │ pattern: '^on(open|close)$' │ +│ ]) │ │ } │ +│ │ │ │ +│ const T = Type │ │ │ +│ .TemplateLiteral([ │ │ │ +│ Type.Literal('on'), │ │ │ +│ U │ │ │ +│ ]) │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Record( │ type T = Record< │ const T = { │ +│ Type.String(), │ string, │ type: 'object', │ +│ Type.Number() │ number │ patternProperties: { │ +│ ) │ > │ '^.*$': { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Partial( │ type T = Partial<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ properties: { │ +│ y: Type.Number() | }> │ x: { │ +│ }) │ │ type: 'number' │ +│ ) │ │ }, │ +│ │ │ y: { │ +│ │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Required( │ type T = Required<{ │ const T = { │ +│ Type.Object({ │ x?: number, │ type: 'object', │ +│ x: Type.Optional( │ y?: number │ required: ['x', 'y'], │ +│ Type.Number() | }> │ properties: { │ +│ ), │ │ x: { │ +│ y: Type.Optional( │ │ type: 'number' │ +│ Type.Number() │ │ }, │ +│ ) │ │ y: { │ +│ }) │ │ type: 'number' │ +│ ) │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Pick( │ type T = Pick<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ required: ['x'], │ +│ y: Type.Number() │ }, 'x'> │ properties: { │ +│ }), ['x'] | │ x: { │ +│ ) │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Omit( │ type T = Omit<{ │ const T = { │ +│ Type.Object({ │ x: number, │ type: 'object', │ +│ x: Type.Number(), │ y: number │ required: ['y'], │ +│ y: Type.Number() │ }, 'x'> │ properties: { │ +│ }), ['x'] | │ y: { │ +│ ) │ │ type: 'number' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const R = { │ +│ x: Type.Number(), │ x: number, │ $ref: 'T' │ +│ y: Type.Number() │ y: number │ } │ +│ }, { $id: 'T' }) | } │ │ +│ │ │ │ +│ const R = Type.Ref(T) │ type R = T │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Extended Types + +TypeBox provides several extended types that can be used to produce schematics for common JavaScript constructs. These types can not be used with standard JSON schema validators; but are useful to help frame schematics for RPC interfaces that may receive JSON validated data. Extended types are prefixed with the `[Extended]` doc comment for convenience. The following table lists the supported types. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ Extended Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Constructor([ │ type T = new ( │ const T = { │ +│ Type.String(), │ arg0: string, │ type: 'object', │ +│ Type.Number() │ arg1: number │ instanceOf: 'Constructor', │ +│ ], Type.Boolean()) │ ) => boolean │ parameters: [{ │ +│ │ │ type: 'string' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ return: { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Function([ │ type T = ( │ const T = { │ +| Type.String(), │ arg0: string, │ type : 'object', │ +│ Type.Number() │ arg1: number │ instanceOf: 'Function', │ +│ ], Type.Boolean()) │ ) => boolean │ parameters: [{ │ +│ │ │ type: 'string' │ +│ │ │ }, { │ +│ │ │ type: 'number' │ +│ │ │ }], │ +│ │ │ return: { │ +│ │ │ type: 'boolean' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Promise( │ type T = Promise │ const T = { │ +│ Type.String() │ │ type: 'object', │ +│ ) │ │ instanceOf: 'Promise', │ +│ │ │ item: { │ +│ │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │ +│ │ │ type: 'object', │ +│ │ │ instanceOf: 'Uint8Array' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Date() │ type T = Date │ const T = { │ +│ │ │ type: 'object', │ +│ │ │ instanceOf: 'Date' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Undefined() │ type T = undefined │ const T = { │ +│ │ │ type: 'null', │ +│ │ │ typeOf: 'Undefined' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.RegEx(/foo/) │ type T = string │ const T = { │ +│ │ │ type: 'string', │ +│ │ │ pattern: 'foo' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Symbol() │ type T = symbol │ const T = { │ +│ │ │ type: 'null', │ +│ │ │ typeOf: 'Symbol' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.BigInt() │ type T = bigint │ const T = { │ +│ │ │ type: 'null', │ +│ │ │ typeOf: 'BigInt' │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Void() │ type T = void │ const T = { │ +│ │ │ type: 'null' │ +│ │ │ typeOf: 'Void' │ +│ │ │ } │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Modifiers + +TypeBox provides modifiers that allow schema properties to be statically inferred as `readonly` or `optional`. The following table shows the supported modifiers and how they map between TypeScript and JSON Schema. + +```typescript +┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┠+│ TypeBox │ TypeScript │ JSON Schema │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.Optional( │ name?: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.Readonly( │ readonly name: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ }, │ +│ │ │ required: ['name'] │ +│ │ │ } │ +│ │ │ │ +├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ +│ const T = Type.Object({ │ type T = { │ const T = { │ +│ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │ +│ Type.String() │ } │ properties: { │ +│ ) │ │ name: { │ +│ }) │ │ type: 'string' │ +│ │ │ } │ +│ │ │ } │ +│ │ │ } │ +│ │ │ │ +└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ +``` + + + +### Options + +You can pass JSON Schema options on the last argument of any type. Option hints specific to each type are provided for convenience. + +```typescript +// String must be an email +const T = Type.String({ // const T = { + format: 'email' // type: 'string', +}) // format: 'email' + // } + +// Mumber must be a multiple of 2 +const T = Type.Number({ // const T = { + multipleOf: 2 // type: 'number', +}) // multipleOf: 2 + // } + +// Array must have at least 5 integer values +const T = Type.Array(Type.Integer(), { // const T = { + minItems: 5 // type: 'array', +}) // minItems: 5, + // items: { + // type: 'integer' + // } + // } + +``` + + + +### Generic Types + +Generic types can be created with generic functions constrained to type `TSchema`. The following creates a generic `Vector` type. + +```typescript +import { Type, Static, TSchema } from '@sinclair/typebox' + +const Vector = (t: T) => Type.Object({ x: t, y: t, z: t }) + +const NumberVector = Vector(Type.Number()) // const NumberVector = { + // type: 'object', + // required: ['x', 'y', 'z'], + // properties: { + // x: { type: 'number' }, + // y: { type: 'number' }, + // z: { type: 'number' } + // } + // } + +type NumberVector = Static // type NumberVector = { + // x: number, + // y: number, + // z: number + // } + +const BooleanVector = Vector(Type.Boolean()) // const BooleanVector = { + // type: 'object', + // required: ['x', 'y', 'z'], + // properties: { + // x: { type: 'boolean' }, + // y: { type: 'boolean' }, + // z: { type: 'boolean' } + // } + // } + +type BooleanVector = Static // type BooleanVector = { + // x: boolean, + // y: boolean, + // z: boolean + // } +``` + +The following creates a generic `Nullable` type. + +```typescript +const Nullable = (schema: T) => Type.Union([schema, Type.Null()]) + +const T = Nullable(Type.String()) // const T = { + // anyOf: [ + // { type: 'string' }, + // { type: 'null' } + // ] + // } + +type T = Static // type T = string | null +``` + + + +### Reference Types + +Reference types are supported with `Type.Ref`. The target type must specify a valid `$id`. + +```typescript +const T = Type.String({ $id: 'T' }) // const T = { + // $id: 'T', + // type: 'string' + // } + +const R = Type.Ref(T) // const R = { + // $ref: 'T' + // } +``` + + + +### Recursive Types + +Recursive types are supported with `Type.Recursive` + +```typescript +const Node = Type.Recursive(Node => Type.Object({ // const Node = { + id: Type.String(), // $id: 'Node', + nodes: Type.Array(Node) // type: 'object', +}), { $id: 'Node' }) // properties: { + // id: { + // type: 'string' + // }, + // nodes: { + // type: 'array', + // items: { + // $ref: 'Node' + // } + // } + // }, + // required: [ + // 'id', + // 'nodes' + // ] + // } + +type Node = Static // type Node = { + // id: string + // nodes: Node[] + // } + +function test(node: Node) { + const id = node.nodes[0].nodes[0].id // id is string +} +``` + + + +### Conditional Types + +Conditional types are supported with `Type.Extends`, `Type.Exclude` and `Type.Extract` + +```typescript +// TypeScript + +type T0 = string extends number ? true : false // type T0 = false + +type T1 = Extract // type T1 = number + +type T2 = Exclude // type T2 = string + +// TypeBox + +const T0 = Type.Extends(Type.String(), Type.Number(), Type.Literal(true), Type.Literal(false)) + +const T1 = Type.Extract(Type.Union([Type.String(), Type.Number()]), Type.Number()) + +const T2 = Type.Exclude(Type.Union([Type.String(), Type.Number()]), Type.Number()) + + +type T0 = Static // type T0 = false + +type T1 = Static // type T1 = number + +type T2 = Static // type T2 = string +``` + + + +### Template Literal Types + +Template Literal types are supported with `Type.TemplateLiteral` + +```typescript +// TypeScript + +type T = `option${'A'|'B'}` // type T = 'optionA' | 'optionB' + +type R = Record // type R = { + // optionA: string + // optionB: string + // } + +// TypeBox + +const T = Type.TemplateLiteral([ // const T = { + Type.Literal('option'), // pattern: '^option(A|B)$', + Type.Union([ // type: 'string' + Type.Literal('A'), // } + Type.Literal('B') + ]) +]) + +const R = Type.Record(T, Type.String()) // const R = { + // type: 'object', + // required: ['optionA', 'optionB'], + // properties: { + // optionA: { + // type: 'string' + // }, + // optionB: { + // type: 'string' + // } + // } + // } + +type T = Static // type T = 'optionA' | 'optionB' + +type R = Static // type R = { + // optionA: string + // optionB: string + // } +``` + + + +### Unsafe + +Use `Type.Unsafe` to create custom schematics with user defined inference rules. + +```typescript +const T = Type.Unsafe({ type: 'number' }) // const T = { + // type: 'number' + // } + +type T = Static // type T = string +``` + +The `Type.Unsafe` type can be useful to express specific OpenAPI schema representations. + +```typescript +import { Type, Static, TSchema } from '@sinclair/typebox' + +// Nullable + +function Nullable(schema: T) { + return Type.Unsafe | null>({ ...schema, nullable: true }) +} + +const T = Nullable(Type.String()) // const T = { + // type: 'string', + // nullable: true + // } + +type T = Static // type T = string | null + +// StringEnum + +function StringEnum(values: [...T]) { + return Type.Unsafe({ type: 'string', enum: values }) +} + +const T = StringEnum(['A', 'B', 'C']) // const T = { + // enum: ['A', 'B', 'C'] + // } + +type T = Static // type T = 'A' | 'B' | 'C' +``` + + + +### Guards + +TypeBox provides a `TypeGuard` module that can be used for reflection and asserting values as types. + +```typescript +import { Type, TypeGuard } from '@sinclair/typebox' + +const T = Type.String() + +if(TypeGuard.TString(T)) { + + // T is TString +} +``` + + + +### Strict + +TypeBox schemas contain the `Kind` and `Modifier` symbol properties. These properties are used for type composition and reflection. These properties are not strictly valid JSON schema; so in some cases it may be desirable to omit them. TypeBox provides a `Type.Strict` function that will omit these properties if necessary. + +```typescript +const T = Type.Object({ // const T = { + name: Type.Optional(Type.String()) // [Kind]: 'Object', +}) // type: 'object', + // properties: { + // name: { + // [Kind]: 'String', + // type: 'string', + // [Modifier]: 'Optional' + // } + // } + // } + +const U = Type.Strict(T) // const U = { + // type: 'object', + // properties: { + // name: { + // type: 'string' + // } + // } + // } +``` + + + +## Values + +TypeBox provides an optional utility module that can be used to perform common operations on JavaScript values. This module includes functionality to create, check and cast values from types as well as check equality, clone, diff and patch JavaScript values. This module is provided via optional import. + +```typescript +import { Value } from '@sinclair/typebox/value' +``` + + + +### Create + +Use the Create function to create a value from a type. TypeBox will use default values if specified. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) }) + +const A = Value.Create(T) // const A = { x: 0, y: 42 } +``` + + + +### Clone + +Use the Clone function to deeply clone a value + +```typescript +const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 } +``` + + + +### Check + +Use the Check function to type check a value + +```typescript +const T = Type.Object({ x: Type.Number() }) + +const R = Value.Check(T, { x: 1 }) // const R = true +``` + + + +### Convert + +Use the Convert function to convert a value into its target type if a reasonable conversion is possible. + +```typescript +const T = Type.Object({ x: Type.Number() }) + +const R1 = Value.Convert(T, { x: '3.14' }) // const R1 = { x: 3.14 } + +const R2 = Value.Convert(T, { x: 'not a number' }) // const R2 = { x: 'not a number' } +``` + + + +### Cast + +Use the Cast function to cast a value into a type. The cast function will retain as much information as possible from the original value. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false }) + +const X = Value.Cast(T, null) // const X = { x: 0, y: 0 } + +const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 } + +const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 } +``` + + + +### Equal + +Use the Equal function to deeply check for value equality. + +```typescript +const R = Value.Equal( // const R = true + { x: 1, y: 2, z: 3 }, + { x: 1, y: 2, z: 3 } +) +``` + + + +### Hash + +Use the Hash function to create a [FNV1A-64](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non cryptographic hash of a value. + +```typescript +const A = Value.Hash({ x: 1, y: 2, z: 3 }) // const A = 2910466848807138541n + +const B = Value.Hash({ x: 1, y: 4, z: 3 }) // const B = 1418369778807423581n +``` + + + +### Diff + +Use the Diff function to produce a sequence of edits to transform one value into another. + +```typescript +const E = Value.Diff( // const E = [ + { x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 }, + { y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 }, +) // { type: 'insert', path: '/w', value: 6 }, + // { type: 'delete', path: '/x' } + // ] +``` + + + +### Patch + +Use the Patch function to apply edits + +```typescript +const A = { x: 1, y: 2 } + +const B = { x: 3 } + +const E = Value.Diff(A, B) // const E = [ + // { type: 'update', path: '/x', value: 3 }, + // { type: 'delete', path: '/y' } + // ] + +const C = Value.Patch(A, E) // const C = { x: 3 } +``` + + + +### Errors + +Use the Errors function enumerate validation errors. + +```typescript +const T = Type.Object({ x: Type.Number(), y: Type.Number() }) + +const R = [...Value.Errors(T, { x: '42' })] // const R = [{ + // schema: { type: 'number' }, + // path: '/x', + // value: '42', + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/y', + // value: undefined, + // message: 'Expected number' + // }] +``` + + + +### Mutate + +Use the Mutate function to perform a deep mutable value assignment while retaining internal references. + +```typescript +const Y = { z: 1 } // const Y = { z: 1 } + +const X = { y: Y } // const X = { y: { z: 1 } } + +const A = { x: X } // const A = { x: { y: { z: 1 } } } + + +Value.Mutate(A, { x: { y: { z: 2 } } }) // const A' = { x: { y: { z: 2 } } } + +const R0 = A.x.y.z === 2 // const R0 = 2 + +const R1 = A.x.y === Y // const R1 = true + +const R2 = A.x === X // const R2 = true +``` + + + +### Pointer + +Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) JSON Pointers. + +```typescript +import { ValuePointer } from '@sinclair/typebox/value' + +const A = { x: 0, y: 0, z: 0 } + +ValuePointer.Set(A, '/x', 1) // const A' = { x: 1, y: 0, z: 0 } + +ValuePointer.Set(A, '/y', 1) // const A' = { x: 1, y: 1, z: 0 } + +ValuePointer.Set(A, '/z', 1) // const A' = { x: 1, y: 1, z: 1 } +``` + + + +## TypeCheck + +TypeBox types target JSON Schema draft 6 so are compatible with any validator that supports this specification. TypeBox also provides a built in type checking compiler designed specifically for high performance compilation and value assertion. + +The following sections detail using Ajv and TypeBox's compiler infrastructure. + + + +## Ajv + +The following shows the recommended setup for Ajv. + +```bash +$ npm install ajv ajv-formats --save +``` + +```typescript +import { Type } from '@sinclair/typebox' +import addFormats from 'ajv-formats' +import Ajv from 'ajv' + +const ajv = addFormats(new Ajv({}), [ + 'date-time', + 'time', + 'date', + 'email', + 'hostname', + 'ipv4', + 'ipv6', + 'uri', + 'uri-reference', + 'uuid', + 'uri-template', + 'json-pointer', + 'relative-json-pointer', + 'regex' +]) + +const C = ajv.compile(Type.Object({ + x: Type.Number(), + y: Type.Number(), + z: Type.Number() +})) + +const R = C({ x: 1, y: 2, z: 3 }) // const R = true +``` + + + +### TypeCompiler + +The TypeBox TypeCompiler is a high performance JIT compiler that transforms TypeBox types into optimized JavaScript validation routines. The compiler is tuned for fast compilation as well as fast value assertion. It is designed to serve as a validation backend that can be integrated into larger applications; but can also be used as a general purpose validator. + +The TypeCompiler is provided as an optional import. + +```typescript +import { TypeCompiler } from '@sinclair/typebox/compiler' +``` + +Use the `Compile(...)` function to compile a type. + +```typescript +const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> + +const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true +``` + +Use the `Errors(...)` function to produce diagnostic errors for a value. The `Errors(...)` function will return an iterator that if enumerated; will perform an exhaustive check across the entire value and yield any error found. For performance, this function should only be called after failed `Check(...)`. Applications may also choose to yield only the first value to avoid exhaustive error generation. + +```typescript +const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck> + +const value = { } + +const errors = [...C.Errors(value)] // const errors = [{ + // schema: { type: 'number' }, + // path: '/x', + // value: undefined, + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/y', + // value: undefined, + // message: 'Expected number' + // }, { + // schema: { type: 'number' }, + // path: '/z', + // value: undefined, + // message: 'Expected number' + // }] +``` + +Compiled routines can be inspected with the `.Code()` function. + +```typescript +const C = TypeCompiler.Compile(Type.String()) // const C: TypeCheck + +console.log(C.Code()) // return function check(value) { + // return ( + // (typeof value === 'string') + // ) + // } +``` + + + +## TypeSystem + +The TypeBox TypeSystem module provides functionality to define types above and beyond the Standard and Extended type sets as well as control various assertion polices. Configurations made to the TypeSystem module are observed by both `TypeCompiler` and `Value` modules. + +The TypeSystem module is provided as an optional import. + +```typescript +import { TypeSystem } from '@sinclair/typebox/system' +``` + + + +### Types + +Use the `Type(...)` function to create a custom type. This function will return a type factory function that can be used to construct the type. The following creates a Point type. + +```typescript +type PointOptions = { } // The Type Options + +type PointType = { x: number, y: number } // The Static Type + +const Point = TypeSystem.Type('Point', (options, value) => { + return ( + typeof value === 'object' && value !== null && + typeof value.x === 'number' && + typeof value.y === 'number' + ) +}) + +const T = Point() + +type T = Static // type T = { x: number, y: number } + +const R = Value.Check(T, { x: 1, y: 2 }) // const R = true +``` + + + +### Formats + +Use the `Format(...)` function to create a custom string format. The following creates a format that checks for lowercase strings. + +```typescript +TypeSystem.Format('lowercase', value => value === value.toLowerCase()) // format should be lowercase + +const T = Type.String({ format: 'lowercase' }) + +const A = Value.Check(T, 'Hello') // const A = false + +const B = Value.Check(T, 'hello') // const B = true +``` + + + +### Policies + +TypeBox validates using JSON Schema assertion policies by default. It is possible to override these policies and have TypeBox assert using TypeScript policies. The following overrides are available. + +```typescript +// Allow arrays to validate as object types (default is false) +// +// const A: {} = [] - allowed in TS + +TypeSystem.AllowArrayObjects = true + +// Allow numeric values to be NaN or + or - Infinity (default is false) +// +// const A: number = NaN - allowed in TS + +TypeSystem.AllowNaN = true +``` + + + +## Benchmark + +This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.12.0. + +For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/). + + + +### Compile + +This benchmark measures compilation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/compile.ts). + +```typescript +┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┠+│ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │ +├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┤ +│ Literal_String │ 1000 │ ' 257 ms' │ ' 8 ms' │ ' 32.13 x' │ +│ Literal_Number │ 1000 │ ' 203 ms' │ ' 4 ms' │ ' 50.75 x' │ +│ Literal_Boolean │ 1000 │ ' 183 ms' │ ' 4 ms' │ ' 45.75 x' │ +│ Primitive_Number │ 1000 │ ' 174 ms' │ ' 8 ms' │ ' 21.75 x' │ +│ Primitive_String │ 1000 │ ' 158 ms' │ ' 9 ms' │ ' 17.56 x' │ +│ Primitive_String_Pattern │ 1000 │ ' 213 ms' │ ' 13 ms' │ ' 16.38 x' │ +│ Primitive_Boolean │ 1000 │ ' 136 ms' │ ' 6 ms' │ ' 22.67 x' │ +│ Primitive_Null │ 1000 │ ' 144 ms' │ ' 6 ms' │ ' 24.00 x' │ +│ Object_Unconstrained │ 1000 │ ' 1176 ms' │ ' 38 ms' │ ' 30.95 x' │ +│ Object_Constrained │ 1000 │ ' 1181 ms' │ ' 31 ms' │ ' 38.10 x' │ +│ Object_Vector3 │ 1000 │ ' 387 ms' │ ' 8 ms' │ ' 48.38 x' │ +│ Object_Box3D │ 1000 │ ' 1693 ms' │ ' 25 ms' │ ' 67.72 x' │ +│ Tuple_Primitive │ 1000 │ ' 470 ms' │ ' 15 ms' │ ' 31.33 x' │ +│ Tuple_Object │ 1000 │ ' 1206 ms' │ ' 17 ms' │ ' 70.94 x' │ +│ Composite_Intersect │ 1000 │ ' 567 ms' │ ' 20 ms' │ ' 28.35 x' │ +│ Composite_Union │ 1000 │ ' 515 ms' │ ' 21 ms' │ ' 24.52 x' │ +│ Math_Vector4 │ 1000 │ ' 787 ms' │ ' 10 ms' │ ' 78.70 x' │ +│ Math_Matrix4 │ 1000 │ ' 386 ms' │ ' 8 ms' │ ' 48.25 x' │ +│ Array_Primitive_Number │ 1000 │ ' 349 ms' │ ' 7 ms' │ ' 49.86 x' │ +│ Array_Primitive_String │ 1000 │ ' 336 ms' │ ' 4 ms' │ ' 84.00 x' │ +│ Array_Primitive_Boolean │ 1000 │ ' 284 ms' │ ' 3 ms' │ ' 94.67 x' │ +│ Array_Object_Unconstrained │ 1000 │ ' 1704 ms' │ ' 19 ms' │ ' 89.68 x' │ +│ Array_Object_Constrained │ 1000 │ ' 1456 ms' │ ' 18 ms' │ ' 80.89 x' │ +│ Array_Tuple_Primitive │ 1000 │ ' 792 ms' │ ' 15 ms' │ ' 52.80 x' │ +│ Array_Tuple_Object │ 1000 │ ' 1552 ms' │ ' 17 ms' │ ' 91.29 x' │ +│ Array_Composite_Intersect │ 1000 │ ' 744 ms' │ ' 18 ms' │ ' 41.33 x' │ +│ Array_Composite_Union │ 1000 │ ' 783 ms' │ ' 15 ms' │ ' 52.20 x' │ +│ Array_Math_Vector4 │ 1000 │ ' 1093 ms' │ ' 14 ms' │ ' 78.07 x' │ +│ Array_Math_Matrix4 │ 1000 │ ' 684 ms' │ ' 6 ms' │ ' 114.00 x' │ +└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┘ +``` + + + +### Validate + +This benchmark measures validation performance for varying types. You can review this benchmark [here](https://github.com/sinclairzx81/typebox/blob/master/benchmark/measurement/module/check.ts). + +```typescript +┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┠+│ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │ +├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤ +│ Literal_String │ 1000000 │ ' 27 ms' │ ' 6 ms' │ ' 5 ms' │ ' 1.20 x' │ +│ Literal_Number │ 1000000 │ ' 23 ms' │ ' 21 ms' │ ' 11 ms' │ ' 1.91 x' │ +│ Literal_Boolean │ 1000000 │ ' 21 ms' │ ' 20 ms' │ ' 10 ms' │ ' 2.00 x' │ +│ Primitive_Number │ 1000000 │ ' 26 ms' │ ' 19 ms' │ ' 11 ms' │ ' 1.73 x' │ +│ Primitive_String │ 1000000 │ ' 25 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ +│ Primitive_String_Pattern │ 1000000 │ ' 155 ms' │ ' 49 ms' │ ' 43 ms' │ ' 1.14 x' │ +│ Primitive_Boolean │ 1000000 │ ' 23 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ +│ Primitive_Null │ 1000000 │ ' 24 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ +│ Object_Unconstrained │ 1000000 │ ' 804 ms' │ ' 35 ms' │ ' 28 ms' │ ' 1.25 x' │ +│ Object_Constrained │ 1000000 │ ' 1041 ms' │ ' 55 ms' │ ' 41 ms' │ ' 1.34 x' │ +│ Object_Vector3 │ 1000000 │ ' 380 ms' │ ' 26 ms' │ ' 20 ms' │ ' 1.30 x' │ +│ Object_Box3D │ 1000000 │ ' 1785 ms' │ ' 65 ms' │ ' 52 ms' │ ' 1.25 x' │ +│ Object_Recursive │ 1000000 │ ' 4984 ms' │ ' 396 ms' │ ' 114 ms' │ ' 3.47 x' │ +│ Tuple_Primitive │ 1000000 │ ' 168 ms' │ ' 24 ms' │ ' 16 ms' │ ' 1.50 x' │ +│ Tuple_Object │ 1000000 │ ' 673 ms' │ ' 30 ms' │ ' 26 ms' │ ' 1.15 x' │ +│ Composite_Intersect │ 1000000 │ ' 751 ms' │ ' 28 ms' │ ' 20 ms' │ ' 1.40 x' │ +│ Composite_Union │ 1000000 │ ' 489 ms' │ ' 24 ms' │ ' 16 ms' │ ' 1.50 x' │ +│ Math_Vector4 │ 1000000 │ ' 259 ms' │ ' 23 ms' │ ' 13 ms' │ ' 1.77 x' │ +│ Math_Matrix4 │ 1000000 │ ' 1002 ms' │ ' 40 ms' │ ' 30 ms' │ ' 1.33 x' │ +│ Array_Primitive_Number │ 1000000 │ ' 252 ms' │ ' 22 ms' │ ' 15 ms' │ ' 1.47 x' │ +│ Array_Primitive_String │ 1000000 │ ' 227 ms' │ ' 22 ms' │ ' 18 ms' │ ' 1.22 x' │ +│ Array_Primitive_Boolean │ 1000000 │ ' 150 ms' │ ' 23 ms' │ ' 22 ms' │ ' 1.05 x' │ +│ Array_Object_Unconstrained │ 1000000 │ ' 4754 ms' │ ' 71 ms' │ ' 64 ms' │ ' 1.11 x' │ +│ Array_Object_Constrained │ 1000000 │ ' 4787 ms' │ ' 142 ms' │ ' 123 ms' │ ' 1.15 x' │ +│ Array_Object_Recursive │ 1000000 │ ' 19088 ms' │ ' 1735 ms' │ ' 314 ms' │ ' 5.53 x' │ +│ Array_Tuple_Primitive │ 1000000 │ ' 650 ms' │ ' 41 ms' │ ' 31 ms' │ ' 1.32 x' │ +│ Array_Tuple_Object │ 1000000 │ ' 2770 ms' │ ' 67 ms' │ ' 55 ms' │ ' 1.22 x' │ +│ Array_Composite_Intersect │ 1000000 │ ' 2693 ms' │ ' 50 ms' │ ' 39 ms' │ ' 1.28 x' │ +│ Array_Composite_Union │ 1000000 │ ' 1982 ms' │ ' 72 ms' │ ' 33 ms' │ ' 2.18 x' │ +│ Array_Math_Vector4 │ 1000000 │ ' 1068 ms' │ ' 40 ms' │ ' 26 ms' │ ' 1.54 x' │ +│ Array_Math_Matrix4 │ 1000000 │ ' 4609 ms' │ ' 115 ms' │ ' 88 ms' │ ' 1.31 x' │ +└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘ +``` + + + +### Compression + +The following table lists esbuild compiled and minified sizes for each TypeBox module. + +```typescript +┌──────────────────────┬────────────┬────────────┬─────────────┠+│ (index) │ Compiled │ Minified │ Compression │ +├──────────────────────┼────────────┼────────────┼─────────────┤ +│ typebox/compiler │ '124.3 kb' │ ' 55.7 kb' │ '2.23 x' │ +│ typebox/errors │ '107.8 kb' │ ' 47.9 kb' │ '2.25 x' │ +│ typebox/system │ ' 73.3 kb' │ ' 30.2 kb' │ '2.43 x' │ +│ typebox/value │ '170.7 kb' │ ' 74.2 kb' │ '2.30 x' │ +│ typebox │ ' 72.0 kb' │ ' 29.7 kb' │ '2.43 x' │ +└──────────────────────┴────────────┴────────────┴─────────────┘ +``` + + + +## Contribute + +TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project preferences open community discussion prior to accepting new features. diff --git a/node_modules/@types/jest/node_modules/@types/yargs/README.md b/node_modules/@types/jest/node_modules/@types/yargs/README.md index 27a846aa..e587cdcb 100644 --- a/node_modules/@types/jest/node_modules/@types/yargs/README.md +++ b/node_modules/@types/jest/node_modules/@types/yargs/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/yargs` - -# Summary -This package contains type definitions for yargs (https://github.com/chevex/yargs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser) - -# Credits -These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken ValvÃ¥g](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), [Aankhen](https://github.com/Aankhen), and [Ben Coe](https://github.com/bcoe). +# Installation +> `npm install --save @types/yargs` + +# Summary +This package contains type definitions for yargs (https://github.com/chevex/yargs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser) + +# Credits +These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken ValvÃ¥g](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), [Aankhen](https://github.com/Aankhen), and [Ben Coe](https://github.com/bcoe). diff --git a/node_modules/@types/jest/node_modules/color-name/LICENSE b/node_modules/@types/jest/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/@types/jest/node_modules/color-name/LICENSE +++ b/node_modules/@types/jest/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@types/jest/node_modules/color-name/README.md b/node_modules/@types/jest/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/@types/jest/node_modules/color-name/README.md +++ b/node_modules/@types/jest/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/@types/jest/node_modules/color-name/index.js b/node_modules/@types/jest/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/@types/jest/node_modules/color-name/index.js +++ b/node_modules/@types/jest/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/@types/jest/node_modules/color-name/package.json b/node_modules/@types/jest/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/@types/jest/node_modules/color-name/package.json +++ b/node_modules/@types/jest/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/@types/jest/node_modules/pretty-format/README.md b/node_modules/@types/jest/node_modules/pretty-format/README.md old mode 100644 new mode 100755 diff --git a/node_modules/@types/json-schema/README.md b/node_modules/@types/json-schema/README.md index 42d55d37..78c610f0 100644 --- a/node_modules/@types/json-schema/README.md +++ b/node_modules/@types/json-schema/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/json-schema` - -# Summary -This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: none - -# Credits -These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK). +# Installation +> `npm install --save @types/json-schema` + +# Summary +This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 03:09:37 GMT + * Dependencies: none + +# Credits +These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK). diff --git a/node_modules/@types/json5/README.md b/node_modules/@types/json5/README.md index 5d81b482..ea81c5cc 100644 --- a/node_modules/@types/json5/README.md +++ b/node_modules/@types/json5/README.md @@ -1,18 +1,18 @@ -# Installation -> `npm install --save @types/json5` - -# Summary -This package contains type definitions for JSON5 (http://json5.org/). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/json5 - -Additional Details - * Last updated: Mon, 19 Sep 2016 17:28:59 GMT - * File structure: ProperModule - * Library Dependencies: none - * Module Dependencies: none - * Global values: json5 - -# Credits -These definitions were written by Jason Swearingen . +# Installation +> `npm install --save @types/json5` + +# Summary +This package contains type definitions for JSON5 (http://json5.org/). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/json5 + +Additional Details + * Last updated: Mon, 19 Sep 2016 17:28:59 GMT + * File structure: ProperModule + * Library Dependencies: none + * Module Dependencies: none + * Global values: json5 + +# Credits +These definitions were written by Jason Swearingen . diff --git a/node_modules/@types/mime/README.md b/node_modules/@types/mime/README.md index ab21c244..a08301c8 100644 --- a/node_modules/@types/mime/README.md +++ b/node_modules/@types/mime/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/mime` - -# Summary -This package contains type definitions for mime (https://github.com/broofa/node-mime). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 20:08:00 GMT - * Dependencies: none - -# Credits -These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv). +# Installation +> `npm install --save @types/mime` + +# Summary +This package contains type definitions for mime (https://github.com/broofa/node-mime). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 20:08:00 GMT + * Dependencies: none + +# Credits +These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv). diff --git a/node_modules/@types/node-forge/README.md b/node_modules/@types/node-forge/README.md index c123282f..cb19873c 100644 --- a/node_modules/@types/node-forge/README.md +++ b/node_modules/@types/node-forge/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/node-forge` - -# Summary -This package contains type definitions for node-forge (https://github.com/digitalbazaar/forge). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-forge. - -### Additional Details - * Last updated: Tue, 02 Jan 2024 22:35:21 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Seth Westphal ](https://github.com/westy92), [Kay Schecker ](https://github.com/flynetworks), [Aakash Goenka ](https://github.com/a-k-g), [Rafal2228 ](https://github.com/rafal2228), [Beeno Tung ](https://github.com/beenotung), [Joe Flateau ](https://github.com/joeflateau), [timhwang21 ](https://github.com/timhwang21), [Anders Kaseorg ](https://github.com/andersk), [Sascha Zarhuber ](https://github.com/saschazar21), [Rogier Schouten ](https://github.com/rogierschouten), [Ivan Aseev ](https://github.com/aseevia), [Wiktor Kwapisiewicz](https://github.com/wiktor-k), [Ligia Frangello ](https://github.com/frangello), [Dmitry Avezov ](https://github.com/avezov), [Jose Fuentes ](https://github.com/j-fuentes), [Anya Reyes ](https://github.com/darkade), and [BendingBender ](https://github.com/BendingBender). +# Installation +> `npm install --save @types/node-forge` + +# Summary +This package contains type definitions for node-forge (https://github.com/digitalbazaar/forge). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-forge. + +### Additional Details + * Last updated: Tue, 02 Jan 2024 22:35:21 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Seth Westphal ](https://github.com/westy92), [Kay Schecker ](https://github.com/flynetworks), [Aakash Goenka ](https://github.com/a-k-g), [Rafal2228 ](https://github.com/rafal2228), [Beeno Tung ](https://github.com/beenotung), [Joe Flateau ](https://github.com/joeflateau), [timhwang21 ](https://github.com/timhwang21), [Anders Kaseorg ](https://github.com/andersk), [Sascha Zarhuber ](https://github.com/saschazar21), [Rogier Schouten ](https://github.com/rogierschouten), [Ivan Aseev ](https://github.com/aseevia), [Wiktor Kwapisiewicz](https://github.com/wiktor-k), [Ligia Frangello ](https://github.com/frangello), [Dmitry Avezov ](https://github.com/avezov), [Jose Fuentes ](https://github.com/j-fuentes), [Anya Reyes ](https://github.com/darkade), and [BendingBender ](https://github.com/BendingBender). diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index 4646fbd2..a5ece501 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for node (https://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. - -### Additional Details - * Last updated: Fri, 15 Mar 2024 07:35:57 GMT - * Dependencies: [undici-types](https://npmjs.com/package/undici-types) - -# Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for node (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Fri, 15 Mar 2024 07:35:57 GMT + * Dependencies: [undici-types](https://npmjs.com/package/undici-types) + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/node_modules/@types/parse-json/README.md b/node_modules/@types/parse-json/README.md index fb7a8e85..02d25c5c 100644 --- a/node_modules/@types/parse-json/README.md +++ b/node_modules/@types/parse-json/README.md @@ -1,23 +1,23 @@ -# Installation -> `npm install --save @types/parse-json` - -# Summary -This package contains type definitions for parse-json (https://github.com/sindresorhus/parse-json). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-json. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-json/index.d.ts) -````ts +# Installation +> `npm install --save @types/parse-json` + +# Summary +This package contains type definitions for parse-json (https://github.com/sindresorhus/parse-json). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-json. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-json/index.d.ts) +````ts declare function parseJson(input: string | null, filepath?: string): any; declare function parseJson(input: string | null, reviver: (key: any, value: any) => any, filepath?: string): any; export = parseJson; - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 09:09:39 GMT - * Dependencies: none - -# Credits -These definitions were written by [mrmlnc](https://github.com/mrmlnc). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 09:09:39 GMT + * Dependencies: none + +# Credits +These definitions were written by [mrmlnc](https://github.com/mrmlnc). diff --git a/node_modules/@types/prettier/LICENSE b/node_modules/@types/prettier/LICENSE old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/README.md b/node_modules/@types/prettier/README.md old mode 100644 new mode 100755 index 7ba58d35..ca5fb513 --- a/node_modules/@types/prettier/README.md +++ b/node_modules/@types/prettier/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/prettier` - -# Summary -This package contains type definitions for prettier (https://prettier.io). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettier. - -### Additional Details - * Last updated: Wed, 31 May 2023 15:32:50 GMT - * Dependencies: none - * Global values: `prettier` - -# Credits -These definitions were written by [Ika](https://github.com/ikatyang), [Ifiok Jr.](https://github.com/ifiokjr), [Florian Imdahl](https://github.com/ffflorian), [Sosuke Suzuki](https://github.com/sosukesuzuki), [Christopher Quadflieg](https://github.com/Shinigami92), [Georgii Dolzhykov](https://github.com/thorn0), [JounQin](https://github.com/JounQin), [Chuah Chee Shian](https://github.com/shian15810), and [Marc Gibbons](https://github.com/marcgibbons). +# Installation +> `npm install --save @types/prettier` + +# Summary +This package contains type definitions for prettier (https://prettier.io). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettier. + +### Additional Details + * Last updated: Wed, 31 May 2023 15:32:50 GMT + * Dependencies: none + * Global values: `prettier` + +# Credits +These definitions were written by [Ika](https://github.com/ikatyang), [Ifiok Jr.](https://github.com/ifiokjr), [Florian Imdahl](https://github.com/ffflorian), [Sosuke Suzuki](https://github.com/sosukesuzuki), [Christopher Quadflieg](https://github.com/Shinigami92), [Georgii Dolzhykov](https://github.com/thorn0), [JounQin](https://github.com/JounQin), [Chuah Chee Shian](https://github.com/shian15810), and [Marc Gibbons](https://github.com/marcgibbons). diff --git a/node_modules/@types/prettier/doc.d.ts b/node_modules/@types/prettier/doc.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/index.d.ts b/node_modules/@types/prettier/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/package.json b/node_modules/@types/prettier/package.json old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-angular.d.ts b/node_modules/@types/prettier/parser-angular.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-babel.d.ts b/node_modules/@types/prettier/parser-babel.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-espree.d.ts b/node_modules/@types/prettier/parser-espree.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-flow.d.ts b/node_modules/@types/prettier/parser-flow.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-glimmer.d.ts b/node_modules/@types/prettier/parser-glimmer.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-graphql.d.ts b/node_modules/@types/prettier/parser-graphql.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-html.d.ts b/node_modules/@types/prettier/parser-html.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-markdown.d.ts b/node_modules/@types/prettier/parser-markdown.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-meriyah.d.ts b/node_modules/@types/prettier/parser-meriyah.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-postcss.d.ts b/node_modules/@types/prettier/parser-postcss.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-typescript.d.ts b/node_modules/@types/prettier/parser-typescript.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/parser-yaml.d.ts b/node_modules/@types/prettier/parser-yaml.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prettier/standalone.d.ts b/node_modules/@types/prettier/standalone.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/prop-types/README.md b/node_modules/@types/prop-types/README.md index 19331d9d..9da6ba56 100644 --- a/node_modules/@types/prop-types/README.md +++ b/node_modules/@types/prop-types/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/prop-types` - -# Summary -This package contains type definitions for prop-types (https://github.com/reactjs/prop-types). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: none - -# Credits -These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon). +# Installation +> `npm install --save @types/prop-types` + +# Summary +This package contains type definitions for prop-types (https://github.com/reactjs/prop-types). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: none + +# Credits +These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/q/README.md b/node_modules/@types/q/README.md index 75e6dac4..d022d9b2 100644 --- a/node_modules/@types/q/README.md +++ b/node_modules/@types/q/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/q` - -# Summary -This package contains type definitions for q (https://github.com/kriskowal/q). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/q. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 20:08:00 GMT - * Dependencies: none - -# Credits -These definitions were written by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly), [Michel Boudreau](https://github.com/mboudreau), and [TeamworkGuy2](https://github.com/TeamworkGuy2). +# Installation +> `npm install --save @types/q` + +# Summary +This package contains type definitions for q (https://github.com/kriskowal/q). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/q. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 20:08:00 GMT + * Dependencies: none + +# Credits +These definitions were written by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly), [Michel Boudreau](https://github.com/mboudreau), and [TeamworkGuy2](https://github.com/TeamworkGuy2). diff --git a/node_modules/@types/qs/README.md b/node_modules/@types/qs/README.md index 75952790..0c00bb98 100644 --- a/node_modules/@types/qs/README.md +++ b/node_modules/@types/qs/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/qs` - -# Summary -This package contains type definitions for qs (https://github.com/ljharb/qs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs. - -### Additional Details - * Last updated: Mon, 18 Mar 2024 19:06:42 GMT - * Dependencies: none - -# Credits -These definitions were written by [Roman Korneev](https://github.com/RWander), [Leon Yu](https://github.com/leonyu), [Belinda Teh](https://github.com/tehbelinda), [Melvin Lee](https://github.com/zyml), [Arturs Vonda](https://github.com/artursvonda), [Carlos Bonetti](https://github.com/CarlosBonetti), [Dan Smith](https://github.com/dpsmith3), [Hunter Perrin](https://github.com/hperrin), and [Jordan Harband](https://github.com/ljharb). +# Installation +> `npm install --save @types/qs` + +# Summary +This package contains type definitions for qs (https://github.com/ljharb/qs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs. + +### Additional Details + * Last updated: Mon, 18 Mar 2024 19:06:42 GMT + * Dependencies: none + +# Credits +These definitions were written by [Roman Korneev](https://github.com/RWander), [Leon Yu](https://github.com/leonyu), [Belinda Teh](https://github.com/tehbelinda), [Melvin Lee](https://github.com/zyml), [Arturs Vonda](https://github.com/artursvonda), [Carlos Bonetti](https://github.com/CarlosBonetti), [Dan Smith](https://github.com/dpsmith3), [Hunter Perrin](https://github.com/hperrin), and [Jordan Harband](https://github.com/ljharb). diff --git a/node_modules/@types/range-parser/README.md b/node_modules/@types/range-parser/README.md index 2ac5d337..6ab8b0bb 100644 --- a/node_modules/@types/range-parser/README.md +++ b/node_modules/@types/range-parser/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/range-parser` - -# Summary -This package contains type definitions for range-parser (https://github.com/jshttp/range-parser). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser/index.d.ts) -````ts +# Installation +> `npm install --save @types/range-parser` + +# Summary +This package contains type definitions for range-parser (https://github.com/jshttp/range-parser). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser/index.d.ts) +````ts /** * When ranges are returned, the array has a "type" property which is the type of * range that is required (most commonly, "bytes"). Each array element is an object @@ -42,12 +42,12 @@ declare namespace RangeParser { } export = RangeParser; - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 09:09:39 GMT - * Dependencies: none - -# Credits -These definitions were written by [Tomek Åaziuk](https://github.com/tlaziuk). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 09:09:39 GMT + * Dependencies: none + +# Credits +These definitions were written by [Tomek Åaziuk](https://github.com/tlaziuk). diff --git a/node_modules/@types/react-dom/README.md b/node_modules/@types/react-dom/README.md index 28206fbe..64a82e07 100644 --- a/node_modules/@types/react-dom/README.md +++ b/node_modules/@types/react-dom/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/react-dom` - -# Summary -This package contains type definitions for react-dom (https://reactjs.org). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom. - -### Additional Details - * Last updated: Wed, 13 Mar 2024 11:35:23 GMT - * Dependencies: [@types/react](https://npmjs.com/package/@types/react) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon). +# Installation +> `npm install --save @types/react-dom` + +# Summary +This package contains type definitions for react-dom (https://reactjs.org). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom. + +### Additional Details + * Last updated: Wed, 13 Mar 2024 11:35:23 GMT + * Dependencies: [@types/react](https://npmjs.com/package/@types/react) + +# Credits +These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/react/README.md b/node_modules/@types/react/README.md index 9bfdb94d..af9e19d1 100644 --- a/node_modules/@types/react/README.md +++ b/node_modules/@types/react/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/react` - -# Summary -This package contains type definitions for react (https://react.dev/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. - -### Additional Details - * Last updated: Thu, 14 Mar 2024 14:06:54 GMT - * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler), [csstype](https://npmjs.com/package/csstype) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Dale Tan](https://github.com/hellatan), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock). +# Installation +> `npm install --save @types/react` + +# Summary +This package contains type definitions for react (https://react.dev/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. + +### Additional Details + * Last updated: Thu, 14 Mar 2024 14:06:54 GMT + * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler), [csstype](https://npmjs.com/package/csstype) + +# Credits +These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Dale Tan](https://github.com/hellatan), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock). diff --git a/node_modules/@types/resolve/README.md b/node_modules/@types/resolve/README.md index 1e5db65e..5a737227 100644 --- a/node_modules/@types/resolve/README.md +++ b/node_modules/@types/resolve/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/resolve` - -# Summary -This package contains type definitions for resolve (https://github.com/browserify/resolve). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve. - -### Additional Details - * Last updated: Tue, 12 May 2020 23:58:31 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - * Global values: none - -# Credits -These definitions were written by [Mario Nebl](https://github.com/marionebl), and [Klaus Meinhardt](https://github.com/ajafff). +# Installation +> `npm install --save @types/resolve` + +# Summary +This package contains type definitions for resolve (https://github.com/browserify/resolve). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve. + +### Additional Details + * Last updated: Tue, 12 May 2020 23:58:31 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + * Global values: none + +# Credits +These definitions were written by [Mario Nebl](https://github.com/marionebl), and [Klaus Meinhardt](https://github.com/ajafff). diff --git a/node_modules/@types/retry/LICENSE b/node_modules/@types/retry/LICENSE index 21071075..4b1ad51b 100644 --- a/node_modules/@types/retry/LICENSE +++ b/node_modules/@types/retry/LICENSE @@ -1,21 +1,21 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/retry/README.md b/node_modules/@types/retry/README.md index 6bda9ecc..997fefa4 100644 --- a/node_modules/@types/retry/README.md +++ b/node_modules/@types/retry/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/retry` - -# Summary -This package contains type definitions for retry (https://github.com/tim-kos/node-retry). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry - -Additional Details - * Last updated: Thu, 03 Jan 2019 17:45:51 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Stan Goldmann , BendingBender . +# Installation +> `npm install --save @types/retry` + +# Summary +This package contains type definitions for retry (https://github.com/tim-kos/node-retry). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry + +Additional Details + * Last updated: Thu, 03 Jan 2019 17:45:51 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Stan Goldmann , BendingBender . diff --git a/node_modules/@types/scheduler/README.md b/node_modules/@types/scheduler/README.md index b1890d11..abf6cbee 100644 --- a/node_modules/@types/scheduler/README.md +++ b/node_modules/@types/scheduler/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/scheduler` - -# Summary -This package contains type definitions for scheduler (https://reactjs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scheduler. - -### Additional Details - * Last updated: Wed, 22 Nov 2023 00:24:48 GMT - * Dependencies: none - -# Credits -These definitions were written by [Nathan Bierema](https://github.com/Methuselah96), and [Sebastian Silbermann](https://github.com/eps1lon). +# Installation +> `npm install --save @types/scheduler` + +# Summary +This package contains type definitions for scheduler (https://reactjs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scheduler. + +### Additional Details + * Last updated: Wed, 22 Nov 2023 00:24:48 GMT + * Dependencies: none + +# Credits +These definitions were written by [Nathan Bierema](https://github.com/Methuselah96), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/semver/README.md b/node_modules/@types/semver/README.md index 7876eac1..53c7986b 100644 --- a/node_modules/@types/semver/README.md +++ b/node_modules/@types/semver/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/semver` - -# Summary -This package contains type definitions for semver (https://github.com/npm/node-semver). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver. - -### Additional Details - * Last updated: Sat, 24 Feb 2024 16:35:28 GMT - * Dependencies: none - -# Credits -These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [BendingBender](https://github.com/BendingBender), [Lucian Buzzo](https://github.com/LucianBuzzo), [Klaus Meinhardt](https://github.com/ajafff), [ExE Boss](https://github.com/ExE-Boss), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). +# Installation +> `npm install --save @types/semver` + +# Summary +This package contains type definitions for semver (https://github.com/npm/node-semver). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver. + +### Additional Details + * Last updated: Sat, 24 Feb 2024 16:35:28 GMT + * Dependencies: none + +# Credits +These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [BendingBender](https://github.com/BendingBender), [Lucian Buzzo](https://github.com/LucianBuzzo), [Klaus Meinhardt](https://github.com/ajafff), [ExE Boss](https://github.com/ExE-Boss), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). diff --git a/node_modules/@types/send/README.md b/node_modules/@types/send/README.md index 33a0c168..2a4056a3 100644 --- a/node_modules/@types/send/README.md +++ b/node_modules/@types/send/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/send` - -# Summary -This package contains type definitions for send (https://github.com/pillarjs/send). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/send. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Mike Jerred](https://github.com/MikeJerred), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). +# Installation +> `npm install --save @types/send` + +# Summary +This package contains type definitions for send (https://github.com/pillarjs/send). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/send. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Mike Jerred](https://github.com/MikeJerred), and [Piotr BÅ‚ażejewicz](https://github.com/peterblazejewicz). diff --git a/node_modules/@types/serve-index/README.md b/node_modules/@types/serve-index/README.md index 9156599e..efdf6cab 100644 --- a/node_modules/@types/serve-index/README.md +++ b/node_modules/@types/serve-index/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/serve-index` - -# Summary -This package contains type definitions for serve-index (https://github.com/expressjs/serve-index). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index/index.d.ts) -````ts +# Installation +> `npm install --save @types/serve-index` + +# Summary +This package contains type definitions for serve-index (https://github.com/expressjs/serve-index). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index/index.d.ts) +````ts import { Handler } from "express"; import { Stats } from "fs"; @@ -44,12 +44,12 @@ declare namespace serveIndex { } export = serveIndex; - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: [@types/express](https://npmjs.com/package/@types/express) - -# Credits -These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: [@types/express](https://npmjs.com/package/@types/express) + +# Credits +These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff). diff --git a/node_modules/@types/serve-static/README.md b/node_modules/@types/serve-static/README.md index 64bd73ee..199b4aff 100644 --- a/node_modules/@types/serve-static/README.md +++ b/node_modules/@types/serve-static/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/serve-static` - -# Summary -This package contains type definitions for serve-static (https://github.com/expressjs/serve-static). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: [@types/http-errors](https://npmjs.com/package/@types/http-errors), [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Uros Smolnik](https://github.com/urossmolnik), [Linus Unnebäck](https://github.com/LinusU), and [Devansh Jethmalani](https://github.com/devanshj). +# Installation +> `npm install --save @types/serve-static` + +# Summary +This package contains type definitions for serve-static (https://github.com/expressjs/serve-static). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: [@types/http-errors](https://npmjs.com/package/@types/http-errors), [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Uros Smolnik](https://github.com/urossmolnik), [Linus Unnebäck](https://github.com/LinusU), and [Devansh Jethmalani](https://github.com/devanshj). diff --git a/node_modules/@types/sockjs/README.md b/node_modules/@types/sockjs/README.md index 92df9287..8613a2c2 100644 --- a/node_modules/@types/sockjs/README.md +++ b/node_modules/@types/sockjs/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/sockjs` - -# Summary -This package contains type definitions for sockjs (https://github.com/sockjs/sockjs-node). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs/index.d.ts) -````ts +# Installation +> `npm install --save @types/sockjs` + +# Summary +This package contains type definitions for sockjs (https://github.com/sockjs/sockjs-node). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sockjs/index.d.ts) +````ts /// import http = require("http"); @@ -58,12 +58,12 @@ export interface Connection extends NodeJS.ReadWriteStream { on(event: "close", listener: () => void): this; on(event: string, listener: Function): this; } - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing). diff --git a/node_modules/@types/stack-utils/README.md b/node_modules/@types/stack-utils/README.md index cc85c54b..1a305cdc 100644 --- a/node_modules/@types/stack-utils/README.md +++ b/node_modules/@types/stack-utils/README.md @@ -1,13 +1,13 @@ -# Installation -> `npm install --save @types/stack-utils` - -# Summary -This package contains type definitions for stack-utils (https://github.com/tapjs/stack-utils#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils/index.d.ts) -````ts +# Installation +> `npm install --save @types/stack-utils` + +# Summary +This package contains type definitions for stack-utils (https://github.com/tapjs/stack-utils#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils. +## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils/index.d.ts) +````ts export = StackUtils; declare class StackUtils { @@ -67,12 +67,12 @@ declare namespace StackUtils { method?: string | undefined; } } - -```` - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: none - -# Credits -These definitions were written by [BendingBender](https://github.com/BendingBender). + +```` + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: none + +# Credits +These definitions were written by [BendingBender](https://github.com/BendingBender). diff --git a/node_modules/@types/testing-library__jest-dom/LICENSE b/node_modules/@types/testing-library__jest-dom/LICENSE old mode 100644 new mode 100755 diff --git a/node_modules/@types/testing-library__jest-dom/README.md b/node_modules/@types/testing-library__jest-dom/README.md old mode 100644 new mode 100755 index 1831bd63..bc27efe9 --- a/node_modules/@types/testing-library__jest-dom/README.md +++ b/node_modules/@types/testing-library__jest-dom/README.md @@ -1,16 +1,16 @@ -# Installation -> `npm install --save @types/testing-library__jest-dom` - -# Summary -This package contains type definitions for @testing-library/jest-dom (https://github.com/testing-library/jest-dom). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__jest-dom. - -### Additional Details - * Last updated: Mon, 24 Jul 2023 21:02:54 GMT - * Dependencies: [@types/jest](https://npmjs.com/package/@types/jest) - * Global values: none - -# Credits -These definitions were written by [Ernesto García](https://github.com/gnapse), [John Gozde](https://github.com/jgoz), [Seth Macpherson](https://github.com/smacpherson64), and [Andrew Leedham](https://github.com/AndrewLeedham). +# Installation +> `npm install --save @types/testing-library__jest-dom` + +# Summary +This package contains type definitions for @testing-library/jest-dom (https://github.com/testing-library/jest-dom). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__jest-dom. + +### Additional Details + * Last updated: Mon, 24 Jul 2023 21:02:54 GMT + * Dependencies: [@types/jest](https://npmjs.com/package/@types/jest) + * Global values: none + +# Credits +These definitions were written by [Ernesto García](https://github.com/gnapse), [John Gozde](https://github.com/jgoz), [Seth Macpherson](https://github.com/smacpherson64), and [Andrew Leedham](https://github.com/AndrewLeedham). diff --git a/node_modules/@types/testing-library__jest-dom/index.d.ts b/node_modules/@types/testing-library__jest-dom/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/testing-library__jest-dom/matchers.d.ts b/node_modules/@types/testing-library__jest-dom/matchers.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/@types/testing-library__jest-dom/package.json b/node_modules/@types/testing-library__jest-dom/package.json old mode 100644 new mode 100755 diff --git a/node_modules/@types/trusted-types/README.md b/node_modules/@types/trusted-types/README.md index 251cfea9..fb376e79 100644 --- a/node_modules/@types/trusted-types/README.md +++ b/node_modules/@types/trusted-types/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/trusted-types` - -# Summary -This package contains type definitions for trusted-types (https://github.com/WICG/trusted-types). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trusted-types. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: none - -# Credits -These definitions were written by [Jakub Vrana](https://github.com/vrana), [Damien Engels](https://github.com/engelsdamien), [Emanuel Tesar](https://github.com/siegrift), [Bjarki](https://github.com/bjarkler), and [Sebastian Silbermann](https://github.com/eps1lon). +# Installation +> `npm install --save @types/trusted-types` + +# Summary +This package contains type definitions for trusted-types (https://github.com/WICG/trusted-types). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trusted-types. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: none + +# Credits +These definitions were written by [Jakub Vrana](https://github.com/vrana), [Damien Engels](https://github.com/engelsdamien), [Emanuel Tesar](https://github.com/siegrift), [Bjarki](https://github.com/bjarkler), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/ws/README.md b/node_modules/@types/ws/README.md index 3b4871b8..7044802c 100644 --- a/node_modules/@types/ws/README.md +++ b/node_modules/@types/ws/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/ws` - -# Summary -This package contains type definitions for ws (https://github.com/websockets/ws). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit). +# Installation +> `npm install --save @types/ws` + +# Summary +This package contains type definitions for ws (https://github.com/websockets/ws). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit). diff --git a/node_modules/@types/yargs-parser/README.md b/node_modules/@types/yargs-parser/README.md index 47ff5a8e..74ad4e74 100644 --- a/node_modules/@types/yargs-parser/README.md +++ b/node_modules/@types/yargs-parser/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/yargs-parser` - -# Summary -This package contains type definitions for yargs-parser (https://github.com/yargs/yargs-parser#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 21:36:25 GMT - * Dependencies: none - -# Credits -These definitions were written by [Miles Johnson](https://github.com/milesj). +# Installation +> `npm install --save @types/yargs-parser` + +# Summary +This package contains type definitions for yargs-parser (https://github.com/yargs/yargs-parser#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 21:36:25 GMT + * Dependencies: none + +# Credits +These definitions were written by [Miles Johnson](https://github.com/milesj). diff --git a/node_modules/@types/yargs/README.md b/node_modules/@types/yargs/README.md index 6acd40ed..d196499f 100644 --- a/node_modules/@types/yargs/README.md +++ b/node_modules/@types/yargs/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/yargs` - -# Summary -This package contains type definitions for yargs (https://github.com/chevex/yargs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs/v16. - -### Additional Details - * Last updated: Mon, 20 Nov 2023 23:36:24 GMT - * Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser) - -# Credits -These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken ValvÃ¥g](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), and [Aankhen](https://github.com/Aankhen). +# Installation +> `npm install --save @types/yargs` + +# Summary +This package contains type definitions for yargs (https://github.com/chevex/yargs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs/v16. + +### Additional Details + * Last updated: Mon, 20 Nov 2023 23:36:24 GMT + * Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser) + +# Credits +These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken ValvÃ¥g](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), and [Aankhen](https://github.com/Aankhen). diff --git a/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/index.d.ts index 0dcf85e7..9c41390f 100644 --- a/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/index.d.ts @@ -1,2 +1,2 @@ -export * from '@typescript-eslint/utils'; -//# sourceMappingURL=index.d.ts.map +export * from '@typescript-eslint/utils'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts index 7d073aa1..84dee389 100644 --- a/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts @@ -1,8 +1,8 @@ -export { parse, parseForESLint, ParserOptions } from './parser'; -export { ParserServices, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree'; -export declare const version: string; -export declare const meta: { - name: string; - version: string; -}; -//# sourceMappingURL=index.d.ts.map +export { parse, parseForESLint, ParserOptions } from './parser'; +export { ParserServices, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree'; +export declare const version: string; +export declare const meta: { + name: string; + version: string; +}; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts b/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts index fc001527..6d9cb66b 100644 --- a/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +++ b/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts @@ -1,22 +1,22 @@ -import { ScopeManager } from '@typescript-eslint/scope-manager'; -import { TSESTree } from '@typescript-eslint/types'; -import { ParserOptions } from '@typescript-eslint/types'; -import { ParserServices } from '@typescript-eslint/typescript-estree'; -import { visitorKeys } from '@typescript-eslint/typescript-estree'; -interface ParseForESLintResult { - ast: TSESTree.Program & { - range?: [ - number, - number - ]; - tokens?: TSESTree.Token[]; - comments?: TSESTree.Comment[]; - }; - services: ParserServices; - visitorKeys: typeof visitorKeys; - scopeManager: ScopeManager; -} -declare function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast']; -declare function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult; -export { parse, parseForESLint, ParserOptions }; -//# sourceMappingURL=parser.d.ts.map +import { ScopeManager } from '@typescript-eslint/scope-manager'; +import { TSESTree } from '@typescript-eslint/types'; +import { ParserOptions } from '@typescript-eslint/types'; +import { ParserServices } from '@typescript-eslint/typescript-estree'; +import { visitorKeys } from '@typescript-eslint/typescript-estree'; +interface ParseForESLintResult { + ast: TSESTree.Program & { + range?: [ + number, + number + ]; + tokens?: TSESTree.Token[]; + comments?: TSESTree.Comment[]; + }; + services: ParserServices; + visitorKeys: typeof visitorKeys; + scopeManager: ScopeManager; +} +declare function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast']; +declare function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult; +export { parse, parseForESLint, ParserOptions }; +//# sourceMappingURL=parser.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts index 96c5241c..09557967 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts @@ -1,10 +1,10 @@ -import * as ts from 'typescript'; -/** - * @param type Type being checked by name. - * @param allowAny Whether to consider `any` and `unknown` to match. - * @param allowedNames Symbol names checking on the type. - * @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts. - * @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true). - */ -export declare function containsAllTypesByName(type: ts.Type, allowAny: boolean, allowedNames: Set, matchAnyInstead?: boolean): boolean; -//# sourceMappingURL=containsAllTypesByName.d.ts.map +import * as ts from 'typescript'; +/** + * @param type Type being checked by name. + * @param allowAny Whether to consider `any` and `unknown` to match. + * @param allowedNames Symbol names checking on the type. + * @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts. + * @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true). + */ +export declare function containsAllTypesByName(type: ts.Type, allowAny: boolean, allowedNames: Set, matchAnyInstead?: boolean): boolean; +//# sourceMappingURL=containsAllTypesByName.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts index 420102fe..35798712 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts @@ -1,6 +1,6 @@ -import * as ts from 'typescript'; -/** - * Resolves the given node's type. Will resolve to the type's generic constraint, if it has one. - */ -export declare function getConstrainedTypeAtLocation(checker: ts.TypeChecker, node: ts.Node): ts.Type; -//# sourceMappingURL=getConstrainedTypeAtLocation.d.ts.map +import * as ts from 'typescript'; +/** + * Resolves the given node's type. Will resolve to the type's generic constraint, if it has one. + */ +export declare function getConstrainedTypeAtLocation(checker: ts.TypeChecker, node: ts.Node): ts.Type; +//# sourceMappingURL=getConstrainedTypeAtLocation.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts index 3b412435..44bb8ab7 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts @@ -1,8 +1,8 @@ -import * as ts from 'typescript'; -/** - * Returns the contextual type of a given node. - * Contextual type is the type of the target the node is going into. - * i.e. the type of a called function's parameter, or the defined type of a variable declaration - */ -export declare function getContextualType(checker: ts.TypeChecker, node: ts.Expression): ts.Type | undefined; -//# sourceMappingURL=getContextualType.d.ts.map +import * as ts from 'typescript'; +/** + * Returns the contextual type of a given node. + * Contextual type is the type of the target the node is going into. + * i.e. the type of a called function's parameter, or the defined type of a variable declaration + */ +export declare function getContextualType(checker: ts.TypeChecker, node: ts.Expression): ts.Type | undefined; +//# sourceMappingURL=getContextualType.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts index b64eec2b..a7d65089 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts @@ -1,6 +1,6 @@ -import * as ts from 'typescript'; -/** - * Gets the declaration for the given variable - */ -export declare function getDeclaration(checker: ts.TypeChecker, node: ts.Expression): ts.Declaration | null; -//# sourceMappingURL=getDeclaration.d.ts.map +import * as ts from 'typescript'; +/** + * Gets the declaration for the given variable + */ +export declare function getDeclaration(checker: ts.TypeChecker, node: ts.Expression): ts.Declaration | null; +//# sourceMappingURL=getDeclaration.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts index 067b618e..4855880f 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts @@ -1,6 +1,6 @@ -import * as ts from 'typescript'; -/** - * Gets the source file for a given node - */ -export declare function getSourceFileOfNode(node: ts.Node): ts.SourceFile; -//# sourceMappingURL=getSourceFileOfNode.d.ts.map +import * as ts from 'typescript'; +/** + * Gets the source file for a given node + */ +export declare function getSourceFileOfNode(node: ts.Node): ts.SourceFile; +//# sourceMappingURL=getSourceFileOfNode.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts index 367d74ea..c63d0820 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts @@ -1,3 +1,3 @@ -import * as ts from 'typescript'; -export declare function getTokenAtPosition(sourceFile: ts.SourceFile, position: number): ts.Node; -//# sourceMappingURL=getTokenAtPosition.d.ts.map +import * as ts from 'typescript'; +export declare function getTokenAtPosition(sourceFile: ts.SourceFile, position: number): ts.Node; +//# sourceMappingURL=getTokenAtPosition.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts index 9ee4c113..6214de79 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts @@ -1,3 +1,3 @@ -import * as ts from 'typescript'; -export declare function getTypeArguments(type: ts.TypeReference, checker: ts.TypeChecker): readonly ts.Type[]; -//# sourceMappingURL=getTypeArguments.d.ts.map +import * as ts from 'typescript'; +export declare function getTypeArguments(type: ts.TypeReference, checker: ts.TypeChecker): readonly ts.Type[]; +//# sourceMappingURL=getTypeArguments.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts index 8f34e66f..1d46b978 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts @@ -1,8 +1,8 @@ -import * as ts from 'typescript'; -/** - * Get the type name of a given type. - * @param typeChecker The context sensitive TypeScript TypeChecker. - * @param type The type to get the name of. - */ -export declare function getTypeName(typeChecker: ts.TypeChecker, type: ts.Type): string; -//# sourceMappingURL=getTypeName.d.ts.map +import * as ts from 'typescript'; +/** + * Get the type name of a given type. + * @param typeChecker The context sensitive TypeScript TypeChecker. + * @param type The type to get the name of. + */ +export declare function getTypeName(typeChecker: ts.TypeChecker, type: ts.Type): string; +//# sourceMappingURL=getTypeName.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts index 4ab3189f..fbdc620a 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts @@ -1,16 +1,16 @@ -export * from './containsAllTypesByName'; -export * from './getConstrainedTypeAtLocation'; -export * from './getContextualType'; -export * from './getDeclaration'; -export * from './getSourceFileOfNode'; -export * from './getTokenAtPosition'; -export * from './getTypeArguments'; -export * from './getTypeName'; -export * from './isTypeReadonly'; -export * from './isUnsafeAssignment'; -export * from './predicates'; -export * from './propertyTypes'; -export * from './requiresQuoting'; -export * from './typeFlagUtils'; -export { getDecorators, getModifiers, typescriptVersionIsAtLeast, } from '@typescript-eslint/typescript-estree'; -//# sourceMappingURL=index.d.ts.map +export * from './containsAllTypesByName'; +export * from './getConstrainedTypeAtLocation'; +export * from './getContextualType'; +export * from './getDeclaration'; +export * from './getSourceFileOfNode'; +export * from './getTokenAtPosition'; +export * from './getTypeArguments'; +export * from './getTypeName'; +export * from './isTypeReadonly'; +export * from './isUnsafeAssignment'; +export * from './predicates'; +export * from './propertyTypes'; +export * from './requiresQuoting'; +export * from './typeFlagUtils'; +export { getDecorators, getModifiers, typescriptVersionIsAtLeast, } from '@typescript-eslint/typescript-estree'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts index c81cf5b2..4ab19b5e 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts @@ -1,20 +1,20 @@ -import * as ts from 'typescript'; -export interface ReadonlynessOptions { - readonly treatMethodsAsReadonly?: boolean; -} -export declare const readonlynessOptionsSchema: { - type: string; - additionalProperties: boolean; - properties: { - treatMethodsAsReadonly: { - type: string; - }; - }; -}; -export declare const readonlynessOptionsDefaults: ReadonlynessOptions; -/** - * Checks if the given type is readonly - */ -declare function isTypeReadonly(checker: ts.TypeChecker, type: ts.Type, options?: ReadonlynessOptions): boolean; -export { isTypeReadonly }; -//# sourceMappingURL=isTypeReadonly.d.ts.map +import * as ts from 'typescript'; +export interface ReadonlynessOptions { + readonly treatMethodsAsReadonly?: boolean; +} +export declare const readonlynessOptionsSchema: { + type: string; + additionalProperties: boolean; + properties: { + treatMethodsAsReadonly: { + type: string; + }; + }; +}; +export declare const readonlynessOptionsDefaults: ReadonlynessOptions; +/** + * Checks if the given type is readonly + */ +declare function isTypeReadonly(checker: ts.TypeChecker, type: ts.Type, options?: ReadonlynessOptions): boolean; +export { isTypeReadonly }; +//# sourceMappingURL=isTypeReadonly.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts index 7cb7a8c3..dd379ebc 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts @@ -1,17 +1,17 @@ -import { TSESTree } from '@typescript-eslint/utils'; -import * as ts from 'typescript'; -/** - * Does a simple check to see if there is an any being assigned to a non-any type. - * - * This also checks generic positions to ensure there's no unsafe sub-assignments. - * Note: in the case of generic positions, it makes the assumption that the two types are the same. - * - * @example See tests for examples - * - * @returns false if it's safe, or an object with the two types if it's unsafe - */ -export declare function isUnsafeAssignment(type: ts.Type, receiver: ts.Type, checker: ts.TypeChecker, senderNode: TSESTree.Node | null): false | { - sender: ts.Type; - receiver: ts.Type; -}; -//# sourceMappingURL=isUnsafeAssignment.d.ts.map +import { TSESTree } from '@typescript-eslint/utils'; +import * as ts from 'typescript'; +/** + * Does a simple check to see if there is an any being assigned to a non-any type. + * + * This also checks generic positions to ensure there's no unsafe sub-assignments. + * Note: in the case of generic positions, it makes the assumption that the two types are the same. + * + * @example See tests for examples + * + * @returns false if it's safe, or an object with the two types if it's unsafe + */ +export declare function isUnsafeAssignment(type: ts.Type, receiver: ts.Type, checker: ts.TypeChecker, senderNode: TSESTree.Node | null): false | { + sender: ts.Type; + receiver: ts.Type; +}; +//# sourceMappingURL=isUnsafeAssignment.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts index f74520fa..895f5064 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts @@ -1,52 +1,52 @@ -import * as ts from 'typescript'; -/** - * Checks if the given type is (or accepts) nullable - * @param isReceiver true if the type is a receiving type (i.e. the type of a called function's parameter) - */ -export declare function isNullableType(type: ts.Type, { isReceiver, allowUndefined, }?: { - isReceiver?: boolean; - allowUndefined?: boolean; -}): boolean; -/** - * Checks if the given type is either an array type, - * or a union made up solely of array types. - */ -export declare function isTypeArrayTypeOrUnionOfArrayTypes(type: ts.Type, checker: ts.TypeChecker): boolean; -/** - * @returns true if the type is `never` - */ -export declare function isTypeNeverType(type: ts.Type): boolean; -/** - * @returns true if the type is `unknown` - */ -export declare function isTypeUnknownType(type: ts.Type): boolean; -export declare function isTypeReferenceType(type: ts.Type): type is ts.TypeReference; -/** - * @returns true if the type is `any` - */ -export declare function isTypeAnyType(type: ts.Type): boolean; -/** - * @returns true if the type is `any[]` - */ -export declare function isTypeAnyArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; -/** - * @returns true if the type is `unknown[]` - */ -export declare function isTypeUnknownArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; -export declare enum AnyType { - Any = 0, - AnyArray = 1, - Safe = 2 -} -/** - * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`, - * otherwise it returns `AnyType.Safe`. - */ -export declare function isAnyOrAnyArrayTypeDiscriminated(node: ts.Node, checker: ts.TypeChecker): AnyType; -/** - * @returns Whether a type is an instance of the parent type, including for the parent's base types. - */ -export declare function typeIsOrHasBaseType(type: ts.Type, parentType: ts.Type): boolean; -export declare function isTypeBigIntLiteralType(type: ts.Type): type is ts.BigIntLiteralType; -export declare function isTypeTemplateLiteralType(type: ts.Type): type is ts.TemplateLiteralType; -//# sourceMappingURL=predicates.d.ts.map +import * as ts from 'typescript'; +/** + * Checks if the given type is (or accepts) nullable + * @param isReceiver true if the type is a receiving type (i.e. the type of a called function's parameter) + */ +export declare function isNullableType(type: ts.Type, { isReceiver, allowUndefined, }?: { + isReceiver?: boolean; + allowUndefined?: boolean; +}): boolean; +/** + * Checks if the given type is either an array type, + * or a union made up solely of array types. + */ +export declare function isTypeArrayTypeOrUnionOfArrayTypes(type: ts.Type, checker: ts.TypeChecker): boolean; +/** + * @returns true if the type is `never` + */ +export declare function isTypeNeverType(type: ts.Type): boolean; +/** + * @returns true if the type is `unknown` + */ +export declare function isTypeUnknownType(type: ts.Type): boolean; +export declare function isTypeReferenceType(type: ts.Type): type is ts.TypeReference; +/** + * @returns true if the type is `any` + */ +export declare function isTypeAnyType(type: ts.Type): boolean; +/** + * @returns true if the type is `any[]` + */ +export declare function isTypeAnyArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; +/** + * @returns true if the type is `unknown[]` + */ +export declare function isTypeUnknownArrayType(type: ts.Type, checker: ts.TypeChecker): boolean; +export declare enum AnyType { + Any = 0, + AnyArray = 1, + Safe = 2 +} +/** + * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`, + * otherwise it returns `AnyType.Safe`. + */ +export declare function isAnyOrAnyArrayTypeDiscriminated(node: ts.Node, checker: ts.TypeChecker): AnyType; +/** + * @returns Whether a type is an instance of the parent type, including for the parent's base types. + */ +export declare function typeIsOrHasBaseType(type: ts.Type, parentType: ts.Type): boolean; +export declare function isTypeBigIntLiteralType(type: ts.Type): type is ts.BigIntLiteralType; +export declare function isTypeTemplateLiteralType(type: ts.Type): type is ts.TemplateLiteralType; +//# sourceMappingURL=predicates.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts index 4dba5864..c7c0156b 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts @@ -1,4 +1,4 @@ -import * as ts from 'typescript'; -export declare function getTypeOfPropertyOfName(checker: ts.TypeChecker, type: ts.Type, name: string, escapedName?: ts.__String): ts.Type | undefined; -export declare function getTypeOfPropertyOfType(checker: ts.TypeChecker, type: ts.Type, property: ts.Symbol): ts.Type | undefined; -//# sourceMappingURL=propertyTypes.d.ts.map +import * as ts from 'typescript'; +export declare function getTypeOfPropertyOfName(checker: ts.TypeChecker, type: ts.Type, name: string, escapedName?: ts.__String): ts.Type | undefined; +export declare function getTypeOfPropertyOfType(checker: ts.TypeChecker, type: ts.Type, property: ts.Symbol): ts.Type | undefined; +//# sourceMappingURL=propertyTypes.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts index a6426f3b..aa63f84c 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts @@ -1,4 +1,4 @@ -import * as ts from 'typescript'; -declare function requiresQuoting(name: string, target?: ts.ScriptTarget): boolean; -export { requiresQuoting }; -//# sourceMappingURL=requiresQuoting.d.ts.map +import * as ts from 'typescript'; +declare function requiresQuoting(name: string, target?: ts.ScriptTarget): boolean; +export { requiresQuoting }; +//# sourceMappingURL=requiresQuoting.d.ts.map diff --git a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts index ad1e6293..956076dc 100644 --- a/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +++ b/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts @@ -1,16 +1,16 @@ -import * as ts from 'typescript'; -/** - * Gets all of the type flags in a type, iterating through unions automatically. - */ -export declare function getTypeFlags(type: ts.Type): ts.TypeFlags; -/** - * @param flagsToCheck The composition of one or more `ts.TypeFlags`. - * @param isReceiver Whether the type is a receiving type (e.g. the type of a - * called function's parameter). - * @remarks - * Note that if the type is a union, this function will decompose it into the - * parts and get the flags of every union constituent. If this is not desired, - * use the `isTypeFlag` function from tsutils. - */ -export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: ts.TypeFlags, isReceiver?: boolean): boolean; -//# sourceMappingURL=typeFlagUtils.d.ts.map +import * as ts from 'typescript'; +/** + * Gets all of the type flags in a type, iterating through unions automatically. + */ +export declare function getTypeFlags(type: ts.Type): ts.TypeFlags; +/** + * @param flagsToCheck The composition of one or more `ts.TypeFlags`. + * @param isReceiver Whether the type is a receiving type (e.g. the type of a + * called function's parameter). + * @remarks + * Note that if the type is a union, this function will decompose it into the + * parts and get the flags of every union constituent. If this is not desired, + * use the `isTypeFlag` function from tsutils. + */ +export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: ts.TypeFlags, isReceiver?: boolean): boolean; +//# sourceMappingURL=typeFlagUtils.d.ts.map diff --git a/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts b/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts index e8ccf472..fbb09ffa 100644 --- a/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +++ b/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts @@ -1,1806 +1,1806 @@ -/********************************************** - * DO NOT MODIFY THIS FILE MANUALLY * - * * - * THIS FILE HAS BEEN COPIED FROM ast-spec. * - * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * - * * - * MAKE CHANGES TO ast-spec AND THEN RUN * - * yarn build * - **********************************************/ -import { SyntaxKind } from 'typescript'; -export declare type Accessibility = 'private' | 'protected' | 'public'; -export declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName; -export declare interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { - type: AST_NODE_TYPES.AccessorProperty; -} -export declare interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.AccessorProperty; -} -export declare interface ArrayExpression extends BaseNode { - type: AST_NODE_TYPES.ArrayExpression; - /** - * an element will be `null` in the case of a sparse array: `[1, ,3]` - */ - elements: (Expression | SpreadElement | null)[]; -} -export declare interface ArrayPattern extends BaseNode { - type: AST_NODE_TYPES.ArrayPattern; - elements: (DestructuringPattern | null)[]; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} -export declare interface ArrowFunctionExpression extends BaseNode { - type: AST_NODE_TYPES.ArrowFunctionExpression; - generator: boolean; - id: null; - params: Parameter[]; - body: BlockStatement | Expression; - async: boolean; - expression: boolean; - returnType?: TSTypeAnnotation; - typeParameters?: TSTypeParameterDeclaration; -} -export declare interface AssignmentExpression extends BaseNode { - type: AST_NODE_TYPES.AssignmentExpression; - operator: ValueOf; - left: Expression; - right: Expression; -} -export declare interface AssignmentOperatorToText { - [SyntaxKind.EqualsToken]: '='; - [SyntaxKind.PlusEqualsToken]: '+='; - [SyntaxKind.MinusEqualsToken]: '-='; - [SyntaxKind.AsteriskEqualsToken]: '*='; - [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; - [SyntaxKind.SlashEqualsToken]: '/='; - [SyntaxKind.PercentEqualsToken]: '%='; - [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; - [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; - [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; - [SyntaxKind.AmpersandEqualsToken]: '&='; - [SyntaxKind.BarEqualsToken]: '|='; - [SyntaxKind.BarBarEqualsToken]: '||='; - [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; - [SyntaxKind.QuestionQuestionEqualsToken]: '??='; - [SyntaxKind.CaretEqualsToken]: '^='; -} -export declare interface AssignmentPattern extends BaseNode { - type: AST_NODE_TYPES.AssignmentPattern; - left: BindingName; - right: Expression; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} -export declare enum AST_NODE_TYPES { - AccessorProperty = "AccessorProperty", - ArrayExpression = "ArrayExpression", - ArrayPattern = "ArrayPattern", - ArrowFunctionExpression = "ArrowFunctionExpression", - AssignmentExpression = "AssignmentExpression", - AssignmentPattern = "AssignmentPattern", - AwaitExpression = "AwaitExpression", - BinaryExpression = "BinaryExpression", - BlockStatement = "BlockStatement", - BreakStatement = "BreakStatement", - CallExpression = "CallExpression", - CatchClause = "CatchClause", - ChainExpression = "ChainExpression", - ClassBody = "ClassBody", - ClassDeclaration = "ClassDeclaration", - ClassExpression = "ClassExpression", - ConditionalExpression = "ConditionalExpression", - ContinueStatement = "ContinueStatement", - DebuggerStatement = "DebuggerStatement", - Decorator = "Decorator", - DoWhileStatement = "DoWhileStatement", - EmptyStatement = "EmptyStatement", - ExportAllDeclaration = "ExportAllDeclaration", - ExportDefaultDeclaration = "ExportDefaultDeclaration", - ExportNamedDeclaration = "ExportNamedDeclaration", - ExportSpecifier = "ExportSpecifier", - ExpressionStatement = "ExpressionStatement", - ForInStatement = "ForInStatement", - ForOfStatement = "ForOfStatement", - ForStatement = "ForStatement", - FunctionDeclaration = "FunctionDeclaration", - FunctionExpression = "FunctionExpression", - Identifier = "Identifier", - IfStatement = "IfStatement", - ImportAttribute = "ImportAttribute", - ImportDeclaration = "ImportDeclaration", - ImportDefaultSpecifier = "ImportDefaultSpecifier", - ImportExpression = "ImportExpression", - ImportNamespaceSpecifier = "ImportNamespaceSpecifier", - ImportSpecifier = "ImportSpecifier", - JSXAttribute = "JSXAttribute", - JSXClosingElement = "JSXClosingElement", - JSXClosingFragment = "JSXClosingFragment", - JSXElement = "JSXElement", - JSXEmptyExpression = "JSXEmptyExpression", - JSXExpressionContainer = "JSXExpressionContainer", - JSXFragment = "JSXFragment", - JSXIdentifier = "JSXIdentifier", - JSXMemberExpression = "JSXMemberExpression", - JSXNamespacedName = "JSXNamespacedName", - JSXOpeningElement = "JSXOpeningElement", - JSXOpeningFragment = "JSXOpeningFragment", - JSXSpreadAttribute = "JSXSpreadAttribute", - JSXSpreadChild = "JSXSpreadChild", - JSXText = "JSXText", - LabeledStatement = "LabeledStatement", - Literal = "Literal", - LogicalExpression = "LogicalExpression", - MemberExpression = "MemberExpression", - MetaProperty = "MetaProperty", - MethodDefinition = "MethodDefinition", - NewExpression = "NewExpression", - ObjectExpression = "ObjectExpression", - ObjectPattern = "ObjectPattern", - PrivateIdentifier = "PrivateIdentifier", - Program = "Program", - Property = "Property", - PropertyDefinition = "PropertyDefinition", - RestElement = "RestElement", - ReturnStatement = "ReturnStatement", - SequenceExpression = "SequenceExpression", - SpreadElement = "SpreadElement", - StaticBlock = "StaticBlock", - Super = "Super", - SwitchCase = "SwitchCase", - SwitchStatement = "SwitchStatement", - TaggedTemplateExpression = "TaggedTemplateExpression", - TemplateElement = "TemplateElement", - TemplateLiteral = "TemplateLiteral", - ThisExpression = "ThisExpression", - ThrowStatement = "ThrowStatement", - TryStatement = "TryStatement", - UnaryExpression = "UnaryExpression", - UpdateExpression = "UpdateExpression", - VariableDeclaration = "VariableDeclaration", - VariableDeclarator = "VariableDeclarator", - WhileStatement = "WhileStatement", - WithStatement = "WithStatement", - YieldExpression = "YieldExpression", - /** - * TS-prefixed nodes - */ - TSAbstractAccessorProperty = "TSAbstractAccessorProperty", - TSAbstractKeyword = "TSAbstractKeyword", - TSAbstractMethodDefinition = "TSAbstractMethodDefinition", - TSAbstractPropertyDefinition = "TSAbstractPropertyDefinition", - TSAnyKeyword = "TSAnyKeyword", - TSArrayType = "TSArrayType", - TSAsExpression = "TSAsExpression", - TSAsyncKeyword = "TSAsyncKeyword", - TSBigIntKeyword = "TSBigIntKeyword", - TSBooleanKeyword = "TSBooleanKeyword", - TSCallSignatureDeclaration = "TSCallSignatureDeclaration", - TSClassImplements = "TSClassImplements", - TSConditionalType = "TSConditionalType", - TSConstructorType = "TSConstructorType", - TSConstructSignatureDeclaration = "TSConstructSignatureDeclaration", - TSDeclareFunction = "TSDeclareFunction", - TSDeclareKeyword = "TSDeclareKeyword", - TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression", - TSEnumDeclaration = "TSEnumDeclaration", - TSEnumMember = "TSEnumMember", - TSExportAssignment = "TSExportAssignment", - TSExportKeyword = "TSExportKeyword", - TSExternalModuleReference = "TSExternalModuleReference", - TSFunctionType = "TSFunctionType", - TSInstantiationExpression = "TSInstantiationExpression", - TSImportEqualsDeclaration = "TSImportEqualsDeclaration", - TSImportType = "TSImportType", - TSIndexedAccessType = "TSIndexedAccessType", - TSIndexSignature = "TSIndexSignature", - TSInferType = "TSInferType", - TSInterfaceBody = "TSInterfaceBody", - TSInterfaceDeclaration = "TSInterfaceDeclaration", - TSInterfaceHeritage = "TSInterfaceHeritage", - TSIntersectionType = "TSIntersectionType", - TSIntrinsicKeyword = "TSIntrinsicKeyword", - TSLiteralType = "TSLiteralType", - TSMappedType = "TSMappedType", - TSMethodSignature = "TSMethodSignature", - TSModuleBlock = "TSModuleBlock", - TSModuleDeclaration = "TSModuleDeclaration", - TSNamedTupleMember = "TSNamedTupleMember", - TSNamespaceExportDeclaration = "TSNamespaceExportDeclaration", - TSNeverKeyword = "TSNeverKeyword", - TSNonNullExpression = "TSNonNullExpression", - TSNullKeyword = "TSNullKeyword", - TSNumberKeyword = "TSNumberKeyword", - TSObjectKeyword = "TSObjectKeyword", - TSOptionalType = "TSOptionalType", - TSParameterProperty = "TSParameterProperty", - TSPrivateKeyword = "TSPrivateKeyword", - TSPropertySignature = "TSPropertySignature", - TSProtectedKeyword = "TSProtectedKeyword", - TSPublicKeyword = "TSPublicKeyword", - TSQualifiedName = "TSQualifiedName", - TSReadonlyKeyword = "TSReadonlyKeyword", - TSRestType = "TSRestType", - TSSatisfiesExpression = "TSSatisfiesExpression", - TSStaticKeyword = "TSStaticKeyword", - TSStringKeyword = "TSStringKeyword", - TSSymbolKeyword = "TSSymbolKeyword", - TSTemplateLiteralType = "TSTemplateLiteralType", - TSThisType = "TSThisType", - TSTupleType = "TSTupleType", - TSTypeAliasDeclaration = "TSTypeAliasDeclaration", - TSTypeAnnotation = "TSTypeAnnotation", - TSTypeAssertion = "TSTypeAssertion", - TSTypeLiteral = "TSTypeLiteral", - TSTypeOperator = "TSTypeOperator", - TSTypeParameter = "TSTypeParameter", - TSTypeParameterDeclaration = "TSTypeParameterDeclaration", - TSTypeParameterInstantiation = "TSTypeParameterInstantiation", - TSTypePredicate = "TSTypePredicate", - TSTypeQuery = "TSTypeQuery", - TSTypeReference = "TSTypeReference", - TSUndefinedKeyword = "TSUndefinedKeyword", - TSUnionType = "TSUnionType", - TSUnknownKeyword = "TSUnknownKeyword", - TSVoidKeyword = "TSVoidKeyword" -} -export declare enum AST_TOKEN_TYPES { - Boolean = "Boolean", - Identifier = "Identifier", - JSXIdentifier = "JSXIdentifier", - JSXText = "JSXText", - Keyword = "Keyword", - Null = "Null", - Numeric = "Numeric", - Punctuator = "Punctuator", - RegularExpression = "RegularExpression", - String = "String", - Template = "Template", - Block = "Block", - Line = "Line" -} -export declare interface AwaitExpression extends BaseNode { - type: AST_NODE_TYPES.AwaitExpression; - argument: Expression; -} -export declare interface BaseNode extends NodeOrTokenData { - type: AST_NODE_TYPES; -} -declare interface BaseToken extends NodeOrTokenData { - type: AST_TOKEN_TYPES; - value: string; -} -export declare interface BigIntLiteral extends LiteralBase { - value: bigint | null; - bigint: string; -} -export declare interface BinaryExpression extends BaseNode { - type: AST_NODE_TYPES.BinaryExpression; - operator: string; - left: Expression | PrivateIdentifier; - right: Expression; -} -export declare type BindingName = BindingPattern | Identifier; -export declare type BindingPattern = ArrayPattern | ObjectPattern; -export declare interface BlockComment extends BaseToken { - type: AST_TOKEN_TYPES.Block; -} -export declare interface BlockStatement extends BaseNode { - type: AST_NODE_TYPES.BlockStatement; - body: Statement[]; -} -export declare interface BooleanLiteral extends LiteralBase { - value: boolean; - raw: 'false' | 'true'; -} -export declare interface BooleanToken extends BaseToken { - type: AST_TOKEN_TYPES.Boolean; -} -export declare interface BreakStatement extends BaseNode { - type: AST_NODE_TYPES.BreakStatement; - label: Identifier | null; -} -export declare interface CallExpression extends BaseNode { - type: AST_NODE_TYPES.CallExpression; - callee: LeftHandSideExpression; - arguments: CallExpressionArgument[]; - typeParameters?: TSTypeParameterInstantiation; - optional: boolean; -} -export declare type CallExpressionArgument = Expression | SpreadElement; -export declare interface CatchClause extends BaseNode { - type: AST_NODE_TYPES.CatchClause; - param: BindingName | null; - body: BlockStatement; -} -export declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression; -export declare interface ChainExpression extends BaseNode { - type: AST_NODE_TYPES.ChainExpression; - expression: ChainElement; -} -declare interface ClassBase extends BaseNode { - /** - * Whether the class is an abstract class. - * ``` - * abstract class Foo {...} - * ``` - * This is always `undefined` for `ClassExpression`. - */ - abstract?: boolean; - /** - * The class body. - */ - body: ClassBody; - /** - * Whether the class has been `declare`d: - * ``` - * declare class Foo {...} - * ``` - * This is always `undefined` for `ClassExpression`. - */ - declare?: boolean; - /** - * The decorators declared for the class. - * This is `undefined` if there are no decorators. - * ``` - * @deco - * class Foo {...} - * ``` - * This is always `undefined` for `ClassExpression`. - */ - decorators?: Decorator[]; - /** - * The class's name. - * - For a `ClassExpression` this may be `null` if the name is omitted. - * - For a `ClassDeclaration` this may be `null` if and only if the parent is - * an `ExportDefaultDeclaration`. - */ - id: Identifier | null; - /** - * The implemented interfaces for the class. - * This is `undefined` if there are no implemented interfaces. - */ - implements?: TSClassImplements[]; - /** - * The super class this class extends. - */ - superClass: LeftHandSideExpression | null; - /** - * The generic type parameters passed to the superClass. - * This is `undefined` if there are no generic type parameters passed. - */ - superTypeParameters?: TSTypeParameterInstantiation; - /** - * The generic type parameters declared for the class. - * This is `undefined` if there are no generic type parameters declared. - */ - typeParameters?: TSTypeParameterDeclaration; -} -export declare interface ClassBody extends BaseNode { - type: AST_NODE_TYPES.ClassBody; - body: ClassElement[]; -} -export declare type ClassDeclaration = ClassDeclarationWithName | ClassDeclarationWithOptionalName; -declare interface ClassDeclarationBase extends ClassBase { - type: AST_NODE_TYPES.ClassDeclaration; -} -export declare interface ClassDeclarationWithName extends ClassDeclarationBase { - id: Identifier; -} -export declare interface ClassDeclarationWithOptionalName extends ClassDeclarationBase { - id: Identifier | null; -} -export declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature; -export declare interface ClassExpression extends ClassBase { - type: AST_NODE_TYPES.ClassExpression; - abstract?: undefined; - declare?: undefined; - decorators?: undefined; -} -declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase { - key: ClassPropertyNameNonComputed; - computed: false; -} -declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { - key: ClassPropertyNameNonComputed; - computed: false; -} -export declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed; -export declare type Comment = BlockComment | LineComment; -export declare interface ConditionalExpression extends BaseNode { - type: AST_NODE_TYPES.ConditionalExpression; - test: Expression; - consequent: Expression; - alternate: Expression; -} -export declare interface ContinueStatement extends BaseNode { - type: AST_NODE_TYPES.ContinueStatement; - label: Identifier | null; -} -export declare interface DebuggerStatement extends BaseNode { - type: AST_NODE_TYPES.DebuggerStatement; -} -export declare type DeclarationStatement = ClassDeclaration | ClassExpression | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration; -export declare interface Decorator extends BaseNode { - type: AST_NODE_TYPES.Decorator; - expression: LeftHandSideExpression; -} -export declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; -export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement; -export declare interface DoWhileStatement extends BaseNode { - type: AST_NODE_TYPES.DoWhileStatement; - test: Expression; - body: Statement; -} -export declare interface EmptyStatement extends BaseNode { - type: AST_NODE_TYPES.EmptyStatement; -} -export declare type EntityName = Identifier | ThisExpression | TSQualifiedName; -export declare interface ExportAllDeclaration extends BaseNode { - type: AST_NODE_TYPES.ExportAllDeclaration; - /** - * The assertions declared for the export. - * ``` - * export * from 'mod' assert { type: 'json' }; - * ``` - */ - assertions: ImportAttribute[]; - /** - * The name for the exported items. `null` if no name is assigned. - */ - exported: Identifier | null; - /** - * The kind of the export. - */ - exportKind: ExportKind; - /** - * The source module being exported from. - */ - source: StringLiteral; -} -declare type ExportAndImportKind = 'type' | 'value'; -export declare type ExportDeclaration = DefaultExportDeclarations | NamedExportDeclarations; -export declare interface ExportDefaultDeclaration extends BaseNode { - type: AST_NODE_TYPES.ExportDefaultDeclaration; - /** - * The declaration being exported. - */ - declaration: DefaultExportDeclarations; - /** - * The kind of the export. - */ - exportKind: ExportKind; -} -declare type ExportKind = ExportAndImportKind; -export declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource; -declare interface ExportNamedDeclarationBase extends BaseNode { - type: AST_NODE_TYPES.ExportNamedDeclaration; - /** - * The assertions declared for the export. - * ``` - * export { foo } from 'mod' assert { type: 'json' }; - * ``` - * This will be an empty array if `source` is `null` - */ - assertions: ImportAttribute[]; - /** - * The exported declaration. - * ``` - * export const x = 1; - * ``` - * This will be `null` if `source` is not `null`, or if there are `specifiers` - */ - declaration: NamedExportDeclarations | null; - /** - * The kind of the export. - */ - exportKind: ExportKind; - /** - * The source module being exported from. - */ - source: StringLiteral | null; - /** - * The specifiers being exported. - * ``` - * export { a, b }; - * ``` - * This will be an empty array if `declaration` is not `null` - */ - specifiers: ExportSpecifier[]; -} -export declare interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase { - assertions: ImportAttribute[]; - declaration: null; - source: null; - specifiers: ExportSpecifier[]; -} -export declare interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase { - assertions: ImportAttribute[]; - declaration: NamedExportDeclarations; - source: null; - specifiers: ExportSpecifier[]; -} -export declare interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase { - assertions: ImportAttribute[]; - declaration: null; - source: StringLiteral; - specifiers: ExportSpecifier[]; -} -export declare interface ExportSpecifier extends BaseNode { - type: AST_NODE_TYPES.ExportSpecifier; - local: Identifier; - exported: Identifier; - exportKind: ExportKind; -} -export declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression; -export declare interface ExpressionStatement extends BaseNode { - type: AST_NODE_TYPES.ExpressionStatement; - expression: Expression; - directive?: string; -} -export declare type ForInitialiser = Expression | VariableDeclaration; -export declare interface ForInStatement extends BaseNode { - type: AST_NODE_TYPES.ForInStatement; - left: ForInitialiser; - right: Expression; - body: Statement; -} -export declare interface ForOfStatement extends BaseNode { - type: AST_NODE_TYPES.ForOfStatement; - left: ForInitialiser; - right: Expression; - body: Statement; - await: boolean; -} -export declare interface ForStatement extends BaseNode { - type: AST_NODE_TYPES.ForStatement; - init: Expression | ForInitialiser | null; - test: Expression | null; - update: Expression | null; - body: Statement; -} -declare interface FunctionBase extends BaseNode { - /** - * Whether the function is async: - * ``` - * async function foo(...) {...} - * const x = async function (...) {...} - * const x = async (...) => {...} - * ``` - */ - async: boolean; - /** - * The body of the function. - * - For an `ArrowFunctionExpression` this may be an `Expression` or `BlockStatement`. - * - For a `FunctionDeclaration` or `FunctionExpression` this is always a `BlockStatement. - * - For a `TSDeclareFunction` this is always `undefined`. - * - For a `TSEmptyBodyFunctionExpression` this is always `null`. - */ - body?: BlockStatement | Expression | null; - /** - * This is only `true` if and only if the node is a `TSDeclareFunction` and it has `declare`: - * ``` - * declare function foo(...) {...} - * ``` - */ - declare?: boolean; - /** - * This is only ever `true` if and only the node is an `ArrowFunctionExpression` and the body - * is an expression: - * ``` - * (() => 1) - * ``` - */ - expression: boolean; - /** - * Whether the function is a generator function: - * ``` - * function *foo(...) {...} - * const x = function *(...) {...} - * ``` - * This is always `false` for arrow functions as they cannot be generators. - */ - generator: boolean; - /** - * The function's name. - * - For an `ArrowFunctionExpression` this is always `null`. - * - For a `FunctionExpression` this may be `null` if the name is omitted. - * - For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if - * and only if the parent is an `ExportDefaultDeclaration`. - */ - id: Identifier | null; - /** - * The list of parameters declared for the function. - */ - params: Parameter[]; - /** - * The return type annotation for the function. - * This is `undefined` if there is no return type declared. - */ - returnType?: TSTypeAnnotation; - /** - * The generic type parameter declaration for the function. - * This is `undefined` if there are no generic type parameters declared. - */ - typeParameters?: TSTypeParameterDeclaration; -} -export declare type FunctionDeclaration = FunctionDeclarationWithName | FunctionDeclarationWithOptionalName; -declare interface FunctionDeclarationBase extends FunctionBase { - type: AST_NODE_TYPES.FunctionDeclaration; - body: BlockStatement; - declare?: false; - expression: false; -} -export declare interface FunctionDeclarationWithName extends FunctionDeclarationBase { - id: Identifier; -} -export declare interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase { - id: Identifier | null; -} -export declare interface FunctionExpression extends FunctionBase { - type: AST_NODE_TYPES.FunctionExpression; - body: BlockStatement; - expression: false; -} -export declare type FunctionLike = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | TSDeclareFunction | TSEmptyBodyFunctionExpression; -export declare interface Identifier extends BaseNode { - type: AST_NODE_TYPES.Identifier; - name: string; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} -export declare interface IdentifierToken extends BaseToken { - type: AST_TOKEN_TYPES.Identifier; -} -export declare interface IfStatement extends BaseNode { - type: AST_NODE_TYPES.IfStatement; - test: Expression; - consequent: Statement; - alternate: Statement | null; -} -export declare interface ImportAttribute extends BaseNode { - type: AST_NODE_TYPES.ImportAttribute; - key: Identifier | Literal; - value: Literal; -} -export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; -export declare interface ImportDeclaration extends BaseNode { - type: AST_NODE_TYPES.ImportDeclaration; - /** - * The assertions declared for the export. - * ``` - * import * from 'mod' assert { type: 'json' }; - * ``` - */ - assertions: ImportAttribute[]; - /** - * The kind of the import. - */ - importKind: ImportKind; - /** - * The source module being imported from. - */ - source: StringLiteral; - /** - * The specifiers being imported. - * If this is an empty array then either there are no specifiers: - * ``` - * import {} from 'mod'; - * ``` - * Or it is a side-effect import: - * ``` - * import 'mod'; - * ``` - */ - specifiers: ImportClause[]; -} -export declare interface ImportDefaultSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportDefaultSpecifier; - local: Identifier; -} -export declare interface ImportExpression extends BaseNode { - type: AST_NODE_TYPES.ImportExpression; - source: Expression; - attributes: Expression | null; -} -declare type ImportKind = ExportAndImportKind; -export declare interface ImportNamespaceSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportNamespaceSpecifier; - local: Identifier; -} -export declare interface ImportSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportSpecifier; - local: Identifier; - imported: Identifier; - importKind: ImportKind; -} -export declare type IterationStatement = DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement; -export declare interface JSXAttribute extends BaseNode { - type: AST_NODE_TYPES.JSXAttribute; - name: JSXIdentifier | JSXNamespacedName; - value: JSXExpression | Literal | null; -} -export declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; -export declare interface JSXClosingElement extends BaseNode { - type: AST_NODE_TYPES.JSXClosingElement; - name: JSXTagNameExpression; -} -export declare interface JSXClosingFragment extends BaseNode { - type: AST_NODE_TYPES.JSXClosingFragment; -} -export declare interface JSXElement extends BaseNode { - type: AST_NODE_TYPES.JSXElement; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement | null; - children: JSXChild[]; -} -export declare interface JSXEmptyExpression extends BaseNode { - type: AST_NODE_TYPES.JSXEmptyExpression; -} -export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild; -export declare interface JSXExpressionContainer extends BaseNode { - type: AST_NODE_TYPES.JSXExpressionContainer; - expression: Expression | JSXEmptyExpression; -} -export declare interface JSXFragment extends BaseNode { - type: AST_NODE_TYPES.JSXFragment; - openingFragment: JSXOpeningFragment; - closingFragment: JSXClosingFragment; - children: JSXChild[]; -} -export declare interface JSXIdentifier extends BaseNode { - type: AST_NODE_TYPES.JSXIdentifier; - name: string; -} -export declare interface JSXIdentifierToken extends BaseToken { - type: AST_TOKEN_TYPES.JSXIdentifier; -} -export declare interface JSXMemberExpression extends BaseNode { - type: AST_NODE_TYPES.JSXMemberExpression; - object: JSXTagNameExpression; - property: JSXIdentifier; -} -export declare interface JSXNamespacedName extends BaseNode { - type: AST_NODE_TYPES.JSXNamespacedName; - namespace: JSXIdentifier; - name: JSXIdentifier; -} -export declare interface JSXOpeningElement extends BaseNode { - type: AST_NODE_TYPES.JSXOpeningElement; - typeParameters?: TSTypeParameterInstantiation; - selfClosing: boolean; - name: JSXTagNameExpression; - attributes: (JSXAttribute | JSXSpreadAttribute)[]; -} -export declare interface JSXOpeningFragment extends BaseNode { - type: AST_NODE_TYPES.JSXOpeningFragment; -} -export declare interface JSXSpreadAttribute extends BaseNode { - type: AST_NODE_TYPES.JSXSpreadAttribute; - argument: Expression; -} -export declare interface JSXSpreadChild extends BaseNode { - type: AST_NODE_TYPES.JSXSpreadChild; - expression: Expression | JSXEmptyExpression; -} -export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName; -export declare interface JSXText extends BaseNode { - type: AST_NODE_TYPES.JSXText; - value: string; - raw: string; -} -export declare interface JSXTextToken extends BaseToken { - type: AST_TOKEN_TYPES.JSXText; -} -export declare interface KeywordToken extends BaseToken { - type: AST_TOKEN_TYPES.Keyword; -} -export declare interface LabeledStatement extends BaseNode { - type: AST_NODE_TYPES.LabeledStatement; - label: Identifier; - body: Statement; -} -export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion; -export declare interface LineComment extends BaseToken { - type: AST_TOKEN_TYPES.Line; -} -export declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral; -declare interface LiteralBase extends BaseNode { - type: AST_NODE_TYPES.Literal; - raw: string; - value: RegExp | bigint | boolean | number | string | null; -} -export declare type LiteralExpression = Literal | TemplateLiteral; -export declare interface LogicalExpression extends BaseNode { - type: AST_NODE_TYPES.LogicalExpression; - operator: '??' | '&&' | '||'; - left: Expression; - right: Expression; -} -export declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName; -declare interface MemberExpressionBase extends BaseNode { - object: Expression; - property: Expression | Identifier | PrivateIdentifier; - computed: boolean; - optional: boolean; -} -export declare interface MemberExpressionComputedName extends MemberExpressionBase { - type: AST_NODE_TYPES.MemberExpression; - property: Expression; - computed: true; -} -export declare interface MemberExpressionNonComputedName extends MemberExpressionBase { - type: AST_NODE_TYPES.MemberExpression; - property: Identifier | PrivateIdentifier; - computed: false; -} -export declare interface MetaProperty extends BaseNode { - type: AST_NODE_TYPES.MetaProperty; - meta: Identifier; - property: Identifier; -} -export declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName; -/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ -declare interface MethodDefinitionBase extends BaseNode { - key: PropertyName; - value: FunctionExpression | TSEmptyBodyFunctionExpression; - computed: boolean; - static: boolean; - kind: 'constructor' | 'get' | 'method' | 'set'; - optional?: boolean; - decorators?: Decorator[]; - accessibility?: Accessibility; - typeParameters?: TSTypeParameterDeclaration; - override?: boolean; -} -export declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase { - type: AST_NODE_TYPES.MethodDefinition; -} -declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { - key: PropertyNameComputed; - computed: true; -} -export declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.MethodDefinition; -} -declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase { - key: PropertyNameNonComputed; - computed: false; -} -export declare type Modifier = TSAbstractKeyword | TSAsyncKeyword | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSReadonlyKeyword | TSStaticKeyword; -declare type ModuleBody_TODOFixThis = TSModuleBlock | TSModuleDeclaration; -export declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; -export declare interface NewExpression extends BaseNode { - type: AST_NODE_TYPES.NewExpression; - callee: LeftHandSideExpression; - arguments: CallExpressionArgument[]; - typeParameters?: TSTypeParameterInstantiation; -} -export declare type Node = AccessorProperty | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ChainExpression | ClassBody | ClassDeclaration | ClassExpression | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | PrivateIdentifier | Program | Property | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression | SpreadElement | StaticBlock | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractAccessorProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; -declare interface NodeOrTokenData { - /** - * The source location information of the node. - * - * The loc property is defined as nullable by ESTree, but ESLint requires this property. - * - * @see {SourceLocation} - */ - loc: SourceLocation; - /** - * @see {Range} - */ - range: Range; - type: string; -} -export declare interface NullLiteral extends LiteralBase { - value: null; - raw: 'null'; -} -export declare interface NullToken extends BaseToken { - type: AST_TOKEN_TYPES.Null; -} -export declare interface NumberLiteral extends LiteralBase { - value: number; -} -export declare interface NumericToken extends BaseToken { - type: AST_TOKEN_TYPES.Numeric; -} -export declare interface ObjectExpression extends BaseNode { - type: AST_NODE_TYPES.ObjectExpression; - properties: ObjectLiteralElement[]; -} -export declare type ObjectLiteralElement = Property | SpreadElement; -export declare type ObjectLiteralElementLike = ObjectLiteralElement; -export declare interface ObjectPattern extends BaseNode { - type: AST_NODE_TYPES.ObjectPattern; - properties: (Property | RestElement)[]; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} -export declare type OptionalRangeAndLoc = Pick> & { - range?: Range; - loc?: SourceLocation; -}; -export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty; -export declare interface Position { - /** - * Line number (1-indexed) - */ - line: number; - /** - * Column number on the line (0-indexed) - */ - column: number; -} -export declare type PrimaryExpression = ArrayExpression | ArrayPattern | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | JSXOpeningElement | LiteralExpression | MetaProperty | ObjectExpression | ObjectPattern | Super | TemplateLiteral | ThisExpression | TSNullKeyword; -export declare interface PrivateIdentifier extends BaseNode { - type: AST_NODE_TYPES.PrivateIdentifier; - name: string; -} -export declare interface Program extends BaseNode { - type: AST_NODE_TYPES.Program; - body: ProgramStatement[]; - sourceType: 'module' | 'script'; - comments?: Comment[]; - tokens?: Token[]; -} -export declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration; -export declare type Property = PropertyComputedName | PropertyNonComputedName; -declare interface PropertyBase extends BaseNode { - type: AST_NODE_TYPES.Property; - key: PropertyName; - value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression; - computed: boolean; - method: boolean; - shorthand: boolean; - optional?: boolean; - kind: 'get' | 'init' | 'set'; -} -export declare interface PropertyComputedName extends PropertyBase { - key: PropertyNameComputed; - computed: true; -} -export declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName; -declare interface PropertyDefinitionBase extends BaseNode { - key: PropertyName; - value: Expression | null; - computed: boolean; - static: boolean; - declare: boolean; - readonly?: boolean; - decorators?: Decorator[]; - accessibility?: Accessibility; - optional?: boolean; - definite?: boolean; - typeAnnotation?: TSTypeAnnotation; - override?: boolean; -} -export declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { - type: AST_NODE_TYPES.PropertyDefinition; -} -declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase { - key: PropertyNameComputed; - computed: true; -} -export declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.PropertyDefinition; -} -declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { - key: PropertyNameNonComputed; - computed: false; -} -export declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed; -export declare type PropertyNameComputed = Expression; -export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral; -export declare interface PropertyNonComputedName extends PropertyBase { - key: PropertyNameNonComputed; - computed: false; -} -export declare interface PunctuatorToken extends BaseToken { - type: AST_TOKEN_TYPES.Punctuator; - value: ValueOf; -} -export declare interface PunctuatorTokenToText extends AssignmentOperatorToText { - [SyntaxKind.OpenBraceToken]: '{'; - [SyntaxKind.CloseBraceToken]: '}'; - [SyntaxKind.OpenParenToken]: '('; - [SyntaxKind.CloseParenToken]: ')'; - [SyntaxKind.OpenBracketToken]: '['; - [SyntaxKind.CloseBracketToken]: ']'; - [SyntaxKind.DotToken]: '.'; - [SyntaxKind.DotDotDotToken]: '...'; - [SyntaxKind.SemicolonToken]: ';'; - [SyntaxKind.CommaToken]: ','; - [SyntaxKind.QuestionDotToken]: '?.'; - [SyntaxKind.LessThanToken]: '<'; - [SyntaxKind.LessThanSlashToken]: ''; - [SyntaxKind.LessThanEqualsToken]: '<='; - [SyntaxKind.GreaterThanEqualsToken]: '>='; - [SyntaxKind.EqualsEqualsToken]: '=='; - [SyntaxKind.ExclamationEqualsToken]: '!='; - [SyntaxKind.EqualsEqualsEqualsToken]: '==='; - [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; - [SyntaxKind.EqualsGreaterThanToken]: '=>'; - [SyntaxKind.PlusToken]: '+'; - [SyntaxKind.MinusToken]: '-'; - [SyntaxKind.AsteriskToken]: '*'; - [SyntaxKind.AsteriskAsteriskToken]: '**'; - [SyntaxKind.SlashToken]: '/'; - [SyntaxKind.PercentToken]: '%'; - [SyntaxKind.PlusPlusToken]: '++'; - [SyntaxKind.MinusMinusToken]: '--'; - [SyntaxKind.LessThanLessThanToken]: '<<'; - [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; - [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; - [SyntaxKind.AmpersandToken]: '&'; - [SyntaxKind.BarToken]: '|'; - [SyntaxKind.CaretToken]: '^'; - [SyntaxKind.ExclamationToken]: '!'; - [SyntaxKind.TildeToken]: '~'; - [SyntaxKind.AmpersandAmpersandToken]: '&&'; - [SyntaxKind.BarBarToken]: '||'; - [SyntaxKind.QuestionToken]: '?'; - [SyntaxKind.ColonToken]: ':'; - [SyntaxKind.AtToken]: '@'; - [SyntaxKind.QuestionQuestionToken]: '??'; - [SyntaxKind.BacktickToken]: '`'; - [SyntaxKind.HashToken]: '#'; -} -/** - * An array of two numbers. - * Both numbers are a 0-based index which is the position in the array of source code characters. - * The first is the start position of the node, the second is the end position of the node. - */ -export declare type Range = [ - number, - number -]; -export declare interface RegExpLiteral extends LiteralBase { - value: RegExp | null; - regex: { - pattern: string; - flags: string; - }; -} -export declare interface RegularExpressionToken extends BaseToken { - type: AST_TOKEN_TYPES.RegularExpression; - regex: { - pattern: string; - flags: string; - }; -} -export declare interface RestElement extends BaseNode { - type: AST_NODE_TYPES.RestElement; - argument: DestructuringPattern; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - value?: AssignmentPattern; - decorators?: Decorator[]; -} -export declare interface ReturnStatement extends BaseNode { - type: AST_NODE_TYPES.ReturnStatement; - argument: Expression | null; -} -export declare interface SequenceExpression extends BaseNode { - type: AST_NODE_TYPES.SequenceExpression; - expressions: Expression[]; -} -export declare interface SourceLocation { - /** - * The position of the first character of the parsed source region - */ - start: Position; - /** - * The position of the first character after the parsed source region - */ - end: Position; -} -export declare interface SpreadElement extends BaseNode { - type: AST_NODE_TYPES.SpreadElement; - argument: Expression; -} -export declare type Statement = BlockStatement | BreakStatement | ClassDeclarationWithName | ContinueStatement | DebuggerStatement | DoWhileStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclarationWithName | IfStatement | ImportDeclaration | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | TSDeclareFunction | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration | VariableDeclaration | WhileStatement | WithStatement; -export declare interface StaticBlock extends BaseNode { - type: AST_NODE_TYPES.StaticBlock; - body: Statement[]; -} -export declare interface StringLiteral extends LiteralBase { - value: string; -} -export declare interface StringToken extends BaseToken { - type: AST_TOKEN_TYPES.String; -} -export declare interface Super extends BaseNode { - type: AST_NODE_TYPES.Super; -} -export declare interface SwitchCase extends BaseNode { - type: AST_NODE_TYPES.SwitchCase; - test: Expression | null; - consequent: Statement[]; -} -export declare interface SwitchStatement extends BaseNode { - type: AST_NODE_TYPES.SwitchStatement; - discriminant: Expression; - cases: SwitchCase[]; -} -export declare interface TaggedTemplateExpression extends BaseNode { - type: AST_NODE_TYPES.TaggedTemplateExpression; - typeParameters?: TSTypeParameterInstantiation; - tag: LeftHandSideExpression; - quasi: TemplateLiteral; -} -export declare interface TemplateElement extends BaseNode { - type: AST_NODE_TYPES.TemplateElement; - value: { - raw: string; - cooked: string; - }; - tail: boolean; -} -export declare interface TemplateLiteral extends BaseNode { - type: AST_NODE_TYPES.TemplateLiteral; - quasis: TemplateElement[]; - expressions: Expression[]; -} -export declare interface TemplateToken extends BaseToken { - type: AST_TOKEN_TYPES.Template; -} -export declare interface ThisExpression extends BaseNode { - type: AST_NODE_TYPES.ThisExpression; -} -export declare interface ThrowStatement extends BaseNode { - type: AST_NODE_TYPES.ThrowStatement; - argument: Statement | TSAsExpression | null; -} -export declare type Token = BooleanToken | Comment | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken; -export declare interface TryStatement extends BaseNode { - type: AST_NODE_TYPES.TryStatement; - block: BlockStatement; - handler: CatchClause | null; - finalizer: BlockStatement | null; -} -export declare type TSAbstractAccessorProperty = TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName; -export declare interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { - type: AST_NODE_TYPES.TSAbstractAccessorProperty; - value: null; -} -export declare interface TSAbstractAccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractAccessorProperty; - value: null; -} -export declare interface TSAbstractKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAbstractKeyword; -} -export declare type TSAbstractMethodDefinition = TSAbstractMethodDefinitionComputedName | TSAbstractMethodDefinitionNonComputedName; -export declare interface TSAbstractMethodDefinitionComputedName extends MethodDefinitionComputedNameBase { - type: AST_NODE_TYPES.TSAbstractMethodDefinition; -} -export declare interface TSAbstractMethodDefinitionNonComputedName extends MethodDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractMethodDefinition; -} -export declare type TSAbstractPropertyDefinition = TSAbstractPropertyDefinitionComputedName | TSAbstractPropertyDefinitionNonComputedName; -export declare interface TSAbstractPropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { - type: AST_NODE_TYPES.TSAbstractPropertyDefinition; - value: null; -} -export declare interface TSAbstractPropertyDefinitionNonComputedName extends PropertyDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractPropertyDefinition; - value: null; -} -export declare interface TSAnyKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAnyKeyword; -} -export declare interface TSArrayType extends BaseNode { - type: AST_NODE_TYPES.TSArrayType; - elementType: TypeNode; -} -export declare interface TSAsExpression extends BaseNode { - type: AST_NODE_TYPES.TSAsExpression; - expression: Expression; - typeAnnotation: TypeNode; -} -export declare interface TSAsyncKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAsyncKeyword; -} -export declare interface TSBigIntKeyword extends BaseNode { - type: AST_NODE_TYPES.TSBigIntKeyword; -} -export declare interface TSBooleanKeyword extends BaseNode { - type: AST_NODE_TYPES.TSBooleanKeyword; -} -export declare interface TSCallSignatureDeclaration extends TSFunctionSignatureBase { - type: AST_NODE_TYPES.TSCallSignatureDeclaration; -} -export declare interface TSClassImplements extends TSHeritageBase { - type: AST_NODE_TYPES.TSClassImplements; -} -export declare interface TSConditionalType extends BaseNode { - type: AST_NODE_TYPES.TSConditionalType; - checkType: TypeNode; - extendsType: TypeNode; - trueType: TypeNode; - falseType: TypeNode; -} -export declare interface TSConstructorType extends TSFunctionSignatureBase { - type: AST_NODE_TYPES.TSConstructorType; - abstract: boolean; -} -export declare interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase { - type: AST_NODE_TYPES.TSConstructSignatureDeclaration; -} -export declare interface TSDeclareFunction extends FunctionBase { - type: AST_NODE_TYPES.TSDeclareFunction; - body?: BlockStatement; - declare?: boolean; - expression: false; -} -export declare interface TSDeclareKeyword extends BaseNode { - type: AST_NODE_TYPES.TSDeclareKeyword; -} -export declare interface TSEmptyBodyFunctionExpression extends FunctionBase { - type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression; - body: null; - id: null; -} -export declare interface TSEnumDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSEnumDeclaration; - /** - * Whether this is a `const` enum. - * ``` - * const enum Foo {...} - * ``` - */ - const?: boolean; - /** - * Whether this is a `declare`d enum. - * ``` - * declare enum Foo {...} - * ``` - */ - declare?: boolean; - /** - * The enum name. - */ - id: Identifier; - /** - * The enum members. - */ - members: TSEnumMember[]; - modifiers?: Modifier[]; -} -export declare type TSEnumMember = TSEnumMemberComputedName | TSEnumMemberNonComputedName; -declare interface TSEnumMemberBase extends BaseNode { - type: AST_NODE_TYPES.TSEnumMember; - id: PropertyNameComputed | PropertyNameNonComputed; - initializer?: Expression; - computed?: boolean; -} -/** - * this should only really happen in semantically invalid code (errors 1164 and 2452) - * - * VALID: - * enum Foo { ['a'] } - * - * INVALID: - * const x = 'a'; - * enum Foo { [x] } - * enum Bar { ['a' + 'b'] } - */ -export declare interface TSEnumMemberComputedName extends TSEnumMemberBase { - id: PropertyNameComputed; - computed: true; -} -export declare interface TSEnumMemberNonComputedName extends TSEnumMemberBase { - id: PropertyNameNonComputed; - computed?: false; -} -export declare interface TSExportAssignment extends BaseNode { - type: AST_NODE_TYPES.TSExportAssignment; - expression: Expression; -} -export declare interface TSExportKeyword extends BaseNode { - type: AST_NODE_TYPES.TSExportKeyword; -} -export declare interface TSExternalModuleReference extends BaseNode { - type: AST_NODE_TYPES.TSExternalModuleReference; - expression: Expression; -} -declare interface TSFunctionSignatureBase extends BaseNode { - params: Parameter[]; - returnType?: TSTypeAnnotation; - typeParameters?: TSTypeParameterDeclaration; -} -export declare interface TSFunctionType extends TSFunctionSignatureBase { - type: AST_NODE_TYPES.TSFunctionType; -} -declare interface TSHeritageBase extends BaseNode { - expression: Expression; - typeParameters?: TSTypeParameterInstantiation; -} -export declare interface TSImportEqualsDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSImportEqualsDeclaration; - /** - * The locally imported name - */ - id: Identifier; - /** - * The value being aliased. - * ``` - * import F1 = A; - * import F2 = A.B.C; - * import F3 = require('mod'); - * ``` - */ - moduleReference: EntityName | TSExternalModuleReference; - importKind: ImportKind; - /** - * Whether this is immediately exported - * ``` - * export import F = A; - * ``` - */ - isExport: boolean; -} -export declare interface TSImportType extends BaseNode { - type: AST_NODE_TYPES.TSImportType; - isTypeOf: boolean; - parameter: TypeNode; - qualifier: EntityName | null; - typeParameters: TSTypeParameterInstantiation | null; -} -export declare interface TSIndexedAccessType extends BaseNode { - type: AST_NODE_TYPES.TSIndexedAccessType; - objectType: TypeNode; - indexType: TypeNode; -} -export declare interface TSIndexSignature extends BaseNode { - type: AST_NODE_TYPES.TSIndexSignature; - parameters: Parameter[]; - typeAnnotation?: TSTypeAnnotation; - readonly?: boolean; - accessibility?: Accessibility; - export?: boolean; - static?: boolean; -} -export declare interface TSInferType extends BaseNode { - type: AST_NODE_TYPES.TSInferType; - typeParameter: TSTypeParameter; -} -export declare interface TSInstantiationExpression extends BaseNode { - type: AST_NODE_TYPES.TSInstantiationExpression; - expression: Expression; - typeParameters: TSTypeParameterInstantiation; -} -export declare interface TSInterfaceBody extends BaseNode { - type: AST_NODE_TYPES.TSInterfaceBody; - body: TypeElement[]; -} -export declare interface TSInterfaceDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSInterfaceDeclaration; - abstract?: boolean; - /** - * The body of the interface - */ - body: TSInterfaceBody; - /** - * Whether the interface was `declare`d, `undefined` otherwise - */ - declare?: boolean; - /** - * The types this interface `extends` - */ - extends?: TSInterfaceHeritage[]; - /** - * The name of this interface - */ - id: Identifier; - implements?: TSInterfaceHeritage[]; - /** - * The generic type parameters declared for the interface. - * This is `undefined` if there are no generic type parameters declared. - */ - typeParameters?: TSTypeParameterDeclaration; -} -export declare interface TSInterfaceHeritage extends TSHeritageBase { - type: AST_NODE_TYPES.TSInterfaceHeritage; -} -export declare interface TSIntersectionType extends BaseNode { - type: AST_NODE_TYPES.TSIntersectionType; - types: TypeNode[]; -} -export declare interface TSIntrinsicKeyword extends BaseNode { - type: AST_NODE_TYPES.TSIntrinsicKeyword; -} -export declare interface TSLiteralType extends BaseNode { - type: AST_NODE_TYPES.TSLiteralType; - literal: LiteralExpression | UnaryExpression | UpdateExpression; -} -export declare interface TSMappedType extends BaseNode { - type: AST_NODE_TYPES.TSMappedType; - typeParameter: TSTypeParameter; - readonly?: boolean | '-' | '+'; - optional?: boolean | '-' | '+'; - typeAnnotation?: TypeNode; - nameType: TypeNode | null; -} -export declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName; -declare interface TSMethodSignatureBase extends BaseNode { - type: AST_NODE_TYPES.TSMethodSignature; - key: PropertyName; - computed: boolean; - params: Parameter[]; - optional?: boolean; - returnType?: TSTypeAnnotation; - readonly?: boolean; - typeParameters?: TSTypeParameterDeclaration; - accessibility?: Accessibility; - export?: boolean; - static?: boolean; - kind: 'get' | 'method' | 'set'; -} -export declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase { - key: PropertyNameComputed; - computed: true; -} -export declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase { - key: PropertyNameNonComputed; - computed: false; -} -export declare interface TSModuleBlock extends BaseNode { - type: AST_NODE_TYPES.TSModuleBlock; - body: ProgramStatement[]; -} -export declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace; -declare interface TSModuleDeclarationBase extends BaseNode { - type: AST_NODE_TYPES.TSModuleDeclaration; - /** - * The name of the module - * ``` - * namespace A {} - * namespace A.B.C {} - * module 'a' {} - * ``` - */ - id: Identifier | StringLiteral; - /** - * The body of the module. - * This can only be `undefined` for the code `declare module 'mod';` - * This will be a `TSModuleDeclaration` if the name is "nested" (`Foo.Bar`). - */ - body?: ModuleBody_TODOFixThis; - /** - * Whether this is a global declaration - * ``` - * declare global {} - * ``` - */ - global?: boolean; - /** - * Whether the module is `declare`d - * ``` - * declare namespace F {} - * ``` - */ - declare?: boolean; - modifiers?: Modifier[]; - /** - * The keyword used to define this module declaration - * ``` - * namespace Foo {} - * ^^^^^^^^^ - * - * module 'foo' {} - * ^^^^^^ - * - * declare global {} - * ^^^^^^ - * ``` - */ - kind: TSModuleDeclarationKind; -} -export declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase { - kind: 'global'; - body: TSModuleBlock; - id: Identifier; - global: true; -} -export declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace'; -export declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId; -declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase { - kind: 'module'; - global?: undefined; -} -export declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase { - kind: 'module'; - id: Identifier; - body: ModuleBody_TODOFixThis; -} -export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared; -export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase { - kind: 'module'; - id: StringLiteral; - declare: true; - body?: TSModuleBlock; -} -export declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase { - kind: 'module'; - id: StringLiteral; - declare: false; - body: TSModuleBlock; -} -export declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase { - kind: 'namespace'; - id: Identifier; - body: ModuleBody_TODOFixThis; - global?: undefined; -} -export declare interface TSNamedTupleMember extends BaseNode { - type: AST_NODE_TYPES.TSNamedTupleMember; - elementType: TypeNode; - label: Identifier; - optional: boolean; -} -export declare interface TSNamespaceExportDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSNamespaceExportDeclaration; - /** - * The name the global variable being exported to - */ - id: Identifier; -} -export declare interface TSNeverKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNeverKeyword; -} -export declare interface TSNonNullExpression extends BaseNode { - type: AST_NODE_TYPES.TSNonNullExpression; - expression: Expression; -} -export declare interface TSNullKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNullKeyword; -} -export declare interface TSNumberKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNumberKeyword; -} -export declare interface TSObjectKeyword extends BaseNode { - type: AST_NODE_TYPES.TSObjectKeyword; -} -export declare interface TSOptionalType extends BaseNode { - type: AST_NODE_TYPES.TSOptionalType; - typeAnnotation: TypeNode; -} -export declare interface TSParameterProperty extends BaseNode { - type: AST_NODE_TYPES.TSParameterProperty; - accessibility?: Accessibility; - readonly?: boolean; - static?: boolean; - export?: boolean; - override?: boolean; - parameter: AssignmentPattern | BindingName | RestElement; - decorators?: Decorator[]; -} -export declare interface TSPrivateKeyword extends BaseNode { - type: AST_NODE_TYPES.TSPrivateKeyword; -} -export declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName; -declare interface TSPropertySignatureBase extends BaseNode { - type: AST_NODE_TYPES.TSPropertySignature; - key: PropertyName; - optional?: boolean; - computed: boolean; - typeAnnotation?: TSTypeAnnotation; - initializer?: Expression; - readonly?: boolean; - static?: boolean; - export?: boolean; - accessibility?: Accessibility; -} -export declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase { - key: PropertyNameComputed; - computed: true; -} -export declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase { - key: PropertyNameNonComputed; - computed: false; -} -export declare interface TSProtectedKeyword extends BaseNode { - type: AST_NODE_TYPES.TSProtectedKeyword; -} -export declare interface TSPublicKeyword extends BaseNode { - type: AST_NODE_TYPES.TSPublicKeyword; -} -export declare interface TSQualifiedName extends BaseNode { - type: AST_NODE_TYPES.TSQualifiedName; - left: EntityName; - right: Identifier; -} -export declare interface TSReadonlyKeyword extends BaseNode { - type: AST_NODE_TYPES.TSReadonlyKeyword; -} -export declare interface TSRestType extends BaseNode { - type: AST_NODE_TYPES.TSRestType; - typeAnnotation: TypeNode; -} -export declare interface TSSatisfiesExpression extends BaseNode { - type: AST_NODE_TYPES.TSSatisfiesExpression; - expression: Expression; - typeAnnotation: TypeNode; -} -export declare interface TSStaticKeyword extends BaseNode { - type: AST_NODE_TYPES.TSStaticKeyword; -} -export declare interface TSStringKeyword extends BaseNode { - type: AST_NODE_TYPES.TSStringKeyword; -} -export declare interface TSSymbolKeyword extends BaseNode { - type: AST_NODE_TYPES.TSSymbolKeyword; -} -export declare interface TSTemplateLiteralType extends BaseNode { - type: AST_NODE_TYPES.TSTemplateLiteralType; - quasis: TemplateElement[]; - types: TypeNode[]; -} -export declare interface TSThisType extends BaseNode { - type: AST_NODE_TYPES.TSThisType; -} -export declare interface TSTupleType extends BaseNode { - type: AST_NODE_TYPES.TSTupleType; - elementTypes: TypeNode[]; -} -export declare interface TSTypeAliasDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSTypeAliasDeclaration; - /** - * Whether the type was `declare`d. - * ``` - * declare type T = 1; - * ``` - */ - declare?: boolean; - /** - * The name of the type. - */ - id: Identifier; - /** - * The "value" (type) of the declaration - */ - typeAnnotation: TypeNode; - /** - * The generic type parameters declared for the type. - * This is `undefined` if there are no generic type parameters declared. - */ - typeParameters?: TSTypeParameterDeclaration; -} -export declare interface TSTypeAnnotation extends BaseNode { - type: AST_NODE_TYPES.TSTypeAnnotation; - typeAnnotation: TypeNode; -} -export declare interface TSTypeAssertion extends BaseNode { - type: AST_NODE_TYPES.TSTypeAssertion; - typeAnnotation: TypeNode; - expression: Expression; -} -export declare interface TSTypeLiteral extends BaseNode { - type: AST_NODE_TYPES.TSTypeLiteral; - members: TypeElement[]; -} -export declare interface TSTypeOperator extends BaseNode { - type: AST_NODE_TYPES.TSTypeOperator; - operator: 'keyof' | 'readonly' | 'unique'; - typeAnnotation?: TypeNode; -} -export declare interface TSTypeParameter extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameter; - name: Identifier; - constraint?: TypeNode; - default?: TypeNode; - in: boolean; - out: boolean; - const: boolean; -} -export declare interface TSTypeParameterDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameterDeclaration; - params: TSTypeParameter[]; -} -export declare interface TSTypeParameterInstantiation extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameterInstantiation; - params: TypeNode[]; -} -export declare interface TSTypePredicate extends BaseNode { - type: AST_NODE_TYPES.TSTypePredicate; - asserts: boolean; - parameterName: Identifier | TSThisType; - typeAnnotation: TSTypeAnnotation | null; -} -export declare interface TSTypeQuery extends BaseNode { - type: AST_NODE_TYPES.TSTypeQuery; - exprName: EntityName; - typeParameters?: TSTypeParameterInstantiation; -} -export declare interface TSTypeReference extends BaseNode { - type: AST_NODE_TYPES.TSTypeReference; - typeName: EntityName; - typeParameters?: TSTypeParameterInstantiation; -} -export declare type TSUnaryExpression = AwaitExpression | LeftHandSideExpression | UnaryExpression | UpdateExpression; -export declare interface TSUndefinedKeyword extends BaseNode { - type: AST_NODE_TYPES.TSUndefinedKeyword; -} -export declare interface TSUnionType extends BaseNode { - type: AST_NODE_TYPES.TSUnionType; - types: TypeNode[]; -} -export declare interface TSUnknownKeyword extends BaseNode { - type: AST_NODE_TYPES.TSUnknownKeyword; -} -export declare interface TSVoidKeyword extends BaseNode { - type: AST_NODE_TYPES.TSVoidKeyword; -} -export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; -export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword; -export declare interface UnaryExpression extends UnaryExpressionBase { - type: AST_NODE_TYPES.UnaryExpression; - operator: '-' | '!' | '+' | '~' | 'delete' | 'typeof' | 'void'; -} -declare interface UnaryExpressionBase extends BaseNode { - operator: string; - prefix: boolean; - argument: LeftHandSideExpression | Literal | UnaryExpression; -} -export declare interface UpdateExpression extends UnaryExpressionBase { - type: AST_NODE_TYPES.UpdateExpression; - operator: '--' | '++'; -} -declare type ValueOf = T[keyof T]; -export declare interface VariableDeclaration extends BaseNode { - type: AST_NODE_TYPES.VariableDeclaration; - /** - * The variables declared by this declaration. - * Note that there may be 0 declarations (i.e. `const;`). - * ``` - * let x; - * let y, z; - * ``` - */ - declarations: VariableDeclarator[]; - /** - * Whether the declaration is `declare`d - * ``` - * declare const x = 1; - * ``` - */ - declare?: boolean; - /** - * The keyword used to declare the variable(s) - * ``` - * const x = 1; - * let y = 2; - * var z = 3; - * ``` - */ - kind: 'const' | 'let' | 'var'; -} -export declare interface VariableDeclarator extends BaseNode { - type: AST_NODE_TYPES.VariableDeclarator; - id: BindingName; - init: Expression | null; - definite?: boolean; -} -export declare interface WhileStatement extends BaseNode { - type: AST_NODE_TYPES.WhileStatement; - test: Expression; - body: Statement; -} -export declare interface WithStatement extends BaseNode { - type: AST_NODE_TYPES.WithStatement; - object: Expression; - body: Statement; -} -export declare interface YieldExpression extends BaseNode { - type: AST_NODE_TYPES.YieldExpression; - delegate: boolean; - argument?: Expression; -} -export {}; -//# sourceMappingURL=ast-spec.d.ts.map +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ +import { SyntaxKind } from 'typescript'; +export declare type Accessibility = 'private' | 'protected' | 'public'; +export declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName; +export declare interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface ArrayExpression extends BaseNode { + type: AST_NODE_TYPES.ArrayExpression; + /** + * an element will be `null` in the case of a sparse array: `[1, ,3]` + */ + elements: (Expression | SpreadElement | null)[]; +} +export declare interface ArrayPattern extends BaseNode { + type: AST_NODE_TYPES.ArrayPattern; + elements: (DestructuringPattern | null)[]; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} +export declare interface ArrowFunctionExpression extends BaseNode { + type: AST_NODE_TYPES.ArrowFunctionExpression; + generator: boolean; + id: null; + params: Parameter[]; + body: BlockStatement | Expression; + async: boolean; + expression: boolean; + returnType?: TSTypeAnnotation; + typeParameters?: TSTypeParameterDeclaration; +} +export declare interface AssignmentExpression extends BaseNode { + type: AST_NODE_TYPES.AssignmentExpression; + operator: ValueOf; + left: Expression; + right: Expression; +} +export declare interface AssignmentOperatorToText { + [SyntaxKind.EqualsToken]: '='; + [SyntaxKind.PlusEqualsToken]: '+='; + [SyntaxKind.MinusEqualsToken]: '-='; + [SyntaxKind.AsteriskEqualsToken]: '*='; + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; + [SyntaxKind.SlashEqualsToken]: '/='; + [SyntaxKind.PercentEqualsToken]: '%='; + [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; + [SyntaxKind.AmpersandEqualsToken]: '&='; + [SyntaxKind.BarEqualsToken]: '|='; + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.CaretEqualsToken]: '^='; +} +export declare interface AssignmentPattern extends BaseNode { + type: AST_NODE_TYPES.AssignmentPattern; + left: BindingName; + right: Expression; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} +export declare enum AST_NODE_TYPES { + AccessorProperty = "AccessorProperty", + ArrayExpression = "ArrayExpression", + ArrayPattern = "ArrayPattern", + ArrowFunctionExpression = "ArrowFunctionExpression", + AssignmentExpression = "AssignmentExpression", + AssignmentPattern = "AssignmentPattern", + AwaitExpression = "AwaitExpression", + BinaryExpression = "BinaryExpression", + BlockStatement = "BlockStatement", + BreakStatement = "BreakStatement", + CallExpression = "CallExpression", + CatchClause = "CatchClause", + ChainExpression = "ChainExpression", + ClassBody = "ClassBody", + ClassDeclaration = "ClassDeclaration", + ClassExpression = "ClassExpression", + ConditionalExpression = "ConditionalExpression", + ContinueStatement = "ContinueStatement", + DebuggerStatement = "DebuggerStatement", + Decorator = "Decorator", + DoWhileStatement = "DoWhileStatement", + EmptyStatement = "EmptyStatement", + ExportAllDeclaration = "ExportAllDeclaration", + ExportDefaultDeclaration = "ExportDefaultDeclaration", + ExportNamedDeclaration = "ExportNamedDeclaration", + ExportSpecifier = "ExportSpecifier", + ExpressionStatement = "ExpressionStatement", + ForInStatement = "ForInStatement", + ForOfStatement = "ForOfStatement", + ForStatement = "ForStatement", + FunctionDeclaration = "FunctionDeclaration", + FunctionExpression = "FunctionExpression", + Identifier = "Identifier", + IfStatement = "IfStatement", + ImportAttribute = "ImportAttribute", + ImportDeclaration = "ImportDeclaration", + ImportDefaultSpecifier = "ImportDefaultSpecifier", + ImportExpression = "ImportExpression", + ImportNamespaceSpecifier = "ImportNamespaceSpecifier", + ImportSpecifier = "ImportSpecifier", + JSXAttribute = "JSXAttribute", + JSXClosingElement = "JSXClosingElement", + JSXClosingFragment = "JSXClosingFragment", + JSXElement = "JSXElement", + JSXEmptyExpression = "JSXEmptyExpression", + JSXExpressionContainer = "JSXExpressionContainer", + JSXFragment = "JSXFragment", + JSXIdentifier = "JSXIdentifier", + JSXMemberExpression = "JSXMemberExpression", + JSXNamespacedName = "JSXNamespacedName", + JSXOpeningElement = "JSXOpeningElement", + JSXOpeningFragment = "JSXOpeningFragment", + JSXSpreadAttribute = "JSXSpreadAttribute", + JSXSpreadChild = "JSXSpreadChild", + JSXText = "JSXText", + LabeledStatement = "LabeledStatement", + Literal = "Literal", + LogicalExpression = "LogicalExpression", + MemberExpression = "MemberExpression", + MetaProperty = "MetaProperty", + MethodDefinition = "MethodDefinition", + NewExpression = "NewExpression", + ObjectExpression = "ObjectExpression", + ObjectPattern = "ObjectPattern", + PrivateIdentifier = "PrivateIdentifier", + Program = "Program", + Property = "Property", + PropertyDefinition = "PropertyDefinition", + RestElement = "RestElement", + ReturnStatement = "ReturnStatement", + SequenceExpression = "SequenceExpression", + SpreadElement = "SpreadElement", + StaticBlock = "StaticBlock", + Super = "Super", + SwitchCase = "SwitchCase", + SwitchStatement = "SwitchStatement", + TaggedTemplateExpression = "TaggedTemplateExpression", + TemplateElement = "TemplateElement", + TemplateLiteral = "TemplateLiteral", + ThisExpression = "ThisExpression", + ThrowStatement = "ThrowStatement", + TryStatement = "TryStatement", + UnaryExpression = "UnaryExpression", + UpdateExpression = "UpdateExpression", + VariableDeclaration = "VariableDeclaration", + VariableDeclarator = "VariableDeclarator", + WhileStatement = "WhileStatement", + WithStatement = "WithStatement", + YieldExpression = "YieldExpression", + /** + * TS-prefixed nodes + */ + TSAbstractAccessorProperty = "TSAbstractAccessorProperty", + TSAbstractKeyword = "TSAbstractKeyword", + TSAbstractMethodDefinition = "TSAbstractMethodDefinition", + TSAbstractPropertyDefinition = "TSAbstractPropertyDefinition", + TSAnyKeyword = "TSAnyKeyword", + TSArrayType = "TSArrayType", + TSAsExpression = "TSAsExpression", + TSAsyncKeyword = "TSAsyncKeyword", + TSBigIntKeyword = "TSBigIntKeyword", + TSBooleanKeyword = "TSBooleanKeyword", + TSCallSignatureDeclaration = "TSCallSignatureDeclaration", + TSClassImplements = "TSClassImplements", + TSConditionalType = "TSConditionalType", + TSConstructorType = "TSConstructorType", + TSConstructSignatureDeclaration = "TSConstructSignatureDeclaration", + TSDeclareFunction = "TSDeclareFunction", + TSDeclareKeyword = "TSDeclareKeyword", + TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression", + TSEnumDeclaration = "TSEnumDeclaration", + TSEnumMember = "TSEnumMember", + TSExportAssignment = "TSExportAssignment", + TSExportKeyword = "TSExportKeyword", + TSExternalModuleReference = "TSExternalModuleReference", + TSFunctionType = "TSFunctionType", + TSInstantiationExpression = "TSInstantiationExpression", + TSImportEqualsDeclaration = "TSImportEqualsDeclaration", + TSImportType = "TSImportType", + TSIndexedAccessType = "TSIndexedAccessType", + TSIndexSignature = "TSIndexSignature", + TSInferType = "TSInferType", + TSInterfaceBody = "TSInterfaceBody", + TSInterfaceDeclaration = "TSInterfaceDeclaration", + TSInterfaceHeritage = "TSInterfaceHeritage", + TSIntersectionType = "TSIntersectionType", + TSIntrinsicKeyword = "TSIntrinsicKeyword", + TSLiteralType = "TSLiteralType", + TSMappedType = "TSMappedType", + TSMethodSignature = "TSMethodSignature", + TSModuleBlock = "TSModuleBlock", + TSModuleDeclaration = "TSModuleDeclaration", + TSNamedTupleMember = "TSNamedTupleMember", + TSNamespaceExportDeclaration = "TSNamespaceExportDeclaration", + TSNeverKeyword = "TSNeverKeyword", + TSNonNullExpression = "TSNonNullExpression", + TSNullKeyword = "TSNullKeyword", + TSNumberKeyword = "TSNumberKeyword", + TSObjectKeyword = "TSObjectKeyword", + TSOptionalType = "TSOptionalType", + TSParameterProperty = "TSParameterProperty", + TSPrivateKeyword = "TSPrivateKeyword", + TSPropertySignature = "TSPropertySignature", + TSProtectedKeyword = "TSProtectedKeyword", + TSPublicKeyword = "TSPublicKeyword", + TSQualifiedName = "TSQualifiedName", + TSReadonlyKeyword = "TSReadonlyKeyword", + TSRestType = "TSRestType", + TSSatisfiesExpression = "TSSatisfiesExpression", + TSStaticKeyword = "TSStaticKeyword", + TSStringKeyword = "TSStringKeyword", + TSSymbolKeyword = "TSSymbolKeyword", + TSTemplateLiteralType = "TSTemplateLiteralType", + TSThisType = "TSThisType", + TSTupleType = "TSTupleType", + TSTypeAliasDeclaration = "TSTypeAliasDeclaration", + TSTypeAnnotation = "TSTypeAnnotation", + TSTypeAssertion = "TSTypeAssertion", + TSTypeLiteral = "TSTypeLiteral", + TSTypeOperator = "TSTypeOperator", + TSTypeParameter = "TSTypeParameter", + TSTypeParameterDeclaration = "TSTypeParameterDeclaration", + TSTypeParameterInstantiation = "TSTypeParameterInstantiation", + TSTypePredicate = "TSTypePredicate", + TSTypeQuery = "TSTypeQuery", + TSTypeReference = "TSTypeReference", + TSUndefinedKeyword = "TSUndefinedKeyword", + TSUnionType = "TSUnionType", + TSUnknownKeyword = "TSUnknownKeyword", + TSVoidKeyword = "TSVoidKeyword" +} +export declare enum AST_TOKEN_TYPES { + Boolean = "Boolean", + Identifier = "Identifier", + JSXIdentifier = "JSXIdentifier", + JSXText = "JSXText", + Keyword = "Keyword", + Null = "Null", + Numeric = "Numeric", + Punctuator = "Punctuator", + RegularExpression = "RegularExpression", + String = "String", + Template = "Template", + Block = "Block", + Line = "Line" +} +export declare interface AwaitExpression extends BaseNode { + type: AST_NODE_TYPES.AwaitExpression; + argument: Expression; +} +export declare interface BaseNode extends NodeOrTokenData { + type: AST_NODE_TYPES; +} +declare interface BaseToken extends NodeOrTokenData { + type: AST_TOKEN_TYPES; + value: string; +} +export declare interface BigIntLiteral extends LiteralBase { + value: bigint | null; + bigint: string; +} +export declare interface BinaryExpression extends BaseNode { + type: AST_NODE_TYPES.BinaryExpression; + operator: string; + left: Expression | PrivateIdentifier; + right: Expression; +} +export declare type BindingName = BindingPattern | Identifier; +export declare type BindingPattern = ArrayPattern | ObjectPattern; +export declare interface BlockComment extends BaseToken { + type: AST_TOKEN_TYPES.Block; +} +export declare interface BlockStatement extends BaseNode { + type: AST_NODE_TYPES.BlockStatement; + body: Statement[]; +} +export declare interface BooleanLiteral extends LiteralBase { + value: boolean; + raw: 'false' | 'true'; +} +export declare interface BooleanToken extends BaseToken { + type: AST_TOKEN_TYPES.Boolean; +} +export declare interface BreakStatement extends BaseNode { + type: AST_NODE_TYPES.BreakStatement; + label: Identifier | null; +} +export declare interface CallExpression extends BaseNode { + type: AST_NODE_TYPES.CallExpression; + callee: LeftHandSideExpression; + arguments: CallExpressionArgument[]; + typeParameters?: TSTypeParameterInstantiation; + optional: boolean; +} +export declare type CallExpressionArgument = Expression | SpreadElement; +export declare interface CatchClause extends BaseNode { + type: AST_NODE_TYPES.CatchClause; + param: BindingName | null; + body: BlockStatement; +} +export declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression; +export declare interface ChainExpression extends BaseNode { + type: AST_NODE_TYPES.ChainExpression; + expression: ChainElement; +} +declare interface ClassBase extends BaseNode { + /** + * Whether the class is an abstract class. + * ``` + * abstract class Foo {...} + * ``` + * This is always `undefined` for `ClassExpression`. + */ + abstract?: boolean; + /** + * The class body. + */ + body: ClassBody; + /** + * Whether the class has been `declare`d: + * ``` + * declare class Foo {...} + * ``` + * This is always `undefined` for `ClassExpression`. + */ + declare?: boolean; + /** + * The decorators declared for the class. + * This is `undefined` if there are no decorators. + * ``` + * @deco + * class Foo {...} + * ``` + * This is always `undefined` for `ClassExpression`. + */ + decorators?: Decorator[]; + /** + * The class's name. + * - For a `ClassExpression` this may be `null` if the name is omitted. + * - For a `ClassDeclaration` this may be `null` if and only if the parent is + * an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The implemented interfaces for the class. + * This is `undefined` if there are no implemented interfaces. + */ + implements?: TSClassImplements[]; + /** + * The super class this class extends. + */ + superClass: LeftHandSideExpression | null; + /** + * The generic type parameters passed to the superClass. + * This is `undefined` if there are no generic type parameters passed. + */ + superTypeParameters?: TSTypeParameterInstantiation; + /** + * The generic type parameters declared for the class. + * This is `undefined` if there are no generic type parameters declared. + */ + typeParameters?: TSTypeParameterDeclaration; +} +export declare interface ClassBody extends BaseNode { + type: AST_NODE_TYPES.ClassBody; + body: ClassElement[]; +} +export declare type ClassDeclaration = ClassDeclarationWithName | ClassDeclarationWithOptionalName; +declare interface ClassDeclarationBase extends ClassBase { + type: AST_NODE_TYPES.ClassDeclaration; +} +export declare interface ClassDeclarationWithName extends ClassDeclarationBase { + id: Identifier; +} +export declare interface ClassDeclarationWithOptionalName extends ClassDeclarationBase { + id: Identifier | null; +} +export declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature; +export declare interface ClassExpression extends ClassBase { + type: AST_NODE_TYPES.ClassExpression; + abstract?: undefined; + declare?: undefined; + decorators?: undefined; +} +declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} +declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} +export declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed; +export declare type Comment = BlockComment | LineComment; +export declare interface ConditionalExpression extends BaseNode { + type: AST_NODE_TYPES.ConditionalExpression; + test: Expression; + consequent: Expression; + alternate: Expression; +} +export declare interface ContinueStatement extends BaseNode { + type: AST_NODE_TYPES.ContinueStatement; + label: Identifier | null; +} +export declare interface DebuggerStatement extends BaseNode { + type: AST_NODE_TYPES.DebuggerStatement; +} +export declare type DeclarationStatement = ClassDeclaration | ClassExpression | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration; +export declare interface Decorator extends BaseNode { + type: AST_NODE_TYPES.Decorator; + expression: LeftHandSideExpression; +} +export declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement; +export declare interface DoWhileStatement extends BaseNode { + type: AST_NODE_TYPES.DoWhileStatement; + test: Expression; + body: Statement; +} +export declare interface EmptyStatement extends BaseNode { + type: AST_NODE_TYPES.EmptyStatement; +} +export declare type EntityName = Identifier | ThisExpression | TSQualifiedName; +export declare interface ExportAllDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportAllDeclaration; + /** + * The assertions declared for the export. + * ``` + * export * from 'mod' assert { type: 'json' }; + * ``` + */ + assertions: ImportAttribute[]; + /** + * The name for the exported items. `null` if no name is assigned. + */ + exported: Identifier | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral; +} +declare type ExportAndImportKind = 'type' | 'value'; +export declare type ExportDeclaration = DefaultExportDeclarations | NamedExportDeclarations; +export declare interface ExportDefaultDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportDefaultDeclaration; + /** + * The declaration being exported. + */ + declaration: DefaultExportDeclarations; + /** + * The kind of the export. + */ + exportKind: ExportKind; +} +declare type ExportKind = ExportAndImportKind; +export declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource; +declare interface ExportNamedDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.ExportNamedDeclaration; + /** + * The assertions declared for the export. + * ``` + * export { foo } from 'mod' assert { type: 'json' }; + * ``` + * This will be an empty array if `source` is `null` + */ + assertions: ImportAttribute[]; + /** + * The exported declaration. + * ``` + * export const x = 1; + * ``` + * This will be `null` if `source` is not `null`, or if there are `specifiers` + */ + declaration: NamedExportDeclarations | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral | null; + /** + * The specifiers being exported. + * ``` + * export { a, b }; + * ``` + * This will be an empty array if `declaration` is not `null` + */ + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: null; + source: null; + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: NamedExportDeclarations; + source: null; + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: null; + source: StringLiteral; + specifiers: ExportSpecifier[]; +} +export declare interface ExportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ExportSpecifier; + local: Identifier; + exported: Identifier; + exportKind: ExportKind; +} +export declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression; +export declare interface ExpressionStatement extends BaseNode { + type: AST_NODE_TYPES.ExpressionStatement; + expression: Expression; + directive?: string; +} +export declare type ForInitialiser = Expression | VariableDeclaration; +export declare interface ForInStatement extends BaseNode { + type: AST_NODE_TYPES.ForInStatement; + left: ForInitialiser; + right: Expression; + body: Statement; +} +export declare interface ForOfStatement extends BaseNode { + type: AST_NODE_TYPES.ForOfStatement; + left: ForInitialiser; + right: Expression; + body: Statement; + await: boolean; +} +export declare interface ForStatement extends BaseNode { + type: AST_NODE_TYPES.ForStatement; + init: Expression | ForInitialiser | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} +declare interface FunctionBase extends BaseNode { + /** + * Whether the function is async: + * ``` + * async function foo(...) {...} + * const x = async function (...) {...} + * const x = async (...) => {...} + * ``` + */ + async: boolean; + /** + * The body of the function. + * - For an `ArrowFunctionExpression` this may be an `Expression` or `BlockStatement`. + * - For a `FunctionDeclaration` or `FunctionExpression` this is always a `BlockStatement. + * - For a `TSDeclareFunction` this is always `undefined`. + * - For a `TSEmptyBodyFunctionExpression` this is always `null`. + */ + body?: BlockStatement | Expression | null; + /** + * This is only `true` if and only if the node is a `TSDeclareFunction` and it has `declare`: + * ``` + * declare function foo(...) {...} + * ``` + */ + declare?: boolean; + /** + * This is only ever `true` if and only the node is an `ArrowFunctionExpression` and the body + * is an expression: + * ``` + * (() => 1) + * ``` + */ + expression: boolean; + /** + * Whether the function is a generator function: + * ``` + * function *foo(...) {...} + * const x = function *(...) {...} + * ``` + * This is always `false` for arrow functions as they cannot be generators. + */ + generator: boolean; + /** + * The function's name. + * - For an `ArrowFunctionExpression` this is always `null`. + * - For a `FunctionExpression` this may be `null` if the name is omitted. + * - For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if + * and only if the parent is an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The list of parameters declared for the function. + */ + params: Parameter[]; + /** + * The return type annotation for the function. + * This is `undefined` if there is no return type declared. + */ + returnType?: TSTypeAnnotation; + /** + * The generic type parameter declaration for the function. + * This is `undefined` if there are no generic type parameters declared. + */ + typeParameters?: TSTypeParameterDeclaration; +} +export declare type FunctionDeclaration = FunctionDeclarationWithName | FunctionDeclarationWithOptionalName; +declare interface FunctionDeclarationBase extends FunctionBase { + type: AST_NODE_TYPES.FunctionDeclaration; + body: BlockStatement; + declare?: false; + expression: false; +} +export declare interface FunctionDeclarationWithName extends FunctionDeclarationBase { + id: Identifier; +} +export declare interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase { + id: Identifier | null; +} +export declare interface FunctionExpression extends FunctionBase { + type: AST_NODE_TYPES.FunctionExpression; + body: BlockStatement; + expression: false; +} +export declare type FunctionLike = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | TSDeclareFunction | TSEmptyBodyFunctionExpression; +export declare interface Identifier extends BaseNode { + type: AST_NODE_TYPES.Identifier; + name: string; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} +export declare interface IdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.Identifier; +} +export declare interface IfStatement extends BaseNode { + type: AST_NODE_TYPES.IfStatement; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} +export declare interface ImportAttribute extends BaseNode { + type: AST_NODE_TYPES.ImportAttribute; + key: Identifier | Literal; + value: Literal; +} +export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; +export declare interface ImportDeclaration extends BaseNode { + type: AST_NODE_TYPES.ImportDeclaration; + /** + * The assertions declared for the export. + * ``` + * import * from 'mod' assert { type: 'json' }; + * ``` + */ + assertions: ImportAttribute[]; + /** + * The kind of the import. + */ + importKind: ImportKind; + /** + * The source module being imported from. + */ + source: StringLiteral; + /** + * The specifiers being imported. + * If this is an empty array then either there are no specifiers: + * ``` + * import {} from 'mod'; + * ``` + * Or it is a side-effect import: + * ``` + * import 'mod'; + * ``` + */ + specifiers: ImportClause[]; +} +export declare interface ImportDefaultSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportDefaultSpecifier; + local: Identifier; +} +export declare interface ImportExpression extends BaseNode { + type: AST_NODE_TYPES.ImportExpression; + source: Expression; + attributes: Expression | null; +} +declare type ImportKind = ExportAndImportKind; +export declare interface ImportNamespaceSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportNamespaceSpecifier; + local: Identifier; +} +export declare interface ImportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportSpecifier; + local: Identifier; + imported: Identifier; + importKind: ImportKind; +} +export declare type IterationStatement = DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement; +export declare interface JSXAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXAttribute; + name: JSXIdentifier | JSXNamespacedName; + value: JSXExpression | Literal | null; +} +export declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; +export declare interface JSXClosingElement extends BaseNode { + type: AST_NODE_TYPES.JSXClosingElement; + name: JSXTagNameExpression; +} +export declare interface JSXClosingFragment extends BaseNode { + type: AST_NODE_TYPES.JSXClosingFragment; +} +export declare interface JSXElement extends BaseNode { + type: AST_NODE_TYPES.JSXElement; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: JSXChild[]; +} +export declare interface JSXEmptyExpression extends BaseNode { + type: AST_NODE_TYPES.JSXEmptyExpression; +} +export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild; +export declare interface JSXExpressionContainer extends BaseNode { + type: AST_NODE_TYPES.JSXExpressionContainer; + expression: Expression | JSXEmptyExpression; +} +export declare interface JSXFragment extends BaseNode { + type: AST_NODE_TYPES.JSXFragment; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: JSXChild[]; +} +export declare interface JSXIdentifier extends BaseNode { + type: AST_NODE_TYPES.JSXIdentifier; + name: string; +} +export declare interface JSXIdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXIdentifier; +} +export declare interface JSXMemberExpression extends BaseNode { + type: AST_NODE_TYPES.JSXMemberExpression; + object: JSXTagNameExpression; + property: JSXIdentifier; +} +export declare interface JSXNamespacedName extends BaseNode { + type: AST_NODE_TYPES.JSXNamespacedName; + namespace: JSXIdentifier; + name: JSXIdentifier; +} +export declare interface JSXOpeningElement extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningElement; + typeParameters?: TSTypeParameterInstantiation; + selfClosing: boolean; + name: JSXTagNameExpression; + attributes: (JSXAttribute | JSXSpreadAttribute)[]; +} +export declare interface JSXOpeningFragment extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningFragment; +} +export declare interface JSXSpreadAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadAttribute; + argument: Expression; +} +export declare interface JSXSpreadChild extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadChild; + expression: Expression | JSXEmptyExpression; +} +export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +export declare interface JSXText extends BaseNode { + type: AST_NODE_TYPES.JSXText; + value: string; + raw: string; +} +export declare interface JSXTextToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXText; +} +export declare interface KeywordToken extends BaseToken { + type: AST_TOKEN_TYPES.Keyword; +} +export declare interface LabeledStatement extends BaseNode { + type: AST_NODE_TYPES.LabeledStatement; + label: Identifier; + body: Statement; +} +export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion; +export declare interface LineComment extends BaseToken { + type: AST_TOKEN_TYPES.Line; +} +export declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral; +declare interface LiteralBase extends BaseNode { + type: AST_NODE_TYPES.Literal; + raw: string; + value: RegExp | bigint | boolean | number | string | null; +} +export declare type LiteralExpression = Literal | TemplateLiteral; +export declare interface LogicalExpression extends BaseNode { + type: AST_NODE_TYPES.LogicalExpression; + operator: '??' | '&&' | '||'; + left: Expression; + right: Expression; +} +export declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName; +declare interface MemberExpressionBase extends BaseNode { + object: Expression; + property: Expression | Identifier | PrivateIdentifier; + computed: boolean; + optional: boolean; +} +export declare interface MemberExpressionComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Expression; + computed: true; +} +export declare interface MemberExpressionNonComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Identifier | PrivateIdentifier; + computed: false; +} +export declare interface MetaProperty extends BaseNode { + type: AST_NODE_TYPES.MetaProperty; + meta: Identifier; + property: Identifier; +} +export declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName; +/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ +declare interface MethodDefinitionBase extends BaseNode { + key: PropertyName; + value: FunctionExpression | TSEmptyBodyFunctionExpression; + computed: boolean; + static: boolean; + kind: 'constructor' | 'get' | 'method' | 'set'; + optional?: boolean; + decorators?: Decorator[]; + accessibility?: Accessibility; + typeParameters?: TSTypeParameterDeclaration; + override?: boolean; +} +export declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare type Modifier = TSAbstractKeyword | TSAsyncKeyword | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSReadonlyKeyword | TSStaticKeyword; +declare type ModuleBody_TODOFixThis = TSModuleBlock | TSModuleDeclaration; +export declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare interface NewExpression extends BaseNode { + type: AST_NODE_TYPES.NewExpression; + callee: LeftHandSideExpression; + arguments: CallExpressionArgument[]; + typeParameters?: TSTypeParameterInstantiation; +} +export declare type Node = AccessorProperty | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ChainExpression | ClassBody | ClassDeclaration | ClassExpression | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | PrivateIdentifier | Program | Property | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression | SpreadElement | StaticBlock | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractAccessorProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; +declare interface NodeOrTokenData { + /** + * The source location information of the node. + * + * The loc property is defined as nullable by ESTree, but ESLint requires this property. + * + * @see {SourceLocation} + */ + loc: SourceLocation; + /** + * @see {Range} + */ + range: Range; + type: string; +} +export declare interface NullLiteral extends LiteralBase { + value: null; + raw: 'null'; +} +export declare interface NullToken extends BaseToken { + type: AST_TOKEN_TYPES.Null; +} +export declare interface NumberLiteral extends LiteralBase { + value: number; +} +export declare interface NumericToken extends BaseToken { + type: AST_TOKEN_TYPES.Numeric; +} +export declare interface ObjectExpression extends BaseNode { + type: AST_NODE_TYPES.ObjectExpression; + properties: ObjectLiteralElement[]; +} +export declare type ObjectLiteralElement = Property | SpreadElement; +export declare type ObjectLiteralElementLike = ObjectLiteralElement; +export declare interface ObjectPattern extends BaseNode { + type: AST_NODE_TYPES.ObjectPattern; + properties: (Property | RestElement)[]; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} +export declare type OptionalRangeAndLoc = Pick> & { + range?: Range; + loc?: SourceLocation; +}; +export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty; +export declare interface Position { + /** + * Line number (1-indexed) + */ + line: number; + /** + * Column number on the line (0-indexed) + */ + column: number; +} +export declare type PrimaryExpression = ArrayExpression | ArrayPattern | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | JSXOpeningElement | LiteralExpression | MetaProperty | ObjectExpression | ObjectPattern | Super | TemplateLiteral | ThisExpression | TSNullKeyword; +export declare interface PrivateIdentifier extends BaseNode { + type: AST_NODE_TYPES.PrivateIdentifier; + name: string; +} +export declare interface Program extends BaseNode { + type: AST_NODE_TYPES.Program; + body: ProgramStatement[]; + sourceType: 'module' | 'script'; + comments?: Comment[]; + tokens?: Token[]; +} +export declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration; +export declare type Property = PropertyComputedName | PropertyNonComputedName; +declare interface PropertyBase extends BaseNode { + type: AST_NODE_TYPES.Property; + key: PropertyName; + value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression; + computed: boolean; + method: boolean; + shorthand: boolean; + optional?: boolean; + kind: 'get' | 'init' | 'set'; +} +export declare interface PropertyComputedName extends PropertyBase { + key: PropertyNameComputed; + computed: true; +} +export declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName; +declare interface PropertyDefinitionBase extends BaseNode { + key: PropertyName; + value: Expression | null; + computed: boolean; + static: boolean; + declare: boolean; + readonly?: boolean; + decorators?: Decorator[]; + accessibility?: Accessibility; + optional?: boolean; + definite?: boolean; + typeAnnotation?: TSTypeAnnotation; + override?: boolean; +} +export declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed; +export declare type PropertyNameComputed = Expression; +export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral; +export declare interface PropertyNonComputedName extends PropertyBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface PunctuatorToken extends BaseToken { + type: AST_TOKEN_TYPES.Punctuator; + value: ValueOf; +} +export declare interface PunctuatorTokenToText extends AssignmentOperatorToText { + [SyntaxKind.OpenBraceToken]: '{'; + [SyntaxKind.CloseBraceToken]: '}'; + [SyntaxKind.OpenParenToken]: '('; + [SyntaxKind.CloseParenToken]: ')'; + [SyntaxKind.OpenBracketToken]: '['; + [SyntaxKind.CloseBracketToken]: ']'; + [SyntaxKind.DotToken]: '.'; + [SyntaxKind.DotDotDotToken]: '...'; + [SyntaxKind.SemicolonToken]: ';'; + [SyntaxKind.CommaToken]: ','; + [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.LessThanSlashToken]: ''; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.EqualsGreaterThanToken]: '=>'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.SlashToken]: '/'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusPlusToken]: '++'; + [SyntaxKind.MinusMinusToken]: '--'; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.ExclamationToken]: '!'; + [SyntaxKind.TildeToken]: '~'; + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.QuestionToken]: '?'; + [SyntaxKind.ColonToken]: ':'; + [SyntaxKind.AtToken]: '@'; + [SyntaxKind.QuestionQuestionToken]: '??'; + [SyntaxKind.BacktickToken]: '`'; + [SyntaxKind.HashToken]: '#'; +} +/** + * An array of two numbers. + * Both numbers are a 0-based index which is the position in the array of source code characters. + * The first is the start position of the node, the second is the end position of the node. + */ +export declare type Range = [ + number, + number +]; +export declare interface RegExpLiteral extends LiteralBase { + value: RegExp | null; + regex: { + pattern: string; + flags: string; + }; +} +export declare interface RegularExpressionToken extends BaseToken { + type: AST_TOKEN_TYPES.RegularExpression; + regex: { + pattern: string; + flags: string; + }; +} +export declare interface RestElement extends BaseNode { + type: AST_NODE_TYPES.RestElement; + argument: DestructuringPattern; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + value?: AssignmentPattern; + decorators?: Decorator[]; +} +export declare interface ReturnStatement extends BaseNode { + type: AST_NODE_TYPES.ReturnStatement; + argument: Expression | null; +} +export declare interface SequenceExpression extends BaseNode { + type: AST_NODE_TYPES.SequenceExpression; + expressions: Expression[]; +} +export declare interface SourceLocation { + /** + * The position of the first character of the parsed source region + */ + start: Position; + /** + * The position of the first character after the parsed source region + */ + end: Position; +} +export declare interface SpreadElement extends BaseNode { + type: AST_NODE_TYPES.SpreadElement; + argument: Expression; +} +export declare type Statement = BlockStatement | BreakStatement | ClassDeclarationWithName | ContinueStatement | DebuggerStatement | DoWhileStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclarationWithName | IfStatement | ImportDeclaration | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | TSDeclareFunction | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration | VariableDeclaration | WhileStatement | WithStatement; +export declare interface StaticBlock extends BaseNode { + type: AST_NODE_TYPES.StaticBlock; + body: Statement[]; +} +export declare interface StringLiteral extends LiteralBase { + value: string; +} +export declare interface StringToken extends BaseToken { + type: AST_TOKEN_TYPES.String; +} +export declare interface Super extends BaseNode { + type: AST_NODE_TYPES.Super; +} +export declare interface SwitchCase extends BaseNode { + type: AST_NODE_TYPES.SwitchCase; + test: Expression | null; + consequent: Statement[]; +} +export declare interface SwitchStatement extends BaseNode { + type: AST_NODE_TYPES.SwitchStatement; + discriminant: Expression; + cases: SwitchCase[]; +} +export declare interface TaggedTemplateExpression extends BaseNode { + type: AST_NODE_TYPES.TaggedTemplateExpression; + typeParameters?: TSTypeParameterInstantiation; + tag: LeftHandSideExpression; + quasi: TemplateLiteral; +} +export declare interface TemplateElement extends BaseNode { + type: AST_NODE_TYPES.TemplateElement; + value: { + raw: string; + cooked: string; + }; + tail: boolean; +} +export declare interface TemplateLiteral extends BaseNode { + type: AST_NODE_TYPES.TemplateLiteral; + quasis: TemplateElement[]; + expressions: Expression[]; +} +export declare interface TemplateToken extends BaseToken { + type: AST_TOKEN_TYPES.Template; +} +export declare interface ThisExpression extends BaseNode { + type: AST_NODE_TYPES.ThisExpression; +} +export declare interface ThrowStatement extends BaseNode { + type: AST_NODE_TYPES.ThrowStatement; + argument: Statement | TSAsExpression | null; +} +export declare type Token = BooleanToken | Comment | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken; +export declare interface TryStatement extends BaseNode { + type: AST_NODE_TYPES.TryStatement; + block: BlockStatement; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} +export declare type TSAbstractAccessorProperty = TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName; +export declare interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractAccessorProperty; + value: null; +} +export declare interface TSAbstractAccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractAccessorProperty; + value: null; +} +export declare interface TSAbstractKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAbstractKeyword; +} +export declare type TSAbstractMethodDefinition = TSAbstractMethodDefinitionComputedName | TSAbstractMethodDefinitionNonComputedName; +export declare interface TSAbstractMethodDefinitionComputedName extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} +export declare interface TSAbstractMethodDefinitionNonComputedName extends MethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} +export declare type TSAbstractPropertyDefinition = TSAbstractPropertyDefinitionComputedName | TSAbstractPropertyDefinitionNonComputedName; +export declare interface TSAbstractPropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} +export declare interface TSAbstractPropertyDefinitionNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} +export declare interface TSAnyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAnyKeyword; +} +export declare interface TSArrayType extends BaseNode { + type: AST_NODE_TYPES.TSArrayType; + elementType: TypeNode; +} +export declare interface TSAsExpression extends BaseNode { + type: AST_NODE_TYPES.TSAsExpression; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSAsyncKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAsyncKeyword; +} +export declare interface TSBigIntKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBigIntKeyword; +} +export declare interface TSBooleanKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBooleanKeyword; +} +export declare interface TSCallSignatureDeclaration extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSCallSignatureDeclaration; +} +export declare interface TSClassImplements extends TSHeritageBase { + type: AST_NODE_TYPES.TSClassImplements; +} +export declare interface TSConditionalType extends BaseNode { + type: AST_NODE_TYPES.TSConditionalType; + checkType: TypeNode; + extendsType: TypeNode; + trueType: TypeNode; + falseType: TypeNode; +} +export declare interface TSConstructorType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructorType; + abstract: boolean; +} +export declare interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructSignatureDeclaration; +} +export declare interface TSDeclareFunction extends FunctionBase { + type: AST_NODE_TYPES.TSDeclareFunction; + body?: BlockStatement; + declare?: boolean; + expression: false; +} +export declare interface TSDeclareKeyword extends BaseNode { + type: AST_NODE_TYPES.TSDeclareKeyword; +} +export declare interface TSEmptyBodyFunctionExpression extends FunctionBase { + type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression; + body: null; + id: null; +} +export declare interface TSEnumDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSEnumDeclaration; + /** + * Whether this is a `const` enum. + * ``` + * const enum Foo {...} + * ``` + */ + const?: boolean; + /** + * Whether this is a `declare`d enum. + * ``` + * declare enum Foo {...} + * ``` + */ + declare?: boolean; + /** + * The enum name. + */ + id: Identifier; + /** + * The enum members. + */ + members: TSEnumMember[]; + modifiers?: Modifier[]; +} +export declare type TSEnumMember = TSEnumMemberComputedName | TSEnumMemberNonComputedName; +declare interface TSEnumMemberBase extends BaseNode { + type: AST_NODE_TYPES.TSEnumMember; + id: PropertyNameComputed | PropertyNameNonComputed; + initializer?: Expression; + computed?: boolean; +} +/** + * this should only really happen in semantically invalid code (errors 1164 and 2452) + * + * VALID: + * enum Foo { ['a'] } + * + * INVALID: + * const x = 'a'; + * enum Foo { [x] } + * enum Bar { ['a' + 'b'] } + */ +export declare interface TSEnumMemberComputedName extends TSEnumMemberBase { + id: PropertyNameComputed; + computed: true; +} +export declare interface TSEnumMemberNonComputedName extends TSEnumMemberBase { + id: PropertyNameNonComputed; + computed?: false; +} +export declare interface TSExportAssignment extends BaseNode { + type: AST_NODE_TYPES.TSExportAssignment; + expression: Expression; +} +export declare interface TSExportKeyword extends BaseNode { + type: AST_NODE_TYPES.TSExportKeyword; +} +export declare interface TSExternalModuleReference extends BaseNode { + type: AST_NODE_TYPES.TSExternalModuleReference; + expression: Expression; +} +declare interface TSFunctionSignatureBase extends BaseNode { + params: Parameter[]; + returnType?: TSTypeAnnotation; + typeParameters?: TSTypeParameterDeclaration; +} +export declare interface TSFunctionType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSFunctionType; +} +declare interface TSHeritageBase extends BaseNode { + expression: Expression; + typeParameters?: TSTypeParameterInstantiation; +} +export declare interface TSImportEqualsDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSImportEqualsDeclaration; + /** + * The locally imported name + */ + id: Identifier; + /** + * The value being aliased. + * ``` + * import F1 = A; + * import F2 = A.B.C; + * import F3 = require('mod'); + * ``` + */ + moduleReference: EntityName | TSExternalModuleReference; + importKind: ImportKind; + /** + * Whether this is immediately exported + * ``` + * export import F = A; + * ``` + */ + isExport: boolean; +} +export declare interface TSImportType extends BaseNode { + type: AST_NODE_TYPES.TSImportType; + isTypeOf: boolean; + parameter: TypeNode; + qualifier: EntityName | null; + typeParameters: TSTypeParameterInstantiation | null; +} +export declare interface TSIndexedAccessType extends BaseNode { + type: AST_NODE_TYPES.TSIndexedAccessType; + objectType: TypeNode; + indexType: TypeNode; +} +export declare interface TSIndexSignature extends BaseNode { + type: AST_NODE_TYPES.TSIndexSignature; + parameters: Parameter[]; + typeAnnotation?: TSTypeAnnotation; + readonly?: boolean; + accessibility?: Accessibility; + export?: boolean; + static?: boolean; +} +export declare interface TSInferType extends BaseNode { + type: AST_NODE_TYPES.TSInferType; + typeParameter: TSTypeParameter; +} +export declare interface TSInstantiationExpression extends BaseNode { + type: AST_NODE_TYPES.TSInstantiationExpression; + expression: Expression; + typeParameters: TSTypeParameterInstantiation; +} +export declare interface TSInterfaceBody extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceBody; + body: TypeElement[]; +} +export declare interface TSInterfaceDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceDeclaration; + abstract?: boolean; + /** + * The body of the interface + */ + body: TSInterfaceBody; + /** + * Whether the interface was `declare`d, `undefined` otherwise + */ + declare?: boolean; + /** + * The types this interface `extends` + */ + extends?: TSInterfaceHeritage[]; + /** + * The name of this interface + */ + id: Identifier; + implements?: TSInterfaceHeritage[]; + /** + * The generic type parameters declared for the interface. + * This is `undefined` if there are no generic type parameters declared. + */ + typeParameters?: TSTypeParameterDeclaration; +} +export declare interface TSInterfaceHeritage extends TSHeritageBase { + type: AST_NODE_TYPES.TSInterfaceHeritage; +} +export declare interface TSIntersectionType extends BaseNode { + type: AST_NODE_TYPES.TSIntersectionType; + types: TypeNode[]; +} +export declare interface TSIntrinsicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSIntrinsicKeyword; +} +export declare interface TSLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSLiteralType; + literal: LiteralExpression | UnaryExpression | UpdateExpression; +} +export declare interface TSMappedType extends BaseNode { + type: AST_NODE_TYPES.TSMappedType; + typeParameter: TSTypeParameter; + readonly?: boolean | '-' | '+'; + optional?: boolean | '-' | '+'; + typeAnnotation?: TypeNode; + nameType: TypeNode | null; +} +export declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName; +declare interface TSMethodSignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSMethodSignature; + key: PropertyName; + computed: boolean; + params: Parameter[]; + optional?: boolean; + returnType?: TSTypeAnnotation; + readonly?: boolean; + typeParameters?: TSTypeParameterDeclaration; + accessibility?: Accessibility; + export?: boolean; + static?: boolean; + kind: 'get' | 'method' | 'set'; +} +export declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface TSModuleBlock extends BaseNode { + type: AST_NODE_TYPES.TSModuleBlock; + body: ProgramStatement[]; +} +export declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace; +declare interface TSModuleDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.TSModuleDeclaration; + /** + * The name of the module + * ``` + * namespace A {} + * namespace A.B.C {} + * module 'a' {} + * ``` + */ + id: Identifier | StringLiteral; + /** + * The body of the module. + * This can only be `undefined` for the code `declare module 'mod';` + * This will be a `TSModuleDeclaration` if the name is "nested" (`Foo.Bar`). + */ + body?: ModuleBody_TODOFixThis; + /** + * Whether this is a global declaration + * ``` + * declare global {} + * ``` + */ + global?: boolean; + /** + * Whether the module is `declare`d + * ``` + * declare namespace F {} + * ``` + */ + declare?: boolean; + modifiers?: Modifier[]; + /** + * The keyword used to define this module declaration + * ``` + * namespace Foo {} + * ^^^^^^^^^ + * + * module 'foo' {} + * ^^^^^^ + * + * declare global {} + * ^^^^^^ + * ``` + */ + kind: TSModuleDeclarationKind; +} +export declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase { + kind: 'global'; + body: TSModuleBlock; + id: Identifier; + global: true; +} +export declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace'; +export declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId; +declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase { + kind: 'module'; + global?: undefined; +} +export declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: Identifier; + body: ModuleBody_TODOFixThis; +} +export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared; +export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: StringLiteral; + declare: true; + body?: TSModuleBlock; +} +export declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: StringLiteral; + declare: false; + body: TSModuleBlock; +} +export declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase { + kind: 'namespace'; + id: Identifier; + body: ModuleBody_TODOFixThis; + global?: undefined; +} +export declare interface TSNamedTupleMember extends BaseNode { + type: AST_NODE_TYPES.TSNamedTupleMember; + elementType: TypeNode; + label: Identifier; + optional: boolean; +} +export declare interface TSNamespaceExportDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration; + /** + * The name the global variable being exported to + */ + id: Identifier; +} +export declare interface TSNeverKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNeverKeyword; +} +export declare interface TSNonNullExpression extends BaseNode { + type: AST_NODE_TYPES.TSNonNullExpression; + expression: Expression; +} +export declare interface TSNullKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNullKeyword; +} +export declare interface TSNumberKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNumberKeyword; +} +export declare interface TSObjectKeyword extends BaseNode { + type: AST_NODE_TYPES.TSObjectKeyword; +} +export declare interface TSOptionalType extends BaseNode { + type: AST_NODE_TYPES.TSOptionalType; + typeAnnotation: TypeNode; +} +export declare interface TSParameterProperty extends BaseNode { + type: AST_NODE_TYPES.TSParameterProperty; + accessibility?: Accessibility; + readonly?: boolean; + static?: boolean; + export?: boolean; + override?: boolean; + parameter: AssignmentPattern | BindingName | RestElement; + decorators?: Decorator[]; +} +export declare interface TSPrivateKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPrivateKeyword; +} +export declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName; +declare interface TSPropertySignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSPropertySignature; + key: PropertyName; + optional?: boolean; + computed: boolean; + typeAnnotation?: TSTypeAnnotation; + initializer?: Expression; + readonly?: boolean; + static?: boolean; + export?: boolean; + accessibility?: Accessibility; +} +export declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface TSProtectedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSProtectedKeyword; +} +export declare interface TSPublicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPublicKeyword; +} +export declare interface TSQualifiedName extends BaseNode { + type: AST_NODE_TYPES.TSQualifiedName; + left: EntityName; + right: Identifier; +} +export declare interface TSReadonlyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSReadonlyKeyword; +} +export declare interface TSRestType extends BaseNode { + type: AST_NODE_TYPES.TSRestType; + typeAnnotation: TypeNode; +} +export declare interface TSSatisfiesExpression extends BaseNode { + type: AST_NODE_TYPES.TSSatisfiesExpression; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSStaticKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStaticKeyword; +} +export declare interface TSStringKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStringKeyword; +} +export declare interface TSSymbolKeyword extends BaseNode { + type: AST_NODE_TYPES.TSSymbolKeyword; +} +export declare interface TSTemplateLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSTemplateLiteralType; + quasis: TemplateElement[]; + types: TypeNode[]; +} +export declare interface TSThisType extends BaseNode { + type: AST_NODE_TYPES.TSThisType; +} +export declare interface TSTupleType extends BaseNode { + type: AST_NODE_TYPES.TSTupleType; + elementTypes: TypeNode[]; +} +export declare interface TSTypeAliasDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeAliasDeclaration; + /** + * Whether the type was `declare`d. + * ``` + * declare type T = 1; + * ``` + */ + declare?: boolean; + /** + * The name of the type. + */ + id: Identifier; + /** + * The "value" (type) of the declaration + */ + typeAnnotation: TypeNode; + /** + * The generic type parameters declared for the type. + * This is `undefined` if there are no generic type parameters declared. + */ + typeParameters?: TSTypeParameterDeclaration; +} +export declare interface TSTypeAnnotation extends BaseNode { + type: AST_NODE_TYPES.TSTypeAnnotation; + typeAnnotation: TypeNode; +} +export declare interface TSTypeAssertion extends BaseNode { + type: AST_NODE_TYPES.TSTypeAssertion; + typeAnnotation: TypeNode; + expression: Expression; +} +export declare interface TSTypeLiteral extends BaseNode { + type: AST_NODE_TYPES.TSTypeLiteral; + members: TypeElement[]; +} +export declare interface TSTypeOperator extends BaseNode { + type: AST_NODE_TYPES.TSTypeOperator; + operator: 'keyof' | 'readonly' | 'unique'; + typeAnnotation?: TypeNode; +} +export declare interface TSTypeParameter extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameter; + name: Identifier; + constraint?: TypeNode; + default?: TypeNode; + in: boolean; + out: boolean; + const: boolean; +} +export declare interface TSTypeParameterDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterDeclaration; + params: TSTypeParameter[]; +} +export declare interface TSTypeParameterInstantiation extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterInstantiation; + params: TypeNode[]; +} +export declare interface TSTypePredicate extends BaseNode { + type: AST_NODE_TYPES.TSTypePredicate; + asserts: boolean; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; +} +export declare interface TSTypeQuery extends BaseNode { + type: AST_NODE_TYPES.TSTypeQuery; + exprName: EntityName; + typeParameters?: TSTypeParameterInstantiation; +} +export declare interface TSTypeReference extends BaseNode { + type: AST_NODE_TYPES.TSTypeReference; + typeName: EntityName; + typeParameters?: TSTypeParameterInstantiation; +} +export declare type TSUnaryExpression = AwaitExpression | LeftHandSideExpression | UnaryExpression | UpdateExpression; +export declare interface TSUndefinedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUndefinedKeyword; +} +export declare interface TSUnionType extends BaseNode { + type: AST_NODE_TYPES.TSUnionType; + types: TypeNode[]; +} +export declare interface TSUnknownKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUnknownKeyword; +} +export declare interface TSVoidKeyword extends BaseNode { + type: AST_NODE_TYPES.TSVoidKeyword; +} +export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; +export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword; +export declare interface UnaryExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UnaryExpression; + operator: '-' | '!' | '+' | '~' | 'delete' | 'typeof' | 'void'; +} +declare interface UnaryExpressionBase extends BaseNode { + operator: string; + prefix: boolean; + argument: LeftHandSideExpression | Literal | UnaryExpression; +} +export declare interface UpdateExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UpdateExpression; + operator: '--' | '++'; +} +declare type ValueOf = T[keyof T]; +export declare interface VariableDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * let x; + * let y, z; + * ``` + */ + declarations: VariableDeclarator[]; + /** + * Whether the declaration is `declare`d + * ``` + * declare const x = 1; + * ``` + */ + declare?: boolean; + /** + * The keyword used to declare the variable(s) + * ``` + * const x = 1; + * let y = 2; + * var z = 3; + * ``` + */ + kind: 'const' | 'let' | 'var'; +} +export declare interface VariableDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: BindingName; + init: Expression | null; + definite?: boolean; +} +export declare interface WhileStatement extends BaseNode { + type: AST_NODE_TYPES.WhileStatement; + test: Expression; + body: Statement; +} +export declare interface WithStatement extends BaseNode { + type: AST_NODE_TYPES.WithStatement; + object: Expression; + body: Statement; +} +export declare interface YieldExpression extends BaseNode { + type: AST_NODE_TYPES.YieldExpression; + delegate: boolean; + argument?: Expression; +} +export {}; +//# sourceMappingURL=ast-spec.d.ts.map diff --git a/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts index 7e86a41e..7459fa5e 100644 --- a/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts @@ -1,5 +1,5 @@ -export { AST_NODE_TYPES, AST_TOKEN_TYPES } from './generated/ast-spec'; -export * from './lib'; -export * from './parser-options'; -export * from './ts-estree'; -//# sourceMappingURL=index.d.ts.map +export { AST_NODE_TYPES, AST_TOKEN_TYPES } from './generated/ast-spec'; +export * from './lib'; +export * from './parser-options'; +export * from './ts-estree'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts b/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts index f50158b8..d679f4cb 100644 --- a/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +++ b/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts @@ -1,3 +1,3 @@ -type Lib = 'es5' | 'es6' | 'es2015' | 'es7' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'esnext' | 'dom' | 'dom.iterable' | 'webworker' | 'webworker.importscripts' | 'webworker.iterable' | 'scripthost' | 'es2015.core' | 'es2015.collection' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol' | 'es2015.symbol.wellknown' | 'es2016.array.include' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.intl' | 'es2017.typedarrays' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019.array' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2019.intl' | 'es2020.bigint' | 'es2020.date' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2020.intl' | 'es2020.number' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2021.intl' | 'es2022.array' | 'es2022.error' | 'es2022.intl' | 'es2022.object' | 'es2022.sharedmemory' | 'es2022.string' | 'es2022.regexp' | 'es2023.array' | 'esnext.array' | 'esnext.symbol' | 'esnext.asynciterable' | 'esnext.intl' | 'esnext.bigint' | 'esnext.string' | 'esnext.promise' | 'esnext.weakref' | 'decorators' | 'decorators.legacy' | 'es2016.full' | 'es2017.full' | 'es2018.full' | 'es2019.full' | 'es2020.full' | 'es2021.full' | 'es2022.full' | 'es2023.full' | 'esnext.full' | 'lib'; -export { Lib }; -//# sourceMappingURL=lib.d.ts.map +type Lib = 'es5' | 'es6' | 'es2015' | 'es7' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'esnext' | 'dom' | 'dom.iterable' | 'webworker' | 'webworker.importscripts' | 'webworker.iterable' | 'scripthost' | 'es2015.core' | 'es2015.collection' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol' | 'es2015.symbol.wellknown' | 'es2016.array.include' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.intl' | 'es2017.typedarrays' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019.array' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2019.intl' | 'es2020.bigint' | 'es2020.date' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2020.intl' | 'es2020.number' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2021.intl' | 'es2022.array' | 'es2022.error' | 'es2022.intl' | 'es2022.object' | 'es2022.sharedmemory' | 'es2022.string' | 'es2022.regexp' | 'es2023.array' | 'esnext.array' | 'esnext.symbol' | 'esnext.asynciterable' | 'esnext.intl' | 'esnext.bigint' | 'esnext.string' | 'esnext.promise' | 'esnext.weakref' | 'decorators' | 'decorators.legacy' | 'es2016.full' | 'es2017.full' | 'es2018.full' | 'es2019.full' | 'es2020.full' | 'es2021.full' | 'es2022.full' | 'es2023.full' | 'esnext.full' | 'lib'; +export { Lib }; +//# sourceMappingURL=lib.d.ts.map diff --git a/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts b/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts index e9059892..0bed2ccb 100644 --- a/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +++ b/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts @@ -1,40 +1,40 @@ -import { Program } from 'typescript'; -import { Lib } from './lib'; -type DebugLevel = boolean | ('typescript-eslint' | 'eslint' | 'typescript')[]; -type CacheDurationSeconds = number | 'Infinity'; -type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022; -type SourceType = 'script' | 'module'; -interface ParserOptions { - ecmaFeatures?: { - globalReturn?: boolean; - jsx?: boolean; - }; - ecmaVersion?: EcmaVersion | 'latest'; - jsxPragma?: string | null; - jsxFragmentName?: string | null; - lib?: Lib[]; - emitDecoratorMetadata?: boolean; - comment?: boolean; - debugLevel?: DebugLevel; - errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; - errorOnUnknownASTType?: boolean; - EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; - extraFileExtensions?: string[]; - filePath?: string; - loc?: boolean; - program?: Program; - project?: string | string[] | true; - projectFolderIgnoreList?: (string | RegExp)[]; - range?: boolean; - sourceType?: SourceType; - tokens?: boolean; - tsconfigRootDir?: string; - warnOnUnsupportedTypeScriptVersion?: boolean; - moduleResolver?: string; - cacheLifetime?: { - glob?: CacheDurationSeconds; - }; - [additionalProperties: string]: unknown; -} -export { CacheDurationSeconds, DebugLevel, EcmaVersion, ParserOptions, SourceType, }; -//# sourceMappingURL=parser-options.d.ts.map +import { Program } from 'typescript'; +import { Lib } from './lib'; +type DebugLevel = boolean | ('typescript-eslint' | 'eslint' | 'typescript')[]; +type CacheDurationSeconds = number | 'Infinity'; +type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022; +type SourceType = 'script' | 'module'; +interface ParserOptions { + ecmaFeatures?: { + globalReturn?: boolean; + jsx?: boolean; + }; + ecmaVersion?: EcmaVersion | 'latest'; + jsxPragma?: string | null; + jsxFragmentName?: string | null; + lib?: Lib[]; + emitDecoratorMetadata?: boolean; + comment?: boolean; + debugLevel?: DebugLevel; + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + errorOnUnknownASTType?: boolean; + EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; + extraFileExtensions?: string[]; + filePath?: string; + loc?: boolean; + program?: Program; + project?: string | string[] | true; + projectFolderIgnoreList?: (string | RegExp)[]; + range?: boolean; + sourceType?: SourceType; + tokens?: boolean; + tsconfigRootDir?: string; + warnOnUnsupportedTypeScriptVersion?: boolean; + moduleResolver?: string; + cacheLifetime?: { + glob?: CacheDurationSeconds; + }; + [additionalProperties: string]: unknown; +} +export { CacheDurationSeconds, DebugLevel, EcmaVersion, ParserOptions, SourceType, }; +//# sourceMappingURL=parser-options.d.ts.map diff --git a/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts b/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts index c6d6625b..e3a6d9f0 100644 --- a/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +++ b/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts @@ -1,9 +1,9 @@ -import * as TSESTree from './generated/ast-spec'; -declare module './generated/ast-spec' { - interface BaseNode { - parent?: TSESTree.Node; - } -} -import * as TSESTree_1 from './generated/ast-spec'; -export { TSESTree_1 as TSESTree }; -//# sourceMappingURL=ts-estree.d.ts.map +import * as TSESTree from './generated/ast-spec'; +declare module './generated/ast-spec' { + interface BaseNode { + parent?: TSESTree.Node; + } +} +import * as TSESTree_1 from './generated/ast-spec'; +export { TSESTree_1 as TSESTree }; +//# sourceMappingURL=ts-estree.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts index 49090177..3c26eec9 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts @@ -1,9 +1,9 @@ -import { SourceFile } from 'typescript'; -import { ASTMaps } from './convert'; -import { ParseSettings } from './parseSettings'; -import { TSESTree } from './ts-estree'; -export declare function astConverter(ast: SourceFile, parseSettings: ParseSettings, shouldPreserveNodeMaps: boolean): { - estree: TSESTree.Program; - astMaps: ASTMaps; -}; -//# sourceMappingURL=ast-converter.d.ts.map +import { SourceFile } from 'typescript'; +import { ASTMaps } from './convert'; +import { ParseSettings } from './parseSettings'; +import { TSESTree } from './ts-estree'; +export declare function astConverter(ast: SourceFile, parseSettings: ParseSettings, shouldPreserveNodeMaps: boolean): { + estree: TSESTree.Program; + astMaps: ASTMaps; +}; +//# sourceMappingURL=ast-converter.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts index ed132ffe..7e85085b 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts @@ -1,10 +1,10 @@ -/** - * Clears all of the internal caches. - * Generally you shouldn't need or want to use this. - * Examples of intended uses: - * - In tests to reset parser state to keep tests isolated. - * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. - */ -export declare function clearCaches(): void; -export declare const clearProgramCache: typeof clearCaches; -//# sourceMappingURL=clear-caches.d.ts.map +/** + * Clears all of the internal caches. + * Generally you shouldn't need or want to use this. + * Examples of intended uses: + * - In tests to reset parser state to keep tests isolated. + * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. + */ +export declare function clearCaches(): void; +export declare const clearProgramCache: typeof clearCaches; +//# sourceMappingURL=clear-caches.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts index d68e46e2..aab88d88 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts @@ -1,11 +1,11 @@ -import * as ts from 'typescript'; -import { TSESTree } from './ts-estree'; -/** - * Convert all comments for the given AST. - * @param ast the AST object - * @param code the TypeScript code - * @returns the converted ESTreeComment - * @private - */ -export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[]; -//# sourceMappingURL=convert-comments.d.ts.map +import * as ts from 'typescript'; +import { TSESTree } from './ts-estree'; +/** + * Convert all comments for the given AST. + * @param ast the AST object + * @param code the TypeScript code + * @returns the converted ESTreeComment + * @private + */ +export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[]; +//# sourceMappingURL=convert-comments.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts index b97f9c4c..e6c72b7e 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts @@ -1,159 +1,159 @@ -import * as ts from 'typescript'; -import { TSError } from './node-utils'; -import { ParserWeakMap, ParserWeakMapESTreeToTSNode } from './parser-options'; -import { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; -import { TSESTree, TSNode } from './ts-estree'; -interface ConverterOptions { - errorOnUnknownASTType: boolean; - shouldPreserveNodeMaps: boolean; -} -/** - * Extends and formats a given error object - * @param error the error object - * @returns converted error object - */ -export declare function convertError(error: ts.DiagnosticWithLocation | SemanticOrSyntacticError): TSError; -export interface ASTMaps { - esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; - tsNodeToESTreeNodeMap: ParserWeakMap; -} -export declare class Converter { - private readonly ast; - private readonly options; - private readonly esTreeNodeToTSNodeMap; - private readonly tsNodeToESTreeNodeMap; - private allowPattern; - private inTypeMode; - /** - * Converts a TypeScript node into an ESTree node - * @param ast the full TypeScript AST - * @param options additional options for the conversion - * @returns the converted ESTreeNode - */ - constructor(ast: ts.SourceFile, options: ConverterOptions); - getASTMaps(): ASTMaps; - convertProgram(): TSESTree.Program; - /** - * Converts a TypeScript node into an ESTree node. - * @param node the child ts.Node - * @param parent parentNode - * @param inTypeMode flag to determine if we are in typeMode - * @param allowPattern flag to determine if patterns are allowed - * @returns the converted ESTree node - */ - private converter; - /** - * Fixes the exports of the given ts.Node - * @param node the ts.Node - * @param result result - * @returns the ESTreeNode with fixed exports - */ - private fixExports; - /** - * Register specific TypeScript node into map with first ESTree node provided - */ - private registerTSNodeInNodeMap; - /** - * Converts a TypeScript node into an ESTree node. - * @param child the child ts.Node - * @param parent parentNode - * @returns the converted ESTree node - */ - private convertPattern; - /** - * Converts a TypeScript node into an ESTree node. - * @param child the child ts.Node - * @param parent parentNode - * @returns the converted ESTree node - */ - private convertChild; - /** - * Converts a TypeScript node into an ESTree node. - * @param child the child ts.Node - * @param parent parentNode - * @returns the converted ESTree node - */ - private convertType; - private createNode; - private convertBindingNameWithTypeAnnotation; - /** - * Converts a child into a type annotation. This creates an intermediary - * TypeAnnotation node to match what Flow does. - * @param child The TypeScript AST node to convert. - * @param parent parentNode - * @returns The type annotation node. - */ - private convertTypeAnnotation; - /** - * Coverts body Nodes and add a directive field to StringLiterals - * @param nodes of ts.Node - * @param parent parentNode - * @returns Array of body statements - */ - private convertBodyExpressions; - /** - * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node - * @param typeArguments ts.NodeArray typeArguments - * @param node parent used to create this node - * @returns TypeParameterInstantiation node - */ - private convertTypeArgumentsToTypeParameters; - /** - * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node - * @param typeParameters ts.Node typeParameters - * @returns TypeParameterDeclaration node - */ - private convertTSTypeParametersToTypeParametersDeclaration; - /** - * Converts an array of ts.Node parameters into an array of ESTreeNode params - * @param parameters An array of ts.Node params to be converted - * @returns an array of converted ESTreeNode params - */ - private convertParameters; - private convertChainExpression; - /** - * For nodes that are copied directly from the TypeScript AST into - * ESTree mostly as-is. The only difference is the addition of a type - * property instead of a kind property. Recursively copies all children. - */ - private deeplyCopy; - private convertJSXIdentifier; - private convertJSXNamespaceOrIdentifier; - /** - * Converts a TypeScript JSX node.tagName into an ESTree node.name - * @param node the tagName object from a JSX ts.Node - * @param parent - * @returns the converted ESTree name object - */ - private convertJSXTagName; - private convertMethodSignature; - private convertAssertClasue; - /** - * Applies the given TS modifiers to the given result object. - * - * This method adds not standardized `modifiers` property in nodes - * - * @param result - * @param modifiers original ts.Nodes from the node.modifiers array - * @returns the current result object will be mutated - */ - private applyModifiersToResult; - /** - * Uses the provided range location to adjust the location data of the given Node - * @param result The node that will have its location data mutated - * @param childRange The child node range used to expand location - */ - private fixParentLocation; - private assertModuleSpecifier; - /** - * Converts a TypeScript node into an ESTree node. - * The core of the conversion logic: - * Identify and convert each relevant TypeScript SyntaxKind - * @param node the child ts.Node - * @param parent parentNode - * @returns the converted ESTree node - */ - private convertNode; -} -export {}; -//# sourceMappingURL=convert.d.ts.map +import * as ts from 'typescript'; +import { TSError } from './node-utils'; +import { ParserWeakMap, ParserWeakMapESTreeToTSNode } from './parser-options'; +import { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; +import { TSESTree, TSNode } from './ts-estree'; +interface ConverterOptions { + errorOnUnknownASTType: boolean; + shouldPreserveNodeMaps: boolean; +} +/** + * Extends and formats a given error object + * @param error the error object + * @returns converted error object + */ +export declare function convertError(error: ts.DiagnosticWithLocation | SemanticOrSyntacticError): TSError; +export interface ASTMaps { + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; +} +export declare class Converter { + private readonly ast; + private readonly options; + private readonly esTreeNodeToTSNodeMap; + private readonly tsNodeToESTreeNodeMap; + private allowPattern; + private inTypeMode; + /** + * Converts a TypeScript node into an ESTree node + * @param ast the full TypeScript AST + * @param options additional options for the conversion + * @returns the converted ESTreeNode + */ + constructor(ast: ts.SourceFile, options: ConverterOptions); + getASTMaps(): ASTMaps; + convertProgram(): TSESTree.Program; + /** + * Converts a TypeScript node into an ESTree node. + * @param node the child ts.Node + * @param parent parentNode + * @param inTypeMode flag to determine if we are in typeMode + * @param allowPattern flag to determine if patterns are allowed + * @returns the converted ESTree node + */ + private converter; + /** + * Fixes the exports of the given ts.Node + * @param node the ts.Node + * @param result result + * @returns the ESTreeNode with fixed exports + */ + private fixExports; + /** + * Register specific TypeScript node into map with first ESTree node provided + */ + private registerTSNodeInNodeMap; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertPattern; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertChild; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertType; + private createNode; + private convertBindingNameWithTypeAnnotation; + /** + * Converts a child into a type annotation. This creates an intermediary + * TypeAnnotation node to match what Flow does. + * @param child The TypeScript AST node to convert. + * @param parent parentNode + * @returns The type annotation node. + */ + private convertTypeAnnotation; + /** + * Coverts body Nodes and add a directive field to StringLiterals + * @param nodes of ts.Node + * @param parent parentNode + * @returns Array of body statements + */ + private convertBodyExpressions; + /** + * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node + * @param typeArguments ts.NodeArray typeArguments + * @param node parent used to create this node + * @returns TypeParameterInstantiation node + */ + private convertTypeArgumentsToTypeParameters; + /** + * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node + * @param typeParameters ts.Node typeParameters + * @returns TypeParameterDeclaration node + */ + private convertTSTypeParametersToTypeParametersDeclaration; + /** + * Converts an array of ts.Node parameters into an array of ESTreeNode params + * @param parameters An array of ts.Node params to be converted + * @returns an array of converted ESTreeNode params + */ + private convertParameters; + private convertChainExpression; + /** + * For nodes that are copied directly from the TypeScript AST into + * ESTree mostly as-is. The only difference is the addition of a type + * property instead of a kind property. Recursively copies all children. + */ + private deeplyCopy; + private convertJSXIdentifier; + private convertJSXNamespaceOrIdentifier; + /** + * Converts a TypeScript JSX node.tagName into an ESTree node.name + * @param node the tagName object from a JSX ts.Node + * @param parent + * @returns the converted ESTree name object + */ + private convertJSXTagName; + private convertMethodSignature; + private convertAssertClasue; + /** + * Applies the given TS modifiers to the given result object. + * + * This method adds not standardized `modifiers` property in nodes + * + * @param result + * @param modifiers original ts.Nodes from the node.modifiers array + * @returns the current result object will be mutated + */ + private applyModifiersToResult; + /** + * Uses the provided range location to adjust the location data of the given Node + * @param result The node that will have its location data mutated + * @param childRange The child node range used to expand location + */ + private fixParentLocation; + private assertModuleSpecifier; + /** + * Converts a TypeScript node into an ESTree node. + * The core of the conversion logic: + * Identify and convert each relevant TypeScript SyntaxKind + * @param node the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertNode; +} +export {}; +//# sourceMappingURL=convert.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts index 6a89c9b4..8f05e92b 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts @@ -1,13 +1,13 @@ -import * as ts from 'typescript'; -interface DirectoryStructureHost { - readDirectory?(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; -} -interface CachedDirectoryStructureHost extends DirectoryStructureHost { - readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; -} -interface WatchCompilerHostOfConfigFile extends ts.WatchCompilerHostOfConfigFile { - onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void; - extraFileExtensions?: readonly ts.FileExtensionInfo[]; -} -export { WatchCompilerHostOfConfigFile }; -//# sourceMappingURL=WatchCompilerHostOfConfigFile.d.ts.map +import * as ts from 'typescript'; +interface DirectoryStructureHost { + readDirectory?(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; +} +interface CachedDirectoryStructureHost extends DirectoryStructureHost { + readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; +} +interface WatchCompilerHostOfConfigFile extends ts.WatchCompilerHostOfConfigFile { + onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void; + extraFileExtensions?: readonly ts.FileExtensionInfo[]; +} +export { WatchCompilerHostOfConfigFile }; +//# sourceMappingURL=WatchCompilerHostOfConfigFile.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts index 6ee04fae..054b4514 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts @@ -1,9 +1,9 @@ -import { ParseSettings } from '../parseSettings'; -import { ASTAndProgram } from './shared'; -/** - * @param parseSettings Internal settings for parsing the file - * @returns If found, returns the source file corresponding to the code and the containing program - */ -declare function createDefaultProgram(parseSettings: ParseSettings): ASTAndProgram | undefined; -export { createDefaultProgram }; -//# sourceMappingURL=createDefaultProgram.d.ts.map +import { ParseSettings } from '../parseSettings'; +import { ASTAndProgram } from './shared'; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, returns the source file corresponding to the code and the containing program + */ +declare function createDefaultProgram(parseSettings: ParseSettings): ASTAndProgram | undefined; +export { createDefaultProgram }; +//# sourceMappingURL=createDefaultProgram.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts index a8aa1e09..a0139cae 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts @@ -1,9 +1,9 @@ -import { ParseSettings } from '../parseSettings'; -import { ASTAndProgram } from './shared'; -/** - * @param code The code of the file being linted - * @returns Returns a new source file and program corresponding to the linted code - */ -declare function createIsolatedProgram(parseSettings: ParseSettings): ASTAndProgram; -export { createIsolatedProgram }; -//# sourceMappingURL=createIsolatedProgram.d.ts.map +import { ParseSettings } from '../parseSettings'; +import { ASTAndProgram } from './shared'; +/** + * @param code The code of the file being linted + * @returns Returns a new source file and program corresponding to the linted code + */ +declare function createIsolatedProgram(parseSettings: ParseSettings): ASTAndProgram; +export { createIsolatedProgram }; +//# sourceMappingURL=createIsolatedProgram.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts index 846afad7..4dde7c3e 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts @@ -1,9 +1,9 @@ -import { ParseSettings } from '../parseSettings'; -import { ASTAndProgram } from './shared'; -/** - * @param parseSettings Internal settings for parsing the file - * @returns If found, the source file corresponding to the code and the containing program - */ -declare function createProjectProgram(parseSettings: ParseSettings): ASTAndProgram | undefined; -export { createProjectProgram }; -//# sourceMappingURL=createProjectProgram.d.ts.map +import { ParseSettings } from '../parseSettings'; +import { ASTAndProgram } from './shared'; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, the source file corresponding to the code and the containing program + */ +declare function createProjectProgram(parseSettings: ParseSettings): ASTAndProgram | undefined; +export { createProjectProgram }; +//# sourceMappingURL=createProjectProgram.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts index 6e227c66..9f294e49 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts @@ -1,5 +1,5 @@ -import * as ts from 'typescript'; -import { ParseSettings } from '../parseSettings'; -declare function createSourceFile(parseSettings: ParseSettings): ts.SourceFile; -export { createSourceFile }; -//# sourceMappingURL=createSourceFile.d.ts.map +import * as ts from 'typescript'; +import { ParseSettings } from '../parseSettings'; +declare function createSourceFile(parseSettings: ParseSettings): ts.SourceFile; +export { createSourceFile }; +//# sourceMappingURL=createSourceFile.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts index b96687f2..88ae9a7a 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts @@ -1,2 +1,2 @@ -export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string; -//# sourceMappingURL=describeFilePath.d.ts.map +export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string; +//# sourceMappingURL=describeFilePath.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts index c90d3d6b..c8e80746 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts @@ -1,5 +1,5 @@ -import * as ts from 'typescript'; -declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind; -declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant; -export { getScriptKind, getLanguageVariant }; -//# sourceMappingURL=getScriptKind.d.ts.map +import * as ts from 'typescript'; +declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind; +declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant; +export { getScriptKind, getLanguageVariant }; +//# sourceMappingURL=getScriptKind.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getWatchProgramsForProjects.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getWatchProgramsForProjects.d.ts index 63991e93..f392fda6 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getWatchProgramsForProjects.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getWatchProgramsForProjects.d.ts @@ -1,15 +1,15 @@ -import * as ts from 'typescript'; -import { ParseSettings } from '../parseSettings'; -/** - * Clear all of the parser caches. - * This should only be used in testing to ensure the parser is clean between tests. - */ -declare function clearWatchCaches(): void; -/** - * Calculate project environments using options provided by consumer and paths from config - * @param parseSettings Internal settings for parsing the file - * @returns The programs corresponding to the supplied tsconfig paths - */ -declare function getWatchProgramsForProjects(parseSettings: ParseSettings): ts.Program[]; -export { clearWatchCaches, getWatchProgramsForProjects }; -//# sourceMappingURL=getWatchProgramsForProjects.d.ts.map +import * as ts from 'typescript'; +import { ParseSettings } from '../parseSettings'; +/** + * Clear all of the parser caches. + * This should only be used in testing to ensure the parser is clean between tests. + */ +declare function clearWatchCaches(): void; +/** + * Calculate project environments using options provided by consumer and paths from config + * @param parseSettings Internal settings for parsing the file + * @returns The programs corresponding to the supplied tsconfig paths + */ +declare function getWatchProgramsForProjects(parseSettings: ParseSettings): ts.Program[]; +export { clearWatchCaches, getWatchProgramsForProjects }; +//# sourceMappingURL=getWatchProgramsForProjects.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts index 26df54f1..8ba2fb2d 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts @@ -1,29 +1,29 @@ -import { Program } from 'typescript'; -import * as ts from 'typescript'; -import { ModuleResolver } from '../parser-options'; -import { ParseSettings } from '../parseSettings'; -interface ASTAndProgram { - ast: ts.SourceFile; - program: ts.Program; -} -/** - * Compiler options required to avoid critical functionality issues - */ -declare const CORE_COMPILER_OPTIONS: ts.CompilerOptions; -declare function createDefaultCompilerOptionsFromExtra(parseSettings: ParseSettings): ts.CompilerOptions; -type CanonicalPath = string & { - __brand: unknown; -}; -declare function getCanonicalFileName(filePath: string): CanonicalPath; -declare function ensureAbsolutePath(p: string, tsconfigRootDir: string): string; -declare function canonicalDirname(p: CanonicalPath): CanonicalPath; -declare function getAstFromProgram(currentProgram: Program, parseSettings: ParseSettings): ASTAndProgram | undefined; -declare function getModuleResolver(moduleResolverPath: string): ModuleResolver; -/** - * Hash content for compare content. - * @param content hashed contend - * @returns hashed result - */ -declare function createHash(content: string): string; -export { ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, createHash, ensureAbsolutePath, getCanonicalFileName, getAstFromProgram, getModuleResolver, }; -//# sourceMappingURL=shared.d.ts.map +import { Program } from 'typescript'; +import * as ts from 'typescript'; +import { ModuleResolver } from '../parser-options'; +import { ParseSettings } from '../parseSettings'; +interface ASTAndProgram { + ast: ts.SourceFile; + program: ts.Program; +} +/** + * Compiler options required to avoid critical functionality issues + */ +declare const CORE_COMPILER_OPTIONS: ts.CompilerOptions; +declare function createDefaultCompilerOptionsFromExtra(parseSettings: ParseSettings): ts.CompilerOptions; +type CanonicalPath = string & { + __brand: unknown; +}; +declare function getCanonicalFileName(filePath: string): CanonicalPath; +declare function ensureAbsolutePath(p: string, tsconfigRootDir: string): string; +declare function canonicalDirname(p: CanonicalPath): CanonicalPath; +declare function getAstFromProgram(currentProgram: Program, parseSettings: ParseSettings): ASTAndProgram | undefined; +declare function getModuleResolver(moduleResolverPath: string): ModuleResolver; +/** + * Hash content for compare content. + * @param content hashed contend + * @returns hashed result + */ +declare function createHash(content: string): string; +export { ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, createHash, ensureAbsolutePath, getCanonicalFileName, getAstFromProgram, getModuleResolver, }; +//# sourceMappingURL=shared.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts index c5e5d75b..17fafada 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts @@ -1,13 +1,13 @@ -import * as ts from 'typescript'; -import { ParseSettings } from '../parseSettings'; -import { ASTAndProgram } from './shared'; -declare function useProvidedPrograms(programInstances: Iterable, parseSettings: ParseSettings): ASTAndProgram | undefined; -/** - * Utility offered by parser to help consumers construct their own program instance. - * - * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` - * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` - */ -declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program; -export { useProvidedPrograms, createProgramFromConfigFile }; -//# sourceMappingURL=useProvidedPrograms.d.ts.map +import * as ts from 'typescript'; +import { ParseSettings } from '../parseSettings'; +import { ASTAndProgram } from './shared'; +declare function useProvidedPrograms(programInstances: Iterable, parseSettings: ParseSettings): ASTAndProgram | undefined; +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program; +export { useProvidedPrograms, createProgramFromConfigFile }; +//# sourceMappingURL=useProvidedPrograms.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts index e7007f5c..4e64431d 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts @@ -1,4 +1,4 @@ -import * as ts from 'typescript'; -export declare function getModifiers(node: ts.Node | null | undefined): undefined | ts.Modifier[]; -export declare function getDecorators(node: ts.Node | null | undefined): undefined | ts.Decorator[]; -//# sourceMappingURL=getModifiers.d.ts.map +import * as ts from 'typescript'; +export declare function getModifiers(node: ts.Node | null | undefined): undefined | ts.Modifier[]; +export declare function getDecorators(node: ts.Node | null | undefined): undefined | ts.Decorator[]; +//# sourceMappingURL=getModifiers.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts index 79f3abd4..04dea082 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts @@ -1,12 +1,12 @@ -export { AST, parse, parseAndGenerateServices, parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, } from './parser'; -export { ParserServices, TSESTreeOptions } from './parser-options'; -export { simpleTraverse } from './simple-traverse'; -export * from './ts-estree'; -export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; -export * from './create-program/getScriptKind'; -export { typescriptVersionIsAtLeast } from './version-check'; -export * from './getModifiers'; -export * from './clear-caches'; -export { visitorKeys } from '@typescript-eslint/visitor-keys'; -export declare const version: string; -//# sourceMappingURL=index.d.ts.map +export { AST, parse, parseAndGenerateServices, parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, } from './parser'; +export { ParserServices, TSESTreeOptions } from './parser-options'; +export { simpleTraverse } from './simple-traverse'; +export * from './ts-estree'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; +export * from './create-program/getScriptKind'; +export { typescriptVersionIsAtLeast } from './version-check'; +export * from './getModifiers'; +export * from './clear-caches'; +export { visitorKeys } from '@typescript-eslint/visitor-keys'; +export declare const version: string; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts index ae3fc287..c7ce3754 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts @@ -1,2 +1,2 @@ -export declare const xhtmlEntities: Record; -//# sourceMappingURL=xhtml-entities.d.ts.map +export declare const xhtmlEntities: Record; +//# sourceMappingURL=xhtml-entities.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts index 15b556c3..90411a7a 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts @@ -1,231 +1,231 @@ -import * as ts from 'typescript'; -import { TSESTree } from './ts-estree'; -import { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ts-estree'; -declare const SyntaxKind: typeof ts.SyntaxKind; -interface TokenToText extends TSESTree.PunctuatorTokenToText { - [SyntaxKind.ImportKeyword]: 'import'; - [SyntaxKind.InKeyword]: 'in'; - [SyntaxKind.InstanceOfKeyword]: 'instanceof'; - [SyntaxKind.NewKeyword]: 'new'; - [SyntaxKind.KeyOfKeyword]: 'keyof'; - [SyntaxKind.ReadonlyKeyword]: 'readonly'; - [SyntaxKind.UniqueKeyword]: 'unique'; -} -/** - * Returns true if the given ts.Token is the assignment operator - * @param operator the operator token - * @returns is assignment - */ -export declare function isAssignmentOperator(operator: ts.Token): boolean; -/** - * Returns true if the given ts.Token is a logical operator - * @param operator the operator token - * @returns is a logical operator - */ -export declare function isLogicalOperator(operator: ts.Token): boolean; -/** - * Returns the string form of the given TSToken SyntaxKind - * @param kind the token's SyntaxKind - * @returns the token applicable token as a string - */ -export declare function getTextForTokenKind(kind: T): T extends keyof TokenToText ? TokenToText[T] : string | undefined; -/** - * Returns true if the given ts.Node is a valid ESTree class member - * @param node TypeScript AST node - * @returns is valid ESTree class member - */ -export declare function isESTreeClassMember(node: ts.Node): boolean; -/** - * Checks if a ts.Node has a modifier - * @param modifierKind TypeScript SyntaxKind modifier - * @param node TypeScript AST node - * @returns has the modifier specified - */ -export declare function hasModifier(modifierKind: ts.KeywordSyntaxKind, node: ts.Node): boolean; -/** - * Get last last modifier in ast - * @param node TypeScript AST node - * @returns returns last modifier if present or null - */ -export declare function getLastModifier(node: ts.Node): ts.Modifier | null; -/** - * Returns true if the given ts.Token is a comma - * @param token the TypeScript token - * @returns is comma - */ -export declare function isComma(token: ts.Node): token is ts.Token; -/** - * Returns true if the given ts.Node is a comment - * @param node the TypeScript node - * @returns is comment - */ -export declare function isComment(node: ts.Node): boolean; -/** - * Returns true if the given ts.Node is a JSDoc comment - * @param node the TypeScript node - * @returns is JSDoc comment - */ -export declare function isJSDocComment(node: ts.Node): node is ts.JSDoc; -/** - * Returns the binary expression type of the given ts.Token - * @param operator the operator token - * @returns the binary expression type - */ -export declare function getBinaryExpressionType(operator: ts.Token): AST_NODE_TYPES.AssignmentExpression | AST_NODE_TYPES.LogicalExpression | AST_NODE_TYPES.BinaryExpression; -/** - * Returns line and column data for the given positions, - * @param pos position to check - * @param ast the AST object - * @returns line and column - */ -export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.Position; -/** - * Returns line and column data for the given start and end positions, - * for the given AST - * @param start start data - * @param end end data - * @param ast the AST object - * @returns the loc data - */ -export declare function getLocFor(start: number, end: number, ast: ts.SourceFile): TSESTree.SourceLocation; -/** - * Check whatever node can contain directive - * @param node - * @returns returns true if node can contain directive - */ -export declare function canContainDirective(node: ts.SourceFile | ts.Block | ts.ModuleBlock | ts.ClassStaticBlockDeclaration): boolean; -/** - * Returns range for the given ts.Node - * @param node the ts.Node or ts.Token - * @param ast the AST object - * @returns the range data - */ -export declare function getRange(node: ts.Node, ast: ts.SourceFile): [ - number, - number -]; -/** - * Returns true if a given ts.Node is a token - * @param node the ts.Node - * @returns is a token - */ -export declare function isToken(node: ts.Node): node is ts.Token; -/** - * Returns true if a given ts.Node is a JSX token - * @param node ts.Node to be checked - * @returns is a JSX token - */ -export declare function isJSXToken(node: ts.Node): boolean; -/** - * Returns the declaration kind of the given ts.Node - * @param node TypeScript AST node - * @returns declaration kind - */ -export declare function getDeclarationKind(node: ts.VariableDeclarationList): 'let' | 'const' | 'var'; -/** - * Gets a ts.Node's accessibility level - * @param node The ts.Node - * @returns accessibility "public", "protected", "private", or null - */ -export declare function getTSNodeAccessibility(node: ts.Node): 'public' | 'protected' | 'private' | null; -/** - * Finds the next token based on the previous one and its parent - * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren - * @param previousToken The previous TSToken - * @param parent The parent TSNode - * @param ast The TS AST - * @returns the next TSToken - */ -export declare function findNextToken(previousToken: ts.TextRange, parent: ts.Node, ast: ts.SourceFile): ts.Node | undefined; -/** - * Find the first matching ancestor based on the given predicate function. - * @param node The current ts.Node - * @param predicate The predicate function to apply to each checked ancestor - * @returns a matching parent ts.Node - */ -export declare function findFirstMatchingAncestor(node: ts.Node, predicate: (node: ts.Node) => boolean): ts.Node | undefined; -/** - * Returns true if a given ts.Node has a JSX token within its hierarchy - * @param node ts.Node to be checked - * @returns has JSX ancestor - */ -export declare function hasJSXAncestor(node: ts.Node): boolean; -/** - * Unescape the text content of string literals, e.g. & -> & - * @param text The escaped string literal text. - * @returns The unescaped string literal text. - */ -export declare function unescapeStringLiteralText(text: string): string; -/** - * Returns true if a given ts.Node is a computed property - * @param node ts.Node to be checked - * @returns is Computed Property - */ -export declare function isComputedProperty(node: ts.Node): node is ts.ComputedPropertyName; -/** - * Returns true if a given ts.Node is optional (has QuestionToken) - * @param node ts.Node to be checked - * @returns is Optional - */ -export declare function isOptional(node: { - questionToken?: ts.QuestionToken; -}): boolean; -/** - * Returns true if the node is an optional chain node - */ -export declare function isChainExpression(node: TSESTree.Node): node is TSESTree.ChainExpression; -/** - * Returns true of the child of property access expression is an optional chain - */ -export declare function isChildUnwrappableOptionalChain(node: ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.NonNullExpression, child: TSESTree.Node): boolean; -/** - * Returns the type of a given ts.Token - * @param token the ts.Token - * @returns the token type - */ -export declare function getTokenType(token: ts.Identifier | ts.Token): Exclude; -/** - * Extends and formats a given ts.Token, for a given AST - * @param token the ts.Token - * @param ast the AST object - * @returns the converted Token - */ -export declare function convertToken(token: ts.Token, ast: ts.SourceFile): TSESTree.Token; -/** - * Converts all tokens for the given AST - * @param ast the AST object - * @returns the converted Tokens - */ -export declare function convertTokens(ast: ts.SourceFile): TSESTree.Token[]; -export declare class TSError extends Error { - readonly fileName: string; - readonly index: number; - readonly lineNumber: number; - readonly column: number; - constructor(message: string, fileName: string, index: number, lineNumber: number, column: number); -} -/** - * @param ast the AST object - * @param start the index at which the error starts - * @param message the error message - * @returns converted error object - */ -export declare function createError(ast: ts.SourceFile, start: number, message: string): TSError; -/** - * @param n the TSNode - * @param ast the TS AST - */ -export declare function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean; -/** - * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). - * @template T - * @template U - * @param array - * @param callback - */ -export declare function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined; -export declare function identifierIsThisKeyword(id: ts.Identifier): boolean; -export declare function isThisIdentifier(node: ts.Node | undefined): node is ts.Identifier; -export declare function isThisInTypeQuery(node: ts.Node): boolean; -export {}; -//# sourceMappingURL=node-utils.d.ts.map +import * as ts from 'typescript'; +import { TSESTree } from './ts-estree'; +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ts-estree'; +declare const SyntaxKind: typeof ts.SyntaxKind; +interface TokenToText extends TSESTree.PunctuatorTokenToText { + [SyntaxKind.ImportKeyword]: 'import'; + [SyntaxKind.InKeyword]: 'in'; + [SyntaxKind.InstanceOfKeyword]: 'instanceof'; + [SyntaxKind.NewKeyword]: 'new'; + [SyntaxKind.KeyOfKeyword]: 'keyof'; + [SyntaxKind.ReadonlyKeyword]: 'readonly'; + [SyntaxKind.UniqueKeyword]: 'unique'; +} +/** + * Returns true if the given ts.Token is the assignment operator + * @param operator the operator token + * @returns is assignment + */ +export declare function isAssignmentOperator(operator: ts.Token): boolean; +/** + * Returns true if the given ts.Token is a logical operator + * @param operator the operator token + * @returns is a logical operator + */ +export declare function isLogicalOperator(operator: ts.Token): boolean; +/** + * Returns the string form of the given TSToken SyntaxKind + * @param kind the token's SyntaxKind + * @returns the token applicable token as a string + */ +export declare function getTextForTokenKind(kind: T): T extends keyof TokenToText ? TokenToText[T] : string | undefined; +/** + * Returns true if the given ts.Node is a valid ESTree class member + * @param node TypeScript AST node + * @returns is valid ESTree class member + */ +export declare function isESTreeClassMember(node: ts.Node): boolean; +/** + * Checks if a ts.Node has a modifier + * @param modifierKind TypeScript SyntaxKind modifier + * @param node TypeScript AST node + * @returns has the modifier specified + */ +export declare function hasModifier(modifierKind: ts.KeywordSyntaxKind, node: ts.Node): boolean; +/** + * Get last last modifier in ast + * @param node TypeScript AST node + * @returns returns last modifier if present or null + */ +export declare function getLastModifier(node: ts.Node): ts.Modifier | null; +/** + * Returns true if the given ts.Token is a comma + * @param token the TypeScript token + * @returns is comma + */ +export declare function isComma(token: ts.Node): token is ts.Token; +/** + * Returns true if the given ts.Node is a comment + * @param node the TypeScript node + * @returns is comment + */ +export declare function isComment(node: ts.Node): boolean; +/** + * Returns true if the given ts.Node is a JSDoc comment + * @param node the TypeScript node + * @returns is JSDoc comment + */ +export declare function isJSDocComment(node: ts.Node): node is ts.JSDoc; +/** + * Returns the binary expression type of the given ts.Token + * @param operator the operator token + * @returns the binary expression type + */ +export declare function getBinaryExpressionType(operator: ts.Token): AST_NODE_TYPES.AssignmentExpression | AST_NODE_TYPES.LogicalExpression | AST_NODE_TYPES.BinaryExpression; +/** + * Returns line and column data for the given positions, + * @param pos position to check + * @param ast the AST object + * @returns line and column + */ +export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.Position; +/** + * Returns line and column data for the given start and end positions, + * for the given AST + * @param start start data + * @param end end data + * @param ast the AST object + * @returns the loc data + */ +export declare function getLocFor(start: number, end: number, ast: ts.SourceFile): TSESTree.SourceLocation; +/** + * Check whatever node can contain directive + * @param node + * @returns returns true if node can contain directive + */ +export declare function canContainDirective(node: ts.SourceFile | ts.Block | ts.ModuleBlock | ts.ClassStaticBlockDeclaration): boolean; +/** + * Returns range for the given ts.Node + * @param node the ts.Node or ts.Token + * @param ast the AST object + * @returns the range data + */ +export declare function getRange(node: ts.Node, ast: ts.SourceFile): [ + number, + number +]; +/** + * Returns true if a given ts.Node is a token + * @param node the ts.Node + * @returns is a token + */ +export declare function isToken(node: ts.Node): node is ts.Token; +/** + * Returns true if a given ts.Node is a JSX token + * @param node ts.Node to be checked + * @returns is a JSX token + */ +export declare function isJSXToken(node: ts.Node): boolean; +/** + * Returns the declaration kind of the given ts.Node + * @param node TypeScript AST node + * @returns declaration kind + */ +export declare function getDeclarationKind(node: ts.VariableDeclarationList): 'let' | 'const' | 'var'; +/** + * Gets a ts.Node's accessibility level + * @param node The ts.Node + * @returns accessibility "public", "protected", "private", or null + */ +export declare function getTSNodeAccessibility(node: ts.Node): 'public' | 'protected' | 'private' | null; +/** + * Finds the next token based on the previous one and its parent + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + * @param previousToken The previous TSToken + * @param parent The parent TSNode + * @param ast The TS AST + * @returns the next TSToken + */ +export declare function findNextToken(previousToken: ts.TextRange, parent: ts.Node, ast: ts.SourceFile): ts.Node | undefined; +/** + * Find the first matching ancestor based on the given predicate function. + * @param node The current ts.Node + * @param predicate The predicate function to apply to each checked ancestor + * @returns a matching parent ts.Node + */ +export declare function findFirstMatchingAncestor(node: ts.Node, predicate: (node: ts.Node) => boolean): ts.Node | undefined; +/** + * Returns true if a given ts.Node has a JSX token within its hierarchy + * @param node ts.Node to be checked + * @returns has JSX ancestor + */ +export declare function hasJSXAncestor(node: ts.Node): boolean; +/** + * Unescape the text content of string literals, e.g. & -> & + * @param text The escaped string literal text. + * @returns The unescaped string literal text. + */ +export declare function unescapeStringLiteralText(text: string): string; +/** + * Returns true if a given ts.Node is a computed property + * @param node ts.Node to be checked + * @returns is Computed Property + */ +export declare function isComputedProperty(node: ts.Node): node is ts.ComputedPropertyName; +/** + * Returns true if a given ts.Node is optional (has QuestionToken) + * @param node ts.Node to be checked + * @returns is Optional + */ +export declare function isOptional(node: { + questionToken?: ts.QuestionToken; +}): boolean; +/** + * Returns true if the node is an optional chain node + */ +export declare function isChainExpression(node: TSESTree.Node): node is TSESTree.ChainExpression; +/** + * Returns true of the child of property access expression is an optional chain + */ +export declare function isChildUnwrappableOptionalChain(node: ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.NonNullExpression, child: TSESTree.Node): boolean; +/** + * Returns the type of a given ts.Token + * @param token the ts.Token + * @returns the token type + */ +export declare function getTokenType(token: ts.Identifier | ts.Token): Exclude; +/** + * Extends and formats a given ts.Token, for a given AST + * @param token the ts.Token + * @param ast the AST object + * @returns the converted Token + */ +export declare function convertToken(token: ts.Token, ast: ts.SourceFile): TSESTree.Token; +/** + * Converts all tokens for the given AST + * @param ast the AST object + * @returns the converted Tokens + */ +export declare function convertTokens(ast: ts.SourceFile): TSESTree.Token[]; +export declare class TSError extends Error { + readonly fileName: string; + readonly index: number; + readonly lineNumber: number; + readonly column: number; + constructor(message: string, fileName: string, index: number, lineNumber: number, column: number); +} +/** + * @param ast the AST object + * @param start the index at which the error starts + * @param message the error message + * @returns converted error object + */ +export declare function createError(ast: ts.SourceFile, start: number, message: string): TSError; +/** + * @param n the TSNode + * @param ast the TS AST + */ +export declare function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean; +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + * @template T + * @template U + * @param array + * @param callback + */ +export declare function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined; +export declare function identifierIsThisKeyword(id: ts.Identifier): boolean; +export declare function isThisIdentifier(node: ts.Node | undefined): node is ts.Identifier; +export declare function isThisInTypeQuery(node: ts.Node): boolean; +export {}; +//# sourceMappingURL=node-utils.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts index 5cf3d614..70723868 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts @@ -1,17 +1,17 @@ -import { CacheDurationSeconds } from '@typescript-eslint/types'; -export declare const DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; -export interface CacheLike { - get(key: Key): Value | void; - set(key: Key, value: Value): this; -} -/** - * A map with key-level expiration. - */ -export declare class ExpiringCache implements CacheLike { - private "ExpiringCache.#private"; - constructor(cacheDurationSeconds: CacheDurationSeconds); - set(key: TKey, value: TValue): this; - get(key: TKey): TValue | undefined; - clear(): void; -} -//# sourceMappingURL=ExpiringCache.d.ts.map +import { CacheDurationSeconds } from '@typescript-eslint/types'; +export declare const DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; +export interface CacheLike { + get(key: Key): Value | void; + set(key: Key, value: Value): this; +} +/** + * A map with key-level expiration. + */ +export declare class ExpiringCache implements CacheLike { + private "ExpiringCache.#private"; + constructor(cacheDurationSeconds: CacheDurationSeconds); + set(key: TKey, value: TValue): this; + get(key: TKey): TValue | undefined; + clear(): void; +} +//# sourceMappingURL=ExpiringCache.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts index 1c2e8037..9dad06f8 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts @@ -1,5 +1,5 @@ -import { TSESTreeOptions } from '../parser-options'; -import { MutableParseSettings } from './index'; -export declare function createParseSettings(code: string, options?: Partial): MutableParseSettings; -export declare function clearTSConfigMatchCache(): void; -//# sourceMappingURL=createParseSettings.d.ts.map +import { TSESTreeOptions } from '../parser-options'; +import { MutableParseSettings } from './index'; +export declare function createParseSettings(code: string, options?: Partial): MutableParseSettings; +export declare function clearTSConfigMatchCache(): void; +//# sourceMappingURL=createParseSettings.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts index 971a86cc..a9491030 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts @@ -1,12 +1,12 @@ -import { ParseSettings } from '.'; -/** - * Checks for a matching TSConfig to a file including its parent directories, - * permanently caching results under each directory it checks. - * - * @remarks - * We don't (yet!) have a way to attach file watchers on disk, but still need to - * cache file checks for rapid subsequent calls to fs.existsSync. See discussion - * in https://github.com/typescript-eslint/typescript-eslint/issues/101. - */ -export declare function getProjectConfigFiles(parseSettings: Pick, project: string | string[] | true | undefined): string[] | undefined; -//# sourceMappingURL=getProjectConfigFiles.d.ts.map +import { ParseSettings } from '.'; +/** + * Checks for a matching TSConfig to a file including its parent directories, + * permanently caching results under each directory it checks. + * + * @remarks + * We don't (yet!) have a way to attach file watchers on disk, but still need to + * cache file checks for rapid subsequent calls to fs.existsSync. See discussion + * in https://github.com/typescript-eslint/typescript-eslint/issues/101. + */ +export declare function getProjectConfigFiles(parseSettings: Pick, project: string | string[] | true | undefined): string[] | undefined; +//# sourceMappingURL=getProjectConfigFiles.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts index 67f51aaa..7e5c1f64 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts @@ -1,107 +1,107 @@ -import * as ts from 'typescript'; -import { CanonicalPath } from '../create-program/shared'; -import { TSESTree } from '../ts-estree'; -import { CacheLike } from './ExpiringCache'; -type DebugModule = 'typescript-eslint' | 'eslint' | 'typescript'; -/** - * Internal settings used by the parser to run on a file. - */ -export interface MutableParseSettings { - /** - * Code of the file being parsed. - */ - code: string; - /** - * Whether the `comment` parse option is enabled. - */ - comment: boolean; - /** - * If the `comment` parse option is enabled, retrieved comments. - */ - comments: TSESTree.Comment[]; - /** - * Whether to create a TypeScript program if one is not provided. - */ - createDefaultProgram: boolean; - /** - * Which debug areas should be logged. - */ - debugLevel: Set; - /** - * Whether to error if TypeScript reports a semantic or syntactic error diagnostic. - */ - errorOnTypeScriptSyntacticAndSemanticIssues: boolean; - /** - * Whether to error if an unknown AST node type is encountered. - */ - errorOnUnknownASTType: boolean; - /** - * Whether TS should use the source files for referenced projects instead of the compiled .d.ts files. - * - * @remarks - * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. - * This flag REQUIRES at least TS v3.9, otherwise it does nothing. - */ - EXPERIMENTAL_useSourceOfProjectReferenceRedirect: boolean; - /** - * Any non-standard file extensions which will be parsed. - */ - extraFileExtensions: string[]; - /** - * Path of the file being parsed. - */ - filePath: string; - /** - * Whether parsing of JSX is enabled. - * - * @remarks The applicable file extension is still required. - */ - jsx: boolean; - /** - * Whether to add `loc` information to each node. - */ - loc: boolean; - /** - * Log function, if not `console.log`. - */ - log: (message: string) => void; - /** - * Path for a module resolver to use for the compiler host's `resolveModuleNames`. - */ - moduleResolver: string; - /** - * Whether two-way AST node maps are preserved during the AST conversion process. - */ - preserveNodeMaps?: boolean; - /** - * One or more instances of TypeScript Program objects to be used for type information. - */ - programs: null | Iterable; - /** - * Normalized paths to provided project paths. - */ - projects: readonly CanonicalPath[]; - /** - * Whether to add the `range` property to AST nodes. - */ - range: boolean; - /** - * Whether this is part of a single run, rather than a long-running process. - */ - singleRun: boolean; - /** - * If the `tokens` parse option is enabled, retrieved tokens. - */ - tokens: null | TSESTree.Token[]; - /** - * Caches searches for TSConfigs from project directories. - */ - tsconfigMatchCache: CacheLike; - /** - * The absolute path to the root directory for all provided `project`s. - */ - tsconfigRootDir: string; -} -export type ParseSettings = Readonly; -export {}; -//# sourceMappingURL=index.d.ts.map +import * as ts from 'typescript'; +import { CanonicalPath } from '../create-program/shared'; +import { TSESTree } from '../ts-estree'; +import { CacheLike } from './ExpiringCache'; +type DebugModule = 'typescript-eslint' | 'eslint' | 'typescript'; +/** + * Internal settings used by the parser to run on a file. + */ +export interface MutableParseSettings { + /** + * Code of the file being parsed. + */ + code: string; + /** + * Whether the `comment` parse option is enabled. + */ + comment: boolean; + /** + * If the `comment` parse option is enabled, retrieved comments. + */ + comments: TSESTree.Comment[]; + /** + * Whether to create a TypeScript program if one is not provided. + */ + createDefaultProgram: boolean; + /** + * Which debug areas should be logged. + */ + debugLevel: Set; + /** + * Whether to error if TypeScript reports a semantic or syntactic error diagnostic. + */ + errorOnTypeScriptSyntacticAndSemanticIssues: boolean; + /** + * Whether to error if an unknown AST node type is encountered. + */ + errorOnUnknownASTType: boolean; + /** + * Whether TS should use the source files for referenced projects instead of the compiled .d.ts files. + * + * @remarks + * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. + * This flag REQUIRES at least TS v3.9, otherwise it does nothing. + */ + EXPERIMENTAL_useSourceOfProjectReferenceRedirect: boolean; + /** + * Any non-standard file extensions which will be parsed. + */ + extraFileExtensions: string[]; + /** + * Path of the file being parsed. + */ + filePath: string; + /** + * Whether parsing of JSX is enabled. + * + * @remarks The applicable file extension is still required. + */ + jsx: boolean; + /** + * Whether to add `loc` information to each node. + */ + loc: boolean; + /** + * Log function, if not `console.log`. + */ + log: (message: string) => void; + /** + * Path for a module resolver to use for the compiler host's `resolveModuleNames`. + */ + moduleResolver: string; + /** + * Whether two-way AST node maps are preserved during the AST conversion process. + */ + preserveNodeMaps?: boolean; + /** + * One or more instances of TypeScript Program objects to be used for type information. + */ + programs: null | Iterable; + /** + * Normalized paths to provided project paths. + */ + projects: readonly CanonicalPath[]; + /** + * Whether to add the `range` property to AST nodes. + */ + range: boolean; + /** + * Whether this is part of a single run, rather than a long-running process. + */ + singleRun: boolean; + /** + * If the `tokens` parse option is enabled, retrieved tokens. + */ + tokens: null | TSESTree.Token[]; + /** + * Caches searches for TSConfigs from project directories. + */ + tsconfigMatchCache: CacheLike; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir: string; +} +export type ParseSettings = Readonly; +export {}; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts index 7d1eb29b..385471fd 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts @@ -1,15 +1,15 @@ -import { TSESTreeOptions } from '../parser-options'; -/** - * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, - * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback - * on a file in an IDE). - * - * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction - * is important because there is significant overhead to managing the so called Watch Programs - * needed for the long-running use-case. We therefore use the following logic to figure out which - * of these contexts applies to the current execution. - * - * @returns Whether this is part of a single run, rather than a long-running process. - */ -export declare function inferSingleRun(options: TSESTreeOptions | undefined): boolean; -//# sourceMappingURL=inferSingleRun.d.ts.map +import { TSESTreeOptions } from '../parser-options'; +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + * + * @returns Whether this is part of a single run, rather than a long-running process. + */ +export declare function inferSingleRun(options: TSESTreeOptions | undefined): boolean; +//# sourceMappingURL=inferSingleRun.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts index c42dad6b..9142cd84 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts @@ -1,19 +1,19 @@ -import { CanonicalPath } from '../create-program/shared'; -import { TSESTreeOptions } from '../parser-options'; -export declare function clearGlobCache(): void; -/** - * Normalizes, sanitizes, resolves and filters the provided project paths - */ -export declare function resolveProjectList(options: Readonly<{ - cacheLifetime?: TSESTreeOptions['cacheLifetime']; - project: TSESTreeOptions['project']; - projectFolderIgnoreList: TSESTreeOptions['projectFolderIgnoreList']; - singleRun: boolean; - tsconfigRootDir: string; -}>): readonly CanonicalPath[]; -/** - * Exported for testing purposes only - * @internal - */ -export declare function clearGlobResolutionCache(): void; -//# sourceMappingURL=resolveProjectList.d.ts.map +import { CanonicalPath } from '../create-program/shared'; +import { TSESTreeOptions } from '../parser-options'; +export declare function clearGlobCache(): void; +/** + * Normalizes, sanitizes, resolves and filters the provided project paths + */ +export declare function resolveProjectList(options: Readonly<{ + cacheLifetime?: TSESTreeOptions['cacheLifetime']; + project: TSESTreeOptions['project']; + projectFolderIgnoreList: TSESTreeOptions['projectFolderIgnoreList']; + singleRun: boolean; + tsconfigRootDir: string; +}>): readonly CanonicalPath[]; +/** + * Exported for testing purposes only + * @internal + */ +export declare function clearGlobResolutionCache(): void; +//# sourceMappingURL=resolveProjectList.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts index c7ae07c8..1110f75a 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts @@ -1,3 +1,3 @@ -import { ParseSettings } from './index'; -export declare function warnAboutTSVersion(parseSettings: ParseSettings): void; -//# sourceMappingURL=warnAboutTSVersion.d.ts.map +import { ParseSettings } from './index'; +export declare function warnAboutTSVersion(parseSettings: ParseSettings): void; +//# sourceMappingURL=warnAboutTSVersion.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts index b764ae46..6dba6870 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts @@ -1,181 +1,181 @@ -import { CacheDurationSeconds, DebugLevel } from '@typescript-eslint/types'; -import * as ts from 'typescript'; -import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; -interface ParseOptions { - /** - * create a top-level comments array containing all comments - */ - comment?: boolean; - /** - * An array of modules to turn explicit debugging on for. - * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*` - * - 'eslint' is the same as setting the env var `DEBUG=eslint:*` - * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions - * - * For convenience, also supports a boolean: - * - true === ['typescript-eslint'] - * - false === [] - */ - debugLevel?: DebugLevel; - /** - * Cause the parser to error if it encounters an unknown AST node type (useful for testing). - * This case only usually occurs when TypeScript releases new features. - */ - errorOnUnknownASTType?: boolean; - /** - * Absolute (or relative to `cwd`) path to the file being parsed. - */ - filePath?: string; - /** - * Enable parsing of JSX. - * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html - * - * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the - * TypeScript compiler has its own internal handling for known file extensions. - * - * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx - */ - jsx?: boolean; - /** - * Controls whether the `loc` information to each node. - * The `loc` property is an object which contains the exact line/column the node starts/ends on. - * This is similar to the `range` property, except it is line/column relative. - */ - loc?: boolean; - loggerFn?: ((message: string) => void) | false; - /** - * Controls whether the `range` property is included on AST nodes. - * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents. - * This is similar to the `loc` property, except this is the absolute index. - */ - range?: boolean; - /** - * Set to true to create a top-level array containing all tokens from the file. - */ - tokens?: boolean; -} -interface ParseAndGenerateServicesOptions extends ParseOptions { - /** - * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors. - */ - errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; - /** - * ***EXPERIMENTAL FLAG*** - Use this at your own risk. - * - * Causes TS to use the source files for referenced projects instead of the compiled .d.ts files. - * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. - * - * This flag REQUIRES at least TS v3.9, otherwise it does nothing. - * - * See: https://github.com/typescript-eslint/typescript-eslint/issues/2094 - */ - EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; - /** - * When `project` is provided, this controls the non-standard file extensions which will be parsed. - * It accepts an array of file extensions, each preceded by a `.`. - */ - extraFileExtensions?: string[]; - /** - * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed. - * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache. - */ - filePath?: string; - /** - * Allows the user to control whether or not two-way AST node maps are preserved - * during the AST conversion process. - * - * By default: the AST node maps are NOT preserved, unless `project` has been specified, - * in which case the maps are made available on the returned `parserServices`. - * - * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected, - * regardless of whether or not `project` is in use. - */ - preserveNodeMaps?: boolean; - /** - * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s), - * or `true` to find the nearest tsconfig.json to the file. - * If this is provided, type information will be returned. - */ - project?: string | string[] | true; - /** - * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from - * being matched by the globs. - * This accepts an array of globs to ignore. - * - * By default, this is set to ["**\/node_modules/**"] - */ - projectFolderIgnoreList?: string[]; - /** - * The absolute path to the root directory for all provided `project`s. - */ - tsconfigRootDir?: string; - /** - * An array of one or more instances of TypeScript Program objects to be used for type information. - * This overrides any program or programs that would have been computed from the `project` option. - * All linted files must be part of the provided program(s). - */ - programs?: ts.Program[]; - /** - *************************************************************************************** - * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * - *************************************************************************************** - * - * When passed with `project`, this allows the parser to create a catch-all, default program. - * This means that if the parser encounters a file not included in any of the provided `project`s, - * it will not error, but will instead parse the file and its dependencies in a new program. - */ - createDefaultProgram?: boolean; - /** - * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, - * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback - * on a file in an IDE). - * - * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction - * is important because there is significant overhead to managing the so called Watch Programs - * needed for the long-running use-case. - * - * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer - * whether or not ESLint is being used as part of a single run. - */ - allowAutomaticSingleRunInference?: boolean; - /** - * Granular control of the expiry lifetime of our internal caches. - * You can specify the number of seconds as an integer number, or the string - * 'Infinity' if you never want the cache to expire. - * - * By default cache entries will be evicted after 30 seconds, or will persist - * indefinitely if `allowAutomaticSingleRunInference = true` AND the parser - * infers that it is a single run. - */ - cacheLifetime?: { - /** - * Glob resolution for `parserOptions.project` values. - */ - glob?: CacheDurationSeconds; - }; - /** - * Path to a file exporting a custom `ModuleResolver`. - */ - moduleResolver?: string; -} -export type TSESTreeOptions = ParseAndGenerateServicesOptions; -export interface ParserWeakMap { - get(key: TKey): TValue; - has(key: unknown): boolean; -} -export interface ParserWeakMapESTreeToTSNode { - get(key: TKeyBase): TSESTreeToTSNode; - has(key: unknown): boolean; -} -export interface ParserServices { - program: ts.Program; - esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; - tsNodeToESTreeNodeMap: ParserWeakMap; - hasFullTypeInformation: boolean; -} -export interface ModuleResolver { - version: 1; - resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions): (ts.ResolvedModule | undefined)[]; -} -export {}; -//# sourceMappingURL=parser-options.d.ts.map +import { CacheDurationSeconds, DebugLevel } from '@typescript-eslint/types'; +import * as ts from 'typescript'; +import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; +interface ParseOptions { + /** + * create a top-level comments array containing all comments + */ + comment?: boolean; + /** + * An array of modules to turn explicit debugging on for. + * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*` + * - 'eslint' is the same as setting the env var `DEBUG=eslint:*` + * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions + * + * For convenience, also supports a boolean: + * - true === ['typescript-eslint'] + * - false === [] + */ + debugLevel?: DebugLevel; + /** + * Cause the parser to error if it encounters an unknown AST node type (useful for testing). + * This case only usually occurs when TypeScript releases new features. + */ + errorOnUnknownASTType?: boolean; + /** + * Absolute (or relative to `cwd`) path to the file being parsed. + */ + filePath?: string; + /** + * Enable parsing of JSX. + * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html + * + * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the + * TypeScript compiler has its own internal handling for known file extensions. + * + * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx + */ + jsx?: boolean; + /** + * Controls whether the `loc` information to each node. + * The `loc` property is an object which contains the exact line/column the node starts/ends on. + * This is similar to the `range` property, except it is line/column relative. + */ + loc?: boolean; + loggerFn?: ((message: string) => void) | false; + /** + * Controls whether the `range` property is included on AST nodes. + * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents. + * This is similar to the `loc` property, except this is the absolute index. + */ + range?: boolean; + /** + * Set to true to create a top-level array containing all tokens from the file. + */ + tokens?: boolean; +} +interface ParseAndGenerateServicesOptions extends ParseOptions { + /** + * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors. + */ + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + /** + * ***EXPERIMENTAL FLAG*** - Use this at your own risk. + * + * Causes TS to use the source files for referenced projects instead of the compiled .d.ts files. + * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. + * + * This flag REQUIRES at least TS v3.9, otherwise it does nothing. + * + * See: https://github.com/typescript-eslint/typescript-eslint/issues/2094 + */ + EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; + /** + * When `project` is provided, this controls the non-standard file extensions which will be parsed. + * It accepts an array of file extensions, each preceded by a `.`. + */ + extraFileExtensions?: string[]; + /** + * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed. + * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache. + */ + filePath?: string; + /** + * Allows the user to control whether or not two-way AST node maps are preserved + * during the AST conversion process. + * + * By default: the AST node maps are NOT preserved, unless `project` has been specified, + * in which case the maps are made available on the returned `parserServices`. + * + * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected, + * regardless of whether or not `project` is in use. + */ + preserveNodeMaps?: boolean; + /** + * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s), + * or `true` to find the nearest tsconfig.json to the file. + * If this is provided, type information will be returned. + */ + project?: string | string[] | true; + /** + * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from + * being matched by the globs. + * This accepts an array of globs to ignore. + * + * By default, this is set to ["**\/node_modules/**"] + */ + projectFolderIgnoreList?: string[]; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir?: string; + /** + * An array of one or more instances of TypeScript Program objects to be used for type information. + * This overrides any program or programs that would have been computed from the `project` option. + * All linted files must be part of the provided program(s). + */ + programs?: ts.Program[]; + /** + *************************************************************************************** + * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * + *************************************************************************************** + * + * When passed with `project`, this allows the parser to create a catch-all, default program. + * This means that if the parser encounters a file not included in any of the provided `project`s, + * it will not error, but will instead parse the file and its dependencies in a new program. + */ + createDefaultProgram?: boolean; + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; + /** + * Granular control of the expiry lifetime of our internal caches. + * You can specify the number of seconds as an integer number, or the string + * 'Infinity' if you never want the cache to expire. + * + * By default cache entries will be evicted after 30 seconds, or will persist + * indefinitely if `allowAutomaticSingleRunInference = true` AND the parser + * infers that it is a single run. + */ + cacheLifetime?: { + /** + * Glob resolution for `parserOptions.project` values. + */ + glob?: CacheDurationSeconds; + }; + /** + * Path to a file exporting a custom `ModuleResolver`. + */ + moduleResolver?: string; +} +export type TSESTreeOptions = ParseAndGenerateServicesOptions; +export interface ParserWeakMap { + get(key: TKey): TValue; + has(key: unknown): boolean; +} +export interface ParserWeakMapESTreeToTSNode { + get(key: TKeyBase): TSESTreeToTSNode; + has(key: unknown): boolean; +} +export interface ParserServices { + program: ts.Program; + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; + hasFullTypeInformation: boolean; +} +export interface ModuleResolver { + version: 1; + resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions): (ts.ResolvedModule | undefined)[]; +} +export {}; +//# sourceMappingURL=parser-options.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts index 2cf19ffa..82f4a088 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts @@ -1,25 +1,25 @@ -import { ParserServices, TSESTreeOptions } from './parser-options'; -import { TSESTree } from './ts-estree'; -declare function clearProgramCache(): void; -interface EmptyObject { -} -type AST = TSESTree.Program & (T['tokens'] extends true ? { - tokens: TSESTree.Token[]; -} : EmptyObject) & (T['comment'] extends true ? { - comments: TSESTree.Comment[]; -} : EmptyObject); -interface ParseAndGenerateServicesResult { - ast: AST; - services: ParserServices; -} -interface ParseWithNodeMapsResult { - ast: AST; - esTreeNodeToTSNodeMap: ParserServices['esTreeNodeToTSNodeMap']; - tsNodeToESTreeNodeMap: ParserServices['tsNodeToESTreeNodeMap']; -} -declare function parse(code: string, options?: T): AST; -declare function parseWithNodeMaps(code: string, options?: T): ParseWithNodeMapsResult; -declare function clearParseAndGenerateServicesCalls(): void; -declare function parseAndGenerateServices(code: string, options: T): ParseAndGenerateServicesResult; -export { AST, parse, parseAndGenerateServices, parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, clearProgramCache, clearParseAndGenerateServicesCalls, }; -//# sourceMappingURL=parser.d.ts.map +import { ParserServices, TSESTreeOptions } from './parser-options'; +import { TSESTree } from './ts-estree'; +declare function clearProgramCache(): void; +interface EmptyObject { +} +type AST = TSESTree.Program & (T['tokens'] extends true ? { + tokens: TSESTree.Token[]; +} : EmptyObject) & (T['comment'] extends true ? { + comments: TSESTree.Comment[]; +} : EmptyObject); +interface ParseAndGenerateServicesResult { + ast: AST; + services: ParserServices; +} +interface ParseWithNodeMapsResult { + ast: AST; + esTreeNodeToTSNodeMap: ParserServices['esTreeNodeToTSNodeMap']; + tsNodeToESTreeNodeMap: ParserServices['tsNodeToESTreeNodeMap']; +} +declare function parse(code: string, options?: T): AST; +declare function parseWithNodeMaps(code: string, options?: T): ParseWithNodeMapsResult; +declare function clearParseAndGenerateServicesCalls(): void; +declare function parseAndGenerateServices(code: string, options: T): ParseAndGenerateServicesResult; +export { AST, parse, parseAndGenerateServices, parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, clearProgramCache, clearParseAndGenerateServicesCalls, }; +//# sourceMappingURL=parser.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts index e1ae98ed..3df225bd 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts @@ -1,13 +1,13 @@ -import { Diagnostic, Program, SourceFile } from 'typescript'; -export interface SemanticOrSyntacticError extends Diagnostic { - message: string; -} -/** - * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether - * they are related to generic ECMAScript standards, or TypeScript-specific constructs. - * - * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when - * the user opts in to throwing errors on semantic issues. - */ -export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined; -//# sourceMappingURL=semantic-or-syntactic-errors.d.ts.map +import { Diagnostic, Program, SourceFile } from 'typescript'; +export interface SemanticOrSyntacticError extends Diagnostic { + message: string; +} +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined; +//# sourceMappingURL=semantic-or-syntactic-errors.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts index 98a37c32..e89daad3 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts @@ -1,9 +1,9 @@ -import { TSESTree } from './ts-estree'; -type SimpleTraverseOptions = { - enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; -} | { - [key: string]: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; -}; -export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void; -export {}; -//# sourceMappingURL=simple-traverse.d.ts.map +import { TSESTree } from './ts-estree'; +type SimpleTraverseOptions = { + enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; +} | { + [key: string]: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; +}; +export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void; +export {}; +//# sourceMappingURL=simple-traverse.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts index 174625ce..f0ad430c 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts @@ -1,178 +1,178 @@ -import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; -import * as ts from 'typescript'; -import { TSNode } from './ts-nodes'; -export interface EstreeToTsNodeTypes { - [AST_NODE_TYPES.AccessorProperty]: ts.PropertyDeclaration; - [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression; - [AST_NODE_TYPES.ArrayPattern]: ts.ArrayLiteralExpression | ts.ArrayBindingPattern; - [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction; - [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression; - [AST_NODE_TYPES.AssignmentPattern]: ts.ShorthandPropertyAssignment | ts.BindingElement | ts.BinaryExpression | ts.ParameterDeclaration; - [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression; - [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression; - [AST_NODE_TYPES.BlockStatement]: ts.Block; - [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement; - [AST_NODE_TYPES.CallExpression]: ts.CallExpression; - [AST_NODE_TYPES.CatchClause]: ts.CatchClause; - [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.NonNullExpression; - [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression; - [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration; - [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression; - [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration; - [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression; - [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement; - [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement; - [AST_NODE_TYPES.Decorator]: ts.Decorator; - [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement; - [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement; - [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration; - [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ExportAssignment | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration; - [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ExportDeclaration | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration; - [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier; - [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement; - [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement; - [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement; - [AST_NODE_TYPES.ForStatement]: ts.ForStatement; - [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration; - [AST_NODE_TYPES.FunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration; - [AST_NODE_TYPES.Identifier]: ts.Identifier | ts.ConstructorDeclaration | ts.Token; - [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; - [AST_NODE_TYPES.IfStatement]: ts.IfStatement; - [AST_NODE_TYPES.ImportAttribute]: ts.AssertEntry; - [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; - [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; - [AST_NODE_TYPES.ImportExpression]: ts.CallExpression; - [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport; - [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier; - [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute; - [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement; - [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment; - [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement; - [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression; - [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression; - [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment; - [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression; - [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement; - [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment; - [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute; - [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression; - [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression; - [AST_NODE_TYPES.JSXNamespacedName]: ts.JsxNamespacedName; - [AST_NODE_TYPES.JSXText]: ts.JsxText; - [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement; - [AST_NODE_TYPES.Literal]: ts.StringLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.NullLiteral | ts.BooleanLiteral | ts.BigIntLiteral; - [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression; - [AST_NODE_TYPES.MemberExpression]: ts.PropertyAccessExpression | ts.ElementAccessExpression; - [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty; - [AST_NODE_TYPES.MethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration; - [AST_NODE_TYPES.NewExpression]: ts.NewExpression; - [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression; - [AST_NODE_TYPES.ObjectPattern]: ts.ObjectLiteralExpression | ts.ObjectBindingPattern; - [AST_NODE_TYPES.Program]: ts.SourceFile; - [AST_NODE_TYPES.Property]: ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.BindingElement; - [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.SpreadAssignment | ts.SpreadElement | ts.ParameterDeclaration; - [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement; - [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression; - [AST_NODE_TYPES.SpreadElement]: ts.SpreadElement | ts.SpreadAssignment; - [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration; - [AST_NODE_TYPES.Super]: ts.SuperExpression; - [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause; - [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement; - [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression; - [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail; - [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression; - [AST_NODE_TYPES.ThisExpression]: ts.ThisExpression | ts.KeywordTypeNode | ts.Identifier; - [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement; - [AST_NODE_TYPES.TryStatement]: ts.TryStatement; - [AST_NODE_TYPES.TSAbstractAccessorProperty]: ts.PropertyDeclaration; - [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration; - [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration; - [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode; - [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression; - [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration; - [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments; - [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode; - [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode; - [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration; - [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration; - [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration; - [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember; - [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment; - [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference; - [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode; - [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration; - [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode; - [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode; - [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration; - [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode; - [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration; - [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration; - [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments; - [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; - [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments; - [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression; - [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; - [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; - [AST_NODE_TYPES.TSMethodSignature]: ts.MethodSignature | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration; - [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock; - [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration; - [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember; - [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration; - [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression; - [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode; - [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration; - [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature; - [AST_NODE_TYPES.TSQualifiedName]: ts.QualifiedName; - [AST_NODE_TYPES.TSRestType]: ts.RestTypeNode | ts.NamedTupleMember; - [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode; - [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode; - [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode; - [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration; - [AST_NODE_TYPES.TSTypeAnnotation]: undefined; - [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion; - [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode; - [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode; - [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration; - [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined; - [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.TaggedTemplateExpression | ts.ImportTypeNode | ts.ExpressionWithTypeArguments | ts.TypeReferenceNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.CallExpression | ts.TypeQueryNode; - [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode; - [AST_NODE_TYPES.TSTypeQuery]: ts.TypeQueryNode; - [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode; - [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode; - [AST_NODE_TYPES.UpdateExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression; - [AST_NODE_TYPES.UnaryExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.DeleteExpression | ts.VoidExpression | ts.TypeOfExpression; - [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement; - [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration; - [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement; - [AST_NODE_TYPES.WithStatement]: ts.WithStatement; - [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression; - [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration; - [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token; - [AST_NODE_TYPES.TSNullKeyword]: ts.NullLiteral | ts.KeywordTypeNode; - [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode; - [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token; - [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token; - [AST_NODE_TYPES.TSExportKeyword]: ts.Token; - [AST_NODE_TYPES.TSStaticKeyword]: ts.Token; - [AST_NODE_TYPES.TSPublicKeyword]: ts.Token; - [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token; - [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token; - [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token; -} -/** - * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s). - * This mapping is based on the internal logic of the parser. - */ -export type TSESTreeToTSNode = Extract, EstreeToTsNodeTypes[T['type']]>; -//# sourceMappingURL=estree-to-ts-node-types.d.ts.map +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; +import * as ts from 'typescript'; +import { TSNode } from './ts-nodes'; +export interface EstreeToTsNodeTypes { + [AST_NODE_TYPES.AccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression; + [AST_NODE_TYPES.ArrayPattern]: ts.ArrayLiteralExpression | ts.ArrayBindingPattern; + [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction; + [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.AssignmentPattern]: ts.ShorthandPropertyAssignment | ts.BindingElement | ts.BinaryExpression | ts.ParameterDeclaration; + [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression; + [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.BlockStatement]: ts.Block; + [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement; + [AST_NODE_TYPES.CallExpression]: ts.CallExpression; + [AST_NODE_TYPES.CatchClause]: ts.CatchClause; + [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.NonNullExpression; + [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression; + [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration; + [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression; + [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression; + [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement; + [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement; + [AST_NODE_TYPES.Decorator]: ts.Decorator; + [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement; + [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement; + [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration; + [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ExportAssignment | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration; + [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ExportDeclaration | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration; + [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier; + [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement; + [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement; + [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement; + [AST_NODE_TYPES.ForStatement]: ts.ForStatement; + [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration; + [AST_NODE_TYPES.FunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration; + [AST_NODE_TYPES.Identifier]: ts.Identifier | ts.ConstructorDeclaration | ts.Token; + [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; + [AST_NODE_TYPES.IfStatement]: ts.IfStatement; + [AST_NODE_TYPES.ImportAttribute]: ts.AssertEntry; + [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; + [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; + [AST_NODE_TYPES.ImportExpression]: ts.CallExpression; + [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport; + [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier; + [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute; + [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement; + [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment; + [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression; + [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression; + [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment; + [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression; + [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment; + [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute; + [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression; + [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression; + [AST_NODE_TYPES.JSXNamespacedName]: ts.JsxNamespacedName; + [AST_NODE_TYPES.JSXText]: ts.JsxText; + [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement; + [AST_NODE_TYPES.Literal]: ts.StringLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.NullLiteral | ts.BooleanLiteral | ts.BigIntLiteral; + [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.MemberExpression]: ts.PropertyAccessExpression | ts.ElementAccessExpression; + [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty; + [AST_NODE_TYPES.MethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration; + [AST_NODE_TYPES.NewExpression]: ts.NewExpression; + [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression; + [AST_NODE_TYPES.ObjectPattern]: ts.ObjectLiteralExpression | ts.ObjectBindingPattern; + [AST_NODE_TYPES.Program]: ts.SourceFile; + [AST_NODE_TYPES.Property]: ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.BindingElement; + [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.SpreadAssignment | ts.SpreadElement | ts.ParameterDeclaration; + [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement; + [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.SpreadElement]: ts.SpreadElement | ts.SpreadAssignment; + [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration; + [AST_NODE_TYPES.Super]: ts.SuperExpression; + [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause; + [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement; + [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression; + [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail; + [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression; + [AST_NODE_TYPES.ThisExpression]: ts.ThisExpression | ts.KeywordTypeNode | ts.Identifier; + [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement; + [AST_NODE_TYPES.TryStatement]: ts.TryStatement; + [AST_NODE_TYPES.TSAbstractAccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration; + [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode; + [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression; + [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration; + [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode; + [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode; + [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration; + [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration; + [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration; + [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember; + [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment; + [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference; + [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode; + [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration; + [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode; + [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode; + [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration; + [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode; + [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; + [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression; + [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; + [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; + [AST_NODE_TYPES.TSMethodSignature]: ts.MethodSignature | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock; + [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration; + [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember; + [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration; + [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression; + [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode; + [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration; + [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature; + [AST_NODE_TYPES.TSQualifiedName]: ts.QualifiedName; + [AST_NODE_TYPES.TSRestType]: ts.RestTypeNode | ts.NamedTupleMember; + [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode; + [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode; + [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode; + [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration; + [AST_NODE_TYPES.TSTypeAnnotation]: undefined; + [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion; + [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode; + [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode; + [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration; + [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined; + [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.TaggedTemplateExpression | ts.ImportTypeNode | ts.ExpressionWithTypeArguments | ts.TypeReferenceNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.CallExpression | ts.TypeQueryNode; + [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode; + [AST_NODE_TYPES.TSTypeQuery]: ts.TypeQueryNode; + [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode; + [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode; + [AST_NODE_TYPES.UpdateExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression; + [AST_NODE_TYPES.UnaryExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.DeleteExpression | ts.VoidExpression | ts.TypeOfExpression; + [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement; + [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration; + [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement; + [AST_NODE_TYPES.WithStatement]: ts.WithStatement; + [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression; + [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration; + [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token; + [AST_NODE_TYPES.TSNullKeyword]: ts.NullLiteral | ts.KeywordTypeNode; + [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token; + [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token; + [AST_NODE_TYPES.TSExportKeyword]: ts.Token; + [AST_NODE_TYPES.TSStaticKeyword]: ts.Token; + [AST_NODE_TYPES.TSPublicKeyword]: ts.Token; + [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token; + [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token; + [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token; +} +/** + * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s). + * This mapping is based on the internal logic of the parser. + */ +export type TSESTreeToTSNode = Extract, EstreeToTsNodeTypes[T['type']]>; +//# sourceMappingURL=estree-to-ts-node-types.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts index 3216cae7..d1a0cc80 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts @@ -1,4 +1,4 @@ -export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; -export * from './ts-nodes'; -export * from './estree-to-ts-node-types'; -//# sourceMappingURL=index.d.ts.map +export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; +export * from './ts-nodes'; +export * from './estree-to-ts-node-types'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts index 74caecbd..2021725e 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts @@ -1,20 +1,20 @@ -import * as ts from 'typescript'; -declare module 'typescript' { - interface NamedTupleMember extends ts.Node { - } - interface TemplateLiteralTypeNode extends ts.Node { - } - interface PrivateIdentifier extends ts.Node { - } - interface ClassStaticBlockDeclaration extends ts.Node { - } - interface AssertClause extends ts.Node { - } - interface AssertEntry extends ts.Node { - } - interface SatisfiesExpression extends ts.Node { - } -} -export type TSToken = ts.Token; -export type TSNode = ts.AssertClause | ts.AssertEntry | ts.Modifier | ts.Identifier | ts.PrivateIdentifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ClassStaticBlockDeclaration | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.NamedTupleMember | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxNamespacedName | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.TemplateLiteralTypeNode | ts.SatisfiesExpression | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag; -//# sourceMappingURL=ts-nodes.d.ts.map +import * as ts from 'typescript'; +declare module 'typescript' { + interface NamedTupleMember extends ts.Node { + } + interface TemplateLiteralTypeNode extends ts.Node { + } + interface PrivateIdentifier extends ts.Node { + } + interface ClassStaticBlockDeclaration extends ts.Node { + } + interface AssertClause extends ts.Node { + } + interface AssertEntry extends ts.Node { + } + interface SatisfiesExpression extends ts.Node { + } +} +export type TSToken = ts.Token; +export type TSNode = ts.AssertClause | ts.AssertEntry | ts.Modifier | ts.Identifier | ts.PrivateIdentifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ClassStaticBlockDeclaration | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.NamedTupleMember | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxNamespacedName | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.TemplateLiteralTypeNode | ts.SatisfiesExpression | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag; +//# sourceMappingURL=ts-nodes.d.ts.map diff --git a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts index cb78264d..354fdc74 100644 --- a/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts @@ -1,3 +1,3 @@ -declare const typescriptVersionIsAtLeast: Record<"3.7" | "3.8" | "3.9" | "4.0" | "4.1" | "4.2" | "4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0", boolean>; -export { typescriptVersionIsAtLeast }; -//# sourceMappingURL=version-check.d.ts.map +declare const typescriptVersionIsAtLeast: Record<"3.7" | "3.8" | "3.9" | "4.0" | "4.1" | "4.2" | "4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0", boolean>; +export { typescriptVersionIsAtLeast }; +//# sourceMappingURL=version-check.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts index d2a3ba28..d1bf2f26 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts @@ -1,48 +1,48 @@ -interface PatternMatcher { - /** - * Iterate all matched parts in a given string. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-execall} - */ - execAll(str: string): IterableIterator; - /** - * Check whether this pattern matches a given string or not. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-test} - */ - test(str: string): boolean; - /** - * Replace all matched parts by a given replacer. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-symbol-replace} - * @example - * const { PatternMatcher } = require("eslint-utils") - * const matcher = new PatternMatcher(/\\p{Script=Greek}/g) - * - * module.exports = { - * meta: {}, - * create(context) { - * return { - * "Literal[regex]"(node) { - * const replacedPattern = node.regex.pattern.replace( - * matcher, - * "[\\u0370-\\u0373\\u0375-\\u0377\\u037A-\\u037D\\u037F\\u0384\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03E1\\u03F0-\\u03FF\\u1D26-\\u1D2A\\u1D5D-\\u1D61\\u1D66-\\u1D6A\\u1DBF\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2126\\uAB65]|\\uD800[\\uDD40-\\uDD8E\\uDDA0]|\\uD834[\\uDE00-\\uDE45]" - * ) - * }, - * } - * }, - * } - */ - [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string; -} -/** - * The class to find a pattern in strings as handling escape sequences. - * It ignores the found pattern if it's escaped with `\`. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class} - */ -declare const PatternMatcher: new (pattern: RegExp, options?: { - escaped?: boolean; -}) => PatternMatcher; -export { PatternMatcher }; -//# sourceMappingURL=PatternMatcher.d.ts.map +interface PatternMatcher { + /** + * Iterate all matched parts in a given string. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-execall} + */ + execAll(str: string): IterableIterator; + /** + * Check whether this pattern matches a given string or not. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-test} + */ + test(str: string): boolean; + /** + * Replace all matched parts by a given replacer. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#matcher-symbol-replace} + * @example + * const { PatternMatcher } = require("eslint-utils") + * const matcher = new PatternMatcher(/\\p{Script=Greek}/g) + * + * module.exports = { + * meta: {}, + * create(context) { + * return { + * "Literal[regex]"(node) { + * const replacedPattern = node.regex.pattern.replace( + * matcher, + * "[\\u0370-\\u0373\\u0375-\\u0377\\u037A-\\u037D\\u037F\\u0384\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03E1\\u03F0-\\u03FF\\u1D26-\\u1D2A\\u1D5D-\\u1D61\\u1D66-\\u1D6A\\u1DBF\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2126\\uAB65]|\\uD800[\\uDD40-\\uDD8E\\uDDA0]|\\uD834[\\uDE00-\\uDE45]" + * ) + * }, + * } + * }, + * } + */ + [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string; +} +/** + * The class to find a pattern in strings as handling escape sequences. + * It ignores the found pattern if it's escaped with `\`. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class} + */ +declare const PatternMatcher: new (pattern: RegExp, options?: { + escaped?: boolean; +}) => PatternMatcher; +export { PatternMatcher }; +//# sourceMappingURL=PatternMatcher.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts index fbfd5406..9dd30a3d 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts @@ -1,76 +1,76 @@ -import * as TSESLint from '../../ts-eslint'; -import { TSESTree } from '../../ts-estree'; -declare const ReferenceTrackerREAD: unique symbol; -declare const ReferenceTrackerCALL: unique symbol; -declare const ReferenceTrackerCONSTRUCT: unique symbol; -declare const ReferenceTrackerESM: unique symbol; -interface ReferenceTracker { - /** - * Iterate the references that the given `traceMap` determined. - * This method starts to search from global variables. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateglobalreferences} - */ - iterateGlobalReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; - /** - * Iterate the references that the given `traceMap` determined. - * This method starts to search from `require()` expression. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iteratecjsreferences} - */ - iterateCjsReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; - /** - * Iterate the references that the given `traceMap` determined. - * This method starts to search from `import`/`export` declarations. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateesmreferences} - */ - iterateEsmReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; -} -interface ReferenceTrackerStatic { - new (globalScope: TSESLint.Scope.Scope, options?: { - /** - * The mode which determines how the `tracker.iterateEsmReferences()` method scans CommonJS modules. - * If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds - * CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`. - */ - mode?: 'strict' | 'legacy'; - /** - * The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`. - */ - globalObjectNames?: readonly string[]; - }): ReferenceTracker; - readonly READ: typeof ReferenceTrackerREAD; - readonly CALL: typeof ReferenceTrackerCALL; - readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT; - readonly ESM: typeof ReferenceTrackerESM; -} -declare namespace ReferenceTracker { - type READ = ReferenceTrackerStatic['READ']; - type CALL = ReferenceTrackerStatic['CALL']; - type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT']; - type ESM = ReferenceTrackerStatic['ESM']; - type ReferenceType = READ | CALL | CONSTRUCT; - type TraceMap = Record>; - interface TraceMapElement { - [ReferenceTrackerREAD]?: T; - [ReferenceTrackerCALL]?: T; - [ReferenceTrackerCONSTRUCT]?: T; - [ReferenceTrackerESM]?: true; - [key: string]: TraceMapElement; - } - interface FoundReference { - node: TSESTree.Node; - path: readonly string[]; - type: ReferenceType; - info: T; - } -} -/** - * The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class} - */ -declare const ReferenceTracker: ReferenceTrackerStatic; -export { ReferenceTracker }; -//# sourceMappingURL=ReferenceTracker.d.ts.map +import * as TSESLint from '../../ts-eslint'; +import { TSESTree } from '../../ts-estree'; +declare const ReferenceTrackerREAD: unique symbol; +declare const ReferenceTrackerCALL: unique symbol; +declare const ReferenceTrackerCONSTRUCT: unique symbol; +declare const ReferenceTrackerESM: unique symbol; +interface ReferenceTracker { + /** + * Iterate the references that the given `traceMap` determined. + * This method starts to search from global variables. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateglobalreferences} + */ + iterateGlobalReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; + /** + * Iterate the references that the given `traceMap` determined. + * This method starts to search from `require()` expression. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iteratecjsreferences} + */ + iterateCjsReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; + /** + * Iterate the references that the given `traceMap` determined. + * This method starts to search from `import`/`export` declarations. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateesmreferences} + */ + iterateEsmReferences(traceMap: ReferenceTracker.TraceMap): IterableIterator>; +} +interface ReferenceTrackerStatic { + new (globalScope: TSESLint.Scope.Scope, options?: { + /** + * The mode which determines how the `tracker.iterateEsmReferences()` method scans CommonJS modules. + * If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds + * CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`. + */ + mode?: 'strict' | 'legacy'; + /** + * The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`. + */ + globalObjectNames?: readonly string[]; + }): ReferenceTracker; + readonly READ: typeof ReferenceTrackerREAD; + readonly CALL: typeof ReferenceTrackerCALL; + readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT; + readonly ESM: typeof ReferenceTrackerESM; +} +declare namespace ReferenceTracker { + type READ = ReferenceTrackerStatic['READ']; + type CALL = ReferenceTrackerStatic['CALL']; + type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT']; + type ESM = ReferenceTrackerStatic['ESM']; + type ReferenceType = READ | CALL | CONSTRUCT; + type TraceMap = Record>; + interface TraceMapElement { + [ReferenceTrackerREAD]?: T; + [ReferenceTrackerCALL]?: T; + [ReferenceTrackerCONSTRUCT]?: T; + [ReferenceTrackerESM]?: true; + [key: string]: TraceMapElement; + } + interface FoundReference { + node: TSESTree.Node; + path: readonly string[]; + type: ReferenceType; + info: T; + } +} +/** + * The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class} + */ +declare const ReferenceTracker: ReferenceTrackerStatic; +export { ReferenceTracker }; +//# sourceMappingURL=ReferenceTracker.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts index 7630dc1b..cc57312b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts @@ -1,76 +1,76 @@ -import * as TSESLint from '../../ts-eslint'; -import { TSESTree } from '../../ts-estree'; -/** - * Get the proper location of a given function node to report. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation} - */ -declare const getFunctionHeadLocation: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode: TSESLint.SourceCode) => TSESTree.SourceLocation; -/** - * Get the name and kind of a given function node. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind} - */ -declare const getFunctionNameWithKind: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode?: TSESLint.SourceCode) => string; -/** - * Get the property name of a given property node. - * If the node is a computed property, this tries to compute the property name by the getStringIfConstant function. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname} - * @returns The property name of the node. If the property name is not constant then it returns `null`. - */ -declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.Property | TSESTree.MethodDefinition | TSESTree.PropertyDefinition, initialScope?: TSESLint.Scope.Scope) => string | null; -/** - * Get the value of a given node if it can decide the value statically. - * If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the - * given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have - * not been modified. - * For example, it considers `Symbol.iterator`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue} - * @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the - * static value of the node, it returns `null`. - */ -declare const getStaticValue: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => { - value: unknown; -} | null; -/** - * Get the string value of a given node. - * This function is a tiny wrapper of the getStaticValue function. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant} - */ -declare const getStringIfConstant: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => string | null; -/** - * Check whether a given node has any side effect or not. - * The side effect means that it may modify a certain variable or object member. This function considers the node which - * contains the following types as the node which has side effects: - * - `AssignmentExpression` - * - `AwaitExpression` - * - `CallExpression` - * - `ImportExpression` - * - `NewExpression` - * - `UnaryExpression([operator = "delete"])` - * - `UpdateExpression` - * - `YieldExpression` - * - When `options.considerGetters` is `true`: - * - `MemberExpression` - * - When `options.considerImplicitTypeConversion` is `true`: - * - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])` - * - `MemberExpression([computed = true])` - * - `MethodDefinition([computed = true])` - * - `Property([computed = true])` - * - `UnaryExpression([operator = "-" | "+" | "!" | "~"])` - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect} - */ -declare const hasSideEffect: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode, options?: { - considerGetters?: boolean; - considerImplicitTypeConversion?: boolean; -}) => boolean; -declare const isParenthesized: { - (node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; - (times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; -}; -export { getFunctionHeadLocation, getFunctionNameWithKind, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isParenthesized, }; -//# sourceMappingURL=astUtilities.d.ts.map +import * as TSESLint from '../../ts-eslint'; +import { TSESTree } from '../../ts-estree'; +/** + * Get the proper location of a given function node to report. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation} + */ +declare const getFunctionHeadLocation: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode: TSESLint.SourceCode) => TSESTree.SourceLocation; +/** + * Get the name and kind of a given function node. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind} + */ +declare const getFunctionNameWithKind: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode?: TSESLint.SourceCode) => string; +/** + * Get the property name of a given property node. + * If the node is a computed property, this tries to compute the property name by the getStringIfConstant function. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname} + * @returns The property name of the node. If the property name is not constant then it returns `null`. + */ +declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.Property | TSESTree.MethodDefinition | TSESTree.PropertyDefinition, initialScope?: TSESLint.Scope.Scope) => string | null; +/** + * Get the value of a given node if it can decide the value statically. + * If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the + * given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have + * not been modified. + * For example, it considers `Symbol.iterator`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue} + * @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the + * static value of the node, it returns `null`. + */ +declare const getStaticValue: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => { + value: unknown; +} | null; +/** + * Get the string value of a given node. + * This function is a tiny wrapper of the getStaticValue function. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant} + */ +declare const getStringIfConstant: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => string | null; +/** + * Check whether a given node has any side effect or not. + * The side effect means that it may modify a certain variable or object member. This function considers the node which + * contains the following types as the node which has side effects: + * - `AssignmentExpression` + * - `AwaitExpression` + * - `CallExpression` + * - `ImportExpression` + * - `NewExpression` + * - `UnaryExpression([operator = "delete"])` + * - `UpdateExpression` + * - `YieldExpression` + * - When `options.considerGetters` is `true`: + * - `MemberExpression` + * - When `options.considerImplicitTypeConversion` is `true`: + * - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])` + * - `MemberExpression([computed = true])` + * - `MethodDefinition([computed = true])` + * - `Property([computed = true])` + * - `UnaryExpression([operator = "-" | "+" | "!" | "~"])` + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect} + */ +declare const hasSideEffect: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode, options?: { + considerGetters?: boolean; + considerImplicitTypeConversion?: boolean; +}) => boolean; +declare const isParenthesized: { + (node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; + (times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; +}; +export { getFunctionHeadLocation, getFunctionNameWithKind, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isParenthesized, }; +//# sourceMappingURL=astUtilities.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts index f87e6a92..ea4158a4 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts @@ -1,6 +1,6 @@ -export * from './astUtilities'; -export * from './PatternMatcher'; -export * from './predicates'; -export * from './ReferenceTracker'; -export * from './scopeAnalysis'; -//# sourceMappingURL=index.d.ts.map +export * from './astUtilities'; +export * from './PatternMatcher'; +export * from './predicates'; +export * from './ReferenceTracker'; +export * from './scopeAnalysis'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts index 6175b294..8ddce364 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts @@ -1,32 +1,32 @@ -import { TSESTree } from '../../ts-estree'; -type IsSpecificTokenFunction = (token: TSESTree.Token) => token is SpecificToken; -type IsNotSpecificTokenFunction = (token: TSESTree.Token) => token is Exclude; -type PunctuatorTokenWithValue = TSESTree.PunctuatorToken & { - value: Value; -}; -type IsPunctuatorTokenWithValueFunction = IsSpecificTokenFunction>; -type IsNotPunctuatorTokenWithValueFunction = IsNotSpecificTokenFunction>; -declare const isArrowToken: IsPunctuatorTokenWithValueFunction<"=>">; -declare const isNotArrowToken: IsNotPunctuatorTokenWithValueFunction<"=>">; -declare const isClosingBraceToken: IsPunctuatorTokenWithValueFunction<"}">; -declare const isNotClosingBraceToken: IsNotPunctuatorTokenWithValueFunction<"}">; -declare const isClosingBracketToken: IsPunctuatorTokenWithValueFunction<"]">; -declare const isNotClosingBracketToken: IsNotPunctuatorTokenWithValueFunction<"]">; -declare const isClosingParenToken: IsPunctuatorTokenWithValueFunction<")">; -declare const isNotClosingParenToken: IsNotPunctuatorTokenWithValueFunction<")">; -declare const isColonToken: IsPunctuatorTokenWithValueFunction<":">; -declare const isNotColonToken: IsNotPunctuatorTokenWithValueFunction<":">; -declare const isCommaToken: IsPunctuatorTokenWithValueFunction<",">; -declare const isNotCommaToken: IsNotPunctuatorTokenWithValueFunction<",">; -declare const isCommentToken: IsSpecificTokenFunction; -declare const isNotCommentToken: IsNotSpecificTokenFunction; -declare const isOpeningBraceToken: IsPunctuatorTokenWithValueFunction<"{">; -declare const isNotOpeningBraceToken: IsNotPunctuatorTokenWithValueFunction<"{">; -declare const isOpeningBracketToken: IsPunctuatorTokenWithValueFunction<"[">; -declare const isNotOpeningBracketToken: IsNotPunctuatorTokenWithValueFunction<"[">; -declare const isOpeningParenToken: IsPunctuatorTokenWithValueFunction<"(">; -declare const isNotOpeningParenToken: IsNotPunctuatorTokenWithValueFunction<"(">; -declare const isSemicolonToken: IsPunctuatorTokenWithValueFunction<";">; -declare const isNotSemicolonToken: IsNotPunctuatorTokenWithValueFunction<";">; -export { isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, }; -//# sourceMappingURL=predicates.d.ts.map +import { TSESTree } from '../../ts-estree'; +type IsSpecificTokenFunction = (token: TSESTree.Token) => token is SpecificToken; +type IsNotSpecificTokenFunction = (token: TSESTree.Token) => token is Exclude; +type PunctuatorTokenWithValue = TSESTree.PunctuatorToken & { + value: Value; +}; +type IsPunctuatorTokenWithValueFunction = IsSpecificTokenFunction>; +type IsNotPunctuatorTokenWithValueFunction = IsNotSpecificTokenFunction>; +declare const isArrowToken: IsPunctuatorTokenWithValueFunction<"=>">; +declare const isNotArrowToken: IsNotPunctuatorTokenWithValueFunction<"=>">; +declare const isClosingBraceToken: IsPunctuatorTokenWithValueFunction<"}">; +declare const isNotClosingBraceToken: IsNotPunctuatorTokenWithValueFunction<"}">; +declare const isClosingBracketToken: IsPunctuatorTokenWithValueFunction<"]">; +declare const isNotClosingBracketToken: IsNotPunctuatorTokenWithValueFunction<"]">; +declare const isClosingParenToken: IsPunctuatorTokenWithValueFunction<")">; +declare const isNotClosingParenToken: IsNotPunctuatorTokenWithValueFunction<")">; +declare const isColonToken: IsPunctuatorTokenWithValueFunction<":">; +declare const isNotColonToken: IsNotPunctuatorTokenWithValueFunction<":">; +declare const isCommaToken: IsPunctuatorTokenWithValueFunction<",">; +declare const isNotCommaToken: IsNotPunctuatorTokenWithValueFunction<",">; +declare const isCommentToken: IsSpecificTokenFunction; +declare const isNotCommentToken: IsNotSpecificTokenFunction; +declare const isOpeningBraceToken: IsPunctuatorTokenWithValueFunction<"{">; +declare const isNotOpeningBraceToken: IsNotPunctuatorTokenWithValueFunction<"{">; +declare const isOpeningBracketToken: IsPunctuatorTokenWithValueFunction<"[">; +declare const isNotOpeningBracketToken: IsNotPunctuatorTokenWithValueFunction<"[">; +declare const isOpeningParenToken: IsPunctuatorTokenWithValueFunction<"(">; +declare const isNotOpeningParenToken: IsNotPunctuatorTokenWithValueFunction<"(">; +declare const isSemicolonToken: IsPunctuatorTokenWithValueFunction<";">; +declare const isNotSemicolonToken: IsNotPunctuatorTokenWithValueFunction<";">; +export { isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, }; +//# sourceMappingURL=predicates.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts index 66921a8d..fec66a00 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts @@ -1,18 +1,18 @@ -import * as TSESLint from '../../ts-eslint'; -import { TSESTree } from '../../ts-estree'; -/** - * Get the variable of a given name. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#findvariable} - */ -declare const findVariable: (initialScope: TSESLint.Scope.Scope, nameOrNode: string | TSESTree.Identifier) => TSESLint.Scope.Variable | null; -/** - * Get the innermost scope which contains a given node. - * - * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#getinnermostscope} - * @returns The innermost scope which contains the given node. - * If such scope doesn't exist then it returns the 1st argument `initialScope`. - */ -declare const getInnermostScope: (initialScope: TSESLint.Scope.Scope, node: TSESTree.Node) => TSESLint.Scope.Scope; -export { findVariable, getInnermostScope }; -//# sourceMappingURL=scopeAnalysis.d.ts.map +import * as TSESLint from '../../ts-eslint'; +import { TSESTree } from '../../ts-estree'; +/** + * Get the variable of a given name. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#findvariable} + */ +declare const findVariable: (initialScope: TSESLint.Scope.Scope, nameOrNode: string | TSESTree.Identifier) => TSESLint.Scope.Variable | null; +/** + * Get the innermost scope which contains a given node. + * + * @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#getinnermostscope} + * @returns The innermost scope which contains the given node. + * If such scope doesn't exist then it returns the 1st argument `initialScope`. + */ +declare const getInnermostScope: (initialScope: TSESLint.Scope.Scope, node: TSESTree.Node) => TSESLint.Scope.Scope; +export { findVariable, getInnermostScope }; +//# sourceMappingURL=scopeAnalysis.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts index 986bfb1e..9383379b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts @@ -1,1207 +1,1207 @@ -import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; -export declare const isNodeOfType: (nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; -export declare const isNodeOfTypes: (nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; -export declare const isNodeOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(nodeType: NodeType, conditions: Conditions) => (node: TSESTree.Node | null | undefined) => node is ExtractedNode & Conditions; -export declare const isTokenOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(tokenType: TokenType, conditions: Conditions) => (token: TSESTree.Token | null | undefined) => token is ExtractedToken & Conditions; -export declare const isNotTokenOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(tokenType: TokenType, conditions: Conditions) => (token: TSESTree.Token | null | undefined) => token is Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude; -//# sourceMappingURL=helpers.d.ts.map +import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; +export declare const isNodeOfType: (nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; +export declare const isNodeOfTypes: (nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract; +export declare const isNodeOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(nodeType: NodeType, conditions: Conditions) => (node: TSESTree.Node | null | undefined) => node is ExtractedNode & Conditions; +export declare const isTokenOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(tokenType: TokenType, conditions: Conditions) => (token: TSESTree.Token | null | undefined) => token is ExtractedToken & Conditions; +export declare const isNotTokenOfTypeWithConditions: | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract, Conditions extends Partial>(tokenType: TokenType, conditions: Conditions) => (token: TSESTree.Token | null | undefined) => token is Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude; +//# sourceMappingURL=helpers.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts index 5c6b0295..a38350b4 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts @@ -1,5 +1,5 @@ -export * from './eslint-utils'; -export * from './helpers'; -export * from './misc'; -export * from './predicates'; -//# sourceMappingURL=index.d.ts.map +export * from './eslint-utils'; +export * from './helpers'; +export * from './misc'; +export * from './predicates'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts index ae6f7fe8..b7df932b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts @@ -1,8 +1,8 @@ -import { TSESTree } from '../ts-estree'; -declare const LINEBREAK_MATCHER: RegExp; -/** - * Determines whether two adjacent tokens are on the same line - */ -declare function isTokenOnSameLine(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean; -export { isTokenOnSameLine, LINEBREAK_MATCHER }; -//# sourceMappingURL=misc.d.ts.map +import { TSESTree } from '../ts-estree'; +declare const LINEBREAK_MATCHER: RegExp; +/** + * Determines whether two adjacent tokens are on the same line + */ +declare function isTokenOnSameLine(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean; +export { isTokenOnSameLine, LINEBREAK_MATCHER }; +//# sourceMappingURL=misc.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts index 46edd544..3f7ac672 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts @@ -1,70 +1,70 @@ -import { TSESTree } from '../ts-estree'; -declare const isOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & { - value: "?."; -}; -declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; -declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & { - value: "!"; -}; -declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; -/** - * Returns true if and only if the node represents: foo?.() or foo.bar?.() - */ -declare const isOptionalCallExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.CallExpression & { - optional: boolean; -}; -/** - * Returns true if and only if the node represents logical OR - */ -declare const isLogicalOrOperator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LogicalExpression & Partial; -/** - * Checks if a node is a type assertion: - * ``` - * x as foo - * x - * ``` - */ -declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion; -declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclarator; -declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression; -declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; -declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; -declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSFunctionType; -declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSConstructorType; -declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.FunctionExpression | TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName | TSESTree.TSAbstractPropertyDefinitionComputedName | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSIndexSignature | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName; -/** - * Checks if a node is a constructor method. - */ -declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is (TSESTree.MethodDefinitionComputedName & Partial) | (TSESTree.MethodDefinitionNonComputedName & Partial); -/** - * Checks if a node is a setter method. - */ -declare function isSetter(node: TSESTree.Node | undefined): node is (TSESTree.MethodDefinition | TSESTree.Property) & { - kind: 'set'; -}; -declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is TSESTree.Identifier; -/** - * Checks if a node represents an `await …` expression. - */ -declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.AwaitExpression; -/** - * Checks if a possible token is the `await` keyword. - */ -declare const isAwaitKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & { - value: "await"; -}; -/** - * Checks if a possible token is the `type` keyword. - */ -declare const isTypeKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & { - value: "type"; -}; -/** - * Checks if a possible token is the `import` keyword. - */ -declare const isImportKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.KeywordToken & { - value: "import"; -}; -declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement; -export { isAwaitExpression, isAwaitKeyword, isConstructor, isClassOrTypeElement, isFunction, isFunctionOrFunctionType, isFunctionType, isIdentifier, isImportKeyword, isLoop, isLogicalOrOperator, isNonNullAssertionPunctuator, isNotNonNullAssertionPunctuator, isNotOptionalChainPunctuator, isOptionalChainPunctuator, isOptionalCallExpression, isSetter, isTSConstructorType, isTSFunctionType, isTypeAssertion, isTypeKeyword, isVariableDeclarator, }; -//# sourceMappingURL=predicates.d.ts.map +import { TSESTree } from '../ts-estree'; +declare const isOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & { + value: "?."; +}; +declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; +declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & { + value: "!"; +}; +declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; +/** + * Returns true if and only if the node represents: foo?.() or foo.bar?.() + */ +declare const isOptionalCallExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.CallExpression & { + optional: boolean; +}; +/** + * Returns true if and only if the node represents logical OR + */ +declare const isLogicalOrOperator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LogicalExpression & Partial; +/** + * Checks if a node is a type assertion: + * ``` + * x as foo + * x + * ``` + */ +declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion; +declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclarator; +declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression; +declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; +declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; +declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSFunctionType; +declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSConstructorType; +declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.FunctionExpression | TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName | TSESTree.TSAbstractPropertyDefinitionComputedName | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSIndexSignature | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName; +/** + * Checks if a node is a constructor method. + */ +declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is (TSESTree.MethodDefinitionComputedName & Partial) | (TSESTree.MethodDefinitionNonComputedName & Partial); +/** + * Checks if a node is a setter method. + */ +declare function isSetter(node: TSESTree.Node | undefined): node is (TSESTree.MethodDefinition | TSESTree.Property) & { + kind: 'set'; +}; +declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is TSESTree.Identifier; +/** + * Checks if a node represents an `await …` expression. + */ +declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.AwaitExpression; +/** + * Checks if a possible token is the `await` keyword. + */ +declare const isAwaitKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & { + value: "await"; +}; +/** + * Checks if a possible token is the `type` keyword. + */ +declare const isTypeKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & { + value: "type"; +}; +/** + * Checks if a possible token is the `import` keyword. + */ +declare const isImportKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.KeywordToken & { + value: "import"; +}; +declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement; +export { isAwaitExpression, isAwaitKeyword, isConstructor, isClassOrTypeElement, isFunction, isFunctionOrFunctionType, isFunctionType, isIdentifier, isImportKeyword, isLoop, isLogicalOrOperator, isNonNullAssertionPunctuator, isNotNonNullAssertionPunctuator, isNotOptionalChainPunctuator, isOptionalChainPunctuator, isOptionalCallExpression, isSetter, isTSConstructorType, isTSFunctionType, isTypeAssertion, isTypeKeyword, isVariableDeclarator, }; +//# sourceMappingURL=predicates.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts index 03cd0b36..99312c14 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts @@ -1,11 +1,11 @@ -import { RuleCreateFunction, RuleModule } from '../ts-eslint'; -/** - * Uses type inference to fetch the TOptions type from the given RuleModule - */ -type InferOptionsTypeFromRule = T extends RuleModule ? TOptions : T extends RuleCreateFunction ? TOptions : unknown; -/** - * Uses type inference to fetch the TMessageIds type from the given RuleModule - */ -type InferMessageIdsTypeFromRule = T extends RuleModule ? TMessageIds : T extends RuleCreateFunction ? TMessageIds : unknown; -export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule }; -//# sourceMappingURL=InferTypesFromRule.d.ts.map +import { RuleCreateFunction, RuleModule } from '../ts-eslint'; +/** + * Uses type inference to fetch the TOptions type from the given RuleModule + */ +type InferOptionsTypeFromRule = T extends RuleModule ? TOptions : T extends RuleCreateFunction ? TOptions : unknown; +/** + * Uses type inference to fetch the TMessageIds type from the given RuleModule + */ +type InferMessageIdsTypeFromRule = T extends RuleModule ? TMessageIds : T extends RuleCreateFunction ? TMessageIds : unknown; +export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule }; +//# sourceMappingURL=InferTypesFromRule.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts index 708e5a46..52a55699 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts @@ -1,35 +1,35 @@ -import { RuleContext, RuleListener, RuleMetaData, RuleMetaDataDocs, RuleModule } from '../ts-eslint/Rule'; -export type NamedCreateRuleMetaDocs = Pick>; -export type NamedCreateRuleMeta = { - docs: NamedCreateRuleMetaDocs; -} & Pick, Exclude, 'docs'>>; -export interface RuleCreateAndOptions { - create: (context: Readonly>, optionsWithDefault: Readonly) => TRuleListener; - defaultOptions: Readonly; -} -export interface RuleWithMeta extends RuleCreateAndOptions { - meta: RuleMetaData; -} -export interface RuleWithMetaAndName extends RuleCreateAndOptions { - meta: NamedCreateRuleMeta; - name: string; -} -/** - * Creates reusable function to create rules with default options and docs URLs. - * - * @param urlCreator Creates a documentation URL for a given rule name. - * @returns Function to create a rule with the docs URL format. - */ -export declare function RuleCreator(urlCreator: (ruleName: string) => string): ({ name, meta, ...rule }: Readonly>) => RuleModule; -export declare namespace RuleCreator { - var withoutDocs: typeof createRule; -} -/** - * Creates a well-typed TSESLint custom ESLint rule without a docs URL. - * - * @returns Well-typed TSESLint custom ESLint rule. - * @remarks It is generally better to provide a docs URL function to RuleCreator. - */ -declare function createRule({ create, defaultOptions, meta, }: Readonly>): RuleModule; -export {}; -//# sourceMappingURL=RuleCreator.d.ts.map +import { RuleContext, RuleListener, RuleMetaData, RuleMetaDataDocs, RuleModule } from '../ts-eslint/Rule'; +export type NamedCreateRuleMetaDocs = Pick>; +export type NamedCreateRuleMeta = { + docs: NamedCreateRuleMetaDocs; +} & Pick, Exclude, 'docs'>>; +export interface RuleCreateAndOptions { + create: (context: Readonly>, optionsWithDefault: Readonly) => TRuleListener; + defaultOptions: Readonly; +} +export interface RuleWithMeta extends RuleCreateAndOptions { + meta: RuleMetaData; +} +export interface RuleWithMetaAndName extends RuleCreateAndOptions { + meta: NamedCreateRuleMeta; + name: string; +} +/** + * Creates reusable function to create rules with default options and docs URLs. + * + * @param urlCreator Creates a documentation URL for a given rule name. + * @returns Function to create a rule with the docs URL format. + */ +export declare function RuleCreator(urlCreator: (ruleName: string) => string): ({ name, meta, ...rule }: Readonly>) => RuleModule; +export declare namespace RuleCreator { + var withoutDocs: typeof createRule; +} +/** + * Creates a well-typed TSESLint custom ESLint rule without a docs URL. + * + * @returns Well-typed TSESLint custom ESLint rule. + * @remarks It is generally better to provide a docs URL function to RuleCreator. + */ +declare function createRule({ create, defaultOptions, meta, }: Readonly>): RuleModule; +export {}; +//# sourceMappingURL=RuleCreator.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts index b17d7594..b0c9405e 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts @@ -1,10 +1,10 @@ -/** - * Pure function - doesn't mutate either parameter! - * Uses the default options and overrides with the options provided by the user - * @param defaultOptions the defaults - * @param userOptions the user opts - * @returns the options with defaults - */ -declare function applyDefault(defaultOptions: Readonly, userOptions: Readonly | null): TDefault; -export { applyDefault }; -//# sourceMappingURL=applyDefault.d.ts.map +/** + * Pure function - doesn't mutate either parameter! + * Uses the default options and overrides with the options provided by the user + * @param defaultOptions the defaults + * @param userOptions the user opts + * @returns the options with defaults + */ +declare function applyDefault(defaultOptions: Readonly, userOptions: Readonly | null): TDefault; +export { applyDefault }; +//# sourceMappingURL=applyDefault.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts index 21621535..c9db216b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts @@ -1,24 +1,24 @@ -import { InvalidTestCase, ValidTestCase } from '../eslint-utils/rule-tester/RuleTester'; -/** - * Converts a batch of single line tests into a number of separate test cases. - * This makes it easier to write tests which use the same options. - * - * Why wouldn't you just leave them as one test? - * Because it makes the test error messages harder to decipher. - * This way each line will fail separately, instead of them all failing together. - */ -declare function batchedSingleLineTests>(test: ValidTestCase): ValidTestCase[]; -/** - * Converts a batch of single line tests into a number of separate test cases. - * This makes it easier to write tests which use the same options. - * - * Why wouldn't you just leave them as one test? - * Because it makes the test error messages harder to decipher. - * This way each line will fail separately, instead of them all failing together. - * - * Make sure you have your line numbers correct for error reporting, as it will match - * the line numbers up with the split tests! - */ -declare function batchedSingleLineTests>(test: InvalidTestCase): InvalidTestCase[]; -export { batchedSingleLineTests }; -//# sourceMappingURL=batchedSingleLineTests.d.ts.map +import { InvalidTestCase, ValidTestCase } from '../eslint-utils/rule-tester/RuleTester'; +/** + * Converts a batch of single line tests into a number of separate test cases. + * This makes it easier to write tests which use the same options. + * + * Why wouldn't you just leave them as one test? + * Because it makes the test error messages harder to decipher. + * This way each line will fail separately, instead of them all failing together. + */ +declare function batchedSingleLineTests>(test: ValidTestCase): ValidTestCase[]; +/** + * Converts a batch of single line tests into a number of separate test cases. + * This makes it easier to write tests which use the same options. + * + * Why wouldn't you just leave them as one test? + * Because it makes the test error messages harder to decipher. + * This way each line will fail separately, instead of them all failing together. + * + * Make sure you have your line numbers correct for error reporting, as it will match + * the line numbers up with the split tests! + */ +declare function batchedSingleLineTests>(test: InvalidTestCase): InvalidTestCase[]; +export { batchedSingleLineTests }; +//# sourceMappingURL=batchedSingleLineTests.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts index 5c12979f..e73c1a00 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts @@ -1,17 +1,17 @@ -type ObjectLike = Record; -/** - * Check if the variable contains an object strictly rejecting arrays - * @param obj an object - * @returns `true` if obj is an object - */ -declare function isObjectNotArray(obj: unknown | unknown[]): obj is T; -/** - * Pure function - doesn't mutate either parameter! - * Merges two objects together deeply, overwriting the properties in first with the properties in second - * @param first The first object - * @param second The second object - * @returns a new object - */ -export declare function deepMerge(first?: ObjectLike, second?: ObjectLike): Record; -export { isObjectNotArray }; -//# sourceMappingURL=deepMerge.d.ts.map +type ObjectLike = Record; +/** + * Check if the variable contains an object strictly rejecting arrays + * @param obj an object + * @returns `true` if obj is an object + */ +declare function isObjectNotArray(obj: unknown | unknown[]): obj is T; +/** + * Pure function - doesn't mutate either parameter! + * Merges two objects together deeply, overwriting the properties in first with the properties in second + * @param first The first object + * @param second The second object + * @returns a new object + */ +export declare function deepMerge(first?: ObjectLike, second?: ObjectLike): Record; +export { isObjectNotArray }; +//# sourceMappingURL=deepMerge.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts index 99c5af5e..43ab6586 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts @@ -1,8 +1,8 @@ -import * as TSESLint from '../ts-eslint'; -import { ParserServices } from '../ts-estree'; -/** - * Try to retrieve typescript parser service from context - */ -declare function getParserServices(context: Readonly>, allowWithoutFullTypeInformation?: boolean): ParserServices; -export { getParserServices }; -//# sourceMappingURL=getParserServices.d.ts.map +import * as TSESLint from '../ts-eslint'; +import { ParserServices } from '../ts-estree'; +/** + * Try to retrieve typescript parser service from context + */ +declare function getParserServices(context: Readonly>, allowWithoutFullTypeInformation?: boolean): ParserServices; +export { getParserServices }; +//# sourceMappingURL=getParserServices.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts index cd4170ba..e5b60d80 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts @@ -1,9 +1,9 @@ -export * from './applyDefault'; -export * from './batchedSingleLineTests'; -export * from './getParserServices'; -export * from './InferTypesFromRule'; -export * from './RuleCreator'; -export * from './rule-tester/RuleTester'; -export * from './deepMerge'; -export * from './nullThrows'; -//# sourceMappingURL=index.d.ts.map +export * from './applyDefault'; +export * from './batchedSingleLineTests'; +export * from './getParserServices'; +export * from './InferTypesFromRule'; +export * from './RuleCreator'; +export * from './rule-tester/RuleTester'; +export * from './deepMerge'; +export * from './nullThrows'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts index ddff6554..57029294 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts @@ -1,14 +1,14 @@ -/** - * A set of common reasons for calling nullThrows - */ -declare const NullThrowsReasons: { - readonly MissingParent: "Expected node to have a parent."; - readonly MissingToken: (token: string, thing: string) => string; -}; -/** - * Assert that a value must not be null or undefined. - * This is a nice explicit alternative to the non-null assertion operator. - */ -declare function nullThrows(value: T | null | undefined, message: string): T; -export { nullThrows, NullThrowsReasons }; -//# sourceMappingURL=nullThrows.d.ts.map +/** + * A set of common reasons for calling nullThrows + */ +declare const NullThrowsReasons: { + readonly MissingParent: "Expected node to have a parent."; + readonly MissingToken: (token: string, thing: string) => string; +}; +/** + * Assert that a value must not be null or undefined. + * This is a nice explicit alternative to the non-null assertion operator. + */ +declare function nullThrows(value: T | null | undefined, message: string): T; +export { nullThrows, NullThrowsReasons }; +//# sourceMappingURL=nullThrows.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts index 5b8107ad..c680361b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts @@ -1,48 +1,48 @@ -import { RuleModule } from '../../ts-eslint/Rule'; -import * as BaseRuleTester from '../../ts-eslint/RuleTester'; -import { DependencyConstraint } from './dependencyConstraints'; -declare const TS_ESLINT_PARSER = "@typescript-eslint/parser"; -type RuleTesterConfig = Pick> & { - parser: typeof TS_ESLINT_PARSER; - /** - * Constraints that must pass in the current environment for any tests to run - */ - dependencyConstraints?: DependencyConstraint; -}; -interface InvalidTestCase> extends BaseRuleTester.InvalidTestCase { - /** - * Constraints that must pass in the current environment for the test to run - */ - dependencyConstraints?: DependencyConstraint; -} -interface ValidTestCase> extends BaseRuleTester.ValidTestCase { - /** - * Constraints that must pass in the current environment for the test to run - */ - dependencyConstraints?: DependencyConstraint; -} -interface RunTests> { - readonly valid: readonly (ValidTestCase | string)[]; - readonly invalid: readonly InvalidTestCase[]; -} -type AfterAll = (fn: () => void) => void; -declare class RuleTester extends BaseRuleTester.RuleTester { - private "RuleTester.#private"; - /* - * If you supply a value to this property, the rule tester will call this instead of using the version defined on - * the global namespace. - */ - static afterAll: AfterAll; - private readonly staticThis: any; - constructor(baseOptions: RuleTesterConfig); - private getFilename; - run>(name: string, rule: RuleModule, testsReadonly: RunTests): void; -} -/** - * Simple no-op tag to mark code samples as "should not format with prettier" - * for the internal/plugin-test-formatting lint rule - */ -declare function noFormat(raw: TemplateStringsArray, ...keys: string[]): string; -export { noFormat, RuleTester }; -export { InvalidTestCase, ValidTestCase, RunTests }; -//# sourceMappingURL=RuleTester.d.ts.map +import { RuleModule } from '../../ts-eslint/Rule'; +import * as BaseRuleTester from '../../ts-eslint/RuleTester'; +import { DependencyConstraint } from './dependencyConstraints'; +declare const TS_ESLINT_PARSER = "@typescript-eslint/parser"; +type RuleTesterConfig = Pick> & { + parser: typeof TS_ESLINT_PARSER; + /** + * Constraints that must pass in the current environment for any tests to run + */ + dependencyConstraints?: DependencyConstraint; +}; +interface InvalidTestCase> extends BaseRuleTester.InvalidTestCase { + /** + * Constraints that must pass in the current environment for the test to run + */ + dependencyConstraints?: DependencyConstraint; +} +interface ValidTestCase> extends BaseRuleTester.ValidTestCase { + /** + * Constraints that must pass in the current environment for the test to run + */ + dependencyConstraints?: DependencyConstraint; +} +interface RunTests> { + readonly valid: readonly (ValidTestCase | string)[]; + readonly invalid: readonly InvalidTestCase[]; +} +type AfterAll = (fn: () => void) => void; +declare class RuleTester extends BaseRuleTester.RuleTester { + private "RuleTester.#private"; + /* + * If you supply a value to this property, the rule tester will call this instead of using the version defined on + * the global namespace. + */ + static afterAll: AfterAll; + private readonly staticThis: any; + constructor(baseOptions: RuleTesterConfig); + private getFilename; + run>(name: string, rule: RuleModule, testsReadonly: RunTests): void; +} +/** + * Simple no-op tag to mark code samples as "should not format with prettier" + * for the internal/plugin-test-formatting lint rule + */ +declare function noFormat(raw: TemplateStringsArray, ...keys: string[]): string; +export { noFormat, RuleTester }; +export { InvalidTestCase, ValidTestCase, RunTests }; +//# sourceMappingURL=RuleTester.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts index 74d8d7ba..80f1c6f5 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts @@ -1,17 +1,17 @@ -import * as semver from 'semver'; -interface SemverVersionConstraint { - readonly range: string; - readonly options?: Parameters[2]; -} -type AtLeastVersionConstraint = string | string | string | string; -type VersionConstraint = SemverVersionConstraint | AtLeastVersionConstraint; -interface DependencyConstraint { - /** - * Passing a string for the value is shorthand for a '>=' constraint - */ - readonly [packageName: string]: VersionConstraint; -} -declare function satisfiesAllDependencyConstraints(dependencyConstraints: DependencyConstraint | undefined): boolean; -export { satisfiesAllDependencyConstraints }; -export { DependencyConstraint }; -//# sourceMappingURL=dependencyConstraints.d.ts.map +import * as semver from 'semver'; +interface SemverVersionConstraint { + readonly range: string; + readonly options?: Parameters[2]; +} +type AtLeastVersionConstraint = string | string | string | string; +type VersionConstraint = SemverVersionConstraint | AtLeastVersionConstraint; +interface DependencyConstraint { + /** + * Passing a string for the value is shorthand for a '>=' constraint + */ + readonly [packageName: string]: VersionConstraint; +} +declare function satisfiesAllDependencyConstraints(dependencyConstraints: DependencyConstraint | undefined): boolean; +export { satisfiesAllDependencyConstraints }; +export { DependencyConstraint }; +//# sourceMappingURL=dependencyConstraints.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts index c1ab1f74..9d012254 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts @@ -1,8 +1,8 @@ -import * as ASTUtils from './ast-utils'; -import * as ESLintUtils from './eslint-utils'; -import * as JSONSchema from './json-schema'; -import * as TSESLint from './ts-eslint'; -import * as TSESLintScope from './ts-eslint-scope'; -export { ASTUtils, ESLintUtils, JSONSchema, TSESLint, TSESLintScope }; -export * from './ts-estree'; -//# sourceMappingURL=index.d.ts.map +import * as ASTUtils from './ast-utils'; +import * as ESLintUtils from './eslint-utils'; +import * as JSONSchema from './json-schema'; +import * as TSESLint from './ts-eslint'; +import * as TSESLintScope from './ts-eslint-scope'; +export { ASTUtils, ESLintUtils, JSONSchema, TSESLint, TSESLintScope }; +export * from './ts-estree'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts index d481d159..fdef110f 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts @@ -1,2 +1,2 @@ -export { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema4Version, JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version, JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version, ValidationError, ValidationResult, } from 'json-schema'; -//# sourceMappingURL=json-schema.d.ts.map +export { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema4Version, JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version, JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version, ValidationError, ValidationResult, } from 'json-schema'; +//# sourceMappingURL=json-schema.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts index a16ebe39..d02600b3 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts @@ -1,19 +1,19 @@ -import { TSESTree } from '../ts-estree'; -interface Definition { - type: string; - name: TSESTree.BindingName; - node: TSESTree.Node; - parent?: TSESTree.Node | null; - index?: number | null; - kind?: string | null; - rest?: boolean; -} -interface DefinitionConstructor { - new (type: string, name: TSESTree.BindingName | TSESTree.PropertyName, node: TSESTree.Node, parent?: TSESTree.Node | null, index?: number | null, kind?: string | null): Definition; -} -declare const Definition: DefinitionConstructor; -interface ParameterDefinition extends Definition { -} -declare const ParameterDefinition: DefinitionConstructor & (new (name: TSESTree.Node, node: TSESTree.Node, index?: number | null, rest?: boolean) => ParameterDefinition); -export { Definition, ParameterDefinition }; -//# sourceMappingURL=Definition.d.ts.map +import { TSESTree } from '../ts-estree'; +interface Definition { + type: string; + name: TSESTree.BindingName; + node: TSESTree.Node; + parent?: TSESTree.Node | null; + index?: number | null; + kind?: string | null; + rest?: boolean; +} +interface DefinitionConstructor { + new (type: string, name: TSESTree.BindingName | TSESTree.PropertyName, node: TSESTree.Node, parent?: TSESTree.Node | null, index?: number | null, kind?: string | null): Definition; +} +declare const Definition: DefinitionConstructor; +interface ParameterDefinition extends Definition { +} +declare const ParameterDefinition: DefinitionConstructor & (new (name: TSESTree.Node, node: TSESTree.Node, index?: number | null, rest?: boolean) => ParameterDefinition); +export { Definition, ParameterDefinition }; +//# sourceMappingURL=Definition.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts index 14e2f4c6..88371476 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts @@ -1,15 +1,15 @@ -import { TSESTree } from '../ts-estree'; -type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: { - rest: boolean; - topLevel: boolean; - assignments: TSESTree.AssignmentPattern[]; -}) => void; -interface PatternVisitorOptions { - processRightHandNodes?: boolean; -} -interface Visitor { - visitChildren(node?: T): void; - visit(node?: T): void; -} -export { PatternVisitorCallback, PatternVisitorOptions, Visitor }; -//# sourceMappingURL=Options.d.ts.map +import { TSESTree } from '../ts-estree'; +type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: { + rest: boolean; + topLevel: boolean; + assignments: TSESTree.AssignmentPattern[]; +}) => void; +interface PatternVisitorOptions { + processRightHandNodes?: boolean; +} +interface Visitor { + visitChildren(node?: T): void; + visit(node?: T): void; +} +export { PatternVisitorCallback, PatternVisitorOptions, Visitor }; +//# sourceMappingURL=Options.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts index a6108a4e..6b682722 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts @@ -1,25 +1,25 @@ -import { TSESTree } from '../ts-estree'; -import { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options'; -import { ScopeManager } from './ScopeManager'; -interface PatternVisitor extends Visitor { - options: PatternVisitorOptions; - scopeManager: ScopeManager; - parent?: TSESTree.Node; - rightHandNodes: TSESTree.Node[]; - Identifier(pattern: TSESTree.Node): void; - Property(property: TSESTree.Node): void; - ArrayPattern(pattern: TSESTree.Node): void; - AssignmentPattern(pattern: TSESTree.Node): void; - RestElement(pattern: TSESTree.Node): void; - MemberExpression(node: TSESTree.Node): void; - SpreadElement(node: TSESTree.Node): void; - ArrayExpression(node: TSESTree.Node): void; - AssignmentExpression(node: TSESTree.Node): void; - CallExpression(node: TSESTree.Node): void; -} -declare const PatternVisitor: { - new (options: PatternVisitorOptions, rootPattern: TSESTree.BaseNode, callback: PatternVisitorCallback): PatternVisitor; - isPattern(node: TSESTree.Node): boolean; -}; -export { PatternVisitor }; -//# sourceMappingURL=PatternVisitor.d.ts.map +import { TSESTree } from '../ts-estree'; +import { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options'; +import { ScopeManager } from './ScopeManager'; +interface PatternVisitor extends Visitor { + options: PatternVisitorOptions; + scopeManager: ScopeManager; + parent?: TSESTree.Node; + rightHandNodes: TSESTree.Node[]; + Identifier(pattern: TSESTree.Node): void; + Property(property: TSESTree.Node): void; + ArrayPattern(pattern: TSESTree.Node): void; + AssignmentPattern(pattern: TSESTree.Node): void; + RestElement(pattern: TSESTree.Node): void; + MemberExpression(node: TSESTree.Node): void; + SpreadElement(node: TSESTree.Node): void; + ArrayExpression(node: TSESTree.Node): void; + AssignmentExpression(node: TSESTree.Node): void; + CallExpression(node: TSESTree.Node): void; +} +declare const PatternVisitor: { + new (options: PatternVisitorOptions, rootPattern: TSESTree.BaseNode, callback: PatternVisitorCallback): PatternVisitor; + isPattern(node: TSESTree.Node): boolean; +}; +export { PatternVisitor }; +//# sourceMappingURL=PatternVisitor.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts index 5806cb93..fdd7ba5d 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts @@ -1,28 +1,28 @@ -import { TSESTree } from '../ts-estree'; -import { Scope } from './Scope'; -import { Variable } from './Variable'; -export type ReferenceFlag = 0x1 | 0x2 | 0x3; -interface Reference { - identifier: TSESTree.Identifier; - from: Scope; - resolved: Variable | null; - writeExpr: TSESTree.Node | null; - init: boolean; - partial: boolean; - __maybeImplicitGlobal: boolean; - tainted?: boolean; - typeMode?: boolean; - isWrite(): boolean; - isRead(): boolean; - isWriteOnly(): boolean; - isReadOnly(): boolean; - isReadWrite(): boolean; -} -declare const Reference: { - new (identifier: TSESTree.Identifier, scope: Scope, flag?: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: boolean, partial?: boolean, init?: boolean): Reference; - READ: 0x1; - WRITE: 0x2; - RW: 0x3; -}; -export { Reference }; -//# sourceMappingURL=Reference.d.ts.map +import { TSESTree } from '../ts-estree'; +import { Scope } from './Scope'; +import { Variable } from './Variable'; +export type ReferenceFlag = 0x1 | 0x2 | 0x3; +interface Reference { + identifier: TSESTree.Identifier; + from: Scope; + resolved: Variable | null; + writeExpr: TSESTree.Node | null; + init: boolean; + partial: boolean; + __maybeImplicitGlobal: boolean; + tainted?: boolean; + typeMode?: boolean; + isWrite(): boolean; + isRead(): boolean; + isWriteOnly(): boolean; + isReadOnly(): boolean; + isReadWrite(): boolean; +} +declare const Reference: { + new (identifier: TSESTree.Identifier, scope: Scope, flag?: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: boolean, partial?: boolean, init?: boolean): Reference; + READ: 0x1; + WRITE: 0x2; + RW: 0x3; +}; +export { Reference }; +//# sourceMappingURL=Reference.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts index 38456204..eb5565a2 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts @@ -1,55 +1,55 @@ -import { TSESTree } from '../ts-estree'; -import { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options'; -import { Scope } from './Scope'; -import { ScopeManager } from './ScopeManager'; -interface Referencer extends Visitor { - isInnerMethodDefinition: boolean; - options: any; - scopeManager: SM; - parent?: TSESTree.Node; - currentScope(): Scope; - close(node: TSESTree.Node): void; - pushInnerMethodDefinition(isInnerMethodDefinition: boolean): boolean; - popInnerMethodDefinition(isInnerMethodDefinition: boolean): void; - referencingDefaultValue(pattern: any, assignments: any, maybeImplicitGlobal: any, init: boolean): void; - visitPattern(node: TSESTree.Node, options: PatternVisitorOptions, callback: PatternVisitorCallback): void; - visitFunction(node: TSESTree.Node): void; - visitClass(node: TSESTree.Node): void; - visitProperty(node: TSESTree.Node): void; - visitForIn(node: TSESTree.Node): void; - visitVariableDeclaration(variableTargetScope: any, type: any, node: TSESTree.Node, index: any): void; - AssignmentExpression(node: TSESTree.Node): void; - CatchClause(node: TSESTree.Node): void; - Program(node: TSESTree.Program): void; - Identifier(node: TSESTree.Identifier): void; - UpdateExpression(node: TSESTree.Node): void; - MemberExpression(node: TSESTree.Node): void; - Property(node: TSESTree.Node): void; - MethodDefinition(node: TSESTree.Node): void; - BreakStatement(): void; - ContinueStatement(): void; - LabeledStatement(node: TSESTree.Node): void; - ForStatement(node: TSESTree.Node): void; - ClassExpression(node: TSESTree.Node): void; - ClassDeclaration(node: TSESTree.Node): void; - CallExpression(node: TSESTree.Node): void; - BlockStatement(node: TSESTree.Node): void; - ThisExpression(): void; - WithStatement(node: TSESTree.Node): void; - VariableDeclaration(node: TSESTree.Node): void; - SwitchStatement(node: TSESTree.Node): void; - FunctionDeclaration(node: TSESTree.Node): void; - FunctionExpression(node: TSESTree.Node): void; - ForOfStatement(node: TSESTree.Node): void; - ForInStatement(node: TSESTree.Node): void; - ArrowFunctionExpression(node: TSESTree.Node): void; - ImportDeclaration(node: TSESTree.Node): void; - visitExportDeclaration(node: TSESTree.Node): void; - ExportDeclaration(node: TSESTree.Node): void; - ExportNamedDeclaration(node: TSESTree.Node): void; - ExportSpecifier(node: TSESTree.Node): void; - MetaProperty(): void; -} -declare const Referencer: new (options: any, scopeManager: SM) => Referencer; -export { Referencer }; -//# sourceMappingURL=Referencer.d.ts.map +import { TSESTree } from '../ts-estree'; +import { PatternVisitorCallback, PatternVisitorOptions, Visitor } from './Options'; +import { Scope } from './Scope'; +import { ScopeManager } from './ScopeManager'; +interface Referencer extends Visitor { + isInnerMethodDefinition: boolean; + options: any; + scopeManager: SM; + parent?: TSESTree.Node; + currentScope(): Scope; + close(node: TSESTree.Node): void; + pushInnerMethodDefinition(isInnerMethodDefinition: boolean): boolean; + popInnerMethodDefinition(isInnerMethodDefinition: boolean): void; + referencingDefaultValue(pattern: any, assignments: any, maybeImplicitGlobal: any, init: boolean): void; + visitPattern(node: TSESTree.Node, options: PatternVisitorOptions, callback: PatternVisitorCallback): void; + visitFunction(node: TSESTree.Node): void; + visitClass(node: TSESTree.Node): void; + visitProperty(node: TSESTree.Node): void; + visitForIn(node: TSESTree.Node): void; + visitVariableDeclaration(variableTargetScope: any, type: any, node: TSESTree.Node, index: any): void; + AssignmentExpression(node: TSESTree.Node): void; + CatchClause(node: TSESTree.Node): void; + Program(node: TSESTree.Program): void; + Identifier(node: TSESTree.Identifier): void; + UpdateExpression(node: TSESTree.Node): void; + MemberExpression(node: TSESTree.Node): void; + Property(node: TSESTree.Node): void; + MethodDefinition(node: TSESTree.Node): void; + BreakStatement(): void; + ContinueStatement(): void; + LabeledStatement(node: TSESTree.Node): void; + ForStatement(node: TSESTree.Node): void; + ClassExpression(node: TSESTree.Node): void; + ClassDeclaration(node: TSESTree.Node): void; + CallExpression(node: TSESTree.Node): void; + BlockStatement(node: TSESTree.Node): void; + ThisExpression(): void; + WithStatement(node: TSESTree.Node): void; + VariableDeclaration(node: TSESTree.Node): void; + SwitchStatement(node: TSESTree.Node): void; + FunctionDeclaration(node: TSESTree.Node): void; + FunctionExpression(node: TSESTree.Node): void; + ForOfStatement(node: TSESTree.Node): void; + ForInStatement(node: TSESTree.Node): void; + ArrowFunctionExpression(node: TSESTree.Node): void; + ImportDeclaration(node: TSESTree.Node): void; + visitExportDeclaration(node: TSESTree.Node): void; + ExportDeclaration(node: TSESTree.Node): void; + ExportNamedDeclaration(node: TSESTree.Node): void; + ExportSpecifier(node: TSESTree.Node): void; + MetaProperty(): void; +} +declare const Referencer: new (options: any, scopeManager: SM) => Referencer; +export { Referencer }; +//# sourceMappingURL=Referencer.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts index aeb74f6f..d7492a55 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts @@ -1,103 +1,103 @@ -import { TSESTree } from '../ts-estree'; -import { Definition } from './Definition'; -import { Reference, ReferenceFlag } from './Reference'; -import { ScopeManager } from './ScopeManager'; -import { Variable } from './Variable'; -type ScopeType = 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ' | 'enum' | 'empty-function'; -interface Scope { - type: ScopeType; - isStrict: boolean; - upper: Scope | null; - childScopes: Scope[]; - variableScope: Scope; - block: TSESTree.Node; - variables: Variable[]; - set: Map; - references: Reference[]; - through: Reference[]; - thisFound?: boolean; - taints: Map; - functionExpressionScope: boolean; - __left: Reference[]; - __shouldStaticallyClose(scopeManager: ScopeManager): boolean; - __shouldStaticallyCloseForGlobal(ref: any): boolean; - __staticCloseRef(ref: any): void; - __dynamicCloseRef(ref: any): void; - __globalCloseRef(ref: any): void; - __close(scopeManager: ScopeManager): Scope; - __isValidResolution(ref: any, variable: any): variable is Variable; - __resolve(ref: Reference): boolean; - __delegateToUpperScope(ref: any): void; - __addDeclaredVariablesOfNode(variable: any, node: TSESTree.Node): void; - __defineGeneric(name: string, set: Map, variables: Variable[], node: TSESTree.Identifier, def: Definition): void; - __define(node: TSESTree.Node, def: Definition): void; - __referencing(node: TSESTree.Node, assign?: ReferenceFlag, writeExpr?: TSESTree.Node, maybeImplicitGlobal?: any, partial?: any, init?: any): void; - __detectEval(): void; - __detectThis(): void; - __isClosed(): boolean; - /** - * returns resolved {Reference} - * @method Scope#resolve - * @param {Espree.Identifier} ident - identifier to be resolved. - * @returns {Reference} reference - */ - resolve(ident: TSESTree.Node): Reference; - /** - * returns this scope is static - * @method Scope#isStatic - * @returns {boolean} static - */ - isStatic(): boolean; - /** - * returns this scope has materialized arguments - * @method Scope#isArgumentsMaterialized - * @returns {boolean} arguments materialized - */ - isArgumentsMaterialized(): boolean; - /** - * returns this scope has materialized `this` reference - * @method Scope#isThisMaterialized - * @returns {boolean} this materialized - */ - isThisMaterialized(): boolean; - isUsedName(name: any): boolean; -} -interface ScopeConstructor { - new (scopeManager: ScopeManager, type: ScopeType, upperScope: Scope | null, block: TSESTree.Node | null, isMethodDefinition: boolean): Scope; -} -declare const Scope: ScopeConstructor; -interface ScopeChildConstructorWithUpperScope { - new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null): T; -} -interface GlobalScope extends Scope { -} -declare const GlobalScope: ScopeConstructor & (new (scopeManager: ScopeManager, block: TSESTree.Node | null) => GlobalScope); -interface ModuleScope extends Scope { -} -declare const ModuleScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface FunctionExpressionNameScope extends Scope { -} -declare const FunctionExpressionNameScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface CatchScope extends Scope { -} -declare const CatchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface WithScope extends Scope { -} -declare const WithScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface BlockScope extends Scope { -} -declare const BlockScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface SwitchScope extends Scope { -} -declare const SwitchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface FunctionScope extends Scope { -} -declare const FunctionScope: ScopeConstructor & (new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null, isMethodDefinition: boolean) => FunctionScope); -interface ForScope extends Scope { -} -declare const ForScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -interface ClassScope extends Scope { -} -declare const ClassScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; -export { ScopeType, Scope, GlobalScope, ModuleScope, FunctionExpressionNameScope, CatchScope, WithScope, BlockScope, SwitchScope, FunctionScope, ForScope, ClassScope, }; -//# sourceMappingURL=Scope.d.ts.map +import { TSESTree } from '../ts-estree'; +import { Definition } from './Definition'; +import { Reference, ReferenceFlag } from './Reference'; +import { ScopeManager } from './ScopeManager'; +import { Variable } from './Variable'; +type ScopeType = 'block' | 'catch' | 'class' | 'for' | 'function' | 'function-expression-name' | 'global' | 'module' | 'switch' | 'with' | 'TDZ' | 'enum' | 'empty-function'; +interface Scope { + type: ScopeType; + isStrict: boolean; + upper: Scope | null; + childScopes: Scope[]; + variableScope: Scope; + block: TSESTree.Node; + variables: Variable[]; + set: Map; + references: Reference[]; + through: Reference[]; + thisFound?: boolean; + taints: Map; + functionExpressionScope: boolean; + __left: Reference[]; + __shouldStaticallyClose(scopeManager: ScopeManager): boolean; + __shouldStaticallyCloseForGlobal(ref: any): boolean; + __staticCloseRef(ref: any): void; + __dynamicCloseRef(ref: any): void; + __globalCloseRef(ref: any): void; + __close(scopeManager: ScopeManager): Scope; + __isValidResolution(ref: any, variable: any): variable is Variable; + __resolve(ref: Reference): boolean; + __delegateToUpperScope(ref: any): void; + __addDeclaredVariablesOfNode(variable: any, node: TSESTree.Node): void; + __defineGeneric(name: string, set: Map, variables: Variable[], node: TSESTree.Identifier, def: Definition): void; + __define(node: TSESTree.Node, def: Definition): void; + __referencing(node: TSESTree.Node, assign?: ReferenceFlag, writeExpr?: TSESTree.Node, maybeImplicitGlobal?: any, partial?: any, init?: any): void; + __detectEval(): void; + __detectThis(): void; + __isClosed(): boolean; + /** + * returns resolved {Reference} + * @method Scope#resolve + * @param {Espree.Identifier} ident - identifier to be resolved. + * @returns {Reference} reference + */ + resolve(ident: TSESTree.Node): Reference; + /** + * returns this scope is static + * @method Scope#isStatic + * @returns {boolean} static + */ + isStatic(): boolean; + /** + * returns this scope has materialized arguments + * @method Scope#isArgumentsMaterialized + * @returns {boolean} arguments materialized + */ + isArgumentsMaterialized(): boolean; + /** + * returns this scope has materialized `this` reference + * @method Scope#isThisMaterialized + * @returns {boolean} this materialized + */ + isThisMaterialized(): boolean; + isUsedName(name: any): boolean; +} +interface ScopeConstructor { + new (scopeManager: ScopeManager, type: ScopeType, upperScope: Scope | null, block: TSESTree.Node | null, isMethodDefinition: boolean): Scope; +} +declare const Scope: ScopeConstructor; +interface ScopeChildConstructorWithUpperScope { + new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null): T; +} +interface GlobalScope extends Scope { +} +declare const GlobalScope: ScopeConstructor & (new (scopeManager: ScopeManager, block: TSESTree.Node | null) => GlobalScope); +interface ModuleScope extends Scope { +} +declare const ModuleScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface FunctionExpressionNameScope extends Scope { +} +declare const FunctionExpressionNameScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface CatchScope extends Scope { +} +declare const CatchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface WithScope extends Scope { +} +declare const WithScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface BlockScope extends Scope { +} +declare const BlockScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface SwitchScope extends Scope { +} +declare const SwitchScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface FunctionScope extends Scope { +} +declare const FunctionScope: ScopeConstructor & (new (scopeManager: ScopeManager, upperScope: Scope, block: TSESTree.Node | null, isMethodDefinition: boolean) => FunctionScope); +interface ForScope extends Scope { +} +declare const ForScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +interface ClassScope extends Scope { +} +declare const ClassScope: ScopeConstructor & ScopeChildConstructorWithUpperScope; +export { ScopeType, Scope, GlobalScope, ModuleScope, FunctionExpressionNameScope, CatchScope, WithScope, BlockScope, SwitchScope, FunctionScope, ForScope, ClassScope, }; +//# sourceMappingURL=Scope.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts index dc1e3bcb..561a2845 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts @@ -1,50 +1,50 @@ -import { EcmaVersion } from '../ts-eslint'; -import { TSESTree } from '../ts-estree'; -import { Scope } from './Scope'; -import { Variable } from './Variable'; -interface ScopeManagerOptions { - directive?: boolean; - optimistic?: boolean; - ignoreEval?: boolean; - nodejsScope?: boolean; - sourceType?: 'module' | 'script'; - impliedStrict?: boolean; - ecmaVersion?: EcmaVersion; -} -interface ScopeManager { - __options: ScopeManagerOptions; - __currentScope: Scope; - __nodeToScope: WeakMap; - __declaredVariables: WeakMap; - scopes: Scope[]; - globalScope: Scope; - __useDirective(): boolean; - __isOptimistic(): boolean; - __ignoreEval(): boolean; - __isNodejsScope(): boolean; - isModule(): boolean; - isImpliedStrict(): boolean; - isStrictModeSupported(): boolean; - __get(node: TSESTree.Node): Scope | undefined; - getDeclaredVariables(node: TSESTree.Node): Variable[]; - acquire(node: TSESTree.Node, inner?: boolean): Scope | null; - acquireAll(node: TSESTree.Node): Scope | null; - release(node: TSESTree.Node, inner?: boolean): Scope | null; - attach(): void; - detach(): void; - __nestScope(scope: T): T; - __nestGlobalScope(node: TSESTree.Node): Scope; - __nestBlockScope(node: TSESTree.Node): Scope; - __nestFunctionScope(node: TSESTree.Node, isMethodDefinition: boolean): Scope; - __nestForScope(node: TSESTree.Node): Scope; - __nestCatchScope(node: TSESTree.Node): Scope; - __nestWithScope(node: TSESTree.Node): Scope; - __nestClassScope(node: TSESTree.Node): Scope; - __nestSwitchScope(node: TSESTree.Node): Scope; - __nestModuleScope(node: TSESTree.Node): Scope; - __nestFunctionExpressionNameScope(node: TSESTree.Node): Scope; - __isES6(): boolean; -} -declare const ScopeManager: new (options: ScopeManagerOptions) => ScopeManager; -export { ScopeManager, ScopeManagerOptions }; -//# sourceMappingURL=ScopeManager.d.ts.map +import { EcmaVersion } from '../ts-eslint'; +import { TSESTree } from '../ts-estree'; +import { Scope } from './Scope'; +import { Variable } from './Variable'; +interface ScopeManagerOptions { + directive?: boolean; + optimistic?: boolean; + ignoreEval?: boolean; + nodejsScope?: boolean; + sourceType?: 'module' | 'script'; + impliedStrict?: boolean; + ecmaVersion?: EcmaVersion; +} +interface ScopeManager { + __options: ScopeManagerOptions; + __currentScope: Scope; + __nodeToScope: WeakMap; + __declaredVariables: WeakMap; + scopes: Scope[]; + globalScope: Scope; + __useDirective(): boolean; + __isOptimistic(): boolean; + __ignoreEval(): boolean; + __isNodejsScope(): boolean; + isModule(): boolean; + isImpliedStrict(): boolean; + isStrictModeSupported(): boolean; + __get(node: TSESTree.Node): Scope | undefined; + getDeclaredVariables(node: TSESTree.Node): Variable[]; + acquire(node: TSESTree.Node, inner?: boolean): Scope | null; + acquireAll(node: TSESTree.Node): Scope | null; + release(node: TSESTree.Node, inner?: boolean): Scope | null; + attach(): void; + detach(): void; + __nestScope(scope: T): T; + __nestGlobalScope(node: TSESTree.Node): Scope; + __nestBlockScope(node: TSESTree.Node): Scope; + __nestFunctionScope(node: TSESTree.Node, isMethodDefinition: boolean): Scope; + __nestForScope(node: TSESTree.Node): Scope; + __nestCatchScope(node: TSESTree.Node): Scope; + __nestWithScope(node: TSESTree.Node): Scope; + __nestClassScope(node: TSESTree.Node): Scope; + __nestSwitchScope(node: TSESTree.Node): Scope; + __nestModuleScope(node: TSESTree.Node): Scope; + __nestFunctionExpressionNameScope(node: TSESTree.Node): Scope; + __isES6(): boolean; +} +declare const ScopeManager: new (options: ScopeManagerOptions) => ScopeManager; +export { ScopeManager, ScopeManagerOptions }; +//# sourceMappingURL=ScopeManager.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts index 66754b83..ed5d603a 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts @@ -1,17 +1,17 @@ -import { TSESTree } from '../ts-estree'; -import { Definition } from './Definition'; -import { Reference } from './Reference'; -import { Scope } from './Scope'; -interface Variable { - name: string; - identifiers: TSESTree.Identifier[]; - references: Reference[]; - defs: Definition[]; - eslintUsed?: boolean; - stack?: unknown; - tainted?: boolean; - scope?: Scope; -} -declare const Variable: new () => Variable; -export { Variable }; -//# sourceMappingURL=Variable.d.ts.map +import { TSESTree } from '../ts-estree'; +import { Definition } from './Definition'; +import { Reference } from './Reference'; +import { Scope } from './Scope'; +interface Variable { + name: string; + identifiers: TSESTree.Identifier[]; + references: Reference[]; + defs: Definition[]; + eslintUsed?: boolean; + stack?: unknown; + tainted?: boolean; + scope?: Scope; +} +declare const Variable: new () => Variable; +export { Variable }; +//# sourceMappingURL=Variable.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts index b33f92f3..a954b7dd 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts @@ -1,16 +1,16 @@ -import { EcmaVersion } from '../ts-eslint'; -import { TSESTree } from '../ts-estree'; -import { ScopeManager } from './ScopeManager'; -interface AnalysisOptions { - optimistic?: boolean; - directive?: boolean; - ignoreEval?: boolean; - nodejsScope?: boolean; - impliedStrict?: boolean; - fallback?: string | ((node: TSESTree.Node) => string[]); - sourceType?: 'script' | 'module'; - ecmaVersion?: EcmaVersion; -} -declare const analyze: (ast: TSESTree.Node, options?: AnalysisOptions) => ScopeManager; -export { analyze, AnalysisOptions }; -//# sourceMappingURL=analyze.d.ts.map +import { EcmaVersion } from '../ts-eslint'; +import { TSESTree } from '../ts-estree'; +import { ScopeManager } from './ScopeManager'; +interface AnalysisOptions { + optimistic?: boolean; + directive?: boolean; + ignoreEval?: boolean; + nodejsScope?: boolean; + impliedStrict?: boolean; + fallback?: string | ((node: TSESTree.Node) => string[]); + sourceType?: 'script' | 'module'; + ecmaVersion?: EcmaVersion; +} +declare const analyze: (ast: TSESTree.Node, options?: AnalysisOptions) => ScopeManager; +export { analyze, AnalysisOptions }; +//# sourceMappingURL=analyze.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts index 71b4a991..579b7f8b 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts @@ -1,11 +1,11 @@ -export * from './analyze'; -export * from './Definition'; -export * from './Options'; -export * from './PatternVisitor'; -export * from './Reference'; -export * from './Referencer'; -export * from './Scope'; -export * from './ScopeManager'; -export * from './Variable'; -export declare const version: string; -//# sourceMappingURL=index.d.ts.map +export * from './analyze'; +export * from './Definition'; +export * from './Options'; +export * from './PatternVisitor'; +export * from './Reference'; +export * from './Referencer'; +export * from './Scope'; +export * from './ScopeManager'; +export * from './Variable'; +export declare const version: string; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts index bd351d2e..b79a5ca0 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts @@ -1,9 +1,9 @@ -import { AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; -declare namespace AST { - type TokenType = AST_TOKEN_TYPES; - type Token = TSESTree.Token; - type SourceLocation = TSESTree.SourceLocation; - type Range = TSESTree.Range; -} -export { AST }; -//# sourceMappingURL=AST.d.ts.map +import { AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; +declare namespace AST { + type TokenType = AST_TOKEN_TYPES; + type Token = TSESTree.Token; + type SourceLocation = TSESTree.SourceLocation; + type Range = TSESTree.Range; +} +export { AST }; +//# sourceMappingURL=AST.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts index 2e588531..8441ace0 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts @@ -1,137 +1,137 @@ -import { Linter } from './Linter'; -import { RuleListener, RuleMetaData, RuleModule } from './Rule'; -declare namespace CLIEngine { - interface Options { - allowInlineConfig?: boolean; - baseConfig?: false | { - [name: string]: unknown; - }; - cache?: boolean; - cacheFile?: string; - cacheLocation?: string; - configFile?: string; - cwd?: string; - envs?: string[]; - errorOnUnmatchedPattern?: boolean; - extensions?: string[]; - fix?: boolean; - globals?: string[]; - ignore?: boolean; - ignorePath?: string; - ignorePattern?: string | string[]; - useEslintrc?: boolean; - parser?: string; - parserOptions?: Linter.ParserOptions; - plugins?: string[]; - resolvePluginsRelativeTo?: string; - rules?: { - [name: string]: Linter.RuleLevel | Linter.RuleLevelAndOptions; - }; - rulePaths?: string[]; - reportUnusedDisableDirectives?: boolean; - } - interface LintResult { - filePath: string; - messages: Linter.LintMessage[]; - errorCount: number; - warningCount: number; - fixableErrorCount: number; - fixableWarningCount: number; - output?: string; - source?: string; - } - interface LintReport { - results: LintResult[]; - errorCount: number; - warningCount: number; - fixableErrorCount: number; - fixableWarningCount: number; - usedDeprecatedRules: DeprecatedRuleUse[]; - } - interface DeprecatedRuleUse { - ruleId: string; - replacedBy: string[]; - } - interface LintResultData { - rulesMeta: { - [ruleId: string]: RuleMetaData; - }; - } - type Formatter = (results: LintResult[], data?: LintResultData) => string; -} -/** - * The underlying utility that runs the ESLint command line interface. This object will read the filesystem for - * configuration and file information but will not output any results. Instead, it allows you direct access to the - * important information so you can deal with the output yourself. - * @deprecated use the ESLint class instead - */ -declare const CLIEngine: { - new (options: CLIEngine.Options): { - /** - * Add a plugin by passing its configuration - * @param name Name of the plugin. - * @param pluginObject Plugin configuration object. - */ - addPlugin(name: string, pluginObject: Linter.Plugin): void; - /** - * Executes the current configuration on an array of file and directory names. - * @param patterns An array of file and directory names. - * @returns The results for all files that were linted. - */ - executeOnFiles(patterns: string[]): CLIEngine.LintReport; - /** - * Executes the current configuration on text. - * @param text A string of JavaScript code to lint. - * @param filename An optional string representing the texts filename. - * @param warnIgnored Always warn when a file is ignored - * @returns The results for the linting. - */ - executeOnText(text: string, filename?: string, warnIgnored?: boolean): CLIEngine.LintReport; - /** - * Returns a configuration object for the given file based on the CLI options. - * This is the same logic used by the ESLint CLI executable to determine configuration for each file it processes. - * @param filePath The path of the file to retrieve a config object for. - * @returns A configuration object for the file. - */ - getConfigForFile(filePath: string): Linter.Config; - /** - * Returns the formatter representing the given format. - * @param format The name of the format to load or the path to a custom formatter. - * @returns The formatter function. - */ - getFormatter(format?: string): CLIEngine.Formatter; - /** - * Checks if a given path is ignored by ESLint. - * @param filePath The path of the file to check. - * @returns Whether or not the given path is ignored. - */ - isPathIgnored(filePath: string): boolean; - /** - * Resolves the patterns passed into `executeOnFiles()` into glob-based patterns for easier handling. - * @param patterns The file patterns passed on the command line. - * @returns The equivalent glob patterns. - */ - resolveFileGlobPatterns(patterns: string[]): string[]; - getRules(): Map>; - }; - /** - * Returns results that only contains errors. - * @param results The results to filter. - * @returns The filtered results. - */ - getErrorResults(results: CLIEngine.LintResult[]): CLIEngine.LintResult[]; - /** - * Returns the formatter representing the given format or null if the `format` is not a string. - * @param format The name of the format to load or the path to a custom formatter. - * @returns The formatter function. - */ - getFormatter(format?: string): CLIEngine.Formatter; - /** - * Outputs fixes from the given results to files. - * @param report The report object created by CLIEngine. - */ - outputFixes(report: CLIEngine.LintReport): void; - version: string; -} | undefined; -export { CLIEngine }; -//# sourceMappingURL=CLIEngine.d.ts.map +import { Linter } from './Linter'; +import { RuleListener, RuleMetaData, RuleModule } from './Rule'; +declare namespace CLIEngine { + interface Options { + allowInlineConfig?: boolean; + baseConfig?: false | { + [name: string]: unknown; + }; + cache?: boolean; + cacheFile?: string; + cacheLocation?: string; + configFile?: string; + cwd?: string; + envs?: string[]; + errorOnUnmatchedPattern?: boolean; + extensions?: string[]; + fix?: boolean; + globals?: string[]; + ignore?: boolean; + ignorePath?: string; + ignorePattern?: string | string[]; + useEslintrc?: boolean; + parser?: string; + parserOptions?: Linter.ParserOptions; + plugins?: string[]; + resolvePluginsRelativeTo?: string; + rules?: { + [name: string]: Linter.RuleLevel | Linter.RuleLevelAndOptions; + }; + rulePaths?: string[]; + reportUnusedDisableDirectives?: boolean; + } + interface LintResult { + filePath: string; + messages: Linter.LintMessage[]; + errorCount: number; + warningCount: number; + fixableErrorCount: number; + fixableWarningCount: number; + output?: string; + source?: string; + } + interface LintReport { + results: LintResult[]; + errorCount: number; + warningCount: number; + fixableErrorCount: number; + fixableWarningCount: number; + usedDeprecatedRules: DeprecatedRuleUse[]; + } + interface DeprecatedRuleUse { + ruleId: string; + replacedBy: string[]; + } + interface LintResultData { + rulesMeta: { + [ruleId: string]: RuleMetaData; + }; + } + type Formatter = (results: LintResult[], data?: LintResultData) => string; +} +/** + * The underlying utility that runs the ESLint command line interface. This object will read the filesystem for + * configuration and file information but will not output any results. Instead, it allows you direct access to the + * important information so you can deal with the output yourself. + * @deprecated use the ESLint class instead + */ +declare const CLIEngine: { + new (options: CLIEngine.Options): { + /** + * Add a plugin by passing its configuration + * @param name Name of the plugin. + * @param pluginObject Plugin configuration object. + */ + addPlugin(name: string, pluginObject: Linter.Plugin): void; + /** + * Executes the current configuration on an array of file and directory names. + * @param patterns An array of file and directory names. + * @returns The results for all files that were linted. + */ + executeOnFiles(patterns: string[]): CLIEngine.LintReport; + /** + * Executes the current configuration on text. + * @param text A string of JavaScript code to lint. + * @param filename An optional string representing the texts filename. + * @param warnIgnored Always warn when a file is ignored + * @returns The results for the linting. + */ + executeOnText(text: string, filename?: string, warnIgnored?: boolean): CLIEngine.LintReport; + /** + * Returns a configuration object for the given file based on the CLI options. + * This is the same logic used by the ESLint CLI executable to determine configuration for each file it processes. + * @param filePath The path of the file to retrieve a config object for. + * @returns A configuration object for the file. + */ + getConfigForFile(filePath: string): Linter.Config; + /** + * Returns the formatter representing the given format. + * @param format The name of the format to load or the path to a custom formatter. + * @returns The formatter function. + */ + getFormatter(format?: string): CLIEngine.Formatter; + /** + * Checks if a given path is ignored by ESLint. + * @param filePath The path of the file to check. + * @returns Whether or not the given path is ignored. + */ + isPathIgnored(filePath: string): boolean; + /** + * Resolves the patterns passed into `executeOnFiles()` into glob-based patterns for easier handling. + * @param patterns The file patterns passed on the command line. + * @returns The equivalent glob patterns. + */ + resolveFileGlobPatterns(patterns: string[]): string[]; + getRules(): Map>; + }; + /** + * Returns results that only contains errors. + * @param results The results to filter. + * @returns The filtered results. + */ + getErrorResults(results: CLIEngine.LintResult[]): CLIEngine.LintResult[]; + /** + * Returns the formatter representing the given format or null if the `format` is not a string. + * @param format The name of the format to load or the path to a custom formatter. + * @returns The formatter function. + */ + getFormatter(format?: string): CLIEngine.Formatter; + /** + * Outputs fixes from the given results to files. + * @param report The report object created by CLIEngine. + */ + outputFixes(report: CLIEngine.LintReport): void; + version: string; +} | undefined; +export { CLIEngine }; +//# sourceMappingURL=CLIEngine.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts index 0aa49690..ee8af5c1 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts @@ -1,376 +1,376 @@ -import { Linter } from './Linter'; -declare class ESLintBase { - /** - * Creates a new instance of the main ESLint API. - * @param options The options for this instance. - */ - constructor(options?: ESLint.ESLintOptions); - /** - * This method calculates the configuration for a given file, which can be useful for debugging purposes. - * - It resolves and merges extends and overrides settings into the top level configuration. - * - It resolves the parser setting to absolute paths. - * - It normalizes the plugins setting to align short names. (e.g., eslint-plugin-foo → foo) - * - It adds the processor setting if a legacy file extension processor is matched. - * - It doesn't interpret the env setting to the globals and parserOptions settings, so the result object contains - * the env setting as is. - * @param filePath The path to the file whose configuration you would like to calculate. Directory paths are forbidden - * because ESLint cannot handle the overrides setting. - * @returns The promise that will be fulfilled with a configuration object. - */ - calculateConfigForFile(filePath: string): Promise; - /** - * This method checks if a given file is ignored by your configuration. - * @param filePath The path to the file you want to check. - * @returns The promise that will be fulfilled with whether the file is ignored or not. If the file is ignored, then - * it will return true. - */ - isPathIgnored(filePath: string): Promise; - /** - * This method lints the files that match the glob patterns and then returns the results. - * @param patterns The lint target files. This can contain any of file paths, directory paths, and glob patterns. - * @returns The promise that will be fulfilled with an array of LintResult objects. - */ - lintFiles(patterns: string | string[]): Promise; - /** - * This method lints the given source code text and then returns the results. - * - * By default, this method uses the configuration that applies to files in the current working directory (the cwd - * constructor option). If you want to use a different configuration, pass options.filePath, and ESLint will load the - * same configuration that eslint.lintFiles() would use for a file at options.filePath. - * - * If the options.filePath value is configured to be ignored, this method returns an empty array. If the - * options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object. - * In that case, the result may contain a warning that indicates the file was ignored. - * @param code The source code text to check. - * @param options The options. - * @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there - * being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles() - * method similar. - */ - lintText(code: string, options?: ESLint.LintTextOptions): Promise; - /** - * This method loads a formatter. Formatters convert lint results to a human- or machine-readable string. - * @param name TThe path to the file you want to check. - * The following values are allowed: - * - undefined. In this case, loads the "stylish" built-in formatter. - * - A name of built-in formatters. - * - A name of third-party formatters. For examples: - * -- `foo` will load eslint-formatter-foo. - * -- `@foo` will load `@foo/eslint-formatter`. - * -- `@foo/bar` will load `@foo/eslint-formatter-bar`. - * - A path to the file that defines a formatter. The path must contain one or more path separators (/) in order to distinguish if it's a path or not. For example, start with ./. - * @returns The promise that will be fulfilled with a Formatter object. - */ - loadFormatter(name?: string): Promise; - /** - * This method copies the given results and removes warnings. The returned value contains only errors. - * @param results The LintResult objects to filter. - * @returns The filtered LintResult objects. - */ - static getErrorResults(results: ESLint.LintResult): ESLint.LintResult; - /** - * This method writes code modified by ESLint's autofix feature into its respective file. If any of the modified - * files don't exist, this method does nothing. - * @param results The LintResult objects to write. - * @returns The promise that will be fulfilled after all files are written. - */ - static outputFixes(results: ESLint.LintResult): Promise; - /** - * The version text. - */ - static readonly version: string; -} -declare namespace ESLint { - interface ESLintOptions { - /** - * If false is present, ESLint suppresses directive comments in source code. - * If this option is false, it overrides the noInlineConfig setting in your configurations. - */ - allowInlineConfig?: boolean; - /** - * Configuration object, extended by all configurations used with this instance. - * You can use this option to define the default settings that will be used if your configuration files don't - * configure it. - */ - baseConfig?: Linter.Config | null; - /** - * If true is present, the eslint.lintFiles() method caches lint results and uses it if each target file is not - * changed. Please mind that ESLint doesn't clear the cache when you upgrade ESLint plugins. In that case, you have - * to remove the cache file manually. The eslint.lintText() method doesn't use caches even if you pass the - * options.filePath to the method. - */ - cache?: boolean; - /** - * The eslint.lintFiles() method writes caches into this file. - */ - cacheLocation?: string; - /** - * The working directory. This must be an absolute path. - */ - cwd?: string; - /** - * Unless set to false, the eslint.lintFiles() method will throw an error when no target files are found. - */ - errorOnUnmatchedPattern?: boolean; - /** - * If you pass directory paths to the eslint.lintFiles() method, ESLint checks the files in those directories that - * have the given extensions. For example, when passing the src/ directory and extensions is [".js", ".ts"], ESLint - * will lint *.js and *.ts files in src/. If extensions is null, ESLint checks *.js files and files that match - * overrides[].files patterns in your configuration. - * Note: This option only applies when you pass directory paths to the eslint.lintFiles() method. - * If you pass glob patterns, ESLint will lint all files matching the glob pattern regardless of extension. - */ - extensions?: string[] | null; - /** - * If true is present, the eslint.lintFiles() and eslint.lintText() methods work in autofix mode. - * If a predicate function is present, the methods pass each lint message to the function, then use only the - * lint messages for which the function returned true. - */ - fix?: boolean | ((message: ESLint.LintMessage) => boolean); - /** - * The types of the rules that the eslint.lintFiles() and eslint.lintText() methods use for autofix. - */ - fixTypes?: ('directive' | 'problem' | 'suggestion' | 'layout')[] | null; - /** - * If false is present, the eslint.lintFiles() method doesn't interpret glob patterns. - */ - globInputPaths?: boolean; - /** - * If false is present, the eslint.lintFiles() method doesn't respect `.eslintignore` files or ignorePatterns in - * your configuration. - */ - ignore?: boolean; - /** - * The path to a file ESLint uses instead of `$CWD/.eslintignore`. - * If a path is present and the file doesn't exist, this constructor will throw an error. - */ - ignorePath?: string; - /** - * Configuration object, overrides all configurations used with this instance. - * You can use this option to define the settings that will be used even if your configuration files configure it. - */ - overrideConfig?: Linter.ConfigOverride | null; - /** - * The path to a configuration file, overrides all configurations used with this instance. - * The options.overrideConfig option is applied after this option is applied. - */ - overrideConfigFile?: string | null; - /** - * The plugin implementations that ESLint uses for the plugins setting of your configuration. - * This is a map-like object. Those keys are plugin IDs and each value is implementation. - */ - plugins?: Record | null; - /** - * The severity to report unused eslint-disable directives. - * If this option is a severity, it overrides the reportUnusedDisableDirectives setting in your configurations. - */ - reportUnusedDisableDirectives?: Linter.SeverityString | null; - /** - * The path to a directory where plugins should be resolved from. - * If null is present, ESLint loads plugins from the location of the configuration file that contains the plugin - * setting. - * If a path is present, ESLint loads all plugins from there. - */ - resolvePluginsRelativeTo?: string | null; - /** - * An array of paths to directories to load custom rules from. - */ - rulePaths?: string[]; - /** - * If false is present, ESLint doesn't load configuration files (.eslintrc.* files). - * Only the configuration of the constructor options is valid. - */ - useEslintrc?: boolean; - } - interface DeprecatedRuleInfo { - /** - * The rule ID. - */ - ruleId: string; - /** - * The rule IDs that replace this deprecated rule. - */ - replacedBy: string[]; - } - /** - * The LintResult value is the information of the linting result of each file. - */ - interface LintResult { - /** - * The number of errors. This includes fixable errors. - */ - errorCount: number; - /** - * The number of fatal errors. - * @since 7.32.0 - */ - fatalErrorCount?: number; - /** - * The absolute path to the file of this result. This is the string "" if the file path is unknown (when you - * didn't pass the options.filePath option to the eslint.lintText() method). - */ - filePath: string; - /** - * The number of errors that can be fixed automatically by the fix constructor option. - */ - fixableErrorCount: number; - /** - * The number of warnings that can be fixed automatically by the fix constructor option. - */ - fixableWarningCount: number; - /** - * The array of LintMessage objects. - */ - messages: ESLint.LintMessage[]; - /** - * The source code of the file that was linted, with as many fixes applied as possible. - */ - output?: string; - /** - * The original source code text. This property is undefined if any messages didn't exist or the output - * property exists. - */ - source?: string; - /** - * The array of SuppressedLintMessage objects. - * - * @since 8.8.0 - */ - suppressedMessages?: SuppressedLintMessage[]; - /** - * The information about the deprecated rules that were used to check this file. - */ - usedDeprecatedRules: DeprecatedRuleInfo[]; - /** - * The number of warnings. This includes fixable warnings. - */ - warningCount: number; - } - interface LintTextOptions { - /** - * The path to the file of the source code text. If omitted, the result.filePath becomes the string "". - */ - filePath?: string; - /** - * If true is present and the options.filePath is a file ESLint should ignore, this method returns a lint result - * contains a warning message. - */ - warnIgnored?: boolean; - } - /** - * The LintMessage value is the information of each linting error. - */ - interface LintMessage { - /** - * The 1-based column number of the begin point of this message. - */ - column: number | undefined; - /** - * The 1-based column number of the end point of this message. This property is undefined if this message - * is not a range. - */ - endColumn: number | undefined; - /** - * The 1-based line number of the end point of this message. This property is undefined if this - * message is not a range. - */ - endLine: number | undefined; - /** - * `true` if this is a fatal error unrelated to a rule, like a parsing error. - * @since 7.24.0 - */ - fatal?: boolean | undefined; - /** - * The EditInfo object of autofix. This property is undefined if this message is not fixable. - */ - fix: EditInfo | undefined; - /** - * The 1-based line number of the begin point of this message. - */ - line: number | undefined; - /** - * The error message - */ - message: string; - /** - * The rule name that generates this lint message. If this message is generated by the ESLint core rather than - * rules, this is null. - */ - ruleId: string | null; - /** - * The severity of this message. 1 means warning and 2 means error. - */ - severity: 1 | 2; - /** - * The list of suggestions. Each suggestion is the pair of a description and an EditInfo object to fix code. API - * users such as editor integrations can choose one of them to fix the problem of this message. This property is - * undefined if this message doesn't have any suggestions. - */ - suggestions: { - desc: string; - fix: EditInfo; - }[] | undefined; - } - /** - * The SuppressedLintMessage value is the information of each suppressed linting error. - */ - interface SuppressedLintMessage extends ESLint.LintMessage { - /** - * The list of suppressions. - */ - suppressions?: { - /** - * Right now, this is always `directive` - */ - kind: string; - /** - * The free text description added after the `--` in the comment - */ - justification: string; - }[]; - } - /** - * The EditInfo value is information to edit text. - * - * This edit information means replacing the range of the range property by the text property value. It's like - * sourceCodeText.slice(0, edit.range[0]) + edit.text + sourceCodeText.slice(edit.range[1]). Therefore, it's an add - * if the range[0] and range[1] property values are the same value, and it's removal if the text property value is - * empty string. - */ - interface EditInfo { - /** - * The pair of 0-based indices in source code text to remove. - */ - range: [ - number, - number - ]; - /** - * The text to add. - */ - text: string; - } - /** - * The Formatter value is the object to convert the LintResult objects to text. - */ - interface Formatter { - /** - * The method to convert the LintResult objects to text. - * Promise return supported since 8.4.0 - */ - format(results: LintResult[]): string | Promise; - } -} -declare const _ESLint: typeof ESLintBase; -/** - * The ESLint class is the primary class to use in Node.js applications. - * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. - * - * If you want to lint code on browsers, use the Linter class instead. - * - * @since 7.0.0 - */ -declare class ESLint extends _ESLint { -} -export { ESLint }; -//# sourceMappingURL=ESLint.d.ts.map +import { Linter } from './Linter'; +declare class ESLintBase { + /** + * Creates a new instance of the main ESLint API. + * @param options The options for this instance. + */ + constructor(options?: ESLint.ESLintOptions); + /** + * This method calculates the configuration for a given file, which can be useful for debugging purposes. + * - It resolves and merges extends and overrides settings into the top level configuration. + * - It resolves the parser setting to absolute paths. + * - It normalizes the plugins setting to align short names. (e.g., eslint-plugin-foo → foo) + * - It adds the processor setting if a legacy file extension processor is matched. + * - It doesn't interpret the env setting to the globals and parserOptions settings, so the result object contains + * the env setting as is. + * @param filePath The path to the file whose configuration you would like to calculate. Directory paths are forbidden + * because ESLint cannot handle the overrides setting. + * @returns The promise that will be fulfilled with a configuration object. + */ + calculateConfigForFile(filePath: string): Promise; + /** + * This method checks if a given file is ignored by your configuration. + * @param filePath The path to the file you want to check. + * @returns The promise that will be fulfilled with whether the file is ignored or not. If the file is ignored, then + * it will return true. + */ + isPathIgnored(filePath: string): Promise; + /** + * This method lints the files that match the glob patterns and then returns the results. + * @param patterns The lint target files. This can contain any of file paths, directory paths, and glob patterns. + * @returns The promise that will be fulfilled with an array of LintResult objects. + */ + lintFiles(patterns: string | string[]): Promise; + /** + * This method lints the given source code text and then returns the results. + * + * By default, this method uses the configuration that applies to files in the current working directory (the cwd + * constructor option). If you want to use a different configuration, pass options.filePath, and ESLint will load the + * same configuration that eslint.lintFiles() would use for a file at options.filePath. + * + * If the options.filePath value is configured to be ignored, this method returns an empty array. If the + * options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object. + * In that case, the result may contain a warning that indicates the file was ignored. + * @param code The source code text to check. + * @param options The options. + * @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there + * being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles() + * method similar. + */ + lintText(code: string, options?: ESLint.LintTextOptions): Promise; + /** + * This method loads a formatter. Formatters convert lint results to a human- or machine-readable string. + * @param name TThe path to the file you want to check. + * The following values are allowed: + * - undefined. In this case, loads the "stylish" built-in formatter. + * - A name of built-in formatters. + * - A name of third-party formatters. For examples: + * -- `foo` will load eslint-formatter-foo. + * -- `@foo` will load `@foo/eslint-formatter`. + * -- `@foo/bar` will load `@foo/eslint-formatter-bar`. + * - A path to the file that defines a formatter. The path must contain one or more path separators (/) in order to distinguish if it's a path or not. For example, start with ./. + * @returns The promise that will be fulfilled with a Formatter object. + */ + loadFormatter(name?: string): Promise; + /** + * This method copies the given results and removes warnings. The returned value contains only errors. + * @param results The LintResult objects to filter. + * @returns The filtered LintResult objects. + */ + static getErrorResults(results: ESLint.LintResult): ESLint.LintResult; + /** + * This method writes code modified by ESLint's autofix feature into its respective file. If any of the modified + * files don't exist, this method does nothing. + * @param results The LintResult objects to write. + * @returns The promise that will be fulfilled after all files are written. + */ + static outputFixes(results: ESLint.LintResult): Promise; + /** + * The version text. + */ + static readonly version: string; +} +declare namespace ESLint { + interface ESLintOptions { + /** + * If false is present, ESLint suppresses directive comments in source code. + * If this option is false, it overrides the noInlineConfig setting in your configurations. + */ + allowInlineConfig?: boolean; + /** + * Configuration object, extended by all configurations used with this instance. + * You can use this option to define the default settings that will be used if your configuration files don't + * configure it. + */ + baseConfig?: Linter.Config | null; + /** + * If true is present, the eslint.lintFiles() method caches lint results and uses it if each target file is not + * changed. Please mind that ESLint doesn't clear the cache when you upgrade ESLint plugins. In that case, you have + * to remove the cache file manually. The eslint.lintText() method doesn't use caches even if you pass the + * options.filePath to the method. + */ + cache?: boolean; + /** + * The eslint.lintFiles() method writes caches into this file. + */ + cacheLocation?: string; + /** + * The working directory. This must be an absolute path. + */ + cwd?: string; + /** + * Unless set to false, the eslint.lintFiles() method will throw an error when no target files are found. + */ + errorOnUnmatchedPattern?: boolean; + /** + * If you pass directory paths to the eslint.lintFiles() method, ESLint checks the files in those directories that + * have the given extensions. For example, when passing the src/ directory and extensions is [".js", ".ts"], ESLint + * will lint *.js and *.ts files in src/. If extensions is null, ESLint checks *.js files and files that match + * overrides[].files patterns in your configuration. + * Note: This option only applies when you pass directory paths to the eslint.lintFiles() method. + * If you pass glob patterns, ESLint will lint all files matching the glob pattern regardless of extension. + */ + extensions?: string[] | null; + /** + * If true is present, the eslint.lintFiles() and eslint.lintText() methods work in autofix mode. + * If a predicate function is present, the methods pass each lint message to the function, then use only the + * lint messages for which the function returned true. + */ + fix?: boolean | ((message: ESLint.LintMessage) => boolean); + /** + * The types of the rules that the eslint.lintFiles() and eslint.lintText() methods use for autofix. + */ + fixTypes?: ('directive' | 'problem' | 'suggestion' | 'layout')[] | null; + /** + * If false is present, the eslint.lintFiles() method doesn't interpret glob patterns. + */ + globInputPaths?: boolean; + /** + * If false is present, the eslint.lintFiles() method doesn't respect `.eslintignore` files or ignorePatterns in + * your configuration. + */ + ignore?: boolean; + /** + * The path to a file ESLint uses instead of `$CWD/.eslintignore`. + * If a path is present and the file doesn't exist, this constructor will throw an error. + */ + ignorePath?: string; + /** + * Configuration object, overrides all configurations used with this instance. + * You can use this option to define the settings that will be used even if your configuration files configure it. + */ + overrideConfig?: Linter.ConfigOverride | null; + /** + * The path to a configuration file, overrides all configurations used with this instance. + * The options.overrideConfig option is applied after this option is applied. + */ + overrideConfigFile?: string | null; + /** + * The plugin implementations that ESLint uses for the plugins setting of your configuration. + * This is a map-like object. Those keys are plugin IDs and each value is implementation. + */ + plugins?: Record | null; + /** + * The severity to report unused eslint-disable directives. + * If this option is a severity, it overrides the reportUnusedDisableDirectives setting in your configurations. + */ + reportUnusedDisableDirectives?: Linter.SeverityString | null; + /** + * The path to a directory where plugins should be resolved from. + * If null is present, ESLint loads plugins from the location of the configuration file that contains the plugin + * setting. + * If a path is present, ESLint loads all plugins from there. + */ + resolvePluginsRelativeTo?: string | null; + /** + * An array of paths to directories to load custom rules from. + */ + rulePaths?: string[]; + /** + * If false is present, ESLint doesn't load configuration files (.eslintrc.* files). + * Only the configuration of the constructor options is valid. + */ + useEslintrc?: boolean; + } + interface DeprecatedRuleInfo { + /** + * The rule ID. + */ + ruleId: string; + /** + * The rule IDs that replace this deprecated rule. + */ + replacedBy: string[]; + } + /** + * The LintResult value is the information of the linting result of each file. + */ + interface LintResult { + /** + * The number of errors. This includes fixable errors. + */ + errorCount: number; + /** + * The number of fatal errors. + * @since 7.32.0 + */ + fatalErrorCount?: number; + /** + * The absolute path to the file of this result. This is the string "" if the file path is unknown (when you + * didn't pass the options.filePath option to the eslint.lintText() method). + */ + filePath: string; + /** + * The number of errors that can be fixed automatically by the fix constructor option. + */ + fixableErrorCount: number; + /** + * The number of warnings that can be fixed automatically by the fix constructor option. + */ + fixableWarningCount: number; + /** + * The array of LintMessage objects. + */ + messages: ESLint.LintMessage[]; + /** + * The source code of the file that was linted, with as many fixes applied as possible. + */ + output?: string; + /** + * The original source code text. This property is undefined if any messages didn't exist or the output + * property exists. + */ + source?: string; + /** + * The array of SuppressedLintMessage objects. + * + * @since 8.8.0 + */ + suppressedMessages?: SuppressedLintMessage[]; + /** + * The information about the deprecated rules that were used to check this file. + */ + usedDeprecatedRules: DeprecatedRuleInfo[]; + /** + * The number of warnings. This includes fixable warnings. + */ + warningCount: number; + } + interface LintTextOptions { + /** + * The path to the file of the source code text. If omitted, the result.filePath becomes the string "". + */ + filePath?: string; + /** + * If true is present and the options.filePath is a file ESLint should ignore, this method returns a lint result + * contains a warning message. + */ + warnIgnored?: boolean; + } + /** + * The LintMessage value is the information of each linting error. + */ + interface LintMessage { + /** + * The 1-based column number of the begin point of this message. + */ + column: number | undefined; + /** + * The 1-based column number of the end point of this message. This property is undefined if this message + * is not a range. + */ + endColumn: number | undefined; + /** + * The 1-based line number of the end point of this message. This property is undefined if this + * message is not a range. + */ + endLine: number | undefined; + /** + * `true` if this is a fatal error unrelated to a rule, like a parsing error. + * @since 7.24.0 + */ + fatal?: boolean | undefined; + /** + * The EditInfo object of autofix. This property is undefined if this message is not fixable. + */ + fix: EditInfo | undefined; + /** + * The 1-based line number of the begin point of this message. + */ + line: number | undefined; + /** + * The error message + */ + message: string; + /** + * The rule name that generates this lint message. If this message is generated by the ESLint core rather than + * rules, this is null. + */ + ruleId: string | null; + /** + * The severity of this message. 1 means warning and 2 means error. + */ + severity: 1 | 2; + /** + * The list of suggestions. Each suggestion is the pair of a description and an EditInfo object to fix code. API + * users such as editor integrations can choose one of them to fix the problem of this message. This property is + * undefined if this message doesn't have any suggestions. + */ + suggestions: { + desc: string; + fix: EditInfo; + }[] | undefined; + } + /** + * The SuppressedLintMessage value is the information of each suppressed linting error. + */ + interface SuppressedLintMessage extends ESLint.LintMessage { + /** + * The list of suppressions. + */ + suppressions?: { + /** + * Right now, this is always `directive` + */ + kind: string; + /** + * The free text description added after the `--` in the comment + */ + justification: string; + }[]; + } + /** + * The EditInfo value is information to edit text. + * + * This edit information means replacing the range of the range property by the text property value. It's like + * sourceCodeText.slice(0, edit.range[0]) + edit.text + sourceCodeText.slice(edit.range[1]). Therefore, it's an add + * if the range[0] and range[1] property values are the same value, and it's removal if the text property value is + * empty string. + */ + interface EditInfo { + /** + * The pair of 0-based indices in source code text to remove. + */ + range: [ + number, + number + ]; + /** + * The text to add. + */ + text: string; + } + /** + * The Formatter value is the object to convert the LintResult objects to text. + */ + interface Formatter { + /** + * The method to convert the LintResult objects to text. + * Promise return supported since 8.4.0 + */ + format(results: LintResult[]): string | Promise; + } +} +declare const _ESLint: typeof ESLintBase; +/** + * The ESLint class is the primary class to use in Node.js applications. + * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. + * + * If you want to lint code on browsers, use the Linter class instead. + * + * @since 7.0.0 + */ +declare class ESLint extends _ESLint { +} +export { ESLint }; +//# sourceMappingURL=ESLint.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts index 6d9e3424..52723af9 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts @@ -1,326 +1,326 @@ -import { ParserServices, TSESTree } from '../ts-estree'; -import { ParserOptions as TSParserOptions } from './ParserOptions'; -import { RuleCreateFunction, RuleFix, RuleModule, SharedConfigurationSettings } from './Rule'; -import { Scope } from './Scope'; -import { SourceCode } from './SourceCode'; -declare class LinterBase { - /** - * Initialize the Linter. - * @param config the config object - */ - constructor(config?: Linter.LinterOptions); - /** - * Define a new parser module - * @param parserId Name of the parser - * @param parserModule The parser object - */ - defineParser(parserId: string, parserModule: Linter.ParserModule): void; - /** - * Defines a new linting rule. - * @param ruleId A unique rule identifier - * @param ruleModule Function from context to object mapping AST node types to event handlers - */ - defineRule(ruleId: string, ruleModule: RuleModule | RuleCreateFunction): void; - /** - * Defines many new linting rules. - * @param rulesToDefine map from unique rule identifier to rule - */ - defineRules(rulesToDefine: Record | RuleCreateFunction>): void; - /** - * Gets an object with all loaded rules. - * @returns All loaded rules - */ - getRules(): Map>; - /** - * Gets the `SourceCode` object representing the parsed source. - * @returns The `SourceCode` object. - */ - getSourceCode(): SourceCode; - /** - * Verifies the text against the rules specified by the second argument. - * @param textOrSourceCode The text to parse or a SourceCode object. - * @param config An ESLintConfig instance to configure everything. - * @param filenameOrOptions The optional filename of the file being checked. - * If this is not set, the filename will default to '' in the rule context. - * If this is an object, then it has "filename", "allowInlineConfig", and some properties. - * @returns The results as an array of messages or an empty array if no messages. - */ - verify(textOrSourceCode: SourceCode | string, config: Linter.Config, filenameOrOptions?: string | Linter.VerifyOptions): Linter.LintMessage[]; - /** - * Performs multiple autofix passes over the text until as many fixes as possible have been applied. - * @param code The source text to apply fixes to. - * @param config The ESLint config object to use. - * @param options The ESLint options object to use. - * @returns The result of the fix operation as returned from the SourceCodeFixer. - */ - verifyAndFix(code: string, config: Linter.Config, options: Linter.FixOptions): Linter.FixReport; - /** - * The version from package.json. - */ - readonly version: string; - /** - * The version from package.json. - */ - static readonly version: string; -} -declare namespace Linter { - export interface LinterOptions { - /** - * path to a directory that should be considered as the current working directory. - */ - cwd?: string; - } - export type Severity = 0 | 1 | 2; - export type SeverityString = 'off' | 'warn' | 'error'; - export type RuleLevel = Severity | SeverityString; - export type RuleLevelAndOptions = [ - RuleLevel, - ...unknown[] - ]; - export type RuleEntry = RuleLevel | RuleLevelAndOptions; - export type RulesRecord = Partial>; - export type GlobalVariableOption = 'readonly' | 'writable' | 'off' | boolean; - interface BaseConfig { - $schema?: string; - /** - * The environment settings. - */ - env?: { - [name: string]: boolean; - }; - /** - * The path to other config files or the package name of shareable configs. - */ - extends?: string | string[]; - /** - * The global variable settings. - */ - globals?: { - [name: string]: GlobalVariableOption; - }; - /** - * The flag that disables directive comments. - */ - noInlineConfig?: boolean; - /** - * The override settings per kind of files. - */ - overrides?: ConfigOverride[]; - /** - * The path to a parser or the package name of a parser. - */ - parser?: string; - /** - * The parser options. - */ - parserOptions?: ParserOptions; - /** - * The plugin specifiers. - */ - plugins?: string[]; - /** - * The processor specifier. - */ - processor?: string; - /** - * The flag to report unused `eslint-disable` comments. - */ - reportUnusedDisableDirectives?: boolean; - /** - * The rule settings. - */ - rules?: RulesRecord; - /** - * The shared settings. - */ - settings?: SharedConfigurationSettings; - } - export interface ConfigOverride extends BaseConfig { - excludedFiles?: string | string[]; - files: string | string[]; - } - export interface Config extends BaseConfig { - /** - * The glob patterns that ignore to lint. - */ - ignorePatterns?: string | string[]; - /** - * The root flag. - */ - root?: boolean; - } - export type ParserOptions = TSParserOptions; - export interface VerifyOptions { - /** - * Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied. - * Useful if you want to validate JS without comments overriding rules. - */ - allowInlineConfig?: boolean; - /** - * if `true` then the linter doesn't make `fix` properties into the lint result. - */ - disableFixes?: boolean; - /** - * the filename of the source code. - */ - filename?: string; - /** - * the predicate function that selects adopt code blocks. - */ - filterCodeBlock?: (filename: string, text: string) => boolean; - /** - * postprocessor for report messages. - * If provided, this should accept an array of the message lists - * for each code block returned from the preprocessor, apply a mapping to - * the messages as appropriate, and return a one-dimensional array of - * messages. - */ - postprocess?: Processor['postprocess']; - /** - * preprocessor for source text. - * If provided, this should accept a string of source text, and return an array of code blocks to lint. - */ - preprocess?: Processor['preprocess']; - /** - * Adds reported errors for unused `eslint-disable` directives. - */ - reportUnusedDisableDirectives?: boolean | SeverityString; - } - export interface FixOptions extends VerifyOptions { - /** - * Determines whether fixes should be applied. - */ - fix?: boolean; - } - export interface LintSuggestion { - desc: string; - fix: RuleFix; - messageId?: string; - } - export interface LintMessage { - /** - * The 1-based column number. - */ - column: number; - /** - * The 1-based column number of the end location. - */ - endColumn?: number; - /** - * The 1-based line number of the end location. - */ - endLine?: number; - /** - * If `true` then this is a fatal error. - */ - fatal?: true; - /** - * Information for autofix. - */ - fix?: RuleFix; - /** - * The 1-based line number. - */ - line: number; - /** - * The error message. - */ - message: string; - messageId?: string; - nodeType: string; - /** - * The ID of the rule which makes this message. - */ - ruleId: string | null; - /** - * The severity of this message. - */ - severity: Severity; - source: string | null; - /** - * Information for suggestions - */ - suggestions?: LintSuggestion[]; - } - export interface FixReport { - /** - * True, if the code was fixed - */ - fixed: boolean; - /** - * Fixed code text (might be the same as input if no fixes were applied). - */ - output: string; - /** - * Collection of all messages for the given code - */ - messages: LintMessage[]; - } - export type ParserModule = { - parse(text: string, options?: ParserOptions): TSESTree.Program; - } | { - parseForESLint(text: string, options?: ParserOptions): ESLintParseResult; - }; - export interface ESLintParseResult { - ast: TSESTree.Program; - services?: ParserServices; - scopeManager?: Scope.ScopeManager; - visitorKeys?: SourceCode.VisitorKeys; - } - export interface Processor { - /** - * The function to extract code blocks. - */ - preprocess?: (text: string, filename: string) => Array; - /** - * The function to merge messages. - */ - postprocess?: (messagesList: Linter.LintMessage[][], filename: string) => Linter.LintMessage[]; - /** - * If `true` then it means the processor supports autofix. - */ - supportsAutofix?: boolean; - } - export interface Environment { - /** - * The definition of global variables. - */ - globals?: Record; - /** - * The parser options that will be enabled under this environment. - */ - parserOptions?: ParserOptions; - } - export interface Plugin { - /** - * The definition of plugin configs. - */ - configs?: Record; - /** - * The definition of plugin environments. - */ - environments?: Record; - /** - * The definition of plugin processors. - */ - processors?: Record; - /** - * The definition of plugin rules. - */ - rules?: Record>; - } - export {}; -} -declare const Linter_base: typeof LinterBase; -/** - * The Linter object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it - * simply parses and reports on the code. In particular, the Linter object does not process configuration objects - * or files. - */ -declare class Linter extends Linter_base { -} -export { Linter }; -//# sourceMappingURL=Linter.d.ts.map +import { ParserServices, TSESTree } from '../ts-estree'; +import { ParserOptions as TSParserOptions } from './ParserOptions'; +import { RuleCreateFunction, RuleFix, RuleModule, SharedConfigurationSettings } from './Rule'; +import { Scope } from './Scope'; +import { SourceCode } from './SourceCode'; +declare class LinterBase { + /** + * Initialize the Linter. + * @param config the config object + */ + constructor(config?: Linter.LinterOptions); + /** + * Define a new parser module + * @param parserId Name of the parser + * @param parserModule The parser object + */ + defineParser(parserId: string, parserModule: Linter.ParserModule): void; + /** + * Defines a new linting rule. + * @param ruleId A unique rule identifier + * @param ruleModule Function from context to object mapping AST node types to event handlers + */ + defineRule(ruleId: string, ruleModule: RuleModule | RuleCreateFunction): void; + /** + * Defines many new linting rules. + * @param rulesToDefine map from unique rule identifier to rule + */ + defineRules(rulesToDefine: Record | RuleCreateFunction>): void; + /** + * Gets an object with all loaded rules. + * @returns All loaded rules + */ + getRules(): Map>; + /** + * Gets the `SourceCode` object representing the parsed source. + * @returns The `SourceCode` object. + */ + getSourceCode(): SourceCode; + /** + * Verifies the text against the rules specified by the second argument. + * @param textOrSourceCode The text to parse or a SourceCode object. + * @param config An ESLintConfig instance to configure everything. + * @param filenameOrOptions The optional filename of the file being checked. + * If this is not set, the filename will default to '' in the rule context. + * If this is an object, then it has "filename", "allowInlineConfig", and some properties. + * @returns The results as an array of messages or an empty array if no messages. + */ + verify(textOrSourceCode: SourceCode | string, config: Linter.Config, filenameOrOptions?: string | Linter.VerifyOptions): Linter.LintMessage[]; + /** + * Performs multiple autofix passes over the text until as many fixes as possible have been applied. + * @param code The source text to apply fixes to. + * @param config The ESLint config object to use. + * @param options The ESLint options object to use. + * @returns The result of the fix operation as returned from the SourceCodeFixer. + */ + verifyAndFix(code: string, config: Linter.Config, options: Linter.FixOptions): Linter.FixReport; + /** + * The version from package.json. + */ + readonly version: string; + /** + * The version from package.json. + */ + static readonly version: string; +} +declare namespace Linter { + export interface LinterOptions { + /** + * path to a directory that should be considered as the current working directory. + */ + cwd?: string; + } + export type Severity = 0 | 1 | 2; + export type SeverityString = 'off' | 'warn' | 'error'; + export type RuleLevel = Severity | SeverityString; + export type RuleLevelAndOptions = [ + RuleLevel, + ...unknown[] + ]; + export type RuleEntry = RuleLevel | RuleLevelAndOptions; + export type RulesRecord = Partial>; + export type GlobalVariableOption = 'readonly' | 'writable' | 'off' | boolean; + interface BaseConfig { + $schema?: string; + /** + * The environment settings. + */ + env?: { + [name: string]: boolean; + }; + /** + * The path to other config files or the package name of shareable configs. + */ + extends?: string | string[]; + /** + * The global variable settings. + */ + globals?: { + [name: string]: GlobalVariableOption; + }; + /** + * The flag that disables directive comments. + */ + noInlineConfig?: boolean; + /** + * The override settings per kind of files. + */ + overrides?: ConfigOverride[]; + /** + * The path to a parser or the package name of a parser. + */ + parser?: string; + /** + * The parser options. + */ + parserOptions?: ParserOptions; + /** + * The plugin specifiers. + */ + plugins?: string[]; + /** + * The processor specifier. + */ + processor?: string; + /** + * The flag to report unused `eslint-disable` comments. + */ + reportUnusedDisableDirectives?: boolean; + /** + * The rule settings. + */ + rules?: RulesRecord; + /** + * The shared settings. + */ + settings?: SharedConfigurationSettings; + } + export interface ConfigOverride extends BaseConfig { + excludedFiles?: string | string[]; + files: string | string[]; + } + export interface Config extends BaseConfig { + /** + * The glob patterns that ignore to lint. + */ + ignorePatterns?: string | string[]; + /** + * The root flag. + */ + root?: boolean; + } + export type ParserOptions = TSParserOptions; + export interface VerifyOptions { + /** + * Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied. + * Useful if you want to validate JS without comments overriding rules. + */ + allowInlineConfig?: boolean; + /** + * if `true` then the linter doesn't make `fix` properties into the lint result. + */ + disableFixes?: boolean; + /** + * the filename of the source code. + */ + filename?: string; + /** + * the predicate function that selects adopt code blocks. + */ + filterCodeBlock?: (filename: string, text: string) => boolean; + /** + * postprocessor for report messages. + * If provided, this should accept an array of the message lists + * for each code block returned from the preprocessor, apply a mapping to + * the messages as appropriate, and return a one-dimensional array of + * messages. + */ + postprocess?: Processor['postprocess']; + /** + * preprocessor for source text. + * If provided, this should accept a string of source text, and return an array of code blocks to lint. + */ + preprocess?: Processor['preprocess']; + /** + * Adds reported errors for unused `eslint-disable` directives. + */ + reportUnusedDisableDirectives?: boolean | SeverityString; + } + export interface FixOptions extends VerifyOptions { + /** + * Determines whether fixes should be applied. + */ + fix?: boolean; + } + export interface LintSuggestion { + desc: string; + fix: RuleFix; + messageId?: string; + } + export interface LintMessage { + /** + * The 1-based column number. + */ + column: number; + /** + * The 1-based column number of the end location. + */ + endColumn?: number; + /** + * The 1-based line number of the end location. + */ + endLine?: number; + /** + * If `true` then this is a fatal error. + */ + fatal?: true; + /** + * Information for autofix. + */ + fix?: RuleFix; + /** + * The 1-based line number. + */ + line: number; + /** + * The error message. + */ + message: string; + messageId?: string; + nodeType: string; + /** + * The ID of the rule which makes this message. + */ + ruleId: string | null; + /** + * The severity of this message. + */ + severity: Severity; + source: string | null; + /** + * Information for suggestions + */ + suggestions?: LintSuggestion[]; + } + export interface FixReport { + /** + * True, if the code was fixed + */ + fixed: boolean; + /** + * Fixed code text (might be the same as input if no fixes were applied). + */ + output: string; + /** + * Collection of all messages for the given code + */ + messages: LintMessage[]; + } + export type ParserModule = { + parse(text: string, options?: ParserOptions): TSESTree.Program; + } | { + parseForESLint(text: string, options?: ParserOptions): ESLintParseResult; + }; + export interface ESLintParseResult { + ast: TSESTree.Program; + services?: ParserServices; + scopeManager?: Scope.ScopeManager; + visitorKeys?: SourceCode.VisitorKeys; + } + export interface Processor { + /** + * The function to extract code blocks. + */ + preprocess?: (text: string, filename: string) => Array; + /** + * The function to merge messages. + */ + postprocess?: (messagesList: Linter.LintMessage[][], filename: string) => Linter.LintMessage[]; + /** + * If `true` then it means the processor supports autofix. + */ + supportsAutofix?: boolean; + } + export interface Environment { + /** + * The definition of global variables. + */ + globals?: Record; + /** + * The parser options that will be enabled under this environment. + */ + parserOptions?: ParserOptions; + } + export interface Plugin { + /** + * The definition of plugin configs. + */ + configs?: Record; + /** + * The definition of plugin environments. + */ + environments?: Record; + /** + * The definition of plugin processors. + */ + processors?: Record; + /** + * The definition of plugin rules. + */ + rules?: Record>; + } + export {}; +} +declare const Linter_base: typeof LinterBase; +/** + * The Linter object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it + * simply parses and reports on the code. In particular, the Linter object does not process configuration objects + * or files. + */ +declare class Linter extends Linter_base { +} +export { Linter }; +//# sourceMappingURL=Linter.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts index 0fd8e904..3956b84e 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts @@ -1,2 +1,2 @@ -export { DebugLevel, EcmaVersion, ParserOptions, SourceType, } from '@typescript-eslint/types'; -//# sourceMappingURL=ParserOptions.d.ts.map +export { DebugLevel, EcmaVersion, ParserOptions, SourceType, } from '@typescript-eslint/types'; +//# sourceMappingURL=ParserOptions.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts index 7a04a403..de6cd21a 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts @@ -1,393 +1,393 @@ -import { JSONSchema4 } from '../json-schema'; -import { ParserServices, TSESTree } from '../ts-estree'; -import { AST } from './AST'; -import { Linter } from './Linter'; -import { Scope } from './Scope'; -import { SourceCode } from './SourceCode'; -export type RuleRecommendation = 'error' | 'strict' | 'warn' | false; -interface RuleMetaDataDocs { - /** - * Concise description of the rule - */ - description: string; - /** - * The recommendation level for the rule. - * Used by the build tools to generate the recommended and strict configs. - * Set to false to not include it as a recommendation - */ - recommended: 'error' | 'strict' | 'warn' | false; - /** - * The URL of the rule's docs - */ - url?: string; - /** - * Specifies whether the rule can return suggestions. - */ - suggestion?: boolean; - /** - * Does the rule require us to create a full TypeScript Program in order for it - * to type-check code. This is only used for documentation purposes. - */ - requiresTypeChecking?: boolean; - /** - * Does the rule extend (or is it based off of) an ESLint code rule? - * Alternately accepts the name of the base rule, in case the rule has been renamed. - * This is only used for documentation purposes. - */ - extendsBaseRule?: boolean | string; -} -interface RuleMetaData { - /** - * True if the rule is deprecated, false otherwise - */ - deprecated?: boolean; - /** - * Documentation for the rule, unnecessary for custom rules/plugins - */ - docs?: RuleMetaDataDocs; - /** - * The fixer category. Omit if there is no fixer - */ - fixable?: 'code' | 'whitespace'; - /** - * Specifies whether rules can return suggestions. Omit if there is no suggestions - */ - hasSuggestions?: boolean; - /** - * A map of messages which the rule can report. - * The key is the messageId, and the string is the parameterised error string. - * See: https://eslint.org/docs/developer-guide/working-with-rules#messageids - */ - messages: Record; - /** - * The type of rule. - * - `"problem"` means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this a high priority to resolve. - * - `"suggestion"` means the rule is identifying something that could be done in a better way but no errors will occur if the code isn’t changed. - * - `"layout"` means the rule cares primarily about whitespace, semicolons, commas, and parentheses, all the parts of the program that determine how the code looks rather than how it executes. These rules work on parts of the code that aren’t specified in the AST. - */ - type: 'suggestion' | 'problem' | 'layout'; - /** - * The name of the rule this rule was replaced by, if it was deprecated. - */ - replacedBy?: readonly string[]; - /** - * The options schema. Supply an empty array if there are no options. - */ - schema: JSONSchema4 | readonly JSONSchema4[]; -} -interface RuleFix { - range: Readonly; - text: string; -} -interface RuleFixer { - insertTextAfter(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; - insertTextAfterRange(range: Readonly, text: string): RuleFix; - insertTextBefore(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; - insertTextBeforeRange(range: Readonly, text: string): RuleFix; - remove(nodeOrToken: TSESTree.Node | TSESTree.Token): RuleFix; - removeRange(range: Readonly): RuleFix; - replaceText(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; - replaceTextRange(range: Readonly, text: string): RuleFix; -} -interface SuggestionReportDescriptor extends Pick, Exclude, 'fix'>> { - readonly fix: ReportFixFunction; -} -type ReportFixFunction = (fixer: RuleFixer) => null | RuleFix | readonly RuleFix[] | IterableIterator; -type ReportSuggestionArray = SuggestionReportDescriptor[]; -interface ReportDescriptorBase { - /** - * The parameters for the message string associated with `messageId`. - */ - readonly data?: Readonly>; - /** - * The fixer function. - */ - readonly fix?: ReportFixFunction | null; - /** - * The messageId which is being reported. - */ - readonly messageId: TMessageIds; -} -interface ReportDescriptorWithSuggestion extends ReportDescriptorBase { - /** - * 6.7's Suggestions API - */ - readonly suggest?: Readonly> | null; -} -interface ReportDescriptorNodeOptionalLoc { - /** - * The Node or AST Token which the report is being attached to - */ - readonly node: TSESTree.Node | TSESTree.Token; - /** - * An override of the location of the report - */ - readonly loc?: Readonly | Readonly; -} -interface ReportDescriptorLocOnly { - /** - * An override of the location of the report - */ - loc: Readonly | Readonly; -} -type ReportDescriptor = ReportDescriptorWithSuggestion & (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); -/** - * Plugins can add their settings using declaration - * merging against this interface. - */ -interface SharedConfigurationSettings { - [name: string]: unknown; -} -interface RuleContext { - /** - * The rule ID. - */ - id: string; - /** - * An array of the configured options for this rule. - * This array does not include the rule severity. - */ - options: TOptions; - /** - * The name of the parser from configuration. - */ - parserPath: string; - /** - * The parser options configured for this run - */ - parserOptions: Linter.ParserOptions; - /** - * An object containing parser-provided services for rules - */ - parserServices?: ParserServices; - /** - * The shared settings from configuration. - * We do not have any shared settings in this plugin. - */ - settings: SharedConfigurationSettings; - /** - * Returns an array of the ancestors of the currently-traversed node, starting at - * the root of the AST and continuing through the direct parent of the current node. - * This array does not include the currently-traversed node itself. - */ - getAncestors(): TSESTree.Node[]; - /** - * Returns a list of variables declared by the given node. - * This information can be used to track references to variables. - */ - getDeclaredVariables(node: TSESTree.Node): readonly Scope.Variable[]; - /** - * Returns the current working directory passed to Linter. - * It is a path to a directory that should be considered as the current working directory. - * @since 6.6.0 - */ - getCwd?(): string; - /** - * Returns the filename associated with the source. - */ - getFilename(): string; - /** - * Returns the full path of the file on disk without any code block information (unlike `getFilename()`). - * @since 7.28.0 - */ - getPhysicalFilename?(): string; - /** - * Returns the scope of the currently-traversed node. - * This information can be used track references to variables. - */ - getScope(): Scope.Scope; - /** - * Returns a SourceCode object that you can use to work with the source that - * was passed to ESLint. - */ - getSourceCode(): Readonly; - /** - * Marks a variable with the given name in the current scope as used. - * This affects the no-unused-vars rule. - */ - markVariableAsUsed(name: string): boolean; - /** - * Reports a problem in the code. - */ - report(descriptor: ReportDescriptor): void; -} -type RuleFunction = (node: T) => void; -interface RuleListener { - [nodeSelector: string]: RuleFunction | undefined; - ArrayExpression?: RuleFunction; - ArrayPattern?: RuleFunction; - ArrowFunctionExpression?: RuleFunction; - AssignmentExpression?: RuleFunction; - AssignmentPattern?: RuleFunction; - AwaitExpression?: RuleFunction; - BigIntLiteral?: RuleFunction; - BinaryExpression?: RuleFunction; - BlockStatement?: RuleFunction; - BreakStatement?: RuleFunction; - CallExpression?: RuleFunction; - CatchClause?: RuleFunction; - ChainExpression?: RuleFunction; - ClassBody?: RuleFunction; - ClassDeclaration?: RuleFunction; - ClassExpression?: RuleFunction; - ConditionalExpression?: RuleFunction; - ContinueStatement?: RuleFunction; - DebuggerStatement?: RuleFunction; - Decorator?: RuleFunction; - DoWhileStatement?: RuleFunction; - EmptyStatement?: RuleFunction; - ExportAllDeclaration?: RuleFunction; - ExportDefaultDeclaration?: RuleFunction; - ExportNamedDeclaration?: RuleFunction; - ExportSpecifier?: RuleFunction; - ExpressionStatement?: RuleFunction; - ForInStatement?: RuleFunction; - ForOfStatement?: RuleFunction; - ForStatement?: RuleFunction; - FunctionDeclaration?: RuleFunction; - FunctionExpression?: RuleFunction; - Identifier?: RuleFunction; - IfStatement?: RuleFunction; - ImportDeclaration?: RuleFunction; - ImportDefaultSpecifier?: RuleFunction; - ImportExpression?: RuleFunction; - ImportNamespaceSpecifier?: RuleFunction; - ImportSpecifier?: RuleFunction; - JSXAttribute?: RuleFunction; - JSXClosingElement?: RuleFunction; - JSXClosingFragment?: RuleFunction; - JSXElement?: RuleFunction; - JSXEmptyExpression?: RuleFunction; - JSXExpressionContainer?: RuleFunction; - JSXFragment?: RuleFunction; - JSXIdentifier?: RuleFunction; - JSXMemberExpression?: RuleFunction; - JSXOpeningElement?: RuleFunction; - JSXOpeningFragment?: RuleFunction; - JSXSpreadAttribute?: RuleFunction; - JSXSpreadChild?: RuleFunction; - JSXText?: RuleFunction; - LabeledStatement?: RuleFunction; - Literal?: RuleFunction; - LogicalExpression?: RuleFunction; - MemberExpression?: RuleFunction; - MetaProperty?: RuleFunction; - MethodDefinition?: RuleFunction; - NewExpression?: RuleFunction; - ObjectExpression?: RuleFunction; - ObjectPattern?: RuleFunction; - Program?: RuleFunction; - Property?: RuleFunction; - PropertyDefinition?: RuleFunction; - RestElement?: RuleFunction; - ReturnStatement?: RuleFunction; - SequenceExpression?: RuleFunction; - SpreadElement?: RuleFunction; - Super?: RuleFunction; - SwitchCase?: RuleFunction; - SwitchStatement?: RuleFunction; - TaggedTemplateExpression?: RuleFunction; - TemplateElement?: RuleFunction; - TemplateLiteral?: RuleFunction; - ThisExpression?: RuleFunction; - ThrowStatement?: RuleFunction; - TryStatement?: RuleFunction; - TSAbstractKeyword?: RuleFunction; - TSAbstractMethodDefinition?: RuleFunction; - TSAbstractPropertyDefinition?: RuleFunction; - TSAnyKeyword?: RuleFunction; - TSArrayType?: RuleFunction; - TSAsExpression?: RuleFunction; - TSAsyncKeyword?: RuleFunction; - TSBigIntKeyword?: RuleFunction; - TSBooleanKeyword?: RuleFunction; - TSCallSignatureDeclaration?: RuleFunction; - TSClassImplements?: RuleFunction; - TSConditionalType?: RuleFunction; - TSConstructorType?: RuleFunction; - TSConstructSignatureDeclaration?: RuleFunction; - TSDeclareFunction?: RuleFunction; - TSDeclareKeyword?: RuleFunction; - TSEmptyBodyFunctionExpression?: RuleFunction; - TSEnumDeclaration?: RuleFunction; - TSEnumMember?: RuleFunction; - TSExportAssignment?: RuleFunction; - TSExportKeyword?: RuleFunction; - TSExternalModuleReference?: RuleFunction; - TSFunctionType?: RuleFunction; - TSImportEqualsDeclaration?: RuleFunction; - TSImportType?: RuleFunction; - TSIndexedAccessType?: RuleFunction; - TSIndexSignature?: RuleFunction; - TSInferType?: RuleFunction; - TSInterfaceBody?: RuleFunction; - TSInterfaceDeclaration?: RuleFunction; - TSInterfaceHeritage?: RuleFunction; - TSIntersectionType?: RuleFunction; - TSLiteralType?: RuleFunction; - TSMappedType?: RuleFunction; - TSMethodSignature?: RuleFunction; - TSModuleBlock?: RuleFunction; - TSModuleDeclaration?: RuleFunction; - TSNamespaceExportDeclaration?: RuleFunction; - TSNeverKeyword?: RuleFunction; - TSNonNullExpression?: RuleFunction; - TSNullKeyword?: RuleFunction; - TSNumberKeyword?: RuleFunction; - TSObjectKeyword?: RuleFunction; - TSOptionalType?: RuleFunction; - TSParameterProperty?: RuleFunction; - TSPrivateKeyword?: RuleFunction; - TSPropertySignature?: RuleFunction; - TSProtectedKeyword?: RuleFunction; - TSPublicKeyword?: RuleFunction; - TSQualifiedName?: RuleFunction; - TSReadonlyKeyword?: RuleFunction; - TSRestType?: RuleFunction; - TSStaticKeyword?: RuleFunction; - TSStringKeyword?: RuleFunction; - TSSymbolKeyword?: RuleFunction; - TSThisType?: RuleFunction; - TSTupleType?: RuleFunction; - TSTypeAliasDeclaration?: RuleFunction; - TSTypeAnnotation?: RuleFunction; - TSTypeAssertion?: RuleFunction; - TSTypeLiteral?: RuleFunction; - TSTypeOperator?: RuleFunction; - TSTypeParameter?: RuleFunction; - TSTypeParameterDeclaration?: RuleFunction; - TSTypeParameterInstantiation?: RuleFunction; - TSTypePredicate?: RuleFunction; - TSTypeQuery?: RuleFunction; - TSTypeReference?: RuleFunction; - TSUndefinedKeyword?: RuleFunction; - TSUnionType?: RuleFunction; - TSUnknownKeyword?: RuleFunction; - TSVoidKeyword?: RuleFunction; - UnaryExpression?: RuleFunction; - UpdateExpression?: RuleFunction; - VariableDeclaration?: RuleFunction; - VariableDeclarator?: RuleFunction; - WhileStatement?: RuleFunction; - WithStatement?: RuleFunction; - YieldExpression?: RuleFunction; -} -interface RuleModule { - /** - * Default options the rule will be run with - */ - defaultOptions: TOptions; - /** - * Metadata about the rule - */ - meta: RuleMetaData; - /** - * Function which returns an object with methods that ESLint calls to “visit†- * nodes while traversing the abstract syntax tree. - */ - create(context: Readonly>): TRuleListener; -} -type RuleCreateFunction = (context: Readonly>) => TRuleListener; -export { ReportDescriptor, ReportFixFunction, ReportSuggestionArray, RuleContext, RuleCreateFunction, RuleFix, RuleFixer, RuleFunction, RuleListener, RuleMetaData, RuleMetaDataDocs, RuleModule, SharedConfigurationSettings, }; -//# sourceMappingURL=Rule.d.ts.map +import { JSONSchema4 } from '../json-schema'; +import { ParserServices, TSESTree } from '../ts-estree'; +import { AST } from './AST'; +import { Linter } from './Linter'; +import { Scope } from './Scope'; +import { SourceCode } from './SourceCode'; +export type RuleRecommendation = 'error' | 'strict' | 'warn' | false; +interface RuleMetaDataDocs { + /** + * Concise description of the rule + */ + description: string; + /** + * The recommendation level for the rule. + * Used by the build tools to generate the recommended and strict configs. + * Set to false to not include it as a recommendation + */ + recommended: 'error' | 'strict' | 'warn' | false; + /** + * The URL of the rule's docs + */ + url?: string; + /** + * Specifies whether the rule can return suggestions. + */ + suggestion?: boolean; + /** + * Does the rule require us to create a full TypeScript Program in order for it + * to type-check code. This is only used for documentation purposes. + */ + requiresTypeChecking?: boolean; + /** + * Does the rule extend (or is it based off of) an ESLint code rule? + * Alternately accepts the name of the base rule, in case the rule has been renamed. + * This is only used for documentation purposes. + */ + extendsBaseRule?: boolean | string; +} +interface RuleMetaData { + /** + * True if the rule is deprecated, false otherwise + */ + deprecated?: boolean; + /** + * Documentation for the rule, unnecessary for custom rules/plugins + */ + docs?: RuleMetaDataDocs; + /** + * The fixer category. Omit if there is no fixer + */ + fixable?: 'code' | 'whitespace'; + /** + * Specifies whether rules can return suggestions. Omit if there is no suggestions + */ + hasSuggestions?: boolean; + /** + * A map of messages which the rule can report. + * The key is the messageId, and the string is the parameterised error string. + * See: https://eslint.org/docs/developer-guide/working-with-rules#messageids + */ + messages: Record; + /** + * The type of rule. + * - `"problem"` means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this a high priority to resolve. + * - `"suggestion"` means the rule is identifying something that could be done in a better way but no errors will occur if the code isn’t changed. + * - `"layout"` means the rule cares primarily about whitespace, semicolons, commas, and parentheses, all the parts of the program that determine how the code looks rather than how it executes. These rules work on parts of the code that aren’t specified in the AST. + */ + type: 'suggestion' | 'problem' | 'layout'; + /** + * The name of the rule this rule was replaced by, if it was deprecated. + */ + replacedBy?: readonly string[]; + /** + * The options schema. Supply an empty array if there are no options. + */ + schema: JSONSchema4 | readonly JSONSchema4[]; +} +interface RuleFix { + range: Readonly; + text: string; +} +interface RuleFixer { + insertTextAfter(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; + insertTextAfterRange(range: Readonly, text: string): RuleFix; + insertTextBefore(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; + insertTextBeforeRange(range: Readonly, text: string): RuleFix; + remove(nodeOrToken: TSESTree.Node | TSESTree.Token): RuleFix; + removeRange(range: Readonly): RuleFix; + replaceText(nodeOrToken: TSESTree.Node | TSESTree.Token, text: string): RuleFix; + replaceTextRange(range: Readonly, text: string): RuleFix; +} +interface SuggestionReportDescriptor extends Pick, Exclude, 'fix'>> { + readonly fix: ReportFixFunction; +} +type ReportFixFunction = (fixer: RuleFixer) => null | RuleFix | readonly RuleFix[] | IterableIterator; +type ReportSuggestionArray = SuggestionReportDescriptor[]; +interface ReportDescriptorBase { + /** + * The parameters for the message string associated with `messageId`. + */ + readonly data?: Readonly>; + /** + * The fixer function. + */ + readonly fix?: ReportFixFunction | null; + /** + * The messageId which is being reported. + */ + readonly messageId: TMessageIds; +} +interface ReportDescriptorWithSuggestion extends ReportDescriptorBase { + /** + * 6.7's Suggestions API + */ + readonly suggest?: Readonly> | null; +} +interface ReportDescriptorNodeOptionalLoc { + /** + * The Node or AST Token which the report is being attached to + */ + readonly node: TSESTree.Node | TSESTree.Token; + /** + * An override of the location of the report + */ + readonly loc?: Readonly | Readonly; +} +interface ReportDescriptorLocOnly { + /** + * An override of the location of the report + */ + loc: Readonly | Readonly; +} +type ReportDescriptor = ReportDescriptorWithSuggestion & (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); +/** + * Plugins can add their settings using declaration + * merging against this interface. + */ +interface SharedConfigurationSettings { + [name: string]: unknown; +} +interface RuleContext { + /** + * The rule ID. + */ + id: string; + /** + * An array of the configured options for this rule. + * This array does not include the rule severity. + */ + options: TOptions; + /** + * The name of the parser from configuration. + */ + parserPath: string; + /** + * The parser options configured for this run + */ + parserOptions: Linter.ParserOptions; + /** + * An object containing parser-provided services for rules + */ + parserServices?: ParserServices; + /** + * The shared settings from configuration. + * We do not have any shared settings in this plugin. + */ + settings: SharedConfigurationSettings; + /** + * Returns an array of the ancestors of the currently-traversed node, starting at + * the root of the AST and continuing through the direct parent of the current node. + * This array does not include the currently-traversed node itself. + */ + getAncestors(): TSESTree.Node[]; + /** + * Returns a list of variables declared by the given node. + * This information can be used to track references to variables. + */ + getDeclaredVariables(node: TSESTree.Node): readonly Scope.Variable[]; + /** + * Returns the current working directory passed to Linter. + * It is a path to a directory that should be considered as the current working directory. + * @since 6.6.0 + */ + getCwd?(): string; + /** + * Returns the filename associated with the source. + */ + getFilename(): string; + /** + * Returns the full path of the file on disk without any code block information (unlike `getFilename()`). + * @since 7.28.0 + */ + getPhysicalFilename?(): string; + /** + * Returns the scope of the currently-traversed node. + * This information can be used track references to variables. + */ + getScope(): Scope.Scope; + /** + * Returns a SourceCode object that you can use to work with the source that + * was passed to ESLint. + */ + getSourceCode(): Readonly; + /** + * Marks a variable with the given name in the current scope as used. + * This affects the no-unused-vars rule. + */ + markVariableAsUsed(name: string): boolean; + /** + * Reports a problem in the code. + */ + report(descriptor: ReportDescriptor): void; +} +type RuleFunction = (node: T) => void; +interface RuleListener { + [nodeSelector: string]: RuleFunction | undefined; + ArrayExpression?: RuleFunction; + ArrayPattern?: RuleFunction; + ArrowFunctionExpression?: RuleFunction; + AssignmentExpression?: RuleFunction; + AssignmentPattern?: RuleFunction; + AwaitExpression?: RuleFunction; + BigIntLiteral?: RuleFunction; + BinaryExpression?: RuleFunction; + BlockStatement?: RuleFunction; + BreakStatement?: RuleFunction; + CallExpression?: RuleFunction; + CatchClause?: RuleFunction; + ChainExpression?: RuleFunction; + ClassBody?: RuleFunction; + ClassDeclaration?: RuleFunction; + ClassExpression?: RuleFunction; + ConditionalExpression?: RuleFunction; + ContinueStatement?: RuleFunction; + DebuggerStatement?: RuleFunction; + Decorator?: RuleFunction; + DoWhileStatement?: RuleFunction; + EmptyStatement?: RuleFunction; + ExportAllDeclaration?: RuleFunction; + ExportDefaultDeclaration?: RuleFunction; + ExportNamedDeclaration?: RuleFunction; + ExportSpecifier?: RuleFunction; + ExpressionStatement?: RuleFunction; + ForInStatement?: RuleFunction; + ForOfStatement?: RuleFunction; + ForStatement?: RuleFunction; + FunctionDeclaration?: RuleFunction; + FunctionExpression?: RuleFunction; + Identifier?: RuleFunction; + IfStatement?: RuleFunction; + ImportDeclaration?: RuleFunction; + ImportDefaultSpecifier?: RuleFunction; + ImportExpression?: RuleFunction; + ImportNamespaceSpecifier?: RuleFunction; + ImportSpecifier?: RuleFunction; + JSXAttribute?: RuleFunction; + JSXClosingElement?: RuleFunction; + JSXClosingFragment?: RuleFunction; + JSXElement?: RuleFunction; + JSXEmptyExpression?: RuleFunction; + JSXExpressionContainer?: RuleFunction; + JSXFragment?: RuleFunction; + JSXIdentifier?: RuleFunction; + JSXMemberExpression?: RuleFunction; + JSXOpeningElement?: RuleFunction; + JSXOpeningFragment?: RuleFunction; + JSXSpreadAttribute?: RuleFunction; + JSXSpreadChild?: RuleFunction; + JSXText?: RuleFunction; + LabeledStatement?: RuleFunction; + Literal?: RuleFunction; + LogicalExpression?: RuleFunction; + MemberExpression?: RuleFunction; + MetaProperty?: RuleFunction; + MethodDefinition?: RuleFunction; + NewExpression?: RuleFunction; + ObjectExpression?: RuleFunction; + ObjectPattern?: RuleFunction; + Program?: RuleFunction; + Property?: RuleFunction; + PropertyDefinition?: RuleFunction; + RestElement?: RuleFunction; + ReturnStatement?: RuleFunction; + SequenceExpression?: RuleFunction; + SpreadElement?: RuleFunction; + Super?: RuleFunction; + SwitchCase?: RuleFunction; + SwitchStatement?: RuleFunction; + TaggedTemplateExpression?: RuleFunction; + TemplateElement?: RuleFunction; + TemplateLiteral?: RuleFunction; + ThisExpression?: RuleFunction; + ThrowStatement?: RuleFunction; + TryStatement?: RuleFunction; + TSAbstractKeyword?: RuleFunction; + TSAbstractMethodDefinition?: RuleFunction; + TSAbstractPropertyDefinition?: RuleFunction; + TSAnyKeyword?: RuleFunction; + TSArrayType?: RuleFunction; + TSAsExpression?: RuleFunction; + TSAsyncKeyword?: RuleFunction; + TSBigIntKeyword?: RuleFunction; + TSBooleanKeyword?: RuleFunction; + TSCallSignatureDeclaration?: RuleFunction; + TSClassImplements?: RuleFunction; + TSConditionalType?: RuleFunction; + TSConstructorType?: RuleFunction; + TSConstructSignatureDeclaration?: RuleFunction; + TSDeclareFunction?: RuleFunction; + TSDeclareKeyword?: RuleFunction; + TSEmptyBodyFunctionExpression?: RuleFunction; + TSEnumDeclaration?: RuleFunction; + TSEnumMember?: RuleFunction; + TSExportAssignment?: RuleFunction; + TSExportKeyword?: RuleFunction; + TSExternalModuleReference?: RuleFunction; + TSFunctionType?: RuleFunction; + TSImportEqualsDeclaration?: RuleFunction; + TSImportType?: RuleFunction; + TSIndexedAccessType?: RuleFunction; + TSIndexSignature?: RuleFunction; + TSInferType?: RuleFunction; + TSInterfaceBody?: RuleFunction; + TSInterfaceDeclaration?: RuleFunction; + TSInterfaceHeritage?: RuleFunction; + TSIntersectionType?: RuleFunction; + TSLiteralType?: RuleFunction; + TSMappedType?: RuleFunction; + TSMethodSignature?: RuleFunction; + TSModuleBlock?: RuleFunction; + TSModuleDeclaration?: RuleFunction; + TSNamespaceExportDeclaration?: RuleFunction; + TSNeverKeyword?: RuleFunction; + TSNonNullExpression?: RuleFunction; + TSNullKeyword?: RuleFunction; + TSNumberKeyword?: RuleFunction; + TSObjectKeyword?: RuleFunction; + TSOptionalType?: RuleFunction; + TSParameterProperty?: RuleFunction; + TSPrivateKeyword?: RuleFunction; + TSPropertySignature?: RuleFunction; + TSProtectedKeyword?: RuleFunction; + TSPublicKeyword?: RuleFunction; + TSQualifiedName?: RuleFunction; + TSReadonlyKeyword?: RuleFunction; + TSRestType?: RuleFunction; + TSStaticKeyword?: RuleFunction; + TSStringKeyword?: RuleFunction; + TSSymbolKeyword?: RuleFunction; + TSThisType?: RuleFunction; + TSTupleType?: RuleFunction; + TSTypeAliasDeclaration?: RuleFunction; + TSTypeAnnotation?: RuleFunction; + TSTypeAssertion?: RuleFunction; + TSTypeLiteral?: RuleFunction; + TSTypeOperator?: RuleFunction; + TSTypeParameter?: RuleFunction; + TSTypeParameterDeclaration?: RuleFunction; + TSTypeParameterInstantiation?: RuleFunction; + TSTypePredicate?: RuleFunction; + TSTypeQuery?: RuleFunction; + TSTypeReference?: RuleFunction; + TSUndefinedKeyword?: RuleFunction; + TSUnionType?: RuleFunction; + TSUnknownKeyword?: RuleFunction; + TSVoidKeyword?: RuleFunction; + UnaryExpression?: RuleFunction; + UpdateExpression?: RuleFunction; + VariableDeclaration?: RuleFunction; + VariableDeclarator?: RuleFunction; + WhileStatement?: RuleFunction; + WithStatement?: RuleFunction; + YieldExpression?: RuleFunction; +} +interface RuleModule { + /** + * Default options the rule will be run with + */ + defaultOptions: TOptions; + /** + * Metadata about the rule + */ + meta: RuleMetaData; + /** + * Function which returns an object with methods that ESLint calls to “visit†+ * nodes while traversing the abstract syntax tree. + */ + create(context: Readonly>): TRuleListener; +} +type RuleCreateFunction = (context: Readonly>) => TRuleListener; +export { ReportDescriptor, ReportFixFunction, ReportSuggestionArray, RuleContext, RuleCreateFunction, RuleFix, RuleFixer, RuleFunction, RuleListener, RuleMetaData, RuleMetaDataDocs, RuleModule, SharedConfigurationSettings, }; +//# sourceMappingURL=Rule.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts index c977f184..70fdcaaa 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts @@ -1,158 +1,158 @@ -import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '../ts-estree'; -import { Linter } from './Linter'; -import { ParserOptions } from './ParserOptions'; -import { RuleCreateFunction, RuleModule, SharedConfigurationSettings } from './Rule'; -interface ValidTestCase> { - /** - * Name for the test case. - * @since 8.1.0 - */ - readonly name?: string; - /** - * Code for the test case. - */ - readonly code: string; - /** - * Environments for the test case. - */ - readonly env?: Readonly>; - /** - * The fake filename for the test case. Useful for rules that make assertion about filenames. - */ - readonly filename?: string; - /** - * The additional global variables. - */ - readonly globals?: Record; - /** - * Options for the test case. - */ - readonly options?: Readonly; - /** - * The absolute path for the parser. - */ - readonly parser?: string; - /** - * Options for the parser. - */ - readonly parserOptions?: Readonly; - /** - * Settings for the test case. - */ - readonly settings?: Readonly; - /** - * Run this case exclusively for debugging in supported test frameworks. - * @since 7.29.0 - */ - readonly only?: boolean; -} -interface SuggestionOutput { - /** - * Reported message ID. - */ - readonly messageId: TMessageIds; - /** - * The data used to fill the message template. - */ - readonly data?: Readonly>; - /** - * NOTE: Suggestions will be applied as a stand-alone change, without triggering multi-pass fixes. - * Each individual error has its own suggestion, so you have to show the correct, _isolated_ output for each suggestion. - */ - readonly output: string; -} -interface InvalidTestCase> extends ValidTestCase { - /** - * Expected errors. - */ - readonly errors: readonly TestCaseError[]; - /** - * The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested. - */ - readonly output?: string | null; -} -interface TestCaseError { - /** - * The 1-based column number of the reported start location. - */ - readonly column?: number; - /** - * The data used to fill the message template. - */ - readonly data?: Readonly>; - /** - * The 1-based column number of the reported end location. - */ - readonly endColumn?: number; - /** - * The 1-based line number of the reported end location. - */ - readonly endLine?: number; - /** - * The 1-based line number of the reported start location. - */ - readonly line?: number; - /** - * Reported message ID. - */ - readonly messageId: TMessageIds; - /** - * Reported suggestions. - */ - readonly suggestions?: readonly SuggestionOutput[] | null; - /** - * The type of the reported AST node. - */ - readonly type?: AST_NODE_TYPES | AST_TOKEN_TYPES; -} -/** - * @param text a string describing the rule - * @param callback the test callback - */ -type RuleTesterTestFrameworkFunction = (text: string, callback: () => void) => void; -interface RunTests> { - readonly valid: readonly (ValidTestCase | string)[]; - readonly invalid: readonly InvalidTestCase[]; -} -interface RuleTesterConfig extends Linter.Config { - readonly parser: string; - readonly parserOptions?: Readonly; -} -declare class RuleTesterBase { - /** - * Creates a new instance of RuleTester. - * @param testerConfig extra configuration for the tester - */ - constructor(testerConfig?: RuleTesterConfig); - /** - * Adds a new rule test to execute. - * @param ruleName The name of the rule to run. - * @param rule The rule to test. - * @param test The collection of tests to run. - */ - run>(ruleName: string, rule: RuleModule, tests: RunTests): void; - /* - * If you supply a value to this property, the rule tester will call this instead of using the version defined on - * the global namespace. - */ - static describe: RuleTesterTestFrameworkFunction; - /* - * If you supply a value to this property, the rule tester will call this instead of using the version defined on - * the global namespace. - */ - static it: RuleTesterTestFrameworkFunction; - /* - * If you supply a value to this property, the rule tester will call this instead of using the version defined on - * the global namespace. - */ - static itOnly: RuleTesterTestFrameworkFunction; - /** - * Define a rule for one particular run of tests. - */ - defineRule>(name: string, rule: RuleModule | RuleCreateFunction): void; -} -declare const RuleTester_base: typeof RuleTesterBase; -declare class RuleTester extends RuleTester_base { -} -export { InvalidTestCase, SuggestionOutput, RuleTester, RuleTesterConfig, RuleTesterTestFrameworkFunction, RunTests, TestCaseError, ValidTestCase, }; -//# sourceMappingURL=RuleTester.d.ts.map +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '../ts-estree'; +import { Linter } from './Linter'; +import { ParserOptions } from './ParserOptions'; +import { RuleCreateFunction, RuleModule, SharedConfigurationSettings } from './Rule'; +interface ValidTestCase> { + /** + * Name for the test case. + * @since 8.1.0 + */ + readonly name?: string; + /** + * Code for the test case. + */ + readonly code: string; + /** + * Environments for the test case. + */ + readonly env?: Readonly>; + /** + * The fake filename for the test case. Useful for rules that make assertion about filenames. + */ + readonly filename?: string; + /** + * The additional global variables. + */ + readonly globals?: Record; + /** + * Options for the test case. + */ + readonly options?: Readonly; + /** + * The absolute path for the parser. + */ + readonly parser?: string; + /** + * Options for the parser. + */ + readonly parserOptions?: Readonly; + /** + * Settings for the test case. + */ + readonly settings?: Readonly; + /** + * Run this case exclusively for debugging in supported test frameworks. + * @since 7.29.0 + */ + readonly only?: boolean; +} +interface SuggestionOutput { + /** + * Reported message ID. + */ + readonly messageId: TMessageIds; + /** + * The data used to fill the message template. + */ + readonly data?: Readonly>; + /** + * NOTE: Suggestions will be applied as a stand-alone change, without triggering multi-pass fixes. + * Each individual error has its own suggestion, so you have to show the correct, _isolated_ output for each suggestion. + */ + readonly output: string; +} +interface InvalidTestCase> extends ValidTestCase { + /** + * Expected errors. + */ + readonly errors: readonly TestCaseError[]; + /** + * The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested. + */ + readonly output?: string | null; +} +interface TestCaseError { + /** + * The 1-based column number of the reported start location. + */ + readonly column?: number; + /** + * The data used to fill the message template. + */ + readonly data?: Readonly>; + /** + * The 1-based column number of the reported end location. + */ + readonly endColumn?: number; + /** + * The 1-based line number of the reported end location. + */ + readonly endLine?: number; + /** + * The 1-based line number of the reported start location. + */ + readonly line?: number; + /** + * Reported message ID. + */ + readonly messageId: TMessageIds; + /** + * Reported suggestions. + */ + readonly suggestions?: readonly SuggestionOutput[] | null; + /** + * The type of the reported AST node. + */ + readonly type?: AST_NODE_TYPES | AST_TOKEN_TYPES; +} +/** + * @param text a string describing the rule + * @param callback the test callback + */ +type RuleTesterTestFrameworkFunction = (text: string, callback: () => void) => void; +interface RunTests> { + readonly valid: readonly (ValidTestCase | string)[]; + readonly invalid: readonly InvalidTestCase[]; +} +interface RuleTesterConfig extends Linter.Config { + readonly parser: string; + readonly parserOptions?: Readonly; +} +declare class RuleTesterBase { + /** + * Creates a new instance of RuleTester. + * @param testerConfig extra configuration for the tester + */ + constructor(testerConfig?: RuleTesterConfig); + /** + * Adds a new rule test to execute. + * @param ruleName The name of the rule to run. + * @param rule The rule to test. + * @param test The collection of tests to run. + */ + run>(ruleName: string, rule: RuleModule, tests: RunTests): void; + /* + * If you supply a value to this property, the rule tester will call this instead of using the version defined on + * the global namespace. + */ + static describe: RuleTesterTestFrameworkFunction; + /* + * If you supply a value to this property, the rule tester will call this instead of using the version defined on + * the global namespace. + */ + static it: RuleTesterTestFrameworkFunction; + /* + * If you supply a value to this property, the rule tester will call this instead of using the version defined on + * the global namespace. + */ + static itOnly: RuleTesterTestFrameworkFunction; + /** + * Define a rule for one particular run of tests. + */ + defineRule>(name: string, rule: RuleModule | RuleCreateFunction): void; +} +declare const RuleTester_base: typeof RuleTesterBase; +declare class RuleTester extends RuleTester_base { +} +export { InvalidTestCase, SuggestionOutput, RuleTester, RuleTesterConfig, RuleTesterTestFrameworkFunction, RunTests, TestCaseError, ValidTestCase, }; +//# sourceMappingURL=RuleTester.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts index e164aaa7..27d01c72 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts @@ -1,44 +1,44 @@ -import * as scopeManager from '@typescript-eslint/scope-manager'; -declare namespace Scope { - type ScopeManager = scopeManager.ScopeManager; - type Reference = scopeManager.Reference; - type Variable = scopeManager.Variable | scopeManager.ESLintScopeVariable; - type Scope = scopeManager.Scope; - const ScopeType: typeof scopeManager.ScopeType; - type DefinitionType = scopeManager.Definition; - type Definition = scopeManager.Definition; - const DefinitionType: typeof scopeManager.DefinitionType; - namespace Definitions { - type CatchClauseDefinition = scopeManager.CatchClauseDefinition; - type ClassNameDefinition = scopeManager.ClassNameDefinition; - type FunctionNameDefinition = scopeManager.FunctionNameDefinition; - type ImplicitGlobalVariableDefinition = scopeManager.ImplicitGlobalVariableDefinition; - type ImportBindingDefinition = scopeManager.ImportBindingDefinition; - type ParameterDefinition = scopeManager.ParameterDefinition; - type TSEnumMemberDefinition = scopeManager.TSEnumMemberDefinition; - type TSEnumNameDefinition = scopeManager.TSEnumNameDefinition; - type TSModuleNameDefinition = scopeManager.TSModuleNameDefinition; - type TypeDefinition = scopeManager.TypeDefinition; - type VariableDefinition = scopeManager.VariableDefinition; - } - namespace Scopes { - type BlockScope = scopeManager.BlockScope; - type CatchScope = scopeManager.CatchScope; - type ClassScope = scopeManager.ClassScope; - type ConditionalTypeScope = scopeManager.ConditionalTypeScope; - type ForScope = scopeManager.ForScope; - type FunctionExpressionNameScope = scopeManager.FunctionExpressionNameScope; - type FunctionScope = scopeManager.FunctionScope; - type FunctionTypeScope = scopeManager.FunctionTypeScope; - type GlobalScope = scopeManager.GlobalScope; - type MappedTypeScope = scopeManager.MappedTypeScope; - type ModuleScope = scopeManager.ModuleScope; - type SwitchScope = scopeManager.SwitchScope; - type TSEnumScope = scopeManager.TSEnumScope; - type TSModuleScope = scopeManager.TSModuleScope; - type TypeScope = scopeManager.TypeScope; - type WithScope = scopeManager.WithScope; - } -} -export { Scope }; -//# sourceMappingURL=Scope.d.ts.map +import * as scopeManager from '@typescript-eslint/scope-manager'; +declare namespace Scope { + type ScopeManager = scopeManager.ScopeManager; + type Reference = scopeManager.Reference; + type Variable = scopeManager.Variable | scopeManager.ESLintScopeVariable; + type Scope = scopeManager.Scope; + const ScopeType: typeof scopeManager.ScopeType; + type DefinitionType = scopeManager.Definition; + type Definition = scopeManager.Definition; + const DefinitionType: typeof scopeManager.DefinitionType; + namespace Definitions { + type CatchClauseDefinition = scopeManager.CatchClauseDefinition; + type ClassNameDefinition = scopeManager.ClassNameDefinition; + type FunctionNameDefinition = scopeManager.FunctionNameDefinition; + type ImplicitGlobalVariableDefinition = scopeManager.ImplicitGlobalVariableDefinition; + type ImportBindingDefinition = scopeManager.ImportBindingDefinition; + type ParameterDefinition = scopeManager.ParameterDefinition; + type TSEnumMemberDefinition = scopeManager.TSEnumMemberDefinition; + type TSEnumNameDefinition = scopeManager.TSEnumNameDefinition; + type TSModuleNameDefinition = scopeManager.TSModuleNameDefinition; + type TypeDefinition = scopeManager.TypeDefinition; + type VariableDefinition = scopeManager.VariableDefinition; + } + namespace Scopes { + type BlockScope = scopeManager.BlockScope; + type CatchScope = scopeManager.CatchScope; + type ClassScope = scopeManager.ClassScope; + type ConditionalTypeScope = scopeManager.ConditionalTypeScope; + type ForScope = scopeManager.ForScope; + type FunctionExpressionNameScope = scopeManager.FunctionExpressionNameScope; + type FunctionScope = scopeManager.FunctionScope; + type FunctionTypeScope = scopeManager.FunctionTypeScope; + type GlobalScope = scopeManager.GlobalScope; + type MappedTypeScope = scopeManager.MappedTypeScope; + type ModuleScope = scopeManager.ModuleScope; + type SwitchScope = scopeManager.SwitchScope; + type TSEnumScope = scopeManager.TSEnumScope; + type TSModuleScope = scopeManager.TSModuleScope; + type TypeScope = scopeManager.TypeScope; + type WithScope = scopeManager.WithScope; + } +} +export { Scope }; +//# sourceMappingURL=Scope.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts index 787cc980..66efbc57 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts @@ -1,346 +1,346 @@ -import { ParserServices, TSESTree } from '../ts-estree'; -import { Scope } from './Scope'; -declare class TokenStore { - /** - * Checks whether any comments exist or not between the given 2 nodes. - * @param left The node to check. - * @param right The node to check. - * @returns `true` if one or more comments exist. - */ - commentsExistBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean; - /** - * Gets all comment tokens directly after the given node or token. - * @param nodeOrToken The AST node or token to check for adjacent comment tokens. - * @returns An array of comments in occurrence order. - */ - getCommentsAfter(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[]; - /** - * Gets all comment tokens directly before the given node or token. - * @param nodeOrToken The AST node or token to check for adjacent comment tokens. - * @returns An array of comments in occurrence order. - */ - getCommentsBefore(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[]; - /** - * Gets all comment tokens inside the given node. - * @param node The AST node to get the comments for. - * @returns An array of comments in occurrence order. - */ - getCommentsInside(node: TSESTree.Node): TSESTree.Comment[]; - /** - * Gets the first token of the given node. - * @param node The AST node. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns An object representing the token. - */ - getFirstToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the first token between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns An object representing the token. - */ - getFirstTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the first `count` tokens of the given node. - * @param node The AST node. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. - */ - getFirstTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the first `count` tokens between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens between left and right. - */ - getFirstTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the last token of the given node. - * @param node The AST node. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns An object representing the token. - */ - getLastToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the last token between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns An object representing the token. - */ - getLastTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the last `count` tokens of the given node. - * @param node The AST node. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. - */ - getLastTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the last `count` tokens between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens between left and right. - */ - getLastTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the token that follows a given node or token. - * @param node The AST node or token. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns An object representing the token. - */ - getTokenAfter(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the token that precedes a given node or token. - * @param node The AST node or token. - * @param options The option object - * @returns An object representing the token. - */ - getTokenBefore(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets the token starting at the specified index. - * @param offset Index of the start of the token's range. - * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. - * @returns The token starting at index, or null if no such token. - */ - getTokenByRangeStart(offset: number, options?: T): SourceCode.ReturnTypeFromOptions | null; - /** - * Gets all tokens that are related to the given node. - * @param node The AST node. - * @param beforeCount The number of tokens before the node to retrieve. - * @param afterCount The number of tokens after the node to retrieve. - * @returns Array of objects representing tokens. - */ - getTokens(node: TSESTree.Node, beforeCount?: number, afterCount?: number): TSESTree.Token[]; - /** - * Gets all tokens that are related to the given node. - * @param node The AST node. - * @param options The option object. If this is a function then it's `options.filter`. - * @returns Array of objects representing tokens. - */ - getTokens(node: TSESTree.Node, options: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the `count` tokens that follows a given node or token. - * @param node The AST node. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. - */ - getTokensAfter(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets the `count` tokens that precedes a given node or token. - * @param node The AST node. - * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. - */ - getTokensBefore(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets all of the tokens between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param options The option object. If this is a function then it's `options.filter`. - * @returns Tokens between left and right. - */ - getTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, padding?: T): SourceCode.ReturnTypeFromOptions[]; - /** - * Gets all of the tokens between two non-overlapping nodes. - * @param left Node before the desired token range. - * @param right Node after the desired token range. - * @param padding Number of extra tokens on either side of center. - * @returns Tokens between left and right. - */ - getTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, padding?: number): SourceCode.ReturnTypeFromOptions[]; -} -declare class SourceCodeBase extends TokenStore { - /** - * Represents parsed source code. - * @param text The source code text. - * @param ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. - */ - constructor(text: string, ast: SourceCode.Program); - /** - * Represents parsed source code. - * @param config The config object. - */ - constructor(config: SourceCode.SourceCodeConfig); - /** - * The parsed AST for the source code. - */ - ast: SourceCode.Program; - /** - * Retrieves an array containing all comments in the source code. - * @returns An array of comment nodes. - */ - getAllComments(): TSESTree.Comment[]; - /** - * Converts a (line, column) pair into a range index. - * @param loc A line/column location - * @returns The range index of the location in the file. - */ - getIndexFromLoc(location: TSESTree.Position): number; - /** - * Gets the entire source text split into an array of lines. - * @returns The source text as an array of lines. - */ - getLines(): string[]; - /** - * Converts a source text index into a (line, column) pair. - * @param index The index of a character in a file - * @returns A {line, column} location object with a 0-indexed column - */ - getLocFromIndex(index: number): TSESTree.Position; - /** - * Gets the deepest node containing a range index. - * @param index Range index of the desired node. - * @returns The node if found or `null` if not found. - */ - getNodeByRangeIndex(index: number): TSESTree.Node | null; - /** - * Gets the source code for the given node. - * @param node The AST node to get the text for. - * @param beforeCount The number of characters before the node to retrieve. - * @param afterCount The number of characters after the node to retrieve. - * @returns The text representing the AST node. - */ - getText(node?: TSESTree.Node | TSESTree.Token, beforeCount?: number, afterCount?: number): string; - /** - * The flag to indicate that the source code has Unicode BOM. - */ - hasBOM: boolean; - /** - * Determines if two nodes or tokens have at least one whitespace character - * between them. Order does not matter. Returns false if the given nodes or - * tokens overlap. - * @since 6.7.0 - * @param first The first node or token to check between. - * @param second The second node or token to check between. - * @returns True if there is a whitespace character between any of the tokens found between the two given nodes or tokens. - */ - isSpaceBetween?(first: TSESTree.Token | TSESTree.Node, second: TSESTree.Token | TSESTree.Node): boolean; - /** - * Determines if two nodes or tokens have at least one whitespace character - * between them. Order does not matter. Returns false if the given nodes or - * tokens overlap. - * For backward compatibility, this method returns true if there are - * `JSXText` tokens that contain whitespace between the two. - * @param first The first node or token to check between. - * @param second The second node or token to check between. - * @returns {boolean} True if there is a whitespace character between - * any of the tokens found between the two given nodes or tokens. - * @deprecated in favor of isSpaceBetween - */ - isSpaceBetweenTokens(first: TSESTree.Token, second: TSESTree.Token): boolean; - /** - * The source code split into lines according to ECMA-262 specification. - * This is done to avoid each rule needing to do so separately. - */ - lines: string[]; - /** - * The indexes in `text` that each line starts - */ - lineStartIndices: number[]; - /** - * The parser services of this source code. - */ - parserServices: ParserServices; - /** - * The scope of this source code. - */ - scopeManager: Scope.ScopeManager | null; - /** - * The original text source code. BOM was stripped from this text. - */ - text: string; - /** - * All of the tokens and comments in the AST. - * - * TODO: rename to 'tokens' - */ - tokensAndComments: TSESTree.Token[]; - /** - * The visitor keys to traverse AST. - */ - visitorKeys: SourceCode.VisitorKeys; - /** - * Split the source code into multiple lines based on the line delimiters. - * @param text Source code as a string. - * @returns Array of source code lines. - */ - static splitLines(text: string): string[]; -} -declare namespace SourceCode { - interface Program extends TSESTree.Program { - comments: TSESTree.Comment[]; - tokens: TSESTree.Token[]; - } - interface SourceCodeConfig { - /** - * The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. - */ - ast: Program; - /** - * The parser services. - */ - parserServices: ParserServices | null; - /** - * The scope of this source code. - */ - scopeManager: Scope.ScopeManager | null; - /** - * The source code text. - */ - text: string; - /** - * The visitor keys to traverse AST. - */ - visitorKeys: VisitorKeys | null; - } - interface VisitorKeys { - [nodeType: string]: string[]; - } - type FilterPredicate = (token: TSESTree.Token) => boolean; - type GetFilterPredicate = TFilter extends ((token: TSESTree.Token) => token is infer U extends TSESTree.Token) ? U : TDefault; - type GetFilterPredicateFromOptions = TOptions extends { - filter?: FilterPredicate; - } ? GetFilterPredicate : GetFilterPredicate; - type ReturnTypeFromOptions = T extends { - includeComments: true; - } ? GetFilterPredicateFromOptions : GetFilterPredicateFromOptions>; - type CursorWithSkipOptions = number | FilterPredicate | { - /** - * The predicate function to choose tokens. - */ - filter?: FilterPredicate; - /** - * The flag to iterate comments as well. - */ - includeComments?: boolean; - /** - * The count of tokens the cursor skips. - */ - skip?: number; - }; - type CursorWithCountOptions = number | FilterPredicate | { - /** - * The predicate function to choose tokens. - */ - filter?: FilterPredicate; - /** - * The flag to iterate comments as well. - */ - includeComments?: boolean; - /** - * The maximum count of tokens the cursor iterates. - */ - count?: number; - }; -} -declare const SourceCode_base: typeof SourceCodeBase; -declare class SourceCode extends SourceCode_base { -} -export { SourceCode }; -//# sourceMappingURL=SourceCode.d.ts.map +import { ParserServices, TSESTree } from '../ts-estree'; +import { Scope } from './Scope'; +declare class TokenStore { + /** + * Checks whether any comments exist or not between the given 2 nodes. + * @param left The node to check. + * @param right The node to check. + * @returns `true` if one or more comments exist. + */ + commentsExistBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean; + /** + * Gets all comment tokens directly after the given node or token. + * @param nodeOrToken The AST node or token to check for adjacent comment tokens. + * @returns An array of comments in occurrence order. + */ + getCommentsAfter(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[]; + /** + * Gets all comment tokens directly before the given node or token. + * @param nodeOrToken The AST node or token to check for adjacent comment tokens. + * @returns An array of comments in occurrence order. + */ + getCommentsBefore(nodeOrToken: TSESTree.Node | TSESTree.Token): TSESTree.Comment[]; + /** + * Gets all comment tokens inside the given node. + * @param node The AST node to get the comments for. + * @returns An array of comments in occurrence order. + */ + getCommentsInside(node: TSESTree.Node): TSESTree.Comment[]; + /** + * Gets the first token of the given node. + * @param node The AST node. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns An object representing the token. + */ + getFirstToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the first token between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns An object representing the token. + */ + getFirstTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the first `count` tokens of the given node. + * @param node The AST node. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens. + */ + getFirstTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the first `count` tokens between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens between left and right. + */ + getFirstTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the last token of the given node. + * @param node The AST node. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns An object representing the token. + */ + getLastToken(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the last token between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns An object representing the token. + */ + getLastTokenBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the last `count` tokens of the given node. + * @param node The AST node. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens. + */ + getLastTokens(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the last `count` tokens between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens between left and right. + */ + getLastTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the token that follows a given node or token. + * @param node The AST node or token. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns An object representing the token. + */ + getTokenAfter(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the token that precedes a given node or token. + * @param node The AST node or token. + * @param options The option object + * @returns An object representing the token. + */ + getTokenBefore(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets the token starting at the specified index. + * @param offset Index of the start of the token's range. + * @param option The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @returns The token starting at index, or null if no such token. + */ + getTokenByRangeStart(offset: number, options?: T): SourceCode.ReturnTypeFromOptions | null; + /** + * Gets all tokens that are related to the given node. + * @param node The AST node. + * @param beforeCount The number of tokens before the node to retrieve. + * @param afterCount The number of tokens after the node to retrieve. + * @returns Array of objects representing tokens. + */ + getTokens(node: TSESTree.Node, beforeCount?: number, afterCount?: number): TSESTree.Token[]; + /** + * Gets all tokens that are related to the given node. + * @param node The AST node. + * @param options The option object. If this is a function then it's `options.filter`. + * @returns Array of objects representing tokens. + */ + getTokens(node: TSESTree.Node, options: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the `count` tokens that follows a given node or token. + * @param node The AST node. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens. + */ + getTokensAfter(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets the `count` tokens that precedes a given node or token. + * @param node The AST node. + * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @returns Tokens. + */ + getTokensBefore(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets all of the tokens between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param options The option object. If this is a function then it's `options.filter`. + * @returns Tokens between left and right. + */ + getTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, padding?: T): SourceCode.ReturnTypeFromOptions[]; + /** + * Gets all of the tokens between two non-overlapping nodes. + * @param left Node before the desired token range. + * @param right Node after the desired token range. + * @param padding Number of extra tokens on either side of center. + * @returns Tokens between left and right. + */ + getTokensBetween(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, padding?: number): SourceCode.ReturnTypeFromOptions[]; +} +declare class SourceCodeBase extends TokenStore { + /** + * Represents parsed source code. + * @param text The source code text. + * @param ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. + */ + constructor(text: string, ast: SourceCode.Program); + /** + * Represents parsed source code. + * @param config The config object. + */ + constructor(config: SourceCode.SourceCodeConfig); + /** + * The parsed AST for the source code. + */ + ast: SourceCode.Program; + /** + * Retrieves an array containing all comments in the source code. + * @returns An array of comment nodes. + */ + getAllComments(): TSESTree.Comment[]; + /** + * Converts a (line, column) pair into a range index. + * @param loc A line/column location + * @returns The range index of the location in the file. + */ + getIndexFromLoc(location: TSESTree.Position): number; + /** + * Gets the entire source text split into an array of lines. + * @returns The source text as an array of lines. + */ + getLines(): string[]; + /** + * Converts a source text index into a (line, column) pair. + * @param index The index of a character in a file + * @returns A {line, column} location object with a 0-indexed column + */ + getLocFromIndex(index: number): TSESTree.Position; + /** + * Gets the deepest node containing a range index. + * @param index Range index of the desired node. + * @returns The node if found or `null` if not found. + */ + getNodeByRangeIndex(index: number): TSESTree.Node | null; + /** + * Gets the source code for the given node. + * @param node The AST node to get the text for. + * @param beforeCount The number of characters before the node to retrieve. + * @param afterCount The number of characters after the node to retrieve. + * @returns The text representing the AST node. + */ + getText(node?: TSESTree.Node | TSESTree.Token, beforeCount?: number, afterCount?: number): string; + /** + * The flag to indicate that the source code has Unicode BOM. + */ + hasBOM: boolean; + /** + * Determines if two nodes or tokens have at least one whitespace character + * between them. Order does not matter. Returns false if the given nodes or + * tokens overlap. + * @since 6.7.0 + * @param first The first node or token to check between. + * @param second The second node or token to check between. + * @returns True if there is a whitespace character between any of the tokens found between the two given nodes or tokens. + */ + isSpaceBetween?(first: TSESTree.Token | TSESTree.Node, second: TSESTree.Token | TSESTree.Node): boolean; + /** + * Determines if two nodes or tokens have at least one whitespace character + * between them. Order does not matter. Returns false if the given nodes or + * tokens overlap. + * For backward compatibility, this method returns true if there are + * `JSXText` tokens that contain whitespace between the two. + * @param first The first node or token to check between. + * @param second The second node or token to check between. + * @returns {boolean} True if there is a whitespace character between + * any of the tokens found between the two given nodes or tokens. + * @deprecated in favor of isSpaceBetween + */ + isSpaceBetweenTokens(first: TSESTree.Token, second: TSESTree.Token): boolean; + /** + * The source code split into lines according to ECMA-262 specification. + * This is done to avoid each rule needing to do so separately. + */ + lines: string[]; + /** + * The indexes in `text` that each line starts + */ + lineStartIndices: number[]; + /** + * The parser services of this source code. + */ + parserServices: ParserServices; + /** + * The scope of this source code. + */ + scopeManager: Scope.ScopeManager | null; + /** + * The original text source code. BOM was stripped from this text. + */ + text: string; + /** + * All of the tokens and comments in the AST. + * + * TODO: rename to 'tokens' + */ + tokensAndComments: TSESTree.Token[]; + /** + * The visitor keys to traverse AST. + */ + visitorKeys: SourceCode.VisitorKeys; + /** + * Split the source code into multiple lines based on the line delimiters. + * @param text Source code as a string. + * @returns Array of source code lines. + */ + static splitLines(text: string): string[]; +} +declare namespace SourceCode { + interface Program extends TSESTree.Program { + comments: TSESTree.Comment[]; + tokens: TSESTree.Token[]; + } + interface SourceCodeConfig { + /** + * The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. + */ + ast: Program; + /** + * The parser services. + */ + parserServices: ParserServices | null; + /** + * The scope of this source code. + */ + scopeManager: Scope.ScopeManager | null; + /** + * The source code text. + */ + text: string; + /** + * The visitor keys to traverse AST. + */ + visitorKeys: VisitorKeys | null; + } + interface VisitorKeys { + [nodeType: string]: string[]; + } + type FilterPredicate = (token: TSESTree.Token) => boolean; + type GetFilterPredicate = TFilter extends ((token: TSESTree.Token) => token is infer U extends TSESTree.Token) ? U : TDefault; + type GetFilterPredicateFromOptions = TOptions extends { + filter?: FilterPredicate; + } ? GetFilterPredicate : GetFilterPredicate; + type ReturnTypeFromOptions = T extends { + includeComments: true; + } ? GetFilterPredicateFromOptions : GetFilterPredicateFromOptions>; + type CursorWithSkipOptions = number | FilterPredicate | { + /** + * The predicate function to choose tokens. + */ + filter?: FilterPredicate; + /** + * The flag to iterate comments as well. + */ + includeComments?: boolean; + /** + * The count of tokens the cursor skips. + */ + skip?: number; + }; + type CursorWithCountOptions = number | FilterPredicate | { + /** + * The predicate function to choose tokens. + */ + filter?: FilterPredicate; + /** + * The flag to iterate comments as well. + */ + includeComments?: boolean; + /** + * The maximum count of tokens the cursor iterates. + */ + count?: number; + }; +} +declare const SourceCode_base: typeof SourceCodeBase; +declare class SourceCode extends SourceCode_base { +} +export { SourceCode }; +//# sourceMappingURL=SourceCode.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts index 20f1eadc..2b6338ef 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts @@ -1,10 +1,10 @@ -export * from './AST'; -export * from './CLIEngine'; -export * from './ESLint'; -export * from './Linter'; -export * from './ParserOptions'; -export * from './Rule'; -export * from './RuleTester'; -export * from './Scope'; -export * from './SourceCode'; -//# sourceMappingURL=index.d.ts.map +export * from './AST'; +export * from './CLIEngine'; +export * from './ESLint'; +export * from './Linter'; +export * from './ParserOptions'; +export * from './Rule'; +export * from './RuleTester'; +export * from './Scope'; +export * from './SourceCode'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts index 00a221b0..3129348e 100644 --- a/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts +++ b/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts @@ -1,3 +1,3 @@ -export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; -export { ParserServices } from '@typescript-eslint/typescript-estree/dist/parser-options'; -//# sourceMappingURL=ts-estree.d.ts.map +export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; +export { ParserServices } from '@typescript-eslint/typescript-estree/dist/parser-options'; +//# sourceMappingURL=ts-estree.d.ts.map diff --git a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts index 881d2223..644c3bd6 100644 --- a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +++ b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts @@ -1,4 +1,4 @@ -import { TSESTree } from '@typescript-eslint/types'; -declare const getKeys: (node: TSESTree.Node) => ReadonlyArray; -export { getKeys }; -//# sourceMappingURL=get-keys.d.ts.map +import { TSESTree } from '@typescript-eslint/types'; +declare const getKeys: (node: TSESTree.Node) => ReadonlyArray; +export { getKeys }; +//# sourceMappingURL=get-keys.d.ts.map diff --git a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts index f7b9a488..ed381a9a 100644 --- a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +++ b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts @@ -1,3 +1,3 @@ -export { getKeys } from './get-keys'; -export { visitorKeys, VisitorKeys } from './visitor-keys'; -//# sourceMappingURL=index.d.ts.map +export { getKeys } from './get-keys'; +export { visitorKeys, VisitorKeys } from './visitor-keys'; +//# sourceMappingURL=index.d.ts.map diff --git a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts index 1aa1f735..693637a0 100644 --- a/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +++ b/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts @@ -1,6 +1,6 @@ -interface VisitorKeys { - readonly [type: string]: readonly string[] | undefined; -} -declare const visitorKeys: VisitorKeys; -export { visitorKeys, VisitorKeys }; -//# sourceMappingURL=visitor-keys.d.ts.map +interface VisitorKeys { + readonly [type: string]: readonly string[] | undefined; +} +declare const visitorKeys: VisitorKeys; +export { visitorKeys, VisitorKeys }; +//# sourceMappingURL=visitor-keys.d.ts.map diff --git a/node_modules/@webassemblyjs/floating-point-hex-parser/LICENSE b/node_modules/@webassemblyjs/floating-point-hex-parser/LICENSE index a83ddbaa..d5471f86 100644 --- a/node_modules/@webassemblyjs/floating-point-hex-parser/LICENSE +++ b/node_modules/@webassemblyjs/floating-point-hex-parser/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2017 Mauro Bringolf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +MIT License + +Copyright (c) 2017 Mauro Bringolf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn b/node_modules/acorn-globals/node_modules/.bin/acorn deleted file mode 100644 index 46a3e61a..00000000 --- a/node_modules/acorn-globals/node_modules/.bin/acorn +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" -else - exec node "$basedir/../acorn/bin/acorn" "$@" -fi diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn b/node_modules/acorn-globals/node_modules/.bin/acorn new file mode 120000 index 00000000..cf767603 --- /dev/null +++ b/node_modules/acorn-globals/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn.cmd b/node_modules/acorn-globals/node_modules/.bin/acorn.cmd deleted file mode 100644 index a9324df9..00000000 --- a/node_modules/acorn-globals/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 b/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 deleted file mode 100644 index 6f6dcddf..00000000 --- a/node_modules/acorn-globals/node_modules/.bin/acorn.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/acorn-globals/node_modules/acorn/bin/acorn b/node_modules/acorn-globals/node_modules/acorn/bin/acorn old mode 100644 new mode 100755 diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn old mode 100644 new mode 100755 diff --git a/node_modules/ansi-html-community/bin/ansi-html b/node_modules/ansi-html-community/bin/ansi-html old mode 100644 new mode 100755 diff --git a/node_modules/autoprefixer/bin/autoprefixer b/node_modules/autoprefixer/bin/autoprefixer old mode 100644 new mode 100755 diff --git a/node_modules/axobject-query/LICENSE b/node_modules/axobject-query/LICENSE old mode 100644 new mode 100755 diff --git a/node_modules/babel-jest/node_modules/color-name/LICENSE b/node_modules/babel-jest/node_modules/color-name/LICENSE index 4d9802a8..c6b10012 100644 --- a/node_modules/babel-jest/node_modules/color-name/LICENSE +++ b/node_modules/babel-jest/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/babel-jest/node_modules/color-name/README.md b/node_modules/babel-jest/node_modules/color-name/README.md index 3611a6b5..932b9791 100644 --- a/node_modules/babel-jest/node_modules/color-name/README.md +++ b/node_modules/babel-jest/node_modules/color-name/README.md @@ -1,11 +1,11 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/babel-jest/node_modules/color-name/index.js b/node_modules/babel-jest/node_modules/color-name/index.js index e42aa68a..b7c198a6 100644 --- a/node_modules/babel-jest/node_modules/color-name/index.js +++ b/node_modules/babel-jest/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/babel-jest/node_modules/color-name/package.json b/node_modules/babel-jest/node_modules/color-name/package.json index 7acc9028..782dd828 100644 --- a/node_modules/babel-jest/node_modules/color-name/package.json +++ b/node_modules/babel-jest/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver b/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver deleted file mode 100644 index 77443e78..00000000 --- a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver b/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.cmd b/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9d..00000000 --- a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.ps1 b/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717ad..00000000 --- a/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/bin/semver.js b/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/bin/semver.js old mode 100644 new mode 100755 diff --git a/node_modules/big.js/CHANGELOG.md b/node_modules/big.js/CHANGELOG.md index 9c69eecd..86262555 100644 --- a/node_modules/big.js/CHANGELOG.md +++ b/node_modules/big.js/CHANGELOG.md @@ -1,146 +1,146 @@ -#### 5.2.2 - -* 18/10/18 -* #109 Remove opencollective dependency. - -#### 5.2.1 - -* Delete *bower.json*. - -#### 5.2.0 - -* 09/10/18 -* #63 Allow negative argument for `round`. -* #107 `sqrt` of large number. - -#### 5.1.2 - -* 24/05/18 -* #95 Add `browser` field to *package.json*. -* Restore named export to enable `import {Big}`. - -#### 5.1.1 - -* 22/05/18 -* #95 Remove named export. - -#### 5.1.0 - -* 22/05/18 -* Amend *.mjs* exports. -* Remove extension from `main` field in *package.json*. - -#### 5.0.3 - -* 23/10/17 -* #89 Optimisation of internal `round` function. - -#### 5.0.2 - -* 13/10/17 -* Update *README.md*. - -#### 5.0.1 - -* 13/10/17 -* Correct `Big.version` number. - -#### 5.0.0 - -* 13/10/17 -* Return `-0` from `valueOf` for negative zero. -* Refactor the methods which return a string. -* Amend error messaging. -* Update API document and change its colour scheme. -* Add `Big.version`. -* Remove bitcoin address. - -#### 4.0.2 - -* 28/09/17 -* Add *big.mjs* for use with Node.js with `--experimental-modules` flag. - -#### 4.0.0 - -* 27/09/17 -* Rename `Big.E_POS` to `Big.PE`, `Big.E_NEG` to `Big.NE`. -* Refactor error messaging. -* Throw if `null` is passed to `toFixed` etc. - -#### 3.2.0 - -* 14/09/17 Aid ES6 import. - -#### 3.1.3 - -* Minor documentation updates. - -#### 3.1.2 - -* README typo. - -#### 3.1.1 - -* API documentation update, including FAQ additions. - -#### 3.1.0 - -* Renamed and exposed `TO_EXP_NEG` and `TO_EXP_POS` as `Big.E_NEG` and `Big.E_POS`. - -#### 3.0.2 - -* Remove *.npmignore*, use `files` field in *package.json* instead. - -#### 3.0.1 - -* Added `sub`, `add` and `mul` aliases. -* Clean-up after lint. - -#### 3.0.0 - -* 10/12/14 Added [multiple constructor functionality](http://mikemcl.github.io/big.js/#faq). -* No breaking changes or other additions, but a major code reorganisation, so *v3* seemed appropiate. - -#### 2.5.2 - -* 1/11/14 Added bower.json. - -#### 2.5.1 - -* 8/06/14 Amend README requires. - -#### 2.5.0 - -* 26/01/14 Added `toJSON` method so serialization uses `toString`. - -#### 2.4.1 - -* 17/10/13 Conform signed zero to IEEEE 754 (2008). - -#### 2.4.0 - -* 19/09/13 Throw instances of `Error`. - -#### 2.3.0 - -* 16/09/13 Added `cmp` method. - -#### 2.2.0 - -* 11/07/13 Added 'round up' mode. - -#### 2.1.0 - -* 26/06/13 Allow e.g. `.1` and `2.`. - -#### 2.0.0 - -* 12/05/13 Added `abs` method and replaced `cmp` with `eq`, `gt`, `gte`, `lt`, and `lte` methods. - -#### 1.0.1 - -* Changed default value of MAX_DP to 1E6 - -#### 1.0.0 - -* 7/11/2012 Initial release +#### 5.2.2 + +* 18/10/18 +* #109 Remove opencollective dependency. + +#### 5.2.1 + +* Delete *bower.json*. + +#### 5.2.0 + +* 09/10/18 +* #63 Allow negative argument for `round`. +* #107 `sqrt` of large number. + +#### 5.1.2 + +* 24/05/18 +* #95 Add `browser` field to *package.json*. +* Restore named export to enable `import {Big}`. + +#### 5.1.1 + +* 22/05/18 +* #95 Remove named export. + +#### 5.1.0 + +* 22/05/18 +* Amend *.mjs* exports. +* Remove extension from `main` field in *package.json*. + +#### 5.0.3 + +* 23/10/17 +* #89 Optimisation of internal `round` function. + +#### 5.0.2 + +* 13/10/17 +* Update *README.md*. + +#### 5.0.1 + +* 13/10/17 +* Correct `Big.version` number. + +#### 5.0.0 + +* 13/10/17 +* Return `-0` from `valueOf` for negative zero. +* Refactor the methods which return a string. +* Amend error messaging. +* Update API document and change its colour scheme. +* Add `Big.version`. +* Remove bitcoin address. + +#### 4.0.2 + +* 28/09/17 +* Add *big.mjs* for use with Node.js with `--experimental-modules` flag. + +#### 4.0.0 + +* 27/09/17 +* Rename `Big.E_POS` to `Big.PE`, `Big.E_NEG` to `Big.NE`. +* Refactor error messaging. +* Throw if `null` is passed to `toFixed` etc. + +#### 3.2.0 + +* 14/09/17 Aid ES6 import. + +#### 3.1.3 + +* Minor documentation updates. + +#### 3.1.2 + +* README typo. + +#### 3.1.1 + +* API documentation update, including FAQ additions. + +#### 3.1.0 + +* Renamed and exposed `TO_EXP_NEG` and `TO_EXP_POS` as `Big.E_NEG` and `Big.E_POS`. + +#### 3.0.2 + +* Remove *.npmignore*, use `files` field in *package.json* instead. + +#### 3.0.1 + +* Added `sub`, `add` and `mul` aliases. +* Clean-up after lint. + +#### 3.0.0 + +* 10/12/14 Added [multiple constructor functionality](http://mikemcl.github.io/big.js/#faq). +* No breaking changes or other additions, but a major code reorganisation, so *v3* seemed appropiate. + +#### 2.5.2 + +* 1/11/14 Added bower.json. + +#### 2.5.1 + +* 8/06/14 Amend README requires. + +#### 2.5.0 + +* 26/01/14 Added `toJSON` method so serialization uses `toString`. + +#### 2.4.1 + +* 17/10/13 Conform signed zero to IEEEE 754 (2008). + +#### 2.4.0 + +* 19/09/13 Throw instances of `Error`. + +#### 2.3.0 + +* 16/09/13 Added `cmp` method. + +#### 2.2.0 + +* 11/07/13 Added 'round up' mode. + +#### 2.1.0 + +* 26/06/13 Allow e.g. `.1` and `2.`. + +#### 2.0.0 + +* 12/05/13 Added `abs` method and replaced `cmp` with `eq`, `gt`, `gte`, `lt`, and `lte` methods. + +#### 1.0.1 + +* Changed default value of MAX_DP to 1E6 + +#### 1.0.0 + +* 7/11/2012 Initial release diff --git a/node_modules/big.js/LICENCE b/node_modules/big.js/LICENCE index c30d30b2..f7e12c83 100644 --- a/node_modules/big.js/LICENCE +++ b/node_modules/big.js/LICENCE @@ -1,23 +1,23 @@ -The MIT Licence (Expat). - -Copyright (c) 2018 Michael Mclaughlin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - +The MIT Licence (Expat). + +Copyright (c) 2018 Michael Mclaughlin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/big.js/README.md b/node_modules/big.js/README.md index 2ecb19df..8d103e6f 100644 --- a/node_modules/big.js/README.md +++ b/node_modules/big.js/README.md @@ -1,201 +1,201 @@ -# big.js - -**A small, fast JavaScript library for arbitrary-precision decimal arithmetic.** - -The little sister to [bignumber.js](https://github.com/MikeMcl/bignumber.js/) and [decimal.js](https://github.com/MikeMcl/decimal.js/). See [here](https://github.com/MikeMcl/big.js/wiki) for some notes on the difference between them. - -## Features - - - Faster, smaller and easier-to-use than JavaScript versions of Java's BigDecimal - - Only 5.9 KB minified and 2.7 KB gzipped - - Simple API - - Replicates the `toExponential`, `toFixed` and `toPrecision` methods of JavaScript's Number type - - Includes a `sqrt` method - - Stores values in an accessible decimal floating point format - - No dependencies - - Comprehensive [documentation](http://mikemcl.github.io/big.js/) and test set - -## Set up - -The library is the single JavaScript file *big.js* (or *big.min.js*, which is *big.js* minified). - -Browser: - -```html - -``` - -[Node.js](http://nodejs.org): - -```bash -$ npm install big.js -``` - -```javascript -const Big = require('big.js'); -``` - -ES6 module: - -```javascript -import Big from 'big.mjs'; -``` -## Use - -*In all examples below, `var`, semicolons and `toString` calls are not shown. If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* - -The library exports a single function, `Big`, the constructor of Big number instances. -It accepts a value of type number, string or Big number object. - - x = new Big(123.4567) - y = Big('123456.7e-3') // 'new' is optional - z = new Big(x) - x.eq(y) && x.eq(z) && y.eq(z) // true - -A Big number is immutable in the sense that it is not changed by its methods. - - 0.3 - 0.1 // 0.19999999999999998 - x = new Big(0.3) - x.minus(0.1) // "0.2" - x // "0.3" - -The methods that return a Big number can be chained. - - x.div(y).plus(z).times(9).minus('1.234567801234567e+8').plus(976.54321).div('2598.11772') - x.sqrt().div(y).pow(3).gt(y.mod(z)) // true - -Like JavaScript's Number type, there are `toExponential`, `toFixed` and `toPrecision` methods. - - x = new Big(255.5) - x.toExponential(5) // "2.55500e+2" - x.toFixed(5) // "255.50000" - x.toPrecision(5) // "255.50" - -The arithmetic methods always return the exact result except `div`, `sqrt` and `pow` -(with negative exponent), as these methods involve division. - -The maximum number of decimal places and the rounding mode used to round the results of these methods is determined by the value of the `DP` and `RM` properties of the `Big` number constructor. - - Big.DP = 10 - Big.RM = 1 - - x = new Big(2); - y = new Big(3); - z = x.div(y) // "0.6666666667" - z.sqrt() // "0.8164965809" - z.pow(-3) // "3.3749999995" - z.times(z) // "0.44444444448888888889" - z.times(z).round(10) // "0.4444444445" - -Multiple Big number constructors can be created, each with an independent configuration. - -The value of a Big number is stored in a decimal floating point format in terms of a coefficient, exponent and sign. - - x = new Big(-123.456); - x.c // [1,2,3,4,5,6] coefficient (i.e. significand) - x.e // 2 exponent - x.s // -1 sign - -For further information see the [API](http://mikemcl.github.io/big.js/) reference from the *doc* folder. - -## Test - -The *test* directory contains the test scripts for each Big number method. - -The tests can be run with Node.js or a browser. - -To run all the tests - - $ npm test - -To test a single method - - $ node test/toFixed - -For the browser, see *single-test.html* and *every-test.html* in the *test/browser* directory. - -*big-vs-number.html* is a simple application that enables some of the methods of big.js to be compared with those of JavaScript's Number type. - -## Performance - -The *perf* directory contains two legacy applications and a *lib* directory containing the BigDecimal libraries used by both. - -*big-vs-bigdecimal.html* tests the performance of big.js against the JavaScript translations of two versions of BigDecimal, its use should be more or less self-explanatory. - -* [GWT: java.math.BigDecimal](https://github.com/iriscouch/bigdecimal.js) -* [ICU4J: com.ibm.icu.math.BigDecimal](https://github.com/dtrebbien/BigDecimal.js) - -The BigDecimal in the npm registry is the GWT version. It has some bugs, see the Node.js script *perf/lib/bigdecimal_GWT/bugs.js* for examples of flaws in its *remainder*, *divide* and *compareTo* methods. - -*bigtime.js* is a Node.js command-line application which tests the performance of big.js against the GWT version of -BigDecimal from the npm registry. - -For example, to compare the time taken by the big.js `plus` method and the BigDecimal `add` method - - $ node bigtime plus 10000 40 - -This will time 10000 calls to each, using operands of up to 40 random digits and will check that the results match. - -For help - - $ node bigtime -h - -## Build - -If [uglify-js](https://github.com/mishoo/UglifyJS2) is installed globally - - $ npm install uglify-js -g - -then - - $ npm run build - -will create *big.min.js*. - -## TypeScript - -The [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) project has a Typescript type definitions file for big.js. - - $ npm install @types/big.js - -Any questions about the TypeScript type definitions file should be addressed to the DefinitelyTyped project. - -## Feedback - -Bugs/comments/questions? - -Open an issue, or email Michael - -## Licence - -[MIT](LICENCE) - -## Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - - - -## Backers - -Thank you to all our backers! 🙠[[Become a backer](https://opencollective.com/bigjs#backer)] - - - - -## Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bigjs#sponsor)] - - - - - - - - - - - - - +# big.js + +**A small, fast JavaScript library for arbitrary-precision decimal arithmetic.** + +The little sister to [bignumber.js](https://github.com/MikeMcl/bignumber.js/) and [decimal.js](https://github.com/MikeMcl/decimal.js/). See [here](https://github.com/MikeMcl/big.js/wiki) for some notes on the difference between them. + +## Features + + - Faster, smaller and easier-to-use than JavaScript versions of Java's BigDecimal + - Only 5.9 KB minified and 2.7 KB gzipped + - Simple API + - Replicates the `toExponential`, `toFixed` and `toPrecision` methods of JavaScript's Number type + - Includes a `sqrt` method + - Stores values in an accessible decimal floating point format + - No dependencies + - Comprehensive [documentation](http://mikemcl.github.io/big.js/) and test set + +## Set up + +The library is the single JavaScript file *big.js* (or *big.min.js*, which is *big.js* minified). + +Browser: + +```html + +``` + +[Node.js](http://nodejs.org): + +```bash +$ npm install big.js +``` + +```javascript +const Big = require('big.js'); +``` + +ES6 module: + +```javascript +import Big from 'big.mjs'; +``` +## Use + +*In all examples below, `var`, semicolons and `toString` calls are not shown. If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* + +The library exports a single function, `Big`, the constructor of Big number instances. +It accepts a value of type number, string or Big number object. + + x = new Big(123.4567) + y = Big('123456.7e-3') // 'new' is optional + z = new Big(x) + x.eq(y) && x.eq(z) && y.eq(z) // true + +A Big number is immutable in the sense that it is not changed by its methods. + + 0.3 - 0.1 // 0.19999999999999998 + x = new Big(0.3) + x.minus(0.1) // "0.2" + x // "0.3" + +The methods that return a Big number can be chained. + + x.div(y).plus(z).times(9).minus('1.234567801234567e+8').plus(976.54321).div('2598.11772') + x.sqrt().div(y).pow(3).gt(y.mod(z)) // true + +Like JavaScript's Number type, there are `toExponential`, `toFixed` and `toPrecision` methods. + + x = new Big(255.5) + x.toExponential(5) // "2.55500e+2" + x.toFixed(5) // "255.50000" + x.toPrecision(5) // "255.50" + +The arithmetic methods always return the exact result except `div`, `sqrt` and `pow` +(with negative exponent), as these methods involve division. + +The maximum number of decimal places and the rounding mode used to round the results of these methods is determined by the value of the `DP` and `RM` properties of the `Big` number constructor. + + Big.DP = 10 + Big.RM = 1 + + x = new Big(2); + y = new Big(3); + z = x.div(y) // "0.6666666667" + z.sqrt() // "0.8164965809" + z.pow(-3) // "3.3749999995" + z.times(z) // "0.44444444448888888889" + z.times(z).round(10) // "0.4444444445" + +Multiple Big number constructors can be created, each with an independent configuration. + +The value of a Big number is stored in a decimal floating point format in terms of a coefficient, exponent and sign. + + x = new Big(-123.456); + x.c // [1,2,3,4,5,6] coefficient (i.e. significand) + x.e // 2 exponent + x.s // -1 sign + +For further information see the [API](http://mikemcl.github.io/big.js/) reference from the *doc* folder. + +## Test + +The *test* directory contains the test scripts for each Big number method. + +The tests can be run with Node.js or a browser. + +To run all the tests + + $ npm test + +To test a single method + + $ node test/toFixed + +For the browser, see *single-test.html* and *every-test.html* in the *test/browser* directory. + +*big-vs-number.html* is a simple application that enables some of the methods of big.js to be compared with those of JavaScript's Number type. + +## Performance + +The *perf* directory contains two legacy applications and a *lib* directory containing the BigDecimal libraries used by both. + +*big-vs-bigdecimal.html* tests the performance of big.js against the JavaScript translations of two versions of BigDecimal, its use should be more or less self-explanatory. + +* [GWT: java.math.BigDecimal](https://github.com/iriscouch/bigdecimal.js) +* [ICU4J: com.ibm.icu.math.BigDecimal](https://github.com/dtrebbien/BigDecimal.js) + +The BigDecimal in the npm registry is the GWT version. It has some bugs, see the Node.js script *perf/lib/bigdecimal_GWT/bugs.js* for examples of flaws in its *remainder*, *divide* and *compareTo* methods. + +*bigtime.js* is a Node.js command-line application which tests the performance of big.js against the GWT version of +BigDecimal from the npm registry. + +For example, to compare the time taken by the big.js `plus` method and the BigDecimal `add` method + + $ node bigtime plus 10000 40 + +This will time 10000 calls to each, using operands of up to 40 random digits and will check that the results match. + +For help + + $ node bigtime -h + +## Build + +If [uglify-js](https://github.com/mishoo/UglifyJS2) is installed globally + + $ npm install uglify-js -g + +then + + $ npm run build + +will create *big.min.js*. + +## TypeScript + +The [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) project has a Typescript type definitions file for big.js. + + $ npm install @types/big.js + +Any questions about the TypeScript type definitions file should be addressed to the DefinitelyTyped project. + +## Feedback + +Bugs/comments/questions? + +Open an issue, or email Michael + +## Licence + +[MIT](LICENCE) + +## Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + + +## Backers + +Thank you to all our backers! 🙠[[Become a backer](https://opencollective.com/bigjs#backer)] + + + + +## Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bigjs#sponsor)] + + + + + + + + + + + + + diff --git a/node_modules/big.js/big.js b/node_modules/big.js/big.js index 55f181ac..a2f201a6 100644 --- a/node_modules/big.js/big.js +++ b/node_modules/big.js/big.js @@ -1,941 +1,941 @@ -/* - * big.js v5.2.2 - * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic. - * Copyright (c) 2018 Michael Mclaughlin - * https://github.com/MikeMcl/big.js/LICENCE - */ -;(function (GLOBAL) { - 'use strict'; - var Big, - - -/************************************** EDITABLE DEFAULTS *****************************************/ - - - // The default values below must be integers within the stated ranges. - - /* - * The maximum number of decimal places (DP) of the results of operations involving division: - * div and sqrt, and pow with negative exponents. - */ - DP = 20, // 0 to MAX_DP - - /* - * The rounding mode (RM) used when rounding to the above decimal places. - * - * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN) - * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP) - * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN) - * 3 Away from zero. (ROUND_UP) - */ - RM = 1, // 0, 1, 2 or 3 - - // The maximum value of DP and Big.DP. - MAX_DP = 1E6, // 0 to 1000000 - - // The maximum magnitude of the exponent argument to the pow method. - MAX_POWER = 1E6, // 1 to 1000000 - - /* - * The negative exponent (NE) at and beneath which toString returns exponential notation. - * (JavaScript numbers: -7) - * -1000000 is the minimum recommended exponent value of a Big. - */ - NE = -7, // 0 to -1000000 - - /* - * The positive exponent (PE) at and above which toString returns exponential notation. - * (JavaScript numbers: 21) - * 1000000 is the maximum recommended exponent value of a Big. - * (This limit is not enforced or checked.) - */ - PE = 21, // 0 to 1000000 - - -/**************************************************************************************************/ - - - // Error messages. - NAME = '[big.js] ', - INVALID = NAME + 'Invalid ', - INVALID_DP = INVALID + 'decimal places', - INVALID_RM = INVALID + 'rounding mode', - DIV_BY_ZERO = NAME + 'Division by zero', - - // The shared prototype object. - P = {}, - UNDEFINED = void 0, - NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; - - - /* - * Create and return a Big constructor. - * - */ - function _Big_() { - - /* - * The Big constructor and exported function. - * Create and return a new instance of a Big number object. - * - * n {number|string|Big} A numeric value. - */ - function Big(n) { - var x = this; - - // Enable constructor usage without new. - if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); - - // Duplicate. - if (n instanceof Big) { - x.s = n.s; - x.e = n.e; - x.c = n.c.slice(); - } else { - parse(x, n); - } - - /* - * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which - * points to Object. - */ - x.constructor = Big; - } - - Big.prototype = P; - Big.DP = DP; - Big.RM = RM; - Big.NE = NE; - Big.PE = PE; - Big.version = '5.2.2'; - - return Big; - } - - - /* - * Parse the number or string value passed to a Big constructor. - * - * x {Big} A Big number instance. - * n {number|string} A numeric value. - */ - function parse(x, n) { - var e, i, nl; - - // Minus zero? - if (n === 0 && 1 / n < 0) n = '-0'; - else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number'); - - // Determine sign. - x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1; - - // Decimal point? - if ((e = n.indexOf('.')) > -1) n = n.replace('.', ''); - - // Exponential form? - if ((i = n.search(/e/i)) > 0) { - - // Determine exponent. - if (e < 0) e = i; - e += +n.slice(i + 1); - n = n.substring(0, i); - } else if (e < 0) { - - // Integer. - e = n.length; - } - - nl = n.length; - - // Determine leading zeros. - for (i = 0; i < nl && n.charAt(i) == '0';) ++i; - - if (i == nl) { - - // Zero. - x.c = [x.e = 0]; - } else { - - // Determine trailing zeros. - for (; nl > 0 && n.charAt(--nl) == '0';); - x.e = e - i - 1; - x.c = []; - - // Convert string to array of digits without leading/trailing zeros. - for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++); - } - - return x; - } - - - /* - * Round Big x to a maximum of dp decimal places using rounding mode rm. - * Called by stringify, P.div, P.round and P.sqrt. - * - * x {Big} The Big to round. - * dp {number} Integer, 0 to MAX_DP inclusive. - * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP) - * [more] {boolean} Whether the result of division was truncated. - */ - function round(x, dp, rm, more) { - var xc = x.c, - i = x.e + dp + 1; - - if (i < xc.length) { - if (rm === 1) { - - // xc[i] is the digit after the digit that may be rounded up. - more = xc[i] >= 5; - } else if (rm === 2) { - more = xc[i] > 5 || xc[i] == 5 && - (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1); - } else if (rm === 3) { - more = more || !!xc[0]; - } else { - more = false; - if (rm !== 0) throw Error(INVALID_RM); - } - - if (i < 1) { - xc.length = 1; - - if (more) { - - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - x.e = -dp; - xc[0] = 1; - } else { - - // Zero. - xc[0] = x.e = 0; - } - } else { - - // Remove any digits after the required decimal places. - xc.length = i--; - - // Round up? - if (more) { - - // Rounding up may mean the previous digit has to be rounded up. - for (; ++xc[i] > 9;) { - xc[i] = 0; - if (!i--) { - ++x.e; - xc.unshift(1); - } - } - } - - // Remove trailing zeros. - for (i = xc.length; !xc[--i];) xc.pop(); - } - } else if (rm < 0 || rm > 3 || rm !== ~~rm) { - throw Error(INVALID_RM); - } - - return x; - } - - - /* - * Return a string representing the value of Big x in normal or exponential notation. - * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf. - * - * x {Big} - * id? {number} Caller id. - * 1 toExponential - * 2 toFixed - * 3 toPrecision - * 4 valueOf - * n? {number|undefined} Caller's argument. - * k? {number|undefined} - */ - function stringify(x, id, n, k) { - var e, s, - Big = x.constructor, - z = !x.c[0]; - - if (n !== UNDEFINED) { - if (n !== ~~n || n < (id == 3) || n > MAX_DP) { - throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP); - } - - x = new Big(x); - - // The index of the digit that may be rounded up. - n = k - x.e; - - // Round? - if (x.c.length > ++k) round(x, n, Big.RM); - - // toFixed: recalculate k as x.e may have changed if value rounded up. - if (id == 2) k = x.e + n + 1; - - // Append zeros? - for (; x.c.length < k;) x.c.push(0); - } - - e = x.e; - s = x.c.join(''); - n = s.length; - - // Exponential notation? - if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) { - s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e; - - // Normal notation. - } else if (e < 0) { - for (; ++e;) s = '0' + s; - s = '0.' + s; - } else if (e > 0) { - if (++e > n) for (e -= n; e--;) s += '0'; - else if (e < n) s = s.slice(0, e) + '.' + s.slice(e); - } else if (n > 1) { - s = s.charAt(0) + '.' + s.slice(1); - } - - return x.s < 0 && (!z || id == 4) ? '-' + s : s; - } - - - // Prototype/instance methods - - - /* - * Return a new Big whose value is the absolute value of this Big. - */ - P.abs = function () { - var x = new this.constructor(this); - x.s = 1; - return x; - }; - - - /* - * Return 1 if the value of this Big is greater than the value of Big y, - * -1 if the value of this Big is less than the value of Big y, or - * 0 if they have the same value. - */ - P.cmp = function (y) { - var isneg, - x = this, - xc = x.c, - yc = (y = new x.constructor(y)).c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - - // Either zero? - if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i; - - // Signs differ? - if (i != j) return i; - - isneg = i < 0; - - // Compare exponents. - if (k != l) return k > l ^ isneg ? 1 : -1; - - j = (k = xc.length) < (l = yc.length) ? k : l; - - // Compare digit by digit. - for (i = -1; ++i < j;) { - if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1; - } - - // Compare lengths. - return k == l ? 0 : k > l ^ isneg ? 1 : -1; - }; - - - /* - * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded, - * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ - P.div = function (y) { - var x = this, - Big = x.constructor, - a = x.c, // dividend - b = (y = new Big(y)).c, // divisor - k = x.s == y.s ? 1 : -1, - dp = Big.DP; - - if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP); - - // Divisor is zero? - if (!b[0]) throw Error(DIV_BY_ZERO); - - // Dividend is 0? Return +-0. - if (!a[0]) return new Big(k * 0); - - var bl, bt, n, cmp, ri, - bz = b.slice(), - ai = bl = b.length, - al = a.length, - r = a.slice(0, bl), // remainder - rl = r.length, - q = y, // quotient - qc = q.c = [], - qi = 0, - d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result - - q.s = k; - k = d < 0 ? 0 : d; - - // Create version of divisor with leading zero. - bz.unshift(0); - - // Add zeros to make remainder as long as divisor. - for (; rl++ < bl;) r.push(0); - - do { - - // n is how many times the divisor goes into current remainder. - for (n = 0; n < 10; n++) { - - // Compare divisor and remainder. - if (bl != (rl = r.length)) { - cmp = bl > rl ? 1 : -1; - } else { - for (ri = -1, cmp = 0; ++ri < bl;) { - if (b[ri] != r[ri]) { - cmp = b[ri] > r[ri] ? 1 : -1; - break; - } - } - } - - // If divisor < remainder, subtract divisor from remainder. - if (cmp < 0) { - - // Remainder can't be more than 1 digit longer than divisor. - // Equalise lengths using divisor with extra leading zero? - for (bt = rl == bl ? b : bz; rl;) { - if (r[--rl] < bt[rl]) { - ri = rl; - for (; ri && !r[--ri];) r[ri] = 9; - --r[ri]; - r[rl] += 10; - } - r[rl] -= bt[rl]; - } - - for (; !r[0];) r.shift(); - } else { - break; - } - } - - // Add the digit n to the result array. - qc[qi++] = cmp ? n : ++n; - - // Update the remainder. - if (r[0] && cmp) r[rl] = a[ai] || 0; - else r = [a[ai]]; - - } while ((ai++ < al || r[0] !== UNDEFINED) && k--); - - // Leading zero? Do not remove if result is simply zero (qi == 1). - if (!qc[0] && qi != 1) { - - // There can't be more than one zero. - qc.shift(); - q.e--; - } - - // Round? - if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED); - - return q; - }; - - - /* - * Return true if the value of this Big is equal to the value of Big y, otherwise return false. - */ - P.eq = function (y) { - return !this.cmp(y); - }; - - - /* - * Return true if the value of this Big is greater than the value of Big y, otherwise return - * false. - */ - P.gt = function (y) { - return this.cmp(y) > 0; - }; - - - /* - * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise - * return false. - */ - P.gte = function (y) { - return this.cmp(y) > -1; - }; - - - /* - * Return true if the value of this Big is less than the value of Big y, otherwise return false. - */ - P.lt = function (y) { - return this.cmp(y) < 0; - }; - - - /* - * Return true if the value of this Big is less than or equal to the value of Big y, otherwise - * return false. - */ - P.lte = function (y) { - return this.cmp(y) < 1; - }; - - - /* - * Return a new Big whose value is the value of this Big minus the value of Big y. - */ - P.minus = P.sub = function (y) { - var i, j, t, xlty, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.plus(y); - } - - var xc = x.c.slice(), - xe = x.e, - yc = y.c, - ye = y.e; - - // Either zero? - if (!xc[0] || !yc[0]) { - - // y is non-zero? x is non-zero? Or both are zero. - return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0); - } - - // Determine which is the bigger number. Prepend zeros to equalise exponents. - if (a = xe - ye) { - - if (xlty = a < 0) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; - } - - t.reverse(); - for (b = a; b--;) t.push(0); - t.reverse(); - } else { - - // Exponents equal. Check digit by digit. - j = ((xlty = xc.length < yc.length) ? xc : yc).length; - - for (a = b = 0; b < j; b++) { - if (xc[b] != yc[b]) { - xlty = xc[b] < yc[b]; - break; - } - } - } - - // x < y? Point xc to the array of the bigger number. - if (xlty) { - t = xc; - xc = yc; - yc = t; - y.s = -y.s; - } - - /* - * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only - * needs to start at yc.length. - */ - if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0; - - // Subtract yc from xc. - for (b = i; j > a;) { - if (xc[--j] < yc[j]) { - for (i = j; i && !xc[--i];) xc[i] = 9; - --xc[i]; - xc[j] += 10; - } - - xc[j] -= yc[j]; - } - - // Remove trailing zeros. - for (; xc[--b] === 0;) xc.pop(); - - // Remove leading zeros and adjust exponent accordingly. - for (; xc[0] === 0;) { - xc.shift(); - --ye; - } - - if (!xc[0]) { - - // n - n = +0 - y.s = 1; - - // Result must be zero. - xc = [ye = 0]; - } - - y.c = xc; - y.e = ye; - - return y; - }; - - - /* - * Return a new Big whose value is the value of this Big modulo the value of Big y. - */ - P.mod = function (y) { - var ygtx, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - if (!y.c[0]) throw Error(DIV_BY_ZERO); - - x.s = y.s = 1; - ygtx = y.cmp(x) == 1; - x.s = a; - y.s = b; - - if (ygtx) return new Big(x); - - a = Big.DP; - b = Big.RM; - Big.DP = Big.RM = 0; - x = x.div(y); - Big.DP = a; - Big.RM = b; - - return this.minus(x.times(y)); - }; - - - /* - * Return a new Big whose value is the value of this Big plus the value of Big y. - */ - P.plus = P.add = function (y) { - var t, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.minus(y); - } - - var xe = x.e, - xc = x.c, - ye = y.e, - yc = y.c; - - // Either zero? y is non-zero? x is non-zero? Or both are zero. - if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0); - - xc = xc.slice(); - - // Prepend zeros to equalise exponents. - // Note: reverse faster than unshifts. - if (a = xe - ye) { - if (a > 0) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; - } - - t.reverse(); - for (; a--;) t.push(0); - t.reverse(); - } - - // Point xc to the longer array. - if (xc.length - yc.length < 0) { - t = yc; - yc = xc; - xc = t; - } - - a = yc.length; - - // Only start adding at yc.length - 1 as the further digits of xc can be left as they are. - for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0; - - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - - if (b) { - xc.unshift(b); - ++ye; - } - - // Remove trailing zeros. - for (a = xc.length; xc[--a] === 0;) xc.pop(); - - y.c = xc; - y.e = ye; - - return y; - }; - - - /* - * Return a Big whose value is the value of this Big raised to the power n. - * If n is negative, round to a maximum of Big.DP decimal places using rounding - * mode Big.RM. - * - * n {number} Integer, -MAX_POWER to MAX_POWER inclusive. - */ - P.pow = function (n) { - var x = this, - one = new x.constructor(1), - y = one, - isneg = n < 0; - - if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent'); - if (isneg) n = -n; - - for (;;) { - if (n & 1) y = y.times(x); - n >>= 1; - if (!n) break; - x = x.times(x); - } - - return isneg ? one.div(y) : y; - }; - - - /* - * Return a new Big whose value is the value of this Big rounded using rounding mode rm - * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a - * multiple of 10**-dp. - * If dp is not specified, round to 0 decimal places. - * If rm is not specified, use Big.RM. - * - * dp? {number} Integer, -MAX_DP to MAX_DP inclusive. - * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP) - */ - P.round = function (dp, rm) { - var Big = this.constructor; - if (dp === UNDEFINED) dp = 0; - else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP); - return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm); - }; - - - /* - * Return a new Big whose value is the square root of the value of this Big, rounded, if - * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ - P.sqrt = function () { - var r, c, t, - x = this, - Big = x.constructor, - s = x.s, - e = x.e, - half = new Big(0.5); - - // Zero? - if (!x.c[0]) return new Big(x); - - // Negative? - if (s < 0) throw Error(NAME + 'No square root'); - - // Estimate. - s = Math.sqrt(x + ''); - - // Math.sqrt underflow/overflow? - // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent. - if (s === 0 || s === 1 / 0) { - c = x.c.join(''); - if (!(c.length + e & 1)) c += '0'; - s = Math.sqrt(c); - e = ((e + 1) / 2 | 0) - (e < 0 || e & 1); - r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e); - } else { - r = new Big(s); - } - - e = r.e + (Big.DP += 4); - - // Newton-Raphson iteration. - do { - t = r; - r = half.times(t.plus(x.div(t))); - } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join('')); - - return round(r, Big.DP -= 4, Big.RM); - }; - - - /* - * Return a new Big whose value is the value of this Big times the value of Big y. - */ - P.times = P.mul = function (y) { - var c, - x = this, - Big = x.constructor, - xc = x.c, - yc = (y = new Big(y)).c, - a = xc.length, - b = yc.length, - i = x.e, - j = y.e; - - // Determine sign of result. - y.s = x.s == y.s ? 1 : -1; - - // Return signed 0 if either 0. - if (!xc[0] || !yc[0]) return new Big(y.s * 0); - - // Initialise exponent of result as x.e + y.e. - y.e = i + j; - - // If array xc has fewer digits than yc, swap xc and yc, and lengths. - if (a < b) { - c = xc; - xc = yc; - yc = c; - j = a; - a = b; - b = j; - } - - // Initialise coefficient array of result with zeros. - for (c = new Array(j = a + b); j--;) c[j] = 0; - - // Multiply. - - // i is initially xc.length. - for (i = b; i--;) { - b = 0; - - // a is yc.length. - for (j = a + i; j > i;) { - - // Current sum of products at this digit position, plus carry. - b = c[j] + yc[i] * xc[j - i - 1] + b; - c[j--] = b % 10; - - // carry - b = b / 10 | 0; - } - - c[j] = (c[j] + b) % 10; - } - - // Increment result exponent if there is a final carry, otherwise remove leading zero. - if (b) ++y.e; - else c.shift(); - - // Remove trailing zeros. - for (i = c.length; !c[--i];) c.pop(); - y.c = c; - - return y; - }; - - - /* - * Return a string representing the value of this Big in exponential notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - */ - P.toExponential = function (dp) { - return stringify(this, 1, dp, dp); - }; - - - /* - * Return a string representing the value of this Big in normal notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - * - * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. - * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. - */ - P.toFixed = function (dp) { - return stringify(this, 2, dp, this.e + dp); - }; - - - /* - * Return a string representing the value of this Big rounded to sd significant digits using - * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent - * the integer part of the value in normal notation. - * - * sd {number} Integer, 1 to MAX_DP inclusive. - */ - P.toPrecision = function (sd) { - return stringify(this, 3, sd, sd - 1); - }; - - - /* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Omit the sign for negative zero. - */ - P.toString = function () { - return stringify(this); - }; - - - /* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Include the sign for negative zero. - */ - P.valueOf = P.toJSON = function () { - return stringify(this, 4); - }; - - - // Export - - - Big = _Big_(); - - Big['default'] = Big.Big = Big; - - //AMD. - if (typeof define === 'function' && define.amd) { - define(function () { return Big; }); - - // Node and other CommonJS-like environments that support module.exports. - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = Big; - - //Browser. - } else { - GLOBAL.Big = Big; - } -})(this); +/* + * big.js v5.2.2 + * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic. + * Copyright (c) 2018 Michael Mclaughlin + * https://github.com/MikeMcl/big.js/LICENCE + */ +;(function (GLOBAL) { + 'use strict'; + var Big, + + +/************************************** EDITABLE DEFAULTS *****************************************/ + + + // The default values below must be integers within the stated ranges. + + /* + * The maximum number of decimal places (DP) of the results of operations involving division: + * div and sqrt, and pow with negative exponents. + */ + DP = 20, // 0 to MAX_DP + + /* + * The rounding mode (RM) used when rounding to the above decimal places. + * + * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN) + * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP) + * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN) + * 3 Away from zero. (ROUND_UP) + */ + RM = 1, // 0, 1, 2 or 3 + + // The maximum value of DP and Big.DP. + MAX_DP = 1E6, // 0 to 1000000 + + // The maximum magnitude of the exponent argument to the pow method. + MAX_POWER = 1E6, // 1 to 1000000 + + /* + * The negative exponent (NE) at and beneath which toString returns exponential notation. + * (JavaScript numbers: -7) + * -1000000 is the minimum recommended exponent value of a Big. + */ + NE = -7, // 0 to -1000000 + + /* + * The positive exponent (PE) at and above which toString returns exponential notation. + * (JavaScript numbers: 21) + * 1000000 is the maximum recommended exponent value of a Big. + * (This limit is not enforced or checked.) + */ + PE = 21, // 0 to 1000000 + + +/**************************************************************************************************/ + + + // Error messages. + NAME = '[big.js] ', + INVALID = NAME + 'Invalid ', + INVALID_DP = INVALID + 'decimal places', + INVALID_RM = INVALID + 'rounding mode', + DIV_BY_ZERO = NAME + 'Division by zero', + + // The shared prototype object. + P = {}, + UNDEFINED = void 0, + NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; + + + /* + * Create and return a Big constructor. + * + */ + function _Big_() { + + /* + * The Big constructor and exported function. + * Create and return a new instance of a Big number object. + * + * n {number|string|Big} A numeric value. + */ + function Big(n) { + var x = this; + + // Enable constructor usage without new. + if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); + + // Duplicate. + if (n instanceof Big) { + x.s = n.s; + x.e = n.e; + x.c = n.c.slice(); + } else { + parse(x, n); + } + + /* + * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which + * points to Object. + */ + x.constructor = Big; + } + + Big.prototype = P; + Big.DP = DP; + Big.RM = RM; + Big.NE = NE; + Big.PE = PE; + Big.version = '5.2.2'; + + return Big; + } + + + /* + * Parse the number or string value passed to a Big constructor. + * + * x {Big} A Big number instance. + * n {number|string} A numeric value. + */ + function parse(x, n) { + var e, i, nl; + + // Minus zero? + if (n === 0 && 1 / n < 0) n = '-0'; + else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number'); + + // Determine sign. + x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1; + + // Decimal point? + if ((e = n.indexOf('.')) > -1) n = n.replace('.', ''); + + // Exponential form? + if ((i = n.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +n.slice(i + 1); + n = n.substring(0, i); + } else if (e < 0) { + + // Integer. + e = n.length; + } + + nl = n.length; + + // Determine leading zeros. + for (i = 0; i < nl && n.charAt(i) == '0';) ++i; + + if (i == nl) { + + // Zero. + x.c = [x.e = 0]; + } else { + + // Determine trailing zeros. + for (; nl > 0 && n.charAt(--nl) == '0';); + x.e = e - i - 1; + x.c = []; + + // Convert string to array of digits without leading/trailing zeros. + for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++); + } + + return x; + } + + + /* + * Round Big x to a maximum of dp decimal places using rounding mode rm. + * Called by stringify, P.div, P.round and P.sqrt. + * + * x {Big} The Big to round. + * dp {number} Integer, 0 to MAX_DP inclusive. + * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP) + * [more] {boolean} Whether the result of division was truncated. + */ + function round(x, dp, rm, more) { + var xc = x.c, + i = x.e + dp + 1; + + if (i < xc.length) { + if (rm === 1) { + + // xc[i] is the digit after the digit that may be rounded up. + more = xc[i] >= 5; + } else if (rm === 2) { + more = xc[i] > 5 || xc[i] == 5 && + (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1); + } else if (rm === 3) { + more = more || !!xc[0]; + } else { + more = false; + if (rm !== 0) throw Error(INVALID_RM); + } + + if (i < 1) { + xc.length = 1; + + if (more) { + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + x.e = -dp; + xc[0] = 1; + } else { + + // Zero. + xc[0] = x.e = 0; + } + } else { + + // Remove any digits after the required decimal places. + xc.length = i--; + + // Round up? + if (more) { + + // Rounding up may mean the previous digit has to be rounded up. + for (; ++xc[i] > 9;) { + xc[i] = 0; + if (!i--) { + ++x.e; + xc.unshift(1); + } + } + } + + // Remove trailing zeros. + for (i = xc.length; !xc[--i];) xc.pop(); + } + } else if (rm < 0 || rm > 3 || rm !== ~~rm) { + throw Error(INVALID_RM); + } + + return x; + } + + + /* + * Return a string representing the value of Big x in normal or exponential notation. + * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf. + * + * x {Big} + * id? {number} Caller id. + * 1 toExponential + * 2 toFixed + * 3 toPrecision + * 4 valueOf + * n? {number|undefined} Caller's argument. + * k? {number|undefined} + */ + function stringify(x, id, n, k) { + var e, s, + Big = x.constructor, + z = !x.c[0]; + + if (n !== UNDEFINED) { + if (n !== ~~n || n < (id == 3) || n > MAX_DP) { + throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP); + } + + x = new Big(x); + + // The index of the digit that may be rounded up. + n = k - x.e; + + // Round? + if (x.c.length > ++k) round(x, n, Big.RM); + + // toFixed: recalculate k as x.e may have changed if value rounded up. + if (id == 2) k = x.e + n + 1; + + // Append zeros? + for (; x.c.length < k;) x.c.push(0); + } + + e = x.e; + s = x.c.join(''); + n = s.length; + + // Exponential notation? + if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) { + s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e; + + // Normal notation. + } else if (e < 0) { + for (; ++e;) s = '0' + s; + s = '0.' + s; + } else if (e > 0) { + if (++e > n) for (e -= n; e--;) s += '0'; + else if (e < n) s = s.slice(0, e) + '.' + s.slice(e); + } else if (n > 1) { + s = s.charAt(0) + '.' + s.slice(1); + } + + return x.s < 0 && (!z || id == 4) ? '-' + s : s; + } + + + // Prototype/instance methods + + + /* + * Return a new Big whose value is the absolute value of this Big. + */ + P.abs = function () { + var x = new this.constructor(this); + x.s = 1; + return x; + }; + + + /* + * Return 1 if the value of this Big is greater than the value of Big y, + * -1 if the value of this Big is less than the value of Big y, or + * 0 if they have the same value. + */ + P.cmp = function (y) { + var isneg, + x = this, + xc = x.c, + yc = (y = new x.constructor(y)).c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either zero? + if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i; + + // Signs differ? + if (i != j) return i; + + isneg = i < 0; + + // Compare exponents. + if (k != l) return k > l ^ isneg ? 1 : -1; + + j = (k = xc.length) < (l = yc.length) ? k : l; + + // Compare digit by digit. + for (i = -1; ++i < j;) { + if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1; + } + + // Compare lengths. + return k == l ? 0 : k > l ^ isneg ? 1 : -1; + }; + + + /* + * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded, + * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. + */ + P.div = function (y) { + var x = this, + Big = x.constructor, + a = x.c, // dividend + b = (y = new Big(y)).c, // divisor + k = x.s == y.s ? 1 : -1, + dp = Big.DP; + + if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP); + + // Divisor is zero? + if (!b[0]) throw Error(DIV_BY_ZERO); + + // Dividend is 0? Return +-0. + if (!a[0]) return new Big(k * 0); + + var bl, bt, n, cmp, ri, + bz = b.slice(), + ai = bl = b.length, + al = a.length, + r = a.slice(0, bl), // remainder + rl = r.length, + q = y, // quotient + qc = q.c = [], + qi = 0, + d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result + + q.s = k; + k = d < 0 ? 0 : d; + + // Create version of divisor with leading zero. + bz.unshift(0); + + // Add zeros to make remainder as long as divisor. + for (; rl++ < bl;) r.push(0); + + do { + + // n is how many times the divisor goes into current remainder. + for (n = 0; n < 10; n++) { + + // Compare divisor and remainder. + if (bl != (rl = r.length)) { + cmp = bl > rl ? 1 : -1; + } else { + for (ri = -1, cmp = 0; ++ri < bl;) { + if (b[ri] != r[ri]) { + cmp = b[ri] > r[ri] ? 1 : -1; + break; + } + } + } + + // If divisor < remainder, subtract divisor from remainder. + if (cmp < 0) { + + // Remainder can't be more than 1 digit longer than divisor. + // Equalise lengths using divisor with extra leading zero? + for (bt = rl == bl ? b : bz; rl;) { + if (r[--rl] < bt[rl]) { + ri = rl; + for (; ri && !r[--ri];) r[ri] = 9; + --r[ri]; + r[rl] += 10; + } + r[rl] -= bt[rl]; + } + + for (; !r[0];) r.shift(); + } else { + break; + } + } + + // Add the digit n to the result array. + qc[qi++] = cmp ? n : ++n; + + // Update the remainder. + if (r[0] && cmp) r[rl] = a[ai] || 0; + else r = [a[ai]]; + + } while ((ai++ < al || r[0] !== UNDEFINED) && k--); + + // Leading zero? Do not remove if result is simply zero (qi == 1). + if (!qc[0] && qi != 1) { + + // There can't be more than one zero. + qc.shift(); + q.e--; + } + + // Round? + if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED); + + return q; + }; + + + /* + * Return true if the value of this Big is equal to the value of Big y, otherwise return false. + */ + P.eq = function (y) { + return !this.cmp(y); + }; + + + /* + * Return true if the value of this Big is greater than the value of Big y, otherwise return + * false. + */ + P.gt = function (y) { + return this.cmp(y) > 0; + }; + + + /* + * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise + * return false. + */ + P.gte = function (y) { + return this.cmp(y) > -1; + }; + + + /* + * Return true if the value of this Big is less than the value of Big y, otherwise return false. + */ + P.lt = function (y) { + return this.cmp(y) < 0; + }; + + + /* + * Return true if the value of this Big is less than or equal to the value of Big y, otherwise + * return false. + */ + P.lte = function (y) { + return this.cmp(y) < 1; + }; + + + /* + * Return a new Big whose value is the value of this Big minus the value of Big y. + */ + P.minus = P.sub = function (y) { + var i, j, t, xlty, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + // Signs differ? + if (a != b) { + y.s = -b; + return x.plus(y); + } + + var xc = x.c.slice(), + xe = x.e, + yc = y.c, + ye = y.e; + + // Either zero? + if (!xc[0] || !yc[0]) { + + // y is non-zero? x is non-zero? Or both are zero. + return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0); + } + + // Determine which is the bigger number. Prepend zeros to equalise exponents. + if (a = xe - ye) { + + if (xlty = a < 0) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + for (b = a; b--;) t.push(0); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = ((xlty = xc.length < yc.length) ? xc : yc).length; + + for (a = b = 0; b < j; b++) { + if (xc[b] != yc[b]) { + xlty = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xlty) { + t = xc; + xc = yc; + yc = t; + y.s = -y.s; + } + + /* + * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only + * needs to start at yc.length. + */ + if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0; + + // Subtract yc from xc. + for (b = i; j > a;) { + if (xc[--j] < yc[j]) { + for (i = j; i && !xc[--i];) xc[i] = 9; + --xc[i]; + xc[j] += 10; + } + + xc[j] -= yc[j]; + } + + // Remove trailing zeros. + for (; xc[--b] === 0;) xc.pop(); + + // Remove leading zeros and adjust exponent accordingly. + for (; xc[0] === 0;) { + xc.shift(); + --ye; + } + + if (!xc[0]) { + + // n - n = +0 + y.s = 1; + + // Result must be zero. + xc = [ye = 0]; + } + + y.c = xc; + y.e = ye; + + return y; + }; + + + /* + * Return a new Big whose value is the value of this Big modulo the value of Big y. + */ + P.mod = function (y) { + var ygtx, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + if (!y.c[0]) throw Error(DIV_BY_ZERO); + + x.s = y.s = 1; + ygtx = y.cmp(x) == 1; + x.s = a; + y.s = b; + + if (ygtx) return new Big(x); + + a = Big.DP; + b = Big.RM; + Big.DP = Big.RM = 0; + x = x.div(y); + Big.DP = a; + Big.RM = b; + + return this.minus(x.times(y)); + }; + + + /* + * Return a new Big whose value is the value of this Big plus the value of Big y. + */ + P.plus = P.add = function (y) { + var t, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + // Signs differ? + if (a != b) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e, + xc = x.c, + ye = y.e, + yc = y.c; + + // Either zero? y is non-zero? x is non-zero? Or both are zero. + if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0); + + xc = xc.slice(); + + // Prepend zeros to equalise exponents. + // Note: reverse faster than unshifts. + if (a = xe - ye) { + if (a > 0) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for (; a--;) t.push(0); + t.reverse(); + } + + // Point xc to the longer array. + if (xc.length - yc.length < 0) { + t = yc; + yc = xc; + xc = t; + } + + a = yc.length; + + // Only start adding at yc.length - 1 as the further digits of xc can be left as they are. + for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0; + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + + if (b) { + xc.unshift(b); + ++ye; + } + + // Remove trailing zeros. + for (a = xc.length; xc[--a] === 0;) xc.pop(); + + y.c = xc; + y.e = ye; + + return y; + }; + + + /* + * Return a Big whose value is the value of this Big raised to the power n. + * If n is negative, round to a maximum of Big.DP decimal places using rounding + * mode Big.RM. + * + * n {number} Integer, -MAX_POWER to MAX_POWER inclusive. + */ + P.pow = function (n) { + var x = this, + one = new x.constructor(1), + y = one, + isneg = n < 0; + + if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent'); + if (isneg) n = -n; + + for (;;) { + if (n & 1) y = y.times(x); + n >>= 1; + if (!n) break; + x = x.times(x); + } + + return isneg ? one.div(y) : y; + }; + + + /* + * Return a new Big whose value is the value of this Big rounded using rounding mode rm + * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a + * multiple of 10**-dp. + * If dp is not specified, round to 0 decimal places. + * If rm is not specified, use Big.RM. + * + * dp? {number} Integer, -MAX_DP to MAX_DP inclusive. + * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP) + */ + P.round = function (dp, rm) { + var Big = this.constructor; + if (dp === UNDEFINED) dp = 0; + else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP); + return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm); + }; + + + /* + * Return a new Big whose value is the square root of the value of this Big, rounded, if + * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. + */ + P.sqrt = function () { + var r, c, t, + x = this, + Big = x.constructor, + s = x.s, + e = x.e, + half = new Big(0.5); + + // Zero? + if (!x.c[0]) return new Big(x); + + // Negative? + if (s < 0) throw Error(NAME + 'No square root'); + + // Estimate. + s = Math.sqrt(x + ''); + + // Math.sqrt underflow/overflow? + // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent. + if (s === 0 || s === 1 / 0) { + c = x.c.join(''); + if (!(c.length + e & 1)) c += '0'; + s = Math.sqrt(c); + e = ((e + 1) / 2 | 0) - (e < 0 || e & 1); + r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e); + } else { + r = new Big(s); + } + + e = r.e + (Big.DP += 4); + + // Newton-Raphson iteration. + do { + t = r; + r = half.times(t.plus(x.div(t))); + } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join('')); + + return round(r, Big.DP -= 4, Big.RM); + }; + + + /* + * Return a new Big whose value is the value of this Big times the value of Big y. + */ + P.times = P.mul = function (y) { + var c, + x = this, + Big = x.constructor, + xc = x.c, + yc = (y = new Big(y)).c, + a = xc.length, + b = yc.length, + i = x.e, + j = y.e; + + // Determine sign of result. + y.s = x.s == y.s ? 1 : -1; + + // Return signed 0 if either 0. + if (!xc[0] || !yc[0]) return new Big(y.s * 0); + + // Initialise exponent of result as x.e + y.e. + y.e = i + j; + + // If array xc has fewer digits than yc, swap xc and yc, and lengths. + if (a < b) { + c = xc; + xc = yc; + yc = c; + j = a; + a = b; + b = j; + } + + // Initialise coefficient array of result with zeros. + for (c = new Array(j = a + b); j--;) c[j] = 0; + + // Multiply. + + // i is initially xc.length. + for (i = b; i--;) { + b = 0; + + // a is yc.length. + for (j = a + i; j > i;) { + + // Current sum of products at this digit position, plus carry. + b = c[j] + yc[i] * xc[j - i - 1] + b; + c[j--] = b % 10; + + // carry + b = b / 10 | 0; + } + + c[j] = (c[j] + b) % 10; + } + + // Increment result exponent if there is a final carry, otherwise remove leading zero. + if (b) ++y.e; + else c.shift(); + + // Remove trailing zeros. + for (i = c.length; !c[--i];) c.pop(); + y.c = c; + + return y; + }; + + + /* + * Return a string representing the value of this Big in exponential notation to dp fixed decimal + * places and rounded using Big.RM. + * + * dp? {number} Integer, 0 to MAX_DP inclusive. + */ + P.toExponential = function (dp) { + return stringify(this, 1, dp, dp); + }; + + + /* + * Return a string representing the value of this Big in normal notation to dp fixed decimal + * places and rounded using Big.RM. + * + * dp? {number} Integer, 0 to MAX_DP inclusive. + * + * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. + * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. + */ + P.toFixed = function (dp) { + return stringify(this, 2, dp, this.e + dp); + }; + + + /* + * Return a string representing the value of this Big rounded to sd significant digits using + * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent + * the integer part of the value in normal notation. + * + * sd {number} Integer, 1 to MAX_DP inclusive. + */ + P.toPrecision = function (sd) { + return stringify(this, 3, sd, sd - 1); + }; + + + /* + * Return a string representing the value of this Big. + * Return exponential notation if this Big has a positive exponent equal to or greater than + * Big.PE, or a negative exponent equal to or less than Big.NE. + * Omit the sign for negative zero. + */ + P.toString = function () { + return stringify(this); + }; + + + /* + * Return a string representing the value of this Big. + * Return exponential notation if this Big has a positive exponent equal to or greater than + * Big.PE, or a negative exponent equal to or less than Big.NE. + * Include the sign for negative zero. + */ + P.valueOf = P.toJSON = function () { + return stringify(this, 4); + }; + + + // Export + + + Big = _Big_(); + + Big['default'] = Big.Big = Big; + + //AMD. + if (typeof define === 'function' && define.amd) { + define(function () { return Big; }); + + // Node and other CommonJS-like environments that support module.exports. + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = Big; + + //Browser. + } else { + GLOBAL.Big = Big; + } +})(this); diff --git a/node_modules/big.js/big.min.js b/node_modules/big.js/big.min.js index eb82fe80..0fb1b68f 100644 --- a/node_modules/big.js/big.min.js +++ b/node_modules/big.js/big.min.js @@ -1,2 +1,2 @@ -/* big.js v5.2.2 https://github.com/MikeMcl/big.js/LICENCE */ +/* big.js v5.2.2 https://github.com/MikeMcl/big.js/LICENCE */ !function(e){"use strict";var r,i=20,s=1,P=1e6,o=-7,f=21,c="[big.js] ",u=c+"Invalid ",b=u+"decimal places",h=u+"rounding mode",x=c+"Division by zero",l={},D=void 0,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function R(e,r,t,n){var i=e.c,s=e.e+r+1;if(s++n&&R(e,t,o.RM),2==r&&(n=e.e+t+1);e.c.length=o.PE))s=s.charAt(0)+(1t)for(i-=t;i--;)s+="0";else ii[s]^r?1:-1;return f==c?0:cw[l]?1:-1;break}if(!(h<0))break;for(c=d==f?i:a;d;){if(w[--d]>=1;)r=r.times(r);return i?t.div(n):n},l.round=function(e,r){var t=this.constructor;if(e===D)e=0;else if(e!==~~e||e<-P||P - * https://github.com/MikeMcl/big.js/LICENCE - */ - - -/************************************** EDITABLE DEFAULTS *****************************************/ - - - // The default values below must be integers within the stated ranges. - - /* - * The maximum number of decimal places (DP) of the results of operations involving division: - * div and sqrt, and pow with negative exponents. - */ -var DP = 20, // 0 to MAX_DP - - /* - * The rounding mode (RM) used when rounding to the above decimal places. - * - * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN) - * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP) - * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN) - * 3 Away from zero. (ROUND_UP) - */ - RM = 1, // 0, 1, 2 or 3 - - // The maximum value of DP and Big.DP. - MAX_DP = 1E6, // 0 to 1000000 - - // The maximum magnitude of the exponent argument to the pow method. - MAX_POWER = 1E6, // 1 to 1000000 - - /* - * The negative exponent (NE) at and beneath which toString returns exponential notation. - * (JavaScript numbers: -7) - * -1000000 is the minimum recommended exponent value of a Big. - */ - NE = -7, // 0 to -1000000 - - /* - * The positive exponent (PE) at and above which toString returns exponential notation. - * (JavaScript numbers: 21) - * 1000000 is the maximum recommended exponent value of a Big. - * (This limit is not enforced or checked.) - */ - PE = 21, // 0 to 1000000 - - -/**************************************************************************************************/ - - - // Error messages. - NAME = '[big.js] ', - INVALID = NAME + 'Invalid ', - INVALID_DP = INVALID + 'decimal places', - INVALID_RM = INVALID + 'rounding mode', - DIV_BY_ZERO = NAME + 'Division by zero', - - // The shared prototype object. - P = {}, - UNDEFINED = void 0, - NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; - - -/* - * Create and return a Big constructor. - * - */ -function _Big_() { - - /* - * The Big constructor and exported function. - * Create and return a new instance of a Big number object. - * - * n {number|string|Big} A numeric value. - */ - function Big(n) { - var x = this; - - // Enable constructor usage without new. - if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); - - // Duplicate. - if (n instanceof Big) { - x.s = n.s; - x.e = n.e; - x.c = n.c.slice(); - } else { - parse(x, n); - } - - /* - * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which - * points to Object. - */ - x.constructor = Big; - } - - Big.prototype = P; - Big.DP = DP; - Big.RM = RM; - Big.NE = NE; - Big.PE = PE; - Big.version = '5.2.2'; - - return Big; -} - - -/* - * Parse the number or string value passed to a Big constructor. - * - * x {Big} A Big number instance. - * n {number|string} A numeric value. - */ -function parse(x, n) { - var e, i, nl; - - // Minus zero? - if (n === 0 && 1 / n < 0) n = '-0'; - else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number'); - - // Determine sign. - x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1; - - // Decimal point? - if ((e = n.indexOf('.')) > -1) n = n.replace('.', ''); - - // Exponential form? - if ((i = n.search(/e/i)) > 0) { - - // Determine exponent. - if (e < 0) e = i; - e += +n.slice(i + 1); - n = n.substring(0, i); - } else if (e < 0) { - - // Integer. - e = n.length; - } - - nl = n.length; - - // Determine leading zeros. - for (i = 0; i < nl && n.charAt(i) == '0';) ++i; - - if (i == nl) { - - // Zero. - x.c = [x.e = 0]; - } else { - - // Determine trailing zeros. - for (; nl > 0 && n.charAt(--nl) == '0';); - x.e = e - i - 1; - x.c = []; - - // Convert string to array of digits without leading/trailing zeros. - for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++); - } - - return x; -} - - -/* - * Round Big x to a maximum of dp decimal places using rounding mode rm. - * Called by stringify, P.div, P.round and P.sqrt. - * - * x {Big} The Big to round. - * dp {number} Integer, 0 to MAX_DP inclusive. - * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP) - * [more] {boolean} Whether the result of division was truncated. - */ -function round(x, dp, rm, more) { - var xc = x.c, - i = x.e + dp + 1; - - if (i < xc.length) { - if (rm === 1) { - - // xc[i] is the digit after the digit that may be rounded up. - more = xc[i] >= 5; - } else if (rm === 2) { - more = xc[i] > 5 || xc[i] == 5 && - (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1); - } else if (rm === 3) { - more = more || !!xc[0]; - } else { - more = false; - if (rm !== 0) throw Error(INVALID_RM); - } - - if (i < 1) { - xc.length = 1; - - if (more) { - - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - x.e = -dp; - xc[0] = 1; - } else { - - // Zero. - xc[0] = x.e = 0; - } - } else { - - // Remove any digits after the required decimal places. - xc.length = i--; - - // Round up? - if (more) { - - // Rounding up may mean the previous digit has to be rounded up. - for (; ++xc[i] > 9;) { - xc[i] = 0; - if (!i--) { - ++x.e; - xc.unshift(1); - } - } - } - - // Remove trailing zeros. - for (i = xc.length; !xc[--i];) xc.pop(); - } - } else if (rm < 0 || rm > 3 || rm !== ~~rm) { - throw Error(INVALID_RM); - } - - return x; -} - - -/* - * Return a string representing the value of Big x in normal or exponential notation. - * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf. - * - * x {Big} - * id? {number} Caller id. - * 1 toExponential - * 2 toFixed - * 3 toPrecision - * 4 valueOf - * n? {number|undefined} Caller's argument. - * k? {number|undefined} - */ -function stringify(x, id, n, k) { - var e, s, - Big = x.constructor, - z = !x.c[0]; - - if (n !== UNDEFINED) { - if (n !== ~~n || n < (id == 3) || n > MAX_DP) { - throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP); - } - - x = new Big(x); - - // The index of the digit that may be rounded up. - n = k - x.e; - - // Round? - if (x.c.length > ++k) round(x, n, Big.RM); - - // toFixed: recalculate k as x.e may have changed if value rounded up. - if (id == 2) k = x.e + n + 1; - - // Append zeros? - for (; x.c.length < k;) x.c.push(0); - } - - e = x.e; - s = x.c.join(''); - n = s.length; - - // Exponential notation? - if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) { - s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e; - - // Normal notation. - } else if (e < 0) { - for (; ++e;) s = '0' + s; - s = '0.' + s; - } else if (e > 0) { - if (++e > n) for (e -= n; e--;) s += '0'; - else if (e < n) s = s.slice(0, e) + '.' + s.slice(e); - } else if (n > 1) { - s = s.charAt(0) + '.' + s.slice(1); - } - - return x.s < 0 && (!z || id == 4) ? '-' + s : s; -} - - -// Prototype/instance methods - - -/* - * Return a new Big whose value is the absolute value of this Big. - */ -P.abs = function () { - var x = new this.constructor(this); - x.s = 1; - return x; -}; - - -/* - * Return 1 if the value of this Big is greater than the value of Big y, - * -1 if the value of this Big is less than the value of Big y, or - * 0 if they have the same value. -*/ -P.cmp = function (y) { - var isneg, - x = this, - xc = x.c, - yc = (y = new x.constructor(y)).c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - - // Either zero? - if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i; - - // Signs differ? - if (i != j) return i; - - isneg = i < 0; - - // Compare exponents. - if (k != l) return k > l ^ isneg ? 1 : -1; - - j = (k = xc.length) < (l = yc.length) ? k : l; - - // Compare digit by digit. - for (i = -1; ++i < j;) { - if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1; - } - - // Compare lengths. - return k == l ? 0 : k > l ^ isneg ? 1 : -1; -}; - - -/* - * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded, - * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ -P.div = function (y) { - var x = this, - Big = x.constructor, - a = x.c, // dividend - b = (y = new Big(y)).c, // divisor - k = x.s == y.s ? 1 : -1, - dp = Big.DP; - - if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP); - - // Divisor is zero? - if (!b[0]) throw Error(DIV_BY_ZERO); - - // Dividend is 0? Return +-0. - if (!a[0]) return new Big(k * 0); - - var bl, bt, n, cmp, ri, - bz = b.slice(), - ai = bl = b.length, - al = a.length, - r = a.slice(0, bl), // remainder - rl = r.length, - q = y, // quotient - qc = q.c = [], - qi = 0, - d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result - - q.s = k; - k = d < 0 ? 0 : d; - - // Create version of divisor with leading zero. - bz.unshift(0); - - // Add zeros to make remainder as long as divisor. - for (; rl++ < bl;) r.push(0); - - do { - - // n is how many times the divisor goes into current remainder. - for (n = 0; n < 10; n++) { - - // Compare divisor and remainder. - if (bl != (rl = r.length)) { - cmp = bl > rl ? 1 : -1; - } else { - for (ri = -1, cmp = 0; ++ri < bl;) { - if (b[ri] != r[ri]) { - cmp = b[ri] > r[ri] ? 1 : -1; - break; - } - } - } - - // If divisor < remainder, subtract divisor from remainder. - if (cmp < 0) { - - // Remainder can't be more than 1 digit longer than divisor. - // Equalise lengths using divisor with extra leading zero? - for (bt = rl == bl ? b : bz; rl;) { - if (r[--rl] < bt[rl]) { - ri = rl; - for (; ri && !r[--ri];) r[ri] = 9; - --r[ri]; - r[rl] += 10; - } - r[rl] -= bt[rl]; - } - - for (; !r[0];) r.shift(); - } else { - break; - } - } - - // Add the digit n to the result array. - qc[qi++] = cmp ? n : ++n; - - // Update the remainder. - if (r[0] && cmp) r[rl] = a[ai] || 0; - else r = [a[ai]]; - - } while ((ai++ < al || r[0] !== UNDEFINED) && k--); - - // Leading zero? Do not remove if result is simply zero (qi == 1). - if (!qc[0] && qi != 1) { - - // There can't be more than one zero. - qc.shift(); - q.e--; - } - - // Round? - if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED); - - return q; -}; - - -/* - * Return true if the value of this Big is equal to the value of Big y, otherwise return false. - */ -P.eq = function (y) { - return !this.cmp(y); -}; - - -/* - * Return true if the value of this Big is greater than the value of Big y, otherwise return - * false. - */ -P.gt = function (y) { - return this.cmp(y) > 0; -}; - - -/* - * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise - * return false. - */ -P.gte = function (y) { - return this.cmp(y) > -1; -}; - - -/* - * Return true if the value of this Big is less than the value of Big y, otherwise return false. - */ -P.lt = function (y) { - return this.cmp(y) < 0; -}; - - -/* - * Return true if the value of this Big is less than or equal to the value of Big y, otherwise - * return false. - */ -P.lte = function (y) { - return this.cmp(y) < 1; -}; - - -/* - * Return a new Big whose value is the value of this Big minus the value of Big y. - */ -P.minus = P.sub = function (y) { - var i, j, t, xlty, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.plus(y); - } - - var xc = x.c.slice(), - xe = x.e, - yc = y.c, - ye = y.e; - - // Either zero? - if (!xc[0] || !yc[0]) { - - // y is non-zero? x is non-zero? Or both are zero. - return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0); - } - - // Determine which is the bigger number. Prepend zeros to equalise exponents. - if (a = xe - ye) { - - if (xlty = a < 0) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; - } - - t.reverse(); - for (b = a; b--;) t.push(0); - t.reverse(); - } else { - - // Exponents equal. Check digit by digit. - j = ((xlty = xc.length < yc.length) ? xc : yc).length; - - for (a = b = 0; b < j; b++) { - if (xc[b] != yc[b]) { - xlty = xc[b] < yc[b]; - break; - } - } - } - - // x < y? Point xc to the array of the bigger number. - if (xlty) { - t = xc; - xc = yc; - yc = t; - y.s = -y.s; - } - - /* - * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only - * needs to start at yc.length. - */ - if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0; - - // Subtract yc from xc. - for (b = i; j > a;) { - if (xc[--j] < yc[j]) { - for (i = j; i && !xc[--i];) xc[i] = 9; - --xc[i]; - xc[j] += 10; - } - - xc[j] -= yc[j]; - } - - // Remove trailing zeros. - for (; xc[--b] === 0;) xc.pop(); - - // Remove leading zeros and adjust exponent accordingly. - for (; xc[0] === 0;) { - xc.shift(); - --ye; - } - - if (!xc[0]) { - - // n - n = +0 - y.s = 1; - - // Result must be zero. - xc = [ye = 0]; - } - - y.c = xc; - y.e = ye; - - return y; -}; - - -/* - * Return a new Big whose value is the value of this Big modulo the value of Big y. - */ -P.mod = function (y) { - var ygtx, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - if (!y.c[0]) throw Error(DIV_BY_ZERO); - - x.s = y.s = 1; - ygtx = y.cmp(x) == 1; - x.s = a; - y.s = b; - - if (ygtx) return new Big(x); - - a = Big.DP; - b = Big.RM; - Big.DP = Big.RM = 0; - x = x.div(y); - Big.DP = a; - Big.RM = b; - - return this.minus(x.times(y)); -}; - - -/* - * Return a new Big whose value is the value of this Big plus the value of Big y. - */ -P.plus = P.add = function (y) { - var t, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.minus(y); - } - - var xe = x.e, - xc = x.c, - ye = y.e, - yc = y.c; - - // Either zero? y is non-zero? x is non-zero? Or both are zero. - if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0); - - xc = xc.slice(); - - // Prepend zeros to equalise exponents. - // Note: reverse faster than unshifts. - if (a = xe - ye) { - if (a > 0) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; - } - - t.reverse(); - for (; a--;) t.push(0); - t.reverse(); - } - - // Point xc to the longer array. - if (xc.length - yc.length < 0) { - t = yc; - yc = xc; - xc = t; - } - - a = yc.length; - - // Only start adding at yc.length - 1 as the further digits of xc can be left as they are. - for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0; - - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - - if (b) { - xc.unshift(b); - ++ye; - } - - // Remove trailing zeros. - for (a = xc.length; xc[--a] === 0;) xc.pop(); - - y.c = xc; - y.e = ye; - - return y; -}; - - -/* - * Return a Big whose value is the value of this Big raised to the power n. - * If n is negative, round to a maximum of Big.DP decimal places using rounding - * mode Big.RM. - * - * n {number} Integer, -MAX_POWER to MAX_POWER inclusive. - */ -P.pow = function (n) { - var x = this, - one = new x.constructor(1), - y = one, - isneg = n < 0; - - if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent'); - if (isneg) n = -n; - - for (;;) { - if (n & 1) y = y.times(x); - n >>= 1; - if (!n) break; - x = x.times(x); - } - - return isneg ? one.div(y) : y; -}; - - -/* - * Return a new Big whose value is the value of this Big rounded using rounding mode rm - * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a - * multiple of 10**-dp. - * If dp is not specified, round to 0 decimal places. - * If rm is not specified, use Big.RM. - * - * dp? {number} Integer, -MAX_DP to MAX_DP inclusive. - * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP) - */ -P.round = function (dp, rm) { - var Big = this.constructor; - if (dp === UNDEFINED) dp = 0; - else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP); - return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm); -}; - - -/* - * Return a new Big whose value is the square root of the value of this Big, rounded, if - * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ -P.sqrt = function () { - var r, c, t, - x = this, - Big = x.constructor, - s = x.s, - e = x.e, - half = new Big(0.5); - - // Zero? - if (!x.c[0]) return new Big(x); - - // Negative? - if (s < 0) throw Error(NAME + 'No square root'); - - // Estimate. - s = Math.sqrt(x + ''); - - // Math.sqrt underflow/overflow? - // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent. - if (s === 0 || s === 1 / 0) { - c = x.c.join(''); - if (!(c.length + e & 1)) c += '0'; - s = Math.sqrt(c); - e = ((e + 1) / 2 | 0) - (e < 0 || e & 1); - r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e); - } else { - r = new Big(s); - } - - e = r.e + (Big.DP += 4); - - // Newton-Raphson iteration. - do { - t = r; - r = half.times(t.plus(x.div(t))); - } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join('')); - - return round(r, Big.DP -= 4, Big.RM); -}; - - -/* - * Return a new Big whose value is the value of this Big times the value of Big y. - */ -P.times = P.mul = function (y) { - var c, - x = this, - Big = x.constructor, - xc = x.c, - yc = (y = new Big(y)).c, - a = xc.length, - b = yc.length, - i = x.e, - j = y.e; - - // Determine sign of result. - y.s = x.s == y.s ? 1 : -1; - - // Return signed 0 if either 0. - if (!xc[0] || !yc[0]) return new Big(y.s * 0); - - // Initialise exponent of result as x.e + y.e. - y.e = i + j; - - // If array xc has fewer digits than yc, swap xc and yc, and lengths. - if (a < b) { - c = xc; - xc = yc; - yc = c; - j = a; - a = b; - b = j; - } - - // Initialise coefficient array of result with zeros. - for (c = new Array(j = a + b); j--;) c[j] = 0; - - // Multiply. - - // i is initially xc.length. - for (i = b; i--;) { - b = 0; - - // a is yc.length. - for (j = a + i; j > i;) { - - // Current sum of products at this digit position, plus carry. - b = c[j] + yc[i] * xc[j - i - 1] + b; - c[j--] = b % 10; - - // carry - b = b / 10 | 0; - } - - c[j] = (c[j] + b) % 10; - } - - // Increment result exponent if there is a final carry, otherwise remove leading zero. - if (b) ++y.e; - else c.shift(); - - // Remove trailing zeros. - for (i = c.length; !c[--i];) c.pop(); - y.c = c; - - return y; -}; - - -/* - * Return a string representing the value of this Big in exponential notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - */ -P.toExponential = function (dp) { - return stringify(this, 1, dp, dp); -}; - - -/* - * Return a string representing the value of this Big in normal notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - * - * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. - * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. - */ -P.toFixed = function (dp) { - return stringify(this, 2, dp, this.e + dp); -}; - - -/* - * Return a string representing the value of this Big rounded to sd significant digits using - * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent - * the integer part of the value in normal notation. - * - * sd {number} Integer, 1 to MAX_DP inclusive. - */ -P.toPrecision = function (sd) { - return stringify(this, 3, sd, sd - 1); -}; - - -/* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Omit the sign for negative zero. - */ -P.toString = function () { - return stringify(this); -}; - - -/* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Include the sign for negative zero. - */ -P.valueOf = P.toJSON = function () { - return stringify(this, 4); -}; - - -// Export - - -export var Big = _Big_(); - -export default Big; +/* + * big.js v5.2.2 + * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic. + * Copyright (c) 2018 Michael Mclaughlin + * https://github.com/MikeMcl/big.js/LICENCE + */ + + +/************************************** EDITABLE DEFAULTS *****************************************/ + + + // The default values below must be integers within the stated ranges. + + /* + * The maximum number of decimal places (DP) of the results of operations involving division: + * div and sqrt, and pow with negative exponents. + */ +var DP = 20, // 0 to MAX_DP + + /* + * The rounding mode (RM) used when rounding to the above decimal places. + * + * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN) + * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP) + * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN) + * 3 Away from zero. (ROUND_UP) + */ + RM = 1, // 0, 1, 2 or 3 + + // The maximum value of DP and Big.DP. + MAX_DP = 1E6, // 0 to 1000000 + + // The maximum magnitude of the exponent argument to the pow method. + MAX_POWER = 1E6, // 1 to 1000000 + + /* + * The negative exponent (NE) at and beneath which toString returns exponential notation. + * (JavaScript numbers: -7) + * -1000000 is the minimum recommended exponent value of a Big. + */ + NE = -7, // 0 to -1000000 + + /* + * The positive exponent (PE) at and above which toString returns exponential notation. + * (JavaScript numbers: 21) + * 1000000 is the maximum recommended exponent value of a Big. + * (This limit is not enforced or checked.) + */ + PE = 21, // 0 to 1000000 + + +/**************************************************************************************************/ + + + // Error messages. + NAME = '[big.js] ', + INVALID = NAME + 'Invalid ', + INVALID_DP = INVALID + 'decimal places', + INVALID_RM = INVALID + 'rounding mode', + DIV_BY_ZERO = NAME + 'Division by zero', + + // The shared prototype object. + P = {}, + UNDEFINED = void 0, + NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; + + +/* + * Create and return a Big constructor. + * + */ +function _Big_() { + + /* + * The Big constructor and exported function. + * Create and return a new instance of a Big number object. + * + * n {number|string|Big} A numeric value. + */ + function Big(n) { + var x = this; + + // Enable constructor usage without new. + if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); + + // Duplicate. + if (n instanceof Big) { + x.s = n.s; + x.e = n.e; + x.c = n.c.slice(); + } else { + parse(x, n); + } + + /* + * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which + * points to Object. + */ + x.constructor = Big; + } + + Big.prototype = P; + Big.DP = DP; + Big.RM = RM; + Big.NE = NE; + Big.PE = PE; + Big.version = '5.2.2'; + + return Big; +} + + +/* + * Parse the number or string value passed to a Big constructor. + * + * x {Big} A Big number instance. + * n {number|string} A numeric value. + */ +function parse(x, n) { + var e, i, nl; + + // Minus zero? + if (n === 0 && 1 / n < 0) n = '-0'; + else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number'); + + // Determine sign. + x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1; + + // Decimal point? + if ((e = n.indexOf('.')) > -1) n = n.replace('.', ''); + + // Exponential form? + if ((i = n.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +n.slice(i + 1); + n = n.substring(0, i); + } else if (e < 0) { + + // Integer. + e = n.length; + } + + nl = n.length; + + // Determine leading zeros. + for (i = 0; i < nl && n.charAt(i) == '0';) ++i; + + if (i == nl) { + + // Zero. + x.c = [x.e = 0]; + } else { + + // Determine trailing zeros. + for (; nl > 0 && n.charAt(--nl) == '0';); + x.e = e - i - 1; + x.c = []; + + // Convert string to array of digits without leading/trailing zeros. + for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++); + } + + return x; +} + + +/* + * Round Big x to a maximum of dp decimal places using rounding mode rm. + * Called by stringify, P.div, P.round and P.sqrt. + * + * x {Big} The Big to round. + * dp {number} Integer, 0 to MAX_DP inclusive. + * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP) + * [more] {boolean} Whether the result of division was truncated. + */ +function round(x, dp, rm, more) { + var xc = x.c, + i = x.e + dp + 1; + + if (i < xc.length) { + if (rm === 1) { + + // xc[i] is the digit after the digit that may be rounded up. + more = xc[i] >= 5; + } else if (rm === 2) { + more = xc[i] > 5 || xc[i] == 5 && + (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1); + } else if (rm === 3) { + more = more || !!xc[0]; + } else { + more = false; + if (rm !== 0) throw Error(INVALID_RM); + } + + if (i < 1) { + xc.length = 1; + + if (more) { + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + x.e = -dp; + xc[0] = 1; + } else { + + // Zero. + xc[0] = x.e = 0; + } + } else { + + // Remove any digits after the required decimal places. + xc.length = i--; + + // Round up? + if (more) { + + // Rounding up may mean the previous digit has to be rounded up. + for (; ++xc[i] > 9;) { + xc[i] = 0; + if (!i--) { + ++x.e; + xc.unshift(1); + } + } + } + + // Remove trailing zeros. + for (i = xc.length; !xc[--i];) xc.pop(); + } + } else if (rm < 0 || rm > 3 || rm !== ~~rm) { + throw Error(INVALID_RM); + } + + return x; +} + + +/* + * Return a string representing the value of Big x in normal or exponential notation. + * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf. + * + * x {Big} + * id? {number} Caller id. + * 1 toExponential + * 2 toFixed + * 3 toPrecision + * 4 valueOf + * n? {number|undefined} Caller's argument. + * k? {number|undefined} + */ +function stringify(x, id, n, k) { + var e, s, + Big = x.constructor, + z = !x.c[0]; + + if (n !== UNDEFINED) { + if (n !== ~~n || n < (id == 3) || n > MAX_DP) { + throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP); + } + + x = new Big(x); + + // The index of the digit that may be rounded up. + n = k - x.e; + + // Round? + if (x.c.length > ++k) round(x, n, Big.RM); + + // toFixed: recalculate k as x.e may have changed if value rounded up. + if (id == 2) k = x.e + n + 1; + + // Append zeros? + for (; x.c.length < k;) x.c.push(0); + } + + e = x.e; + s = x.c.join(''); + n = s.length; + + // Exponential notation? + if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) { + s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e; + + // Normal notation. + } else if (e < 0) { + for (; ++e;) s = '0' + s; + s = '0.' + s; + } else if (e > 0) { + if (++e > n) for (e -= n; e--;) s += '0'; + else if (e < n) s = s.slice(0, e) + '.' + s.slice(e); + } else if (n > 1) { + s = s.charAt(0) + '.' + s.slice(1); + } + + return x.s < 0 && (!z || id == 4) ? '-' + s : s; +} + + +// Prototype/instance methods + + +/* + * Return a new Big whose value is the absolute value of this Big. + */ +P.abs = function () { + var x = new this.constructor(this); + x.s = 1; + return x; +}; + + +/* + * Return 1 if the value of this Big is greater than the value of Big y, + * -1 if the value of this Big is less than the value of Big y, or + * 0 if they have the same value. +*/ +P.cmp = function (y) { + var isneg, + x = this, + xc = x.c, + yc = (y = new x.constructor(y)).c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either zero? + if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i; + + // Signs differ? + if (i != j) return i; + + isneg = i < 0; + + // Compare exponents. + if (k != l) return k > l ^ isneg ? 1 : -1; + + j = (k = xc.length) < (l = yc.length) ? k : l; + + // Compare digit by digit. + for (i = -1; ++i < j;) { + if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1; + } + + // Compare lengths. + return k == l ? 0 : k > l ^ isneg ? 1 : -1; +}; + + +/* + * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded, + * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. + */ +P.div = function (y) { + var x = this, + Big = x.constructor, + a = x.c, // dividend + b = (y = new Big(y)).c, // divisor + k = x.s == y.s ? 1 : -1, + dp = Big.DP; + + if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP); + + // Divisor is zero? + if (!b[0]) throw Error(DIV_BY_ZERO); + + // Dividend is 0? Return +-0. + if (!a[0]) return new Big(k * 0); + + var bl, bt, n, cmp, ri, + bz = b.slice(), + ai = bl = b.length, + al = a.length, + r = a.slice(0, bl), // remainder + rl = r.length, + q = y, // quotient + qc = q.c = [], + qi = 0, + d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result + + q.s = k; + k = d < 0 ? 0 : d; + + // Create version of divisor with leading zero. + bz.unshift(0); + + // Add zeros to make remainder as long as divisor. + for (; rl++ < bl;) r.push(0); + + do { + + // n is how many times the divisor goes into current remainder. + for (n = 0; n < 10; n++) { + + // Compare divisor and remainder. + if (bl != (rl = r.length)) { + cmp = bl > rl ? 1 : -1; + } else { + for (ri = -1, cmp = 0; ++ri < bl;) { + if (b[ri] != r[ri]) { + cmp = b[ri] > r[ri] ? 1 : -1; + break; + } + } + } + + // If divisor < remainder, subtract divisor from remainder. + if (cmp < 0) { + + // Remainder can't be more than 1 digit longer than divisor. + // Equalise lengths using divisor with extra leading zero? + for (bt = rl == bl ? b : bz; rl;) { + if (r[--rl] < bt[rl]) { + ri = rl; + for (; ri && !r[--ri];) r[ri] = 9; + --r[ri]; + r[rl] += 10; + } + r[rl] -= bt[rl]; + } + + for (; !r[0];) r.shift(); + } else { + break; + } + } + + // Add the digit n to the result array. + qc[qi++] = cmp ? n : ++n; + + // Update the remainder. + if (r[0] && cmp) r[rl] = a[ai] || 0; + else r = [a[ai]]; + + } while ((ai++ < al || r[0] !== UNDEFINED) && k--); + + // Leading zero? Do not remove if result is simply zero (qi == 1). + if (!qc[0] && qi != 1) { + + // There can't be more than one zero. + qc.shift(); + q.e--; + } + + // Round? + if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED); + + return q; +}; + + +/* + * Return true if the value of this Big is equal to the value of Big y, otherwise return false. + */ +P.eq = function (y) { + return !this.cmp(y); +}; + + +/* + * Return true if the value of this Big is greater than the value of Big y, otherwise return + * false. + */ +P.gt = function (y) { + return this.cmp(y) > 0; +}; + + +/* + * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise + * return false. + */ +P.gte = function (y) { + return this.cmp(y) > -1; +}; + + +/* + * Return true if the value of this Big is less than the value of Big y, otherwise return false. + */ +P.lt = function (y) { + return this.cmp(y) < 0; +}; + + +/* + * Return true if the value of this Big is less than or equal to the value of Big y, otherwise + * return false. + */ +P.lte = function (y) { + return this.cmp(y) < 1; +}; + + +/* + * Return a new Big whose value is the value of this Big minus the value of Big y. + */ +P.minus = P.sub = function (y) { + var i, j, t, xlty, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + // Signs differ? + if (a != b) { + y.s = -b; + return x.plus(y); + } + + var xc = x.c.slice(), + xe = x.e, + yc = y.c, + ye = y.e; + + // Either zero? + if (!xc[0] || !yc[0]) { + + // y is non-zero? x is non-zero? Or both are zero. + return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0); + } + + // Determine which is the bigger number. Prepend zeros to equalise exponents. + if (a = xe - ye) { + + if (xlty = a < 0) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + for (b = a; b--;) t.push(0); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = ((xlty = xc.length < yc.length) ? xc : yc).length; + + for (a = b = 0; b < j; b++) { + if (xc[b] != yc[b]) { + xlty = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xlty) { + t = xc; + xc = yc; + yc = t; + y.s = -y.s; + } + + /* + * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only + * needs to start at yc.length. + */ + if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0; + + // Subtract yc from xc. + for (b = i; j > a;) { + if (xc[--j] < yc[j]) { + for (i = j; i && !xc[--i];) xc[i] = 9; + --xc[i]; + xc[j] += 10; + } + + xc[j] -= yc[j]; + } + + // Remove trailing zeros. + for (; xc[--b] === 0;) xc.pop(); + + // Remove leading zeros and adjust exponent accordingly. + for (; xc[0] === 0;) { + xc.shift(); + --ye; + } + + if (!xc[0]) { + + // n - n = +0 + y.s = 1; + + // Result must be zero. + xc = [ye = 0]; + } + + y.c = xc; + y.e = ye; + + return y; +}; + + +/* + * Return a new Big whose value is the value of this Big modulo the value of Big y. + */ +P.mod = function (y) { + var ygtx, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + if (!y.c[0]) throw Error(DIV_BY_ZERO); + + x.s = y.s = 1; + ygtx = y.cmp(x) == 1; + x.s = a; + y.s = b; + + if (ygtx) return new Big(x); + + a = Big.DP; + b = Big.RM; + Big.DP = Big.RM = 0; + x = x.div(y); + Big.DP = a; + Big.RM = b; + + return this.minus(x.times(y)); +}; + + +/* + * Return a new Big whose value is the value of this Big plus the value of Big y. + */ +P.plus = P.add = function (y) { + var t, + x = this, + Big = x.constructor, + a = x.s, + b = (y = new Big(y)).s; + + // Signs differ? + if (a != b) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e, + xc = x.c, + ye = y.e, + yc = y.c; + + // Either zero? y is non-zero? x is non-zero? Or both are zero. + if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0); + + xc = xc.slice(); + + // Prepend zeros to equalise exponents. + // Note: reverse faster than unshifts. + if (a = xe - ye) { + if (a > 0) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for (; a--;) t.push(0); + t.reverse(); + } + + // Point xc to the longer array. + if (xc.length - yc.length < 0) { + t = yc; + yc = xc; + xc = t; + } + + a = yc.length; + + // Only start adding at yc.length - 1 as the further digits of xc can be left as they are. + for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0; + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + + if (b) { + xc.unshift(b); + ++ye; + } + + // Remove trailing zeros. + for (a = xc.length; xc[--a] === 0;) xc.pop(); + + y.c = xc; + y.e = ye; + + return y; +}; + + +/* + * Return a Big whose value is the value of this Big raised to the power n. + * If n is negative, round to a maximum of Big.DP decimal places using rounding + * mode Big.RM. + * + * n {number} Integer, -MAX_POWER to MAX_POWER inclusive. + */ +P.pow = function (n) { + var x = this, + one = new x.constructor(1), + y = one, + isneg = n < 0; + + if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent'); + if (isneg) n = -n; + + for (;;) { + if (n & 1) y = y.times(x); + n >>= 1; + if (!n) break; + x = x.times(x); + } + + return isneg ? one.div(y) : y; +}; + + +/* + * Return a new Big whose value is the value of this Big rounded using rounding mode rm + * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a + * multiple of 10**-dp. + * If dp is not specified, round to 0 decimal places. + * If rm is not specified, use Big.RM. + * + * dp? {number} Integer, -MAX_DP to MAX_DP inclusive. + * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP) + */ +P.round = function (dp, rm) { + var Big = this.constructor; + if (dp === UNDEFINED) dp = 0; + else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP); + return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm); +}; + + +/* + * Return a new Big whose value is the square root of the value of this Big, rounded, if + * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. + */ +P.sqrt = function () { + var r, c, t, + x = this, + Big = x.constructor, + s = x.s, + e = x.e, + half = new Big(0.5); + + // Zero? + if (!x.c[0]) return new Big(x); + + // Negative? + if (s < 0) throw Error(NAME + 'No square root'); + + // Estimate. + s = Math.sqrt(x + ''); + + // Math.sqrt underflow/overflow? + // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent. + if (s === 0 || s === 1 / 0) { + c = x.c.join(''); + if (!(c.length + e & 1)) c += '0'; + s = Math.sqrt(c); + e = ((e + 1) / 2 | 0) - (e < 0 || e & 1); + r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e); + } else { + r = new Big(s); + } + + e = r.e + (Big.DP += 4); + + // Newton-Raphson iteration. + do { + t = r; + r = half.times(t.plus(x.div(t))); + } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join('')); + + return round(r, Big.DP -= 4, Big.RM); +}; + + +/* + * Return a new Big whose value is the value of this Big times the value of Big y. + */ +P.times = P.mul = function (y) { + var c, + x = this, + Big = x.constructor, + xc = x.c, + yc = (y = new Big(y)).c, + a = xc.length, + b = yc.length, + i = x.e, + j = y.e; + + // Determine sign of result. + y.s = x.s == y.s ? 1 : -1; + + // Return signed 0 if either 0. + if (!xc[0] || !yc[0]) return new Big(y.s * 0); + + // Initialise exponent of result as x.e + y.e. + y.e = i + j; + + // If array xc has fewer digits than yc, swap xc and yc, and lengths. + if (a < b) { + c = xc; + xc = yc; + yc = c; + j = a; + a = b; + b = j; + } + + // Initialise coefficient array of result with zeros. + for (c = new Array(j = a + b); j--;) c[j] = 0; + + // Multiply. + + // i is initially xc.length. + for (i = b; i--;) { + b = 0; + + // a is yc.length. + for (j = a + i; j > i;) { + + // Current sum of products at this digit position, plus carry. + b = c[j] + yc[i] * xc[j - i - 1] + b; + c[j--] = b % 10; + + // carry + b = b / 10 | 0; + } + + c[j] = (c[j] + b) % 10; + } + + // Increment result exponent if there is a final carry, otherwise remove leading zero. + if (b) ++y.e; + else c.shift(); + + // Remove trailing zeros. + for (i = c.length; !c[--i];) c.pop(); + y.c = c; + + return y; +}; + + +/* + * Return a string representing the value of this Big in exponential notation to dp fixed decimal + * places and rounded using Big.RM. + * + * dp? {number} Integer, 0 to MAX_DP inclusive. + */ +P.toExponential = function (dp) { + return stringify(this, 1, dp, dp); +}; + + +/* + * Return a string representing the value of this Big in normal notation to dp fixed decimal + * places and rounded using Big.RM. + * + * dp? {number} Integer, 0 to MAX_DP inclusive. + * + * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. + * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. + */ +P.toFixed = function (dp) { + return stringify(this, 2, dp, this.e + dp); +}; + + +/* + * Return a string representing the value of this Big rounded to sd significant digits using + * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent + * the integer part of the value in normal notation. + * + * sd {number} Integer, 1 to MAX_DP inclusive. + */ +P.toPrecision = function (sd) { + return stringify(this, 3, sd, sd - 1); +}; + + +/* + * Return a string representing the value of this Big. + * Return exponential notation if this Big has a positive exponent equal to or greater than + * Big.PE, or a negative exponent equal to or less than Big.NE. + * Omit the sign for negative zero. + */ +P.toString = function () { + return stringify(this); +}; + + +/* + * Return a string representing the value of this Big. + * Return exponential notation if this Big has a positive exponent equal to or greater than + * Big.PE, or a negative exponent equal to or less than Big.NE. + * Include the sign for negative zero. + */ +P.valueOf = P.toJSON = function () { + return stringify(this, 4); +}; + + +// Export + + +export var Big = _Big_(); + +export default Big; diff --git a/node_modules/big.js/package.json b/node_modules/big.js/package.json index 9da9b921..92eafe49 100644 --- a/node_modules/big.js/package.json +++ b/node_modules/big.js/package.json @@ -1,50 +1,50 @@ -{ - "name": "big.js", - "description": "A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic", - "version": "5.2.2", - "keywords": [ - "arbitrary", - "precision", - "arithmetic", - "big", - "number", - "decimal", - "float", - "biginteger", - "bigdecimal", - "bignumber", - "bigint", - "bignum" - ], - "repository": { - "type": "git", - "url": "https://github.com/MikeMcl/big.js.git" - }, - "main": "big", - "browser": "big.js", - "module": "big.mjs", - "author": { - "name": "Michael Mclaughlin", - "email": "M8ch88l@gmail.com" - }, - "bugs": { - "url": "https://github.com/MikeMcl/big.js/issues" - }, - "engines": { - "node": "*" - }, - "license": "MIT", - "scripts": { - "test": "node ./test/every-test.js", - "build": "uglifyjs big.js --source-map -c -m -o big.min.js" - }, - "files": [ - "big.js", - "big.mjs", - "big.min.js" - ], - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" - } +{ + "name": "big.js", + "description": "A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic", + "version": "5.2.2", + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "repository": { + "type": "git", + "url": "https://github.com/MikeMcl/big.js.git" + }, + "main": "big", + "browser": "big.js", + "module": "big.mjs", + "author": { + "name": "Michael Mclaughlin", + "email": "M8ch88l@gmail.com" + }, + "bugs": { + "url": "https://github.com/MikeMcl/big.js/issues" + }, + "engines": { + "node": "*" + }, + "license": "MIT", + "scripts": { + "test": "node ./test/every-test.js", + "build": "uglifyjs big.js --source-map -c -m -o big.min.js" + }, + "files": [ + "big.js", + "big.mjs", + "big.min.js" + ], + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } } \ No newline at end of file diff --git a/node_modules/browserslist/cli.js b/node_modules/browserslist/cli.js old mode 100644 new mode 100755 diff --git a/node_modules/char-regex/LICENSE b/node_modules/char-regex/LICENSE index 04c5e768..2377f69e 100644 --- a/node_modules/char-regex/LICENSE +++ b/node_modules/char-regex/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2019 Richie Bendall - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2019 Richie Bendall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/char-regex/README.md b/node_modules/char-regex/README.md index 835ae8a1..08ea78bd 100644 --- a/node_modules/char-regex/README.md +++ b/node_modules/char-regex/README.md @@ -1,27 +1,27 @@ -# Char Regex [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/char-regex/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/char-regex) - -A regex to match any full character, considering weird character ranges. Tested on every single emoji and unicode character. Based on the Lodash implementation. - -[![NPM Badge](https://nodei.co/npm/char-regex.png)](https://npmjs.com/package/char-regex) - -## Install - -```sh -npm install char-regex -``` - -## Usage - -```js -const charRegex = require("char-regex"); - -"â¤ï¸ðŸ‘ŠðŸ½".match(/./); -//=> ["", "", "", "", "", "", ""] - -"â¤ï¸ðŸ‘ŠðŸ½".match(charRegex()); -//=> ["â¤ï¸", "👊ðŸ½"] -``` - -## API - -### charRegex() +# Char Regex [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/char-regex/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/char-regex) + +A regex to match any full character, considering weird character ranges. Tested on every single emoji and unicode character. Based on the Lodash implementation. + +[![NPM Badge](https://nodei.co/npm/char-regex.png)](https://npmjs.com/package/char-regex) + +## Install + +```sh +npm install char-regex +``` + +## Usage + +```js +const charRegex = require("char-regex"); + +"â¤ï¸ðŸ‘ŠðŸ½".match(/./); +//=> ["", "", "", "", "", "", ""] + +"â¤ï¸ðŸ‘ŠðŸ½".match(charRegex()); +//=> ["â¤ï¸", "👊ðŸ½"] +``` + +## API + +### charRegex() diff --git a/node_modules/char-regex/index.d.ts b/node_modules/char-regex/index.d.ts index e074471d..17defa27 100644 --- a/node_modules/char-regex/index.d.ts +++ b/node_modules/char-regex/index.d.ts @@ -1,13 +1,13 @@ -/** - * A regex to match any full character, considering weird character ranges. - * @example - * ``` - * const charRegex = require("char-regex"); - * - * "â¤ï¸ðŸ‘ŠðŸ½".match(charRegex()); - * //=> ["â¤ï¸", "👊ðŸ½"] - * ``` -*/ -declare function charRegex(): RegExp - -export = charRegex +/** + * A regex to match any full character, considering weird character ranges. + * @example + * ``` + * const charRegex = require("char-regex"); + * + * "â¤ï¸ðŸ‘ŠðŸ½".match(charRegex()); + * //=> ["â¤ï¸", "👊ðŸ½"] + * ``` +*/ +declare function charRegex(): RegExp + +export = charRegex diff --git a/node_modules/char-regex/index.js b/node_modules/char-regex/index.js index 436cc681..cddafddb 100644 --- a/node_modules/char-regex/index.js +++ b/node_modules/char-regex/index.js @@ -1,39 +1,39 @@ -"use strict" - -// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js - -module.exports = () => { - // Used to compose unicode character classes. - const astralRange = "\\ud800-\\udfff" - const comboMarksRange = "\\u0300-\\u036f" - const comboHalfMarksRange = "\\ufe20-\\ufe2f" - const comboSymbolsRange = "\\u20d0-\\u20ff" - const comboMarksExtendedRange = "\\u1ab0-\\u1aff" - const comboMarksSupplementRange = "\\u1dc0-\\u1dff" - const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange - const varRange = "\\ufe0e\\ufe0f" - const familyRange = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93" - - // Used to compose unicode capture groups. - const astral = `[${astralRange}]` - const combo = `[${comboRange}]` - const fitz = "\\ud83c[\\udffb-\\udfff]" - const modifier = `(?:${combo}|${fitz})` - const nonAstral = `[^${astralRange}]` - const regional = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}" - const surrogatePair = "[\\ud800-\\udbff][\\udc00-\\udfff]" - const zwj = "\\u200d" - const blackFlag = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)" - const family = `[${familyRange}]` - - // Used to compose unicode regexes. - const optModifier = `${modifier}?` - const optVar = `[${varRange}]?` - const optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join("|")})${optVar + optModifier})*` - const seq = optVar + optModifier + optJoin - const nonAstralCombo = `${nonAstral}${combo}?` - const symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join("|")})` - - // Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode). - return new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, "g") -} +"use strict" + +// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js + +module.exports = () => { + // Used to compose unicode character classes. + const astralRange = "\\ud800-\\udfff" + const comboMarksRange = "\\u0300-\\u036f" + const comboHalfMarksRange = "\\ufe20-\\ufe2f" + const comboSymbolsRange = "\\u20d0-\\u20ff" + const comboMarksExtendedRange = "\\u1ab0-\\u1aff" + const comboMarksSupplementRange = "\\u1dc0-\\u1dff" + const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange + const varRange = "\\ufe0e\\ufe0f" + const familyRange = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93" + + // Used to compose unicode capture groups. + const astral = `[${astralRange}]` + const combo = `[${comboRange}]` + const fitz = "\\ud83c[\\udffb-\\udfff]" + const modifier = `(?:${combo}|${fitz})` + const nonAstral = `[^${astralRange}]` + const regional = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}" + const surrogatePair = "[\\ud800-\\udbff][\\udc00-\\udfff]" + const zwj = "\\u200d" + const blackFlag = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)" + const family = `[${familyRange}]` + + // Used to compose unicode regexes. + const optModifier = `${modifier}?` + const optVar = `[${varRange}]?` + const optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join("|")})${optVar + optModifier})*` + const seq = optVar + optModifier + optJoin + const nonAstralCombo = `${nonAstral}${combo}?` + const symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join("|")})` + + // Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode). + return new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, "g") +} diff --git a/node_modules/char-regex/package.json b/node_modules/char-regex/package.json index ac12599b..d7c2808e 100644 --- a/node_modules/char-regex/package.json +++ b/node_modules/char-regex/package.json @@ -1,44 +1,44 @@ -{ - "name": "char-regex", - "version": "1.0.2", - "description": "A regex to match any full character, considering weird character ranges.", - "repository": "https://github.com/Richienb/char-regex.git", - "author": "Richie Bendall ", - "license": "MIT", - "main": "index.js", - "files": [ - "index.js", - "index.d.ts" - ], - "engines": { - "node": ">=10" - }, - "scripts": { - "lint": "xo", - "test": "yarn lint && ava" - }, - "keywords": [ - "character", - "regex", - "match", - "split", - "length" - ], - "dependencies": {}, - "devDependencies": { - "@babel/core": "^7.8.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", - "array-uniq": "^2.1.0", - "ava": "^3.0.0", - "emoji.json": "^12.1.1", - "eslint-config-richienb": "^0.3.0", - "unicode-chars": "^1.0.1", - "xo": "^0.25.3" - }, - "resolutions": { - "eslint": "^6.8.0" - }, - "xo": { - "extends": "richienb/node" - } -} +{ + "name": "char-regex", + "version": "1.0.2", + "description": "A regex to match any full character, considering weird character ranges.", + "repository": "https://github.com/Richienb/char-regex.git", + "author": "Richie Bendall ", + "license": "MIT", + "main": "index.js", + "files": [ + "index.js", + "index.d.ts" + ], + "engines": { + "node": ">=10" + }, + "scripts": { + "lint": "xo", + "test": "yarn lint && ava" + }, + "keywords": [ + "character", + "regex", + "match", + "split", + "length" + ], + "dependencies": {}, + "devDependencies": { + "@babel/core": "^7.8.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "array-uniq": "^2.1.0", + "ava": "^3.0.0", + "emoji.json": "^12.1.1", + "eslint-config-richienb": "^0.3.0", + "unicode-chars": "^1.0.1", + "xo": "^0.25.3" + }, + "resolutions": { + "eslint": "^6.8.0" + }, + "xo": { + "extends": "richienb/node" + } +} diff --git a/node_modules/cjs-module-lexer/LICENSE b/node_modules/cjs-module-lexer/LICENSE index 935b3579..b31c17aa 100644 --- a/node_modules/cjs-module-lexer/LICENSE +++ b/node_modules/cjs-module-lexer/LICENSE @@ -1,10 +1,10 @@ -MIT License ------------ - -Copyright (C) 2018-2020 Guy Bedford - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +MIT License +----------- + +Copyright (C) 2018-2020 Guy Bedford + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cjs-module-lexer/README.md b/node_modules/cjs-module-lexer/README.md index 10fe998a..852cad21 100644 --- a/node_modules/cjs-module-lexer/README.md +++ b/node_modules/cjs-module-lexer/README.md @@ -1,461 +1,461 @@ -# CJS Module Lexer - -[![Build Status][travis-image]][travis-url] - -A [very fast](#benchmarks) JS CommonJS module syntax lexer used to detect the most likely list of named exports of a CommonJS module. - -Outputs the list of named exports (`exports.name = ...`) and possible module reexports (`module.exports = require('...')`), including the common transpiler variations of these cases. - -Forked from https://github.com/guybedford/es-module-lexer. - -_Comprehensively handles the JS language grammar while remaining small and fast. - ~90ms per MB of JS cold and ~15ms per MB of JS warm, [see benchmarks](#benchmarks) for more info._ - -### Project Status - -This project is used in Node.js core for detecting the named exports available when importing a CJS module into ESM, and is maintained for this purpose. - -PRs will be accepted and upstreamed for parser bugs, performance improvements or new syntax support only. - -_Detection patterns for this project are **frozen**_. This is because adding any new export detection patterns would result in fragmented backwards-compatibility. Specifically, it would be very difficult to figure out why an ES module named export for CommonJS might work in newer Node.js versions but not older versions. This problem would only be discovered downstream of module authors, with the fix for module authors being to then have to understand which patterns in this project provide full backwards-compatibily. Rather, by fully freezing the detected patterns, if it works in any Node.js version it will work in any other. Build tools can also reliably treat the supported syntax for this project as a part of their output target for ensuring syntax support. - -### Usage - -``` -npm install cjs-module-lexer -``` - -For use in CommonJS: - -```js -const { parse } = require('cjs-module-lexer'); - -// `init` return a promise for parity with the ESM API, but you do not have to call it - -const { exports, reexports } = parse(` - // named exports detection - module.exports.a = 'a'; - (function () { - exports.b = 'b'; - })(); - Object.defineProperty(exports, 'c', { value: 'c' }); - /* exports.d = 'not detected'; */ - - // reexports detection - if (maybe) module.exports = require('./dep1.js'); - if (another) module.exports = require('./dep2.js'); - - // literal exports assignments - module.exports = { a, b: c, d, 'e': f } - - // __esModule detection - Object.defineProperty(module.exports, '__esModule', { value: true }) -`); - -// exports === ['a', 'b', 'c', '__esModule'] -// reexports === ['./dep1.js', './dep2.js'] -``` - -When using the ESM version, Wasm is supported instead: - -```js -import { parse, init } from 'cjs-module-lexer'; -// init needs to be called and waited upon -await init(); -const { exports, reexports } = parse(source); -``` - -The Wasm build is around 1.5x faster and without a cold start. - -### Grammar - -CommonJS exports matches are run against the source token stream. - -The token grammar is: - -``` -IDENTIFIER: As defined by ECMA-262, without support for identifier `\` escapes, filtered to remove strict reserved words: - "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "enum" - -STRING_LITERAL: A `"` or `'` bounded ECMA-262 string literal. - -MODULE_EXPORTS: `module` `.` `exports` - -EXPORTS_IDENTIFIER: MODULE_EXPORTS_IDENTIFIER | `exports` - -EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=` - -EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` STRING_LITERAL `]` `=` - -EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (STRING_LITERAL `:` IDENTIFIER) - -EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE) - -EXPORTS_MEMBER: EXPORTS_DOT_ASSIGN | EXPORTS_LITERAL_COMPUTED_ASSIGN - -EXPORTS_DEFINE: `Object` `.` `defineProperty `(` EXPORTS_IDENFITIER `,` STRING_LITERAL - -EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {` - (`enumerable: true,`)? - ( - `value:` | - `get` (`: function` IDENTIFIER? )? `() {` return IDENTIFIER (`.` IDENTIFIER | `[` STRING_LITERAL `]`)? `;`? `}` `,`? - ) - `})` - -EXPORTS_LITERAL: MODULE_EXPORTS `=` `{` (EXPORTS_LITERAL_PROP | EXPORTS_SPREAD) `,`)+ `}` - -REQUIRE: `require` `(` STRING_LITERAL `)` - -EXPORTS_ASSIGN: (`var` | `const` | `let`) IDENTIFIER `=` (`_interopRequireWildcard (`)? REQUIRE - -MODULE_EXPORTS_ASSIGN: MODULE_EXPORTS `=` REQUIRE - -EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE - -EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {` - ( - ( - `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? - ( - (`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)? - (`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)? - )? - ) | - `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)` - ) - ( - EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? | - `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get` (`: function` IDENTIFIER? )? `() { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`? - ) - `})` -``` - -Spacing between tokens is taken to be any ECMA-262 whitespace, ECMA-262 block comment or ECMA-262 line comment. - -* The returned export names are taken to be the combination of: - 1. All `IDENTIFIER` and `STRING_LITERAL` slots for `EXPORTS_MEMBER` and `EXPORTS_LITERAL` matches. - 2. The first `STRING_LITERAL` slot for all `EXPORTS_DEFINE_VALUE` matches where that same string is not an `EXPORTS_DEFINE` match that is not also an `EXPORTS_DEFINE_VALUE` match. -* The reexport specifiers are taken to be the combination of: - 1. The `REQUIRE` matches of the last matched of either `MODULE_EXPORTS_ASSIGN` or `EXPORTS_LITERAL`. - 2. All _top-level_ `EXPORT_STAR` `REQUIRE` matches and `EXPORTS_ASSIGN` matches whose `IDENTIFIER` also matches the first `IDENTIFIER` in `EXPORT_STAR_LIB`. - -### Parsing Examples - -#### Named Exports Parsing - -The basic matching rules for named exports are `exports.name`, `exports['name']` or `Object.defineProperty(exports, 'name', ...)`. This matching is done without scope analysis and regardless of the expression position: - -```js -// DETECTS EXPORTS: a, b -(function (exports) { - exports.a = 'a'; - exports['b'] = 'b'; -})(exports); -``` - -Because there is no scope analysis, the above detection may overclassify: - -```js -// DETECTS EXPORTS: a, b, c -(function (exports, Object) { - exports.a = 'a'; - exports['b'] = 'b'; - if (false) - exports.c = 'c'; -})(NOT_EXPORTS, NOT_OBJECT); -``` - -It will in turn underclassify in cases where the identifiers are renamed: - -```js -// DETECTS: NO EXPORTS -(function (e) { - e.a = 'a'; - e['b'] = 'b'; -})(exports); -``` - -#### Getter Exports Parsing - -`Object.defineProperty` is detected for specifically value and getter forms returning an identifier or member expression: - -```js -// DETECTS: a, b, c, d, __esModule -Object.defineProperty(exports, 'a', { - enumerable: true, - get: function () { - return q.p; - } -}); -Object.defineProperty(exports, 'b', { - enumerable: true, - get: function () { - return q['p']; - } -}); -Object.defineProperty(exports, 'c', { - enumerable: true, - get () { - return b; - } -}); -Object.defineProperty(exports, 'd', { value: 'd' }); -Object.defineProperty(exports, '__esModule', { value: true }); -``` - -Value properties are also detected specifically: - -```js -Object.defineProperty(exports, 'a', { - value: 'no problem' -}); -``` - -To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will -opt-out of the getter matching: - -```js -// DETECTS: NO EXPORTS -Object.defineProperty(exports, 'a', { - get () { - return 'nope'; - } -}); - -if (false) { - Object.defineProperty(module.exports, 'a', { - get () { - return dynamic(); - } - }) -} -``` - -Alternative object definition structures or getter function bodies are not detected: - -```js -// DETECTS: NO EXPORTS -Object.defineProperty(exports, 'a', { - enumerable: false, - get () { - return p; - } -}); -Object.defineProperty(exports, 'b', { - configurable: true, - get () { - return p; - } -}); -Object.defineProperty(exports, 'c', { - get: () => p -}); -Object.defineProperty(exports, 'd', { - enumerable: true, - get: function () { - return dynamic(); - } -}); -Object.defineProperty(exports, 'e', { - enumerable: true, - get () { - return 'str'; - } -}); -``` - -`Object.defineProperties` is also not supported. - -#### Exports Object Assignment - -A best-effort is made to detect `module.exports` object assignments, but because this is not a full parser, arbitrary expressions are not handled in the -object parsing process. - -Simple object definitions are supported: - -```js -// DETECTS EXPORTS: a, b, c -module.exports = { - a, - 'b': b, - c: c, - ...d -}; -``` - -Object properties that are not identifiers or string expressions will bail out of the object detection, while spreads are ignored: - -```js -// DETECTS EXPORTS: a, b -module.exports = { - a, - ...d, - b: require('c'), - c: "not detected since require('c') above bails the object detection" -} -``` - -`Object.defineProperties` is not currently supported either. - -#### module.exports reexport assignment - -Any `module.exports = require('mod')` assignment is detected as a reexport, but only the last one is returned: - -```js -// DETECTS REEXPORTS: c -module.exports = require('a'); -(module => module.exports = require('b'))(NOT_MODULE); -if (false) module.exports = require('c'); -``` - -This is to avoid over-classification in Webpack bundles with externals which include `module.exports = require('external')` in their source for every external dependency. - -In exports object assignment, any spread of `require()` are detected as multiple separate reexports: - -```js -// DETECTS REEXPORTS: a, b -module.exports = require('ignored'); -module.exports = { - ...require('a'), - ...require('b') -}; -``` - -#### Transpiler Re-exports - -For named exports, transpiler output works well with the rules described above. - -But for star re-exports, special care is taken to support common patterns of transpiler outputs from Babel and TypeScript as well as bundlers like RollupJS. -These reexport and star reexport patterns are restricted to only be detected at the top-level as provided by the direct output of these tools. - -For example, `export * from 'external'` is output by Babel as: - -```js -"use strict"; - -exports.__esModule = true; - -var _external = require("external"); - -Object.keys(_external).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - exports[key] = _external[key]; -}); -``` - -Where the `var _external = require("external")` is specifically detected as well as the `Object.keys(_external)` statement, down to the exact -for of that entire expression including minor variations of the output. The `_external` and `key` identifiers are carefully matched in this -detection. - -Similarly for TypeScript, `export * from 'external'` is output as: - -```js -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("external")); -``` - -Where the `__export(require("external"))` statement is explicitly detected as a reexport, including variations `tslib.__export` and `__exportStar`. - -### Environment Support - -Node.js 10+, and [all browsers with Web Assembly support](https://caniuse.com/#feat=wasm). - -### JS Grammar Support - -* Token state parses all line comments, block comments, strings, template strings, blocks, parens and punctuators. -* Division operator / regex token ambiguity is handled via backtracking checks against punctuator prefixes, including closing brace or paren backtracking. -* Always correctly parses valid JS source, but may parse invalid JS source without errors. - -### Benchmarks - -Benchmarks can be run with `npm run bench`. - -Current results: - -JS Build: - -``` -Module load time -> 4ms -Cold Run, All Samples -test/samples/*.js (3635 KiB) -> 299ms - -Warm Runs (average of 25 runs) -test/samples/angular.js (1410 KiB) -> 13.96ms -test/samples/angular.min.js (303 KiB) -> 4.72ms -test/samples/d3.js (553 KiB) -> 6.76ms -test/samples/d3.min.js (250 KiB) -> 4ms -test/samples/magic-string.js (34 KiB) -> 0.64ms -test/samples/magic-string.min.js (20 KiB) -> 0ms -test/samples/rollup.js (698 KiB) -> 8.48ms -test/samples/rollup.min.js (367 KiB) -> 5.36ms - -Warm Runs, All Samples (average of 25 runs) -test/samples/*.js (3635 KiB) -> 40.28ms -``` - -Wasm Build: -``` -Module load time -> 10ms -Cold Run, All Samples -test/samples/*.js (3635 KiB) -> 43ms - -Warm Runs (average of 25 runs) -test/samples/angular.js (1410 KiB) -> 9.32ms -test/samples/angular.min.js (303 KiB) -> 3.16ms -test/samples/d3.js (553 KiB) -> 5ms -test/samples/d3.min.js (250 KiB) -> 2.32ms -test/samples/magic-string.js (34 KiB) -> 0.16ms -test/samples/magic-string.min.js (20 KiB) -> 0ms -test/samples/rollup.js (698 KiB) -> 6.28ms -test/samples/rollup.min.js (367 KiB) -> 3.6ms - -Warm Runs, All Samples (average of 25 runs) -test/samples/*.js (3635 KiB) -> 27.76ms -``` - -### Wasm Build Steps - -To build download the WASI SDK from https://github.com/WebAssembly/wasi-sdk/releases. - -The Makefile assumes the existence of "wasi-sdk-11.0" and "wabt" (optional) as sibling folders to this project. - -The build through the Makefile is then run via `make lib/lexer.wasm`, which can also be triggered via `npm run build-wasm` to create `dist/lexer.js`. - -On Windows it may be preferable to use the Linux subsystem. - -After the Web Assembly build, the CJS build can be triggered via `npm run build`. - -Optimization passes are run with [Binaryen](https://github.com/WebAssembly/binaryen) prior to publish to reduce the Web Assembly footprint. - -### License - -MIT - -[travis-url]: https://travis-ci.org/guybedford/es-module-lexer -[travis-image]: https://travis-ci.org/guybedford/es-module-lexer.svg?branch=master +# CJS Module Lexer + +[![Build Status][travis-image]][travis-url] + +A [very fast](#benchmarks) JS CommonJS module syntax lexer used to detect the most likely list of named exports of a CommonJS module. + +Outputs the list of named exports (`exports.name = ...`) and possible module reexports (`module.exports = require('...')`), including the common transpiler variations of these cases. + +Forked from https://github.com/guybedford/es-module-lexer. + +_Comprehensively handles the JS language grammar while remaining small and fast. - ~90ms per MB of JS cold and ~15ms per MB of JS warm, [see benchmarks](#benchmarks) for more info._ + +### Project Status + +This project is used in Node.js core for detecting the named exports available when importing a CJS module into ESM, and is maintained for this purpose. + +PRs will be accepted and upstreamed for parser bugs, performance improvements or new syntax support only. + +_Detection patterns for this project are **frozen**_. This is because adding any new export detection patterns would result in fragmented backwards-compatibility. Specifically, it would be very difficult to figure out why an ES module named export for CommonJS might work in newer Node.js versions but not older versions. This problem would only be discovered downstream of module authors, with the fix for module authors being to then have to understand which patterns in this project provide full backwards-compatibily. Rather, by fully freezing the detected patterns, if it works in any Node.js version it will work in any other. Build tools can also reliably treat the supported syntax for this project as a part of their output target for ensuring syntax support. + +### Usage + +``` +npm install cjs-module-lexer +``` + +For use in CommonJS: + +```js +const { parse } = require('cjs-module-lexer'); + +// `init` return a promise for parity with the ESM API, but you do not have to call it + +const { exports, reexports } = parse(` + // named exports detection + module.exports.a = 'a'; + (function () { + exports.b = 'b'; + })(); + Object.defineProperty(exports, 'c', { value: 'c' }); + /* exports.d = 'not detected'; */ + + // reexports detection + if (maybe) module.exports = require('./dep1.js'); + if (another) module.exports = require('./dep2.js'); + + // literal exports assignments + module.exports = { a, b: c, d, 'e': f } + + // __esModule detection + Object.defineProperty(module.exports, '__esModule', { value: true }) +`); + +// exports === ['a', 'b', 'c', '__esModule'] +// reexports === ['./dep1.js', './dep2.js'] +``` + +When using the ESM version, Wasm is supported instead: + +```js +import { parse, init } from 'cjs-module-lexer'; +// init needs to be called and waited upon +await init(); +const { exports, reexports } = parse(source); +``` + +The Wasm build is around 1.5x faster and without a cold start. + +### Grammar + +CommonJS exports matches are run against the source token stream. + +The token grammar is: + +``` +IDENTIFIER: As defined by ECMA-262, without support for identifier `\` escapes, filtered to remove strict reserved words: + "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "enum" + +STRING_LITERAL: A `"` or `'` bounded ECMA-262 string literal. + +MODULE_EXPORTS: `module` `.` `exports` + +EXPORTS_IDENTIFIER: MODULE_EXPORTS_IDENTIFIER | `exports` + +EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=` + +EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` STRING_LITERAL `]` `=` + +EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (STRING_LITERAL `:` IDENTIFIER) + +EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE) + +EXPORTS_MEMBER: EXPORTS_DOT_ASSIGN | EXPORTS_LITERAL_COMPUTED_ASSIGN + +EXPORTS_DEFINE: `Object` `.` `defineProperty `(` EXPORTS_IDENFITIER `,` STRING_LITERAL + +EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {` + (`enumerable: true,`)? + ( + `value:` | + `get` (`: function` IDENTIFIER? )? `() {` return IDENTIFIER (`.` IDENTIFIER | `[` STRING_LITERAL `]`)? `;`? `}` `,`? + ) + `})` + +EXPORTS_LITERAL: MODULE_EXPORTS `=` `{` (EXPORTS_LITERAL_PROP | EXPORTS_SPREAD) `,`)+ `}` + +REQUIRE: `require` `(` STRING_LITERAL `)` + +EXPORTS_ASSIGN: (`var` | `const` | `let`) IDENTIFIER `=` (`_interopRequireWildcard (`)? REQUIRE + +MODULE_EXPORTS_ASSIGN: MODULE_EXPORTS `=` REQUIRE + +EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE + +EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {` + ( + ( + `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? + ( + (`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)? + (`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)? + )? + ) | + `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)` + ) + ( + EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? | + `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get` (`: function` IDENTIFIER? )? `() { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`? + ) + `})` +``` + +Spacing between tokens is taken to be any ECMA-262 whitespace, ECMA-262 block comment or ECMA-262 line comment. + +* The returned export names are taken to be the combination of: + 1. All `IDENTIFIER` and `STRING_LITERAL` slots for `EXPORTS_MEMBER` and `EXPORTS_LITERAL` matches. + 2. The first `STRING_LITERAL` slot for all `EXPORTS_DEFINE_VALUE` matches where that same string is not an `EXPORTS_DEFINE` match that is not also an `EXPORTS_DEFINE_VALUE` match. +* The reexport specifiers are taken to be the combination of: + 1. The `REQUIRE` matches of the last matched of either `MODULE_EXPORTS_ASSIGN` or `EXPORTS_LITERAL`. + 2. All _top-level_ `EXPORT_STAR` `REQUIRE` matches and `EXPORTS_ASSIGN` matches whose `IDENTIFIER` also matches the first `IDENTIFIER` in `EXPORT_STAR_LIB`. + +### Parsing Examples + +#### Named Exports Parsing + +The basic matching rules for named exports are `exports.name`, `exports['name']` or `Object.defineProperty(exports, 'name', ...)`. This matching is done without scope analysis and regardless of the expression position: + +```js +// DETECTS EXPORTS: a, b +(function (exports) { + exports.a = 'a'; + exports['b'] = 'b'; +})(exports); +``` + +Because there is no scope analysis, the above detection may overclassify: + +```js +// DETECTS EXPORTS: a, b, c +(function (exports, Object) { + exports.a = 'a'; + exports['b'] = 'b'; + if (false) + exports.c = 'c'; +})(NOT_EXPORTS, NOT_OBJECT); +``` + +It will in turn underclassify in cases where the identifiers are renamed: + +```js +// DETECTS: NO EXPORTS +(function (e) { + e.a = 'a'; + e['b'] = 'b'; +})(exports); +``` + +#### Getter Exports Parsing + +`Object.defineProperty` is detected for specifically value and getter forms returning an identifier or member expression: + +```js +// DETECTS: a, b, c, d, __esModule +Object.defineProperty(exports, 'a', { + enumerable: true, + get: function () { + return q.p; + } +}); +Object.defineProperty(exports, 'b', { + enumerable: true, + get: function () { + return q['p']; + } +}); +Object.defineProperty(exports, 'c', { + enumerable: true, + get () { + return b; + } +}); +Object.defineProperty(exports, 'd', { value: 'd' }); +Object.defineProperty(exports, '__esModule', { value: true }); +``` + +Value properties are also detected specifically: + +```js +Object.defineProperty(exports, 'a', { + value: 'no problem' +}); +``` + +To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will +opt-out of the getter matching: + +```js +// DETECTS: NO EXPORTS +Object.defineProperty(exports, 'a', { + get () { + return 'nope'; + } +}); + +if (false) { + Object.defineProperty(module.exports, 'a', { + get () { + return dynamic(); + } + }) +} +``` + +Alternative object definition structures or getter function bodies are not detected: + +```js +// DETECTS: NO EXPORTS +Object.defineProperty(exports, 'a', { + enumerable: false, + get () { + return p; + } +}); +Object.defineProperty(exports, 'b', { + configurable: true, + get () { + return p; + } +}); +Object.defineProperty(exports, 'c', { + get: () => p +}); +Object.defineProperty(exports, 'd', { + enumerable: true, + get: function () { + return dynamic(); + } +}); +Object.defineProperty(exports, 'e', { + enumerable: true, + get () { + return 'str'; + } +}); +``` + +`Object.defineProperties` is also not supported. + +#### Exports Object Assignment + +A best-effort is made to detect `module.exports` object assignments, but because this is not a full parser, arbitrary expressions are not handled in the +object parsing process. + +Simple object definitions are supported: + +```js +// DETECTS EXPORTS: a, b, c +module.exports = { + a, + 'b': b, + c: c, + ...d +}; +``` + +Object properties that are not identifiers or string expressions will bail out of the object detection, while spreads are ignored: + +```js +// DETECTS EXPORTS: a, b +module.exports = { + a, + ...d, + b: require('c'), + c: "not detected since require('c') above bails the object detection" +} +``` + +`Object.defineProperties` is not currently supported either. + +#### module.exports reexport assignment + +Any `module.exports = require('mod')` assignment is detected as a reexport, but only the last one is returned: + +```js +// DETECTS REEXPORTS: c +module.exports = require('a'); +(module => module.exports = require('b'))(NOT_MODULE); +if (false) module.exports = require('c'); +``` + +This is to avoid over-classification in Webpack bundles with externals which include `module.exports = require('external')` in their source for every external dependency. + +In exports object assignment, any spread of `require()` are detected as multiple separate reexports: + +```js +// DETECTS REEXPORTS: a, b +module.exports = require('ignored'); +module.exports = { + ...require('a'), + ...require('b') +}; +``` + +#### Transpiler Re-exports + +For named exports, transpiler output works well with the rules described above. + +But for star re-exports, special care is taken to support common patterns of transpiler outputs from Babel and TypeScript as well as bundlers like RollupJS. +These reexport and star reexport patterns are restricted to only be detected at the top-level as provided by the direct output of these tools. + +For example, `export * from 'external'` is output by Babel as: + +```js +"use strict"; + +exports.__esModule = true; + +var _external = require("external"); + +Object.keys(_external).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + exports[key] = _external[key]; +}); +``` + +Where the `var _external = require("external")` is specifically detected as well as the `Object.keys(_external)` statement, down to the exact +for of that entire expression including minor variations of the output. The `_external` and `key` identifiers are carefully matched in this +detection. + +Similarly for TypeScript, `export * from 'external'` is output as: + +```js +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("external")); +``` + +Where the `__export(require("external"))` statement is explicitly detected as a reexport, including variations `tslib.__export` and `__exportStar`. + +### Environment Support + +Node.js 10+, and [all browsers with Web Assembly support](https://caniuse.com/#feat=wasm). + +### JS Grammar Support + +* Token state parses all line comments, block comments, strings, template strings, blocks, parens and punctuators. +* Division operator / regex token ambiguity is handled via backtracking checks against punctuator prefixes, including closing brace or paren backtracking. +* Always correctly parses valid JS source, but may parse invalid JS source without errors. + +### Benchmarks + +Benchmarks can be run with `npm run bench`. + +Current results: + +JS Build: + +``` +Module load time +> 4ms +Cold Run, All Samples +test/samples/*.js (3635 KiB) +> 299ms + +Warm Runs (average of 25 runs) +test/samples/angular.js (1410 KiB) +> 13.96ms +test/samples/angular.min.js (303 KiB) +> 4.72ms +test/samples/d3.js (553 KiB) +> 6.76ms +test/samples/d3.min.js (250 KiB) +> 4ms +test/samples/magic-string.js (34 KiB) +> 0.64ms +test/samples/magic-string.min.js (20 KiB) +> 0ms +test/samples/rollup.js (698 KiB) +> 8.48ms +test/samples/rollup.min.js (367 KiB) +> 5.36ms + +Warm Runs, All Samples (average of 25 runs) +test/samples/*.js (3635 KiB) +> 40.28ms +``` + +Wasm Build: +``` +Module load time +> 10ms +Cold Run, All Samples +test/samples/*.js (3635 KiB) +> 43ms + +Warm Runs (average of 25 runs) +test/samples/angular.js (1410 KiB) +> 9.32ms +test/samples/angular.min.js (303 KiB) +> 3.16ms +test/samples/d3.js (553 KiB) +> 5ms +test/samples/d3.min.js (250 KiB) +> 2.32ms +test/samples/magic-string.js (34 KiB) +> 0.16ms +test/samples/magic-string.min.js (20 KiB) +> 0ms +test/samples/rollup.js (698 KiB) +> 6.28ms +test/samples/rollup.min.js (367 KiB) +> 3.6ms + +Warm Runs, All Samples (average of 25 runs) +test/samples/*.js (3635 KiB) +> 27.76ms +``` + +### Wasm Build Steps + +To build download the WASI SDK from https://github.com/WebAssembly/wasi-sdk/releases. + +The Makefile assumes the existence of "wasi-sdk-11.0" and "wabt" (optional) as sibling folders to this project. + +The build through the Makefile is then run via `make lib/lexer.wasm`, which can also be triggered via `npm run build-wasm` to create `dist/lexer.js`. + +On Windows it may be preferable to use the Linux subsystem. + +After the Web Assembly build, the CJS build can be triggered via `npm run build`. + +Optimization passes are run with [Binaryen](https://github.com/WebAssembly/binaryen) prior to publish to reduce the Web Assembly footprint. + +### License + +MIT + +[travis-url]: https://travis-ci.org/guybedford/es-module-lexer +[travis-image]: https://travis-ci.org/guybedford/es-module-lexer.svg?branch=master diff --git a/node_modules/cjs-module-lexer/lexer.d.ts b/node_modules/cjs-module-lexer/lexer.d.ts index 99aa9137..cdc94fbe 100644 --- a/node_modules/cjs-module-lexer/lexer.d.ts +++ b/node_modules/cjs-module-lexer/lexer.d.ts @@ -1,7 +1,7 @@ -export interface Exports { - exports: string[]; - reexports: string[]; -} - -export declare function parse(source: string, name?: string): Exports; -export declare function init(): Promise; +export interface Exports { + exports: string[]; + reexports: string[]; +} + +export declare function parse(source: string, name?: string): Exports; +export declare function init(): Promise; diff --git a/node_modules/cjs-module-lexer/lexer.js b/node_modules/cjs-module-lexer/lexer.js index 1bf3123c..ce80a676 100644 --- a/node_modules/cjs-module-lexer/lexer.js +++ b/node_modules/cjs-module-lexer/lexer.js @@ -1,1438 +1,1438 @@ -let source, pos, end; -let openTokenDepth, - templateDepth, - lastTokenPos, - lastSlashWasDivision, - templateStack, - templateStackDepth, - openTokenPosStack, - openClassPosStack, - nextBraceIsClass, - starExportMap, - lastStarExportSpecifier, - _exports, - unsafeGetters, - reexports; - -function resetState () { - openTokenDepth = 0; - templateDepth = -1; - lastTokenPos = -1; - lastSlashWasDivision = false; - templateStack = new Array(1024); - templateStackDepth = 0; - openTokenPosStack = new Array(1024); - openClassPosStack = new Array(1024); - nextBraceIsClass = false; - starExportMap = Object.create(null); - lastStarExportSpecifier = null; - - _exports = new Set(); - unsafeGetters = new Set(); - reexports = new Set(); -} - -// RequireType -const Import = 0; -const ExportAssign = 1; -const ExportStar = 2; - -function parseCJS (source, name = '@') { - resetState(); - try { - parseSource(source); - } - catch (e) { - e.message += `\n at ${name}:${source.slice(0, pos).split('\n').length}:${pos - source.lastIndexOf('\n', pos - 1)}`; - e.loc = pos; - throw e; - } - const result = { exports: [..._exports].filter(expt => expt !== undefined && !unsafeGetters.has(expt)), reexports: [...reexports].filter(reexpt => reexpt !== undefined) }; - resetState(); - return result; -} - -function decode (str) { - if (str[0] === '"' || str[0] === '\'') { - try { - const decoded = (0, eval)(str); - // Filter to exclude non-matching UTF-16 surrogate strings - for (let i = 0; i < decoded.length; i++) { - const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; - if (surrogatePrefix < 0xD800) { - // Not a surrogate - continue; - } - else if (surrogatePrefix === 0xD800) { - // Validate surrogate pair - if ((decoded.charCodeAt(++i) & 0xFC00) !== 0xDC00) - return; - } - else { - // Out-of-range surrogate code (above 0xD800) - return; - } - } - return decoded; - } - catch {} - } - else { - return str; - } -} - -function parseSource (cjsSource) { - source = cjsSource; - pos = -1; - end = source.length - 1; - let ch = 0; - - // Handle #! - if (source.charCodeAt(0) === 35/*#*/ && source.charCodeAt(1) === 33/*!*/) { - if (source.length === 2) - return true; - pos += 2; - while (pos++ < end) { - ch = source.charCodeAt(pos); - if (ch === 10/*\n*/ || ch === 13/*\r*/) - break; - } - } - - while (pos++ < end) { - ch = source.charCodeAt(pos); - - if (ch === 32 || ch < 14 && ch > 8) - continue; - - if (openTokenDepth === 0) { - switch (ch) { - case 105/*i*/: - if (source.startsWith('mport', pos + 1) && keywordStart(pos)) - throwIfImportStatement(); - lastTokenPos = pos; - continue; - case 114/*r*/: - const startPos = pos; - if (tryParseRequire(Import) && keywordStart(startPos)) - tryBacktrackAddStarExportBinding(startPos - 1); - lastTokenPos = pos; - continue; - case 95/*_*/: - if (source.startsWith('interopRequireWildcard', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) { - const startPos = pos; - pos += 23; - if (source.charCodeAt(pos) === 40/*(*/) { - pos++; - openTokenPosStack[openTokenDepth++] = lastTokenPos; - if (tryParseRequire(Import) && keywordStart(startPos)) { - tryBacktrackAddStarExportBinding(startPos - 1); - } - } - } - else if (source.startsWith('_export', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) { - pos += 8; - if (source.startsWith('Star', pos)) - pos += 4; - if (source.charCodeAt(pos) === 40/*(*/) { - openTokenPosStack[openTokenDepth++] = lastTokenPos; - if (source.charCodeAt(++pos) === 114/*r*/) - tryParseRequire(ExportStar); - } - } - lastTokenPos = pos; - continue; - } - } - - switch (ch) { - case 101/*e*/: - if (source.startsWith('xport', pos + 1) && keywordStart(pos)) { - if (source.charCodeAt(pos + 6) === 115/*s*/) - tryParseExportsDotAssign(false); - else if (openTokenDepth === 0) - throwIfExportStatement(); - } - break; - case 99/*c*/: - if (keywordStart(pos) && source.startsWith('lass', pos + 1) && isBrOrWs(source.charCodeAt(pos + 5))) - nextBraceIsClass = true; - break; - case 109/*m*/: - if (source.startsWith('odule', pos + 1) && keywordStart(pos)) - tryParseModuleExportsDotAssign(); - break; - case 79/*O*/: - if (source.startsWith('bject', pos + 1) && keywordStart(pos)) - tryParseObjectDefineOrKeys(openTokenDepth === 0); - break; - case 40/*(*/: - openTokenPosStack[openTokenDepth++] = lastTokenPos; - break; - case 41/*)*/: - if (openTokenDepth === 0) - throw new Error('Unexpected closing bracket.'); - openTokenDepth--; - break; - case 123/*{*/: - openClassPosStack[openTokenDepth] = nextBraceIsClass; - nextBraceIsClass = false; - openTokenPosStack[openTokenDepth++] = lastTokenPos; - break; - case 125/*}*/: - if (openTokenDepth === 0) - throw new Error('Unexpected closing brace.'); - if (openTokenDepth-- === templateDepth) { - templateDepth = templateStack[--templateStackDepth]; - templateString(); - } - else { - if (templateDepth !== -1 && openTokenDepth < templateDepth) - throw new Error('Unexpected closing brace.'); - } - break; - case 60/*>*/: - // TODO: