├── .dockerignore ├── .eslintrc.js ├── .flowconfig ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── entrypoint.sh ├── flow-typed └── npm │ ├── axios_v0.16.x.js │ ├── babel-eslint_vx.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── eslint-plugin-flowtype_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-jsx-a11y_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── jest_v20.x.x.js │ ├── localforage_vx.x.x.js │ ├── react-bootstrap_vx.x.x.js │ ├── react-icons-kit_vx.x.x.js │ ├── react-json-view_vx.x.x.js │ ├── react-notification-system_vx.x.x.js │ ├── react-pager_vx.x.x.js │ ├── react-redux_v5.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── react-router_v4.x.x.js │ ├── react-scripts_vx.x.x.js │ ├── react-sidenav_vx.x.x.js │ ├── react-table_vx.x.x.js │ ├── react-tabs_vx.x.x.js │ ├── react-tap-event-plugin_vx.x.x.js │ ├── redux-devtools-extension_v2.x.x.js │ ├── redux-logger_vx.x.x.js │ ├── redux-observable_vx.x.x.js │ ├── redux-persist_vx.x.x.js │ ├── redux_v3.x.x.js │ └── rxjs_v5.0.x.js ├── kafka-setup ├── README.md ├── docker-compose.yml ├── start.sh ├── stop.sh └── test-data.txt ├── localhost.Dockerfile ├── nginx ├── kafka-rest-ui-proxy-location.template ├── kafka-rest-ui.template └── nginx.conf ├── package.json ├── preview.png ├── public ├── index.html ├── kafka.png └── manifest.json └── src ├── App.css ├── App.js ├── App.test.js ├── api └── index.js ├── ducks ├── consumers.js ├── index.js ├── settings.js └── topics.js ├── epics ├── consumers.js ├── index.js ├── kafkaConfigDescriptions.js └── topics.js ├── index.css ├── index.js ├── logo.svg ├── nodefluent.png ├── styles.js └── types.js /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": "airbnb", 3 | "parser": "babel-eslint", 4 | "env": { 5 | "browser": true, 6 | "node": true, 7 | "jest": true, 8 | }, 9 | "plugins": ["flowtype"], 10 | "rules":{ 11 | "camelcase": 0, 12 | "react/jsx-filename-extension": 0, 13 | "react/no-array-index-key": 0, 14 | "react/jsx-no-bind": 0, 15 | "react/prop-types": 0, 16 | "max-len": ["error", 120], 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/.* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [lints] 9 | 10 | [options] 11 | module.ignore_non_literal_requires=true 12 | unsafe.enable_getters_and_setters=true 13 | suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore 14 | suppress_type=$FlowIssue 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | MAINTAINER nodefluent 3 | 4 | ENV KAFKA_REST_UI_VERSION=0.6.2 5 | ENV NODE_ENV=production 6 | COPY . /usr/share/nginx/kafka-rest-ui/ 7 | COPY ./nginx/nginx.conf /etc/nginx/nginx.conf 8 | COPY ./nginx/kafka-rest-ui.template /etc/nginx/conf.d/kafka-rest-ui.template 9 | COPY ./nginx/kafka-rest-ui-proxy-location.template /etc/nginx/conf.d/kafka-rest-ui-proxy-location.template 10 | WORKDIR /usr/share/nginx/kafka-rest-ui/ 11 | 12 | RUN apk update \ 13 | && apk add --no-cache libcap bash curl git nginx gettext apache2-utils \ 14 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 15 | && ln -sf /dev/stderr /var/log/nginx/error.log \ 16 | && yarn install 17 | 18 | STOPSIGNAL SIGTERM 19 | EXPOSE ${HTTP_PORT:-8000} 20 | CMD ["./entrypoint.sh"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 nodefluent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Kafka REST UI :mushroom: 2 | [![Dependency Status](https://david-dm.org/nodefluent/kafka-rest-ui.svg)](https://david-dm.org/nodefluent/kafka-rest-ui) 3 | 4 | Kafka-Rest-UI is a kafka topics browser. 5 | 6 | > NOTE: The goal of this project is to offer a fast user interface for [kafka-rest](https://github.com/nodefluent/kafka-rest). 7 | 8 | #### Features: 9 | 10 | - View kafka topics 11 | - View topic metadata 12 | - Browse kafka messages (with offline storage) 13 | - Filter kafka messages 14 | - View topic configuration 15 | - View consumers status 16 | 17 | ![Preview](https://raw.githubusercontent.com/nodefluent/kafka-rest-ui/master/preview.png) 18 | 19 | ## Docker 20 | 21 | #### Configurations 22 | 23 | - env `REACT_APP_KAFKA_REST_URL` - set kafka-rest url 24 | - env `REACT_APP_PROXY` - set proxy mode 25 | - env `REACT_APP_TIMEOUT` - set default timeout (you can change it via settings tab) 26 | - env `REACT_APP_LOCAL_STORAGE` - set to 'false' if you don't want to use local storage 27 | - env `REACT_APP_DEBUG` - turn on debug mode 28 | 29 | #### docker-compose example 30 | 31 | ```yaml 32 | version: "2" 33 | services: 34 | zookeeper: 35 | image: wurstmeister/zookeeper:latest 36 | ports: 37 | - 2181:2181 38 | 39 | kafka: 40 | image: wurstmeister/kafka:0.10.2.1 41 | ports: 42 | - "9092:9092" 43 | links: 44 | - zookeeper 45 | depends_on: 46 | - zookeeper 47 | environment: 48 | KAFKA_BROKER_ID: 1 49 | KAFKA_PORT: 9092 50 | KAFKA_ADVERTISED_HOST_NAME: "kafka" 51 | KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092" 52 | KAFKA_LISTENERS: "PLAINTEXT://:9092" 53 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 54 | KAFKA_CREATE_TOPICS: "test:1:1" 55 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" 56 | 57 | kafka-rest: 58 | image: nodefluent/kafka-rest 59 | ports: 60 | - 8082:8082 61 | links: 62 | - kafka 63 | - zookeeper 64 | depends_on: 65 | - kafka 66 | - zookeeper 67 | environment: 68 | DEBUG: "*" 69 | 70 | kafka-rest-ui: 71 | image: nodefluent/kafka-rest-ui 72 | ports: 73 | - 8000:8000 74 | links: 75 | - kafka-rest 76 | depends_on: 77 | - kafka-rest 78 | environment: 79 | DEBUG: "*" 80 | REACT_APP_KAFKA_REST_URL: "http://kafka-rest:8082/" 81 | REACT_APP_TIMEOUT: "3000" 82 | PROXY: "yes" 83 | BASIC_AUTH_USER: "admin" 84 | BASIC_AUTH_PASSWORD: "admin" 85 | ``` 86 | 87 | ## TODO 88 | 89 | - [x] Replace caddy server with nginx 90 | - [ ] Add multi enpoint support 91 | - [ ] Refactor mapping in reducers 92 | - [ ] Write tests 93 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ -z "${DEBUG}" ]; then 6 | set +o xtrace 7 | else 8 | set -o xtrace 9 | fi 10 | 11 | export REACT_APP_KAFKA_REST_URL="${REACT_APP_KAFKA_REST_URL:-http://localhost:8082}" 12 | export REACT_APP_TIMEOUT="${REACT_APP_TIMEOUT:-2000}" 13 | export REACT_APP_PROXY="${PROXY}" 14 | export PROXY_URL="${PROXY_URL}" 15 | export REACT_APP_DEBUG="${DEBUG}" 16 | export HTTP_PORT=${HTTP_PORT:-8000} 17 | export BASIC_AUTH_USER=${BASIC_AUTH_USER} 18 | export BASIC_AUTH_PASSWORD=${BASIC_AUTH_PASSWORD} 19 | export BASIC_AUTH="" 20 | 21 | if [[ -z "$REACT_APP_KAFKA_REST_URL" ]]; then 22 | echo "Kafka REST URL was not set via REACT_APP_KAFKA_REST_URL environment variable." 23 | fi 24 | 25 | if echo "$PROXY" | grep -sqE "true|TRUE|y|Y|yes|YES|1"; then 26 | export PROXY_URL=${REACT_APP_KAFKA_REST_URL} 27 | export REACT_APP_KAFKA_REST_URL="/api/kafka-rest" 28 | envsubst '$REACT_APP_KAFKA_REST_URL $PROXY_URL' < /etc/nginx/conf.d/kafka-rest-ui-proxy-location.template > /etc/nginx/conf.d/kafka-rest-ui-proxy.location 29 | cat /etc/nginx/conf.d/kafka-rest-ui-proxy.location 30 | fi 31 | 32 | if [ ! -z "${BASIC_AUTH_USER}" ]; then 33 | htpasswd -cb /etc/nginx/.htpasswd "${BASIC_AUTH_USER}" "${BASIC_AUTH_PASSWORD}" 34 | export BASIC_AUTH='auth_basic "Restricted"; 35 | auth_basic_user_file /etc/nginx/.htpasswd;' 36 | fi 37 | 38 | envsubst '$HTTP_PORT $BASIC_AUTH' < /etc/nginx/conf.d/kafka-rest-ui.template > /etc/nginx/conf.d/kafka-rest-ui.conf 39 | cat /etc/nginx/conf.d/kafka-rest-ui.conf 40 | 41 | if [[ "${BUILD}" != "localhost" ]]; then 42 | echo "Building application..." 43 | yarn build 44 | fi 45 | 46 | echo 47 | echo "Starting server..." 48 | echo "http://0.0.0.0:${HTTP_PORT}" 49 | exec nginx -g "daemon off;" 50 | -------------------------------------------------------------------------------- /flow-typed/npm/axios_v0.16.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f285c927f7d16d32a7e2030a3b3c7f87 2 | // flow-typed version: d634799bc1/axios_v0.16.x/flow_>=v0.25.x 3 | 4 | declare module 'axios' { 5 | declare interface ProxyConfig { 6 | host: string; 7 | port: number; 8 | } 9 | declare interface Cancel { 10 | constructor(message?: string): Cancel; 11 | message: string; 12 | } 13 | declare interface Canceler { 14 | (message?: string): void; 15 | } 16 | declare interface CancelTokenSource { 17 | token: CancelToken; 18 | cancel: Canceler; 19 | } 20 | declare interface CancelToken { 21 | constructor(executor: (cancel: Canceler) => void): CancelToken; 22 | static source(): CancelTokenSource; 23 | promise: Promise; 24 | reason?: Cancel; 25 | throwIfRequested(): void; 26 | } 27 | declare interface AxiosXHRConfigBase { 28 | adapter?: (config: AxiosXHRConfig) => Promise>; 29 | auth?: { 30 | username: string, 31 | password: string 32 | }; 33 | baseURL?: string, 34 | cancelToken?: CancelToken; 35 | headers?: Object; 36 | httpAgent?: mixed; // Missing the type in the core flow node libdef 37 | httpsAgent?: mixed; // Missing the type in the core flow node libdef 38 | maxContentLength?: number; 39 | maxRedirects?: 5, 40 | params?: Object; 41 | paramsSerializer?: (params: Object) => string; 42 | progress?: (progressEvent: Event) => void | mixed; 43 | proxy?: ProxyConfig; 44 | responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'; 45 | timeout?: number; 46 | transformRequest?: Array<(data: T) => U|Array<(data: T) => U>>; 47 | transformResponse?: Array<(data: T) => U>; 48 | validateStatus?: (status: number) => boolean, 49 | withCredentials?: boolean; 50 | xsrfCookieName?: string; 51 | xsrfHeaderName?: string; 52 | } 53 | declare type $AxiosXHRConfigBase = AxiosXHRConfigBase; 54 | declare interface AxiosXHRConfig extends AxiosXHRConfigBase { 55 | data?: T; 56 | method?: string; 57 | url: string; 58 | } 59 | declare type $AxiosXHRConfig = AxiosXHRConfig; 60 | declare class AxiosXHR { 61 | config: AxiosXHRConfig; 62 | data: T; 63 | headers: Object; 64 | status: number; 65 | statusText: string, 66 | request: http$ClientRequest | XMLHttpRequest 67 | } 68 | declare type $AxiosXHR = AxiosXHR; 69 | declare class AxiosInterceptorIdent extends String {} 70 | declare class AxiosRequestInterceptor { 71 | use( 72 | successHandler: ?(response: AxiosXHRConfig) => Promise> | AxiosXHRConfig<*>, 73 | errorHandler: ?(error: mixed) => mixed, 74 | ): AxiosInterceptorIdent; 75 | eject(ident: AxiosInterceptorIdent): void; 76 | } 77 | declare class AxiosResponseInterceptor { 78 | use( 79 | successHandler: ?(response: AxiosXHR) => mixed, 80 | errorHandler: ?(error: mixed) => mixed, 81 | ): AxiosInterceptorIdent; 82 | eject(ident: AxiosInterceptorIdent): void; 83 | } 84 | declare type AxiosPromise = Promise>; 85 | declare class Axios { 86 | constructor(config?: AxiosXHRConfigBase): void; 87 | $call: (config: AxiosXHRConfig | string, config?: AxiosXHRConfig) => AxiosPromise; 88 | request(config: AxiosXHRConfig): AxiosPromise; 89 | delete(url: string, config?: AxiosXHRConfigBase): AxiosPromise; 90 | get(url: string, config?: AxiosXHRConfigBase): AxiosPromise; 91 | head(url: string, config?: AxiosXHRConfigBase): AxiosPromise; 92 | post(url: string, data?: mixed, config?: AxiosXHRConfigBase): AxiosPromise; 93 | put(url: string, data?: mixed, config?: AxiosXHRConfigBase): AxiosPromise; 94 | patch(url: string, data?: mixed, config?: AxiosXHRConfigBase): AxiosPromise; 95 | interceptors: { 96 | request: AxiosRequestInterceptor, 97 | response: AxiosResponseInterceptor, 98 | }; 99 | defaults: AxiosXHRConfig<*> & { headers: Object }; 100 | } 101 | 102 | declare class AxiosError extends Error { 103 | config: AxiosXHRConfig; 104 | response: AxiosXHR; 105 | code?: string; 106 | } 107 | 108 | declare type $AxiosError = AxiosError; 109 | 110 | declare interface AxiosExport extends Axios { 111 | Axios: typeof Axios; 112 | Cancel: Class; 113 | CancelToken: Class; 114 | isCancel(value: any): boolean; 115 | create(config?: AxiosXHRConfigBase): Axios; 116 | all: typeof Promise.all; 117 | spread(callback: Function): (arr: Array) => Function 118 | } 119 | declare module.exports: AxiosExport; 120 | } 121 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7d82211d67facbefd278d5645b815f58 2 | // flow-typed version: <>/babel-eslint_v^8.0.0/flow_v0.54.1 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/babylon-to-espree/attachComments' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/babylon-to-espree/convertComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/babylon-to-espree/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/babylon-to-espree/toAST' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/babylon-to-espree/toToken' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/babylon-to-espree/toTokens' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'babel-eslint/babylon-to-espree/attachComments.js' { 55 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; 56 | } 57 | declare module 'babel-eslint/babylon-to-espree/convertComments.js' { 58 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertComments'>; 59 | } 60 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { 61 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; 62 | } 63 | declare module 'babel-eslint/babylon-to-espree/index.js' { 64 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; 65 | } 66 | declare module 'babel-eslint/babylon-to-espree/toAST.js' { 67 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; 68 | } 69 | declare module 'babel-eslint/babylon-to-espree/toToken.js' { 70 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; 71 | } 72 | declare module 'babel-eslint/babylon-to-espree/toTokens.js' { 73 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; 74 | } 75 | declare module 'babel-eslint/index' { 76 | declare module.exports: $Exports<'babel-eslint'>; 77 | } 78 | declare module 'babel-eslint/index.js' { 79 | declare module.exports: $Exports<'babel-eslint'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8d45ce7b1ec2fc5dcfa82c4014e2f0ed 2 | // flow-typed version: <>/eslint-config-airbnb_v^15.1.0/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb' 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' { 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' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb/legacy' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb/rules/react-a11y' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb/rules/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb/test/test-base' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb/test/test-react-order' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-config-airbnb/base.js' { 51 | declare module.exports: $Exports<'eslint-config-airbnb/base'>; 52 | } 53 | declare module 'eslint-config-airbnb/index' { 54 | declare module.exports: $Exports<'eslint-config-airbnb'>; 55 | } 56 | declare module 'eslint-config-airbnb/index.js' { 57 | declare module.exports: $Exports<'eslint-config-airbnb'>; 58 | } 59 | declare module 'eslint-config-airbnb/legacy.js' { 60 | declare module.exports: $Exports<'eslint-config-airbnb/legacy'>; 61 | } 62 | declare module 'eslint-config-airbnb/rules/react-a11y.js' { 63 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react-a11y'>; 64 | } 65 | declare module 'eslint-config-airbnb/rules/react.js' { 66 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react'>; 67 | } 68 | declare module 'eslint-config-airbnb/test/test-base.js' { 69 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-base'>; 70 | } 71 | declare module 'eslint-config-airbnb/test/test-react-order.js' { 72 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-react-order'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b337881bcd475ba74e4f385f5284d792 2 | // flow-typed version: <>/eslint-plugin-flowtype_v^2.35.1/flow_v0.54.1 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/bin/readmeAssertions' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-flowtype/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-flowtype/dist/rules/semi' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-flowtype/dist/utilities/index' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers' { 194 | declare module.exports: any; 195 | } 196 | 197 | // Filename aliases 198 | declare module 'eslint-plugin-flowtype/bin/readmeAssertions.js' { 199 | declare module.exports: $Exports<'eslint-plugin-flowtype/bin/readmeAssertions'>; 200 | } 201 | declare module 'eslint-plugin-flowtype/dist/index.js' { 202 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/index'>; 203 | } 204 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle.js' { 205 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/booleanStyle'>; 206 | } 207 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType.js' { 208 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/defineFlowType'>; 209 | } 210 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle.js' { 211 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/delimiterDangle'>; 212 | } 213 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing.js' { 214 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/genericSpacing'>; 215 | } 216 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys.js' { 217 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noDupeKeys'>; 218 | } 219 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes.js' { 220 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes'>; 221 | } 222 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation.js' { 223 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation'>; 224 | } 225 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes.js' { 226 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noWeakTypes'>; 227 | } 228 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter.js' { 229 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter'>; 230 | } 231 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType.js' { 232 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireParameterType'>; 233 | } 234 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType.js' { 235 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireReturnType'>; 236 | } 237 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation.js' { 238 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation'>; 239 | } 240 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType.js' { 241 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/requireVariableType'>; 242 | } 243 | declare module 'eslint-plugin-flowtype/dist/rules/semi.js' { 244 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/semi'>; 245 | } 246 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys.js' { 247 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/sortKeys'>; 248 | } 249 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon.js' { 250 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon'>; 251 | } 252 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket.js' { 253 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket'>; 254 | } 255 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon.js' { 256 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon'>; 257 | } 258 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions.js' { 259 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions'>; 260 | } 261 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer.js' { 262 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer'>; 263 | } 264 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty.js' { 265 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty'>; 266 | } 267 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType.js' { 268 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType'>; 269 | } 270 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression.js' { 271 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression'>; 272 | } 273 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical.js' { 274 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical'>; 275 | } 276 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index.js' { 277 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index'>; 278 | } 279 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter.js' { 280 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter'>; 281 | } 282 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch.js' { 283 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/typeIdMatch'>; 284 | } 285 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing.js' { 286 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing'>; 287 | } 288 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType.js' { 289 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/useFlowType'>; 290 | } 291 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax.js' { 292 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/validSyntax'>; 293 | } 294 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation.js' { 295 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation'>; 296 | } 297 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch.js' { 298 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch'>; 299 | } 300 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName.js' { 301 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getParameterName'>; 302 | } 303 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens.js' { 304 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens'>; 305 | } 306 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens.js' { 307 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens'>; 308 | } 309 | declare module 'eslint-plugin-flowtype/dist/utilities/index.js' { 310 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/index'>; 311 | } 312 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile.js' { 313 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/isFlowFile'>; 314 | } 315 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation.js' { 316 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation'>; 317 | } 318 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes.js' { 319 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes'>; 320 | } 321 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName.js' { 322 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/quoteName'>; 323 | } 324 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers.js' { 325 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/utilities/spacingFixers'>; 326 | } 327 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: bff4b7e2b3cb13579fda347b86568185 2 | // flow-typed version: <>/eslint-plugin-import_v^2.7.0/flow_v0.54.1 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/warnings' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-import/lib/ExportMap' { 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/importDeclaration' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-import/lib/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-import/lib/rules/default' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-import/lib/rules/export' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-import/lib/rules/extensions' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-import/lib/rules/first' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-import/lib/rules/imports-first' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-import/lib/rules/max-dependencies' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-import/lib/rules/named' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-import/lib/rules/namespace' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-import/lib/rules/newline-after-import' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-import/lib/rules/no-amd' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-import/lib/rules/no-commonjs' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-import/lib/rules/no-deprecated' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-import/lib/rules/no-duplicates' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-import/lib/rules/no-named-default' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-import/lib/rules/no-namespace' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-import/lib/rules/no-unresolved' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-import/lib/rules/order' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-import/lib/rules/unambiguous' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-import/memo-parser/index' { 198 | declare module.exports: any; 199 | } 200 | 201 | // Filename aliases 202 | declare module 'eslint-plugin-import/config/electron.js' { 203 | declare module.exports: $Exports<'eslint-plugin-import/config/electron'>; 204 | } 205 | declare module 'eslint-plugin-import/config/errors.js' { 206 | declare module.exports: $Exports<'eslint-plugin-import/config/errors'>; 207 | } 208 | declare module 'eslint-plugin-import/config/react-native.js' { 209 | declare module.exports: $Exports<'eslint-plugin-import/config/react-native'>; 210 | } 211 | declare module 'eslint-plugin-import/config/react.js' { 212 | declare module.exports: $Exports<'eslint-plugin-import/config/react'>; 213 | } 214 | declare module 'eslint-plugin-import/config/recommended.js' { 215 | declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; 216 | } 217 | declare module 'eslint-plugin-import/config/stage-0.js' { 218 | declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; 219 | } 220 | declare module 'eslint-plugin-import/config/warnings.js' { 221 | declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; 222 | } 223 | declare module 'eslint-plugin-import/lib/ExportMap.js' { 224 | declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; 225 | } 226 | declare module 'eslint-plugin-import/lib/core/importType.js' { 227 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; 228 | } 229 | declare module 'eslint-plugin-import/lib/core/staticRequire.js' { 230 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/staticRequire'>; 231 | } 232 | declare module 'eslint-plugin-import/lib/importDeclaration.js' { 233 | declare module.exports: $Exports<'eslint-plugin-import/lib/importDeclaration'>; 234 | } 235 | declare module 'eslint-plugin-import/lib/index.js' { 236 | declare module.exports: $Exports<'eslint-plugin-import/lib/index'>; 237 | } 238 | declare module 'eslint-plugin-import/lib/rules/default.js' { 239 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/default'>; 240 | } 241 | declare module 'eslint-plugin-import/lib/rules/export.js' { 242 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/export'>; 243 | } 244 | declare module 'eslint-plugin-import/lib/rules/extensions.js' { 245 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; 246 | } 247 | declare module 'eslint-plugin-import/lib/rules/first.js' { 248 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; 249 | } 250 | declare module 'eslint-plugin-import/lib/rules/imports-first.js' { 251 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/imports-first'>; 252 | } 253 | declare module 'eslint-plugin-import/lib/rules/max-dependencies.js' { 254 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/max-dependencies'>; 255 | } 256 | declare module 'eslint-plugin-import/lib/rules/named.js' { 257 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/named'>; 258 | } 259 | declare module 'eslint-plugin-import/lib/rules/namespace.js' { 260 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/namespace'>; 261 | } 262 | declare module 'eslint-plugin-import/lib/rules/newline-after-import.js' { 263 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/newline-after-import'>; 264 | } 265 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path.js' { 266 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-absolute-path'>; 267 | } 268 | declare module 'eslint-plugin-import/lib/rules/no-amd.js' { 269 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-amd'>; 270 | } 271 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export.js' { 272 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-anonymous-default-export'>; 273 | } 274 | declare module 'eslint-plugin-import/lib/rules/no-commonjs.js' { 275 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-commonjs'>; 276 | } 277 | declare module 'eslint-plugin-import/lib/rules/no-deprecated.js' { 278 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-deprecated'>; 279 | } 280 | declare module 'eslint-plugin-import/lib/rules/no-duplicates.js' { 281 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-duplicates'>; 282 | } 283 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require.js' { 284 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-dynamic-require'>; 285 | } 286 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies.js' { 287 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-extraneous-dependencies'>; 288 | } 289 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules.js' { 290 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-internal-modules'>; 291 | } 292 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports.js' { 293 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-mutable-exports'>; 294 | } 295 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { 296 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default-member'>; 297 | } 298 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { 299 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default'>; 300 | } 301 | declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { 302 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-default'>; 303 | } 304 | declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { 305 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-namespace'>; 306 | } 307 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { 308 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-nodejs-modules'>; 309 | } 310 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { 311 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-restricted-paths'>; 312 | } 313 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { 314 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unassigned-import'>; 315 | } 316 | declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { 317 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unresolved'>; 318 | } 319 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { 320 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-webpack-loader-syntax'>; 321 | } 322 | declare module 'eslint-plugin-import/lib/rules/order.js' { 323 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; 324 | } 325 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { 326 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/prefer-default-export'>; 327 | } 328 | declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { 329 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/unambiguous'>; 330 | } 331 | declare module 'eslint-plugin-import/memo-parser/index.js' { 332 | declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; 333 | } 334 | -------------------------------------------------------------------------------- /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_v20.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5960ed076fe29ecf92f57584d68acf98 2 | // flow-typed version: b2a49dc910/jest_v20.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 | /** 23 | * Resets all information stored in the mockFn.mock.calls and 24 | * mockFn.mock.instances arrays. Often this is useful when you want to clean 25 | * up a mock's usage data between two assertions. 26 | */ 27 | mockClear(): void, 28 | /** 29 | * Resets all information stored in the mock. This is useful when you want to 30 | * completely restore a mock back to its initial state. 31 | */ 32 | mockReset(): void, 33 | /** 34 | * Removes the mock and restores the initial implementation. This is useful 35 | * when you want to mock functions in certain test cases and restore the 36 | * original implementation in others. Beware that mockFn.mockRestore only 37 | * works when mock was created with jest.spyOn. Thus you have to take care of 38 | * restoration yourself when manually assigning jest.fn(). 39 | */ 40 | mockRestore(): void, 41 | /** 42 | * Accepts a function that should be used as the implementation of the mock. 43 | * The mock itself will still record all calls that go into and instances 44 | * that come from itself -- the only difference is that the implementation 45 | * will also be executed when the mock is called. 46 | */ 47 | mockImplementation( 48 | fn: (...args: TArguments) => TReturn, 49 | ): JestMockFn, 50 | /** 51 | * Accepts a function that will be used as an implementation of the mock for 52 | * one call to the mocked function. Can be chained so that multiple function 53 | * calls produce different results. 54 | */ 55 | mockImplementationOnce( 56 | fn: (...args: TArguments) => TReturn, 57 | ): JestMockFn, 58 | /** 59 | * Just a simple sugar function for returning `this` 60 | */ 61 | mockReturnThis(): void, 62 | /** 63 | * Deprecated: use jest.fn(() => value) instead 64 | */ 65 | mockReturnValue(value: TReturn): JestMockFn, 66 | /** 67 | * Sugar for only returning a value once inside your mock 68 | */ 69 | mockReturnValueOnce(value: TReturn): JestMockFn 70 | }; 71 | 72 | type JestAsymmetricEqualityType = { 73 | /** 74 | * A custom Jasmine equality tester 75 | */ 76 | asymmetricMatch(value: mixed): boolean 77 | }; 78 | 79 | type JestCallsType = { 80 | allArgs(): mixed, 81 | all(): mixed, 82 | any(): boolean, 83 | count(): number, 84 | first(): mixed, 85 | mostRecent(): mixed, 86 | reset(): void 87 | }; 88 | 89 | type JestClockType = { 90 | install(): void, 91 | mockDate(date: Date): void, 92 | tick(milliseconds?: number): void, 93 | uninstall(): void 94 | }; 95 | 96 | type JestMatcherResult = { 97 | message?: string | (() => string), 98 | pass: boolean 99 | }; 100 | 101 | type JestMatcher = (actual: any, expected: any) => JestMatcherResult; 102 | 103 | type JestPromiseType = { 104 | /** 105 | * Use rejects to unwrap the reason of a rejected promise so any other 106 | * matcher can be chained. If the promise is fulfilled the assertion fails. 107 | */ 108 | rejects: JestExpectType, 109 | /** 110 | * Use resolves to unwrap the value of a fulfilled promise so any other 111 | * matcher can be chained. If the promise is rejected the assertion fails. 112 | */ 113 | resolves: JestExpectType 114 | }; 115 | 116 | /** 117 | * Plugin: jest-enzyme 118 | */ 119 | type EnzymeMatchersType = { 120 | toBeChecked(): void, 121 | toBeDisabled(): void, 122 | toBeEmpty(): void, 123 | toBePresent(): void, 124 | toContainReact(element: React$Element): void, 125 | toHaveClassName(className: string): void, 126 | toHaveHTML(html: string): void, 127 | toHaveProp(propKey: string, propValue?: any): void, 128 | toHaveRef(refName: string): void, 129 | toHaveState(stateKey: string, stateValue?: any): void, 130 | toHaveStyle(styleKey: string, styleValue?: any): void, 131 | toHaveTagName(tagName: string): void, 132 | toHaveText(text: string): void, 133 | toIncludeText(text: string): void, 134 | toHaveValue(value: any): void, 135 | toMatchElement(element: React$Element): void, 136 | toMatchSelector(selector: string): void, 137 | }; 138 | 139 | type JestExpectType = { 140 | not: JestExpectType & EnzymeMatchersType, 141 | /** 142 | * If you have a mock function, you can use .lastCalledWith to test what 143 | * arguments it was last called with. 144 | */ 145 | lastCalledWith(...args: Array): void, 146 | /** 147 | * toBe just checks that a value is what you expect. It uses === to check 148 | * strict equality. 149 | */ 150 | toBe(value: any): void, 151 | /** 152 | * Use .toHaveBeenCalled to ensure that a mock function got called. 153 | */ 154 | toBeCalled(): void, 155 | /** 156 | * Use .toBeCalledWith to ensure that a mock function was called with 157 | * specific arguments. 158 | */ 159 | toBeCalledWith(...args: Array): void, 160 | /** 161 | * Using exact equality with floating point numbers is a bad idea. Rounding 162 | * means that intuitive things fail. 163 | */ 164 | toBeCloseTo(num: number, delta: any): void, 165 | /** 166 | * Use .toBeDefined to check that a variable is not undefined. 167 | */ 168 | toBeDefined(): void, 169 | /** 170 | * Use .toBeFalsy when you don't care what a value is, you just want to 171 | * ensure a value is false in a boolean context. 172 | */ 173 | toBeFalsy(): void, 174 | /** 175 | * To compare floating point numbers, you can use toBeGreaterThan. 176 | */ 177 | toBeGreaterThan(number: number): void, 178 | /** 179 | * To compare floating point numbers, you can use toBeGreaterThanOrEqual. 180 | */ 181 | toBeGreaterThanOrEqual(number: number): void, 182 | /** 183 | * To compare floating point numbers, you can use toBeLessThan. 184 | */ 185 | toBeLessThan(number: number): void, 186 | /** 187 | * To compare floating point numbers, you can use toBeLessThanOrEqual. 188 | */ 189 | toBeLessThanOrEqual(number: number): void, 190 | /** 191 | * Use .toBeInstanceOf(Class) to check that an object is an instance of a 192 | * class. 193 | */ 194 | toBeInstanceOf(cls: Class<*>): void, 195 | /** 196 | * .toBeNull() is the same as .toBe(null) but the error messages are a bit 197 | * nicer. 198 | */ 199 | toBeNull(): void, 200 | /** 201 | * Use .toBeTruthy when you don't care what a value is, you just want to 202 | * ensure a value is true in a boolean context. 203 | */ 204 | toBeTruthy(): void, 205 | /** 206 | * Use .toBeUndefined to check that a variable is undefined. 207 | */ 208 | toBeUndefined(): void, 209 | /** 210 | * Use .toContain when you want to check that an item is in a list. For 211 | * testing the items in the list, this uses ===, a strict equality check. 212 | */ 213 | toContain(item: any): void, 214 | /** 215 | * Use .toContainEqual when you want to check that an item is in a list. For 216 | * testing the items in the list, this matcher recursively checks the 217 | * equality of all fields, rather than checking for object identity. 218 | */ 219 | toContainEqual(item: any): void, 220 | /** 221 | * Use .toEqual when you want to check that two objects have the same value. 222 | * This matcher recursively checks the equality of all fields, rather than 223 | * checking for object identity. 224 | */ 225 | toEqual(value: any): void, 226 | /** 227 | * Use .toHaveBeenCalled to ensure that a mock function got called. 228 | */ 229 | toHaveBeenCalled(): void, 230 | /** 231 | * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact 232 | * number of times. 233 | */ 234 | toHaveBeenCalledTimes(number: number): void, 235 | /** 236 | * Use .toHaveBeenCalledWith to ensure that a mock function was called with 237 | * specific arguments. 238 | */ 239 | toHaveBeenCalledWith(...args: Array): void, 240 | /** 241 | * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called 242 | * with specific arguments. 243 | */ 244 | toHaveBeenLastCalledWith(...args: Array): void, 245 | /** 246 | * Check that an object has a .length property and it is set to a certain 247 | * numeric value. 248 | */ 249 | toHaveLength(number: number): void, 250 | /** 251 | * 252 | */ 253 | toHaveProperty(propPath: string, value?: any): void, 254 | /** 255 | * Use .toMatch to check that a string matches a regular expression or string. 256 | */ 257 | toMatch(regexpOrString: RegExp | string): void, 258 | /** 259 | * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. 260 | */ 261 | toMatchObject(object: Object): void, 262 | /** 263 | * This ensures that a React component matches the most recent snapshot. 264 | */ 265 | toMatchSnapshot(name?: string): void, 266 | /** 267 | * Use .toThrow to test that a function throws when it is called. 268 | * If you want to test that a specific error gets thrown, you can provide an 269 | * argument to toThrow. The argument can be a string for the error message, 270 | * a class for the error, or a regex that should match the error. 271 | * 272 | * Alias: .toThrowError 273 | */ 274 | toThrow(message?: string | Error | RegExp): void, 275 | toThrowError(message?: string | Error | RegExp): void, 276 | /** 277 | * Use .toThrowErrorMatchingSnapshot to test that a function throws a error 278 | * matching the most recent snapshot when it is called. 279 | */ 280 | toThrowErrorMatchingSnapshot(): void 281 | }; 282 | 283 | type JestObjectType = { 284 | /** 285 | * Disables automatic mocking in the module loader. 286 | * 287 | * After this method is called, all `require()`s will return the real 288 | * versions of each module (rather than a mocked version). 289 | */ 290 | disableAutomock(): JestObjectType, 291 | /** 292 | * An un-hoisted version of disableAutomock 293 | */ 294 | autoMockOff(): JestObjectType, 295 | /** 296 | * Enables automatic mocking in the module loader. 297 | */ 298 | enableAutomock(): JestObjectType, 299 | /** 300 | * An un-hoisted version of enableAutomock 301 | */ 302 | autoMockOn(): JestObjectType, 303 | /** 304 | * Clears the mock.calls and mock.instances properties of all mocks. 305 | * Equivalent to calling .mockClear() on every mocked function. 306 | */ 307 | clearAllMocks(): JestObjectType, 308 | /** 309 | * Resets the state of all mocks. Equivalent to calling .mockReset() on every 310 | * mocked function. 311 | */ 312 | resetAllMocks(): JestObjectType, 313 | /** 314 | * Removes any pending timers from the timer system. 315 | */ 316 | clearAllTimers(): void, 317 | /** 318 | * The same as `mock` but not moved to the top of the expectation by 319 | * babel-jest. 320 | */ 321 | doMock(moduleName: string, moduleFactory?: any): JestObjectType, 322 | /** 323 | * The same as `unmock` but not moved to the top of the expectation by 324 | * babel-jest. 325 | */ 326 | dontMock(moduleName: string): JestObjectType, 327 | /** 328 | * Returns a new, unused mock function. Optionally takes a mock 329 | * implementation. 330 | */ 331 | fn, TReturn>( 332 | implementation?: (...args: TArguments) => TReturn, 333 | ): JestMockFn, 334 | /** 335 | * Determines if the given function is a mocked function. 336 | */ 337 | isMockFunction(fn: Function): boolean, 338 | /** 339 | * Given the name of a module, use the automatic mocking system to generate a 340 | * mocked version of the module for you. 341 | */ 342 | genMockFromModule(moduleName: string): any, 343 | /** 344 | * Mocks a module with an auto-mocked version when it is being required. 345 | * 346 | * The second argument can be used to specify an explicit module factory that 347 | * is being run instead of using Jest's automocking feature. 348 | * 349 | * The third argument can be used to create virtual mocks -- mocks of modules 350 | * that don't exist anywhere in the system. 351 | */ 352 | mock( 353 | moduleName: string, 354 | moduleFactory?: any, 355 | options?: Object 356 | ): JestObjectType, 357 | /** 358 | * Resets the module registry - the cache of all required modules. This is 359 | * useful to isolate modules where local state might conflict between tests. 360 | */ 361 | resetModules(): JestObjectType, 362 | /** 363 | * Exhausts the micro-task queue (usually interfaced in node via 364 | * process.nextTick). 365 | */ 366 | runAllTicks(): void, 367 | /** 368 | * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), 369 | * setInterval(), and setImmediate()). 370 | */ 371 | runAllTimers(): void, 372 | /** 373 | * Exhausts all tasks queued by setImmediate(). 374 | */ 375 | runAllImmediates(): void, 376 | /** 377 | * Executes only the macro task queue (i.e. all tasks queued by setTimeout() 378 | * or setInterval() and setImmediate()). 379 | */ 380 | runTimersToTime(msToRun: number): void, 381 | /** 382 | * Executes only the macro-tasks that are currently pending (i.e., only the 383 | * tasks that have been queued by setTimeout() or setInterval() up to this 384 | * point) 385 | */ 386 | runOnlyPendingTimers(): void, 387 | /** 388 | * Explicitly supplies the mock object that the module system should return 389 | * for the specified module. Note: It is recommended to use jest.mock() 390 | * instead. 391 | */ 392 | setMock(moduleName: string, moduleExports: any): JestObjectType, 393 | /** 394 | * Indicates that the module system should never return a mocked version of 395 | * the specified module from require() (e.g. that it should always return the 396 | * real module). 397 | */ 398 | unmock(moduleName: string): JestObjectType, 399 | /** 400 | * Instructs Jest to use fake versions of the standard timer functions 401 | * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, 402 | * setImmediate and clearImmediate). 403 | */ 404 | useFakeTimers(): JestObjectType, 405 | /** 406 | * Instructs Jest to use the real versions of the standard timer functions. 407 | */ 408 | useRealTimers(): JestObjectType, 409 | /** 410 | * Creates a mock function similar to jest.fn but also tracks calls to 411 | * object[methodName]. 412 | */ 413 | spyOn(object: Object, methodName: string): JestMockFn 414 | }; 415 | 416 | type JestSpyType = { 417 | calls: JestCallsType 418 | }; 419 | 420 | /** Runs this function after every test inside this context */ 421 | declare function afterEach(fn: (done: () => void) => ?Promise, timeout?: number): void; 422 | /** Runs this function before every test inside this context */ 423 | declare function beforeEach(fn: (done: () => void) => ?Promise, timeout?: number): void; 424 | /** Runs this function after all tests have finished inside this context */ 425 | declare function afterAll(fn: (done: () => void) => ?Promise, timeout?: number): void; 426 | /** Runs this function before any tests have started inside this context */ 427 | declare function beforeAll(fn: (done: () => void) => ?Promise, timeout?: number): void; 428 | 429 | /** A context for grouping tests together */ 430 | declare var describe: { 431 | /** 432 | * Creates a block that groups together several related tests in one "test suite" 433 | */ 434 | (name: string, fn: () => void): void, 435 | 436 | /** 437 | * Only run this describe block 438 | */ 439 | only(name: string, fn: () => void): void, 440 | 441 | /** 442 | * Skip running this describe block 443 | */ 444 | skip(name: string, fn: () => void): void, 445 | }; 446 | 447 | 448 | /** An individual test unit */ 449 | declare var it: { 450 | /** 451 | * An individual test unit 452 | * 453 | * @param {string} Name of Test 454 | * @param {Function} Test 455 | * @param {number} Timeout for the test, in milliseconds. 456 | */ 457 | (name: string, fn?: (done: () => void) => ?Promise, timeout?: number): void, 458 | /** 459 | * Only run this test 460 | * 461 | * @param {string} Name of Test 462 | * @param {Function} Test 463 | * @param {number} Timeout for the test, in milliseconds. 464 | */ 465 | only(name: string, fn?: (done: () => void) => ?Promise, timeout?: number): void, 466 | /** 467 | * Skip running this test 468 | * 469 | * @param {string} Name of Test 470 | * @param {Function} Test 471 | * @param {number} Timeout for the test, in milliseconds. 472 | */ 473 | skip(name: string, fn?: (done: () => void) => ?Promise, timeout?: number): void, 474 | /** 475 | * Run the test concurrently 476 | * 477 | * @param {string} Name of Test 478 | * @param {Function} Test 479 | * @param {number} Timeout for the test, in milliseconds. 480 | */ 481 | concurrent(name: string, fn?: (done: () => void) => ?Promise, timeout?: number): void, 482 | }; 483 | declare function fit( 484 | name: string, 485 | fn: (done: () => void) => ?Promise, 486 | timeout?: number, 487 | ): void; 488 | /** An individual test unit */ 489 | declare var test: typeof it; 490 | /** A disabled group of tests */ 491 | declare var xdescribe: typeof describe; 492 | /** A focused group of tests */ 493 | declare var fdescribe: typeof describe; 494 | /** A disabled individual test */ 495 | declare var xit: typeof it; 496 | /** A disabled individual test */ 497 | declare var xtest: typeof it; 498 | 499 | /** The expect function is used every time you want to test a value */ 500 | declare var expect: { 501 | /** The object that you want to make assertions against */ 502 | (value: any): JestExpectType & JestPromiseType & EnzymeMatchersType, 503 | /** Add additional Jasmine matchers to Jest's roster */ 504 | extend(matchers: { [name: string]: JestMatcher }): void, 505 | /** Add a module that formats application-specific data structures. */ 506 | addSnapshotSerializer(serializer: (input: Object) => string): void, 507 | assertions(expectedAssertions: number): void, 508 | hasAssertions(): void, 509 | any(value: mixed): JestAsymmetricEqualityType, 510 | anything(): void, 511 | arrayContaining(value: Array): void, 512 | objectContaining(value: Object): void, 513 | /** Matches any received string that contains the exact expected string. */ 514 | stringContaining(value: string): void, 515 | stringMatching(value: string | RegExp): void 516 | }; 517 | 518 | // TODO handle return type 519 | // http://jasmine.github.io/2.4/introduction.html#section-Spies 520 | declare function spyOn(value: mixed, method: string): Object; 521 | 522 | /** Holds all functions related to manipulating test runner */ 523 | declare var jest: JestObjectType; 524 | 525 | /** 526 | * The global Jamine object, this is generally not exposed as the public API, 527 | * using features inside here could break in later versions of Jest. 528 | */ 529 | declare var jasmine: { 530 | DEFAULT_TIMEOUT_INTERVAL: number, 531 | any(value: mixed): JestAsymmetricEqualityType, 532 | anything(): void, 533 | arrayContaining(value: Array): void, 534 | clock(): JestClockType, 535 | createSpy(name: string): JestSpyType, 536 | createSpyObj( 537 | baseName: string, 538 | methodNames: Array 539 | ): { [methodName: string]: JestSpyType }, 540 | objectContaining(value: Object): void, 541 | stringMatching(value: string): void 542 | }; 543 | -------------------------------------------------------------------------------- /flow-typed/npm/localforage_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 28a0d809d56c96f3c2114c78cb016e1e 2 | // flow-typed version: <>/localforage_v^1.5.0/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'localforage' 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 'localforage' { 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 'localforage/Gruntfile' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'localforage/dist/localforage' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'localforage/dist/localforage.min' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'localforage/dist/localforage.nopromises' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'localforage/dist/localforage.nopromises.min' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'localforage/docs/localforage.min' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'localforage/docs/scripts/flatdoc' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'localforage/docs/scripts/jquery.min' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'localforage/docs/scripts/legacy' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'localforage/docs/theme/script' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'localforage/examples/main' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'localforage/examples/require' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'localforage/src/drivers/indexeddb' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'localforage/src/drivers/localstorage' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'localforage/src/drivers/websql' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'localforage/src/localforage' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'localforage/src/utils/createBlob' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'localforage/src/utils/executeCallback' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'localforage/src/utils/executeTwoCallbacks' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'localforage/src/utils/idb' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'localforage/src/utils/isIndexedDBValid' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'localforage/src/utils/isLocalStorageValid' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'localforage/src/utils/isWebSQLValid' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'localforage/src/utils/promise' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'localforage/src/utils/serializer' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'localforage/test/dummyStorageDriver' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'localforage/test/runner.browserify' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'localforage/test/runner' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'localforage/test/runner.webpack' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'localforage/test/saucelabs-browsers' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'localforage/test/serviceworker-client' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'localforage/test/test.api' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'localforage/test/test.callwhenready' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'localforage/test/test.config' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'localforage/test/test.customdriver' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'localforage/test/test.datatypes' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'localforage/test/test.drivers' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'localforage/test/test.faultydriver' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'localforage/test/test.iframes' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'localforage/test/test.nodriver' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'localforage/test/test.serviceworkers' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'localforage/test/test.webworkers' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'localforage/test/webworker-client' { 194 | declare module.exports: any; 195 | } 196 | 197 | // Filename aliases 198 | declare module 'localforage/Gruntfile.js' { 199 | declare module.exports: $Exports<'localforage/Gruntfile'>; 200 | } 201 | declare module 'localforage/dist/localforage.js' { 202 | declare module.exports: $Exports<'localforage/dist/localforage'>; 203 | } 204 | declare module 'localforage/dist/localforage.min.js' { 205 | declare module.exports: $Exports<'localforage/dist/localforage.min'>; 206 | } 207 | declare module 'localforage/dist/localforage.nopromises.js' { 208 | declare module.exports: $Exports<'localforage/dist/localforage.nopromises'>; 209 | } 210 | declare module 'localforage/dist/localforage.nopromises.min.js' { 211 | declare module.exports: $Exports<'localforage/dist/localforage.nopromises.min'>; 212 | } 213 | declare module 'localforage/docs/localforage.min.js' { 214 | declare module.exports: $Exports<'localforage/docs/localforage.min'>; 215 | } 216 | declare module 'localforage/docs/scripts/flatdoc.js' { 217 | declare module.exports: $Exports<'localforage/docs/scripts/flatdoc'>; 218 | } 219 | declare module 'localforage/docs/scripts/jquery.min.js' { 220 | declare module.exports: $Exports<'localforage/docs/scripts/jquery.min'>; 221 | } 222 | declare module 'localforage/docs/scripts/legacy.js' { 223 | declare module.exports: $Exports<'localforage/docs/scripts/legacy'>; 224 | } 225 | declare module 'localforage/docs/theme/script.js' { 226 | declare module.exports: $Exports<'localforage/docs/theme/script'>; 227 | } 228 | declare module 'localforage/examples/main.js' { 229 | declare module.exports: $Exports<'localforage/examples/main'>; 230 | } 231 | declare module 'localforage/examples/require.js' { 232 | declare module.exports: $Exports<'localforage/examples/require'>; 233 | } 234 | declare module 'localforage/src/drivers/indexeddb.js' { 235 | declare module.exports: $Exports<'localforage/src/drivers/indexeddb'>; 236 | } 237 | declare module 'localforage/src/drivers/localstorage.js' { 238 | declare module.exports: $Exports<'localforage/src/drivers/localstorage'>; 239 | } 240 | declare module 'localforage/src/drivers/websql.js' { 241 | declare module.exports: $Exports<'localforage/src/drivers/websql'>; 242 | } 243 | declare module 'localforage/src/localforage.js' { 244 | declare module.exports: $Exports<'localforage/src/localforage'>; 245 | } 246 | declare module 'localforage/src/utils/createBlob.js' { 247 | declare module.exports: $Exports<'localforage/src/utils/createBlob'>; 248 | } 249 | declare module 'localforage/src/utils/executeCallback.js' { 250 | declare module.exports: $Exports<'localforage/src/utils/executeCallback'>; 251 | } 252 | declare module 'localforage/src/utils/executeTwoCallbacks.js' { 253 | declare module.exports: $Exports<'localforage/src/utils/executeTwoCallbacks'>; 254 | } 255 | declare module 'localforage/src/utils/idb.js' { 256 | declare module.exports: $Exports<'localforage/src/utils/idb'>; 257 | } 258 | declare module 'localforage/src/utils/isIndexedDBValid.js' { 259 | declare module.exports: $Exports<'localforage/src/utils/isIndexedDBValid'>; 260 | } 261 | declare module 'localforage/src/utils/isLocalStorageValid.js' { 262 | declare module.exports: $Exports<'localforage/src/utils/isLocalStorageValid'>; 263 | } 264 | declare module 'localforage/src/utils/isWebSQLValid.js' { 265 | declare module.exports: $Exports<'localforage/src/utils/isWebSQLValid'>; 266 | } 267 | declare module 'localforage/src/utils/promise.js' { 268 | declare module.exports: $Exports<'localforage/src/utils/promise'>; 269 | } 270 | declare module 'localforage/src/utils/serializer.js' { 271 | declare module.exports: $Exports<'localforage/src/utils/serializer'>; 272 | } 273 | declare module 'localforage/test/dummyStorageDriver.js' { 274 | declare module.exports: $Exports<'localforage/test/dummyStorageDriver'>; 275 | } 276 | declare module 'localforage/test/runner.browserify.js' { 277 | declare module.exports: $Exports<'localforage/test/runner.browserify'>; 278 | } 279 | declare module 'localforage/test/runner.js' { 280 | declare module.exports: $Exports<'localforage/test/runner'>; 281 | } 282 | declare module 'localforage/test/runner.webpack.js' { 283 | declare module.exports: $Exports<'localforage/test/runner.webpack'>; 284 | } 285 | declare module 'localforage/test/saucelabs-browsers.js' { 286 | declare module.exports: $Exports<'localforage/test/saucelabs-browsers'>; 287 | } 288 | declare module 'localforage/test/serviceworker-client.js' { 289 | declare module.exports: $Exports<'localforage/test/serviceworker-client'>; 290 | } 291 | declare module 'localforage/test/test.api.js' { 292 | declare module.exports: $Exports<'localforage/test/test.api'>; 293 | } 294 | declare module 'localforage/test/test.callwhenready.js' { 295 | declare module.exports: $Exports<'localforage/test/test.callwhenready'>; 296 | } 297 | declare module 'localforage/test/test.config.js' { 298 | declare module.exports: $Exports<'localforage/test/test.config'>; 299 | } 300 | declare module 'localforage/test/test.customdriver.js' { 301 | declare module.exports: $Exports<'localforage/test/test.customdriver'>; 302 | } 303 | declare module 'localforage/test/test.datatypes.js' { 304 | declare module.exports: $Exports<'localforage/test/test.datatypes'>; 305 | } 306 | declare module 'localforage/test/test.drivers.js' { 307 | declare module.exports: $Exports<'localforage/test/test.drivers'>; 308 | } 309 | declare module 'localforage/test/test.faultydriver.js' { 310 | declare module.exports: $Exports<'localforage/test/test.faultydriver'>; 311 | } 312 | declare module 'localforage/test/test.iframes.js' { 313 | declare module.exports: $Exports<'localforage/test/test.iframes'>; 314 | } 315 | declare module 'localforage/test/test.nodriver.js' { 316 | declare module.exports: $Exports<'localforage/test/test.nodriver'>; 317 | } 318 | declare module 'localforage/test/test.serviceworkers.js' { 319 | declare module.exports: $Exports<'localforage/test/test.serviceworkers'>; 320 | } 321 | declare module 'localforage/test/test.webworkers.js' { 322 | declare module.exports: $Exports<'localforage/test/test.webworkers'>; 323 | } 324 | declare module 'localforage/test/webworker-client.js' { 325 | declare module.exports: $Exports<'localforage/test/webworker-client'>; 326 | } 327 | -------------------------------------------------------------------------------- /flow-typed/npm/react-json-view_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d04fc2e2a58ebc270920dd6bb2dddd67 2 | // flow-typed version: <>/react-json-view_v^1.12.4/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-json-view' 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 'react-json-view' { 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 'react-json-view/dist/main' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'react-json-view/dist/main.js' { 31 | declare module.exports: $Exports<'react-json-view/dist/main'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/react-notification-system_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1a019f586cb937b929a23854099585ed 2 | // flow-typed version: <>/react-notification-system_v^0.2.15/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-notification-system' 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 'react-notification-system' { 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 'react-notification-system/dist/NotificationContainer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-notification-system/dist/NotificationItem' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-notification-system/dist/NotificationSystem' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-notification-system/dist/constants' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-notification-system/dist/helpers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-notification-system/dist/react-notification-system' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-notification-system/dist/react-notification-system.min' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-notification-system/dist/styles' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-notification-system/karma.conf' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-notification-system/src/NotificationContainer' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-notification-system/src/NotificationItem' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-notification-system/src/NotificationSystem' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-notification-system/src/constants' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-notification-system/src/helpers' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-notification-system/src/styles' { 82 | declare module.exports: any; 83 | } 84 | 85 | // Filename aliases 86 | declare module 'react-notification-system/dist/NotificationContainer.js' { 87 | declare module.exports: $Exports<'react-notification-system/dist/NotificationContainer'>; 88 | } 89 | declare module 'react-notification-system/dist/NotificationItem.js' { 90 | declare module.exports: $Exports<'react-notification-system/dist/NotificationItem'>; 91 | } 92 | declare module 'react-notification-system/dist/NotificationSystem.js' { 93 | declare module.exports: $Exports<'react-notification-system/dist/NotificationSystem'>; 94 | } 95 | declare module 'react-notification-system/dist/constants.js' { 96 | declare module.exports: $Exports<'react-notification-system/dist/constants'>; 97 | } 98 | declare module 'react-notification-system/dist/helpers.js' { 99 | declare module.exports: $Exports<'react-notification-system/dist/helpers'>; 100 | } 101 | declare module 'react-notification-system/dist/react-notification-system.js' { 102 | declare module.exports: $Exports<'react-notification-system/dist/react-notification-system'>; 103 | } 104 | declare module 'react-notification-system/dist/react-notification-system.min.js' { 105 | declare module.exports: $Exports<'react-notification-system/dist/react-notification-system.min'>; 106 | } 107 | declare module 'react-notification-system/dist/styles.js' { 108 | declare module.exports: $Exports<'react-notification-system/dist/styles'>; 109 | } 110 | declare module 'react-notification-system/karma.conf.js' { 111 | declare module.exports: $Exports<'react-notification-system/karma.conf'>; 112 | } 113 | declare module 'react-notification-system/src/NotificationContainer.jsx' { 114 | declare module.exports: $Exports<'react-notification-system/src/NotificationContainer'>; 115 | } 116 | declare module 'react-notification-system/src/NotificationItem.jsx' { 117 | declare module.exports: $Exports<'react-notification-system/src/NotificationItem'>; 118 | } 119 | declare module 'react-notification-system/src/NotificationSystem.jsx' { 120 | declare module.exports: $Exports<'react-notification-system/src/NotificationSystem'>; 121 | } 122 | declare module 'react-notification-system/src/constants.js' { 123 | declare module.exports: $Exports<'react-notification-system/src/constants'>; 124 | } 125 | declare module 'react-notification-system/src/helpers.js' { 126 | declare module.exports: $Exports<'react-notification-system/src/helpers'>; 127 | } 128 | declare module 'react-notification-system/src/styles.js' { 129 | declare module.exports: $Exports<'react-notification-system/src/styles'>; 130 | } 131 | -------------------------------------------------------------------------------- /flow-typed/npm/react-pager_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e4407422b8e3833c4bc4549dabf92a41 2 | // flow-typed version: <>/react-pager_v^1.3.2/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-pager' 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 'react-pager' { 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 'react-pager/demo/bundle' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-pager/demo/js/main' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-pager/demo/webpack.config' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-pager/dist/pager' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-pager/karma.conf' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-pager/spec/component/pager' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-pager/src/pager' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-pager/webpack.config' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'react-pager/demo/bundle.js' { 59 | declare module.exports: $Exports<'react-pager/demo/bundle'>; 60 | } 61 | declare module 'react-pager/demo/js/main.jsx' { 62 | declare module.exports: $Exports<'react-pager/demo/js/main'>; 63 | } 64 | declare module 'react-pager/demo/webpack.config.js' { 65 | declare module.exports: $Exports<'react-pager/demo/webpack.config'>; 66 | } 67 | declare module 'react-pager/dist/pager.js' { 68 | declare module.exports: $Exports<'react-pager/dist/pager'>; 69 | } 70 | declare module 'react-pager/karma.conf.js' { 71 | declare module.exports: $Exports<'react-pager/karma.conf'>; 72 | } 73 | declare module 'react-pager/spec/component/pager.jsx' { 74 | declare module.exports: $Exports<'react-pager/spec/component/pager'>; 75 | } 76 | declare module 'react-pager/src/pager.jsx' { 77 | declare module.exports: $Exports<'react-pager/src/pager'>; 78 | } 79 | declare module 'react-pager/webpack.config.js' { 80 | declare module.exports: $Exports<'react-pager/webpack.config'>; 81 | } 82 | -------------------------------------------------------------------------------- /flow-typed/npm/react-redux_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f0d96df48e9abc14bcc1405ba2a47dde 2 | // flow-typed version: 83053e4020/react-redux_v5.x.x/flow_>=v0.53.x 3 | 4 | // flow-typed signature: 8db7b853f57c51094bf0ab8b2650fd9c 5 | // flow-typed version: ab8db5f14d/react-redux_v5.x.x/flow_>=v0.30.x 6 | 7 | import type { Dispatch, Store } from "redux"; 8 | 9 | declare module "react-redux" { 10 | /* 11 | 12 | S = State 13 | A = Action 14 | OP = OwnProps 15 | SP = StateProps 16 | DP = DispatchProps 17 | 18 | */ 19 | 20 | declare type MapStateToProps = ( 21 | state: S, 22 | ownProps: OP 23 | ) => ((state: S, ownProps: OP) => SP) | SP; 24 | 25 | declare type MapDispatchToProps = 26 | | ((dispatch: Dispatch, ownProps: OP) => DP) 27 | | DP; 28 | 29 | declare type MergeProps = ( 30 | stateProps: SP, 31 | dispatchProps: DP, 32 | ownProps: OP 33 | ) => P; 34 | 35 | declare type Context = { store: Store<*, *> }; 36 | 37 | declare class ConnectedComponent extends React$Component { 38 | static WrappedComponent: Class>, 39 | getWrappedInstance(): React$Component

, 40 | props: OP, 41 | state: void 42 | } 43 | 44 | declare type ConnectedComponentClass = Class< 45 | ConnectedComponent 46 | >; 47 | 48 | declare type Connector = ( 49 | component: React$ComponentType

50 | ) => ConnectedComponentClass; 51 | 52 | declare class Provider extends React$Component<{ 53 | store: Store, 54 | children?: any 55 | }> {} 56 | 57 | declare function createProvider( 58 | storeKey?: string, 59 | subKey?: string 60 | ): Provider<*, *>; 61 | 62 | declare type ConnectOptions = { 63 | pure?: boolean, 64 | withRef?: boolean 65 | }; 66 | 67 | declare type Null = null | void; 68 | 69 | declare function connect( 70 | ...rest: Array // <= workaround for https://github.com/facebook/flow/issues/2360 71 | ): Connector } & OP>>; 72 | 73 | declare function connect( 74 | mapStateToProps: Null, 75 | mapDispatchToProps: Null, 76 | mergeProps: Null, 77 | options: ConnectOptions 78 | ): Connector } & OP>>; 79 | 80 | declare function connect( 81 | mapStateToProps: MapStateToProps, 82 | mapDispatchToProps: Null, 83 | mergeProps: Null, 84 | options?: ConnectOptions 85 | ): Connector } & OP>>; 86 | 87 | declare function connect( 88 | mapStateToProps: Null, 89 | mapDispatchToProps: MapDispatchToProps, 90 | mergeProps: Null, 91 | options?: ConnectOptions 92 | ): Connector>; 93 | 94 | declare function connect( 95 | mapStateToProps: MapStateToProps, 96 | mapDispatchToProps: MapDispatchToProps, 97 | mergeProps: Null, 98 | options?: ConnectOptions 99 | ): Connector>; 100 | 101 | declare function connect( 102 | mapStateToProps: MapStateToProps, 103 | mapDispatchToProps: Null, 104 | mergeProps: MergeProps, 105 | options?: ConnectOptions 106 | ): Connector; 107 | 108 | declare function connect( 109 | mapStateToProps: MapStateToProps, 110 | mapDispatchToProps: MapDispatchToProps, 111 | mergeProps: MergeProps, 112 | options?: ConnectOptions 113 | ): Connector; 114 | } 115 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-dom_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4d8e947f2e396ef2f26ecbd1ed7f04ab 2 | // flow-typed version: 97d98ab83e/react-router-dom_v4.x.x/flow_>=v0.53.x 3 | 4 | declare module "react-router-dom" { 5 | declare export class BrowserRouter extends React$Component<{ 6 | basename?: string, 7 | forceRefresh?: boolean, 8 | getUserConfirmation?: GetUserConfirmation, 9 | keyLength?: number, 10 | children?: React$Node 11 | }> {} 12 | 13 | declare export class HashRouter extends React$Component<{ 14 | basename?: string, 15 | getUserConfirmation?: GetUserConfirmation, 16 | hashType?: "slash" | "noslash" | "hashbang", 17 | children?: React$Node 18 | }> {} 19 | 20 | declare export class Link extends React$Component<{ 21 | to: string | LocationShape, 22 | replace?: boolean, 23 | children?: React$Node 24 | }> {} 25 | 26 | declare export class NavLink extends React$Component<{ 27 | to: string | LocationShape, 28 | activeClassName?: string, 29 | className?: string, 30 | activeStyle?: Object, 31 | style?: Object, 32 | isActive?: (match: Match, location: Location) => boolean, 33 | children?: React$Node, 34 | exact?: boolean, 35 | strict?: boolean 36 | }> {} 37 | 38 | // NOTE: Below are duplicated from react-router. If updating these, please 39 | // update the react-router and react-router-native types as well. 40 | declare export type Location = { 41 | pathname: string, 42 | search: string, 43 | hash: string, 44 | state?: any, 45 | key?: string 46 | }; 47 | 48 | declare export type LocationShape = { 49 | pathname?: string, 50 | search?: string, 51 | hash?: string, 52 | state?: any 53 | }; 54 | 55 | declare export type HistoryAction = "PUSH" | "REPLACE" | "POP"; 56 | 57 | declare export type RouterHistory = { 58 | length: number, 59 | location: Location, 60 | action: HistoryAction, 61 | listen( 62 | callback: (location: Location, action: HistoryAction) => void 63 | ): () => void, 64 | push(path: string | LocationShape, state?: any): void, 65 | replace(path: string | LocationShape, state?: any): void, 66 | go(n: number): void, 67 | goBack(): void, 68 | goForward(): void, 69 | canGo?: (n: number) => boolean, 70 | block( 71 | callback: (location: Location, action: HistoryAction) => boolean 72 | ): void, 73 | // createMemoryHistory 74 | index?: number, 75 | entries?: Array 76 | }; 77 | 78 | declare export type Match = { 79 | params: { [key: string]: ?string }, 80 | isExact: boolean, 81 | path: string, 82 | url: string 83 | }; 84 | 85 | declare export type ContextRouter = {| 86 | history: RouterHistory, 87 | location: Location, 88 | match: Match 89 | |}; 90 | 91 | declare export type GetUserConfirmation = ( 92 | message: string, 93 | callback: (confirmed: boolean) => void 94 | ) => void; 95 | 96 | declare type StaticRouterContext = { 97 | url?: string 98 | }; 99 | 100 | declare export class StaticRouter extends React$Component<{ 101 | basename?: string, 102 | location?: string | Location, 103 | context: StaticRouterContext, 104 | children?: React$Node 105 | }> {} 106 | 107 | declare export class MemoryRouter extends React$Component<{ 108 | initialEntries?: Array, 109 | initialIndex?: number, 110 | getUserConfirmation?: GetUserConfirmation, 111 | keyLength?: number, 112 | children?: React$Node 113 | }> {} 114 | 115 | declare export class Router extends React$Component<{ 116 | history: RouterHistory, 117 | children?: React$Node 118 | }> {} 119 | 120 | declare export class Prompt extends React$Component<{ 121 | message: string | ((location: Location) => string | true), 122 | when?: boolean 123 | }> {} 124 | 125 | declare export class Redirect extends React$Component<{ 126 | to: string | LocationShape, 127 | push?: boolean 128 | }> {} 129 | 130 | declare export class Route extends React$Component<{ 131 | component?: React$ComponentType<*>, 132 | render?: (router: ContextRouter) => React$Node, 133 | children?: React$ComponentType | React$Node, 134 | path?: string, 135 | exact?: boolean, 136 | strict?: boolean 137 | }> {} 138 | 139 | declare export class Switch extends React$Component<{ 140 | children?: React$Node 141 | }> {} 142 | 143 | declare export function withRouter

( 144 | Component: React$ComponentType<{| ...ContextRouter, ...P |}> 145 | ): React$ComponentType

; 146 | 147 | declare type MatchPathOptions = { 148 | path?: string, 149 | exact?: boolean, 150 | sensitive?: boolean, 151 | strict?: boolean 152 | }; 153 | 154 | declare export function matchPath( 155 | pathname: string, 156 | options?: MatchPathOptions | string 157 | ): null | Match; 158 | } 159 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 755e6768b884f63b111578306f711f4a 2 | // flow-typed version: 97d98ab83e/react-router_v4.x.x/flow_>=v0.53.x 3 | 4 | declare module "react-router" { 5 | // NOTE: many of these are re-exported by react-router-dom and 6 | // react-router-native, so when making changes, please be sure to update those 7 | // as well. 8 | declare export type Location = { 9 | pathname: string, 10 | search: string, 11 | hash: string, 12 | state?: any, 13 | key?: string 14 | }; 15 | 16 | declare export type LocationShape = { 17 | pathname?: string, 18 | search?: string, 19 | hash?: string, 20 | state?: any 21 | }; 22 | 23 | declare export type HistoryAction = "PUSH" | "REPLACE" | "POP"; 24 | 25 | declare export type RouterHistory = { 26 | length: number, 27 | location: Location, 28 | action: HistoryAction, 29 | listen( 30 | callback: (location: Location, action: HistoryAction) => void 31 | ): () => void, 32 | push(path: string | LocationShape, state?: any): void, 33 | replace(path: string | LocationShape, state?: any): void, 34 | go(n: number): void, 35 | goBack(): void, 36 | goForward(): void, 37 | canGo?: (n: number) => boolean, 38 | block( 39 | callback: (location: Location, action: HistoryAction) => boolean 40 | ): void, 41 | // createMemoryHistory 42 | index?: number, 43 | entries?: Array 44 | }; 45 | 46 | declare export type Match = { 47 | params: { [key: string]: ?string }, 48 | isExact: boolean, 49 | path: string, 50 | url: string 51 | }; 52 | 53 | declare export type ContextRouter = {| 54 | history: RouterHistory, 55 | location: Location, 56 | match: Match 57 | |}; 58 | 59 | declare export type GetUserConfirmation = ( 60 | message: string, 61 | callback: (confirmed: boolean) => void 62 | ) => void; 63 | 64 | declare type StaticRouterContext = {| 65 | url?: string 66 | |}; 67 | 68 | declare export class StaticRouter extends React$Component<{ 69 | basename?: string, 70 | location?: string | Location, 71 | context: StaticRouterContext, 72 | children?: React$Node 73 | }> {} 74 | 75 | declare export class MemoryRouter extends React$Component<{ 76 | initialEntries?: Array, 77 | initialIndex?: number, 78 | getUserConfirmation?: GetUserConfirmation, 79 | keyLength?: number, 80 | children?: React$Node 81 | }> {} 82 | 83 | declare export class Router extends React$Component<{ 84 | history: RouterHistory, 85 | children?: React$Node 86 | }> {} 87 | 88 | declare export class Prompt extends React$Component<{ 89 | message: string | ((location: Location) => string | true), 90 | when?: boolean 91 | }> {} 92 | 93 | declare export class Redirect extends React$Component<{ 94 | to: string | LocationShape, 95 | push?: boolean 96 | }> {} 97 | 98 | declare export class Route extends React$Component<{ 99 | component?: React$ComponentType<*>, 100 | render?: (router: ContextRouter) => React$Node, 101 | children?: React$ComponentType | React$Node, 102 | path?: string, 103 | exact?: boolean, 104 | strict?: boolean 105 | }> {} 106 | 107 | declare export class Switch extends React$Component<{ 108 | children?: React$Node 109 | }> {} 110 | 111 | declare export function withRouter

