diff --git a/Dockerfile b/Dockerfile index 3fffbd5..fa45ee1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,11 @@ WORKDIR "/src" # Env variables ENV SERVER_PORT 3000 +ENV DATA_URL https://micro-bigfive-questions-olegrjzdba.now.sh/getQuestions +ENV GENERATOR_URL https://micro-bigfive-generator.maccyber.io/post +ENV DEFAULT_LANG en +ENV DEFAULT_LIMIT 5 +ENV DEFAULT_TEST 50 # Install dependencies RUN npm install --production diff --git a/README.md b/README.md index ad496f6..5af9e9e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,10 @@ Website for five factor model of personality based on work at https://github.com Using [next.js](https://github.com/zeit/next.js) framework and [micro](https://github.com/zeit/micro) services: * [micro-bigfive-questions](https://github.com/maccyber/micro-bigfive-questions) + * [micro-bigfive-results-generator](https://github.com/maccyber/micro-bigfive-results-generator) * [micro-bigfive-evaluator](https://github.com/maccyber/micro-bigfive-evaluator) + * [micro-bigfive-results](https://github.com/maccyber/micro-bigfive-results) + * [micro-bigfive-save](https://github.com/maccyber/micro-bigfive-save) ## Example See https://bigfive.maccyber.io (not finished) diff --git a/components/loading.js b/components/loading.js new file mode 100644 index 0000000..402740a --- /dev/null +++ b/components/loading.js @@ -0,0 +1,18 @@ +import React from 'react' + +export default ({loading}) => ( + +

+ +

+

+ LOADING ...

