@quantiya/codevibe-claude-plugin 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/codevibe-claude +13 -0
- package/dist/http-api.js +1 -1
- package/dist/http-api.js.map +1 -1
- package/hooks/session-start.sh +10 -4
- package/node_modules/@quantiya/codevibe-core/README.md +178 -0
- package/node_modules/@quantiya/codevibe-core/bin/codevibe.js +7 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +132 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.js +568 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.js +10 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +16 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.js +189 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.d.ts +5 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.js +217 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.d.ts +53 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.js +310 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +53 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/config.js +123 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/index.js +8 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.d.ts +118 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.js +284 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +14 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +68 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/index.js +8 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +125 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.js +375 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/index.js +8 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/logger.d.ts +35 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/logger.js +142 -0
- package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.d.ts +39 -0
- package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.js +236 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/index.js +7 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +55 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.js +151 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/auth.d.ts +15 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/auth.js +3 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +54 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/encryption.js +3 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +74 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/events.js +28 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +4 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/index.js +22 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +59 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/session.js +22 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CHANGELOG.md +274 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/README.md +466 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng-browser.js +25 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/stringify.js +44 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v35.js +80 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v4.js +43 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/package.json +135 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/@quantiya/codevibe-core/package.json +51 -0
- package/node_modules/accepts/HISTORY.md +250 -0
- package/node_modules/accepts/LICENSE +23 -0
- package/node_modules/accepts/README.md +140 -0
- package/node_modules/accepts/index.js +238 -0
- package/node_modules/accepts/package.json +47 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/bl/.travis.yml +17 -0
- package/node_modules/bl/BufferList.js +396 -0
- package/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/bl/README.md +247 -0
- package/node_modules/bl/bl.js +84 -0
- package/node_modules/bl/package.json +37 -0
- package/node_modules/bl/test/convert.js +21 -0
- package/node_modules/bl/test/indexOf.js +492 -0
- package/node_modules/bl/test/isBufferList.js +32 -0
- package/node_modules/bl/test/test.js +869 -0
- package/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/body-parser/README.md +494 -0
- package/node_modules/body-parser/index.js +80 -0
- package/node_modules/body-parser/lib/read.js +250 -0
- package/node_modules/body-parser/lib/types/json.js +166 -0
- package/node_modules/body-parser/lib/types/raw.js +43 -0
- package/node_modules/body-parser/lib/types/text.js +37 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +142 -0
- package/node_modules/body-parser/lib/utils.js +96 -0
- package/node_modules/body-parser/package.json +52 -0
- package/node_modules/buffer/AUTHORS.md +70 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +186 -0
- package/node_modules/buffer/index.js +1817 -0
- package/node_modules/buffer/package.json +96 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/chownr/LICENSE +15 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/chownr.js +167 -0
- package/node_modules/chownr/package.json +29 -0
- package/node_modules/content-disposition/HISTORY.md +72 -0
- package/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/content-disposition/README.md +142 -0
- package/node_modules/content-disposition/index.js +458 -0
- package/node_modules/content-disposition/package.json +43 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +335 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/cookie-signature/History.md +70 -0
- package/node_modules/cookie-signature/LICENSE +22 -0
- package/node_modules/cookie-signature/Readme.md +23 -0
- package/node_modules/cookie-signature/index.js +47 -0
- package/node_modules/cookie-signature/package.json +24 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/decompress-response/index.d.ts +22 -0
- package/node_modules/decompress-response/index.js +58 -0
- package/node_modules/decompress-response/license +9 -0
- package/node_modules/decompress-response/package.json +56 -0
- package/node_modules/decompress-response/readme.md +48 -0
- package/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/deep-extend/README.md +91 -0
- package/node_modules/deep-extend/index.js +1 -0
- package/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/node_modules/deep-extend/package.json +62 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/detect-libc/LICENSE +201 -0
- package/node_modules/detect-libc/README.md +163 -0
- package/node_modules/detect-libc/index.d.ts +14 -0
- package/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/node_modules/detect-libc/lib/process.js +24 -0
- package/node_modules/detect-libc/package.json +44 -0
- package/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/expand-template/.travis.yml +6 -0
- package/node_modules/expand-template/LICENSE +21 -0
- package/node_modules/expand-template/README.md +43 -0
- package/node_modules/expand-template/index.js +26 -0
- package/node_modules/expand-template/package.json +29 -0
- package/node_modules/expand-template/test.js +67 -0
- package/node_modules/express/History.md +3858 -0
- package/node_modules/express/LICENSE +24 -0
- package/node_modules/express/Readme.md +266 -0
- package/node_modules/express/index.js +11 -0
- package/node_modules/express/lib/application.js +631 -0
- package/node_modules/express/lib/express.js +81 -0
- package/node_modules/express/lib/request.js +515 -0
- package/node_modules/express/lib/response.js +1039 -0
- package/node_modules/express/lib/utils.js +269 -0
- package/node_modules/express/lib/view.js +205 -0
- package/node_modules/express/package.json +98 -0
- package/node_modules/finalhandler/HISTORY.md +233 -0
- package/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/finalhandler/README.md +147 -0
- package/node_modules/finalhandler/index.js +293 -0
- package/node_modules/finalhandler/package.json +43 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/fresh/HISTORY.md +80 -0
- package/node_modules/fresh/LICENSE +23 -0
- package/node_modules/fresh/README.md +117 -0
- package/node_modules/fresh/index.js +136 -0
- package/node_modules/fresh/package.json +46 -0
- package/node_modules/fs-constants/LICENSE +21 -0
- package/node_modules/fs-constants/README.md +26 -0
- package/node_modules/fs-constants/browser.js +1 -0
- package/node_modules/fs-constants/index.js +1 -0
- package/node_modules/fs-constants/package.json +19 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/github-from-package/.travis.yml +4 -0
- package/node_modules/github-from-package/LICENSE +18 -0
- package/node_modules/github-from-package/example/package.json +8 -0
- package/node_modules/github-from-package/example/url.js +3 -0
- package/node_modules/github-from-package/index.js +17 -0
- package/node_modules/github-from-package/package.json +30 -0
- package/node_modules/github-from-package/readme.markdown +53 -0
- package/node_modules/github-from-package/test/a.json +8 -0
- package/node_modules/github-from-package/test/b.json +5 -0
- package/node_modules/github-from-package/test/c.json +5 -0
- package/node_modules/github-from-package/test/d.json +7 -0
- package/node_modules/github-from-package/test/e.json +5 -0
- package/node_modules/github-from-package/test/url.js +19 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/graphql/LICENSE +21 -0
- package/node_modules/graphql/NotSupportedTSVersion.d.ts +1 -0
- package/node_modules/graphql/README.md +203 -0
- package/node_modules/graphql/error/GraphQLError.d.ts +152 -0
- package/node_modules/graphql/error/GraphQLError.js +267 -0
- package/node_modules/graphql/error/GraphQLError.mjs +253 -0
- package/node_modules/graphql/error/index.d.ts +9 -0
- package/node_modules/graphql/error/index.js +41 -0
- package/node_modules/graphql/error/index.mjs +3 -0
- package/node_modules/graphql/error/locatedError.d.ts +13 -0
- package/node_modules/graphql/error/locatedError.js +40 -0
- package/node_modules/graphql/error/locatedError.mjs +32 -0
- package/node_modules/graphql/error/syntaxError.d.ts +11 -0
- package/node_modules/graphql/error/syntaxError.js +19 -0
- package/node_modules/graphql/error/syntaxError.mjs +12 -0
- package/node_modules/graphql/execution/collectFields.d.ts +45 -0
- package/node_modules/graphql/execution/collectFields.js +229 -0
- package/node_modules/graphql/execution/collectFields.mjs +213 -0
- package/node_modules/graphql/execution/execute.d.ts +190 -0
- package/node_modules/graphql/execution/execute.js +1054 -0
- package/node_modules/graphql/execution/execute.mjs +1026 -0
- package/node_modules/graphql/execution/index.d.ts +18 -0
- package/node_modules/graphql/execution/index.js +73 -0
- package/node_modules/graphql/execution/index.mjs +13 -0
- package/node_modules/graphql/execution/mapAsyncIterator.d.ts +9 -0
- package/node_modules/graphql/execution/mapAsyncIterator.js +68 -0
- package/node_modules/graphql/execution/mapAsyncIterator.mjs +61 -0
- package/node_modules/graphql/execution/subscribe.d.ts +72 -0
- package/node_modules/graphql/execution/subscribe.js +244 -0
- package/node_modules/graphql/execution/subscribe.mjs +222 -0
- package/node_modules/graphql/execution/values.d.ts +79 -0
- package/node_modules/graphql/execution/values.js +300 -0
- package/node_modules/graphql/execution/values.mjs +263 -0
- package/node_modules/graphql/graphql.d.ts +67 -0
- package/node_modules/graphql/graphql.js +96 -0
- package/node_modules/graphql/graphql.mjs +122 -0
- package/node_modules/graphql/index.d.ts +428 -0
- package/node_modules/graphql/index.js +1311 -0
- package/node_modules/graphql/index.mjs +262 -0
- package/node_modules/graphql/jsutils/Maybe.d.ts +2 -0
- package/node_modules/graphql/jsutils/Maybe.js +5 -0
- package/node_modules/graphql/jsutils/Maybe.mjs +1 -0
- package/node_modules/graphql/jsutils/ObjMap.d.ts +16 -0
- package/node_modules/graphql/jsutils/ObjMap.js +5 -0
- package/node_modules/graphql/jsutils/ObjMap.mjs +1 -0
- package/node_modules/graphql/jsutils/Path.d.ts +20 -0
- package/node_modules/graphql/jsutils/Path.js +33 -0
- package/node_modules/graphql/jsutils/Path.mjs +25 -0
- package/node_modules/graphql/jsutils/PromiseOrValue.d.ts +1 -0
- package/node_modules/graphql/jsutils/PromiseOrValue.js +5 -0
- package/node_modules/graphql/jsutils/PromiseOrValue.mjs +1 -0
- package/node_modules/graphql/jsutils/devAssert.d.ts +1 -0
- package/node_modules/graphql/jsutils/devAssert.js +14 -0
- package/node_modules/graphql/jsutils/devAssert.mjs +7 -0
- package/node_modules/graphql/jsutils/didYouMean.d.ts +8 -0
- package/node_modules/graphql/jsutils/didYouMean.js +38 -0
- package/node_modules/graphql/jsutils/didYouMean.mjs +32 -0
- package/node_modules/graphql/jsutils/groupBy.d.ts +7 -0
- package/node_modules/graphql/jsutils/groupBy.js +26 -0
- package/node_modules/graphql/jsutils/groupBy.mjs +19 -0
- package/node_modules/graphql/jsutils/identityFunc.d.ts +4 -0
- package/node_modules/graphql/jsutils/identityFunc.js +13 -0
- package/node_modules/graphql/jsutils/identityFunc.mjs +6 -0
- package/node_modules/graphql/jsutils/inspect.d.ts +4 -0
- package/node_modules/graphql/jsutils/inspect.js +121 -0
- package/node_modules/graphql/jsutils/inspect.mjs +115 -0
- package/node_modules/graphql/jsutils/instanceOf.d.ts +16 -0
- package/node_modules/graphql/jsutils/instanceOf.js +65 -0
- package/node_modules/graphql/jsutils/instanceOf.mjs +57 -0
- package/node_modules/graphql/jsutils/invariant.d.ts +4 -0
- package/node_modules/graphql/jsutils/invariant.js +16 -0
- package/node_modules/graphql/jsutils/invariant.mjs +9 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.d.ts +7 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.js +18 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.mjs +11 -0
- package/node_modules/graphql/jsutils/isIterableObject.d.ts +20 -0
- package/node_modules/graphql/jsutils/isIterableObject.js +32 -0
- package/node_modules/graphql/jsutils/isIterableObject.mjs +25 -0
- package/node_modules/graphql/jsutils/isObjectLike.d.ts +7 -0
- package/node_modules/graphql/jsutils/isObjectLike.js +14 -0
- package/node_modules/graphql/jsutils/isObjectLike.mjs +7 -0
- package/node_modules/graphql/jsutils/isPromise.d.ts +5 -0
- package/node_modules/graphql/jsutils/isPromise.js +17 -0
- package/node_modules/graphql/jsutils/isPromise.mjs +10 -0
- package/node_modules/graphql/jsutils/keyMap.d.ts +32 -0
- package/node_modules/graphql/jsutils/keyMap.js +43 -0
- package/node_modules/graphql/jsutils/keyMap.mjs +36 -0
- package/node_modules/graphql/jsutils/keyValMap.d.ts +23 -0
- package/node_modules/graphql/jsutils/keyValMap.js +33 -0
- package/node_modules/graphql/jsutils/keyValMap.mjs +26 -0
- package/node_modules/graphql/jsutils/mapValue.d.ts +9 -0
- package/node_modules/graphql/jsutils/mapValue.js +20 -0
- package/node_modules/graphql/jsutils/mapValue.mjs +13 -0
- package/node_modules/graphql/jsutils/memoize3.d.ts +9 -0
- package/node_modules/graphql/jsutils/memoize3.js +41 -0
- package/node_modules/graphql/jsutils/memoize3.mjs +34 -0
- package/node_modules/graphql/jsutils/naturalCompare.d.ts +8 -0
- package/node_modules/graphql/jsutils/naturalCompare.js +69 -0
- package/node_modules/graphql/jsutils/naturalCompare.mjs +61 -0
- package/node_modules/graphql/jsutils/printPathArray.d.ts +6 -0
- package/node_modules/graphql/jsutils/printPathArray.js +17 -0
- package/node_modules/graphql/jsutils/printPathArray.mjs +10 -0
- package/node_modules/graphql/jsutils/promiseForObject.d.ts +11 -0
- package/node_modules/graphql/jsutils/promiseForObject.js +25 -0
- package/node_modules/graphql/jsutils/promiseForObject.mjs +18 -0
- package/node_modules/graphql/jsutils/promiseReduce.d.ts +13 -0
- package/node_modules/graphql/jsutils/promiseReduce.js +27 -0
- package/node_modules/graphql/jsutils/promiseReduce.mjs +20 -0
- package/node_modules/graphql/jsutils/suggestionList.d.ts +8 -0
- package/node_modules/graphql/jsutils/suggestionList.js +139 -0
- package/node_modules/graphql/jsutils/suggestionList.mjs +130 -0
- package/node_modules/graphql/jsutils/toError.d.ts +4 -0
- package/node_modules/graphql/jsutils/toError.js +25 -0
- package/node_modules/graphql/jsutils/toError.mjs +18 -0
- package/node_modules/graphql/jsutils/toObjMap.d.ts +5 -0
- package/node_modules/graphql/jsutils/toObjMap.js +24 -0
- package/node_modules/graphql/jsutils/toObjMap.mjs +17 -0
- package/node_modules/graphql/language/ast.d.ts +582 -0
- package/node_modules/graphql/language/ast.js +237 -0
- package/node_modules/graphql/language/ast.mjs +221 -0
- package/node_modules/graphql/language/blockString.d.ts +28 -0
- package/node_modules/graphql/language/blockString.js +195 -0
- package/node_modules/graphql/language/blockString.mjs +178 -0
- package/node_modules/graphql/language/characterClasses.d.ts +47 -0
- package/node_modules/graphql/language/characterClasses.js +75 -0
- package/node_modules/graphql/language/characterClasses.mjs +64 -0
- package/node_modules/graphql/language/directiveLocation.d.ts +33 -0
- package/node_modules/graphql/language/directiveLocation.js +39 -0
- package/node_modules/graphql/language/directiveLocation.mjs +33 -0
- package/node_modules/graphql/language/index.d.ts +110 -0
- package/node_modules/graphql/language/index.js +227 -0
- package/node_modules/graphql/language/index.mjs +36 -0
- package/node_modules/graphql/language/kinds.d.ts +72 -0
- package/node_modules/graphql/language/kinds.js +68 -0
- package/node_modules/graphql/language/kinds.mjs +62 -0
- package/node_modules/graphql/language/lexer.d.ts +96 -0
- package/node_modules/graphql/language/lexer.js +1016 -0
- package/node_modules/graphql/language/lexer.mjs +915 -0
- package/node_modules/graphql/language/location.d.ts +16 -0
- package/node_modules/graphql/language/location.js +38 -0
- package/node_modules/graphql/language/location.mjs +30 -0
- package/node_modules/graphql/language/parser.d.ts +592 -0
- package/node_modules/graphql/language/parser.js +1692 -0
- package/node_modules/graphql/language/parser.mjs +1645 -0
- package/node_modules/graphql/language/predicates.d.ts +37 -0
- package/node_modules/graphql/language/predicates.js +120 -0
- package/node_modules/graphql/language/predicates.mjs +90 -0
- package/node_modules/graphql/language/printLocation.d.ts +14 -0
- package/node_modules/graphql/language/printLocation.js +74 -0
- package/node_modules/graphql/language/printLocation.mjs +66 -0
- package/node_modules/graphql/language/printString.d.ts +5 -0
- package/node_modules/graphql/language/printString.js +183 -0
- package/node_modules/graphql/language/printString.mjs +176 -0
- package/node_modules/graphql/language/printer.d.ts +6 -0
- package/node_modules/graphql/language/printer.js +380 -0
- package/node_modules/graphql/language/printer.mjs +368 -0
- package/node_modules/graphql/language/schemaCoordinateLexer.d.ts +43 -0
- package/node_modules/graphql/language/schemaCoordinateLexer.js +171 -0
- package/node_modules/graphql/language/schemaCoordinateLexer.mjs +122 -0
- package/node_modules/graphql/language/source.d.ts +25 -0
- package/node_modules/graphql/language/source.js +65 -0
- package/node_modules/graphql/language/source.mjs +50 -0
- package/node_modules/graphql/language/tokenKind.d.ts +36 -0
- package/node_modules/graphql/language/tokenKind.js +44 -0
- package/node_modules/graphql/language/tokenKind.mjs +38 -0
- package/node_modules/graphql/language/visitor.d.ts +194 -0
- package/node_modules/graphql/language/visitor.js +374 -0
- package/node_modules/graphql/language/visitor.mjs +358 -0
- package/node_modules/graphql/package.json +39 -0
- package/node_modules/graphql/subscription/index.d.ts +19 -0
- package/node_modules/graphql/subscription/index.js +19 -0
- package/node_modules/graphql/subscription/index.mjs +19 -0
- package/node_modules/graphql/type/assertName.d.ts +10 -0
- package/node_modules/graphql/type/assertName.js +59 -0
- package/node_modules/graphql/type/assertName.mjs +44 -0
- package/node_modules/graphql/type/definition.d.ts +926 -0
- package/node_modules/graphql/type/definition.js +1362 -0
- package/node_modules/graphql/type/definition.mjs +1197 -0
- package/node_modules/graphql/type/directives.d.ts +90 -0
- package/node_modules/graphql/type/directives.js +238 -0
- package/node_modules/graphql/type/directives.mjs +202 -0
- package/node_modules/graphql/type/index.d.ts +151 -0
- package/node_modules/graphql/type/index.js +553 -0
- package/node_modules/graphql/type/index.mjs +104 -0
- package/node_modules/graphql/type/introspection.d.ts +30 -0
- package/node_modules/graphql/type/introspection.js +625 -0
- package/node_modules/graphql/type/introspection.mjs +559 -0
- package/node_modules/graphql/type/scalars.d.ts +19 -0
- package/node_modules/graphql/type/scalars.js +369 -0
- package/node_modules/graphql/type/scalars.mjs +309 -0
- package/node_modules/graphql/type/schema.d.ts +170 -0
- package/node_modules/graphql/type/schema.js +402 -0
- package/node_modules/graphql/type/schema.mjs +381 -0
- package/node_modules/graphql/type/validate.d.ts +17 -0
- package/node_modules/graphql/type/validate.js +706 -0
- package/node_modules/graphql/type/validate.mjs +681 -0
- package/node_modules/graphql/utilities/TypeInfo.d.ts +67 -0
- package/node_modules/graphql/utilities/TypeInfo.js +418 -0
- package/node_modules/graphql/utilities/TypeInfo.mjs +395 -0
- package/node_modules/graphql/utilities/assertValidName.d.ts +13 -0
- package/node_modules/graphql/utilities/assertValidName.js +51 -0
- package/node_modules/graphql/utilities/assertValidName.mjs +40 -0
- package/node_modules/graphql/utilities/astFromValue.d.ts +28 -0
- package/node_modules/graphql/utilities/astFromValue.js +190 -0
- package/node_modules/graphql/utilities/astFromValue.mjs +177 -0
- package/node_modules/graphql/utilities/buildASTSchema.d.ts +35 -0
- package/node_modules/graphql/utilities/buildASTSchema.js +115 -0
- package/node_modules/graphql/utilities/buildASTSchema.mjs +97 -0
- package/node_modules/graphql/utilities/buildClientSchema.d.ts +19 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +387 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +364 -0
- package/node_modules/graphql/utilities/coerceInputValue.d.ts +16 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +217 -0
- package/node_modules/graphql/utilities/coerceInputValue.mjs +192 -0
- package/node_modules/graphql/utilities/concatAST.d.ts +9 -0
- package/node_modules/graphql/utilities/concatAST.js +26 -0
- package/node_modules/graphql/utilities/concatAST.mjs +19 -0
- package/node_modules/graphql/utilities/extendSchema.d.ts +40 -0
- package/node_modules/graphql/utilities/extendSchema.js +808 -0
- package/node_modules/graphql/utilities/extendSchema.mjs +798 -0
- package/node_modules/graphql/utilities/findBreakingChanges.d.ts +53 -0
- package/node_modules/graphql/utilities/findBreakingChanges.js +547 -0
- package/node_modules/graphql/utilities/findBreakingChanges.mjs +519 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +188 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +145 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +138 -0
- package/node_modules/graphql/utilities/getOperationAST.d.ts +11 -0
- package/node_modules/graphql/utilities/getOperationAST.js +43 -0
- package/node_modules/graphql/utilities/getOperationAST.mjs +36 -0
- package/node_modules/graphql/utilities/getOperationRootType.d.ts +15 -0
- package/node_modules/graphql/utilities/getOperationRootType.js +67 -0
- package/node_modules/graphql/utilities/getOperationRootType.mjs +54 -0
- package/node_modules/graphql/utilities/index.d.ts +66 -0
- package/node_modules/graphql/utilities/index.js +247 -0
- package/node_modules/graphql/utilities/index.mjs +60 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.d.ts +18 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.js +43 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +31 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.d.ts +9 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.js +177 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.mjs +172 -0
- package/node_modules/graphql/utilities/printSchema.d.ts +5 -0
- package/node_modules/graphql/utilities/printSchema.js +338 -0
- package/node_modules/graphql/utilities/printSchema.mjs +314 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.d.ts +80 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.js +260 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.mjs +243 -0
- package/node_modules/graphql/utilities/separateOperations.d.ts +11 -0
- package/node_modules/graphql/utilities/separateOperations.js +88 -0
- package/node_modules/graphql/utilities/separateOperations.mjs +80 -0
- package/node_modules/graphql/utilities/sortValueNode.d.ts +9 -0
- package/node_modules/graphql/utilities/sortValueNode.js +47 -0
- package/node_modules/graphql/utilities/sortValueNode.mjs +39 -0
- package/node_modules/graphql/utilities/stripIgnoredCharacters.d.ts +62 -0
- package/node_modules/graphql/utilities/stripIgnoredCharacters.js +121 -0
- package/node_modules/graphql/utilities/stripIgnoredCharacters.mjs +104 -0
- package/node_modules/graphql/utilities/typeComparators.d.ts +32 -0
- package/node_modules/graphql/utilities/typeComparators.js +116 -0
- package/node_modules/graphql/utilities/typeComparators.mjs +106 -0
- package/node_modules/graphql/utilities/typeFromAST.d.ts +32 -0
- package/node_modules/graphql/utilities/typeFromAST.js +27 -0
- package/node_modules/graphql/utilities/typeFromAST.mjs +18 -0
- package/node_modules/graphql/utilities/typedQueryDocumentNode.d.ts +22 -0
- package/node_modules/graphql/utilities/typedQueryDocumentNode.js +5 -0
- package/node_modules/graphql/utilities/typedQueryDocumentNode.mjs +1 -0
- package/node_modules/graphql/utilities/valueFromAST.d.ts +29 -0
- package/node_modules/graphql/utilities/valueFromAST.js +197 -0
- package/node_modules/graphql/utilities/valueFromAST.mjs +184 -0
- package/node_modules/graphql/utilities/valueFromASTUntyped.d.ts +23 -0
- package/node_modules/graphql/utilities/valueFromASTUntyped.js +61 -0
- package/node_modules/graphql/utilities/valueFromASTUntyped.mjs +53 -0
- package/node_modules/graphql/validation/ValidationContext.d.ts +96 -0
- package/node_modules/graphql/validation/ValidationContext.js +233 -0
- package/node_modules/graphql/validation/ValidationContext.mjs +213 -0
- package/node_modules/graphql/validation/index.d.ts +41 -0
- package/node_modules/graphql/validation/index.js +331 -0
- package/node_modules/graphql/validation/index.mjs +69 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +46 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs +34 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +145 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs +127 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.d.ts +14 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +69 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs +53 -0
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.d.ts +23 -0
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +120 -0
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs +102 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.d.ts +16 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +167 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +150 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +36 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs +26 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.d.ts +16 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +89 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs +77 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +42 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs +34 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +67 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs +57 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.d.ts +5 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +90 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs +77 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +85 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs +78 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +52 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs +45 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +61 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs +51 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +57 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs +50 -0
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +14 -0
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +868 -0
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +853 -0
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.d.ts +12 -0
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +95 -0
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs +73 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +171 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs +148 -0
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.d.ts +20 -0
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +162 -0
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs +142 -0
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.d.ts +9 -0
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.js +66 -0
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs +57 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +86 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs +77 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +11 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +92 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +81 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +55 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs +44 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +54 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs +47 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.d.ts +16 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +95 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +85 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +75 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs +64 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +87 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs +79 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.d.ts +12 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +41 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs +34 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +54 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs +46 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.d.ts +12 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +46 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs +39 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +71 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs +64 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +57 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs +47 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.d.ts +10 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +49 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs +41 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +246 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +223 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.d.ts +13 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +46 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs +33 -0
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.d.ts +12 -0
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +131 -0
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs +116 -0
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.d.ts +15 -0
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +131 -0
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs +117 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +15 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +41 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +32 -0
- package/node_modules/graphql/validation/specifiedRules.d.ts +18 -0
- package/node_modules/graphql/validation/specifiedRules.js +176 -0
- package/node_modules/graphql/validation/specifiedRules.mjs +132 -0
- package/node_modules/graphql/validation/validate.d.ts +61 -0
- package/node_modules/graphql/validation/validate.js +151 -0
- package/node_modules/graphql/validation/validate.mjs +133 -0
- package/node_modules/graphql/version.d.ts +13 -0
- package/node_modules/graphql/version.js +25 -0
- package/node_modules/graphql/version.mjs +17 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/iconv-lite/Changelog.md +236 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/node_modules/iconv-lite/lib/index.js +183 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +59 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/README.md +102 -0
- package/node_modules/ini/ini.js +206 -0
- package/node_modules/ini/package.json +33 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/is-promise/LICENSE +19 -0
- package/node_modules/is-promise/index.d.ts +2 -0
- package/node_modules/is-promise/index.js +6 -0
- package/node_modules/is-promise/index.mjs +3 -0
- package/node_modules/is-promise/package.json +30 -0
- package/node_modules/is-promise/readme.md +33 -0
- package/node_modules/keytar/LICENSE.md +20 -0
- package/node_modules/keytar/README.md +94 -0
- package/node_modules/keytar/binding.gyp +66 -0
- package/node_modules/keytar/build/Release/keytar.node +0 -0
- package/node_modules/keytar/keytar.d.ts +51 -0
- package/node_modules/keytar/lib/keytar.js +43 -0
- package/node_modules/keytar/package.json +66 -0
- package/node_modules/keytar/src/async.cc +242 -0
- package/node_modules/keytar/src/async.h +103 -0
- package/node_modules/keytar/src/credentials.h +13 -0
- package/node_modules/keytar/src/keytar.h +41 -0
- package/node_modules/keytar/src/keytar_mac.cc +296 -0
- package/node_modules/keytar/src/keytar_posix.cc +184 -0
- package/node_modules/keytar/src/keytar_win.cc +272 -0
- package/node_modules/keytar/src/main.cc +139 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/media-typer/HISTORY.md +50 -0
- package/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/media-typer/README.md +93 -0
- package/node_modules/media-typer/index.js +143 -0
- package/node_modules/media-typer/package.json +33 -0
- package/node_modules/merge-descriptors/index.d.ts +11 -0
- package/node_modules/merge-descriptors/index.js +26 -0
- package/node_modules/merge-descriptors/license +11 -0
- package/node_modules/merge-descriptors/package.json +50 -0
- package/node_modules/merge-descriptors/readme.md +55 -0
- package/node_modules/mime-db/HISTORY.md +541 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +109 -0
- package/node_modules/mime-db/db.json +9342 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +56 -0
- package/node_modules/mime-types/HISTORY.md +428 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +126 -0
- package/node_modules/mime-types/index.js +211 -0
- package/node_modules/mime-types/mimeScore.js +57 -0
- package/node_modules/mime-types/package.json +49 -0
- package/node_modules/mimic-response/index.d.ts +17 -0
- package/node_modules/mimic-response/index.js +77 -0
- package/node_modules/mimic-response/license +9 -0
- package/node_modules/mimic-response/package.json +42 -0
- package/node_modules/mimic-response/readme.md +78 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/mkdirp-classic/LICENSE +21 -0
- package/node_modules/mkdirp-classic/README.md +18 -0
- package/node_modules/mkdirp-classic/index.js +98 -0
- package/node_modules/mkdirp-classic/package.json +18 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +31 -0
- package/node_modules/napi-build-utils/LICENSE +21 -0
- package/node_modules/napi-build-utils/README.md +52 -0
- package/node_modules/napi-build-utils/index.js +214 -0
- package/node_modules/napi-build-utils/index.md +0 -0
- package/node_modules/napi-build-utils/package.json +42 -0
- package/node_modules/negotiator/HISTORY.md +114 -0
- package/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/README.md +212 -0
- package/node_modules/negotiator/index.js +83 -0
- package/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/negotiator/lib/encoding.js +205 -0
- package/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/negotiator/package.json +43 -0
- package/node_modules/node-abi/LICENSE +21 -0
- package/node_modules/node-abi/README.md +54 -0
- package/node_modules/node-abi/abi_registry.json +432 -0
- package/node_modules/node-abi/index.js +179 -0
- package/node_modules/node-abi/package.json +45 -0
- package/node_modules/node-addon-api/LICENSE.md +13 -0
- package/node_modules/node-addon-api/README.md +293 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +11 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
- package/node_modules/node-addon-api/napi-inl.h +6209 -0
- package/node_modules/node-addon-api/napi.h +2983 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +399 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +100 -0
- package/node_modules/node-addon-api/tools/clang-format.js +68 -0
- package/node_modules/node-addon-api/tools/conversion.js +309 -0
- package/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/path-to-regexp/Readme.md +224 -0
- package/node_modules/path-to-regexp/dist/index.d.ts +144 -0
- package/node_modules/path-to-regexp/dist/index.js +409 -0
- package/node_modules/path-to-regexp/dist/index.js.map +1 -0
- package/node_modules/path-to-regexp/package.json +64 -0
- package/node_modules/prebuild-install/CHANGELOG.md +131 -0
- package/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
- package/node_modules/prebuild-install/LICENSE +21 -0
- package/node_modules/prebuild-install/README.md +163 -0
- package/node_modules/prebuild-install/asset.js +44 -0
- package/node_modules/prebuild-install/bin.js +78 -0
- package/node_modules/prebuild-install/download.js +142 -0
- package/node_modules/prebuild-install/error.js +14 -0
- package/node_modules/prebuild-install/help.txt +16 -0
- package/node_modules/prebuild-install/index.js +1 -0
- package/node_modules/prebuild-install/log.js +33 -0
- package/node_modules/prebuild-install/package.json +67 -0
- package/node_modules/prebuild-install/proxy.js +35 -0
- package/node_modules/prebuild-install/rc.js +64 -0
- package/node_modules/prebuild-install/util.js +143 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/pump/.github/FUNDING.yml +2 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +74 -0
- package/node_modules/pump/SECURITY.md +5 -0
- package/node_modules/pump/empty.js +1 -0
- package/node_modules/pump/index.js +86 -0
- package/node_modules/pump/package.json +30 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.eslintrc +39 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +622 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +733 -0
- package/node_modules/qs/dist/qs.js +141 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +328 -0
- package/node_modules/qs/lib/stringify.js +356 -0
- package/node_modules/qs/lib/utils.js +268 -0
- package/node_modules/qs/package.json +93 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1276 -0
- package/node_modules/qs/test/stringify.js +1306 -0
- package/node_modules/qs/test/utils.js +262 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +84 -0
- package/node_modules/range-parser/index.js +162 -0
- package/node_modules/range-parser/package.json +44 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/index.d.ts +85 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +46 -0
- package/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/rc/README.md +227 -0
- package/node_modules/rc/browser.js +7 -0
- package/node_modules/rc/cli.js +4 -0
- package/node_modules/rc/index.js +53 -0
- package/node_modules/rc/lib/utils.js +104 -0
- package/node_modules/rc/package.json +29 -0
- package/node_modules/rc/test/ini.js +16 -0
- package/node_modules/rc/test/nested-env-vars.js +50 -0
- package/node_modules/rc/test/test.js +59 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/router/HISTORY.md +228 -0
- package/node_modules/router/LICENSE +23 -0
- package/node_modules/router/README.md +416 -0
- package/node_modules/router/index.js +748 -0
- package/node_modules/router/lib/layer.js +247 -0
- package/node_modules/router/lib/route.js +242 -0
- package/node_modules/router/package.json +44 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +665 -0
- package/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +557 -0
- package/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +91 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/send/HISTORY.md +580 -0
- package/node_modules/send/LICENSE +23 -0
- package/node_modules/send/README.md +317 -0
- package/node_modules/send/index.js +997 -0
- package/node_modules/send/package.json +60 -0
- package/node_modules/serve-static/HISTORY.md +516 -0
- package/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/serve-static/README.md +253 -0
- package/node_modules/serve-static/index.js +208 -0
- package/node_modules/serve-static/package.json +41 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +110 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +43 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +104 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/simple-concat/.travis.yml +3 -0
- package/node_modules/simple-concat/LICENSE +20 -0
- package/node_modules/simple-concat/README.md +44 -0
- package/node_modules/simple-concat/index.js +15 -0
- package/node_modules/simple-concat/package.json +47 -0
- package/node_modules/simple-concat/test/basic.js +41 -0
- package/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/node_modules/simple-get/LICENSE +20 -0
- package/node_modules/simple-get/README.md +333 -0
- package/node_modules/simple-get/index.js +108 -0
- package/node_modules/simple-get/package.json +67 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +42 -0
- package/node_modules/strip-json-comments/readme.md +64 -0
- package/node_modules/tar-fs/.travis.yml +6 -0
- package/node_modules/tar-fs/LICENSE +21 -0
- package/node_modules/tar-fs/README.md +165 -0
- package/node_modules/tar-fs/index.js +363 -0
- package/node_modules/tar-fs/package.json +41 -0
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +346 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +168 -0
- package/node_modules/tar-stream/extract.js +257 -0
- package/node_modules/tar-stream/headers.js +295 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/pack.js +255 -0
- package/node_modules/tar-stream/package.json +58 -0
- package/node_modules/tar-stream/sandbox.js +11 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/tunnel-agent/LICENSE +55 -0
- package/node_modules/tunnel-agent/README.md +4 -0
- package/node_modules/tunnel-agent/index.js +244 -0
- package/node_modules/tunnel-agent/package.json +22 -0
- package/node_modules/type-is/HISTORY.md +292 -0
- package/node_modules/type-is/LICENSE +23 -0
- package/node_modules/type-is/README.md +198 -0
- package/node_modules/type-is/index.js +250 -0
- package/node_modules/type-is/package.json +47 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +499 -0
- package/node_modules/uuid/dist/index.d.ts +15 -0
- package/node_modules/uuid/dist/index.js +14 -0
- package/node_modules/uuid/dist/max.d.ts +2 -0
- package/node_modules/uuid/dist/max.js +1 -0
- package/node_modules/uuid/dist/md5.d.ts +2 -0
- package/node_modules/uuid/dist/md5.js +135 -0
- package/node_modules/uuid/dist/native.d.ts +4 -0
- package/node_modules/uuid/dist/native.js +2 -0
- package/node_modules/uuid/dist/nil.d.ts +2 -0
- package/node_modules/uuid/dist/nil.js +1 -0
- package/node_modules/uuid/dist/parse.d.ts +2 -0
- package/node_modules/uuid/dist/parse.js +9 -0
- package/node_modules/uuid/dist/regex.d.ts +2 -0
- package/node_modules/uuid/dist/regex.js +1 -0
- package/node_modules/uuid/dist/rng.d.ts +1 -0
- package/node_modules/uuid/dist/rng.js +11 -0
- package/node_modules/uuid/dist/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/sha1.js +70 -0
- package/node_modules/uuid/dist/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/stringify.js +35 -0
- package/node_modules/uuid/dist/types.d.ts +21 -0
- package/node_modules/uuid/dist/types.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/v1.d.ts +11 -0
- package/node_modules/uuid/dist/v1.js +83 -0
- package/node_modules/uuid/dist/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/v3.d.ts +9 -0
- package/node_modules/uuid/dist/v3.js +9 -0
- package/node_modules/uuid/dist/v35.d.ts +7 -0
- package/node_modules/uuid/dist/v35.js +36 -0
- package/node_modules/uuid/dist/v4.d.ts +4 -0
- package/node_modules/uuid/dist/v4.js +30 -0
- package/node_modules/uuid/dist/v5.d.ts +9 -0
- package/node_modules/uuid/dist/v5.js +9 -0
- package/node_modules/uuid/dist/v6.d.ts +4 -0
- package/node_modules/uuid/dist/v6.js +17 -0
- package/node_modules/uuid/dist/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/v7.d.ts +9 -0
- package/node_modules/uuid/dist/v7.js +65 -0
- package/node_modules/uuid/dist/validate.d.ts +2 -0
- package/node_modules/uuid/dist/validate.js +5 -0
- package/node_modules/uuid/dist/version.d.ts +2 -0
- package/node_modules/uuid/dist/version.js +8 -0
- package/node_modules/uuid/dist-node/bin/uuid +2 -0
- package/node_modules/uuid/dist-node/index.js +14 -0
- package/node_modules/uuid/dist-node/max.js +1 -0
- package/node_modules/uuid/dist-node/md5.js +11 -0
- package/node_modules/uuid/dist-node/native.js +2 -0
- package/node_modules/uuid/dist-node/nil.js +1 -0
- package/node_modules/uuid/dist-node/parse.js +9 -0
- package/node_modules/uuid/dist-node/regex.js +1 -0
- package/node_modules/uuid/dist-node/rng.js +10 -0
- package/node_modules/uuid/dist-node/sha1.js +11 -0
- package/node_modules/uuid/dist-node/stringify.js +35 -0
- package/node_modules/uuid/dist-node/types.js +1 -0
- package/node_modules/uuid/dist-node/uuid-bin.js +70 -0
- package/node_modules/uuid/dist-node/v1.js +83 -0
- package/node_modules/uuid/dist-node/v1ToV6.js +10 -0
- package/node_modules/uuid/dist-node/v3.js +9 -0
- package/node_modules/uuid/dist-node/v35.js +36 -0
- package/node_modules/uuid/dist-node/v4.js +30 -0
- package/node_modules/uuid/dist-node/v5.js +9 -0
- package/node_modules/uuid/dist-node/v6.js +17 -0
- package/node_modules/uuid/dist-node/v6ToV1.js +10 -0
- package/node_modules/uuid/dist-node/v7.js +65 -0
- package/node_modules/uuid/dist-node/validate.js +5 -0
- package/node_modules/uuid/dist-node/version.js +8 -0
- package/node_modules/uuid/package.json +119 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +13 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +18 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +550 -0
- package/node_modules/ws/lib/websocket.js +1388 -0
- package/node_modules/ws/package.json +69 -0
- package/node_modules/ws/wrapper.mjs +8 -0
- package/package.json +11 -2
|
@@ -0,0 +1,1645 @@
|
|
|
1
|
+
import { syntaxError } from '../error/syntaxError.mjs';
|
|
2
|
+
import { Location, OperationTypeNode } from './ast.mjs';
|
|
3
|
+
import { DirectiveLocation } from './directiveLocation.mjs';
|
|
4
|
+
import { Kind } from './kinds.mjs';
|
|
5
|
+
import { isPunctuatorTokenKind, Lexer } from './lexer.mjs';
|
|
6
|
+
import { SchemaCoordinateLexer } from './schemaCoordinateLexer.mjs';
|
|
7
|
+
import { isSource, Source } from './source.mjs';
|
|
8
|
+
import { TokenKind } from './tokenKind.mjs';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration options to control parser behavior
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Given a GraphQL source, parses it into a Document.
|
|
15
|
+
* Throws GraphQLError if a syntax error is encountered.
|
|
16
|
+
*/
|
|
17
|
+
export function parse(source, options) {
|
|
18
|
+
const parser = new Parser(source, options);
|
|
19
|
+
const document = parser.parseDocument();
|
|
20
|
+
Object.defineProperty(document, 'tokenCount', {
|
|
21
|
+
enumerable: false,
|
|
22
|
+
value: parser.tokenCount,
|
|
23
|
+
});
|
|
24
|
+
return document;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Given a string containing a GraphQL value (ex. `[42]`), parse the AST for
|
|
28
|
+
* that value.
|
|
29
|
+
* Throws GraphQLError if a syntax error is encountered.
|
|
30
|
+
*
|
|
31
|
+
* This is useful within tools that operate upon GraphQL Values directly and
|
|
32
|
+
* in isolation of complete GraphQL documents.
|
|
33
|
+
*
|
|
34
|
+
* Consider providing the results to the utility function: valueFromAST().
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
export function parseValue(source, options) {
|
|
38
|
+
const parser = new Parser(source, options);
|
|
39
|
+
parser.expectToken(TokenKind.SOF);
|
|
40
|
+
const value = parser.parseValueLiteral(false);
|
|
41
|
+
parser.expectToken(TokenKind.EOF);
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Similar to parseValue(), but raises a parse error if it encounters a
|
|
46
|
+
* variable. The return type will be a constant value.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export function parseConstValue(source, options) {
|
|
50
|
+
const parser = new Parser(source, options);
|
|
51
|
+
parser.expectToken(TokenKind.SOF);
|
|
52
|
+
const value = parser.parseConstValueLiteral();
|
|
53
|
+
parser.expectToken(TokenKind.EOF);
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
|
|
58
|
+
* that type.
|
|
59
|
+
* Throws GraphQLError if a syntax error is encountered.
|
|
60
|
+
*
|
|
61
|
+
* This is useful within tools that operate upon GraphQL Types directly and
|
|
62
|
+
* in isolation of complete GraphQL documents.
|
|
63
|
+
*
|
|
64
|
+
* Consider providing the results to the utility function: typeFromAST().
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
export function parseType(source, options) {
|
|
68
|
+
const parser = new Parser(source, options);
|
|
69
|
+
parser.expectToken(TokenKind.SOF);
|
|
70
|
+
const type = parser.parseTypeReference();
|
|
71
|
+
parser.expectToken(TokenKind.EOF);
|
|
72
|
+
return type;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Given a string containing a GraphQL Schema Coordinate (ex. `Type.field`),
|
|
76
|
+
* parse the AST for that schema coordinate.
|
|
77
|
+
* Throws GraphQLError if a syntax error is encountered.
|
|
78
|
+
*
|
|
79
|
+
* Consider providing the results to the utility function:
|
|
80
|
+
* resolveASTSchemaCoordinate(). Or calling resolveSchemaCoordinate() directly
|
|
81
|
+
* with an unparsed source.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
export function parseSchemaCoordinate(source) {
|
|
85
|
+
const sourceObj = isSource(source) ? source : new Source(source);
|
|
86
|
+
const lexer = new SchemaCoordinateLexer(sourceObj);
|
|
87
|
+
const parser = new Parser(source, {
|
|
88
|
+
lexer,
|
|
89
|
+
});
|
|
90
|
+
parser.expectToken(TokenKind.SOF);
|
|
91
|
+
const coordinate = parser.parseSchemaCoordinate();
|
|
92
|
+
parser.expectToken(TokenKind.EOF);
|
|
93
|
+
return coordinate;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* This class is exported only to assist people in implementing their own parsers
|
|
97
|
+
* without duplicating too much code and should be used only as last resort for cases
|
|
98
|
+
* such as experimental syntax or if certain features could not be contributed upstream.
|
|
99
|
+
*
|
|
100
|
+
* It is still part of the internal API and is versioned, so any changes to it are never
|
|
101
|
+
* considered breaking changes. If you still need to support multiple versions of the
|
|
102
|
+
* library, please use the `versionInfo` variable for version detection.
|
|
103
|
+
*
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
export class Parser {
|
|
108
|
+
constructor(source, options = {}) {
|
|
109
|
+
const { lexer, ..._options } = options;
|
|
110
|
+
|
|
111
|
+
if (lexer) {
|
|
112
|
+
this._lexer = lexer;
|
|
113
|
+
} else {
|
|
114
|
+
const sourceObj = isSource(source) ? source : new Source(source);
|
|
115
|
+
this._lexer = new Lexer(sourceObj);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this._options = _options;
|
|
119
|
+
this._tokenCounter = 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get tokenCount() {
|
|
123
|
+
return this._tokenCounter;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Converts a name lex token into a name parse node.
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
parseName() {
|
|
130
|
+
const token = this.expectToken(TokenKind.NAME);
|
|
131
|
+
return this.node(token, {
|
|
132
|
+
kind: Kind.NAME,
|
|
133
|
+
value: token.value,
|
|
134
|
+
});
|
|
135
|
+
} // Implements the parsing rules in the Document section.
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Document : Definition+
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
parseDocument() {
|
|
142
|
+
return this.node(this._lexer.token, {
|
|
143
|
+
kind: Kind.DOCUMENT,
|
|
144
|
+
definitions: this.many(
|
|
145
|
+
TokenKind.SOF,
|
|
146
|
+
this.parseDefinition,
|
|
147
|
+
TokenKind.EOF,
|
|
148
|
+
),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Definition :
|
|
153
|
+
* - ExecutableDefinition
|
|
154
|
+
* - TypeSystemDefinition
|
|
155
|
+
* - TypeSystemExtension
|
|
156
|
+
*
|
|
157
|
+
* ExecutableDefinition :
|
|
158
|
+
* - OperationDefinition
|
|
159
|
+
* - FragmentDefinition
|
|
160
|
+
*
|
|
161
|
+
* TypeSystemDefinition :
|
|
162
|
+
* - SchemaDefinition
|
|
163
|
+
* - TypeDefinition
|
|
164
|
+
* - DirectiveDefinition
|
|
165
|
+
*
|
|
166
|
+
* TypeDefinition :
|
|
167
|
+
* - ScalarTypeDefinition
|
|
168
|
+
* - ObjectTypeDefinition
|
|
169
|
+
* - InterfaceTypeDefinition
|
|
170
|
+
* - UnionTypeDefinition
|
|
171
|
+
* - EnumTypeDefinition
|
|
172
|
+
* - InputObjectTypeDefinition
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
parseDefinition() {
|
|
176
|
+
if (this.peek(TokenKind.BRACE_L)) {
|
|
177
|
+
return this.parseOperationDefinition();
|
|
178
|
+
} // Many definitions begin with a description and require a lookahead.
|
|
179
|
+
|
|
180
|
+
const hasDescription = this.peekDescription();
|
|
181
|
+
const keywordToken = hasDescription
|
|
182
|
+
? this._lexer.lookahead()
|
|
183
|
+
: this._lexer.token;
|
|
184
|
+
|
|
185
|
+
if (hasDescription && keywordToken.kind === TokenKind.BRACE_L) {
|
|
186
|
+
throw syntaxError(
|
|
187
|
+
this._lexer.source,
|
|
188
|
+
this._lexer.token.start,
|
|
189
|
+
'Unexpected description, descriptions are not supported on shorthand queries.',
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (keywordToken.kind === TokenKind.NAME) {
|
|
194
|
+
switch (keywordToken.value) {
|
|
195
|
+
case 'schema':
|
|
196
|
+
return this.parseSchemaDefinition();
|
|
197
|
+
|
|
198
|
+
case 'scalar':
|
|
199
|
+
return this.parseScalarTypeDefinition();
|
|
200
|
+
|
|
201
|
+
case 'type':
|
|
202
|
+
return this.parseObjectTypeDefinition();
|
|
203
|
+
|
|
204
|
+
case 'interface':
|
|
205
|
+
return this.parseInterfaceTypeDefinition();
|
|
206
|
+
|
|
207
|
+
case 'union':
|
|
208
|
+
return this.parseUnionTypeDefinition();
|
|
209
|
+
|
|
210
|
+
case 'enum':
|
|
211
|
+
return this.parseEnumTypeDefinition();
|
|
212
|
+
|
|
213
|
+
case 'input':
|
|
214
|
+
return this.parseInputObjectTypeDefinition();
|
|
215
|
+
|
|
216
|
+
case 'directive':
|
|
217
|
+
return this.parseDirectiveDefinition();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
switch (keywordToken.value) {
|
|
221
|
+
case 'query':
|
|
222
|
+
case 'mutation':
|
|
223
|
+
case 'subscription':
|
|
224
|
+
return this.parseOperationDefinition();
|
|
225
|
+
|
|
226
|
+
case 'fragment':
|
|
227
|
+
return this.parseFragmentDefinition();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (hasDescription) {
|
|
231
|
+
throw syntaxError(
|
|
232
|
+
this._lexer.source,
|
|
233
|
+
this._lexer.token.start,
|
|
234
|
+
'Unexpected description, only GraphQL definitions support descriptions.',
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
switch (keywordToken.value) {
|
|
239
|
+
case 'extend':
|
|
240
|
+
return this.parseTypeSystemExtension();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
throw this.unexpected(keywordToken);
|
|
245
|
+
} // Implements the parsing rules in the Operations section.
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* OperationDefinition :
|
|
249
|
+
* - SelectionSet
|
|
250
|
+
* - OperationType Name? VariableDefinitions? Directives? SelectionSet
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
parseOperationDefinition() {
|
|
254
|
+
const start = this._lexer.token;
|
|
255
|
+
|
|
256
|
+
if (this.peek(TokenKind.BRACE_L)) {
|
|
257
|
+
return this.node(start, {
|
|
258
|
+
kind: Kind.OPERATION_DEFINITION,
|
|
259
|
+
operation: OperationTypeNode.QUERY,
|
|
260
|
+
description: undefined,
|
|
261
|
+
name: undefined,
|
|
262
|
+
variableDefinitions: [],
|
|
263
|
+
directives: [],
|
|
264
|
+
selectionSet: this.parseSelectionSet(),
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const description = this.parseDescription();
|
|
269
|
+
const operation = this.parseOperationType();
|
|
270
|
+
let name;
|
|
271
|
+
|
|
272
|
+
if (this.peek(TokenKind.NAME)) {
|
|
273
|
+
name = this.parseName();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return this.node(start, {
|
|
277
|
+
kind: Kind.OPERATION_DEFINITION,
|
|
278
|
+
operation,
|
|
279
|
+
description,
|
|
280
|
+
name,
|
|
281
|
+
variableDefinitions: this.parseVariableDefinitions(),
|
|
282
|
+
directives: this.parseDirectives(false),
|
|
283
|
+
selectionSet: this.parseSelectionSet(),
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* OperationType : one of query mutation subscription
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
parseOperationType() {
|
|
291
|
+
const operationToken = this.expectToken(TokenKind.NAME);
|
|
292
|
+
|
|
293
|
+
switch (operationToken.value) {
|
|
294
|
+
case 'query':
|
|
295
|
+
return OperationTypeNode.QUERY;
|
|
296
|
+
|
|
297
|
+
case 'mutation':
|
|
298
|
+
return OperationTypeNode.MUTATION;
|
|
299
|
+
|
|
300
|
+
case 'subscription':
|
|
301
|
+
return OperationTypeNode.SUBSCRIPTION;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
throw this.unexpected(operationToken);
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* VariableDefinitions : ( VariableDefinition+ )
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
parseVariableDefinitions() {
|
|
311
|
+
return this.optionalMany(
|
|
312
|
+
TokenKind.PAREN_L,
|
|
313
|
+
this.parseVariableDefinition,
|
|
314
|
+
TokenKind.PAREN_R,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
parseVariableDefinition() {
|
|
322
|
+
return this.node(this._lexer.token, {
|
|
323
|
+
kind: Kind.VARIABLE_DEFINITION,
|
|
324
|
+
description: this.parseDescription(),
|
|
325
|
+
variable: this.parseVariable(),
|
|
326
|
+
type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),
|
|
327
|
+
defaultValue: this.expectOptionalToken(TokenKind.EQUALS)
|
|
328
|
+
? this.parseConstValueLiteral()
|
|
329
|
+
: undefined,
|
|
330
|
+
directives: this.parseConstDirectives(),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Variable : $ Name
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
parseVariable() {
|
|
338
|
+
const start = this._lexer.token;
|
|
339
|
+
this.expectToken(TokenKind.DOLLAR);
|
|
340
|
+
return this.node(start, {
|
|
341
|
+
kind: Kind.VARIABLE,
|
|
342
|
+
name: this.parseName(),
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* ```
|
|
347
|
+
* SelectionSet : { Selection+ }
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
parseSelectionSet() {
|
|
352
|
+
return this.node(this._lexer.token, {
|
|
353
|
+
kind: Kind.SELECTION_SET,
|
|
354
|
+
selections: this.many(
|
|
355
|
+
TokenKind.BRACE_L,
|
|
356
|
+
this.parseSelection,
|
|
357
|
+
TokenKind.BRACE_R,
|
|
358
|
+
),
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Selection :
|
|
363
|
+
* - Field
|
|
364
|
+
* - FragmentSpread
|
|
365
|
+
* - InlineFragment
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
parseSelection() {
|
|
369
|
+
return this.peek(TokenKind.SPREAD)
|
|
370
|
+
? this.parseFragment()
|
|
371
|
+
: this.parseField();
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Field : Alias? Name Arguments? Directives? SelectionSet?
|
|
375
|
+
*
|
|
376
|
+
* Alias : Name :
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
parseField() {
|
|
380
|
+
const start = this._lexer.token;
|
|
381
|
+
const nameOrAlias = this.parseName();
|
|
382
|
+
let alias;
|
|
383
|
+
let name;
|
|
384
|
+
|
|
385
|
+
if (this.expectOptionalToken(TokenKind.COLON)) {
|
|
386
|
+
alias = nameOrAlias;
|
|
387
|
+
name = this.parseName();
|
|
388
|
+
} else {
|
|
389
|
+
name = nameOrAlias;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return this.node(start, {
|
|
393
|
+
kind: Kind.FIELD,
|
|
394
|
+
alias,
|
|
395
|
+
name,
|
|
396
|
+
arguments: this.parseArguments(false),
|
|
397
|
+
directives: this.parseDirectives(false),
|
|
398
|
+
selectionSet: this.peek(TokenKind.BRACE_L)
|
|
399
|
+
? this.parseSelectionSet()
|
|
400
|
+
: undefined,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Arguments[Const] : ( Argument[?Const]+ )
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
parseArguments(isConst) {
|
|
408
|
+
const item = isConst ? this.parseConstArgument : this.parseArgument;
|
|
409
|
+
return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Argument[Const] : Name : Value[?Const]
|
|
413
|
+
*/
|
|
414
|
+
|
|
415
|
+
parseArgument(isConst = false) {
|
|
416
|
+
const start = this._lexer.token;
|
|
417
|
+
const name = this.parseName();
|
|
418
|
+
this.expectToken(TokenKind.COLON);
|
|
419
|
+
return this.node(start, {
|
|
420
|
+
kind: Kind.ARGUMENT,
|
|
421
|
+
name,
|
|
422
|
+
value: this.parseValueLiteral(isConst),
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
parseConstArgument() {
|
|
427
|
+
return this.parseArgument(true);
|
|
428
|
+
} // Implements the parsing rules in the Fragments section.
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Corresponds to both FragmentSpread and InlineFragment in the spec.
|
|
432
|
+
*
|
|
433
|
+
* FragmentSpread : ... FragmentName Directives?
|
|
434
|
+
*
|
|
435
|
+
* InlineFragment : ... TypeCondition? Directives? SelectionSet
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
parseFragment() {
|
|
439
|
+
const start = this._lexer.token;
|
|
440
|
+
this.expectToken(TokenKind.SPREAD);
|
|
441
|
+
const hasTypeCondition = this.expectOptionalKeyword('on');
|
|
442
|
+
|
|
443
|
+
if (!hasTypeCondition && this.peek(TokenKind.NAME)) {
|
|
444
|
+
return this.node(start, {
|
|
445
|
+
kind: Kind.FRAGMENT_SPREAD,
|
|
446
|
+
name: this.parseFragmentName(),
|
|
447
|
+
directives: this.parseDirectives(false),
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return this.node(start, {
|
|
452
|
+
kind: Kind.INLINE_FRAGMENT,
|
|
453
|
+
typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,
|
|
454
|
+
directives: this.parseDirectives(false),
|
|
455
|
+
selectionSet: this.parseSelectionSet(),
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* FragmentDefinition :
|
|
460
|
+
* - fragment FragmentName on TypeCondition Directives? SelectionSet
|
|
461
|
+
*
|
|
462
|
+
* TypeCondition : NamedType
|
|
463
|
+
*/
|
|
464
|
+
|
|
465
|
+
parseFragmentDefinition() {
|
|
466
|
+
const start = this._lexer.token;
|
|
467
|
+
const description = this.parseDescription();
|
|
468
|
+
this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes
|
|
469
|
+
// the grammar of FragmentDefinition:
|
|
470
|
+
// - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet
|
|
471
|
+
|
|
472
|
+
if (this._options.allowLegacyFragmentVariables === true) {
|
|
473
|
+
return this.node(start, {
|
|
474
|
+
kind: Kind.FRAGMENT_DEFINITION,
|
|
475
|
+
description,
|
|
476
|
+
name: this.parseFragmentName(),
|
|
477
|
+
variableDefinitions: this.parseVariableDefinitions(),
|
|
478
|
+
typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
|
|
479
|
+
directives: this.parseDirectives(false),
|
|
480
|
+
selectionSet: this.parseSelectionSet(),
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
return this.node(start, {
|
|
485
|
+
kind: Kind.FRAGMENT_DEFINITION,
|
|
486
|
+
description,
|
|
487
|
+
name: this.parseFragmentName(),
|
|
488
|
+
typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
|
|
489
|
+
directives: this.parseDirectives(false),
|
|
490
|
+
selectionSet: this.parseSelectionSet(),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* FragmentName : Name but not `on`
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
parseFragmentName() {
|
|
498
|
+
if (this._lexer.token.value === 'on') {
|
|
499
|
+
throw this.unexpected();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
return this.parseName();
|
|
503
|
+
} // Implements the parsing rules in the Values section.
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Value[Const] :
|
|
507
|
+
* - [~Const] Variable
|
|
508
|
+
* - IntValue
|
|
509
|
+
* - FloatValue
|
|
510
|
+
* - StringValue
|
|
511
|
+
* - BooleanValue
|
|
512
|
+
* - NullValue
|
|
513
|
+
* - EnumValue
|
|
514
|
+
* - ListValue[?Const]
|
|
515
|
+
* - ObjectValue[?Const]
|
|
516
|
+
*
|
|
517
|
+
* BooleanValue : one of `true` `false`
|
|
518
|
+
*
|
|
519
|
+
* NullValue : `null`
|
|
520
|
+
*
|
|
521
|
+
* EnumValue : Name but not `true`, `false` or `null`
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
parseValueLiteral(isConst) {
|
|
525
|
+
const token = this._lexer.token;
|
|
526
|
+
|
|
527
|
+
switch (token.kind) {
|
|
528
|
+
case TokenKind.BRACKET_L:
|
|
529
|
+
return this.parseList(isConst);
|
|
530
|
+
|
|
531
|
+
case TokenKind.BRACE_L:
|
|
532
|
+
return this.parseObject(isConst);
|
|
533
|
+
|
|
534
|
+
case TokenKind.INT:
|
|
535
|
+
this.advanceLexer();
|
|
536
|
+
return this.node(token, {
|
|
537
|
+
kind: Kind.INT,
|
|
538
|
+
value: token.value,
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
case TokenKind.FLOAT:
|
|
542
|
+
this.advanceLexer();
|
|
543
|
+
return this.node(token, {
|
|
544
|
+
kind: Kind.FLOAT,
|
|
545
|
+
value: token.value,
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
case TokenKind.STRING:
|
|
549
|
+
case TokenKind.BLOCK_STRING:
|
|
550
|
+
return this.parseStringLiteral();
|
|
551
|
+
|
|
552
|
+
case TokenKind.NAME:
|
|
553
|
+
this.advanceLexer();
|
|
554
|
+
|
|
555
|
+
switch (token.value) {
|
|
556
|
+
case 'true':
|
|
557
|
+
return this.node(token, {
|
|
558
|
+
kind: Kind.BOOLEAN,
|
|
559
|
+
value: true,
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
case 'false':
|
|
563
|
+
return this.node(token, {
|
|
564
|
+
kind: Kind.BOOLEAN,
|
|
565
|
+
value: false,
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
case 'null':
|
|
569
|
+
return this.node(token, {
|
|
570
|
+
kind: Kind.NULL,
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
default:
|
|
574
|
+
return this.node(token, {
|
|
575
|
+
kind: Kind.ENUM,
|
|
576
|
+
value: token.value,
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
case TokenKind.DOLLAR:
|
|
581
|
+
if (isConst) {
|
|
582
|
+
this.expectToken(TokenKind.DOLLAR);
|
|
583
|
+
|
|
584
|
+
if (this._lexer.token.kind === TokenKind.NAME) {
|
|
585
|
+
const varName = this._lexer.token.value;
|
|
586
|
+
throw syntaxError(
|
|
587
|
+
this._lexer.source,
|
|
588
|
+
token.start,
|
|
589
|
+
`Unexpected variable "$${varName}" in constant value.`,
|
|
590
|
+
);
|
|
591
|
+
} else {
|
|
592
|
+
throw this.unexpected(token);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return this.parseVariable();
|
|
597
|
+
|
|
598
|
+
default:
|
|
599
|
+
throw this.unexpected();
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
parseConstValueLiteral() {
|
|
604
|
+
return this.parseValueLiteral(true);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
parseStringLiteral() {
|
|
608
|
+
const token = this._lexer.token;
|
|
609
|
+
this.advanceLexer();
|
|
610
|
+
return this.node(token, {
|
|
611
|
+
kind: Kind.STRING,
|
|
612
|
+
value: token.value,
|
|
613
|
+
block: token.kind === TokenKind.BLOCK_STRING,
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* ListValue[Const] :
|
|
618
|
+
* - [ ]
|
|
619
|
+
* - [ Value[?Const]+ ]
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
parseList(isConst) {
|
|
623
|
+
const item = () => this.parseValueLiteral(isConst);
|
|
624
|
+
|
|
625
|
+
return this.node(this._lexer.token, {
|
|
626
|
+
kind: Kind.LIST,
|
|
627
|
+
values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* ```
|
|
632
|
+
* ObjectValue[Const] :
|
|
633
|
+
* - { }
|
|
634
|
+
* - { ObjectField[?Const]+ }
|
|
635
|
+
* ```
|
|
636
|
+
*/
|
|
637
|
+
|
|
638
|
+
parseObject(isConst) {
|
|
639
|
+
const item = () => this.parseObjectField(isConst);
|
|
640
|
+
|
|
641
|
+
return this.node(this._lexer.token, {
|
|
642
|
+
kind: Kind.OBJECT,
|
|
643
|
+
fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* ObjectField[Const] : Name : Value[?Const]
|
|
648
|
+
*/
|
|
649
|
+
|
|
650
|
+
parseObjectField(isConst) {
|
|
651
|
+
const start = this._lexer.token;
|
|
652
|
+
const name = this.parseName();
|
|
653
|
+
this.expectToken(TokenKind.COLON);
|
|
654
|
+
return this.node(start, {
|
|
655
|
+
kind: Kind.OBJECT_FIELD,
|
|
656
|
+
name,
|
|
657
|
+
value: this.parseValueLiteral(isConst),
|
|
658
|
+
});
|
|
659
|
+
} // Implements the parsing rules in the Directives section.
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Directives[Const] : Directive[?Const]+
|
|
663
|
+
*/
|
|
664
|
+
|
|
665
|
+
parseDirectives(isConst) {
|
|
666
|
+
const directives = [];
|
|
667
|
+
|
|
668
|
+
while (this.peek(TokenKind.AT)) {
|
|
669
|
+
directives.push(this.parseDirective(isConst));
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
return directives;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
parseConstDirectives() {
|
|
676
|
+
return this.parseDirectives(true);
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* ```
|
|
680
|
+
* Directive[Const] : @ Name Arguments[?Const]?
|
|
681
|
+
* ```
|
|
682
|
+
*/
|
|
683
|
+
|
|
684
|
+
parseDirective(isConst) {
|
|
685
|
+
const start = this._lexer.token;
|
|
686
|
+
this.expectToken(TokenKind.AT);
|
|
687
|
+
return this.node(start, {
|
|
688
|
+
kind: Kind.DIRECTIVE,
|
|
689
|
+
name: this.parseName(),
|
|
690
|
+
arguments: this.parseArguments(isConst),
|
|
691
|
+
});
|
|
692
|
+
} // Implements the parsing rules in the Types section.
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Type :
|
|
696
|
+
* - NamedType
|
|
697
|
+
* - ListType
|
|
698
|
+
* - NonNullType
|
|
699
|
+
*/
|
|
700
|
+
|
|
701
|
+
parseTypeReference() {
|
|
702
|
+
const start = this._lexer.token;
|
|
703
|
+
let type;
|
|
704
|
+
|
|
705
|
+
if (this.expectOptionalToken(TokenKind.BRACKET_L)) {
|
|
706
|
+
const innerType = this.parseTypeReference();
|
|
707
|
+
this.expectToken(TokenKind.BRACKET_R);
|
|
708
|
+
type = this.node(start, {
|
|
709
|
+
kind: Kind.LIST_TYPE,
|
|
710
|
+
type: innerType,
|
|
711
|
+
});
|
|
712
|
+
} else {
|
|
713
|
+
type = this.parseNamedType();
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (this.expectOptionalToken(TokenKind.BANG)) {
|
|
717
|
+
return this.node(start, {
|
|
718
|
+
kind: Kind.NON_NULL_TYPE,
|
|
719
|
+
type,
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
return type;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* NamedType : Name
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
parseNamedType() {
|
|
730
|
+
return this.node(this._lexer.token, {
|
|
731
|
+
kind: Kind.NAMED_TYPE,
|
|
732
|
+
name: this.parseName(),
|
|
733
|
+
});
|
|
734
|
+
} // Implements the parsing rules in the Type Definition section.
|
|
735
|
+
|
|
736
|
+
peekDescription() {
|
|
737
|
+
return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Description : StringValue
|
|
741
|
+
*/
|
|
742
|
+
|
|
743
|
+
parseDescription() {
|
|
744
|
+
if (this.peekDescription()) {
|
|
745
|
+
return this.parseStringLiteral();
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* ```
|
|
750
|
+
* SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
|
|
751
|
+
* ```
|
|
752
|
+
*/
|
|
753
|
+
|
|
754
|
+
parseSchemaDefinition() {
|
|
755
|
+
const start = this._lexer.token;
|
|
756
|
+
const description = this.parseDescription();
|
|
757
|
+
this.expectKeyword('schema');
|
|
758
|
+
const directives = this.parseConstDirectives();
|
|
759
|
+
const operationTypes = this.many(
|
|
760
|
+
TokenKind.BRACE_L,
|
|
761
|
+
this.parseOperationTypeDefinition,
|
|
762
|
+
TokenKind.BRACE_R,
|
|
763
|
+
);
|
|
764
|
+
return this.node(start, {
|
|
765
|
+
kind: Kind.SCHEMA_DEFINITION,
|
|
766
|
+
description,
|
|
767
|
+
directives,
|
|
768
|
+
operationTypes,
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* OperationTypeDefinition : OperationType : NamedType
|
|
773
|
+
*/
|
|
774
|
+
|
|
775
|
+
parseOperationTypeDefinition() {
|
|
776
|
+
const start = this._lexer.token;
|
|
777
|
+
const operation = this.parseOperationType();
|
|
778
|
+
this.expectToken(TokenKind.COLON);
|
|
779
|
+
const type = this.parseNamedType();
|
|
780
|
+
return this.node(start, {
|
|
781
|
+
kind: Kind.OPERATION_TYPE_DEFINITION,
|
|
782
|
+
operation,
|
|
783
|
+
type,
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* ScalarTypeDefinition : Description? scalar Name Directives[Const]?
|
|
788
|
+
*/
|
|
789
|
+
|
|
790
|
+
parseScalarTypeDefinition() {
|
|
791
|
+
const start = this._lexer.token;
|
|
792
|
+
const description = this.parseDescription();
|
|
793
|
+
this.expectKeyword('scalar');
|
|
794
|
+
const name = this.parseName();
|
|
795
|
+
const directives = this.parseConstDirectives();
|
|
796
|
+
return this.node(start, {
|
|
797
|
+
kind: Kind.SCALAR_TYPE_DEFINITION,
|
|
798
|
+
description,
|
|
799
|
+
name,
|
|
800
|
+
directives,
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* ObjectTypeDefinition :
|
|
805
|
+
* Description?
|
|
806
|
+
* type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
parseObjectTypeDefinition() {
|
|
810
|
+
const start = this._lexer.token;
|
|
811
|
+
const description = this.parseDescription();
|
|
812
|
+
this.expectKeyword('type');
|
|
813
|
+
const name = this.parseName();
|
|
814
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
815
|
+
const directives = this.parseConstDirectives();
|
|
816
|
+
const fields = this.parseFieldsDefinition();
|
|
817
|
+
return this.node(start, {
|
|
818
|
+
kind: Kind.OBJECT_TYPE_DEFINITION,
|
|
819
|
+
description,
|
|
820
|
+
name,
|
|
821
|
+
interfaces,
|
|
822
|
+
directives,
|
|
823
|
+
fields,
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* ImplementsInterfaces :
|
|
828
|
+
* - implements `&`? NamedType
|
|
829
|
+
* - ImplementsInterfaces & NamedType
|
|
830
|
+
*/
|
|
831
|
+
|
|
832
|
+
parseImplementsInterfaces() {
|
|
833
|
+
return this.expectOptionalKeyword('implements')
|
|
834
|
+
? this.delimitedMany(TokenKind.AMP, this.parseNamedType)
|
|
835
|
+
: [];
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* ```
|
|
839
|
+
* FieldsDefinition : { FieldDefinition+ }
|
|
840
|
+
* ```
|
|
841
|
+
*/
|
|
842
|
+
|
|
843
|
+
parseFieldsDefinition() {
|
|
844
|
+
return this.optionalMany(
|
|
845
|
+
TokenKind.BRACE_L,
|
|
846
|
+
this.parseFieldDefinition,
|
|
847
|
+
TokenKind.BRACE_R,
|
|
848
|
+
);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* FieldDefinition :
|
|
852
|
+
* - Description? Name ArgumentsDefinition? : Type Directives[Const]?
|
|
853
|
+
*/
|
|
854
|
+
|
|
855
|
+
parseFieldDefinition() {
|
|
856
|
+
const start = this._lexer.token;
|
|
857
|
+
const description = this.parseDescription();
|
|
858
|
+
const name = this.parseName();
|
|
859
|
+
const args = this.parseArgumentDefs();
|
|
860
|
+
this.expectToken(TokenKind.COLON);
|
|
861
|
+
const type = this.parseTypeReference();
|
|
862
|
+
const directives = this.parseConstDirectives();
|
|
863
|
+
return this.node(start, {
|
|
864
|
+
kind: Kind.FIELD_DEFINITION,
|
|
865
|
+
description,
|
|
866
|
+
name,
|
|
867
|
+
arguments: args,
|
|
868
|
+
type,
|
|
869
|
+
directives,
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* ArgumentsDefinition : ( InputValueDefinition+ )
|
|
874
|
+
*/
|
|
875
|
+
|
|
876
|
+
parseArgumentDefs() {
|
|
877
|
+
return this.optionalMany(
|
|
878
|
+
TokenKind.PAREN_L,
|
|
879
|
+
this.parseInputValueDef,
|
|
880
|
+
TokenKind.PAREN_R,
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* InputValueDefinition :
|
|
885
|
+
* - Description? Name : Type DefaultValue? Directives[Const]?
|
|
886
|
+
*/
|
|
887
|
+
|
|
888
|
+
parseInputValueDef() {
|
|
889
|
+
const start = this._lexer.token;
|
|
890
|
+
const description = this.parseDescription();
|
|
891
|
+
const name = this.parseName();
|
|
892
|
+
this.expectToken(TokenKind.COLON);
|
|
893
|
+
const type = this.parseTypeReference();
|
|
894
|
+
let defaultValue;
|
|
895
|
+
|
|
896
|
+
if (this.expectOptionalToken(TokenKind.EQUALS)) {
|
|
897
|
+
defaultValue = this.parseConstValueLiteral();
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
const directives = this.parseConstDirectives();
|
|
901
|
+
return this.node(start, {
|
|
902
|
+
kind: Kind.INPUT_VALUE_DEFINITION,
|
|
903
|
+
description,
|
|
904
|
+
name,
|
|
905
|
+
type,
|
|
906
|
+
defaultValue,
|
|
907
|
+
directives,
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* InterfaceTypeDefinition :
|
|
912
|
+
* - Description? interface Name Directives[Const]? FieldsDefinition?
|
|
913
|
+
*/
|
|
914
|
+
|
|
915
|
+
parseInterfaceTypeDefinition() {
|
|
916
|
+
const start = this._lexer.token;
|
|
917
|
+
const description = this.parseDescription();
|
|
918
|
+
this.expectKeyword('interface');
|
|
919
|
+
const name = this.parseName();
|
|
920
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
921
|
+
const directives = this.parseConstDirectives();
|
|
922
|
+
const fields = this.parseFieldsDefinition();
|
|
923
|
+
return this.node(start, {
|
|
924
|
+
kind: Kind.INTERFACE_TYPE_DEFINITION,
|
|
925
|
+
description,
|
|
926
|
+
name,
|
|
927
|
+
interfaces,
|
|
928
|
+
directives,
|
|
929
|
+
fields,
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* UnionTypeDefinition :
|
|
934
|
+
* - Description? union Name Directives[Const]? UnionMemberTypes?
|
|
935
|
+
*/
|
|
936
|
+
|
|
937
|
+
parseUnionTypeDefinition() {
|
|
938
|
+
const start = this._lexer.token;
|
|
939
|
+
const description = this.parseDescription();
|
|
940
|
+
this.expectKeyword('union');
|
|
941
|
+
const name = this.parseName();
|
|
942
|
+
const directives = this.parseConstDirectives();
|
|
943
|
+
const types = this.parseUnionMemberTypes();
|
|
944
|
+
return this.node(start, {
|
|
945
|
+
kind: Kind.UNION_TYPE_DEFINITION,
|
|
946
|
+
description,
|
|
947
|
+
name,
|
|
948
|
+
directives,
|
|
949
|
+
types,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* UnionMemberTypes :
|
|
954
|
+
* - = `|`? NamedType
|
|
955
|
+
* - UnionMemberTypes | NamedType
|
|
956
|
+
*/
|
|
957
|
+
|
|
958
|
+
parseUnionMemberTypes() {
|
|
959
|
+
return this.expectOptionalToken(TokenKind.EQUALS)
|
|
960
|
+
? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)
|
|
961
|
+
: [];
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* EnumTypeDefinition :
|
|
965
|
+
* - Description? enum Name Directives[Const]? EnumValuesDefinition?
|
|
966
|
+
*/
|
|
967
|
+
|
|
968
|
+
parseEnumTypeDefinition() {
|
|
969
|
+
const start = this._lexer.token;
|
|
970
|
+
const description = this.parseDescription();
|
|
971
|
+
this.expectKeyword('enum');
|
|
972
|
+
const name = this.parseName();
|
|
973
|
+
const directives = this.parseConstDirectives();
|
|
974
|
+
const values = this.parseEnumValuesDefinition();
|
|
975
|
+
return this.node(start, {
|
|
976
|
+
kind: Kind.ENUM_TYPE_DEFINITION,
|
|
977
|
+
description,
|
|
978
|
+
name,
|
|
979
|
+
directives,
|
|
980
|
+
values,
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* ```
|
|
985
|
+
* EnumValuesDefinition : { EnumValueDefinition+ }
|
|
986
|
+
* ```
|
|
987
|
+
*/
|
|
988
|
+
|
|
989
|
+
parseEnumValuesDefinition() {
|
|
990
|
+
return this.optionalMany(
|
|
991
|
+
TokenKind.BRACE_L,
|
|
992
|
+
this.parseEnumValueDefinition,
|
|
993
|
+
TokenKind.BRACE_R,
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* EnumValueDefinition : Description? EnumValue Directives[Const]?
|
|
998
|
+
*/
|
|
999
|
+
|
|
1000
|
+
parseEnumValueDefinition() {
|
|
1001
|
+
const start = this._lexer.token;
|
|
1002
|
+
const description = this.parseDescription();
|
|
1003
|
+
const name = this.parseEnumValueName();
|
|
1004
|
+
const directives = this.parseConstDirectives();
|
|
1005
|
+
return this.node(start, {
|
|
1006
|
+
kind: Kind.ENUM_VALUE_DEFINITION,
|
|
1007
|
+
description,
|
|
1008
|
+
name,
|
|
1009
|
+
directives,
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* EnumValue : Name but not `true`, `false` or `null`
|
|
1014
|
+
*/
|
|
1015
|
+
|
|
1016
|
+
parseEnumValueName() {
|
|
1017
|
+
if (
|
|
1018
|
+
this._lexer.token.value === 'true' ||
|
|
1019
|
+
this._lexer.token.value === 'false' ||
|
|
1020
|
+
this._lexer.token.value === 'null'
|
|
1021
|
+
) {
|
|
1022
|
+
throw syntaxError(
|
|
1023
|
+
this._lexer.source,
|
|
1024
|
+
this._lexer.token.start,
|
|
1025
|
+
`${getTokenDesc(
|
|
1026
|
+
this._lexer.token,
|
|
1027
|
+
)} is reserved and cannot be used for an enum value.`,
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
return this.parseName();
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* InputObjectTypeDefinition :
|
|
1035
|
+
* - Description? input Name Directives[Const]? InputFieldsDefinition?
|
|
1036
|
+
*/
|
|
1037
|
+
|
|
1038
|
+
parseInputObjectTypeDefinition() {
|
|
1039
|
+
const start = this._lexer.token;
|
|
1040
|
+
const description = this.parseDescription();
|
|
1041
|
+
this.expectKeyword('input');
|
|
1042
|
+
const name = this.parseName();
|
|
1043
|
+
const directives = this.parseConstDirectives();
|
|
1044
|
+
const fields = this.parseInputFieldsDefinition();
|
|
1045
|
+
return this.node(start, {
|
|
1046
|
+
kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
|
1047
|
+
description,
|
|
1048
|
+
name,
|
|
1049
|
+
directives,
|
|
1050
|
+
fields,
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* ```
|
|
1055
|
+
* InputFieldsDefinition : { InputValueDefinition+ }
|
|
1056
|
+
* ```
|
|
1057
|
+
*/
|
|
1058
|
+
|
|
1059
|
+
parseInputFieldsDefinition() {
|
|
1060
|
+
return this.optionalMany(
|
|
1061
|
+
TokenKind.BRACE_L,
|
|
1062
|
+
this.parseInputValueDef,
|
|
1063
|
+
TokenKind.BRACE_R,
|
|
1064
|
+
);
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* TypeSystemExtension :
|
|
1068
|
+
* - SchemaExtension
|
|
1069
|
+
* - TypeExtension
|
|
1070
|
+
*
|
|
1071
|
+
* TypeExtension :
|
|
1072
|
+
* - ScalarTypeExtension
|
|
1073
|
+
* - ObjectTypeExtension
|
|
1074
|
+
* - InterfaceTypeExtension
|
|
1075
|
+
* - UnionTypeExtension
|
|
1076
|
+
* - EnumTypeExtension
|
|
1077
|
+
* - InputObjectTypeDefinition
|
|
1078
|
+
*/
|
|
1079
|
+
|
|
1080
|
+
parseTypeSystemExtension() {
|
|
1081
|
+
const keywordToken = this._lexer.lookahead();
|
|
1082
|
+
|
|
1083
|
+
if (keywordToken.kind === TokenKind.NAME) {
|
|
1084
|
+
switch (keywordToken.value) {
|
|
1085
|
+
case 'schema':
|
|
1086
|
+
return this.parseSchemaExtension();
|
|
1087
|
+
|
|
1088
|
+
case 'scalar':
|
|
1089
|
+
return this.parseScalarTypeExtension();
|
|
1090
|
+
|
|
1091
|
+
case 'type':
|
|
1092
|
+
return this.parseObjectTypeExtension();
|
|
1093
|
+
|
|
1094
|
+
case 'interface':
|
|
1095
|
+
return this.parseInterfaceTypeExtension();
|
|
1096
|
+
|
|
1097
|
+
case 'union':
|
|
1098
|
+
return this.parseUnionTypeExtension();
|
|
1099
|
+
|
|
1100
|
+
case 'enum':
|
|
1101
|
+
return this.parseEnumTypeExtension();
|
|
1102
|
+
|
|
1103
|
+
case 'input':
|
|
1104
|
+
return this.parseInputObjectTypeExtension();
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
throw this.unexpected(keywordToken);
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* ```
|
|
1112
|
+
* SchemaExtension :
|
|
1113
|
+
* - extend schema Directives[Const]? { OperationTypeDefinition+ }
|
|
1114
|
+
* - extend schema Directives[Const]
|
|
1115
|
+
* ```
|
|
1116
|
+
*/
|
|
1117
|
+
|
|
1118
|
+
parseSchemaExtension() {
|
|
1119
|
+
const start = this._lexer.token;
|
|
1120
|
+
this.expectKeyword('extend');
|
|
1121
|
+
this.expectKeyword('schema');
|
|
1122
|
+
const directives = this.parseConstDirectives();
|
|
1123
|
+
const operationTypes = this.optionalMany(
|
|
1124
|
+
TokenKind.BRACE_L,
|
|
1125
|
+
this.parseOperationTypeDefinition,
|
|
1126
|
+
TokenKind.BRACE_R,
|
|
1127
|
+
);
|
|
1128
|
+
|
|
1129
|
+
if (directives.length === 0 && operationTypes.length === 0) {
|
|
1130
|
+
throw this.unexpected();
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
return this.node(start, {
|
|
1134
|
+
kind: Kind.SCHEMA_EXTENSION,
|
|
1135
|
+
directives,
|
|
1136
|
+
operationTypes,
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* ScalarTypeExtension :
|
|
1141
|
+
* - extend scalar Name Directives[Const]
|
|
1142
|
+
*/
|
|
1143
|
+
|
|
1144
|
+
parseScalarTypeExtension() {
|
|
1145
|
+
const start = this._lexer.token;
|
|
1146
|
+
this.expectKeyword('extend');
|
|
1147
|
+
this.expectKeyword('scalar');
|
|
1148
|
+
const name = this.parseName();
|
|
1149
|
+
const directives = this.parseConstDirectives();
|
|
1150
|
+
|
|
1151
|
+
if (directives.length === 0) {
|
|
1152
|
+
throw this.unexpected();
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
return this.node(start, {
|
|
1156
|
+
kind: Kind.SCALAR_TYPE_EXTENSION,
|
|
1157
|
+
name,
|
|
1158
|
+
directives,
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* ObjectTypeExtension :
|
|
1163
|
+
* - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
|
|
1164
|
+
* - extend type Name ImplementsInterfaces? Directives[Const]
|
|
1165
|
+
* - extend type Name ImplementsInterfaces
|
|
1166
|
+
*/
|
|
1167
|
+
|
|
1168
|
+
parseObjectTypeExtension() {
|
|
1169
|
+
const start = this._lexer.token;
|
|
1170
|
+
this.expectKeyword('extend');
|
|
1171
|
+
this.expectKeyword('type');
|
|
1172
|
+
const name = this.parseName();
|
|
1173
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
1174
|
+
const directives = this.parseConstDirectives();
|
|
1175
|
+
const fields = this.parseFieldsDefinition();
|
|
1176
|
+
|
|
1177
|
+
if (
|
|
1178
|
+
interfaces.length === 0 &&
|
|
1179
|
+
directives.length === 0 &&
|
|
1180
|
+
fields.length === 0
|
|
1181
|
+
) {
|
|
1182
|
+
throw this.unexpected();
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
return this.node(start, {
|
|
1186
|
+
kind: Kind.OBJECT_TYPE_EXTENSION,
|
|
1187
|
+
name,
|
|
1188
|
+
interfaces,
|
|
1189
|
+
directives,
|
|
1190
|
+
fields,
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* InterfaceTypeExtension :
|
|
1195
|
+
* - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
|
|
1196
|
+
* - extend interface Name ImplementsInterfaces? Directives[Const]
|
|
1197
|
+
* - extend interface Name ImplementsInterfaces
|
|
1198
|
+
*/
|
|
1199
|
+
|
|
1200
|
+
parseInterfaceTypeExtension() {
|
|
1201
|
+
const start = this._lexer.token;
|
|
1202
|
+
this.expectKeyword('extend');
|
|
1203
|
+
this.expectKeyword('interface');
|
|
1204
|
+
const name = this.parseName();
|
|
1205
|
+
const interfaces = this.parseImplementsInterfaces();
|
|
1206
|
+
const directives = this.parseConstDirectives();
|
|
1207
|
+
const fields = this.parseFieldsDefinition();
|
|
1208
|
+
|
|
1209
|
+
if (
|
|
1210
|
+
interfaces.length === 0 &&
|
|
1211
|
+
directives.length === 0 &&
|
|
1212
|
+
fields.length === 0
|
|
1213
|
+
) {
|
|
1214
|
+
throw this.unexpected();
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
return this.node(start, {
|
|
1218
|
+
kind: Kind.INTERFACE_TYPE_EXTENSION,
|
|
1219
|
+
name,
|
|
1220
|
+
interfaces,
|
|
1221
|
+
directives,
|
|
1222
|
+
fields,
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* UnionTypeExtension :
|
|
1227
|
+
* - extend union Name Directives[Const]? UnionMemberTypes
|
|
1228
|
+
* - extend union Name Directives[Const]
|
|
1229
|
+
*/
|
|
1230
|
+
|
|
1231
|
+
parseUnionTypeExtension() {
|
|
1232
|
+
const start = this._lexer.token;
|
|
1233
|
+
this.expectKeyword('extend');
|
|
1234
|
+
this.expectKeyword('union');
|
|
1235
|
+
const name = this.parseName();
|
|
1236
|
+
const directives = this.parseConstDirectives();
|
|
1237
|
+
const types = this.parseUnionMemberTypes();
|
|
1238
|
+
|
|
1239
|
+
if (directives.length === 0 && types.length === 0) {
|
|
1240
|
+
throw this.unexpected();
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
return this.node(start, {
|
|
1244
|
+
kind: Kind.UNION_TYPE_EXTENSION,
|
|
1245
|
+
name,
|
|
1246
|
+
directives,
|
|
1247
|
+
types,
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* EnumTypeExtension :
|
|
1252
|
+
* - extend enum Name Directives[Const]? EnumValuesDefinition
|
|
1253
|
+
* - extend enum Name Directives[Const]
|
|
1254
|
+
*/
|
|
1255
|
+
|
|
1256
|
+
parseEnumTypeExtension() {
|
|
1257
|
+
const start = this._lexer.token;
|
|
1258
|
+
this.expectKeyword('extend');
|
|
1259
|
+
this.expectKeyword('enum');
|
|
1260
|
+
const name = this.parseName();
|
|
1261
|
+
const directives = this.parseConstDirectives();
|
|
1262
|
+
const values = this.parseEnumValuesDefinition();
|
|
1263
|
+
|
|
1264
|
+
if (directives.length === 0 && values.length === 0) {
|
|
1265
|
+
throw this.unexpected();
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
return this.node(start, {
|
|
1269
|
+
kind: Kind.ENUM_TYPE_EXTENSION,
|
|
1270
|
+
name,
|
|
1271
|
+
directives,
|
|
1272
|
+
values,
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* InputObjectTypeExtension :
|
|
1277
|
+
* - extend input Name Directives[Const]? InputFieldsDefinition
|
|
1278
|
+
* - extend input Name Directives[Const]
|
|
1279
|
+
*/
|
|
1280
|
+
|
|
1281
|
+
parseInputObjectTypeExtension() {
|
|
1282
|
+
const start = this._lexer.token;
|
|
1283
|
+
this.expectKeyword('extend');
|
|
1284
|
+
this.expectKeyword('input');
|
|
1285
|
+
const name = this.parseName();
|
|
1286
|
+
const directives = this.parseConstDirectives();
|
|
1287
|
+
const fields = this.parseInputFieldsDefinition();
|
|
1288
|
+
|
|
1289
|
+
if (directives.length === 0 && fields.length === 0) {
|
|
1290
|
+
throw this.unexpected();
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
return this.node(start, {
|
|
1294
|
+
kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
|
|
1295
|
+
name,
|
|
1296
|
+
directives,
|
|
1297
|
+
fields,
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* ```
|
|
1302
|
+
* DirectiveDefinition :
|
|
1303
|
+
* - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
|
|
1304
|
+
* ```
|
|
1305
|
+
*/
|
|
1306
|
+
|
|
1307
|
+
parseDirectiveDefinition() {
|
|
1308
|
+
const start = this._lexer.token;
|
|
1309
|
+
const description = this.parseDescription();
|
|
1310
|
+
this.expectKeyword('directive');
|
|
1311
|
+
this.expectToken(TokenKind.AT);
|
|
1312
|
+
const name = this.parseName();
|
|
1313
|
+
const args = this.parseArgumentDefs();
|
|
1314
|
+
const repeatable = this.expectOptionalKeyword('repeatable');
|
|
1315
|
+
this.expectKeyword('on');
|
|
1316
|
+
const locations = this.parseDirectiveLocations();
|
|
1317
|
+
return this.node(start, {
|
|
1318
|
+
kind: Kind.DIRECTIVE_DEFINITION,
|
|
1319
|
+
description,
|
|
1320
|
+
name,
|
|
1321
|
+
arguments: args,
|
|
1322
|
+
repeatable,
|
|
1323
|
+
locations,
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* DirectiveLocations :
|
|
1328
|
+
* - `|`? DirectiveLocation
|
|
1329
|
+
* - DirectiveLocations | DirectiveLocation
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
1332
|
+
parseDirectiveLocations() {
|
|
1333
|
+
return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);
|
|
1334
|
+
}
|
|
1335
|
+
/*
|
|
1336
|
+
* DirectiveLocation :
|
|
1337
|
+
* - ExecutableDirectiveLocation
|
|
1338
|
+
* - TypeSystemDirectiveLocation
|
|
1339
|
+
*
|
|
1340
|
+
* ExecutableDirectiveLocation : one of
|
|
1341
|
+
* `QUERY`
|
|
1342
|
+
* `MUTATION`
|
|
1343
|
+
* `SUBSCRIPTION`
|
|
1344
|
+
* `FIELD`
|
|
1345
|
+
* `FRAGMENT_DEFINITION`
|
|
1346
|
+
* `FRAGMENT_SPREAD`
|
|
1347
|
+
* `INLINE_FRAGMENT`
|
|
1348
|
+
*
|
|
1349
|
+
* TypeSystemDirectiveLocation : one of
|
|
1350
|
+
* `SCHEMA`
|
|
1351
|
+
* `SCALAR`
|
|
1352
|
+
* `OBJECT`
|
|
1353
|
+
* `FIELD_DEFINITION`
|
|
1354
|
+
* `ARGUMENT_DEFINITION`
|
|
1355
|
+
* `INTERFACE`
|
|
1356
|
+
* `UNION`
|
|
1357
|
+
* `ENUM`
|
|
1358
|
+
* `ENUM_VALUE`
|
|
1359
|
+
* `INPUT_OBJECT`
|
|
1360
|
+
* `INPUT_FIELD_DEFINITION`
|
|
1361
|
+
*/
|
|
1362
|
+
|
|
1363
|
+
parseDirectiveLocation() {
|
|
1364
|
+
const start = this._lexer.token;
|
|
1365
|
+
const name = this.parseName();
|
|
1366
|
+
|
|
1367
|
+
if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
|
|
1368
|
+
return name;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
throw this.unexpected(start);
|
|
1372
|
+
} // Schema Coordinates
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* SchemaCoordinate :
|
|
1376
|
+
* - Name
|
|
1377
|
+
* - Name . Name
|
|
1378
|
+
* - Name . Name ( Name : )
|
|
1379
|
+
* - \@ Name
|
|
1380
|
+
* - \@ Name ( Name : )
|
|
1381
|
+
*/
|
|
1382
|
+
|
|
1383
|
+
parseSchemaCoordinate() {
|
|
1384
|
+
const start = this._lexer.token;
|
|
1385
|
+
const ofDirective = this.expectOptionalToken(TokenKind.AT);
|
|
1386
|
+
const name = this.parseName();
|
|
1387
|
+
let memberName;
|
|
1388
|
+
|
|
1389
|
+
if (!ofDirective && this.expectOptionalToken(TokenKind.DOT)) {
|
|
1390
|
+
memberName = this.parseName();
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
let argumentName;
|
|
1394
|
+
|
|
1395
|
+
if (
|
|
1396
|
+
(ofDirective || memberName) &&
|
|
1397
|
+
this.expectOptionalToken(TokenKind.PAREN_L)
|
|
1398
|
+
) {
|
|
1399
|
+
argumentName = this.parseName();
|
|
1400
|
+
this.expectToken(TokenKind.COLON);
|
|
1401
|
+
this.expectToken(TokenKind.PAREN_R);
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
if (ofDirective) {
|
|
1405
|
+
if (argumentName) {
|
|
1406
|
+
return this.node(start, {
|
|
1407
|
+
kind: Kind.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1408
|
+
name,
|
|
1409
|
+
argumentName,
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
return this.node(start, {
|
|
1414
|
+
kind: Kind.DIRECTIVE_COORDINATE,
|
|
1415
|
+
name,
|
|
1416
|
+
});
|
|
1417
|
+
} else if (memberName) {
|
|
1418
|
+
if (argumentName) {
|
|
1419
|
+
return this.node(start, {
|
|
1420
|
+
kind: Kind.ARGUMENT_COORDINATE,
|
|
1421
|
+
name,
|
|
1422
|
+
fieldName: memberName,
|
|
1423
|
+
argumentName,
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
return this.node(start, {
|
|
1428
|
+
kind: Kind.MEMBER_COORDINATE,
|
|
1429
|
+
name,
|
|
1430
|
+
memberName,
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
return this.node(start, {
|
|
1435
|
+
kind: Kind.TYPE_COORDINATE,
|
|
1436
|
+
name,
|
|
1437
|
+
});
|
|
1438
|
+
} // Core parsing utility functions
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Returns a node that, if configured to do so, sets a "loc" field as a
|
|
1442
|
+
* location object, used to identify the place in the source that created a
|
|
1443
|
+
* given parsed object.
|
|
1444
|
+
*/
|
|
1445
|
+
|
|
1446
|
+
node(startToken, node) {
|
|
1447
|
+
if (this._options.noLocation !== true) {
|
|
1448
|
+
node.loc = new Location(
|
|
1449
|
+
startToken,
|
|
1450
|
+
this._lexer.lastToken,
|
|
1451
|
+
this._lexer.source,
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
return node;
|
|
1456
|
+
}
|
|
1457
|
+
/**
|
|
1458
|
+
* Determines if the next token is of a given kind
|
|
1459
|
+
*/
|
|
1460
|
+
|
|
1461
|
+
peek(kind) {
|
|
1462
|
+
return this._lexer.token.kind === kind;
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* If the next token is of the given kind, return that token after advancing the lexer.
|
|
1466
|
+
* Otherwise, do not change the parser state and throw an error.
|
|
1467
|
+
*/
|
|
1468
|
+
|
|
1469
|
+
expectToken(kind) {
|
|
1470
|
+
const token = this._lexer.token;
|
|
1471
|
+
|
|
1472
|
+
if (token.kind === kind) {
|
|
1473
|
+
this.advanceLexer();
|
|
1474
|
+
return token;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
throw syntaxError(
|
|
1478
|
+
this._lexer.source,
|
|
1479
|
+
token.start,
|
|
1480
|
+
`Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* If the next token is of the given kind, return "true" after advancing the lexer.
|
|
1485
|
+
* Otherwise, do not change the parser state and return "false".
|
|
1486
|
+
*/
|
|
1487
|
+
|
|
1488
|
+
expectOptionalToken(kind) {
|
|
1489
|
+
const token = this._lexer.token;
|
|
1490
|
+
|
|
1491
|
+
if (token.kind === kind) {
|
|
1492
|
+
this.advanceLexer();
|
|
1493
|
+
return true;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
return false;
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* If the next token is a given keyword, advance the lexer.
|
|
1500
|
+
* Otherwise, do not change the parser state and throw an error.
|
|
1501
|
+
*/
|
|
1502
|
+
|
|
1503
|
+
expectKeyword(value) {
|
|
1504
|
+
const token = this._lexer.token;
|
|
1505
|
+
|
|
1506
|
+
if (token.kind === TokenKind.NAME && token.value === value) {
|
|
1507
|
+
this.advanceLexer();
|
|
1508
|
+
} else {
|
|
1509
|
+
throw syntaxError(
|
|
1510
|
+
this._lexer.source,
|
|
1511
|
+
token.start,
|
|
1512
|
+
`Expected "${value}", found ${getTokenDesc(token)}.`,
|
|
1513
|
+
);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* If the next token is a given keyword, return "true" after advancing the lexer.
|
|
1518
|
+
* Otherwise, do not change the parser state and return "false".
|
|
1519
|
+
*/
|
|
1520
|
+
|
|
1521
|
+
expectOptionalKeyword(value) {
|
|
1522
|
+
const token = this._lexer.token;
|
|
1523
|
+
|
|
1524
|
+
if (token.kind === TokenKind.NAME && token.value === value) {
|
|
1525
|
+
this.advanceLexer();
|
|
1526
|
+
return true;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
return false;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
1533
|
+
*/
|
|
1534
|
+
|
|
1535
|
+
unexpected(atToken) {
|
|
1536
|
+
const token =
|
|
1537
|
+
atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
|
|
1538
|
+
return syntaxError(
|
|
1539
|
+
this._lexer.source,
|
|
1540
|
+
token.start,
|
|
1541
|
+
`Unexpected ${getTokenDesc(token)}.`,
|
|
1542
|
+
);
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Returns a possibly empty list of parse nodes, determined by the parseFn.
|
|
1546
|
+
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1547
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1550
|
+
any(openKind, parseFn, closeKind) {
|
|
1551
|
+
this.expectToken(openKind);
|
|
1552
|
+
const nodes = [];
|
|
1553
|
+
|
|
1554
|
+
while (!this.expectOptionalToken(closeKind)) {
|
|
1555
|
+
nodes.push(parseFn.call(this));
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
return nodes;
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Returns a list of parse nodes, determined by the parseFn.
|
|
1562
|
+
* It can be empty only if open token is missing otherwise it will always return non-empty list
|
|
1563
|
+
* that begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1564
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1565
|
+
*/
|
|
1566
|
+
|
|
1567
|
+
optionalMany(openKind, parseFn, closeKind) {
|
|
1568
|
+
if (this.expectOptionalToken(openKind)) {
|
|
1569
|
+
const nodes = [];
|
|
1570
|
+
|
|
1571
|
+
do {
|
|
1572
|
+
nodes.push(parseFn.call(this));
|
|
1573
|
+
} while (!this.expectOptionalToken(closeKind));
|
|
1574
|
+
|
|
1575
|
+
return nodes;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
return [];
|
|
1579
|
+
}
|
|
1580
|
+
/**
|
|
1581
|
+
* Returns a non-empty list of parse nodes, determined by the parseFn.
|
|
1582
|
+
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
1583
|
+
* Advances the parser to the next lex token after the closing token.
|
|
1584
|
+
*/
|
|
1585
|
+
|
|
1586
|
+
many(openKind, parseFn, closeKind) {
|
|
1587
|
+
this.expectToken(openKind);
|
|
1588
|
+
const nodes = [];
|
|
1589
|
+
|
|
1590
|
+
do {
|
|
1591
|
+
nodes.push(parseFn.call(this));
|
|
1592
|
+
} while (!this.expectOptionalToken(closeKind));
|
|
1593
|
+
|
|
1594
|
+
return nodes;
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Returns a non-empty list of parse nodes, determined by the parseFn.
|
|
1598
|
+
* This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
|
|
1599
|
+
* Advances the parser to the next lex token after last item in the list.
|
|
1600
|
+
*/
|
|
1601
|
+
|
|
1602
|
+
delimitedMany(delimiterKind, parseFn) {
|
|
1603
|
+
this.expectOptionalToken(delimiterKind);
|
|
1604
|
+
const nodes = [];
|
|
1605
|
+
|
|
1606
|
+
do {
|
|
1607
|
+
nodes.push(parseFn.call(this));
|
|
1608
|
+
} while (this.expectOptionalToken(delimiterKind));
|
|
1609
|
+
|
|
1610
|
+
return nodes;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
advanceLexer() {
|
|
1614
|
+
const { maxTokens } = this._options;
|
|
1615
|
+
|
|
1616
|
+
const token = this._lexer.advance();
|
|
1617
|
+
|
|
1618
|
+
if (token.kind !== TokenKind.EOF) {
|
|
1619
|
+
++this._tokenCounter;
|
|
1620
|
+
|
|
1621
|
+
if (maxTokens !== undefined && this._tokenCounter > maxTokens) {
|
|
1622
|
+
throw syntaxError(
|
|
1623
|
+
this._lexer.source,
|
|
1624
|
+
token.start,
|
|
1625
|
+
`Document contains more that ${maxTokens} tokens. Parsing aborted.`,
|
|
1626
|
+
);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* A helper function to describe a token as a string for debugging.
|
|
1633
|
+
*/
|
|
1634
|
+
|
|
1635
|
+
function getTokenDesc(token) {
|
|
1636
|
+
const value = token.value;
|
|
1637
|
+
return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : '');
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* A helper function to describe a token kind as a string for debugging.
|
|
1641
|
+
*/
|
|
1642
|
+
|
|
1643
|
+
function getTokenKindDesc(kind) {
|
|
1644
|
+
return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind;
|
|
1645
|
+
}
|