( 112 | Component: React$ComponentType<{| ...ContextRouter, ...P |}> 113 | ): React$ComponentType

; 114 | 115 | declare type MatchPathOptions = { 116 | path?: string, 117 | exact?: boolean, 118 | strict?: boolean, 119 | sensitive?: boolean 120 | }; 121 | declare export function matchPath( 122 | pathname: string, 123 | options?: MatchPathOptions | string 124 | ): null | Match; 125 | } 126 | -------------------------------------------------------------------------------- /flow-typed/npm/react-scripts_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f344b022b859543861fe2f9fad31462b 2 | // flow-typed version: <>/react-scripts_v1.0.13/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-scripts' 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 'react-scripts' { 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 'react-scripts/bin/react-scripts' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-scripts/config/env' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-scripts/config/jest/babelTransform' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-scripts/config/jest/cssTransform' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-scripts/config/jest/fileTransform' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-scripts/config/paths' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-scripts/config/polyfills' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-scripts/config/webpack.config.dev' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-scripts/config/webpack.config.prod' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-scripts/config/webpackDevServer.config' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-scripts/scripts/build' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-scripts/scripts/eject' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-scripts/scripts/init' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-scripts/scripts/start' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-scripts/scripts/test' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-scripts/scripts/utils/createJestConfig' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-scripts/template/src/App' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-scripts/template/src/App.test' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-scripts/template/src/index' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-scripts/template/src/registerServiceWorker' { 102 | declare module.exports: any; 103 | } 104 | 105 | // Filename aliases 106 | declare module 'react-scripts/bin/react-scripts.js' { 107 | declare module.exports: $Exports<'react-scripts/bin/react-scripts'>; 108 | } 109 | declare module 'react-scripts/config/env.js' { 110 | declare module.exports: $Exports<'react-scripts/config/env'>; 111 | } 112 | declare module 'react-scripts/config/jest/babelTransform.js' { 113 | declare module.exports: $Exports<'react-scripts/config/jest/babelTransform'>; 114 | } 115 | declare module 'react-scripts/config/jest/cssTransform.js' { 116 | declare module.exports: $Exports<'react-scripts/config/jest/cssTransform'>; 117 | } 118 | declare module 'react-scripts/config/jest/fileTransform.js' { 119 | declare module.exports: $Exports<'react-scripts/config/jest/fileTransform'>; 120 | } 121 | declare module 'react-scripts/config/paths.js' { 122 | declare module.exports: $Exports<'react-scripts/config/paths'>; 123 | } 124 | declare module 'react-scripts/config/polyfills.js' { 125 | declare module.exports: $Exports<'react-scripts/config/polyfills'>; 126 | } 127 | declare module 'react-scripts/config/webpack.config.dev.js' { 128 | declare module.exports: $Exports<'react-scripts/config/webpack.config.dev'>; 129 | } 130 | declare module 'react-scripts/config/webpack.config.prod.js' { 131 | declare module.exports: $Exports<'react-scripts/config/webpack.config.prod'>; 132 | } 133 | declare module 'react-scripts/config/webpackDevServer.config.js' { 134 | declare module.exports: $Exports<'react-scripts/config/webpackDevServer.config'>; 135 | } 136 | declare module 'react-scripts/scripts/build.js' { 137 | declare module.exports: $Exports<'react-scripts/scripts/build'>; 138 | } 139 | declare module 'react-scripts/scripts/eject.js' { 140 | declare module.exports: $Exports<'react-scripts/scripts/eject'>; 141 | } 142 | declare module 'react-scripts/scripts/init.js' { 143 | declare module.exports: $Exports<'react-scripts/scripts/init'>; 144 | } 145 | declare module 'react-scripts/scripts/start.js' { 146 | declare module.exports: $Exports<'react-scripts/scripts/start'>; 147 | } 148 | declare module 'react-scripts/scripts/test.js' { 149 | declare module.exports: $Exports<'react-scripts/scripts/test'>; 150 | } 151 | declare module 'react-scripts/scripts/utils/createJestConfig.js' { 152 | declare module.exports: $Exports<'react-scripts/scripts/utils/createJestConfig'>; 153 | } 154 | declare module 'react-scripts/template/src/App.js' { 155 | declare module.exports: $Exports<'react-scripts/template/src/App'>; 156 | } 157 | declare module 'react-scripts/template/src/App.test.js' { 158 | declare module.exports: $Exports<'react-scripts/template/src/App.test'>; 159 | } 160 | declare module 'react-scripts/template/src/index.js' { 161 | declare module.exports: $Exports<'react-scripts/template/src/index'>; 162 | } 163 | declare module 'react-scripts/template/src/registerServiceWorker.js' { 164 | declare module.exports: $Exports<'react-scripts/template/src/registerServiceWorker'>; 165 | } 166 | -------------------------------------------------------------------------------- /flow-typed/npm/react-sidenav_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b21bda85cfde5f424cf58470d4c2b4aa 2 | // flow-typed version: <>/react-sidenav_v^2.1.2/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-sidenav' 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 'react-sidenav' { 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 'react-sidenav/Nav' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-sidenav/Nav.test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-sidenav/SideNav' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-sidenav/SideNav.test' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-sidenav/index.test' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-sidenav/withRR4' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-sidenav/withRR4.test' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'react-sidenav/Nav.js' { 55 | declare module.exports: $Exports<'react-sidenav/Nav'>; 56 | } 57 | declare module 'react-sidenav/Nav.test.js' { 58 | declare module.exports: $Exports<'react-sidenav/Nav.test'>; 59 | } 60 | declare module 'react-sidenav/SideNav.js' { 61 | declare module.exports: $Exports<'react-sidenav/SideNav'>; 62 | } 63 | declare module 'react-sidenav/SideNav.test.js' { 64 | declare module.exports: $Exports<'react-sidenav/SideNav.test'>; 65 | } 66 | declare module 'react-sidenav/index' { 67 | declare module.exports: $Exports<'react-sidenav'>; 68 | } 69 | declare module 'react-sidenav/index.js' { 70 | declare module.exports: $Exports<'react-sidenav'>; 71 | } 72 | declare module 'react-sidenav/index.test.js' { 73 | declare module.exports: $Exports<'react-sidenav/index.test'>; 74 | } 75 | declare module 'react-sidenav/withRR4.js' { 76 | declare module.exports: $Exports<'react-sidenav/withRR4'>; 77 | } 78 | declare module 'react-sidenav/withRR4.test.js' { 79 | declare module.exports: $Exports<'react-sidenav/withRR4.test'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/react-table_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c2978b3fd45cacd73086f61c015c1712 2 | // flow-typed version: <>/react-table_v^6.5.3/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-table' 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 'react-table' { 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 'react-table/lib/defaultProps' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-table/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-table/lib/lifecycle' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-table/lib/methods' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-table/lib/pagination' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-table/lib/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-table/react-table' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-table/src/defaultProps' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-table/src/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-table/src/lifecycle' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-table/src/methods' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-table/src/pagination' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-table/src/utils' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'react-table/lib/defaultProps.js' { 79 | declare module.exports: $Exports<'react-table/lib/defaultProps'>; 80 | } 81 | declare module 'react-table/lib/index.js' { 82 | declare module.exports: $Exports<'react-table/lib/index'>; 83 | } 84 | declare module 'react-table/lib/lifecycle.js' { 85 | declare module.exports: $Exports<'react-table/lib/lifecycle'>; 86 | } 87 | declare module 'react-table/lib/methods.js' { 88 | declare module.exports: $Exports<'react-table/lib/methods'>; 89 | } 90 | declare module 'react-table/lib/pagination.js' { 91 | declare module.exports: $Exports<'react-table/lib/pagination'>; 92 | } 93 | declare module 'react-table/lib/utils.js' { 94 | declare module.exports: $Exports<'react-table/lib/utils'>; 95 | } 96 | declare module 'react-table/react-table.js' { 97 | declare module.exports: $Exports<'react-table/react-table'>; 98 | } 99 | declare module 'react-table/src/defaultProps.js' { 100 | declare module.exports: $Exports<'react-table/src/defaultProps'>; 101 | } 102 | declare module 'react-table/src/index.js' { 103 | declare module.exports: $Exports<'react-table/src/index'>; 104 | } 105 | declare module 'react-table/src/lifecycle.js' { 106 | declare module.exports: $Exports<'react-table/src/lifecycle'>; 107 | } 108 | declare module 'react-table/src/methods.js' { 109 | declare module.exports: $Exports<'react-table/src/methods'>; 110 | } 111 | declare module 'react-table/src/pagination.js' { 112 | declare module.exports: $Exports<'react-table/src/pagination'>; 113 | } 114 | declare module 'react-table/src/utils.js' { 115 | declare module.exports: $Exports<'react-table/src/utils'>; 116 | } 117 | -------------------------------------------------------------------------------- /flow-typed/npm/react-tabs_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2251d0e8821d1d461731b9351097bab4 2 | // flow-typed version: <>/react-tabs_v^2.0.0/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-tabs' 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 'react-tabs' { 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 'react-tabs/dist/react-tabs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-tabs/dist/react-tabs.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-tabs/lib/components/Tab' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-tabs/lib/components/TabList' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-tabs/lib/components/TabPanel' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-tabs/lib/components/Tabs' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-tabs/lib/components/UncontrolledTabs' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-tabs/lib/helpers/childrenDeepMap' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-tabs/lib/helpers/count' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-tabs/lib/helpers/elementTypes' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-tabs/lib/helpers/propTypes' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-tabs/lib/helpers/uuid' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-tabs/lib/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'react-tabs/dist/react-tabs.js' { 79 | declare module.exports: $Exports<'react-tabs/dist/react-tabs'>; 80 | } 81 | declare module 'react-tabs/dist/react-tabs.min.js' { 82 | declare module.exports: $Exports<'react-tabs/dist/react-tabs.min'>; 83 | } 84 | declare module 'react-tabs/lib/components/Tab.js' { 85 | declare module.exports: $Exports<'react-tabs/lib/components/Tab'>; 86 | } 87 | declare module 'react-tabs/lib/components/TabList.js' { 88 | declare module.exports: $Exports<'react-tabs/lib/components/TabList'>; 89 | } 90 | declare module 'react-tabs/lib/components/TabPanel.js' { 91 | declare module.exports: $Exports<'react-tabs/lib/components/TabPanel'>; 92 | } 93 | declare module 'react-tabs/lib/components/Tabs.js' { 94 | declare module.exports: $Exports<'react-tabs/lib/components/Tabs'>; 95 | } 96 | declare module 'react-tabs/lib/components/UncontrolledTabs.js' { 97 | declare module.exports: $Exports<'react-tabs/lib/components/UncontrolledTabs'>; 98 | } 99 | declare module 'react-tabs/lib/helpers/childrenDeepMap.js' { 100 | declare module.exports: $Exports<'react-tabs/lib/helpers/childrenDeepMap'>; 101 | } 102 | declare module 'react-tabs/lib/helpers/count.js' { 103 | declare module.exports: $Exports<'react-tabs/lib/helpers/count'>; 104 | } 105 | declare module 'react-tabs/lib/helpers/elementTypes.js' { 106 | declare module.exports: $Exports<'react-tabs/lib/helpers/elementTypes'>; 107 | } 108 | declare module 'react-tabs/lib/helpers/propTypes.js' { 109 | declare module.exports: $Exports<'react-tabs/lib/helpers/propTypes'>; 110 | } 111 | declare module 'react-tabs/lib/helpers/uuid.js' { 112 | declare module.exports: $Exports<'react-tabs/lib/helpers/uuid'>; 113 | } 114 | declare module 'react-tabs/lib/index.js' { 115 | declare module.exports: $Exports<'react-tabs/lib/index'>; 116 | } 117 | -------------------------------------------------------------------------------- /flow-typed/npm/react-tap-event-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ad995a87308ed27aff4cc98e99192318 2 | // flow-typed version: <>/react-tap-event-plugin_v^2.0.1/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-tap-event-plugin' 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 'react-tap-event-plugin' { 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 'react-tap-event-plugin/src/TapEventPlugin' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-tap-event-plugin/src/TouchEventUtils' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-tap-event-plugin/src/defaultClickRejectionStrategy' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-tap-event-plugin/src/injectTapEventPlugin' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'react-tap-event-plugin/src/TapEventPlugin.js' { 43 | declare module.exports: $Exports<'react-tap-event-plugin/src/TapEventPlugin'>; 44 | } 45 | declare module 'react-tap-event-plugin/src/TouchEventUtils.js' { 46 | declare module.exports: $Exports<'react-tap-event-plugin/src/TouchEventUtils'>; 47 | } 48 | declare module 'react-tap-event-plugin/src/defaultClickRejectionStrategy.js' { 49 | declare module.exports: $Exports<'react-tap-event-plugin/src/defaultClickRejectionStrategy'>; 50 | } 51 | declare module 'react-tap-event-plugin/src/injectTapEventPlugin.js' { 52 | declare module.exports: $Exports<'react-tap-event-plugin/src/injectTapEventPlugin'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-devtools-extension_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 20337ea7529d612463cccc21ea9e1cd4 2 | // flow-typed version: b43dff3e0e/redux-devtools-extension_v2.x.x/flow_>=v0.47.x 3 | 4 | import type { ActionCreator, StoreEnhancer } from 'redux'; 5 | import typeof { compose } from 'redux'; 6 | 7 | declare type $npm$ReduxDevtoolsExtension$DevToolsOptions = { 8 | name?: string, 9 | actionCreators?: Array> | { [string]: ActionCreator }, 10 | latency?: number, 11 | maxAge?: number, 12 | serialize?: boolean | { 13 | date?: boolean; 14 | regex?: boolean; 15 | undefined?: boolean; 16 | error?: boolean; 17 | symbol?: boolean; 18 | map?: boolean; 19 | set?: boolean; 20 | function?: boolean | Function; 21 | }, 22 | actionSanitizer?: }>(action: A, id: number) => A, 23 | stateSanitizer?: (state: S, index: number) => S, 24 | actionsBlacklist?: string | string[], 25 | actionsWhitelist?: string | string[], 26 | predicate?: }>(state: S, action: A) => boolean, 27 | shouldRecordChanges?: boolean, 28 | pauseActionType?: string, 29 | autoPause?: boolean, 30 | shouldStartLocked?: boolean, 31 | shouldHotReload?: boolean, 32 | shouldCatchErrors?: boolean, 33 | features?: { 34 | pause?: boolean, 35 | lock?: boolean, 36 | persist?: boolean, 37 | export?: boolean | "custom", 38 | import?: boolean | "custom", 39 | jump?: boolean, 40 | skip?: boolean, 41 | reorder?: boolean, 42 | dispatch?: boolean, 43 | test?: boolean 44 | } 45 | }; 46 | 47 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools(ab: A => B): A => B; 48 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools(options: $npm$ReduxDevtoolsExtension$DevToolsOptions): compose; 49 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 50 | bc: B => C, 51 | ab: A => B 52 | ): A => C; 53 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 54 | cd: C => D, 55 | bc: B => C, 56 | ab: A => B 57 | ): A => D; 58 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 59 | de: D => E, 60 | cd: C => D, 61 | bc: B => C, 62 | ab: A => B 63 | ): A => E; 64 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 65 | ef: E => F, 66 | de: D => E, 67 | cd: C => D, 68 | bc: B => C, 69 | ab: A => B 70 | ): A => F; 71 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 72 | fg: F => G, 73 | ef: E => F, 74 | de: D => E, 75 | cd: C => D, 76 | bc: B => C, 77 | ab: A => B 78 | ): A => G; 79 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 80 | gh: G => H, 81 | fg: F => G, 82 | ef: E => F, 83 | de: D => E, 84 | cd: C => D, 85 | bc: B => C, 86 | ab: A => B 87 | ): A => H; 88 | declare function $npm$ReduxDevtoolsExtension$composeWithDevTools( 89 | hi: H => I, 90 | gh: G => H, 91 | fg: F => G, 92 | ef: E => F, 93 | de: D => E, 94 | cd: C => D, 95 | bc: B => C, 96 | ab: A => B 97 | ): A => H; 98 | 99 | declare function $npm$ReduxDevtoolsExtension$devToolsEnhancer(options: $npm$ReduxDevtoolsExtension$DevToolsOptions): StoreEnhancer; 100 | 101 | declare module 'redux-devtools-extension' { 102 | declare export type DevToolsOptions = $npm$ReduxDevtoolsExtension$DevToolsOptions; 103 | 104 | declare export var composeWithDevTools: typeof $npm$ReduxDevtoolsExtension$composeWithDevTools; 105 | declare export var devToolsEnhancer: typeof $npm$ReduxDevtoolsExtension$devToolsEnhancer; 106 | } 107 | 108 | declare module 'redux-devtools-extension/developmentOnly' { 109 | declare export type DevToolsOptions = $npm$ReduxDevtoolsExtension$DevToolsOptions; 110 | 111 | declare export var composeWithDevTools: typeof $npm$ReduxDevtoolsExtension$composeWithDevTools; 112 | declare export var devToolsEnhancer: typeof $npm$ReduxDevtoolsExtension$devToolsEnhancer; 113 | } 114 | 115 | declare module 'redux-devtools-extension/logOnly' { 116 | declare export type DevToolsOptions = $npm$ReduxDevtoolsExtension$DevToolsOptions; 117 | 118 | declare export var composeWithDevTools: typeof $npm$ReduxDevtoolsExtension$composeWithDevTools; 119 | declare export var devToolsEnhancer: typeof $npm$ReduxDevtoolsExtension$devToolsEnhancer; 120 | } 121 | 122 | declare module 'redux-devtools-extension/logOnlyInProduction' { 123 | declare export type DevToolsOptions = $npm$ReduxDevtoolsExtension$DevToolsOptions; 124 | 125 | declare export var composeWithDevTools: typeof $npm$ReduxDevtoolsExtension$composeWithDevTools; 126 | declare export var devToolsEnhancer: typeof $npm$ReduxDevtoolsExtension$devToolsEnhancer; 127 | } 128 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-logger_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 03c7da76635a699188041ffa5ed9686f 2 | // flow-typed version: <>/redux-logger_v^3.0.6/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-logger' 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 'redux-logger' { 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 'redux-logger/dist/redux-logger' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-logger/src/core' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-logger/src/defaults' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-logger/src/diff' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-logger/src/helpers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'redux-logger/src/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'redux-logger/dist/redux-logger.js' { 51 | declare module.exports: $Exports<'redux-logger/dist/redux-logger'>; 52 | } 53 | declare module 'redux-logger/src/core.js' { 54 | declare module.exports: $Exports<'redux-logger/src/core'>; 55 | } 56 | declare module 'redux-logger/src/defaults.js' { 57 | declare module.exports: $Exports<'redux-logger/src/defaults'>; 58 | } 59 | declare module 'redux-logger/src/diff.js' { 60 | declare module.exports: $Exports<'redux-logger/src/diff'>; 61 | } 62 | declare module 'redux-logger/src/helpers.js' { 63 | declare module.exports: $Exports<'redux-logger/src/helpers'>; 64 | } 65 | declare module 'redux-logger/src/index.js' { 66 | declare module.exports: $Exports<'redux-logger/src/index'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-observable_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 02c8f5c73aa42e9bafbb5dcda4261785 2 | // flow-typed version: <>/redux-observable_v^0.16.0/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-observable' 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 'redux-observable' { 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 'redux-observable/dist/redux-observable' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-observable/dist/redux-observable.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-observable/lib/cjs/ActionsObservable' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-observable/lib/cjs/EPIC_END' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-observable/lib/cjs/combineEpics' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'redux-observable/lib/cjs/createEpicMiddleware' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'redux-observable/lib/cjs/index' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'redux-observable/lib/es/ActionsObservable' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'redux-observable/lib/es/EPIC_END' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'redux-observable/lib/es/combineEpics' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'redux-observable/lib/es/createEpicMiddleware' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'redux-observable/lib/es/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'redux-observable/dist/redux-observable.js' { 75 | declare module.exports: $Exports<'redux-observable/dist/redux-observable'>; 76 | } 77 | declare module 'redux-observable/dist/redux-observable.min.js' { 78 | declare module.exports: $Exports<'redux-observable/dist/redux-observable.min'>; 79 | } 80 | declare module 'redux-observable/lib/cjs/ActionsObservable.js' { 81 | declare module.exports: $Exports<'redux-observable/lib/cjs/ActionsObservable'>; 82 | } 83 | declare module 'redux-observable/lib/cjs/EPIC_END.js' { 84 | declare module.exports: $Exports<'redux-observable/lib/cjs/EPIC_END'>; 85 | } 86 | declare module 'redux-observable/lib/cjs/combineEpics.js' { 87 | declare module.exports: $Exports<'redux-observable/lib/cjs/combineEpics'>; 88 | } 89 | declare module 'redux-observable/lib/cjs/createEpicMiddleware.js' { 90 | declare module.exports: $Exports<'redux-observable/lib/cjs/createEpicMiddleware'>; 91 | } 92 | declare module 'redux-observable/lib/cjs/index.js' { 93 | declare module.exports: $Exports<'redux-observable/lib/cjs/index'>; 94 | } 95 | declare module 'redux-observable/lib/es/ActionsObservable.js' { 96 | declare module.exports: $Exports<'redux-observable/lib/es/ActionsObservable'>; 97 | } 98 | declare module 'redux-observable/lib/es/EPIC_END.js' { 99 | declare module.exports: $Exports<'redux-observable/lib/es/EPIC_END'>; 100 | } 101 | declare module 'redux-observable/lib/es/combineEpics.js' { 102 | declare module.exports: $Exports<'redux-observable/lib/es/combineEpics'>; 103 | } 104 | declare module 'redux-observable/lib/es/createEpicMiddleware.js' { 105 | declare module.exports: $Exports<'redux-observable/lib/es/createEpicMiddleware'>; 106 | } 107 | declare module 'redux-observable/lib/es/index.js' { 108 | declare module.exports: $Exports<'redux-observable/lib/es/index'>; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-persist_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a760e6596d5e6a69f135f78a40993e95 2 | // flow-typed version: <>/redux-persist_v4.x.x/flow_v0.54.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-persist' 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 'redux-persist' { 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 'redux-persist/dist/redux-persist' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-persist/dist/redux-persist.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-persist/es/autoRehydrate' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-persist/es/constants' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-persist/es/createPersistor' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'redux-persist/es/createTransform' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'redux-persist/es/defaultStorages' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'redux-persist/es/defaults/asyncLocalStorage' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'redux-persist/es/getStoredState' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'redux-persist/es/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'redux-persist/es/persistStore' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'redux-persist/es/purgeStoredState' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'redux-persist/es/utils/isStatePlainEnough' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'redux-persist/es/utils/setImmediate' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'redux-persist/lib/autoRehydrate' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'redux-persist/lib/constants' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'redux-persist/lib/createPersistor' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'redux-persist/lib/createTransform' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'redux-persist/lib/defaultStorages' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'redux-persist/lib/defaults/asyncLocalStorage' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'redux-persist/lib/getStoredState' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'redux-persist/lib/index' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'redux-persist/lib/persistStore' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'redux-persist/lib/purgeStoredState' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'redux-persist/lib/utils/isStatePlainEnough' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'redux-persist/lib/utils/setImmediate' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'redux-persist/src/autoRehydrate' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'redux-persist/src/constants' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'redux-persist/src/createPersistor' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'redux-persist/src/createTransform' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'redux-persist/src/defaultStorages' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'redux-persist/src/defaults/asyncLocalStorage' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'redux-persist/src/getStoredState' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'redux-persist/src/index' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'redux-persist/src/persistStore' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'redux-persist/src/purgeStoredState' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'redux-persist/src/utils/isStatePlainEnough' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'redux-persist/src/utils/setImmediate' { 174 | declare module.exports: any; 175 | } 176 | 177 | // Filename aliases 178 | declare module 'redux-persist/dist/redux-persist.js' { 179 | declare module.exports: $Exports<'redux-persist/dist/redux-persist'>; 180 | } 181 | declare module 'redux-persist/dist/redux-persist.min.js' { 182 | declare module.exports: $Exports<'redux-persist/dist/redux-persist.min'>; 183 | } 184 | declare module 'redux-persist/es/autoRehydrate.js' { 185 | declare module.exports: $Exports<'redux-persist/es/autoRehydrate'>; 186 | } 187 | declare module 'redux-persist/es/constants.js' { 188 | declare module.exports: $Exports<'redux-persist/es/constants'>; 189 | } 190 | declare module 'redux-persist/es/createPersistor.js' { 191 | declare module.exports: $Exports<'redux-persist/es/createPersistor'>; 192 | } 193 | declare module 'redux-persist/es/createTransform.js' { 194 | declare module.exports: $Exports<'redux-persist/es/createTransform'>; 195 | } 196 | declare module 'redux-persist/es/defaultStorages.js' { 197 | declare module.exports: $Exports<'redux-persist/es/defaultStorages'>; 198 | } 199 | declare module 'redux-persist/es/defaults/asyncLocalStorage.js' { 200 | declare module.exports: $Exports<'redux-persist/es/defaults/asyncLocalStorage'>; 201 | } 202 | declare module 'redux-persist/es/getStoredState.js' { 203 | declare module.exports: $Exports<'redux-persist/es/getStoredState'>; 204 | } 205 | declare module 'redux-persist/es/index.js' { 206 | declare module.exports: $Exports<'redux-persist/es/index'>; 207 | } 208 | declare module 'redux-persist/es/persistStore.js' { 209 | declare module.exports: $Exports<'redux-persist/es/persistStore'>; 210 | } 211 | declare module 'redux-persist/es/purgeStoredState.js' { 212 | declare module.exports: $Exports<'redux-persist/es/purgeStoredState'>; 213 | } 214 | declare module 'redux-persist/es/utils/isStatePlainEnough.js' { 215 | declare module.exports: $Exports<'redux-persist/es/utils/isStatePlainEnough'>; 216 | } 217 | declare module 'redux-persist/es/utils/setImmediate.js' { 218 | declare module.exports: $Exports<'redux-persist/es/utils/setImmediate'>; 219 | } 220 | declare module 'redux-persist/lib/autoRehydrate.js' { 221 | declare module.exports: $Exports<'redux-persist/lib/autoRehydrate'>; 222 | } 223 | declare module 'redux-persist/lib/constants.js' { 224 | declare module.exports: $Exports<'redux-persist/lib/constants'>; 225 | } 226 | declare module 'redux-persist/lib/createPersistor.js' { 227 | declare module.exports: $Exports<'redux-persist/lib/createPersistor'>; 228 | } 229 | declare module 'redux-persist/lib/createTransform.js' { 230 | declare module.exports: $Exports<'redux-persist/lib/createTransform'>; 231 | } 232 | declare module 'redux-persist/lib/defaultStorages.js' { 233 | declare module.exports: $Exports<'redux-persist/lib/defaultStorages'>; 234 | } 235 | declare module 'redux-persist/lib/defaults/asyncLocalStorage.js' { 236 | declare module.exports: $Exports<'redux-persist/lib/defaults/asyncLocalStorage'>; 237 | } 238 | declare module 'redux-persist/lib/getStoredState.js' { 239 | declare module.exports: $Exports<'redux-persist/lib/getStoredState'>; 240 | } 241 | declare module 'redux-persist/lib/index.js' { 242 | declare module.exports: $Exports<'redux-persist/lib/index'>; 243 | } 244 | declare module 'redux-persist/lib/persistStore.js' { 245 | declare module.exports: $Exports<'redux-persist/lib/persistStore'>; 246 | } 247 | declare module 'redux-persist/lib/purgeStoredState.js' { 248 | declare module.exports: $Exports<'redux-persist/lib/purgeStoredState'>; 249 | } 250 | declare module 'redux-persist/lib/utils/isStatePlainEnough.js' { 251 | declare module.exports: $Exports<'redux-persist/lib/utils/isStatePlainEnough'>; 252 | } 253 | declare module 'redux-persist/lib/utils/setImmediate.js' { 254 | declare module.exports: $Exports<'redux-persist/lib/utils/setImmediate'>; 255 | } 256 | declare module 'redux-persist/src/autoRehydrate.js' { 257 | declare module.exports: $Exports<'redux-persist/src/autoRehydrate'>; 258 | } 259 | declare module 'redux-persist/src/constants.js' { 260 | declare module.exports: $Exports<'redux-persist/src/constants'>; 261 | } 262 | declare module 'redux-persist/src/createPersistor.js' { 263 | declare module.exports: $Exports<'redux-persist/src/createPersistor'>; 264 | } 265 | declare module 'redux-persist/src/createTransform.js' { 266 | declare module.exports: $Exports<'redux-persist/src/createTransform'>; 267 | } 268 | declare module 'redux-persist/src/defaultStorages.js' { 269 | declare module.exports: $Exports<'redux-persist/src/defaultStorages'>; 270 | } 271 | declare module 'redux-persist/src/defaults/asyncLocalStorage.js' { 272 | declare module.exports: $Exports<'redux-persist/src/defaults/asyncLocalStorage'>; 273 | } 274 | declare module 'redux-persist/src/getStoredState.js' { 275 | declare module.exports: $Exports<'redux-persist/src/getStoredState'>; 276 | } 277 | declare module 'redux-persist/src/index.js' { 278 | declare module.exports: $Exports<'redux-persist/src/index'>; 279 | } 280 | declare module 'redux-persist/src/persistStore.js' { 281 | declare module.exports: $Exports<'redux-persist/src/persistStore'>; 282 | } 283 | declare module 'redux-persist/src/purgeStoredState.js' { 284 | declare module.exports: $Exports<'redux-persist/src/purgeStoredState'>; 285 | } 286 | declare module 'redux-persist/src/utils/isStatePlainEnough.js' { 287 | declare module.exports: $Exports<'redux-persist/src/utils/isStatePlainEnough'>; 288 | } 289 | declare module 'redux-persist/src/utils/setImmediate.js' { 290 | declare module.exports: $Exports<'redux-persist/src/utils/setImmediate'>; 291 | } 292 | -------------------------------------------------------------------------------- /flow-typed/npm/redux_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 86993bd000012d3e1ef10d757d16952d 2 | // flow-typed version: a165222d28/redux_v3.x.x/flow_>=v0.33.x 3 | 4 | declare module 'redux' { 5 | 6 | /* 7 | 8 | S = State 9 | A = Action 10 | D = Dispatch 11 | 12 | */ 13 | 14 | declare type DispatchAPI = (action: A) => A; 15 | declare type Dispatch }> = DispatchAPI; 16 | 17 | declare type MiddlewareAPI> = { 18 | dispatch: D; 19 | getState(): S; 20 | }; 21 | 22 | declare type Store> = { 23 | // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) 24 | dispatch: D; 25 | getState(): S; 26 | subscribe(listener: () => void): () => void; 27 | replaceReducer(nextReducer: Reducer): void 28 | }; 29 | 30 | declare type Reducer = (state: S, action: A) => S; 31 | 32 | declare type CombinedReducer = (state: $Shape & {} | void, action: A) => S; 33 | 34 | declare type Middleware> = 35 | (api: MiddlewareAPI) => 36 | (next: D) => D; 37 | 38 | declare type StoreCreator> = { 39 | (reducer: Reducer, enhancer?: StoreEnhancer): Store; 40 | (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 41 | }; 42 | 43 | declare type StoreEnhancer> = (next: StoreCreator) => StoreCreator; 44 | 45 | declare function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; 46 | declare function createStore(reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 47 | 48 | declare function applyMiddleware(...middlewares: Array>): StoreEnhancer; 49 | 50 | declare type ActionCreator = (...args: Array) => A; 51 | declare type ActionCreators = { [key: K]: ActionCreator }; 52 | 53 | declare function bindActionCreators, D: DispatchAPI>(actionCreator: C, dispatch: D): C; 54 | declare function bindActionCreators, D: DispatchAPI>(actionCreators: C, dispatch: D): C; 55 | 56 | declare function combineReducers(reducers: O): CombinedReducer<$ObjMap(r: Reducer) => S>, A>; 57 | 58 | declare function compose(ab: (a: A) => B): (a: A) => B 59 | declare function compose( 60 | bc: (b: B) => C, 61 | ab: (a: A) => B 62 | ): (a: A) => C 63 | declare function compose( 64 | cd: (c: C) => D, 65 | bc: (b: B) => C, 66 | ab: (a: A) => B 67 | ): (a: A) => D 68 | declare function compose( 69 | de: (d: D) => E, 70 | cd: (c: C) => D, 71 | bc: (b: B) => C, 72 | ab: (a: A) => B 73 | ): (a: A) => E 74 | declare function compose( 75 | ef: (e: E) => F, 76 | de: (d: D) => E, 77 | cd: (c: C) => D, 78 | bc: (b: B) => C, 79 | ab: (a: A) => B 80 | ): (a: A) => F 81 | declare function compose( 82 | fg: (f: F) => G, 83 | ef: (e: E) => F, 84 | de: (d: D) => E, 85 | cd: (c: C) => D, 86 | bc: (b: B) => C, 87 | ab: (a: A) => B 88 | ): (a: A) => G 89 | declare function compose( 90 | gh: (g: G) => H, 91 | fg: (f: F) => G, 92 | ef: (e: E) => F, 93 | de: (d: D) => E, 94 | cd: (c: C) => D, 95 | bc: (b: B) => C, 96 | ab: (a: A) => B 97 | ): (a: A) => H 98 | declare function compose( 99 | hi: (h: H) => I, 100 | gh: (g: G) => H, 101 | fg: (f: F) => G, 102 | ef: (e: E) => F, 103 | de: (d: D) => E, 104 | cd: (c: C) => D, 105 | bc: (b: B) => C, 106 | ab: (a: A) => B 107 | ): (a: A) => I 108 | 109 | } 110 | -------------------------------------------------------------------------------- /kafka-setup/README.md: -------------------------------------------------------------------------------- 1 | ## Local Kafka Dev Setup 2 | 3 | ### Requirements 4 | 5 | * Docker 6 | * Docker Compose 7 | 8 | ### Usage 9 | 10 | > Run commands from project root 11 | 12 | - Start kafka: `npm run kafka:start` 13 | - Stop kafka: `npm run kafka:stop` 14 | - Show kafka logs: `npm run kafka:logs` 15 | -------------------------------------------------------------------------------- /kafka-setup/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: "2" 3 | services: 4 | zookeeper: 5 | image: wurstmeister/zookeeper:latest 6 | ports: 7 | - 2181:2181 8 | 9 | kafka: 10 | image: wurstmeister/kafka:0.10.2.1 11 | ports: 12 | - "9092:9092" 13 | links: 14 | - zookeeper 15 | depends_on: 16 | - zookeeper 17 | environment: 18 | KAFKA_BROKER_ID: 1 19 | KAFKA_PORT: 9092 20 | KAFKA_ADVERTISED_HOST_NAME: "kafka" 21 | KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092" 22 | KAFKA_LISTENERS: "PLAINTEXT://:9092" 23 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 24 | KAFKA_CREATE_TOPICS: "test:1:1" 25 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" 26 | 27 | kafka-rest: 28 | image: nodefluent/kafka-rest:latest 29 | ports: 30 | - 8082:8082 31 | links: 32 | - kafka 33 | - zookeeper 34 | depends_on: 35 | - kafka 36 | - zookeeper 37 | environment: 38 | DEBUG: "*" 39 | 40 | kafka-rest-ui: 41 | build: 42 | context: .. 43 | dockerfile: Dockerfile 44 | ports: 45 | - 8000:8000 46 | links: 47 | - kafka-rest 48 | depends_on: 49 | - kafka-rest 50 | environment: 51 | DEBUG: "*,-*babel*,-*eslint*" 52 | REACT_APP_KAFKA_REST_URL: "http://kafka-rest:8082/" 53 | REACT_APP_TIMEOUT: "3000" 54 | PROXY: "yes" 55 | -------------------------------------------------------------------------------- /kafka-setup/start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | rm -rf /tmp/kafka-data 3 | mkdir /tmp/kafka-data 4 | mkdir /tmp/kafka-data/data 5 | mkdir /tmp/kafka-data/logs 6 | chmod -R 777 /tmp/kafka-data 7 | 8 | BASEDIR=$(git rev-parse --show-toplevel) 9 | 10 | if [ -z "$(docker-compose --file ${BASEDIR}/kafka-setup/docker-compose.yml ps -q)" ]; then 11 | docker-compose --file ${BASEDIR}/kafka-setup/docker-compose.yml rm 12 | fi 13 | 14 | docker-compose --file ${BASEDIR}/kafka-setup/docker-compose.yml up -d 15 | -------------------------------------------------------------------------------- /kafka-setup/stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | BASEDIR=$(git rev-parse --show-toplevel) 3 | docker-compose --file ${BASEDIR}/kafka-setup/docker-compose.yml down 4 | -------------------------------------------------------------------------------- /kafka-setup/test-data.txt: -------------------------------------------------------------------------------- 1 | 1#{"foo":"bar"} 2 | 2#{"object":{"a":1,"b":2,"c":{"d":4}}} 3 | 3#{} 4 | 4#string 5 | -------------------------------------------------------------------------------- /localhost.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | MAINTAINER nodefluent 3 | 4 | ENV KAFKA_REST_UI_VERSION=0.6.3 5 | ENV REACT_APP_DEBUG=true 6 | ENV REACT_APP_KAFKA_REST_URL=http://127.0.0.1:8082/ 7 | ENV PROXY=true 8 | ENV NODE_ENV=production 9 | ENV BUILD=localhost 10 | ENV DEBUG=-*babel*,-*eslint*,* 11 | COPY ./build/ /usr/share/nginx/kafka-rest-ui/build/ 12 | COPY ./entrypoint.sh /entrypoint.sh 13 | COPY ./nginx/nginx.conf /etc/nginx/nginx.conf 14 | COPY ./nginx/kafka-rest-ui.template /etc/nginx/conf.d/kafka-rest-ui.template 15 | COPY ./nginx/kafka-rest-ui-proxy-location.template /etc/nginx/conf.d/kafka-rest-ui-proxy-location.template 16 | WORKDIR /usr/share/nginx/kafka-rest-ui/ 17 | 18 | RUN apk update \ 19 | && apk add --no-cache libcap bash curl nginx gettext apache2-utils \ 20 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 21 | && ln -sf /dev/stderr /var/log/nginx/error.log 22 | 23 | STOPSIGNAL SIGTERM 24 | 25 | CMD ["/entrypoint.sh"] 26 | -------------------------------------------------------------------------------- /nginx/kafka-rest-ui-proxy-location.template: -------------------------------------------------------------------------------- 1 | location $REACT_APP_KAFKA_REST_URL { 2 | add_header 'Access-Control-Allow-Origin' "$http_origin" always; 3 | add_header 'Access-Control-Allow-Credentials' 'true' always; 4 | add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; 5 | add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always; 6 | 7 | rewrite ^$REACT_APP_KAFKA_REST_URL(.*) $1 break; 8 | proxy_pass $PROXY_URL; 9 | proxy_redirect off; 10 | 11 | proxy_set_header X-Real-IP $remote_addr; 12 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 13 | proxy_set_header Host $http_host; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /nginx/kafka-rest-ui.template: -------------------------------------------------------------------------------- 1 | server { 2 | listen $HTTP_PORT; 3 | server_name localhost; 4 | location / { 5 | $BASIC_AUTH 6 | root /usr/share/nginx/kafka-rest-ui/build/; 7 | } 8 | location /kafka-rest-ui/ { 9 | proxy_pass http://localhost:$HTTP_PORT/; 10 | } 11 | location /admin/healthcheck { 12 | access_log off; 13 | default_type application/json; 14 | return 200 '{"status":"OK"}'; 15 | } 16 | 17 | include /etc/nginx/conf.d/*.location; 18 | } 19 | -------------------------------------------------------------------------------- /nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes 1; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | include /etc/nginx/mime.types; 13 | default_type application/octet-stream; 14 | 15 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 16 | '$status $body_bytes_sent "$http_referer" ' 17 | '"$http_user_agent" "$http_x_forwarded_for"'; 18 | 19 | access_log /var/log/nginx/access.log main; 20 | sendfile on; 21 | keepalive_timeout 65; 22 | include /etc/nginx/conf.d/*.conf; 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kafka-rest-ui", 3 | "version": "0.7.0", 4 | "private": true, 5 | "repository": "git@github.com:nodefluent/kafka-rest-ui.git", 6 | "homepage": "https://nodefluent.github.io/kafka-rest-ui/", 7 | "author": "nodefluent", 8 | "license": "MIT", 9 | "dependencies": { 10 | "axios": "^0.19.0", 11 | "eslint": "^5.16.0", 12 | "localforage": "^1.7.3", 13 | "react": "^16.8.6", 14 | "react-bootstrap": "^0.32.4", 15 | "react-dom": "^16.8.6", 16 | "react-icons-kit": "^1.3.1", 17 | "react-json-view": "^1.19.1", 18 | "react-notification-system": "^0.2.17", 19 | "react-pager": "^1.3.3", 20 | "react-redux": "^7.1.0", 21 | "react-router": "^5.0.1", 22 | "react-router-dom": "^5.0.1", 23 | "react-scripts": "3.0.1", 24 | "react-sidenav": "^4.0.3", 25 | "react-table": "^6.10.0", 26 | "react-tabs": "^3.0.0", 27 | "react-tap-event-plugin": "^3.0.3", 28 | "redux": "^4.0.1", 29 | "redux-logger": "^3.0.6", 30 | "redux-observable": "^1.1.0", 31 | "redux-persist": "^5.10.0", 32 | "rxjs": "^6.5.2" 33 | }, 34 | "scripts": { 35 | "start": "react-scripts start", 36 | "build": "react-scripts build", 37 | "build:localhost": "REACT_APP_KAFKA_REST_URL=/api/kafka-rest/ PROXY=true REACT_APP_DEBUG=* react-scripts build && yarn docker:build:localhost && yarn docker:push", 38 | "docker:build": "docker build -t nodefluent/kafka-rest-ui . --no-cache", 39 | "docker:build:localhost": "docker build -t nodefluent/kafka-rest-ui:localhost -f localhost.Dockerfile . --no-cache", 40 | "docker:push": "docker push nodefluent/kafka-rest-ui", 41 | "test": "react-scripts test --env=jsdom", 42 | "eject": "react-scripts eject", 43 | "kafka:start": "./kafka-setup/start.sh", 44 | "kafka:stop": "./kafka-setup/stop.sh", 45 | "kafka:logs": "docker-compose --file ./kafka-setup/docker-compose.yml logs -f", 46 | "kafka:build": "docker-compose --file ./kafka-setup/docker-compose.yml build", 47 | "kafka:rick": "yarn kafka:stop && yarn kafka:build && yarn kafka:start && yarn kafka:generate-data && yarn kafka:logs", 48 | "kafka:producer": "docker exec -it kafkasetup_kafka_1 bash -c 'kafka-console-producer.sh --topic=test --broker-list=localhost:9092'", 49 | "kafka:consumer": "docker exec -it kafkasetup_kafka_1 bash -c 'kafka-console-consumer.sh --topic=test --bootstrap-server=localhost:9092 --from-beginning'", 50 | "kafka:set-topic-config": "docker exec -it kafkasetup_kafka_1 bash -c 'kafka-configs.sh --entity-type=topics --zookeeper=zookeeper:2181 --alter --entity-name=test --add-config=retention.ms=86400000,cleanup.policy=delete'", 51 | "kafka:topic-describe": "docker exec -it kafkasetup_kafka_1 bash -c 'kafka-configs.sh --describe --entity-type=topics --entity-name=test --zookeeper=zookeeper:2181'", 52 | "kafka:generate-data": "while IFS= read line; do echo \"echo '$line' | kafka-console-producer.sh --topic=test --broker-list=localhost:9092 --property='parse.key=true' --property='key.separator=#' \" | docker exec -i kafkasetup_kafka_1 bash -; done< ./kafka-setup/test-data.txt" 53 | }, 54 | "devDependencies": { 55 | "babel-eslint": "^10.0.2", 56 | "eslint-config-airbnb": "^17.1.0", 57 | "eslint-plugin-flowtype": "^3.10.3", 58 | "eslint-plugin-import": "^2.17.3", 59 | "eslint-plugin-jsx-a11y": "^6.2.1", 60 | "eslint-plugin-react": "^7.13.0", 61 | "flow-bin": "^0.101.1" 62 | } 63 | } -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodefluent/kafka-rest-ui/5385a5518654d67559d284c5f1cfe70006de291b/preview.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 23 | Kafka REST UI 24 | 25 | 26 | 29 |