+ +
+) diff --git a/components/navbuttons.js b/components/navbuttons.js index 95de305..106a0a8 100644 --- a/components/navbuttons.js +++ b/components/navbuttons.js @@ -3,12 +3,12 @@ import React from 'react' export default ({prevPage, previous, submitDisabled}) => (

diff --git a/components/person-info.js b/components/person-info.js new file mode 100644 index 0000000..4b5a9b2 --- /dev/null +++ b/components/person-info.js @@ -0,0 +1,89 @@ +import React from 'react' +const countries = require('country-list')() + +export default ({loading}) => ( +

+
+

Information

+ By taking the test you are agreeing that the input you provide will be saved and used for statistics. +
    +
  • + Answer honestly, even if you don't like the answer. +
  • +
  • + Describe yourself as you generally are now, not as you wish to be in the future. +
  • +
  • + Compare yourself in relation to other people of the same sex and roughly the same age. +
  • +
  • + Your spontaneous answer is usually the most accurate. +
  • +
+

Age

+ +

Gender

+ + radio_button_checked + Female + radio_button_unchecked + Male + + +

Nationality

+ +
+ +

+ +

+
+
+ +
+) diff --git a/components/thetest.js b/components/thetest.js index 6a65d8f..0904392 100644 --- a/components/thetest.js +++ b/components/thetest.js @@ -1,10 +1,12 @@ import React from 'react' import config from '../config' import getData from '../lib/get-data' +import postData from '../lib/post-data' import isAllChecked from '../lib/is-all-checked' import Progressbar from './progressbar' import Questions from './questions' import Languagebar from './languagebar' +import Loading from './loading' import Navbuttons from './navbuttons' import TimerExample from './timer' @@ -12,15 +14,15 @@ export default class TheTest extends React.Component { constructor (props) { super(props) this.state = { - loading: '', + loading: true, choises: [], questions: [], languages: [], radios: [], lang: config.defaultLanguage, - choosenTest: config.defaultTest, + choosenTest: props.test || config.defaultTest, submitDisabled: true, - now: Date.now() + now: Date.now(), } this.handleRadioChange = this.handleRadioChange.bind(this) this.handleSubmit = this.handleSubmit.bind(this) @@ -29,15 +31,15 @@ export default class TheTest extends React.Component { } async componentDidMount () { - const data = await getData(`${config.dataUrl}?lang=${this.state.lang}&testType=${this.state.choosenTest}`) - this.setState({ ...data, loading: 'Not' }) + const data = await getData(`${config.dataUrl}?lang=${this.state.lang}&testType=${this.state.choosenTest}&limit=${config.defaultLimit}`) + this.setState({ ...data, loading: false }) } handleRadioChange (e) { let radioStore = this.state.radios const selectedName = parseInt(e.currentTarget.getAttribute('name')) const selectedValue = parseInt(e.currentTarget.getAttribute('value')) - const {domain, facet} = this.state.questions.filter(c => c.id === selectedName)[0] + const {domain, facet} = this.state.questions.find(c => c.id === selectedName) radioStore[selectedName] = {score: selectedValue, domain: domain, facet: facet} this.setState({radios: radioStore}) const allChecked = isAllChecked(radioStore, this.state.from, this.state.to) @@ -46,13 +48,13 @@ export default class TheTest extends React.Component { async switchLanguage (e) { const lang = e.target.getAttribute('name') - const data = await getData(`${config.dataUrl}?page=${this.state.page}&lang=${lang}&testType=${this.state.choosenTest}`) + const data = await getData(`${config.dataUrl}?page=${this.state.page}&lang=${lang}&testType=${this.state.choosenTest}&limit=${config.defaultLimit}`) this.setState({ ...data, lang: lang }) } async prevPage (e) { if (this.state.previous) { - const data = await getData(`${this.state.previous}&lang=${this.state.lang}&testType=${this.state.choosenTest}`) + const data = await getData(`${this.state.previous}&lang=${this.state.lang}&testType=${this.state.choosenTest}&limit=${config.defaultLimit}`) this.setState({ ...data, submitDisabled: false }) } } @@ -60,12 +62,24 @@ export default class TheTest extends React.Component { async handleSubmit (e) { e.preventDefault() if (this.state.next) { - const data = await getData(`${this.state.next}&lang=${this.state.lang}&testType=${this.state.choosenTest}`) + const data = await getData(`${this.state.next}&lang=${this.state.lang}&testType=${this.state.choosenTest}&limit=${config.defaultLimit}`) this.setState({ ...data, submitDisabled: true }) window.scrollTo(0, 0) // Scrolls to top of page } else { console.log('To be posted') - console.log(JSON.stringify(this.state.radios, null, 2)) + this.state.radios.shift() + const answers = { + timeElapsed: Math.round((this.state.now - Date.now()) / 1000), + ip: this.props.ip, + browserAgent: this.props.browserAgent, + lang: this.state.lang, + test: this.state.testInfo.test, + totalQuestions: this.state.totalQuestions, + answers: this.state.radios + } + console.log(JSON.stringify(answers, null, 2)) + const postRes = await postData(config.generatorUrl, answers) + console.log(postRes.id) console.log('finished. do something') } } @@ -73,10 +87,12 @@ export default class TheTest extends React.Component { render () { return (
- - +
+ + +
- LOADING ... + {this.state.questions.map(q => { return ( @@ -126,13 +142,6 @@ export default class TheTest extends React.Component { .timer { float: right; } - .loading { - font-size: 40px; - line-height: 200px; - } - .loadingNot { - display: none; - } `} ) diff --git a/components/timer.js b/components/timer.js index 14af6eb..ca5af9c 100644 --- a/components/timer.js +++ b/components/timer.js @@ -19,6 +19,6 @@ export default class Timer extends React.Component { } render () { let seconds = Math.round(this.state.elapsed / 1000) - return

Test started {seconds} seconds ago

+ return
Test started {seconds} seconds ago
} } diff --git a/config/index.js b/config/index.js index 052f9b1..10ba308 100644 --- a/config/index.js +++ b/config/index.js @@ -1,8 +1,10 @@ 'use strict' module.exports = { - dataUrl: process.env.DATA_URL || 'https://micro-bigfive-questions-olegrjzdba.now.sh/getQuestions', + dataUrl: process.env.DATA_URL || 'https://bigfive-questions.maccyber.io/getQuestions', + generatorUrl: process.env.GENERATOR_URL || 'https://micro-bigfive-save-cmfdczkdwn.now.sh', defaultLanguage: process.env.DEFAULT_LANG || 'en', - defaultTest: process.env.DEFAULT_TEST || '50' + defaultLimit: parseInt(process.env.DEFAULT_LIMIT) || 5, + defaultTest: process.env.DEFAULT_TEST || 50 } diff --git a/lib/get-data.js b/lib/get-data.js index e640fc5..9c84cfe 100644 --- a/lib/get-data.js +++ b/lib/get-data.js @@ -1,9 +1,8 @@ 'use strict' -import fetch from 'isomorphic-fetch' +import axios from 'axios' module.exports = async (url) => { - const dataResponse = await fetch(url) - const data = await dataResponse.json() - return data + const res = await axios.get(url) + return res.data } diff --git a/lib/is-all-checked.js b/lib/is-all-checked.js index 5a4fb11..fa5ed50 100644 --- a/lib/is-all-checked.js +++ b/lib/is-all-checked.js @@ -1,6 +1,8 @@ 'use strict' +import config from '../config' + module.exports = (radios, from, to) => { const currentQuestions = radios.slice(from, to) - return Object.keys(currentQuestions).length === 5 + return Object.keys(currentQuestions).length === config.defaultLimit } diff --git a/lib/post-data.js b/lib/post-data.js new file mode 100644 index 0000000..3c62636 --- /dev/null +++ b/lib/post-data.js @@ -0,0 +1,8 @@ +'use strict' + +import axios from 'axios' + +module.exports = async (url, data) => { + const res = await axios.post(url, data) + return res.data +} diff --git a/package.json b/package.json index e900a9f..d3e0332 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "start": "next start" }, "dependencies": { - "isomorphic-fetch": "2.2.1", + "axios": "0.15.3", + "country-list": "1.1.0", "next": "1.2.3" } } diff --git a/pages/100.js b/pages/100.js new file mode 100644 index 0000000..96f95f6 --- /dev/null +++ b/pages/100.js @@ -0,0 +1,15 @@ +'use strict' + +import React from 'react' +import TheTest from '../components/thetest' +import Page from '../layouts' + +export default class Index extends React.Component { + render () { + return ( + + + + ) + } +} diff --git a/pages/120.js b/pages/120.js new file mode 100644 index 0000000..e7d8f00 --- /dev/null +++ b/pages/120.js @@ -0,0 +1,15 @@ +'use strict' + +import React from 'react' +import TheTest from '../components/thetest' +import Page from '../layouts' + +export default class Index extends React.Component { + render () { + return ( + + + + ) + } +} diff --git a/pages/50.js b/pages/50.js new file mode 100644 index 0000000..ee51c51 --- /dev/null +++ b/pages/50.js @@ -0,0 +1,15 @@ +'use strict' + +import React from 'react' +import TheTest from '../components/thetest' +import Page from '../layouts' + +export default class Index extends React.Component { + render () { + return ( + + + + ) + } +} diff --git a/pages/index.js b/pages/index.js index 8ee54e3..18bccd4 100644 --- a/pages/index.js +++ b/pages/index.js @@ -5,10 +5,16 @@ import TheTest from '../components/thetest' import Page from '../layouts' export default class Index extends React.Component { + static async getInitialProps ({ req }) { + return { + userAgent: req ? req.headers['user-agent'] : navigator.userAgent, + ip: req.headers['x-forwarded-for'] || req.socket.remoteAddress + } + } render () { return ( - + ) } diff --git a/pages/info.js b/pages/info.js new file mode 100644 index 0000000..c34029d --- /dev/null +++ b/pages/info.js @@ -0,0 +1,21 @@ +'use strict' + +import React from 'react' +import PersonInfo from '../components/person-info' +import Page from '../layouts' + +export default class Index extends React.Component { + static async getInitialProps ({ req }) { + return { + userAgent: req ? req.headers['user-agent'] : navigator.userAgent, + ip: req.headers['x-forwarded-for'] || req.socket.remoteAddress + } + } + render () { + return ( + + + + ) + } +} diff --git a/static/loading.svg b/static/loading.svg new file mode 100644 index 0000000..6d10888 --- /dev/null +++ b/static/loading.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9541aae..8c34ef1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,30 +7,30 @@ Base64@~0.2.0: resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" -acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: +acorn-jsx@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" dependencies: acorn "^3.0.4" +acorn@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + acorn@^3.0.0, acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0: - version "4.11.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.2.tgz#f166c3c11cbc6cb9dcc102a5bcfe5b72c95287e6" + version "4.11.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.3.tgz#ce30bdb90d1254f762c75af915fb3a63e7183d22" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -75,8 +75,8 @@ anymatch@^1.3.0: micromatch "^2.1.5" aproba@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + version "1.1.1" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" are-we-there-yet@~1.1.2: version "1.1.2" @@ -166,8 +166,14 @@ aws-sign2@~0.6.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" aws4@^1.2.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +axios@0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.15.3.tgz#2c9d638b2e191a08ea1d6cc988eadd6ba5bdc053" + dependencies: + follow-redirects "1.0.0" babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: version "6.22.0" @@ -201,19 +207,19 @@ babel-core@6.18.2: slash "^1.0.0" source-map "^0.5.0" -babel-core@^6.22.0: - version "6.22.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648" +babel-core@^6.23.0: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.23.1.tgz#c143cb621bb2f621710c220c5d579d15b8a442df" dependencies: babel-code-frame "^6.22.0" - babel-generator "^6.22.0" - babel-helpers "^6.22.0" - babel-messages "^6.22.0" - babel-register "^6.22.0" + babel-generator "^6.23.0" + babel-helpers "^6.23.0" + babel-messages "^6.23.0" + babel-register "^6.23.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.1" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" babylon "^6.11.0" convert-source-map "^1.1.0" debug "^2.1.1" @@ -237,24 +243,25 @@ babel-generator@6.19.0, babel-generator@^6.18.0: lodash "^4.2.0" source-map "^0.5.0" -babel-generator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" +babel-generator@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.23.0.tgz#6b8edab956ef3116f79d8c84c5a3c05f32a74bc5" dependencies: - babel-messages "^6.22.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.2.0" source-map "^0.5.0" + trim-right "^1.0.1" -babel-helper-builder-react-jsx@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.22.0.tgz#aafb31913e47761fd4d0b6987756a144a65fca0d" +babel-helper-builder-react-jsx@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.23.0.tgz#d53fc8c996e0bc56d0de0fc4cc55a7138395ea4b" dependencies: babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" esutils "^2.0.0" lodash "^4.2.0" @@ -267,24 +274,24 @@ babel-helper-call-delegate@^6.22.0: babel-traverse "^6.22.0" babel-types "^6.22.0" -babel-helper-define-map@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.22.0.tgz#9544e9502b2d6dfe7d00ff60e82bd5a7a89e95b7" +babel-helper-define-map@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz#1444f960c9691d69a2ced6a205315f8fd00804e7" dependencies: - babel-helper-function-name "^6.22.0" + babel-helper-function-name "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" lodash "^4.2.0" -babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz#51f1bdc4bb89b15f57a9b249f33d742816dcbefc" +babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" dependencies: babel-helper-get-function-arity "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-helper-get-function-arity@^6.22.0: version "6.22.0" @@ -300,12 +307,12 @@ babel-helper-hoist-variables@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" -babel-helper-optimise-call-expression@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.22.0.tgz#f8d5d4b40a6e2605a6a7f9d537b581bea3756d15" +babel-helper-optimise-call-expression@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz#f3ee7eed355b4282138b33d02b78369e470622f5" dependencies: babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" babel-helper-regex@^6.22.0: version "6.22.0" @@ -325,23 +332,23 @@ babel-helper-remap-async-to-generator@^6.16.0: babel-traverse "^6.22.0" babel-types "^6.22.0" -babel-helper-replace-supers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.22.0.tgz#1fcee2270657548908c34db16bcc345f9850cf42" +babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" dependencies: - babel-helper-optimise-call-expression "^6.22.0" - babel-messages "^6.22.0" + babel-helper-optimise-call-expression "^6.23.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" -babel-helpers@^6.16.0, babel-helpers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.22.0.tgz#d275f55f2252b8101bff07bc0c556deda657392c" +babel-helpers@^6.16.0, babel-helpers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.23.0.tgz#4f8f2e092d0b6a8808a4bde79c27f1e2ecf0d992" dependencies: babel-runtime "^6.22.0" - babel-template "^6.22.0" + babel-template "^6.23.0" babel-loader@6.2.8: version "6.2.8" @@ -352,9 +359,9 @@ babel-loader@6.2.8: mkdirp "^0.5.1" object-assign "^4.0.1" -babel-messages@^6.22.0, babel-messages@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" +babel-messages@^6.23.0, babel-messages@^6.8.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: babel-runtime "^6.22.0" @@ -426,28 +433,28 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoping@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.22.0.tgz#00d6e3a0bebdcfe7536b9d653b44a9141e63e47e" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" dependencies: babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" lodash "^4.2.0" babel-plugin-transform-es2015-classes@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz#54d44998fd823d9dca15292324161c331c1b6f14" - dependencies: - babel-helper-define-map "^6.22.0" - babel-helper-function-name "^6.22.0" - babel-helper-optimise-call-expression "^6.22.0" - babel-helper-replace-supers "^6.22.0" - babel-messages "^6.22.0" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz#49b53f326202a2fd1b3bbaa5e2edd8a4f78643c1" + dependencies: + babel-helper-define-map "^6.23.0" + babel-helper-function-name "^6.23.0" + babel-helper-optimise-call-expression "^6.23.0" + babel-helper-replace-supers "^6.23.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-computed-properties@^6.3.13: version "6.22.0" @@ -457,8 +464,8 @@ babel-plugin-transform-es2015-computed-properties@^6.3.13: babel-template "^6.22.0" babel-plugin-transform-es2015-destructuring@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.22.0.tgz#8e0af2f885a0b2cf999d47c4c1dd23ce88cfa4c6" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" @@ -470,8 +477,8 @@ babel-plugin-transform-es2015-duplicate-keys@^6.6.0: babel-types "^6.22.0" babel-plugin-transform-es2015-for-of@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.22.0.tgz#180467ad63aeea592a1caeee4bf1c8b3e2616265" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" @@ -498,29 +505,29 @@ babel-plugin-transform-es2015-modules-amd@^6.18.0, babel-plugin-transform-es2015 babel-template "^6.22.0" babel-plugin-transform-es2015-modules-commonjs@^6.18.0, babel-plugin-transform-es2015-modules-commonjs@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz#6ca04e22b8e214fb50169730657e7a07dc941145" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.23.0.tgz#cba7aa6379fb7ec99250e6d46de2973aaffa7b92" dependencies: babel-plugin-transform-strict-mode "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-modules-systemjs@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.22.0.tgz#810cd0cd025a08383b84236b92c6e31f88e644ad" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.23.0.tgz#ae3469227ffac39b0310d90fec73bfdc4f6317b0" dependencies: babel-helper-hoist-variables "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" + babel-template "^6.23.0" babel-plugin-transform-es2015-modules-umd@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.22.0.tgz#60d0ba3bd23258719c64391d9bf492d648dc0fae" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.23.0.tgz#8d284ae2e19ed8fe21d2b1b26d6e7e0fcd94f0f1" dependencies: babel-plugin-transform-es2015-modules-amd "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" + babel-template "^6.23.0" babel-plugin-transform-es2015-object-super@^6.3.13: version "6.22.0" @@ -530,15 +537,15 @@ babel-plugin-transform-es2015-object-super@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-es2015-parameters@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.22.0.tgz#57076069232019094f27da8c68bb7162fe208dbb" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" dependencies: babel-helper-call-delegate "^6.22.0" babel-helper-get-function-arity "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babel-plugin-transform-es2015-shorthand-properties@^6.18.0: version "6.22.0" @@ -568,8 +575,8 @@ babel-plugin-transform-es2015-template-literals@^6.6.0: babel-runtime "^6.22.0" babel-plugin-transform-es2015-typeof-symbol@^6.18.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.22.0.tgz#87faf2336d3b6a97f68c4d906b0cd0edeae676e1" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" dependencies: babel-runtime "^6.22.0" @@ -596,8 +603,8 @@ babel-plugin-transform-object-rest-spread@6.19.0: babel-runtime "^6.0.0" babel-plugin-transform-react-display-name@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.22.0.tgz#077197520fa8562b8d3da4c3c4b0b1bdd7853f26" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.23.0.tgz#4398910c358441dc4cef18787264d0412ed36b37" dependencies: babel-runtime "^6.22.0" @@ -616,10 +623,10 @@ babel-plugin-transform-react-jsx-source@^6.3.13: babel-runtime "^6.22.0" babel-plugin-transform-react-jsx@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.22.0.tgz#48556b7dd4c3fe97d1c943bcd54fc3f2561c1817" + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.23.0.tgz#23e892f7f2e759678eb5e4446a8f8e94e81b3470" dependencies: - babel-helper-builder-react-jsx "^6.22.0" + babel-helper-builder-react-jsx "^6.23.0" babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" @@ -683,11 +690,11 @@ babel-preset-react@6.16.0: babel-plugin-transform-react-jsx-self "^6.11.0" babel-plugin-transform-react-jsx-source "^6.3.13" -babel-register@^6.18.0, babel-register@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" +babel-register@^6.18.0, babel-register@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.23.0.tgz#c9aa3d4cca94b51da34826c4a0f9e08145d74ff3" dependencies: - babel-core "^6.22.0" + babel-core "^6.23.0" babel-runtime "^6.22.0" core-js "^2.4.0" home-or-tmp "^2.0.0" @@ -709,33 +716,33 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.7.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" +babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0, babel-template@^6.7.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" dependencies: babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: - version "6.22.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" +babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: babel-code-frame "^6.22.0" - babel-messages "^6.22.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.23.0" babylon "^6.15.0" debug "^2.2.0" globals "^9.0.0" invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" dependencies: babel-runtime "^6.22.0" esutils "^2.0.2" @@ -944,8 +951,8 @@ constants-browserify@0.0.1: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-0.0.1.tgz#92577db527ba6c4cf0a4568d84bc031f441e21f2" convert-source-map@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + version "1.4.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" core-js@^1.0.0: version "1.2.7" @@ -959,6 +966,10 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +country-list@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/country-list/-/country-list-1.1.0.tgz#3ea3608857e17458657d129e1d737e4c2f79775b" + cross-spawn@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.0.1.tgz#a3bbb302db2297cbea3c04edf36941f4613aa399" @@ -1002,8 +1013,8 @@ debug-log@^1.0.0: resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" debug@^2.1.1, debug@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + version "2.6.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" dependencies: ms "0.7.2" @@ -1217,8 +1228,8 @@ eslint-config-standard@6.2.1: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-6.2.1.tgz#d3a68aafc7191639e7ee441e7348739026354292" eslint-plugin-promise@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.0.tgz#6ba9048c2df57be77d036e0c68918bc9b4fc4195" + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.1.tgz#6911a9010bf84e17d82e19e0ab0f80ab3ad6db4c" eslint-plugin-react@~6.7.1: version "6.7.1" @@ -1271,15 +1282,15 @@ eslint@~3.10.2: user-home "^2.0.0" espree@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" + version "3.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" dependencies: - acorn "^4.0.1" + acorn "4.0.4" acorn-jsx "^3.0.0" -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" esrecurse@^4.1.0: version "4.1.0" @@ -1434,6 +1445,12 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +follow-redirects@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.0.0.tgz#8e34298cbd2e176f254effec75a1c78cc849fd37" + dependencies: + debug "^2.2.0" + for-in@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" @@ -1496,8 +1513,8 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: rimraf "2" gauge@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" + version "2.7.3" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -1506,7 +1523,6 @@ gauge@~2.7.1: signal-exit "^3.0.0" string-width "^1.0.1" strip-ansi "^3.0.1" - supports-color "^0.2.0" wide-align "^1.1.0" generate-function@^2.0.0: @@ -1571,8 +1587,8 @@ global@^4.3.0: process "~0.5.1" globals@^9.0.0, globals@^9.2.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + version "9.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.15.0.tgz#7a5d8fd865e69de910b090b15a87772f9423c5de" globby@^5.0.0: version "5.0.0" @@ -1637,8 +1653,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + version "2.2.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.2.0.tgz#7a0d097863d886c0fabbdcd37bf1758d8becf8a5" html-entities@^1.2.0: version "1.2.0" @@ -1892,7 +1908,7 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" -isomorphic-fetch@2.2.1, isomorphic-fetch@^2.1.1: +isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" dependencies: @@ -1914,15 +1930,15 @@ js-tokens@^3.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" js-yaml@^3.5.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + version "3.8.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" dependencies: argparse "^1.0.7" - esprima "^2.6.0" + esprima "^3.1.1" jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsesc@^1.3.0: version "1.3.0" @@ -1971,10 +1987,9 @@ jsprim@^1.2.2: verror "1.3.6" jsx-ast-utils@^1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4" + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.0.tgz#5afe38868f56bc8cc7aeaef0100ba8c75bd12591" dependencies: - acorn-jsx "^3.0.1" object-assign "^4.1.0" kind-of@^3.0.2: @@ -2455,8 +2470,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" private@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" process-nextick-args@~1.0.6: version "1.0.7" @@ -2985,10 +3000,6 @@ strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -3071,6 +3082,10 @@ tough-cookie@~2.3.0: dependencies: punycode "^1.4.1" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb"