├── .babelrc ├── .eslintignore ├── .eslintrc ├── .flowconfig ├── .gitignore ├── .markdownlint.json ├── .npmignore ├── .prettierrc ├── .travis.yml ├── .vscode ├── launch.json └── settings.json ├── AUTHORS ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── flow-typed └── npm │ ├── @babel │ ├── cli_vx.x.x.js │ ├── core_vx.x.x.js │ ├── plugin-proposal-object-rest-spread_vx.x.x.js │ ├── plugin-transform-flow-strip-types_vx.x.x.js │ ├── plugin-transform-runtime_vx.x.x.js │ ├── preset-env_vx.x.x.js │ └── preset-flow_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── babel-core_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-plugin-transform-flow-strip-types_vx.x.x.js │ ├── babel-plugin-transform-object-rest-spread_vx.x.x.js │ ├── babel-plugin-transform-runtime_vx.x.x.js │ ├── babel-preset-env_vx.x.x.js │ ├── babel-runtime_vx.x.x.js │ ├── cz-conventional-changelog_vx.x.x.js │ ├── eslint-config-airbnb-base_vx.x.x.js │ ├── eslint-config-prettier_vx.x.x.js │ ├── eslint-plugin-flowtype_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-prettier_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── jest_v24.x.x.js │ ├── prettier_v1.x.x.js │ ├── rimraf_v2.x.x.js │ └── semantic-release_vx.x.x.js ├── jest.config.js ├── package.json ├── src ├── __mocks__ │ └── userTC.js ├── __tests__ │ ├── composeWithRelay-test.js │ ├── globalId-test.js │ ├── nodeFieldConfig-test.js │ └── wrapMutationResolver-test.js ├── composeWithRelay.js ├── globalId.js ├── index.js ├── nodeFieldConfig.js ├── nodeInterface.js └── wrapMutationResolver.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@babel/plugin-proposal-object-rest-spread", 4 | "@babel/plugin-transform-flow-strip-types" 5 | ], 6 | "env": { 7 | "cjs": { 8 | "presets": [ 9 | [ 10 | "@babel/preset-env", 11 | { 12 | "targets": { 13 | "node": 8 14 | } 15 | } 16 | ] 17 | ] 18 | }, 19 | "mjs": { 20 | "presets": [ 21 | [ 22 | "@babel/preset-env", 23 | { 24 | "targets": { 25 | "node": 8 26 | }, 27 | "loose": true, 28 | "modules": false 29 | } 30 | ] 31 | ] 32 | }, 33 | "test": { 34 | "presets": [ 35 | [ 36 | "@babel/preset-env", 37 | { 38 | "targets": { 39 | "node": "current" 40 | } 41 | } 42 | ] 43 | ] 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | lib/* 2 | flow-typed/* 3 | mjs/* 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb-base", 4 | "prettier" 5 | ], 6 | "parser": "babel-eslint", 7 | "rules": { 8 | "no-underscore-dangle": 0, 9 | "arrow-body-style": 0, 10 | "arrow-parens": 0, 11 | "prefer-template": 0, 12 | "no-use-before-define": 0, 13 | "no-else-return": 0, 14 | "comma-dangle": ["error", { 15 | "arrays": "always-multiline", 16 | "objects": "always-multiline", 17 | "imports": "always-multiline", 18 | "exports": "always-multiline", 19 | "functions": "ignore" 20 | }], 21 | "no-plusplus": 0, 22 | "import/no-extraneous-dependencies": 0, 23 | "import/prefer-default-export": 0, 24 | "import/no-cycle": 0, 25 | "prettier/prettier": ["error"], 26 | "no-unused-expressions": 0, 27 | "prefer-destructuring": 0 28 | }, 29 | "env": { 30 | "jasmine": true, 31 | "jest": true 32 | }, 33 | "globals": { 34 | "Class": true, 35 | "$Shape": true, 36 | "$FlowFixMe": true 37 | }, 38 | "plugins": [ 39 | "flowtype", 40 | "prettier" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/coverage/.* 3 | .*/resources/.* 4 | /lib/.* 5 | /mjs/.* 6 | .*/node_modules/ajv.* 7 | .*/node_modules/acorn.* 8 | .*/node_modules/async.* 9 | .*/node_modules/babel.* 10 | .*/node_modules/bluebird.* 11 | .*/node_modules/caniuse-db.* 12 | .*/node_modules/config-chain.* 13 | .*/node_modules/conventional-changelog.* 14 | .*/node_modules/core-js.* 15 | .*/node_modules/cssstyle.* 16 | .*/node_modules/diff.* 17 | .*/node_modules/es5-ext.* 18 | .*/node_modules/escope.* 19 | .*/node_modules/escodegen.* 20 | .*/node_modules/eslint.* 21 | .*/node_modules/github.* 22 | .*/node_modules/fsevents.* 23 | .*/node_modules/jsdoctypeparser.* 24 | .*/node_modules/jsdom.* 25 | .*/node_modules/iconv.* 26 | .*/node_modules/istanbul.* 27 | .*/node_modules/handlebars.* 28 | .*/node_modules/markdown.* 29 | .*/node_modules/node-notifier.* 30 | .*/node_modules/npmconf.* 31 | .*/node_modules/prettier.* 32 | .*/node_modules/source-map.* 33 | .*/node_modules/travis.* 34 | .*/node_modules/uglify.* 35 | .*/node_modules/yargs.* 36 | 37 | # Redundant argument. This argument doesn't change any lint settings. 38 | # flowlint uninitialized-instance-property:off 39 | .*/node_modules/graphql/error/GraphQLError.js.flow 40 | 41 | [include] 42 | 43 | [libs] 44 | 45 | [options] 46 | esproposal.class_instance_fields=enable 47 | esproposal.optional_chaining=enable 48 | suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | 15 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 16 | .grunt 17 | 18 | # node-waf configuration 19 | .lock-wscript 20 | 21 | # Compiled binary addons (http://nodejs.org/api/addons.html) 22 | build/Release 23 | 24 | # IntelliJ Files 25 | *.iml 26 | *.ipr 27 | *.iws 28 | /out/ 29 | .idea/ 30 | .idea_modules/ 31 | 32 | # Dependency directory 33 | node_modules 34 | 35 | # Optional npm cache directory 36 | .npm 37 | 38 | # Optional REPL history 39 | .node_repl_history 40 | 41 | # Transpiled code 42 | /es 43 | /lib 44 | /mjs 45 | 46 | coverage 47 | .nyc_output 48 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "line-length": false, 3 | "no-trailing-punctuation": { 4 | "punctuation": ",;" 5 | }, 6 | "no-inline-html": false, 7 | "ol-prefix": false, 8 | "first-line-h1": false, 9 | "first-heading-h1": false 10 | } 11 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | src -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "printWidth": 100, 6 | "trailingComma": "es5" 7 | } 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | cache: 4 | yarn: true 5 | directories: 6 | - node_modules 7 | notifications: 8 | email: true 9 | node_js: 10 | - "10" 11 | - "12" 12 | before_install: yarn global add greenkeeper-lockfile@1 13 | before_script: greenkeeper-lockfile-update 14 | after_script: greenkeeper-lockfile-upload 15 | script: 16 | - yarn run test 17 | - yarn run build 18 | after_success: 19 | - 'curl -Lo travis_after_all.py https://git.io/travis_after_all' 20 | - python travis_after_all.py 21 | - export $(cat .to_export_back) &> /dev/null 22 | - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then bash <(curl -s https://codecov.io/bash); fi 23 | - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run semantic-release; fi 24 | branches: 25 | except: 26 | - /^v\d+\.\d+\.\d+$/ 27 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Jest", 9 | "type": "node", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/node_modules/.bin/jest", 12 | "args": ["--runInBand", "--watch"], 13 | "cwd": "${workspaceFolder}", 14 | "console": "integratedTerminal", 15 | "internalConsoleOptions": "neverOpen", 16 | "disableOptimisticBPs": true 17 | }, 18 | { 19 | "name": "Jest Current File", 20 | "type": "node", 21 | "request": "launch", 22 | "program": "${workspaceFolder}/node_modules/.bin/jest", 23 | "args": [ 24 | "${fileBasenameNoExtension}", 25 | "--config", 26 | "jest.config.js" 27 | ], 28 | "console": "integratedTerminal", 29 | "internalConsoleOptions": "neverOpen", 30 | "disableOptimisticBPs": true 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": ["javascript"], 3 | "javascript.validate.enable": false, 4 | "javascript.autoClosingTags": false, 5 | "eslint.autoFixOnSave": true, 6 | "editor.codeActionsOnSave": { 7 | "source.fixAll.eslint": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Pavel Chertorogov -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## master 2 | 3 | ## 0.0.0-semantically-released (September 12, 2016) 4 | This package publishing automated by [semantic-release](https://github.com/semantic-release/semantic-release). 5 | [Changelog](https://github.com/nodkz/graphql-compose/releases) is generated automatically and can be found here: https://github.com/nodkz/graphql-compose/releases 6 | 7 | ## 1.0.8 (September 6, 2016) 8 | - Update dependencies 9 | - Flowtype 0.32 10 | - Fix code style issues 11 | 12 | ## 1.0.7 (August 25, 2016) 13 | - fix: `projection` in `node(id)` resolve method, now it correctly adds required fields for `relations` 14 | 15 | ## 1.0.6 (August 15, 2016) 16 | - fix: babel build via the workaround https://phabricator.babeljs.io/T2877#78089 Huh, it's too tricky to use Map/Set in ES5. 17 | 18 | ## 1.0.5 (August 13, 2016) 19 | - fix: babel build process 20 | 21 | ## 1.0.4 (August 10, 2016) 22 | - Update packages, add `babel-plugin-transform-runtime` for build process. Fix [issue](https://github.com/nodkz/graphql-compose-connection/issues/2) for vanilla node.js users without babel (thanks @jacobbubu). 23 | 24 | ## 1.0.3 (July 21, 2016) 25 | - Fix: unwrapping args for the underlying resolvers 26 | 27 | ## 1.0.2 (July 20, 2016) 28 | - Expose `NodeInterface`, `nodeFieldConfig`, `fromGlobalId`, `toGlobalId`. 29 | 30 | ## 1.0.1 (July 18, 2016) 31 | - Fix flow-type errors 32 | - Update `flow-bin` till 0.29 33 | - Fix `peerDependencies` 34 | - Update `graphql-compose` till 0.0.7 35 | 36 | ## 1.0.0 (July 15, 2016) 37 | - update `graphql-compose` till 0.0.6 38 | - small fixes 39 | 40 | ## 0.0.3 (July 08, 2016) 41 | - mutationMiddleware move all args into `input!` arg, if `input` exists add only `clientMutationId` to it and leave rest args untouched. 42 | 43 | ## 0.0.2 (July 07, 2016) 44 | - realized `RootQuery.node` field 45 | - mutationMiddleware for adding `clientMutationId` to input/output object types 46 | - added `NodeInterface` with object type resolving 47 | - add or wrap `id` field to return Relay's globally unique ID 48 | - exports `flow` annotations 49 | 50 | ## 0.0.1 (July 04, 2016) 51 | - Initial commit 52 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-present Pavel Chertorogov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # graphql-compose-relay 2 | 3 | [![travis build](https://img.shields.io/travis/graphql-compose/graphql-compose-relay.svg)](https://travis-ci.org/graphql-compose/graphql-compose-relay) 4 | [![codecov coverage](https://img.shields.io/codecov/c/github/graphql-compose/graphql-compose-relay.svg)](https://codecov.io/github/graphql-compose/graphql-compose-relay) 5 | [![](https://img.shields.io/npm/v/graphql-compose-relay.svg)](https://www.npmjs.com/package/graphql-compose-relay) 6 | [![npm](https://img.shields.io/npm/dt/graphql-compose-relay.svg)](http://www.npmtrends.com/graphql-compose-relay) 7 | [![Join the chat at https://gitter.im/graphql-compose/Lobby](https://badges.gitter.im/graphql-compose/graphql-compose.svg)](https://gitter.im/graphql-compose/Lobby) 8 | [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) 9 | [![Greenkeeper badge](https://badges.greenkeeper.io/graphql-compose/graphql-compose-relay.svg)](https://greenkeeper.io/) 10 | 11 | 12 | This is a plugin for [graphql-compose](https://github.com/graphql-compose/graphql-compose), which wraps GraphQL types with Relay specific things, like `Node` type and interface, `globalId`, `clientMutationId`. 13 | 14 | Live demo: [https://graphql-compose.herokuapp.com/](https://graphql-compose.herokuapp.com/) 15 | 16 | [CHANGELOG](https://github.com/graphql-compose/graphql-compose-relay/blob/master/CHANGELOG.md) 17 | 18 | Installation 19 | ============ 20 | ``` 21 | npm install graphql graphql-compose graphql-compose-relay --save 22 | ``` 23 | Modules `graphql` and `graphql-compose` are in `peerDependencies`, so should be installed explicitly in your app. They have global objects and should not have ability to be installed as submodule. 24 | 25 | Example 26 | ======= 27 | `ObjectTypeComposer` is a [graphql-compose](https://github.com/graphql-compose/graphql-compose) utility, that wraps GraphQL types and provide bunch of useful methods for type manipulation. 28 | ```js 29 | import composeWithRelay from 'graphql-compose-relay'; 30 | import { ObjectTypeComposer } from 'graphql-compose'; 31 | import { RootQueryType, UserType } from './my-graphq-object-types'; 32 | 33 | const queryTC = new ObjectTypeComposer(RootQueryType); 34 | const userTC = new ObjectTypeComposer(UserType); 35 | 36 | // If passed RootQuery, then will be added only `node` field to this type. 37 | // Via RootQuery.node you may find objects by globally unique ID among all types. 38 | composeWithRelay(queryTC); 39 | 40 | // Other types, like User, will be wrapped with middlewares that: 41 | // - add relay's id field. Field will be added or wrapped to return Relay's globally unique ID. 42 | // - for mutations will be added clientMutationId to input and output objects types 43 | // - this type will be added to NodeInterface for resolving via RootQuery.node 44 | composeWithRelay(userTC); 45 | ``` 46 | That's all! 47 | 48 | All mutations resolvers' arguments will be placed into `input` field, and added `clientMutationId`. If `input` fields already exists in resolver, then `clientMutationId` will be added to it, rest argument stays untouched. Accepted value via `args.input.clientMutationId` will be transfer to `payload.clientMutationId`, as Relay required it. 49 | 50 | To all wrapped Types with Relay, will be added `id` field or wrapped, if it exist already. This field will return globally unique ID among all types in the following format `base64(TypeName + ':' + recordId)`. 51 | 52 | For `RootQuery` will be added `node` field, that will resolve by globalId only that types, which you wrap with `composeWithRelay`. 53 | 54 | All this annoying operations is too fatigue to do by hands. So this middleware done all Relay magic implicitly for you. 55 | 56 | Requirements 57 | ============ 58 | Method `composeWithRelay` accept `ObjectTypeComposer` as input argument. So `ObjectTypeComposer` should meet following requirements: 59 | - has defined `recordIdFn` (function that from object of this type, returns you id for the globalId construction) 60 | - should have `findById` resolver (that will be used by `RootQuery.node`) 61 | 62 | If something is missing `composeWithRelay` throws error. 63 | 64 | Compatible plugins 65 | ================== 66 | - [graphql-compose-mongoose](https://github.com/graphql-compose/graphql-compose-mongoose) 67 | 68 | 69 | License 70 | ======= 71 | [MIT](https://github.com/graphql-compose/graphql-compose-relay/blob/master/LICENSE.md) 72 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f1eda2d6c0fcc1ab8433177506d4627b 2 | // flow-typed version: <>/@babel/cli_v^7.4.4/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/cli/bin/babel-external-helpers' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@babel/cli/bin/babel' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@babel/cli/lib/babel-external-helpers' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@babel/cli/lib/babel/dir' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@babel/cli/lib/babel/file' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@babel/cli/lib/babel/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@babel/cli/lib/babel/options' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@babel/cli/lib/babel/util' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module '@babel/cli/bin/babel-external-helpers.js' { 59 | declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>; 60 | } 61 | declare module '@babel/cli/bin/babel.js' { 62 | declare module.exports: $Exports<'@babel/cli/bin/babel'>; 63 | } 64 | declare module '@babel/cli/index' { 65 | declare module.exports: $Exports<'@babel/cli'>; 66 | } 67 | declare module '@babel/cli/index.js' { 68 | declare module.exports: $Exports<'@babel/cli'>; 69 | } 70 | declare module '@babel/cli/lib/babel-external-helpers.js' { 71 | declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>; 72 | } 73 | declare module '@babel/cli/lib/babel/dir.js' { 74 | declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>; 75 | } 76 | declare module '@babel/cli/lib/babel/file.js' { 77 | declare module.exports: $Exports<'@babel/cli/lib/babel/file'>; 78 | } 79 | declare module '@babel/cli/lib/babel/index.js' { 80 | declare module.exports: $Exports<'@babel/cli/lib/babel/index'>; 81 | } 82 | declare module '@babel/cli/lib/babel/options.js' { 83 | declare module.exports: $Exports<'@babel/cli/lib/babel/options'>; 84 | } 85 | declare module '@babel/cli/lib/babel/util.js' { 86 | declare module.exports: $Exports<'@babel/cli/lib/babel/util'>; 87 | } 88 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/core_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 59bc9b0d34e45eb52deaf978c46a711d 2 | // flow-typed version: <>/@babel/core_v^7.4.5/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/core' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/core' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/core/lib/config/caching' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@babel/core/lib/config/config-chain' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@babel/core/lib/config/config-descriptors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@babel/core/lib/config/files/configuration' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@babel/core/lib/config/files/index-browser' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@babel/core/lib/config/files/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@babel/core/lib/config/files/package' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@babel/core/lib/config/files/plugins' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@babel/core/lib/config/files/types' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module '@babel/core/lib/config/files/utils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module '@babel/core/lib/config/full' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module '@babel/core/lib/config/helpers/config-api' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module '@babel/core/lib/config/helpers/environment' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module '@babel/core/lib/config/index' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module '@babel/core/lib/config/item' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module '@babel/core/lib/config/partial' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module '@babel/core/lib/config/pattern-to-regex' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module '@babel/core/lib/config/plugin' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module '@babel/core/lib/config/util' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module '@babel/core/lib/config/validation/option-assertions' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module '@babel/core/lib/config/validation/options' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module '@babel/core/lib/config/validation/plugins' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module '@babel/core/lib/config/validation/removed' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module '@babel/core/lib/index' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module '@babel/core/lib/parse' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module '@babel/core/lib/tools/build-external-helpers' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module '@babel/core/lib/transform-ast' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module '@babel/core/lib/transform-file-browser' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module '@babel/core/lib/transform-file' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module '@babel/core/lib/transform' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module '@babel/core/lib/transformation/block-hoist-plugin' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module '@babel/core/lib/transformation/file/file' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module '@babel/core/lib/transformation/file/generate' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module '@babel/core/lib/transformation/file/merge-map' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module '@babel/core/lib/transformation/index' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module '@babel/core/lib/transformation/normalize-file' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module '@babel/core/lib/transformation/normalize-opts' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module '@babel/core/lib/transformation/plugin-pass' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module '@babel/core/lib/transformation/util/missing-plugin-helper' { 178 | declare module.exports: any; 179 | } 180 | 181 | // Filename aliases 182 | declare module '@babel/core/lib/config/caching.js' { 183 | declare module.exports: $Exports<'@babel/core/lib/config/caching'>; 184 | } 185 | declare module '@babel/core/lib/config/config-chain.js' { 186 | declare module.exports: $Exports<'@babel/core/lib/config/config-chain'>; 187 | } 188 | declare module '@babel/core/lib/config/config-descriptors.js' { 189 | declare module.exports: $Exports<'@babel/core/lib/config/config-descriptors'>; 190 | } 191 | declare module '@babel/core/lib/config/files/configuration.js' { 192 | declare module.exports: $Exports<'@babel/core/lib/config/files/configuration'>; 193 | } 194 | declare module '@babel/core/lib/config/files/index-browser.js' { 195 | declare module.exports: $Exports<'@babel/core/lib/config/files/index-browser'>; 196 | } 197 | declare module '@babel/core/lib/config/files/index.js' { 198 | declare module.exports: $Exports<'@babel/core/lib/config/files/index'>; 199 | } 200 | declare module '@babel/core/lib/config/files/package.js' { 201 | declare module.exports: $Exports<'@babel/core/lib/config/files/package'>; 202 | } 203 | declare module '@babel/core/lib/config/files/plugins.js' { 204 | declare module.exports: $Exports<'@babel/core/lib/config/files/plugins'>; 205 | } 206 | declare module '@babel/core/lib/config/files/types.js' { 207 | declare module.exports: $Exports<'@babel/core/lib/config/files/types'>; 208 | } 209 | declare module '@babel/core/lib/config/files/utils.js' { 210 | declare module.exports: $Exports<'@babel/core/lib/config/files/utils'>; 211 | } 212 | declare module '@babel/core/lib/config/full.js' { 213 | declare module.exports: $Exports<'@babel/core/lib/config/full'>; 214 | } 215 | declare module '@babel/core/lib/config/helpers/config-api.js' { 216 | declare module.exports: $Exports<'@babel/core/lib/config/helpers/config-api'>; 217 | } 218 | declare module '@babel/core/lib/config/helpers/environment.js' { 219 | declare module.exports: $Exports<'@babel/core/lib/config/helpers/environment'>; 220 | } 221 | declare module '@babel/core/lib/config/index.js' { 222 | declare module.exports: $Exports<'@babel/core/lib/config/index'>; 223 | } 224 | declare module '@babel/core/lib/config/item.js' { 225 | declare module.exports: $Exports<'@babel/core/lib/config/item'>; 226 | } 227 | declare module '@babel/core/lib/config/partial.js' { 228 | declare module.exports: $Exports<'@babel/core/lib/config/partial'>; 229 | } 230 | declare module '@babel/core/lib/config/pattern-to-regex.js' { 231 | declare module.exports: $Exports<'@babel/core/lib/config/pattern-to-regex'>; 232 | } 233 | declare module '@babel/core/lib/config/plugin.js' { 234 | declare module.exports: $Exports<'@babel/core/lib/config/plugin'>; 235 | } 236 | declare module '@babel/core/lib/config/util.js' { 237 | declare module.exports: $Exports<'@babel/core/lib/config/util'>; 238 | } 239 | declare module '@babel/core/lib/config/validation/option-assertions.js' { 240 | declare module.exports: $Exports<'@babel/core/lib/config/validation/option-assertions'>; 241 | } 242 | declare module '@babel/core/lib/config/validation/options.js' { 243 | declare module.exports: $Exports<'@babel/core/lib/config/validation/options'>; 244 | } 245 | declare module '@babel/core/lib/config/validation/plugins.js' { 246 | declare module.exports: $Exports<'@babel/core/lib/config/validation/plugins'>; 247 | } 248 | declare module '@babel/core/lib/config/validation/removed.js' { 249 | declare module.exports: $Exports<'@babel/core/lib/config/validation/removed'>; 250 | } 251 | declare module '@babel/core/lib/index.js' { 252 | declare module.exports: $Exports<'@babel/core/lib/index'>; 253 | } 254 | declare module '@babel/core/lib/parse.js' { 255 | declare module.exports: $Exports<'@babel/core/lib/parse'>; 256 | } 257 | declare module '@babel/core/lib/tools/build-external-helpers.js' { 258 | declare module.exports: $Exports<'@babel/core/lib/tools/build-external-helpers'>; 259 | } 260 | declare module '@babel/core/lib/transform-ast.js' { 261 | declare module.exports: $Exports<'@babel/core/lib/transform-ast'>; 262 | } 263 | declare module '@babel/core/lib/transform-file-browser.js' { 264 | declare module.exports: $Exports<'@babel/core/lib/transform-file-browser'>; 265 | } 266 | declare module '@babel/core/lib/transform-file.js' { 267 | declare module.exports: $Exports<'@babel/core/lib/transform-file'>; 268 | } 269 | declare module '@babel/core/lib/transform.js' { 270 | declare module.exports: $Exports<'@babel/core/lib/transform'>; 271 | } 272 | declare module '@babel/core/lib/transformation/block-hoist-plugin.js' { 273 | declare module.exports: $Exports<'@babel/core/lib/transformation/block-hoist-plugin'>; 274 | } 275 | declare module '@babel/core/lib/transformation/file/file.js' { 276 | declare module.exports: $Exports<'@babel/core/lib/transformation/file/file'>; 277 | } 278 | declare module '@babel/core/lib/transformation/file/generate.js' { 279 | declare module.exports: $Exports<'@babel/core/lib/transformation/file/generate'>; 280 | } 281 | declare module '@babel/core/lib/transformation/file/merge-map.js' { 282 | declare module.exports: $Exports<'@babel/core/lib/transformation/file/merge-map'>; 283 | } 284 | declare module '@babel/core/lib/transformation/index.js' { 285 | declare module.exports: $Exports<'@babel/core/lib/transformation/index'>; 286 | } 287 | declare module '@babel/core/lib/transformation/normalize-file.js' { 288 | declare module.exports: $Exports<'@babel/core/lib/transformation/normalize-file'>; 289 | } 290 | declare module '@babel/core/lib/transformation/normalize-opts.js' { 291 | declare module.exports: $Exports<'@babel/core/lib/transformation/normalize-opts'>; 292 | } 293 | declare module '@babel/core/lib/transformation/plugin-pass.js' { 294 | declare module.exports: $Exports<'@babel/core/lib/transformation/plugin-pass'>; 295 | } 296 | declare module '@babel/core/lib/transformation/util/missing-plugin-helper.js' { 297 | declare module.exports: $Exports<'@babel/core/lib/transformation/util/missing-plugin-helper'>; 298 | } 299 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/plugin-proposal-object-rest-spread_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 000222a0f6813f2d42ba075f201acc4b 2 | // flow-typed version: <>/@babel/plugin-proposal-object-rest-spread_v^7.4.4/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/plugin-proposal-object-rest-spread' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/plugin-proposal-object-rest-spread' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/plugin-proposal-object-rest-spread/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module '@babel/plugin-proposal-object-rest-spread/lib/index.js' { 31 | declare module.exports: $Exports<'@babel/plugin-proposal-object-rest-spread/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 70b5205026aff8dab2ea222cfbb0779b 2 | // flow-typed version: <>/@babel/plugin-transform-flow-strip-types_v^7.4.4/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module '@babel/plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'@babel/plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/plugin-transform-runtime_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 48fd16bcde6c03f0d895859391b0116e 2 | // flow-typed version: <>/@babel/plugin-transform-runtime_v^7.4.4/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/plugin-transform-runtime' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/plugin-transform-runtime' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/plugin-transform-runtime/lib/helpers' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@babel/plugin-transform-runtime/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@babel/plugin-transform-runtime/lib/runtime-corejs2-definitions' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@babel/plugin-transform-runtime/lib/runtime-corejs3-definitions' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module '@babel/plugin-transform-runtime/lib/helpers.js' { 43 | declare module.exports: $Exports<'@babel/plugin-transform-runtime/lib/helpers'>; 44 | } 45 | declare module '@babel/plugin-transform-runtime/lib/index.js' { 46 | declare module.exports: $Exports<'@babel/plugin-transform-runtime/lib/index'>; 47 | } 48 | declare module '@babel/plugin-transform-runtime/lib/runtime-corejs2-definitions.js' { 49 | declare module.exports: $Exports<'@babel/plugin-transform-runtime/lib/runtime-corejs2-definitions'>; 50 | } 51 | declare module '@babel/plugin-transform-runtime/lib/runtime-corejs3-definitions.js' { 52 | declare module.exports: $Exports<'@babel/plugin-transform-runtime/lib/runtime-corejs3-definitions'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/preset-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 28265c45d5d9496991104e29cc560b9c 2 | // flow-typed version: <>/@babel/preset-env_v^7.4.5/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/preset-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/preset-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/preset-env/data/built-ins.json' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@babel/preset-env/data/corejs2-built-in-features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@babel/preset-env/data/plugin-features' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@babel/preset-env/data/shipped-proposals' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@babel/preset-env/data/unreleased-labels' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@babel/preset-env/lib/available-plugins' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@babel/preset-env/lib/debug' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@babel/preset-env/lib/filter-items' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@babel/preset-env/lib/get-option-specific-excludes' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module '@babel/preset-env/lib/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module '@babel/preset-env/lib/module-transformations' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module '@babel/preset-env/lib/normalize-options' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module '@babel/preset-env/lib/options' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module '@babel/preset-env/lib/polyfills/corejs2/built-in-definitions' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module '@babel/preset-env/lib/polyfills/corejs2/entry-plugin' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module '@babel/preset-env/lib/polyfills/corejs2/get-platform-specific-default' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module '@babel/preset-env/lib/polyfills/corejs2/usage-plugin' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module '@babel/preset-env/lib/polyfills/corejs3/built-in-definitions' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module '@babel/preset-env/lib/polyfills/corejs3/entry-plugin' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module '@babel/preset-env/lib/polyfills/corejs3/shipped-proposals' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module '@babel/preset-env/lib/polyfills/corejs3/usage-plugin' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module '@babel/preset-env/lib/polyfills/regenerator/entry-plugin' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module '@babel/preset-env/lib/polyfills/regenerator/usage-plugin' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module '@babel/preset-env/lib/targets-parser' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module '@babel/preset-env/lib/utils' { 122 | declare module.exports: any; 123 | } 124 | 125 | // Filename aliases 126 | declare module '@babel/preset-env/data/built-ins.json.js' { 127 | declare module.exports: $Exports<'@babel/preset-env/data/built-ins.json'>; 128 | } 129 | declare module '@babel/preset-env/data/corejs2-built-in-features.js' { 130 | declare module.exports: $Exports<'@babel/preset-env/data/corejs2-built-in-features'>; 131 | } 132 | declare module '@babel/preset-env/data/plugin-features.js' { 133 | declare module.exports: $Exports<'@babel/preset-env/data/plugin-features'>; 134 | } 135 | declare module '@babel/preset-env/data/shipped-proposals.js' { 136 | declare module.exports: $Exports<'@babel/preset-env/data/shipped-proposals'>; 137 | } 138 | declare module '@babel/preset-env/data/unreleased-labels.js' { 139 | declare module.exports: $Exports<'@babel/preset-env/data/unreleased-labels'>; 140 | } 141 | declare module '@babel/preset-env/lib/available-plugins.js' { 142 | declare module.exports: $Exports<'@babel/preset-env/lib/available-plugins'>; 143 | } 144 | declare module '@babel/preset-env/lib/debug.js' { 145 | declare module.exports: $Exports<'@babel/preset-env/lib/debug'>; 146 | } 147 | declare module '@babel/preset-env/lib/filter-items.js' { 148 | declare module.exports: $Exports<'@babel/preset-env/lib/filter-items'>; 149 | } 150 | declare module '@babel/preset-env/lib/get-option-specific-excludes.js' { 151 | declare module.exports: $Exports<'@babel/preset-env/lib/get-option-specific-excludes'>; 152 | } 153 | declare module '@babel/preset-env/lib/index.js' { 154 | declare module.exports: $Exports<'@babel/preset-env/lib/index'>; 155 | } 156 | declare module '@babel/preset-env/lib/module-transformations.js' { 157 | declare module.exports: $Exports<'@babel/preset-env/lib/module-transformations'>; 158 | } 159 | declare module '@babel/preset-env/lib/normalize-options.js' { 160 | declare module.exports: $Exports<'@babel/preset-env/lib/normalize-options'>; 161 | } 162 | declare module '@babel/preset-env/lib/options.js' { 163 | declare module.exports: $Exports<'@babel/preset-env/lib/options'>; 164 | } 165 | declare module '@babel/preset-env/lib/polyfills/corejs2/built-in-definitions.js' { 166 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs2/built-in-definitions'>; 167 | } 168 | declare module '@babel/preset-env/lib/polyfills/corejs2/entry-plugin.js' { 169 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs2/entry-plugin'>; 170 | } 171 | declare module '@babel/preset-env/lib/polyfills/corejs2/get-platform-specific-default.js' { 172 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs2/get-platform-specific-default'>; 173 | } 174 | declare module '@babel/preset-env/lib/polyfills/corejs2/usage-plugin.js' { 175 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs2/usage-plugin'>; 176 | } 177 | declare module '@babel/preset-env/lib/polyfills/corejs3/built-in-definitions.js' { 178 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs3/built-in-definitions'>; 179 | } 180 | declare module '@babel/preset-env/lib/polyfills/corejs3/entry-plugin.js' { 181 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs3/entry-plugin'>; 182 | } 183 | declare module '@babel/preset-env/lib/polyfills/corejs3/shipped-proposals.js' { 184 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs3/shipped-proposals'>; 185 | } 186 | declare module '@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js' { 187 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/corejs3/usage-plugin'>; 188 | } 189 | declare module '@babel/preset-env/lib/polyfills/regenerator/entry-plugin.js' { 190 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/regenerator/entry-plugin'>; 191 | } 192 | declare module '@babel/preset-env/lib/polyfills/regenerator/usage-plugin.js' { 193 | declare module.exports: $Exports<'@babel/preset-env/lib/polyfills/regenerator/usage-plugin'>; 194 | } 195 | declare module '@babel/preset-env/lib/targets-parser.js' { 196 | declare module.exports: $Exports<'@babel/preset-env/lib/targets-parser'>; 197 | } 198 | declare module '@babel/preset-env/lib/utils.js' { 199 | declare module.exports: $Exports<'@babel/preset-env/lib/utils'>; 200 | } 201 | -------------------------------------------------------------------------------- /flow-typed/npm/@babel/preset-flow_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 00933c598e8c09eb712670ebda0a2fda 2 | // flow-typed version: <>/@babel/preset-flow_v^7.0.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@babel/preset-flow' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@babel/preset-flow' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@babel/preset-flow/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module '@babel/preset-flow/lib/index.js' { 31 | declare module.exports: $Exports<'@babel/preset-flow/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 25c5e9a036a3e199649f88360d74aba9 2 | // flow-typed version: <>/babel-cli_v^6.24.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-core_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 24c3ba141e10789cfb8fcea09e15919e 2 | // flow-typed version: <>/babel-core_v^7.0.0-bridge.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-core' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-core' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'babel-core/index' { 29 | declare module.exports: $Exports<'babel-core'>; 30 | } 31 | declare module 'babel-core/index.js' { 32 | declare module.exports: $Exports<'babel-core'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1b3c06f2d20b0b0dba21d781882e8561 2 | // flow-typed version: <>/babel-eslint_v^10.0.1/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/lib/analyze-scope' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/lib/babylon-to-espree/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/lib/babylon-to-espree/toAST' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/lib/babylon-to-espree/toToken' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-eslint/lib/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-eslint/lib/parse-with-scope' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-eslint/lib/parse' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-eslint/lib/visitor-keys' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'babel-eslint/lib/analyze-scope.js' { 75 | declare module.exports: $Exports<'babel-eslint/lib/analyze-scope'>; 76 | } 77 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments.js' { 78 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/attachComments'>; 79 | } 80 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments.js' { 81 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/convertComments'>; 82 | } 83 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType.js' { 84 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/convertTemplateType'>; 85 | } 86 | declare module 'babel-eslint/lib/babylon-to-espree/index.js' { 87 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/index'>; 88 | } 89 | declare module 'babel-eslint/lib/babylon-to-espree/toAST.js' { 90 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toAST'>; 91 | } 92 | declare module 'babel-eslint/lib/babylon-to-espree/toToken.js' { 93 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toToken'>; 94 | } 95 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens.js' { 96 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toTokens'>; 97 | } 98 | declare module 'babel-eslint/lib/index.js' { 99 | declare module.exports: $Exports<'babel-eslint/lib/index'>; 100 | } 101 | declare module 'babel-eslint/lib/parse-with-scope.js' { 102 | declare module.exports: $Exports<'babel-eslint/lib/parse-with-scope'>; 103 | } 104 | declare module 'babel-eslint/lib/parse.js' { 105 | declare module.exports: $Exports<'babel-eslint/lib/parse'>; 106 | } 107 | declare module 'babel-eslint/lib/visitor-keys.js' { 108 | declare module.exports: $Exports<'babel-eslint/lib/visitor-keys'>; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3ba859c625426918539c40873c1cb02d 2 | // flow-typed version: <>/babel-jest_v^24.8.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: bbcb803d9f49929318cc761b809a9cf8 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v^6.22.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-object-rest-spread_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a7f10d4e1bb10a70f85748b8d561edb8 2 | // flow-typed version: <>/babel-plugin-transform-object-rest-spread_v^6.23.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-object-rest-spread' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-object-rest-spread' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-object-rest-spread/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-object-rest-spread/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-object-rest-spread/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-runtime_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 57bd84b4107dce679567bfedacdf98fc 2 | // flow-typed version: <>/babel-plugin-transform-runtime_v^6.23.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-runtime' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-runtime' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-runtime/lib/definitions' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-transform-runtime/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-transform-runtime/lib/definitions.js' { 35 | declare module.exports: $Exports<'babel-plugin-transform-runtime/lib/definitions'>; 36 | } 37 | declare module 'babel-plugin-transform-runtime/lib/index.js' { 38 | declare module.exports: $Exports<'babel-plugin-transform-runtime/lib/index'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 572e14f69f280c09984e2f0fd8f21e3a 2 | // flow-typed version: <>/babel-preset-env_v^1.5.2/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-env/data/built-in-features' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-env/data/plugin-features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-env/lib/default-includes' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-env/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-env/lib/module-transformations' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-env/lib/normalize-options' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-preset-env/lib/targets-parser' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-preset-env/lib/utils' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'babel-preset-env/data/built-in-features.js' { 63 | declare module.exports: $Exports<'babel-preset-env/data/built-in-features'>; 64 | } 65 | declare module 'babel-preset-env/data/plugin-features.js' { 66 | declare module.exports: $Exports<'babel-preset-env/data/plugin-features'>; 67 | } 68 | declare module 'babel-preset-env/lib/default-includes.js' { 69 | declare module.exports: $Exports<'babel-preset-env/lib/default-includes'>; 70 | } 71 | declare module 'babel-preset-env/lib/index.js' { 72 | declare module.exports: $Exports<'babel-preset-env/lib/index'>; 73 | } 74 | declare module 'babel-preset-env/lib/module-transformations.js' { 75 | declare module.exports: $Exports<'babel-preset-env/lib/module-transformations'>; 76 | } 77 | declare module 'babel-preset-env/lib/normalize-options.js' { 78 | declare module.exports: $Exports<'babel-preset-env/lib/normalize-options'>; 79 | } 80 | declare module 'babel-preset-env/lib/targets-parser.js' { 81 | declare module.exports: $Exports<'babel-preset-env/lib/targets-parser'>; 82 | } 83 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin.js' { 84 | declare module.exports: $Exports<'babel-preset-env/lib/transform-polyfill-require-plugin'>; 85 | } 86 | declare module 'babel-preset-env/lib/utils.js' { 87 | declare module.exports: $Exports<'babel-preset-env/lib/utils'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/cz-conventional-changelog_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 98fa4f62b7a9ad35a7a43f0fc38c54f6 2 | // flow-typed version: <>/cz-conventional-changelog_v^2.0.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cz-conventional-changelog' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'cz-conventional-changelog' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'cz-conventional-changelog/engine' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'cz-conventional-changelog/engine.js' { 31 | declare module.exports: $Exports<'cz-conventional-changelog/engine'>; 32 | } 33 | declare module 'cz-conventional-changelog/index' { 34 | declare module.exports: $Exports<'cz-conventional-changelog'>; 35 | } 36 | declare module 'cz-conventional-changelog/index.js' { 37 | declare module.exports: $Exports<'cz-conventional-changelog'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb-base_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6fa79966dfd5ac569bdddc039576eba0 2 | // flow-typed version: <>/eslint-config-airbnb-base_v^13.1.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb-base' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-airbnb-base' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-airbnb-base/legacy' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb-base/rules/best-practices' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb-base/rules/errors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb-base/rules/es6' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb-base/rules/imports' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb-base/rules/node' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-config-airbnb-base/rules/strict' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-config-airbnb-base/rules/style' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-config-airbnb-base/rules/variables' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-config-airbnb-base/test/requires' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-config-airbnb-base/test/test-base' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-config-airbnb-base/whitespace' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'eslint-config-airbnb-base/index' { 75 | declare module.exports: $Exports<'eslint-config-airbnb-base'>; 76 | } 77 | declare module 'eslint-config-airbnb-base/index.js' { 78 | declare module.exports: $Exports<'eslint-config-airbnb-base'>; 79 | } 80 | declare module 'eslint-config-airbnb-base/legacy.js' { 81 | declare module.exports: $Exports<'eslint-config-airbnb-base/legacy'>; 82 | } 83 | declare module 'eslint-config-airbnb-base/rules/best-practices.js' { 84 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/best-practices'>; 85 | } 86 | declare module 'eslint-config-airbnb-base/rules/errors.js' { 87 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/errors'>; 88 | } 89 | declare module 'eslint-config-airbnb-base/rules/es6.js' { 90 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/es6'>; 91 | } 92 | declare module 'eslint-config-airbnb-base/rules/imports.js' { 93 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/imports'>; 94 | } 95 | declare module 'eslint-config-airbnb-base/rules/node.js' { 96 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/node'>; 97 | } 98 | declare module 'eslint-config-airbnb-base/rules/strict.js' { 99 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/strict'>; 100 | } 101 | declare module 'eslint-config-airbnb-base/rules/style.js' { 102 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/style'>; 103 | } 104 | declare module 'eslint-config-airbnb-base/rules/variables.js' { 105 | declare module.exports: $Exports<'eslint-config-airbnb-base/rules/variables'>; 106 | } 107 | declare module 'eslint-config-airbnb-base/test/requires.js' { 108 | declare module.exports: $Exports<'eslint-config-airbnb-base/test/requires'>; 109 | } 110 | declare module 'eslint-config-airbnb-base/test/test-base.js' { 111 | declare module.exports: $Exports<'eslint-config-airbnb-base/test/test-base'>; 112 | } 113 | declare module 'eslint-config-airbnb-base/whitespace.js' { 114 | declare module.exports: $Exports<'eslint-config-airbnb-base/whitespace'>; 115 | } 116 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 52c9659006f2e539c5b007790c45d897 2 | // flow-typed version: <>/eslint-config-prettier_v^4.3.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-prettier/@typescript-eslint' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-prettier/babel' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-prettier/bin/cli' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-prettier/bin/validators' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-prettier/flowtype' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-prettier/react' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-config-prettier/standard' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-config-prettier/unicorn' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-config-prettier/vue' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'eslint-config-prettier/@typescript-eslint.js' { 63 | declare module.exports: $Exports<'eslint-config-prettier/@typescript-eslint'>; 64 | } 65 | declare module 'eslint-config-prettier/babel.js' { 66 | declare module.exports: $Exports<'eslint-config-prettier/babel'>; 67 | } 68 | declare module 'eslint-config-prettier/bin/cli.js' { 69 | declare module.exports: $Exports<'eslint-config-prettier/bin/cli'>; 70 | } 71 | declare module 'eslint-config-prettier/bin/validators.js' { 72 | declare module.exports: $Exports<'eslint-config-prettier/bin/validators'>; 73 | } 74 | declare module 'eslint-config-prettier/flowtype.js' { 75 | declare module.exports: $Exports<'eslint-config-prettier/flowtype'>; 76 | } 77 | declare module 'eslint-config-prettier/index' { 78 | declare module.exports: $Exports<'eslint-config-prettier'>; 79 | } 80 | declare module 'eslint-config-prettier/index.js' { 81 | declare module.exports: $Exports<'eslint-config-prettier'>; 82 | } 83 | declare module 'eslint-config-prettier/react.js' { 84 | declare module.exports: $Exports<'eslint-config-prettier/react'>; 85 | } 86 | declare module 'eslint-config-prettier/standard.js' { 87 | declare module.exports: $Exports<'eslint-config-prettier/standard'>; 88 | } 89 | declare module 'eslint-config-prettier/unicorn.js' { 90 | declare module.exports: $Exports<'eslint-config-prettier/unicorn'>; 91 | } 92 | declare module 'eslint-config-prettier/vue.js' { 93 | declare module.exports: $Exports<'eslint-config-prettier/vue'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2e2518a627c9370329ed4a384a0218d8 2 | // flow-typed version: <>/eslint-plugin-flowtype_v^3.9.1/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-flowtype' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-flowtype' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-flowtype/dist/bin/addAssertions' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-flowtype/dist/bin/checkDocs' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-flowtype/dist/bin/checkTests' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-flowtype/dist/bin/utilities' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-flowtype/dist/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/isSimpleType' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/needWrap' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyleComplexType' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyleSimpleType' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-flowtype/dist/rules/newlineAfterFlowAnnotation' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-flowtype/dist/rules/noExistentialType' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-flowtype/dist/rules/noMixed' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-flowtype/dist/rules/noMutableArray' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-flowtype/dist/rules/noUnusedExpressions' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-flowtype/dist/rules/requireCompoundTypeAlias' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-flowtype/dist/rules/requireExactType' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-flowtype/dist/rules/requireReadonlyReactProps' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-flowtype/dist/rules/requireTypesAtTop' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-flowtype/dist/rules/semi' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-flowtype/dist/rules/spreadExactType' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateVariables' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'eslint-plugin-flowtype/dist/rules/typeImportStyle' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName' { 246 | declare module.exports: any; 247 | } 248 | 249 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens' { 250 | declare module.exports: any; 251 | } 252 | 253 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens' { 254 | declare module.exports: any; 255 | } 256 | 257 | declare module 'eslint-plugin-flowtype/dist/utilities/index' { 258 | declare module.exports: any; 259 | } 260 | 261 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile' { 262 | declare module.exports: any; 263 | } 264 | 265 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation' { 266 | declare module.exports: any; 267 | } 268 | 269 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes' { 270 | declare module.exports: any; 271 | } 272 | 273 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName' { 274 | declare module.exports: any; 275 | } 276 | 277 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers' { 278 | declare module.exports: any; 279 | } 280 | 281 | // Filename aliases 282 | declare module 'eslint-plugin-flowtype/dist/bin/addAssertions.js' { 283 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/bin/addAssertions'>; 284 | } 285 | declare module 'eslint-plugin-flowtype/dist/bin/checkDocs.js' { 286 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/bin/checkDocs'>; 287 | } 288 | declare module 'eslint-plugin-flowtype/dist/bin/checkTests.js' { 289 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/bin/checkTests'>; 290 | } 291 | declare module 'eslint-plugin-flowtype/dist/bin/utilities.js' { 292 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/bin/utilities'>; 293 | } 294 | declare module 'eslint-plugin-flowtype/dist/index.js' { 295 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/index'>; 296 | } 297 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/index.js' { 298 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/arrayStyle/index'>; 299 | } 300 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/isSimpleType.js' { 301 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/arrayStyle/isSimpleType'>; 302 | } 303 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyle/needWrap.js' { 304 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/arrayStyle/needWrap'>; 305 | } 306 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyleComplexType.js' { 307 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/arrayStyleComplexType'>; 308 | } 309 | declare module 'eslint-plugin-flowtype/dist/rules/arrayStyleSimpleType.js' { 310 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/arrayStyleSimpleType'>; 311 | } 312 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle.js' { 313 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/booleanStyle'>; 314 | } 315 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType.js' { 316 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/defineFlowType'>; 317 | } 318 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle.js' { 319 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/delimiterDangle'>; 320 | } 321 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing.js' { 322 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/genericSpacing'>; 323 | } 324 | declare module 'eslint-plugin-flowtype/dist/rules/newlineAfterFlowAnnotation.js' { 325 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/newlineAfterFlowAnnotation'>; 326 | } 327 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys.js' { 328 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noDupeKeys'>; 329 | } 330 | declare module 'eslint-plugin-flowtype/dist/rules/noExistentialType.js' { 331 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noExistentialType'>; 332 | } 333 | declare module 'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments.js' { 334 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments'>; 335 | } 336 | declare module 'eslint-plugin-flowtype/dist/rules/noMixed.js' { 337 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noMixed'>; 338 | } 339 | declare module 'eslint-plugin-flowtype/dist/rules/noMutableArray.js' { 340 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noMutableArray'>; 341 | } 342 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes.js' { 343 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes'>; 344 | } 345 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation.js' { 346 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation'>; 347 | } 348 | declare module 'eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js' { 349 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noUnusedExpressions'>; 350 | } 351 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes.js' { 352 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noWeakTypes'>; 353 | } 354 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter.js' { 355 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter'>; 356 | } 357 | declare module 'eslint-plugin-flowtype/dist/rules/requireCompoundTypeAlias.js' { 358 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireCompoundTypeAlias'>; 359 | } 360 | declare module 'eslint-plugin-flowtype/dist/rules/requireExactType.js' { 361 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireExactType'>; 362 | } 363 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType.js' { 364 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireParameterType'>; 365 | } 366 | declare module 'eslint-plugin-flowtype/dist/rules/requireReadonlyReactProps.js' { 367 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireReadonlyReactProps'>; 368 | } 369 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType.js' { 370 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireReturnType'>; 371 | } 372 | declare module 'eslint-plugin-flowtype/dist/rules/requireTypesAtTop.js' { 373 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireTypesAtTop'>; 374 | } 375 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation.js' { 376 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation'>; 377 | } 378 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType.js' { 379 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireVariableType'>; 380 | } 381 | declare module 'eslint-plugin-flowtype/dist/rules/semi.js' { 382 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/semi'>; 383 | } 384 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys.js' { 385 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/sortKeys'>; 386 | } 387 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon.js' { 388 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon'>; 389 | } 390 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket.js' { 391 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket'>; 392 | } 393 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon.js' { 394 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon'>; 395 | } 396 | declare module 'eslint-plugin-flowtype/dist/rules/spreadExactType.js' { 397 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spreadExactType'>; 398 | } 399 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions.js' { 400 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions'>; 401 | } 402 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer.js' { 403 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer'>; 404 | } 405 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty.js' { 406 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty'>; 407 | } 408 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType.js' { 409 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType'>; 410 | } 411 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression.js' { 412 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression'>; 413 | } 414 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical.js' { 415 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical'>; 416 | } 417 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateVariables.js' { 418 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateVariables'>; 419 | } 420 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index.js' { 421 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index'>; 422 | } 423 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter.js' { 424 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter'>; 425 | } 426 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch.js' { 427 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeIdMatch'>; 428 | } 429 | declare module 'eslint-plugin-flowtype/dist/rules/typeImportStyle.js' { 430 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeImportStyle'>; 431 | } 432 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing.js' { 433 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing'>; 434 | } 435 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType.js' { 436 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/useFlowType'>; 437 | } 438 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax.js' { 439 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/validSyntax'>; 440 | } 441 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation.js' { 442 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation'>; 443 | } 444 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch.js' { 445 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch'>; 446 | } 447 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName.js' { 448 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getParameterName'>; 449 | } 450 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens.js' { 451 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens'>; 452 | } 453 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens.js' { 454 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens'>; 455 | } 456 | declare module 'eslint-plugin-flowtype/dist/utilities/index.js' { 457 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/index'>; 458 | } 459 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile.js' { 460 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/isFlowFile'>; 461 | } 462 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation.js' { 463 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation'>; 464 | } 465 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes.js' { 466 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes'>; 467 | } 468 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName.js' { 469 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/quoteName'>; 470 | } 471 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers.js' { 472 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/spacingFixers'>; 473 | } 474 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 984cc9f41ceb60b31ffca9fa0f72a7ec 2 | // flow-typed version: <>/eslint-plugin-import_v^2.17.3/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-import' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-import' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-import/config/electron' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-import/config/errors' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-import/config/react-native' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-import/config/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-import/config/recommended' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-import/config/stage-0' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-import/config/typescript' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-import/config/warnings' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-import/lib/core/importType' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-import/lib/core/staticRequire' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-import/lib/docsUrl' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-import/lib/ExportMap' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-import/lib/importDeclaration' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-import/lib/index' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-import/lib/rules/default' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-import/lib/rules/dynamic-import-chunkname' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-import/lib/rules/export' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-import/lib/rules/exports-last' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-import/lib/rules/extensions' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-import/lib/rules/first' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-import/lib/rules/group-exports' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-import/lib/rules/imports-first' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-import/lib/rules/max-dependencies' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-import/lib/rules/named' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-import/lib/rules/namespace' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-import/lib/rules/newline-after-import' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-import/lib/rules/no-amd' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-import/lib/rules/no-commonjs' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-import/lib/rules/no-cycle' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-import/lib/rules/no-default-export' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-import/lib/rules/no-deprecated' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-import/lib/rules/no-duplicates' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-import/lib/rules/no-named-default' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-import/lib/rules/no-named-export' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-import/lib/rules/no-namespace' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-import/lib/rules/no-relative-parent-imports' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'eslint-plugin-import/lib/rules/no-self-import' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'eslint-plugin-import/lib/rules/no-unresolved' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'eslint-plugin-import/lib/rules/no-unused-modules' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'eslint-plugin-import/lib/rules/no-useless-path-segments' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'eslint-plugin-import/lib/rules/order' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'eslint-plugin-import/lib/rules/unambiguous' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'eslint-plugin-import/memo-parser/index' { 246 | declare module.exports: any; 247 | } 248 | 249 | // Filename aliases 250 | declare module 'eslint-plugin-import/config/electron.js' { 251 | declare module.exports: $Exports<'eslint-plugin-import/config/electron'>; 252 | } 253 | declare module 'eslint-plugin-import/config/errors.js' { 254 | declare module.exports: $Exports<'eslint-plugin-import/config/errors'>; 255 | } 256 | declare module 'eslint-plugin-import/config/react-native.js' { 257 | declare module.exports: $Exports<'eslint-plugin-import/config/react-native'>; 258 | } 259 | declare module 'eslint-plugin-import/config/react.js' { 260 | declare module.exports: $Exports<'eslint-plugin-import/config/react'>; 261 | } 262 | declare module 'eslint-plugin-import/config/recommended.js' { 263 | declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; 264 | } 265 | declare module 'eslint-plugin-import/config/stage-0.js' { 266 | declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; 267 | } 268 | declare module 'eslint-plugin-import/config/typescript.js' { 269 | declare module.exports: $Exports<'eslint-plugin-import/config/typescript'>; 270 | } 271 | declare module 'eslint-plugin-import/config/warnings.js' { 272 | declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; 273 | } 274 | declare module 'eslint-plugin-import/lib/core/importType.js' { 275 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; 276 | } 277 | declare module 'eslint-plugin-import/lib/core/staticRequire.js' { 278 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/staticRequire'>; 279 | } 280 | declare module 'eslint-plugin-import/lib/docsUrl.js' { 281 | declare module.exports: $Exports<'eslint-plugin-import/lib/docsUrl'>; 282 | } 283 | declare module 'eslint-plugin-import/lib/ExportMap.js' { 284 | declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; 285 | } 286 | declare module 'eslint-plugin-import/lib/importDeclaration.js' { 287 | declare module.exports: $Exports<'eslint-plugin-import/lib/importDeclaration'>; 288 | } 289 | declare module 'eslint-plugin-import/lib/index.js' { 290 | declare module.exports: $Exports<'eslint-plugin-import/lib/index'>; 291 | } 292 | declare module 'eslint-plugin-import/lib/rules/default.js' { 293 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/default'>; 294 | } 295 | declare module 'eslint-plugin-import/lib/rules/dynamic-import-chunkname.js' { 296 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/dynamic-import-chunkname'>; 297 | } 298 | declare module 'eslint-plugin-import/lib/rules/export.js' { 299 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/export'>; 300 | } 301 | declare module 'eslint-plugin-import/lib/rules/exports-last.js' { 302 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/exports-last'>; 303 | } 304 | declare module 'eslint-plugin-import/lib/rules/extensions.js' { 305 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; 306 | } 307 | declare module 'eslint-plugin-import/lib/rules/first.js' { 308 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; 309 | } 310 | declare module 'eslint-plugin-import/lib/rules/group-exports.js' { 311 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/group-exports'>; 312 | } 313 | declare module 'eslint-plugin-import/lib/rules/imports-first.js' { 314 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/imports-first'>; 315 | } 316 | declare module 'eslint-plugin-import/lib/rules/max-dependencies.js' { 317 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/max-dependencies'>; 318 | } 319 | declare module 'eslint-plugin-import/lib/rules/named.js' { 320 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/named'>; 321 | } 322 | declare module 'eslint-plugin-import/lib/rules/namespace.js' { 323 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/namespace'>; 324 | } 325 | declare module 'eslint-plugin-import/lib/rules/newline-after-import.js' { 326 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/newline-after-import'>; 327 | } 328 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path.js' { 329 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-absolute-path'>; 330 | } 331 | declare module 'eslint-plugin-import/lib/rules/no-amd.js' { 332 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-amd'>; 333 | } 334 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export.js' { 335 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-anonymous-default-export'>; 336 | } 337 | declare module 'eslint-plugin-import/lib/rules/no-commonjs.js' { 338 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-commonjs'>; 339 | } 340 | declare module 'eslint-plugin-import/lib/rules/no-cycle.js' { 341 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-cycle'>; 342 | } 343 | declare module 'eslint-plugin-import/lib/rules/no-default-export.js' { 344 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-default-export'>; 345 | } 346 | declare module 'eslint-plugin-import/lib/rules/no-deprecated.js' { 347 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-deprecated'>; 348 | } 349 | declare module 'eslint-plugin-import/lib/rules/no-duplicates.js' { 350 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-duplicates'>; 351 | } 352 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require.js' { 353 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-dynamic-require'>; 354 | } 355 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies.js' { 356 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-extraneous-dependencies'>; 357 | } 358 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules.js' { 359 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-internal-modules'>; 360 | } 361 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports.js' { 362 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-mutable-exports'>; 363 | } 364 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { 365 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default-member'>; 366 | } 367 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { 368 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default'>; 369 | } 370 | declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { 371 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-default'>; 372 | } 373 | declare module 'eslint-plugin-import/lib/rules/no-named-export.js' { 374 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-export'>; 375 | } 376 | declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { 377 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-namespace'>; 378 | } 379 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { 380 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-nodejs-modules'>; 381 | } 382 | declare module 'eslint-plugin-import/lib/rules/no-relative-parent-imports.js' { 383 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-relative-parent-imports'>; 384 | } 385 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { 386 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-restricted-paths'>; 387 | } 388 | declare module 'eslint-plugin-import/lib/rules/no-self-import.js' { 389 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-self-import'>; 390 | } 391 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { 392 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unassigned-import'>; 393 | } 394 | declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { 395 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unresolved'>; 396 | } 397 | declare module 'eslint-plugin-import/lib/rules/no-unused-modules.js' { 398 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unused-modules'>; 399 | } 400 | declare module 'eslint-plugin-import/lib/rules/no-useless-path-segments.js' { 401 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-useless-path-segments'>; 402 | } 403 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { 404 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-webpack-loader-syntax'>; 405 | } 406 | declare module 'eslint-plugin-import/lib/rules/order.js' { 407 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; 408 | } 409 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { 410 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/prefer-default-export'>; 411 | } 412 | declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { 413 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/unambiguous'>; 414 | } 415 | declare module 'eslint-plugin-import/memo-parser/index.js' { 416 | declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; 417 | } 418 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 253720f759cf7d236135ab67aec5c929 2 | // flow-typed version: <>/eslint-plugin-prettier_v^3.1.0/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-prettier/eslint-plugin-prettier' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'eslint-plugin-prettier/eslint-plugin-prettier.js' { 31 | declare module.exports: $Exports<'eslint-plugin-prettier/eslint-plugin-prettier'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/jest_v24.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f5997c5ee181aaeba6fc2d2a2158feb3 2 | // flow-typed version: cefb07e7f4/jest_v24.x.x/flow_>=v0.39.x 3 | 4 | type JestMockFn, TReturn> = { 5 | (...args: TArguments): TReturn, 6 | /** 7 | * An object for introspecting mock calls 8 | */ 9 | mock: { 10 | /** 11 | * An array that represents all calls that have been made into this mock 12 | * function. Each call is represented by an array of arguments that were 13 | * passed during the call. 14 | */ 15 | calls: Array, 16 | /** 17 | * An array that contains all the object instances that have been 18 | * instantiated from this mock function. 19 | */ 20 | instances: Array, 21 | /** 22 | * An array that contains all the object results that have been 23 | * returned by this mock function call 24 | */ 25 | results: Array<{ isThrow: boolean, value: TReturn }>, 26 | }, 27 | /** 28 | * Resets all information stored in the mockFn.mock.calls and 29 | * mockFn.mock.instances arrays. Often this is useful when you want to clean 30 | * up a mock's usage data between two assertions. 31 | */ 32 | mockClear(): void, 33 | /** 34 | * Resets all information stored in the mock. This is useful when you want to 35 | * completely restore a mock back to its initial state. 36 | */ 37 | mockReset(): void, 38 | /** 39 | * Removes the mock and restores the initial implementation. This is useful 40 | * when you want to mock functions in certain test cases and restore the 41 | * original implementation in others. Beware that mockFn.mockRestore only 42 | * works when mock was created with jest.spyOn. Thus you have to take care of 43 | * restoration yourself when manually assigning jest.fn(). 44 | */ 45 | mockRestore(): void, 46 | /** 47 | * Accepts a function that should be used as the implementation of the mock. 48 | * The mock itself will still record all calls that go into and instances 49 | * that come from itself -- the only difference is that the implementation 50 | * will also be executed when the mock is called. 51 | */ 52 | mockImplementation( 53 | fn: (...args: TArguments) => TReturn 54 | ): JestMockFn, 55 | /** 56 | * Accepts a function that will be used as an implementation of the mock for 57 | * one call to the mocked function. Can be chained so that multiple function 58 | * calls produce different results. 59 | */ 60 | mockImplementationOnce( 61 | fn: (...args: TArguments) => TReturn 62 | ): JestMockFn, 63 | /** 64 | * Accepts a string to use in test result output in place of "jest.fn()" to 65 | * indicate which mock function is being referenced. 66 | */ 67 | mockName(name: string): JestMockFn, 68 | /** 69 | * Just a simple sugar function for returning `this` 70 | */ 71 | mockReturnThis(): void, 72 | /** 73 | * Accepts a value that will be returned whenever the mock function is called. 74 | */ 75 | mockReturnValue(value: TReturn): JestMockFn, 76 | /** 77 | * Sugar for only returning a value once inside your mock 78 | */ 79 | mockReturnValueOnce(value: TReturn): JestMockFn, 80 | /** 81 | * Sugar for jest.fn().mockImplementation(() => Promise.resolve(value)) 82 | */ 83 | mockResolvedValue(value: TReturn): JestMockFn>, 84 | /** 85 | * Sugar for jest.fn().mockImplementationOnce(() => Promise.resolve(value)) 86 | */ 87 | mockResolvedValueOnce( 88 | value: TReturn 89 | ): JestMockFn>, 90 | /** 91 | * Sugar for jest.fn().mockImplementation(() => Promise.reject(value)) 92 | */ 93 | mockRejectedValue(value: TReturn): JestMockFn>, 94 | /** 95 | * Sugar for jest.fn().mockImplementationOnce(() => Promise.reject(value)) 96 | */ 97 | mockRejectedValueOnce(value: TReturn): JestMockFn>, 98 | }; 99 | 100 | type JestAsymmetricEqualityType = { 101 | /** 102 | * A custom Jasmine equality tester 103 | */ 104 | asymmetricMatch(value: mixed): boolean, 105 | }; 106 | 107 | type JestCallsType = { 108 | allArgs(): mixed, 109 | all(): mixed, 110 | any(): boolean, 111 | count(): number, 112 | first(): mixed, 113 | mostRecent(): mixed, 114 | reset(): void, 115 | }; 116 | 117 | type JestClockType = { 118 | install(): void, 119 | mockDate(date: Date): void, 120 | tick(milliseconds?: number): void, 121 | uninstall(): void, 122 | }; 123 | 124 | type JestMatcherResult = { 125 | message?: string | (() => string), 126 | pass: boolean, 127 | }; 128 | 129 | type JestMatcher = ( 130 | received: any, 131 | ...actual: Array 132 | ) => JestMatcherResult | Promise; 133 | 134 | type JestPromiseType = { 135 | /** 136 | * Use rejects to unwrap the reason of a rejected promise so any other 137 | * matcher can be chained. If the promise is fulfilled the assertion fails. 138 | */ 139 | rejects: JestExpectType, 140 | /** 141 | * Use resolves to unwrap the value of a fulfilled promise so any other 142 | * matcher can be chained. If the promise is rejected the assertion fails. 143 | */ 144 | resolves: JestExpectType, 145 | }; 146 | 147 | /** 148 | * Jest allows functions and classes to be used as test names in test() and 149 | * describe() 150 | */ 151 | type JestTestName = string | Function; 152 | 153 | /** 154 | * Plugin: jest-styled-components 155 | */ 156 | 157 | type JestStyledComponentsMatcherValue = 158 | | string 159 | | JestAsymmetricEqualityType 160 | | RegExp 161 | | typeof undefined; 162 | 163 | type JestStyledComponentsMatcherOptions = { 164 | media?: string, 165 | modifier?: string, 166 | supports?: string, 167 | }; 168 | 169 | type JestStyledComponentsMatchersType = { 170 | toHaveStyleRule( 171 | property: string, 172 | value: JestStyledComponentsMatcherValue, 173 | options?: JestStyledComponentsMatcherOptions 174 | ): void, 175 | }; 176 | 177 | /** 178 | * Plugin: jest-enzyme 179 | */ 180 | type EnzymeMatchersType = { 181 | // 5.x 182 | toBeEmpty(): void, 183 | toBePresent(): void, 184 | // 6.x 185 | toBeChecked(): void, 186 | toBeDisabled(): void, 187 | toBeEmptyRender(): void, 188 | toContainMatchingElement(selector: string): void, 189 | toContainMatchingElements(n: number, selector: string): void, 190 | toContainExactlyOneMatchingElement(selector: string): void, 191 | toContainReact(element: React$Element): void, 192 | toExist(): void, 193 | toHaveClassName(className: string): void, 194 | toHaveHTML(html: string): void, 195 | toHaveProp: ((propKey: string, propValue?: any) => void) & 196 | ((props: {}) => void), 197 | toHaveRef(refName: string): void, 198 | toHaveState: ((stateKey: string, stateValue?: any) => void) & 199 | ((state: {}) => void), 200 | toHaveStyle: ((styleKey: string, styleValue?: any) => void) & 201 | ((style: {}) => void), 202 | toHaveTagName(tagName: string): void, 203 | toHaveText(text: string): void, 204 | toHaveValue(value: any): void, 205 | toIncludeText(text: string): void, 206 | toMatchElement( 207 | element: React$Element, 208 | options?: {| ignoreProps?: boolean, verbose?: boolean |} 209 | ): void, 210 | toMatchSelector(selector: string): void, 211 | // 7.x 212 | toHaveDisplayName(name: string): void, 213 | }; 214 | 215 | // DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers 216 | type DomTestingLibraryType = { 217 | toBeDisabled(): void, 218 | toBeEnabled(): void, 219 | toBeEmpty(): void, 220 | toBeInTheDocument(): void, 221 | toBeVisible(): void, 222 | toContainElement(element: HTMLElement | null): void, 223 | toContainHTML(htmlText: string): void, 224 | toHaveAttribute(name: string, expectedValue?: string): void, 225 | toHaveClass(...classNames: string[]): void, 226 | toHaveFocus(): void, 227 | toHaveFormValues(expectedValues: { [name: string]: any }): void, 228 | toHaveStyle(css: string): void, 229 | toHaveTextContent( 230 | content: string | RegExp, 231 | options?: { normalizeWhitespace: boolean } 232 | ): void, 233 | toBeInTheDOM(): void, 234 | }; 235 | 236 | // Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers 237 | type JestJQueryMatchersType = { 238 | toExist(): void, 239 | toHaveLength(len: number): void, 240 | toHaveId(id: string): void, 241 | toHaveClass(className: string): void, 242 | toHaveTag(tag: string): void, 243 | toHaveAttr(key: string, val?: any): void, 244 | toHaveProp(key: string, val?: any): void, 245 | toHaveText(text: string | RegExp): void, 246 | toHaveData(key: string, val?: any): void, 247 | toHaveValue(val: any): void, 248 | toHaveCss(css: { [key: string]: any }): void, 249 | toBeChecked(): void, 250 | toBeDisabled(): void, 251 | toBeEmpty(): void, 252 | toBeHidden(): void, 253 | toBeSelected(): void, 254 | toBeVisible(): void, 255 | toBeFocused(): void, 256 | toBeInDom(): void, 257 | toBeMatchedBy(sel: string): void, 258 | toHaveDescendant(sel: string): void, 259 | toHaveDescendantWithText(sel: string, text: string | RegExp): void, 260 | }; 261 | 262 | // Jest Extended Matchers: https://github.com/jest-community/jest-extended 263 | type JestExtendedMatchersType = { 264 | /** 265 | * Note: Currently unimplemented 266 | * Passing assertion 267 | * 268 | * @param {String} message 269 | */ 270 | // pass(message: string): void; 271 | 272 | /** 273 | * Note: Currently unimplemented 274 | * Failing assertion 275 | * 276 | * @param {String} message 277 | */ 278 | // fail(message: string): void; 279 | 280 | /** 281 | * Use .toBeEmpty when checking if a String '', Array [] or Object {} is empty. 282 | */ 283 | toBeEmpty(): void, 284 | 285 | /** 286 | * Use .toBeOneOf when checking if a value is a member of a given Array. 287 | * @param {Array.<*>} members 288 | */ 289 | toBeOneOf(members: any[]): void, 290 | 291 | /** 292 | * Use `.toBeNil` when checking a value is `null` or `undefined`. 293 | */ 294 | toBeNil(): void, 295 | 296 | /** 297 | * Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`. 298 | * @param {Function} predicate 299 | */ 300 | toSatisfy(predicate: (n: any) => boolean): void, 301 | 302 | /** 303 | * Use `.toBeArray` when checking if a value is an `Array`. 304 | */ 305 | toBeArray(): void, 306 | 307 | /** 308 | * Use `.toBeArrayOfSize` when checking if a value is an `Array` of size x. 309 | * @param {Number} x 310 | */ 311 | toBeArrayOfSize(x: number): void, 312 | 313 | /** 314 | * Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set. 315 | * @param {Array.<*>} members 316 | */ 317 | toIncludeAllMembers(members: any[]): void, 318 | 319 | /** 320 | * Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set. 321 | * @param {Array.<*>} members 322 | */ 323 | toIncludeAnyMembers(members: any[]): void, 324 | 325 | /** 326 | * Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array. 327 | * @param {Function} predicate 328 | */ 329 | toSatisfyAll(predicate: (n: any) => boolean): void, 330 | 331 | /** 332 | * Use `.toBeBoolean` when checking if a value is a `Boolean`. 333 | */ 334 | toBeBoolean(): void, 335 | 336 | /** 337 | * Use `.toBeTrue` when checking a value is equal (===) to `true`. 338 | */ 339 | toBeTrue(): void, 340 | 341 | /** 342 | * Use `.toBeFalse` when checking a value is equal (===) to `false`. 343 | */ 344 | toBeFalse(): void, 345 | 346 | /** 347 | * Use .toBeDate when checking if a value is a Date. 348 | */ 349 | toBeDate(): void, 350 | 351 | /** 352 | * Use `.toBeFunction` when checking if a value is a `Function`. 353 | */ 354 | toBeFunction(): void, 355 | 356 | /** 357 | * Use `.toHaveBeenCalledBefore` when checking if a `Mock` was called before another `Mock`. 358 | * 359 | * Note: Required Jest version >22 360 | * Note: Your mock functions will have to be asynchronous to cause the timestamps inside of Jest to occur in a differentJS event loop, otherwise the mock timestamps will all be the same 361 | * 362 | * @param {Mock} mock 363 | */ 364 | toHaveBeenCalledBefore(mock: JestMockFn): void, 365 | 366 | /** 367 | * Use `.toBeNumber` when checking if a value is a `Number`. 368 | */ 369 | toBeNumber(): void, 370 | 371 | /** 372 | * Use `.toBeNaN` when checking a value is `NaN`. 373 | */ 374 | toBeNaN(): void, 375 | 376 | /** 377 | * Use `.toBeFinite` when checking if a value is a `Number`, not `NaN` or `Infinity`. 378 | */ 379 | toBeFinite(): void, 380 | 381 | /** 382 | * Use `.toBePositive` when checking if a value is a positive `Number`. 383 | */ 384 | toBePositive(): void, 385 | 386 | /** 387 | * Use `.toBeNegative` when checking if a value is a negative `Number`. 388 | */ 389 | toBeNegative(): void, 390 | 391 | /** 392 | * Use `.toBeEven` when checking if a value is an even `Number`. 393 | */ 394 | toBeEven(): void, 395 | 396 | /** 397 | * Use `.toBeOdd` when checking if a value is an odd `Number`. 398 | */ 399 | toBeOdd(): void, 400 | 401 | /** 402 | * Use `.toBeWithin` when checking if a number is in between the given bounds of: start (inclusive) and end (exclusive). 403 | * 404 | * @param {Number} start 405 | * @param {Number} end 406 | */ 407 | toBeWithin(start: number, end: number): void, 408 | 409 | /** 410 | * Use `.toBeObject` when checking if a value is an `Object`. 411 | */ 412 | toBeObject(): void, 413 | 414 | /** 415 | * Use `.toContainKey` when checking if an object contains the provided key. 416 | * 417 | * @param {String} key 418 | */ 419 | toContainKey(key: string): void, 420 | 421 | /** 422 | * Use `.toContainKeys` when checking if an object has all of the provided keys. 423 | * 424 | * @param {Array.} keys 425 | */ 426 | toContainKeys(keys: string[]): void, 427 | 428 | /** 429 | * Use `.toContainAllKeys` when checking if an object only contains all of the provided keys. 430 | * 431 | * @param {Array.} keys 432 | */ 433 | toContainAllKeys(keys: string[]): void, 434 | 435 | /** 436 | * Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys. 437 | * 438 | * @param {Array.} keys 439 | */ 440 | toContainAnyKeys(keys: string[]): void, 441 | 442 | /** 443 | * Use `.toContainValue` when checking if an object contains the provided value. 444 | * 445 | * @param {*} value 446 | */ 447 | toContainValue(value: any): void, 448 | 449 | /** 450 | * Use `.toContainValues` when checking if an object contains all of the provided values. 451 | * 452 | * @param {Array.<*>} values 453 | */ 454 | toContainValues(values: any[]): void, 455 | 456 | /** 457 | * Use `.toContainAllValues` when checking if an object only contains all of the provided values. 458 | * 459 | * @param {Array.<*>} values 460 | */ 461 | toContainAllValues(values: any[]): void, 462 | 463 | /** 464 | * Use `.toContainAnyValues` when checking if an object contains at least one of the provided values. 465 | * 466 | * @param {Array.<*>} values 467 | */ 468 | toContainAnyValues(values: any[]): void, 469 | 470 | /** 471 | * Use `.toContainEntry` when checking if an object contains the provided entry. 472 | * 473 | * @param {Array.} entry 474 | */ 475 | toContainEntry(entry: [string, string]): void, 476 | 477 | /** 478 | * Use `.toContainEntries` when checking if an object contains all of the provided entries. 479 | * 480 | * @param {Array.>} entries 481 | */ 482 | toContainEntries(entries: [string, string][]): void, 483 | 484 | /** 485 | * Use `.toContainAllEntries` when checking if an object only contains all of the provided entries. 486 | * 487 | * @param {Array.>} entries 488 | */ 489 | toContainAllEntries(entries: [string, string][]): void, 490 | 491 | /** 492 | * Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries. 493 | * 494 | * @param {Array.>} entries 495 | */ 496 | toContainAnyEntries(entries: [string, string][]): void, 497 | 498 | /** 499 | * Use `.toBeExtensible` when checking if an object is extensible. 500 | */ 501 | toBeExtensible(): void, 502 | 503 | /** 504 | * Use `.toBeFrozen` when checking if an object is frozen. 505 | */ 506 | toBeFrozen(): void, 507 | 508 | /** 509 | * Use `.toBeSealed` when checking if an object is sealed. 510 | */ 511 | toBeSealed(): void, 512 | 513 | /** 514 | * Use `.toBeString` when checking if a value is a `String`. 515 | */ 516 | toBeString(): void, 517 | 518 | /** 519 | * Use `.toEqualCaseInsensitive` when checking if a string is equal (===) to another ignoring the casing of both strings. 520 | * 521 | * @param {String} string 522 | */ 523 | toEqualCaseInsensitive(string: string): void, 524 | 525 | /** 526 | * Use `.toStartWith` when checking if a `String` starts with a given `String` prefix. 527 | * 528 | * @param {String} prefix 529 | */ 530 | toStartWith(prefix: string): void, 531 | 532 | /** 533 | * Use `.toEndWith` when checking if a `String` ends with a given `String` suffix. 534 | * 535 | * @param {String} suffix 536 | */ 537 | toEndWith(suffix: string): void, 538 | 539 | /** 540 | * Use `.toInclude` when checking if a `String` includes the given `String` substring. 541 | * 542 | * @param {String} substring 543 | */ 544 | toInclude(substring: string): void, 545 | 546 | /** 547 | * Use `.toIncludeRepeated` when checking if a `String` includes the given `String` substring the correct number of times. 548 | * 549 | * @param {String} substring 550 | * @param {Number} times 551 | */ 552 | toIncludeRepeated(substring: string, times: number): void, 553 | 554 | /** 555 | * Use `.toIncludeMultiple` when checking if a `String` includes all of the given substrings. 556 | * 557 | * @param {Array.} substring 558 | */ 559 | toIncludeMultiple(substring: string[]): void, 560 | }; 561 | 562 | interface JestExpectType { 563 | not: JestExpectType & 564 | EnzymeMatchersType & 565 | DomTestingLibraryType & 566 | JestJQueryMatchersType & 567 | JestStyledComponentsMatchersType & 568 | JestExtendedMatchersType; 569 | /** 570 | * If you have a mock function, you can use .lastCalledWith to test what 571 | * arguments it was last called with. 572 | */ 573 | lastCalledWith(...args: Array): void; 574 | /** 575 | * toBe just checks that a value is what you expect. It uses === to check 576 | * strict equality. 577 | */ 578 | toBe(value: any): void; 579 | /** 580 | * Use .toBeCalledWith to ensure that a mock function was called with 581 | * specific arguments. 582 | */ 583 | toBeCalledWith(...args: Array): void; 584 | /** 585 | * Using exact equality with floating point numbers is a bad idea. Rounding 586 | * means that intuitive things fail. 587 | */ 588 | toBeCloseTo(num: number, delta: any): void; 589 | /** 590 | * Use .toBeDefined to check that a variable is not undefined. 591 | */ 592 | toBeDefined(): void; 593 | /** 594 | * Use .toBeFalsy when you don't care what a value is, you just want to 595 | * ensure a value is false in a boolean context. 596 | */ 597 | toBeFalsy(): void; 598 | /** 599 | * To compare floating point numbers, you can use toBeGreaterThan. 600 | */ 601 | toBeGreaterThan(number: number): void; 602 | /** 603 | * To compare floating point numbers, you can use toBeGreaterThanOrEqual. 604 | */ 605 | toBeGreaterThanOrEqual(number: number): void; 606 | /** 607 | * To compare floating point numbers, you can use toBeLessThan. 608 | */ 609 | toBeLessThan(number: number): void; 610 | /** 611 | * To compare floating point numbers, you can use toBeLessThanOrEqual. 612 | */ 613 | toBeLessThanOrEqual(number: number): void; 614 | /** 615 | * Use .toBeInstanceOf(Class) to check that an object is an instance of a 616 | * class. 617 | */ 618 | toBeInstanceOf(cls: Class<*>): void; 619 | /** 620 | * .toBeNull() is the same as .toBe(null) but the error messages are a bit 621 | * nicer. 622 | */ 623 | toBeNull(): void; 624 | /** 625 | * Use .toBeTruthy when you don't care what a value is, you just want to 626 | * ensure a value is true in a boolean context. 627 | */ 628 | toBeTruthy(): void; 629 | /** 630 | * Use .toBeUndefined to check that a variable is undefined. 631 | */ 632 | toBeUndefined(): void; 633 | /** 634 | * Use .toContain when you want to check that an item is in a list. For 635 | * testing the items in the list, this uses ===, a strict equality check. 636 | */ 637 | toContain(item: any): void; 638 | /** 639 | * Use .toContainEqual when you want to check that an item is in a list. For 640 | * testing the items in the list, this matcher recursively checks the 641 | * equality of all fields, rather than checking for object identity. 642 | */ 643 | toContainEqual(item: any): void; 644 | /** 645 | * Use .toEqual when you want to check that two objects have the same value. 646 | * This matcher recursively checks the equality of all fields, rather than 647 | * checking for object identity. 648 | */ 649 | toEqual(value: any): void; 650 | /** 651 | * Use .toHaveBeenCalled to ensure that a mock function got called. 652 | */ 653 | toHaveBeenCalled(): void; 654 | toBeCalled(): void; 655 | /** 656 | * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact 657 | * number of times. 658 | */ 659 | toHaveBeenCalledTimes(number: number): void; 660 | toBeCalledTimes(number: number): void; 661 | /** 662 | * 663 | */ 664 | toHaveBeenNthCalledWith(nthCall: number, ...args: Array): void; 665 | nthCalledWith(nthCall: number, ...args: Array): void; 666 | /** 667 | * 668 | */ 669 | toHaveReturned(): void; 670 | toReturn(): void; 671 | /** 672 | * 673 | */ 674 | toHaveReturnedTimes(number: number): void; 675 | toReturnTimes(number: number): void; 676 | /** 677 | * 678 | */ 679 | toHaveReturnedWith(value: any): void; 680 | toReturnWith(value: any): void; 681 | /** 682 | * 683 | */ 684 | toHaveLastReturnedWith(value: any): void; 685 | lastReturnedWith(value: any): void; 686 | /** 687 | * 688 | */ 689 | toHaveNthReturnedWith(nthCall: number, value: any): void; 690 | nthReturnedWith(nthCall: number, value: any): void; 691 | /** 692 | * Use .toHaveBeenCalledWith to ensure that a mock function was called with 693 | * specific arguments. 694 | */ 695 | toHaveBeenCalledWith(...args: Array): void; 696 | toBeCalledWith(...args: Array): void; 697 | /** 698 | * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called 699 | * with specific arguments. 700 | */ 701 | toHaveBeenLastCalledWith(...args: Array): void; 702 | lastCalledWith(...args: Array): void; 703 | /** 704 | * Check that an object has a .length property and it is set to a certain 705 | * numeric value. 706 | */ 707 | toHaveLength(number: number): void; 708 | /** 709 | * 710 | */ 711 | toHaveProperty(propPath: string, value?: any): void; 712 | /** 713 | * Use .toMatch to check that a string matches a regular expression or string. 714 | */ 715 | toMatch(regexpOrString: RegExp | string): void; 716 | /** 717 | * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. 718 | */ 719 | toMatchObject(object: Object | Array): void; 720 | /** 721 | * Use .toStrictEqual to check that a javascript object matches a subset of the properties of an object. 722 | */ 723 | toStrictEqual(value: any): void; 724 | /** 725 | * This ensures that an Object matches the most recent snapshot. 726 | */ 727 | toMatchSnapshot(propertyMatchers?: any, name?: string): void; 728 | /** 729 | * This ensures that an Object matches the most recent snapshot. 730 | */ 731 | toMatchSnapshot(name: string): void; 732 | 733 | toMatchInlineSnapshot(snapshot?: string): void; 734 | toMatchInlineSnapshot(propertyMatchers?: any, snapshot?: string): void; 735 | /** 736 | * Use .toThrow to test that a function throws when it is called. 737 | * If you want to test that a specific error gets thrown, you can provide an 738 | * argument to toThrow. The argument can be a string for the error message, 739 | * a class for the error, or a regex that should match the error. 740 | * 741 | * Alias: .toThrowError 742 | */ 743 | toThrow(message?: string | Error | Class | RegExp): void; 744 | toThrowError(message?: string | Error | Class | RegExp): void; 745 | /** 746 | * Use .toThrowErrorMatchingSnapshot to test that a function throws a error 747 | * matching the most recent snapshot when it is called. 748 | */ 749 | toThrowErrorMatchingSnapshot(): void; 750 | toThrowErrorMatchingInlineSnapshot(snapshot?: string): void; 751 | } 752 | 753 | type JestObjectType = { 754 | /** 755 | * Disables automatic mocking in the module loader. 756 | * 757 | * After this method is called, all `require()`s will return the real 758 | * versions of each module (rather than a mocked version). 759 | */ 760 | disableAutomock(): JestObjectType, 761 | /** 762 | * An un-hoisted version of disableAutomock 763 | */ 764 | autoMockOff(): JestObjectType, 765 | /** 766 | * Enables automatic mocking in the module loader. 767 | */ 768 | enableAutomock(): JestObjectType, 769 | /** 770 | * An un-hoisted version of enableAutomock 771 | */ 772 | autoMockOn(): JestObjectType, 773 | /** 774 | * Clears the mock.calls and mock.instances properties of all mocks. 775 | * Equivalent to calling .mockClear() on every mocked function. 776 | */ 777 | clearAllMocks(): JestObjectType, 778 | /** 779 | * Resets the state of all mocks. Equivalent to calling .mockReset() on every 780 | * mocked function. 781 | */ 782 | resetAllMocks(): JestObjectType, 783 | /** 784 | * Restores all mocks back to their original value. 785 | */ 786 | restoreAllMocks(): JestObjectType, 787 | /** 788 | * Removes any pending timers from the timer system. 789 | */ 790 | clearAllTimers(): void, 791 | /** 792 | * Returns the number of fake timers still left to run. 793 | */ 794 | getTimerCount(): number, 795 | /** 796 | * The same as `mock` but not moved to the top of the expectation by 797 | * babel-jest. 798 | */ 799 | doMock(moduleName: string, moduleFactory?: any): JestObjectType, 800 | /** 801 | * The same as `unmock` but not moved to the top of the expectation by 802 | * babel-jest. 803 | */ 804 | dontMock(moduleName: string): JestObjectType, 805 | /** 806 | * Returns a new, unused mock function. Optionally takes a mock 807 | * implementation. 808 | */ 809 | fn, TReturn>( 810 | implementation?: (...args: TArguments) => TReturn 811 | ): JestMockFn, 812 | /** 813 | * Determines if the given function is a mocked function. 814 | */ 815 | isMockFunction(fn: Function): boolean, 816 | /** 817 | * Given the name of a module, use the automatic mocking system to generate a 818 | * mocked version of the module for you. 819 | */ 820 | genMockFromModule(moduleName: string): any, 821 | /** 822 | * Mocks a module with an auto-mocked version when it is being required. 823 | * 824 | * The second argument can be used to specify an explicit module factory that 825 | * is being run instead of using Jest's automocking feature. 826 | * 827 | * The third argument can be used to create virtual mocks -- mocks of modules 828 | * that don't exist anywhere in the system. 829 | */ 830 | mock( 831 | moduleName: string, 832 | moduleFactory?: any, 833 | options?: Object 834 | ): JestObjectType, 835 | /** 836 | * Returns the actual module instead of a mock, bypassing all checks on 837 | * whether the module should receive a mock implementation or not. 838 | */ 839 | requireActual(moduleName: string): any, 840 | /** 841 | * Returns a mock module instead of the actual module, bypassing all checks 842 | * on whether the module should be required normally or not. 843 | */ 844 | requireMock(moduleName: string): any, 845 | /** 846 | * Resets the module registry - the cache of all required modules. This is 847 | * useful to isolate modules where local state might conflict between tests. 848 | */ 849 | resetModules(): JestObjectType, 850 | 851 | /** 852 | * Creates a sandbox registry for the modules that are loaded inside the 853 | * callback function. This is useful to isolate specific modules for every 854 | * test so that local module state doesn't conflict between tests. 855 | */ 856 | isolateModules(fn: () => void): JestObjectType, 857 | 858 | /** 859 | * Exhausts the micro-task queue (usually interfaced in node via 860 | * process.nextTick). 861 | */ 862 | runAllTicks(): void, 863 | /** 864 | * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), 865 | * setInterval(), and setImmediate()). 866 | */ 867 | runAllTimers(): void, 868 | /** 869 | * Exhausts all tasks queued by setImmediate(). 870 | */ 871 | runAllImmediates(): void, 872 | /** 873 | * Executes only the macro task queue (i.e. all tasks queued by setTimeout() 874 | * or setInterval() and setImmediate()). 875 | */ 876 | advanceTimersByTime(msToRun: number): void, 877 | /** 878 | * Executes only the macro task queue (i.e. all tasks queued by setTimeout() 879 | * or setInterval() and setImmediate()). 880 | * 881 | * Renamed to `advanceTimersByTime`. 882 | */ 883 | runTimersToTime(msToRun: number): void, 884 | /** 885 | * Executes only the macro-tasks that are currently pending (i.e., only the 886 | * tasks that have been queued by setTimeout() or setInterval() up to this 887 | * point) 888 | */ 889 | runOnlyPendingTimers(): void, 890 | /** 891 | * Explicitly supplies the mock object that the module system should return 892 | * for the specified module. Note: It is recommended to use jest.mock() 893 | * instead. 894 | */ 895 | setMock(moduleName: string, moduleExports: any): JestObjectType, 896 | /** 897 | * Indicates that the module system should never return a mocked version of 898 | * the specified module from require() (e.g. that it should always return the 899 | * real module). 900 | */ 901 | unmock(moduleName: string): JestObjectType, 902 | /** 903 | * Instructs Jest to use fake versions of the standard timer functions 904 | * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, 905 | * setImmediate and clearImmediate). 906 | */ 907 | useFakeTimers(): JestObjectType, 908 | /** 909 | * Instructs Jest to use the real versions of the standard timer functions. 910 | */ 911 | useRealTimers(): JestObjectType, 912 | /** 913 | * Creates a mock function similar to jest.fn but also tracks calls to 914 | * object[methodName]. 915 | */ 916 | spyOn( 917 | object: Object, 918 | methodName: string, 919 | accessType?: 'get' | 'set' 920 | ): JestMockFn, 921 | /** 922 | * Set the default timeout interval for tests and before/after hooks in milliseconds. 923 | * Note: The default timeout interval is 5 seconds if this method is not called. 924 | */ 925 | setTimeout(timeout: number): JestObjectType, 926 | }; 927 | 928 | type JestSpyType = { 929 | calls: JestCallsType, 930 | }; 931 | 932 | /** Runs this function after every test inside this context */ 933 | declare function afterEach( 934 | fn: (done: () => void) => ?Promise, 935 | timeout?: number 936 | ): void; 937 | /** Runs this function before every test inside this context */ 938 | declare function beforeEach( 939 | fn: (done: () => void) => ?Promise, 940 | timeout?: number 941 | ): void; 942 | /** Runs this function after all tests have finished inside this context */ 943 | declare function afterAll( 944 | fn: (done: () => void) => ?Promise, 945 | timeout?: number 946 | ): void; 947 | /** Runs this function before any tests have started inside this context */ 948 | declare function beforeAll( 949 | fn: (done: () => void) => ?Promise, 950 | timeout?: number 951 | ): void; 952 | 953 | /** A context for grouping tests together */ 954 | declare var describe: { 955 | /** 956 | * Creates a block that groups together several related tests in one "test suite" 957 | */ 958 | (name: JestTestName, fn: () => void): void, 959 | 960 | /** 961 | * Only run this describe block 962 | */ 963 | only(name: JestTestName, fn: () => void): void, 964 | 965 | /** 966 | * Skip running this describe block 967 | */ 968 | skip(name: JestTestName, fn: () => void): void, 969 | 970 | /** 971 | * each runs this test against array of argument arrays per each run 972 | * 973 | * @param {table} table of Test 974 | */ 975 | each( 976 | ...table: Array | mixed> | [Array, string] 977 | ): ( 978 | name: JestTestName, 979 | fn?: (...args: Array) => ?Promise, 980 | timeout?: number 981 | ) => void, 982 | }; 983 | 984 | /** An individual test unit */ 985 | declare var it: { 986 | /** 987 | * An individual test unit 988 | * 989 | * @param {JestTestName} Name of Test 990 | * @param {Function} Test 991 | * @param {number} Timeout for the test, in milliseconds. 992 | */ 993 | ( 994 | name: JestTestName, 995 | fn?: (done: () => void) => ?Promise, 996 | timeout?: number 997 | ): void, 998 | 999 | /** 1000 | * Only run this test 1001 | * 1002 | * @param {JestTestName} Name of Test 1003 | * @param {Function} Test 1004 | * @param {number} Timeout for the test, in milliseconds. 1005 | */ 1006 | only( 1007 | name: JestTestName, 1008 | fn?: (done: () => void) => ?Promise, 1009 | timeout?: number 1010 | ): { 1011 | each( 1012 | ...table: Array | mixed> | [Array, string] 1013 | ): ( 1014 | name: JestTestName, 1015 | fn?: (...args: Array) => ?Promise, 1016 | timeout?: number 1017 | ) => void, 1018 | }, 1019 | 1020 | /** 1021 | * Skip running this test 1022 | * 1023 | * @param {JestTestName} Name of Test 1024 | * @param {Function} Test 1025 | * @param {number} Timeout for the test, in milliseconds. 1026 | */ 1027 | skip( 1028 | name: JestTestName, 1029 | fn?: (done: () => void) => ?Promise, 1030 | timeout?: number 1031 | ): void, 1032 | 1033 | /** 1034 | * Highlight planned tests in the summary output 1035 | * 1036 | * @param {String} Name of Test to do 1037 | */ 1038 | todo(name: string): void, 1039 | 1040 | /** 1041 | * Run the test concurrently 1042 | * 1043 | * @param {JestTestName} Name of Test 1044 | * @param {Function} Test 1045 | * @param {number} Timeout for the test, in milliseconds. 1046 | */ 1047 | concurrent( 1048 | name: JestTestName, 1049 | fn?: (done: () => void) => ?Promise, 1050 | timeout?: number 1051 | ): void, 1052 | 1053 | /** 1054 | * each runs this test against array of argument arrays per each run 1055 | * 1056 | * @param {table} table of Test 1057 | */ 1058 | each( 1059 | ...table: Array | mixed> | [Array, string] 1060 | ): ( 1061 | name: JestTestName, 1062 | fn?: (...args: Array) => ?Promise, 1063 | timeout?: number 1064 | ) => void, 1065 | }; 1066 | 1067 | declare function fit( 1068 | name: JestTestName, 1069 | fn: (done: () => void) => ?Promise, 1070 | timeout?: number 1071 | ): void; 1072 | /** An individual test unit */ 1073 | declare var test: typeof it; 1074 | /** A disabled group of tests */ 1075 | declare var xdescribe: typeof describe; 1076 | /** A focused group of tests */ 1077 | declare var fdescribe: typeof describe; 1078 | /** A disabled individual test */ 1079 | declare var xit: typeof it; 1080 | /** A disabled individual test */ 1081 | declare var xtest: typeof it; 1082 | 1083 | type JestPrettyFormatColors = { 1084 | comment: { close: string, open: string }, 1085 | content: { close: string, open: string }, 1086 | prop: { close: string, open: string }, 1087 | tag: { close: string, open: string }, 1088 | value: { close: string, open: string }, 1089 | }; 1090 | 1091 | type JestPrettyFormatIndent = string => string; 1092 | type JestPrettyFormatRefs = Array; 1093 | type JestPrettyFormatPrint = any => string; 1094 | type JestPrettyFormatStringOrNull = string | null; 1095 | 1096 | type JestPrettyFormatOptions = {| 1097 | callToJSON: boolean, 1098 | edgeSpacing: string, 1099 | escapeRegex: boolean, 1100 | highlight: boolean, 1101 | indent: number, 1102 | maxDepth: number, 1103 | min: boolean, 1104 | plugins: JestPrettyFormatPlugins, 1105 | printFunctionName: boolean, 1106 | spacing: string, 1107 | theme: {| 1108 | comment: string, 1109 | content: string, 1110 | prop: string, 1111 | tag: string, 1112 | value: string, 1113 | |}, 1114 | |}; 1115 | 1116 | type JestPrettyFormatPlugin = { 1117 | print: ( 1118 | val: any, 1119 | serialize: JestPrettyFormatPrint, 1120 | indent: JestPrettyFormatIndent, 1121 | opts: JestPrettyFormatOptions, 1122 | colors: JestPrettyFormatColors 1123 | ) => string, 1124 | test: any => boolean, 1125 | }; 1126 | 1127 | type JestPrettyFormatPlugins = Array; 1128 | 1129 | /** The expect function is used every time you want to test a value */ 1130 | declare var expect: { 1131 | /** The object that you want to make assertions against */ 1132 | ( 1133 | value: any 1134 | ): JestExpectType & 1135 | JestPromiseType & 1136 | EnzymeMatchersType & 1137 | DomTestingLibraryType & 1138 | JestJQueryMatchersType & 1139 | JestStyledComponentsMatchersType & 1140 | JestExtendedMatchersType, 1141 | 1142 | /** Add additional Jasmine matchers to Jest's roster */ 1143 | extend(matchers: { [name: string]: JestMatcher }): void, 1144 | /** Add a module that formats application-specific data structures. */ 1145 | addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void, 1146 | assertions(expectedAssertions: number): void, 1147 | hasAssertions(): void, 1148 | any(value: mixed): JestAsymmetricEqualityType, 1149 | anything(): any, 1150 | arrayContaining(value: Array): Array, 1151 | objectContaining(value: Object): Object, 1152 | /** Matches any received string that contains the exact expected string. */ 1153 | stringContaining(value: string): string, 1154 | stringMatching(value: string | RegExp): string, 1155 | not: { 1156 | arrayContaining: (value: $ReadOnlyArray) => Array, 1157 | objectContaining: (value: {}) => Object, 1158 | stringContaining: (value: string) => string, 1159 | stringMatching: (value: string | RegExp) => string, 1160 | }, 1161 | }; 1162 | 1163 | // TODO handle return type 1164 | // http://jasmine.github.io/2.4/introduction.html#section-Spies 1165 | declare function spyOn(value: mixed, method: string): Object; 1166 | 1167 | /** Holds all functions related to manipulating test runner */ 1168 | declare var jest: JestObjectType; 1169 | 1170 | /** 1171 | * The global Jasmine object, this is generally not exposed as the public API, 1172 | * using features inside here could break in later versions of Jest. 1173 | */ 1174 | declare var jasmine: { 1175 | DEFAULT_TIMEOUT_INTERVAL: number, 1176 | any(value: mixed): JestAsymmetricEqualityType, 1177 | anything(): any, 1178 | arrayContaining(value: Array): Array, 1179 | clock(): JestClockType, 1180 | createSpy(name: string): JestSpyType, 1181 | createSpyObj( 1182 | baseName: string, 1183 | methodNames: Array 1184 | ): { [methodName: string]: JestSpyType }, 1185 | objectContaining(value: Object): Object, 1186 | stringMatching(value: string): string, 1187 | }; 1188 | -------------------------------------------------------------------------------- /flow-typed/npm/prettier_v1.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 066c92e9ccb5f0711df8d73cbca837d6 2 | // flow-typed version: 9e32affdbd/prettier_v1.x.x/flow_>=v0.56.x 3 | 4 | declare module "prettier" { 5 | declare export type AST = Object; 6 | declare export type Doc = Object; 7 | declare export type FastPath = Object; 8 | 9 | declare export type PrettierParserName = 10 | | "babylon" 11 | | "flow" 12 | | "typescript" 13 | | "postcss" 14 | | "css" 15 | | "less" 16 | | "scss" 17 | | "json" 18 | | "graphql" 19 | | "markdown" 20 | | "vue"; 21 | 22 | declare export type PrettierParser = { 23 | [name: PrettierParserName]: (text: string, options?: Object) => AST 24 | }; 25 | 26 | declare export type CustomParser = ( 27 | text: string, 28 | parsers: PrettierParser, 29 | options: Options 30 | ) => AST; 31 | 32 | declare export type Options = {| 33 | printWidth?: number, 34 | tabWidth?: number, 35 | useTabs?: boolean, 36 | semi?: boolean, 37 | singleQuote?: boolean, 38 | trailingComma?: "none" | "es5" | "all", 39 | bracketSpacing?: boolean, 40 | jsxBracketSameLine?: boolean, 41 | arrowParens?: "avoid" | "always", 42 | rangeStart?: number, 43 | rangeEnd?: number, 44 | parser?: PrettierParserName | CustomParser, 45 | filepath?: string, 46 | requirePragma?: boolean, 47 | insertPragma?: boolean, 48 | proseWrap?: "always" | "never" | "preserve", 49 | plugins?: Array 50 | |}; 51 | 52 | declare export type Plugin = { 53 | languages: SupportLanguage, 54 | parsers: { [parserName: string]: Parser }, 55 | printers: { [astFormat: string]: Printer } 56 | }; 57 | 58 | declare export type Parser = { 59 | parse: ( 60 | text: string, 61 | parsers: { [parserName: string]: Parser }, 62 | options: Object 63 | ) => AST, 64 | astFormat: string 65 | }; 66 | 67 | declare export type Printer = { 68 | print: ( 69 | path: FastPath, 70 | options: Object, 71 | print: (path: FastPath) => Doc 72 | ) => Doc, 73 | embed: ( 74 | path: FastPath, 75 | print: (path: FastPath) => Doc, 76 | textToDoc: (text: string, options: Object) => Doc, 77 | options: Object 78 | ) => ?Doc 79 | }; 80 | 81 | declare export type CursorOptions = {| 82 | cursorOffset: number, 83 | printWidth?: $PropertyType, 84 | tabWidth?: $PropertyType, 85 | useTabs?: $PropertyType, 86 | semi?: $PropertyType, 87 | singleQuote?: $PropertyType, 88 | trailingComma?: $PropertyType, 89 | bracketSpacing?: $PropertyType, 90 | jsxBracketSameLine?: $PropertyType, 91 | arrowParens?: $PropertyType, 92 | parser?: $PropertyType, 93 | filepath?: $PropertyType, 94 | requirePragma?: $PropertyType, 95 | insertPragma?: $PropertyType, 96 | proseWrap?: $PropertyType, 97 | plugins?: $PropertyType 98 | |}; 99 | 100 | declare export type CursorResult = {| 101 | formatted: string, 102 | cursorOffset: number 103 | |}; 104 | 105 | declare export type ResolveConfigOptions = {| 106 | useCache?: boolean, 107 | config?: string, 108 | editorconfig?: boolean 109 | |}; 110 | 111 | declare export type SupportLanguage = { 112 | name: string, 113 | since: string, 114 | parsers: Array, 115 | group?: string, 116 | tmScope: string, 117 | aceMode: string, 118 | codemirrorMode: string, 119 | codemirrorMimeType: string, 120 | aliases?: Array, 121 | extensions: Array, 122 | filenames?: Array, 123 | linguistLanguageId: number, 124 | vscodeLanguageIds: Array 125 | }; 126 | 127 | declare export type SupportOption = {| 128 | since: string, 129 | type: "int" | "boolean" | "choice" | "path", 130 | deprecated?: string, 131 | redirect?: SupportOptionRedirect, 132 | description: string, 133 | oppositeDescription?: string, 134 | default: SupportOptionValue, 135 | range?: SupportOptionRange, 136 | choices?: SupportOptionChoice 137 | |}; 138 | 139 | declare export type SupportOptionRedirect = {| 140 | options: string, 141 | value: SupportOptionValue 142 | |}; 143 | 144 | declare export type SupportOptionRange = {| 145 | start: number, 146 | end: number, 147 | step: number 148 | |}; 149 | 150 | declare export type SupportOptionChoice = {| 151 | value: boolean | string, 152 | description?: string, 153 | since?: string, 154 | deprecated?: string, 155 | redirect?: SupportOptionValue 156 | |}; 157 | 158 | declare export type SupportOptionValue = number | boolean | string; 159 | 160 | declare export type SupportInfo = {| 161 | languages: Array, 162 | options: Array 163 | |}; 164 | 165 | declare export type Prettier = {| 166 | format: (source: string, options?: Options) => string, 167 | check: (source: string, options?: Options) => boolean, 168 | formatWithCursor: (source: string, options: CursorOptions) => CursorResult, 169 | resolveConfig: { 170 | (filePath: string, options?: ResolveConfigOptions): Promise, 171 | sync(filePath: string, options?: ResolveConfigOptions): ?Options 172 | }, 173 | clearConfigCache: () => void, 174 | getSupportInfo: (version?: string) => SupportInfo 175 | |}; 176 | 177 | declare export default Prettier; 178 | } 179 | -------------------------------------------------------------------------------- /flow-typed/npm/rimraf_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1dff23447d5e18f5ac2b05aaec7cfb74 2 | // flow-typed version: a453e98ea2/rimraf_v2.x.x/flow_>=v0.25.0 3 | 4 | declare module 'rimraf' { 5 | declare type Options = { 6 | maxBusyTries?: number, 7 | emfileWait?: number, 8 | glob?: boolean, 9 | disableGlob?: boolean 10 | }; 11 | 12 | declare type Callback = (err: ?Error, path: ?string) => void; 13 | 14 | declare module.exports: { 15 | (f: string, opts?: Options | Callback, callback?: Callback): void; 16 | sync(path: string, opts?: Options): void; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /flow-typed/npm/semantic-release_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a1459bdded882176c3753c48c6b468ca 2 | // flow-typed version: <>/semantic-release_v^15.13.12/flow_v0.100.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'semantic-release' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'semantic-release' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'semantic-release/bin/semantic-release' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'semantic-release/cli' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'semantic-release/lib/definitions/constants' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'semantic-release/lib/definitions/errors' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'semantic-release/lib/definitions/plugins' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'semantic-release/lib/get-commits' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'semantic-release/lib/get-config' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'semantic-release/lib/get-error' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'semantic-release/lib/get-git-auth-url' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'semantic-release/lib/get-last-release' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'semantic-release/lib/get-logger' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'semantic-release/lib/get-next-version' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'semantic-release/lib/git' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'semantic-release/lib/hide-sensitive' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'semantic-release/lib/plugins/index' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'semantic-release/lib/plugins/normalize' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'semantic-release/lib/plugins/pipeline' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'semantic-release/lib/plugins/utils' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'semantic-release/lib/utils' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'semantic-release/lib/verify' { 102 | declare module.exports: any; 103 | } 104 | 105 | // Filename aliases 106 | declare module 'semantic-release/bin/semantic-release.js' { 107 | declare module.exports: $Exports<'semantic-release/bin/semantic-release'>; 108 | } 109 | declare module 'semantic-release/cli.js' { 110 | declare module.exports: $Exports<'semantic-release/cli'>; 111 | } 112 | declare module 'semantic-release/index' { 113 | declare module.exports: $Exports<'semantic-release'>; 114 | } 115 | declare module 'semantic-release/index.js' { 116 | declare module.exports: $Exports<'semantic-release'>; 117 | } 118 | declare module 'semantic-release/lib/definitions/constants.js' { 119 | declare module.exports: $Exports<'semantic-release/lib/definitions/constants'>; 120 | } 121 | declare module 'semantic-release/lib/definitions/errors.js' { 122 | declare module.exports: $Exports<'semantic-release/lib/definitions/errors'>; 123 | } 124 | declare module 'semantic-release/lib/definitions/plugins.js' { 125 | declare module.exports: $Exports<'semantic-release/lib/definitions/plugins'>; 126 | } 127 | declare module 'semantic-release/lib/get-commits.js' { 128 | declare module.exports: $Exports<'semantic-release/lib/get-commits'>; 129 | } 130 | declare module 'semantic-release/lib/get-config.js' { 131 | declare module.exports: $Exports<'semantic-release/lib/get-config'>; 132 | } 133 | declare module 'semantic-release/lib/get-error.js' { 134 | declare module.exports: $Exports<'semantic-release/lib/get-error'>; 135 | } 136 | declare module 'semantic-release/lib/get-git-auth-url.js' { 137 | declare module.exports: $Exports<'semantic-release/lib/get-git-auth-url'>; 138 | } 139 | declare module 'semantic-release/lib/get-last-release.js' { 140 | declare module.exports: $Exports<'semantic-release/lib/get-last-release'>; 141 | } 142 | declare module 'semantic-release/lib/get-logger.js' { 143 | declare module.exports: $Exports<'semantic-release/lib/get-logger'>; 144 | } 145 | declare module 'semantic-release/lib/get-next-version.js' { 146 | declare module.exports: $Exports<'semantic-release/lib/get-next-version'>; 147 | } 148 | declare module 'semantic-release/lib/git.js' { 149 | declare module.exports: $Exports<'semantic-release/lib/git'>; 150 | } 151 | declare module 'semantic-release/lib/hide-sensitive.js' { 152 | declare module.exports: $Exports<'semantic-release/lib/hide-sensitive'>; 153 | } 154 | declare module 'semantic-release/lib/plugins/index.js' { 155 | declare module.exports: $Exports<'semantic-release/lib/plugins/index'>; 156 | } 157 | declare module 'semantic-release/lib/plugins/normalize.js' { 158 | declare module.exports: $Exports<'semantic-release/lib/plugins/normalize'>; 159 | } 160 | declare module 'semantic-release/lib/plugins/pipeline.js' { 161 | declare module.exports: $Exports<'semantic-release/lib/plugins/pipeline'>; 162 | } 163 | declare module 'semantic-release/lib/plugins/utils.js' { 164 | declare module.exports: $Exports<'semantic-release/lib/plugins/utils'>; 165 | } 166 | declare module 'semantic-release/lib/utils.js' { 167 | declare module.exports: $Exports<'semantic-release/lib/utils'>; 168 | } 169 | declare module 'semantic-release/lib/verify.js' { 170 | declare module.exports: $Exports<'semantic-release/lib/verify'>; 171 | } 172 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['/src'], 3 | testMatch: ['**/__tests__/**/*-test.(ts|js)'], 4 | testEnvironment: 'node', 5 | }; 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "graphql-compose-relay", 3 | "version": "0.0.0-semantically-released", 4 | "description": "Plugin for `graphql-compose` which wraps graphql types with Relay specific logic.", 5 | "files": [ 6 | "lib", 7 | "mjs" 8 | ], 9 | "main": "lib/index.js", 10 | "module": "mjs/index.mjs", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/graphql-compose/graphql-compose-relay.git" 14 | }, 15 | "keywords": [ 16 | "graphql", 17 | "compose", 18 | "graphql-compose", 19 | "relay" 20 | ], 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/graphql-compose/graphql-compose-relay/issues" 24 | }, 25 | "homepage": "https://github.com/graphql-compose/graphql-compose-relay", 26 | "peerDependencies": { 27 | "graphql-compose": "^7.0.4" 28 | }, 29 | "devDependencies": { 30 | "@babel/cli": "7.8.4", 31 | "@babel/core": "7.9.0", 32 | "@babel/plugin-proposal-object-rest-spread": "7.9.0", 33 | "@babel/plugin-transform-flow-strip-types": "7.9.0", 34 | "@babel/plugin-transform-runtime": "7.9.0", 35 | "@babel/preset-env": "7.9.0", 36 | "@babel/preset-flow": "7.9.0", 37 | "babel-core": "^7.0.0-bridge.0", 38 | "babel-eslint": "10.1.0", 39 | "babel-jest": "25.2.6", 40 | "eslint": "6.8.0", 41 | "eslint-config-airbnb-base": "14.1.0", 42 | "eslint-config-prettier": "6.10.1", 43 | "eslint-plugin-flowtype": "4.7.0", 44 | "eslint-plugin-import": "2.20.2", 45 | "eslint-plugin-prettier": "3.1.2", 46 | "flow-bin": "0.122.0", 47 | "graphql": "15.0.0", 48 | "graphql-compose": "7.14.1", 49 | "jest": "25.2.7", 50 | "prettier": "2.0.2", 51 | "rimraf": "3.0.2", 52 | "semantic-release": "17.0.4" 53 | }, 54 | "scripts": { 55 | "build": "npm run build-cjs && npm run build-mjs", 56 | "build-cjs": "rimraf lib && BABEL_ENV=cjs babel src --ignore __tests__,__mocks__ -d lib && COPY_TO_FOLDER=lib npm run build-flow", 57 | "build-mjs": "rimraf mjs && BABEL_ENV=mjs babel src --ignore __tests__,__mocks__ -d mjs && yarn build-mjs-rename && COPY_TO_FOLDER=mjs npm run build-flow", 58 | "build-mjs-rename": "find ./mjs -name \"*.js\" -exec bash -c 'mv \"$1\" \"${1%.js}\".mjs' - '{}' \\;", 59 | "build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\/src\\//\\//g'`.flow; done", 60 | "watch": "jest --watch", 61 | "coverage": "jest --coverage", 62 | "lint": "eslint --ext .js ./src", 63 | "flow": "./node_modules/.bin/flow", 64 | "test": "npm run coverage && npm run lint && npm run flow", 65 | "link": "yarn build && yarn link graphql-compose && yarn link", 66 | "unlink": "rimraf node_modules && yarn install", 67 | "semantic-release": "semantic-release" 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/__mocks__/userTC.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { schemaComposer } from 'graphql-compose'; 4 | import { 5 | GraphQLString, 6 | GraphQLObjectType, 7 | GraphQLInputObjectType, 8 | GraphQLNonNull, 9 | GraphQLInt, 10 | } from 'graphql-compose/lib/graphql'; 11 | 12 | export const UserType = new GraphQLObjectType({ 13 | name: 'User', 14 | fields: { 15 | id: { 16 | type: GraphQLInt, 17 | }, 18 | name: { 19 | type: GraphQLString, 20 | }, 21 | nickname: { 22 | type: GraphQLString, 23 | }, 24 | }, 25 | }); 26 | 27 | export const userTC = schemaComposer.createObjectTC(UserType); 28 | userTC.setRecordIdFn((obj) => obj.id); 29 | 30 | export const findByIdResolver = schemaComposer.createResolver({ 31 | name: 'findById', 32 | kind: 'query', 33 | type: UserType, 34 | args: { 35 | _id: { 36 | name: '_id', 37 | type: new GraphQLNonNull(GraphQLInt), 38 | }, 39 | }, 40 | resolve: (resolveParams) => { 41 | const args = resolveParams.args || {}; 42 | if (args._id.toString() === '1') { 43 | return Promise.resolve({ 44 | id: 1, 45 | name: 'Pavel', 46 | nickname: '@nodkz', 47 | }); 48 | } 49 | if (args._id.toString() === '2') { 50 | return Promise.resolve({ 51 | id: 2, 52 | name: 'Lee', 53 | nickname: '@leeb', 54 | }); 55 | } 56 | return Promise.resolve(null); 57 | }, 58 | }); 59 | userTC.setResolver('findById', findByIdResolver); 60 | 61 | export const createOneResolver = schemaComposer.createResolver({ 62 | name: 'createOne', 63 | kind: 'mutation', 64 | type: new GraphQLObjectType({ 65 | name: 'UserPayload', 66 | fields: { 67 | record: { 68 | type: UserType, 69 | }, 70 | }, 71 | }), 72 | args: { 73 | input: { 74 | name: 'input', 75 | type: new GraphQLInputObjectType({ 76 | name: 'UserInput', 77 | fields: { 78 | name: { 79 | type: GraphQLString, 80 | }, 81 | }, 82 | }), 83 | }, 84 | }, 85 | resolve: (resolveParams) => { 86 | return Promise.resolve({ 87 | recordId: resolveParams.args.input.id, 88 | record: (resolveParams.args && resolveParams.args.input) || {}, 89 | }); 90 | }, 91 | }); 92 | userTC.setResolver('createOne', createOneResolver); 93 | 94 | export const manyArgsWithInputResolver = schemaComposer.createResolver({ 95 | name: 'manyArgsWithInput', 96 | kind: 'mutation', 97 | type: new GraphQLObjectType({ 98 | name: 'UserPayload', 99 | fields: { 100 | record: { 101 | type: UserType, 102 | }, 103 | }, 104 | }), 105 | args: { 106 | input: { 107 | name: 'input', 108 | type: new GraphQLInputObjectType({ 109 | name: 'UserInput', 110 | fields: { 111 | name: { 112 | type: GraphQLString, 113 | }, 114 | }, 115 | }), 116 | }, 117 | sort: { 118 | name: 'sort', 119 | type: GraphQLString, 120 | }, 121 | limit: { 122 | name: 'limit', 123 | type: GraphQLInt, 124 | }, 125 | }, 126 | resolve: (resolveParams) => { 127 | return Promise.resolve({ 128 | recordId: resolveParams.args.input.id, 129 | record: (resolveParams.args && resolveParams.args.input) || {}, 130 | }); 131 | }, 132 | }); 133 | userTC.setResolver('manyArgsWithInput', manyArgsWithInputResolver); 134 | 135 | export const manyArgsWithoutInputResolver = schemaComposer.createResolver({ 136 | name: 'manyArgsWithoutInput', 137 | kind: 'mutation', 138 | type: new GraphQLObjectType({ 139 | name: 'UserPayload', 140 | fields: { 141 | record: { 142 | type: UserType, 143 | }, 144 | }, 145 | }), 146 | args: { 147 | sort: { 148 | name: 'sort', 149 | type: GraphQLString, 150 | }, 151 | limit: { 152 | name: 'limit', 153 | type: GraphQLInt, 154 | }, 155 | }, 156 | resolve: (resolveParams) => { 157 | return Promise.resolve({ 158 | recordId: resolveParams.args.input.id, 159 | record: (resolveParams.args && resolveParams.args.input) || {}, 160 | }); 161 | }, 162 | }); 163 | userTC.setResolver('manyArgsWithoutInput', manyArgsWithoutInputResolver); 164 | -------------------------------------------------------------------------------- /src/__tests__/composeWithRelay-test.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { ObjectTypeComposer, schemaComposer } from 'graphql-compose'; 4 | import { 5 | GraphQLInterfaceType, 6 | GraphQLSchema, 7 | GraphQLNonNull, 8 | graphql, 9 | } from 'graphql-compose/lib/graphql'; 10 | import { composeWithRelay } from '../composeWithRelay'; 11 | import { userTC } from '../__mocks__/userTC'; 12 | import { toGlobalId } from '../globalId'; 13 | 14 | describe('composeWithRelay', () => { 15 | const userComposer = composeWithRelay(userTC); 16 | const queryTC = composeWithRelay(schemaComposer.Query); 17 | const mutationTC = composeWithRelay(schemaComposer.Mutation); 18 | 19 | describe('basic checks', () => { 20 | it('should return ObjectTypeComposer', () => { 21 | expect(userComposer).toBeInstanceOf(ObjectTypeComposer); 22 | }); 23 | 24 | it('should throw error if got a not ObjectTypeComposer', () => { 25 | expect(() => composeWithRelay((123: any))).toThrowError( 26 | 'should provide ObjectTypeComposer instance' 27 | ); 28 | }); 29 | 30 | it('should throw error if ObjectTypeComposer without recordIdFn', () => { 31 | const tc = userTC.clone('AnotherUserType2'); 32 | delete tc._gqcGetRecordIdFn; 33 | expect(() => composeWithRelay(tc)).toThrowError('should have recordIdFn'); 34 | }); 35 | 36 | it('should thow error if typeComposer does not have findById resolver', () => { 37 | const tc = userTC.clone('AnotherUserType'); 38 | tc.removeResolver('findById'); 39 | expect(() => composeWithRelay(tc)).toThrowError( 40 | "does not have resolver with name 'findById'" 41 | ); 42 | }); 43 | }); 44 | 45 | describe('when pass RootQuery type composer', () => { 46 | it('should add `node` field to RootQuery', () => { 47 | const nodeField: any = queryTC.getField('node'); 48 | expect(nodeField.type.getType()).toBeInstanceOf(GraphQLInterfaceType); 49 | expect(nodeField.type.getTypeName()).toBe('Node'); 50 | }); 51 | }); 52 | 53 | describe('when pass User type composer (not RootQuery)', () => { 54 | it('should add or override id field', () => { 55 | const idField = userComposer.getFieldConfig('id'); 56 | expect(idField.description).toContain('globally unique ID'); 57 | }); 58 | 59 | it('should make id field NonNull', () => { 60 | const idField = userComposer.getFieldConfig('id'); 61 | expect(idField.type).toBeInstanceOf(GraphQLNonNull); 62 | }); 63 | 64 | it('should resolve globalId in `user.id` field', async () => { 65 | queryTC.setField('user', userTC.getResolver('findById')); 66 | const schema = new GraphQLSchema({ 67 | query: queryTC.getType(), 68 | }); 69 | const query = `{ 70 | user(_id: 1) { 71 | id 72 | name 73 | } 74 | }`; 75 | const result: any = await graphql(schema, query); 76 | expect(result.data.user.id).toBe(toGlobalId('User', 1)); 77 | expect(result.data.user.name).toBe('Pavel'); 78 | }); 79 | 80 | it('should resolve globalId in `node.id` field', async () => { 81 | queryTC.setField('user', userTC.getResolver('findById')); 82 | const schema = new GraphQLSchema({ 83 | query: queryTC.getType(), 84 | }); 85 | const query = `{ 86 | node(id: "${toGlobalId('User', 1)}") { 87 | ...user 88 | } 89 | } 90 | fragment user on User { 91 | id 92 | name 93 | }`; 94 | const result: any = await graphql(schema, query); 95 | expect(result.data.node.id).toBe(toGlobalId('User', 1)); 96 | expect(result.data.node.name).toBe('Pavel'); 97 | }); 98 | 99 | it('should passthru clientMutationId in mutations', async () => { 100 | mutationTC.setField('createUser', userTC.getResolver('createOne')); 101 | const schema = new GraphQLSchema({ 102 | query: queryTC.getType(), 103 | mutation: mutationTC.getType(), 104 | }); 105 | const query = `mutation { 106 | createUser(input: { name: "Ok", clientMutationId: "123" }) { 107 | record { 108 | name 109 | } 110 | clientMutationId 111 | } 112 | }`; 113 | const result: any = await graphql(schema, query); 114 | expect(result.data.createUser.record.name).toBe('Ok'); 115 | expect(result.data.createUser.clientMutationId).toBe('123'); 116 | }); 117 | }); 118 | }); 119 | -------------------------------------------------------------------------------- /src/__tests__/globalId-test.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { base64, unbase64, toGlobalId, fromGlobalId } from '../globalId'; 4 | 5 | describe('globalId', () => { 6 | it('should have correct method base64()', () => { 7 | expect(base64('123')).toBe('MTIz'); 8 | expect(base64('lksdnfkksdknsdc:123')).toBe('bGtzZG5ma2tzZGtuc2RjOjEyMw=='); 9 | }); 10 | 11 | it('should have correct method unbase64()', () => { 12 | expect(unbase64('MTIz')).toBe('123'); 13 | expect(unbase64('bGtzZG5ma2tzZGtuc2RjOjEyMw==')).toBe('lksdnfkksdknsdc:123'); 14 | }); 15 | 16 | it('should have correct method toGlobalId()', () => { 17 | expect(toGlobalId('User', '789')).toBe('VXNlcjo3ODk='); 18 | expect(toGlobalId('Article', 22)).toBe('QXJ0aWNsZToyMg=='); 19 | }); 20 | 21 | it('should have correct method fromGlobalId()', () => { 22 | expect(fromGlobalId('VXNlcjo3ODk=')).toEqual({ 23 | type: 'User', 24 | id: '789', 25 | }); 26 | expect(fromGlobalId('QXJ0aWNsZToyMg==')).toEqual({ 27 | type: 'Article', 28 | id: '22', 29 | }); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /src/__tests__/nodeFieldConfig-test.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { schemaComposer, InterfaceTypeComposer } from 'graphql-compose'; 4 | import { findByIdResolver, userTC } from '../__mocks__/userTC'; 5 | import { toGlobalId } from '../globalId'; 6 | import { getNodeFieldConfig } from '../nodeFieldConfig'; 7 | import { getNodeInterface } from '../nodeInterface'; 8 | 9 | describe('nodeFieldConfig', () => { 10 | const typeToFindByIdMap = { 11 | User: { 12 | resolver: findByIdResolver, 13 | tc: userTC, 14 | }, 15 | }; 16 | const config: any = getNodeFieldConfig(typeToFindByIdMap, getNodeInterface(schemaComposer)); 17 | 18 | it('should have type GraphQLInterfaceType', () => { 19 | expect(config).toBeTruthy(); 20 | expect(config.type).toBeInstanceOf(InterfaceTypeComposer); 21 | expect(config.type.getTypeName()).toBe('Node'); 22 | }); 23 | 24 | it('should have args with id', () => { 25 | expect(config.args.id.type).toBe('ID!'); 26 | }); 27 | 28 | it('should have resolve function', () => { 29 | expect(config.resolve).toBeDefined(); 30 | expect(config.resolve.call).toBeDefined(); 31 | expect(config.resolve.apply).toBeDefined(); 32 | }); 33 | 34 | it('should return null if args.id not defined', () => { 35 | const source = {}; 36 | const args = {}; 37 | const context = {}; 38 | const info = ({}: any); 39 | expect(config.resolve(source, args, context, info)).toBeNull(); 40 | }); 41 | 42 | it('should return null if findById not defined for type', () => { 43 | const source = {}; 44 | const args = { id: toGlobalId('UnexistedType', 1) }; 45 | const context = {}; 46 | const info = ({}: any); 47 | expect(config.resolve(source, args, context, info)).toBeNull(); 48 | }); 49 | 50 | it('should return Promise if type exists, but id not exist', () => { 51 | const source = {}; 52 | const args = { id: toGlobalId('User', 666) }; 53 | const context = {}; 54 | const info = ({}: any); 55 | expect(config.resolve(source, args, context, info)).toBeInstanceOf(Promise); 56 | }); 57 | 58 | it('should return Promise with user data', async () => { 59 | const source = {}; 60 | const args = { id: toGlobalId('User', 1) }; 61 | const context = {}; 62 | const info = ({}: any); 63 | const res: any = await config.resolve(source, args, context, info); 64 | expect(res.name).toBe('Pavel'); 65 | }); 66 | }); 67 | -------------------------------------------------------------------------------- /src/__tests__/wrapMutationResolver-test.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { composeWithRelay } from '../composeWithRelay'; 4 | import { userTC } from '../__mocks__/userTC'; 5 | import { toGlobalId } from '../globalId'; 6 | 7 | describe('wrapMutationResolver', () => { 8 | composeWithRelay(userTC); 9 | const resolverCreateOne = userTC.getResolver('createOne'); 10 | const resolverWithInput = userTC.getResolver('manyArgsWithInput'); 11 | const resolverWithoutInput = userTC.getResolver('manyArgsWithoutInput'); 12 | 13 | describe('args', () => { 14 | it('should add `clientMutationId` field to args.input', () => { 15 | const itc = resolverCreateOne.getArgITC('input'); 16 | expect(itc.hasField('clientMutationId')).toBe(true); 17 | expect(itc.getFieldTypeName('clientMutationId')).toBe('String'); 18 | }); 19 | 20 | it('should create required args.input! if not exists', () => { 21 | expect(resolverWithoutInput.hasArg('input')).toBeTruthy(); 22 | expect(resolverWithoutInput.isArgNonNull('input')).toBeTruthy(); 23 | }); 24 | 25 | it('should create args.input if not exists and move all args into it', () => { 26 | expect(resolverWithoutInput.hasArg('input')).toBeTruthy(); 27 | const itc = resolverWithoutInput.getArgITC('input'); 28 | expect(itc.hasField('sort')).toBe(true); 29 | expect(itc.hasField('limit')).toBe(true); 30 | expect(itc.hasField('clientMutationId')).toBe(true); 31 | }); 32 | 33 | it('should leave other arg untouched if args.input exists', () => { 34 | expect(resolverWithInput.getArgNames()).toEqual( 35 | expect.arrayContaining(['input', 'sort', 'limit']) 36 | ); 37 | 38 | const itc = resolverWithInput.getArgITC('input'); 39 | expect(itc.hasField('sort')).toBe(false); 40 | expect(itc.hasField('limit')).toBe(false); 41 | expect(itc.hasField('clientMutationId')).toBe(true); 42 | }); 43 | }); 44 | 45 | describe('outputType', () => { 46 | it('should add `clientMutationId` field to payload', () => { 47 | const tc = resolverCreateOne.getOTC(); 48 | expect(tc.hasField('clientMutationId')).toBe(true); 49 | expect(tc.getFieldTypeName('clientMutationId')).toBe('String'); 50 | }); 51 | 52 | it('should add `nodeId` field to payload', () => { 53 | const tc = resolverCreateOne.getOTC(); 54 | expect(tc.hasField('nodeId')).toBe(true); 55 | expect(tc.getFieldTypeName('nodeId')).toBe('ID'); 56 | }); 57 | }); 58 | 59 | describe('resolve', () => { 60 | it('should passthru `clientMutationId`', async () => { 61 | const result = await resolverCreateOne.resolve({ 62 | args: { input: { clientMutationId: '333' } }, 63 | }); 64 | expect(result.clientMutationId).toBe('333'); 65 | }); 66 | 67 | it('should return `nodeId` with globalId', async () => { 68 | const result = await resolverCreateOne.resolve({ args: { input: { id: 'newRecord' } } }); 69 | expect(result.nodeId).toBe(toGlobalId('User', 'newRecord')); 70 | }); 71 | }); 72 | }); 73 | -------------------------------------------------------------------------------- /src/composeWithRelay.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /* eslint-disable no-use-before-define */ 3 | 4 | import { ObjectTypeComposer } from 'graphql-compose'; 5 | import wrapMutationResolver from './wrapMutationResolver'; 6 | import { toGlobalId } from './globalId'; 7 | import { getNodeInterface } from './nodeInterface'; 8 | import { getNodeFieldConfig } from './nodeFieldConfig'; 9 | 10 | // all wrapped typeComposers with Relay, stored in this variable 11 | // for futher type resolving via NodeInterface.resolveType method 12 | export const TypeMapForRelayNode = {}; 13 | 14 | export function composeWithRelay( 15 | tc: ObjectTypeComposer 16 | ): ObjectTypeComposer { 17 | if (!(tc instanceof ObjectTypeComposer)) { 18 | throw new Error('You should provide ObjectTypeComposer instance to composeWithRelay method'); 19 | } 20 | 21 | const nodeInterface = getNodeInterface(tc.schemaComposer); 22 | const nodeFieldConfig = getNodeFieldConfig(TypeMapForRelayNode, nodeInterface); 23 | 24 | if (tc.getTypeName() === 'Query' || tc.getTypeName() === 'RootQuery') { 25 | tc.setField('node', nodeFieldConfig); 26 | return tc; 27 | } 28 | 29 | if (tc.getTypeName() === 'Mutation' || tc.getTypeName() === 'RootMutation') { 30 | // just skip 31 | return tc; 32 | } 33 | 34 | if (!tc.hasRecordIdFn()) { 35 | throw new Error( 36 | `ObjectTypeComposer(${tc.getTypeName()}) should have recordIdFn. ` + 37 | 'This function returns ID from provided object.' 38 | ); 39 | } 40 | 41 | const findById = tc.getResolver('findById'); 42 | if (!findById) { 43 | throw new Error( 44 | `ObjectTypeComposer(${tc.getTypeName()}) provided to composeWithRelay ` + 45 | 'should have findById resolver.' 46 | ); 47 | } 48 | TypeMapForRelayNode[tc.getTypeName()] = { 49 | resolver: findById, 50 | tc, 51 | }; 52 | 53 | tc.addFields({ 54 | id: { 55 | type: 'ID!', 56 | description: 'The globally unique ID among all types', 57 | resolve: (source) => toGlobalId(tc.getTypeName(), tc.getRecordId(source)), 58 | }, 59 | }); 60 | 61 | tc.addInterface(nodeInterface); 62 | 63 | tc.getResolvers().forEach((resolver, resolverName) => { 64 | if (resolver.kind === 'mutation') { 65 | const wrappedResolver = wrapMutationResolver(resolver, { 66 | resolverName, 67 | rootTypeName: tc.getTypeName(), 68 | }); 69 | tc.setResolver(resolverName, wrappedResolver); 70 | } 71 | }); 72 | 73 | return tc; 74 | } 75 | -------------------------------------------------------------------------------- /src/globalId.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export type Base64String = string; 4 | 5 | export type ResolvedGlobalId = { 6 | type: string, 7 | id: string, 8 | }; 9 | 10 | export function base64(i: string): Base64String { 11 | return Buffer.from(i, 'ascii').toString('base64'); 12 | } 13 | 14 | export function unbase64(i: Base64String): string { 15 | return Buffer.from(i, 'base64').toString('ascii'); 16 | } 17 | 18 | /** 19 | * Takes a type name and an ID specific to that type name, and returns a 20 | * "global ID" that is unique among all types. 21 | */ 22 | export function toGlobalId(type: string, id: string | number): string { 23 | return base64([type, id].join(':')); 24 | } 25 | 26 | /** 27 | * Takes the "global ID" created by toGlobalID, and returns the type name and ID 28 | * used to create it. 29 | */ 30 | export function fromGlobalId(globalId: string): ResolvedGlobalId { 31 | const unbasedGlobalId = unbase64(globalId); 32 | const delimiterPos = unbasedGlobalId.indexOf(':'); 33 | return { 34 | type: unbasedGlobalId.substring(0, delimiterPos), 35 | id: unbasedGlobalId.substring(delimiterPos + 1), 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { composeWithRelay, TypeMapForRelayNode } from './composeWithRelay'; 4 | import { fromGlobalId, toGlobalId } from './globalId'; 5 | import { getNodeInterface, NodeInterface } from './nodeInterface'; 6 | 7 | export default composeWithRelay; 8 | export { 9 | composeWithRelay, 10 | getNodeInterface, 11 | TypeMapForRelayNode, 12 | NodeInterface, 13 | fromGlobalId, 14 | toGlobalId, 15 | }; 16 | -------------------------------------------------------------------------------- /src/nodeFieldConfig.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /* eslint-disable no-param-reassign, import/prefer-default-export */ 3 | import { 4 | getProjectionFromAST, 5 | type InterfaceTypeComposer, 6 | type ObjectTypeComposerFieldConfigDefinition, 7 | } from 'graphql-compose'; 8 | import type { GraphQLResolveInfo } from 'graphql-compose/lib/graphql'; 9 | import type { Resolver, ObjectTypeComposer } from 'graphql-compose'; 10 | import { fromGlobalId } from './globalId'; 11 | 12 | export type TypeMapForRelayNode = { 13 | [typeName: string]: { 14 | resolver: Resolver, 15 | tc: ObjectTypeComposer, 16 | }, 17 | }; 18 | 19 | // this fieldConfig must be set to RootQuery.node field 20 | export function getNodeFieldConfig( 21 | typeMapForRelayNode: TypeMapForRelayNode, 22 | nodeInterface: InterfaceTypeComposer 23 | ): ObjectTypeComposerFieldConfigDefinition { 24 | return { 25 | description: 'Fetches an object that has globally unique ID among all types', 26 | type: nodeInterface, 27 | args: { 28 | id: { 29 | type: 'ID!', 30 | description: 'The globally unique ID among all types', 31 | }, 32 | }, 33 | resolve: ( 34 | source: mixed, 35 | args: { [argName: string]: mixed }, 36 | context: mixed, 37 | info: GraphQLResolveInfo 38 | ) => { 39 | if (!args.id || !(typeof args.id === 'string')) { 40 | return null; 41 | } 42 | const { type, id } = fromGlobalId(args.id); 43 | 44 | if (!typeMapForRelayNode[type]) { 45 | return null; 46 | } 47 | const { tc, resolver: findById } = typeMapForRelayNode[type]; 48 | if (findById && findById.resolve && tc) { 49 | const graphqlType = tc.getType(); 50 | 51 | // set `returnType` to `info` for proper work of `getProjectionFromAST` 52 | // it will correctly add required fields for `relation` to `projection` 53 | let projection; 54 | if (info) { 55 | // $FlowFixMe 56 | info.returnType = graphqlType; 57 | projection = getProjectionFromAST(info); 58 | } else { 59 | projection = {}; 60 | } 61 | 62 | // suppose that first argument is argument with id field 63 | const idArgName = Object.keys(findById.args)[0]; 64 | return findById 65 | .resolve({ 66 | source, 67 | args: { [idArgName]: id }, // eg. mongoose has _id fieldname, so should map 68 | context, 69 | info, 70 | projection, 71 | }) 72 | .then((res) => { 73 | if (!res) return res; 74 | res.__nodeType = graphqlType; 75 | return res; 76 | }); 77 | } 78 | 79 | return null; 80 | }, 81 | }; 82 | } 83 | -------------------------------------------------------------------------------- /src/nodeInterface.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { InterfaceTypeComposer, type SchemaComposer } from 'graphql-compose'; 4 | 5 | const NodeTC = InterfaceTypeComposer.createTemp({ 6 | name: 'Node', 7 | description: 'An object, that can be fetched by the globally unique ID among all types.', 8 | fields: { 9 | id: { 10 | type: 'ID!', 11 | description: 'The globally unique ID among all types.', 12 | }, 13 | }, 14 | resolveType: (payload) => { 15 | // `payload.__nodeType` was added to payload via nodeFieldConfig.resolve 16 | return payload.__nodeType ? payload.__nodeType : null; 17 | }, 18 | }); 19 | 20 | export const NodeInterface = NodeTC.getType(); 21 | 22 | export function getNodeInterface( 23 | sc: SchemaComposer 24 | ): InterfaceTypeComposer { 25 | if (sc.hasInstance('Node', InterfaceTypeComposer)) { 26 | return (sc.get('Node'): any); 27 | } 28 | sc.set('Node', (NodeTC: any)); 29 | return (NodeTC: any); 30 | } 31 | -------------------------------------------------------------------------------- /src/wrapMutationResolver.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /* eslint-disable no-param-reassign */ 3 | 4 | import { InputTypeComposer, ObjectTypeComposer, type Resolver } from 'graphql-compose'; 5 | import { toGlobalId } from './globalId'; 6 | 7 | export type WrapMutationResolverOpts = { 8 | resolverName: string, 9 | rootTypeName: string, 10 | [optName: string]: mixed, 11 | }; 12 | 13 | function upperFirst(str: string): string { 14 | return str.charAt(0).toUpperCase() + str.slice(1); 15 | } 16 | 17 | export default function wrapMutationResolver( 18 | resolver: Resolver, 19 | opts: WrapMutationResolverOpts 20 | ): Resolver { 21 | const { resolverName, rootTypeName } = opts; 22 | const sc = resolver.schemaComposer; 23 | 24 | function prepareArgs(newResolver: Resolver) { 25 | let ITC: InputTypeComposer; 26 | if (newResolver.hasArg('input')) { 27 | ITC = (newResolver.getArgTC('input'): any); 28 | if (!(ITC instanceof InputTypeComposer)) { 29 | return; 30 | } 31 | } else { 32 | // create input arg, and put into all current args 33 | ITC = sc.createInputTC({ 34 | name: `Relay${upperFirst(resolverName)}${rootTypeName}Input`, 35 | fields: (newResolver.args: any), 36 | }); 37 | newResolver.setArgs({ 38 | input: { 39 | // nonNull due required arg clientMutationId 40 | type: ITC.getTypeNonNull(), 41 | }, 42 | }); 43 | // $FlowFixMe 44 | newResolver._relayIsArgsWrapped = true; 45 | } 46 | 47 | // add `clientMutationId` to args.input field 48 | if (ITC && !ITC.hasField('clientMutationId')) { 49 | ITC.setField('clientMutationId', { 50 | type: 'String', 51 | description: 52 | 'The client mutation ID used by clients like Relay to track the mutation. ' + 53 | 'If given, returned in the response payload of the mutation.', 54 | }); 55 | } 56 | } 57 | 58 | function prepareResolve(newResolver, prevResolver) { 59 | newResolver.setResolve((resolveParams) => { 60 | let clientMutationId; 61 | 62 | if (resolveParams && resolveParams.args) { 63 | if (resolveParams.args.input && resolveParams.args.input.clientMutationId) { 64 | clientMutationId = resolveParams.args.input.clientMutationId; 65 | delete (resolveParams.args.input: any).clientMutationId; 66 | } 67 | } 68 | 69 | if ((newResolver: any)._relayIsArgsWrapped) { 70 | resolveParams.args = (resolveParams.args: any).input; 71 | } 72 | 73 | return prevResolver.resolve(resolveParams).then((res) => { 74 | res.nodeId = toGlobalId(rootTypeName, res.recordId); 75 | if (clientMutationId) { 76 | res.clientMutationId = clientMutationId; 77 | } 78 | return res; 79 | }); 80 | }); 81 | } 82 | 83 | function prepareType(newResolver, prevResolver) { 84 | const outputTC = prevResolver.getTypeComposer(); 85 | 86 | if (!(outputTC instanceof ObjectTypeComposer)) { 87 | return; 88 | } 89 | 90 | if (!outputTC.hasField('nodeId')) { 91 | outputTC.setField('nodeId', { 92 | type: 'ID', 93 | description: 'The globally unique ID among all types', 94 | }); 95 | } 96 | 97 | if (!outputTC.hasField('clientMutationId')) { 98 | outputTC.setField('clientMutationId', { 99 | type: 'String', 100 | description: 101 | 'The client mutation ID used by clients like Relay to track the mutation. ' + 102 | 'If given, returned in the response payload of the mutation.', 103 | }); 104 | } 105 | 106 | newResolver.setType(outputTC.getType()); 107 | } 108 | 109 | return resolver.wrap( 110 | (newResolver, prevResolver) => { 111 | prepareArgs(newResolver); 112 | prepareResolve(newResolver, prevResolver); 113 | prepareType(newResolver, prevResolver); 114 | return newResolver; 115 | }, 116 | { name: 'RelayMutation' } 117 | ); 118 | } 119 | --------------------------------------------------------------------------------