30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /public/kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodefluent/kafka-rest-ui/5385a5518654d67559d284c5f1cfe70006de291b/public/kafka.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "kafka.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | margin: 0; 4 | min-height: 100%; 5 | padding: 0; 6 | overflow: hidden; 7 | } 8 | 9 | #root { 10 | height: 100%; 11 | margin: 0; 12 | min-height: 100%; 13 | padding: 0; 14 | overflow: hidden; 15 | } 16 | 17 | .App { 18 | height: -webkit-calc(100% - 42px); 19 | height: -moz-calc(100% - 42px); 20 | height: calc(100% - 42px); 21 | margin: 0; 22 | min-height: -webkit-calc(100% - 42px); 23 | min-height: -moz-calc(100% - 42px); 24 | min-height: calc(100% - 42px); 25 | padding: 0; 26 | } 27 | 28 | .App-logo { 29 | height: 32px; 30 | } 31 | 32 | .App-header { 33 | background-color: #2c3e50; 34 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 35 | color: #FFF; 36 | height: 42px; 37 | } 38 | 39 | .App-intro { 40 | font-size: large; 41 | } 42 | 43 | .load { 44 | animation: App-logo-spin infinite 1s linear; 45 | height: 24px; 46 | } 47 | 48 | .FullHeight { 49 | height: 100%; 50 | margin: 0; 51 | padding: 0; 52 | } 53 | 54 | .SideNav { 55 | background: #4f6375; 56 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 57 | color: #FFF; 58 | float: left; 59 | height: 100%; 60 | width: 20%; 61 | } 62 | 63 | .NoContent { 64 | color: rgba(0, 0, 0, 0.5); 65 | font-style: italic; 66 | left: 50%; 67 | padding: 1em; 68 | position: absolute; 69 | text-align: center; 70 | top: 50%; 71 | } 72 | 73 | .Progress { 74 | color: rgba(0, 0, 0, 0.5); 75 | font-style: italic; 76 | left: 50%; 77 | padding: 1em; 78 | position: absolute; 79 | text-align: center; 80 | top: 50%; 81 | } 82 | 83 | .Messages { 84 | height: -webkit-calc(100% - 44px); 85 | height: -moz-calc(100% - 44px); 86 | height: calc(100% - 44px); 87 | overflow: auto; 88 | } 89 | 90 | .InputField { 91 | background-color: #fff; 92 | background-image: none; 93 | border-radius: 4px; 94 | border: 1px solid #ccc; 95 | color: #555; 96 | display: block; 97 | font-size: 1em; 98 | line-height: 1em; 99 | margin: 7px; 100 | padding: 6px 6px; 101 | width: 100%; 102 | } 103 | 104 | .FieldLabel { 105 | float: right; 106 | font-size: 1em; 107 | line-height: 1em; 108 | } 109 | 110 | .Navigation { 111 | bottom: 0; 112 | height: 44px; 113 | left: 20%; 114 | width: 100%; 115 | z-index: 1; 116 | flex-wrap: wrap; 117 | -webkit-box-shadow: 0 0 15px 0 rgba(0,0,0,0.1); 118 | box-shadow: 0 0 15px 0 rgba(0,0,0,0.1); 119 | border-top: 2px solid rgba(0,0,0,0.1); 120 | } 121 | 122 | .NavigationLeft { 123 | float: left; 124 | height: 40px; 125 | } 126 | 127 | .NavigationRight { 128 | position: absolute; 129 | right: 12px; 130 | height: 40px; 131 | } 132 | button.NavigationRight { 133 | margin-right: 0; 134 | } 135 | 136 | .NaviagationButton { 137 | -moz-appearance: none; 138 | -o-transition: all .1s ease; 139 | -webkit-appearance: none; 140 | -webkit-transition: all .1s ease; 141 | appearance: none; 142 | background: rgba(0,0,0,0.1); 143 | border-radius: 3px; 144 | border: 0; 145 | color: rgba(0,0,0,0.6); 146 | cursor: pointer; 147 | display: block; 148 | font-size: 1em; 149 | height: 30px; 150 | margin: 6px; 151 | outline: none; 152 | padding: 6px; 153 | transition: all .1s ease; 154 | width: 100%; 155 | } 156 | 157 | .NavigationCenter { 158 | display: inline-block; 159 | height: 40px; 160 | left: 50%; 161 | position: absolute; 162 | width: 400px; 163 | } 164 | 165 | .NavigationCenter nav { 166 | display: inline-block; 167 | height: 40px; 168 | width: 400px; 169 | } 170 | 171 | .NaviagationPager { 172 | -moz-appearance: none; 173 | -webkit-appearance: none; 174 | appearance: none; 175 | border-radius: 4px; 176 | border: 0; 177 | height: 38px; 178 | margin: 0; 179 | outline: none; 180 | padding: 4px; 181 | width: 100%; 182 | } 183 | 184 | @keyframes App-logo-spin { 185 | from { transform: rotate(0deg); } 186 | to { transform: rotate(360deg); } 187 | } 188 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import ReactJson from 'react-json-view'; 4 | import ReactTable from 'react-table'; 5 | import SideNav, { Nav, NavIcon, NavText } from 'react-sidenav'; 6 | import Icon from 'react-icons-kit'; 7 | import Pager from 'react-pager'; 8 | import { ic_view_list } from 'react-icons-kit/md/ic_view_list'; 9 | import { ic_loop } from 'react-icons-kit/md/ic_loop'; 10 | import { ic_description } from 'react-icons-kit/md/ic_description'; 11 | import { ic_hearing } from 'react-icons-kit/md/ic_hearing'; 12 | import { ic_reorder } from 'react-icons-kit/md/ic_reorder'; 13 | import { ic_search } from 'react-icons-kit/md/ic_search'; 14 | import { ic_settings } from 'react-icons-kit/md/ic_settings'; 15 | import { ic_timeline } from 'react-icons-kit/md/ic_timeline'; 16 | import { connect } from 'react-redux'; 17 | import NotificationSystem from 'react-notification-system'; 18 | import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; 19 | import { 20 | Button, 21 | ButtonToolbar, 22 | ToggleButtonGroup, 23 | ToggleButton, 24 | FormGroup, 25 | ControlLabel, 26 | FormControl, 27 | HelpBlock, 28 | Panel, 29 | } from 'react-bootstrap'; 30 | import { purgeStoredState } from 'redux-persist'; 31 | import localForage from 'localforage'; 32 | 33 | // $FlowIgnore 34 | import 'react-tabs/style/react-tabs.css'; 35 | // $FlowIgnore 36 | import 'react-table/react-table.css'; 37 | 38 | import { createConsumer, clear as consumersClear, setPage } from './ducks/consumers'; 39 | import { getTopics, clear as topicsClear } from './ducks/topics'; 40 | import { setTabIndex, setRequestTimeout, setUrl, setWindow, setOffset } from './ducks/settings'; 41 | 42 | import { messageColumns, consumerColumns, topicConfigColumns, topicPartitionColumns } from './styles'; 43 | import type { Consumers, Topics, Settings } from './types'; 44 | import logo from './logo.svg'; 45 | import nodefluent from './nodefluent.png'; 46 | import './App.css'; 47 | 48 | type Props = { 49 | createConsumer: void, 50 | getTopics: void, 51 | setRequestTimeout: void, 52 | setUrl: void, 53 | setPage: void, 54 | setTabIndex: void, 55 | setWindow: void, 56 | setOffset: void, 57 | consumersClear: void, 58 | topicsClear: void, 59 | topics: Topics, 60 | consumers: Consumers, 61 | settings: Settings 62 | }; 63 | 64 | class App extends Component { 65 | componentDidMount() { 66 | if (process.env.REACT_APP_KAFKA_REST_URL) { 67 | if (this.props.setUrl) this.props.setUrl(process.env.REACT_APP_KAFKA_REST_URL); 68 | } 69 | if (process.env.REACT_APP_TIMEOUT) { 70 | if (this.props.setRequestTimeout) this.props.setRequestTimeout(parseInt(process.env.REACT_APP_TIMEOUT, 10)); 71 | } 72 | if (this.props.consumersClear) this.props.consumersClear(); 73 | if (this.props.getTopics) { 74 | this.props.getTopics(); 75 | } 76 | } 77 | 78 | componentWillReceiveProps(newProps) { 79 | if (newProps.consumers.error) { 80 | this.notificationSystem.addNotification({ 81 | title: 'The problem with consumer occurred', 82 | message: newProps.consumers.error, 83 | level: 'error', 84 | autoDismiss: 0, 85 | // position: 'br', 86 | }); 87 | if (this.props.consumersClear) this.props.consumersClear(); 88 | } 89 | if (newProps.topics.error) { 90 | this.notificationSystem.addNotification({ 91 | title: 'The problem with topic occurred', 92 | message: newProps.topics.error, 93 | level: 'error', 94 | autoDismiss: 0, 95 | // position: 'br', 96 | }); 97 | if (this.props.topicsClear) this.props.topicsClear(); 98 | } 99 | } 100 | 101 | refs: any; 102 | notificationSystem: NotificationSystem; 103 | 104 | render() { 105 | return ( 106 |
107 | { this.notificationSystem = c; }} /> 108 |
109 | logoKafka REST UI 114 |
115 |
116 | 168 | { 172 | if (this.props.setTabIndex) this.props.setTabIndex(tabIndex); 173 | }} 174 | > 175 | 176 | Raw view 177 | Table view 178 | Topic partitions 179 | Topic configs 180 | Settings 181 | Consumers 182 | 183 | 184 |
185 | {this.props.consumers.loading &&
186 | 187 | {this.props.consumers.progress} 188 |
} 189 | {!this.props.consumers.loading && this.props.consumers.records.length > 0 && 190 | 0 192 | && typeof this.props.consumers.page === 'number' 193 | && this.props.consumers.page >= 0 ? 194 | this.props.consumers.records[this.props.consumers.page] : 195 | this.props.consumers.records} 196 | name={null} 197 | displayDataTypes={false} 198 | iconStyle={'circle'} 199 | />} 200 |
201 | {!this.props.consumers.loading && this.props.consumers.records.length === 0 && 202 | (
No records found
)} 203 |
204 |
205 | 224 |
225 |
226 | 233 |
234 |
235 | 253 |
254 |
255 |
256 | 257 | 270 | 271 | 272 | 284 | 285 | 286 | 299 | 300 | 301 |
302 |
303 | 304 | 305 | 306 | 349 | 413 | 414 | 415 |
307 | Server settings)} 309 | bsStyle="success" 310 | > 311 | { 317 | if (event.target.validity.valid && this.props.setUrl) { 318 | this.props.setUrl(event.target.value); 319 | } 320 | }} 321 | help="Kafka rest endpoint: REACT_APP_KAFKA_REST_URL" 322 | /> 323 | 331 | 339 | 347 | 348 | 350 | Client settings)} 352 | bsStyle="info" 353 | > 354 | { 361 | if (event.target.validity.valid && this.props.setRequestTimeout) { 362 | this.props.setRequestTimeout(event.target.value); 363 | } 364 | }} 365 | step="100" 366 | min="1000" 367 | max="120000" 368 | /> 369 | { 376 | if (event.target.validity.valid && this.props.setWindow) { 377 | this.props.setWindow(event.target.value); 378 | } 379 | }} 380 | step="1" 381 | min="1" 382 | max="100000" 383 | /> 384 | 385 | Default consumer offset 386 | 387 | this.props.setOffset && this.props.setOffset(value)} 392 | > 393 | Earliest 394 | Latest 395 | 396 | 397 | {'Clear the local storage data, but not the client settings'} 398 | 399 | 400 | Clear local storage 401 | 409 | {'Clear the local storage data, but not the client settings'} 410 | 411 | 412 |
416 |
417 |
418 |
419 | 420 | 433 | 434 |
435 |
436 |
437 | ); 438 | } 439 | } 440 | 441 | function FieldGroup({ id, label, help, ...props }) { 442 | return ( 443 | 444 | {label} 445 | 446 | {help && {help}} 447 | 448 | ); 449 | } 450 | 451 | const mapStateToProps = ({ consumers, topics, settings }) => ({ consumers, topics, settings }); 452 | 453 | const mapDispatchToProps = { 454 | consumersClear, 455 | createConsumer, 456 | getTopics, 457 | setPage, 458 | setRequestTimeout, 459 | setUrl, 460 | setTabIndex, 461 | setWindow, 462 | setOffset, 463 | topicsClear, 464 | }; 465 | 466 | export default connect(mapStateToProps, mapDispatchToProps)(App); 467 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import ReactDOM from 'react-dom'; 4 | import App from './App'; 5 | 6 | it('renders without crashing', () => { 7 | const div = document.createElement('div'); 8 | ReactDOM.render(, div); 9 | }); 10 | -------------------------------------------------------------------------------- /src/api/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import axios from 'axios'; 3 | 4 | export const getInstance = (url :string = 'http://localhost:8082/', timeout :number = 2000) => { 5 | const headers = { 6 | 'content-type': 'application/json', 7 | }; 8 | 9 | if (process.env.REACT_APP_PROXY) { 10 | // $FlowIgnore 11 | headers['Access-Control-Allow-Origin'] = process.env.REACT_APP_KAFKA_REST_URL || '*'; 12 | // $FlowIgnore 13 | headers['Access-Control-Allow-Credentials'] = 'true'; 14 | // $FlowIgnore 15 | headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'; 16 | // $FlowIgnore 17 | headers['Access-Control-Allow-Headers'] = 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With';// eslint-disable-line 18 | } 19 | 20 | return axios.create({ 21 | baseURL: url, 22 | withCredentials: !!process.env.REACT_APP_PROXY, 23 | timeout: ((timeout || 2000) + 1000), 24 | headers, 25 | }); 26 | }; 27 | 28 | export const getTopics = (url : string, timeout : number) => getInstance(url, timeout).get('/topics'); 29 | export const getTopic = (url : string, timeout : number, topicName :string) => 30 | getInstance(url, timeout).get(`/topics/${topicName}`); 31 | 32 | export const createConsumer = 33 | (url : string, timeout : number, consumerId :string, offset :string = 'earliest', maxWindowSize :number = 100) => 34 | getInstance(url, timeout).post(`/consumers/${consumerId}`, { 35 | name: consumerId, 36 | format: 'json', 37 | maxWindowSize, 38 | 'auto.offset.reset': offset, 39 | }); 40 | 41 | export const deleteConsumer = 42 | (url : string, timeout : number, consumerId :string, topicName :string) => 43 | getInstance(url, timeout).delete(`/consumers/${consumerId}/instances/${topicName}`); 44 | 45 | export const subscribeToTopic = 46 | (url : string, timeout : number, consumerId :string, topicName :string) => 47 | getInstance(url, timeout).post(`/consumers/${consumerId}/instances/${topicName}/subscription`, { 48 | topics: [topicName], 49 | }); 50 | 51 | export const getRecords = 52 | (url : string, timeout : number, consumerId :string, topicName :string) => 53 | getInstance(url, timeout).get(`/consumers/${consumerId}/instances/${topicName}/records?timeout=${timeout}`); 54 | -------------------------------------------------------------------------------- /src/ducks/consumers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { ConsumerAction, Consumers } from '../types'; 3 | 4 | export const CREATE = 'kafka-rest/consumers/create'; 5 | export const DELETE = 'kafka-rest/consumers/delete'; 6 | export const GET_RECORDS = 'kafka-rest/consumers/get-records'; 7 | export const UPDATE_RECORDS = 'kafka-rest/consumers/update-records'; 8 | export const SUBSCRIBE = 'kafka-rest/consumers/subscribe'; 9 | export const SET_TIMEOUT = 'kafka-rest/consumers/set-timeout'; 10 | export const SET_PAGE = 'kafka-rest/consumers/set-page'; 11 | export const ERROR = 'kafka-rest/consumers/error'; 12 | export const CLEAR = 'kafka-rest/consumers/clear'; 13 | 14 | export default function reducer( 15 | state : Consumers = { list: [], records: [], loading: false, page: 0, progress: '', error: '' }, 16 | action :ConsumerAction) { 17 | switch (action.type) { 18 | case CREATE: { 19 | const newState = Object.assign({}, state); 20 | newState.list.push({ 21 | consumerId: action.consumerId, 22 | topicName: action.topicName, 23 | offset: action.offset || 'earliest', 24 | status: 'created', 25 | }); 26 | if (newState.list.length > 100) { 27 | newState.list.shift(); 28 | } 29 | return newState; 30 | } 31 | 32 | case DELETE: { 33 | const newState = Object.assign({}, state); 34 | newState.list.map((consumer) => { 35 | if (consumer.consumerId === action.consumerId) { 36 | consumer.status = 'deleted'; // eslint-disable-line 37 | } 38 | return consumer; 39 | }); 40 | 41 | return { 42 | ...newState, 43 | loading: false, 44 | progress: 'Delete consumer...', 45 | }; 46 | } 47 | 48 | case GET_RECORDS: { 49 | return { 50 | ...state, 51 | progress: 'Getting records...', 52 | }; 53 | } 54 | 55 | case UPDATE_RECORDS: { 56 | return { 57 | ...state, 58 | records: action.records || [], 59 | }; 60 | } 61 | 62 | case SUBSCRIBE: { 63 | const newState = Object.assign({}, state); 64 | newState.loading = true; 65 | newState.progress = `Subscribe to topic ${action.topicName || ''} ...`; 66 | newState.list.map((consumer) => { 67 | if (consumer.consumerId === action.consumerId) { 68 | consumer.status = 'subscribed'; // eslint-disable-line 69 | } 70 | return consumer; 71 | }); 72 | return newState; 73 | } 74 | 75 | case SET_PAGE: { 76 | return { 77 | ...state, 78 | page: (action.page && action.page >= 0) ? action.page : 0, 79 | }; 80 | } 81 | 82 | case ERROR: { 83 | return { 84 | ...state, 85 | loading: false, 86 | progress: '', 87 | error: action.message, 88 | }; 89 | } 90 | 91 | // clear if reload the site 92 | case 'persist/REHYDRATE': { 93 | if (action.payload && action.payload.consumers) { 94 | return { 95 | ...action.payload.consumers, 96 | loading: false, 97 | error: null, 98 | progress: '', 99 | }; 100 | } 101 | return state; 102 | } 103 | 104 | case CLEAR: { 105 | return { 106 | ...state, 107 | loading: false, 108 | error: null, 109 | progress: '', 110 | }; 111 | } 112 | 113 | default: 114 | return state; 115 | } 116 | } 117 | 118 | export const createConsumer = (topicName :string, offset :string) => { 119 | const consumerId = `consumer_${topicName}_${new Date().toISOString()}`; 120 | return { 121 | type: CREATE, 122 | consumerId, 123 | topicName, 124 | offset, 125 | }; 126 | }; 127 | 128 | export const deleteConsumer = (consumerId :string, topicName :string) => ({ 129 | type: DELETE, 130 | consumerId, 131 | topicName, 132 | }); 133 | 134 | export const updateRecords = (data :any) => ({ 135 | type: UPDATE_RECORDS, 136 | records: data, 137 | }); 138 | 139 | export const gotRecords = (consumerId :string, topicName :string, payload :any) => ({ 140 | type: GET_RECORDS, 141 | consumerId, 142 | topicName, 143 | payload, 144 | }); 145 | 146 | export const subscribe = (consumerId :string, topicName :string) => ({ 147 | type: SUBSCRIBE, 148 | consumerId, 149 | topicName, 150 | }); 151 | 152 | export const setPage = (index :number) => ({ 153 | type: SET_PAGE, 154 | page: index, 155 | }); 156 | 157 | export const clear = () => ({ 158 | type: CLEAR, 159 | }); 160 | 161 | export const error = (message :Error) => { 162 | let errorMessage = ''; 163 | if (message && message.stack) { 164 | errorMessage = message.toString() + message.stack.toString(); 165 | } else if (message) { 166 | errorMessage.toString(); 167 | } 168 | 169 | return { 170 | type: ERROR, 171 | message: errorMessage, 172 | }; 173 | }; 174 | -------------------------------------------------------------------------------- /src/ducks/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { combineReducers } from 'redux'; 3 | 4 | import consumers from './consumers'; 5 | import topics from './topics'; 6 | import settings from './settings'; 7 | 8 | export default combineReducers({ 9 | consumers, 10 | topics, 11 | settings, 12 | }); 13 | -------------------------------------------------------------------------------- /src/ducks/settings.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { SettingAction, Settings } from '../types'; 3 | 4 | export const SET_TIMEOUT = 'kafka-rest/settings/set-timeout'; 5 | export const SET_WINDOW = 'kafka-rest/settings/set-window'; 6 | export const SET_URL = 'kafka-rest/settings/set-url'; 7 | export const SET_TAB_INDEX = 'kafka-rest/settings/set-tab-index'; 8 | export const SET_OFFSET = 'kafka-rest/settings/set-offset'; 9 | export const CLEAR = 'kafka-rest/settings/clear'; 10 | export const ERROR = 'kafka-rest/settings/error'; 11 | 12 | export default function reducer( 13 | state :Settings = { url: 'http://localhost:8082/', timeout: 2000, window: 100, tabIndex: 0, error: '' }, 14 | action: SettingAction) { 15 | switch (action.type) { 16 | case SET_TIMEOUT: { 17 | return { 18 | ...state, 19 | timeout: action.timeout || 2000, 20 | }; 21 | } 22 | 23 | case SET_WINDOW: { 24 | return { 25 | ...state, 26 | window: action.window || 100, 27 | }; 28 | } 29 | 30 | case SET_URL: { 31 | return { 32 | ...state, 33 | url: action.url || 'http://localhost:8082/', 34 | }; 35 | } 36 | 37 | case SET_TAB_INDEX: { 38 | return { 39 | ...state, 40 | tabIndex: action.tabIndex || 0, 41 | }; 42 | } 43 | 44 | case SET_OFFSET: { 45 | return { 46 | ...state, 47 | offset: action.offset || 'earliest', 48 | }; 49 | } 50 | 51 | case ERROR: { 52 | return { 53 | ...state, 54 | error: action.message, 55 | }; 56 | } 57 | 58 | case CLEAR: { 59 | return { 60 | ...state, 61 | error: null, 62 | }; 63 | } 64 | 65 | default: 66 | return state; 67 | } 68 | } 69 | 70 | export const setRequestTimeout = (timeout :number) => ({ 71 | type: SET_TIMEOUT, 72 | timeout, 73 | }); 74 | 75 | export const setWindow = (window :number) => ({ 76 | type: SET_WINDOW, 77 | window, 78 | }); 79 | 80 | export const setUrl = (url :string) => ({ 81 | type: SET_URL, 82 | url, 83 | }); 84 | 85 | export const setTabIndex = (tabIndex :number) => ({ 86 | type: SET_TAB_INDEX, 87 | tabIndex, 88 | }); 89 | 90 | export const setOffset = (offset :string) => ({ 91 | type: SET_OFFSET, 92 | offset, 93 | }); 94 | 95 | export const clear = () => ({ 96 | type: CLEAR, 97 | }); 98 | 99 | export const error = (message :Error) => { 100 | let errorMessage = ''; 101 | if (message && message.stack) { 102 | errorMessage = message.toString() + message.stack.toString(); 103 | } else if (message) { 104 | errorMessage.toString(); 105 | } 106 | 107 | return { 108 | type: ERROR, 109 | message: errorMessage, 110 | }; 111 | }; 112 | -------------------------------------------------------------------------------- /src/ducks/topics.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { TopicAction, Topics } from '../types'; 3 | 4 | export const GET_TOPIC = 'kafka-rest/topics/get-topic-info'; 5 | export const GET_TOPICS = 'kafka-rest/topics/get-topics'; 6 | export const RECEIVED = 'kafka-rest/topics/received'; 7 | export const TOPIC_RECEIVED = 'kafka-rest/topics/topic-received'; 8 | export const ERROR = 'kafka-rest/topics/error'; 9 | export const CLEAR = 'kafka-rest/topics/clear'; 10 | export const REHYDRATE = 'persist/REHYDRATE'; 11 | 12 | export default function reducer( 13 | state :Topics = { list: [], topic: { name: '', partiotions: [], configs: [] }, loading: false, error: '' }, 14 | action: TopicAction) { 15 | switch (action.type) { 16 | case RECEIVED: { 17 | return { 18 | ...state, 19 | list: action.payload || [], 20 | loading: false, 21 | }; 22 | } 23 | case GET_TOPICS: { 24 | return { 25 | ...state, 26 | loading: true, 27 | }; 28 | } 29 | 30 | case GET_TOPIC: { 31 | return { 32 | ...state, 33 | topic: { 34 | name: action.topic, 35 | partitions: [], 36 | }, 37 | }; 38 | } 39 | 40 | case TOPIC_RECEIVED: { 41 | return { 42 | ...state, 43 | topic: { 44 | ...state.topic, 45 | configs: action.payload ? action.payload.configs : [], 46 | partitions: action.payload ? action.payload.partitions : [], 47 | }, 48 | }; 49 | } 50 | 51 | case ERROR: { 52 | return { 53 | ...state, 54 | error: action.message, 55 | }; 56 | } 57 | 58 | case CLEAR: { 59 | return { 60 | ...state, 61 | error: null, 62 | }; 63 | } 64 | 65 | default: 66 | return state; 67 | } 68 | } 69 | 70 | export const getTopics = () => ({ 71 | type: GET_TOPICS, 72 | }); 73 | 74 | export const getTopic = (topic :string) => ({ 75 | type: GET_TOPIC, 76 | topic, 77 | }); 78 | 79 | export const error = (message :Error) => { 80 | let errorMessage = ''; 81 | if (message && message.stack) { 82 | errorMessage = message.toString() + message.stack.toString(); 83 | } else if (message) { 84 | errorMessage.toString(); 85 | } 86 | 87 | return { 88 | type: ERROR, 89 | message: errorMessage, 90 | }; 91 | }; 92 | 93 | export const clear = () => ({ 94 | type: CLEAR, 95 | }); 96 | 97 | export const received = (payload: any) => ({ 98 | type: RECEIVED, 99 | payload, 100 | }); 101 | 102 | export const topicReceived = (payload: {configs : Array, partitions: Array}) => ({ 103 | type: TOPIC_RECEIVED, 104 | payload, 105 | }); 106 | -------------------------------------------------------------------------------- /src/epics/consumers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { Observable } from 'rxjs'; 3 | import { 4 | CREATE, 5 | DELETE, 6 | SUBSCRIBE, 7 | GET_RECORDS, 8 | deleteConsumer as deleteConsumerAction, 9 | gotRecords, 10 | updateRecords, 11 | subscribe, 12 | error, 13 | } from '../ducks/consumers'; 14 | import { getTopic } from '../ducks/topics'; 15 | import type { ConsumerAction } from '../types'; 16 | 17 | export function createConsumer(action$ :any, store :any, { api } :any) :Observable { 18 | return action$.ofType(CREATE) 19 | .filter(() => !store.getState().loading) 20 | .switchMap((action) => { 21 | const state = store.getState(); 22 | return Observable.fromPromise(api.createConsumer( 23 | state.settings.url, 24 | state.settings.timeout, 25 | action.consumerId, 26 | action.offset, 27 | state.settings.window)) 28 | .switchMap(() => Observable.of(getTopic(action.topicName), subscribe(action.consumerId, action.topicName))); 29 | }) 30 | .catch(err => Observable.of(error(err))); 31 | } 32 | 33 | export function deleteConsumer(action$ :any, store :any, { api } :any) :Observable { 34 | return action$.ofType(DELETE) 35 | .switchMap((action) => { 36 | const state = store.getState(); 37 | return api.deleteConsumer(state.settings.url, state.settings.timeout, action.consumerId, action.topicName); 38 | }) 39 | .switchMap(() => Observable.empty()) 40 | .catch(err => Observable.of(error(err))); 41 | } 42 | 43 | export function subscribeToTopic(action$ :any, store :any, { api } :any) :Observable { 44 | return action$.ofType(SUBSCRIBE) 45 | .switchMap((action) => { 46 | const state = store.getState(); 47 | return api.subscribeToTopic(state.settings.url, state.settings.timeout, action.consumerId, action.topicName) 48 | .then(({ data }) => gotRecords(action.consumerId, action.topicName, data)); 49 | }) 50 | .catch(err => Observable.of(error(err))); 51 | } 52 | 53 | export function getRecords(action$ :any, store :any, { api } :any) :Observable { 54 | return action$.ofType(GET_RECORDS) 55 | .switchMap((action) => { 56 | const state = store.getState(); 57 | return Observable.fromPromise( 58 | api.getRecords(state.settings.url, state.settings.timeout, action.consumerId, action.topicName)) 59 | .switchMap(({ data }) => 60 | Observable.of(updateRecords(data), deleteConsumerAction(action.consumerId, action.topicName))); 61 | }) 62 | .catch(err => Observable.of(error(err))); 63 | } 64 | -------------------------------------------------------------------------------- /src/epics/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { combineEpics } from 'redux-observable'; 3 | import { createConsumer, deleteConsumer, getRecords, subscribeToTopic } from './consumers'; 4 | import { getTopic, getTopics } from './topics'; 5 | 6 | import * as api from '../api'; 7 | 8 | export default (...args :any) => combineEpics( 9 | createConsumer, 10 | deleteConsumer, 11 | getRecords, 12 | getTopic, 13 | getTopics, 14 | subscribeToTopic, 15 | )(...args, { api }); 16 | -------------------------------------------------------------------------------- /src/epics/kafkaConfigDescriptions.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | /*eslint-disable */ 3 | const kafkaDefaults = { 4 | 'cleanup.policy': { 5 | config: 'cleanup.policy', 6 | default: 'delete', 7 | serverDefaultProperties: 'log.cleanup.policy', 8 | description: 'A string that is either "delete" or "compact". This string designates the retention policy to use on old log segments. The default policy ("delete") will discard old segments when their retention time or size limit has been reached. The "compact" setting will enable log compaction on the topic.', 9 | }, 10 | 'delete.retention.ms': { 11 | config: 'delete.retention.ms', 12 | default: '86400000', 13 | serverDefaultProperties: 'log.cleaner.delete.retention.ms', 14 | description: 'The amount of time to retain delete tombstone markers for log compacted topics. This setting also gives a bound on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise delete tombstones may be collected before they complete their scan). Default is 24 hours', 15 | }, 16 | 'flush.messages': { 17 | config: 'flush.messages', 18 | default: 'None', 19 | serverDefaultProperties: 'log.flush.interval.messages', 20 | description: "This setting allows specifying an interval at which we will force an fsync of data written to the log. For example if this was set to 1 we would fsync after every message; if it were 5 we would fsync after every five messages. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient. This setting can be overridden on a per-topic basis (see the per-topic configuration section).", 21 | }, 22 | 'flush.ms': { 23 | config: 'flush.ms', 24 | default: 'None', 25 | serverDefaultProperties: 'log.flush.interval.ms', 26 | description: "This setting allows specifying a time interval at which we will force an fsync of data written to the log. For example if this was set to 1000 we would fsync after 1000 ms had passed. In general we recommend you not set this and use replication for durability and allow the operating system's background flush capabilities as it is more efficient.", 27 | }, 28 | 'index.interval.bytes': { 29 | config: 'index.interval.bytes', 30 | default: '4096', 31 | serverDefaultProperties: 'log.index.interval.bytes', 32 | description: "This setting controls how frequently Kafka adds an index entry to it's offset index. The default setting ensures that we index a message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact position in the log but makes the index larger. You probably don't need to change this.", 33 | }, 34 | 'max.message.bytes': { 35 | config: 'max.message.bytes', 36 | default: '1000000', 37 | serverDefaultProperties: 'message.max.bytes', 38 | description: "This is largest message size Kafka will allow to be appended to this topic. Note that if you increase this size you must also increase your consumer's fetch size so they can fetch messages this large.", 39 | }, 40 | 'min.cleanable.dirty.ratio': { 41 | config: 'min.cleanable.dirty.ratio', 42 | default: '0.5', 43 | serverDefaultProperties: 'log.cleaner.min.cleanable.ratio', 44 | description: 'This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log.', 45 | }, 46 | 'min.insync.replicas': { 47 | config: 'min.insync.replicas', 48 | default: '1', 49 | serverDefaultProperties: 'min.insync.replicas', 50 | description: 'When a producer sets acks to "all", min.insync.replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with acks of "all". This will ensure that the producer raises an exception if a majority of replicas do not receive a write.', 51 | }, 52 | 'retention.bytes': { 53 | config: 'retention.bytes', 54 | default: 'None', 55 | serverDefaultProperties: 'log.retention.bytes', 56 | description: 'This configuration controls the maximum size a log can grow to before we will discard old log segments to free up space if we are using the "delete" retention policy. By default there is no size limit only a time limit.', 57 | }, 58 | 'retention.ms': { 59 | config: 'retention.ms', 60 | default: '7 days', 61 | serverDefaultProperties: 'log.retention.minutes', 62 | description: 'This configuration controls the maximum time we will retain a log before we will discard old log segments to free up space if we are using the "delete" retention policy. This represents an SLA on how soon consumers must read their data.', 63 | }, 64 | 'segment.bytes': { 65 | config: 'segment.bytes', 66 | default: '1 GB', 67 | serverDefaultProperties: 'log.segment.bytes', 68 | description: 'This configuration controls the segment file size for the log. Retention and cleaning is always done a file at a time so a larger segment size means fewer files but less granular control over retention.', 69 | }, 70 | 'segment.index.bytes': { 71 | config: 'segment.index.bytes', 72 | default: '10 MB', 73 | serverDefaultProperties: 'log.index.size.max.bytes', 74 | description: 'This configuration controls the size of the index that maps offsets to file positions. We preallocate this index file and shrink it only after log rolls. You generally should not need to change this setting.', 75 | }, 76 | 'segment.ms': { 77 | config: 'segment.ms', 78 | default: '7 days', 79 | serverDefaultProperties: 'log.roll.hours', 80 | description: "This configuration controls the period of time after which Kafka will force the log to roll even if the segment file isn't full to ensure that retention can delete or compact old data.", 81 | }, 82 | 'segment.jitter.ms': { 83 | config: 'segment.jitter.ms', 84 | default: '0', 85 | serverDefaultProperties: 'log.roll.jitter.{ms,hours}', 86 | description: 'The maximum jitter to subtract from logRollTimeMillis.', 87 | }, 88 | }; 89 | 90 | export default kafkaDefaults; 91 | -------------------------------------------------------------------------------- /src/epics/topics.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { Observable } from 'rxjs'; 3 | import { GET_TOPIC, GET_TOPICS, REHYDRATE, received, topicReceived, error } from '../ducks/topics'; 4 | import kafkaConfigDescriptions from './kafkaConfigDescriptions'; 5 | 6 | export function getTopics(action$ :any, store :any, { api } :any) { 7 | return action$.filter(action => action.type === GET_TOPICS || action.type === REHYDRATE) 8 | .filter(() => !store.getState().loading) 9 | .switchMap(() => { 10 | const state = store.getState(); 11 | return api.getTopics(state.settings.url, state.settings.timeout); 12 | }) 13 | .map(({ data }) => received(data)) 14 | .catch(err => Observable.of(error(err))); 15 | } 16 | 17 | export function getTopic(action$ :any, store :any, { api } :any) { 18 | return action$.ofType(GET_TOPIC) 19 | .switchMap((action) => { 20 | if (!action.topic) { 21 | return Observable.empty(); 22 | } 23 | const state = store.getState(); 24 | return api.getTopic(state.settings.url, state.settings.timeout, action.topic); 25 | }) 26 | .switchMap(({ data }) => { 27 | if (!data.partitions || data.partitions.length === 0) { 28 | return []; 29 | } 30 | const formatedPartitions = []; 31 | data.partitions.forEach(d => d.replicas.forEach(r => formatedPartitions.push({ ...r, partition: d.partition }))); 32 | 33 | const formatedConfig = []; 34 | if (data.configs) { 35 | Object.keys(data.configs).forEach((c) => { 36 | const kafkaConfigDescription = kafkaConfigDescriptions[c]; 37 | if (kafkaConfigDescription) { 38 | formatedConfig.push({ 39 | ...kafkaConfigDescription, 40 | value: data.configs[c], 41 | }); 42 | } 43 | }); 44 | } 45 | 46 | return Observable.of(topicReceived({ configs: formatedConfig, partitions: formatedPartitions })); 47 | }) 48 | .catch(err => Observable.of(error(err))); 49 | } 50 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import 'rxjs'; 3 | import React from 'react'; 4 | import ReactDOM from 'react-dom'; 5 | import { Provider } from 'react-redux'; 6 | import { compose, createStore, applyMiddleware } from 'redux'; 7 | import { createEpicMiddleware } from 'redux-observable'; 8 | import { persistStore, autoRehydrate } from 'redux-persist'; 9 | import localForage from 'localforage'; 10 | import logger from 'redux-logger'; 11 | 12 | import './index.css'; 13 | import App from './App'; 14 | 15 | import reducers from './ducks'; 16 | import rootEpic from './epics'; 17 | 18 | const epicMiddleware = createEpicMiddleware(rootEpic); 19 | 20 | const middleware = [ 21 | epicMiddleware, 22 | ]; 23 | 24 | if (process.env.REACT_APP_DEBUG) { 25 | middleware.push(logger); 26 | } 27 | 28 | let store; 29 | 30 | if (process.env.REACT_APP_LOCAL_STORAGE !== 'false') { 31 | store = createStore(reducers, compose( 32 | applyMiddleware(...middleware), 33 | autoRehydrate(), 34 | )); 35 | persistStore(store, { storage: localForage }); 36 | } else { 37 | // $FlowIgnore: Type too complex 38 | store = createStore(reducers, compose( 39 | applyMiddleware(...middleware), 40 | )); 41 | } 42 | ReactDOM.render( 43 | 44 | 45 | , document.getElementById('root')); 46 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 30 | 32 | 35 | 38 | 40 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/nodefluent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodefluent/kafka-rest-ui/5385a5518654d67559d284c5f1cfe70006de291b/src/nodefluent.png -------------------------------------------------------------------------------- /src/styles.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import ReactJson from 'react-json-view'; 4 | 5 | export const topicPartitionColumns = [ 6 | { 7 | id: 'partition', 8 | Header: 'Partition', 9 | accessor: 'partition', 10 | }, 11 | { 12 | id: 'broker', 13 | Header: 'Broker', 14 | accessor: 'broker', 15 | }, 16 | { 17 | id: 'leader', 18 | Header: 'Is Leader', 19 | accessor: (d :Object) => d.leader.toString(), 20 | }, 21 | { 22 | id: 'in_sync', 23 | Header: 'Is in sync', 24 | accessor: (d :Object) => d.in_sync.toString(), 25 | }, 26 | ]; 27 | 28 | export const topicConfigColumns = [ 29 | { 30 | id: 'config', 31 | Header: 'Config', 32 | accessor: 'config', 33 | width: 200, 34 | }, 35 | { 36 | id: 'value', 37 | Header: 'Value', 38 | accessor: 'value', 39 | width: 200, 40 | }, 41 | { 42 | id: 'default', 43 | Header: 'Default', 44 | accessor: 'default', 45 | width: 200, 46 | }, 47 | { 48 | id: 'description', 49 | Header: 'Description', 50 | accessor: 'description', 51 | style: { 52 | wordWrap: 'break-word', 53 | whiteSpace: 'normal', 54 | }, 55 | }, 56 | ]; 57 | 58 | export const consumerColumns = [ 59 | { 60 | id: 'consumerId', 61 | Header: 'Id', 62 | accessor: 'consumerId', 63 | }, 64 | { 65 | id: 'topicName', 66 | Header: 'Topic', 67 | accessor: 'topicName', 68 | }, 69 | { 70 | id: 'offset', 71 | Header: 'Offset', 72 | accessor: 'offset', 73 | width: 150, 74 | }, 75 | { 76 | id: 'status', 77 | Header: 'Status', 78 | accessor: 'status', 79 | width: 150, 80 | }, 81 | ]; 82 | 83 | export const messageColumns = [ 84 | { 85 | id: 'offset', 86 | Header: 'Offset', 87 | accessor: 'offset', 88 | width: 100, 89 | }, 90 | { 91 | id: 'key', 92 | Header: 'Key', 93 | accessor: 'key', 94 | width: 150, 95 | }, 96 | { 97 | id: 'value', 98 | Header: 'Value', 99 | accessor: 'value', 100 | style: { 101 | wordWrap: 'break-word', 102 | whiteSpace: 'pre-wrap', 103 | }, 104 | filterMethod: (filter: any, row: any) => JSON.stringify(row[filter.id]).includes(filter.value), 105 | Cell: (row: any) => ( 106 | (row.value && typeof row.value === 'object' && 107 | ) || 114 | (typeof row.value === 'string' &&
{row.value}
) 115 | ), 116 | }, 117 | ]; 118 | -------------------------------------------------------------------------------- /src/types.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export type Consumers = { 4 | list: Array, 5 | records: Array, 6 | loading: boolean, 7 | error?: string, 8 | progress?: string, 9 | timeout?: number, 10 | page?: number, 11 | } 12 | 13 | export type ConsumerAction = { 14 | type: string, 15 | message?: ?Error, 16 | consumerId?: string, 17 | topicName?: string, 18 | offset?: string, 19 | timeout?: number, 20 | page?: number, 21 | payload?: Object, 22 | } 23 | 24 | export type Topics = { 25 | list: Array, 26 | topic: { 27 | name: string, 28 | partitions?: Array, 29 | configs?: Array, 30 | }, 31 | loading: boolean, 32 | error?: string, 33 | } 34 | 35 | export type TopicAction = { 36 | type: string, 37 | message?: Error, 38 | topic?: { 39 | name: string, 40 | }, 41 | payload?:{ 42 | partitions: Array, 43 | configs: Array, 44 | } 45 | } 46 | 47 | export type Settings = { 48 | url: string, 49 | timeout: number, 50 | window: number, 51 | error?: string, 52 | tabIndex?: number, 53 | offset?: string, 54 | } 55 | 56 | export type SettingAction = { 57 | type: string, 58 | message?: Error, 59 | timeout?: number, 60 | window?: number, 61 | } 62 | --------------------------------------------------------------------------------