diff --git a/package.json b/package.json index 73167d9..115bc32 100644 --- a/package.json +++ b/package.json @@ -37,17 +37,15 @@ "lodash": "^4.17.4", "markdown-it": "^8.3.1", "prop-types": "^15.5.8", + "qs": "^6.4.0", "react": "^15.5.4", "react-addons-create-fragment": "^15.5.4", "react-document-title": "^2.0.2", "react-dom": "^15.5.4", - "react-json-view": "^1.8.2", - "react-redux": "^5.0.3", - "react-router": "3.0.0", - "react-router-redux": "^4.0.8", + "react-json-view": "^1.8.4", + "react-router": "^4.1.1", + "react-router-dom": "^4.1.1", "react-scrollable-anchor": "^0.4.2", - "redux": "^3.6.0", - "redux-thunk": "^2.2.0", "superagent": "^3.5.2" }, "devDependencies": { @@ -61,11 +59,11 @@ "babel-preset-stage-1": "^6.22.0", "balloon-css": "^0.4.0", "css-loader": "^0.28.4", - "eslint": "^3.19.0", + "eslint": "^4.0.0", "eslint-config-standard": "^10.2.1", "eslint-config-standard-react": "^5.0.0", "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^4.2.2", + "eslint-plugin-node": "^5.0.0", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-react": "^7.0.1", "eslint-plugin-standard": "^3.0.1", diff --git a/src/components/Example/Example.js b/src/components/Example/Example.js index 7ba96b7..58d8c35 100644 --- a/src/components/Example/Example.js +++ b/src/components/Example/Example.js @@ -58,7 +58,8 @@ export default class Example extends Component { displayObjectSize={false} collapsed={this.state.collapseAll} enableClipboard={false} - />} + /> + } ) } diff --git a/src/containers/Base.js b/src/containers/Base.js new file mode 100644 index 0000000..9c2f6f1 --- /dev/null +++ b/src/containers/Base.js @@ -0,0 +1,59 @@ +import React, { Component } from 'react' +import { configureAnchors } from 'react-scrollable-anchor' +import DocumentTitle from 'react-document-title' +import PropTypes from 'prop-types' +import { parse as parseQuery } from 'qs' + +import Page from '../components/Page/Page' +import { getDefinition, parseDefinition } from '../lib/definitions' +import '../general.scss' + +export default class Base extends Component { + state = { + parserType: 'open-api-v3', + definitionUrl: null, + definition: null, + parsedDefinition: null + } + + setDefinition = async ({ definitionUrl, parserType = this.state.parserType }) => { + const definition = await getDefinition(definitionUrl) + const parsedDefinition = await parseDefinition(definition, parserType) + + this.setState({ definitionUrl, definition, parsedDefinition, parserType }) + } + + async componentDidMount () { + const { location } = this.props + const { parserType } = this.state + + const definitionUrl = parseQuery(location.search.split('?')[1]).url + + await this.setDefinition({ definitionUrl, parserType }) + + configureAnchors({ offset: -10, scrollDuration: 100 }) + } + + render () { + const { parsedDefinition: definition, definitionUrl } = this.state + const { location } = this.props + + // TODO: add input to add a url + return ( + + + {!definition && "Welcome to Temando's new Open API Renderer. Watch this space!"} + {definition && } + + + ) + } +} + +Base.contextTypes = { + router: PropTypes.object +} + +Base.propTypes = { + location: PropTypes.object +} diff --git a/src/handlers/BaseHandler.js b/src/handlers/BaseHandler.js deleted file mode 100644 index 1b4cd98..0000000 --- a/src/handlers/BaseHandler.js +++ /dev/null @@ -1,58 +0,0 @@ -import React, { Component } from 'react' -import { connect } from 'react-redux' -import { bindActionCreators } from 'redux' -import { configureAnchors } from 'react-scrollable-anchor' -import DocumentTitle from 'react-document-title' -import PropTypes from 'prop-types' - -import Page from '../components/Page/Page' -import getDefinition from '../store/definition/actions' -import '../general.scss' - -class BaseHandler extends Component { - componentDidMount () { - // TODO: refactor this to be more flexible, i.e. coming from multiple places - const openApiUrl = this.props.location.query.url - const parserType = this.props.parserType - this.props.getDefinition(openApiUrl, parserType) - configureAnchors({ offset: -10, scrollDuration: 100 }) - } - - render () { - const { parsedDefinition: definition, location } = this.props - const specUrl = location.query.url - - return ( - - - {!definition && "Welcome to Temando's new Open API Renderer. Watch this space!"} - {definition && } - - - ) - } -} - -const mapStateToProps = state => { - return { - parsedDefinition: state.data.parsedDefinition, - parserType: state.data.parserType - } -} - -const mapDispatchToProps = (dispatch) => bindActionCreators({ - getDefinition -}, dispatch) - -BaseHandler.contextTypes = { - router: PropTypes.object -} - -BaseHandler.propTypes = { - location: PropTypes.object, - parserType: PropTypes.string, - parsedDefinition: PropTypes.object, - getDefinition: PropTypes.func -} - -export default connect(mapStateToProps, mapDispatchToProps)(BaseHandler) diff --git a/src/index.js b/src/index.js index 9661205..6f7458e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,25 +1,12 @@ import React from 'react' import ReactDOM from 'react-dom' -import { Provider } from 'react-redux' -import { Router, browserHistory } from 'react-router' -import { syncHistoryWithStore } from 'react-router-redux' -import 'babel-polyfill' +import { BrowserRouter as Router } from 'react-router-dom' -import routes from './routes' -import configureStore from './store/configure' - -// const isBrowser = typeof navigator !== 'undefined' && navigator.indexOf('Node.js') === -1; - -const store = configureStore() -const history = syncHistoryWithStore(browserHistory, store) +import { routes } from './routes' export default class App extends React.Component { render () { - return ( - - {routes} - - ) + return {routes} } } diff --git a/src/lib/definitions.js b/src/lib/definitions.js new file mode 100644 index 0000000..4aa5275 --- /dev/null +++ b/src/lib/definitions.js @@ -0,0 +1,33 @@ +import request from 'superagent' +import yaml from 'js-yaml' +import getParserFunction from '../parser/parserFactory' + +export async function getDefinition (url) { + if (!url) { throw new Error('Missing url') } + + const response = await request + .get(url) + .timeout({ + response: 5000, + deadline: 60000 + }) + + let definition = response.body + + // TODO move this to another place + if (url.endsWith('.yaml') || url.endsWith('.yml')) { + definition = yaml.safeLoad(response.text) + } else if (url.endsWith('json')) { + definition = JSON.parse(response.text) + } + + return definition +} + +export async function parseDefinition (definition, parserType) { + const parser = getParserFunction(parserType) + + const parsedDefinition = await parser(definition) + + return parsedDefinition +} diff --git a/src/routes.js b/src/routes.js index 2a8e03b..358199b 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,9 +1,7 @@ import React from 'react' -import { Route } from 'react-router' -import BaseHandler from './handlers/BaseHandler' +import { Route } from 'react-router-dom' +import Base from './containers/Base' -const routes = ( - +export const routes = ( + ) - -export default routes diff --git a/src/store/configure.js b/src/store/configure.js deleted file mode 100644 index 0552f89..0000000 --- a/src/store/configure.js +++ /dev/null @@ -1,27 +0,0 @@ -import { createStore, applyMiddleware, combineReducers, compose } from 'redux' -import thunkMiddleware from 'redux-thunk' -// import createHistory from 'history/createBrowserHistory'; -import { routerReducer } from 'react-router-redux' - -import definitionReducer from './definition/reducer' - -// export const history = createHistory(); - -export default function configureStore (initialState = window.STATE_FROM_SERVER) { - const reducer = combineReducers({ - routing: routerReducer, - data: definitionReducer - }) - - const additionalStoreEnhancers = [ - typeof window === 'object' && typeof window.devToolsExtension !== 'undefined' ? window.devToolsExtension() : f => f - ] - - const store = createStore( - reducer, - initialState, - compose(applyMiddleware(thunkMiddleware), ...additionalStoreEnhancers) - ) - - return store -} diff --git a/src/store/definition/actions.js b/src/store/definition/actions.js deleted file mode 100644 index 91ed7c0..0000000 --- a/src/store/definition/actions.js +++ /dev/null @@ -1,73 +0,0 @@ -import request from 'superagent' -import yaml from 'js-yaml' -import { ActionType } from './constants' -import getParserFunction from '../../parser/parserFactory' - -function fetchDefinitionSuccess (definition) { - return { - type: ActionType.FETCH_DEFINITION_SUCCESS, - payload: definition - } -} - -function fetchDefinitionFailure (error) { - console.error('Failed fetching definition', error) - return { - type: ActionType.FETCH_DEFINITION_FAILURE, - payload: error - } -} - -function parseDefinitionSuccess (parsedDefinition) { - return { - type: ActionType.PARSE_DEFINITION_SUCCESS, - payload: parsedDefinition - } -} - -function parseDefinitionFailure (error) { - console.error('Failed parsing definition', error) - return { - type: ActionType.PARSE_DEFINITION_FAILURE, - payload: error - } -} - -export default function getDefinition (url, parserType) { - if (!url) { throw new Error('getDefinition called without a url') } - - return (dispatch) => { - request - .get(url) - .timeout({ - response: 5000, - deadline: 60000 - }) - .then((response) => { - let definition = response.body - - // TODO move this to another place - if (url.endsWith('yaml') || url.endsWith('yml')) { - definition = yaml.safeLoad(response.text) - } else if (url.endsWith('json')) { - definition = JSON.parse(response.text) - } - - if (definition) { - dispatch(fetchDefinitionSuccess(definition)) - - const parser = getParserFunction(parserType) - parser(definition) - .then(parsedDefinition => { - dispatch(parseDefinitionSuccess(parsedDefinition)) - }) - .catch(error => { - dispatch(parseDefinitionFailure(error)) - }) - } - }).catch((error) => { - dispatch(fetchDefinitionFailure(error)) - } - ) - } -} diff --git a/src/store/definition/constants.js b/src/store/definition/constants.js deleted file mode 100644 index 263a2d5..0000000 --- a/src/store/definition/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -export const ActionType = { - FETCH_DEFINITION_SUCCESS: 'FETCH_DEFINITION_SUCCESS', - FETCH_DEFINITION_FAILURE: 'FETCH_DEFINITION_FAILURE', - PARSE_DEFINITION_SUCCESS: 'PARSE_DEFINITION_SUCCESS', - PARSE_DEFINITION_FAILURE: 'PARSE_DEFINITION_FAILURE' -} diff --git a/src/store/definition/reducer.js b/src/store/definition/reducer.js deleted file mode 100644 index 69e02fa..0000000 --- a/src/store/definition/reducer.js +++ /dev/null @@ -1,25 +0,0 @@ -import { ActionType } from './constants' - -let initialState = { - parserType: 'open-api-v3', - definition: null, - parsedDefinition: null -} - -export default function definitionReducer (state = initialState, action) { - const { payload } = action - switch (action.type) { - case ActionType.FETCH_DEFINITION_SUCCESS: - return { - ...state, - definition: payload - } - case ActionType.PARSE_DEFINITION_SUCCESS: - return { - ...state, - parsedDefinition: payload - } - default: - return state - } -} diff --git a/webpack.config.js b/webpack.config.js index 381d4b6..655997f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,8 @@ const extractSass = new ExtractTextPlugin({ module.exports = { context: `${__dirname}/src`, entry: { - bundle: ['core-js/es7', './index.js'], + // TODO: remove babel polyfill, use transforms + bundle: ['babel-polyfill', 'core-js/es7', './index.js'], // Everything in the `dependencies` should be considered a `vendor` library vendor: [ diff --git a/yarn.lock b/yarn.lock index 3ca0cea..78a0b36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -279,7 +279,7 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-code-frame@6.22.0, babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: +babel-code-frame@6.22.0, babel-code-frame@^6.11.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -1301,12 +1301,6 @@ clean-css@4.1.x: dependencies: source-map "0.5.x" -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -1450,7 +1444,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.2: +concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1553,14 +1547,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.5.3: - version "15.5.3" - resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.5.3.tgz#fb0f7cae79339e9a179e194ef466efa3923820fe" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - object-assign "^4.1.1" - cross-spawn@4.0.2, cross-spawn@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -1704,12 +1690,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -1989,62 +1969,10 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.22" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.22.tgz#1876c51f990769c112c781ea3ebe89f84fd39071" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - es6-promise@^3.1.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2064,15 +1992,6 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-config-standard-jsx@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.1.tgz#cd4e463d0268e2d9e707f61f42f73f5b3333c642" @@ -2117,14 +2036,13 @@ eslint-plugin-import@^2.3.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-node@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" +eslint-plugin-node@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.0.0.tgz#948b1fb82e3f0a744e86fad19aa4f49537d246cc" dependencies: - ignore "^3.0.11" - minimatch "^3.0.2" - object-assign "^4.0.1" - resolve "^1.1.7" + ignore "^3.3.3" + minimatch "^3.0.4" + resolve "^1.3.3" semver "5.3.0" eslint-plugin-promise@^3.5.0: @@ -2143,47 +2061,51 @@ eslint-plugin-standard@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" -eslint@^3.19.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: - babel-code-frame "^6.16.0" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.0.0.tgz#7277c01437fdf41dccd168d5aa0e49b75ca1f260" + dependencies: + babel-code-frame "^6.22.0" chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" + concat-stream "^1.6.0" + debug "^2.6.8" doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" + eslint-scope "^3.7.1" + espree "^3.4.3" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" + inquirer "^3.0.6" + is-my-json-valid "^2.16.0" is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" + js-yaml "^3.8.4" + json-stable-stringify "^1.0.1" levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + lodash "^4.17.4" + mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" + path-is-inside "^1.0.2" + pluralize "^4.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" strip-json-comments "~2.0.1" - table "^3.7.8" + table "^4.0.1" text-table "~0.2.0" - user-home "^2.0.0" -espree@^3.4.0: +espree@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" dependencies: @@ -2231,13 +2153,6 @@ etag@~1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - eventemitter3@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" @@ -2268,10 +2183,6 @@ exenv@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -2392,13 +2303,6 @@ fbjs@^0.8.4, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.9" -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -2623,7 +2527,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2634,7 +2538,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.14.0: +globals@^9.0.0, globals@^9.17.0: version "9.17.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" @@ -2755,16 +2659,7 @@ he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" -history@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/history/-/history-3.3.0.tgz#fcedcce8f12975371545d735461033579a6dae9c" - dependencies: - invariant "^2.2.1" - loose-envify "^1.2.0" - query-string "^4.2.2" - warning "^3.0.0" - -history@^4.6.1: +history@^4.5.1, history@^4.6.0, history@^4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/history/-/history-4.6.1.tgz#911cf8eb65728555a94f2b12780a0c531a14d2fd" dependencies: @@ -2786,7 +2681,7 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" -hoist-non-react-statics@^1.0.3, hoist-non-react-statics@^1.2.0: +hoist-non-react-statics@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" @@ -2920,7 +2815,7 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@^3.0.11, ignore@^3.2.0: +ignore@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" @@ -2965,7 +2860,7 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@3.0.6: +inquirer@3.0.6, inquirer@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347" dependencies: @@ -2983,29 +2878,11 @@ inquirer@3.0.6: strip-ansi "^3.0.0" through "^2.3.6" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" -invariant@^2.0.0, invariant@^2.2.0, invariant@^2.2.1: +invariant@^2.2.0, invariant@^2.2.1, invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -3099,7 +2976,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-my-json-valid@^2.10.0: +is-my-json-valid@^2.16.0: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: @@ -3505,7 +3382,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.5.1, js-yaml@^3.6.0, js-yaml@^3.7.0, js-yaml@^3.8.4: +js-yaml@^3.6.0, js-yaml@^3.7.0, js-yaml@^3.8.4: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: @@ -3578,7 +3455,7 @@ json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -3717,10 +3594,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash-es@^4.2.0, lodash-es@^4.2.1: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" - lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" @@ -3761,7 +3634,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3967,10 +3840,6 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -4178,7 +4047,7 @@ object-assign@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -4213,10 +4082,6 @@ once@^1.3.0, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" @@ -4386,7 +4251,7 @@ path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -4398,6 +4263,12 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" +path-to-regexp@^1.5.3: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -4446,9 +4317,9 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +pluralize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" portfinder@^1.0.9: version "1.0.13" @@ -4742,9 +4613,9 @@ process@^0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" promise@^7.1.1: version "7.1.1" @@ -4752,7 +4623,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@~15.5.7: +prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@~15.5.7: version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" dependencies: @@ -4796,11 +4667,11 @@ q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@6.4.0, qs@^6.1.0, qs@~6.4.0: +qs@6.4.0, qs@^6.1.0, qs@^6.4.0, qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -query-string@^4.1.0, query-string@^4.2.2: +query-string@^4.1.0: version "4.3.4" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" dependencies: @@ -4900,34 +4771,29 @@ react-dom@^15.5.4: object-assign "^4.1.0" prop-types "~15.5.7" -react-json-view@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.8.2.tgz#6d4a0f3fdc1f40d946b7bff009355fe1d853b72f" +react-json-view@^1.8.4: + version "1.8.4" + resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.8.4.tgz#a048ad788ca7c3515edc026ac7a9455acc69688b" -react-redux@^5.0.3: - version "5.0.5" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.5.tgz#f8e8c7b239422576e52d6b7db06439469be9846a" +react-router-dom@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.1.1.tgz#3021ade1f2c160af97cf94e25594c5f294583025" dependencies: - create-react-class "^15.5.3" - hoist-non-react-statics "^1.0.3" - invariant "^2.0.0" - lodash "^4.2.0" - lodash-es "^4.2.0" - loose-envify "^1.1.0" - prop-types "^15.5.10" - -react-router-redux@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-4.0.8.tgz#227403596b5151e182377dab835b5d45f0f8054e" + history "^4.5.1" + loose-envify "^1.3.1" + prop-types "^15.5.4" + react-router "^4.1.1" -react-router@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-3.0.0.tgz#3f313e4dbaf57048c48dd0a8c3cac24d93667dff" +react-router@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.1.1.tgz#d448f3b7c1b429a6fbb03395099949c606b1fe95" dependencies: - history "^3.0.0" + history "^4.6.0" hoist-non-react-statics "^1.2.0" - invariant "^2.2.1" - loose-envify "^1.2.0" + invariant "^2.2.2" + loose-envify "^1.3.1" + path-to-regexp "^1.5.3" + prop-types "^15.5.4" warning "^3.0.0" react-scrollable-anchor@^0.4.2: @@ -5019,20 +4885,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - recursive-readdir@2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" @@ -5060,19 +4912,6 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^0.4.2" -redux-thunk@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5" - -redux@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/redux/-/redux-3.6.0.tgz#887c2b3d0b9bd86eca2be70571c27654c19e188d" - dependencies: - lodash "^4.2.1" - lodash-es "^4.2.1" - loose-envify "^1.1.0" - symbol-observable "^1.0.2" - regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" @@ -5189,7 +5028,7 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-uncached@^1.0.2: +require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: @@ -5212,19 +5051,12 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.3.2, resolve@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: path-parse "^1.0.5" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -5251,22 +5083,12 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^2.0.0" inherits "^2.0.1" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" dependencies: is-promise "^2.1.0" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" - rx@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" @@ -5414,14 +5236,6 @@ shell-quote@1.6.1: array-reduce "~0.0.0" jsonify "~0.0.0" -shelljs@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" @@ -5749,17 +5563,13 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" -symbol-observable@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" - symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +table@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" dependencies: ajv "^4.7.0" ajv-keywords "^1.0.0" @@ -5987,12 +5797,6 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"