From 30ac6826b4f57f7f83048fba2549063a8e66b9e6 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 11:31:29 +0700 Subject: [PATCH 001/219] dropdown component --- src/assets/images/token-count.svg | 5 -- src/assets/images/token-name.svg | 4 -- src/components/Dropdown/Dropdown.scss | 74 +++++++++++++++++++++ src/components/Dropdown/Dropdown.stories.js | 12 ++++ src/components/Dropdown/index.js | 55 +++++++++++++-- src/components/Hint/Hint.stories.js | 6 +- src/components/Icons/index.js | 12 ++++ src/components/Input/index.js | 5 +- src/components/User/User.stories.js | 2 +- src/components/User/index.js | 9 ++- 10 files changed, 161 insertions(+), 23 deletions(-) delete mode 100644 src/assets/images/token-count.svg delete mode 100644 src/assets/images/token-name.svg diff --git a/src/assets/images/token-count.svg b/src/assets/images/token-count.svg deleted file mode 100644 index 19687bf6..00000000 --- a/src/assets/images/token-count.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/assets/images/token-name.svg b/src/assets/images/token-name.svg deleted file mode 100644 index 89cb029c..00000000 --- a/src/assets/images/token-name.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index e69de29b..084d2118 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -0,0 +1,74 @@ +@import '../../assets/styles/partials/variables'; +.dropdown { + position: relative; + display: inline-block; + &__head { + position: relative; + padding: 8px 15px 8px 5px; + border-bottom: 1px solid $lightGrey; + &-line { + position: absolute; + top: 100%; + width: 0; + height: 1px; + background-color: $primary; + transition: .2s ease-in; + } + + } + &__arrow { + position: absolute; + top: 50%; + right: 0; + font-size: 0; + transform: translateY(-50%) rotate(180deg); + transition: .2s; + } + &__icon { + position: relative; + display: inline-block; + margin-right: 20px; + svg { + vertical-align: middle; + } + &:after { + position: absolute; + top: 50%; + right: -10px; + width: 1px; + height: 13px; + background-color: $lightGrey; + transform: translate(-50%, -50%); + content: ""; + } + } + &__selected { + vertical-align: middle; + } + &__options { + position: absolute; + top: 100%; + height: 0; + max-height: 100px; + overflow-x: hidden; + overflow-y: auto; + transition: .3s ease-in-out; + } + &__option { + + } + + &--opened { + .dropdown__head { + &-line { + width: 100%; + } + } + .dropdown__arrow { + transform: translateY(-50%)rotate(0); + } + .dropdown__options { + height: 100px; + } + } +} \ No newline at end of file diff --git a/src/components/Dropdown/Dropdown.stories.js b/src/components/Dropdown/Dropdown.stories.js index e69de29b..c751dd90 100644 --- a/src/components/Dropdown/Dropdown.stories.js +++ b/src/components/Dropdown/Dropdown.stories.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { CreditCard } from '../Icons'; +import Dropdown from '.'; + +export default ({ title: 'Dropdown' }); +const options = [ + { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, + { label: '0xfffffffffffffffffffffffffffffff', value: '2' }, + { label: '0x00000000000000000000000000', value: '3' }, +]; + +export const WalletDropdown = () => ; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 9b58bcd1..20524a35 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -1,24 +1,57 @@ import React, { Component } from 'react'; +import propTypes from 'prop-types'; +import { DropdownArrow } from '../Icons'; import styles from './Dropdown.scss'; class Dropdown extends Component { constructor() { super(); this.state = { - options: [], + opened: false, + selectedValue: '', + selectedLabel: '', }; } + toggleOptions() { + const { opened } = this.state; + this.setState({ opened: !opened }); + } + + selectOption(selected) { + this.setState({ + selectedLabel: selected.label, + selectedValue: selected.value, + }); + this.toggleOptions(); + } + render() { - const { options } = this.state; - const getOptions = options.map((option) => ( -

{option.label}

+ const { children, options } = this.props; + const { opened, selectedLabel } = this.state; + const getOptions = options.map((option, index) => ( +

+ {option.label} +

)); return ( -
-

- Выберите кошелек +

+

+ {children ? {children} : ''} + + {selectedLabel || 'Выберите кошелек'} + + {' '} + + + +

{getOptions} @@ -28,4 +61,12 @@ class Dropdown extends Component { } } +Dropdown.propTypes = { + children: propTypes.element, + options: propTypes.arrayOf(propTypes.object).isRequired, +}; +Dropdown.defaultProps = { + children: '', +}; + export default Dropdown; diff --git a/src/components/Hint/Hint.stories.js b/src/components/Hint/Hint.stories.js index 043e7cb0..eab72a0a 100644 --- a/src/components/Hint/Hint.stories.js +++ b/src/components/Hint/Hint.stories.js @@ -5,8 +5,8 @@ export default ({ title: 'Hint' }); export const simpleHint = () => ( - Aliquip nostrud elit nostrud incididunt. - Do labore pariatur mollit magna irure eu. - Minim labore exercitation veniam do fugiat non irure consequat ullamco dolore pariatur id. + {'Aliquip nostrud elit nostrud incididunt.'} + {'Do labore pariatur mollit magna irure eu.'} + {'Minim labore exercitation veniam do fugiat non irure consequat ullamco dolore pariatur id.'} ); diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index a91563bb..f33184c1 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -93,3 +93,15 @@ export const TokenName = () => ( ); + +export const CreditCard = () => ( + + + + +); +export const DropdownArrow = () => ( + + + +); diff --git a/src/components/Input/index.js b/src/components/Input/index.js index d46dd44b..8066c259 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -19,9 +19,12 @@ Input.propTypes = { children: propTypes.element.isRequired, type: propTypes.string.isRequired, placeholder: propTypes.string.isRequired, - className: propTypes.string.isRequired, + className: propTypes.string, errorText: propTypes.string.isRequired, required: propTypes.bool.isRequired, }; +Input.defaultProps = { + className: '', +}; export default Input; diff --git a/src/components/User/User.stories.js b/src/components/User/User.stories.js index e4d4ed95..342d9744 100644 --- a/src/components/User/User.stories.js +++ b/src/components/User/User.stories.js @@ -3,4 +3,4 @@ import User from '.'; export default ({ title: 'Header (User)' }); -export const SimpleUser = () => ; +export const SimpleUser = () => 0x295856bcf02b2017607e4f61cfc1573fd05d511f; diff --git a/src/components/User/index.js b/src/components/User/index.js index 7e1f47f9..5899735a 100644 --- a/src/components/User/index.js +++ b/src/components/User/index.js @@ -1,11 +1,16 @@ import React from 'react'; +import propTypes from 'prop-types'; import styles from './User.scss'; -const User = () => ( +const User = ({ children }) => (
avatar - 0x295856bcf02b2017607e4f61cfc1573fd05d511f + {children} 0x295856...5d511f
); + +User.propTypes = { + children: propTypes.string.isRequired, +}; export default User; From 2e70aaef3a11e6fd5d78c4fa63b9f3db35325cdb Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 11:45:46 +0700 Subject: [PATCH 002/219] Dropdown color fixes --- src/components/Dropdown/Dropdown.scss | 43 +++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index 084d2118..f848f955 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -6,6 +6,8 @@ position: relative; padding: 8px 15px 8px 5px; border-bottom: 1px solid $lightGrey; + cursor: pointer; + transition: .2s linear; &-line { position: absolute; top: 100%; @@ -14,6 +16,17 @@ background-color: $primary; transition: .2s ease-in; } + &:hover { + border-color: $border; + .dropdown__arrow { + svg { + path { + opacity: 1; + stroke: $border; + } + } + } + } } &__arrow { @@ -21,8 +34,15 @@ top: 50%; right: 0; font-size: 0; - transform: translateY(-50%) rotate(180deg); + transform: translateY(-50%) rotate(0deg); transition: .2s; + svg { + path { + opacity: 1; + transition: .2s; + stroke: $lightGrey; + } + } } &__icon { position: relative; @@ -55,7 +75,7 @@ transition: .3s ease-in-out; } &__option { - + cursor: pointer; } &--opened { @@ -63,9 +83,26 @@ &-line { width: 100%; } + &:hover { + .dropdown__arrow { + transform: translateY(-50%)rotate(180deg); + svg { + path { + opacity: 1; + stroke: $primary; + } + } + } + } } .dropdown__arrow { - transform: translateY(-50%)rotate(0); + transform: translateY(-50%)rotate(180deg); + svg { + path { + opacity: 1; + stroke: $primary; + } + } } .dropdown__options { height: 100px; From 2f5bdc71f829cd4062d0876fc6ffd2935e20c919 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 13:36:46 +0700 Subject: [PATCH 003/219] changed interactive elements for dropdown --- src/App.js | 11 ++++++++++- src/assets/styles/style.scss | 4 ++++ src/components/Dropdown/Dropdown.scss | 13 +++++++++++++ src/components/Dropdown/index.js | 16 +++++++++------- webpack.dev.js | 2 +- 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/App.js b/src/App.js index 59321fb5..1792ab6d 100644 --- a/src/App.js +++ b/src/App.js @@ -4,10 +4,16 @@ import { } from './components/Button'; import Input from './components/Input'; import { - Password, + Password, CreditCard, } from './components/Icons'; import LangSwitcher from './components/LangSwitcher'; +import Dropdown from './components/Dropdown'; +const options = [ + { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, + { label: '0xfffffffffffffffffffffffffffffff', value: '2' }, + { label: '0x00000000000000000000000000', value: '3' }, +]; const App = () => (
@@ -18,6 +24,9 @@ const App = () => ( + + +
); export default App; diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 85574100..a6a9f246 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -8,3 +8,7 @@ font-weight: 400; font-family: "Grotesk"; } + +::-webkit-scrollbar-thumb { + border: 1px solid $border; +} \ No newline at end of file diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index f848f955..e33c4f73 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -2,15 +2,21 @@ .dropdown { position: relative; display: inline-block; + button { + background: transparent; + outline: none; + } &__head { position: relative; padding: 8px 15px 8px 5px; + border: unset; border-bottom: 1px solid $lightGrey; cursor: pointer; transition: .2s linear; &-line { position: absolute; top: 100%; + left: 0; width: 0; height: 1px; background-color: $primary; @@ -70,11 +76,17 @@ top: 100%; height: 0; max-height: 100px; + padding: 5px 10px; overflow-x: hidden; overflow-y: auto; + border: 1px solid #E1E4E8; + opacity: 0; transition: .3s ease-in-out; } &__option { + display: block; + padding: 10px 0; + border: none; cursor: pointer; } @@ -106,6 +118,7 @@ } .dropdown__options { height: 100px; + opacity: 1; } } } \ No newline at end of file diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 20524a35..64c34bb4 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -28,23 +28,25 @@ class Dropdown extends Component { render() { const { children, options } = this.props; - const { opened, selectedLabel } = this.state; + const { opened, selectedLabel, selectedValue } = this.state; const getOptions = options.map((option, index) => ( -

{option.label} -

+ )); return (
-

+

{getOptions}
diff --git a/webpack.dev.js b/webpack.dev.js index 5f5e64ee..15e152fe 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -101,4 +101,4 @@ module.exports = { }], }], }, -}; \ No newline at end of file +}; From 98584b518756f867bfe549b9925fcdf39917c85f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 16:18:54 +0700 Subject: [PATCH 004/219] Added components: - alert - explanation block - loader - indicator Added new icons --- src/App.js | 13 +++++ src/components/Alert/Alert.scss | 45 +++++++++++++++++ src/components/Alert/Alert.stories.js | 10 ++++ src/components/Alert/index.js | 23 +++++++++ src/components/Explanation/Explanation.scss | 11 ++++ .../Explanation/Explanation.stories.js | 10 ++++ .../Explanation/Explanation.test.js | 0 src/components/Explanation/index.js | 18 +++++++ src/components/Icons/index.js | 13 +++++ src/components/Indicator/Indicator.scss | 12 +++++ src/components/Indicator/Indicator.stories.js | 11 ++++ src/components/Indicator/index.js | 12 +++++ src/components/Loader/Loader.scss | 50 +++++++++++++++++++ src/components/Loader/Loader.stories.js | 8 +++ src/components/Loader/Loader.test.js | 0 src/components/Loader/index.js | 9 ++++ 16 files changed, 245 insertions(+) create mode 100644 src/components/Alert/Alert.scss create mode 100644 src/components/Alert/Alert.stories.js create mode 100644 src/components/Alert/index.js create mode 100644 src/components/Explanation/Explanation.scss create mode 100644 src/components/Explanation/Explanation.stories.js create mode 100644 src/components/Explanation/Explanation.test.js create mode 100644 src/components/Explanation/index.js create mode 100644 src/components/Indicator/Indicator.scss create mode 100644 src/components/Indicator/Indicator.stories.js create mode 100644 src/components/Indicator/index.js create mode 100644 src/components/Loader/Loader.scss create mode 100644 src/components/Loader/Loader.stories.js create mode 100644 src/components/Loader/Loader.test.js create mode 100644 src/components/Loader/index.js diff --git a/src/App.js b/src/App.js index 1792ab6d..05c8fa9c 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,7 @@ import { } from './components/Icons'; import LangSwitcher from './components/LangSwitcher'; import Dropdown from './components/Dropdown'; +import Explanation from './components/Explanation'; const options = [ { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, @@ -27,6 +28,18 @@ const App = () => ( + + + Sunt commodo ea est magna duis duis. Id exercitation minim duis nostrud anim + non commodo labore aliquip est laborum. + Aliqua non fugiat id consectetur. + Amet reprehenderit exercitation adipisicing sint minim et mollit veniam duis + et aliqua dolor sint. + Dolore non non ea et id nostrud mollit do pariatur do aute consectetur fugiat sint. + Laborum officia aliquip ut aliquip officia proident occaecat amet labore deserunt. + Mollit voluptate ullamco exercitation aliquip enim ullamco est ad ex sit + proident proident laborum. +
); export default App; diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss new file mode 100644 index 00000000..2819d633 --- /dev/null +++ b/src/components/Alert/Alert.scss @@ -0,0 +1,45 @@ +@import '../../assets/styles/partials/variables'; + +.alert { + position: fixed; + top: 100%; + left: 50%; + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: space-between; + max-width: 380px; + padding: 15px; + border: 1px solid $lightGrey; + border-radius: 2px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); + transform: translateX(-50%); + & > svg { + flex-shrink: 0; + margin-right: 10px; + vertical-align: middle; + } + &__text { + font-size: 14px; + line-height: 16px; + vertical-align: middle; + } + &__close { + cursor: pointer; + svg { + rect { + transition: .2s; + } + } + &:hover { + svg { + rect { + fill: $primary; + } + } + } + } + &--visible { + top: 90%; + } +} \ No newline at end of file diff --git a/src/components/Alert/Alert.stories.js b/src/components/Alert/Alert.stories.js new file mode 100644 index 00000000..f1509396 --- /dev/null +++ b/src/components/Alert/Alert.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import Alert from '.'; + +export default ({ title: 'Alert' }); + +export const visibleAlert = () => ( + + Occaecat magna labore in excepteur eiusmod ea tempor nisi. + +); diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js new file mode 100644 index 00000000..42b231fd --- /dev/null +++ b/src/components/Alert/index.js @@ -0,0 +1,23 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import { IconInfo, CloseIcon } from '../Icons'; +import styles from './Alert.scss'; + +const Alert = ({ children, visible }) => ( +
+ + + {children} + + + + +
+); + +Alert.propTypes = { + visible: propTypes.bool.isRequired, + children: propTypes.string.isRequired, +}; + +export default Alert; diff --git a/src/components/Explanation/Explanation.scss b/src/components/Explanation/Explanation.scss new file mode 100644 index 00000000..a7ccc335 --- /dev/null +++ b/src/components/Explanation/Explanation.scss @@ -0,0 +1,11 @@ +@import '../../assets/styles/partials/variables'; +.explanation { + display: inline-block; + padding: 5px; + color: $border; + font-size: 12px; + &__string { + padding-left: 10px; + border-left: 1px solid $border; + } +} \ No newline at end of file diff --git a/src/components/Explanation/Explanation.stories.js b/src/components/Explanation/Explanation.stories.js new file mode 100644 index 00000000..e440376b --- /dev/null +++ b/src/components/Explanation/Explanation.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import Explanation from '.'; + +export default ({ title: 'Explanation' }); + +export const defaultExp = () => ( + + 0x295856bcf02b2017607e4f61cfc1573fd05d511f + +); diff --git a/src/components/Explanation/Explanation.test.js b/src/components/Explanation/Explanation.test.js new file mode 100644 index 00000000..e69de29b diff --git a/src/components/Explanation/index.js b/src/components/Explanation/index.js new file mode 100644 index 00000000..959af76f --- /dev/null +++ b/src/components/Explanation/index.js @@ -0,0 +1,18 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import styles from './Explanation.scss'; + +const Explanation = ({ children }) => ( +

+

{children}

+

+); + +Explanation.defaultProps = { + children: '', +}; + +Explanation.propTypes = { + children: propTypes.string, +}; +export default Explanation; diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index f33184c1..e52cb0a3 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -105,3 +105,16 @@ export const DropdownArrow = () => ( ); +export const IconInfo = () => ( + + + + + +); +export const CloseIcon = () => ( + + + + +); diff --git a/src/components/Indicator/Indicator.scss b/src/components/Indicator/Indicator.scss new file mode 100644 index 00000000..d6723b32 --- /dev/null +++ b/src/components/Indicator/Indicator.scss @@ -0,0 +1,12 @@ +@import '../../assets/styles/partials/variables'; + +.indicator { + display: inline-block; + width: 8px; + height: 8px; + border: 1px solid $primary; + transform: rotate(45deg); + &--checked { + background-color: $primary; + } +} \ No newline at end of file diff --git a/src/components/Indicator/Indicator.stories.js b/src/components/Indicator/Indicator.stories.js new file mode 100644 index 00000000..7ee355a7 --- /dev/null +++ b/src/components/Indicator/Indicator.stories.js @@ -0,0 +1,11 @@ +import React from 'react'; +import Indicator from '.'; + +export default ({ title: 'Indicator' }); + +export const uncheckedIndicator = () => ( + +); +export const checkedIndicator = () => ( + +); diff --git a/src/components/Indicator/index.js b/src/components/Indicator/index.js new file mode 100644 index 00000000..142acc69 --- /dev/null +++ b/src/components/Indicator/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import styles from './Indicator.scss'; + +const Indicator = ({ checked }) => ( + +); + +Indicator.propTypes = { + checked: propTypes.bool.isRequired, +}; +export default Indicator; diff --git a/src/components/Loader/Loader.scss b/src/components/Loader/Loader.scss new file mode 100644 index 00000000..3774d9c5 --- /dev/null +++ b/src/components/Loader/Loader.scss @@ -0,0 +1,50 @@ +@import '../../assets/styles/partials/variables'; + +.loader { + position: relative; + display: inline-block; + width: 14px; + height: 14px; + margin: 20px; + background-color: $primary; + &:before { + position: absolute; + top: 50%; + left: 50%; + z-index: -1; + width: 26px; + height: 26px; + border: 1px solid $primary; + transform: translate(-50%, -50%) ; + animation: loaderSpin 2s ease-in infinite; + content: ''; + } + &:after { + position: absolute; + top: 50%; + left: 50%; + z-index: -1; + color: $white; + font-weight: bolder; + font-size: 102px; + line-height: 26px; + transform: translate(-50%, -50%); + animation: loaderSpin 2s ease-in infinite; + content: "+"; + } +} + +@keyframes loaderSpin { + 0% { + transform: scale(1) translate(-50%, -50%) rotate(0deg) ; + } + 10%, 20% { + transform: scale(1.4) translate(-35%, -35%) rotate(0deg) ; + } + 30%, 45% { + transform: scale(1.4) translate(-35%, -35%) rotate(-90deg) ; + } + 55%, 100% { + transform: scale(1) translate(-50%, -50%) rotate(-90deg) ; + } +} \ No newline at end of file diff --git a/src/components/Loader/Loader.stories.js b/src/components/Loader/Loader.stories.js new file mode 100644 index 00000000..e55589fd --- /dev/null +++ b/src/components/Loader/Loader.stories.js @@ -0,0 +1,8 @@ +import React from 'react'; +import Loader from '.'; + +export default ({ title: 'Loader' }); + +export const simpleLoader = () => ( + +); diff --git a/src/components/Loader/Loader.test.js b/src/components/Loader/Loader.test.js new file mode 100644 index 00000000..e69de29b diff --git a/src/components/Loader/index.js b/src/components/Loader/index.js new file mode 100644 index 00000000..70ceea1e --- /dev/null +++ b/src/components/Loader/index.js @@ -0,0 +1,9 @@ +import React from 'react'; + +import styles from './Loader.scss'; + +const Loader = () => ( +
+); + +export default Loader; From 69b2ea3899e3d740a10ba9a3fdf2b373524f351a Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 17:08:16 +0700 Subject: [PATCH 005/219] Added logo --- src/App.js | 2 ++ src/components/Logo/Logo.scss | 33 +++++++++++++++++++++++++++++ src/components/Logo/Logo.stories.js | 8 +++++++ src/components/Logo/index.js | 10 +++++++++ 4 files changed, 53 insertions(+) create mode 100644 src/components/Logo/Logo.scss create mode 100644 src/components/Logo/Logo.stories.js create mode 100644 src/components/Logo/index.js diff --git a/src/App.js b/src/App.js index 05c8fa9c..cc72a346 100644 --- a/src/App.js +++ b/src/App.js @@ -9,6 +9,7 @@ import { import LangSwitcher from './components/LangSwitcher'; import Dropdown from './components/Dropdown'; import Explanation from './components/Explanation'; +import Logo from './components/Logo'; const options = [ { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, @@ -40,6 +41,7 @@ const App = () => ( Mollit voluptate ullamco exercitation aliquip enim ullamco est ad ex sit proident proident laborum. +
); export default App; diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss new file mode 100644 index 00000000..9e1bdc43 --- /dev/null +++ b/src/components/Logo/Logo.scss @@ -0,0 +1,33 @@ +@import '../../assets/styles/partials/variables'; + +.logo { + position: relative; + display: inline-block; + border: 2px solid $primary; + span{ + display: inline-block; + vertical-align: middle; + transition: 0.2s linear; + } + &__dark { + padding: 4px 5px; + color: $white; + font-size: 32px; + background-color: $primary; + } + &__light { + position: relative; + padding: 15px; + color: $primary; + font-weight: bold; + font-size: 12px; + background-color: $white; + } + &:hover { + .logo { + &__dark, &__light { + filter: invert(100%); + } + } + } +} \ No newline at end of file diff --git a/src/components/Logo/Logo.stories.js b/src/components/Logo/Logo.stories.js new file mode 100644 index 00000000..280172f2 --- /dev/null +++ b/src/components/Logo/Logo.stories.js @@ -0,0 +1,8 @@ +import React from 'react'; +import Logo from '.'; + +export default ({ title: 'Logo' }); + +export const simpleLogo = () => ( + +); diff --git a/src/components/Logo/index.js b/src/components/Logo/index.js new file mode 100644 index 00000000..1ab4f9cc --- /dev/null +++ b/src/components/Logo/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import styles from './Logo.scss'; + +const Logo = () => ( + + 01 + ZeroOne + +); +export default Logo; From f08bce24c03e78b77fee6fd2319e1867c3555cc7 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 23 Oct 2019 17:46:25 +0700 Subject: [PATCH 006/219] added Heading component --- src/App.js | 6 +++++ src/assets/images/compilation.svg | 27 ++++++++++++++++++++ src/assets/images/sending.svg | 31 +++++++++++++++++++++++ src/components/Dropdown/Dropdown.scss | 1 + src/components/Heading/Heading.scss | 15 +++++++++++ src/components/Heading/Heading.stories.js | 11 ++++++++ src/components/Heading/index.js | 15 +++++++++++ 7 files changed, 106 insertions(+) create mode 100644 src/assets/images/compilation.svg create mode 100644 src/assets/images/sending.svg create mode 100644 src/components/Heading/Heading.scss create mode 100644 src/components/Heading/Heading.stories.js create mode 100644 src/components/Heading/index.js diff --git a/src/App.js b/src/App.js index cc72a346..9c1b7317 100644 --- a/src/App.js +++ b/src/App.js @@ -10,6 +10,7 @@ import LangSwitcher from './components/LangSwitcher'; import Dropdown from './components/Dropdown'; import Explanation from './components/Explanation'; import Logo from './components/Logo'; +import Heading from './components/Heading'; const options = [ { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, @@ -42,6 +43,11 @@ const App = () => ( proident proident laborum. + + + {'Заголовок'} + {'Nulla sit minim laboris excepteur.'} +
); export default App; diff --git a/src/assets/images/compilation.svg b/src/assets/images/compilation.svg new file mode 100644 index 00000000..c033bcf9 --- /dev/null +++ b/src/assets/images/compilation.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/sending.svg b/src/assets/images/sending.svg new file mode 100644 index 00000000..e391dae3 --- /dev/null +++ b/src/assets/images/sending.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index e33c4f73..40c524d2 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -79,6 +79,7 @@ padding: 5px 10px; overflow-x: hidden; overflow-y: auto; + background-color: $white; border: 1px solid #E1E4E8; opacity: 0; transition: .3s ease-in-out; diff --git a/src/components/Heading/Heading.scss b/src/components/Heading/Heading.scss new file mode 100644 index 00000000..ff340f58 --- /dev/null +++ b/src/components/Heading/Heading.scss @@ -0,0 +1,15 @@ +@import '../../assets/styles/partials/variables'; + +.heading { + text-align: center; + &--main { + margin-bottom: 5px; + color: $primary; + font-weight: bold; + font-size: 24px; + } + &--sub { + color: $secondary; + font-size: 14px; + } +} \ No newline at end of file diff --git a/src/components/Heading/Heading.stories.js b/src/components/Heading/Heading.stories.js new file mode 100644 index 00000000..ec43fb8c --- /dev/null +++ b/src/components/Heading/Heading.stories.js @@ -0,0 +1,11 @@ +import React from 'react'; +import Heading from '.'; + +export default ({ title: 'Heading' }); + +export const simpleHeading = () => ( + + {'Заголовок'} + {'Nulla sit minim laboris excepteur.'} + +); diff --git a/src/components/Heading/index.js b/src/components/Heading/index.js new file mode 100644 index 00000000..8eb995ee --- /dev/null +++ b/src/components/Heading/index.js @@ -0,0 +1,15 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import styles from './Heading.scss'; + +const Heading = ({ children }) => ( +
+

{children[0]}

+ {children[1] ?

{children[1]}

: ''} +
+); +Heading.propTypes = { + children: propTypes.arrayOf(propTypes.string).isRequired, +}; + +export default Heading; From e7d0dd75270ebd3d1955d421e467eabd3a9f63c5 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 24 Oct 2019 10:33:38 +0700 Subject: [PATCH 007/219] Created services and stores modules structure --- src/services/ContractService/ContractService.js | 3 +++ src/services/ContractService/index.js | 3 +++ src/services/WalletService/WalletService.js | 3 +++ src/services/WalletService/index.js | 3 +++ src/services/Web3Service/Web3Service.js | 3 +++ src/services/Web3Service/index.js | 3 +++ src/stores/AppStore/AppStore.js | 3 +++ src/stores/AppStore/index.js | 3 +++ src/stores/HistoryStore/HistoryStore.js | 3 +++ src/stores/HistoryStore/index.js | 3 +++ src/stores/ProjectStore/ProjectStore.js | 3 +++ src/stores/ProjectStore/index.js | 3 +++ src/stores/QuestionStore/QuestionStore.js | 3 +++ src/stores/QuestionStore/index.js | 3 +++ src/stores/UserStore/UserStore.js | 3 +++ src/stores/UserStore/index.js | 3 +++ src/stores/UsergroupStore/UsergroupStore.js | 3 +++ src/stores/UsergroupStore/index.js | 3 +++ 18 files changed, 54 insertions(+) create mode 100644 src/services/ContractService/ContractService.js create mode 100644 src/services/ContractService/index.js create mode 100644 src/services/WalletService/WalletService.js create mode 100644 src/services/WalletService/index.js create mode 100644 src/services/Web3Service/Web3Service.js create mode 100644 src/services/Web3Service/index.js create mode 100644 src/stores/AppStore/AppStore.js create mode 100644 src/stores/AppStore/index.js create mode 100644 src/stores/HistoryStore/HistoryStore.js create mode 100644 src/stores/HistoryStore/index.js create mode 100644 src/stores/ProjectStore/ProjectStore.js create mode 100644 src/stores/ProjectStore/index.js create mode 100644 src/stores/QuestionStore/QuestionStore.js create mode 100644 src/stores/QuestionStore/index.js create mode 100644 src/stores/UserStore/UserStore.js create mode 100644 src/stores/UserStore/index.js create mode 100644 src/stores/UsergroupStore/UsergroupStore.js create mode 100644 src/stores/UsergroupStore/index.js diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js new file mode 100644 index 00000000..1b8746b5 --- /dev/null +++ b/src/services/ContractService/ContractService.js @@ -0,0 +1,3 @@ +export default class ContractService { + +} diff --git a/src/services/ContractService/index.js b/src/services/ContractService/index.js new file mode 100644 index 00000000..0837ff42 --- /dev/null +++ b/src/services/ContractService/index.js @@ -0,0 +1,3 @@ +import ContractService from './ContractService'; + +export default ContractService; diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js new file mode 100644 index 00000000..6c0b56b7 --- /dev/null +++ b/src/services/WalletService/WalletService.js @@ -0,0 +1,3 @@ +export default class WalletService { + +} diff --git a/src/services/WalletService/index.js b/src/services/WalletService/index.js new file mode 100644 index 00000000..6657332d --- /dev/null +++ b/src/services/WalletService/index.js @@ -0,0 +1,3 @@ +import WalletService from './WalletService'; + +export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js new file mode 100644 index 00000000..3d15403a --- /dev/null +++ b/src/services/Web3Service/Web3Service.js @@ -0,0 +1,3 @@ +export default class Web3Service { + +} diff --git a/src/services/Web3Service/index.js b/src/services/Web3Service/index.js new file mode 100644 index 00000000..0cc7897f --- /dev/null +++ b/src/services/Web3Service/index.js @@ -0,0 +1,3 @@ +import Web3Service from './Web3Service'; + +export default Web3Service; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js new file mode 100644 index 00000000..4113a86f --- /dev/null +++ b/src/stores/AppStore/AppStore.js @@ -0,0 +1,3 @@ +export default class AppStore { + +} diff --git a/src/stores/AppStore/index.js b/src/stores/AppStore/index.js new file mode 100644 index 00000000..00850ceb --- /dev/null +++ b/src/stores/AppStore/index.js @@ -0,0 +1,3 @@ +import AppStore from './AppStore'; + +export default AppStore; diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js new file mode 100644 index 00000000..a1821b7c --- /dev/null +++ b/src/stores/HistoryStore/HistoryStore.js @@ -0,0 +1,3 @@ +export default class HistoryStore { + +} diff --git a/src/stores/HistoryStore/index.js b/src/stores/HistoryStore/index.js new file mode 100644 index 00000000..7ebd5c19 --- /dev/null +++ b/src/stores/HistoryStore/index.js @@ -0,0 +1,3 @@ +import HistoryStore from './HistoryStore'; + +export default HistoryStore; diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js new file mode 100644 index 00000000..0381e3e5 --- /dev/null +++ b/src/stores/ProjectStore/ProjectStore.js @@ -0,0 +1,3 @@ +export default class ProjectStore { + +} diff --git a/src/stores/ProjectStore/index.js b/src/stores/ProjectStore/index.js new file mode 100644 index 00000000..0c137861 --- /dev/null +++ b/src/stores/ProjectStore/index.js @@ -0,0 +1,3 @@ +import ProjectStore from './ProjectStore'; + +export default ProjectStore; diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js new file mode 100644 index 00000000..1f498f40 --- /dev/null +++ b/src/stores/QuestionStore/QuestionStore.js @@ -0,0 +1,3 @@ +export default class QuestionStore { + +} diff --git a/src/stores/QuestionStore/index.js b/src/stores/QuestionStore/index.js new file mode 100644 index 00000000..14f2df06 --- /dev/null +++ b/src/stores/QuestionStore/index.js @@ -0,0 +1,3 @@ +import QuestionStore from './QuestionStore'; + +export default QuestionStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js new file mode 100644 index 00000000..93385c16 --- /dev/null +++ b/src/stores/UserStore/UserStore.js @@ -0,0 +1,3 @@ +export default class UserStore { + +} diff --git a/src/stores/UserStore/index.js b/src/stores/UserStore/index.js new file mode 100644 index 00000000..2d7459c2 --- /dev/null +++ b/src/stores/UserStore/index.js @@ -0,0 +1,3 @@ +import UserStore from './UserStore'; + +export default UserStore; diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js new file mode 100644 index 00000000..60603bf6 --- /dev/null +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -0,0 +1,3 @@ +export default class UsergroupStore { + +} diff --git a/src/stores/UsergroupStore/index.js b/src/stores/UsergroupStore/index.js new file mode 100644 index 00000000..ff9e845b --- /dev/null +++ b/src/stores/UsergroupStore/index.js @@ -0,0 +1,3 @@ +import UsergroupStore from './UsergroupStore'; + +export default UsergroupStore; From 1c490de6046be69109c1d3ed2686f07b262df940 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 24 Oct 2019 11:56:00 +0700 Subject: [PATCH 008/219] added event emmiter --- package-lock.json | 23 +++++++++++++++++++++++ package.json | 5 ++++- src/utils/EventEmitter/index.js | 18 ++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/utils/EventEmitter/index.js diff --git a/package-lock.json b/package-lock.json index 163bf50e..a9fc4753 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11585,6 +11585,29 @@ } } }, + "mobx": { + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-5.14.2.tgz", + "integrity": "sha512-yx5Xe6o2WSYFgeytzZt6jGaYghJdQbd1ElR7S2s93x7/+5SYfJBfutvZF1O5gPEsUyTAFZ5IMYGu1KyhkPk+oQ==" + }, + "mobx-react": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-6.1.4.tgz", + "integrity": "sha512-wzrJF1RflhyLh8ne4FJfMbG8ZgRFmZ62b4nbyhJzwQpAmrkSnSsAWG9mIff4ffV/Q7OU+uOYf7rXvSmiuUe4cw==", + "requires": { + "mobx-react-lite": "^1.4.2" + } + }, + "mobx-react-lite": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-1.5.0.tgz", + "integrity": "sha512-Ss8RLKKGn+QhKbfCHvQ4+RPEVKR8AnPW1wNyWzZAS3wYw7UP4FX6GdRn64sdOhrP646o/JtXbLuDuc4RH3Bqyg==" + }, + "mobx-utils": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/mobx-utils/-/mobx-utils-5.5.1.tgz", + "integrity": "sha512-blwMbRPCqdEOX6+sG9L7ptPKUXc6ol7e0iNfT4X3tmlXVndpRlrL95qvcNH5IR+UGSPizhGwiKSlTbreaJJUrA==" + }, "moo": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/moo/-/moo-0.4.3.tgz", diff --git a/package.json b/package.json index 2a4ea97b..f1560d70 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "@namics/stylelint-bem": "^6.1.0", "electron-is-dev": "^1.1.0", "electron-localshortcut": "^3.1.0", + "mobx": "^5.14.2", + "mobx-react": "^6.1.4", + "mobx-utils": "^5.5.1", "prop-types": "^15.7.2", "react": "^16.10.2", "react-dom": "^16.10.2", @@ -79,4 +82,4 @@ ] ] } -} \ No newline at end of file +} diff --git a/src/utils/EventEmitter/index.js b/src/utils/EventEmitter/index.js new file mode 100644 index 00000000..28f19233 --- /dev/null +++ b/src/utils/EventEmitter/index.js @@ -0,0 +1,18 @@ +class EventEmitter { + constructor() { + this.events = {}; + } + + emit(event, data) { + if (!this.events[event]) return; + this.events[event].forEach((callback) => callback(data)); + } + + subscribe(event, callback) { + if (!this.events[event]) this.events[event] = []; + this.events[event].push(callback); + } +} + +const eventEmitter = new EventEmitter(); +export default eventEmitter; From d52083e6956086cbca2b518bbf4ec3f008e5d64e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 24 Oct 2019 15:49:37 +0700 Subject: [PATCH 009/219] Fixes for styles, Dropdown option in separated component --- src/App.js | 6 +-- src/assets/images/compilation.svg | 27 ----------- src/assets/images/sending.svg | 31 ------------- src/components/Alert/Alert.scss | 6 ++- src/components/Alert/index.js | 10 ++-- src/components/Button/Button.scss | 11 ++++- src/components/Button/index.js | 4 +- src/components/Dropdown/Dropdown.scss | 18 +++++--- src/components/Dropdown/Dropdown.stories.js | 4 +- src/components/Dropdown/index.js | 46 +++++++++---------- .../DropdownOption/DropdownOption.js | 22 +++++++++ src/components/Explanation/Explanation.scss | 1 + src/components/Explanation/index.js | 2 +- src/components/Heading/Heading.scss | 2 + src/components/Heading/index.js | 4 +- src/components/Hint/Hint.scss | 8 ++-- src/components/Hint/index.js | 4 +- src/components/Icons/index.js | 22 ++++----- src/components/Indicator/Indicator.scss | 1 + src/components/Input/Input.scss | 6 ++- src/components/Input/Input.stories.js | 6 +-- src/components/Input/index.js | 13 ++++-- src/components/LangSwitcher/LangSwitcher.scss | 7 ++- src/components/LangSwitcher/index.js | 10 ++-- src/components/Loader/Loader.scss | 2 + src/components/Logo/Logo.scss | 4 ++ src/components/User/User.scss | 3 ++ src/index.js | 5 -- 28 files changed, 144 insertions(+), 141 deletions(-) delete mode 100644 src/assets/images/compilation.svg delete mode 100644 src/assets/images/sending.svg create mode 100644 src/components/DropdownOption/DropdownOption.js diff --git a/src/App.js b/src/App.js index 9c1b7317..5b03f827 100644 --- a/src/App.js +++ b/src/App.js @@ -4,7 +4,7 @@ import { } from './components/Button'; import Input from './components/Input'; import { - Password, CreditCard, + PasswordIcon, CreditCardIcon, } from './components/Icons'; import LangSwitcher from './components/LangSwitcher'; import Dropdown from './components/Dropdown'; @@ -24,12 +24,12 @@ const App = () => ( - + - + Sunt commodo ea est magna duis duis. Id exercitation minim duis nostrud anim diff --git a/src/assets/images/compilation.svg b/src/assets/images/compilation.svg deleted file mode 100644 index c033bcf9..00000000 --- a/src/assets/images/compilation.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/sending.svg b/src/assets/images/sending.svg deleted file mode 100644 index e391dae3..00000000 --- a/src/assets/images/sending.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index 2819d633..aac817e7 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -14,21 +14,24 @@ border-radius: 2px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); transform: translateX(-50%); + & > svg { flex-shrink: 0; margin-right: 10px; vertical-align: middle; } + &__text { font-size: 14px; line-height: 16px; vertical-align: middle; } + &__close { cursor: pointer; svg { rect { - transition: .2s; + transition: 0.2s; } } &:hover { @@ -39,6 +42,7 @@ } } } + &--visible { top: 90%; } diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js index 42b231fd..fa442913 100644 --- a/src/components/Alert/index.js +++ b/src/components/Alert/index.js @@ -1,15 +1,15 @@ import React from 'react'; import propTypes from 'prop-types'; -import { IconInfo, CloseIcon } from '../Icons'; +import { InfoIcon, CloseIcon } from '../Icons'; import styles from './Alert.scss'; const Alert = ({ children, visible }) => ( -
- - +
+ + {children} - +
diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index da411a83..cfe60851 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -8,15 +8,17 @@ outline: none; cursor: pointer; transition: 0.2s linear; + svg, &__text { vertical-align: middle; } + svg { margin-right: 10px; path, circle { - transition: 0.2s; + transition: 00.2s; } } @@ -26,15 +28,18 @@ font-weight: bold; font-size: 14px; } + &--default { min-width: 232px; padding: 18px 0; font-size: 12px; } + &--small { min-width: 124px; padding: 5px; } + &--black { color: $white; background-color: $primary; @@ -48,6 +53,7 @@ border-color: $primary; } } + &--link { color: $linkColor; background-color: transparent; @@ -67,6 +73,7 @@ } } } + &--white { color: $primary; background-color: $white; @@ -106,6 +113,7 @@ } } } + &--dashed { color: $grey; border-style: dashed; @@ -116,6 +124,7 @@ color: $white; } } + &--noborder { border: none; } diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 451cec13..fd7c8047 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -4,7 +4,7 @@ import styles from './Button.scss'; export const Button = ({ children, className }) => ( @@ -18,7 +18,7 @@ Button.propTypes = { export const IconButton = ({ children, className }) => ( diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index 40c524d2..30def8f0 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -2,17 +2,19 @@ .dropdown { position: relative; display: inline-block; + button { background: transparent; outline: none; } + &__head { position: relative; padding: 8px 15px 8px 5px; border: unset; border-bottom: 1px solid $lightGrey; cursor: pointer; - transition: .2s linear; + transition: 0.2s linear; &-line { position: absolute; top: 100%; @@ -20,7 +22,7 @@ width: 0; height: 1px; background-color: $primary; - transition: .2s ease-in; + transition: 0.2s ease-in; } &:hover { border-color: $border; @@ -33,23 +35,24 @@ } } } - } + &__arrow { position: absolute; top: 50%; right: 0; font-size: 0; transform: translateY(-50%) rotate(0deg); - transition: .2s; + transition: 0.2s; svg { path { opacity: 1; - transition: .2s; + transition: 0.2s; stroke: $lightGrey; } } } + &__icon { position: relative; display: inline-block; @@ -68,9 +71,11 @@ content: ""; } } + &__selected { vertical-align: middle; } + &__options { position: absolute; top: 100%; @@ -82,8 +87,9 @@ background-color: $white; border: 1px solid #E1E4E8; opacity: 0; - transition: .3s ease-in-out; + transition: 0.3s ease-in-out; } + &__option { display: block; padding: 10px 0; diff --git a/src/components/Dropdown/Dropdown.stories.js b/src/components/Dropdown/Dropdown.stories.js index c751dd90..e23dc36b 100644 --- a/src/components/Dropdown/Dropdown.stories.js +++ b/src/components/Dropdown/Dropdown.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import { CreditCard } from '../Icons'; +import { CreditCardIcon } from '../Icons'; import Dropdown from '.'; export default ({ title: 'Dropdown' }); @@ -9,4 +9,4 @@ const options = [ { label: '0x00000000000000000000000000', value: '3' }, ]; -export const WalletDropdown = () => ; +export const WalletDropdown = () => ; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 64c34bb4..bb45d4aa 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; -import { DropdownArrow } from '../Icons'; +import DropdownOption from '../DropdownOption/DropdownOption'; +import { DropdownArrowIcon } from '../Icons'; import styles from './Dropdown.scss'; class Dropdown extends Component { @@ -13,50 +14,46 @@ class Dropdown extends Component { }; } - toggleOptions() { + toggleOptions = () => { const { opened } = this.state; this.setState({ opened: !opened }); } - selectOption(selected) { + selectOption = ({ value, label }) => { this.setState({ - selectedLabel: selected.label, - selectedValue: selected.value, + selectedLabel: label, + selectedValue: value, }); this.toggleOptions(); } render() { - const { children, options } = this.props; + const { children, options: data } = this.props; const { opened, selectedLabel, selectedValue } = this.state; - const getOptions = options.map((option, index) => ( - + + const options = data.map((option) => ( + )); return (
- -
- {getOptions} +
+ {options}
); @@ -71,4 +68,5 @@ Dropdown.defaultProps = { children: '', }; + export default Dropdown; diff --git a/src/components/DropdownOption/DropdownOption.js b/src/components/DropdownOption/DropdownOption.js new file mode 100644 index 00000000..b8de4315 --- /dev/null +++ b/src/components/DropdownOption/DropdownOption.js @@ -0,0 +1,22 @@ +import React from 'react'; +import propTypes from 'prop-types'; + + +const DropdownOption = ({ value, label, select }) => ( + +); + +DropdownOption.propTypes = { + value: propTypes.string.isRequired, + label: propTypes.string.isRequired, + select: propTypes.func.isRequired, +}; + +export default DropdownOption; diff --git a/src/components/Explanation/Explanation.scss b/src/components/Explanation/Explanation.scss index a7ccc335..9d889b58 100644 --- a/src/components/Explanation/Explanation.scss +++ b/src/components/Explanation/Explanation.scss @@ -4,6 +4,7 @@ padding: 5px; color: $border; font-size: 12px; + &__string { padding-left: 10px; border-left: 1px solid $border; diff --git a/src/components/Explanation/index.js b/src/components/Explanation/index.js index 959af76f..1cc489de 100644 --- a/src/components/Explanation/index.js +++ b/src/components/Explanation/index.js @@ -4,7 +4,7 @@ import styles from './Explanation.scss'; const Explanation = ({ children }) => (

-

{children}

+

{children}

); diff --git a/src/components/Heading/Heading.scss b/src/components/Heading/Heading.scss index ff340f58..130ceac8 100644 --- a/src/components/Heading/Heading.scss +++ b/src/components/Heading/Heading.scss @@ -2,12 +2,14 @@ .heading { text-align: center; + &--main { margin-bottom: 5px; color: $primary; font-weight: bold; font-size: 24px; } + &--sub { color: $secondary; font-size: 14px; diff --git a/src/components/Heading/index.js b/src/components/Heading/index.js index 8eb995ee..a6cd559c 100644 --- a/src/components/Heading/index.js +++ b/src/components/Heading/index.js @@ -4,8 +4,8 @@ import styles from './Heading.scss'; const Heading = ({ children }) => (
-

{children[0]}

- {children[1] ?

{children[1]}

: ''} +

{children[0]}

+ {children[1] ?

{children[1]}

: ''}
); Heading.propTypes = { diff --git a/src/components/Hint/Hint.scss b/src/components/Hint/Hint.scss index 2461a3c4..e1c23c5c 100644 --- a/src/components/Hint/Hint.scss +++ b/src/components/Hint/Hint.scss @@ -6,6 +6,7 @@ width: 16px; height: 16px; cursor: default; + &__icon { position: relative; display: inline-block; @@ -15,7 +16,7 @@ font-size: 11px; line-height: 15px; text-align: center; - transition: .2s; + transition: 0.2s; &::before { position: absolute; top: 50%; @@ -26,7 +27,7 @@ background-color: $white; border: 1px solid $border; transform: translate(-50%, -50%) rotate(-45deg); - transition: .2s; + transition: 0.2s; content: ''; } &:hover { @@ -41,6 +42,7 @@ } } } + &__text { position: absolute; top:50%; @@ -53,6 +55,6 @@ transform: translate(-1px, 2px); visibility: hidden; opacity: 0; - transition: .2s; + transition: 0.2s; } } \ No newline at end of file diff --git a/src/components/Hint/index.js b/src/components/Hint/index.js index 0f347bd5..3ad2182d 100644 --- a/src/components/Hint/index.js +++ b/src/components/Hint/index.js @@ -5,8 +5,8 @@ import styles from './Hint.scss'; const Hint = ({ children }) => (
- ? - + ? + {children}
diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index e52cb0a3..f528a593 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -14,7 +14,7 @@ export const BackIcon = () => ( ); -export const Address = () => ( +export const AddressIcon = () => ( @@ -24,7 +24,7 @@ export const Address = () => ( ); -export const CreateToken = () => ( +export const CreateTokenIcon = () => ( @@ -38,14 +38,14 @@ export const CreateToken = () => ( ); -export const Ethereum = () => ( +export const EthereumIcon = () => ( ); -export const Login = () => ( +export const LoginIcon = () => ( @@ -53,13 +53,13 @@ export const Login = () => ( ); -export const Password = () => ( +export const PasswordIcon = () => ( ); -export const Stats = () => ( +export const StatsIcon = () => ( @@ -73,7 +73,7 @@ export const Stats = () => ( ); -export const TokenSymbol = () => ( +export const TokenSymbolIcon = () => ( @@ -87,25 +87,25 @@ export const TokenCount = () => ( ); -export const TokenName = () => ( +export const TokenNameIcon = () => ( ); -export const CreditCard = () => ( +export const CreditCardIcon = () => ( ); -export const DropdownArrow = () => ( +export const DropdownArrowIcon = () => ( ); -export const IconInfo = () => ( +export const InfoIcon = () => ( diff --git a/src/components/Indicator/Indicator.scss b/src/components/Indicator/Indicator.scss index d6723b32..5bbd855a 100644 --- a/src/components/Indicator/Indicator.scss +++ b/src/components/Indicator/Indicator.scss @@ -6,6 +6,7 @@ height: 8px; border: 1px solid $primary; transform: rotate(45deg); + &--checked { background-color: $primary; } diff --git a/src/components/Input/Input.scss b/src/components/Input/Input.scss index 0c0d7629..8428c7ab 100644 --- a/src/components/Input/Input.scss +++ b/src/components/Input/Input.scss @@ -8,6 +8,7 @@ position: relative; vertical-align: middle; } + &__input { margin-left: 20px; vertical-align: middle; @@ -29,6 +30,7 @@ } } } + &__label { position: absolute; top: 50%; @@ -39,6 +41,7 @@ transform: translateY(-50%); transition: 0.2s; } + &__error-text { position: absolute; width: 100%; @@ -47,11 +50,12 @@ visibility: hidden; opacity: 0; } + &__line { position: absolute; bottom: 0; - height: 1px; width: 0; + height: 1px; background-color: $primary; transition: 0.3s ease-in; } diff --git a/src/components/Input/Input.stories.js b/src/components/Input/Input.stories.js index b85187f4..acbc0793 100644 --- a/src/components/Input/Input.stories.js +++ b/src/components/Input/Input.stories.js @@ -1,16 +1,16 @@ import React from 'react'; import Input from './index'; -import { Password } from '../Icons'; +import { PasswordIcon } from '../Icons'; export default ({ title: 'Input' }); export const simpleInput = () => ( ); export const inputError = () => ( ); diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 8066c259..c1bfbbec 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -7,12 +7,17 @@ const Input = ({ }) => (
{children} - - {placeholder} -

+ + {placeholder} +

{errorText}

-
+
); Input.propTypes = { diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index befc8036..c12020fa 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -2,6 +2,7 @@ .lang { display: inline-block; + &--selected { position: relative; display: block; @@ -27,18 +28,20 @@ border-style: solid; border-width: 6px 3px 0 3px; transform: translateY(-50%); - transition: .2s; + transition: 0.2s; content: ''; } } + &__options { display: inline-block; padding: 5px 10px; border: 1px solid $border; visibility: hidden; opacity: 0; - transition: .2s linear; + transition: 0.2s linear; } + &__option { display: block; padding: 5px 0; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 5de19923..1830488d 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -4,11 +4,11 @@ import styles from './LangSwitcher.scss'; const LangSwitcher = () => (
- RUS -
- Русский (RUS) - Русский (ENG) - Русский (ESP) + RUS +
+ Русский (RUS) + Русский (ENG) + Русский (ESP)
); diff --git a/src/components/Loader/Loader.scss b/src/components/Loader/Loader.scss index 3774d9c5..3452fabf 100644 --- a/src/components/Loader/Loader.scss +++ b/src/components/Loader/Loader.scss @@ -7,6 +7,7 @@ height: 14px; margin: 20px; background-color: $primary; + &:before { position: absolute; top: 50%; @@ -19,6 +20,7 @@ animation: loaderSpin 2s ease-in infinite; content: ''; } + &:after { position: absolute; top: 50%; diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss index 9e1bdc43..8b4999ab 100644 --- a/src/components/Logo/Logo.scss +++ b/src/components/Logo/Logo.scss @@ -4,17 +4,20 @@ position: relative; display: inline-block; border: 2px solid $primary; + span{ display: inline-block; vertical-align: middle; transition: 0.2s linear; } + &__dark { padding: 4px 5px; color: $white; font-size: 32px; background-color: $primary; } + &__light { position: relative; padding: 15px; @@ -23,6 +26,7 @@ font-size: 12px; background-color: $white; } + &:hover { .logo { &__dark, &__light { diff --git a/src/components/User/User.scss b/src/components/User/User.scss index 739dc70e..baa243e3 100644 --- a/src/components/User/User.scss +++ b/src/components/User/User.scss @@ -4,9 +4,11 @@ font-size: 0; border: 1px solid $primary; cursor: pointer; + &__image { vertical-align: middle; } + &__wallet { margin: 0 10px; font-size: 12px; @@ -15,6 +17,7 @@ display: none; } } + &:hover { .user__wallet { &--full { diff --git a/src/index.js b/src/index.js index eb80d7e5..0db6ef5b 100644 --- a/src/index.js +++ b/src/index.js @@ -3,11 +3,6 @@ import { render } from 'react-dom'; import App from './App'; import './assets/styles/style.scss'; -/** - * Represents a book. - * @param {string} title - The title of the book. - * @param {string} author - The author of the book. - */ render( , From 0f9ae64022336ffc5b3f6b6c08ac7acfa63b4a74 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 24 Oct 2019 16:07:24 +0700 Subject: [PATCH 010/219] removed 'opened' state from Dropdown --- src/components/Dropdown/Dropdown.stories.js | 17 ++++++++++++++++- src/components/Dropdown/index.js | 11 ++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/components/Dropdown/Dropdown.stories.js b/src/components/Dropdown/Dropdown.stories.js index e23dc36b..e7b91604 100644 --- a/src/components/Dropdown/Dropdown.stories.js +++ b/src/components/Dropdown/Dropdown.stories.js @@ -3,10 +3,25 @@ import { CreditCardIcon } from '../Icons'; import Dropdown from '.'; export default ({ title: 'Dropdown' }); + +let opened = true; + +const toggle = () => { + opened = !opened; +}; + const options = [ { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, { label: '0xfffffffffffffffffffffffffffffff', value: '2' }, { label: '0x00000000000000000000000000', value: '3' }, ]; -export const WalletDropdown = () => ; +export const WalletDropdown = () => ( + + + +); diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index bb45d4aa..f08667ab 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -8,15 +8,14 @@ class Dropdown extends Component { constructor() { super(); this.state = { - opened: false, selectedValue: '', selectedLabel: '', }; } toggleOptions = () => { - const { opened } = this.state; - this.setState({ opened: !opened }); + const { toggleOptions } = this.props; + toggleOptions(); } selectOption = ({ value, label }) => { @@ -28,8 +27,8 @@ class Dropdown extends Component { } render() { - const { children, options: data } = this.props; - const { opened, selectedLabel, selectedValue } = this.state; + const { children, options: data, opened } = this.props; + const { selectedLabel, selectedValue } = this.state; const options = data.map((option) => ( Date: Thu, 24 Oct 2019 18:02:30 +0700 Subject: [PATCH 011/219] making structures for some services and stores --- jsdoc.json | 11 +---- .../ContractService/ContractService.js | 9 +++- src/services/WalletService/WalletService.js | 36 +++++++++++++++- src/services/Web3Service/Web3Service.js | 41 ++++++++++++++++++- src/stores/AppStore/AppStore.js | 4 ++ src/stores/ProjectStore/ProjectStore.js | 7 +++- src/stores/UserStore/UserStore.js | 8 +++- 7 files changed, 102 insertions(+), 14 deletions(-) diff --git a/jsdoc.json b/jsdoc.json index 7ff496a5..06e8e911 100644 --- a/jsdoc.json +++ b/jsdoc.json @@ -8,19 +8,12 @@ ] }, "plugins": [ - "plugins/markdown", - "better-docs/component" + "plugins/markdown" ], "opts": { "encoding": "utf8", "destination": "docs/", "recurse": true, - "verbose": true, - "template": "./node_modules/better-docs" - }, - "templates": { - "better-docs": { - "name": "ZeroOne Documentation" - } + "verbose": true } } \ No newline at end of file diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 1b8746b5..92e00c5d 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -1,3 +1,10 @@ -export default class ContractService { +/** + * Class for forming transactions + */ +class ContractService { + constructor() { + } } + +export default ContractService; diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 6c0b56b7..593952c5 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -1,3 +1,37 @@ -export default class WalletService { +/** Service for working with wallets */ +class WalletService { + /** + * Constructor + * @constructor + * @param {string} encryptedWallet - JSON String with Keystore V3 + */ + constructor() { + this.encryptedWallet = ''; + } + + /** + * Encrypts wallet + * @param {string} encryptedWallet + */ + readWallet(encryptedWallet) { + + } + + /** + * Creates new wallet + * @param {string} password - combination of symbols which will be allow decode wallet + */ + createWallet(password) { + + } + + /** + * Recover wallet from 12-word recover phrase + * @param {string} seedPhrase - 12 word recover phrase + */ + recoverWallet(seedPhrase) { + + } } +export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 3d15403a..ceb2489f 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -1,3 +1,42 @@ -export default class Web3Service { +import { reject } from 'q'; +/** + * Class for working with web3 (sending transactions) + */ +class Web3Service { + /** + * @constructor + * @param {string} provider - provider for web3 + */ + constructor(providerUrl) { + this.provider = ''; + this.createProvider(providerUrl) + .then((provider) => { + this.setProvider(provider); + }).catch((e) => new Error('web3 error: createProvider', e)); + } + + /** + * creates and stores web3 provider instance + * @param {string} url web3 socket connection url + * @return {Promise} web3 provider instance + */ + createProvider(url) { + return new Promise((resolve, reject) => { + if (!url) reject(new Error('No provider specified')); + const provider = new WebsocketProvider(url); + resolve(provider); + }); + } + + /** + * sets web3 provider instance + * inits connection + * @param {string} url web3 socket connection url + */ + setProvider(provider) { + this.provider = provider; + this.web3.setProvider(provider); + } } +export default Web3Service; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 4113a86f..7a3ca2e2 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,3 +1,7 @@ +import { observable, action, computed } from 'mobx'; + export default class AppStore { + @observable walletList = []; + @observable projectList = []; } diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 0381e3e5..2b618452 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -1,3 +1,8 @@ -export default class ProjectStore { +import { observable, action, computed } from 'mobx'; + +class ProjectStore { } +const projectStore = new ProjectStore(); + +export default ProjectStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 93385c16..fab40892 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,3 +1,9 @@ -export default class UserStore { +import { observable, action, computed } from 'mobx'; +class UserStore { + @observable wallet = {}; } + +const userStore = new UserStore(); + +export default userStore; From 7c55f640a58b4a5ac194e4e25d3200eb218a21ec Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 10:24:36 +0700 Subject: [PATCH 012/219] described Usergroup store --- src/stores/UsergroupStore/UsergroupStore.js | 68 ++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js index 60603bf6..67c103a3 100644 --- a/src/stores/UsergroupStore/UsergroupStore.js +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -1,3 +1,69 @@ -export default class UsergroupStore { +import { observable, action, computed } from 'mobx'; +/** + * class for working with userGroup + */ +class UsergroupStore { + @observable groupInfo = { + alias: '', + description: '', + address: '', + totalSupply: 0, + tokenSymbol: '', + tokenType: '', + usersList: [], + } + /** + * @constructor + * @param {object} groupInfo Contains info about group + * @param {string} groupInfo.alias Name of the group in contract + * @param {string} groupInfo.description Description about userGroup + * @param {string} groupInfo.address Address of smart-contract + * @param {number} groupInfo.totalSupply Total token balance of smart-contract + * @param {string} groupInfo.tokenSymbol Short token symbol + * @param {Array} groupInfo.usersList List of users + */ + constructor({ + alias, description, address, totalSupply, tokenSymbol, tokenType, + }) { + this.groupInfo = Object.assign(this.groupInfo, { + alias, description, address, totalSupply, tokenSymbol, tokenType, + }); + } + + /** + * Getting user token balance from contract + * @function + * @param {string} address Address of user + */ + @action getUserBalance = async (address) => { + /* web3.eth.getBalance(address).call({from:'userAddress'}) + .then((balance) => { + this.addUser(address, balance); + }) */ + } + + /** + * Adding user with his balance into array + * @function + * @param {string} address Address of user wallet + * @param {number} tokenBalance user token balance in this usergroup + */ + @action addUser = (address, tokenBalance) => { + const { groupInfo } = this; + groupInfo.usersList.push({ address, tokenBalance }); + } + + /** + * Transfering tokens between users + * @param {string} from address, who will send tokens + * @param {address} to address, who will recieve tokens + * @param {number} count number of tokens + */ + @action transferTokens(from, to, count) { + + } } + + +export default UsergroupStore; From 8bda3862dab97a480ddebbe6ae60344ee37d6363 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 10:49:41 +0700 Subject: [PATCH 013/219] Adding methods to web3 service --- src/services/Web3Service/Web3Service.js | 54 +++++++++++++++++++------ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index ceb2489f..a65852cd 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -1,25 +1,28 @@ -import { reject } from 'q'; - +import Web3 from 'web3'; /** - * Class for working with web3 (sending transactions) + * Class for working with this.web3 (sending transactions) */ -class Web3Service { +class web3Service { /** * @constructor - * @param {string} provider - provider for web3 + * @param {string} provider - provider for this.web3 */ constructor(providerUrl) { + this.web3 = new Web3(); + this.gasPrice = this.web3.utils.toHex(1000000000); + this.gasLimit = this.web3.utils.toHex(21000); this.provider = ''; + this.address2nonce = {}; this.createProvider(providerUrl) .then((provider) => { this.setProvider(provider); - }).catch((e) => new Error('web3 error: createProvider', e)); + }).catch((e) => new Error('this.web3 error: createProvider', e)); } /** - * creates and stores web3 provider instance - * @param {string} url web3 socket connection url - * @return {Promise} web3 provider instance + * creates and stores this.web3 provider instance + * @param {string} url this.web3 socket connection url + * @return {Promise} this.web3 provider instance */ createProvider(url) { return new Promise((resolve, reject) => { @@ -30,13 +33,40 @@ class Web3Service { } /** - * sets web3 provider instance + * sets this.web3 provider instance * inits connection - * @param {string} url web3 socket connection url + * @param {string} url this.web3 socket connection url */ setProvider(provider) { this.provider = provider; this.web3.setProvider(provider); } + + /** + * Sending transaction to contract + * @param {string} txData Raw transaction (without 0x) + * @param {string} from User, who send transaction + */ + sendTransaction(txData, from) { + this.address2nonce[from] += 1; + return this.web3.sendSignedTransaction(`0x${txData}`, from); + } + + /** + * Getting nonce of address + * @param {string} address address, for which we getting nonce + */ + getNonce(address) { + return new Promise((resolve, reject) => { + if (!this.address2nonce[address]) { + this.web3.eth.getTransactionCount(address, 'pending').then((nonce) => { + this.address2nonce[address] += nonce; + resolve(nonce); + }).catch((e) => reject(e)); + } else { + resolve(this.address2nonce[address]); + } + }); + } } -export default Web3Service; +export default web3Service; From cf7c7058be8a2e3f33e7c0afa38d2a6316f1934f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 11:55:41 +0700 Subject: [PATCH 014/219] described question store --- src/stores/QuestionStore/QuestionStore.js | 43 ++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 1f498f40..2452e0bc 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -1,3 +1,44 @@ -export default class QuestionStore { +import { observable, action, computed } from 'mobx'; +/** + * Contains methods for working + */ +class QuestionStore { + @observable questions; + + + constructor() { + this.questions = []; + } + + /** + * Recieving question from contract + */ + @action recieveQuestions = () => { + + } + + /** + * Adding question to the list + * @param {object} question Question which will be added + */ + @action addQuestion = (question) => { + this.questions.push(question); + } + + /** + * Getting question by given id + * @param {number} id id of question + */ + @action getQuestionById = (id) => this.questions.filter((question) => question.id === id) + + + /** + * Getting list of questions for displaying + */ + @computed get questions() { + + } } + +export default QuestionStore; From 754bfa2707c2db4e65c2b2fa780e8b79513ba2cb Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 14:01:27 +0700 Subject: [PATCH 015/219] named parameter more correct --- src/services/WalletService/WalletService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 593952c5..5917b7ec 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -28,9 +28,9 @@ class WalletService { /** * Recover wallet from 12-word recover phrase - * @param {string} seedPhrase - 12 word recover phrase + * @param {string} mnemonic - 12 word recover phrase */ - recoverWallet(seedPhrase) { + recoverWallet(mnemonic) { } } From 13f0bd0dde5f9d4e916ff59530871fb1990260c4 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 14:15:45 +0700 Subject: [PATCH 016/219] described userStore --- src/stores/UserStore/UserStore.js | 20 +++++++++++++++++++- src/stores/UserStore/index.js | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index fab40892..2031427d 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,7 +1,25 @@ import { observable, action, computed } from 'mobx'; class UserStore { - @observable wallet = {}; + @observable userInfo = { + address: '', + balance: 0, + }; + + /** + * Signing transactions with private key + * @param {string} password password which was used to encode Keystore V3 + */ + @action singTransaction = (password) => { + + } + + /** + * @param {string} txData Raw transaction + */ + @action sendTransaction = (txData) => { + + }; } const userStore = new UserStore(); diff --git a/src/stores/UserStore/index.js b/src/stores/UserStore/index.js index 2d7459c2..95deb594 100644 --- a/src/stores/UserStore/index.js +++ b/src/stores/UserStore/index.js @@ -1,3 +1,3 @@ -import UserStore from './UserStore'; +import userStore from './UserStore'; -export default UserStore; +export default userStore; From 1fa38affcfd87962135cbee68770934870925826 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 14:37:31 +0700 Subject: [PATCH 017/219] describing for userStore --- src/stores/UserStore/UserStore.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 2031427d..a8a1fc16 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,5 +1,7 @@ import { observable, action, computed } from 'mobx'; - +/** + * Describes store with user data + */ class UserStore { @observable userInfo = { address: '', @@ -8,6 +10,7 @@ class UserStore { /** * Signing transactions with private key + * @function * @param {string} password password which was used to encode Keystore V3 */ @action singTransaction = (password) => { @@ -15,6 +18,8 @@ class UserStore { } /** + * Sending transaction from user + * @function * @param {string} txData Raw transaction */ @action sendTransaction = (txData) => { From 1876a2f172e8f8684a525d55d4cc0402ed6183f6 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 14:37:51 +0700 Subject: [PATCH 018/219] Added function tags for JSDoc --- src/stores/QuestionStore/QuestionStore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 2452e0bc..5b09c69f 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -13,6 +13,7 @@ class QuestionStore { /** * Recieving question from contract + * @function */ @action recieveQuestions = () => { @@ -20,6 +21,7 @@ class QuestionStore { /** * Adding question to the list + * @function * @param {object} question Question which will be added */ @action addQuestion = (question) => { @@ -28,13 +30,17 @@ class QuestionStore { /** * Getting question by given id + * @function * @param {number} id id of question + * @returns {object} question matched by id */ @action getQuestionById = (id) => this.questions.filter((question) => question.id === id) /** * Getting list of questions for displaying + * @function + * @returns {Array} list of all questions */ @computed get questions() { From f0e505bc01615f99ae0e0c76d722bccd1a4e8eae Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 14:39:36 +0700 Subject: [PATCH 019/219] removed wrong comment string in web3 service --- src/services/Web3Service/Web3Service.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index a65852cd..071f7a39 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -34,7 +34,6 @@ class web3Service { /** * sets this.web3 provider instance - * inits connection * @param {string} url this.web3 socket connection url */ setProvider(provider) { From a136ca2b512635f981ef38f17a214874b47a0246 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 15:30:42 +0700 Subject: [PATCH 020/219] described history store --- src/stores/HistoryStore/HistoryStore.js | 58 ++++++++++++++++++++++++- src/stores/HistoryStore/index.js | 4 +- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index a1821b7c..5ddd2884 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -1,3 +1,59 @@ -export default class HistoryStore { +import { observable, action, computed } from 'mobx'; +class HistoryStore { + @observable votings = []; + + + /** + * recieving voting for local using + * @function + * @param {string} address project address + */ + @action recieveVotings = (address) => { + // this.votings.push(voting) + } + + + /** + * Getting full info about one voting, selected by id + * @function + * @param {number} id id of voting + */ + @action getVotingsById = (id) => this.votings.filter((voting) => voting.id === id) + + /** + * Getting stats about votes in voting, selected by id + * @function + * @param {number} id id of voting + */ + @action getVotingStats = (id) => {} + + /** + * filtering voting by given parameters + * @function + * @param {object} params parameters for filtering + * @param {number} params.questionId filter votings by questionId + * @param {number} params.descision filter voting by descision + * @param {string} params.dateFrom filter voting by startTime + * @param {string} params.dateTo filter voting by endTime + */ + @action filterVotings = (params) => {} + + /** + * @function + * @return {bool} True if project have not ended voting + */ + @computed get isVotingActive() { + return false; + } + + /** + * @function + * @return {array} list of votings + */ + @computed get votingsList() { + return false; + } } +const historyStore = new HistoryStore(); +export default historyStore; diff --git a/src/stores/HistoryStore/index.js b/src/stores/HistoryStore/index.js index 7ebd5c19..46a6c607 100644 --- a/src/stores/HistoryStore/index.js +++ b/src/stores/HistoryStore/index.js @@ -1,3 +1,3 @@ -import HistoryStore from './HistoryStore'; +import historyStore from './HistoryStore'; -export default HistoryStore; +export default historyStore; From 232699ec6dfcc6c598227a460e2b88be81a5cf40 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:13:31 +0700 Subject: [PATCH 021/219] fixed getter and variable conflict --- src/stores/QuestionStore/QuestionStore.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 5b09c69f..66c9e6c9 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -4,11 +4,11 @@ import { observable, action, computed } from 'mobx'; * Contains methods for working */ class QuestionStore { - @observable questions; + @observable _questions; constructor() { - this.questions = []; + this._questions = []; } /** @@ -25,7 +25,7 @@ class QuestionStore { * @param {object} question Question which will be added */ @action addQuestion = (question) => { - this.questions.push(question); + this._questions.push(question); } /** @@ -34,7 +34,7 @@ class QuestionStore { * @param {number} id id of question * @returns {object} question matched by id */ - @action getQuestionById = (id) => this.questions.filter((question) => question.id === id) + @action getQuestionById = (id) => this._questions.filter((question) => question.id === id) /** From 90bd399c2175cf9e371845aa6824daa2c34b3e7c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:13:54 +0700 Subject: [PATCH 022/219] disabled "no-underscore-dangle" rule --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8ce5835b..38070616 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,7 @@ }, "plugins": ["react"], "rules": { - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], + "no-underscore-dangle":"off" } } From 438fe64d486b8c90f9731faec977b1f5edf00c28 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:14:31 +0700 Subject: [PATCH 023/219] removed encryptedWallet variable --- src/services/WalletService/WalletService.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 5917b7ec..6209b2b1 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -1,20 +1,11 @@ /** Service for working with wallets */ class WalletService { /** - * Constructor - * @constructor - * @param {string} encryptedWallet - JSON String with Keystore V3 + * Decrypts wallet + * @param {string} encryptedWallet JSON keystoreV3 + * @param {string} password password for decrypting */ - constructor() { - this.encryptedWallet = ''; - } - - - /** - * Encrypts wallet - * @param {string} encryptedWallet - */ - readWallet(encryptedWallet) { + readWallet(encryptedWallet, password) { } From 7507425d20bfa440e296cd6fb16a99d85f28a646 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:16:02 +0700 Subject: [PATCH 024/219] added encryptedWallet variable --- src/stores/UserStore/UserStore.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index a8a1fc16..9f720f17 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -3,10 +3,11 @@ import { observable, action, computed } from 'mobx'; * Describes store with user data */ class UserStore { - @observable userInfo = { - address: '', - balance: 0, - }; + @observable encryptedWallet = '' + + @observable address: ''; + + @observable balance: 0; /** * Signing transactions with private key From 3d601db2dfd574f1601b1ae4d6155851a407aa16 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:52:31 +0700 Subject: [PATCH 025/219] Removed unususal variables --- src/services/Web3Service/Web3Service.js | 4 +--- src/stores/HistoryStore/HistoryStore.js | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 071f7a39..41bf7f53 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -9,14 +9,12 @@ class web3Service { */ constructor(providerUrl) { this.web3 = new Web3(); - this.gasPrice = this.web3.utils.toHex(1000000000); - this.gasLimit = this.web3.utils.toHex(21000); this.provider = ''; this.address2nonce = {}; this.createProvider(providerUrl) .then((provider) => { this.setProvider(provider); - }).catch((e) => new Error('this.web3 error: createProvider', e)); + }).catch((e) => new Error('web3 error: createProvider', e)); } /** diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index 5ddd2884..8e78d93b 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -13,7 +13,6 @@ class HistoryStore { // this.votings.push(voting) } - /** * Getting full info about one voting, selected by id * @function From 801a8712e489f8a3b3be17bb419275025cd2a25e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 16:52:55 +0700 Subject: [PATCH 026/219] described contract service --- src/services/ContractService/ContractService.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 92e00c5d..976d037c 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -2,8 +2,17 @@ * Class for forming transactions */ class ContractService { - constructor() { + constructor(contractInstance) { + this.contract = contractInstance; + } + /** + * Creates transs + * @param {string} method + * @param {array} params + */ + createTxData(method, params) { + return this.contract.methods[method](params).encodeABI(); } } From 3c7d07392eb89fec81e41857934acaa688373ded Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 17:13:48 +0700 Subject: [PATCH 027/219] added new method to contract service --- src/services/ContractService/ContractService.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 976d037c..dd55d546 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -14,6 +14,16 @@ class ContractService { createTxData(method, params) { return this.contract.methods[method](params).encodeABI(); } + + /** + * calling contract method + * @param {string} method method, which will be called + * @param {string} from address of caller + */ + async callMethod(method, from) { + const data = await this.contract.methods[method]().call({ from }); + return data; + } } export default ContractService; From 173c9fd682c95edaf82d25f7713a6988f2f9fef5 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 17:15:45 +0700 Subject: [PATCH 028/219] described project store --- src/stores/ProjectStore/ProjectStore.js | 44 ++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 2b618452..4c7a3e0a 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -1,8 +1,50 @@ import { observable, action, computed } from 'mobx'; +import UsergroupStore from '../UsergroupStore'; +import QuestionStore from '../QuestionStore'; +import userStore from '../UserStore'; +import { historyStore as HistoryStore } from '../HistoryStore'; + +/** + * Class implements whole project + */ class ProjectStore { + @observable prepared = false; + + @observable userGrops = []; + + @observable questionStore = new QuestionStore(); + + @observable historyStore = new HistoryStore(); + + @observable userStore = new userStore(); + + /** + * Starting of voting + */ + @action startVoting() { + this.prepared = false; + } + + /** + * Preparing app for start voting + * @param {number} questionId + * @param {array} parameters + */ + @action prepareVoting(questionId, parameters) { + /** + * Bunch of code + */ + this.prepared = true; + } + /** + * getting usergroups from contract + */ + @action getuserGroups = () => { + const data = {}; + this.userGrops.push(new UsergroupStore(data)); + } } -const projectStore = new ProjectStore(); export default ProjectStore; From 9671d750cd1925bc8e24c935091bf68e53c5bee1 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 25 Oct 2019 18:28:31 +0700 Subject: [PATCH 029/219] small fixes --- src/services/WalletService/WalletService.js | 8 ++++++++ src/services/Web3Service/Web3Service.js | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 6209b2b1..39658e20 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -24,5 +24,13 @@ class WalletService { recoverWallet(mnemonic) { } + + /** + * Write encrypted wallet to file + * @param {string} encryptedWallet + */ + writeWalletToFile(encryptedWallet) { + + } } export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 41bf7f53..0b1e8672 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -44,9 +44,9 @@ class web3Service { * @param {string} txData Raw transaction (without 0x) * @param {string} from User, who send transaction */ - sendTransaction(txData, from) { + sendSignedTransaction(txData) { this.address2nonce[from] += 1; - return this.web3.sendSignedTransaction(`0x${txData}`, from); + return this.web3.sendSignedTransaction(`0x${txData}`); } /** From dbc3e7c6803ae0e1df93e7c3d53a01e1c88b05cc Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 11:11:58 +0700 Subject: [PATCH 030/219] Added Question and Voting classes --- src/stores/HistoryStore/HistoryStore.js | 17 +++++++-- src/stores/HistoryStore/entities/Voting.js | 28 +++++++++++++++ src/stores/QuestionStore/QuestionStore.js | 16 +++++++-- src/stores/QuestionStore/entities/Question.js | 35 +++++++++++++++++++ 4 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 src/stores/HistoryStore/entities/Voting.js create mode 100644 src/stores/QuestionStore/entities/Question.js diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index 8e78d93b..e3cf3759 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -1,16 +1,27 @@ import { observable, action, computed } from 'mobx'; +import Voting from './entities/Voting'; class HistoryStore { @observable votings = []; + /** + * recieving voting length for fetching them from contract + * @function + * @param {string} address user address + * @returns {number} count of votings + */ + @action fetchVotingsCount = (address) => { + + } /** * recieving voting for local using * @function - * @param {string} address project address + * @param {string} address user address */ - @action recieveVotings = (address) => { - // this.votings.push(voting) + @action fetchVotings = (address) => { + const data = {}; + this.votings.push(new Voting(data)); } /** diff --git a/src/stores/HistoryStore/entities/Voting.js b/src/stores/HistoryStore/entities/Voting.js new file mode 100644 index 00000000..c5aca543 --- /dev/null +++ b/src/stores/HistoryStore/entities/Voting.js @@ -0,0 +1,28 @@ +class Voting { + /** + * @constructor + * @param {Object} data object contains info adout voting + * @param {Number} data.votingId id of voting + * @param {Number} data.questionId id of question which selected for voting + * @param {Array} data.params parameters of voting + */ + constructor({ + votingId, questionId, params, + }) { + this.id = votingId; + this.questionId = questionId; + this.params = params; + } + + /** + * getting stats of voting on click + * @function + * @return {Array} stats of voting + */ + getVotingStats() { + const stats = []; + return stats; + } +} + +export default Voting; diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 66c9e6c9..f66077ba 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -1,4 +1,5 @@ import { observable, action, computed } from 'mobx'; +import Question from './entities/Question'; /** * Contains methods for working @@ -11,11 +12,22 @@ class QuestionStore { this._questions = []; } + /** + * Recieving questions count for fetching them from contract + * @function + * @param {string} address user address + * @returns {number} count of questions + */ + @action fetchQuestionsCount = (address) => { + + } + /** * Recieving question from contract * @function + * @param {string} address user address */ - @action recieveQuestions = () => { + @action fetchQuestions = (address) => { } @@ -25,7 +37,7 @@ class QuestionStore { * @param {object} question Question which will be added */ @action addQuestion = (question) => { - this._questions.push(question); + this._questions.push(new Question(question)); } /** diff --git a/src/stores/QuestionStore/entities/Question.js b/src/stores/QuestionStore/entities/Question.js new file mode 100644 index 00000000..f2a1e819 --- /dev/null +++ b/src/stores/QuestionStore/entities/Question.js @@ -0,0 +1,35 @@ +class Question { + /** + * @constructor + * @param {object} data data about question + * @param {number} data.id question id + * @param {number} data.groupId id of group, which can start voting for this question + * @param {string} data.caption question caption + * @param {string} data.text description of the question + * @param {Array} data.params parameters which will be used after voting + */ + constructor({ + id, groupId, caption, text, params, + }) { + this.id = id; + this.caption = caption; + this.groupId = groupId; + this.text = text; + this.params = params; + } + + /** + * select question for voting initialization + * @return {object} data about question + */ + selectQuestionForVoting() { + const { + id, groupId, caption, text, params, + } = this; + return { + id, groupId, caption, text, params, + }; + } +} + +export default Question; From 9882ba81d312daa39070fdcb6e8a711e53fd5937 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 11:31:09 +0700 Subject: [PATCH 031/219] Fixes for stores --- src/services/WalletService/WalletService.js | 20 +++++++++---------- src/stores/HistoryStore/HistoryStore.js | 3 +-- src/stores/HistoryStore/index.js | 4 ++-- src/stores/ProjectStore/ProjectStore.js | 7 +++---- src/stores/UserStore/UserStore.js | 16 ++++++++++----- src/stores/UserStore/index.js | 4 ++-- src/stores/UsergroupStore/UsergroupStore.js | 22 ++++++++++++--------- 7 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 39658e20..813f2502 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -2,10 +2,18 @@ class WalletService { /** * Decrypts wallet - * @param {string} encryptedWallet JSON keystoreV3 + * @param {string} url path to wallet * @param {string} password password for decrypting */ - readWallet(encryptedWallet, password) { + readWalletFromFile(url, password) { + + } + + /** + * Write encrypted wallet to file + * @param {string} encryptedWallet + */ + writeWalletToFile(encryptedWallet) { } @@ -24,13 +32,5 @@ class WalletService { recoverWallet(mnemonic) { } - - /** - * Write encrypted wallet to file - * @param {string} encryptedWallet - */ - writeWalletToFile(encryptedWallet) { - - } } export default WalletService; diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index e3cf3759..2cd8afc0 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -65,5 +65,4 @@ class HistoryStore { return false; } } -const historyStore = new HistoryStore(); -export default historyStore; +export default HistoryStore; diff --git a/src/stores/HistoryStore/index.js b/src/stores/HistoryStore/index.js index 46a6c607..7ebd5c19 100644 --- a/src/stores/HistoryStore/index.js +++ b/src/stores/HistoryStore/index.js @@ -1,3 +1,3 @@ -import historyStore from './HistoryStore'; +import HistoryStore from './HistoryStore'; -export default historyStore; +export default HistoryStore; diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 4c7a3e0a..711dc846 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -1,9 +1,8 @@ import { observable, action, computed } from 'mobx'; import UsergroupStore from '../UsergroupStore'; import QuestionStore from '../QuestionStore'; -import userStore from '../UserStore'; - -import { historyStore as HistoryStore } from '../HistoryStore'; +import UserStore from '../UserStore'; +import HistoryStore from '../HistoryStore'; /** * Class implements whole project @@ -17,7 +16,7 @@ class ProjectStore { @observable historyStore = new HistoryStore(); - @observable userStore = new userStore(); + @observable userStore = new UserStore(); /** * Starting of voting diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 9f720f17..0f8ced2c 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -5,9 +5,9 @@ import { observable, action, computed } from 'mobx'; class UserStore { @observable encryptedWallet = '' - @observable address: ''; + @observable address = ''; - @observable balance: 0; + @observable balance = 0; /** * Signing transactions with private key @@ -26,8 +26,14 @@ class UserStore { @action sendTransaction = (txData) => { }; -} -const userStore = new UserStore(); + /** + * Getting user Ethereum balance + */ + @action getEthBalance = () => { + this.balance = 0; + return false; + } +} -export default userStore; +export default UserStore; diff --git a/src/stores/UserStore/index.js b/src/stores/UserStore/index.js index 95deb594..2d7459c2 100644 --- a/src/stores/UserStore/index.js +++ b/src/stores/UserStore/index.js @@ -1,3 +1,3 @@ -import userStore from './UserStore'; +import UserStore from './UserStore'; -export default userStore; +export default UserStore; diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js index 67c103a3..0c8cdd8a 100644 --- a/src/stores/UsergroupStore/UsergroupStore.js +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -3,15 +3,19 @@ import { observable, action, computed } from 'mobx'; * class for working with userGroup */ class UsergroupStore { - @observable groupInfo = { - alias: '', - description: '', - address: '', - totalSupply: 0, - tokenSymbol: '', - tokenType: '', - usersList: [], - } + @observable alias = ''; + + @observable description = ''; + + @observable address = ''; + + @observable totalSupply = 0; + + @observable tokenSymbol = ''; + + @observable tokenType = ''; + + @observable usersList = []; /** * @constructor From 9b8625eb50cda4f80a976ed958df736e759bd65b Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 14:49:24 +0700 Subject: [PATCH 032/219] fixes and improvemtnts --- src/services/WalletService/WalletService.js | 13 ++++++- src/services/WalletService/index.js | 4 +- src/services/Web3Service/Web3Service.js | 8 ++++ src/stores/AppStore/AppStore.js | 25 ++++++++++++ src/stores/HistoryStore/HistoryStore.js | 11 +++++- src/stores/ProjectStore/ProjectStore.js | 43 +++++++++++++++++---- src/stores/QuestionStore/QuestionStore.js | 11 ++++-- src/stores/UserStore/UserStore.js | 20 +++++++++- src/stores/UsergroupStore/UsergroupStore.js | 16 ++++++-- 9 files changed, 130 insertions(+), 21 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 813f2502..a6e40f90 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -32,5 +32,16 @@ class WalletService { recoverWallet(mnemonic) { } + + /** + * Checking wallet for creating txDaat + * @param {string} wallet encryptedWallet + * @param {string} password password + * @return {bool} is password correct + */ + checkPassword(wallet, password) { + + } } -export default WalletService; +const walletService = new WalletService(); +export default walletService; diff --git a/src/services/WalletService/index.js b/src/services/WalletService/index.js index 6657332d..06134866 100644 --- a/src/services/WalletService/index.js +++ b/src/services/WalletService/index.js @@ -1,3 +1,3 @@ -import WalletService from './WalletService'; +import walletService from './WalletService'; -export default WalletService; +export default walletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 0b1e8672..3b3f135b 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -39,6 +39,14 @@ class web3Service { this.web3.setProvider(provider); } + /** + * sets wallet to web3 by private key + * @param {string} privateKey private key + */ + setWallet(privateKey) { + this.web3.eth.accounts.wallet.add(privateKey); + } + /** * Sending transaction to contract * @param {string} txData Raw transaction (without 0x) diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 7a3ca2e2..0650b1e0 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,7 +1,32 @@ import { observable, action, computed } from 'mobx'; +import UserStore from '../UserStore'; export default class AppStore { @observable walletList = []; @observable projectList = []; + + @observable userStore = new UserStore() + + /** + * Getting list of url's for sending this to wallet service + * @function + */ + @action readWalletList = () => { + const wallet = ''; + this.walletList.push(wallet); + } + + /** + * Reading list of projects for displaing them in project list + * @function + */ + @action readProjectList = () => { + const project = {}; + this.projectList.push(project); + } + + @action setUserWallet = (encryptedWallet) => { + this.userStore.setEncryptedWallet(encryptedWallet); + } } diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index 2cd8afc0..6f67df36 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -4,6 +4,10 @@ import Voting from './entities/Voting'; class HistoryStore { @observable votings = []; + constructor(projectAddress) { + this.fetchVotings(projectAddress); + } + /** * recieving voting length for fetching them from contract * @function @@ -20,14 +24,15 @@ class HistoryStore { * @param {string} address user address */ @action fetchVotings = (address) => { - const data = {}; - this.votings.push(new Voting(data)); + this.fetchVotingsCount(address); + this.votings.push(new Voting()); } /** * Getting full info about one voting, selected by id * @function * @param {number} id id of voting + * @return {object} selected voting */ @action getVotingsById = (id) => this.votings.filter((voting) => voting.id === id) @@ -35,6 +40,7 @@ class HistoryStore { * Getting stats about votes in voting, selected by id * @function * @param {number} id id of voting + * @return {array} stats */ @action getVotingStats = (id) => {} @@ -46,6 +52,7 @@ class HistoryStore { * @param {number} params.descision filter voting by descision * @param {string} params.dateFrom filter voting by startTime * @param {string} params.dateTo filter voting by endTime + * @return {array} Filtered question */ @action filterVotings = (params) => {} diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 711dc846..33c5f02b 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -1,28 +1,40 @@ import { observable, action, computed } from 'mobx'; import UsergroupStore from '../UsergroupStore'; import QuestionStore from '../QuestionStore'; -import UserStore from '../UserStore'; import HistoryStore from '../HistoryStore'; /** * Class implements whole project */ class ProjectStore { - @observable prepared = false; + @observable projectAddress = '' + + @observable prepared = 0; + + @observable votingStats = { + default: 0, + prepared: 1, + active: 2, + } @observable userGrops = []; - @observable questionStore = new QuestionStore(); + @observable questionStore; - @observable historyStore = new HistoryStore(); + @observable historyStore; - @observable userStore = new UserStore(); + constructor(projectAddress) { + this.projectAddress = projectAddress; + this.questionStore = new QuestionStore(projectAddress); + this.historyStore = new HistoryStore(projectAddress); + this.userGrops = this.fetchUserGroups(projectAddress); + } /** * Starting of voting */ @action startVoting() { - this.prepared = false; + this.prepared = this.votingStats.active; } /** @@ -34,13 +46,28 @@ class ProjectStore { /** * Bunch of code */ - this.prepared = true; + this.prepared = this.votingStats.prepared; + } + + + /** + * getting usergroups lentgh from contract + */ + @action fetchUserGroupsLength = () => { + /** + * get usergroups length, then + * for 1 to length + * this.fetchUserGroups(id) + */ } /** * getting usergroups from contract + * @param {number} projectAddress address of project + * @return {array} list of usergroups */ - @action getuserGroups = () => { + @action fetchUserGroups = (projectAddress) => { + this.fetchUserGroupsLength(projectAddress); const data = {}; this.userGrops.push(new UsergroupStore(data)); } diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index f66077ba..72f9ba60 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -8,8 +8,9 @@ class QuestionStore { @observable _questions; - constructor() { + constructor(projectAddress) { this._questions = []; + this.fetchQuestionsCount(projectAddress); } /** @@ -28,7 +29,11 @@ class QuestionStore { * @param {string} address user address */ @action fetchQuestions = (address) => { - + this.fetchQuestionsCount(address); + /** + * gets the question + */ + this.addQuestion(data); } /** @@ -55,7 +60,7 @@ class QuestionStore { * @returns {Array} list of all questions */ @computed get questions() { - + return this._questions; } } diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 0f8ced2c..6d8514e7 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,4 +1,5 @@ import { observable, action, computed } from 'mobx'; +import walletService from '../../services/WalletService'; /** * Describes store with user data */ @@ -9,12 +10,28 @@ class UserStore { @observable balance = 0; + + @action setEncryptedWallet = (wallet) => { + this.encryptedWallet = wallet; + } + + /** + * checking password by wallet service + * @param password password for decoding + * @return {bool} is password correct + */ + @action checkPassword = (password) => { + walletService.checkPassword(this.encryptedWallet, password); + } + /** * Signing transactions with private key * @function + * @param {string} data rawTx * @param {string} password password which was used to encode Keystore V3 + * @return Signed TX data */ - @action singTransaction = (password) => { + @action singTransaction = (data, password) => { } @@ -29,6 +46,7 @@ class UserStore { /** * Getting user Ethereum balance + * @return {number} balance in ETH */ @action getEthBalance = () => { this.balance = 0; diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js index 0c8cdd8a..f6d71b86 100644 --- a/src/stores/UsergroupStore/UsergroupStore.js +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -3,6 +3,8 @@ import { observable, action, computed } from 'mobx'; * class for working with userGroup */ class UsergroupStore { + @observable id = ''; + @observable alias = ''; @observable description = ''; @@ -20,6 +22,7 @@ class UsergroupStore { /** * @constructor * @param {object} groupInfo Contains info about group + * @param {string} groupInfo.id id of usergroup * @param {string} groupInfo.alias Name of the group in contract * @param {string} groupInfo.description Description about userGroup * @param {string} groupInfo.address Address of smart-contract @@ -28,11 +31,16 @@ class UsergroupStore { * @param {Array} groupInfo.usersList List of users */ constructor({ - alias, description, address, totalSupply, tokenSymbol, tokenType, + id, alias, description, address, totalSupply, tokenSymbol, tokenType, usersList, }) { - this.groupInfo = Object.assign(this.groupInfo, { - alias, description, address, totalSupply, tokenSymbol, tokenType, - }); + this.id = id; + this.alias = alias; + this.description = description; + this.address = address; + this.totalSupply = totalSupply; + this.tokenSymbol = tokenSymbol; + this.tokenType = tokenType; + this.usersList = usersList; } /** From b9c976ed50ac63af7d3ebf4274bd2f3460f8b601 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 14:50:57 +0700 Subject: [PATCH 033/219] added params to callMethod --- src/services/ContractService/ContractService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index dd55d546..bbfcf9c5 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -20,8 +20,8 @@ class ContractService { * @param {string} method method, which will be called * @param {string} from address of caller */ - async callMethod(method, from) { - const data = await this.contract.methods[method]().call({ from }); + async callMethod(method, from, params) { + const data = await this.contract.methods[method](params).call({ from }); return data; } } From c116fffb0179995bf250bddf572db1f98c735e2f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 14:54:09 +0700 Subject: [PATCH 034/219] removed duplicate getVotingStats --- src/services/ContractService/ContractService.js | 2 +- src/stores/HistoryStore/entities/Voting.js | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index bbfcf9c5..00397813 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -7,7 +7,7 @@ class ContractService { } /** - * Creates transs + * Creates transaction * @param {string} method * @param {array} params */ diff --git a/src/stores/HistoryStore/entities/Voting.js b/src/stores/HistoryStore/entities/Voting.js index c5aca543..d2bff068 100644 --- a/src/stores/HistoryStore/entities/Voting.js +++ b/src/stores/HistoryStore/entities/Voting.js @@ -13,16 +13,6 @@ class Voting { this.questionId = questionId; this.params = params; } - - /** - * getting stats of voting on click - * @function - * @return {Array} stats of voting - */ - getVotingStats() { - const stats = []; - return stats; - } } export default Voting; From 9f356c0a9544c215978cc7f9fedf82e1d339aa0f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 15:39:44 +0700 Subject: [PATCH 035/219] Added returns to jsDoc --- src/services/WalletService/WalletService.js | 2 ++ src/stores/AppStore/AppStore.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index a6e40f90..241888e6 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -20,6 +20,7 @@ class WalletService { /** * Creates new wallet * @param {string} password - combination of symbols which will be allow decode wallet + * @returns {array} Encrypted wallet and seed */ createWallet(password) { @@ -28,6 +29,7 @@ class WalletService { /** * Recover wallet from 12-word recover phrase * @param {string} mnemonic - 12 word recover phrase + * @returns {object} wallet object */ recoverWallet(mnemonic) { diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 0650b1e0..ce66f7c4 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,5 +1,6 @@ import { observable, action, computed } from 'mobx'; import UserStore from '../UserStore'; +import ProjectStore from '../ProjectStore'; export default class AppStore { @observable walletList = []; @@ -8,6 +9,9 @@ export default class AppStore { @observable userStore = new UserStore() + @observable projectStore; + + /** * Getting list of url's for sending this to wallet service * @function @@ -26,7 +30,18 @@ export default class AppStore { this.projectList.push(project); } + /** + * Adding encrypted Wallet to userStore + */ @action setUserWallet = (encryptedWallet) => { this.userStore.setEncryptedWallet(encryptedWallet); } + + /** + * initiating project + * @param {string} address adress of project + */ + @action initProject(address) { + this.projectStore = new ProjectStore(address); + } } From cbeebab6f2caa298b94ef7e912654aa29adc7149 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 16:04:24 +0700 Subject: [PATCH 036/219] removed unnecessary computed import --- src/stores/AppStore/AppStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index ce66f7c4..c078587a 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,4 +1,4 @@ -import { observable, action, computed } from 'mobx'; +import { observable, action } from 'mobx'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; From 0ca83926ca734321c870cfe8f891f249d9ab64ea Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 16:08:21 +0700 Subject: [PATCH 037/219] removed unnecessary computed from ProjectStore --- src/stores/ProjectStore/ProjectStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 33c5f02b..d7159a79 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -1,4 +1,4 @@ -import { observable, action, computed } from 'mobx'; +import { observable, action } from 'mobx'; import UsergroupStore from '../UsergroupStore'; import QuestionStore from '../QuestionStore'; import HistoryStore from '../HistoryStore'; From 01046ff4ebc557a4e15f3bbb3093e6aaa731af77 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 18:20:30 +0700 Subject: [PATCH 038/219] Added RootStore --- src/stores/RootStore/RootStore.js | 31 +++++++++++++++++++++++++++++++ src/stores/RootStore/index.js | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 src/stores/RootStore/RootStore.js create mode 100644 src/stores/RootStore/index.js diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js new file mode 100644 index 00000000..f082cf54 --- /dev/null +++ b/src/stores/RootStore/RootStore.js @@ -0,0 +1,31 @@ +import { observable, action } from 'mobx'; +import AppStore from '../AppStore'; +import UserStore from '../UserStore'; +import ProjectStore from '../ProjectStore'; +import Web3Service from '../../services/Web3Service'; +import WalletService from '../../services/WalletService'; +import ContractService from '../../services/ContractService'; + +class RootStore { + @observable projectStore; + + @observable AppStore = new AppStore(); + + @observable userStore = new UserStore() + + // services + @observable walletService = new WalletService(); + + @observable contractService = new ContractService(); + + @observable Web3Service = new Web3Service(); + + /** + * initiating project + * @param {string} address adress of project + */ + @action initProject(address) { + this.projectStore = new ProjectStore(address); + } +} +export default RootStore; diff --git a/src/stores/RootStore/index.js b/src/stores/RootStore/index.js new file mode 100644 index 00000000..bb3edd25 --- /dev/null +++ b/src/stores/RootStore/index.js @@ -0,0 +1,3 @@ +import RootStore from './RootStore'; + +export default RootStore; From c7600a1cb8c034b44166899b6eeb2f40121d188d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 28 Oct 2019 18:20:43 +0700 Subject: [PATCH 039/219] Fixes --- src/constants/index.js | 5 +++++ .../ContractService/ContractService.js | 5 +++-- src/services/WalletService/WalletService.js | 5 +++-- src/services/WalletService/index.js | 4 ++-- src/services/Web3Service/Web3Service.js | 17 ++++++++-------- src/stores/AppStore/AppStore.js | 20 ++++--------------- src/stores/ProjectStore/ProjectStore.js | 11 +++------- src/stores/QuestionStore/QuestionStore.js | 1 - src/stores/QuestionStore/entities/Question.js | 13 ------------ src/stores/UserStore/UserStore.js | 12 +++++------ 10 files changed, 35 insertions(+), 58 deletions(-) create mode 100644 src/constants/index.js diff --git a/src/constants/index.js b/src/constants/index.js new file mode 100644 index 00000000..7fdbda98 --- /dev/null +++ b/src/constants/index.js @@ -0,0 +1,5 @@ +export const votingStates = { + default: 0, + prepared: 1, + active: 2, +}; diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 00397813..c9008ec7 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -19,9 +19,10 @@ class ContractService { * calling contract method * @param {string} method method, which will be called * @param {string} from address of caller + * @param params parameters for method */ - async callMethod(method, from, params) { - const data = await this.contract.methods[method](params).call({ from }); + async callMethod(method, from, ...params) { + const data = await this.contract.methods[method](...params).call({ from }); return data; } } diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 241888e6..11b83c68 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -4,6 +4,7 @@ class WalletService { * Decrypts wallet * @param {string} url path to wallet * @param {string} password password for decrypting + * @returns {object} Wallet instance */ readWalletFromFile(url, password) { @@ -12,6 +13,7 @@ class WalletService { /** * Write encrypted wallet to file * @param {string} encryptedWallet + * @return {bool} write status: 1 - success, 2 - error */ writeWalletToFile(encryptedWallet) { @@ -20,7 +22,7 @@ class WalletService { /** * Creates new wallet * @param {string} password - combination of symbols which will be allow decode wallet - * @returns {array} Encrypted wallet and seed + * @returns {object} encryptedWallet,seed */ createWallet(password) { @@ -45,5 +47,4 @@ class WalletService { } } -const walletService = new WalletService(); export default walletService; diff --git a/src/services/WalletService/index.js b/src/services/WalletService/index.js index 06134866..6657332d 100644 --- a/src/services/WalletService/index.js +++ b/src/services/WalletService/index.js @@ -1,3 +1,3 @@ -import walletService from './WalletService'; +import WalletService from './WalletService'; -export default walletService; +export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 3b3f135b..18260c47 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -39,18 +39,11 @@ class web3Service { this.web3.setProvider(provider); } - /** - * sets wallet to web3 by private key - * @param {string} privateKey private key - */ - setWallet(privateKey) { - this.web3.eth.accounts.wallet.add(privateKey); - } - /** * Sending transaction to contract * @param {string} txData Raw transaction (without 0x) * @param {string} from User, who send transaction + * @return {Promise} promise with web3 transaction PromiEvent */ sendSignedTransaction(txData) { this.address2nonce[from] += 1; @@ -73,5 +66,13 @@ class web3Service { } }); } + + /** + * Decreasing nonce of address + * @param {string} address address, for which we decrease nonce + */ + decreaseNonce(address) { + if (this.address2nonce[address]) this.address2nonce[address] -= 1; + } } export default web3Service; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index c078587a..a9d188fc 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,17 +1,11 @@ import { observable, action } from 'mobx'; -import UserStore from '../UserStore'; -import ProjectStore from '../ProjectStore'; -export default class AppStore { + +class AppStore { @observable walletList = []; @observable projectList = []; - @observable userStore = new UserStore() - - @observable projectStore; - - /** * Getting list of url's for sending this to wallet service * @function @@ -36,12 +30,6 @@ export default class AppStore { @action setUserWallet = (encryptedWallet) => { this.userStore.setEncryptedWallet(encryptedWallet); } - - /** - * initiating project - * @param {string} address adress of project - */ - @action initProject(address) { - this.projectStore = new ProjectStore(address); - } } + +export default AppStore; diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index d7159a79..83e3afbc 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -2,6 +2,7 @@ import { observable, action } from 'mobx'; import UsergroupStore from '../UsergroupStore'; import QuestionStore from '../QuestionStore'; import HistoryStore from '../HistoryStore'; +import { votingStates } from '../../constants'; /** * Class implements whole project @@ -11,12 +12,6 @@ class ProjectStore { @observable prepared = 0; - @observable votingStats = { - default: 0, - prepared: 1, - active: 2, - } - @observable userGrops = []; @observable questionStore; @@ -34,7 +29,7 @@ class ProjectStore { * Starting of voting */ @action startVoting() { - this.prepared = this.votingStats.active; + this.prepared = votingStates.active; } /** @@ -46,7 +41,7 @@ class ProjectStore { /** * Bunch of code */ - this.prepared = this.votingStats.prepared; + this.prepared = votingStates.prepared; } diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 72f9ba60..92a24634 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -7,7 +7,6 @@ import Question from './entities/Question'; class QuestionStore { @observable _questions; - constructor(projectAddress) { this._questions = []; this.fetchQuestionsCount(projectAddress); diff --git a/src/stores/QuestionStore/entities/Question.js b/src/stores/QuestionStore/entities/Question.js index f2a1e819..e5bbe555 100644 --- a/src/stores/QuestionStore/entities/Question.js +++ b/src/stores/QuestionStore/entities/Question.js @@ -17,19 +17,6 @@ class Question { this.text = text; this.params = params; } - - /** - * select question for voting initialization - * @return {object} data about question - */ - selectQuestionForVoting() { - const { - id, groupId, caption, text, params, - } = this; - return { - id, groupId, caption, text, params, - }; - } } export default Question; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 6d8514e7..45f6bb19 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -11,7 +11,7 @@ class UserStore { @observable balance = 0; - @action setEncryptedWallet = (wallet) => { + @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; } @@ -20,7 +20,7 @@ class UserStore { * @param password password for decoding * @return {bool} is password correct */ - @action checkPassword = (password) => { + @action checkPassword(password) { walletService.checkPassword(this.encryptedWallet, password); } @@ -31,7 +31,7 @@ class UserStore { * @param {string} password password which was used to encode Keystore V3 * @return Signed TX data */ - @action singTransaction = (data, password) => { + @action singTransaction(data, password) { } @@ -40,15 +40,15 @@ class UserStore { * @function * @param {string} txData Raw transaction */ - @action sendTransaction = (txData) => { + @action sendTransaction(txData) { - }; + } /** * Getting user Ethereum balance * @return {number} balance in ETH */ - @action getEthBalance = () => { + @action getEthBalance() { this.balance = 0; return false; } From fa4001e8367faf621d02bbe29b3ad59c56e88210 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 09:00:21 +0700 Subject: [PATCH 040/219] added methods to contract service --- .../ContractService/ContractService.js | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index c9008ec7..5329158d 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -25,6 +25,53 @@ class ContractService { const data = await this.contract.methods[method](...params).call({ from }); return data; } + + /** + * getting one question + * @param {number} id id of question + * @param {string} from address who calls method + */ + async fetchQuestion(id, from) { + const data = await this.contract.methods.getQuestion(id).call({ from }); + return data; + } + + /** + * getting one voting + * @param {number} id id of voting + * @param {string} from address who calls method + */ + async fetchVoting(id, from) { + const data = await this.contract.methods.getVoting(...params).call({ from }); + return data; + } + + /** + * getting votes weights for voting + * @param {number} id id of voting + * @param {string} from address, who calls + */ + async fetchVotingStats(id, from) { + const data = await this.contract.methods.getVotingStats(...params).call({ from }); + return data; + } + + /** + * Starting the voting + * @param {id} id id of question + * @param {string} from address, who starts + * @param params parameters of voting + */ + async startVoting(id, from, params) { + + } + + /** + * Finishes the voting + */ + async finishVoting() { + + } } export default ContractService; From 44dcf87e3724e460e8c5c4db909c00e7d54e21ad Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:49:36 +0700 Subject: [PATCH 041/219] Added electron wrapper --- src/electron.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/electron.js diff --git a/src/electron.js b/src/electron.js new file mode 100644 index 00000000..4911ed7f --- /dev/null +++ b/src/electron.js @@ -0,0 +1,40 @@ + +const { app, BrowserWindow } = require('electron'); +const electronLocalshortcut = require('electron-localshortcut'); +const isDev = require('electron-is-dev'); + + +const path = require('path'); + +let mainWindow; + +function createWindow() { + mainWindow = new BrowserWindow({ + useContentSize: true, + minWidth: 1280, + minHeight: 720, + width: 1280, + height: 720, + }); + mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, './build/ballot/index.html')}`); + mainWindow.on('closed', () => mainWindow = null); + + electronLocalshortcut.register(mainWindow, 'F12', () => { + mainWindow.webContents.toggleDevTools(); + }); +} + + +app.on('ready', createWindow); + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit(); + } +}); + +app.on('activate', () => { + if (mainWindow === null) { + createWindow(); + } +}); From 4f9f40f9eb3a1fd2879c0c3000fa1dc9cc5f48bd Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:49:55 +0700 Subject: [PATCH 042/219] Added simple router --- src/components/Router/SimpleRouter.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/components/Router/SimpleRouter.js diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js new file mode 100644 index 00000000..693e2882 --- /dev/null +++ b/src/components/Router/SimpleRouter.js @@ -0,0 +1,15 @@ +import React from 'react'; +import { + MemoryRouter, Route, Switch, withRouter, +} from 'react-router-dom'; + +import Login from '../Login'; + +const SimpleRouter = () => ( + + + + + +); +export default SimpleRouter; From 5f4e4c6d16518ea139ef96ade3877b174b58af70 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:50:20 +0700 Subject: [PATCH 043/219] Added header component --- src/components/Header/Header.scss | 24 ++++++++++++++++++++++++ src/components/Header/HeaderNav/index.js | 14 ++++++++++++++ src/components/Header/index.js | 24 ++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 src/components/Header/Header.scss create mode 100644 src/components/Header/HeaderNav/index.js create mode 100644 src/components/Header/index.js diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss new file mode 100644 index 00000000..e70f16d9 --- /dev/null +++ b/src/components/Header/Header.scss @@ -0,0 +1,24 @@ +@import '../../assets/styles/partials/variables'; + +.header { + position: absolute; + top: 30px; + left: 50%; + display: flex; + flex-flow: row nowrap; + align-items:center; + justify-content: space-between; + width: 100%; + max-width: 1120px; + transform: translateX(-50%); + &__nav { + color: $primary; + } + &__link { + margin: 0 30px; + transition: .2s linear; + &.active{ + font-weight: bold; + } + } +} \ No newline at end of file diff --git a/src/components/Header/HeaderNav/index.js b/src/components/Header/HeaderNav/index.js new file mode 100644 index 00000000..00e959bc --- /dev/null +++ b/src/components/Header/HeaderNav/index.js @@ -0,0 +1,14 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + +const HeaderNav = () => ( + +); + +export default HeaderNav; diff --git a/src/components/Header/index.js b/src/components/Header/index.js new file mode 100644 index 00000000..f27bc580 --- /dev/null +++ b/src/components/Header/index.js @@ -0,0 +1,24 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import Logo from '../Logo'; +import LangSwitcher from '../LangSwitcher'; +import User from '../User'; + +import styles from './Header.scss'; +import HeaderNav from './HeaderNav'; + +const Header = ({ isMenu, isLogged }) => ( +
+ + {isMenu ? : ''} +
+ + {isLogged ? : ''} +
+
+); +Header.propTypes = { + isMenu: propTypes.bool.isRequired, + isLogged: propTypes.bool.isRequired, +}; +export default Header; From 7f5b2cb85eb3f91fba99551812b1a9dede6ff422 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:50:39 +0700 Subject: [PATCH 044/219] Added Container component --- src/components/Container/Container.scss | 4 ++++ src/components/Container/index.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/components/Container/Container.scss create mode 100644 src/components/Container/index.js diff --git a/src/components/Container/Container.scss b/src/components/Container/Container.scss new file mode 100644 index 00000000..070e7e15 --- /dev/null +++ b/src/components/Container/Container.scss @@ -0,0 +1,4 @@ +.container { + position: relative; + background-color: #E5E5E5; +} \ No newline at end of file diff --git a/src/components/Container/index.js b/src/components/Container/index.js new file mode 100644 index 00000000..05e8d913 --- /dev/null +++ b/src/components/Container/index.js @@ -0,0 +1,14 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import styles from './Container.scss'; + +const Container = ({ children }) => ( +
+ {children} +
+); + +Container.propTypes = { + children: propTypes.node.isRequired, +}; +export default Container; From 6d409cab65e89f8600594fb62f65384e2acb3353 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:51:03 +0700 Subject: [PATCH 045/219] Removed unnecessary app file --- src/App.js | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/App.js diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 9c1b7317..00000000 --- a/src/App.js +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { - Button, -} from './components/Button'; -import Input from './components/Input'; -import { - Password, CreditCard, -} from './components/Icons'; -import LangSwitcher from './components/LangSwitcher'; -import Dropdown from './components/Dropdown'; -import Explanation from './components/Explanation'; -import Logo from './components/Logo'; -import Heading from './components/Heading'; - -const options = [ - { label: '0x295856bcf02b2017607e4f61cfc1573fd05d511f', value: '1' }, - { label: '0xfffffffffffffffffffffffffffffff', value: '2' }, - { label: '0x00000000000000000000000000', value: '3' }, -]; - -const App = () => ( -
-

Прувет

- - - - - - - - - - - - Sunt commodo ea est magna duis duis. Id exercitation minim duis nostrud anim - non commodo labore aliquip est laborum. - Aliqua non fugiat id consectetur. - Amet reprehenderit exercitation adipisicing sint minim et mollit veniam duis - et aliqua dolor sint. - Dolore non non ea et id nostrud mollit do pariatur do aute consectetur fugiat sint. - Laborum officia aliquip ut aliquip officia proident occaecat amet labore deserunt. - Mollit voluptate ullamco exercitation aliquip enim ullamco est ad ex sit - proident proident laborum. - - - - - {'Заголовок'} - {'Nulla sit minim laboris excepteur.'} - -
-); -export default App; From b1513dbdc0abeaaf09dfe8bf4ce7667f70106234 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:51:35 +0700 Subject: [PATCH 046/219] Added login component --- src/components/Login/Login.scss | 0 src/components/Login/index.js | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/components/Login/Login.scss create mode 100644 src/components/Login/index.js diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/components/Login/index.js b/src/components/Login/index.js new file mode 100644 index 00000000..d115fc9e --- /dev/null +++ b/src/components/Login/index.js @@ -0,0 +1,21 @@ +import React, { Component } from 'react'; +import Container from '../Container'; +import Header from '../Header'; + +class Login extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + render() { + return ( + +
+
+ + ); + } +} + +export default Login; From 3781456519c10193945af6bf64f6c3dec5fddcf3 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 11:51:41 +0700 Subject: [PATCH 047/219] Fixes --- package-lock.json | 721 +++++++++++------- package.json | 5 +- src/assets/styles/style.scss | 5 +- src/components/LangSwitcher/LangSwitcher.scss | 1 + src/components/Logo/Logo.scss | 4 +- src/index.js | 7 +- 6 files changed, 461 insertions(+), 282 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9fc4753..f8b18ec9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1013,6 +1013,21 @@ "ajv-keywords": "^3.1.0" } }, + "@electron/get": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.6.0.tgz", + "integrity": "sha512-xuvAzbN9iBApfAMvW0hKUpxHR5wPVbG9RaoSTbpu/WaHISDu0MVfMWYhfeU0X730CpBV0G2RkLgwAs9WDan3GA==", + "requires": { + "debug": "^4.1.1", + "env-paths": "^2.2.0", + "fs-extra": "^8.1.0", + "global-agent": "^2.0.2", + "global-tunnel-ng": "^2.7.1", + "got": "^9.6.0", + "sanitize-filename": "^1.6.2", + "sumchecker": "^3.0.0" + } + }, "@emotion/cache": { "version": "10.0.19", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-10.0.19.tgz", @@ -1136,6 +1151,45 @@ "integrity": "sha512-6PYY5DVdAY1ifaQW6XYTnOMihmBVT27elqSjEoodchsGjzYlEsTQMcEhSud99kVawatyTZRTiVkJ/c6lwbQ7nA==", "dev": true }, + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==", + "dev": true + }, + "@hapi/bourne": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", + "dev": true + }, + "@hapi/hoek": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.2.tgz", + "integrity": "sha512-NP5SG4bzix+EtSMtcudp8TvI0lB46mXNo8uFpTDw6tqxGx4z5yx+giIunEFA0Z7oUO4DuWrOJV9xqR2tJVEdyA==", + "dev": true + }, + "@hapi/joi": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", + "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", + "dev": true, + "requires": { + "@hapi/address": "2.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/topo": "3.x.x" + } + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + } + }, "@jest/console": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", @@ -1421,8 +1475,7 @@ "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" }, "@storybook/addons": { "version": "5.2.4", @@ -2088,7 +2141,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, "requires": { "defer-to-connect": "^1.0.1" } @@ -4015,6 +4067,12 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, + "boolean": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-2.0.2.tgz", + "integrity": "sha512-ymsbJQlux/uogyEWfsXJUYzuyoOzPyp6NvEV71s6/ptQR7ptKO9uHF+WZL2GRATDeN52EFhNyrIu+exNZKh3Cw==", + "optional": true + }, "boxen": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", @@ -4360,7 +4418,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, "requires": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -4375,7 +4432,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, "requires": { "pump": "^3.0.0" } @@ -4383,8 +4439,7 @@ "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" } } }, @@ -4813,7 +4868,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -4963,6 +5017,174 @@ "typedarray": "^0.0.6" } }, + "concurrently": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.0.0.tgz", + "integrity": "sha512-1yDvK8mduTIdxIxV9C60KoiOySUl/lfekpdbI+U5GXaPrgdffEavFa9QZB3vh68oWOpbCC+TuvxXV9YRPMvUrA==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "date-fns": "^2.0.1", + "lodash": "^4.17.15", + "read-pkg": "^4.0.1", + "rxjs": "^6.5.2", + "spawn-command": "^0.0.2-1", + "supports-color": "^4.5.0", + "tree-kill": "^1.2.1", + "yargs": "^12.0.5" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "dev": true, + "requires": { + "normalize-package-data": "^2.3.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "optional": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "configstore": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", @@ -5546,6 +5768,12 @@ } } }, + "date-fns": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.6.0.tgz", + "integrity": "sha512-F55YxqRdEfP/eYQmQjLN798v0AwLjmZ8nMBjdQvNwEE3N/zWVrlkkqT+9seBlPlsbkybG4JmWg3Ee3dIV9BcGQ==", + "dev": true + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -5588,7 +5816,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -5636,8 +5863,7 @@ "defer-to-connect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.0.2.tgz", - "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==", - "dev": true + "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==" }, "define-properties": { "version": "1.1.3", @@ -6039,8 +6265,7 @@ "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" }, "duplexify": { "version": "3.7.1", @@ -6075,22 +6300,13 @@ "dev": true }, "electron": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/electron/-/electron-6.0.12.tgz", - "integrity": "sha512-70ODZa1RP6K0gE9IV9YLCXPSyhLjXksCuYSSPb3MljbfwfHo5uE6X0CGxzm+54YuPdE2e7EPnWZxOOsJYrS5iQ==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-7.0.0.tgz", + "integrity": "sha512-vrF1loRW1p0vQCbduqO0EZpo8ePJOuxUT6tSoUSU3lsbGK3VnlJop+0PpCIPzbe2K4G4Gk7WexH08V9se7mJcA==", "requires": { - "@types/node": "^10.12.18", - "electron-download": "^4.1.0", + "@electron/get": "^1.0.1", + "@types/node": "^12.0.12", "extract-zip": "^1.0.3" - }, - "dependencies": { - "@types/node": { - "version": "10.14.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.22.tgz", - "integrity": "sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==", - "dev": true - } } }, "electron-builder": { @@ -6242,40 +6458,6 @@ } } }, - "electron-download": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", - "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", - "dev": true, - "requires": { - "debug": "^3.0.0", - "env-paths": "^1.0.0", - "fs-extra": "^4.0.1", - "minimist": "^1.2.0", - "nugget": "^2.0.1", - "path-exists": "^3.0.0", - "rc": "^1.2.1", - "semver": "^5.4.1", - "sumchecker": "^2.0.2" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, "electron-is-accelerator": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz", @@ -6444,10 +6626,9 @@ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" }, "env-paths": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", - "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" }, "enzyme": { "version": "3.10.0", @@ -6570,6 +6751,12 @@ "integrity": "sha512-xi6hh6gsvDE0MaW4Vp1lgNEBpVcCXRWfPXj5egDvtgLz4L9MEvNwYEMdJH+JJinWkwa8c3c3o5HduV7dB/e1Hw==", "dev": true }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "optional": true + }, "es6-shim": { "version": "0.35.5", "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz", @@ -7434,7 +7621,6 @@ "version": "1.6.7", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", - "dev": true, "requires": { "concat-stream": "1.6.2", "debug": "2.6.9", @@ -7446,7 +7632,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -7454,8 +7639,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -7547,7 +7731,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, "requires": { "pend": "~1.2.0" } @@ -7843,12 +8026,11 @@ } }, "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } @@ -8539,6 +8721,35 @@ "process": "^0.11.10" } }, + "global-agent": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.5.tgz", + "integrity": "sha512-pYJjCxxNBzYxo6iNO62JZn8iCFVbvpiM0zE4w/G5hBNIvLjnvzIeCVQPMKc3aK8ju5L7Q8NNI/oBSosU0eeSYw==", + "optional": true, + "requires": { + "boolean": "^2.0.2", + "core-js": "^3.3.3", + "es6-error": "^4.1.1", + "matcher": "^2.0.0", + "roarr": "^2.14.2", + "semver": "^6.3.0", + "serialize-error": "^5.0.0" + }, + "dependencies": { + "core-js": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.5.tgz", + "integrity": "sha512-0J3K+Par/ZydhKg8pEiTcK/9d65/nqJOzY62uMkjeBmt05fDOt/khUVjDdh8TpeIuGQDy1yLDDCjiWN/8pFIuw==", + "optional": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "optional": true + } + } + }, "global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", @@ -8581,6 +8792,18 @@ "which": "^1.2.14" } }, + "global-tunnel-ng": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", + "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", + "optional": true, + "requires": { + "encodeurl": "^1.0.2", + "lodash": "^4.17.10", + "npm-conf": "^1.1.3", + "tunnel": "^0.0.6" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -8590,7 +8813,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.0.tgz", "integrity": "sha512-vcCAZTJ3r5Qcu5l8/2oyVdoFwxKgfYnMTR2vwWeux/NAVZK3PwcMaWkdUIn4GJbmKuRK7xcvDsLuK+CKcXyodg==", - "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", @@ -8654,7 +8876,6 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -9016,8 +9237,7 @@ "http-cache-semantics": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", - "dev": true + "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" }, "http-deceiver": { "version": "1.2.7", @@ -10663,8 +10883,7 @@ "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" }, "json-parse-better-errors": { "version": "1.0.2", @@ -10691,8 +10910,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json3": { "version": "3.3.3", @@ -10711,7 +10929,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -10762,7 +10979,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, "requires": { "json-buffer": "3.0.0" } @@ -11060,8 +11276,7 @@ "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, "lowlight": { "version": "1.9.2", @@ -11190,6 +11405,23 @@ "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, + "matcher": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.0.0.tgz", + "integrity": "sha512-nlmfSlgHBFx36j/Pl/KQPbIaqE8Zf0TqmSMjsuddHDg6PMSVgmyW9HpkLs0o0M1n2GIZ/S2BZBLIww/xjhiGng==", + "optional": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "optional": true + } + } + }, "mathml-tag-names": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz", @@ -11430,8 +11662,7 @@ "mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" }, "min-document": { "version": "2.19.0", @@ -11947,8 +12178,25 @@ "normalize-url": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", - "dev": true + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + }, + "npm-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "optional": true, + "requires": { + "config-chain": "^1.1.11", + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "optional": true + } + } }, "npm-run-path": { "version": "2.0.2", @@ -11979,38 +12227,6 @@ "boolbase": "~1.0.0" } }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "dev": true, - "requires": { - "debug": "^2.1.3", - "minimist": "^1.1.0", - "pretty-bytes": "^1.0.2", - "progress-stream": "^1.1.0", - "request": "^2.45.0", - "single-line-log": "^1.1.2", - "throttleit": "0.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", @@ -12299,8 +12515,7 @@ "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" }, "p-defer": { "version": "1.0.0", @@ -12556,8 +12771,7 @@ "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, "performance-now": { "version": "2.1.0", @@ -12940,18 +13154,7 @@ "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - } + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, "pretty-error": { "version": "2.1.1", @@ -13020,67 +13223,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "progress-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", - "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", - "dev": true, - "requires": { - "speedometer": "~0.1.2", - "through2": "~0.2.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", - "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9", - "xtend": "~2.1.1" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -13157,6 +13299,12 @@ "xtend": "^4.0.1" } }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "optional": true + }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -14475,7 +14623,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, "requires": { "lowercase-keys": "^1.0.0" } @@ -14526,6 +14673,28 @@ "inherits": "^2.0.1" } }, + "roarr": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.14.2.tgz", + "integrity": "sha512-ibqv70DCUhGVMfPe0JSUHBZ9PKLhxdk8VJ/Y2M7vVr+L4VakW1CdVTU9cJQBbM2STQa84CgBAzd7hJGcnALGeg==", + "optional": true, + "requires": { + "boolean": "^2.0.2", + "detect-node": "^2.0.4", + "globalthis": "^1.0.0", + "json-stringify-safe": "^5.0.1", + "semver-compare": "^1.0.0", + "sprintf-js": "^1.1.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "optional": true + } + } + }, "rst-selector-parser": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", @@ -14559,6 +14728,12 @@ "aproba": "^1.1.1" } }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, "rxjs": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", @@ -14607,7 +14782,6 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", - "dev": true, "requires": { "truncate-utf8-bytes": "^1.0.0" } @@ -14726,6 +14900,12 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "optional": true + }, "semver-diff": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", @@ -14777,6 +14957,23 @@ } } }, + "serialize-error": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-5.0.0.tgz", + "integrity": "sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==", + "optional": true, + "requires": { + "type-fest": "^0.8.0" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "optional": true + } + } + }, "serialize-javascript": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", @@ -15001,37 +15198,6 @@ "simplebar": "^4.2.3" } }, - "single-line-log": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", - "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", - "dev": true, - "requires": { - "string-width": "^1.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, "sisteransi": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.3.tgz", @@ -15262,6 +15428,12 @@ "integrity": "sha512-UyhMSmeIqZrQn2UdjYpxEkwY9JUrn8pP+7L4f91zRzOQuI8MF1FGLfYU9DKCYeLdo7LXMxwrX5zKFy7eeeVHuA==", "dev": true }, + "spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", + "dev": true + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -15332,12 +15504,6 @@ "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==" }, - "speedometer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", - "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=", - "dev": true - }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -16055,29 +16221,11 @@ } }, "sumchecker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz", - "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz", + "integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==", "requires": { - "debug": "^2.2.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "debug": "^4.1.0" } }, "supports-color": { @@ -16459,12 +16607,6 @@ "integrity": "sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg==", "dev": true }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -16556,8 +16698,7 @@ "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" }, "to-regex": { "version": "3.0.2", @@ -16623,6 +16764,12 @@ "punycode": "^2.1.0" } }, + "tree-kill": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "dev": true + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -16657,7 +16804,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", - "dev": true, "requires": { "utf8-byte-length": "^1.0.1" } @@ -16684,6 +16830,12 @@ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "optional": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -16927,8 +17079,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unpipe": { "version": "1.0.0", @@ -17079,7 +17230,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, "requires": { "prepend-http": "^2.0.0" } @@ -17092,8 +17242,7 @@ "utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", - "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=", - "dev": true + "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=" }, "util": { "version": "0.11.1", @@ -17285,6 +17434,27 @@ "browser-process-hrtime": "^0.1.2" } }, + "wait-on": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-3.3.0.tgz", + "integrity": "sha512-97dEuUapx4+Y12aknWZn7D25kkjMk16PbWoYzpSdA8bYpVfS6hpl2a2pOWZ3c+Tyt3/i4/pglyZctG3J4V1hWQ==", + "dev": true, + "requires": { + "@hapi/joi": "^15.0.3", + "core-js": "^2.6.5", + "minimist": "^1.2.0", + "request": "^2.88.0", + "rx": "^4.1.0" + }, + "dependencies": { + "core-js": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", + "dev": true + } + } + }, "walker": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", @@ -18128,7 +18298,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "dev": true, "requires": { "fd-slicer": "~1.0.1" } diff --git a/package.json b/package.json index f1560d70..27bbe6f8 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "render-test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", + "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", "storybook": "start-storybook", "docs": "jsdoc -c ./jsdoc.json" }, @@ -16,6 +17,7 @@ "@babel/preset-react": "^7.6.3", "@babel/preset-stage-0": "^7.0.0", "@namics/stylelint-bem": "^6.1.0", + "electron": "^7.0.0", "electron-is-dev": "^1.1.0", "electron-localshortcut": "^3.1.0", "mobx": "^5.14.2", @@ -40,9 +42,9 @@ "babel-loader": "^8.0.6", "better-docs": "^1.3.3", "clean-webpack-plugin": "^3.0.0", + "concurrently": "^5.0.0", "copy-webpack-plugin": "^5.0.4", "css-loader": "^3.2.0", - "electron": "^6.0.12", "electron-builder": "^21.2.0", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", @@ -58,6 +60,7 @@ "node-sass": "^4.12.0", "sass-loader": "^8.0.0", "style-loader": "^1.0.0", + "wait-on": "^3.3.0", "webpack-cli": "^3.3.9", "worker-loader": "^2.0.0" }, diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index a6a9f246..2a095fef 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -8,7 +8,10 @@ font-weight: 400; font-family: "Grotesk"; } - +a { + color: inherit; + text-decoration: none; +} ::-webkit-scrollbar-thumb { border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index befc8036..ef2495da 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -32,6 +32,7 @@ } } &__options { + position: absolute; display: inline-block; padding: 5px 10px; border: 1px solid $border; diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss index 9e1bdc43..eebeb9b3 100644 --- a/src/components/Logo/Logo.scss +++ b/src/components/Logo/Logo.scss @@ -3,14 +3,14 @@ .logo { position: relative; display: inline-block; - border: 2px solid $primary; + border: 3px solid $primary; span{ display: inline-block; vertical-align: middle; transition: 0.2s linear; } &__dark { - padding: 4px 5px; + padding: 3.5px 5px; color: $white; font-size: 32px; background-color: $primary; diff --git a/src/index.js b/src/index.js index eb80d7e5..2e0e128c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ import React from 'react'; import { render } from 'react-dom'; -import App from './App'; +import { Provider } from 'mobx-react'; +import SimpleRouter from './components/Router/SimpleRouter'; import './assets/styles/style.scss'; /** @@ -10,6 +11,8 @@ import './assets/styles/style.scss'; */ render( - , + + + , document.getElementById('root'), ); From 5af32ab66cfe6007a1a43430bd074825c8f4387d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:06:03 +0700 Subject: [PATCH 048/219] Fixes for possibility launch the app --- src/services/ContractService/ContractService.js | 8 ++++---- src/services/WalletService/WalletService.js | 12 ++++++------ src/services/Web3Service/Web3Service.js | 14 +++----------- src/stores/AppStore/AppStore.js | 15 +++++++++++---- src/stores/HistoryStore/HistoryStore.js | 12 +++++------- src/stores/ProjectStore/ProjectStore.js | 1 + src/stores/QuestionStore/QuestionStore.js | 6 ++---- src/stores/RootStore/RootStore.js | 12 +++++++++--- src/stores/RootStore/index.js | 4 ++-- src/stores/UserStore/UserStore.js | 8 +++++--- src/stores/UsergroupStore/UsergroupStore.js | 6 ++++-- 11 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 5329158d..39942746 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -42,7 +42,7 @@ class ContractService { * @param {string} from address who calls method */ async fetchVoting(id, from) { - const data = await this.contract.methods.getVoting(...params).call({ from }); + const data = await this.contract.methods.getVoting(id).call({ from }); return data; } @@ -52,7 +52,7 @@ class ContractService { * @param {string} from address, who calls */ async fetchVotingStats(id, from) { - const data = await this.contract.methods.getVotingStats(...params).call({ from }); + const data = await this.contract.methods.getVotingStats(id).call({ from }); return data; } @@ -63,14 +63,14 @@ class ContractService { * @param params parameters of voting */ async startVoting(id, from, params) { - + return (this, id, from, params); } /** * Finishes the voting */ async finishVoting() { - + return this; } } diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 11b83c68..009dab56 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -7,7 +7,7 @@ class WalletService { * @returns {object} Wallet instance */ readWalletFromFile(url, password) { - + return (this, url, password); } /** @@ -16,7 +16,7 @@ class WalletService { * @return {bool} write status: 1 - success, 2 - error */ writeWalletToFile(encryptedWallet) { - + return (this, encryptedWallet); } /** @@ -25,7 +25,7 @@ class WalletService { * @returns {object} encryptedWallet,seed */ createWallet(password) { - + return (this, password); } /** @@ -34,7 +34,7 @@ class WalletService { * @returns {object} wallet object */ recoverWallet(mnemonic) { - + return (this, mnemonic); } /** @@ -44,7 +44,7 @@ class WalletService { * @return {bool} is password correct */ checkPassword(wallet, password) { - + return (this, wallet, password); } } -export default walletService; +export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 18260c47..d8474518 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -9,12 +9,8 @@ class web3Service { */ constructor(providerUrl) { this.web3 = new Web3(); - this.provider = ''; + this.provider = providerUrl; this.address2nonce = {}; - this.createProvider(providerUrl) - .then((provider) => { - this.setProvider(provider); - }).catch((e) => new Error('web3 error: createProvider', e)); } /** @@ -23,11 +19,7 @@ class web3Service { * @return {Promise} this.web3 provider instance */ createProvider(url) { - return new Promise((resolve, reject) => { - if (!url) reject(new Error('No provider specified')); - const provider = new WebsocketProvider(url); - resolve(provider); - }); + return (this.address2nonce, url); } /** @@ -45,7 +37,7 @@ class web3Service { * @param {string} from User, who send transaction * @return {Promise} promise with web3 transaction PromiEvent */ - sendSignedTransaction(txData) { + sendSignedTransaction(txData, from) { this.address2nonce[from] += 1; return this.web3.sendSignedTransaction(`0x${txData}`); } diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index a9d188fc..0ab7b820 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,8 +1,9 @@ -import { observable, action } from 'mobx'; +import { observable, action, computed } from 'mobx'; +import { fs, PATH_TO_WALLETS } from '../../constants'; class AppStore { - @observable walletList = []; + @observable walletList = {}; @observable projectList = []; @@ -11,8 +12,9 @@ class AppStore { * @function */ @action readWalletList = () => { - const wallet = ''; - this.walletList.push(wallet); + this.walletList = []; + const files = fs.readdirSync(PATH_TO_WALLETS); + return files; } /** @@ -30,6 +32,11 @@ class AppStore { @action setUserWallet = (encryptedWallet) => { this.userStore.setEncryptedWallet(encryptedWallet); } + + @computed get wallets() { + const wallets = Object.keys(this.walletList); + return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); + } } export default AppStore; diff --git a/src/stores/HistoryStore/HistoryStore.js b/src/stores/HistoryStore/HistoryStore.js index 6f67df36..e96b6627 100644 --- a/src/stores/HistoryStore/HistoryStore.js +++ b/src/stores/HistoryStore/HistoryStore.js @@ -14,9 +14,7 @@ class HistoryStore { * @param {string} address user address * @returns {number} count of votings */ - @action fetchVotingsCount = (address) => { - - } + @action fetchVotingsCount = (address) => address /** * recieving voting for local using @@ -42,7 +40,7 @@ class HistoryStore { * @param {number} id id of voting * @return {array} stats */ - @action getVotingStats = (id) => {} + @action getVotingStats = (id) => id /** * filtering voting by given parameters @@ -54,14 +52,14 @@ class HistoryStore { * @param {string} params.dateTo filter voting by endTime * @return {array} Filtered question */ - @action filterVotings = (params) => {} + @action filterVotings = (params) => params /** * @function * @return {bool} True if project have not ended voting */ @computed get isVotingActive() { - return false; + return this.votings; } /** @@ -69,7 +67,7 @@ class HistoryStore { * @return {array} list of votings */ @computed get votingsList() { - return false; + return this.votings; } } export default HistoryStore; diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index 83e3afbc..b03b79cb 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -42,6 +42,7 @@ class ProjectStore { * Bunch of code */ this.prepared = votingStates.prepared; + return (questionId, parameters); } diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 92a24634..90aef058 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -18,9 +18,7 @@ class QuestionStore { * @param {string} address user address * @returns {number} count of questions */ - @action fetchQuestionsCount = (address) => { - - } + @action fetchQuestionsCount = (address) => address /** * Recieving question from contract @@ -32,7 +30,7 @@ class QuestionStore { /** * gets the question */ - this.addQuestion(data); + this.addQuestion(); } /** diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index f082cf54..0d70a10f 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -1,4 +1,4 @@ -import { observable, action } from 'mobx'; +import { observable, action, computed } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; @@ -9,7 +9,7 @@ import ContractService from '../../services/ContractService'; class RootStore { @observable projectStore; - @observable AppStore = new AppStore(); + @observable appStore = new AppStore(); @observable userStore = new UserStore() @@ -27,5 +27,11 @@ class RootStore { @action initProject(address) { this.projectStore = new ProjectStore(address); } + + @computed get stores() { + const { appStore, userStore } = this; + return { appStore, userStore }; + } } -export default RootStore; +const rootStore = new RootStore(); +export default rootStore; diff --git a/src/stores/RootStore/index.js b/src/stores/RootStore/index.js index bb3edd25..4e9b742a 100644 --- a/src/stores/RootStore/index.js +++ b/src/stores/RootStore/index.js @@ -1,3 +1,3 @@ -import RootStore from './RootStore'; +import rootStore from './RootStore'; -export default RootStore; +export default rootStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 45f6bb19..22e0d5c4 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,9 +1,11 @@ -import { observable, action, computed } from 'mobx'; +import { observable, action } from 'mobx'; import walletService from '../../services/WalletService'; /** * Describes store with user data */ class UserStore { + @observable authorized = false; + @observable encryptedWallet = '' @observable address = ''; @@ -32,7 +34,7 @@ class UserStore { * @return Signed TX data */ @action singTransaction(data, password) { - + return (this.balance, data, password); } /** @@ -41,7 +43,7 @@ class UserStore { * @param {string} txData Raw transaction */ @action sendTransaction(txData) { - + return (this.balance, txData); } /** diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js index f6d71b86..22a8e3aa 100644 --- a/src/stores/UsergroupStore/UsergroupStore.js +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -1,4 +1,4 @@ -import { observable, action, computed } from 'mobx'; +import { observable, action } from 'mobx'; /** * class for working with userGroup */ @@ -53,6 +53,8 @@ class UsergroupStore { .then((balance) => { this.addUser(address, balance); }) */ + this.address = address; + return (this.address, address); } /** @@ -73,7 +75,7 @@ class UsergroupStore { * @param {number} count number of tokens */ @action transferTokens(from, to, count) { - + return (this.tokenType, from, to, count); } } From 7f3b07a00cd7b43f721c581c4e561f87e5143eb1 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:06:22 +0700 Subject: [PATCH 049/219] added new constants --- src/constants/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/constants/index.js b/src/constants/index.js index 7fdbda98..99888911 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -1,5 +1,18 @@ +/* eslint-disable import/prefer-default-export */ + export const votingStates = { default: 0, prepared: 1, active: 2, }; + +export const fs = window.require('fs'); +export const path = window.require('path'); + +export const PATH_TO_WALLETS = window.__ENV === 'production' + ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './wallets/') + : path.join(window.process.env.INIT_CWD, './src/wallets/'); + +export const PATH_TO_CONTRACTS = window.__ENV === 'production' + ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './contracts/') + : path.join(window.process.env.INIT_CWD, './src/contracts/'); From 189f7798ea98d1a714be83276a4c4b2d7b906306 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:06:36 +0700 Subject: [PATCH 050/219] Added workers --- src/workers/login.worker.js | 13 ++++++++ src/workers/wallet.worker.js | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 src/workers/login.worker.js create mode 100644 src/workers/wallet.worker.js diff --git a/src/workers/login.worker.js b/src/workers/login.worker.js new file mode 100644 index 00000000..2bb2f34e --- /dev/null +++ b/src/workers/login.worker.js @@ -0,0 +1,13 @@ +const ejsWallet = require('ethereumjs-wallet'); + +onmessage = async (e) => { + + const { keystore, password } = JSON.parse(e.data); + let privateKey + try { + privateKey = await ejsWallet.fromV3(keystore, password).getPrivateKeyString(); + self.postMessage({privateKey: privateKey, error: null}); + } catch (error) { + self.postMessage({error:'error', privateKey: null}); + } +} \ No newline at end of file diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js new file mode 100644 index 00000000..904a78d6 --- /dev/null +++ b/src/workers/wallet.worker.js @@ -0,0 +1,65 @@ + +const ejsWallet = require('ethereumjs-wallet'); +const hdKey = require('ethereumjs-wallet/hdkey'); +const bip39 = require('bip39') +const walletHdPath = "m/44'/60'/0'/0/0"; + +const createWallet = ({mnemonic, password, action}) => { + let wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) + .derivePath(walletHdPath) + .deriveChild(0) + .getWallet(); + + let privateKey = wallet.getPrivateKeyString(); + let v3wallet = wallet.toV3(password); + + let message = { + action, + privateKey, + wallet, + v3wallet, + } + console.log(message) + return message; +}; + +const readWallet = ({input, password}) =>{ + try { + return ejsWallet + .fromV3(input, password) + .getPrivateKeyString(); + } catch (e) { + return e; + } +} + + +onmessage = (e)=> { + + const { payload } = e.data; + const { action } = payload; + let response; + + switch (action) { + case 'create': + response = createWallet(payload); + break; + case 'read': + response = readWallet(payload); + break; + case 'recover': + response = createWallet(payload); + break; + default: + response = null + break; + } + + //console.log(response); + + if (response instanceof Error) { + response = null; + } + + self.postMessage(response); +} \ No newline at end of file From fb53484862eb5af1784bbe2a2082353b80167149 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:06:43 +0700 Subject: [PATCH 051/219] Added wallets --- ...0c7f9534e7b5fde6a4ca6b00b4ed5b958242a.json | 21 +++++++++++++++++++ ...318c39dd1c8f2ba23de1624bbd20bacf1a94a.json | 21 +++++++++++++++++++ ...40325397834dab83195b62bf17039b766cf89.json | 21 +++++++++++++++++++ ...e231fcf67b4aa9f41f902a5c5e05983e1d5f8.json | 1 + 4 files changed, 64 insertions(+) create mode 100644 src/wallets/UTC--2019-1-1T6-5-3.742000000Z--68c0c7f9534e7b5fde6a4ca6b00b4ed5b958242a.json create mode 100644 src/wallets/UTC--2019-13-2T8-11-22.760000000Z--9c8318c39dd1c8f2ba23de1624bbd20bacf1a94a.json create mode 100644 src/wallets/UTC--2019-16-5T11-0-59.880000000Z--b2040325397834dab83195b62bf17039b766cf89.json create mode 100644 src/wallets/UTC--2019-7-2T4-27-20.179000000Z--298e231fcf67b4aa9f41f902a5c5e05983e1d5f8.json diff --git a/src/wallets/UTC--2019-1-1T6-5-3.742000000Z--68c0c7f9534e7b5fde6a4ca6b00b4ed5b958242a.json b/src/wallets/UTC--2019-1-1T6-5-3.742000000Z--68c0c7f9534e7b5fde6a4ca6b00b4ed5b958242a.json new file mode 100644 index 00000000..96580a4f --- /dev/null +++ b/src/wallets/UTC--2019-1-1T6-5-3.742000000Z--68c0c7f9534e7b5fde6a4ca6b00b4ed5b958242a.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "64e03561-1a74-474b-8bfd-9206eae53988", + "address": "68c0c7f9534e7b5fde6a4ca6b00b4ed5b958242a", + "crypto": { + "ciphertext": "f6bd467b54b27b0e5729c32ababd3d763a7b38e78f1056d030b46c6154ce415b", + "cipherparams": { + "iv": "3b940ff76645df9cd3934996d0fca5a7" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "5ec5a11747e931e50fe2be4682c18225c18d794fab9253da6a4245c3b012d5e4", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "beb40dd71f9c1b5cdff29f19b7d7bde1c93235b7a1201649a068d7ff0301f6d9" + } +} \ No newline at end of file diff --git a/src/wallets/UTC--2019-13-2T8-11-22.760000000Z--9c8318c39dd1c8f2ba23de1624bbd20bacf1a94a.json b/src/wallets/UTC--2019-13-2T8-11-22.760000000Z--9c8318c39dd1c8f2ba23de1624bbd20bacf1a94a.json new file mode 100644 index 00000000..774b4894 --- /dev/null +++ b/src/wallets/UTC--2019-13-2T8-11-22.760000000Z--9c8318c39dd1c8f2ba23de1624bbd20bacf1a94a.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "6aac47b3-f4c4-4652-93a9-125587d98434", + "address": "9c8318c39dd1c8f2ba23de1624bbd20bacf1a94a", + "crypto": { + "ciphertext": "fa360f395c500b0cc6543135ff325a7fcdb2684f65a432e1e097695a86505ff2", + "cipherparams": { + "iv": "98366a2182061ceaa018c8c2978cd606" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "7cd1f163d5b6e1556431cbc5c9b85430fb550b15b03cc8c1bcbb84a913158ecc", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "7d6e87bfc4c4f3a8de96ffc9ed197360bfafcfd3440fc82eacf3d2c0a37c90bb" + } +} \ No newline at end of file diff --git a/src/wallets/UTC--2019-16-5T11-0-59.880000000Z--b2040325397834dab83195b62bf17039b766cf89.json b/src/wallets/UTC--2019-16-5T11-0-59.880000000Z--b2040325397834dab83195b62bf17039b766cf89.json new file mode 100644 index 00000000..98a1e49c --- /dev/null +++ b/src/wallets/UTC--2019-16-5T11-0-59.880000000Z--b2040325397834dab83195b62bf17039b766cf89.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "ea44d129-2153-4498-b3bf-91d5ee474443", + "address": "b2040325397834dab83195b62bf17039b766cf89", + "crypto": { + "ciphertext": "dfaf1c06b7d0c74a8baef39c910c3a16b493196de0f9476c1a0c3cde35d74df0", + "cipherparams": { + "iv": "2305d3658ee1fc9377e5b67319c5b90b" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "f94cf5469e294ae06a41ffc4389cf09c9f63dba4be0267f7fafbeb0dd91d972d", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "8d2529955c4c649d95dfaae49d8632a11b6abf6c89c66dd12dc2b87e1cb93712" + } +} \ No newline at end of file diff --git a/src/wallets/UTC--2019-7-2T4-27-20.179000000Z--298e231fcf67b4aa9f41f902a5c5e05983e1d5f8.json b/src/wallets/UTC--2019-7-2T4-27-20.179000000Z--298e231fcf67b4aa9f41f902a5c5e05983e1d5f8.json new file mode 100644 index 00000000..58e8ece9 --- /dev/null +++ b/src/wallets/UTC--2019-7-2T4-27-20.179000000Z--298e231fcf67b4aa9f41f902a5c5e05983e1d5f8.json @@ -0,0 +1 @@ +{"version":3,"id":"aed48d31-3fca-416c-b447-4caa56e96bd6","address":"298e231fcf67b4aa9f41f902a5c5e05983e1d5f8","crypto":{"ciphertext":"50afcb1841086a14b91d67a3a9716299a22e71d656e8df63f2f656051426cae3","cipherparams":{"iv":"add6992cb6ec386cd91f329ce7575401"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"3559497243cf424c4cdcf9800add95e5a99a58377b2d02f86bc83671a46f4798","n":262144,"r":8,"p":1},"mac":"f3af3424826a6ea75f549c5261a719e28c5bb8895e3f779c2fae8f34369afb2d"}} \ No newline at end of file From 24bdba3f70028ba4cd4018ab4247b085bec397ab Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:07:11 +0700 Subject: [PATCH 052/219] enabled node integration for fs module --- src/electron.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/electron.js b/src/electron.js index 4911ed7f..3e564bd0 100644 --- a/src/electron.js +++ b/src/electron.js @@ -15,6 +15,9 @@ function createWindow() { minHeight: 720, width: 1280, height: 720, + webPreferences: { + nodeIntegration: true, + }, }); mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, './build/ballot/index.html')}`); mainWindow.on('closed', () => mainWindow = null); From df9689aa15ff9851eb5b00e66818a6242c12f078 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:07:34 +0700 Subject: [PATCH 053/219] Removed unnecessary comment --- src/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index 2e0e128c..4fd31a37 100644 --- a/src/index.js +++ b/src/index.js @@ -3,15 +3,12 @@ import { render } from 'react-dom'; import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import './assets/styles/style.scss'; +import rootStore from './stores/RootStore'; -/** - * Represents a book. - * @param {string} title - The title of the book. - * @param {string} author - The author of the book. - */ - +const { stores } = rootStore; render( - + // eslint-disable-next-line react/jsx-props-no-spreading + , document.getElementById('root'), From 1df984b056e65f0a12319c34e846e2138464e023 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:08:01 +0700 Subject: [PATCH 054/219] Small styles fixe --- src/assets/styles/style.scss | 3 +++ src/components/Button/Button.scss | 2 +- src/components/Button/index.js | 10 ++++++---- src/components/Dropdown/Dropdown.scss | 2 ++ src/components/Dropdown/index.js | 1 - src/components/Header/Header.scss | 14 +++++++++++++- src/components/Header/index.js | 3 ++- src/components/Input/Input.scss | 1 + 8 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 2a095fef..ed2474fc 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -8,6 +8,9 @@ font-weight: 400; font-family: "Grotesk"; } +body { + background-color: #FAFBFC; +} a { color: inherit; text-decoration: none; diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index da411a83..f8cd1f84 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -28,7 +28,7 @@ } &--default { min-width: 232px; - padding: 18px 0; + padding: 16px 0; font-size: 12px; } &--small { diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 451cec13..5ff192bc 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -2,8 +2,8 @@ import React from 'react'; import propTypes from 'prop-types'; import styles from './Button.scss'; -export const Button = ({ children, className }) => ( - + + + + + + + Назад + + + + + + + ); + } +} + +CreateWallet.propTypes = {}; + +export default CreateWallet; diff --git a/src/components/FormBlock/index.js b/src/components/FormBlock/index.js new file mode 100644 index 00000000..1e419fd7 --- /dev/null +++ b/src/components/FormBlock/index.js @@ -0,0 +1,13 @@ +import React from 'react'; +import propTypes from 'prop-types'; + +const FormBlock = ({ children }) => ( +
+ {children} +
+); +FormBlock.propTypes = { + children: propTypes.node.isRequired, +}; + +export default FormBlock; diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index e69de29b..3347986e 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -0,0 +1,42 @@ +@import '../../assets/styles/partials/variables'; +.form { + position: absolute; + top: 50%; + left: 50%; + width: 500px; + background-color: $white; + border: 1px solid $lightGrey; + transform: translate(-50%, -50%); + &__block { + padding: 60px 90px; + text-align: center; + .heading { + margin-bottom: 60px; + } + .dropdown { + width: 100%; + margin: 10px 0; + } + .field { + width: 100%; + margin: 10px 0; + } + .btn { + display: block; + margin: 10px auto; + &--default { + width: 100%; + margin: 20px 0; + } + } + } + &__submit { + text-align: center; + } + .btn--back { + position: absolute; + bottom: -40px; + left: 50%; + transform: translateX(-50%); + } +} \ No newline at end of file diff --git a/src/components/Login/index.js b/src/components/Login/index.js index d115fc9e..b2c1b07d 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -1,21 +1,71 @@ import React, { Component } from 'react'; +import { observer, inject } from 'mobx-react'; +import propTypes from 'prop-types'; +import { NavLink } from 'react-router-dom'; import Container from '../Container'; import Header from '../Header'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Dropdown from '../Dropdown'; +import { CreditCard, Password } from '../Icons'; +import Input from '../Input'; +import { Button } from '../Button'; +import styles from './Login.scss'; + + +@inject('userStore', 'appStore') +@observer class Login extends Component { constructor(props) { super(props); this.state = {}; } + componentDidMount() { + const { appStore } = this.props; + appStore.readWalletList(); + } + render() { + const { appStore } = this.props; return ( -
-
+
+
+ + + {'Вход в систему'} + {'Приготовьтесь к новой эре в сфере голосования'} + + + + + + + +
+ + + + + + + +
+
+
); } } +Login.propTypes = { + appStore: propTypes.shape({ + readWalletList: propTypes.func.isRequired, + wallets: propTypes.arrayOf(propTypes.object).isRequired, + }).isRequired, + +}; + export default Login; diff --git a/src/components/RequiredAuthorization/index.js b/src/components/RequiredAuthorization/index.js new file mode 100644 index 00000000..f3ea6606 --- /dev/null +++ b/src/components/RequiredAuthorization/index.js @@ -0,0 +1,21 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import { observer, inject } from 'mobx-react'; +import { Redirect } from 'react-router-dom'; + +@inject('userStore') @observer +class RequiredAuthorization extends React.Component { + render() { + const { props } = this; + const { userStore, children } = props; + if (!userStore.authorized) return ; + return children; + } +} + +RequiredAuthorization.propTypes = { + children: propTypes.node.isRequired, + userStore: propTypes.oneOfType([propTypes.object]).isRequired, +}; + +export default RequiredAuthorization; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 693e2882..c92d822d 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -4,11 +4,13 @@ import { } from 'react-router-dom'; import Login from '../Login'; +import CreateWallet from '../CreateWallet'; const SimpleRouter = () => ( + ); From b9453a0d73b651218fd79f8d132c760238c6727d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:08:28 +0700 Subject: [PATCH 056/219] Added web3 --- package-lock.json | 1462 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 3 +- 2 files changed, 1387 insertions(+), 78 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8b18ec9..4ebfac79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2207,6 +2207,14 @@ "@types/babel-types": "*" } }, + "@types/bn.js": { + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.5.tgz", + "integrity": "sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng==", + "requires": { + "@types/node": "*" + } + }, "@types/debug": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", @@ -2668,6 +2676,11 @@ "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", "dev": true }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, "airbnb-js-shims": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/airbnb-js-shims/-/airbnb-js-shims-2.2.0.tgz", @@ -2835,6 +2848,11 @@ "entities": "^1.1.2" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -3060,7 +3078,6 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -3102,8 +3119,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assign-symbols": { "version": "1.0.0", @@ -3160,8 +3176,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { "version": "2.1.2", @@ -3185,14 +3200,12 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "axobject-query": { "version": "2.0.2", @@ -3948,7 +3961,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -3978,6 +3990,31 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -4236,6 +4273,15 @@ "randombytes": "^2.0.1" } }, + "browserify-sha3": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", + "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", + "requires": { + "js-sha3": "^0.6.1", + "safe-buffer": "^5.1.1" + } + }, "browserify-sign": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", @@ -4287,6 +4333,30 @@ "isarray": "^1.0.0" } }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -4297,6 +4367,11 @@ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -4532,8 +4607,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "catharsis": { "version": "0.8.11", @@ -4932,7 +5006,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -5295,6 +5368,11 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -5460,6 +5538,15 @@ } } }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "cosmiconfig": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", @@ -5729,6 +5816,15 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "damerau-levenshtein": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", @@ -5739,7 +5835,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -5812,6 +5907,38 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "decompress": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", + "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + } + } + }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -5820,6 +5947,89 @@ "mimic-response": "^1.0.0" } }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } + }, "deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", @@ -5934,8 +6144,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "delegate": { "version": "3.2.0", @@ -6171,8 +6380,7 @@ "dom-walk": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", - "dev": true + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, "domain-browser": { "version": "1.2.0", @@ -6256,6 +6464,16 @@ "dotenv-defaults": "^1.0.2" } }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -6282,7 +6500,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -6720,7 +6937,6 @@ "version": "1.16.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", - "dev": true, "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", @@ -6738,13 +6954,22 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.51", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", + "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + } + }, "es5-shim": { "version": "4.5.13", "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.13.tgz", @@ -6757,12 +6982,31 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "optional": true }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "es6-shim": { "version": "0.35.5", "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz", "integrity": "sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==", "dev": true }, + "es6-symbol": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz", + "integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==", + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.51" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -7327,6 +7571,175 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "eth-lib": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", + "integrity": "sha512-B8czsfkJYzn2UIEMwjc7Mbj+Cy72V+/OXH/tb44LV8jhrjizQJJ325xMOMyk3+ETa6r6oi0jsUY14+om8mQMWA==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "keccakjs": "^0.2.1", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "ethereum-bloom-filters": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz", + "integrity": "sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA==", + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + } + } + }, + "ethereumjs-common": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.3.2.tgz", + "integrity": "sha512-GkltYRIqBLzaZLmF/K3E+g9lZ4O4FL+TtpisAlD3N+UVlR+mrtoG+TvxavqVa6PwOY4nKIEMe5pl6MrTio3Lww==" + }, + "ethereumjs-tx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.1.tgz", + "integrity": "sha512-QtVriNqowCFA19X9BCRPMgdVNJ0/gMBS91TQb1DfrhsbR748g4STwxZptFAwfqehMyrF8rDwB23w87PQwru0wA==", + "requires": { + "ethereumjs-common": "^1.3.1", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "@types/node": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.0.tgz", + "integrity": "sha512-wuJwN2KV4tIRz1bu9vq5kSPasJ8IsEjZaP1ZR7KlmdUZvGF/rXy8DmXOVwUD0kAtvtJ7aqMKPqUXC0NUTDbrDg==" + }, + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, "eventemitter3": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", @@ -7646,8 +8059,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { "version": "2.0.1", @@ -7803,6 +8215,16 @@ } } }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "filesize": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", @@ -7945,6 +8367,14 @@ } } }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -7962,8 +8392,7 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "fork-ts-checker-webpack-plugin": { "version": "1.5.0", @@ -7985,7 +8414,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -8025,6 +8453,11 @@ "readable-stream": "^2.0.0" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -8035,6 +8468,14 @@ "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -8669,7 +9110,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -8895,6 +9335,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -8952,14 +9397,12 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -8995,11 +9438,23 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } }, "has-unicode": { "version": "2.0.1", @@ -9263,6 +9718,11 @@ } } }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, "http-parser-js": { "version": "0.4.10", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", @@ -9293,7 +9753,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -9322,6 +9781,21 @@ "postcss": "^7.0.14" } }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -9601,8 +10075,7 @@ "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" }, "is-ci": { "version": "2.0.0", @@ -9708,8 +10181,7 @@ "is-function": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", - "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", - "dev": true + "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" }, "is-generator-fn": { "version": "2.1.0", @@ -9725,6 +10197,11 @@ "is-extglob": "^2.1.1" } }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, "is-hexadecimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz", @@ -9751,6 +10228,11 @@ } } }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + }, "is-npm": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", @@ -9786,6 +10268,11 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -9839,6 +10326,11 @@ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, "is-root": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", @@ -9871,7 +10363,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, "requires": { "has-symbols": "^1.0.0" } @@ -9879,8 +10370,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-utf8": { "version": "0.2.1", @@ -9948,8 +10438,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "istanbul-lib-coverage": { "version": "2.0.5", @@ -10032,6 +10521,15 @@ "handlebars": "^4.1.2" } }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, "jest": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", @@ -10744,7 +11242,12 @@ "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true }, - "js-stringify": { + "js-sha3": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", + "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=" + }, + "js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=", @@ -10776,8 +11279,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdoc": { "version": "3.6.3", @@ -10893,8 +11395,7 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { "version": "0.4.1", @@ -10937,7 +11438,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -10965,6 +11465,26 @@ "object.assign": "^4.1.0" } }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "keccakjs": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", + "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", + "requires": { + "browserify-sha3": "^0.0.4", + "sha3": "^1.2.2" + } + }, "keyboardevent-from-electron-accelerator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-1.1.0.tgz", @@ -11668,7 +12188,6 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dev": true, "requires": { "dom-walk": "^0.1.0" } @@ -11747,6 +12266,30 @@ "is-plain-obj": "^1.1.0" } }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -11816,6 +12359,14 @@ } } }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, "mobx": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/mobx/-/mobx-5.14.2.tgz", @@ -11839,6 +12390,11 @@ "resolved": "https://registry.npmjs.org/mobx-utils/-/mobx-utils-5.5.1.tgz", "integrity": "sha512-blwMbRPCqdEOX6+sG9L7ptPKUXc6ol7e0iNfT4X3tmlXVndpRlrL95qvcNH5IR+UGSPizhGwiKSlTbreaJJUrA==" }, + "mock-fs": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.2.tgz", + "integrity": "sha512-ewPQ83O4U8/Gd8I15WoB6vgTTmq5khxBskUWCRvswUqjCfOOTREmxllztQOm+PXMWUxATry+VBWXQJloAyxtbQ==" + }, "moo": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/moo/-/moo-0.4.3.tgz", @@ -11888,6 +12444,11 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -11935,6 +12496,11 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -12237,6 +12803,22 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, "nwsapi": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", @@ -12246,8 +12828,7 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-assign": { "version": "4.1.1", @@ -12291,8 +12872,7 @@ "object-inspect": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", - "dev": true + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" }, "object-is": { "version": "1.0.1", @@ -12378,6 +12958,14 @@ "has": "^1.0.3" } }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "requires": { + "http-https": "^1.0.0" + } + }, "obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -12576,6 +13164,14 @@ "retry": "^0.12.0" } }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -12660,6 +13256,15 @@ "is-hexadecimal": "^1.0.0" } }, + "parse-headers": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.2.tgz", + "integrity": "sha512-/LypJhzFmyBIDYP9aDVgeyEb5sQfbfY5mnDq4hVhlQ69js87wXfmEI5V3xI6vvXasqebp0oCytYFLxsBVfCzSg==", + "requires": { + "for-each": "^0.3.3", + "string.prototype.trim": "^1.1.2" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -12776,8 +13381,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { "version": "2.3.0", @@ -13328,8 +13932,7 @@ "psl": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", - "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==", - "dev": true + "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==" }, "public-encrypt": { "version": "4.0.3", @@ -13562,8 +14165,7 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "query-string": { "version": "4.3.4", @@ -14484,7 +15086,6 @@ "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -14673,6 +15274,15 @@ "inherits": "^2.0.1" } }, + "rlp": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", + "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", + "requires": { + "bn.js": "^4.11.1", + "safe-buffer": "^5.1.1" + } + }, "roarr": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.14.2.tgz", @@ -14854,6 +15464,31 @@ "ajv-keywords": "^3.1.0" } }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "scrypt-shim": { + "version": "github:web3-js/scrypt-shim#be5e616323a8b5e568788bf94d03c1b8410eac54", + "from": "github:web3-js/scrypt-shim", + "requires": { + "scryptsy": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + }, "scss-tokenizer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", @@ -14875,6 +15510,39 @@ } } }, + "secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "seek-bzip": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", + "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "requires": { + "commander": "~2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "requires": { + "graceful-readlink": ">= 1.0.0" + } + } + } + }, "select": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", @@ -15067,6 +15735,18 @@ "send": "0.17.1" } }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -15112,6 +15792,21 @@ "safe-buffer": "^5.0.1" } }, + "sha3": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.3.tgz", + "integrity": "sha512-sOWDZi8cDBRkLfWOw18wvJyNblXDHzwMGnRWut8zNNeIeLnmMRO17bjpLc7OzMuj1ASUgx2IyohzUCAl+Kx5vA==", + "requires": { + "nan": "2.13.2" + }, + "dependencies": { + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" + } + } + }, "shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -15174,6 +15869,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "simplebar": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/simplebar/-/simplebar-4.2.3.tgz", @@ -15521,7 +16231,6 @@ "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -15648,8 +16357,7 @@ "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, "string-length": { "version": "2.0.0", @@ -15730,7 +16438,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.0.tgz", "integrity": "sha512-9EIjYD/WdlvLpn987+ctkLf0FfvBefOCuiEr2henD8X+7jfwPnyvTdmW8OJhj5p+M0/96mBdynLWkxUr+rHlpg==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.13.0", @@ -15741,7 +16448,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", - "dev": true, "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" @@ -15751,7 +16457,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", - "dev": true, "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" @@ -15802,11 +16507,27 @@ "is-utf8": "^0.2.0" } }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "requires": { + "is-natural-number": "^4.0.1" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -16292,6 +17013,109 @@ } } }, + "swarm-js": { + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "buffer": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -16366,6 +17190,20 @@ "inherits": "2" } }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "telejson": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/telejson/-/telejson-3.0.3.tgz", @@ -16610,8 +17448,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { "version": "2.0.5", @@ -16627,6 +17464,11 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, "timers-browserify": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", @@ -16672,6 +17514,11 @@ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -16741,7 +17588,6 @@ "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -16750,8 +17596,7 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" } } }, @@ -16840,7 +17685,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -16848,8 +17692,12 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, "type-check": { "version": "0.3.2", @@ -16886,6 +17734,14 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typescript": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", @@ -16929,11 +17785,35 @@ "dev": true, "optional": true }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unbzip2-stream": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", + "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + }, + "dependencies": { + "buffer": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } + } + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", - "dev": true + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, "unfetch": { "version": "4.1.0", @@ -17234,11 +18114,26 @@ "prepend-http": "^2.0.0" } }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, "utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", @@ -17319,7 +18214,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -17491,6 +18385,315 @@ "minimalistic-assert": "^1.0.0" } }, + "web3": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", + "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", + "requires": { + "@types/node": "^12.6.1", + "web3-bzz": "1.2.2", + "web3-core": "1.2.2", + "web3-eth": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-shh": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-bzz": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", + "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", + "requires": { + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.0.tgz", + "integrity": "sha512-wuJwN2KV4tIRz1bu9vq5kSPasJ8IsEjZaP1ZR7KlmdUZvGF/rXy8DmXOVwUD0kAtvtJ7aqMKPqUXC0NUTDbrDg==" + } + } + }, + "web3-core": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", + "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", + "requires": { + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-requestmanager": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-helpers": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", + "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-method": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", + "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-promievent": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", + "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + } + } + }, + "web3-core-requestmanager": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", + "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-providers-http": "1.2.2", + "web3-providers-ipc": "1.2.2", + "web3-providers-ws": "1.2.2" + } + }, + "web3-core-subscriptions": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", + "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + } + } + }, + "web3-eth": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", + "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-accounts": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-eth-ens": "1.2.2", + "web3-eth-iban": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-abi": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", + "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.2" + } + }, + "web3-eth-accounts": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", + "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", + "requires": { + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-shim": "github:web3-js/scrypt-shim", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "web3-eth-contract": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", + "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-ens": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", + "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-iban": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", + "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.2" + } + }, + "web3-eth-personal": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", + "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-net": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", + "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", + "requires": { + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-providers-http": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", + "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", + "requires": { + "web3-core-helpers": "1.2.2", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", + "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" + } + }, + "web3-providers-ws": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", + "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + } + }, + "web3-shh": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", + "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", + "requires": { + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-net": "1.2.2" + } + }, + "web3-utils": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", + "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -17950,6 +19153,32 @@ } } }, + "websocket": { + "version": "github:web3-js/WebSocket-Node#905deb4812572b344f5801f8c9ce8bb02799d82e", + "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "websocket-driver": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", @@ -18200,6 +19429,75 @@ "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", "dev": true }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + } + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + }, + "dependencies": { + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + } + } + }, + "xhr-request-promise": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz", + "integrity": "sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0=", + "requires": { + "xhr-request": "^1.0.1" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -18212,6 +19510,11 @@ "integrity": "sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA==", "dev": true }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -18222,6 +19525,11 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/package.json b/package.json index 27bbe6f8..fcb98328 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "react-router-dom": "^5.1.2", "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^19.0.0", + "web3": "^1.2.2", "webpack": "^4.41.2", "webpack-dev-server": "^3.8.2" }, @@ -70,7 +71,7 @@ "@babel/preset-env" ], "plugins": [ - "@babel/plugin-transform-async-to-generator", + "@babel/plugin-transform-runtime", [ "@babel/plugin-proposal-decorators", { From 8affdd014510a84cd02a06320272cc63cda4e639 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 29 Oct 2019 18:29:16 +0700 Subject: [PATCH 057/219] Added additional components create wallet form --- src/components/CreateWallet/index.js | 65 ++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 11f8794a..f98572bb 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; import { NavLink } from 'react-router-dom'; import Container from '../Container'; @@ -8,6 +9,7 @@ import Heading from '../Heading'; import { Password, BackIcon } from '../Icons'; import Input from '../Input'; import { Button, IconButton } from '../Button'; +import Loader from '../Loader'; import styles from '../Login/Login.scss'; @@ -17,31 +19,25 @@ import styles from '../Login/Login.scss'; class CreateWallet extends Component { constructor(props) { super(props); - this.state = {}; + this.state = { + state: 'default', + }; + } + + createWallet() { + this.setState({ + state: 'loading', + }); } render() { + const { state } = this.state; return (
- - - {'Создание пароля'} - {'Будет использоваться для входа в кошелек и подтверждения транзакций'} - - - - - - - -
- - - -
-
+ {state === 'default' ? : ''} + {state === 'loading' ? : ''} @@ -56,6 +52,39 @@ class CreateWallet extends Component { } } +const PasswordForm = ({ submit }) => ( + + + {'Создание пароля'} + {'Будет использоваться для входа в кошелек и подтверждения транзакций'} + + + + + + + +
+ +
+
+); + +const CreationLoader = () => ( + + + {'Создание пароля'} + {'Будет использоваться для входа в кошелек и подтверждения транзакций'} + + + +); + CreateWallet.propTypes = {}; +PasswordForm.propTypes = { + submit: propTypes.func.isRequired, +}; + + export default CreateWallet; From 21431d54fa2e99619dcd08e523f1eecddf00c51e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 16:45:32 +0700 Subject: [PATCH 058/219] Added worker wrapper --- src/services/WalletService/WalletService.js | 15 +++++- .../WalletService/entities/WorkerWrapper.js | 47 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/services/WalletService/entities/WorkerWrapper.js diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 009dab56..c4db9d36 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -1,4 +1,12 @@ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ +import WorkerWrapper from './entities/WorkerWrapper'; +import WalletWorker from '../../workers/wallet.worker'; + +const bip39 = require('bip39'); /** Service for working with wallets */ + +const worker = new WorkerWrapper(new WalletWorker()); class WalletService { /** * Decrypts wallet @@ -25,7 +33,12 @@ class WalletService { * @returns {object} encryptedWallet,seed */ createWallet(password) { - return (this, password); + const data = { + action: 'create', + password, + mnemonic: bip39.generateMnemonic(), + }; + return worker.send(data); } /** diff --git a/src/services/WalletService/entities/WorkerWrapper.js b/src/services/WalletService/entities/WorkerWrapper.js new file mode 100644 index 00000000..347a5beb --- /dev/null +++ b/src/services/WalletService/entities/WorkerWrapper.js @@ -0,0 +1,47 @@ +/* eslint-disable no-console */ +let requestId = 0; + +class WorkerWrapper { + worker; + + stack = {}; + + constructor(worker) { + this.worker = worker; + this._listen(); + } + + send(data) { + const { worker, stack } = this; + requestId += 1; + const id = requestId; + const request = { + id, + payload: data, + }; + worker.postMessage(request); + return new Promise((resolve) => { + stack[id] = (response) => { + stack[id] = undefined; + return resolve(response); + }; + }); + } + + _listen() { + const { worker } = this; + worker.addEventListener('message', this._handleMessage.bind(this)); + } + + _handleMessage(event) { + const { stack } = this; + const { id, payload, error } = event.data; + if (!stack[id] || !(typeof stack[id] === 'function')) return; + if (error) { + throw new Error(error); + } + stack[id](payload); + } +} + +export default WorkerWrapper; From 46abe8ec8a8af7afb3388a731e5614e6c19e3657 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:29:01 +0700 Subject: [PATCH 059/219] reading, creating, recovering and writing methods now working --- src/services/WalletService/WalletService.js | 23 +++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index c4db9d36..48ba902f 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -2,6 +2,8 @@ /* eslint-disable class-methods-use-this */ import WorkerWrapper from './entities/WorkerWrapper'; import WalletWorker from '../../workers/wallet.worker'; +import { fs, path, PATH_TO_WALLETS } from '../../constants'; + const bip39 = require('bip39'); /** Service for working with wallets */ @@ -14,8 +16,13 @@ class WalletService { * @param {string} password password for decrypting * @returns {object} Wallet instance */ - readWalletFromFile(url, password) { - return (this, url, password); + readWallet(input, password) { + const data = { + action: 'read', + input, + password, + }; + return worker.send(data); } /** @@ -24,7 +31,11 @@ class WalletService { * @return {bool} write status: 1 - success, 2 - error */ writeWalletToFile(encryptedWallet) { - return (this, encryptedWallet); + let date = new Date(); + date = `${date.getUTCFullYear()}-${date.getUTCDate()}-${date.getUTCDay()}T${date.getUTCHours()}-${date.getUTCMinutes()}-${date.getUTCSeconds()}.${date.getMilliseconds() * 1000000}Z`; + const walletName = (JSON.parse(encryptedWallet)).address; + const name = `UTC--${date}--${walletName}`; + fs.writeFileSync(path.join(PATH_TO_WALLETS, `${name}.json`), encryptedWallet, 'utf8'); } /** @@ -47,7 +58,11 @@ class WalletService { * @returns {object} wallet object */ recoverWallet(mnemonic) { - return (this, mnemonic); + const data = { + action: 'recover', + mnemonic, + }; + worker.send(data); } /** From 6d57134317e4f134d2502f61d7864c25972a82d6 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:29:35 +0700 Subject: [PATCH 060/219] fixes in components --- src/components/Button/index.js | 10 +++- src/components/CreateWallet/index.js | 50 +++++++++++++++- src/components/Dropdown/Dropdown.scss | 5 ++ src/components/Dropdown/index.js | 26 ++++----- src/components/Login/Login.scss | 37 ++++++++++++ src/components/Login/index.js | 82 ++++++++++++++++++--------- src/components/Router/SimpleRouter.js | 2 + 7 files changed, 165 insertions(+), 47 deletions(-) diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 5ff192bc..4771cb46 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -13,7 +13,10 @@ export const Button = ({ children, className, onClick }) => ( Button.propTypes = { children: propTypes.string.isRequired, className: propTypes.string.isRequired, - onClick: propTypes.func.isRequired, + onClick: propTypes.func, +}; +Button.defaultProps = { + onClick: () => false, }; export const IconButton = ({ children, className, onClick }) => ( @@ -28,5 +31,8 @@ export const IconButton = ({ children, className, onClick }) => ( IconButton.propTypes = { children: propTypes.arrayOf(propTypes.node).isRequired, className: propTypes.string.isRequired, - onClick: propTypes.func.isRequired, + onClick: propTypes.func, +}; +IconButton.defaultProps = { + onClick: () => false, }; diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index f98572bb..13995918 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-props-no-spreading */ +/* eslint-disable no-console */ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; @@ -13,7 +15,6 @@ import Loader from '../Loader'; import styles from '../Login/Login.scss'; - @inject('userStore', 'appStore') @observer class CreateWallet extends Component { @@ -24,20 +25,28 @@ class CreateWallet extends Component { }; } - createWallet() { + createWallet = () => { this.setState({ state: 'loading', }); + + setTimeout(() => { + this.setState({ + state: 'seed', + }); + }, 2000); } render() { const { state } = this.state; + const { userStore } = this.props; return (
{state === 'default' ? : ''} {state === 'loading' ? : ''} + {state === 'seed' ? : ''} @@ -80,11 +89,46 @@ const CreationLoader = () => ( ); -CreateWallet.propTypes = {}; +const SeedScreen = ({ seed }) => ( + + + {'Резервная фраза'} + {'Нужна для восстановления пароля'} + +
+ {seed.map((word, id) => ( + + ))} +
+
+ + + +
+
+); +const SeedWord = ({ word, id }) => ( +

+ {id + 1} + {('*').repeat(word.length)} +

+); + +CreateWallet.propTypes = { + userStore: propTypes.object.isRequired, +}; PasswordForm.propTypes = { submit: propTypes.func.isRequired, }; +SeedScreen.propTypes = { + seed: propTypes.arrayOf(propTypes.string).isRequired, +}; +SeedWord.propTypes = { + id: propTypes.number.isRequired, + word: propTypes.string.isRequired, +}; + export default CreateWallet; diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index ef362e05..68432fc0 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -71,11 +71,16 @@ } } &__selected { + display: inline-block; + max-width: 80%; + overflow: hidden; + text-overflow: ellipsis; vertical-align: middle; } &__options { position: absolute; top: 100%; + z-index: 1; height: 0; max-height: 100px; padding: 5px 10px; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index fde2d9f5..f0498149 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { DropdownArrow } from '../Icons'; import styles from './Dropdown.scss'; +import DropdownOption from '../DropdownOption'; class Dropdown extends Component { constructor() { @@ -13,16 +14,18 @@ class Dropdown extends Component { }; } - toggleOptions() { + toggleOptions = () => { const { opened } = this.state; this.setState({ opened: !opened }); } - selectOption(selected) { + selectOption = (selected) => { + const { onSelect } = this.props; this.setState({ - selectedLabel: selected.label, - selectedValue: selected.value, + selectedLabel: selected, + selectedValue: selected, }); + onSelect(selected); this.toggleOptions(); } @@ -30,21 +33,13 @@ class Dropdown extends Component { const { children, options } = this.props; const { opened, selectedLabel, selectedValue } = this.state; const getOptions = options.map((option, index) => ( - + )); return (
- - - - - - - -
- + {!loading ? : }
); } } -Login.propTypes = { - appStore: propTypes.shape({ - readWalletList: propTypes.func.isRequired, - wallets: propTypes.arrayOf(propTypes.object).isRequired, - }).isRequired, +const InputForm = ({ appStore, submit }) => ( + + + {'Вход в систему'} + {'Приготовьтесь к новой эре в сфере голосования'} + + + + + + + +
+ + + + + + + +
+
+); + +const LoadingBlock = () => ( + + + {'Вход в систему'} + {'Приготовьтесь к новой эре в сфере голосования'} + + + +); +Login.propTypes = { + appStore: propTypes.object.isRequired, + userStore: propTypes.object.isRequired, +}; +InputForm.propTypes = { + appStore: propTypes.object.isRequired, + submit: propTypes.func.isRequired, }; + export default Login; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index c92d822d..86e251ee 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -5,12 +5,14 @@ import { import Login from '../Login'; import CreateWallet from '../CreateWallet'; +import InputSeed from '../InputSeed'; const SimpleRouter = () => ( + ); From 8ae7381e39418e126287ee4690d249248cd663e9 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:29:43 +0700 Subject: [PATCH 061/219] New components --- src/components/DropdownOption/index.js | 22 ++++++++++ src/components/InputSeed/index.js | 57 ++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 src/components/DropdownOption/index.js create mode 100644 src/components/InputSeed/index.js diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js new file mode 100644 index 00000000..ba266dbb --- /dev/null +++ b/src/components/DropdownOption/index.js @@ -0,0 +1,22 @@ +import React from 'react'; +import propTypes from 'prop-types'; + +const DropdownOption = ({ value, label, select }) => ( + +); + +DropdownOption.propTypes = { + value: propTypes.string.isRequired, + label: propTypes.string.isRequired, + select: propTypes.func.isRequired, +}; + + +export default DropdownOption; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js new file mode 100644 index 00000000..32d53638 --- /dev/null +++ b/src/components/InputSeed/index.js @@ -0,0 +1,57 @@ +/* eslint-disable no-unused-vars */ +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import propTypes from 'prop-types'; +import Container from '../Container'; +import Header from '../Header'; +import Heading from '../Heading'; +import Input from '../Input'; + +import styles from '../Login/Login.scss'; +import FormBlock from '../FormBlock'; +import { Button } from '../Button'; + +@inject('appStore', 'userStore') +@observer + +class InputSeed extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + render() { + const { userStore } = this.props; + const { _mnemonic: seed } = userStore; + return ( + +
+
+ + + {'Проверка резервной фразы'} + {'Введите фразу, которую вы записали'} + +
+ {seed.map((word, index) => ( + + {index + 1} + + ))} +
+
+ +
+
+ +
+ + ); + } +} + +InputSeed.propTypes = { + userStore: propTypes.object.isRequired, +}; + +export default InputSeed; From 4f0213fc24dfafefafda0dedbb35f7cbf5d80716 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:29:57 +0700 Subject: [PATCH 062/219] worker fixes --- src/workers/wallet.worker.js | 57 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index 904a78d6..a881ecd6 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -1,65 +1,62 @@ const ejsWallet = require('ethereumjs-wallet'); const hdKey = require('ethereumjs-wallet/hdkey'); -const bip39 = require('bip39') +const bip39 = require('bip39'); + const walletHdPath = "m/44'/60'/0'/0/0"; -const createWallet = ({mnemonic, password, action}) => { - let wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) - .derivePath(walletHdPath) - .deriveChild(0) - .getWallet(); +const createWallet = ({ id, payload: { mnemonic, password, action } }) => { + const wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) + .derivePath(walletHdPath) + .deriveChild(0) + .getWallet(); - let privateKey = wallet.getPrivateKeyString(); - let v3wallet = wallet.toV3(password); + const privateKey = wallet.getPrivateKeyString(); + const v3wallet = wallet.toV3(password); - let message = { + const payload = { action, privateKey, wallet, v3wallet, - } - console.log(message) - return message; + mnemonic, + }; + return { id, payload }; }; -const readWallet = ({input, password}) =>{ - try { - return ejsWallet - .fromV3(input, password) - .getPrivateKeyString(); - } catch (e) { - return e; - } -} - +const readWallet = ({ id, payload: { input, password } }) => { + const data = { + privateKey: ejsWallet.fromV3(input, password).getPrivateKeyString(), + }; + return { id, payload: data }; +}; -onmessage = (e)=> { +onmessage = (e) => { const { payload } = e.data; const { action } = payload; let response; switch (action) { case 'create': - response = createWallet(payload); + response = createWallet(e.data); break; case 'read': - response = readWallet(payload); + response = readWallet(e.data); break; case 'recover': - response = createWallet(payload); + response = createWallet(e.data); break; default: - response = null + response = null; break; } - //console.log(response); + // console.log(response); if (response instanceof Error) { response = null; } - + self.postMessage(response); -} \ No newline at end of file +}; From 84ea39e8867c9f85f9b7fe6c1a19e9882a3fc400 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:30:16 +0700 Subject: [PATCH 063/219] fixes in app file --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 4fd31a37..87af28bc 100644 --- a/src/index.js +++ b/src/index.js @@ -2,13 +2,13 @@ import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; -import './assets/styles/style.scss'; import rootStore from './stores/RootStore'; +import './assets/styles/style.scss'; + const { stores } = rootStore; render( - // eslint-disable-next-line react/jsx-props-no-spreading - + , document.getElementById('root'), From 1aa7341057a7a463ebe9bbc78e5b801c1617e7cc Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:30:43 +0700 Subject: [PATCH 064/219] new methods and improvements in stores --- src/stores/AppStore/AppStore.js | 29 ++++++++++++++++++++++--- src/stores/RootStore/RootStore.js | 24 +++++++++++++++------ src/stores/UserStore/UserStore.js | 36 ++++++++++++++++++++++++++++--- 3 files changed, 77 insertions(+), 12 deletions(-) diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 0ab7b820..764d6dc8 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,5 +1,5 @@ import { observable, action, computed } from 'mobx'; -import { fs, PATH_TO_WALLETS } from '../../constants'; +import { fs, path, PATH_TO_WALLETS } from '../../constants'; class AppStore { @@ -7,14 +7,36 @@ class AppStore { @observable projectList = []; + constructor(rootStore) { + this.rootStore = rootStore; + this.readWalletList(); + } + /** * Getting list of url's for sending this to wallet service * @function */ @action readWalletList = () => { - this.walletList = []; + this.walletList = {}; const files = fs.readdirSync(PATH_TO_WALLETS); - return files; + files.forEach((file) => { + const wallet = JSON.parse(fs.readFileSync(path.join(PATH_TO_WALLETS, file), 'utf8')); + const walletObject = {}; + walletObject[wallet.address] = wallet; + this.walletList = Object.assign(this.walletList, walletObject); + }); + // eslint-disable-next-line no-console + console.log(files); + } + + /** + * selecting encrypted wallet and pushing this to userStore + * @param {string} address address of wallet + */ + @action selectWallet = (address) => { + const { userStore } = this.rootStore; + const key = address.replace('0x', ''); + userStore.setEncryptedWallet(this.walletList[key]); } /** @@ -28,6 +50,7 @@ class AppStore { /** * Adding encrypted Wallet to userStore + * @param {string} encryptedWallet encrypted keystore v3 */ @action setUserWallet = (encryptedWallet) => { this.userStore.setEncryptedWallet(encryptedWallet); diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 0d70a10f..fc6c70cc 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -1,3 +1,5 @@ +/* eslint-disable no-multi-assign */ +/* eslint-disable no-multi-spaces */ import { observable, action, computed } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; @@ -7,18 +9,27 @@ import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; class RootStore { + // stores @observable projectStore; - @observable appStore = new AppStore(); + @observable appStore; - @observable userStore = new UserStore() + @observable userStore ; // services - @observable walletService = new WalletService(); + @observable walletService ; - @observable contractService = new ContractService(); + @observable contractService ; - @observable Web3Service = new Web3Service(); + @observable Web3Service ; + + constructor() { + this.appStore = new AppStore(this); + this.userStore = new UserStore(this); + this.walletService = new WalletService(); + this.contractService = new ContractService(); + this.Web3Service = new Web3Service(); + } /** * initiating project @@ -28,10 +39,11 @@ class RootStore { this.projectStore = new ProjectStore(address); } + @computed get stores() { const { appStore, userStore } = this; return { appStore, userStore }; } } -const rootStore = new RootStore(); +const rootStore = window.rootStore = new RootStore(); export default rootStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 22e0d5c4..5bc7fb4b 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,17 +1,23 @@ import { observable, action } from 'mobx'; -import walletService from '../../services/WalletService'; /** * Describes store with user data */ class UserStore { @observable authorized = false; - @observable encryptedWallet = '' + @observable encryptedWallet = ''; + + @observable privateKey = ''; + + @observable _mnemonic = ['spray', 'trap', 'flush', 'awful', 'before', 'prosper', 'gold', 'typical', 'siege', 'mule', 'great', 'bone']; @observable address = ''; @observable balance = 0; + constructor(rootStore) { + this.rootStore = rootStore; + } @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; @@ -23,7 +29,27 @@ class UserStore { * @return {bool} is password correct */ @action checkPassword(password) { - walletService.checkPassword(this.encryptedWallet, password); + this.rootStore.walletService.checkPassword(this.encryptedWallet, password); + } + + @action createWallet(password) { + this.rootStore.walletService.createWallet(password).then((data) => { + const { v3wallet, mnemonic, privateKey } = data; + this.setEncryptedWallet(v3wallet); + this._mnemonic = mnemonic; + this.privateKey = privateKey; + }); + } + + @action readWallet(password) { + this.rootStore.walletService.readWallet(this.encryptedWallet, password).then((data) => { + this.privateKey = data.privateKey; + }); + } + + @action recoverWallet() { + const seed = this._mnemonic.join(' '); + this.rootStore.walletService.recoverWallet(seed); } /** @@ -54,6 +80,10 @@ class UserStore { this.balance = 0; return false; } + + set mnemonic(mnemonic) { + this._mnemonic = mnemonic.split(''); + } } export default UserStore; From acdaf4dd673390a079b205b24037bf1e7ce7cec0 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 30 Oct 2019 18:30:54 +0700 Subject: [PATCH 065/219] Other fixes --- .eslintrc.json | 4 +- package-lock.json | 121 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 + webpack.dev.js | 2 +- 4 files changed, 127 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 38070616..4c72b60e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,6 +20,8 @@ "plugins": ["react"], "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], - "no-underscore-dangle":"off" + "no-underscore-dangle":"off", + "import/no-cycle": "off", + "react/forbid-prop-types": "off" } } diff --git a/package-lock.json b/package-lock.json index 4ebfac79..6e0c6bf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3941,6 +3941,14 @@ } } }, + "base-x": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.7.tgz", + "integrity": "sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "base64-js": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", @@ -3998,6 +4006,24 @@ "file-uri-to-path": "1.0.0" } }, + "bip39": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz", + "integrity": "sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ==", + "requires": { + "@types/node": "11.11.6", + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1" + }, + "dependencies": { + "@types/node": { + "version": "11.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", + "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" + } + } + }, "bip66": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", @@ -4314,6 +4340,24 @@ "node-releases": "^1.1.36" } }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "bser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz", @@ -4968,6 +5012,22 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "coinstring": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/coinstring/-/coinstring-2.3.0.tgz", + "integrity": "sha1-zbYzY6lhUCQEolr7gsLibV/2J6Q=", + "requires": { + "bs58": "^2.0.1", + "create-hash": "^1.1.1" + }, + "dependencies": { + "bs58": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-2.0.1.tgz", + "integrity": "sha1-VZCNWPGYKrogCPob7Y+RmYopv40=" + } + } + }, "collapse-white-space": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz", @@ -7656,6 +7716,29 @@ "secp256k1": "^3.0.1" } }, + "ethereumjs-wallet": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz", + "integrity": "sha512-qiXPiZOsStem+Dj/CQHbn5qex+FVkuPmGH7SvSnA9F3tdRDt8dLMyvIj3+U05QzVZNPYh4HXEdnzoYI4dZkr9w==", + "requires": { + "aes-js": "^3.1.1", + "bs58check": "^2.1.2", + "ethereumjs-util": "^6.0.0", + "hdkey": "^1.1.0", + "randombytes": "^2.0.6", + "safe-buffer": "^5.1.2", + "scrypt.js": "^0.3.0", + "utf8": "^3.0.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + } + } + }, "ethers": { "version": "4.0.0-beta.3", "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", @@ -9539,6 +9622,16 @@ "space-separated-tokens": "^1.0.0" } }, + "hdkey": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.1.tgz", + "integrity": "sha512-DvHZ5OuavsfWs5yfVJZestsnc3wzPvLWNk6c2nRUfo6X+OtxypGt20vDDf7Ba+MJzjL3KS1og2nw2eBbLCOUTA==", + "requires": { + "coinstring": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -15464,6 +15557,15 @@ "ajv-keywords": "^3.1.0" } }, + "scrypt": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", + "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", + "optional": true, + "requires": { + "nan": "^2.0.8" + } + }, "scrypt-js": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", @@ -15484,6 +15586,25 @@ } } }, + "scrypt.js": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", + "integrity": "sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A==", + "requires": { + "scrypt": "^6.0.2", + "scryptsy": "^1.2.1" + }, + "dependencies": { + "scryptsy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "requires": { + "pbkdf2": "^3.0.3" + } + } + } + }, "scryptsy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", diff --git a/package.json b/package.json index fcb98328..36a59557 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,11 @@ "@babel/preset-react": "^7.6.3", "@babel/preset-stage-0": "^7.0.0", "@namics/stylelint-bem": "^6.1.0", + "bip39": "^3.0.2", "electron": "^7.0.0", "electron-is-dev": "^1.1.0", "electron-localshortcut": "^3.1.0", + "ethereumjs-wallet": "^0.6.3", "mobx": "^5.14.2", "mobx-react": "^6.1.4", "mobx-utils": "^5.5.1", diff --git a/webpack.dev.js b/webpack.dev.js index 15e152fe..616ae052 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -33,7 +33,7 @@ module.exports = { rules: [ { test: /\.jsx?$/, - exclude: [/node_modules/], + exclude: [/node_modules/, /\.worker\.js$/], use: [{ loader: 'babel-loader', }, { From 47fb8935345dcb558e1d47846a852fab891872ba Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 07:25:42 +0700 Subject: [PATCH 066/219] Added constant states in store --- src/stores/AppStore/AppStore.js | 63 +++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 764d6dc8..743a469c 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -7,6 +7,61 @@ class AppStore { @observable projectList = []; + @observable masterState = 0; + + @observable masterSubState = null; + + @observable masterStates = { + login: 0, + createWallet: 1, + selectProject: 2, + createProject: 3, + projectWithTokens: 4, + projectWithoutTokens: 5, + connectProject: 6, + uploadProject: 7, + } + + @observable masterSubStates = { + createWallet: { + passwordInput: 0, + creating: 1, + showSeed: 2, + checkSeed: 3, + checking: 4, + finish: 5, + }, + createProject: { + withTokens: 0, + withoutTokens: 1, + }, + projectWithTokens: { + inputAddress: 0, + checkingAddress: 1, + tokenInfo: 2, + inputData: 3, + }, + projectWithoutTokens: { + createToken: 0, + uploadToken: 1, + alert: 2, + inputData: 3, + }, + connectProject: { + inputData: 0, + checkingProject: 1, + alert: 2, + }, + uploadProject: { + compiling: 0, + sending: 1, + hash: 2, + reciept: 3, + uploadQuestions: 4, + success: 5, + }, + } + constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -25,8 +80,6 @@ class AppStore { walletObject[wallet.address] = wallet; this.walletList = Object.assign(this.walletList, walletObject); }); - // eslint-disable-next-line no-console - console.log(files); } /** @@ -56,6 +109,12 @@ class AppStore { this.userStore.setEncryptedWallet(encryptedWallet); } + @action setMasterState(state, subState) { + this.masterState = this.masterStates[state]; + this.masterSubState = subState !== undefined ? this.masterSubStates[state][subState] : 0; + } + + @computed get wallets() { const wallets = Object.keys(this.walletList); return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); From 4e0da6a60f64a9963bd55d11bb3b995c31a3be81 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 07:50:47 +0700 Subject: [PATCH 067/219] integrating masterStates in app --- .eslintrc.json | 3 ++- src/components/CreateWallet/index.js | 26 ++++++++++---------------- src/components/Login/index.js | 16 +++++++++++++--- src/stores/UserStore/UserStore.js | 2 +- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4c72b60e..5968b282 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,6 +22,7 @@ "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], "no-underscore-dangle":"off", "import/no-cycle": "off", - "react/forbid-prop-types": "off" + "react/forbid-prop-types": "off", + "linebreak-style": "off" } } diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 13995918..c73573ff 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -21,32 +21,25 @@ class CreateWallet extends Component { constructor(props) { super(props); this.state = { - state: 'default', }; } - createWallet = () => { - this.setState({ - state: 'loading', - }); - - setTimeout(() => { - this.setState({ - state: 'seed', - }); - }, 2000); + createWallet = (password) => { + const { appStore, userStore } = this.props; + appStore.setMasterState('createWallet', 'creating'); + userStore.createWallet(password); } render() { - const { state } = this.state; - const { userStore } = this.props; + const { userStore, appStore } = this.props; + const { masterSubState } = appStore; return (
- {state === 'default' ? : ''} - {state === 'loading' ? : ''} - {state === 'seed' ? : ''} + {masterSubState === '0' ? : ''} + {masterSubState === '1' ? : ''} + {masterSubState === '2' ? : ''} @@ -116,6 +109,7 @@ const SeedWord = ({ word, id }) => ( CreateWallet.propTypes = { userStore: propTypes.object.isRequired, + appStore: propTypes.object.isRequired, }; PasswordForm.propTypes = { diff --git a/src/components/Login/index.js b/src/components/Login/index.js index c6f4e43d..9606baa9 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -38,6 +38,11 @@ class Login extends Component { userStore.login(); } + createKey = () => { + const { appStore } = this.props; + appStore.setMasterState('createWallet', 'passwordInput'); + } + render() { const { appStore } = this.props; const { loading } = this.state; @@ -45,14 +50,18 @@ class Login extends Component {
- {!loading ? : } + { + !loading + ? + : + }
); } } -const InputForm = ({ appStore, submit }) => ( +const InputForm = ({ appStore, submit, createKey }) => ( {'Вход в систему'} @@ -67,7 +76,7 @@ const InputForm = ({ appStore, submit }) => (
- + @@ -93,6 +102,7 @@ Login.propTypes = { InputForm.propTypes = { appStore: propTypes.object.isRequired, submit: propTypes.func.isRequired, + createKey: propTypes.func.isRequired, }; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 5bc7fb4b..5a4a34c0 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -36,7 +36,7 @@ class UserStore { this.rootStore.walletService.createWallet(password).then((data) => { const { v3wallet, mnemonic, privateKey } = data; this.setEncryptedWallet(v3wallet); - this._mnemonic = mnemonic; + this._mnemonic = mnemonic.split(' '); this.privateKey = privateKey; }); } From 741ffb7e2ca9b8ca049a1ec93fd51785542cd891 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 19:15:58 +0700 Subject: [PATCH 068/219] Added form models --- src/stores/FormsStore/CreateWalletForm.js | 26 ++++++++++++++ src/stores/FormsStore/LoginForm.js | 20 +++++++++++ src/stores/FormsStore/SeedForm.js | 30 ++++++++++++++++ src/stores/FormsStore/index.js | 7 ++++ src/stores/UserStore/UserStore.js | 44 ++++++++++++++++++----- 5 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 src/stores/FormsStore/CreateWalletForm.js create mode 100644 src/stores/FormsStore/LoginForm.js create mode 100644 src/stores/FormsStore/SeedForm.js create mode 100644 src/stores/FormsStore/index.js diff --git a/src/stores/FormsStore/CreateWalletForm.js b/src/stores/FormsStore/CreateWalletForm.js new file mode 100644 index 00000000..8239bd88 --- /dev/null +++ b/src/stores/FormsStore/CreateWalletForm.js @@ -0,0 +1,26 @@ +import ExtendedForm from '../../models/FormModel'; + +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ + +class CreateWalletForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'password', + type: 'password', + label: 'Password', + placeholder: 'Введите пароль', + rules: 'required|string|between:5,25', + }, { + name: 'passwordConfirm', + type: 'password', + label: 'Password Confirmation', + placeholder: 'Подтвердите пароль', + rules: 'required|string|same:password', + }], + }; + } +} +export default CreateWalletForm; diff --git a/src/stores/FormsStore/LoginForm.js b/src/stores/FormsStore/LoginForm.js new file mode 100644 index 00000000..935e0ae7 --- /dev/null +++ b/src/stores/FormsStore/LoginForm.js @@ -0,0 +1,20 @@ +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ +import ExtendedForm from '../../models/FormModel'; + +class LoginForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'password', + type: 'password', + label: 'Password', + placeholder: 'Введите пароль', + rules: 'required|string|same:password', + }], + }; + } +} + +export default LoginForm; diff --git a/src/stores/FormsStore/SeedForm.js b/src/stores/FormsStore/SeedForm.js new file mode 100644 index 00000000..ac86ba65 --- /dev/null +++ b/src/stores/FormsStore/SeedForm.js @@ -0,0 +1,30 @@ +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ +import { Form } from 'mobx-react-form'; +import dvr from 'mobx-react-form/lib/validators/DVR'; +import validatorjs from 'validatorjs'; + +class SeedForm extends Form { + plugins() { + return { + dvr: dvr(validatorjs), + }; + } + + setup() { + const fields = []; + for (let i = 1; i < 13; i += 1) { + fields.push({ + name: `word_${i}`, + rules: 'required|string', + value: '', + }); + } + return { fields }; + } +} +const seedForm = new SeedForm(); + + +export default seedForm; diff --git a/src/stores/FormsStore/index.js b/src/stores/FormsStore/index.js new file mode 100644 index 00000000..fb3935fb --- /dev/null +++ b/src/stores/FormsStore/index.js @@ -0,0 +1,7 @@ +/* eslint-disable import/prefer-default-export */ +import CreateWalletForm from './CreateWalletForm'; +import loginForm from './LoginForm'; +import seedForm from './SeedForm'; + + +export { loginForm, CreateWalletForm, seedForm }; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 5a4a34c0..c6a3d8bb 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -5,11 +5,17 @@ import { observable, action } from 'mobx'; class UserStore { @observable authorized = false; + @observable logging = false; + + @observable redirectToProjects = false; + @observable encryptedWallet = ''; @observable privateKey = ''; - @observable _mnemonic = ['spray', 'trap', 'flush', 'awful', 'before', 'prosper', 'gold', 'typical', 'siege', 'mule', 'great', 'bone']; + @observable _mnemonic = []; + + @observable _mnemonicRepeat = []; @observable address = ''; @@ -29,21 +35,41 @@ class UserStore { * @return {bool} is password correct */ @action checkPassword(password) { - this.rootStore.walletService.checkPassword(this.encryptedWallet, password); + const wallet = JSON.stringify(this.encryptedWallet); + this.rootStore.walletService.readWallet(wallet, password); } @action createWallet(password) { - this.rootStore.walletService.createWallet(password).then((data) => { - const { v3wallet, mnemonic, privateKey } = data; - this.setEncryptedWallet(v3wallet); - this._mnemonic = mnemonic.split(' '); - this.privateKey = privateKey; + return new Promise((resolve, reject) => { + this.rootStore.walletService.createWallet(password).then((data) => { + if (data.v3wallet) { + const { v3wallet, mnemonic, privateKey } = data; + this.setEncryptedWallet(v3wallet); + this._mnemonic = mnemonic.split(' '); + this.privateKey = privateKey; + // eslint-disable-next-line no-console + resolve(true); + } else { + reject(new Error('Error on creating wallet')); + } + }); }); } @action readWallet(password) { - this.rootStore.walletService.readWallet(this.encryptedWallet, password).then((data) => { - this.privateKey = data.privateKey; + this.logging = true; + const wallet = JSON.stringify(this.encryptedWallet); + return new Promise((resolve, reject) => { + this.rootStore.walletService.readWallet(wallet, password).then((data) => { + if (data.privateKey) { + this.privateKey = data.privateKey; + this.authorized = true; + this.redirectToProjects = true; + resolve(data.privateKey); + } else { + reject(); + } + }); }); } From e079188f9c3a6d7fb6a285369703ba35f0537438 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 19:16:18 +0700 Subject: [PATCH 069/219] Added form extending mobx form --- src/models/FormModel/index.js | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/models/FormModel/index.js diff --git a/src/models/FormModel/index.js b/src/models/FormModel/index.js new file mode 100644 index 00000000..6583daa5 --- /dev/null +++ b/src/models/FormModel/index.js @@ -0,0 +1,64 @@ +/* eslint-disable no-console */ +import { extendObservable, action } from 'mobx'; +import { Form } from 'mobx-react-form'; +import dvr from 'mobx-react-form/lib/validators/DVR'; +import validatorjs from 'validatorjs'; + +class ExtendedForm extends Form { + constructor(data) { + const { hooks } = data || {}; + console.log({ hooks }); + super(); + extendObservable(this, { loading: false }); + Object.keys(hooks).forEach((hook) => { + this.addHook(hook, hooks[hook]); + }); + } + + // eslint-disable-next-line class-methods-use-this + plugins() { + return { dvr: dvr(validatorjs) }; + } + + hooks() { + const $this = this; + return { + onSubmit: (form) => { + $this.setLoading(true); + $this.fireHook('onSubmitHook', form); + // Trigger hide mobile keyboard + document.activeElement.blur(); + }, + onSuccess: (form) => { + const promise = $this.fireHook('onSuccessHook', form); + promise + .catch(() => {}) + .finally(() => { + $this.setLoading(false); + }); + }, + onError: (form) => { + $this.setLoading(false); + $this.fireHook('onErrorHook', form); + }, + }; + } + + @action addHook(hook, fn) { + this[`${hook}Hook`] = fn; + } + + @action setLoading(status) { + this.loading = status; + } + + fireHook(hook, form) { + const fire = this[hook]; + if (fire && typeof fire === 'function') { + return fire(form); + } + return null; + } +} + +export default ExtendedForm; From 649d4a97633f5a44d397f8123c760b5f672840e5 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 19:16:49 +0700 Subject: [PATCH 070/219] New components --- src/components/AddExisitingProject/index.js | 12 ++++++++++++ src/components/AddNewProject/index.js | 13 +++++++++++++ src/components/AddProjectToConfig/index.js | 9 +++++++++ src/components/CreateNewProject/index.js | 12 ++++++++++++ .../CreateNewProjectWithTokens/index.js | 12 ++++++++++++ .../CreateNewProjectWithoutTokens/index.js | 11 +++++++++++ src/components/ProjectList/index.js | 10 ++++++++++ src/components/ProjectUploading/index.js | 12 ++++++++++++ src/components/Router/SimpleRouter.js | 16 ++++++++++++++++ 9 files changed, 107 insertions(+) create mode 100644 src/components/AddExisitingProject/index.js create mode 100644 src/components/AddNewProject/index.js create mode 100644 src/components/AddProjectToConfig/index.js create mode 100644 src/components/CreateNewProject/index.js create mode 100644 src/components/CreateNewProjectWithTokens/index.js create mode 100644 src/components/CreateNewProjectWithoutTokens/index.js create mode 100644 src/components/ProjectList/index.js create mode 100644 src/components/ProjectUploading/index.js diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js new file mode 100644 index 00000000..530745ab --- /dev/null +++ b/src/components/AddExisitingProject/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + + +const AddExistingProject = () => ( +
+ AddExistingProject + К списку проектов +
+); + +export default AddExistingProject; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js new file mode 100644 index 00000000..816043f7 --- /dev/null +++ b/src/components/AddNewProject/index.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + + +const AddNewProject = () => ( +
+ AddNewProject + With tokens + Without tokens +
+); + +export default AddNewProject; diff --git a/src/components/AddProjectToConfig/index.js b/src/components/AddProjectToConfig/index.js new file mode 100644 index 00000000..ccdcab54 --- /dev/null +++ b/src/components/AddProjectToConfig/index.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const AddProjectToConfig = () => ( +
+ AddProjectToConfig +
+); + +export default AddProjectToConfig; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js new file mode 100644 index 00000000..30d719fb --- /dev/null +++ b/src/components/CreateNewProject/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + +const CreateNewProject = () => ( +
+ CreateNewProject + существующий + новый +
+); + +export default CreateNewProject; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js new file mode 100644 index 00000000..01ebdd25 --- /dev/null +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + +const CreateNewProjectWithTokens = () => ( +
+ CreateNewProjectWithTokens + upload + +
+); + +export default CreateNewProjectWithTokens; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js new file mode 100644 index 00000000..d7186b39 --- /dev/null +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -0,0 +1,11 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + +const CreateNewProjectWithoutTokens = () => ( +
+ CreateNewProjectWithoutTokens + upload +
+); + +export default CreateNewProjectWithoutTokens; diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js new file mode 100644 index 00000000..f5c6c4c1 --- /dev/null +++ b/src/components/ProjectList/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + +const ProjectList = () => ( +
+ ProjectList + Добавить проект +
+); +export default ProjectList; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js new file mode 100644 index 00000000..8d782866 --- /dev/null +++ b/src/components/ProjectUploading/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { NavLink } from 'react-router-dom'; + + +const ProjectUploading = () => ( +
+ ProjectUploading + To projects +
+); + +export default ProjectUploading; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 86e251ee..242d14d9 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -6,13 +6,29 @@ import { import Login from '../Login'; import CreateWallet from '../CreateWallet'; import InputSeed from '../InputSeed'; +import ShowSeed from '../ShowSeed'; +import ProjectList from '../ProjectList'; +import CreateNewProject from '../CreateNewProject'; +import CreateNewProjectWithTokens from '../CreateNewProjectWithTokens'; +import CreateNewProjectWithoutTokens from '../CreateNewProjectWithoutTokens'; +import AddExistingProject from '../AddExisitingProject'; +import AddNewProject from '../AddNewProject'; +import ProjectUploading from '../ProjectUploading'; const SimpleRouter = () => ( + + + + + + + + ); From 8375dada14d277ad969bbf599ddc7041a86b7a93 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 31 Oct 2019 19:17:10 +0700 Subject: [PATCH 071/219] Added config and components fixes --- package-lock.json | 23 +++++++ package.json | 2 + src/components/Button/index.js | 17 +++-- src/components/CreateWallet/index.js | 93 ++++++++++++---------------- src/components/Input/index.js | 56 +++++++++++------ src/components/InputSeed/index.js | 35 +++++++---- src/components/Login/index.js | 84 +++++++++++++++---------- src/components/ShowSeed/index.js | 90 +++++++++++++++++++++++++++ src/config.json | 14 +++++ 9 files changed, 297 insertions(+), 117 deletions(-) create mode 100644 src/components/ShowSeed/index.js create mode 100644 src/config.json diff --git a/package-lock.json b/package-lock.json index 6e0c6bf2..12ce9eba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12473,6 +12473,14 @@ "mobx-react-lite": "^1.4.2" } }, + "mobx-react-form": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/mobx-react-form/-/mobx-react-form-2.0.8.tgz", + "integrity": "sha512-Z/JsXkN7B5xjG1tolHKytJiKmtLSdqkFKMco5AVagL8cQ0yJmE+iRZ212JKGHfkEKZrRWn7EDnX2STawIQFqxg==", + "requires": { + "lodash": "^4.17.11" + } + }, "mobx-react-lite": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-1.5.0.tgz", @@ -18321,6 +18329,21 @@ "spdx-expression-parse": "^3.0.0" } }, + "validatorjs": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/validatorjs/-/validatorjs-3.17.1.tgz", + "integrity": "sha512-i/aOdu1FPW48Y2NRt/BmHxcpoKcl7vvGtxUkPoacUVNU8jtPlb68QYcYqt7Fls9wqO5YpfLEoUHCrpk3pkIqsQ==", + "requires": { + "date-fns": "2.0.1" + }, + "dependencies": { + "date-fns": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.0.1.tgz", + "integrity": "sha512-C14oTzTZy8DH1Eq8N78owrCWvf3+cnJw88BTK/N3DYWVxDJuJzPaNdplzYxDYuuXXGvqBcO4Vy5SOrwAooXSWw==" + } + } + }, "value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", diff --git a/package.json b/package.json index 36a59557..3f329d10 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "ethereumjs-wallet": "^0.6.3", "mobx": "^5.14.2", "mobx-react": "^6.1.4", + "mobx-react-form": "^2.0.8", "mobx-utils": "^5.5.1", "prop-types": "^15.7.2", "react": "^16.10.2", @@ -31,6 +32,7 @@ "react-router-dom": "^5.1.2", "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^19.0.0", + "validatorjs": "^3.17.1", "web3": "^1.2.2", "webpack": "^4.41.2", "webpack-dev-server": "^3.8.2" diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 4771cb46..b7278e9c 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -1,9 +1,12 @@ +/* eslint-disable react/button-has-type */ import React from 'react'; import propTypes from 'prop-types'; import styles from './Button.scss'; -export const Button = ({ children, className, onClick }) => ( - -
+
+ + + + + + +
+ +
+
); @@ -82,47 +105,13 @@ const CreationLoader = () => ( ); -const SeedScreen = ({ seed }) => ( - - - {'Резервная фраза'} - {'Нужна для восстановления пароля'} - -
- {seed.map((word, id) => ( - - ))} -
-
- - - -
-
-); -const SeedWord = ({ word, id }) => ( -

- {id + 1} - {('*').repeat(word.length)} -

-); - CreateWallet.propTypes = { userStore: propTypes.object.isRequired, appStore: propTypes.object.isRequired, }; PasswordForm.propTypes = { - submit: propTypes.func.isRequired, -}; - -SeedScreen.propTypes = { - seed: propTypes.arrayOf(propTypes.string).isRequired, -}; -SeedWord.propTypes = { - id: propTypes.number.isRequired, - word: propTypes.string.isRequired, + form: propTypes.object.isRequired, }; - export default CreateWallet; diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 8066c259..84cd74c4 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -1,27 +1,47 @@ -import React from 'react'; +/* eslint-disable no-console */ +/* eslint-disable react/jsx-props-no-spreading */ +import React, { Component } from 'react'; import propTypes from 'prop-types'; +import { observer } from 'mobx-react'; import styles from './Input.scss'; -const Input = ({ - children, type, required = false, placeholder, className = '', errorText, -}) => ( -
- {children} - - {placeholder} -

- {errorText} -

-
-
-); +@observer +class Input extends Component { + constructor(props) { + super(props); + this.state = { + + }; + } + + handleOnChange(e) { + const { field } = this.props; + field.onChange(e); + } + + render() { + const { + children, field, className, + } = this.props; + console.log(field); + return ( +
+ {children} + + {field.placeholder} +

+ {field.error} +

+
+
+ ); + } +} + Input.propTypes = { children: propTypes.element.isRequired, - type: propTypes.string.isRequired, - placeholder: propTypes.string.isRequired, className: propTypes.string, - errorText: propTypes.string.isRequired, - required: propTypes.bool.isRequired, + field: propTypes.object.isRequired, }; Input.defaultProps = { className: '', diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 32d53638..4b850e88 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -2,14 +2,17 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; +import { NavLink } from 'react-router-dom'; import Container from '../Container'; import Header from '../Header'; import Heading from '../Heading'; import Input from '../Input'; +import { seedForm } from '../../stores/FormsStore'; import styles from '../Login/Login.scss'; import FormBlock from '../FormBlock'; -import { Button } from '../Button'; +import { Button, IconButton } from '../Button'; +import { BackIcon } from '../Icons'; @inject('appStore', 'userStore') @observer @@ -32,18 +35,25 @@ class InputSeed extends Component { {'Проверка резервной фразы'} {'Введите фразу, которую вы записали'} -
- {seed.map((word, index) => ( - - {index + 1} - - ))} -
-
- -
+
+
+ {seed.map((word, index) => ( + + {index + 1} + + ))} +
+
+ +
+
- + + + + Назад + +
); @@ -52,6 +62,7 @@ class InputSeed extends Component { InputSeed.propTypes = { userStore: propTypes.object.isRequired, + }; export default InputSeed; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 9606baa9..740427ea 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -1,7 +1,9 @@ +/* eslint-disable no-alert */ +/* eslint-disable no-console */ import React, { Component } from 'react'; import { observer, inject } from 'mobx-react'; import propTypes from 'prop-types'; -import { NavLink } from 'react-router-dom'; +import { NavLink, Redirect } from 'react-router-dom'; import Container from '../Container'; import Header from '../Header'; import FormBlock from '../FormBlock'; @@ -11,6 +13,7 @@ import { CreditCard, Password } from '../Icons'; import Input from '../Input'; import { Button } from '../Button'; import Loader from '../Loader'; +import LoginForm from '../../stores/FormsStore/LoginForm'; import styles from './Login.scss'; @@ -21,7 +24,6 @@ class Login extends Component { constructor(props) { super(props); this.state = { - loading: false, }; } @@ -30,29 +32,44 @@ class Login extends Component { appStore.readWalletList(); } - Login = () => { - const { userStore } = this.props; - this.setState({ - loading: true, - }); - userStore.login(); - } - createKey = () => { const { appStore } = this.props; appStore.setMasterState('createWallet', 'passwordInput'); } render() { - const { appStore } = this.props; - const { loading } = this.state; + // eslint-disable-next-line no-unused-vars + const { appStore, userStore } = this.props; + const { logging } = userStore; + const loginForm = new LoginForm({ + hooks: { + onSuccess(form) { + userStore.readWallet(form.values().password).then((data) => { + console.log(data); + }); + }, + onError(form) { + alert('Form has errors'); + console.log(form.errors()); + }, + }, + }); + + if (userStore.redirectToProjects) return ; return (
{ - !loading - ? + !logging + ? ( + + ) : }
@@ -61,27 +78,32 @@ class Login extends Component { } } -const InputForm = ({ appStore, submit, createKey }) => ( +const InputForm = ({ + appStore, form, createKey, +}) => ( {'Вход в систему'} {'Приготовьтесь к новой эре в сфере голосования'} - - - - - - -
- - - - - - - -
+
+ + + + + + +
+ + + + + + + +
+ +
); @@ -101,8 +123,8 @@ Login.propTypes = { }; InputForm.propTypes = { appStore: propTypes.object.isRequired, - submit: propTypes.func.isRequired, createKey: propTypes.func.isRequired, + form: propTypes.object.isRequired, }; diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js new file mode 100644 index 00000000..a07efdcb --- /dev/null +++ b/src/components/ShowSeed/index.js @@ -0,0 +1,90 @@ +/* eslint-disable class-methods-use-this */ +/* eslint-disable react/jsx-props-no-spreading */ +import React, { Component } from 'react'; +import propTypes from 'prop-types'; +import { inject, observer } from 'mobx-react'; +import { NavLink, Redirect } from 'react-router-dom'; +import Container from '../Container'; +import Header from '../Header'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import { IconButton, Button } from '../Button'; +import { BackIcon } from '../Icons'; + +import styles from '../Login/Login.scss'; + +@inject('userStore', 'appStore') +@observer +class ShowSeed extends Component { + constructor(props) { + super(props); + this.state = { + visible: false, + }; + } + + + toggleWords = () => { + const { visible } = this.state; + this.setState({ + visible: !visible, + }); + } + + redirectToInput() { + return ; + } + + render() { + const { userStore } = this.props; + const { visible } = this.state; + return ( + +
+
+ + + {'Резервная фраза'} + {'Нужна для восстановления пароля'} + +
+ {userStore._mnemonic.map((word, id) => ( + + ))} +
+
+ + + +
+
+ + + + Назад + + +
+ + ); + } +} + +const SeedWord = ({ word, id, visible }) => ( +

+ {id + 1} + {visible ? word : ('*').repeat(word.length)} +

+); + +ShowSeed.propTypes = { + userStore: propTypes.object.isRequired, + appStore: propTypes.object.isRequired, +}; +SeedWord.propTypes = { + id: propTypes.number.isRequired, + word: propTypes.string.isRequired, + visible: propTypes.bool.isRequired, +}; + +export default ShowSeed; diff --git a/src/config.json b/src/config.json new file mode 100644 index 00000000..24065de2 --- /dev/null +++ b/src/config.json @@ -0,0 +1,14 @@ +{ + "host": "https://ropsten.infura.io/v3/14b2319f08e24f3aadfe1aa933301b38", + "gasPrice": 40000000000, + "projects": [ + { + "name": "tetete", + "address": "0x1Df6AdA9f170D0FdFb075140333A44c0C651f4AC" + }, + { + "name": "test", + "address": "0x1Cd9D97EC3f3283cD564bB82f7d0Ee2737D6F352" + } + ] +} \ No newline at end of file From c210c0e405c37b7f44a6443991c6767b309db2d8 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 17:55:57 +0700 Subject: [PATCH 072/219] Fixed wrong route --- src/components/Router/SimpleRouter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 242d14d9..75e95e5d 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -23,9 +23,9 @@ const SimpleRouter = () => ( - - - + + + From 340f4a94c1233abea9488cf21eec5e13b69d586e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 17:57:16 +0700 Subject: [PATCH 073/219] Added className prop to form block --- src/components/FormBlock/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/FormBlock/index.js b/src/components/FormBlock/index.js index 1e419fd7..2c672583 100644 --- a/src/components/FormBlock/index.js +++ b/src/components/FormBlock/index.js @@ -1,13 +1,17 @@ import React from 'react'; import propTypes from 'prop-types'; -const FormBlock = ({ children }) => ( -
+const FormBlock = ({ children, className }) => ( +
{children}
); FormBlock.propTypes = { children: propTypes.node.isRequired, + className: propTypes.string, +}; +FormBlock.defaultProps = { + className: '', }; export default FormBlock; From b14f42bd912e870c0ad0d3e4effce2b8ae0ecba0 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 17:58:14 +0700 Subject: [PATCH 074/219] Added new components --- src/components/AddExisitingProject/index.js | 89 +++++++++++++++++-- src/components/AddNewProject/index.js | 38 ++++++-- src/components/CreateNewProject/index.js | 61 +++++++++++-- .../CreateNewProjectWithTokens/index.js | 22 +++-- src/components/CreateWallet/index.js | 1 - src/components/Login/Login.scss | 37 ++++++++ src/components/Login/index.js | 6 +- 7 files changed, 223 insertions(+), 31 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 530745ab..78e04474 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -1,12 +1,89 @@ -import React from 'react'; +import React, { Component } from 'react'; +import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import { Button } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import Loader from '../Loader'; -const AddExistingProject = () => ( -
- AddExistingProject - К списку проектов -
+import styles from '../Login/Login.scss'; + +class AddExistingProject extends Component { + constructor(props) { + super(props); + this.state = { + step: 'default', + }; + } + + connectProject = () => { + this.setState({ + step: 'loading', + }); + + setTimeout(() => { + this.setState({ + step: 'success', + }); + }, 5000); + } + + render() { + const { step } = this.state; + return ( + +
+
+ {step === 'default' ? : ''} + {step === 'loading' ? : ''} + {step === 'success' ? : ''} + К списку проектов +
+ + + ); + } +} +const InputBlock = ({ onSubmit }) => ( + + + {'Создание нового проекта'} + {'Выберите подходящий вам вариант'} + +
+
+ +
+
+
+); + +const LoadingBlock = () => ( + + + {'Проверяем адрес проекта'} + {'Это не займет много времени'} + + + +); +const MessageBlock = () => ( + + + {'Проект успешно подключен!'} + {'Теперь можно начать работу с ним или выбрать другой проект'} + + + + + + ); +InputBlock.propTypes = { + onSubmit: propTypes.func.isRequired, +}; export default AddExistingProject; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 816043f7..47d6cbb5 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -1,13 +1,41 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; +import { IconButton } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import { CreateToken } from '../Icons'; + +import styles from '../Login/Login.scss'; const AddNewProject = () => ( -
- AddNewProject - With tokens - Without tokens -
+ +
+
+ + + {'Создание нового проекта'} + {'Выберите подходящий вам вариант'} + +
+ + + + Создать + + + + + + Подключить + + +
+
+
+ ); export default AddNewProject; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 30d719fb..1224f824 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -1,12 +1,57 @@ -import React from 'react'; +import React, { Component } from 'react'; +// import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import { observer } from 'mobx-react'; +import { IconButton } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import { Ethereum, CreateToken } from '../Icons'; + +import styles from '../Login/Login.scss'; + +@observer +class CreateNewProject extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + render() { + return ( + +
+
+ + + {'Создание нового проекта'} + {'Выберите подходящий вам вариант'} + +
+ + + + Подключить контракт и создать проект + + + + + + Создать новые токены и проект + + +
+
+
+ + ); + } +} + +CreateNewProject.propTypes = { + +}; -const CreateNewProject = () => ( -
- CreateNewProject - существующий - новый -
-); export default CreateNewProject; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 01ebdd25..b3009036 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -1,12 +1,20 @@ -import React from 'react'; +import React, { Component } from 'react'; import { NavLink } from 'react-router-dom'; -const CreateNewProjectWithTokens = () => ( -
- CreateNewProjectWithTokens - upload +class CreateNewProjectWithTokens extends Component { + constructor(props) { + super(props); + this.state = {}; + } -
-); + render() { + return ( +
+ CreateNewProjectWithTokens + upload +
+ ); + } +} export default CreateNewProjectWithTokens; diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 15d7cc85..289aeaa2 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -37,7 +37,6 @@ class CreateWallet extends Component { } render() { - console.log(this.props); const { appStore } = this.props; const { masterSubState } = appStore; const { redirect } = this.state; diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index d7e1f4a6..2f9ef7b0 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -7,6 +7,15 @@ background-color: $white; border: 1px solid $lightGrey; transform: translate(-50%, -50%); + &--wide { + width: 550px; + .form__block { + padding: 60px 50px; + .btn { + margin: 0; + } + } + } &__block { padding: 60px 90px; text-align: center; @@ -76,4 +85,32 @@ transform: translateY(-50%); } } +} +.projects { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + .btn { + display: inline-block; + } +} +.create { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + &>a { + width: 45%; + } + .btn--white { + display: inline-block; + width: 100%; + padding: 15px; + svg { + height: 25px; + margin: 0 0 10px; + path { + fill: $white; + } + } + } } \ No newline at end of file diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 740427ea..5eea93e3 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -44,9 +44,7 @@ class Login extends Component { const loginForm = new LoginForm({ hooks: { onSuccess(form) { - userStore.readWallet(form.values().password).then((data) => { - console.log(data); - }); + userStore.readWallet(form.values().password); }, onError(form) { alert('Form has errors'); @@ -55,7 +53,7 @@ class Login extends Component { }, }); - if (userStore.redirectToProjects) return ; + if (userStore.authorized) return ; return (
From 04092bb40070c861b8ef5c679828e11c9beba2e2 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 18:02:33 +0700 Subject: [PATCH 075/219] Some components fixes --- src/components/Button/Button.scss | 8 +++- src/components/ProjectList/index.js | 71 ++++++++++++++++++++++++++--- 2 files changed, 70 insertions(+), 9 deletions(-) diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index f8cd1f84..4b2bf681 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -19,9 +19,8 @@ transition: 0.2s; } } - &--big { - min-width: 140px; + width: 140px; padding: 30px 0; font-weight: bold; font-size: 14px; @@ -119,4 +118,9 @@ &--noborder { border: none; } + &.icon--top{ + svg { + width: 100%; + } + } } diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index f5c6c4c1..c3aa6a29 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -1,10 +1,67 @@ -import React from 'react'; +import React, { Component } from 'react'; +import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import { inject, observer } from 'mobx-react'; +import { Button, IconButton } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import { AddIcon } from '../Icons'; + +import styles from '../Login/Login.scss'; + + +@inject('appStore') +@observer +class ProjectList extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + componentDidMount() { + const { appStore } = this.props; + appStore.readProjectList(); + } + + render() { + const { appStore: { projectList } } = this.props; + const projects = projectList.map((project) => ( + + )); + return ( + +
+
+ + + {'Выбор проекта'} + {'Выберите проект или создайте новый'} + +
+ {' '} + {projects} + + + + Добавить проект + + +
+
+
+ + ); + } +} + +ProjectList.propTypes = { + appStore: propTypes.object.isRequired, +}; -const ProjectList = () => ( -
- ProjectList - Добавить проект -
-); export default ProjectList; From 06f67b0d546bae396129119381243528f46b2bbe Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 18:02:50 +0700 Subject: [PATCH 076/219] New constant and improvements --- src/constants/index.js | 4 +++ src/stores/AppStore/AppStore.js | 8 ++++-- src/stores/UserStore/UserStore.js | 2 +- src/workers/wallet.worker.js | 48 ++++++++++++++++++------------- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/constants/index.js b/src/constants/index.js index 99888911..56afca8f 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -9,6 +9,10 @@ export const votingStates = { export const fs = window.require('fs'); export const path = window.require('path'); +export const ROOT_DIR = window.__ENV === 'production' + ? window.process.env.PORTABLE_EXECUTABLE_DIR + : path.join(window.process.env.INIT_CWD, './src/'); + export const PATH_TO_WALLETS = window.__ENV === 'production' ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './wallets/') : path.join(window.process.env.INIT_CWD, './src/wallets/'); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 743a469c..c9eb63a9 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,5 +1,7 @@ import { observable, action, computed } from 'mobx'; -import { fs, path, PATH_TO_WALLETS } from '../../constants'; +import { + fs, path, PATH_TO_WALLETS, ROOT_DIR, +} from '../../constants'; class AppStore { @@ -97,8 +99,8 @@ class AppStore { * @function */ @action readProjectList = () => { - const project = {}; - this.projectList.push(project); + const config = JSON.parse(fs.readFileSync(path.join(ROOT_DIR, './config.json'))); + this.projectList = config.projects; } /** diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index c6a3d8bb..db5db132 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -64,9 +64,9 @@ class UserStore { if (data.privateKey) { this.privateKey = data.privateKey; this.authorized = true; - this.redirectToProjects = true; resolve(data.privateKey); } else { + this.logging = false; reject(); } }); diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index a881ecd6..e1e0090d 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -6,29 +6,37 @@ const bip39 = require('bip39'); const walletHdPath = "m/44'/60'/0'/0/0"; const createWallet = ({ id, payload: { mnemonic, password, action } }) => { - const wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) - .derivePath(walletHdPath) - .deriveChild(0) - .getWallet(); - - const privateKey = wallet.getPrivateKeyString(); - const v3wallet = wallet.toV3(password); - - const payload = { - action, - privateKey, - wallet, - v3wallet, - mnemonic, - }; - return { id, payload }; + try { + const wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) + .derivePath(walletHdPath) + .deriveChild(0) + .getWallet(); + + const privateKey = wallet.getPrivateKeyString(); + const v3wallet = wallet.toV3(password); + + const payload = { + action, + privateKey, + wallet, + v3wallet, + mnemonic, + }; + return { id, payload }; + } catch (e) { + return { id, payload: { e } }; + } }; const readWallet = ({ id, payload: { input, password } }) => { - const data = { - privateKey: ejsWallet.fromV3(input, password).getPrivateKeyString(), - }; - return { id, payload: data }; + try { + const data = { + privateKey: ejsWallet.fromV3(input, password).getPrivateKeyString(), + }; + return { id, payload: data }; + } catch (e) { + return { id, payload: e }; + } }; From e37c9464cf601ed5ccf162a28716779154de64ef Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 1 Nov 2019 18:15:02 +0700 Subject: [PATCH 077/219] Fixed routes --- src/components/CreateNewProject/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 1224f824..bbe6a899 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -29,13 +29,13 @@ class CreateNewProject extends Component { {'Выберите подходящий вам вариант'}
- + Подключить контракт и создать проект - + Создать новые токены и проект From 19936b150aee3bde199b9127eabb31ed312864ad Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 10:25:54 +0700 Subject: [PATCH 078/219] Fixed two components --- src/assets/styles/style.scss | 4 ++++ src/components/AddExisitingProject/index.js | 4 ++-- src/components/AddNewProject/index.js | 10 ++++----- src/components/Button/Button.scss | 2 +- src/components/Icons/index.js | 6 +++++ src/components/Login/Login.scss | 25 +++++++++++++++++++++ 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index ed2474fc..2f526113 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -15,6 +15,10 @@ a { color: inherit; text-decoration: none; } +svg { + width: 18px; + height: 18px; +} ::-webkit-scrollbar-thumb { border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 78e04474..dfefa5dd 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -50,8 +50,8 @@ class AddExistingProject extends Component { const InputBlock = ({ onSubmit }) => ( - {'Создание нового проекта'} - {'Выберите подходящий вам вариант'} + {'Подключить проект'} + {'Cоздайте новый или подключите уже существующий'}
diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 47d6cbb5..a32a1ba8 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -5,7 +5,7 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; -import { CreateToken } from '../Icons'; +import { CreateToken, ChainIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -16,10 +16,10 @@ const AddNewProject = () => (
- {'Создание нового проекта'} - {'Выберите подходящий вам вариант'} + {'Добавление проекта'} + {'Cоздайте новый или подключите уже существующий'} -
+
@@ -28,7 +28,7 @@ const AddNewProject = () => ( - + Подключить diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 4b2bf681..b560d89b 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -1,7 +1,7 @@ @import "../../assets/styles/partials/variables"; .btn { - padding: 0; + padding: 14px 0; text-decoration: none; border: none; border-radius: 2px; diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index e52cb0a3..d192ec68 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -118,3 +118,9 @@ export const CloseIcon = () => ( ); +export const ChainIcon = () => ( + + + + +); diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 2f9ef7b0..14f9336e 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -113,4 +113,29 @@ } } } +} +.add-project { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + a { + display: inline-block; + width: calc(50% - 5px); + .btn { + width: 100%; + svg { + path { + fill: $white + } + } + &:active { + svg { + path { + fill: $primary; + stroke: $white; + } + } + } + } + } } \ No newline at end of file From d64e7ed4481dac413b8556554bb931fa816db88e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 10:26:24 +0700 Subject: [PATCH 079/219] removed unnecessary console.log --- src/components/Input/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 84cd74c4..ca9fe9e1 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -23,7 +23,6 @@ class Input extends Component { const { children, field, className, } = this.props; - console.log(field); return (
{children} From d5636ea4c9252ac9345f973078ddfd44a560384d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 16:34:01 +0700 Subject: [PATCH 080/219] Maked layouts for cerating project components --- src/components/AddExisitingProject/index.js | 1 + .../CreateNewProjectWithTokens/index.js | 150 ++++++++++++++++- .../CreateNewProjectWithoutTokens/index.js | 153 +++++++++++++++++- src/components/Indicator/Indicator.scss | 3 + src/components/Login/Login.scss | 37 ++--- 5 files changed, 311 insertions(+), 33 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index dfefa5dd..e20d1c25 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -70,6 +70,7 @@ const LoadingBlock = () => ( ); + const MessageBlock = () => ( diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index b3009036..0fced041 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -1,20 +1,158 @@ import React, { Component } from 'react'; -import { NavLink } from 'react-router-dom'; +import { inject, observer } from 'mobx-react'; +import propTypes from 'prop-types'; +import { NavLink, Redirect } from 'react-router-dom'; +import { Button } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import Loader from '../Loader'; +import Indicator from '../Indicator'; + +import styles from '../Login/Login.scss'; + +@inject('userStore', 'appStore') +@observer class CreateNewProjectWithTokens extends Component { constructor(props) { super(props); - this.state = {}; + this.state = { + position: 'token', + step: 1, + }; + } + + checkToken = () => { + this.setState({ + position: 'check', + }); + setTimeout(() => { + this.setState({ + position: 'tokenChecked', + step: 2, + }); + }, 2000); + } + + gotoProjectInfo = () => { + this.setState({ + position: 'projectInfo', + step: 3, + }); + } + + gotoUploading = () => { + this.setState({ + position: 'uploading', + }); } render() { + const { position, step } = this.state; + if (position === 'uploading') return ; return ( -
- CreateNewProjectWithTokens - upload -
+ +
+
+ + {position === 'token' ? : ''} + {position === 'check' ? : ''} + {position === 'tokenChecked' ? : ''} + {position === 'projectInfo' ? : ''} +
+ + ); } } +const InputTokenAddress = ({ onSubmit }) => ( + + + {'Подключение контракта'} + {'Владелец этого контракта будет считаться и владельцем создаваемого проекта'} + + +
+ +
+ + upload +
+); + +const LoadingBlock = () => ( + + + {'Проверяем адрес контракта'} + {'Это не займет много времени'} + + + +); + +const ContractConfirmation = ({ onSubmit }) => ( + + + {'Контракт успешно подключен!'} + {'Проверьте правильность данных перед тем, как продолжить'} + +
+
+ +
+
+
+); + +const InputProjectData = ({ onSubmit }) => ( + + + {'Создание проекта'} + {'Контракт проекта будет загружен в сеть при помощи кошелька'} + +
+
+ +
+
+
+); + +const StepIndicator = ({ step, count }) => ( +
+

+ Шаг + {' '} + {step} + {' '} + из + {' '} + {count} +

+

+ = 1} /> + = 2} /> + = 3} /> +

+
+); + + +InputTokenAddress.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +ContractConfirmation.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +InputProjectData.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +StepIndicator.propTypes = { + step: propTypes.number.isRequired, + count: propTypes.number.isRequired, +}; + export default CreateNewProjectWithTokens; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index d7186b39..10a70752 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -1,11 +1,154 @@ -import React from 'react'; -import { NavLink } from 'react-router-dom'; +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import propTypes from 'prop-types'; +import { NavLink, Redirect } from 'react-router-dom'; +import { Button } from '../Button'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import Loader from '../Loader'; +import Indicator from '../Indicator'; -const CreateNewProjectWithoutTokens = () => ( -
- CreateNewProjectWithoutTokens +import styles from '../Login/Login.scss'; + +@inject('userStore', 'appStore') +@observer +class CreateNewProjectWithoutTokens extends Component { + constructor(props) { + super(props); + this.state = { + position: 'token', + step: 1, + }; + } + + createToken = () => { + this.setState({ + position: 'creation', + }); + setTimeout(() => { + this.setState({ + position: 'tokenCreated', + }); + }, 2000); + } + + gotoProjectInfo = () => { + this.setState({ + position: 'projectInfo', + step: 2, + }); + } + + + gotoUploading = () => { + this.setState({ + position: 'uploading', + }); + } + + render() { + const { position, step } = this.state; + if (position === 'uploading') return ; + return ( + +
+
+ + {position === 'token' ? : ''} + {position === 'creation' ? : ''} + {position === 'tokenCreated' ? : ''} + {position === 'projectInfo' ? : ''} +
+ + ); + } +} + +const CreateTokenData = ({ onSubmit }) => ( + + + {'Создание токенов'} + {''} + +
+
+ +
+
upload +
+); +const LoadingBlock = () => ( + + + {'Создаем токены ERC20'} + {'Это не займет много времени'} + + + +); + +const TokenCreationAlert = ({ onSubmit }) => ( + + + {'Токены успешно созданы!'} + {'Теперь нужно создать проект'} + +
+
+ +
+
+
+); + +const InputProjectData = ({ onSubmit }) => ( + + + {'Создание проекта'} + {'Контракт проекта будет загружен в сеть при помощи кошелька'} + +
+
+ +
+
+
+); + +const StepIndicator = ({ step, count }) => ( +
+

+ Шаг + {' '} + {step} + {' '} + из + {' '} + {count} +

+

+ = 1} /> + = 2} /> +

); + +CreateTokenData.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +TokenCreationAlert.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +InputProjectData.propTypes = { + onSubmit: propTypes.func.isRequired, +}; +StepIndicator.propTypes = { + step: propTypes.number.isRequired, + count: propTypes.number.isRequired, +}; + export default CreateNewProjectWithoutTokens; diff --git a/src/components/Indicator/Indicator.scss b/src/components/Indicator/Indicator.scss index d6723b32..f479b158 100644 --- a/src/components/Indicator/Indicator.scss +++ b/src/components/Indicator/Indicator.scss @@ -4,8 +4,11 @@ display: inline-block; width: 8px; height: 8px; + margin: 10px 5px; + background-color: $white; border: 1px solid $primary; transform: rotate(45deg); + transition: .3s linear; &--checked { background-color: $primary; } diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 14f9336e..65f46a60 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -94,34 +94,15 @@ display: inline-block; } } -.create { +.create, .add-project { display: flex; flex-flow: row wrap; justify-content: space-between; &>a { - width: 45%; - } - .btn--white { - display: inline-block; - width: 100%; - padding: 15px; - svg { - height: 25px; - margin: 0 0 10px; - path { - fill: $white; - } - } - } -} -.add-project { - display: flex; - flex-flow: row wrap; - justify-content: space-between; - a { display: inline-block; width: calc(50% - 5px); - .btn { + .btn--white { + display: inline-block; width: 100%; svg { path { @@ -138,4 +119,16 @@ } } } +} +.create { + .btn--white { + padding: 15px; + svg { + height: 25px; + margin: 0 0 10px; + path { + fill: $white; + } + } + } } \ No newline at end of file From d2c1f63b3dd951e078490fc8e2408293fb1e821f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 18:13:28 +0700 Subject: [PATCH 081/219] new Icons --- src/components/Icons/index.js | 178 ++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index d192ec68..4c747d5b 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -124,3 +124,181 @@ export const ChainIcon = () => ( ); + + +export const CompilingIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export const SendingIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export const TxHashIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export const TxRecieptIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export const QuestionUploadingIcon = () => ( + + + + + + + + + + + + + + + + + + +); From cbb978eabc0d3a03a9b7a11e54e1c50c3cf275b9 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 18:13:44 +0700 Subject: [PATCH 082/219] added ultrawide wrapper --- src/components/Login/Login.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 65f46a60..d89cfd3a 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -16,6 +16,9 @@ } } } + &--ultrawide { + width: 1062px; + } &__block { padding: 60px 90px; text-align: center; @@ -131,4 +134,9 @@ } } } +} +.progress { + display: flex; + flex-flow: row nowrap; + justify-content: space-around; } \ No newline at end of file From 4e804335139a389209119a30d014d33ad2f9796e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 18:14:17 +0700 Subject: [PATCH 083/219] added contract uploading progress layout --- .../ProjectUploading/ProgressBlock/index.js | 28 ++++++ src/components/ProjectUploading/index.js | 94 +++++++++++++++++-- 2 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 src/components/ProjectUploading/ProgressBlock/index.js diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js new file mode 100644 index 00000000..b5a111f6 --- /dev/null +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -0,0 +1,28 @@ +import React from 'react'; +import propTypes from 'prop-types'; + +const ProgressBlock = ({ + children, text, index, state, noline, +}) => ( +
index ? 'success' : ''}`}> + + + + + + +
+ {children} +
+

{text}

+ {!noline ?
: ''} +
+); +ProgressBlock.propTypes = { + children: propTypes.element.isRequired, + text: propTypes.string.isRequired, + index: propTypes.number.isRequired, + state: propTypes.number.isRequired, + noline: propTypes.bool.isRequired, +}; +export default ProgressBlock; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 8d782866..77ad93d0 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -1,12 +1,92 @@ -import React from 'react'; +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +// import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import Container from '../Container'; +import Header from '../Header'; +import styles from '../Login/Login.scss'; +import ProgressBlock from './ProgressBlock'; +import { + CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, +} from '../Icons'; + +@inject('userStore', 'appStore') +@observer +class ProjectUploading extends Component { + constructor(props) { + super(props); + this.state = { + step: 0, + }; + } + + render() { + const { step } = this.state; + return ( + +
+
+ + + {'Загружаем контракт'} + {'Это может занять до 5 минут'} + +
+ + + + + + + + + + + + + + + +
+ +
+
+ projects + + ); + } +} + +// //ProjectUploading.propTypes = {}; -const ProjectUploading = () => ( -
- ProjectUploading - To projects -
-); export default ProjectUploading; From 946317df7838f7882b4584bfbfcf155698553b2b Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 5 Nov 2019 18:33:59 +0700 Subject: [PATCH 084/219] small style improvements --- src/assets/styles/style.scss | 149 ++++++++++++++++++++++++++++++++ src/components/Login/Login.scss | 3 + 2 files changed, 152 insertions(+) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 2f526113..d2b1575f 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -19,6 +19,155 @@ svg { width: 18px; height: 18px; } + +.step-indicator { + position: absolute; + bottom: 100%; + left: 50%; + color: #808080; + font-size: 12px; + text-align: center; + transform: translate(-50%, 30%); +} + +.progress-block{ + position: relative; + display: inline-block; + width: 80px; + height: 80px; + transition: .3s linear; + .progress-line{ + position: absolute; + top: 50%; + left: 100%; + width: 96px; + border-top: 2px dashed rgba($color: $primary, $alpha: .5); + transform: translateY(-50%); + opacity: 0; + transition: .3s ease-in; + } + &__icon { + position: absolute; + top: 50%; + left: 50%; + display: inline-block; + transform: translate(-50%, -50%); + & > svg { + width: 42px; + height: 42px; + path { + fill: rgba($color: $primary, $alpha: .5); + } + } + } + &>svg { + position: absolute; + top: 0%; + left: 50%; + width: 80px; + height: 80px; + transform: translate(-50%, 0%) scale(1); + } + .stroke-still { + stroke-dasharray: 2; + stroke-width: 4; + stroke: rgba($color: $primary, $alpha: .5); + } + + & > img { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + opacity: .5; + } + &>p{ + width: 100%; + margin: 90px 0 0; + color: #37474F; + font-size: 12px; + opacity: .5; + &+strong { + display: inline-block; + width: 165%; + margin: 5px 0 0 -35%; + } + } + &.success{ + .stroke-still { + stroke: rgba($color: $primary, $alpha: 1); + } + & > img { + opacity: 1; + } + .progress-line{ + width: 96px; + border-top: 2px solid rgba($color: $primary, $alpha: .5); + opacity: 1; + } + + } + &.active{ + & > img { + opacity: 1; + } + .progress-block__icon { + svg { + path { + fill: $primary + } + } + } + .progress-line { + opacity: 1; + } + .stroke-still { + stroke: transparent; + } + .stroke-animation { + stroke-width: 4; + animation: stroke-spacing 4s ease-in, stroke-color 5.2s linear; + animation-iteration-count: infinite; + animation-delay: 0; + animation-direction: normal; + animation-fill-mode: forwards; + animation-play-state: running; + transform-origin: center center; + } + } +} + + +@keyframes stroke-spacing { + 0% { + stroke-dasharray: 0 200; + } + 45% { + stroke-dashoffset: 0; + stroke-dasharray: 200 200; + } + 90% { + stroke-dashoffset: -200; + stroke-dasharray: 200 200; + } + 100% { + stroke-dashoffset: -200; + stroke-dasharray: 200 200; + } +} + + +@keyframes stroke-color { + 0% { stroke: $primary; } + 24% { stroke: $primary; } + 25% { stroke: $primary; } + 49% { stroke: $primary; } + 50% { stroke: $primary; } + 74% { stroke: $primary; } + 75% { stroke: $primary; } + 99% { stroke: $primary; } +} + ::-webkit-scrollbar-thumb { border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index d89cfd3a..e7cb3218 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -18,6 +18,9 @@ } &--ultrawide { width: 1062px; + .form__block { + padding: 70px 90px 110px; + } } &__block { padding: 60px 90px; From e02c3aef7d5f3c9fecd296951d5f5a179912d2eb Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 6 Nov 2019 18:29:12 +0700 Subject: [PATCH 085/219] Created forms for master --- src/stores/FormsStore/ConnectProject.js | 20 +++++++++++++ src/stores/FormsStore/ConnectToken.js | 20 +++++++++++++ src/stores/FormsStore/CreateProject.js | 26 +++++++++++++++++ src/stores/FormsStore/CreateToken.js | 38 +++++++++++++++++++++++++ src/stores/FormsStore/SeedForm.js | 16 +++-------- src/stores/FormsStore/index.js | 7 ----- src/stores/UserStore/UserStore.js | 3 +- 7 files changed, 110 insertions(+), 20 deletions(-) create mode 100644 src/stores/FormsStore/ConnectProject.js create mode 100644 src/stores/FormsStore/ConnectToken.js create mode 100644 src/stores/FormsStore/CreateProject.js create mode 100644 src/stores/FormsStore/CreateToken.js delete mode 100644 src/stores/FormsStore/index.js diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js new file mode 100644 index 00000000..3310cc24 --- /dev/null +++ b/src/stores/FormsStore/ConnectProject.js @@ -0,0 +1,20 @@ +import ExtendedForm from '../../models/FormModel'; + +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ + +class ConnectProjectForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'address', + type: 'text', + label: 'Token Address', + placeholder: 'Введите адрес контракта', + rules: 'required|string|between:42,42', + }], + }; + } +} +export default ConnectProjectForm; diff --git a/src/stores/FormsStore/ConnectToken.js b/src/stores/FormsStore/ConnectToken.js new file mode 100644 index 00000000..04ce6fa6 --- /dev/null +++ b/src/stores/FormsStore/ConnectToken.js @@ -0,0 +1,20 @@ +import ExtendedForm from '../../models/FormModel'; + +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ + +class ConnectTokenForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'address', + type: 'text', + label: 'Token Address', + placeholder: 'Введите адрес контракта', + rules: 'required|string|between:42,42', + }], + }; + } +} +export default ConnectTokenForm; diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js new file mode 100644 index 00000000..91468937 --- /dev/null +++ b/src/stores/FormsStore/CreateProject.js @@ -0,0 +1,26 @@ +import ExtendedForm from '../../models/FormModel'; + +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ + +class СreateProjectForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'name', + type: 'text', + label: 'Project name', + placeholder: 'Придумайте название проекта', + rules: 'required|string', + }, { + name: 'password', + type: 'password', + label: 'Password', + placeholder: 'Введите пароль', + rules: 'required|string|between:5,25', + }], + }; + } +} +export default СreateProjectForm; diff --git a/src/stores/FormsStore/CreateToken.js b/src/stores/FormsStore/CreateToken.js new file mode 100644 index 00000000..aef79ca9 --- /dev/null +++ b/src/stores/FormsStore/CreateToken.js @@ -0,0 +1,38 @@ +import ExtendedForm from '../../models/FormModel'; + +/* eslint-disable no-alert */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ + +class CreateTokenForm extends ExtendedForm { + setup() { + return { + fields: [{ + name: 'name', + type: 'text', + label: 'Имя', + placeholder: 'Придумайте название токена', + rules: 'required|string', + }, { + name: 'symbol', + type: 'text', + label: 'Символ Токена', + placeholder: 'Символ', + rules: 'required|string|between:3,5', + }, { + name: 'count', + type: 'text', + label: 'Количество токенов', + placeholder: 'Количество', + rules: 'required|numeric', + }, { + name: 'password', + type: 'password', + label: 'Password', + placeholder: 'Введите пароль', + rules: 'required|string', + }], + }; + } +} +export default CreateTokenForm; diff --git a/src/stores/FormsStore/SeedForm.js b/src/stores/FormsStore/SeedForm.js index ac86ba65..c0b1691b 100644 --- a/src/stores/FormsStore/SeedForm.js +++ b/src/stores/FormsStore/SeedForm.js @@ -1,17 +1,11 @@ +import ExtendedForm from '../../models/FormModel'; + /* eslint-disable no-alert */ /* eslint-disable no-console */ /* eslint-disable class-methods-use-this */ -import { Form } from 'mobx-react-form'; -import dvr from 'mobx-react-form/lib/validators/DVR'; -import validatorjs from 'validatorjs'; -class SeedForm extends Form { - plugins() { - return { - dvr: dvr(validatorjs), - }; - } +class SeedForm extends ExtendedForm { setup() { const fields = []; for (let i = 1; i < 13; i += 1) { @@ -24,7 +18,5 @@ class SeedForm extends Form { return { fields }; } } -const seedForm = new SeedForm(); - -export default seedForm; +export default SeedForm; diff --git a/src/stores/FormsStore/index.js b/src/stores/FormsStore/index.js deleted file mode 100644 index fb3935fb..00000000 --- a/src/stores/FormsStore/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable import/prefer-default-export */ -import CreateWalletForm from './CreateWalletForm'; -import loginForm from './LoginForm'; -import seedForm from './SeedForm'; - - -export { loginForm, CreateWalletForm, seedForm }; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index db5db132..7640d8a2 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -13,7 +13,7 @@ class UserStore { @observable privateKey = ''; - @observable _mnemonic = []; + @observable _mnemonic = ['spray', 'trap', 'flush', 'awful', 'before', 'prosper', 'gold', 'typical', 'siege', 'mule', 'great', 'bone']; @observable _mnemonicRepeat = []; @@ -27,6 +27,7 @@ class UserStore { @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; + this.address = `0x${wallet.address}`; } /** From 89636d7a84d8c3d758119354e4fc95d7108227fe Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 6 Nov 2019 18:29:27 +0700 Subject: [PATCH 086/219] Forms connected to master --- src/components/AddExisitingProject/index.js | 46 ++++-- src/components/AddNewProject/index.js | 10 +- src/components/Button/Button.scss | 25 ++++ src/components/Button/index.js | 10 +- src/components/Container/Container.scss | 2 +- src/components/CreateNewProject/index.js | 12 +- .../CreateNewProjectWithTokens/index.js | 91 ++++++++++-- .../CreateNewProjectWithoutTokens/index.js | 131 ++++++++++++++++-- src/components/CreateWallet/index.js | 41 +++++- src/components/Explanation/Explanation.scss | 4 + src/components/Explanation/index.js | 4 +- src/components/Header/Header.scss | 9 ++ src/components/Header/index.js | 15 +- src/components/Icons/index.js | 20 +++ src/components/InputSeed/index.js | 23 ++- src/components/Login/Login.scss | 56 +++++++- src/components/Login/index.js | 2 +- src/components/ProjectList/index.js | 2 +- src/components/ProjectUploading/index.js | 2 +- src/components/Router/SimpleRouter.js | 4 +- src/components/ShowSeed/index.js | 15 +- 21 files changed, 454 insertions(+), 70 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index e20d1c25..d8becb96 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; @@ -7,9 +8,13 @@ import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; import Loader from '../Loader'; +import Explanation from '../Explanation'; +import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; import styles from '../Login/Login.scss'; +import Input from '../Input'; +import { Address } from '../Icons'; class AddExistingProject extends Component { constructor(props) { @@ -33,29 +38,54 @@ class AddExistingProject extends Component { render() { const { step } = this.state; + + const connectForm = new ConnectProjectForm({ + hooks: { + onSuccess(form) { + console.log(form.values()); + }, + onError(form) { + console.log(`ALARM ${form}`); + }, + }, + }); return ( -
+
- {step === 'default' ? : ''} + {step === 'default' ? : ''} {step === 'loading' ? : ''} {step === 'success' ? : ''} - К списку проектов
); } } -const InputBlock = ({ onSubmit }) => ( +const InputBlock = ({ form }) => ( {'Подключить проект'} {'Cоздайте новый или подключите уже существующий'} -
+ + +
+
- + +
+
+ +

+ Название задается вами и отображается в списке проектов +

+
+ +

+ Адрес сообщает создатель проекта +

+
@@ -79,12 +109,12 @@ const MessageBlock = () => ( - + ); InputBlock.propTypes = { - onSubmit: propTypes.func.isRequired, + form: propTypes.object.isRequired, }; export default AddExistingProject; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index a32a1ba8..885bcd3f 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -5,14 +5,14 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; -import { CreateToken, ChainIcon } from '../Icons'; +import { CreateToken, ChainIcon, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; const AddNewProject = () => ( -
+
@@ -34,6 +34,12 @@ const AddNewProject = () => (
+ + + + Назад + +
); diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index b560d89b..93b10b41 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -48,6 +48,7 @@ } } &--link { + padding: 0; color: $linkColor; background-color: transparent; border-bottom: 1px solid $linkColor; @@ -118,6 +119,30 @@ &--noborder { border: none; } + &--show-seed { + padding: 15px; + svg { + path{ + fill: $white; + } + } + &:hover { + svg { + path{ + fill: $white; + stroke: $primary; + } + } + } + &:active { + svg { + path{ + fill: $primary; + stroke: $white; + } + } + } + } &.icon--top{ svg { width: 100%; diff --git a/src/components/Button/index.js b/src/components/Button/index.js index b7278e9c..8cc977e4 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -28,10 +28,12 @@ export const IconButton = ({ children, type, className, onClick, }) => ( ); diff --git a/src/components/Container/Container.scss b/src/components/Container/Container.scss index d66651d0..632cd7be 100644 --- a/src/components/Container/Container.scss +++ b/src/components/Container/Container.scss @@ -4,4 +4,4 @@ max-width: 1120px; height: 100vh; margin: 0 auto; -} \ No newline at end of file +} diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index bbe6a899..add198db 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -7,7 +7,7 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; -import { Ethereum, CreateToken } from '../Icons'; +import { Ethereum, CreateToken, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -21,7 +21,7 @@ class CreateNewProject extends Component { render() { return ( -
+
@@ -30,12 +30,14 @@ class CreateNewProject extends Component {
+ Если есть токены ERC20 Подключить контракт и создать проект + Если токенов ERC20 нет Создать новые токены и проект @@ -43,6 +45,12 @@ class CreateNewProject extends Component {
+ + + + Назад + +
); diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 0fced041..4bef511b 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -1,17 +1,25 @@ +/* eslint-disable no-console */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; -import { Button } from '../Button'; +import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; import Loader from '../Loader'; import Indicator from '../Indicator'; +import Explanation from '../Explanation'; +import { + BackIcon, Address, TokenName, Password, +} from '../Icons'; +import ConnectTokenForm from '../../stores/FormsStore/ConnectToken'; +import CreateProjectForm from '../../stores/FormsStore/CreateProject'; import styles from '../Login/Login.scss'; +import Input from '../Input'; @inject('userStore', 'appStore') @observer @@ -24,6 +32,13 @@ class CreateNewProjectWithTokens extends Component { }; } + returnToTokenAddress=() => { + this.setState({ + position: 'token', + step: 1, + }); + } + checkToken = () => { this.setState({ position: 'check', @@ -52,34 +67,64 @@ class CreateNewProjectWithTokens extends Component { render() { const { position, step } = this.state; if (position === 'uploading') return ; + const { gotoUploading } = this; + const connectToken = new ConnectTokenForm({ + hooks: { + onSuccess(form) { + console.log(form.values()); + }, + onError(form) { + console.log(`ALARM ${form}`); + }, + }, + }); + + const createProject = new CreateProjectForm({ + hooks: { + onSuccess(form) { + gotoUploading(); + console.log(form.values()); + }, + onError(form) { + console.log(form); + }, + }, + }); return ( -
+
- {position === 'token' ? : ''} + {position === 'token' ? : ''} {position === 'check' ? : ''} {position === 'tokenChecked' ? : ''} - {position === 'projectInfo' ? : ''} + {position === 'projectInfo' ? : ''}
- ); } } -const InputTokenAddress = ({ onSubmit }) => ( +const InputTokenAddress = ({ form }) => ( {'Подключение контракта'} {'Владелец этого контракта будет считаться и владельцем создаваемого проекта'} -
+ + +
+
- +
+ + + + Назад + + - upload ); @@ -107,16 +152,33 @@ const ContractConfirmation = ({ onSubmit }) => ( ); -const InputProjectData = ({ onSubmit }) => ( +const InputProjectData = ({ form, onClick }) => ( {'Создание проекта'} {'Контракт проекта будет загружен в сеть при помощи кошелька'} -
+ + + + + + +
- + +
+
+ +

+ Название задается вами и отображается в списке проектов +

+
+ { onClick(); }}> + + Назад +
); @@ -142,13 +204,14 @@ const StepIndicator = ({ step, count }) => ( InputTokenAddress.propTypes = { - onSubmit: propTypes.func.isRequired, + form: propTypes.object.isRequired, }; ContractConfirmation.propTypes = { onSubmit: propTypes.func.isRequired, }; InputProjectData.propTypes = { - onSubmit: propTypes.func.isRequired, + form: propTypes.object.isRequired, + onClick: propTypes.func.isRequired, }; StepIndicator.propTypes = { step: propTypes.number.isRequired, diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 10a70752..1fce238b 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -1,15 +1,23 @@ +/* eslint-disable no-console */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; -import { Button } from '../Button'; +import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Header from '../Header'; import Loader from '../Loader'; import Indicator from '../Indicator'; +import Explanation from '../Explanation'; +import Input from '../Input'; +import { + BackIcon, Password, TokenSymbol, TokenCount, TokenName, +} from '../Icons'; +import CreateTokenForm from '../../stores/FormsStore/CreateToken'; +import CreateProjectForm from '../../stores/FormsStore/CreateProject'; import styles from '../Login/Login.scss'; @inject('userStore', 'appStore') @@ -23,6 +31,13 @@ class CreateNewProjectWithoutTokens extends Component { }; } + returnToContractConnecting = () => { + this.setState({ + position: 'token', + step: 1, + }); + } + createToken = () => { this.setState({ position: 'creation', @@ -51,35 +66,105 @@ class CreateNewProjectWithoutTokens extends Component { render() { const { position, step } = this.state; if (position === 'uploading') return ; + const { createToken, gotoUploading } = this; + const CreateToken = new CreateTokenForm({ + hooks: { + onSuccess(form) { + createToken(); + console.log(form.values()); + }, + onError(form) { + console.log(form); + }, + }, + }); + const CreateProject = new CreateProjectForm({ + hooks: { + onSuccess(form) { + gotoUploading(); + console.log(form.values()); + }, + onError(form) { + console.log(form); + }, + }, + }); return ( -
+
- {position === 'token' ? : ''} + {position === 'token' ? : ''} {position === 'creation' ? : ''} {position === 'tokenCreated' ? : ''} - {position === 'projectInfo' ? : ''} + {position === 'projectInfo' ? : ''}
); } } -const CreateTokenData = ({ onSubmit }) => ( +const CreateTokenData = inject('userStore')(observer(({ userStore: { address }, form }) => ( {'Создание токенов'} {''} -
+ +
+ +

+ Контракт будет загружен в сеть при помощи кошелька: +

{address}

+

+

+ Баланс: +

0,1023147932 ETH

+

+

Токены зачислятся на этот кошелек После их можно будет распределить

+
+
+ + + +
+ + + + + + +
+ + +
- + +
+
+ +

+ Символом токена называется его сокращенно название. Например: ETH, BTC и т.п. +

+
+ +

+ Общее число токенов задаете вы. + В дальнейшем их можно будет распределить + между участниками проекта +

+
+ + + + Назад + + - upload
-); +))); + const LoadingBlock = () => ( @@ -104,16 +189,33 @@ const TokenCreationAlert = ({ onSubmit }) => ( ); -const InputProjectData = ({ onSubmit }) => ( +const InputProjectData = ({ form, onClick }) => ( {'Создание проекта'} {'Контракт проекта будет загружен в сеть при помощи кошелька'} -
+ + + + + + +
- + +
+
+ +

+ Название задается вами и отображается в списке проектов +

+
+ { onClick(); }}> + + Назад +
); @@ -138,13 +240,14 @@ const StepIndicator = ({ step, count }) => ( CreateTokenData.propTypes = { - onSubmit: propTypes.func.isRequired, + form: propTypes.object.isRequired, }; TokenCreationAlert.propTypes = { onSubmit: propTypes.func.isRequired, }; InputProjectData.propTypes = { - onSubmit: propTypes.func.isRequired, + form: propTypes.object.isRequired, + onClick: propTypes.func.isRequired, }; StepIndicator.propTypes = { step: propTypes.number.isRequired, diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 289aeaa2..fffbebea 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -12,6 +12,8 @@ import { Password, BackIcon } from '../Icons'; import Input from '../Input'; import { Button, IconButton } from '../Button'; import Loader from '../Loader'; +import Explanation from '../Explanation'; +import Indicator from '../Indicator'; import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; import styles from '../Login/Login.scss'; @@ -40,10 +42,11 @@ class CreateWallet extends Component { const { appStore } = this.props; const { masterSubState } = appStore; const { redirect } = this.state; + const { createWallet } = this; const CreateForm = new CreateWalletForm({ hooks: { - onSuccess(form) { - console.log(form); + onSuccess() { + createWallet(); }, onError(form) { console.log(form); @@ -56,7 +59,7 @@ class CreateWallet extends Component { } return ( -
+
{masterSubState === 0 ? : ''} {masterSubState === 1 ? : ''} @@ -67,8 +70,6 @@ class CreateWallet extends Component {
- - ); } @@ -90,6 +91,36 @@ const PasswordForm = ({ form }) => (
+
+ +

+ Пароль задается на английской раскладке +
+ И должен содержать: +

+

+

    +
  • + + {' '} + цифру + {' '} +
  • +
  • + + {' '} + заглавную букву + {' '} +
  • +
  • + + {' '} + спецсимвол +
  • +
+

+
+
); diff --git a/src/components/Explanation/Explanation.scss b/src/components/Explanation/Explanation.scss index a7ccc335..1961b796 100644 --- a/src/components/Explanation/Explanation.scss +++ b/src/components/Explanation/Explanation.scss @@ -1,11 +1,15 @@ @import '../../assets/styles/partials/variables'; .explanation { display: inline-block; + margin-bottom: 10px; padding: 5px; color: $border; font-size: 12px; &__string { padding-left: 10px; border-left: 1px solid $border; + p { + margin-bottom: 5px; + } } } \ No newline at end of file diff --git a/src/components/Explanation/index.js b/src/components/Explanation/index.js index 959af76f..c2a3f521 100644 --- a/src/components/Explanation/index.js +++ b/src/components/Explanation/index.js @@ -4,7 +4,7 @@ import styles from './Explanation.scss'; const Explanation = ({ children }) => (

-

{children}

+

{children}

); @@ -13,6 +13,6 @@ Explanation.defaultProps = { }; Explanation.propTypes = { - children: propTypes.string, + children: propTypes.any, }; export default Explanation; diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index 0eafa533..f5011a21 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -33,4 +33,13 @@ font-weight: bold; } } + .lang { + padding: 10px; + background-color: #fafbfc; + } + .user { + margin-left: 10px; + vertical-align: middle; + background-color: #FAFBFC; + } } \ No newline at end of file diff --git a/src/components/Header/index.js b/src/components/Header/index.js index f7cc7099..cfd05348 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -1,5 +1,6 @@ import React from 'react'; import propTypes from 'prop-types'; +import { inject, observer } from 'mobx-react'; import Logo from '../Logo'; import HeaderNav from './HeaderNav'; import LangSwitcher from '../LangSwitcher'; @@ -7,19 +8,21 @@ import User from '../User'; import styles from './Header.scss'; -const Header = ({ isMenu, isLogged }) => ( +const Header = inject('userStore')(observer(({ userStore: { authorized, address }, isMenu }) => (
{isMenu ? : ''} -
+
- {isLogged ? : ''} + {authorized ? {address} : ''}
-); +))); Header.propTypes = { - isMenu: propTypes.bool.isRequired, - isLogged: propTypes.bool.isRequired, + isMenu: propTypes.bool, +}; +Header.defaultProps = { + isMenu: false, }; export default Header; diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index 4c747d5b..ffdcfdf6 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -8,6 +8,26 @@ export const AddIcon = () => ( ); +export const CrossedEyeIcon = () => ( + + + + + + + + + + + +); +export const EyeIcon = () => ( + + + + +); + export const BackIcon = () => ( diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 4b850e88..d9eec006 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ /* eslint-disable no-unused-vars */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; @@ -7,13 +8,14 @@ import Container from '../Container'; import Header from '../Header'; import Heading from '../Heading'; import Input from '../Input'; -import { seedForm } from '../../stores/FormsStore'; +import SeedForm from '../../stores/FormsStore/SeedForm'; import styles from '../Login/Login.scss'; import FormBlock from '../FormBlock'; import { Button, IconButton } from '../Button'; import { BackIcon } from '../Icons'; + @inject('appStore', 'userStore') @observer @@ -26,16 +28,29 @@ class InputSeed extends Component { render() { const { userStore } = this.props; const { _mnemonic: seed } = userStore; + + const seedForm = new SeedForm({ + hooks: { + onSuccess(form) { + const values = Object.values(form.values()); + const mnemonic = values.join(' '); + console.log(mnemonic); + }, + onError(form) { + console.log(`ALARM ${form}`); + }, + }, + }); return ( -
+
{'Проверка резервной фразы'} {'Введите фразу, которую вы записали'} -
+
{seed.map((word, index) => ( @@ -44,7 +59,7 @@ class InputSeed extends Component { ))}
- +
diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index e7cb3218..c5c2620c 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -54,6 +54,38 @@ left: 50%; transform: translateX(-50%); } + &__explanation { + position: absolute; + top: 50%; + width: 60%; + text-align: left; + transform: translateY(-50%); + &--left { + right: 100%; + + } + &--right { + left: 102%; + } + ul { + list-style: none; + .indicator { + margin: 7px 5px; + vertical-align: middle; + } + } + } + &__group { + display: flex; + flex-flow: row nowrap; + justify-content: space-between; + .field { + width: 45%; + &__input { + width: 70%; + } + } + } } .seed { display: flex; @@ -89,6 +121,19 @@ width: 65%; margin-left: 0; transform: translateY(-50%); + &:not(:placeholder-shown) { + & ~ .field__line { + width: 0%; + } + } + &:focus { + & ~ .field__line { + width: 100%; + } + } + } + &__line { + width: 0; } } } @@ -97,7 +142,10 @@ flex-flow: row wrap; justify-content: space-between; .btn { - display: inline-block; + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: center; } } .create, .add-project { @@ -137,6 +185,12 @@ } } } + &__label { + display: inline-block; + margin-bottom: 10px; + font-weight: 700; + font-size: 14px; + } } .progress { display: flex; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 5eea93e3..396ee20e 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -56,7 +56,7 @@ class Login extends Component { if (userStore.authorized) return ; return ( -
+
{ !logging diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index c3aa6a29..3d4f49fe 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -36,7 +36,7 @@ class ProjectList extends Component { )); return ( -
+
diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 77ad93d0..37a754a4 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -27,7 +27,7 @@ class ProjectUploading extends Component { const { step } = this.state; return ( -
+
diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 75e95e5d..45e7616d 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -3,7 +3,7 @@ import { MemoryRouter, Route, Switch, withRouter, } from 'react-router-dom'; -import Login from '../Login'; +// import Login from '../Login'; import CreateWallet from '../CreateWallet'; import InputSeed from '../InputSeed'; import ShowSeed from '../ShowSeed'; @@ -18,7 +18,7 @@ import ProjectUploading from '../ProjectUploading'; const SimpleRouter = () => ( - + diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index a07efdcb..acd5e35a 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -8,8 +8,9 @@ import Container from '../Container'; import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; +import Explanation from '../Explanation'; import { IconButton, Button } from '../Button'; -import { BackIcon } from '../Icons'; +import { BackIcon, EyeIcon, CrossedEyeIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -40,7 +41,7 @@ class ShowSeed extends Component { const { visible } = this.state; return ( -
+
@@ -64,6 +65,16 @@ class ShowSeed extends Component { Назад +
+ +

Фраза дает полный контроль над вашей учетной записью

+

Обязательно запишите и не сообщайте ее никому

+
+ + {!visible ? : } + {!visible ? 'Показать фразу' : 'Скрыть фразу'} + +
); From 2a9dfa792f3a4bfa60d951e5e3d0fd8495ebfcdf Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 6 Nov 2019 18:29:59 +0700 Subject: [PATCH 087/219] Replaced path in router --- src/components/Router/SimpleRouter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 45e7616d..75e95e5d 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -3,7 +3,7 @@ import { MemoryRouter, Route, Switch, withRouter, } from 'react-router-dom'; -// import Login from '../Login'; +import Login from '../Login'; import CreateWallet from '../CreateWallet'; import InputSeed from '../InputSeed'; import ShowSeed from '../ShowSeed'; @@ -18,7 +18,7 @@ import ProjectUploading from '../ProjectUploading'; const SimpleRouter = () => ( - + From dcd1f57f330c6542bd4414841c0a24162a17ab08 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 7 Nov 2019 18:13:18 +0700 Subject: [PATCH 088/219] Added contracts --- src/contracts/ERC20.abi | 1 + src/contracts/ERC20.sol | 252 +++++++ src/contracts/IERC20.sol | 84 +++ src/contracts/MERC20.abi | 235 +++++++ src/contracts/MERC20.sol | 103 +++ src/contracts/MERCInterface.sol | 21 + src/contracts/Project/Project.sol | 15 + src/contracts/SafeMath.sol | 65 ++ src/contracts/Voter.abi | 839 ++++++++++++++++++++++ src/contracts/Voter/Voter.sol | 17 + src/contracts/Voter/VoterBase.sol | 488 +++++++++++++ src/contracts/Voter/VoterInterface.sol | 113 +++ src/contracts/Voter/output.sol | 917 +++++++++++++++++++++++++ src/contracts/libs/QuestionGroups.sol | 54 ++ src/contracts/libs/Questions.sol | 56 ++ src/contracts/libs/UserGroups.sol | 54 ++ src/contracts/libs/Votings.sol | 53 ++ src/contracts/output.sol | 399 +++++++++++ src/contracts/project.sol | 50 ++ src/contracts/sysQuestions.json | 128 ++++ 20 files changed, 3944 insertions(+) create mode 100644 src/contracts/ERC20.abi create mode 100644 src/contracts/ERC20.sol create mode 100644 src/contracts/IERC20.sol create mode 100644 src/contracts/MERC20.abi create mode 100644 src/contracts/MERC20.sol create mode 100644 src/contracts/MERCInterface.sol create mode 100644 src/contracts/Project/Project.sol create mode 100644 src/contracts/SafeMath.sol create mode 100644 src/contracts/Voter.abi create mode 100644 src/contracts/Voter/Voter.sol create mode 100644 src/contracts/Voter/VoterBase.sol create mode 100644 src/contracts/Voter/VoterInterface.sol create mode 100644 src/contracts/Voter/output.sol create mode 100644 src/contracts/libs/QuestionGroups.sol create mode 100644 src/contracts/libs/Questions.sol create mode 100644 src/contracts/libs/UserGroups.sol create mode 100644 src/contracts/libs/Votings.sol create mode 100644 src/contracts/output.sol create mode 100644 src/contracts/project.sol create mode 100644 src/contracts/sysQuestions.json diff --git a/src/contracts/ERC20.abi b/src/contracts/ERC20.abi new file mode 100644 index 00000000..6e054f53 --- /dev/null +++ b/src/contracts/ERC20.abi @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"totalSupply","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] \ No newline at end of file diff --git a/src/contracts/ERC20.sol b/src/contracts/ERC20.sol new file mode 100644 index 00000000..c7dd2d5b --- /dev/null +++ b/src/contracts/ERC20.sol @@ -0,0 +1,252 @@ +pragma solidity 0.5; + +import "./IERC20.sol"; +import "./SafeMath.sol"; + +/** + * @dev Implementation of the `IERC20` interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using `_mint`. + * For a generic mechanism see `ERC20Mintable`. + * + * *For a detailed writeup see our guide [How to implement supply + * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an `Approval` event is emitted on calls to `transferFrom`. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard `decreaseAllowance` and `increaseAllowance` + * functions have been added to mitigate the well-known issues around setting + * allowances. See `IERC20.approve`. + */ +contract ERC20 is IERC20 { + using SafeMath for uint256; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + + string private _symbol; + + constructor (string name, string symbol, uint256 totalSupply) public { + _name = name; + _symbol = symbol; + _totalSupply = totalSupply; + _balances[msg.sender] = totalSupply; + } + + /** + * @dev See `IERC20.totalSupply`. + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev See `IERC20.balanceOf`. + */ + function balanceOf(address account) public view returns (uint256) { + return _balances[account]; + } + + /** + * @dev Get the symbol of token. + */ + function symbol() public view returns (string) { + return _symbol; + } + /** + * @dev Get the name of token. + */ + function name() public view returns (string) { + return _name; + } + + /** + * @dev See `IERC20.transfer`. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public returns (bool) { + _transfer(msg.sender, recipient, amount); + return true; + } + + /** + * @dev See `IERC20.allowance`. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See `IERC20.approve`. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 value) public returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + /** + * @dev See `IERC20.transferFrom`. + * + * Emits an `Approval` event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of `ERC20`; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `value`. + * - the caller must have allowance for `sender`'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to `approve` that can be used as a mitigation for + * problems described in `IERC20.approve`. + * + * Emits an `Approval` event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to `approve` that can be used as a mitigation for + * problems described in `IERC20.approve`. + * + * Emits an `Approval` event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to `transfer`, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a `Transfer` event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _balances[sender] = _balances[sender].sub(amount); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a `Transfer` event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destoys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a `Transfer` event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 value) internal { + require(account != address(0), "ERC20: burn from the zero address"); + + _totalSupply = _totalSupply.sub(value); + _balances[account] = _balances[account].sub(value); + emit Transfer(account, address(0), value); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an `Approval` event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 value) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = value; + emit Approval(owner, spender, value); + } + + /** + * @dev Destoys `amount` tokens from `account`.`amount` is then deducted + * from the caller's allowance. + * + * See `_burn` and `_approve`. + */ + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); + } +} \ No newline at end of file diff --git a/src/contracts/IERC20.sol b/src/contracts/IERC20.sol new file mode 100644 index 00000000..0501a2f9 --- /dev/null +++ b/src/contracts/IERC20.sol @@ -0,0 +1,84 @@ +pragma solidity 0.5; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see `ERC20Detailed`. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + /** + * @dev Returns the amount of tokens in existence. + */ + function name() external view returns (string); + /** + * @dev Returns the amount of tokens in existence. + */ + function symbol() external view returns (string); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through `transferFrom`. This is + * zero by default. + * + * This value changes when `approve` or `transferFrom` are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * > Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an `Approval` event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to `approve`. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} \ No newline at end of file diff --git a/src/contracts/MERC20.abi b/src/contracts/MERC20.abi new file mode 100644 index 00000000..8f465543 --- /dev/null +++ b/src/contracts/MERC20.abi @@ -0,0 +1,235 @@ +[ + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOfERC", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "decimals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getUsers", + "outputs": [ + { + "name": "userList", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "user", + "type": "address" + } + ], + "name": "findUser", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "findEmptyUser", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "user", + "type": "address" + }, + { + "name": "balance", + "type": "uint256" + } + ], + "name": "_addUser", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_who", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newAdmin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/src/contracts/MERC20.sol b/src/contracts/MERC20.sol new file mode 100644 index 00000000..70cc00be --- /dev/null +++ b/src/contracts/MERC20.sol @@ -0,0 +1,103 @@ +pragma solidity 0.5; + +contract MERC20 { + string private _name; + string private _symbol; + uint256 private _decimals; + address public admin; + address public owner; + + mapping (address => uint256) balances; + mapping (uint => mapping (address => uint256)) userBalances; + address[] users; + + constructor (string name, string symbol, uint256 decimals ) public { + _name = name; + _symbol = symbol; + _decimals = decimals; + admin = msg.sender; + owner = msg.sender; + balances[msg.sender] = _decimals; + + userBalances[0][msg.sender] = decimals; + users.push(msg.sender); + } + + function symbol() external returns(string) { + return _symbol; + } + function name() external returns(string) { + return _name; + } + function totalSupply() external returns(uint256) { + return _decimals; + } + + function getUsers() external returns (address[]) { + return users; + } + + function balanceOf(address who) external returns (uint256) { + return balances[who]; + } + + function findUser(address user) external returns (uint) { + uint usersLength = users.length; + uint matched = 0; + for (uint i = 0; i < usersLength; i++) { + if (users[i] == user) { + matched = i; + } + } + return matched; + } + + function findEmptyUser() external returns (uint) { + uint usersLength = users.length; + uint matched = 0; + for (uint i = 0; i < usersLength; i++) { + if (users[i] == 0) { + matched = i; + } + } + return matched; + } + + function _addUser(address user, uint256 balance) external returns(uint256) { + uint isUser = this.findUser(user); + uint emptyIndex = this.findEmptyUser(); + if (isUser == 0) { + balances[user] = balance; + userBalances[emptyIndex][user] = balance; + users[emptyIndex] = user; + } + return balances[user]; + } + + + function transferFrom(address _who, address _to, uint256 value) external { + require(msg.sender == admin); + require(_who != address(0), "MERC20: transfer from the zero address"); + require(_to != address(0), "MERC20: transfer to the zero address"); + require(balances[_who] >= value, "MERC20: Token value must be lower or equal"); + + uint index = this.findUser(_to); + if (index == 0 ) { + index = users.length; + users.push(_to); + userBalances[index][_to] = value; + balances[_who] = balances[_who] - value; + balances[_to] = balances[_to] + value; + } else { + userBalances[index][_to] += value; + balances[_who] = balances[_who] - value; + balances[_to] = balances[_to] + value; + } + + } + + function setAdmin(address _newAdmin) external { + admin = _newAdmin; + } + +} \ No newline at end of file diff --git a/src/contracts/MERCInterface.sol b/src/contracts/MERCInterface.sol new file mode 100644 index 00000000..b9f4a773 --- /dev/null +++ b/src/contracts/MERCInterface.sol @@ -0,0 +1,21 @@ +pragma solidity 0.5; + +interface MERCInterface { + + + function symbol() external returns (string); + + function name() external returns (string); + + function totalSupply() external returns (uint256); + + function setAdmin(address who) external ; + + function balanceOfERC(address who) external returns (uint256); + + function balanceOf() external returns (uint256) ; + + function _addUser(address who, uint256 balance) external returns (uint256); + + function transferFrom(address who, address to, uint256 value) external; +} \ No newline at end of file diff --git a/src/contracts/Project/Project.sol b/src/contracts/Project/Project.sol new file mode 100644 index 00000000..1e8a08a1 --- /dev/null +++ b/src/contracts/Project/Project.sol @@ -0,0 +1,15 @@ +pragma solidity 0.5; + + +contract Project { + + uint public test; + + constructor() public { + test = 1; + } + + function updateTest(uint _test) public pure returns (uint result) { + return _test; + } +} diff --git a/src/contracts/SafeMath.sol b/src/contracts/SafeMath.sol new file mode 100644 index 00000000..62cf6358 --- /dev/null +++ b/src/contracts/SafeMath.sol @@ -0,0 +1,65 @@ +pragma solidity 0.5; + +/** + * @title SafeMath + * @dev Unsigned math operations with safety checks that revert on error + */ +library SafeMath { + /** + * @dev Multiplies two unsigned integers, reverts on overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b); + + return c; + } + + /** + * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a); + uint256 c = a - b; + + return c; + } + + /** + * @dev Adds two unsigned integers, reverts on overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a); + + return c; + } + + /** + * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), + * reverts when dividing by zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b != 0); + return a % b; + } +} \ No newline at end of file diff --git a/src/contracts/Voter.abi b/src/contracts/Voter.abi new file mode 100644 index 00000000..0efeb78e --- /dev/null +++ b/src/contracts/Voter.abi @@ -0,0 +1,839 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getVotingDescision", + "outputs": [ + { + "name": "result", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x0d24ef38" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "question", + "outputs": [ + { + "name": "groupId", + "type": "uint256" + }, + { + "name": "status", + "type": "uint8" + }, + { + "name": "caption", + "type": "string" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "time", + "type": "uint256" + }, + { + "name": "target", + "type": "address" + }, + { + "name": "methodSelector", + "type": "bytes4" + }, + { + "name": "_formula", + "type": "uint256[]" + }, + { + "name": "_parameters", + "type": "bytes32[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x1e16f68b" + }, + { + "constant": true, + "inputs": [], + "name": "votings", + "outputs": [ + { + "name": "votingIdIndex", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x352485b7" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getUserGroup", + "outputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "groupType", + "type": "string" + }, + { + "name": "status", + "type": "uint8" + }, + { + "name": "groupAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x352704b7" + }, + { + "constant": true, + "inputs": [], + "name": "getQuestionGroupsLength", + "outputs": [ + { + "name": "length", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x392e1c84" + }, + { + "constant": false, + "inputs": [ + { + "name": "votingId", + "type": "uint256" + } + ], + "name": "returnTokens", + "outputs": [ + { + "name": "status", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3ae1786f" + }, + { + "constant": false, + "inputs": [ + { + "name": "group", + "type": "address" + }, + { + "name": "admin", + "type": "address" + } + ], + "name": "setCustomGroupAdmin", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3cc0a953" + }, + { + "constant": true, + "inputs": [], + "name": "getUserWeight", + "outputs": [ + { + "name": "weight", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x42429139" + }, + { + "constant": false, + "inputs": [ + { + "name": "votingId", + "type": "uint256" + }, + { + "name": "user", + "type": "address" + } + ], + "name": "isUserReturnTokens", + "outputs": [ + { + "name": "result", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x4a1e82a0" + }, + { + "constant": true, + "inputs": [], + "name": "getERCTotal", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5b1bb4a2" + }, + { + "constant": true, + "inputs": [], + "name": "groups", + "outputs": [ + { + "name": "groupIdIndex", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5bf89d9e" + }, + { + "constant": false, + "inputs": [ + { + "name": "_idsAndTime", + "type": "uint256[]" + }, + { + "name": "_status", + "type": "uint8" + }, + { + "name": "_caption", + "type": "string" + }, + { + "name": "_text", + "type": "string" + }, + { + "name": "_target", + "type": "address" + }, + { + "name": "_methodSelector", + "type": "bytes4" + }, + { + "name": "_formula", + "type": "uint256[]" + }, + { + "name": "_parameters", + "type": "bytes32[]" + } + ], + "name": "saveNewQuestion", + "outputs": [ + { + "name": "_saved", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x686c52c4" + }, + { + "constant": true, + "inputs": [], + "name": "getERCSymbol", + "outputs": [ + { + "name": "symbol", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x7264420a" + }, + { + "constant": true, + "inputs": [], + "name": "questions", + "outputs": [ + { + "name": "questionIdIndex", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x77a49821" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getQuestionGroup", + "outputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "groupType", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x7fd60dfd" + }, + { + "constant": true, + "inputs": [ + { + "name": "_voteId", + "type": "uint256" + } + ], + "name": "getUserVote", + "outputs": [ + { + "name": "vote", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x86194c19" + }, + { + "constant": false, + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_address", + "type": "address" + }, + { + "name": "_type", + "type": "string" + } + ], + "name": "saveNewUserGroup", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x952b627c" + }, + { + "constant": false, + "inputs": [], + "name": "getCount", + "outputs": [ + { + "name": "length", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa87d942c" + }, + { + "constant": true, + "inputs": [], + "name": "getUserBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xb7013dc1" + }, + { + "constant": false, + "inputs": [ + { + "name": "_address", + "type": "address" + } + ], + "name": "setERC20", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc29a6fda" + }, + { + "constant": true, + "inputs": [], + "name": "isActiveVoting", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc39c89df" + }, + { + "constant": false, + "inputs": [], + "name": "closeVoting", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc631b292" + }, + { + "constant": false, + "inputs": [ + { + "name": "_questionId", + "type": "uint256" + }, + { + "name": "_status", + "type": "uint8" + }, + { + "name": "_starterGroup", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "startNewVoting", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc7ce7f10" + }, + { + "constant": false, + "inputs": [ + { + "name": "_choice", + "type": "uint256" + } + ], + "name": "sendVote", + "outputs": [ + { + "name": "result", + "type": "uint256" + }, + { + "name": "votePos", + "type": "uint256" + }, + { + "name": "voteNeg", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc8f5714e" + }, + { + "constant": true, + "inputs": [], + "name": "ERC20", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xcc4aa204" + }, + { + "constant": true, + "inputs": [], + "name": "getERCAddress", + "outputs": [ + { + "name": "_address", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xd094b706" + }, + { + "constant": true, + "inputs": [], + "name": "userGroups", + "outputs": [ + { + "name": "groupIdIndex", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xd7843f54" + }, + { + "constant": true, + "inputs": [], + "name": "addresses", + "outputs": [ + { + "name": "user", + "type": "address" + }, + { + "name": "instance", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xda0321cd" + }, + { + "constant": true, + "inputs": [], + "name": "getVotingsCount", + "outputs": [ + { + "name": "count", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdae7c92c" + }, + { + "constant": false, + "inputs": [ + { + "name": "_name", + "type": "string" + } + ], + "name": "saveNewGroup", + "outputs": [ + { + "name": "id", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdf831328" + }, + { + "constant": true, + "inputs": [], + "name": "getUserGroupsLength", + "outputs": [ + { + "name": "length", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xec4d819c" + }, + { + "constant": false, + "inputs": [ + { + "name": "user", + "type": "address" + } + ], + "name": "findUserGroup", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf0c4c3e6" + }, + { + "constant": false, + "inputs": [ + { + "name": "_who", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferERC20", + "outputs": [ + { + "name": "newBalance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf7448a31" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "voting", + "outputs": [ + { + "name": "id", + "type": "uint256" + }, + { + "name": "status", + "type": "uint8" + }, + { + "name": "caption", + "type": "string" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "startTime", + "type": "uint256" + }, + { + "name": "endTime", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfd4a77f1" + }, + { + "constant": true, + "inputs": [ + { + "name": "_votingId", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "name": "_votes", + "type": "uint256[3]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xff981099" + }, + { + "inputs": [ + { + "name": "_address", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "groupId", + "type": "uint256" + }, + { + "indexed": false, + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "name": "caption", + "type": "string" + }, + { + "indexed": false, + "name": "text", + "type": "string" + }, + { + "indexed": false, + "name": "time", + "type": "uint256" + }, + { + "indexed": false, + "name": "target", + "type": "address" + }, + { + "indexed": false, + "name": "methodSelector", + "type": "bytes4" + } + ], + "name": "NewQuestion", + "type": "event", + "signature": "0xf74c837bcb7177c5fc07298a351f91ebaf73da24a2665c4dd592976c4e1780c9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "name": "questionId", + "type": "uint256" + }, + { + "indexed": false, + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "name": "starterGroup", + "type": "uint256" + }, + { + "indexed": false, + "name": "starterAddress", + "type": "address" + }, + { + "indexed": false, + "name": "startblock", + "type": "uint256" + } + ], + "name": "NewVoting", + "type": "event", + "signature": "0x20cd0a5d2be6a115945cf28e1511206f69d34a385fb4b9c8ee18f39fa52471c7" + } +] \ No newline at end of file diff --git a/src/contracts/Voter/Voter.sol b/src/contracts/Voter/Voter.sol new file mode 100644 index 00000000..eefe9132 --- /dev/null +++ b/src/contracts/Voter/Voter.sol @@ -0,0 +1,17 @@ +pragma solidity 0.5; + +import "./VoterBase.sol"; + + +contract Voter is VoterBase { + + IERC20 public ERC20; + + constructor(address _address) public { + // implement contract deploy + // set erc20 token here + setERC20(_address); + } + + +} diff --git a/src/contracts/Voter/VoterBase.sol b/src/contracts/Voter/VoterBase.sol new file mode 100644 index 00000000..e532891b --- /dev/null +++ b/src/contracts/Voter/VoterBase.sol @@ -0,0 +1,488 @@ +pragma solidity 0.5; + +import "../libs/QuestionGroups.sol"; +import "../libs/UserGroups.sol"; +import "../libs/Questions.sol"; +import "../libs/Votings.sol"; +import "./VoterInterface.sol"; +import "../IERC20.sol"; + + + + +/** + * @title VoterBase + * @dev an base difinitions for voter + */ +contract VoterBase is VoterInterface { + + Questions.List public questions; + QuestionGroups.List public groups; + Votings.List public votings; + UserGroups.List public userGroups; + + IERC20 public ERC20; + + constructor() public { + questions.init(); + groups.init(); + votings.init(); + } + + // METHODS + function setERC20(address _address) public { + ERC20 = IERC20(_address); + userGroups.init(_address); + } + + /* + * @notice creates new question to saveNewQuestion function + * @param _groupId question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * @return new question id + */ + function createNewQuestion( + uint[] memory _idsAndTime, + Questions.Status _status, + string memory _caption, + string memory _text, + address _target, + bytes4 _methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ) private returns (Questions.Question memory _question) { + Questions.Question memory question = Questions.Question({ + groupId: _idsAndTime[1], + status: _status, + caption: _caption, + text: _text, + time: _idsAndTime[2], + target: _target, + methodSelector: _methodSelector, + formula: _formula, + parameters: _parameters + }); + questions.save(question, _idsAndTime[0]); + + emit NewQuestion( _idsAndTime[1], _status, _caption, _text, _idsAndTime[0], _target, _methodSelector ); + return question; + } + + /* + * @notice adds new question to question library + * @param _groupId question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * @return new question id + */ + function saveNewQuestion( + uint[] _idsAndTime, + Questions.Status _status, + string _caption, + string _text, + address _target, + bytes4 _methodSelector, + uint[] _formula, + bytes32[] _parameters + + ) external returns (bool _saved){ + Questions.Question memory question = createNewQuestion( + _idsAndTime, + _status, + _caption, + _text, + _target, + _methodSelector, + _formula, + _parameters + ); + return true; + } + + + /** + * @notice adds new question to question library + * @param _name question group name + * @return new question id + */ + function saveNewGroup( + string _name + ) external returns (uint id) { + QuestionGroups.Group memory group = QuestionGroups.Group({ + name: _name, + groupType: QuestionGroups.GroupType.CUSTOM + }); + id = groups.save(group); + return id; + } + + function getCount() external returns (uint length) { + uint count = questions.questionIdIndex; + return count; + } + + /** + * @notice gets question data + * @param _id question id + * @return question data + */ + function question(uint _id) public view returns ( + uint groupId, + Questions.Status status, + string memory caption, + string memory text, + uint time, + address target, + bytes4 methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ) { + uint id = _id; + return ( + questions.question[id].groupId, + questions.question[id].status, + questions.question[id].caption, + questions.question[id].text, + questions.question[id].time, + questions.question[id].target, + questions.question[id].methodSelector, + questions.question[id].formula, + questions.question[id].parameters + ); + } + + function getQuestionGroup(uint _id) public view returns ( + string name, + QuestionGroups.GroupType groupType + ) { + return ( + groups.group[_id].name, + groups.group[_id].groupType + ); + } + + function getQuestionGroupsLength() public view returns (uint length) { + return groups.groupIdIndex ; + } + function getUserGroup(uint _id) public view returns ( + string name, + string groupType, + UserGroups.GroupStatus status, + address groupAddress + ) { + return ( + userGroups.group[_id].name, + userGroups.group[_id].groupType, + userGroups.group[_id].status, + userGroups.group[_id].groupAddr + ); + } + + function getUserGroupsLength() public view returns (uint length) { + return userGroups.groupIdIndex ; + } + + function isActiveVoting() public view returns (bool) { + + } + + /** + * @notice adds new voting to voting library + * @param _questionId question id + * @param _status voting status + * @param _starterGroup group which started voting + * @return new voting id + */ + + function startNewVoting( + uint _questionId, + Votings.Status _status, + uint _starterGroup, + bytes _data + ) external returns (bool) { + bool canStart; + uint votingId = votings.votingIdIndex - 1; + if ( + ((votings.votingIdIndex == 1) && (votings.voting[votingId].status == Votings.Status.ACTIVE)) + || (!(votings.votingIdIndex == 1) && !(votings.voting[votingId].status == Votings.Status.ACTIVE))) { + canStart = true; + uint start = block.timestamp; + uint _endTime = start + (questions.question[_questionId].time * 60); + Votings.Voting memory voting = Votings.Voting({ + questionId: _questionId, + status: _status, + starterGroup: _starterGroup, + starterAddress: msg.sender, + startTime: block.timestamp, + endTime: _endTime, + data: _data + }); + + uint id = votings.save(voting); + + emit NewVoting ( + id, + _questionId, + _status, + _starterGroup, + msg.sender, + block.number + ); + } else { + canStart = false; + } + return canStart; + } + + function voting(uint _id) external view returns ( + uint id, + Votings.Status status, + string memory caption, + string memory text, + uint startTime, + uint endTime, + bytes data + ){ + uint votingId = _id; + uint questionId = votings.voting[_id].questionId; + return ( + votings.voting[votingId].questionId, + votings.voting[votingId].status, + questions.question[questionId].caption, + questions.question[questionId].text, + votings.voting[votingId].startTime, + votings.voting[votingId].endTime, + votings.voting[votingId].data + ); + } + + function getVotingsCount() external view returns (uint count) { + return votings.votingIdIndex; + } + + function getVotingDescision(uint _id) external view returns (uint result) { + return votings.descision[_id]; + } + + function closeVoting() external { + uint votingId = votings.votingIdIndex - 1; + uint questionId = votings.voting[votingId].questionId; + uint[] storage formula = questions.question[questionId].formula; + + uint votingCondition = formula[2]; // 1 - positive, 0 - quorum + uint sign = formula[3]; // 1 - >=, 2 - <= + uint percent = formula[4]; + uint quorumPercent; + uint modificator; // modificator of votingCondition: 1 - of all, 0 - of quorum + + string memory groupName = userGroups.names[formula[1]]; + IERC20 group = IERC20(userGroups.group[formula[1]].groupAddr); + uint256 positiveVotes = votings.voting[votingId].descisionWeights[1][groupName]; + uint256 negativeVotes = votings.voting[votingId].descisionWeights[2][groupName]; + uint256 totalSupply = group.totalSupply(); + + if (formula[5] != 0) { // if modificator exists in question + modificator = formula[5]; + } else { + modificator = 0; + } + + + if (votingCondition == 0) { + // if condition == quorum + quorumPercent = (positiveVotes + negativeVotes) * 100 / totalSupply; + } else if (votingCondition == 1) { + // else if condition == positive + if (modificator == 0) { + // of quorum + quorumPercent = (positiveVotes * 100 / (positiveVotes + negativeVotes) ); + } else if (modificator == 1) { + // of all + quorumPercent = ( positiveVotes * 100 / totalSupply ); + } + } + + if (sign == 1) { + // if >= + if (quorumPercent >= percent) { + if (positiveVotes > negativeVotes) { + votings.descision[votingId] = 1; + address(this).call(votings.voting[votingId].data); + } else if (positiveVotes < negativeVotes) { + votings.descision[votingId] = 2; + } else if (positiveVotes == negativeVotes) { + votings.descision[votingId] = 0; + } + } + } else if (sign == 0) { + //if <= + if (quorumPercent <= percent) { + if (positiveVotes > negativeVotes) { + votings.descision[votingId] = 1; + address(this).call(votings.voting[votingId].data); + } else if (positiveVotes < negativeVotes) { + votings.descision[votingId] = 2; + } else if (positiveVotes == negativeVotes) { + votings.descision[votingId] = 0; + } + } + } + + + votings.voting[votingId].status = Votings.Status.ENDED; + } + + + function getVotes(uint _votingId) external view returns (uint256[3] memory _votes) { + uint questionId = votings.voting[_votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupName = userGroups.names[groupId]; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256[3] memory votes; + votes[0] = votings.voting[_votingId].descisionWeights[1][groupName]; + votes[1] = votings.voting[_votingId].descisionWeights[2][groupName]; + votes[2] = group.totalSupply(); + return votes; + } + + function returnTokens(uint votingId) public returns (bool status){ + uint questionId = votings.voting[votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupType = userGroups.group[groupId].groupType; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 weight = votings.voting[votingId].voteWeigths[address(group)][msg.sender]; + bool isReturned = this.isUserReturnTokens(votingId, msg.sender); + + if (!isReturned) { + if( bytes4(keccak256(groupType)) == bytes4(keccak256("ERC20"))) { + group.transfer(msg.sender, weight); + } else { + group.transferFrom(address(this), msg.sender, weight); + } + votings.voting[votingId].tokenReturns[address(group)][msg.sender] = weight; + } + return true; + } + + function isUserReturnTokens(uint votingId, address user) returns (bool result) { + uint questionId = votings.voting[votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupType = userGroups.group[groupId].groupType; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 returnedTokens = votings.voting[votingId].tokenReturns[address(group)][user]; + return returnedTokens > 0; + } + + + function findUserGroup(address user) external returns (uint) { + uint votingIndex = votings.votingIdIndex - 1; + uint questionId = votings.voting[votingIndex].questionId; + uint groupId = questions.question[questionId].groupId; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 balance = group.balanceOf(user); + uint index = 0; + if (balance != 0 ) { + index = groupId; + } + return index; + } + + + function sendVote(uint _choice) external returns (uint result, uint256 votePos, uint256 voteNeg) { + uint _voteId = votings.votingIdIndex - 1; + uint timestamp = votings.voting[_voteId].endTime; + uint questionId = votings.voting[_voteId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupName = userGroups.names[groupId]; + uint index = this.findUserGroup(msg.sender); + IERC20 group = IERC20(userGroups.group[index].groupAddr); + uint256 balance = group.balanceOf(msg.sender); + + if (block.timestamp < timestamp ) { + if ( balance != 0) { + if (votings.voting[_voteId].votes[address(group)][msg.sender] == 0) { + group.transferFrom(msg.sender, address(this), balance); + votings.voting[_voteId].votes[address(group)][msg.sender] = _choice; + votings.voting[_voteId].voteWeigths[address(group)][msg.sender] = balance; + votings.voting[_voteId].descisionWeights[_choice][groupName] += balance; + } + } + } else { + this.closeVoting(); + } + return ( + votings.voting[_voteId].votes[address(group)][msg.sender] = _choice, + votings.voting[_voteId].descisionWeights[1][groupName], + votings.voting[_voteId].descisionWeights[2][groupName] + ); + } + + function getERCAddress() external view returns (address _address) { + return address(ERC20); + } + + function getUserBalance() external view returns (uint256 balance) { + uint256 _balance = ERC20.balanceOf(msg.sender); + return _balance; + } + + function getERCTotal() external view returns (uint256 balance) { + return ERC20.totalSupply(); + } + + function getERCSymbol() external view returns (string symbol) { + return ERC20.symbol(); + } + + function getUserVote(uint _voteId) external view returns (uint vote) { + uint questionId = votings.voting[_voteId].questionId; + uint groupId = questions.question[questionId].groupId; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + return votings.voting[_voteId].votes[address(group)][msg.sender]; + } + + function getUserWeight() external view returns (uint256 weight) { + uint _voteId = votings.votingIdIndex - 1; + return votings.voting[_voteId].voteWeigths[address(ERC20)][msg.sender]; + } + + function transferERC20(address _who, uint256 _value) external returns (uint256 newBalance) { + ERC20.transferFrom(msg.sender, _who, _value); + return ERC20.balanceOf(msg.sender); + } + + function addresses() external view returns (address user, address instance) { + return ( + msg.sender, + address(this) + ); + } + + function saveNewUserGroup (string _name, address _address, string _type) external { + UserGroups.UserGroup memory userGroup = UserGroups.UserGroup({ + name: _name, + groupType: _type, + status: UserGroups.GroupStatus.ACTIVE, + groupAddr: _address + }); + userGroups.save(userGroup); + } + + function setCustomGroupAdmin(address group, address admin) external returns (bool) { + require(group.call( bytes4( keccak256("setAdmin(address)")), admin)); + return true; + } +} diff --git a/src/contracts/Voter/VoterInterface.sol b/src/contracts/Voter/VoterInterface.sol new file mode 100644 index 00000000..51a10280 --- /dev/null +++ b/src/contracts/Voter/VoterInterface.sol @@ -0,0 +1,113 @@ +pragma solidity 0.5; + +import "../libs/QuestionGroups.sol"; +import "../libs/Questions.sol"; +import "../libs/Votings.sol"; +import "../libs/UserGroups.sol"; + +/** + * @title VoterInterface + * @dev an interface for voter + */ +interface VoterInterface { + // LIBRARIES + using QuestionGroups for QuestionGroups.List; + using Questions for Questions.List; + using Votings for Votings.List; + using UserGroups for UserGroups.List; + + + // DIFINTIONS + // new question added event + event NewQuestion( + uint groupId, + Questions.Status status, + string caption, + string text, + uint time, + address target, + bytes4 methodSelector + ); + // new Votings added event + event NewVoting( + uint id, + uint questionId, + Votings.Status status, + uint starterGroup, + address starterAddress, + uint startblock + ); + + // METHODS + /* + * @notice adds new question to question library + * @param _ids question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * return new question id + */ + function saveNewQuestion( + uint[] _idsAndTime, + Questions.Status _status, + string _caption, + string _text, + address _target, + bytes4 _methodSelector, + uint[] _formula, + bytes32[] _parameters + ) external returns (bool _saved); + + /** + * @notice adds new question to question library + * @param _name question group name + * @return new question id + */ + function saveNewGroup( + string _name + ) external returns (uint id); + + /** + * @notice gets question data + * @param _id question id + * @return question data + */ + function question( + uint _id + ) external view returns ( + uint groupId, + Questions.Status status, + string memory caption, + string memory text, + uint time, + address target, + bytes4 methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ); + + function getCount() external returns (uint length); + + function startNewVoting( + uint questionId, + Votings.Status status, + uint starterGroup, + bytes data + ) external returns (bool); + + function voting(uint id) external view returns ( + uint questionId, + Votings.Status status, + string memory caption, + string memory text, + uint startTime, + uint endTime, + bytes data + ); + function getVotingsCount() external view returns (uint length); +} diff --git a/src/contracts/Voter/output.sol b/src/contracts/Voter/output.sol new file mode 100644 index 00000000..1cc4a848 --- /dev/null +++ b/src/contracts/Voter/output.sol @@ -0,0 +1,917 @@ +pragma solidity ^0.4.24; + + + + + + +library QuestionGroups { + + enum GroupType { + // system group + SYSTEM, + // user group + CUSTOM + } + + struct Group { + // group type + GroupType groupType; + // group name + string name; + } + + struct List { + uint groupIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => Group) group; + } + + function init(List storage _self) internal { + _self.groupIdIndex = 1; + Group memory systemGroup = Group({ + name: 'Системные', + groupType: GroupType.SYSTEM + }); + save(_self, systemGroup); + Group memory otherGroup = Group({ + name: "Другие", + groupType: GroupType.CUSTOM + }); + save(_self, otherGroup); + } + + function save(List storage _self, Group memory _group) internal returns (uint id) { + bytes32 name = keccak256(abi.encodePacked(_group.name)); + uint groupId = _self.groupIdIndex; + require(!exists(_self, name), "provided group already exists"); + _self.group[groupId] = _group; + _self.uniqNames[name] = groupId; + _self.groupIdIndex++; + return groupId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} + + + + +library UserGroups { + + enum GroupStatus { + // deleted or inactive question + INACTIVE, + // active question + ACTIVE + } + + struct UserGroup { + string name; + string groupType; + GroupStatus status; + address groupAddr; + } + + struct List { + uint groupIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => string) names; + mapping (uint => UserGroup) group; + } + + function init(List storage _self, address _ERC20) internal { + _self.groupIdIndex = 1; + UserGroup memory group = UserGroup({ + name: "Owner", + groupType: "ERC20", + status: GroupStatus.ACTIVE, + groupAddr: _ERC20 + }); + save(_self, group); + } + + function save(List storage _self, UserGroup memory _group) internal returns (uint id) { + bytes32 key = keccak256(abi.encodePacked(_group.name)); + string memory name = _group.name; + uint groupId = _self.groupIdIndex; + require(!exists(_self, key), "provided group already exists"); + _self.names[groupId] = name; + _self.group[groupId] = _group; + _self.uniqNames[key] = groupId; + _self.groupIdIndex++; + return groupId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} + + + + +library Questions { + + enum Status { + // deleted or inactive question + INACTIVE, + // active question + ACTIVE + } + + struct Question { + // question group id + uint groupId; + // question status + Status status; + // question name + string caption; + // question description + string text; + // question length in minutes + uint time; + // target address + address target; + // method to be called + bytes4 methodSelector; + uint[] formula; + bytes32[] parameters; + } + + struct List { + uint questionIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => Question) question; + } + + function init(List storage _self) internal { + _self.questionIdIndex = 1; + } + + function save(List storage _self, Question memory _question, uint _id) internal returns (uint id) { + bytes32 name = keccak256(abi.encodePacked(_question.caption)); + uint questionId = _self.questionIdIndex; + require(!exists(_self, name), "provided group already exists"); + _self.question[_id] = _question; + _self.uniqNames[name] = questionId; + _self.questionIdIndex++; + return questionId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} + + + +library Votings { + + enum Status {ACTIVE, ENDED} + + struct Voting { + // ? question id used for vote + uint questionId; + // ? vote status + Status status; + // ? group of users, who started vote + uint starterGroup; + // ? user, who started the voting + address starterAddress; + // ? block when voting was started + uint startTime; + uint endTime; + // ? contains pairs of (address => vote) for every user + mapping (address=> mapping(address => uint)) votes; + + // contains total weights for voting variants + mapping (address=> mapping(address => uint256)) voteWeigths; + mapping (uint=> mapping(string => uint256)) descisionWeights; + mapping (address=> mapping (address=>uint256)) tokenReturns; + + bytes data; + } + + struct List { + uint votingIdIndex; + mapping (uint => Voting) voting; + mapping (uint => uint) descision; + } + + function init(List storage _self) internal { + _self.votingIdIndex = 1; + } + + + function save(List storage _self, Voting memory _voting) internal returns (uint id) { + uint votingId = _self.votingIdIndex; + _self.voting[votingId] = _voting; + _self.votingIdIndex++; + return votingId; + } + + function close(List storage _self) internal { + uint votingId = _self.votingIdIndex - 1; + _self.voting[votingId].status = Status.ENDED; + } + +} + + + + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see `ERC20Detailed`. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + /** + * @dev Returns the amount of tokens in existence. + */ + function name() external view returns (string); + /** + * @dev Returns the amount of tokens in existence. + */ + function symbol() external view returns (string); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through `transferFrom`. This is + * zero by default. + * + * This value changes when `approve` or `transferFrom` are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * > Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an `Approval` event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to `approve`. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} + + + + +/** + * @title VoterInterface + * @dev an interface for voter + */ +interface VoterInterface { + // LIBRARIES + using QuestionGroups for QuestionGroups.List; + using Questions for Questions.List; + using Votings for Votings.List; + using UserGroups for UserGroups.List; + + + // DIFINTIONS + // new question added event + event NewQuestion( + uint groupId, + Questions.Status status, + string caption, + string text, + uint time, + address target, + bytes4 methodSelector + ); + // new Votings added event + event NewVoting( + uint id, + uint questionId, + Votings.Status status, + uint starterGroup, + address starterAddress, + uint startblock + ); + + // METHODS + /* + * @notice adds new question to question library + * @param _ids question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * return new question id + */ + function saveNewQuestion( + uint[] _idsAndTime, + Questions.Status _status, + string _caption, + string _text, + address _target, + bytes4 _methodSelector, + uint[] _formula, + bytes32[] _parameters + ) external returns (bool _saved); + + /** + * @notice adds new question to question library + * @param _name question group name + * @return new question id + */ + function saveNewGroup( + string _name + ) external returns (uint id); + + /** + * @notice gets question data + * @param _id question id + * @return question data + */ + function question( + uint _id + ) external view returns ( + uint groupId, + Questions.Status status, + string memory caption, + string memory text, + uint time, + address target, + bytes4 methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ); + + function getCount() external returns (uint length); + + function startNewVoting( + uint questionId, + Votings.Status status, + uint starterGroup, + bytes data + ) external returns (bool); + + function voting(uint id) external view returns ( + uint questionId, + Votings.Status status, + string memory caption, + string memory text, + uint startTime, + uint endTime, + bytes data + ); + function getVotingsCount() external view returns (uint length); +} + + + + + + +/** + * @title VoterBase + * @dev an base difinitions for voter + */ +contract VoterBase is VoterInterface { + + Questions.List public questions; + QuestionGroups.List public groups; + Votings.List public votings; + UserGroups.List public userGroups; + + IERC20 public ERC20; + + constructor() public { + questions.init(); + groups.init(); + votings.init(); + } + + // METHODS + function setERC20(address _address) public { + ERC20 = IERC20(_address); + userGroups.init(_address); + } + + /* + * @notice creates new question to saveNewQuestion function + * @param _groupId question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * @return new question id + */ + function createNewQuestion( + uint[] memory _idsAndTime, + Questions.Status _status, + string memory _caption, + string memory _text, + address _target, + bytes4 _methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ) private returns (Questions.Question memory _question) { + Questions.Question memory question = Questions.Question({ + groupId: _idsAndTime[1], + status: _status, + caption: _caption, + text: _text, + time: _idsAndTime[2], + target: _target, + methodSelector: _methodSelector, + formula: _formula, + parameters: _parameters + }); + questions.save(question, _idsAndTime[0]); + + emit NewQuestion( _idsAndTime[1], _status, _caption, _text, _idsAndTime[0], _target, _methodSelector ); + return question; + } + + /* + * @notice adds new question to question library + * @param _groupId question group id + * @param _status question status + * @param _caption question name + * @param _text question description + * @param _time question length + * @param _target target address to call + * @param _methodSelector method to call + * @param _formula voting formula + * @param _parameters parameters of inputs + * @return new question id + */ + function saveNewQuestion( + uint[] _idsAndTime, + Questions.Status _status, + string _caption, + string _text, + address _target, + bytes4 _methodSelector, + uint[] _formula, + bytes32[] _parameters + + ) external returns (bool _saved){ + Questions.Question memory question = createNewQuestion( + _idsAndTime, + _status, + _caption, + _text, + _target, + _methodSelector, + _formula, + _parameters + ); + return true; + } + + + /** + * @notice adds new question to question library + * @param _name question group name + * @return new question id + */ + function saveNewGroup( + string _name + ) external returns (uint id) { + QuestionGroups.Group memory group = QuestionGroups.Group({ + name: _name, + groupType: QuestionGroups.GroupType.CUSTOM + }); + id = groups.save(group); + return id; + } + + function getCount() external returns (uint length) { + uint count = questions.questionIdIndex; + return count; + } + + /** + * @notice gets question data + * @param _id question id + * @return question data + */ + function question(uint _id) public view returns ( + uint groupId, + Questions.Status status, + string memory caption, + string memory text, + uint time, + address target, + bytes4 methodSelector, + uint[] memory _formula, + bytes32[] memory _parameters + ) { + uint id = _id; + return ( + questions.question[id].groupId, + questions.question[id].status, + questions.question[id].caption, + questions.question[id].text, + questions.question[id].time, + questions.question[id].target, + questions.question[id].methodSelector, + questions.question[id].formula, + questions.question[id].parameters + ); + } + + function getQuestionGroup(uint _id) public view returns ( + string name, + QuestionGroups.GroupType groupType + ) { + return ( + groups.group[_id].name, + groups.group[_id].groupType + ); + } + + function getQuestionGroupsLength() public view returns (uint length) { + return groups.groupIdIndex ; + } + function getUserGroup(uint _id) public view returns ( + string name, + string groupType, + UserGroups.GroupStatus status, + address groupAddress + ) { + return ( + userGroups.group[_id].name, + userGroups.group[_id].groupType, + userGroups.group[_id].status, + userGroups.group[_id].groupAddr + ); + } + + function getUserGroupsLength() public view returns (uint length) { + return userGroups.groupIdIndex ; + } + + function isActiveVoting() public view returns (bool) { + + } + + /** + * @notice adds new voting to voting library + * @param _questionId question id + * @param _status voting status + * @param _starterGroup group which started voting + * @return new voting id + */ + + function startNewVoting( + uint _questionId, + Votings.Status _status, + uint _starterGroup, + bytes _data + ) external returns (bool) { + bool canStart; + uint votingId = votings.votingIdIndex - 1; + if ( + ((votings.votingIdIndex == 1) && (votings.voting[votingId].status == Votings.Status.ACTIVE)) + || (!(votings.votingIdIndex == 1) && !(votings.voting[votingId].status == Votings.Status.ACTIVE))) { + canStart = true; + uint start = block.timestamp; + uint _endTime = start + (questions.question[_questionId].time * 60); + Votings.Voting memory voting = Votings.Voting({ + questionId: _questionId, + status: _status, + starterGroup: _starterGroup, + starterAddress: msg.sender, + startTime: block.timestamp, + endTime: _endTime, + data: _data + }); + + uint id = votings.save(voting); + + emit NewVoting ( + id, + _questionId, + _status, + _starterGroup, + msg.sender, + block.number + ); + } else { + canStart = false; + } + return canStart; + } + + function voting(uint _id) external view returns ( + uint id, + Votings.Status status, + string memory caption, + string memory text, + uint startTime, + uint endTime, + bytes data + ){ + uint votingId = _id; + uint questionId = votings.voting[_id].questionId; + return ( + votings.voting[votingId].questionId, + votings.voting[votingId].status, + questions.question[questionId].caption, + questions.question[questionId].text, + votings.voting[votingId].startTime, + votings.voting[votingId].endTime, + votings.voting[votingId].data + ); + } + + function getVotingsCount() external view returns (uint count) { + return votings.votingIdIndex; + } + + function getVotingDescision(uint _id) external view returns (uint result) { + return votings.descision[_id]; + } + + function closeVoting() external { + uint votingId = votings.votingIdIndex - 1; + uint questionId = votings.voting[votingId].questionId; + uint[] storage formula = questions.question[questionId].formula; + + uint votingCondition = formula[2]; // 1 - positive, 0 - quorum + uint sign = formula[3]; // 1 - >=, 2 - <= + uint percent = formula[4]; + uint quorumPercent; + uint modificator; // modificator of votingCondition: 1 - of all, 0 - of quorum + + string memory groupName = userGroups.names[formula[1]]; + IERC20 group = IERC20(userGroups.group[formula[1]].groupAddr); + uint256 positiveVotes = votings.voting[votingId].descisionWeights[1][groupName]; + uint256 negativeVotes = votings.voting[votingId].descisionWeights[2][groupName]; + uint256 totalSupply = group.totalSupply(); + + if (formula[5] != 0) { // if modificator exists in question + modificator = formula[5]; + } else { + modificator = 0; + } + + + if (votingCondition == 0) { + // if condition == quorum + quorumPercent = (positiveVotes + negativeVotes) * 100 / totalSupply; + } else if (votingCondition == 1) { + // else if condition == positive + if (modificator == 0) { + // of quorum + quorumPercent = (positiveVotes * 100 / (positiveVotes + negativeVotes) ); + } else if (modificator == 1) { + // of all + quorumPercent = ( positiveVotes * 100 / totalSupply ); + } + } + + if (sign == 1) { + // if >= + if (quorumPercent >= percent) { + if (positiveVotes > negativeVotes) { + votings.descision[votingId] = 1; + address(this).call(votings.voting[votingId].data); + } else if (positiveVotes < negativeVotes) { + votings.descision[votingId] = 2; + } else if (positiveVotes == negativeVotes) { + votings.descision[votingId] = 0; + } + } + } else if (sign == 0) { + //if <= + if (quorumPercent <= percent) { + if (positiveVotes > negativeVotes) { + votings.descision[votingId] = 1; + address(this).call(votings.voting[votingId].data); + } else if (positiveVotes < negativeVotes) { + votings.descision[votingId] = 2; + } else if (positiveVotes == negativeVotes) { + votings.descision[votingId] = 0; + } + } + } + + + votings.voting[votingId].status = Votings.Status.ENDED; + } + + + function getVotes(uint _votingId) external view returns (uint256[3] memory _votes) { + uint questionId = votings.voting[_votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupName = userGroups.names[groupId]; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256[3] memory votes; + votes[0] = votings.voting[_votingId].descisionWeights[1][groupName]; + votes[1] = votings.voting[_votingId].descisionWeights[2][groupName]; + votes[2] = group.totalSupply(); + return votes; + } + + function returnTokens(uint votingId) public returns (bool status){ + uint questionId = votings.voting[votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupType = userGroups.group[groupId].groupType; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 weight = votings.voting[votingId].voteWeigths[address(group)][msg.sender]; + bool isReturned = this.isUserReturnTokens(votingId, msg.sender); + + if (!isReturned) { + if( bytes4(keccak256(groupType)) == bytes4(keccak256("ERC20"))) { + group.transfer(msg.sender, weight); + } else { + group.transferFrom(address(this), msg.sender, weight); + } + votings.voting[votingId].tokenReturns[address(group)][msg.sender] = weight; + } + return true; + } + + function isUserReturnTokens(uint votingId, address user) returns (bool result) { + uint questionId = votings.voting[votingId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupType = userGroups.group[groupId].groupType; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 returnedTokens = votings.voting[votingId].tokenReturns[address(group)][user]; + return returnedTokens > 0; + } + + + function findUserGroup(address user) external returns (uint) { + uint votingIndex = votings.votingIdIndex - 1; + uint questionId = votings.voting[votingIndex].questionId; + uint groupId = questions.question[questionId].groupId; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + uint256 balance = group.balanceOf(user); + uint index = 0; + if (balance != 0 ) { + index = groupId; + } + return index; + } + + + function sendVote(uint _choice) external returns (uint result, uint256 votePos, uint256 voteNeg) { + uint _voteId = votings.votingIdIndex - 1; + uint timestamp = votings.voting[_voteId].endTime; + uint questionId = votings.voting[_voteId].questionId; + uint groupId = questions.question[questionId].groupId; + string memory groupName = userGroups.names[groupId]; + uint index = this.findUserGroup(msg.sender); + IERC20 group = IERC20(userGroups.group[index].groupAddr); + uint256 balance = group.balanceOf(msg.sender); + + if (block.timestamp < timestamp ) { + if ( balance != 0) { + if (votings.voting[_voteId].votes[address(group)][msg.sender] == 0) { + group.transferFrom(msg.sender, address(this), balance); + votings.voting[_voteId].votes[address(group)][msg.sender] = _choice; + votings.voting[_voteId].voteWeigths[address(group)][msg.sender] = balance; + votings.voting[_voteId].descisionWeights[_choice][groupName] += balance; + } + } + } else { + this.closeVoting(); + } + return ( + votings.voting[_voteId].votes[address(group)][msg.sender] = _choice, + votings.voting[_voteId].descisionWeights[1][groupName], + votings.voting[_voteId].descisionWeights[2][groupName] + ); + } + + function getERCAddress() external view returns (address _address) { + return address(ERC20); + } + + function getUserBalance() external view returns (uint256 balance) { + uint256 _balance = ERC20.balanceOf(msg.sender); + return _balance; + } + + function getERCTotal() external view returns (uint256 balance) { + return ERC20.totalSupply(); + } + + function getERCSymbol() external view returns (string symbol) { + return ERC20.symbol(); + } + + function getUserVote(uint _voteId) external view returns (uint vote) { + uint questionId = votings.voting[_voteId].questionId; + uint groupId = questions.question[questionId].groupId; + IERC20 group = IERC20(userGroups.group[groupId].groupAddr); + return votings.voting[_voteId].votes[address(group)][msg.sender]; + } + + function getUserWeight() external view returns (uint256 weight) { + uint _voteId = votings.votingIdIndex - 1; + return votings.voting[_voteId].voteWeigths[address(ERC20)][msg.sender]; + } + + function transferERC20(address _who, uint256 _value) external returns (uint256 newBalance) { + ERC20.transferFrom(msg.sender, _who, _value); + return ERC20.balanceOf(msg.sender); + } + + function addresses() external view returns (address user, address instance) { + return ( + msg.sender, + address(this) + ); + } + + function saveNewUserGroup (string _name, address _address, string _type) external { + UserGroups.UserGroup memory userGroup = UserGroups.UserGroup({ + name: _name, + groupType: _type, + status: UserGroups.GroupStatus.ACTIVE, + groupAddr: _address + }); + userGroups.save(userGroup); + } + + function setCustomGroupAdmin(address group, address admin) external returns (bool) { + require(group.call( bytes4( keccak256("setAdmin(address)")), admin)); + return true; + } +} + + + +contract Voter is VoterBase { + + IERC20 public ERC20; + + constructor(address _address) public { + // implement contract deploy + // set erc20 token here + setERC20(_address); + } + + +} diff --git a/src/contracts/libs/QuestionGroups.sol b/src/contracts/libs/QuestionGroups.sol new file mode 100644 index 00000000..06012284 --- /dev/null +++ b/src/contracts/libs/QuestionGroups.sol @@ -0,0 +1,54 @@ +pragma solidity 0.5; + + +library QuestionGroups { + + enum GroupType { + // system group + SYSTEM, + // user group + CUSTOM + } + + struct Group { + // group type + GroupType groupType; + // group name + string name; + } + + struct List { + uint groupIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => Group) group; + } + + function init(List storage _self) internal { + _self.groupIdIndex = 1; + Group memory systemGroup = Group({ + name: 'Системные', + groupType: GroupType.SYSTEM + }); + save(_self, systemGroup); + Group memory otherGroup = Group({ + name: "Другие", + groupType: GroupType.CUSTOM + }); + save(_self, otherGroup); + } + + function save(List storage _self, Group memory _group) internal returns (uint id) { + bytes32 name = keccak256(abi.encodePacked(_group.name)); + uint groupId = _self.groupIdIndex; + require(!exists(_self, name), "provided group already exists"); + _self.group[groupId] = _group; + _self.uniqNames[name] = groupId; + _self.groupIdIndex++; + return groupId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} diff --git a/src/contracts/libs/Questions.sol b/src/contracts/libs/Questions.sol new file mode 100644 index 00000000..6d66d600 --- /dev/null +++ b/src/contracts/libs/Questions.sol @@ -0,0 +1,56 @@ +pragma solidity 0.5; + + +library Questions { + + enum Status { + // deleted or inactive question + INACTIVE, + // active question + ACTIVE + } + + struct Question { + // question group id + uint groupId; + // question status + Status status; + // question name + string caption; + // question description + string text; + // question length in minutes + uint time; + // target address + address target; + // method to be called + bytes4 methodSelector; + uint[] formula; + bytes32[] parameters; + } + + struct List { + uint questionIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => Question) question; + } + + function init(List storage _self) internal { + _self.questionIdIndex = 1; + } + + function save(List storage _self, Question memory _question, uint _id) internal returns (uint id) { + bytes32 name = keccak256(abi.encodePacked(_question.caption)); + uint questionId = _self.questionIdIndex; + require(!exists(_self, name), "provided group already exists"); + _self.question[_id] = _question; + _self.uniqNames[name] = questionId; + _self.questionIdIndex++; + return questionId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} diff --git a/src/contracts/libs/UserGroups.sol b/src/contracts/libs/UserGroups.sol new file mode 100644 index 00000000..d283237e --- /dev/null +++ b/src/contracts/libs/UserGroups.sol @@ -0,0 +1,54 @@ +pragma solidity 0.5; + + +library UserGroups { + + enum GroupStatus { + // deleted or inactive question + INACTIVE, + // active question + ACTIVE + } + + struct UserGroup { + string name; + string groupType; + GroupStatus status; + address groupAddr; + } + + struct List { + uint groupIdIndex; + mapping (bytes32 => uint) uniqNames; + mapping (uint => string) names; + mapping (uint => UserGroup) group; + } + + function init(List storage _self, address _ERC20) internal { + _self.groupIdIndex = 1; + UserGroup memory group = UserGroup({ + name: "Owner", + groupType: "ERC20", + status: GroupStatus.ACTIVE, + groupAddr: _ERC20 + }); + save(_self, group); + } + + function save(List storage _self, UserGroup memory _group) internal returns (uint id) { + bytes32 key = keccak256(abi.encodePacked(_group.name)); + string memory name = _group.name; + uint groupId = _self.groupIdIndex; + require(!exists(_self, key), "provided group already exists"); + _self.names[groupId] = name; + _self.group[groupId] = _group; + _self.uniqNames[key] = groupId; + _self.groupIdIndex++; + return groupId; + } + + function exists(List storage _self, bytes32 _name) internal view returns (bool) { + return _self.uniqNames[_name] != 0; + } + +} diff --git a/src/contracts/libs/Votings.sol b/src/contracts/libs/Votings.sol new file mode 100644 index 00000000..cba423c8 --- /dev/null +++ b/src/contracts/libs/Votings.sol @@ -0,0 +1,53 @@ +pragma solidity 0.5; + +library Votings { + + enum Status {ACTIVE, ENDED} + + struct Voting { + // ? question id used for vote + uint questionId; + // ? vote status + Status status; + // ? group of users, who started vote + uint starterGroup; + // ? user, who started the voting + address starterAddress; + // ? block when voting was started + uint startTime; + uint endTime; + // ? contains pairs of (address => vote) for every user + mapping (address=> mapping(address => uint)) votes; + + // contains total weights for voting variants + mapping (address=> mapping(address => uint256)) voteWeigths; + mapping (uint=> mapping(string => uint256)) descisionWeights; + mapping (address=> mapping (address=>uint256)) tokenReturns; + + bytes data; + } + + struct List { + uint votingIdIndex; + mapping (uint => Voting) voting; + mapping (uint => uint) descision; + } + + function init(List storage _self) internal { + _self.votingIdIndex = 1; + } + + + function save(List storage _self, Voting memory _voting) internal returns (uint id) { + uint votingId = _self.votingIdIndex; + _self.voting[votingId] = _voting; + _self.votingIdIndex++; + return votingId; + } + + function close(List storage _self) internal { + uint votingId = _self.votingIdIndex - 1; + _self.voting[votingId].status = Status.ENDED; + } + +} \ No newline at end of file diff --git a/src/contracts/output.sol b/src/contracts/output.sol new file mode 100644 index 00000000..8149af39 --- /dev/null +++ b/src/contracts/output.sol @@ -0,0 +1,399 @@ +pragma solidity ^0.4.24; + + + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see `ERC20Detailed`. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + /** + * @dev Returns the amount of tokens in existence. + */ + function name() external view returns (string); + /** + * @dev Returns the amount of tokens in existence. + */ + function symbol() external view returns (string); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through `transferFrom`. This is + * zero by default. + * + * This value changes when `approve` or `transferFrom` are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * > Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an `Approval` event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a `Transfer` event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to `approve`. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} + + +/** + * @title SafeMath + * @dev Unsigned math operations with safety checks that revert on error + */ +library SafeMath { + /** + * @dev Multiplies two unsigned integers, reverts on overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b); + + return c; + } + + /** + * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a); + uint256 c = a - b; + + return c; + } + + /** + * @dev Adds two unsigned integers, reverts on overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a); + + return c; + } + + /** + * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), + * reverts when dividing by zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b != 0); + return a % b; + } +} + +/** + * @dev Implementation of the `IERC20` interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using `_mint`. + * For a generic mechanism see `ERC20Mintable`. + * + * *For a detailed writeup see our guide [How to implement supply + * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an `Approval` event is emitted on calls to `transferFrom`. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard `decreaseAllowance` and `increaseAllowance` + * functions have been added to mitigate the well-known issues around setting + * allowances. See `IERC20.approve`. + */ +contract ERC20 is IERC20 { + using SafeMath for uint256; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + + string private _symbol; + + constructor (string name, string symbol, uint256 totalSupply) public { + _name = name; + _symbol = symbol; + _totalSupply = totalSupply; + _balances[msg.sender] = totalSupply; + } + + /** + * @dev See `IERC20.totalSupply`. + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev See `IERC20.balanceOf`. + */ + function balanceOf(address account) public view returns (uint256) { + return _balances[account]; + } + + /** + * @dev Get the symbol of token. + */ + function symbol() public view returns (string) { + return _symbol; + } + /** + * @dev Get the name of token. + */ + function name() public view returns (string) { + return _name; + } + + /** + * @dev See `IERC20.transfer`. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public returns (bool) { + _transfer(msg.sender, recipient, amount); + return true; + } + + /** + * @dev See `IERC20.allowance`. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See `IERC20.approve`. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 value) public returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + /** + * @dev See `IERC20.transferFrom`. + * + * Emits an `Approval` event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of `ERC20`; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `value`. + * - the caller must have allowance for `sender`'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to `approve` that can be used as a mitigation for + * problems described in `IERC20.approve`. + * + * Emits an `Approval` event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to `approve` that can be used as a mitigation for + * problems described in `IERC20.approve`. + * + * Emits an `Approval` event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to `transfer`, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a `Transfer` event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _balances[sender] = _balances[sender].sub(amount); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a `Transfer` event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destoys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a `Transfer` event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 value) internal { + require(account != address(0), "ERC20: burn from the zero address"); + + _totalSupply = _totalSupply.sub(value); + _balances[account] = _balances[account].sub(value); + emit Transfer(account, address(0), value); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an `Approval` event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 value) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = value; + emit Approval(owner, spender, value); + } + + /** + * @dev Destoys `amount` tokens from `account`.`amount` is then deducted + * from the caller's allowance. + * + * See `_burn` and `_approve`. + */ + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); + } +} \ No newline at end of file diff --git a/src/contracts/project.sol b/src/contracts/project.sol new file mode 100644 index 00000000..85f98ad3 --- /dev/null +++ b/src/contracts/project.sol @@ -0,0 +1,50 @@ +pragma solidity ^0.5; + + +contract UsingERC20 { + IERC20 public associatedToken; + + // Constructor. Pass it the token you want this contract to work with + constructor(IERC20 _token) public { + associatedToken = _token; + } + + function doSomethingThatRequiresERC20tokens() public { + // The key here is to use ERC20's transferFrom method. + // For this to work, the given address has to have enough balance, + // and it has to allow this contract to transfer tokens from their account. + // This can be done using ERC20's approve method/ + + // If transferFrom fails, the transaction reverts. So if the transaction + // does not revert, we know that the transer succeeded. + + // Using msg.sender here, the caller of this function. + // Could be any address you like, though. + // This transfers 100 tokens from msg.sender to this contract. + associatedToken.transfer(msg.sender, address(this), 100); + + // Ok, now the tokens are transferred successfully, let's do some cool stuff! + emit YayIReceivedTokens(100, msg.sender, associatedToken.balanceOf(address(this))); + } + + event YayIReceivedTokens(uint256 amount, address fromAccount, uint256 totalBalance); +} + + +interface IERC20 { + function transfer(address who, address to, uint256 value) external returns (bool); + + function approve(address spender, uint256 value) external returns (bool); + + function transferFrom(address from, address to, uint256 value) external returns (bool); + + function totalSupply() external view returns (uint256); + + function balanceOf(address who) external view returns (uint256); + + function allowance(address owner, address spender) external view returns (uint256); + + event Transfer(address indexed from, address indexed to, uint256 value); + + event Approval(address indexed owner, address indexed spender, uint256 value); +} \ No newline at end of file diff --git a/src/contracts/sysQuestions.json b/src/contracts/sysQuestions.json new file mode 100644 index 00000000..67343d14 --- /dev/null +++ b/src/contracts/sysQuestions.json @@ -0,0 +1,128 @@ +{ + "1": { + "id": 1, + "group": 1, + "name": "Добавить Вопрос", + "caption": "Добавление нового вопроса", + "time": 5, + "method": "0x686c52c4", + "formula": "(group (Owners) => condition (positive >= 20% of all))", + "parameters": [ + "GroupId", + "uint", + "Name", + "string", + "Caption", + "string", + "Time", + "uint", + "MethodSelector", + "bytes4", + "Formula", + "string", + "parameters", + "bytes32[]" + ], + "hints": { + "0": { + "desc": "Id группы вопросов, к которому он будет принадлежать", + "example": "1 - системные вопросы, 2 - вопросы для группы владельцев кастомных токенов" + }, + "1": { + "desc": "Название вопроса", + "example": "Уничтожить проект" + }, + "2": { + "desc": "Описание вопроса", + "example": "Уничтожение всего проекта, так как дальнейшее существование потеряло смысл" + }, + "3": { + "desc": "Время, в течении которого можно будет проголосовать после того, как будет начато голосование по данному вопросу (в минутах)", + "example": "10" + }, + "4": { + "desc": "Селектор метода в контракте, который будет вызываться в случае положительного исхода голосования", + "example": "0xcaF1deb4" + }, + "5": { + "desc": "Формула, по которой будут подсчитываться результаты голосования", + "example": "(group (Owners) => condition (positive >= 20% of all)) \r\n (group (Designers) => condition (quorum >= 20%))" + } + } + }, + "2": { + "id": 2, + "group": 1, + "name": "Подключить группу пользователей", + "caption": "Подключить новую группу пользователей для участия в голосованиях", + "time": 5, + "method": "0x952b627c", + "formula": "(group (Owners) => condition (positive >= 20% of all))", + "parameters": [ + "Name", + "string", + "Address", + "address", + "Type", + "string" + ], + "hints": { + "0": { + "desc": "Название группы пользователей", + "example": "Дизайнеры" + }, + "1": { + "desc": "Адрес контракта, в котором находятся токены, распределенные среди участников группы", + "example": "0х0000000000000000000000000000000000000000" + }, + "2": { + "desc": "Тип контракта данной группы (ERC20 для контракта токенов ERC20, Custom для контракта токенов, созданного в этом приложении)", + "example": "ERC20, Custom" + } + } + }, + "3": { + "id": 3, + "group": 1, + "name": "Добавить группу вопросов", + "caption": "Добавить новую группу вопросов", + "time": 5, + "method": "0xdf831328", + "formula": "(group (Owners) => condition (positive >= 20% of all))", + "parameters": [ + "Name", + "string" + ], + "hints": { + "0": { + "desc": "Имя для группы вопросов", + "example": "Административные" + } + } + }, + "4": { + "id": 4, + "group": 1, + "name": "Установить администратора группы", + "caption": "Установка администратора в группе кастомных токенов", + "time": 5, + "method": "0x3cc0a953", + "formula": "(group (Owners) => condition (positive >= 20% of all))", + "parameters": [ + "Group", + "address", + "Admin address", + "address" + ], + "hints": { + "0": { + "desc": "Aдрес группы, в которой произойдет установка администратора", + "example": "0х0000000000000000000000000000000000000000" + }, + "1": { + "desc": "Адрес пользователя, который получит администраторские привелегии", + "example": "0х0000000000000000000000000000000000000000" + } + } + } +} \ No newline at end of file From 1837c9b03bc52f9ef8c7a3e106b451e4d3fcdece Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 7 Nov 2019 18:13:58 +0700 Subject: [PATCH 089/219] Added new dependencies Compiling and sending contract --- package-lock.json | 14 ++- package.json | 3 + .../CreateNewProjectWithoutTokens/index.js | 37 ++++-- src/components/Login/index.js | 2 +- src/components/User/index.js | 2 +- src/constants/index.js | 5 + .../ContractService/ContractService.js | 107 +++++++++++++++++- src/services/Web3Service/Web3Service.js | 68 +++++++---- src/stores/AppStore/AppStore.js | 67 +++-------- src/stores/RootStore/RootStore.js | 7 +- src/stores/UserStore/UserStore.js | 34 +++++- src/workers/wallet.worker.js | 2 +- 12 files changed, 247 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12ce9eba..c44a031c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4256,6 +4256,11 @@ } } }, + "browser-solc": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-solc/-/browser-solc-1.0.0.tgz", + "integrity": "sha512-0qiaQc65DqOukrNCew7Olg3EUXWOh54h7nUBeYyebhxwl4n5fXT/D5M3AllgKJ1msVOV9L5XIp2uAZrGSRF9iw==" + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -15376,12 +15381,11 @@ } }, "rlp": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", - "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.4.tgz", + "integrity": "sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw==", "requires": { - "bn.js": "^4.11.1", - "safe-buffer": "^5.1.1" + "bn.js": "^4.11.1" } }, "roarr": { diff --git a/package.json b/package.json index 3f329d10..fed82301 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,12 @@ "@babel/preset-stage-0": "^7.0.0", "@namics/stylelint-bem": "^6.1.0", "bip39": "^3.0.2", + "browser-solc": "^1.0.0", "electron": "^7.0.0", "electron-is-dev": "^1.1.0", "electron-localshortcut": "^3.1.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^6.1.0", "ethereumjs-wallet": "^0.6.3", "mobx": "^5.14.2", "mobx-react": "^6.1.4", diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 1fce238b..54f1783b 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-unused-state */ /* eslint-disable no-console */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; @@ -28,6 +29,7 @@ class CreateNewProjectWithoutTokens extends Component { this.state = { position: 'token', step: 1, + tokenAddr: '', }; } @@ -38,15 +40,31 @@ class CreateNewProjectWithoutTokens extends Component { }); } - createToken = () => { + createToken = (form) => { + const { appStore } = this.props; this.setState({ position: 'creation', }); - setTimeout(() => { - this.setState({ - position: 'tokenCreated', - }); - }, 2000); + + const { name, symbol, count } = form.values(); + const deployArgs = [name, symbol, count]; + appStore.deployContract('ERC20', deployArgs).then((hash) => { + console.log(hash); + // eslint-disable-next-line no-unused-vars + const interval = setInterval(() => { + // eslint-disable-next-line consistent-return + appStore.checkReciept(hash).then((reciept) => { + if (typeof reciept === 'object') { + this.setState({ + tokenAddr: reciept.contractAddress, + position: 'tokenCreated', + }); + console.log(reciept.contractAddress); + clearInterval(interval); + } + }); + }, 5000); + }); } gotoProjectInfo = () => { @@ -70,8 +88,7 @@ class CreateNewProjectWithoutTokens extends Component { const CreateToken = new CreateTokenForm({ hooks: { onSuccess(form) { - createToken(); - console.log(form.values()); + createToken(form); }, onError(form) { console.log(form); @@ -238,7 +255,9 @@ const StepIndicator = ({ step, count }) => (
); - +CreateNewProjectWithoutTokens.propTypes = { + appStore: propTypes.object.isRequired, +}; CreateTokenData.propTypes = { form: propTypes.object.isRequired, }; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 396ee20e..a2c47079 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -44,7 +44,7 @@ class Login extends Component { const loginForm = new LoginForm({ hooks: { onSuccess(form) { - userStore.readWallet(form.values().password); + userStore.login(form.values().password); }, onError(form) { alert('Form has errors'); diff --git a/src/components/User/index.js b/src/components/User/index.js index 5899735a..875cab7c 100644 --- a/src/components/User/index.js +++ b/src/components/User/index.js @@ -4,7 +4,7 @@ import styles from './User.scss'; const User = ({ children }) => (
- avatar + avatar {children} 0x295856...5d511f
diff --git a/src/constants/index.js b/src/constants/index.js index 56afca8f..ffee803b 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -1,3 +1,4 @@ +/* eslint-disable no-useless-escape */ /* eslint-disable import/prefer-default-export */ export const votingStates = { @@ -20,3 +21,7 @@ export const PATH_TO_WALLETS = window.__ENV === 'production' export const PATH_TO_CONTRACTS = window.__ENV === 'production' ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './contracts/') : path.join(window.process.env.INIT_CWD, './src/contracts/'); + +export const SOL_PATH_REGEXP = new RegExp(/(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')/g); +export const SOL_IMPORT_REGEXP = new RegExp(/(import)*.(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')(;)/g); +export const SOL_VERSION_REGEXP = new RegExp(/(pragma).(solidity).((\^)?)([0-9](.)?){1,}/g); diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 39942746..1b6b6a79 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -1,9 +1,112 @@ +/* eslint-disable no-loop-func */ +/* eslint-disable no-useless-escape */ +/* eslint-disable no-unused-vars */ +/* eslint-disable no-console */ +import browserSolc from 'browser-solc'; +import { BN } from 'ethereumjs-util'; +import { + fs, PATH_TO_CONTRACTS, path, SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP, +} from '../../constants'; + /** * Class for forming transactions */ class ContractService { - constructor(contractInstance) { - this.contract = contractInstance; + constructor(rootStore) { + this._contract = {}; + this.rootStore = rootStore; + } + + set contract(instance) { + this._contract = instance; + } + + compileContract(type) { + this.combineContract(type); + return new Promise((resolve, reject) => { + window.BrowserSolc.getVersions((sources, releases) => { + const version = releases['0.4.24']; + const questions = fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8'); + const contract = type === 'ERC20' + ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, './output.sol'), 'utf8') + : fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter/output.sol'), 'utf8'); + const contractName = type === 'ERC20' + ? ':ERC20' + : ':Voter'; + console.info(`Компилятор ${version} загружается, подождите...`); + window.BrowserSolc.loadVersion(version, (compiler) => { + console.info(`Компилятор ${version} загружен, компиляция...`); + const compiledContract = compiler.compile(contract); + const contractData = compiledContract.contracts[contractName]; + if (contractData.interface !== '') { + const { bytecode, metadata } = contractData; + const { output: { abi } } = JSON.parse(metadata); + resolve({ type, bytecode, abi }); + } else reject(); + }); + }); + }); + } + + // eslint-disable-next-line class-methods-use-this + combineContract(type) { + let imports; + const files = {}; + const dir = type === 'ERC20' ? './' : './Voter/'; + const compiler = 'pragma solidity ^0.4.24;'; + let mainContract = type === 'ERC20' + ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, `${dir}ERC20.sol`), 'utf8') + : fs.readFileSync(path.join(PATH_TO_CONTRACTS, `${dir}Voter.sol`), 'utf8'); + + while (mainContract.match(SOL_IMPORT_REGEXP)) { + imports = mainContract.match(SOL_PATH_REGEXP); + imports.forEach((name) => { + let file = name; + file = file.replace(new RegExp(/(\'|\")/g), ''); + const absolutePath = path.join(PATH_TO_CONTRACTS, `${dir}${file}`); + + if (!files[absolutePath]) { + let addSol = fs.readFileSync(absolutePath, 'utf8'); + addSol = addSol.replace(addSol.match(SOL_VERSION_REGEXP), ''); + mainContract = mainContract.replace(mainContract.match(SOL_IMPORT_REGEXP)[0], addSol); + files[absolutePath] = true; + } else { + mainContract = mainContract.replace(mainContract.match(SOL_IMPORT_REGEXP)[0], ''); + } + }); + } + mainContract = mainContract.replace(SOL_VERSION_REGEXP, compiler); + mainContract = mainContract.replace(new RegExp(/(calldata)/g), ''); + fs.writeFileSync(path.join(PATH_TO_CONTRACTS, `${dir}output.sol`), mainContract, 'utf8'); + } + + deployContract({ + type, deployArgs, bytecode, abi, + }) { + const { rootStore: { Web3Service, userStore } } = this; + const { address } = userStore; + const maxGasPrice = 10000000000; + const contract = Web3Service.createContractInstance(abi); + const txData = contract.deploy({ + data: `0x${bytecode}`, + arguments: deployArgs, + }).encodeABI(); + + const tx = { + data: txData, + gasLimit: 8000000, + gasPrice: maxGasPrice, + }; + + return new Promise((resolve, reject) => { + Web3Service.formTxData(address, tx, maxGasPrice).then((formedTx) => { + userStore.singTransaction(formedTx, 'T3sting!').then((signedTx) => { + Web3Service.sendSignedTransaction(`0x${signedTx}`).then((txHash) => { + resolve(txHash); + }); + }); + }); + }); } /** diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index d8474518..22eb9755 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -1,4 +1,6 @@ +/* eslint-disable no-console */ import Web3 from 'web3'; +import { BN } from 'ethereumjs-util'; /** * Class for working with this.web3 (sending transactions) */ @@ -7,39 +9,63 @@ class web3Service { * @constructor * @param {string} provider - provider for this.web3 */ - constructor(providerUrl) { - this.web3 = new Web3(); - this.provider = providerUrl; + constructor(url) { + this.web3 = new Web3(new Web3.providers.HttpProvider(url)); this.address2nonce = {}; } - /** - * creates and stores this.web3 provider instance - * @param {string} url this.web3 socket connection url - * @return {Promise} this.web3 provider instance - */ - createProvider(url) { - return (this.address2nonce, url); + createContractInstance(abi) { + const { web3: { eth: { Contract } } } = this; + return new Contract(abi); } - /** - * sets this.web3 provider instance - * @param {string} url this.web3 socket connection url - */ - setProvider(provider) { - this.provider = provider; - this.web3.setProvider(provider); + formTxData(address, tx, maxGasPrice) { + const { web3: { eth } } = this; + let transaction = { ...tx }; + return eth.getTransactionCount(address, 'pending') + .then((nonce) => { + transaction = { ...tx, nonce }; + return eth.estimateGas(tx); + }) + .then((gas) => { + if (!maxGasPrice) return (Promise.resolve(gas)); + return this.getGasPrice() + .then((gasPrice) => { + transaction.gasPrice = new BN(gasPrice).lte(new BN(maxGasPrice)) + ? maxGasPrice + : maxGasPrice; + return Promise.resolve(gas); + }) + .catch(Promise.reject); + }) + // eslint-disable-next-line no-unused-vars + .then((gas) => ( + { ...transaction } + )) + .catch((err) => Promise.reject(err)); + } + + getGasPrice() { + const { web3: { eth: { getGasPrice } } } = this; + return getGasPrice(); } /** * Sending transaction to contract * @param {string} txData Raw transaction (without 0x) - * @param {string} from User, who send transaction * @return {Promise} promise with web3 transaction PromiEvent */ - sendSignedTransaction(txData, from) { - this.address2nonce[from] += 1; - return this.web3.sendSignedTransaction(`0x${txData}`); + sendSignedTransaction(rawTx) { + const { web3: { eth: { sendSignedTransaction } } } = this; + return new Promise((resolve, reject) => { + sendSignedTransaction(rawTx) + .on('transactionHash', (txHash) => { + resolve(txHash); + }) + .on('error', (error) => { + reject(error); + }); + }); } /** diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index c9eb63a9..f72884f6 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -13,57 +13,6 @@ class AppStore { @observable masterSubState = null; - @observable masterStates = { - login: 0, - createWallet: 1, - selectProject: 2, - createProject: 3, - projectWithTokens: 4, - projectWithoutTokens: 5, - connectProject: 6, - uploadProject: 7, - } - - @observable masterSubStates = { - createWallet: { - passwordInput: 0, - creating: 1, - showSeed: 2, - checkSeed: 3, - checking: 4, - finish: 5, - }, - createProject: { - withTokens: 0, - withoutTokens: 1, - }, - projectWithTokens: { - inputAddress: 0, - checkingAddress: 1, - tokenInfo: 2, - inputData: 3, - }, - projectWithoutTokens: { - createToken: 0, - uploadToken: 1, - alert: 2, - inputData: 3, - }, - connectProject: { - inputData: 0, - checkingProject: 1, - alert: 2, - }, - uploadProject: { - compiling: 0, - sending: 1, - hash: 2, - reciept: 3, - uploadQuestions: 4, - success: 5, - }, - } - constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -111,11 +60,21 @@ class AppStore { this.userStore.setEncryptedWallet(encryptedWallet); } - @action setMasterState(state, subState) { - this.masterState = this.masterStates[state]; - this.masterSubState = subState !== undefined ? this.masterSubStates[state][subState] : 0; + @action deployContract(type, deployArgs) { + const { contractService } = this.rootStore; + return new Promise((resolve) => { + contractService.compileContract(type).then(({ bytecode, abi }) => { + resolve(contractService.deployContract({ + type, deployArgs, bytecode, abi, + })); + }); + }); } + @action checkReciept(hash) { + const { Web3Service: { web3 } } = this.rootStore; + return web3.eth.getTransactionReceipt(hash); + } @computed get wallets() { const wallets = Object.keys(this.walletList); diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index fc6c70cc..0b885cdb 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -7,6 +7,7 @@ import ProjectStore from '../ProjectStore'; import Web3Service from '../../services/Web3Service'; import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; +import { fs, path, ROOT_DIR } from '../../constants'; class RootStore { // stores @@ -24,11 +25,13 @@ class RootStore { @observable Web3Service ; constructor() { + const configRaw = fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8'); + const config = JSON.parse(configRaw); this.appStore = new AppStore(this); this.userStore = new UserStore(this); this.walletService = new WalletService(); - this.contractService = new ContractService(); - this.Web3Service = new Web3Service(); + this.Web3Service = new Web3Service(config.host); + this.contractService = new ContractService(this); } /** diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 7640d8a2..96b4b9f6 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,4 +1,7 @@ +/* eslint-disable no-console */ +/* eslint-disable no-unused-vars */ import { observable, action } from 'mobx'; +import { Transaction as Tx } from 'ethereumjs-tx'; /** * Describes store with user data */ @@ -57,17 +60,25 @@ class UserStore { }); } - @action readWallet(password) { + @action login(password) { this.logging = true; + this.readWallet(password).then((buffer) => { + if (!(buffer instanceof Error)) { + this.privateKey = buffer; + this.authorized = true; + } else { + this.logging = false; + } + }); + } + + @action readWallet(password) { const wallet = JSON.stringify(this.encryptedWallet); return new Promise((resolve, reject) => { this.rootStore.walletService.readWallet(wallet, password).then((data) => { if (data.privateKey) { - this.privateKey = data.privateKey; - this.authorized = true; resolve(data.privateKey); } else { - this.logging = false; reject(); } }); @@ -87,7 +98,20 @@ class UserStore { * @return Signed TX data */ @action singTransaction(data, password) { - return (this.balance, data, password); + return new Promise((resolve, reject) => { + // eslint-disable-next-line consistent-return + this.readWallet(password).then((buffer) => { + if (buffer instanceof Error) return false; + const privateKey = Buffer.from( + buffer, + 'hex', + ); + const tx = new Tx(data, { chain: 'ropsten' }); + tx.sign(privateKey); + const serialized = tx.serialize().toString('hex'); + resolve(serialized); + }); + }); } /** diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index e1e0090d..eebe42f5 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -31,7 +31,7 @@ const createWallet = ({ id, payload: { mnemonic, password, action } }) => { const readWallet = ({ id, payload: { input, password } }) => { try { const data = { - privateKey: ejsWallet.fromV3(input, password).getPrivateKeyString(), + privateKey: ejsWallet.fromV3(input, password).getPrivateKey(), }; return { id, payload: data }; } catch (e) { From e8f491a2f7a89fb137760288283fe654ae718b2e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 8 Nov 2019 07:22:09 +0700 Subject: [PATCH 090/219] creating and restoring wallet now working --- .../CreateNewProjectWithTokens/index.js | 32 ++++++-- .../CreateNewProjectWithoutTokens/index.js | 11 ++- src/components/CreateWallet/index.js | 39 +++++---- src/components/CreationAlert/index.js | 36 +++++++++ src/components/InputSeed/index.js | 79 ++++++++++++++----- src/components/Login/Login.scss | 21 +++++ src/components/Login/index.js | 10 +-- src/components/ProjectUploading/index.js | 12 ++- src/components/Router/SimpleRouter.js | 9 ++- .../ContractService/ContractService.js | 29 +++++++ src/services/WalletService/WalletService.js | 27 ++++--- src/stores/AppStore/AppStore.js | 20 ++++- src/stores/UserStore/UserStore.js | 19 +++-- src/workers/wallet.worker.js | 2 +- 14 files changed, 266 insertions(+), 80 deletions(-) create mode 100644 src/components/CreationAlert/index.js diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 4bef511b..8322850e 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -39,16 +39,19 @@ class CreateNewProjectWithTokens extends Component { }); } - checkToken = () => { + checkToken = (form) => { + const { address } = form.values(); + const { appStore } = this.props; this.setState({ position: 'check', }); - setTimeout(() => { + appStore.checkErc(address).then(({ totalSupply, symbol }) => { + console.log(totalSupply, symbol); this.setState({ position: 'tokenChecked', step: 2, }); - }, 2000); + }); } gotoProjectInfo = () => { @@ -67,11 +70,11 @@ class CreateNewProjectWithTokens extends Component { render() { const { position, step } = this.state; if (position === 'uploading') return ; - const { gotoUploading } = this; + const { gotoUploading, checkToken } = this; const connectToken = new ConnectTokenForm({ hooks: { onSuccess(form) { - console.log(form.values()); + checkToken(form); }, onError(form) { console.log(`ALARM ${form}`); @@ -138,19 +141,30 @@ const LoadingBlock = () => ( ); -const ContractConfirmation = ({ onSubmit }) => ( +const ContractConfirmation = inject('appStore')(observer(({ appStore: { ERC }, onSubmit }) => ( {'Контракт успешно подключен!'} {'Проверьте правильность данных перед тем, как продолжить'}
+
+
+

Символ токена

+

{ERC.symbol}

+
+
+
+

Баланс

+

{ERC.totalSupply}

+
+
-); +))); const InputProjectData = ({ form, onClick }) => ( @@ -202,7 +216,9 @@ const StepIndicator = ({ step, count }) => (
); - +CreateNewProjectWithTokens.propTypes = { + appStore: propTypes.object.isRequired, +}; InputTokenAddress.propTypes = { form: propTypes.object.isRequired, }; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 54f1783b..27d726c1 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -49,17 +49,16 @@ class CreateNewProjectWithoutTokens extends Component { const { name, symbol, count } = form.values(); const deployArgs = [name, symbol, count]; appStore.deployContract('ERC20', deployArgs).then((hash) => { - console.log(hash); // eslint-disable-next-line no-unused-vars const interval = setInterval(() => { // eslint-disable-next-line consistent-return - appStore.checkReciept(hash).then((reciept) => { - if (typeof reciept === 'object') { + appStore.checkReceipt(hash).then((receipt) => { + if (typeof receipt === 'object') { this.setState({ - tokenAddr: reciept.contractAddress, + tokenAddr: receipt.contractAddress, position: 'tokenCreated', }); - console.log(reciept.contractAddress); + console.log(receipt.contractAddress); clearInterval(interval); } }); @@ -83,7 +82,7 @@ class CreateNewProjectWithoutTokens extends Component { render() { const { position, step } = this.state; - if (position === 'uploading') return ; + if (position === 'uploading') return ; const { createToken, gotoUploading } = this; const CreateToken = new CreateTokenForm({ hooks: { diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index fffbebea..0bea51ce 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -26,27 +26,34 @@ class CreateWallet extends Component { super(props); this.state = { redirect: false, + loading: false, }; } - createWallet = () => { - const { appStore, userStore } = this.props; - appStore.setMasterState('createWallet', 'creating'); - userStore.createWallet('password').then((result) => { - if (!result) appStore.setMasterState('createWallet', 'passwordInput'); + createWallet = (form) => { + const { userStore, recover } = this.props; + const { _mnemonic } = userStore; + const values = form.values(); + const seed = _mnemonic.join(' '); + this.setState({ loading: true }); + userStore.createWallet(values.password, seed).then(() => { + if (recover) { + userStore.saveWalletToFile(); + } this.setState({ redirect: true }); + }).catch(() => { + this.setState({ loading: false }); }); } render() { - const { appStore } = this.props; - const { masterSubState } = appStore; - const { redirect } = this.state; + const { recover } = this.props; + const { redirect, loading } = this.state; const { createWallet } = this; const CreateForm = new CreateWalletForm({ hooks: { - onSuccess() { - createWallet(); + onSuccess(form) { + createWallet(form); }, onError(form) { console.log(form); @@ -55,15 +62,17 @@ class CreateWallet extends Component { }); if (redirect) { - return ; + return recover ? : ; } return (
- {masterSubState === 0 ? : ''} - {masterSubState === 1 ? : ''} - + {!loading + ? + : } + + Назад @@ -137,7 +146,7 @@ const CreationLoader = () => ( CreateWallet.propTypes = { userStore: propTypes.object.isRequired, - appStore: propTypes.object.isRequired, + recover: propTypes.bool.isRequired, }; PasswordForm.propTypes = { diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js new file mode 100644 index 00000000..6d2dc6e3 --- /dev/null +++ b/src/components/CreationAlert/index.js @@ -0,0 +1,36 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import { NavLink } from 'react-router-dom'; +import Container from '../Container'; +import Header from '../Header'; +import FormBlock from '../FormBlock'; +import { Button } from '../Button'; +import Heading from '../Heading'; + +import styles from '../Login/Login.scss'; + + +const CreationAlert = ({ success = false }) => ( + +
+
+ + + {'Создание кошелька'} + {success + ? 'Кошелек создан успешно' + : 'Произошла ошибка, попробуйте еще раз'} + + + + + +
+ +); +CreationAlert.propTypes = { + success: propTypes.bool.isRequired, +}; +export default CreationAlert; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index d9eec006..a2011df0 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -1,9 +1,10 @@ +/* eslint-disable no-empty */ /* eslint-disable no-console */ /* eslint-disable no-unused-vars */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; -import { NavLink } from 'react-router-dom'; +import { NavLink, Redirect } from 'react-router-dom'; import Container from '../Container'; import Header from '../Header'; import Heading from '../Heading'; @@ -14,6 +15,7 @@ import styles from '../Login/Login.scss'; import FormBlock from '../FormBlock'; import { Button, IconButton } from '../Button'; import { BackIcon } from '../Icons'; +import Loader from '../Loader'; @inject('appStore', 'userStore') @@ -22,25 +24,53 @@ import { BackIcon } from '../Icons'; class InputSeed extends Component { constructor(props) { super(props); - this.state = {}; + this.state = { + loading: false, + redirect: false, + }; + } + + setRedirect = () => { + this.setState({ redirect: true }); + } + + toggleLoading = () => { + const { loading } = this.state; + this.setState({ + loading: !loading, + }); } render() { - const { userStore } = this.props; + const { userStore, recover } = this.props; const { _mnemonic: seed } = userStore; - + const { loading, redirect } = this.state; + const { setRedirect, toggleLoading } = this; const seedForm = new SeedForm({ hooks: { onSuccess(form) { const values = Object.values(form.values()); const mnemonic = values.join(' '); - console.log(mnemonic); + toggleLoading(); + if (recover) { + userStore.recoverWallet(mnemonic) + .then((data) => { + setRedirect(); + }); + } else if (!recover) { + if (userStore.isSeedValid(mnemonic)) { + userStore.saveWalletToFile(); + setRedirect(); + } + } }, onError(form) { console.log(`ALARM ${form}`); }, }, }); + + if (redirect) return recover ? : ; return (
@@ -48,22 +78,11 @@ class InputSeed extends Component { {'Проверка резервной фразы'} - {'Введите фразу, которую вы записали'} + {loading ? 'Проверяется фраза' : 'Введите фразу, которую вы записали'} -
-
- {seed.map((word, index) => ( - - {index + 1} - - ))} -
-
- -
-
+ {loading ? : }
- + Назад @@ -75,9 +94,31 @@ class InputSeed extends Component { } } +const InputBlock = ({ form, seed }) => ( + +
+
+ {seed.map((word, index) => ( + + {index + 1} + + ))} +
+
+ +
+
+ +); + InputSeed.propTypes = { userStore: propTypes.object.isRequired, + recover: propTypes.bool.isRequired, +}; +InputBlock.propTypes = { + form: propTypes.object.isRequired, + seed: propTypes.arrayOf(propTypes.string).isRequired, }; export default InputSeed; diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index c5c2620c..723c72b9 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -86,6 +86,27 @@ } } } + &__token { + display: flex; + &-half { + display: inline-block; + width: calc(50% - 1px); + } + &-label { + margin-bottom: 10px; + font-weight: bold; + font-size: 14px; + } + &-divider { + display: inline-block; + width: 1px; + background-color: $primary; + } + &-value { + color: $secondary; + font-size: 14px; + } + } } .seed { display: flex; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index a2c47079..da6fb1aa 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -32,11 +32,6 @@ class Login extends Component { appStore.readWalletList(); } - createKey = () => { - const { appStore } = this.props; - appStore.setMasterState('createWallet', 'passwordInput'); - } - render() { // eslint-disable-next-line no-unused-vars const { appStore, userStore } = this.props; @@ -77,7 +72,7 @@ class Login extends Component { } const InputForm = ({ - appStore, form, createKey, + appStore, form, }) => ( @@ -94,7 +89,7 @@ const InputForm = ({
- + @@ -121,7 +116,6 @@ Login.propTypes = { }; InputForm.propTypes = { appStore: propTypes.object.isRequired, - createKey: propTypes.func.isRequired, form: propTypes.object.isRequired, }; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 37a754a4..3e9c24d5 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; -// import propTypes from 'prop-types'; +import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -23,6 +23,12 @@ class ProjectUploading extends Component { }; } + componentDidMount() { + const { newTokens } = this.props; + // eslint-disable-next-line no-console + console.log(`newTokens = ${newTokens}`); + } + render() { const { step } = this.state; return ( @@ -87,6 +93,8 @@ class ProjectUploading extends Component { } // //ProjectUploading.propTypes = {}; - +ProjectUploading.propTypes = { + newTokens: propTypes.bool.isRequired, +}; export default ProjectUploading; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 75e95e5d..8d9c2622 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -14,6 +14,7 @@ import CreateNewProjectWithoutTokens from '../CreateNewProjectWithoutTokens'; import AddExistingProject from '../AddExisitingProject'; import AddNewProject from '../AddNewProject'; import ProjectUploading from '../ProjectUploading'; +import CreationAlert from '../CreationAlert'; const SimpleRouter = () => ( @@ -21,14 +22,18 @@ const SimpleRouter = () => ( - + ())} /> + ())} /> + ())} /> + ())} /> - + ())} /> + ())} /> ); diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 1b6b6a79..a7c0df41 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -21,6 +21,11 @@ class ContractService { this._contract = instance; } + /** + * compiling contracts and returning type of compiled contract, bytecode & abi + * @param {string} type - ERC20 - if compiling ERC20 token contract, project - if project contract + * @returns {object} contains type of compiled contract, his bytecode and abi for deploying + */ compileContract(type) { this.combineContract(type); return new Promise((resolve, reject) => { @@ -48,6 +53,10 @@ class ContractService { }); } + /** + * reading all imports in main contract file and importing all files in one output file + * @param {string} type type of project - ERC20 for ERC-20 tokens, Project for project contract + */ // eslint-disable-next-line class-methods-use-this combineContract(type) { let imports; @@ -80,6 +89,15 @@ class ContractService { fs.writeFileSync(path.join(PATH_TO_CONTRACTS, `${dir}output.sol`), mainContract, 'utf8'); } + /** + * Sendind transaction with contract to blockchain + * @param {object} params parameters for deploying + * @param {string} params.type ERC20 if deploying ERC20 token, Project - if project contract + * @param {array} params.deployArgs ERC20 - [Name, Symbol, Count], Project - [tokenAddress] + * @param {string} params.bytecode bytecode of contract + * @param {JSON} params.abi JSON interface of contract + * @returns {Promise} Promise of web3.sendSignedTransaction which resolves on txHash + */ deployContract({ type, deployArgs, bytecode, abi, }) { @@ -118,6 +136,17 @@ class ContractService { return this.contract.methods[method](params).encodeABI(); } + async checkTokens(address) { + const { rootStore: { Web3Service, userStore } } = this; + const abi = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './ERC20.abi'))); + const contract = Web3Service.createContractInstance(abi); + contract.options.address = address; + const totalSupply = await contract.methods.totalSupply().call(); + const symbol = await contract.methods.symbol().call(); + + return { totalSupply, symbol }; + } + /** * calling contract method * @param {string} method method, which will be called diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 48ba902f..f7242988 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -33,9 +33,9 @@ class WalletService { writeWalletToFile(encryptedWallet) { let date = new Date(); date = `${date.getUTCFullYear()}-${date.getUTCDate()}-${date.getUTCDay()}T${date.getUTCHours()}-${date.getUTCMinutes()}-${date.getUTCSeconds()}.${date.getMilliseconds() * 1000000}Z`; - const walletName = (JSON.parse(encryptedWallet)).address; + const walletName = encryptedWallet.address; const name = `UTC--${date}--${walletName}`; - fs.writeFileSync(path.join(PATH_TO_WALLETS, `${name}.json`), encryptedWallet, 'utf8'); + fs.writeFileSync(path.join(PATH_TO_WALLETS, `${name}.json`), JSON.stringify(encryptedWallet, null, '\t'), 'utf8'); } /** @@ -43,11 +43,12 @@ class WalletService { * @param {string} password - combination of symbols which will be allow decode wallet * @returns {object} encryptedWallet,seed */ - createWallet(password) { + createWallet(password, seed = '') { + const mnemonic = seed === '' ? bip39.generateMnemonic() : seed; const data = { action: 'create', password, - mnemonic: bip39.generateMnemonic(), + mnemonic, }; return worker.send(data); } @@ -58,11 +59,15 @@ class WalletService { * @returns {object} wallet object */ recoverWallet(mnemonic) { - const data = { - action: 'recover', - mnemonic, - }; - worker.send(data); + return new Promise((resolve, reject) => { + if (bip39.validateMnemonic) { + const data = { + action: 'recover', + mnemonic, + }; + resolve(worker.send(data)); + } else reject(); + }); } /** @@ -71,8 +76,8 @@ class WalletService { * @param {string} password password * @return {bool} is password correct */ - checkPassword(wallet, password) { - return (this, wallet, password); + validateMnemonic(mnemonic) { + return bip39.validateMnemonic(mnemonic); } } export default WalletService; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index f72884f6..9b487ce5 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -9,9 +9,9 @@ class AppStore { @observable projectList = []; - @observable masterState = 0; + @observable ERC = { - @observable masterSubState = null; + } constructor(rootStore) { this.rootStore = rootStore; @@ -71,7 +71,21 @@ class AppStore { }); } - @action checkReciept(hash) { + @action checkErc(address) { + const { contractService } = this.rootStore; + return new Promise((resolve, reject) => { + contractService.checkTokens(address).then((data) => { + if (data.totalSupply) { + this.ERC = { ...data }; + resolve(data); + } else { + reject(); + } + }); + }); + } + + @action checkReceipt(hash) { const { Web3Service: { web3 } } = this.rootStore; return web3.eth.getTransactionReceipt(hash); } diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 96b4b9f6..a8473d88 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -66,9 +66,9 @@ class UserStore { if (!(buffer instanceof Error)) { this.privateKey = buffer; this.authorized = true; - } else { - this.logging = false; } + }).catch(() => { + this.logging = false; }); } @@ -85,9 +85,18 @@ class UserStore { }); } - @action recoverWallet() { - const seed = this._mnemonic.join(' '); - this.rootStore.walletService.recoverWallet(seed); + @action recoverWallet(mnemonic) { + return this.rootStore.walletService.recoverWallet(mnemonic); + } + + @action saveWalletToFile() { + const { walletService } = this.rootStore; + walletService.writeWalletToFile(this.encryptedWallet); + } + + @action isSeedValid(mnemonic) { + const { walletService } = this.rootStore; + return walletService.validateMnemonic(mnemonic); } /** diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index eebe42f5..e1582f1d 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -5,7 +5,7 @@ const bip39 = require('bip39'); const walletHdPath = "m/44'/60'/0'/0/0"; -const createWallet = ({ id, payload: { mnemonic, password, action } }) => { +const createWallet = ({ id, payload: { mnemonic, password = '', action } }) => { try { const wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) .derivePath(walletHdPath) From 8eb7f890684fbbd9de4611ed881694bdfd10c62a Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 8 Nov 2019 16:25:37 +0700 Subject: [PATCH 091/219] deploying contract and more improvements --- package-lock.json | 2172 ++++------------- package.json | 39 +- src/assets/styles/style.scss | 12 +- src/components/AddExisitingProject/index.js | 29 +- .../CreateNewProjectWithTokens/index.js | 10 +- .../CreateNewProjectWithoutTokens/index.js | 80 +- src/components/InputSeed/index.js | 2 - src/components/Login/Login.scss | 2 +- src/components/ProjectList/index.js | 8 +- .../ProjectUploading/ProgressBlock/index.js | 4 +- src/components/ProjectUploading/index.js | 40 +- src/config.json | 20 + src/models/FormModel/index.js | 1 - .../ContractService/ContractService.js | 106 +- src/stores/AppStore/AppStore.js | 51 +- src/stores/FormsStore/ConnectProject.js | 6 + src/workers/wallet.worker.js | 1 - 17 files changed, 802 insertions(+), 1781 deletions(-) diff --git a/package-lock.json b/package-lock.json index c44a031c..23c32836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -934,11 +934,6 @@ "@babel/plugin-transform-react-jsx-source": "^7.0.0" } }, - "@babel/preset-stage-0": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/preset-stage-0/-/preset-stage-0-7.0.0.tgz", - "integrity": "sha512-FBMd0IiARPtH5aaOFUVki6evHiJQiY0pFy7fizyRF7dtwc+el3nwpzvhb9qBNzceG1OIJModG1xpE0DDFjPXwA==" - }, "@babel/preset-typescript": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz", @@ -1017,6 +1012,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.6.0.tgz", "integrity": "sha512-xuvAzbN9iBApfAMvW0hKUpxHR5wPVbG9RaoSTbpu/WaHISDu0MVfMWYhfeU0X730CpBV0G2RkLgwAs9WDan3GA==", + "dev": true, "requires": { "debug": "^4.1.1", "env-paths": "^2.2.0", @@ -1026,6 +1022,19 @@ "got": "^9.6.0", "sanitize-filename": "^1.6.2", "sumchecker": "^3.0.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } } }, "@emotion/cache": { @@ -1440,24 +1449,17 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, "requires": { "call-me-maybe": "^1.0.1", "glob-to-regexp": "^0.3.0" } }, - "@namics/stylelint-bem": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@namics/stylelint-bem/-/stylelint-bem-6.1.0.tgz", - "integrity": "sha512-YCgd+C+H20P3wjzgbFN4WLhvhUwCVs6gFl0SO9CrEAt+PsXPP0sADUkCh42zPMZjGjN8H3GQ4iq5YmFqO3sAsw==", - "requires": { - "css-selector-classes": "0.1.2", - "postcss-resolve-nested-selector": "0.1.1" - } - }, "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true }, "@reach/router": { "version": "1.2.1", @@ -2224,12 +2226,14 @@ "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "dev": true }, "@types/glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "dev": true, "requires": { "@types/events": "*", "@types/minimatch": "*", @@ -2276,7 +2280,8 @@ "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true }, "@types/node": { "version": "12.11.1", @@ -2359,30 +2364,6 @@ } } }, - "@types/unist": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", - "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==" - }, - "@types/vfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz", - "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==", - "requires": { - "@types/node": "*", - "@types/unist": "*", - "@types/vfile-message": "*" - } - }, - "@types/vfile-message": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-1.0.1.tgz", - "integrity": "sha512-mlGER3Aqmq7bqR1tTTIVHq8KSAFFRyGbrxuM8C/H82g6k7r2fS+IMEkIu3D7JHzG10NvPdR8DNx0jr0pwpp4dA==", - "requires": { - "@types/node": "*", - "@types/unist": "*" - } - }, "@types/webpack": { "version": "4.39.4", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.4.tgz", @@ -2677,9 +2658,9 @@ "dev": true }, "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" }, "airbnb-js-shims": { "version": "2.2.0", @@ -2813,7 +2794,8 @@ "ansi-colors": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==" + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true }, "ansi-escapes": { "version": "3.2.0", @@ -2824,12 +2806,14 @@ "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, "ansi-styles": { "version": "3.2.1", @@ -2952,6 +2936,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -2996,12 +2981,8 @@ "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true }, "array-includes": { "version": "3.0.3", @@ -3017,6 +2998,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, "requires": { "array-uniq": "^1.0.1" } @@ -3024,7 +3006,8 @@ "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true }, "array-unique": { "version": "0.3.2", @@ -3066,7 +3049,8 @@ "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true }, "asap": { "version": "2.0.6", @@ -3141,12 +3125,14 @@ "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { "lodash": "^4.17.14" } @@ -3187,6 +3173,7 @@ "version": "9.6.5", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.5.tgz", "integrity": "sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g==", + "dev": true, "requires": { "browserslist": "^4.7.0", "caniuse-lite": "^1.0.30000999", @@ -3881,11 +3868,6 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, - "bail": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz", - "integrity": "sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==" - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -3954,11 +3936,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" - }, "batch-processor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/batch-processor/-/batch-processor-1.0.0.tgz", @@ -4111,19 +4088,6 @@ } } }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -4131,9 +4095,10 @@ "dev": true }, "boolean": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-2.0.2.tgz", - "integrity": "sha512-ymsbJQlux/uogyEWfsXJUYzuyoOzPyp6NvEV71s6/ptQR7ptKO9uHF+WZL2GRATDeN52EFhNyrIu+exNZKh3Cw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-2.0.3.tgz", + "integrity": "sha512-iHzXeFCXWrpjYE7DToXGCBPGZf0eVISqzL+4sgrOSYEKXnb59WHPFvGTTyCj6zJ/MuuLAxEn8zPkrTHHzlt3IA==", + "dev": true, "optional": true }, "boxen": { @@ -4339,6 +4304,7 @@ "version": "4.7.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.1.tgz", "integrity": "sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg==", + "dev": true, "requires": { "caniuse-lite": "^1.0.30000999", "electron-to-chromium": "^1.3.284", @@ -4411,11 +4377,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" - }, "buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", @@ -4475,11 +4436,6 @@ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, "cacache": { "version": "12.0.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", @@ -4570,12 +4526,14 @@ "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, "requires": { "callsites": "^2.0.0" }, @@ -4583,7 +4541,8 @@ "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true } } }, @@ -4591,6 +4550,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, "requires": { "caller-callsite": "^2.0.0" } @@ -4636,7 +4596,8 @@ "caniuse-lite": { "version": "1.0.30001001", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001001.tgz", - "integrity": "sha512-MsWRX5x8GsZJcvIh1zkTERAcX9cRlT+If1f4xk3B5EAJftiwjab2oBKPbned9IuBiKae5u9PMp7T2xJBDo+9Sw==" + "integrity": "sha512-MsWRX5x8GsZJcvIh1zkTERAcX9cRlT+If1f4xk3B5EAJftiwjab2oBKPbned9IuBiKae5u9PMp7T2xJBDo+9Sw==", + "dev": true }, "capture-exit": { "version": "2.0.0", @@ -4667,11 +4628,6 @@ "lodash": "^4.17.14" } }, - "ccount": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.4.tgz", - "integrity": "sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==" - }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", @@ -4695,17 +4651,14 @@ "character-entities": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz", - "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==" - }, - "character-entities-html4": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.3.tgz", - "integrity": "sha512-SwnyZ7jQBCRHELk9zf2CN5AnGEc2nA+uKMZLHvcqhpPprjkYhiLn0DywMHgN5ttFZuITMATbh68M6VIVKwJbcg==" + "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==", + "dev": true }, "character-entities-legacy": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz", - "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==" + "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==", + "dev": true }, "character-parser": { "version": "2.2.0", @@ -4719,7 +4672,8 @@ "character-reference-invalid": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz", - "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==" + "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==", + "dev": true }, "chardet": { "version": "0.7.0", @@ -4978,15 +4932,6 @@ "shallow-clone": "^3.0.0" } }, - "clone-regexp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz", - "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", - "requires": { - "is-regexp": "^1.0.0", - "is-supported-regexp-flag": "^1.0.0" - } - }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -5015,7 +4960,8 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, "coinstring": { "version": "2.3.0", @@ -5033,11 +4979,6 @@ } } }, - "collapse-white-space": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz", - "integrity": "sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ==" - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5102,43 +5043,6 @@ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, - "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", - "requires": { - "mime-db": ">= 1.40.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -5317,6 +5221,7 @@ "version": "1.1.12", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "dev": true, "optional": true, "requires": { "ini": "^1.3.4", @@ -5360,11 +5265,6 @@ "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", "dev": true }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" - }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -5616,6 +5516,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", @@ -5627,6 +5528,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, "requires": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" @@ -5636,6 +5538,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -5644,7 +5547,8 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true } } }, @@ -5696,6 +5600,7 @@ "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -5784,20 +5689,6 @@ "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", "dev": true }, - "css-selector-classes": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/css-selector-classes/-/css-selector-classes-0.1.2.tgz", - "integrity": "sha1-JAPY5WAQHIKcXx35MIAyp6Qfw3Y=", - "requires": { - "array-uniq": "^1.0.2", - "css-selector-parser": "~1.0.3" - } - }, - "css-selector-parser": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.0.4.tgz", - "integrity": "sha1-Zd/mFL1f0XW2Sgo/GTuHD8V5B3M=" - }, "css-tree": { "version": "1.0.0-alpha.33", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.33.tgz", @@ -5872,6 +5763,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, "requires": { "array-find-index": "^1.0.1" } @@ -5956,16 +5848,8 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - } + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true }, "decode-uri-component": { "version": "0.2.0", @@ -6062,14 +5946,6 @@ "yauzl": "^2.4.2" }, "dependencies": { - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "requires": { - "pend": "~1.2.0" - } - }, "file-type": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", @@ -6083,31 +5959,9 @@ "object-assign": "^4.0.1", "pinkie-promise": "^2.0.0" } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } } } }, - "deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", - "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -6126,15 +5980,6 @@ "integrity": "sha512-b+QLs5vHgS+IoSNcUE4n9HP2NwcHj7aqnJWsjPtuG75Rh5TOaGt0OjAYInh77d5T16V5cRDC+Pw/6ZZZiETBGw==", "dev": true }, - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", - "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - }, "defer-to-connect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.0.2.tgz", @@ -6189,6 +6034,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, "requires": { "@types/glob": "^7.1.1", "globby": "^6.1.0", @@ -6202,7 +6048,8 @@ "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true } } }, @@ -6258,7 +6105,9 @@ "detect-node": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "dev": true, + "optional": true }, "detect-port": { "version": "1.3.0", @@ -6313,6 +6162,7 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, "requires": { "path-type": "^3.0.0" }, @@ -6321,6 +6171,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, "requires": { "pify": "^3.0.0" } @@ -6328,7 +6179,8 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -6375,28 +6227,6 @@ } } }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "requires": { - "buffer-indexof": "^1.0.0" - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -6425,6 +6255,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "dev": true, "requires": { "domelementtype": "^2.0.1", "entities": "^2.0.0" @@ -6433,12 +6264,14 @@ "domelementtype": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", - "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==" + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true }, "entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==" + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true } } }, @@ -6455,7 +6288,8 @@ "domelementtype": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true }, "domexception": { "version": "1.0.1", @@ -6470,6 +6304,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, "requires": { "domelementtype": "1" } @@ -6478,6 +6313,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, "requires": { "dom-serializer": "0", "domelementtype": "1" @@ -6487,6 +6323,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, "requires": { "is-obj": "^1.0.0" } @@ -6582,9 +6419,10 @@ "dev": true }, "electron": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-7.0.0.tgz", - "integrity": "sha512-vrF1loRW1p0vQCbduqO0EZpo8ePJOuxUT6tSoUSU3lsbGK3VnlJop+0PpCIPzbe2K4G4Gk7WexH08V9se7mJcA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-7.1.1.tgz", + "integrity": "sha512-NJPv4SuMJlRUtXBd/Ey9XKSLOZ4+hxsOrHHPXwrBQNNdeZesoSrTMgPymee/FwMRtrSt0Pz8NccEZUu/pxmbhQ==", + "dev": true, "requires": { "@electron/get": "^1.0.1", "@types/node": "^12.0.12", @@ -6745,11 +6583,6 @@ "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz", "integrity": "sha1-UJ5RDCala1Xhf4Y6SwThEYRqsns=" }, - "electron-is-dev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.1.0.tgz", - "integrity": "sha512-Z1qA/1oHNowGtSBIcWk0pcLEqYT/j+13xUw/MYOrBUOL4X7VN0i0KCTf5SqyvMPmW5pSPKbo28wkxMxzZ20YnQ==" - }, "electron-localshortcut": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-3.1.0.tgz", @@ -6813,7 +6646,8 @@ "electron-to-chromium": { "version": "1.3.289", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.289.tgz", - "integrity": "sha512-39GEOWgTxtMDk/WjIQLg4W/l1s4FZdiMCqUBLjd92tAXsBPDFLwuwCba5OGhuTdVYm6E128TZIqSnMpeocUlCQ==" + "integrity": "sha512-39GEOWgTxtMDk/WjIQLg4W/l1s4FZdiMCqUBLjd92tAXsBPDFLwuwCba5OGhuTdVYm6E128TZIqSnMpeocUlCQ==", + "dev": true }, "element-resize-detector": { "version": "1.1.15", @@ -6841,7 +6675,8 @@ "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "emojis-list": { "version": "2.1.0", @@ -6905,12 +6740,14 @@ "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true }, "env-paths": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "dev": true }, "enzyme": { "version": "3.10.0", @@ -6994,6 +6831,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -7026,13 +6864,13 @@ } }, "es5-ext": { - "version": "0.10.51", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", - "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", + "version": "0.10.52", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz", + "integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==", "requires": { "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "^1.0.0" + "es6-symbol": "~3.1.2", + "next-tick": "~1.0.0" } }, "es5-shim": { @@ -7045,6 +6883,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true, "optional": true }, "es6-iterator": { @@ -7064,12 +6903,12 @@ "dev": true }, "es6-symbol": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz", - "integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "requires": { "d": "^1.0.1", - "es5-ext": "^0.10.51" + "ext": "^1.1.2" } }, "escape-html": { @@ -7602,7 +7441,8 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "esquery": { "version": "1.0.1", @@ -7664,18 +7504,6 @@ "servify": "^0.1.12", "ws": "^3.0.0", "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } } }, "ethereum-bloom-filters": { @@ -7694,9 +7522,9 @@ } }, "ethereumjs-common": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.3.2.tgz", - "integrity": "sha512-GkltYRIqBLzaZLmF/K3E+g9lZ4O4FL+TtpisAlD3N+UVlR+mrtoG+TvxavqVa6PwOY4nKIEMe5pl6MrTio3Lww==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.4.0.tgz", + "integrity": "sha512-ser2SAplX/YI5W2AnzU8wmSjKRy4KQd4uxInJ36BzjS3m18E/B9QedPUIresZN1CSEQb/RgNQ2gN7C/XbpTafA==" }, "ethereumjs-tx": { "version": "2.1.1", @@ -7708,16 +7536,16 @@ } }, "ethereumjs-util": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", - "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", "requires": { + "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", "create-hash": "^1.1.2", "ethjs-util": "0.1.6", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", + "keccak": "^2.0.0", + "rlp": "^2.2.3", "secp256k1": "^3.0.1" } }, @@ -7735,13 +7563,6 @@ "scrypt.js": "^0.3.0", "utf8": "^3.0.0", "uuid": "^3.3.2" - }, - "dependencies": { - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" - } } }, "ethers": { @@ -7762,9 +7583,14 @@ }, "dependencies": { "@types/node": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.0.tgz", - "integrity": "sha512-wuJwN2KV4tIRz1bu9vq5kSPasJ8IsEjZaP1ZR7KlmdUZvGF/rXy8DmXOVwUD0kAtvtJ7aqMKPqUXC0NUTDbrDg==" + "version": "10.17.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.4.tgz", + "integrity": "sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ==" + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, "elliptic": { "version": "6.3.3", @@ -7831,7 +7657,8 @@ "eventemitter3": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "dev": true }, "events": { "version": "3.0.0", @@ -7842,6 +7669,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", + "dev": true, "requires": { "original": "^1.0.0" } @@ -7865,6 +7693,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -7875,14 +7704,6 @@ "strip-eof": "^1.0.0" } }, - "execall": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz", - "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", - "requires": { - "clone-regexp": "^1.0.0" - } - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -8024,6 +7845,21 @@ } } }, + "ext": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz", + "integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -8122,6 +7958,7 @@ "version": "1.6.7", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "dev": true, "requires": { "concat-stream": "1.6.2", "debug": "2.6.9", @@ -8133,14 +7970,34 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "yauzl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "dev": true, + "requires": { + "fd-slicer": "~1.0.1" + } } } }, @@ -8158,6 +8015,7 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", "@nodelib/fs.stat": "^1.1.2", @@ -8187,14 +8045,6 @@ "format": "^0.2.2" } }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "requires": { - "websocket-driver": ">=0.5.1" - } - }, "fb-watchman": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", @@ -8228,9 +8078,9 @@ } }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "requires": { "pend": "~1.2.0" } @@ -8411,6 +8261,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, "requires": { "flatted": "^2.0.0", "rimraf": "2.6.3", @@ -8420,7 +8271,8 @@ "flatted": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true }, "flush-write-stream": { "version": "1.1.1", @@ -8437,24 +8289,6 @@ "integrity": "sha512-Dx69IXGCq1qsUExWuG+5wkiMqVM/zGx/reXSJSLogECwp3x6KeNQZ+NAetgxEFpnC41rD8U3+jRCW68+LNzdtw==", "dev": true }, - "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", - "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - } - } - }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -8547,11 +8381,11 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "requires": { - "graceful-fs": "^4.2.0", + "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } @@ -9173,7 +9007,8 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true }, "get-stdin": { "version": "4.0.1", @@ -9219,6 +9054,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -9228,6 +9064,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, "requires": { "is-extglob": "^2.1.0" } @@ -9237,7 +9074,8 @@ "glob-to-regexp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true }, "global": { "version": "4.4.0", @@ -9253,6 +9091,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.5.tgz", "integrity": "sha512-pYJjCxxNBzYxo6iNO62JZn8iCFVbvpiM0zE4w/G5hBNIvLjnvzIeCVQPMKc3aK8ju5L7Q8NNI/oBSosU0eeSYw==", + "dev": true, "optional": true, "requires": { "boolean": "^2.0.2", @@ -9265,15 +9104,17 @@ }, "dependencies": { "core-js": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.5.tgz", - "integrity": "sha512-0J3K+Par/ZydhKg8pEiTcK/9d65/nqJOzY62uMkjeBmt05fDOt/khUVjDdh8TpeIuGQDy1yLDDCjiWN/8pFIuw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.4.0.tgz", + "integrity": "sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA==", + "dev": true, "optional": true }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, "optional": true } } @@ -9291,6 +9132,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, "requires": { "global-prefix": "^3.0.0" }, @@ -9299,6 +9141,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, "requires": { "ini": "^1.3.5", "kind-of": "^6.0.2", @@ -9324,6 +9167,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", + "dev": true, "optional": true, "requires": { "encodeurl": "^1.0.2", @@ -9341,6 +9185,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.0.tgz", "integrity": "sha512-vcCAZTJ3r5Qcu5l8/2oyVdoFwxKgfYnMTR2vwWeux/NAVZK3PwcMaWkdUIn4GJbmKuRK7xcvDsLuK+CKcXyodg==", + "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", @@ -9351,6 +9196,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, "requires": { "array-union": "^1.0.1", "glob": "^7.0.3", @@ -9359,11 +9205,6 @@ "pinkie-promise": "^2.0.0" } }, - "globjoin": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", - "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=" - }, "globule": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", @@ -9375,21 +9216,6 @@ "minimatch": "~3.0.2" } }, - "gonzales-pe": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.4.tgz", - "integrity": "sha512-v0Ts/8IsSbh9n1OJRnSfa7Nlxi4AkXIsWB6vPept8FDbL4bXn3FNuxjYtO/nmBGu7GDkL9MFeGebeSu6l55EPQ==", - "requires": { - "minimist": "1.1.x" - }, - "dependencies": { - "minimist": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", - "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=" - } - } - }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -9457,11 +9283,6 @@ } } }, - "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==" - }, "handlebars": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", @@ -9692,18 +9513,8 @@ "hosted-git-info": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==" - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true }, "html-element-map": { "version": "1.1.0", @@ -9726,7 +9537,8 @@ "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true }, "html-minifier": { "version": "4.0.0", @@ -9743,11 +9555,6 @@ "uglify-js": "^3.5.1" } }, - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" - }, "html-webpack-plugin": { "version": "4.0.0-beta.8", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.8.tgz", @@ -9766,6 +9573,7 @@ "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, "requires": { "domelementtype": "^1.3.1", "domhandler": "^2.3.0", @@ -9779,6 +9587,7 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9792,11 +9601,6 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" - }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -9824,28 +9628,8 @@ "http-parser-js": { "version": "0.4.10", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=" - }, - "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "dev": true }, "http-signature": { "version": "1.2.0", @@ -9962,6 +9746,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" @@ -9990,7 +9775,8 @@ "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true }, "infer-owner": { "version": "1.0.4", @@ -10014,7 +9800,8 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true }, "inquirer": { "version": "6.5.2", @@ -10054,15 +9841,6 @@ } } }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", - "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - } - }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", @@ -10087,23 +9865,14 @@ "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -10125,31 +9894,24 @@ "is-alphabetical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.3.tgz", - "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==" - }, - "is-alphanumeric": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", - "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=" + "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==", + "dev": true }, "is-alphanumerical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz", "integrity": "sha512-A1IGAPO5AW9vSh7omxIlOGwIqEvpW/TA+DksVOPM5ODuxKlZS09+TEM1E3275lJqO2oJ38vDpeAL3DCIiHE6eA==", + "dev": true, "requires": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-binary-path": { "version": "1.0.1", @@ -10210,7 +9972,8 @@ "is-decimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz", - "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==" + "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==", + "dev": true }, "is-descriptor": { "version": "0.1.6", @@ -10232,7 +9995,8 @@ "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true }, "is-expression": { "version": "3.0.0", @@ -10274,7 +10038,8 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "is-function": { "version": "1.0.1", @@ -10303,7 +10068,8 @@ "is-hexadecimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz", - "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==" + "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==", + "dev": true }, "is-installed-globally": { "version": "0.1.0", @@ -10364,7 +10130,8 @@ "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true }, "is-object": { "version": "1.0.1", @@ -10374,12 +10141,14 @@ "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true }, "is-path-in-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, "requires": { "is-path-inside": "^2.1.0" } @@ -10388,6 +10157,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, "requires": { "path-is-inside": "^1.0.2" } @@ -10419,11 +10189,6 @@ "has": "^1.0.1" } }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" - }, "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", @@ -10452,11 +10217,6 @@ "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", "dev": true }, - "is-supported-regexp-flag": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz", - "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==" - }, "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -10476,21 +10236,11 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, - "is-whitespace-character": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz", - "integrity": "sha512-SNPgMLz9JzPccD3nPctcj8sZlX9DAMJSKH8bP7Z6bohCwuNgX8xbWr1eTAYXX9Vpi/aSn8Y1akL9WgM3t43YNQ==" - }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, - "is-word-character": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.3.tgz", - "integrity": "sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A==" - }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -10516,7 +10266,8 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "isobject": { "version": "3.0.1", @@ -11360,6 +11111,7 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -11514,7 +11266,8 @@ "json3": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", + "dev": true }, "json5": { "version": "2.1.1", @@ -11564,9 +11317,9 @@ } }, "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.0.0.tgz", + "integrity": "sha512-rKe/lRr0KGhjoz97cwg+oeT1Rj/Y4cjae6glArioUC8JBF9ROGZctwIaaruM7d7naovME4Q8WcQSO908A8qcyQ==", "requires": { "bindings": "^1.2.1", "inherits": "^2.0.3", @@ -11601,11 +11354,6 @@ "json-buffer": "3.0.0" } }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==" - }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -11626,11 +11374,6 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, - "known-css-properties": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", - "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==" - }, "latest-version": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", @@ -11844,30 +11587,12 @@ "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", "dev": true }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "requires": { - "chalk": "^2.0.1" - } - }, - "loglevel": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.4.tgz", - "integrity": "sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==" - }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true }, - "longest-streak": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz", - "integrity": "sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw==" - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -11880,6 +11605,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -11950,6 +11676,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -11962,7 +11689,8 @@ "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true }, "map-or-similar": { "version": "1.5.0", @@ -11978,11 +11706,6 @@ "object-visit": "^1.0.0" } }, - "markdown-escapes": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz", - "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==" - }, "markdown-it": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", @@ -12002,11 +11725,6 @@ "integrity": "sha512-xLIjLQmtym3QpoY9llBgApknl7pxAcN3WDRc2d3rwpl+/YvDZHPmKscGs+L6E05xf2KrCXPBvosWt7MZukwSpQ==", "dev": true }, - "markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==" - }, "markdown-to-jsx": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-6.10.3.tgz", @@ -12027,6 +11745,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.0.0.tgz", "integrity": "sha512-nlmfSlgHBFx36j/Pl/KQPbIaqE8Zf0TqmSMjsuddHDg6PMSVgmyW9HpkLs0o0M1n2GIZ/S2BZBLIww/xjhiGng==", + "dev": true, "optional": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -12036,15 +11755,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, "optional": true } } }, - "mathml-tag-names": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz", - "integrity": "sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw==" - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -12055,14 +11770,6 @@ "safe-buffer": "^5.1.2" } }, - "mdast-util-compact": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.3.tgz", - "integrity": "sha512-nRiU5GpNy62rZppDKbLwhhtw5DXoFMqw9UNZFmlPsNaQCZ//WLjGKUwWMdJrUH+Se7UvtO2gXtAMe0g/N+eI5w==", - "requires": { - "unist-util-visit": "^1.1.0" - } - }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -12084,6 +11791,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -12093,7 +11801,8 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true } } }, @@ -12211,7 +11920,8 @@ "merge2": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==" + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "dev": true }, "methods": { "version": "1.1.2", @@ -12355,15 +12065,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -12466,9 +12167,9 @@ } }, "mobx": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/mobx/-/mobx-5.14.2.tgz", - "integrity": "sha512-yx5Xe6o2WSYFgeytzZt6jGaYghJdQbd1ElR7S2s93x7/+5SYfJBfutvZF1O5gPEsUyTAFZ5IMYGu1KyhkPk+oQ==" + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-5.15.0.tgz", + "integrity": "sha512-Ax7vE32zBRgO0A3Yu12RXaFwIhBzpGQXZjRHiDvKLrqpDEijhNTSuXJ1Ci+L30BSa/Mb3by9+3nuKq15YoH5dA==" }, "mobx-react": { "version": "6.1.4", @@ -12491,15 +12192,10 @@ "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-1.5.0.tgz", "integrity": "sha512-Ss8RLKKGn+QhKbfCHvQ4+RPEVKR8AnPW1wNyWzZAS3wYw7UP4FX6GdRn64sdOhrP646o/JtXbLuDuc4RH3Bqyg==" }, - "mobx-utils": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/mobx-utils/-/mobx-utils-5.5.1.tgz", - "integrity": "sha512-blwMbRPCqdEOX6+sG9L7ptPKUXc6ol7e0iNfT4X3tmlXVndpRlrL95qvcNH5IR+UGSPizhGwiKSlTbreaJJUrA==" - }, "mock-fs": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.2.tgz", - "integrity": "sha512-ewPQ83O4U8/Gd8I15WoB6vgTTmq5khxBskUWCRvswUqjCfOOTREmxllztQOm+PXMWUxATry+VBWXQJloAyxtbQ==" + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.3.tgz", + "integrity": "sha512-bcukePBvuA3qovmq0Qtqu9+1APCIGkFHnsozrPIVromt5XFGGgkQSfaN0H6RI8gStHkO/hRgimvS3tooNes4pQ==" }, "moo": { "version": "0.4.3", @@ -12525,20 +12221,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" - }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -12610,7 +12292,8 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "no-case": { "version": "2.3.2", @@ -12640,11 +12323,6 @@ "is-stream": "^1.0.1" } }, - "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==" - }, "node-gyp": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", @@ -12739,6 +12417,7 @@ "version": "1.1.36", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.36.tgz", "integrity": "sha512-ggXhX6QGyJSjj3r+6ml2LqqC28XOWmKtpb+a15/Zpr9V3yoNazxJNlcQDS9bYaid5FReEWHEgToH1mwoUceWwg==", + "dev": true, "requires": { "semver": "^6.3.0" }, @@ -12746,7 +12425,8 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -12825,6 +12505,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -12840,12 +12521,8 @@ "normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" - }, - "normalize-selector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", - "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=" + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true }, "normalize-url": { "version": "4.5.0", @@ -12856,6 +12533,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "dev": true, "optional": true, "requires": { "config-chain": "^1.1.11", @@ -12866,6 +12544,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, "optional": true } } @@ -12874,6 +12553,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, "requires": { "path-key": "^2.0.0" } @@ -12902,12 +12582,14 @@ "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true }, "number-to-bn": { "version": "1.7.0", @@ -12983,7 +12665,8 @@ "object-is": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", - "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=" + "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=", + "dev": true }, "object-keys": { "version": "1.1.1", @@ -13072,11 +12755,6 @@ "http-https": "^1.0.0" } }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" - }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -13085,11 +12763,6 @@ "ee-first": "1.1.1" } }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -13116,14 +12789,6 @@ "is-wsl": "^1.1.0" } }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "requires": { - "is-wsl": "^1.1.0" - } - }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -13166,6 +12831,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, "requires": { "url-parse": "^1.4.3" } @@ -13214,7 +12880,8 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true }, "p-each-series": { "version": "1.0.0", @@ -13233,7 +12900,8 @@ "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true }, "p-limit": { "version": "2.2.1", @@ -13254,7 +12922,8 @@ "p-map": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true }, "p-reduce": { "version": "1.0.0", @@ -13262,14 +12931,6 @@ "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, - "p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", - "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", - "requires": { - "retry": "^0.12.0" - } - }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", @@ -13353,6 +13014,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", + "dev": true, "requires": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -13429,12 +13091,14 @@ "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true }, "path-parse": { "version": "1.0.6", @@ -13624,26 +13288,6 @@ "integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==", "dev": true }, - "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.1" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -13653,6 +13297,7 @@ "version": "7.0.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", + "dev": true, "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -13662,12 +13307,14 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -13683,30 +13330,6 @@ "postcss": "^7.0.0" } }, - "postcss-html": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", - "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", - "requires": { - "htmlparser2": "^3.10.0" - } - }, - "postcss-jsx": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.3.tgz", - "integrity": "sha512-yV8Ndo6KzU8eho5mCn7LoLUGPkXrRXRjhMpX4AaYJ9wLJPv099xbtpbRQ8FrPnzVxb/cuMebbPR7LweSt+hTfA==", - "requires": { - "@babel/core": ">=7.2.2" - } - }, - "postcss-less": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", - "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", - "requires": { - "postcss": "^7.0.14" - } - }, "postcss-load-config": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz", @@ -13729,20 +13352,6 @@ "schema-utils": "^1.0.0" } }, - "postcss-markdown": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz", - "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==", - "requires": { - "remark": "^10.0.1", - "unist-util-find-all-after": "^1.0.2" - } - }, - "postcss-media-query-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", - "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=" - }, "postcss-modules-extract-imports": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", @@ -13784,47 +13393,6 @@ "postcss": "^7.0.6" } }, - "postcss-reporter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz", - "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==", - "requires": { - "chalk": "^2.4.1", - "lodash": "^4.17.11", - "log-symbols": "^2.2.0", - "postcss": "^7.0.7" - } - }, - "postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=" - }, - "postcss-safe-parser": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.1.tgz", - "integrity": "sha512-xZsFA3uX8MO3yAda03QrG3/Eg1LN3EPfjjf07vke/46HERLZyHrTsQ9E1r1w1W//fWEhtYNndo2hQplN2cVpCQ==", - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-sass": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz", - "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==", - "requires": { - "gonzales-pe": "^4.2.3", - "postcss": "^7.0.1" - } - }, - "postcss-scss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", - "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", - "requires": { - "postcss": "^7.0.0" - } - }, "postcss-selector-parser": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", @@ -13836,24 +13404,11 @@ "uniq": "^1.0.1" } }, - "postcss-sorting": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-4.1.0.tgz", - "integrity": "sha512-r4T2oQd1giURJdHQ/RMb72dKZCuLOdWx2B/XhXN1Y1ZdnwXsKH896Qz6vD4tFy9xSjpKNYhlZoJmWyhH/7JUQw==", - "requires": { - "lodash": "^4.17.4", - "postcss": "^7.0.0" - } - }, - "postcss-syntax": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", - "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==" - }, "postcss-value-parser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==" + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "dev": true }, "prelude-ls": { "version": "1.1.2", @@ -14013,6 +13568,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true, "optional": true }, "proxy-addr": { @@ -14296,12 +13852,8 @@ "querystringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" + "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "dev": true }, "raf": { "version": "3.4.1", @@ -14397,9 +13949,9 @@ } }, "react": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/react/-/react-16.10.2.tgz", - "integrity": "sha512-MFVIq0DpIhrHFyqLU0S3+4dIcBhhOvBE8bJ/5kHPVOVaGdo0KuiQzpcjCPsf585WvhypqtrMILyoE2th6dT+Lw==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.11.0.tgz", + "integrity": "sha512-M5Y8yITaLmU0ynd0r1Yvfq98Rmll6q8AxaEe88c8e7LxO8fZ2cNgmFt0aGAS9wzf1Ao32NKXtCl+/tVVtkxq6g==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -14621,16 +14173,27 @@ } }, "react-dom": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.10.2.tgz", - "integrity": "sha512-kWGDcH3ItJK4+6Pl9DZB16BXYAZyrYQItU4OMy0jAkv5aNqc+mAKb4TpFtAteI6TJZu+9ZlNhaeNQSVQDHJzkw==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.11.0.tgz", + "integrity": "sha512-nrRyIUE1e7j8PaXSPtyRKtz+2y9ubW/ghNgqKFHHAHaeP0fpF5uXR+sq8IMRHC+ZUxw7W9NyCDTBtwWxvkb0iA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.16.2" - } - }, + "scheduler": "^0.17.0" + }, + "dependencies": { + "scheduler": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", + "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + } + } + }, "react-draggable": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.0.3.tgz", @@ -15021,6 +14584,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "dev": true, "requires": { "define-properties": "^1.1.2" } @@ -15093,59 +14657,6 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, - "remark": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz", - "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==", - "requires": { - "remark-parse": "^6.0.0", - "remark-stringify": "^6.0.0", - "unified": "^7.0.0" - } - }, - "remark-parse": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz", - "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==", - "requires": { - "collapse-white-space": "^1.0.2", - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "is-word-character": "^1.0.0", - "markdown-escapes": "^1.0.0", - "parse-entities": "^1.1.0", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "trim": "0.0.1", - "trim-trailing-lines": "^1.0.0", - "unherit": "^1.0.4", - "unist-util-remove-position": "^1.0.0", - "vfile-location": "^2.0.0", - "xtend": "^4.0.1" - } - }, - "remark-stringify": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz", - "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==", - "requires": { - "ccount": "^1.0.0", - "is-alphanumeric": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "longest-streak": "^2.0.1", - "markdown-escapes": "^1.0.0", - "markdown-table": "^1.1.0", - "mdast-util-compact": "^1.0.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "stringify-entities": "^1.0.1", - "unherit": "^1.0.4", - "xtend": "^4.0.1" - } - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -15183,11 +14694,6 @@ "is-finite": "^1.0.0" } }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" - }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -15238,17 +14744,20 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true }, "requizzle": { "version": "0.2.3", @@ -15277,6 +14786,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, "requires": { "resolve-from": "^3.0.0" }, @@ -15284,7 +14794,8 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true } } }, @@ -15314,7 +14825,8 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true }, "resolve-pathname": { "version": "3.0.0", @@ -15349,11 +14861,6 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" - }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -15389,12 +14896,13 @@ } }, "roarr": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.14.2.tgz", - "integrity": "sha512-ibqv70DCUhGVMfPe0JSUHBZ9PKLhxdk8VJ/Y2M7vVr+L4VakW1CdVTU9cJQBbM2STQa84CgBAzd7hJGcnALGeg==", + "version": "2.14.4", + "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.14.4.tgz", + "integrity": "sha512-QMzRAQGZFPgnx4nNWp4Q+WHfiZh2HTSEjNaxFLrEIj3PmcQ1GHL5OjaaIyF9ybUDD2aZ9t3Awc/obrRPils9ng==", + "dev": true, "optional": true, "requires": { - "boolean": "^2.0.2", + "boolean": "^2.0.3", "detect-node": "^2.0.4", "globalthis": "^1.0.0", "json-stringify-safe": "^5.0.1", @@ -15406,6 +14914,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true, "optional": true } } @@ -15497,6 +15006,7 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", + "dev": true, "requires": { "truncate-utf8-bytes": "^1.0.0" } @@ -15554,6 +15064,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg==", + "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -15591,6 +15102,11 @@ "semver": "^6.3.0" }, "dependencies": { + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -15605,22 +15121,15 @@ "requires": { "scrypt": "^6.0.2", "scryptsy": "^1.2.1" - }, - "dependencies": { - "scryptsy": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", - "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", - "requires": { - "pbkdf2": "^3.0.3" - } - } } }, "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "requires": { + "pbkdf2": "^3.0.3" + } }, "scss-tokenizer": { "version": "0.2.3", @@ -15683,19 +15192,6 @@ "dev": true, "optional": true }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" - }, - "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", - "requires": { - "node-forge": "0.9.0" - } - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -15705,6 +15201,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true, "optional": true }, "semver-diff": { @@ -15762,6 +15259,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-5.0.0.tgz", "integrity": "sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==", + "dev": true, "optional": true, "requires": { "type-fest": "^0.8.0" @@ -15771,6 +15269,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, "optional": true } } @@ -15807,56 +15306,6 @@ } } }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - } - } - }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -15883,7 +15332,8 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "set-value": { "version": "2.0.1", @@ -15965,6 +15415,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -15972,7 +15423,8 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true }, "shell-quote": { "version": "1.7.2", @@ -16000,7 +15452,8 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true }, "simple-concat": { "version": "1.0.0", @@ -16057,6 +15510,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", @@ -16173,19 +15627,11 @@ } } }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, "sockjs-client": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "dev": true, "requires": { "debug": "^3.2.5", "eventsource": "^1.0.7", @@ -16199,6 +15645,7 @@ "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -16207,6 +15654,7 @@ "version": "0.11.3", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "dev": true, "requires": { "websocket-driver": ">=0.5.1" } @@ -16281,6 +15729,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -16289,12 +15738,14 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -16303,49 +15754,8 @@ "spdx-license-ids": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" - }, - "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "specificity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", - "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==" + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true }, "split-string": { "version": "3.1.0", @@ -16358,7 +15768,8 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "sshpk": { "version": "1.16.1", @@ -16402,11 +15813,6 @@ "integrity": "sha512-QjMLR0A3WwFY2aZdV0okfFEJB5TRjkggXZjxP3A1RsWsNHNu3YPv8btmtc6iCFZ0Rul3FE93OYogvhOUClU+ng==", "dev": true }, - "state-toggle": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz", - "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==" - }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -16517,6 +15923,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -16526,6 +15933,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -16603,17 +16011,6 @@ "safe-buffer": "~5.1.0" } }, - "stringify-entities": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz", - "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==", - "requires": { - "character-entities-html4": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-hexadecimal": "^1.0.0" - } - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -16651,433 +16048,59 @@ "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "style-loader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", - "integrity": "sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.0.1" - }, - "dependencies": { - "schema-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", - "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - } - } - }, - "style-search": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", - "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" - }, - "stylelint": { - "version": "9.10.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz", - "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==", - "requires": { - "autoprefixer": "^9.0.0", - "balanced-match": "^1.0.0", - "chalk": "^2.4.1", - "cosmiconfig": "^5.0.0", - "debug": "^4.0.0", - "execall": "^1.0.0", - "file-entry-cache": "^4.0.0", - "get-stdin": "^6.0.0", - "global-modules": "^2.0.0", - "globby": "^9.0.0", - "globjoin": "^0.1.4", - "html-tags": "^2.0.0", - "ignore": "^5.0.4", - "import-lazy": "^3.1.0", - "imurmurhash": "^0.1.4", - "known-css-properties": "^0.11.0", - "leven": "^2.1.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "mathml-tag-names": "^2.0.1", - "meow": "^5.0.0", - "micromatch": "^3.1.10", - "normalize-selector": "^0.2.0", - "pify": "^4.0.0", - "postcss": "^7.0.13", - "postcss-html": "^0.36.0", - "postcss-jsx": "^0.36.0", - "postcss-less": "^3.1.0", - "postcss-markdown": "^0.36.0", - "postcss-media-query-parser": "^0.2.3", - "postcss-reporter": "^6.0.0", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^4.0.0", - "postcss-sass": "^0.3.5", - "postcss-scss": "^2.0.0", - "postcss-selector-parser": "^3.1.0", - "postcss-syntax": "^0.36.2", - "postcss-value-parser": "^3.3.0", - "resolve-from": "^4.0.0", - "signal-exit": "^3.0.2", - "slash": "^2.0.0", - "specificity": "^0.4.1", - "string-width": "^3.0.0", - "style-search": "^0.1.0", - "sugarss": "^2.0.0", - "svg-tags": "^1.0.0", - "table": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "file-entry-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", - "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", - "requires": { - "flat-cache": "^2.0.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - } - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" - }, - "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "stylelint-config-rational-order": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/stylelint-config-rational-order/-/stylelint-config-rational-order-0.1.2.tgz", - "integrity": "sha512-Qo7ZQaihCwTqijfZg4sbdQQHtugOX/B1/fYh018EiDZHW+lkqH9uHOnsDwDPGZrYJuB6CoyI7MZh2ecw2dOkew==", - "requires": { - "stylelint": "^9.10.1", - "stylelint-order": "^2.2.1" - } - }, - "stylelint-config-recommended": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", - "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==" - }, - "stylelint-config-standard": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-19.0.0.tgz", - "integrity": "sha512-VvcODsL1PryzpYteWZo2YaA5vU/pWfjqBpOvmeA8iB2MteZ/ZhI1O4hnrWMidsS4vmEJpKtjdhLdfGJmmZm6Cg==", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", "requires": { - "stylelint-config-recommended": "^3.0.0" + "is-hex-prefixed": "1.0.0" } }, - "stylelint-order": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-2.2.1.tgz", - "integrity": "sha512-019KBV9j8qp1MfBjJuotse6MgaZqGVtXMc91GU9MsS9Feb+jYUvUU3Z8XiClqPdqJZQ0ryXQJGg3U3PcEjXwfg==", + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, "requires": { - "lodash": "^4.17.10", - "postcss": "^7.0.2", - "postcss-sorting": "^4.1.0" + "get-stdin": "^4.0.1" } }, - "sugarss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", - "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "style-loader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", + "integrity": "sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==", + "dev": true, "requires": { - "postcss": "^7.0.2" + "loader-utils": "^1.2.3", + "schema-utils": "^2.0.1" + }, + "dependencies": { + "schema-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", + "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" + } + } } }, "sumchecker": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz", "integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==", + "dev": true, "requires": { "debug": "^4.1.0" } @@ -17096,11 +16119,6 @@ "integrity": "sha512-1gtApepKFweigFZj3sGO8KT8LvVZK8io146EzXrpVuWCDAbISz/yMucco3hWTkpZNoPabM+dnMOpy6Swue68Zg==", "dev": true }, - "svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" - }, "svgo": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", @@ -17174,16 +16192,6 @@ "ieee754": "^1.1.4" } }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -17269,6 +16277,7 @@ "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, "requires": { "ajv": "^6.10.2", "lodash": "^4.17.14", @@ -17279,12 +16288,14 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -17295,6 +16306,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -17592,11 +16604,6 @@ "xtend": "~4.0.1" } }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" - }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -17748,27 +16755,12 @@ "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", "dev": true }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" - }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, - "trim-trailing-lines": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz", - "integrity": "sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q==" - }, - "trough": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.4.tgz", - "integrity": "sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q==" - }, "true-case-path": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", @@ -17782,6 +16774,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", + "dev": true, "requires": { "utf8-byte-length": "^1.0.1" } @@ -17812,6 +16805,7 @@ "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true, "optional": true }, "tunnel-agent": { @@ -17954,15 +16948,6 @@ "integrity": "sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==", "dev": true }, - "unherit": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.2.tgz", - "integrity": "sha512-W3tMnpaMG7ZY6xe/moK04U9fBhi6wEiCYHUW5Mop/wQHf12+79EQGwxYejNdhEz2mkqkBlGwm7pxmgBKMVUj0w==", - "requires": { - "inherits": "^2.0.1", - "xtend": "^4.0.1" - } - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -17991,21 +16976,6 @@ "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", "dev": true }, - "unified": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", - "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==", - "requires": { - "@types/unist": "^2.0.0", - "@types/vfile": "^3.0.0", - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-plain-obj": "^1.1.0", - "trough": "^1.0.0", - "vfile": "^3.0.0", - "x-is-string": "^0.1.0" - } - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -18020,7 +16990,8 @@ "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true }, "unique-filename": { "version": "1.1.1", @@ -18047,48 +17018,6 @@ "crypto-random-string": "^1.0.0" } }, - "unist-util-find-all-after": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.4.tgz", - "integrity": "sha512-CaxvMjTd+yF93BKLJvZnEfqdM7fgEACsIpQqz8vIj9CJnUb9VpyymFS3tg6TCtgrF7vfCJBF5jbT2Ox9CBRYRQ==", - "requires": { - "unist-util-is": "^3.0.0" - } - }, - "unist-util-is": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", - "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" - }, - "unist-util-remove-position": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", - "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", - "requires": { - "unist-util-visit": "^1.1.0" - } - }, - "unist-util-stringify-position": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", - "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==" - }, - "unist-util-visit": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", - "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", - "requires": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "unist-util-visit-parents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", - "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", - "requires": { - "unist-util-is": "^3.0.0" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -18234,6 +17163,7 @@ "version": "1.4.7", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "dev": true, "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -18270,7 +17200,8 @@ "utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", - "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=" + "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=", + "dev": true }, "util": { "version": "0.11.1", @@ -18328,6 +17259,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -18368,37 +17300,6 @@ "extsprintf": "^1.2.0" } }, - "vfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz", - "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==", - "requires": { - "is-buffer": "^2.0.0", - "replace-ext": "1.0.0", - "unist-util-stringify-position": "^1.0.0", - "vfile-message": "^1.0.0" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" - } - } - }, - "vfile-location": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", - "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==" - }, - "vfile-message": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", - "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", - "requires": { - "unist-util-stringify-position": "^1.1.1" - } - }, "vm-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", @@ -18525,14 +17426,6 @@ "neo-async": "^2.5.0" } }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, "web3": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", @@ -18560,9 +17453,9 @@ }, "dependencies": { "@types/node": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.0.tgz", - "integrity": "sha512-wuJwN2KV4tIRz1bu9vq5kSPasJ8IsEjZaP1ZR7KlmdUZvGF/rXy8DmXOVwUD0kAtvtJ7aqMKPqUXC0NUTDbrDg==" + "version": "10.17.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.4.tgz", + "integrity": "sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ==" } } }, @@ -19087,6 +17980,7 @@ "version": "3.7.2", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", + "dev": true, "requires": { "memory-fs": "^0.4.1", "mime": "^2.4.4", @@ -19098,169 +17992,8 @@ "mime": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" - } - } - }, - "webpack-dev-server": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz", - "integrity": "sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ==", - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.2.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.4", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.24", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.4.0", - "spdy": "^4.0.1", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "12.0.5" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "dev": true } } }, @@ -19280,6 +18013,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, "requires": { "ansi-colors": "^3.0.0", "uuid": "^3.3.2" @@ -19331,6 +18065,7 @@ "version": "0.7.3", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "dev": true, "requires": { "http-parser-js": ">=0.4.0 <0.4.11", "safe-buffer": ">=5.1.0", @@ -19340,7 +18075,8 @@ "websocket-extensions": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true }, "whatwg-encoding": { "version": "1.0.5", @@ -19378,6 +18114,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -19496,6 +18233,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" @@ -19504,12 +18242,14 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -19518,6 +18258,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -19528,6 +18269,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -19543,6 +18285,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, "requires": { "mkdirp": "^0.5.1" } @@ -19559,18 +18302,15 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "requires": { - "async-limiter": "~1.0.0" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } }, - "x-is-string": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", - "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" - }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", @@ -19671,7 +18411,8 @@ "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true }, "yaeti": { "version": "0.0.6", @@ -19751,11 +18492,12 @@ } }, "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "requires": { - "fd-slicer": "~1.0.1" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } } } diff --git a/package.json b/package.json index fed82301..e816b1f4 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,10 @@ "scripts": { "render-test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", - "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", + "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && NODE_ENV=development electron ./src/electron.js\"", "storybook": "start-storybook", - "docs": "jsdoc -c ./jsdoc.json" + "docs": "jsdoc -c ./jsdoc.json", + "build": "webpack --config webpack.dev.js && electron-builder" }, "author": "neos1.com", "license": "ISC", @@ -19,13 +20,12 @@ "@namics/stylelint-bem": "^6.1.0", "bip39": "^3.0.2", "browser-solc": "^1.0.0", - "electron": "^7.0.0", "electron-is-dev": "^1.1.0", "electron-localshortcut": "^3.1.0", "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^6.1.0", + "ethereumjs-util": "^6.2.0", "ethereumjs-wallet": "^0.6.3", - "mobx": "^5.14.2", + "mobx": "^5.15.0", "mobx-react": "^6.1.4", "mobx-react-form": "^2.0.8", "mobx-utils": "^5.5.1", @@ -53,6 +53,7 @@ "concurrently": "^5.0.0", "copy-webpack-plugin": "^5.0.4", "css-loader": "^3.2.0", + "electron": "^7.1.1", "electron-builder": "^21.2.0", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", @@ -92,5 +93,33 @@ } ] ] + }, + "build": { + "files": [ + "build/**/*", + "src/wallets/**/*", + "src/contracts/**/*", + "src/config.json", + "src/electron.js" + ], + "win": { + "target": [ + "portable" + ] + }, + "linux": { + "target": "deb" + }, + "mac": { + "target": "dmg" + }, + "nsis": { + "warningsAsErrors": false + }, + "portable": { + "artifactName": "voter_portable--win.exe" + }, + "compression": "store", + "asar": false } } diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index d2b1575f..49757e3f 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -56,6 +56,7 @@ svg { width: 42px; height: 42px; path { + transition: .2s; fill: rgba($color: $primary, $alpha: .5); } } @@ -71,6 +72,7 @@ svg { .stroke-still { stroke-dasharray: 2; stroke-width: 4; + transition: .2s; stroke: rgba($color: $primary, $alpha: .5); } @@ -94,7 +96,15 @@ svg { } } &.success{ + .progress-block__icon { + &>svg { + path { + fill: rgba($color: $primary, $alpha: 1); + } + } + } .stroke-still { + stroke-dasharray: 0; stroke: rgba($color: $primary, $alpha: 1); } & > img { @@ -102,7 +112,7 @@ svg { } .progress-line{ width: 96px; - border-top: 2px solid rgba($color: $primary, $alpha: .5); + border-top: 2px solid rgba($color: $primary, $alpha: 1); opacity: 1; } diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index d8becb96..08ca2430 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import { inject, observer } from 'mobx-react'; import { Button } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -14,8 +15,10 @@ import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; import styles from '../Login/Login.scss'; import Input from '../Input'; -import { Address } from '../Icons'; +import { Address, TokenName } from '../Icons'; +@inject('appStore') +@observer class AddExistingProject extends Component { constructor(props) { super(props); @@ -24,25 +27,30 @@ class AddExistingProject extends Component { }; } - connectProject = () => { + connectProject = (form) => { + const { appStore } = this.props; + const { name, address } = form.values(); this.setState({ step: 'loading', }); + appStore.checkProject(address) + .then(() => { + this.setState({ step: 'success' }); + appStore.addProjectToList({ name, address }); + }) + .catch(() => { - setTimeout(() => { - this.setState({ - step: 'success', }); - }, 5000); } render() { const { step } = this.state; + const { connectProject } = this; const connectForm = new ConnectProjectForm({ hooks: { onSuccess(form) { - console.log(form.values()); + connectProject(form); }, onError(form) { console.log(`ALARM ${form}`); @@ -69,6 +77,9 @@ const InputBlock = ({ form }) => ( {'Cоздайте новый или подключите уже существующий'}
+ + +
@@ -113,7 +124,9 @@ const MessageBlock = () => ( ); - +AddExistingProject.propTypes = { + appStore: propTypes.object.isRequired, +}; InputBlock.propTypes = { form: propTypes.object.isRequired, }; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 8322850e..863148bc 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -51,6 +51,7 @@ class CreateNewProjectWithTokens extends Component { position: 'tokenChecked', step: 2, }); + appStore.deployArgs = [address]; }); } @@ -61,7 +62,11 @@ class CreateNewProjectWithTokens extends Component { }); } - gotoUploading = () => { + gotoUploading = (form) => { + const { appStore } = this.props; + const { name, password } = form.values(); + appStore.name = name; + appStore.password = password; this.setState({ position: 'uploading', }); @@ -85,8 +90,7 @@ class CreateNewProjectWithTokens extends Component { const createProject = new CreateProjectForm({ hooks: { onSuccess(form) { - gotoUploading(); - console.log(form.values()); + gotoUploading(form); }, onError(form) { console.log(form); diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 27d726c1..076271c8 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -41,29 +41,47 @@ class CreateNewProjectWithoutTokens extends Component { } createToken = (form) => { - const { appStore } = this.props; + const { appStore, userStore } = this.props; this.setState({ position: 'creation', }); - const { name, symbol, count } = form.values(); + const { + name, symbol, count, password, + } = form.values(); + + console.log(form.values()); + const deployArgs = [name, symbol, count]; - appStore.deployContract('ERC20', deployArgs).then((hash) => { - // eslint-disable-next-line no-unused-vars - const interval = setInterval(() => { - // eslint-disable-next-line consistent-return - appStore.checkReceipt(hash).then((receipt) => { - if (typeof receipt === 'object') { - this.setState({ - tokenAddr: receipt.contractAddress, - position: 'tokenCreated', - }); - console.log(receipt.contractAddress); - clearInterval(interval); - } - }); - }, 5000); - }); + + userStore.readWallet(password) + .then((buffer) => { + console.log(buffer); + if (!(buffer instanceof Error)) { + console.log('Погнали деплоить'); + appStore.deployContract('ERC20', deployArgs, password).then((hash) => { + // eslint-disable-next-line no-unused-vars + const interval = setInterval(() => { + // eslint-disable-next-line consistent-return + appStore.checkReceipt(hash).then((receipt) => { + if (typeof receipt === 'object') { + this.setState({ + tokenAddr: receipt.contractAddress, + position: 'tokenCreated', + }); + appStore.deployArgs = [receipt.contractAddress]; + clearInterval(interval); + } + }); + }, 5000); + }); + } else { + this.setState({ + position: 'token', + step: 1, + }); + } + }); } gotoProjectInfo = () => { @@ -74,10 +92,24 @@ class CreateNewProjectWithoutTokens extends Component { } - gotoUploading = () => { - this.setState({ - position: 'uploading', - }); + gotoUploading = (form) => { + const { userStore, appStore } = this.props; + const { name, password } = form.values(); + appStore.name = name; + appStore.password = password; + + userStore.readWallet(password) + .then(() => { + this.setState({ + position: 'uploading', + }); + }) + .catch(() => { + this.setState({ + position: 'projectInfo', + step: 2, + }); + }); } render() { @@ -97,8 +129,7 @@ class CreateNewProjectWithoutTokens extends Component { const CreateProject = new CreateProjectForm({ hooks: { onSuccess(form) { - gotoUploading(); - console.log(form.values()); + gotoUploading(form); }, onError(form) { console.log(form); @@ -256,6 +287,7 @@ const StepIndicator = ({ step, count }) => ( CreateNewProjectWithoutTokens.propTypes = { appStore: propTypes.object.isRequired, + userStore: propTypes.object.isRequired, }; CreateTokenData.propTypes = { form: propTypes.object.isRequired, diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index a2011df0..e874e651 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -95,7 +95,6 @@ class InputSeed extends Component { } const InputBlock = ({ form, seed }) => ( -
{seed.map((word, index) => ( @@ -108,7 +107,6 @@ const InputBlock = ({ form, seed }) => (
- ); InputSeed.propTypes = { diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 723c72b9..6de439ca 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -12,7 +12,7 @@ .form__block { padding: 60px 50px; .btn { - margin: 0; + margin: 0 0 10px; } } } diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 3d4f49fe..ccfe65c0 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -27,12 +27,8 @@ class ProjectList extends Component { render() { const { appStore: { projectList } } = this.props; - const projects = projectList.map((project) => ( - + const projects = projectList.map((project, index) => ( + )); return ( diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index b5a111f6..833cf4cd 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -6,8 +6,8 @@ const ProgressBlock = ({ }) => (
index ? 'success' : ''}`}> - - + + diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 3e9c24d5..6da0cc67 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -1,3 +1,6 @@ +/* eslint-disable class-methods-use-this */ +/* eslint-disable no-console */ +/* eslint-disable react/no-unused-state */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; @@ -20,13 +23,42 @@ class ProjectUploading extends Component { super(props); this.state = { step: 0, + address: '', }; } componentDidMount() { - const { newTokens } = this.props; - // eslint-disable-next-line no-console - console.log(`newTokens = ${newTokens}`); + const { appStore, appStore: { deployArgs, name, password } } = this.props; + this.setState({ + step: 1, + }); + appStore.deployContract('project', deployArgs, password) + .then((txHash) => { + this.setState({ + step: 3, + }); + console.log(txHash); + const interval = setInterval(() => { + appStore.checkReceipt(txHash).then((receipt) => { + if (typeof receipt === 'object') { + this.setState({ + step: 4, + address: receipt.contractAddress, + }); + appStore.addProjectToList({ name, address: receipt.contractAddress }); + clearInterval(interval); + appStore.deployQuestions().then(() => { + // eslint-disable-next-line no-alert + alert('success'); + }); + } + }); + }, 2000); + }); + } + + deployQuestions() { + } render() { @@ -94,7 +126,7 @@ class ProjectUploading extends Component { // //ProjectUploading.propTypes = {}; ProjectUploading.propTypes = { - newTokens: propTypes.bool.isRequired, + appStore: propTypes.object.isRequired, }; export default ProjectUploading; diff --git a/src/config.json b/src/config.json index 24065de2..4f9c0e06 100644 --- a/src/config.json +++ b/src/config.json @@ -9,6 +9,26 @@ { "name": "test", "address": "0x1Cd9D97EC3f3283cD564bB82f7d0Ee2737D6F352" + }, + { + "name": "name", + "address": "0xe81a86b750ab19a836ce51000e48d1677c03edd4" + }, + { + "name": "TETETTWSSSAT", + "address": "0xe81a86b750ab19a836ce51000e48d1677c03edd4" + }, + { + "name": "Name", + "address": "0xAFd2B678D5Fd2d8524F5bFBa04B38abbDCba1Fc9" + }, + { + "name": "name1321312", + "address": "0x5e0f11bf7c8DDadc7ED660051EF3f15766dDB207" + }, + { + "name": "name3412321", + "address": "0xD733A708975732844f3acF28C007fB1933233968" } ] } \ No newline at end of file diff --git a/src/models/FormModel/index.js b/src/models/FormModel/index.js index 6583daa5..72a8e6dc 100644 --- a/src/models/FormModel/index.js +++ b/src/models/FormModel/index.js @@ -7,7 +7,6 @@ import validatorjs from 'validatorjs'; class ExtendedForm extends Form { constructor(data) { const { hooks } = data || {}; - console.log({ hooks }); super(); extendObservable(this, { loading: false }); Object.keys(hooks).forEach((hook) => { diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index a7c0df41..6b648b7a 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -1,3 +1,5 @@ +/* eslint-disable no-unused-expressions */ +/* eslint-disable class-methods-use-this */ /* eslint-disable no-loop-func */ /* eslint-disable no-useless-escape */ /* eslint-disable no-unused-vars */ @@ -5,7 +7,7 @@ import browserSolc from 'browser-solc'; import { BN } from 'ethereumjs-util'; import { - fs, PATH_TO_CONTRACTS, path, SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP, + fs, PATH_TO_CONTRACTS, path, SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP, ROOT_DIR, } from '../../constants'; /** @@ -17,7 +19,7 @@ class ContractService { this.rootStore = rootStore; } - set contract(instance) { + setContract(instance) { this._contract = instance; } @@ -99,7 +101,7 @@ class ContractService { * @returns {Promise} Promise of web3.sendSignedTransaction which resolves on txHash */ deployContract({ - type, deployArgs, bytecode, abi, + type, deployArgs, bytecode, abi, password, }) { const { rootStore: { Web3Service, userStore } } = this; const { address } = userStore; @@ -118,7 +120,7 @@ class ContractService { return new Promise((resolve, reject) => { Web3Service.formTxData(address, tx, maxGasPrice).then((formedTx) => { - userStore.singTransaction(formedTx, 'T3sting!').then((signedTx) => { + userStore.singTransaction(formedTx, password).then((signedTx) => { Web3Service.sendSignedTransaction(`0x${signedTx}`).then((txHash) => { resolve(txHash); }); @@ -143,10 +145,20 @@ class ContractService { contract.options.address = address; const totalSupply = await contract.methods.totalSupply().call(); const symbol = await contract.methods.symbol().call(); - return { totalSupply, symbol }; } + // eslint-disable-next-line class-methods-use-this + checkProject(address) { + const { rootStore: { Web3Service, userStore } } = this; + return new Promise((resolve, reject) => { + Web3Service.web3.eth.getCode(address).then((bytecode) => { + if (bytecode === '0x') reject(); + resolve(bytecode); + }); + }); + } + /** * calling contract method * @param {string} method method, which will be called @@ -168,6 +180,90 @@ class ContractService { return data; } + getSystemQuestions() { + this.sysQuestions = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8')); + } + + async checkQuestions() { + this.getSystemQuestions(); + const countOfUploaded = await this.contract.getCount().call(); + const totalCount = Object.keys(this.sysQuestions).length; + return ({ countOfUploaded, totalCount }); + } + + sendQuestion(idx) { + const { + Web3Service, Web3Service: { web3 }, userStore, appStore: { password }, + } = this.rootStore; + const sysQuestion = this.sysQuestions[idx]; + + // eslint-disable-next-line consistent-return + this.getQuestion(idx).then((result) => { + if (result.caption === '') { + const { address } = userStore; + const { + id, group, name, caption, time, method, formula, parameters, + } = sysQuestion; + + const preparedFormula = this.convertFormula(formula); + const params = parameters.map((param) => web3.utils.utf8ToHex(param)); + const contractAddr = this._contract.options.address; + + // eslint-disable-next-line max-len + const dataTx = this.contract.methods.saveNewQuestion([id, group, time], 0, name, caption, contractAddr, method, preparedFormula, params).encodeABI(); + const maxGasPrice = 10000000000; + const rawTx = { + to: contractAddr, + data: dataTx, + gasLimit: 8000000, + value: '0x0', + }; + + return new Promise((resolve, reject) => { + Web3Service.formTxData(address, rawTx, maxGasPrice) + .then((formedTx) => { + userStore.singTransaction(formedTx, password) + .then((signedTx) => { + Web3Service.sendSignedTransaction(signedTx) + .then((txHash) => { + const interval = setInterval(() => { + web3.eth.getTransactionReciept(txHash).then((receipt) => { + if (typeof receipt === 'object') { + clearInterval(interval); + resolve(); + } + }); + }, 5000); + }); + }); + }); + }); + } + }); + } + + convertFormula(formula) { + const FORMULA_REGEXP = new RegExp(/(group)|((?:[a-zA-Z0-9]{1,}))|((quorum|positive))|(>=|<=)|([0-9%]{1,})|(quorum|all)/g); + const matched = formula.match(FORMULA_REGEXP); + + const convertedFormula = []; + + matched[0] === 'group' ? convertedFormula.push(0) : convertedFormula.push(1); + matched[1] === 'Owners' ? convertedFormula.push(1) : convertedFormula.push(2); + matched[3] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); + matched[4] === '<=' ? convertedFormula.push(0) : convertedFormula.push(1); + convertedFormula.push(Number(matched[5])); + + if (matched.length === 9) { + matched[8] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); + } + return convertedFormula; + } + + getQuestion(id) { + return this._contract.methods.question(id).call(); + } + /** * getting one voting * @param {number} id id of voting diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 9b487ce5..b50641bc 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,6 +1,6 @@ import { observable, action, computed } from 'mobx'; import { - fs, path, PATH_TO_WALLETS, ROOT_DIR, + fs, path, PATH_TO_WALLETS, ROOT_DIR, PATH_TO_CONTRACTS, } from '../../constants'; @@ -13,6 +13,12 @@ class AppStore { } + @observable deployArgs = []; + + @observable name = '' + + @observable password='' + constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -60,12 +66,12 @@ class AppStore { this.userStore.setEncryptedWallet(encryptedWallet); } - @action deployContract(type, deployArgs) { + @action deployContract(type, deployArgs, password) { const { contractService } = this.rootStore; return new Promise((resolve) => { contractService.compileContract(type).then(({ bytecode, abi }) => { resolve(contractService.deployContract({ - type, deployArgs, bytecode, abi, + type, deployArgs, bytecode, abi, password, })); }); }); @@ -85,6 +91,45 @@ class AppStore { }); } + @action checkProject(address) { + const { contractService } = this.rootStore; + return new Promise((resolve, reject) => { + contractService.checkProject(address) + .then((data) => { + resolve(data); + }) + .catch(() => { reject(); }); + }); + } + + @action async deployQuestions(address) { + const { Web3Service, contractService } = this.rootStore; + const abi = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter.abi'), 'utf8')); + const contract = Web3Service.createContractInstance(abi); + contract.options.address = address; + contractService.setContract(contract); + const { countOfUploaded, totalCount } = contractService.checkQuestions(); + let idx = countOfUploaded === 0 ? 1 : countOfUploaded; + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve) => { + while (idx <= totalCount) { + // eslint-disable-next-line no-await-in-loop + await contractService.sendQuestion(countOfUploaded); + idx += 1; + // eslint-disable-next-line no-console + console.log(`uploaded ${idx}`); + } + resolve(); + }); + } + + // eslint-disable-next-line class-methods-use-this + @action addProjectToList(data) { + const config = JSON.parse(fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8')); + config.projects.push(data); + fs.writeFileSync(path.join(ROOT_DIR, './config.json'), JSON.stringify(config, null, '\t')); + } + @action checkReceipt(hash) { const { Web3Service: { web3 } } = this.rootStore; return web3.eth.getTransactionReceipt(hash); diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js index 3310cc24..299d4598 100644 --- a/src/stores/FormsStore/ConnectProject.js +++ b/src/stores/FormsStore/ConnectProject.js @@ -8,6 +8,12 @@ class ConnectProjectForm extends ExtendedForm { setup() { return { fields: [{ + name: 'name', + type: 'text', + label: 'Project Name', + placeholder: 'Придумайте название проекта', + rules: 'required|string', + }, { name: 'address', type: 'text', label: 'Token Address', diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index e1582f1d..7e935187 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -60,7 +60,6 @@ onmessage = (e) => { break; } - // console.log(response); if (response instanceof Error) { response = null; From a398cfddf0826d5b756edbb8827be24b29f03241 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Sun, 10 Nov 2019 16:01:05 +0700 Subject: [PATCH 092/219] Questions uploading --- package-lock.json | 2884 ++++++++++++----- package.json | 5 +- .../CreateNewProjectWithTokens/index.js | 2 +- src/components/ProjectUploading/index.js | 4 +- src/config.json | 20 - .../ContractService/ContractService.js | 23 +- src/stores/AppStore/AppStore.js | 20 +- 7 files changed, 2120 insertions(+), 838 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23c32836..0501e561 100644 --- a/package-lock.json +++ b/package-lock.json @@ -934,6 +934,11 @@ "@babel/plugin-transform-react-jsx-source": "^7.0.0" } }, + "@babel/preset-stage-0": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/preset-stage-0/-/preset-stage-0-7.0.0.tgz", + "integrity": "sha512-FBMd0IiARPtH5aaOFUVki6evHiJQiY0pFy7fizyRF7dtwc+el3nwpzvhb9qBNzceG1OIJModG1xpE0DDFjPXwA==" + }, "@babel/preset-typescript": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz", @@ -1449,17 +1454,24 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, "requires": { "call-me-maybe": "^1.0.1", "glob-to-regexp": "^0.3.0" } }, + "@namics/stylelint-bem": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@namics/stylelint-bem/-/stylelint-bem-6.1.0.tgz", + "integrity": "sha512-YCgd+C+H20P3wjzgbFN4WLhvhUwCVs6gFl0SO9CrEAt+PsXPP0sADUkCh42zPMZjGjN8H3GQ4iq5YmFqO3sAsw==", + "requires": { + "css-selector-classes": "0.1.2", + "postcss-resolve-nested-selector": "0.1.1" + } + }, "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, "@reach/router": { "version": "1.2.1", @@ -1477,7 +1489,8 @@ "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true }, "@storybook/addons": { "version": "5.2.4", @@ -2143,6 +2156,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, "requires": { "defer-to-connect": "^1.0.1" } @@ -2226,14 +2240,12 @@ "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" }, "@types/glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "dev": true, "requires": { "@types/events": "*", "@types/minimatch": "*", @@ -2280,8 +2292,7 @@ "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { "version": "12.11.1", @@ -2364,6 +2375,29 @@ } } }, + "@types/unist": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", + "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==" + }, + "@types/vfile": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz", + "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==", + "requires": { + "@types/node": "*", + "@types/unist": "*", + "@types/vfile-message": "*" + } + }, + "@types/vfile-message": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz", + "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==", + "requires": { + "vfile-message": "*" + } + }, "@types/webpack": { "version": "4.39.4", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.4.tgz", @@ -2794,8 +2828,7 @@ "ansi-colors": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==" }, "ansi-escapes": { "version": "3.2.0", @@ -2806,14 +2839,12 @@ "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "ansi-styles": { "version": "3.2.1", @@ -2936,7 +2967,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -2981,8 +3011,12 @@ "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" }, "array-includes": { "version": "3.0.3", @@ -2998,7 +3032,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, "requires": { "array-uniq": "^1.0.1" } @@ -3006,8 +3039,7 @@ "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "array-unique": { "version": "0.3.2", @@ -3049,8 +3081,7 @@ "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, "asap": { "version": "2.0.6", @@ -3125,14 +3156,12 @@ "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, "requires": { "lodash": "^4.17.14" } @@ -3173,7 +3202,6 @@ "version": "9.6.5", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.5.tgz", "integrity": "sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g==", - "dev": true, "requires": { "browserslist": "^4.7.0", "caniuse-lite": "^1.0.30000999", @@ -3868,6 +3896,11 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, + "bail": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz", + "integrity": "sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -3936,6 +3969,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, "batch-processor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/batch-processor/-/batch-processor-1.0.0.tgz", @@ -4022,7 +4060,6 @@ "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, "requires": { "inherits": "~2.0.0" } @@ -4088,6 +4125,19 @@ } } }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -4304,7 +4354,6 @@ "version": "4.7.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.1.tgz", "integrity": "sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg==", - "dev": true, "requires": { "caniuse-lite": "^1.0.30000999", "electron-to-chromium": "^1.3.284", @@ -4377,6 +4426,11 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" + }, "buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", @@ -4436,6 +4490,11 @@ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, "cacache": { "version": "12.0.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", @@ -4498,6 +4557,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, "requires": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -4512,6 +4572,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, "requires": { "pump": "^3.0.0" } @@ -4519,21 +4580,20 @@ "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true } } }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, "requires": { "callsites": "^2.0.0" }, @@ -4541,8 +4601,7 @@ "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" } } }, @@ -4550,7 +4609,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, "requires": { "caller-callsite": "^2.0.0" } @@ -4596,8 +4654,7 @@ "caniuse-lite": { "version": "1.0.30001001", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001001.tgz", - "integrity": "sha512-MsWRX5x8GsZJcvIh1zkTERAcX9cRlT+If1f4xk3B5EAJftiwjab2oBKPbned9IuBiKae5u9PMp7T2xJBDo+9Sw==", - "dev": true + "integrity": "sha512-MsWRX5x8GsZJcvIh1zkTERAcX9cRlT+If1f4xk3B5EAJftiwjab2oBKPbned9IuBiKae5u9PMp7T2xJBDo+9Sw==" }, "capture-exit": { "version": "2.0.0", @@ -4628,6 +4685,11 @@ "lodash": "^4.17.14" } }, + "ccount": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.4.tgz", + "integrity": "sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==" + }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", @@ -4651,14 +4713,17 @@ "character-entities": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz", - "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==", - "dev": true + "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==" + }, + "character-entities-html4": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.3.tgz", + "integrity": "sha512-SwnyZ7jQBCRHELk9zf2CN5AnGEc2nA+uKMZLHvcqhpPprjkYhiLn0DywMHgN5ttFZuITMATbh68M6VIVKwJbcg==" }, "character-entities-legacy": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz", - "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==", - "dev": true + "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==" }, "character-parser": { "version": "2.2.0", @@ -4672,8 +4737,7 @@ "character-reference-invalid": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz", - "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==", - "dev": true + "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==" }, "chardet": { "version": "0.7.0", @@ -4932,10 +4996,20 @@ "shallow-clone": "^3.0.0" } }, + "clone-regexp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz", + "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", + "requires": { + "is-regexp": "^1.0.0", + "is-supported-regexp-flag": "^1.0.0" + } + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -4960,8 +5034,7 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "coinstring": { "version": "2.3.0", @@ -4979,6 +5052,11 @@ } } }, + "collapse-white-space": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz", + "integrity": "sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ==" + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5043,6 +5121,43 @@ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, + "compressible": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", + "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "requires": { + "mime-db": ">= 1.40.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -5265,6 +5380,11 @@ "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", "dev": true }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" + }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -5333,11 +5453,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" - }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -5516,7 +5631,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", @@ -5528,7 +5642,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, "requires": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" @@ -5538,7 +5651,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -5547,8 +5659,7 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" } } }, @@ -5596,11 +5707,62 @@ "gud": "^1.0.0" } }, + "cross-env": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", + "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz", + "integrity": "sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.1.tgz", + "integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -5689,6 +5851,20 @@ "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", "dev": true }, + "css-selector-classes": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/css-selector-classes/-/css-selector-classes-0.1.2.tgz", + "integrity": "sha1-JAPY5WAQHIKcXx35MIAyp6Qfw3Y=", + "requires": { + "array-uniq": "^1.0.2", + "css-selector-parser": "~1.0.3" + } + }, + "css-selector-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.0.4.tgz", + "integrity": "sha1-Zd/mFL1f0XW2Sgo/GTuHD8V5B3M=" + }, "css-tree": { "version": "1.0.0-alpha.33", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.33.tgz", @@ -5763,7 +5939,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, "requires": { "array-find-index": "^1.0.1" } @@ -5773,15 +5948,6 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "damerau-levenshtein": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", @@ -5848,8 +6014,16 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + } }, "decode-uri-component": { "version": "0.2.0", @@ -5962,6 +6136,19 @@ } } }, + "deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", + "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -5980,10 +6167,20 @@ "integrity": "sha512-b+QLs5vHgS+IoSNcUE4n9HP2NwcHj7aqnJWsjPtuG75Rh5TOaGt0OjAYInh77d5T16V5cRDC+Pw/6ZZZiETBGw==", "dev": true }, + "default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "requires": { + "execa": "^1.0.0", + "ip-regex": "^2.1.0" + } + }, "defer-to-connect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.0.2.tgz", - "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==" + "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==", + "dev": true }, "define-properties": { "version": "1.1.3", @@ -6034,7 +6231,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", - "dev": true, "requires": { "@types/glob": "^7.1.1", "globby": "^6.1.0", @@ -6048,8 +6244,7 @@ "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" } } }, @@ -6105,9 +6300,7 @@ "detect-node": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true, - "optional": true + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" }, "detect-port": { "version": "1.3.0", @@ -6162,7 +6355,6 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", - "dev": true, "requires": { "path-type": "^3.0.0" }, @@ -6171,7 +6363,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, "requires": { "pify": "^3.0.0" } @@ -6179,8 +6370,7 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" } } }, @@ -6227,6 +6417,28 @@ } } }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "requires": { + "buffer-indexof": "^1.0.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -6255,7 +6467,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", - "dev": true, "requires": { "domelementtype": "^2.0.1", "entities": "^2.0.0" @@ -6264,14 +6475,12 @@ "domelementtype": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", - "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", - "dev": true + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==" }, "entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", - "dev": true + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==" } } }, @@ -6288,8 +6497,7 @@ "domelementtype": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, "domexception": { "version": "1.0.1", @@ -6304,7 +6512,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, "requires": { "domelementtype": "1" } @@ -6313,7 +6520,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, "requires": { "dom-serializer": "0", "domelementtype": "1" @@ -6323,7 +6529,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, "requires": { "is-obj": "^1.0.0" } @@ -6583,6 +6788,11 @@ "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz", "integrity": "sha1-UJ5RDCala1Xhf4Y6SwThEYRqsns=" }, + "electron-is-dev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.1.0.tgz", + "integrity": "sha512-Z1qA/1oHNowGtSBIcWk0pcLEqYT/j+13xUw/MYOrBUOL4X7VN0i0KCTf5SqyvMPmW5pSPKbo28wkxMxzZ20YnQ==" + }, "electron-localshortcut": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-3.1.0.tgz", @@ -6646,8 +6856,7 @@ "electron-to-chromium": { "version": "1.3.289", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.289.tgz", - "integrity": "sha512-39GEOWgTxtMDk/WjIQLg4W/l1s4FZdiMCqUBLjd92tAXsBPDFLwuwCba5OGhuTdVYm6E128TZIqSnMpeocUlCQ==", - "dev": true + "integrity": "sha512-39GEOWgTxtMDk/WjIQLg4W/l1s4FZdiMCqUBLjd92tAXsBPDFLwuwCba5OGhuTdVYm6E128TZIqSnMpeocUlCQ==" }, "element-resize-detector": { "version": "1.1.15", @@ -6675,8 +6884,7 @@ "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "emojis-list": { "version": "2.1.0", @@ -6740,8 +6948,7 @@ "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" }, "env-paths": { "version": "2.2.0", @@ -6831,7 +7038,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -6863,16 +7069,6 @@ "is-symbol": "^1.0.2" } }, - "es5-ext": { - "version": "0.10.52", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz", - "integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==", - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.2", - "next-tick": "~1.0.0" - } - }, "es5-shim": { "version": "4.5.13", "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.13.tgz", @@ -6886,31 +7082,12 @@ "dev": true, "optional": true }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, "es6-shim": { "version": "0.35.5", "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz", "integrity": "sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==", "dev": true }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -7441,8 +7618,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { "version": "1.0.1", @@ -7476,22 +7652,6 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - } - } - }, "eth-lib": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", @@ -7506,21 +7666,6 @@ "xhr-request-promise": "^0.1.2" } }, - "ethereum-bloom-filters": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz", - "integrity": "sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA==", - "requires": { - "js-sha3": "^0.8.0" - }, - "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - } - } - }, "ethereumjs-common": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.4.0.tgz", @@ -7565,70 +7710,6 @@ "uuid": "^3.3.2" } }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "@types/node": { - "version": "10.17.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.4.tgz", - "integrity": "sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, "ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -7657,8 +7738,7 @@ "eventemitter3": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", - "dev": true + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" }, "events": { "version": "3.0.0", @@ -7669,7 +7749,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "dev": true, "requires": { "original": "^1.0.0" } @@ -7693,7 +7772,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -7704,6 +7782,14 @@ "strip-eof": "^1.0.0" } }, + "execall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz", + "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", + "requires": { + "clone-regexp": "^1.0.0" + } + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -7845,21 +7931,6 @@ } } }, - "ext": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz", - "integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==", - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - } - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -8015,7 +8086,6 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", - "dev": true, "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", "@nodelib/fs.stat": "^1.1.2", @@ -8045,6 +8115,14 @@ "format": "^0.2.2" } }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, "fb-watchman": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", @@ -8261,7 +8339,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, "requires": { "flatted": "^2.0.0", "rimraf": "2.6.3", @@ -8271,8 +8348,7 @@ "flatted": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", - "dev": true + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" }, "flush-write-stream": { "version": "1.1.1", @@ -8289,6 +8365,24 @@ "integrity": "sha512-Dx69IXGCq1qsUExWuG+5wkiMqVM/zGx/reXSJSLogECwp3x6KeNQZ+NAetgxEFpnC41rD8U3+jRCW68+LNzdtw==", "dev": true }, + "follow-redirects": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", + "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "requires": { + "debug": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -8381,21 +8475,33 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", "requires": { "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^2.1.0" + }, + "dependencies": { + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + } } }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "fs-promise": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", + "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", "requires": { - "minipass": "^2.6.0" + "any-promise": "^1.3.0", + "fs-extra": "^2.0.0", + "mz": "^2.6.0", + "thenify-all": "^1.6.0" } }, "fs-write-stream-atomic": { @@ -8899,7 +9005,6 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", @@ -9007,8 +9112,7 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-stdin": { "version": "4.0.1", @@ -9054,7 +9158,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -9064,7 +9167,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, "requires": { "is-extglob": "^2.1.0" } @@ -9074,8 +9176,7 @@ "glob-to-regexp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global": { "version": "4.4.0", @@ -9132,7 +9233,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, "requires": { "global-prefix": "^3.0.0" }, @@ -9141,7 +9241,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, "requires": { "ini": "^1.3.5", "kind-of": "^6.0.2", @@ -9196,7 +9295,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, "requires": { "array-union": "^1.0.1", "glob": "^7.0.3", @@ -9205,6 +9303,11 @@ "pinkie-promise": "^2.0.0" } }, + "globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=" + }, "globule": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", @@ -9216,6 +9319,21 @@ "minimatch": "~3.0.2" } }, + "gonzales-pe": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.4.tgz", + "integrity": "sha512-v0Ts/8IsSbh9n1OJRnSfa7Nlxi4AkXIsWB6vPept8FDbL4bXn3FNuxjYtO/nmBGu7GDkL9MFeGebeSu6l55EPQ==", + "requires": { + "minimist": "1.1.x" + }, + "dependencies": { + "minimist": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", + "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=" + } + } + }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -9230,6 +9348,7 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -9283,6 +9402,11 @@ } } }, + "handle-thing": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", + "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==" + }, "handlebars": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", @@ -9513,8 +9637,18 @@ "hosted-git-info": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", - "dev": true + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==" + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } }, "html-element-map": { "version": "1.1.0", @@ -9537,8 +9671,7 @@ "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" }, "html-minifier": { "version": "4.0.0", @@ -9555,6 +9688,11 @@ "uglify-js": "^3.5.1" } }, + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" + }, "html-webpack-plugin": { "version": "4.0.0-beta.8", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.8.tgz", @@ -9573,7 +9711,6 @@ "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, "requires": { "domelementtype": "^1.3.1", "domhandler": "^2.3.0", @@ -9587,7 +9724,6 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9599,7 +9735,13 @@ "http-cache-semantics": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" + "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", + "dev": true + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" }, "http-errors": { "version": "1.7.2", @@ -9628,8 +9770,28 @@ "http-parser-js": { "version": "0.4.10", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", - "dev": true + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=" + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + } }, "http-signature": { "version": "1.2.0", @@ -9663,21 +9825,6 @@ "postcss": "^7.0.14" } }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - } - } - }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -9746,7 +9893,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" @@ -9775,8 +9921,7 @@ "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" }, "infer-owner": { "version": "1.0.4", @@ -9800,8 +9945,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { "version": "6.5.2", @@ -9841,6 +9985,15 @@ } } }, + "internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "requires": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + } + }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", @@ -9865,14 +10018,23 @@ "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -9894,24 +10056,31 @@ "is-alphabetical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.3.tgz", - "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==", - "dev": true + "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==" + }, + "is-alphanumeric": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", + "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=" }, "is-alphanumerical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz", "integrity": "sha512-A1IGAPO5AW9vSh7omxIlOGwIqEvpW/TA+DksVOPM5ODuxKlZS09+TEM1E3275lJqO2oJ38vDpeAL3DCIiHE6eA==", - "dev": true, "requires": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-binary-path": { "version": "1.0.1", @@ -9972,8 +10141,7 @@ "is-decimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz", - "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==", - "dev": true + "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==" }, "is-descriptor": { "version": "0.1.6", @@ -9995,8 +10163,7 @@ "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, "is-expression": { "version": "3.0.0", @@ -10038,8 +10205,7 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-function": { "version": "1.0.1", @@ -10068,8 +10234,7 @@ "is-hexadecimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz", - "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==", - "dev": true + "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==" }, "is-installed-globally": { "version": "0.1.0", @@ -10130,8 +10295,7 @@ "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, "is-object": { "version": "1.0.1", @@ -10141,14 +10305,12 @@ "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" }, "is-path-in-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", - "dev": true, "requires": { "is-path-inside": "^2.1.0" } @@ -10157,7 +10319,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", - "dev": true, "requires": { "path-is-inside": "^1.0.2" } @@ -10189,6 +10350,11 @@ "has": "^1.0.1" } }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + }, "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", @@ -10217,6 +10383,11 @@ "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", "dev": true }, + "is-supported-regexp-flag": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz", + "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==" + }, "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -10236,11 +10407,21 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-whitespace-character": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz", + "integrity": "sha512-SNPgMLz9JzPccD3nPctcj8sZlX9DAMJSKH8bP7Z6bohCwuNgX8xbWr1eTAYXX9Vpi/aSn8Y1akL9WgM3t43YNQ==" + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, + "is-word-character": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.3.tgz", + "integrity": "sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A==" + }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -10266,8 +10447,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -11111,7 +11291,6 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -11235,7 +11414,8 @@ "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true }, "json-parse-better-errors": { "version": "1.0.2", @@ -11266,8 +11446,7 @@ "json3": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", - "dev": true + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" }, "json5": { "version": "2.1.1", @@ -11281,6 +11460,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -11350,10 +11530,16 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, "requires": { "json-buffer": "3.0.0" } }, + "killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==" + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -11374,6 +11560,11 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "known-css-properties": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", + "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==" + }, "latest-version": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", @@ -11587,12 +11778,30 @@ "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", "dev": true }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "requires": { + "chalk": "^2.0.1" + } + }, + "loglevel": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.6.tgz", + "integrity": "sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true }, + "longest-streak": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz", + "integrity": "sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw==" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -11605,7 +11814,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -11676,7 +11884,6 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -11689,8 +11896,7 @@ "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, "map-or-similar": { "version": "1.5.0", @@ -11706,6 +11912,11 @@ "object-visit": "^1.0.0" } }, + "markdown-escapes": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz", + "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==" + }, "markdown-it": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", @@ -11725,6 +11936,11 @@ "integrity": "sha512-xLIjLQmtym3QpoY9llBgApknl7pxAcN3WDRc2d3rwpl+/YvDZHPmKscGs+L6E05xf2KrCXPBvosWt7MZukwSpQ==", "dev": true }, + "markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==" + }, "markdown-to-jsx": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-6.10.3.tgz", @@ -11760,6 +11976,11 @@ } } }, + "mathml-tag-names": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz", + "integrity": "sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw==" + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -11770,6 +11991,14 @@ "safe-buffer": "^5.1.2" } }, + "mdast-util-compact": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.3.tgz", + "integrity": "sha512-nRiU5GpNy62rZppDKbLwhhtw5DXoFMqw9UNZFmlPsNaQCZ//WLjGKUwWMdJrUH+Se7UvtO2gXtAMe0g/N+eI5w==", + "requires": { + "unist-util-visit": "^1.1.0" + } + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -11791,7 +12020,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -11801,8 +12029,7 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" } } }, @@ -11920,8 +12147,7 @@ "merge2": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", - "dev": true + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==" }, "methods": { "version": "1.1.2", @@ -12065,28 +12291,13 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - }, - "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", "requires": { - "minipass": "^2.9.0" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" } }, "mississippi": { @@ -12192,6 +12403,11 @@ "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-1.5.0.tgz", "integrity": "sha512-Ss8RLKKGn+QhKbfCHvQ4+RPEVKR8AnPW1wNyWzZAS3wYw7UP4FX6GdRn64sdOhrP646o/JtXbLuDuc4RH3Bqyg==" }, + "mobx-utils": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/mobx-utils/-/mobx-utils-5.5.2.tgz", + "integrity": "sha512-cOlFJDWU/NHyGKvdhWqPdHmhPfeKewElAIZp5XticWIsSLGAA+4Uou3+8ookhQ/yG7qZXzvjAq90TZWXiR5+XA==" + }, "mock-fs": { "version": "4.10.3", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.3.tgz", @@ -12203,6 +12419,11 @@ "integrity": "sha512-gFD2xGCl8YFgGHsqJ9NKRVdwlioeW3mI1iqfLNYQOv0+6JRwG58Zk9DIGQgyIaffSYaO1xsKnMaYzzNr1KyIAw==", "dev": true }, + "mout": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", + "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -12221,12 +12442,36 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", @@ -12284,16 +12529,10 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "no-case": { "version": "2.3.2", @@ -12323,6 +12562,11 @@ "is-stream": "^1.0.1" } }, + "node-forge": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==" + }, "node-gyp": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", @@ -12417,7 +12661,6 @@ "version": "1.1.36", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.36.tgz", "integrity": "sha512-ggXhX6QGyJSjj3r+6ml2LqqC28XOWmKtpb+a15/Zpr9V3yoNazxJNlcQDS9bYaid5FReEWHEgToH1mwoUceWwg==", - "dev": true, "requires": { "semver": "^6.3.0" }, @@ -12425,8 +12668,7 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" } } }, @@ -12505,7 +12747,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -12521,13 +12762,18 @@ "normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" + }, + "normalize-selector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", + "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=" }, "normalize-url": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true }, "npm-conf": { "version": "1.1.3", @@ -12553,7 +12799,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, "requires": { "path-key": "^2.0.0" } @@ -12582,14 +12827,12 @@ "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "number-to-bn": { "version": "1.7.0", @@ -12665,8 +12908,7 @@ "object-is": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", - "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=", - "dev": true + "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=" }, "object-keys": { "version": "1.1.1", @@ -12748,13 +12990,18 @@ } }, "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.3.tgz", + "integrity": "sha1-K0hl29Rr6BIlcT9Om/5Lz09oCk8=", "requires": { "http-https": "^1.0.0" } }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -12763,6 +13010,11 @@ "ee-first": "1.1.1" } }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -12789,6 +13041,14 @@ "is-wsl": "^1.1.0" } }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "requires": { + "is-wsl": "^1.1.0" + } + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -12831,7 +13091,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, "requires": { "url-parse": "^1.4.3" } @@ -12875,13 +13134,13 @@ "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, "p-each-series": { "version": "1.0.0", @@ -12900,8 +13159,7 @@ "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { "version": "2.2.1", @@ -12922,8 +13180,7 @@ "p-map": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" }, "p-reduce": { "version": "1.0.0", @@ -12931,6 +13188,14 @@ "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "requires": { + "retry": "^0.12.0" + } + }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", @@ -13014,7 +13279,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", - "dev": true, "requires": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -13091,14 +13355,12 @@ "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.6", @@ -13288,6 +13550,26 @@ "integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==", "dev": true }, + "portfinder": { + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", + "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.1" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -13297,7 +13579,6 @@ "version": "7.0.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", - "dev": true, "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -13307,14 +13588,12 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -13330,8 +13609,32 @@ "postcss": "^7.0.0" } }, - "postcss-load-config": { - "version": "2.1.0", + "postcss-html": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", + "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", + "requires": { + "htmlparser2": "^3.10.0" + } + }, + "postcss-jsx": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.3.tgz", + "integrity": "sha512-yV8Ndo6KzU8eho5mCn7LoLUGPkXrRXRjhMpX4AaYJ9wLJPv099xbtpbRQ8FrPnzVxb/cuMebbPR7LweSt+hTfA==", + "requires": { + "@babel/core": ">=7.2.2" + } + }, + "postcss-less": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", + "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", + "requires": { + "postcss": "^7.0.14" + } + }, + "postcss-load-config": { + "version": "2.1.0", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz", "integrity": "sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==", "dev": true, @@ -13352,6 +13655,20 @@ "schema-utils": "^1.0.0" } }, + "postcss-markdown": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz", + "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==", + "requires": { + "remark": "^10.0.1", + "unist-util-find-all-after": "^1.0.2" + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=" + }, "postcss-modules-extract-imports": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", @@ -13393,6 +13710,47 @@ "postcss": "^7.0.6" } }, + "postcss-reporter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz", + "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==", + "requires": { + "chalk": "^2.4.1", + "lodash": "^4.17.11", + "log-symbols": "^2.2.0", + "postcss": "^7.0.7" + } + }, + "postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=" + }, + "postcss-safe-parser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.1.tgz", + "integrity": "sha512-xZsFA3uX8MO3yAda03QrG3/Eg1LN3EPfjjf07vke/46HERLZyHrTsQ9E1r1w1W//fWEhtYNndo2hQplN2cVpCQ==", + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-sass": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz", + "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==", + "requires": { + "gonzales-pe": "^4.2.3", + "postcss": "^7.0.1" + } + }, + "postcss-scss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", + "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", + "requires": { + "postcss": "^7.0.0" + } + }, "postcss-selector-parser": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", @@ -13404,11 +13762,24 @@ "uniq": "^1.0.1" } }, + "postcss-sorting": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-4.1.0.tgz", + "integrity": "sha512-r4T2oQd1giURJdHQ/RMb72dKZCuLOdWx2B/XhXN1Y1ZdnwXsKH896Qz6vD4tFy9xSjpKNYhlZoJmWyhH/7JUQw==", + "requires": { + "lodash": "^4.17.4", + "postcss": "^7.0.0" + } + }, + "postcss-syntax": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", + "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==" + }, "postcss-value-parser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", - "dev": true + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==" }, "prelude-ls": { "version": "1.1.2", @@ -13419,7 +13790,8 @@ "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true }, "pretty-error": { "version": "2.1.1", @@ -13852,8 +14224,12 @@ "querystringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", - "dev": true + "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" }, "raf": { "version": "3.4.1", @@ -13903,6 +14279,11 @@ "safe-buffer": "^5.1.0" } }, + "randomhex": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", + "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -14584,7 +14965,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, "requires": { "define-properties": "^1.1.2" } @@ -14657,6 +15037,59 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, + "remark": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz", + "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==", + "requires": { + "remark-parse": "^6.0.0", + "remark-stringify": "^6.0.0", + "unified": "^7.0.0" + } + }, + "remark-parse": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz", + "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==", + "requires": { + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^1.1.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^1.0.0", + "vfile-location": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "remark-stringify": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz", + "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==", + "requires": { + "ccount": "^1.0.0", + "is-alphanumeric": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "longest-streak": "^2.0.1", + "markdown-escapes": "^1.0.0", + "markdown-table": "^1.1.0", + "mdast-util-compact": "^1.0.0", + "parse-entities": "^1.0.2", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "stringify-entities": "^1.0.1", + "unherit": "^1.0.4", + "xtend": "^4.0.1" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -14694,6 +15127,11 @@ "is-finite": "^1.0.0" } }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -14744,20 +15182,17 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "requizzle": { "version": "0.2.3", @@ -14786,7 +15221,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, "requires": { "resolve-from": "^3.0.0" }, @@ -14794,8 +15228,7 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" } } }, @@ -14825,8 +15258,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "resolve-pathname": { "version": "3.0.0", @@ -14842,6 +15274,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, "requires": { "lowercase-keys": "^1.0.0" } @@ -14861,6 +15294,11 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -15084,36 +15522,10 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", - "optional": true, "requires": { "nan": "^2.0.8" } }, - "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "scrypt-shim": { - "version": "github:web3-js/scrypt-shim#be5e616323a8b5e568788bf94d03c1b8410eac54", - "from": "github:web3-js/scrypt-shim", - "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" - }, - "dependencies": { - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "scrypt.js": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", @@ -15192,6 +15604,19 @@ "dev": true, "optional": true }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + }, + "selfsigned": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "requires": { + "node-forge": "0.9.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -15306,6 +15731,56 @@ } } }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + } + } + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -15332,8 +15807,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { "version": "2.0.1", @@ -15415,7 +15889,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -15423,8 +15896,7 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shell-quote": { "version": "1.7.2", @@ -15452,8 +15924,7 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "simple-concat": { "version": "1.0.0", @@ -15510,7 +15981,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", @@ -15627,11 +16097,19 @@ } } }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, "sockjs-client": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", - "dev": true, "requires": { "debug": "^3.2.5", "eventsource": "^1.0.7", @@ -15645,7 +16123,6 @@ "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -15654,7 +16131,6 @@ "version": "0.11.3", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", - "dev": true, "requires": { "websocket-driver": ">=0.5.1" } @@ -15729,7 +16205,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -15738,14 +16213,12 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -15754,8 +16227,49 @@ "spdx-license-ids": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" + }, + "spdy": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", + "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + }, + "dependencies": { + "readable-stream": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "specificity": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", + "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==" }, "split-string": { "version": "3.1.0", @@ -15768,8 +16282,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "sshpk": { "version": "1.16.1", @@ -15813,6 +16326,11 @@ "integrity": "sha512-QjMLR0A3WwFY2aZdV0okfFEJB5TRjkggXZjxP3A1RsWsNHNu3YPv8btmtc6iCFZ0Rul3FE93OYogvhOUClU+ng==", "dev": true }, + "state-toggle": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz", + "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==" + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -15923,7 +16441,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -15933,7 +16450,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -16011,11 +16527,21 @@ "safe-buffer": "~5.1.0" } }, + "stringify-entities": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz", + "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==", + "requires": { + "character-entities-html4": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" }, @@ -16023,8 +16549,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" } } }, @@ -16048,8 +16573,7 @@ "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "strip-hex-prefix": { "version": "1.0.0", @@ -16096,66 +16620,447 @@ } } }, - "sumchecker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz", - "integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==", - "dev": true, - "requires": { - "debug": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "svg-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.2.tgz", - "integrity": "sha512-1gtApepKFweigFZj3sGO8KT8LvVZK8io146EzXrpVuWCDAbISz/yMucco3hWTkpZNoPabM+dnMOpy6Swue68Zg==", - "dev": true + "style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" }, - "svgo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", - "integrity": "sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==", - "dev": true, + "stylelint": { + "version": "9.10.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz", + "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==", "requires": { + "autoprefixer": "^9.0.0", + "balanced-match": "^1.0.0", "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.33", - "csso": "^3.5.1", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" + "cosmiconfig": "^5.0.0", + "debug": "^4.0.0", + "execall": "^1.0.0", + "file-entry-cache": "^4.0.0", + "get-stdin": "^6.0.0", + "global-modules": "^2.0.0", + "globby": "^9.0.0", + "globjoin": "^0.1.4", + "html-tags": "^2.0.0", + "ignore": "^5.0.4", + "import-lazy": "^3.1.0", + "imurmurhash": "^0.1.4", + "known-css-properties": "^0.11.0", + "leven": "^2.1.0", + "lodash": "^4.17.4", + "log-symbols": "^2.0.0", + "mathml-tag-names": "^2.0.1", + "meow": "^5.0.0", + "micromatch": "^3.1.10", + "normalize-selector": "^0.2.0", + "pify": "^4.0.0", + "postcss": "^7.0.13", + "postcss-html": "^0.36.0", + "postcss-jsx": "^0.36.0", + "postcss-less": "^3.1.0", + "postcss-markdown": "^0.36.0", + "postcss-media-query-parser": "^0.2.3", + "postcss-reporter": "^6.0.0", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^4.0.0", + "postcss-sass": "^0.3.5", + "postcss-scss": "^2.0.0", + "postcss-selector-parser": "^3.1.0", + "postcss-syntax": "^0.36.2", + "postcss-value-parser": "^3.3.0", + "resolve-from": "^4.0.0", + "signal-exit": "^3.0.2", + "slash": "^2.0.0", + "specificity": "^0.4.1", + "string-width": "^3.0.0", + "style-search": "^0.1.0", + "sugarss": "^2.0.0", + "svg-tags": "^1.0.0", + "table": "^5.0.0" }, "dependencies": { - "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", - "dev": true, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "requires": { - "boolbase": "^1.0.0", - "css-what": "^2.1.2", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" } }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "file-entry-cache": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", + "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", + "requires": { + "flat-cache": "^2.0.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } + } + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" + }, + "import-lazy": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "stylelint-config-rational-order": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/stylelint-config-rational-order/-/stylelint-config-rational-order-0.1.2.tgz", + "integrity": "sha512-Qo7ZQaihCwTqijfZg4sbdQQHtugOX/B1/fYh018EiDZHW+lkqH9uHOnsDwDPGZrYJuB6CoyI7MZh2ecw2dOkew==", + "requires": { + "stylelint": "^9.10.1", + "stylelint-order": "^2.2.1" + } + }, + "stylelint-config-recommended": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", + "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==" + }, + "stylelint-config-standard": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-19.0.0.tgz", + "integrity": "sha512-VvcODsL1PryzpYteWZo2YaA5vU/pWfjqBpOvmeA8iB2MteZ/ZhI1O4hnrWMidsS4vmEJpKtjdhLdfGJmmZm6Cg==", + "requires": { + "stylelint-config-recommended": "^3.0.0" + } + }, + "stylelint-order": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-2.2.1.tgz", + "integrity": "sha512-019KBV9j8qp1MfBjJuotse6MgaZqGVtXMc91GU9MsS9Feb+jYUvUU3Z8XiClqPdqJZQ0ryXQJGg3U3PcEjXwfg==", + "requires": { + "lodash": "^4.17.10", + "postcss": "^7.0.2", + "postcss-sorting": "^4.1.0" + } + }, + "sugarss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", + "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", + "requires": { + "postcss": "^7.0.2" + } + }, + "sumchecker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz", + "integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==", + "dev": true, + "requires": { + "debug": "^4.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "svg-parser": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.2.tgz", + "integrity": "sha512-1gtApepKFweigFZj3sGO8KT8LvVZK8io146EzXrpVuWCDAbISz/yMucco3hWTkpZNoPabM+dnMOpy6Swue68Zg==", + "dev": true + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" + }, + "svgo": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", + "integrity": "sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.33", + "csso": "^3.5.1", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + }, + "dependencies": { + "css-select": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", + "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^2.1.2", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { "dom-serializer": "0", @@ -16165,21 +17070,22 @@ } }, "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "version": "0.1.37", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.37.tgz", + "integrity": "sha512-G8gi5fcXP/2upwiuOShJ258sIufBVztekgobr3cVgYXObZwJ5AXLqZn52AI+/ffft29pJexF9WNdUxjlkVehoQ==", "requires": { "bluebird": "^3.5.0", "buffer": "^5.0.5", "decompress": "^4.0.0", "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", + "fs-extra": "^2.1.2", + "fs-promise": "^2.0.0", "got": "^7.1.0", "mime-types": "^2.1.16", "mkdirp-promise": "^5.0.1", "mock-fs": "^4.1.0", "setimmediate": "^1.0.5", - "tar": "^4.0.2", + "tar.gz": "^1.0.5", "xhr-request-promise": "^0.1.2" }, "dependencies": { @@ -16228,20 +17134,6 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -16249,11 +17141,6 @@ "requires": { "prepend-http": "^1.0.1" } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } }, @@ -16277,7 +17164,6 @@ "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, "requires": { "ajv": "^6.10.2", "lodash": "^4.17.14", @@ -16288,14 +17174,12 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -16306,7 +17190,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -16328,7 +17211,6 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "dev": true, "requires": { "block-stream": "*", "fstream": "^1.0.12", @@ -16349,6 +17231,25 @@ "xtend": "^4.0.0" } }, + "tar.gz": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/tar.gz/-/tar.gz-1.0.7.tgz", + "integrity": "sha512-uhGatJvds/3diZrETqMj4RxBR779LKlIE74SsMcn5JProZsfs9j0QBwWO1RW+IWNJxS2x8Zzra1+AW6OQHWphg==", + "requires": { + "bluebird": "^2.9.34", + "commander": "^2.8.1", + "fstream": "^1.0.8", + "mout": "^0.11.0", + "tar": "^2.1.1" + }, + "dependencies": { + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + } + } + }, "telejson": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/telejson/-/telejson-3.0.3.tgz", @@ -16578,6 +17479,22 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "throat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", @@ -16604,6 +17521,11 @@ "xtend": "~4.0.1" } }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -16685,7 +17607,8 @@ "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true }, "to-regex": { "version": "3.0.2", @@ -16755,12 +17678,27 @@ "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", "dev": true }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, + "trim-trailing-lines": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz", + "integrity": "sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q==" + }, + "trough": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.4.tgz", + "integrity": "sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q==" + }, "true-case-path": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", @@ -16821,11 +17759,6 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -16940,7 +17873,8 @@ "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true }, "unfetch": { "version": "4.1.0", @@ -16948,6 +17882,15 @@ "integrity": "sha512-crP/n3eAPUJxZXM9T80/yv0YhkTEx2K1D3h7D1AJM6fzsWZrxdyRuLN0JH/dkZh1LNH8LxCnBzoPFCPbb2iGpg==", "dev": true }, + "unherit": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.2.tgz", + "integrity": "sha512-W3tMnpaMG7ZY6xe/moK04U9fBhi6wEiCYHUW5Mop/wQHf12+79EQGwxYejNdhEz2mkqkBlGwm7pxmgBKMVUj0w==", + "requires": { + "inherits": "^2.0.1", + "xtend": "^4.0.1" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -16976,6 +17919,21 @@ "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", "dev": true }, + "unified": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", + "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==", + "requires": { + "@types/unist": "^2.0.0", + "@types/vfile": "^3.0.0", + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^1.1.0", + "trough": "^1.0.0", + "vfile": "^3.0.0", + "x-is-string": "^0.1.0" + } + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -16990,8 +17948,7 @@ "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" }, "unique-filename": { "version": "1.1.1", @@ -17018,10 +17975,56 @@ "crypto-random-string": "^1.0.0" } }, + "unist-util-find-all-after": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.4.tgz", + "integrity": "sha512-CaxvMjTd+yF93BKLJvZnEfqdM7fgEACsIpQqz8vIj9CJnUb9VpyymFS3tg6TCtgrF7vfCJBF5jbT2Ox9CBRYRQ==", + "requires": { + "unist-util-is": "^3.0.0" + } + }, + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" + }, + "unist-util-remove-position": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", + "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", + "requires": { + "unist-util-visit": "^1.1.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz", + "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==", + "requires": { + "@types/unist": "^2.0.2" + } + }, + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "requires": { + "unist-util-is": "^3.0.0" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "unpipe": { "version": "1.0.0", @@ -17163,7 +18166,6 @@ "version": "1.4.7", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", - "dev": true, "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -17173,6 +18175,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, "requires": { "prepend-http": "^2.0.0" } @@ -17259,7 +18262,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -17300,6 +18302,51 @@ "extsprintf": "^1.2.0" } }, + "vfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz", + "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==", + "requires": { + "is-buffer": "^2.0.0", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "^1.0.0", + "vfile-message": "^1.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + }, + "unist-util-stringify-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==" + }, + "vfile-message": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "requires": { + "unist-util-stringify-position": "^1.1.1" + } + } + } + }, + "vfile-location": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", + "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==" + }, + "vfile-message": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.1.tgz", + "integrity": "sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==", + "requires": { + "@types/unist": "^2.0.2", + "unist-util-stringify-position": "^2.0.0" + } + }, "vm-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", @@ -17426,166 +18473,257 @@ "neo-async": "^2.5.0" } }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, "web3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", - "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.34.tgz", + "integrity": "sha1-NH5WG3hAmMtVYzFfSQR5odkfKrE=", "requires": { - "@types/node": "^12.6.1", - "web3-bzz": "1.2.2", - "web3-core": "1.2.2", - "web3-eth": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-shh": "1.2.2", - "web3-utils": "1.2.2" + "web3-bzz": "1.0.0-beta.34", + "web3-core": "1.0.0-beta.34", + "web3-eth": "1.0.0-beta.34", + "web3-eth-personal": "1.0.0-beta.34", + "web3-net": "1.0.0-beta.34", + "web3-shh": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" } }, "web3-bzz": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", - "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.34.tgz", + "integrity": "sha1-Bo03d3q2Xlxg+OyLmlDP5FJ3kpw=", "requires": { - "@types/node": "^10.12.18", - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" + "got": "7.1.0", + "swarm-js": "0.1.37", + "underscore": "1.8.3" }, "dependencies": { - "@types/node": { - "version": "10.17.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.4.tgz", - "integrity": "sha512-F2pgg+LcIr/elguz+x+fdBX5KeZXGUOp7TV8M0TVIrDezYLFRNt8oMTyps0VQ1kj5WGGoR18RdxnRDHXrIFHMQ==" + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } } } }, "web3-core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", - "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.34.tgz", + "integrity": "sha1-EhvoVV6fsA0sXQXd0zgdDJ5GmH4=", "requires": { - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-requestmanager": "1.2.2", - "web3-utils": "1.2.2" + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-core-requestmanager": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" } }, "web3-core-helpers": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", - "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.34.tgz", + "integrity": "sha1-sWjaANPhnhVrwVriAyA91N/uLQM=", "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.2", - "web3-utils": "1.2.2" + "underscore": "1.8.3", + "web3-eth-iban": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-core-method": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", - "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-utils": "1.2.2" + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.34.tgz", + "integrity": "sha1-7BY8iixJD6AqfsFVWfpzB/x8xt0=", + "requires": { + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-promievent": "1.0.0-beta.34", + "web3-core-subscriptions": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-core-promievent": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", - "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.34.tgz", + "integrity": "sha1-pPT6Z4S7KT6CxglgrltWqUzQPtw=", "requires": { "any-promise": "1.3.0", - "eventemitter3": "3.1.2" + "eventemitter3": "1.1.1" }, "dependencies": { "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", + "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=" } } }, "web3-core-requestmanager": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", - "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "web3-providers-http": "1.2.2", - "web3-providers-ipc": "1.2.2", - "web3-providers-ws": "1.2.2" + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.34.tgz", + "integrity": "sha1-Afj2zyrmtvC3DDi64e90G1urIVw=", + "requires": { + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34", + "web3-providers-http": "1.0.0-beta.34", + "web3-providers-ipc": "1.0.0-beta.34", + "web3-providers-ws": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-core-subscriptions": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", - "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.34.tgz", + "integrity": "sha1-n+0UQDPyIcPPIQYDAv/a9e8t4t4=", "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" + "eventemitter3": "1.1.1", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34" }, "dependencies": { "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", + "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" } } }, "web3-eth": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", - "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-accounts": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-eth-ens": "1.2.2", - "web3-eth-iban": "1.2.2", - "web3-eth-personal": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.34.tgz", + "integrity": "sha1-dAhgAIUMb+b1Ne9Jg31tS7YRMmg=", + "requires": { + "underscore": "1.8.3", + "web3-core": "1.0.0-beta.34", + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-core-subscriptions": "1.0.0-beta.34", + "web3-eth-abi": "1.0.0-beta.34", + "web3-eth-accounts": "1.0.0-beta.34", + "web3-eth-contract": "1.0.0-beta.34", + "web3-eth-iban": "1.0.0-beta.34", + "web3-eth-personal": "1.0.0-beta.34", + "web3-net": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-eth-abi": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", - "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.34.tgz", + "integrity": "sha1-A0Uz46ovfln/MXk+rqaFwO1a9no=", "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.2" + "bn.js": "4.11.6", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-eth-accounts": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", - "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.34.tgz", + "integrity": "sha1-4JFC7uzHl6w0WbdemyOUbTaV8zM=", "requires": { "any-promise": "1.3.0", "crypto-browserify": "3.12.0", "eth-lib": "0.2.7", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "scrypt-shim": "github:web3-js/scrypt-shim", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" + "scrypt.js": "0.2.0", + "underscore": "1.8.3", + "uuid": "2.0.1", + "web3-core": "1.0.0-beta.34", + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" }, "dependencies": { "eth-lib": { @@ -17598,140 +18736,169 @@ "xhr-request-promise": "^0.1.2" } }, + "scrypt.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz", + "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", + "requires": { + "scrypt": "^6.0.2", + "scryptsy": "^1.2.1" + } + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" } } }, "web3-eth-contract": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", - "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", - "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-utils": "1.2.2" - } - }, - "web3-eth-ens": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", - "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", - "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-promievent": "1.2.2", - "web3-eth-abi": "1.2.2", - "web3-eth-contract": "1.2.2", - "web3-utils": "1.2.2" + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.34.tgz", + "integrity": "sha1-nbs4+udkOoCEJ6IBgEcOx0FckeY=", + "requires": { + "underscore": "1.8.3", + "web3-core": "1.0.0-beta.34", + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-core-promievent": "1.0.0-beta.34", + "web3-core-subscriptions": "1.0.0-beta.34", + "web3-eth-abi": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-eth-iban": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", - "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.34.tgz", + "integrity": "sha1-mvRYYFhnzPdOqXmq8yazi6alugw=", "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.2" + "bn.js": "4.11.6", + "web3-utils": "1.0.0-beta.34" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } } }, "web3-eth-personal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", - "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.34.tgz", + "integrity": "sha1-mvuhZzQuveVCC81YlcP2w0OI8gU=", "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.2", - "web3-core-helpers": "1.2.2", - "web3-core-method": "1.2.2", - "web3-net": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.0.0-beta.34", + "web3-core-helpers": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-net": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" } }, "web3-net": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", - "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.34.tgz", + "integrity": "sha1-QnzqL0MYgUScjjjVIykPFz+f9j0=", "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-utils": "1.2.2" + "web3-core": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-utils": "1.0.0-beta.34" } }, "web3-providers-http": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", - "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.34.tgz", + "integrity": "sha1-5WG1K7tDdmKCAH1AKFv+NVDCfno=", "requires": { - "web3-core-helpers": "1.2.2", - "xhr2-cookies": "1.1.0" + "web3-core-helpers": "1.0.0-beta.34", + "xhr2": "0.1.4" } }, "web3-providers-ipc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", - "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.34.tgz", + "integrity": "sha1-obd/GjBtc2SanAOQUuQMtxMo0Ao=", "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2" + "oboe": "2.1.3", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-providers-ws": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", - "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.34.tgz", + "integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=", "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.2", - "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.34", + "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } } }, "web3-shh": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", - "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.34.tgz", + "integrity": "sha1-l1Bh1x6uxCzO5Xb3vY9w8DhEr+A=", "requires": { - "web3-core": "1.2.2", - "web3-core-method": "1.2.2", - "web3-core-subscriptions": "1.2.2", - "web3-net": "1.2.2" + "web3-core": "1.0.0-beta.34", + "web3-core-method": "1.0.0-beta.34", + "web3-core-subscriptions": "1.0.0-beta.34", + "web3-net": "1.0.0-beta.34" } }, "web3-utils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", - "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", + "version": "1.0.0-beta.34", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.34.tgz", + "integrity": "sha1-lBH8OarvOcpOBhafdiKX2f8CCXA=", "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethereum-bloom-filters": "^1.0.6", + "bn.js": "4.11.6", + "eth-lib": "0.1.27", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "underscore": "1.9.1", - "utf8": "3.0.0" + "randomhex": "0.1.5", + "underscore": "1.8.3", + "utf8": "2.1.1" }, "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=" } } }, @@ -17980,7 +19147,6 @@ "version": "3.7.2", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", - "dev": true, "requires": { "memory-fs": "^0.4.1", "mime": "^2.4.4", @@ -17992,8 +19158,159 @@ "mime": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", - "dev": true + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" + } + } + }, + "webpack-dev-server": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.9.0.tgz", + "integrity": "sha512-E6uQ4kRrTX9URN9s/lIbqTAztwEPdvzVrcmHE8EQ9YnuT9J8Es5Wrd8n9BKg1a0oZ5EgEke/EQFgUsp18dSTBw==", + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.2.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.4", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.25", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.7", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.4.0", + "spdy": "^4.0.1", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "12.0.5" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -18013,7 +19330,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, "requires": { "ansi-colors": "^3.0.0", "uuid": "^3.3.2" @@ -18036,13 +19352,12 @@ } }, "websocket": { - "version": "github:web3-js/WebSocket-Node#905deb4812572b344f5801f8c9ce8bb02799d82e", - "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "requires": { "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", "yaeti": "^0.0.6" }, "dependencies": { @@ -18065,7 +19380,6 @@ "version": "0.7.3", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", - "dev": true, "requires": { "http-parser-js": ">=0.4.0 <0.4.11", "safe-buffer": ">=5.1.0", @@ -18075,8 +19389,7 @@ "websocket-extensions": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" }, "whatwg-encoding": { "version": "1.0.5", @@ -18114,7 +19427,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -18233,7 +19545,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" @@ -18242,14 +19553,12 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -18258,7 +19567,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18269,7 +19577,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -18285,7 +19592,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, "requires": { "mkdirp": "^0.5.1" } @@ -18311,6 +19617,11 @@ "ultron": "~1.1.0" } }, + "x-is-string": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" + }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", @@ -18378,13 +19689,10 @@ "xhr-request": "^1.0.1" } }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", - "requires": { - "cookiejar": "^2.1.1" - } + "xhr2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" }, "xml-name-validator": { "version": "3.0.0", @@ -18398,11 +19706,6 @@ "integrity": "sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA==", "dev": true }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -18411,8 +19714,7 @@ "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yaeti": { "version": "0.0.6", diff --git a/package.json b/package.json index e816b1f4..979721a7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "render-test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", - "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && NODE_ENV=development electron ./src/electron.js\"", + "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", "storybook": "start-storybook", "docs": "jsdoc -c ./jsdoc.json", "build": "webpack --config webpack.dev.js && electron-builder" @@ -36,7 +36,7 @@ "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^19.0.0", "validatorjs": "^3.17.1", - "web3": "^1.2.2", + "web3": "^1.0.0-beta.34", "webpack": "^4.41.2", "webpack-dev-server": "^3.8.2" }, @@ -52,6 +52,7 @@ "clean-webpack-plugin": "^3.0.0", "concurrently": "^5.0.0", "copy-webpack-plugin": "^5.0.4", + "cross-env": "^6.0.3", "css-loader": "^3.2.0", "electron": "^7.1.1", "electron-builder": "^21.2.0", diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 863148bc..97bbea08 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -74,7 +74,7 @@ class CreateNewProjectWithTokens extends Component { render() { const { position, step } = this.state; - if (position === 'uploading') return ; + if (position === 'uploading') return ; const { gotoUploading, checkToken } = this; const connectToken = new ConnectTokenForm({ hooks: { diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 6da0cc67..5017f67d 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -47,9 +47,7 @@ class ProjectUploading extends Component { }); appStore.addProjectToList({ name, address: receipt.contractAddress }); clearInterval(interval); - appStore.deployQuestions().then(() => { - // eslint-disable-next-line no-alert - alert('success'); + appStore.deployQuestions(receipt.contractAddress).then(() => { }); } }); diff --git a/src/config.json b/src/config.json index 4f9c0e06..24065de2 100644 --- a/src/config.json +++ b/src/config.json @@ -9,26 +9,6 @@ { "name": "test", "address": "0x1Cd9D97EC3f3283cD564bB82f7d0Ee2737D6F352" - }, - { - "name": "name", - "address": "0xe81a86b750ab19a836ce51000e48d1677c03edd4" - }, - { - "name": "TETETTWSSSAT", - "address": "0xe81a86b750ab19a836ce51000e48d1677c03edd4" - }, - { - "name": "Name", - "address": "0xAFd2B678D5Fd2d8524F5bFBa04B38abbDCba1Fc9" - }, - { - "name": "name1321312", - "address": "0x5e0f11bf7c8DDadc7ED660051EF3f15766dDB207" - }, - { - "name": "name3412321", - "address": "0xD733A708975732844f3acF28C007fB1933233968" } ] } \ No newline at end of file diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 6b648b7a..200e30cf 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -105,7 +105,7 @@ class ContractService { }) { const { rootStore: { Web3Service, userStore } } = this; const { address } = userStore; - const maxGasPrice = 10000000000; + const maxGasPrice = 30000000000; const contract = Web3Service.createContractInstance(abi); const txData = contract.deploy({ data: `0x${bytecode}`, @@ -186,19 +186,19 @@ class ContractService { async checkQuestions() { this.getSystemQuestions(); - const countOfUploaded = await this.contract.getCount().call(); + const countOfUploaded = await this._contract.methods.getCount().call(); const totalCount = Object.keys(this.sysQuestions).length; return ({ countOfUploaded, totalCount }); } - sendQuestion(idx) { + async sendQuestion(idx) { const { Web3Service, Web3Service: { web3 }, userStore, appStore: { password }, } = this.rootStore; const sysQuestion = this.sysQuestions[idx]; // eslint-disable-next-line consistent-return - this.getQuestion(idx).then((result) => { + await this.getQuestion(idx).then((result) => { if (result.caption === '') { const { address } = userStore; const { @@ -210,8 +210,8 @@ class ContractService { const contractAddr = this._contract.options.address; // eslint-disable-next-line max-len - const dataTx = this.contract.methods.saveNewQuestion([id, group, time], 0, name, caption, contractAddr, method, preparedFormula, params).encodeABI(); - const maxGasPrice = 10000000000; + const dataTx = this._contract.methods.saveNewQuestion([id, group, time], 0, name, caption, contractAddr, method, preparedFormula, params).encodeABI(); + const maxGasPrice = 30000000000; const rawTx = { to: contractAddr, data: dataTx, @@ -219,17 +219,22 @@ class ContractService { value: '0x0', }; + return new Promise((resolve, reject) => { Web3Service.formTxData(address, rawTx, maxGasPrice) .then((formedTx) => { + console.log(formedTx); userStore.singTransaction(formedTx, password) .then((signedTx) => { - Web3Service.sendSignedTransaction(signedTx) + Web3Service.sendSignedTransaction(`0x${signedTx}`) .then((txHash) => { + console.log(txHash); const interval = setInterval(() => { - web3.eth.getTransactionReciept(txHash).then((receipt) => { - if (typeof receipt === 'object') { + web3.eth.getTransactionReceipt(txHash).then((receipt) => { + // eslint-disable-next-line valid-typeof + if (receipt != null) { clearInterval(interval); + console.log(receipt); resolve(); } }); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index b50641bc..547ccfc0 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -108,19 +108,15 @@ class AppStore { const contract = Web3Service.createContractInstance(abi); contract.options.address = address; contractService.setContract(contract); - const { countOfUploaded, totalCount } = contractService.checkQuestions(); - let idx = countOfUploaded === 0 ? 1 : countOfUploaded; + const { countOfUploaded, totalCount } = await contractService.checkQuestions(); + // eslint-disable-next-line no-console + console.log({ countOfUploaded, totalCount }); + let idx = Number(countOfUploaded) === 0 ? 1 : Number(countOfUploaded); // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { - while (idx <= totalCount) { - // eslint-disable-next-line no-await-in-loop - await contractService.sendQuestion(countOfUploaded); - idx += 1; - // eslint-disable-next-line no-console - console.log(`uploaded ${idx}`); - } - resolve(); - }); + for (idx; idx <= totalCount; idx += 1) { + // eslint-disable-next-line no-await-in-loop + await contractService.sendQuestion(idx); + } } // eslint-disable-next-line class-methods-use-this From 59da327fe3a766679b5778c63e32763607088b85 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 07:57:14 +0700 Subject: [PATCH 093/219] recovering more accurate --- src/components/DisplayUserInfo/index.js | 45 ++++++++ src/components/Input/Input.scss | 1 + src/components/InputSeed/index.js | 5 +- src/components/ProjectUploading/index.js | 131 +++++++++++++---------- src/components/Router/SimpleRouter.js | 3 + src/config.json | 4 + src/stores/AppStore/AppStore.js | 1 + src/stores/UserStore/UserStore.js | 7 +- 8 files changed, 136 insertions(+), 61 deletions(-) create mode 100644 src/components/DisplayUserInfo/index.js diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js new file mode 100644 index 00000000..dd394d56 --- /dev/null +++ b/src/components/DisplayUserInfo/index.js @@ -0,0 +1,45 @@ +import React from 'react'; +import { inject, observer } from 'mobx-react'; +import { NavLink } from 'react-router-dom'; +import Container from '../Container'; +import Header from '../Header'; +import FormBlock from '../FormBlock'; +import Heading from '../Heading'; +import { Button } from '../Button'; +import styles from '../Login/Login.scss'; + + +const DisplayUserInfo = inject('userStore')(observer(({ userStore: { balance, address } }) => ( + +
+
+ {' '} + + + {'Контракт успешно подключен!'} + {'Проверьте правильность данных перед тем, как продолжить'} + +
+
+
+

Символ токена

+

{address}

+
+
+
+

Баланс

+

{balance}

+
+
+
+ + + +
+ + +
+ +))); + +export default DisplayUserInfo; diff --git a/src/components/Input/Input.scss b/src/components/Input/Input.scss index 0c580bea..123f4387 100644 --- a/src/components/Input/Input.scss +++ b/src/components/Input/Input.scss @@ -10,6 +10,7 @@ vertical-align: middle; } &__input { + width: 85%; margin-left: 20px; vertical-align: middle; background: transparent; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index e874e651..93b3db68 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -55,6 +55,9 @@ class InputSeed extends Component { if (recover) { userStore.recoverWallet(mnemonic) .then((data) => { + console.log(data); + userStore.setEncryptedWallet(data.v3wallet); + userStore.getEthBalance(); setRedirect(); }); } else if (!recover) { @@ -70,7 +73,7 @@ class InputSeed extends Component { }, }); - if (redirect) return recover ? : ; + if (redirect) return recover ? : ; return (
diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 5017f67d..90a30921 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -15,6 +15,7 @@ import ProgressBlock from './ProgressBlock'; import { CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, } from '../Icons'; +import { Button } from '../Button'; @inject('userStore', 'appStore') @observer @@ -24,6 +25,7 @@ class ProjectUploading extends Component { this.state = { step: 0, address: '', + loading: true, }; } @@ -37,7 +39,6 @@ class ProjectUploading extends Component { this.setState({ step: 3, }); - console.log(txHash); const interval = setInterval(() => { appStore.checkReceipt(txHash).then((receipt) => { if (typeof receipt === 'object') { @@ -48,6 +49,9 @@ class ProjectUploading extends Component { appStore.addProjectToList({ name, address: receipt.contractAddress }); clearInterval(interval); appStore.deployQuestions(receipt.contractAddress).then(() => { + this.setState({ + loading: false, + }); }); } }); @@ -55,66 +59,15 @@ class ProjectUploading extends Component { }); } - deployQuestions() { - - } - render() { - const { step } = this.state; + const { step, loading } = this.state; return (
-
- - - {'Загружаем контракт'} - {'Это может занять до 5 минут'} - -
- - - - - - - - - - - - - - - -
- -
+
+ { + loading ? : + }
projects @@ -122,9 +75,73 @@ class ProjectUploading extends Component { } } +const Progress = ({ step }) => ( + + + {'Загружаем контракт'} + {'Это может занять до 5 минут'} + +
+ + + + + + + + + + + + + + + +
+ +
+); + +const AlertBlock = () => ( + + + {'Проект успешно создан!'} + {'Теперь можно начать работу с ним или выбрать другой проект'} + + + + + + +); + // //ProjectUploading.propTypes = {}; ProjectUploading.propTypes = { appStore: propTypes.object.isRequired, }; +Progress.propTypes = { + step: propTypes.number.isRequired, +}; export default ProjectUploading; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 8d9c2622..4684ff78 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -15,6 +15,8 @@ import AddExistingProject from '../AddExisitingProject'; import AddNewProject from '../AddNewProject'; import ProjectUploading from '../ProjectUploading'; import CreationAlert from '../CreationAlert'; +import DisplayUserInfo from '../DisplayUserInfo'; + const SimpleRouter = () => ( @@ -24,6 +26,7 @@ const SimpleRouter = () => ( ())} /> ())} /> + ())} /> ())} /> ())} /> diff --git a/src/config.json b/src/config.json index 24065de2..7dcee25e 100644 --- a/src/config.json +++ b/src/config.json @@ -9,6 +9,10 @@ { "name": "test", "address": "0x1Cd9D97EC3f3283cD564bB82f7d0Ee2737D6F352" + }, + { + "name": "T3st", + "address": "0xACA55c33D67d549CacA4f700D0319B865D8E0FC5" } ] } \ No newline at end of file diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 547ccfc0..85e72643 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -117,6 +117,7 @@ class AppStore { // eslint-disable-next-line no-await-in-loop await contractService.sendQuestion(idx); } + Promise.resolve(); } // eslint-disable-next-line class-methods-use-this diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index a8473d88..e18355f4 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -136,9 +136,10 @@ class UserStore { * Getting user Ethereum balance * @return {number} balance in ETH */ - @action getEthBalance() { - this.balance = 0; - return false; + @action async getEthBalance() { + const { Web3Service: { web3 } } = this.rootStore; + console.log(await web3.eth.getBalance(this.address)); + this.balance = await web3.eth.getBalance(this.address); } set mnemonic(mnemonic) { From 6c79103573115f0b8270020109d294ea73181443 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 09:20:38 +0700 Subject: [PATCH 094/219] Working wallet recovering --- src/components/CreateWallet/index.js | 25 ++++++++++++------- src/components/InputSeed/index.js | 2 ++ src/stores/UserStore/UserStore.js | 24 ++++++++++++++---- ...81af21619eb692c643508fd721a704d11d562.json | 21 ++++++++++++++++ 4 files changed, 58 insertions(+), 14 deletions(-) create mode 100644 src/wallets/UTC--2019-11-1T2-20-18.236000000Z--b2281af21619eb692c643508fd721a704d11d562.json diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 0bea51ce..f43ac64d 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -32,18 +32,25 @@ class CreateWallet extends Component { createWallet = (form) => { const { userStore, recover } = this.props; - const { _mnemonic } = userStore; const values = form.values(); - const seed = _mnemonic.join(' '); this.setState({ loading: true }); - userStore.createWallet(values.password, seed).then(() => { - if (recover) { + console.log(userStore.encryptedWallet, values.password); + if (recover) { + userStore.recoverWallet(values.password).then((data) => { + console.log(data); + this.setState({ redirect: true }); userStore.saveWalletToFile(); - } - this.setState({ redirect: true }); - }).catch(() => { - this.setState({ loading: false }); - }); + }).catch(() => { + this.setState({ loading: false }); + }); + } else { + userStore.createWallet(values.password).then((data) => { + console.log(data); + this.setState({ redirect: true }); + }).catch(() => { + this.setState({ loading: false }); + }); + } } render() { diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 93b3db68..94885e90 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -50,6 +50,8 @@ class InputSeed extends Component { hooks: { onSuccess(form) { const values = Object.values(form.values()); + console.log(values); + userStore._mnemonic = values; const mnemonic = values.join(' '); toggleLoading(); if (recover) { diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index e18355f4..f267bdd8 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -16,7 +16,7 @@ class UserStore { @observable privateKey = ''; - @observable _mnemonic = ['spray', 'trap', 'flush', 'awful', 'before', 'prosper', 'gold', 'typical', 'siege', 'mule', 'great', 'bone']; + @observable _mnemonic = Array(12); @observable _mnemonicRepeat = []; @@ -60,6 +60,24 @@ class UserStore { }); } + @action recoverWallet(password) { + const seed = this._mnemonic.join(' '); + return new Promise((resolve, reject) => { + this.rootStore.walletService.createWallet(password, seed).then((data) => { + if (data.v3wallet) { + const { v3wallet, mnemonic, privateKey } = data; + this.setEncryptedWallet(v3wallet); + this._mnemonic = mnemonic.split(' '); + this.privateKey = privateKey; + // eslint-disable-next-line no-console + resolve(data); + } else { + reject(new Error('Error on creating wallet')); + } + }); + }); + } + @action login(password) { this.logging = true; this.readWallet(password).then((buffer) => { @@ -85,10 +103,6 @@ class UserStore { }); } - @action recoverWallet(mnemonic) { - return this.rootStore.walletService.recoverWallet(mnemonic); - } - @action saveWalletToFile() { const { walletService } = this.rootStore; walletService.writeWalletToFile(this.encryptedWallet); diff --git a/src/wallets/UTC--2019-11-1T2-20-18.236000000Z--b2281af21619eb692c643508fd721a704d11d562.json b/src/wallets/UTC--2019-11-1T2-20-18.236000000Z--b2281af21619eb692c643508fd721a704d11d562.json new file mode 100644 index 00000000..2ef31990 --- /dev/null +++ b/src/wallets/UTC--2019-11-1T2-20-18.236000000Z--b2281af21619eb692c643508fd721a704d11d562.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "d405d6fb-fefb-4251-8253-e962b736119f", + "address": "b2281af21619eb692c643508fd721a704d11d562", + "crypto": { + "ciphertext": "ba6802fbc2e16930c562c63f95f76f68c4d9c35104d2de29e0c5cab73db94a07", + "cipherparams": { + "iv": "ca3ffc77e7c80d0da8c7c418547c54d9" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "0246aa2c349be84fd7c2a98bc04ff24d4c13bbe997bab9ed04443e228c89b143", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "b2b77d83914a77b809e447cbedaca267264acbda4cd1908e2265162619c58c66" + } +} \ No newline at end of file From 3af1e5202e8362d1026a946346065f9a59bb8161 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 15:30:18 +0700 Subject: [PATCH 095/219] Form validation rules --- src/stores/FormsStore/ConnectProject.js | 4 ++-- src/stores/FormsStore/ConnectToken.js | 2 +- src/stores/FormsStore/CreateProject.js | 2 +- src/stores/FormsStore/CreateWalletForm.js | 2 +- src/stores/FormsStore/LoginForm.js | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js index 299d4598..5809999a 100644 --- a/src/stores/FormsStore/ConnectProject.js +++ b/src/stores/FormsStore/ConnectProject.js @@ -12,13 +12,13 @@ class ConnectProjectForm extends ExtendedForm { type: 'text', label: 'Project Name', placeholder: 'Придумайте название проекта', - rules: 'required|string', + rules: 'required|string|between:3,10', }, { name: 'address', type: 'text', label: 'Token Address', placeholder: 'Введите адрес контракта', - rules: 'required|string|between:42,42', + rules: 'required|string|regex:/(0x)+([0-9 a-f A-F]){40}/g', }], }; } diff --git a/src/stores/FormsStore/ConnectToken.js b/src/stores/FormsStore/ConnectToken.js index 04ce6fa6..f719428c 100644 --- a/src/stores/FormsStore/ConnectToken.js +++ b/src/stores/FormsStore/ConnectToken.js @@ -12,7 +12,7 @@ class ConnectTokenForm extends ExtendedForm { type: 'text', label: 'Token Address', placeholder: 'Введите адрес контракта', - rules: 'required|string|between:42,42', + rules: 'required|string|regex:/(0x)+([0-9 a-f A-F]){40}/g', }], }; } diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js index 91468937..cfad7a39 100644 --- a/src/stores/FormsStore/CreateProject.js +++ b/src/stores/FormsStore/CreateProject.js @@ -18,7 +18,7 @@ class СreateProjectForm extends ExtendedForm { type: 'password', label: 'Password', placeholder: 'Введите пароль', - rules: 'required|string|between:5,25', + rules: 'required|string', }], }; } diff --git a/src/stores/FormsStore/CreateWalletForm.js b/src/stores/FormsStore/CreateWalletForm.js index 8239bd88..df5b5fde 100644 --- a/src/stores/FormsStore/CreateWalletForm.js +++ b/src/stores/FormsStore/CreateWalletForm.js @@ -12,7 +12,7 @@ class CreateWalletForm extends ExtendedForm { type: 'password', label: 'Password', placeholder: 'Введите пароль', - rules: 'required|string|between:5,25', + rules: 'required|string|regex:/(?=(?=.*[!&$%&? "])+(?=[a-z]*[A-Z])+(?=[^0-9]*[0-9])).{6,}/g', }, { name: 'passwordConfirm', type: 'password', diff --git a/src/stores/FormsStore/LoginForm.js b/src/stores/FormsStore/LoginForm.js index 935e0ae7..a028cd48 100644 --- a/src/stores/FormsStore/LoginForm.js +++ b/src/stores/FormsStore/LoginForm.js @@ -11,7 +11,8 @@ class LoginForm extends ExtendedForm { type: 'password', label: 'Password', placeholder: 'Введите пароль', - rules: 'required|string|same:password', + rules: 'required|string', + error: 'Проверьте правильность ввода', }], }; } From 13b03962b0ee0cab135f201336a47aeb292adc02 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 15:31:01 +0700 Subject: [PATCH 096/219] Displaying errors when something goes wrong --- src/components/AddExisitingProject/index.js | 10 ++++-- src/components/Alert/Alert.scss | 2 ++ src/components/Alert/index.js | 15 ++++---- .../CreateNewProjectWithoutTokens/index.js | 31 ++++++++--------- src/components/CreateWallet/index.js | 30 ++++++++-------- src/components/CreationAlert/index.js | 11 +++--- src/components/DisplayUserInfo/index.js | 4 +-- src/components/Dropdown/index.js | 30 +++++++++++++++- src/components/Input/index.js | 2 +- src/components/InputSeed/index.js | 34 +++++++++++-------- src/components/Login/index.js | 5 ++- src/components/ProjectUploading/index.js | 2 +- src/components/Router/SimpleRouter.js | 1 + src/components/User/index.js | 2 +- src/index.js | 4 +++ .../ContractService/ContractService.js | 2 +- src/stores/AppStore/AppStore.js | 22 ++++++++++-- src/stores/UserStore/UserStore.js | 5 ++- ...81af21619eb692c643508fd721a704d11d562.json | 21 ------------ 19 files changed, 137 insertions(+), 96 deletions(-) delete mode 100644 src/wallets/UTC--2019-11-1T2-20-18.236000000Z--b2281af21619eb692c643508fd721a704d11d562.json diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 08ca2430..471a1ad2 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -39,11 +39,15 @@ class AddExistingProject extends Component { appStore.addProjectToList({ name, address }); }) .catch(() => { - + appStore.displayAlert('Произошла ошибка, попробуйте еще раз', 3000); + this.state = { + step: 'default', + }; }); } render() { + const { appStore } = this.props; const { step } = this.state; const { connectProject } = this; @@ -52,8 +56,8 @@ class AddExistingProject extends Component { onSuccess(form) { connectProject(form); }, - onError(form) { - console.log(`ALARM ${form}`); + onError() { + appStore.displayAlert('Произошла ошибка, проверьте корректность адреса', 3000); }, }, }); diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index 2819d633..4bc7b9ba 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -14,12 +14,14 @@ border-radius: 2px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); transform: translateX(-50%); + transition: .3s ease-in-out; & > svg { flex-shrink: 0; margin-right: 10px; vertical-align: middle; } &__text { + margin-right: 20px; font-size: 14px; line-height: 16px; vertical-align: middle; diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js index 42b231fd..c5bd3f2b 100644 --- a/src/components/Alert/index.js +++ b/src/components/Alert/index.js @@ -1,22 +1,25 @@ +/* eslint-disable jsx-a11y/click-events-have-key-events */ +/* eslint-disable jsx-a11y/no-static-element-interactions */ import React from 'react'; import propTypes from 'prop-types'; +import { observer, inject } from 'mobx-react'; import { IconInfo, CloseIcon } from '../Icons'; import styles from './Alert.scss'; -const Alert = ({ children, visible }) => ( -
+const Alert = inject('appStore')(observer(({ appStore }) => ( +
- {children} + {appStore.alertText} - + { appStore.closeAlert(); }}>
-); +))); Alert.propTypes = { - visible: propTypes.bool.isRequired, + appStore: propTypes.object.isRequired, children: propTypes.string.isRequired, }; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 076271c8..dffab139 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -49,22 +49,16 @@ class CreateNewProjectWithoutTokens extends Component { const { name, symbol, count, password, } = form.values(); - - console.log(form.values()); - - const deployArgs = [name, symbol, count]; - + const deployArgs = [name, symbol, Number(count)]; userStore.readWallet(password) .then((buffer) => { - console.log(buffer); if (!(buffer instanceof Error)) { - console.log('Погнали деплоить'); appStore.deployContract('ERC20', deployArgs, password).then((hash) => { // eslint-disable-next-line no-unused-vars const interval = setInterval(() => { // eslint-disable-next-line consistent-return appStore.checkReceipt(hash).then((receipt) => { - if (typeof receipt === 'object') { + if (receipt) { this.setState({ tokenAddr: receipt.contractAddress, position: 'tokenCreated', @@ -75,12 +69,13 @@ class CreateNewProjectWithoutTokens extends Component { }); }, 5000); }); - } else { - this.setState({ - position: 'token', - step: 1, - }); } + }).catch(() => { + this.setState({ + position: 'token', + step: 1, + }); + appStore.displayAlert('Неверный пароль, попробуйте еще раз', 3000); }); } @@ -109,10 +104,12 @@ class CreateNewProjectWithoutTokens extends Component { position: 'projectInfo', step: 2, }); + appStore.displayAlert('Ошибка, попробуйте еще раз', 3000); }); } render() { + const { appStore } = this.props; const { position, step } = this.state; if (position === 'uploading') return ; const { createToken, gotoUploading } = this; @@ -121,8 +118,8 @@ class CreateNewProjectWithoutTokens extends Component { onSuccess(form) { createToken(form); }, - onError(form) { - console.log(form); + onError() { + appStore.displayAlert('Проверьте правильность заполнения полей', 3000); }, }, }); @@ -131,8 +128,8 @@ class CreateNewProjectWithoutTokens extends Component { onSuccess(form) { gotoUploading(form); }, - onError(form) { - console.log(form); + onError() { + appStore.displayAlert('Проверьте правильность заполнения полей', 3000); }, }, }); diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index f43ac64d..1b21ef02 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -36,16 +36,14 @@ class CreateWallet extends Component { this.setState({ loading: true }); console.log(userStore.encryptedWallet, values.password); if (recover) { - userStore.recoverWallet(values.password).then((data) => { - console.log(data); + userStore.recoverWallet(values.password).then(() => { this.setState({ redirect: true }); userStore.saveWalletToFile(); }).catch(() => { this.setState({ loading: false }); }); } else { - userStore.createWallet(values.password).then((data) => { - console.log(data); + userStore.createWallet(values.password).then(() => { this.setState({ redirect: true }); }).catch(() => { this.setState({ loading: false }); @@ -62,36 +60,31 @@ class CreateWallet extends Component { onSuccess(form) { createWallet(form); }, - onError(form) { - console.log(form); + onError() { + }, }, }); if (redirect) { - return recover ? : ; + return recover ? : ; } return (
{!loading - ? + ? : } - - - - Назад - - +
); } } -const PasswordForm = ({ form }) => ( +const PasswordForm = ({ form, state }) => ( {'Создание пароля'} @@ -138,6 +131,12 @@ const PasswordForm = ({ form }) => (
+ + + + Назад + + ); @@ -158,6 +157,7 @@ CreateWallet.propTypes = { PasswordForm.propTypes = { form: propTypes.object.isRequired, + state: propTypes.bool.isRequired, }; export default CreateWallet; diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 6d2dc6e3..78a91601 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -10,16 +10,16 @@ import Heading from '../Heading'; import styles from '../Login/Login.scss'; -const CreationAlert = ({ success = false }) => ( +const CreationAlert = ({ success = false, recover = false }) => (
- {'Создание кошелька'} - {success - ? 'Кошелек создан успешно' - : 'Произошла ошибка, попробуйте еще раз'} + {success ? 'Создание кошелька' : ''} + {success ? 'Кошелек успешно создан' : ''} + {recover ? 'Восстановление кошелька' : ''} + {recover ? 'Кошелек успешно восстанолен' : ''} +
+
+ +

+ Пароль задается на английской раскладке +
+ И должен содержать: +

+

+

    +
  • + + {' '} + цифру + {' '} +
  • +
  • + + {' '} + заглавную букву + {' '} +
  • +
  • + + {' '} + спецсимвол +
  • +
  • + + {' '} + не менее 6 знаков +
  • +
+

+
+
+ + + + + Назад + + + + + ); + } +} + +PasswordForm.propTypes = { + state: propTypes.bool.isRequired, + form: propTypes.func.isRequired, +}; +export default PasswordForm; diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 739bc335..6c52280b 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -3,21 +3,18 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; -import { NavLink, Redirect } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import Container from '../Container'; import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; -import { Password, BackIcon } from '../Icons'; -import Input from '../Input'; -import { Button, IconButton } from '../Button'; import Loader from '../Loader'; -import Explanation from '../Explanation'; -import Indicator from '../Indicator'; -import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; - import styles from '../Login/Login.scss'; +import PasswordForm from './PasswordForm'; +import passwordValidation from '../../utils/PasswordValidation'; +import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; + @inject('userStore', 'appStore') @observer @@ -56,7 +53,7 @@ class CreateWallet extends Component { const { recover } = this.props; const { redirect, loading } = this.state; const { createWallet } = this; - const CreateForm = new CreateWalletForm({ + const createForm = new CreateWalletForm({ hooks: { onSuccess(form) { createWallet(form); @@ -67,7 +64,6 @@ class CreateWallet extends Component { }, }); - if (redirect) { return recover ? : ; } @@ -78,9 +74,10 @@ class CreateWallet extends Component { {!loading ? ( ) : } @@ -92,63 +89,6 @@ class CreateWallet extends Component { } } -const PasswordForm = ({ - form, state, -}) => ( - - - {'Создание пароля'} - {'Будет использоваться для входа в кошелек и подтверждения транзакций'} - -
- - - - - - -
- -
-
- -

- Пароль задается на английской раскладке -
- И должен содержать: -

-

-

    -
  • - - {' '} - цифру - {' '} -
  • -
  • - - {' '} - заглавную букву - {' '} -
  • -
  • - - {' '} - спецсимвол -
  • -
-

-
-
- - - - - Назад - - -
-); const CreationLoader = () => ( @@ -165,9 +105,5 @@ CreateWallet.propTypes = { recover: propTypes.bool.isRequired, }; -PasswordForm.propTypes = { - form: propTypes.object.isRequired, - state: propTypes.bool.isRequired, -}; export default CreateWallet; diff --git a/src/components/Input/index.js b/src/components/Input/index.js index cae4c57c..63626797 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -8,8 +8,9 @@ import styles from './Input.scss'; @observer class Input extends Component { handleOnChange = (e) => { - const { field } = this.props; + const { field, onInput } = this.props; field.onChange(e); + onInput(field.value); } render() { From c8aee3ef397a22ccc4f0ffe58e001e7d15c95f2e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 17:59:59 +0700 Subject: [PATCH 099/219] Small improvements --- .gitignore | 3 +- package-lock.json | 8041 ++++++++++++++++++++++------------------ package.json | 16 +- src/constants/index.js | 18 +- src/electron.js | 6 +- 5 files changed, 4456 insertions(+), 3628 deletions(-) diff --git a/.gitignore b/.gitignore index e09ea8c6..b72a12a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ docs/ -build/ \ No newline at end of file +build/ +dist/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0501e561..3b0df9e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "7zip-bin": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.0.3.tgz", - "integrity": "sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-4.1.0.tgz", + "integrity": "sha512-AsnBZN3a8/JcNt+KPkGGODaA4c7l3W5+WpeKgGSbstSLxqWtTXqd1ieJGBQ8IFCtRg8DmmKUcSkIkUc0A4p3YA==", "dev": true }, "@babel/code-frame": { @@ -19,18 +19,18 @@ } }, "@babel/core": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.4.tgz", - "integrity": "sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", + "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.4", - "@babel/helpers": "^7.6.2", - "@babel/parser": "^7.6.4", - "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.3", - "@babel/types": "^7.6.3", - "convert-source-map": "^1.1.0", + "@babel/generator": "^7.7.2", + "@babel/helpers": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.7.2", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", "json5": "^2.1.0", "lodash": "^4.17.13", @@ -40,156 +40,166 @@ } }, "@babel/generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", - "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", "requires": { - "@babel/types": "^7.6.3", + "@babel/types": "^7.7.2", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz", + "integrity": "sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.0.tgz", + "integrity": "sha512-Cd8r8zs4RKDwMG/92lpZcnn5WPQ3LAMQbCw42oqUh4s7vsSN5ANUZjMel0OOnxDLq57hoDDbai+ryygYfCTOsw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-explode-assignable-expression": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-builder-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz", - "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.0.tgz", + "integrity": "sha512-LSln3cexwInTMYYoFeVLKnYPPMfWNJ8PubTBs3hkh7wCu9iBaqq1OOyW+xGmEdLxT1nhsl+9SJ+h2oUDYz0l2A==", "requires": { - "@babel/types": "^7.3.0", + "@babel/types": "^7.7.0", "esutils": "^2.0.0" } }, "@babel/helper-call-delegate": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", - "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.0.tgz", + "integrity": "sha512-Su0Mdq7uSSWGZayGMMQ+z6lnL00mMCnGAbO/R0ZO9odIdB/WNU/VfQKqMQU0fdIsxQYbRjDM4BixIa93SQIpvw==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/helper-hoist-variables": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz", - "integrity": "sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.0.tgz", + "integrity": "sha512-MZiB5qvTWoyiFOgootmRSDV1udjIqJW/8lmxgzKq6oDqxdmHUjeP2ZUOmgHdYjmUVNABqRrHjYAYRvj8Eox/UA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-member-expression-to-functions": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4" + "@babel/helper-replace-supers": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.2.tgz", + "integrity": "sha512-pAil/ZixjTlrzNpjx+l/C/wJk002Wo7XbbZ8oujH/AoJ3Juv0iN/UTcPUHXKMFLqsfS0Hy6Aow8M31brUYBlQQ==", + "dev": true, + "requires": { + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.6.0" } }, "@babel/helper-define-map": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", - "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz", + "integrity": "sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.5.5", + "@babel/helper-function-name": "^7.7.0", + "@babel/types": "^7.7.0", "lodash": "^4.17.13" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.0.tgz", + "integrity": "sha512-CDs26w2shdD1urNUAji2RJXyBFCaR+iBEGnFz3l7maizMkQe3saVw9WtjG1tz8CwbjvlFnaSLVhgnu1SWaherg==", "dev": true, "requires": { - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-hoist-variables": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", - "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz", + "integrity": "sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ==", "dev": true, "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", - "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz", + "integrity": "sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA==", "dev": true, "requires": { - "@babel/types": "^7.5.5" + "@babel/types": "^7.7.0" } }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz", + "integrity": "sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-module-transforms": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", - "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz", + "integrity": "sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/template": "^7.4.4", - "@babel/types": "^7.5.5", + "@babel/helper-module-imports": "^7.7.0", + "@babel/helper-simple-access": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0", "lodash": "^4.17.13" } }, "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz", + "integrity": "sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-plugin-utils": { @@ -207,68 +217,68 @@ } }, "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.0.tgz", + "integrity": "sha512-pHx7RN8X0UNHPB/fnuDnRXVZ316ZigkO8y8D835JlZ2SSdFKb6yH9MIYRU4fy/KPe5sPHDFOPvf8QLdbAGGiyw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-wrap-function": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.7.0", + "@babel/helper-wrap-function": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-replace-supers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", - "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz", + "integrity": "sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/helper-member-expression-to-functions": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz", + "integrity": "sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g==", "dev": true, "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" } }, "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz", + "integrity": "sha512-sd4QjeMgQqzshSjecZjOp8uKfUtnpmCyQhKQrVJBBgeHAB/0FPi33h3AbVlVp07qQtMD4QgYSzaMI7VwncNK/w==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.2.0" + "@babel/helper-function-name": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helpers": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.2.tgz", - "integrity": "sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", "requires": { - "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.2", - "@babel/types": "^7.6.0" + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/highlight": { @@ -282,46 +292,46 @@ } }, "@babel/parser": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", - "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==" + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz", + "integrity": "sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0", + "@babel/helper-remap-async-to-generator": "^7.7.0", "@babel/plugin-syntax-async-generators": "^7.2.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", - "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.0.tgz", + "integrity": "sha512-tufDcFA1Vj+eWvwHN+jvMN6QsV5o+vUlytNKrbMiCeDL0F2j92RURzUsUMWE5EJkLyWxjdUslCsMQa9FWth16A==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.5.5", + "@babel/helper-create-class-features-plugin": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-proposal-decorators": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.6.0.tgz", - "integrity": "sha512-ZSyYw9trQI50sES6YxREXKu+4b7MAg6Qx2cvyDDYjP2Hpzd3FleOUwC9cqn1+za8d0A2ZU8SHujxFao956efUg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.7.0.tgz", + "integrity": "sha512-dMCDKmbYFQQTn1+VJjl5hbqlweuHl5oDeMU9B1Q7oAWi0mHxjQQDHdJIK6iW76NE1KJT3zA6dDU3weR1WT5D4A==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.6.0", + "@babel/helper-create-class-features-plugin": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-decorators": "^7.2.0" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz", - "integrity": "sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.0.tgz", + "integrity": "sha512-7poL3Xi+QFPC7sGAzEIbXUyYzGJwbc2+gSD0AkiC5k52kH2cqHdqxm5hNFfLW3cRSTcx9bN0Fl7/6zWcLLnKAQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -359,14 +369,13 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz", - "integrity": "sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz", + "integrity": "sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-syntax-async-generators": { @@ -397,9 +406,9 @@ } }, "@babel/plugin-syntax-flow": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz", - "integrity": "sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.0.tgz", + "integrity": "sha512-vQMV07p+L+jZeUnvX3pEJ9EiXGCjB5CTTvsirFD9rpEuATnoAvLBLoYbw1v5tyn3d2XxSuvEKi8cV3KqYUa0vQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -440,6 +449,15 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.0.tgz", + "integrity": "sha512-hi8FUNiFIY1fnUI2n1ViB1DR0R4QeK4iHcTlW6aJkrPoTdb8Rf1EMQ6GT3f67DDkYyWgew9DFoOZ6gOoEsdzTA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, "@babel/plugin-syntax-typescript": { "version": "7.3.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz", @@ -459,14 +477,14 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", - "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz", + "integrity": "sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-module-imports": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0" + "@babel/helper-remap-async-to-generator": "^7.7.0" } }, "@babel/plugin-transform-block-scoped-functions": { @@ -489,18 +507,18 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", - "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz", + "integrity": "sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-annotate-as-pure": "^7.7.0", + "@babel/helper-define-map": "^7.7.0", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/helper-replace-supers": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", "globals": "^11.1.0" } }, @@ -523,14 +541,13 @@ } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz", - "integrity": "sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.0.tgz", + "integrity": "sha512-3QQlF7hSBnSuM1hQ0pS3pmAbWLax/uGNCbPBND9y+oJ4Y776jsyujG2k0Sn2Aj2a0QwVOiOFL5QVPA7spjvzSA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-duplicate-keys": { @@ -572,12 +589,12 @@ } }, "@babel/plugin-transform-function-name": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", - "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz", + "integrity": "sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.1.0", + "@babel/helper-function-name": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -611,45 +628,45 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz", - "integrity": "sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz", + "integrity": "sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.4.4", + "@babel/helper-module-transforms": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-simple-access": "^7.7.0", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz", - "integrity": "sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.0.tgz", + "integrity": "sha512-ZAuFgYjJzDNv77AjXRqzQGlQl4HdUM6j296ee4fwKVZfhDR9LAGxfvXjBkb06gNETPnN0sLqRm9Gxg4wZH6dXg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.4", + "@babel/helper-hoist-variables": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", - "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.0.tgz", + "integrity": "sha512-u7eBA03zmUswQ9LQ7Qw0/ieC1pcAkbp5OQatbWUzY1PaBccvuJXUkYzoN1g7cqp7dbTu6Dp9bXyalBvD04AANA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-module-transforms": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz", - "integrity": "sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.0.tgz", + "integrity": "sha512-+SicSJoKouPctL+j1pqktRVCgy+xAch1hWWTMy13j0IflnyNjaoskj+DwRQFimHbLqO3sq2oN2CXMvXq3Bgapg==", "dev": true, "requires": { - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.7.0" } }, "@babel/plugin-transform-new-target": { @@ -710,11 +727,11 @@ } }, "@babel/plugin-transform-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz", - "integrity": "sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.0.tgz", + "integrity": "sha512-mXhBtyVB1Ujfy+0L6934jeJcSXj/VCg6whZzEcgiiZHNS0PGC7vUCsZDQCxxztkpIdF+dY1fUMcjAgEOC3ZOMQ==", "requires": { - "@babel/helper-builder-react-jsx": "^7.3.0", + "@babel/helper-builder-react-jsx": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-jsx": "^7.2.0" } @@ -738,9 +755,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", - "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz", + "integrity": "sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg==", "dev": true, "requires": { "regenerator-transform": "^0.14.0" @@ -815,31 +832,30 @@ } }, "@babel/plugin-transform-typescript": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.6.3.tgz", - "integrity": "sha512-aiWINBrPMSC3xTXRNM/dfmyYuPNKY/aexYqBgh0HBI5Y+WO5oRAqW/oROYeYHrF4Zw12r9rK4fMk/ZlAmqx/FQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.7.2.tgz", + "integrity": "sha512-UWhDaJRqdPUtdK1s0sKYdoRuqK0NepjZto2UZltvuCgMoMZmdjhgz5hcRokie/3aYEaSz3xvusyoayVaq4PjRg==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.6.0", + "@babel/helper-create-class-features-plugin": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-typescript": "^7.2.0" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz", - "integrity": "sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz", + "integrity": "sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/polyfill": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.6.0.tgz", - "integrity": "sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.7.0.tgz", + "integrity": "sha512-/TS23MVvo34dFmf8mwCisCbWGrfhbiWZSwBo6HkADTBhUa2Q/jWltyY/tpofz/b6/RIhqaqQcquptCirqIhOaQ==", "dev": true, "requires": { "core-js": "^2.6.5", @@ -855,56 +871,57 @@ } }, "@babel/preset-env": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.3.tgz", - "integrity": "sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.1.tgz", + "integrity": "sha512-/93SWhi3PxcVTDpSqC+Dp4YxUu3qZ4m7I76k0w73wYfn7bGVuRIO4QUz95aJksbS+AD1/mT1Ie7rbkT0wSplaA==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-module-imports": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-dynamic-import": "^7.5.0", + "@babel/plugin-proposal-async-generator-functions": "^7.7.0", + "@babel/plugin-proposal-dynamic-import": "^7.7.0", "@babel/plugin-proposal-json-strings": "^7.2.0", "@babel/plugin-proposal-object-rest-spread": "^7.6.2", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.6.2", + "@babel/plugin-proposal-unicode-property-regex": "^7.7.0", "@babel/plugin-syntax-async-generators": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-syntax-top-level-await": "^7.7.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.5.0", + "@babel/plugin-transform-async-to-generator": "^7.7.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", "@babel/plugin-transform-block-scoping": "^7.6.3", - "@babel/plugin-transform-classes": "^7.5.5", + "@babel/plugin-transform-classes": "^7.7.0", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.6.0", - "@babel/plugin-transform-dotall-regex": "^7.6.2", + "@babel/plugin-transform-dotall-regex": "^7.7.0", "@babel/plugin-transform-duplicate-keys": "^7.5.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", "@babel/plugin-transform-for-of": "^7.4.4", - "@babel/plugin-transform-function-name": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.7.0", "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-member-expression-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.5.0", - "@babel/plugin-transform-modules-commonjs": "^7.6.0", - "@babel/plugin-transform-modules-systemjs": "^7.5.0", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.3", + "@babel/plugin-transform-modules-commonjs": "^7.7.0", + "@babel/plugin-transform-modules-systemjs": "^7.7.0", + "@babel/plugin-transform-modules-umd": "^7.7.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.0", "@babel/plugin-transform-new-target": "^7.4.4", "@babel/plugin-transform-object-super": "^7.5.5", "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.5", + "@babel/plugin-transform-regenerator": "^7.7.0", "@babel/plugin-transform-reserved-words": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.6.2", "@babel/plugin-transform-sticky-regex": "^7.2.0", "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.6.2", - "@babel/types": "^7.6.3", + "@babel/plugin-transform-unicode-regex": "^7.7.0", + "@babel/types": "^7.7.1", "browserslist": "^4.6.0", "core-js-compat": "^3.1.1", "invariant": "^2.2.2", @@ -923,13 +940,13 @@ } }, "@babel/preset-react": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.6.3.tgz", - "integrity": "sha512-07yQhmkZmRAfwREYIQgW0HEwMY9GBJVuPY4Q12UC72AbfaawuupVWa8zQs2tlL+yun45Nv/1KreII/0PLfEsgA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.7.0.tgz", + "integrity": "sha512-IXXgSUYBPHUGhUkH+89TR6faMcBtuMW0h5OHbMuVbL3/5wK2g6a2M2BBpkLa+Kw0sAHiZ9dNVgqJMDP/O4GRBA==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.7.0", "@babel/plugin-transform-react-jsx-self": "^7.0.0", "@babel/plugin-transform-react-jsx-source": "^7.0.0" } @@ -950,43 +967,43 @@ } }, "@babel/runtime": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz", - "integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", "requires": { "regenerator-runtime": "^0.13.2" } }, "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0" + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/traverse": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", - "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.3", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.6.3", - "@babel/types": "^7.6.3", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", - "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -1003,45 +1020,6 @@ "minimist": "^1.2.0" } }, - "@develar/schema-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.1.0.tgz", - "integrity": "sha512-qjCqB4ctMig9Gz5bd6lkdFr3bO6arOdQqptdBSpF1ZpCnjofieCciEzkoS9ujY9cMGyllYSCSmBJ3x9OKHXzoA==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "@electron/get": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.6.0.tgz", - "integrity": "sha512-xuvAzbN9iBApfAMvW0hKUpxHR5wPVbG9RaoSTbpu/WaHISDu0MVfMWYhfeU0X730CpBV0G2RkLgwAs9WDan3GA==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "env-paths": "^2.2.0", - "fs-extra": "^8.1.0", - "global-agent": "^2.0.2", - "global-tunnel-ng": "^2.7.1", - "got": "^9.6.0", - "sanitize-filename": "^1.6.2", - "sumchecker": "^3.0.0" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, "@emotion/cache": { "version": "10.0.19", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-10.0.19.tgz", @@ -1055,28 +1033,28 @@ } }, "@emotion/core": { - "version": "10.0.21", - "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.21.tgz", - "integrity": "sha512-U9zbc7ovZ2ceIwbLXYZPJy6wPgnOdTNT4jENZ31ee6v2lojetV5bTbCVk6ciT8G3wQRyVaTTfUCH9WCrMzpRIw==", + "version": "10.0.22", + "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.22.tgz", + "integrity": "sha512-7eoP6KQVUyOjAkE6y4fdlxbZRA4ILs7dqkkm6oZUJmihtHv0UBq98VgPirq9T8F9K2gKu0J/au/TpKryKMinaA==", "dev": true, "requires": { "@babel/runtime": "^7.5.5", "@emotion/cache": "^10.0.17", - "@emotion/css": "^10.0.14", - "@emotion/serialize": "^0.11.10", + "@emotion/css": "^10.0.22", + "@emotion/serialize": "^0.11.12", "@emotion/sheet": "0.9.3", "@emotion/utils": "0.11.2" } }, "@emotion/css": { - "version": "10.0.14", - "resolved": "https://registry.npmjs.org/@emotion/css/-/css-10.0.14.tgz", - "integrity": "sha512-MozgPkBEWvorcdpqHZE5x1D/PLEHUitALQCQYt2wayf4UNhpgQs2tN0UwHYS4FMy5ROBH+0ALyCFVYJ/ywmwlg==", + "version": "10.0.22", + "resolved": "https://registry.npmjs.org/@emotion/css/-/css-10.0.22.tgz", + "integrity": "sha512-8phfa5mC/OadBTmGpMpwykIVH0gFCbUoO684LUkyixPq4F1Wwri7fK5Xlm8lURNBrd2TuvTbPUGxFsGxF9UacA==", "dev": true, "requires": { - "@emotion/serialize": "^0.11.8", + "@emotion/serialize": "^0.11.12", "@emotion/utils": "0.11.2", - "babel-plugin-emotion": "^10.0.14" + "babel-plugin-emotion": "^10.0.22" } }, "@emotion/hash": { @@ -1086,9 +1064,9 @@ "dev": true }, "@emotion/is-prop-valid": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.3.tgz", - "integrity": "sha512-We7VBiltAJ70KQA0dWkdPMXnYoizlxOXpvtjmu5/MBnExd+u0PGgV27WCYanmLAbCwAU30Le/xA0CQs/F/Otig==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.5.tgz", + "integrity": "sha512-6ZODuZSFofbxSbcxwsFz+6ioPjb0ISJRRPLZ+WIbjcU2IMU0Io+RGQjjaTgOvNQl007KICBm7zXQaYQEC1r6Bg==", "dev": true, "requires": { "@emotion/memoize": "0.7.3" @@ -1101,9 +1079,9 @@ "dev": true }, "@emotion/serialize": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-0.11.11.tgz", - "integrity": "sha512-YG8wdCqoWtuoMxhHZCTA+egL0RSGdHEc+YCsmiSBPBEDNuVeMWtjEWtGrhUterSChxzwnWBXvzSxIFQI/3sHLw==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-0.11.14.tgz", + "integrity": "sha512-6hTsySIuQTbDbv00AnUO6O6Xafdwo5GswRlMZ5hHqiFx+4pZ7uGWXUQFW46Kc2taGhP89uXMXn/lWQkdyTosPA==", "dev": true, "requires": { "@emotion/hash": "0.7.3", @@ -1120,24 +1098,24 @@ "dev": true }, "@emotion/styled": { - "version": "10.0.17", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-10.0.17.tgz", - "integrity": "sha512-zHMgWjHDMNjD+ux64POtDnjLAObniu3znxFBLSdV/RiEhSLjHIowfvSbbd/C33/3uwtI6Uzs2KXnRZtka/PpAQ==", + "version": "10.0.23", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-10.0.23.tgz", + "integrity": "sha512-gNr04eqBQ2iYUx8wFLZDfm3N8/QUOODu/ReDXa693uyQGy2OqA+IhPJk+kA7id8aOfwAsMuvZ0pJImEXXKtaVQ==", "dev": true, "requires": { - "@emotion/styled-base": "^10.0.17", - "babel-plugin-emotion": "^10.0.17" + "@emotion/styled-base": "^10.0.23", + "babel-plugin-emotion": "^10.0.23" } }, "@emotion/styled-base": { - "version": "10.0.19", - "resolved": "https://registry.npmjs.org/@emotion/styled-base/-/styled-base-10.0.19.tgz", - "integrity": "sha512-Sz6GBHTbOZoeZQKvkE9gQPzaJ6/qtoQ/OPvyG2Z/6NILlYk60Es1cEcTgTkm26H8y7A0GSgp4UmXl+srvsnFPg==", + "version": "10.0.24", + "resolved": "https://registry.npmjs.org/@emotion/styled-base/-/styled-base-10.0.24.tgz", + "integrity": "sha512-AnBImerf0h4dGAJVo0p0VE8KoAns71F28ErGFK474zbNAHX6yqSWQUasb+1jvg/VPwZjCp19+tAr6oOB0pwmLQ==", "dev": true, "requires": { "@babel/runtime": "^7.5.5", - "@emotion/is-prop-valid": "0.8.3", - "@emotion/serialize": "^0.11.11", + "@emotion/is-prop-valid": "0.8.5", + "@emotion/serialize": "^0.11.14", "@emotion/utils": "0.11.2" } }, @@ -1178,9 +1156,9 @@ "dev": true }, "@hapi/hoek": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.2.tgz", - "integrity": "sha512-NP5SG4bzix+EtSMtcudp8TvI0lB46mXNo8uFpTDw6tqxGx4z5yx+giIunEFA0Z7oUO4DuWrOJV9xqR2tJVEdyA==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.0.tgz", + "integrity": "sha512-7XYT10CZfPsH7j9F1Jmg1+d0ezOux2oM2GfArAzLwWe4mE2Dr3hVjsAL6+TFY49RRJlCdJDMw3nJsLFroTc8Kw==", "dev": true }, "@hapi/joi": { @@ -1213,14 +1191,6 @@ "@jest/source-map": "^24.9.0", "chalk": "^2.0.1", "slash": "^2.0.0" - }, - "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } } }, "@jest/core": { @@ -1257,29 +1227,6 @@ "rimraf": "^2.5.4", "slash": "^2.0.0", "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } } }, "@jest/environment": { @@ -1334,12 +1281,6 @@ "string-length": "^2.0.0" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1359,6 +1300,12 @@ "source-map": "^0.6.0" }, "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1414,12 +1361,6 @@ "write-file-atomic": "2.4.1" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1489,39 +1430,38 @@ "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" }, "@storybook/addons": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-5.2.4.tgz", - "integrity": "sha512-Q+bnVlBA308qnELxnh18hBDRSUgltR9KbV537285dUL/okv/NC6n51mxJwIaG+ksBW2wU+5e6tqSayaKF3uHLw==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-5.2.6.tgz", + "integrity": "sha512-5MF64lsAhIEMxTbVpYROz5Wez595iwSw45yXyP8gWt12d+EmFO5tdy7cYJCxcMuVhDfaCI78tFqS9orr1atVyA==", "dev": true, "requires": { - "@storybook/api": "5.2.4", - "@storybook/channels": "5.2.4", - "@storybook/client-logger": "5.2.4", - "@storybook/core-events": "5.2.4", + "@storybook/api": "5.2.6", + "@storybook/channels": "5.2.6", + "@storybook/client-logger": "5.2.6", + "@storybook/core-events": "5.2.6", "core-js": "^3.0.1", "global": "^4.3.2", "util-deprecate": "^1.0.2" } }, "@storybook/api": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/api/-/api-5.2.4.tgz", - "integrity": "sha512-KqAB+NkHIHdwu749NDP+7i44jy1bFgpq7GTJlG+sx/XLZHQveK/8yn109g9bXHFth7SvdXI1+9GA/apzwBU/Mw==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/api/-/api-5.2.6.tgz", + "integrity": "sha512-X/di44/SAL68mD6RHTX2qdWwhjRW6BgcfPtu0dMd38ErB3AfsfP4BITXs6kFOeSM8kWiaQoyuw0pOBzA8vlYug==", "dev": true, "requires": { - "@storybook/channels": "5.2.4", - "@storybook/client-logger": "5.2.4", - "@storybook/core-events": "5.2.4", - "@storybook/router": "5.2.4", - "@storybook/theming": "5.2.4", + "@storybook/channels": "5.2.6", + "@storybook/client-logger": "5.2.6", + "@storybook/core-events": "5.2.6", + "@storybook/router": "5.2.6", + "@storybook/theming": "5.2.6", "core-js": "^3.0.1", "fast-deep-equal": "^2.0.1", "global": "^4.3.2", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "memoizerific": "^1.11.3", "prop-types": "^15.6.2", "react": "^16.8.3", @@ -1541,50 +1481,56 @@ } }, "@storybook/channel-postmessage": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-5.2.4.tgz", - "integrity": "sha512-ic7/Ho8z2/aOMjoEbr5p8rijOfO3SZdJnwMvDdUxrqvYq7yACZWidPo3w2+iBwQi9HLqEsWesP1c2doJBxVGRw==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-5.2.6.tgz", + "integrity": "sha512-y+63wWiEc/Q4s4MZ3KJ//5A8j5VLufxuLvPxwv9FuS4z8lmN0fqeGJn857qIlFGbZhzsQaoRdmfsCQpBBgUneg==", "dev": true, "requires": { - "@storybook/channels": "5.2.4", - "@storybook/client-logger": "5.2.4", + "@storybook/channels": "5.2.6", + "@storybook/client-logger": "5.2.6", "core-js": "^3.0.1", "global": "^4.3.2", "telejson": "^3.0.2" } }, "@storybook/channels": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-5.2.4.tgz", - "integrity": "sha512-/r39yEZ5QiGdiq95DhXBypdBo7urkD3Sp1WDyK48uGkZ0gdHWSPy3BBy8OJhEhfNz7nVisTiVIBr4gIrubKDjw==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-5.2.6.tgz", + "integrity": "sha512-/UsktYsXuvb1efjVPCEivhh5ywRhm7hl73pQnpJLJHRqyLMM2I5nGPFELTTNuU9yWy7sP9QL5gRqBBPe1sqjZQ==", "dev": true, "requires": { "core-js": "^3.0.1" } }, "@storybook/client-api": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-5.2.4.tgz", - "integrity": "sha512-SOwzEFHoNapURhNqdcI7HA76o5tkWvs2+2s++i/S7xsAd3KyefIVDOdqSMlAxJkxZb8Mlrb3UNRxlrpA8SZqNA==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-5.2.6.tgz", + "integrity": "sha512-upynf4ER2fkThNnE+mBlfRFFJxTiOh60fho1ODFcBun9BbvRD2wOHLvw7+WigIhb99HM20vk8f2dhv3I5Udzlg==", "dev": true, "requires": { - "@storybook/addons": "5.2.4", - "@storybook/channel-postmessage": "5.2.4", - "@storybook/channels": "5.2.4", - "@storybook/client-logger": "5.2.4", - "@storybook/core-events": "5.2.4", - "@storybook/router": "5.2.4", + "@storybook/addons": "5.2.6", + "@storybook/channel-postmessage": "5.2.6", + "@storybook/channels": "5.2.6", + "@storybook/client-logger": "5.2.6", + "@storybook/core-events": "5.2.6", + "@storybook/router": "5.2.6", "common-tags": "^1.8.0", "core-js": "^3.0.1", "eventemitter3": "^4.0.0", "global": "^4.3.2", "is-plain-object": "^3.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "memoizerific": "^1.11.3", "qs": "^6.6.0", "util-deprecate": "^1.0.2" }, "dependencies": { + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "dev": true + }, "is-plain-object": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", @@ -1599,33 +1545,28 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", "dev": true - }, - "qs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz", - "integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA==", - "dev": true } } }, "@storybook/client-logger": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-5.2.4.tgz", - "integrity": "sha512-ofp6QQPQZBU+RvlAH5KpZRsfAFHecCZDnl/7YG6FwjHseJr3jHTYmBGGjJDMHFHq+Q7FGQu/yVb9lMFgoQ43QQ==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-5.2.6.tgz", + "integrity": "sha512-hJvPD267cCwLIRMOISjDH8h9wbwOcXIJip29UlJbU9iMtZtgE+YelmlpmZJvqcDfUiXWWrOh7tP76mj8EAfwIQ==", "dev": true, "requires": { "core-js": "^3.0.1" } }, "@storybook/components": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-5.2.4.tgz", - "integrity": "sha512-APhw+XGag0RTCRJ8eCWKVr8dLt9SRqnS8LtzcZJbokCYRxRTFzhmX2eVEE1v+d0gHib1/yh2COxOjMzv3m/rQA==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-5.2.6.tgz", + "integrity": "sha512-C7OS90bZ1ZvxlWUZ3B2MPFFggqAtUo7X8DqqS3IwsuDUiK9dD/KS0MwPgOuFDnOTW1R5XqmQd/ylt53w3s/U5g==", "dev": true, "requires": { - "@storybook/client-logger": "5.2.4", - "@storybook/theming": "5.2.4", + "@storybook/client-logger": "5.2.6", + "@storybook/theming": "5.2.6", "@types/react-syntax-highlighter": "10.1.0", + "@types/react-textarea-autosize": "^4.3.3", "core-js": "^3.0.1", "global": "^4.3.2", "markdown-to-jsx": "^6.9.1", @@ -1644,9 +1585,9 @@ } }, "@storybook/core": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-5.2.4.tgz", - "integrity": "sha512-r5kDgZETNawHxpsAPw+h+pRk6l/mJhsSHeDo9/OdYtYFW7lmk2gadViXOTM+6gIWc6vQ8y750bgkahmyIIY0nQ==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-5.2.6.tgz", + "integrity": "sha512-q7Ful7TCm9nmjgLsJFqIwVv395NlaOXgGajyaQCQlCKB2V+jgs7GDmdCNNdWAOue4eAsFU6wQSP9lWtq0yzK4w==", "dev": true, "requires": { "@babel/plugin-proposal-class-properties": "^7.3.3", @@ -1654,15 +1595,15 @@ "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-transform-react-constant-elements": "^7.2.0", "@babel/preset-env": "^7.4.5", - "@storybook/addons": "5.2.4", - "@storybook/channel-postmessage": "5.2.4", - "@storybook/client-api": "5.2.4", - "@storybook/client-logger": "5.2.4", - "@storybook/core-events": "5.2.4", - "@storybook/node-logger": "5.2.4", - "@storybook/router": "5.2.4", - "@storybook/theming": "5.2.4", - "@storybook/ui": "5.2.4", + "@storybook/addons": "5.2.6", + "@storybook/channel-postmessage": "5.2.6", + "@storybook/client-api": "5.2.6", + "@storybook/client-logger": "5.2.6", + "@storybook/core-events": "5.2.6", + "@storybook/node-logger": "5.2.6", + "@storybook/router": "5.2.6", + "@storybook/theming": "5.2.6", + "@storybook/ui": "5.2.6", "airbnb-js-shims": "^1 || ^2", "ansi-to-html": "^0.6.11", "autoprefixer": "^9.4.9", @@ -1719,10 +1660,16 @@ "webpack-hot-middleware": "^2.25.0" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "find-cache-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.0.0.tgz", - "integrity": "sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.1.0.tgz", + "integrity": "sha512-zw+EFiNBNPgI2NTrKkDd1xd7q0cs6wr/iWnr/oUkI0yF9K9GqQ+riIt4aiyFaaqpaWbxPrJXHI+QvmNUQbX+0Q==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -1775,6 +1722,15 @@ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", "dev": true }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, "p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -1784,6 +1740,12 @@ "p-limit": "^2.2.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1799,12 +1761,6 @@ "find-up": "^4.0.0" } }, - "qs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz", - "integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA==", - "dev": true - }, "regenerator-runtime": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", @@ -1836,18 +1792,18 @@ } }, "@storybook/core-events": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-5.2.4.tgz", - "integrity": "sha512-nQknCmaz2S2HW6PSGcuFzve7Y1Js2Cb268vUG0ZMNtJZwFawqYc+KSQHqmOY0pVm8dyROTcWCudPA0k+hk6N5Q==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-5.2.6.tgz", + "integrity": "sha512-W8kLJ7tc0aAxs11CPUxUOCReocKL4MYGyjTg8qwk0USLzPUb/FUQWmhcm2ilFz6Nz8dXLcKrXdRVYTmiMsgAeg==", "dev": true, "requires": { "core-js": "^3.0.1" } }, "@storybook/node-logger": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-5.2.4.tgz", - "integrity": "sha512-4OOzce02IAfrRv+Y7h3icyw6WIuDekpWF2eYjgYVVvAJYklCEwgeBTBCY0/2TJjPPTBDPUKHVP1Bdz3Vpci9pA==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-5.2.6.tgz", + "integrity": "sha512-Z3mn9CUSiG7kR2OBoz4lNeoeBS094h5d9wufZSp5S+M47L6KEXmTgNcuePKj+t8Z8KT/Ph8B63bjChseKp3DNw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -1866,17 +1822,17 @@ } }, "@storybook/react": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/react/-/react-5.2.4.tgz", - "integrity": "sha512-AO0qwbD/2UGe5CrVizbaek+gCAPWkPVc0KUk38cT1mcuLpXwt1zZe7iHLQf2zOeBVSiBkPLOHrEtzDfnIJXKFQ==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-5.2.6.tgz", + "integrity": "sha512-yzhxxuoUx4jwn+PymU5wemzLb9ryXD9Y2Dv5kipCDkUS4cqDJwKcVO8tyhMigFUGTHREmJTmAESCKKPDR45SiQ==", "dev": true, "requires": { "@babel/plugin-transform-react-constant-elements": "^7.2.0", "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.0.0", - "@storybook/addons": "5.2.4", - "@storybook/core": "5.2.4", - "@storybook/node-logger": "5.2.4", + "@storybook/addons": "5.2.6", + "@storybook/core": "5.2.6", + "@storybook/node-logger": "5.2.6", "@svgr/webpack": "^4.0.3", "@types/webpack-env": "^1.13.7", "babel-plugin-add-react-displayname": "^0.0.5", @@ -1886,7 +1842,7 @@ "common-tags": "^1.8.0", "core-js": "^3.0.1", "global": "^4.3.2", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "mini-css-extract-plugin": "^0.7.0", "prop-types": "^15.7.2", "react-dev-utils": "^9.0.0", @@ -1910,37 +1866,29 @@ } }, "@storybook/router": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/router/-/router-5.2.4.tgz", - "integrity": "sha512-GL7eGdj5oYST0mE9fThJB9ye9tTTgrP+aP3okZ6MeMGtNytb7bmJRpAD2E4ouuPTQVppyHI5re8g/HUxUNOT1g==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/router/-/router-5.2.6.tgz", + "integrity": "sha512-/FZd3fYg5s2QzOqSIP8UMOSnCIFFIlli/jKlOxvm3WpcpxgwQOY4lfHsLO+r9ThCLs2UvVg2R/HqGrOHqDFU7A==", "dev": true, "requires": { "@reach/router": "^1.2.1", "@types/reach__router": "^1.2.3", "core-js": "^3.0.1", "global": "^4.3.2", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "memoizerific": "^1.11.3", "qs": "^6.6.0" - }, - "dependencies": { - "qs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz", - "integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA==", - "dev": true - } } }, "@storybook/theming": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-5.2.4.tgz", - "integrity": "sha512-2ZlqBrmnm8N0352Fnu2+GB3pEsHL4Eb2eKxV0VLLgkjJuAlm7CK6+I/e4ZknQWxwYm2pQj1y6ta68A62fGBYyA==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-5.2.6.tgz", + "integrity": "sha512-Xa9R/H8DDgmvxsCHloJUJ2d9ZQl80AeqHrL+c/AKNpx05s9lV74DcinusCf0kz72YGUO/Xt1bAjuOvLnAaS8Gw==", "dev": true, "requires": { "@emotion/core": "^10.0.14", "@emotion/styled": "^10.0.14", - "@storybook/client-logger": "5.2.4", + "@storybook/client-logger": "5.2.6", "common-tags": "^1.8.0", "core-js": "^3.0.1", "deep-object-diff": "^1.1.0", @@ -1961,19 +1909,19 @@ } }, "@storybook/ui": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-5.2.4.tgz", - "integrity": "sha512-zsS43k1h4bWEW6oj9FNHlUL3niHoJJ8v7iqYbRtVM12rxrYhV3K8TGVG3LCuNB75i3Be0Myy+/RHA4x9kco08A==", - "dev": true, - "requires": { - "@storybook/addons": "5.2.4", - "@storybook/api": "5.2.4", - "@storybook/channels": "5.2.4", - "@storybook/client-logger": "5.2.4", - "@storybook/components": "5.2.4", - "@storybook/core-events": "5.2.4", - "@storybook/router": "5.2.4", - "@storybook/theming": "5.2.4", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-5.2.6.tgz", + "integrity": "sha512-jT3PtpEsTqnESO0U8BotC+5P971Xqy0s2leSZcgU9PNe4Eb7NaxypSULOulPgPAx1JOmMipUBdK54PP/nyudkA==", + "dev": true, + "requires": { + "@storybook/addons": "5.2.6", + "@storybook/api": "5.2.6", + "@storybook/channels": "5.2.6", + "@storybook/client-logger": "5.2.6", + "@storybook/components": "5.2.6", + "@storybook/core-events": "5.2.6", + "@storybook/router": "5.2.6", + "@storybook/theming": "5.2.6", "copy-to-clipboard": "^3.0.8", "core-js": "^3.0.1", "core-js-pure": "^3.0.1", @@ -1981,7 +1929,7 @@ "fast-deep-equal": "^2.0.1", "fuse.js": "^3.4.4", "global": "^4.3.2", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "markdown-to-jsx": "^6.9.3", "memoizerific": "^1.11.3", "polished": "^3.3.1", @@ -2001,12 +1949,6 @@ "util-deprecate": "^1.0.2" }, "dependencies": { - "qs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz", - "integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA==", - "dev": true - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -2156,7 +2098,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, "requires": { "defer-to-connect": "^1.0.1" } @@ -2295,9 +2236,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "12.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.1.tgz", - "integrity": "sha512-TJtwsqZ39pqcljJpajeoofYRfeZ7/I/OMUQ5pR4q5wOKf2ocrUvBAZUMhWsOvKx3dVc/aaV5GluBivt0sWqA5A==" + "version": "11.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", + "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" }, "@types/prop-types": { "version": "15.7.3", @@ -2322,9 +2263,9 @@ } }, "@types/react": { - "version": "16.9.9", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.9.tgz", - "integrity": "sha512-L+AudFJkDukk+ukInYvpoAPyJK5q1GanFOINOJnM0w6tUgITuWvJ4jyoBPFL7z4/L8hGLd+K/6xR5uUjXu0vVg==", + "version": "16.9.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.11.tgz", + "integrity": "sha512-UBT4GZ3PokTXSWmdgC/GeCGEJXE5ofWyibCcecRLUVN2ZBpXQGVgQGtG2foS7CrTKFKlQVVswLvf7Js6XA/CVQ==", "dev": true, "requires": { "@types/prop-types": "*", @@ -2340,6 +2281,15 @@ "@types/react": "*" } }, + "@types/react-textarea-autosize": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@types/react-textarea-autosize/-/react-textarea-autosize-4.3.5.tgz", + "integrity": "sha512-PiDL83kPMTolyZAWW3lyzO6ktooTb9tFTntVy7CA83/qFLWKLJ5bLeRboy6J6j3b1e8h2Eec6gBTEOOJRjV14A==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -2399,9 +2349,9 @@ } }, "@types/webpack": { - "version": "4.39.4", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.4.tgz", - "integrity": "sha512-VubX3/qXtpWmHhd422GdtAHwAMLHSsgXx0dtspd2DZ7pMnCRKjduJN8Zp5Ex4e1fH4FKFBBgWTvsry0WL8wHsQ==", + "version": "4.39.8", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.8.tgz", + "integrity": "sha512-lkJvwNJQUPW2SbVwAZW9s9whJp02nzLf2yTNwMULa4LloED9MYS1aNnGeoBCifpAI1pEBkTpLhuyRmBnLEOZAA==", "dev": true, "requires": { "@types/anymatch": "*", @@ -2650,25 +2600,23 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", - "dev": true + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" }, "acorn-globals": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", - "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", "dev": true, "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" + "acorn": "^4.0.4" }, "dependencies": { "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", "dev": true } } @@ -2795,34 +2743,6 @@ "dev": true, "requires": { "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } } }, "ansi-colors": { @@ -2842,9 +2762,9 @@ "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "ansi-styles": { "version": "3.2.1", @@ -2855,9 +2775,9 @@ } }, "ansi-to-html": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.6.12.tgz", - "integrity": "sha512-qBkIqLW979675mP76yB7yVkzeAWtATegdnDQ0RA3CZzknx0yUlNxMSML4xFdBfTs2GWYFQ1FELfbGbVSPzJ+LA==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.6.13.tgz", + "integrity": "sha512-Ys2/umuaTlQvP9DLkaa7UzRKF2FLrfod/hNHXS9QhXCrw7seObG6ksOGmNz3UoK+adwM8L9vQfG7mvaxfJ3Jvw==", "dev": true, "requires": { "entities": "^1.1.2" @@ -2888,52 +2808,43 @@ } }, "app-builder-bin": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-3.4.3.tgz", - "integrity": "sha512-qMhayIwi3juerQEVJMQ76trObEbfQT0nhUdxZz9a26/3NLT3pE6awmQ8S1cEnrGugaaM5gYqR8OElcDezfmEsg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.7.1.tgz", + "integrity": "sha512-ubIBeiL9XysjMW4HETBKxj3DC8ika6dGyC0vftPc0kZwGh1iXQ5bycsjoAqY/3t3BBEEIg0VruicvBaUl1pOSQ==", "dev": true }, "app-builder-lib": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-21.2.0.tgz", - "integrity": "sha512-aOX/nv77/Bti6NymJDg7p9T067xD8m1ipIEJR7B4Mm1GsJWpMm9PZdXtCRiMNRjHtQS5KIljT0g17781y6qn5A==", + "version": "20.44.4", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.44.4.tgz", + "integrity": "sha512-1K1xfrhyqDgnibwyuYMgvfwGilGLMF31YwOUJ8IXreyjRef9lUjWW+BZuBXqk4Uqd0C0EYPjhofgpuN0WoAQ+A==", "dev": true, "requires": { - "7zip-bin": "~5.0.3", - "@develar/schema-utils": "~2.1.0", + "7zip-bin": "~4.1.0", + "app-builder-bin": "2.7.1", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "21.2.0", - "builder-util-runtime": "8.3.0", + "builder-util": "10.1.2", + "builder-util-runtime": "8.2.5", "chromium-pickle-js": "^0.2.0", "debug": "^4.1.1", "ejs": "^2.6.2", - "electron-publish": "21.2.0", - "fs-extra": "^8.1.0", + "electron-osx-sign": "0.4.11", + "electron-publish": "20.44.4", + "fs-extra-p": "^8.0.2", "hosted-git-info": "^2.7.1", "is-ci": "^2.0.0", - "isbinaryfile": "^4.0.2", + "isbinaryfile": "^4.0.1", "js-yaml": "^3.13.1", "lazy-val": "^1.0.4", "minimatch": "^3.0.4", "normalize-package-data": "^2.5.0", - "read-config-file": "5.0.0", - "sanitize-filename": "^1.6.2", - "semver": "^6.3.0", - "temp-file": "^3.3.4" + "plist": "^3.0.1", + "read-config-file": "3.2.2", + "sanitize-filename": "^1.6.1", + "semver": "^6.1.1", + "temp-file": "^3.3.3" }, "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -2961,17 +2872,49 @@ "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "aria-query": { + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "aria-query": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", @@ -2979,6 +2922,14 @@ "requires": { "ast-types-flow": "0.0.7", "commander": "^2.11.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "arr-diff": { @@ -3014,9 +2965,9 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-includes": { "version": "3.0.3", @@ -3199,17 +3150,24 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, "autoprefixer": { - "version": "9.6.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.5.tgz", - "integrity": "sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g==", + "version": "9.7.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.1.tgz", + "integrity": "sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw==", "requires": { - "browserslist": "^4.7.0", - "caniuse-lite": "^1.0.30000999", + "browserslist": "^4.7.2", + "caniuse-lite": "^1.0.30001006", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.18", + "postcss": "^7.0.21", "postcss-value-parser": "^4.0.2" + }, + "dependencies": { + "postcss-value-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==" + } } }, "aws-sign2": { @@ -3242,6 +3200,12 @@ "js-tokens": "^3.0.2" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -3267,6 +3231,15 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -3344,14 +3317,6 @@ "babel-preset-jest": "^24.9.0", "chalk": "^2.4.2", "slash": "^2.0.0" - }, - "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } } }, "babel-loader": { @@ -3364,14 +3329,6 @@ "loader-utils": "^1.0.2", "mkdirp": "^0.5.1", "pify": "^4.0.1" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } } }, "babel-plugin-add-react-displayname": { @@ -3390,15 +3347,15 @@ } }, "babel-plugin-emotion": { - "version": "10.0.21", - "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.21.tgz", - "integrity": "sha512-03o+T6sfVAJhNDcSdLapgv4IeewcFPzxlvBUVdSf7o5PI57ZSxoDvmy+ZulVWSu+rOWAWkEejNcsb29TuzJHbg==", + "version": "10.0.23", + "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.23.tgz", + "integrity": "sha512-1JiCyXU0t5S2xCbItejCduLGGcKmF3POT0Ujbexog2MI4IlRcIn/kWjkYwCUZlxpON0O5FC635yPl/3slr7cKQ==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@emotion/hash": "0.7.3", "@emotion/memoize": "0.7.3", - "@emotion/serialize": "^0.11.11", + "@emotion/serialize": "^0.11.14", "babel-plugin-macros": "^2.0.0", "babel-plugin-syntax-jsx": "^6.18.0", "convert-source-map": "^1.5.0", @@ -3427,6 +3384,40 @@ "requires": { "locate-path": "^3.0.0" } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true } } }, @@ -3551,13 +3542,13 @@ "dev": true }, "babel-plugin-react-docgen": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-3.1.0.tgz", - "integrity": "sha512-W6xqZnZIWjZuE9IjP7XolxxgFGB5Y9GZk4cLPSWKa10MrT86q7bX4ke9jbrNhFVIRhbmzL8wE1Sn++mIWoJLbw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-3.2.0.tgz", + "integrity": "sha512-MZ3fhnJ+/tUDhWFGgWsajuLct/dD1xoprmStqrBgtt9flFLPrKIOKOfqwjXjsn6/THs5QrG5rkcDFE3TMMZDjQ==", "dev": true, "requires": { - "lodash": "^4.17.11", - "react-docgen": "^4.1.0", + "lodash": "^4.17.15", + "react-docgen": "^4.1.1", "recast": "^0.14.7" } }, @@ -3732,6 +3723,27 @@ "source-map": "^0.5.0" } }, + "@babel/plugin-proposal-class-properties": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", + "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.5.5", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-proposal-decorators": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.6.0.tgz", + "integrity": "sha512-ZSyYw9trQI50sES6YxREXKu+4b7MAg6Qx2cvyDDYjP2Hpzd3FleOUwC9cqn1+za8d0A2ZU8SHujxFao956efUg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.6.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-decorators": "^7.2.0" + } + }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", @@ -3989,9 +4001,9 @@ } }, "better-docs": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/better-docs/-/better-docs-1.3.3.tgz", - "integrity": "sha512-VF3P7D9S13TiXHMXVLxjdMw0OFwA7yzhJ5jTMfZSf7LoWg99NtjY6CwslricEaiDjs4pb7g9h8UDkvKXVQvGUA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/better-docs/-/better-docs-1.4.2.tgz", + "integrity": "sha512-LzSwYvC8z2jcCagjQWYbg5dKKigwhQ2FTPyDRYyxtVPKID2WDWRIV8G2nraVwIWNepSMcNorGTKvWq1II6pFyw==", "dev": true, "requires": { "brace": "^0.11.1", @@ -4030,13 +4042,6 @@ "create-hash": "^1.1.0", "pbkdf2": "^3.0.9", "randombytes": "^2.0.1" - }, - "dependencies": { - "@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" - } } }, "bip66": { @@ -4054,12 +4059,42 @@ "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, "requires": { "inherits": "~2.0.0" } @@ -4100,11 +4135,6 @@ "type-is": "~1.6.17" }, "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -4117,11 +4147,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" } } }, @@ -4136,6 +4161,13 @@ "dns-txt": "^2.0.2", "multicast-dns": "^6.0.1", "multicast-dns-service-types": "^1.1.0" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + } } }, "boolbase": { @@ -4144,13 +4176,6 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, - "boolean": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-2.0.3.tgz", - "integrity": "sha512-iHzXeFCXWrpjYE7DToXGCBPGZf0eVISqzL+4sgrOSYEKXnb59WHPFvGTTyCj6zJ/MuuLAxEn8zPkrTHHzlt3IA==", - "dev": true, - "optional": true - }, "boxen": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", @@ -4167,37 +4192,11 @@ "widest-line": "^2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } } } }, @@ -4351,13 +4350,13 @@ } }, "browserslist": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.1.tgz", - "integrity": "sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", + "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", "requires": { - "caniuse-lite": "^1.0.30000999", - "electron-to-chromium": "^1.3.284", - "node-releases": "^1.1.36" + "caniuse-lite": "^1.0.30001004", + "electron-to-chromium": "^1.3.295", + "node-releases": "^1.1.38" } }, "bs58": { @@ -4379,22 +4378,21 @@ } }, "bser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz", - "integrity": "sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, "requires": { "node-int64": "^0.4.0" } }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-alloc": { @@ -4442,46 +4440,35 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, "builder-util": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-21.2.0.tgz", - "integrity": "sha512-Nd6CUb6YgDY8EXAXEIegx+1kzKqyFQ5ZM5BoYkeunAlwz/zDJoH1UCyULjoS5wQe5czNClFQy07zz2bzYD0Z4A==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-10.1.2.tgz", + "integrity": "sha512-LQMh36Cg0r4ZfKqNlaUclndS/IXxZ3OdCgmXvw1vdP3QwYT2NkyE7LfMikAFIHpXOs6zsVH+iW+Fe/AX1jfFag==", "dev": true, "requires": { - "7zip-bin": "~5.0.3", + "7zip-bin": "~4.1.0", "@types/debug": "^4.1.4", - "app-builder-bin": "3.4.3", + "app-builder-bin": "2.7.1", "bluebird-lst": "^1.0.9", - "builder-util-runtime": "8.3.0", + "builder-util-runtime": "^8.2.5", "chalk": "^2.4.2", "debug": "^4.1.1", - "fs-extra": "^8.1.0", + "fs-extra-p": "^8.0.2", "is-ci": "^2.0.0", "js-yaml": "^3.13.1", - "source-map-support": "^0.5.13", + "source-map-support": "^0.5.12", "stat-mode": "^0.3.0", - "temp-file": "^3.3.4" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } + "temp-file": "^3.3.3" } }, "builder-util-runtime": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.3.0.tgz", - "integrity": "sha512-CSOdsYqf4RXIHh1HANPbrZHlZ9JQJXSuDDloblZPcWQVN62inyYoTQuSmY3KrgefME2Sv3Kn2MxHvbGQHRf8Iw==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.2.5.tgz", + "integrity": "sha512-YILT+YUlxrE3yNB6mDC1tF+Q24mr1LSYdjP5U861jbBeDZfvy1/VPDzW3boMVrDtzYnDnvkYrzLJnoh6TXA75w==", "dev": true, "requires": { + "bluebird-lst": "^1.0.9", "debug": "^4.1.1", + "fs-extra-p": "^8.0.2", "sax": "^1.2.4" } }, @@ -4491,9 +4478,9 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, "cacache": { "version": "12.0.3", @@ -4515,26 +4502,6 @@ "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } } }, "cache-base": { @@ -4557,7 +4524,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, "requires": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -4572,7 +4538,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, "requires": { "pump": "^3.0.0" } @@ -4580,8 +4545,7 @@ "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" } } }, @@ -4596,13 +4560,6 @@ "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", "requires": { "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" - } } }, "caller-path": { @@ -4614,10 +4571,9 @@ } }, "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" }, "camel-case": { "version": "3.0.0", @@ -4630,19 +4586,18 @@ } }, "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" } }, "can-use-dom": { @@ -4652,9 +4607,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001001", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001001.tgz", - "integrity": "sha512-MsWRX5x8GsZJcvIh1zkTERAcX9cRlT+If1f4xk3B5EAJftiwjab2oBKPbned9IuBiKae5u9PMp7T2xJBDo+9Sw==" + "version": "1.0.30001008", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001008.tgz", + "integrity": "sha512-b8DJyb+VVXZGRgJUa30cbk8gKHZ3LOZTBLaUEEVr2P4xpmFigOCc62CO4uzquW641Ouq1Rm9N+rWLWdSYDaDIw==" }, "capture-exit": { "version": "2.0.0", @@ -4768,15 +4723,6 @@ "domelementtype": "^1.3.0", "entities": "^1.1.1" } - }, - "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", - "dev": true, - "requires": { - "@types/node": "*" - } } } }, @@ -4797,27 +4743,6 @@ "path-is-absolute": "^1.0.0", "readdirp": "^2.2.1", "upath": "^1.1.1" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - } } }, "chownr": { @@ -4932,19 +4857,46 @@ "colors": "^1.1.2", "object-assign": "^4.1.0", "string-width": "^2.1.1" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", - "dev": true, + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "clipboard": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "dev": true, "optional": true, "requires": { "good-listener": "^1.2.2", @@ -4953,47 +4905,61 @@ } }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", "wrap-ansi": "^2.0.0" }, "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "number-is-nan": "^1.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "ansi-regex": "^3.0.0" } } } }, "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", "dev": true, "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "clone-regexp": { @@ -5009,7 +4975,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -5101,9 +5066,12 @@ "dev": true }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "requires": { + "graceful-readlink": ">= 1.0.0" + } }, "common-tags": { "version": "1.8.0", @@ -5116,6 +5084,12 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, + "compare-version": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz", + "integrity": "sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA=", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -5143,6 +5117,11 @@ "vary": "~1.1.2" }, "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -5172,6 +5151,35 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "concurrently": { @@ -5191,74 +5199,12 @@ "yargs": "^12.0.5" }, "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, "has-flag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -5276,15 +5222,6 @@ "pify": "^3.0.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, "supports-color": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", @@ -5293,56 +5230,9 @@ "requires": { "has-flag": "^2.0.0" } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, - "config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, - "optional": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, "configstore": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", @@ -5355,23 +5245,6 @@ "unique-string": "^1.0.0", "write-file-atomic": "^2.0.0", "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "confusing-browser-globals": { @@ -5386,12 +5259,9 @@ "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "requires": { - "date-now": "^0.1.4" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, "console-control-strings": { "version": "1.1.0", @@ -5436,9 +5306,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" } @@ -5453,6 +5323,11 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -5481,12 +5356,12 @@ } }, "copy-webpack-plugin": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.4.tgz", - "integrity": "sha512-YBuYGpSzoCHSSDGyHy6VJ7SHojKp6WHT4D7ItcQFNAYx2hrwkMe56e97xfVR0/ovDuMTrMffXUiltvQljtAGeg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.5.tgz", + "integrity": "sha512-7N68eIoQTyudAuxkfPT7HzGoQ+TsmArN/I3HFwG+lVE3FNzqvZKIiaxtYh4o3BIznioxUvx9j26+Rtsc9htQUQ==", "dev": true, "requires": { - "cacache": "^11.3.3", + "cacache": "^12.0.3", "find-cache-dir": "^2.1.0", "glob-parent": "^3.1.0", "globby": "^7.1.1", @@ -5494,34 +5369,12 @@ "loader-utils": "^1.2.3", "minimatch": "^3.0.4", "normalize-path": "^3.0.0", - "p-limit": "^2.2.0", + "p-limit": "^2.2.1", "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", + "serialize-javascript": "^2.1.0", "webpack-log": "^2.0.0" }, "dependencies": { - "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, "globby": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", @@ -5536,48 +5389,60 @@ "slash": "^1.0.0" } }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "yallist": "^3.0.2" + "p-try": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "serialize-javascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.0.tgz", + "integrity": "sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==", "dev": true }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true } } }, "core-js": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.2.tgz", - "integrity": "sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.4.0.tgz", + "integrity": "sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA==", "dev": true }, "core-js-compat": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.3.2.tgz", - "integrity": "sha512-gfiK4QnNXhnnHVOIZst2XHdFfdMTPxtR0EGs0TdILMlGIft+087oH6/Sw2xTTIjpWXC9vEwsJA8VG3XTGcmO5g==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.4.0.tgz", + "integrity": "sha512-pgQUcgT2+v9/yxHgMynYjNj7nmxLRXv3UC39rjCjDwpe63ev2rioQTju1PKLYUBbPCQQvZNWvQC8tBJd65q11g==", "dev": true, "requires": { - "browserslist": "^4.7.0", + "browserslist": "^4.7.2", "semver": "^6.3.0" }, "dependencies": { @@ -5590,9 +5455,9 @@ } }, "core-js-pure": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.3.2.tgz", - "integrity": "sha512-sw695hB0UxFXrSkUthEby5tMdjOYN3hVC8IGQePF1m3JYb9e/KjT0TOFWzaSzlKwGNglKCgLYUjiJ7uZvactiw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.4.0.tgz", + "integrity": "sha512-d49s6GiW3ePYM8vCglfLLo6bueYx+Sff6MYtjohTMSB0AoxVfABXMUSmYHtKAEvW77T9JTKMyHrhE20nZ8gYDA==", "dev": true }, "core-util-is": { @@ -5636,31 +5501,6 @@ "is-directory": "^0.3.1", "js-yaml": "^3.13.1", "parse-json": "^4.0.0" - }, - "dependencies": { - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - } } }, "create-ecdh": { @@ -5821,6 +5661,12 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "postcss-value-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "dev": true + }, "schema-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", @@ -5843,6 +5689,18 @@ "css-what": "2.1", "domutils": "1.5.1", "nth-check": "~1.0.1" + }, + "dependencies": { + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + } } }, "css-select-base-adapter": { @@ -5866,13 +5724,21 @@ "integrity": "sha1-Zd/mFL1f0XW2Sgo/GTuHD8V5B3M=" }, "css-tree": { - "version": "1.0.0-alpha.33", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.33.tgz", - "integrity": "sha512-SPt57bh5nQnpsTBsx/IXbO14sRc9xXu5MtMAVuo0BaQQmyf0NupNPPSoMaqiAF5tDFafYsTkfeH4Q/HCKXkg4w==", + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", "dev": true, "requires": { "mdn-data": "2.0.4", - "source-map": "^0.5.3" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "css-what": { @@ -5888,30 +5754,12 @@ "dev": true }, "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.2.tgz", + "integrity": "sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.29" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - } - }, - "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", - "dev": true - } + "css-tree": "1.0.0-alpha.37" } }, "cssom": { @@ -5948,6 +5796,15 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "damerau-levenshtein": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", @@ -5974,9 +5831,9 @@ }, "dependencies": { "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -5987,15 +5844,9 @@ } }, "date-fns": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.6.0.tgz", - "integrity": "sha512-F55YxqRdEfP/eYQmQjLN798v0AwLjmZ8nMBjdQvNwEE3N/zWVrlkkqT+9seBlPlsbkybG4JmWg3Ee3dIV9BcGQ==", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.0.1.tgz", + "integrity": "sha512-C14oTzTZy8DH1Eq8N78owrCWvf3+cnJw88BTK/N3DYWVxDJuJzPaNdplzYxDYuuXXGvqBcO4Vy5SOrwAooXSWw==" }, "de-indent": { "version": "1.0.2", @@ -6023,6 +5874,13 @@ "requires": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + } } }, "decode-uri-component": { @@ -6045,20 +5903,10 @@ "strip-dirs": "^2.0.0" }, "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -6133,6 +5981,11 @@ "object-assign": "^4.0.1", "pinkie-promise": "^2.0.0" } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -6177,10 +6030,9 @@ } }, "defer-to-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.0.2.tgz", - "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.0.tgz", + "integrity": "sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ==" }, "define-properties": { "version": "1.1.3", @@ -6241,10 +6093,24 @@ "rimraf": "^2.6.3" }, "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } } } }, @@ -6357,21 +6223,6 @@ "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", "requires": { "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } } }, "discontinuous-range": { @@ -6381,40 +6232,19 @@ "dev": true }, "dmg-builder": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-21.2.0.tgz", - "integrity": "sha512-9cJEclnGy7EyKFCoHDYDf54pub/t92CQapyiUxU0w9Bj2vUvfoDagP1PMiX4XD5rPp96141h9A+QN0OB4VgvQg==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-6.7.2.tgz", + "integrity": "sha512-xfYOwhHjOSOIqkk8A0h8zcaio/WyzrAWpMTu9hzV3Z5PI4tOG0Pq6a9Lh/mHr1r3bydif8R21qGvKU1Re9CpUg==", "dev": true, "requires": { - "app-builder-lib": "~21.2.0", + "app-builder-lib": "~20.44.4", "bluebird-lst": "^1.0.9", - "builder-util": "~21.2.0", - "fs-extra": "^8.1.0", - "iconv-lite": "^0.5.0", + "builder-util": "~10.1.2", + "fs-extra-p": "^8.0.2", + "iconv-lite": "^0.4.24", "js-yaml": "^3.13.1", - "sanitize-filename": "^1.6.2" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "iconv-lite": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.0.tgz", - "integrity": "sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } + "parse-color": "^1.0.0", + "sanitize-filename": "^1.6.1" } }, "dns-equal": { @@ -6464,9 +6294,9 @@ } }, "dom-serializer": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", - "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "requires": { "domelementtype": "^2.0.1", "entities": "^2.0.0" @@ -6517,9 +6347,9 @@ } }, "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "requires": { "dom-serializer": "0", "domelementtype": "1" @@ -6534,9 +6364,9 @@ } }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", "dev": true }, "dotenv-defaults": { @@ -6546,14 +6376,6 @@ "dev": true, "requires": { "dotenv": "^6.2.0" - }, - "dependencies": { - "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", - "dev": true - } } }, "dotenv-expand": { @@ -6601,6 +6423,35 @@ "inherits": "^2.0.1", "readable-stream": "^2.0.0", "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "ecc-jsbn": { @@ -6624,43 +6475,45 @@ "dev": true }, "electron": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-7.1.1.tgz", - "integrity": "sha512-NJPv4SuMJlRUtXBd/Ey9XKSLOZ4+hxsOrHHPXwrBQNNdeZesoSrTMgPymee/FwMRtrSt0Pz8NccEZUu/pxmbhQ==", + "version": "3.1.13", + "resolved": "https://registry.npmjs.org/electron/-/electron-3.1.13.tgz", + "integrity": "sha512-aRNywoUSO1Va/lpU4nz3K6GDyFqYtlOnHGLcERAAHfhB+IJrJ34cUJW4FVBpm43AwvUdAeuCkVKRLtOmrgx5CA==", "dev": true, "requires": { - "@electron/get": "^1.0.1", - "@types/node": "^12.0.12", + "@types/node": "^10.1.4", + "electron-download": "^4.1.0", "extract-zip": "^1.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.5.tgz", + "integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==", + "dev": true + } } }, "electron-builder": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-21.2.0.tgz", - "integrity": "sha512-x8EXrqFbAb2L3N22YlGar3dGh8vwptbB3ovo3OF6K7NTpcsmM2zEoJv7GhFyX73rNzSG2HaWpXwGAtOp2JWiEw==", + "version": "20.44.4", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.44.4.tgz", + "integrity": "sha512-H8zzP01albkKh2Ec1zc0A7RGriUkHb5M99NJskaYtgKtGATTAGH+r9OIWVk5Hk9c1dLMVudbqEeaSlygMF2asw==", "dev": true, "requires": { - "app-builder-lib": "21.2.0", + "app-builder-lib": "20.44.4", "bluebird-lst": "^1.0.9", - "builder-util": "21.2.0", - "builder-util-runtime": "8.3.0", + "builder-util": "10.1.2", + "builder-util-runtime": "8.2.5", "chalk": "^2.4.2", - "dmg-builder": "21.2.0", - "fs-extra": "^8.1.0", + "dmg-builder": "6.7.2", + "fs-extra-p": "^8.0.2", "is-ci": "^2.0.0", "lazy-val": "^1.0.4", - "read-config-file": "5.0.0", - "sanitize-filename": "^1.6.2", - "update-notifier": "^3.0.1", - "yargs": "^13.3.0" + "read-config-file": "3.2.2", + "sanitize-filename": "^1.6.1", + "update-notifier": "^3.0.0", + "yargs": "^13.2.4" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -6687,53 +6540,50 @@ "locate-path": "^3.0.0" } }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "p-try": "^2.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "p-limit": "^2.0.0" } }, - "which-module": { + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "wrap-ansi": { @@ -6747,12 +6597,6 @@ "strip-ansi": "^5.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", @@ -6783,6 +6627,34 @@ } } }, + "electron-download": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", + "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", + "dev": true, + "requires": { + "debug": "^3.0.0", + "env-paths": "^1.0.0", + "fs-extra": "^4.0.1", + "minimist": "^1.2.0", + "nugget": "^2.0.1", + "path-exists": "^3.0.0", + "rc": "^1.2.1", + "semver": "^5.4.1", + "sumchecker": "^2.0.2" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, "electron-is-accelerator": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz", @@ -6794,57 +6666,71 @@ "integrity": "sha512-Z1qA/1oHNowGtSBIcWk0pcLEqYT/j+13xUw/MYOrBUOL4X7VN0i0KCTf5SqyvMPmW5pSPKbo28wkxMxzZ20YnQ==" }, "electron-localshortcut": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-3.1.0.tgz", - "integrity": "sha512-MgL/j5jdjW7iA0R6cI7S045B0GlKXWM1FjjujVPjlrmyXRa6yH0bGSaIAfxXAF9tpJm3pLEiQzerYHkRh9JG/A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-3.2.0.tgz", + "integrity": "sha512-pm72c467BgWEFE+1Cgim2EqhoQe60UlirrobwN24TA+hd+x/2hVgZlwfqzvNEmYfuuegZlzQL8tILjomofbzdg==", "requires": { - "debug": "^2.6.8", + "debug": "^4.0.1", "electron-is-accelerator": "^0.1.0", - "keyboardevent-from-electron-accelerator": "^1.1.0", + "keyboardevent-from-electron-accelerator": "^2.0.0", "keyboardevents-areequal": "^0.2.1" + } + }, + "electron-osx-sign": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.11.tgz", + "integrity": "sha512-VVd40nrnVqymvFrY9ZkOYgHJOvexHHYTR3di/SN+mjJ0OWhR1I8BRVj3U+Yamw6hnkZZNKZp52rqL5EFAAPFkQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "compare-version": "^0.1.2", + "debug": "^2.6.8", + "isbinaryfile": "^3.0.2", + "minimist": "^1.2.0", + "plist": "^3.0.1" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "electron-publish": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-21.2.0.tgz", - "integrity": "sha512-mWavuoWJe87iaeKd0I24dNWIaR+0yRzshjNVqGyK019H766fsPWl3caQJnVKFaEyrZRP397v4JZVG0e7s16AxA==", + "version": "20.44.4", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.44.4.tgz", + "integrity": "sha512-50NzsKOnNqOpGJzPl04vMyitdguUvp15FWKWtu4KISsHfgdLMWGgxHGZwfMphc/vf364zXvPHsYQza3MASgaEQ==", "dev": true, "requires": { "bluebird-lst": "^1.0.9", - "builder-util": "~21.2.0", - "builder-util-runtime": "8.3.0", + "builder-util": "~10.1.2", + "builder-util-runtime": "^8.2.5", "chalk": "^2.4.2", - "fs-extra": "^8.1.0", + "fs-extra-p": "^8.0.2", "lazy-val": "^1.0.4", "mime": "^2.4.4" }, "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "mime": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", @@ -6854,9 +6740,9 @@ } }, "electron-to-chromium": { - "version": "1.3.289", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.289.tgz", - "integrity": "sha512-39GEOWgTxtMDk/WjIQLg4W/l1s4FZdiMCqUBLjd92tAXsBPDFLwuwCba5OGhuTdVYm6E128TZIqSnMpeocUlCQ==" + "version": "1.3.306", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz", + "integrity": "sha512-frDqXvrIROoYvikSKTIKbHbzO6M3/qC6kCIt/1FOa9kALe++c4VAJnwjSFvf1tYLEUsP2n9XZ4XSCyqc3l7A/A==" }, "element-resize-detector": { "version": "1.1.15", @@ -6934,6 +6820,11 @@ "tapable": "^1.0.0" }, "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, "memory-fs": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", @@ -6942,7 +6833,29 @@ "errno": "^0.1.3", "readable-stream": "^2.0.1" } - } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "entities": { @@ -6951,9 +6864,9 @@ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" }, "env-paths": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", + "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", "dev": true }, "enzyme": { @@ -7060,27 +6973,40 @@ } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.52", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz", + "integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.2", + "next-tick": "~1.0.0" + } + }, "es5-shim": { "version": "4.5.13", "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.13.tgz", "integrity": "sha512-xi6hh6gsvDE0MaW4Vp1lgNEBpVcCXRWfPXj5egDvtgLz4L9MEvNwYEMdJH+JJinWkwa8c3c3o5HduV7dB/e1Hw==", "dev": true }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true, - "optional": true + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } }, "es6-shim": { "version": "0.35.5", @@ -7088,6 +7014,15 @@ "integrity": "sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==", "dev": true }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -7127,9 +7062,9 @@ } }, "eslint": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz", - "integrity": "sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz", + "integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -7139,9 +7074,9 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.2", + "eslint-utils": "^1.4.3", "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.1", + "espree": "^6.1.2", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -7151,7 +7086,7 @@ "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.4.1", + "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -7171,12 +7106,58 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "ansi-escapes": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", + "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", + "dev": true, + "requires": { + "type-fest": "^0.5.2" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "figures": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "glob-parent": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", @@ -7192,19 +7173,83 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "inquirer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", + "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "string-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", + "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^5.2.0" } }, "strip-json-comments": { @@ -7212,6 +7257,12 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", "dev": true + }, + "type-fest": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", + "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "dev": true } } }, @@ -7319,61 +7370,12 @@ "ms": "2.0.0" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -7423,14 +7425,11 @@ "isarray": "^1.0.0" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "load-json-file": { "version": "2.0.0", @@ -7444,52 +7443,21 @@ "strip-bom": "^3.0.0" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "error-ex": "^1.2.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "path-type": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", @@ -7499,6 +7467,12 @@ "pify": "^2.0.0" } }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -7519,12 +7493,6 @@ "find-up": "^2.0.0", "read-pkg": "^2.0.0" } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, @@ -7580,10 +7548,9 @@ "dev": true }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", - "dev": true, + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -7613,6 +7580,14 @@ "acorn": "^7.1.0", "acorn-jsx": "^5.1.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + } } }, "esprima": { @@ -7652,6 +7627,22 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, "eth-lib": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", @@ -7666,6 +7657,21 @@ "xhr-request-promise": "^0.1.2" } }, + "ethereum-bloom-filters": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz", + "integrity": "sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA==", + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + } + } + }, "ethereumjs-common": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.4.0.tgz", @@ -7710,6 +7716,70 @@ "uuid": "^3.3.2" } }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "@types/node": { + "version": "10.17.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.5.tgz", + "integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==" + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + } + } + }, "ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -7736,9 +7806,9 @@ } }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" }, "events": { "version": "3.0.0", @@ -7763,9 +7833,9 @@ } }, "exec-sh": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", - "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", + "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==", "dev": true }, "execa": { @@ -7901,11 +7971,6 @@ "vary": "~1.1.2" }, "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -7923,11 +7988,21 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } + } + }, + "ext": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.2.0.tgz", + "integrity": "sha512-0ccUQK/9e3NreLFg6K6np8aPyRgwycx+oFGtfx1dSp7Wj00Ozw9r05FgBRlzjf2XBM7LAzwgLyDscRrtSU91hA==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" } } }, @@ -8178,10 +8253,9 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", + "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", "requires": { "flat-cache": "^2.0.1" } @@ -8305,22 +8379,31 @@ "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" - } - }, - "find-root": { + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + } + } + }, + "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", "dev": true }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^2.0.0" } }, "findup-sync": { @@ -8357,6 +8440,35 @@ "requires": { "inherits": "^2.0.3", "readable-stream": "^2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "focus-lock": { @@ -8467,6 +8579,35 @@ "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "fs-constants": { @@ -8475,33 +8616,44 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "requires": { "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-extra-p": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-8.1.0.tgz", + "integrity": "sha512-sCLpU5kk5CvrWZvFM9dUlqPgHrE02AEt6XYzF7kDscr5COc7DHfhNfODTXt0bkVNmt5DkvU2uJSYjorxY3bRKA==", + "dev": true, + "requires": { + "bluebird-lst": "^1.0.9", + "fs-extra": "^8.1.0" }, "dependencies": { - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } } } }, - "fs-promise": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", - "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "requires": { - "any-promise": "^1.3.0", - "fs-extra": "^2.0.0", - "mz": "^2.6.0", - "thenify-all": "^1.6.0" + "minipass": "^2.6.0" } }, "fs-write-stream-atomic": { @@ -8513,6 +8665,35 @@ "iferr": "^0.1.5", "imurmurhash": "^0.1.4", "readable-stream": "1 || 2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "fs.realpath": { @@ -9005,6 +9186,7 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", @@ -9036,9 +9218,9 @@ "dev": true }, "functions-have-names": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.1.1.tgz", - "integrity": "sha512-U0kNHUoxwPNPWOJaMG7Z00d4a/qZVrFtzWJRaK8V9goaVOCXBSQSJpt3MYGNtkScKEBKovxLjnNdC9MlXwo5Pw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.0.tgz", + "integrity": "sha512-zKXyzksTeaCSw5wIX79iCA40YAa6CJMJgNg9wdkU/ERBrIdPSimPICYiLp65lRbSBqtiHql/HZfS2DyI/AH6tQ==", "dev": true }, "fuse.js": { @@ -9115,10 +9297,9 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" }, "get-stream": { "version": "4.1.0", @@ -9142,9 +9323,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9179,45 +9360,12 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "requires": { "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, - "global-agent": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.5.tgz", - "integrity": "sha512-pYJjCxxNBzYxo6iNO62JZn8iCFVbvpiM0zE4w/G5hBNIvLjnvzIeCVQPMKc3aK8ju5L7Q8NNI/oBSosU0eeSYw==", - "dev": true, - "optional": true, - "requires": { - "boolean": "^2.0.2", - "core-js": "^3.3.3", - "es6-error": "^4.1.1", - "matcher": "^2.0.0", - "roarr": "^2.14.2", - "semver": "^6.3.0", - "serialize-error": "^5.0.0" - }, - "dependencies": { - "core-js": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.4.0.tgz", - "integrity": "sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA==", - "dev": true, - "optional": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "optional": true - } + "process": "~0.5.1" } }, "global-dirs": { @@ -9235,44 +9383,16 @@ "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "requires": { "global-prefix": "^3.0.0" - }, - "dependencies": { - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - } } }, "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "global-tunnel-ng": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", - "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", - "dev": true, - "optional": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "requires": { - "encodeurl": "^1.0.2", - "lodash": "^4.17.10", - "npm-conf": "^1.1.3", - "tunnel": "^0.0.6" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" } }, "globals": { @@ -9292,15 +9412,25 @@ } }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } } }, "globjoin": { @@ -9348,7 +9478,6 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -9364,9 +9493,9 @@ } }, "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" }, "graceful-readlink": { "version": "1.0.1", @@ -9392,14 +9521,6 @@ "requires": { "duplexer": "^0.1.1", "pify": "^4.0.1" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } } }, "handle-thing": { @@ -9408,9 +9529,9 @@ "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==" }, "handlebars": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", - "integrity": "sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", + "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -9555,20 +9676,20 @@ } }, "hast-util-parse-selector": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.2.tgz", - "integrity": "sha512-jIMtnzrLTjzqgVEQqPEmwEZV+ea4zHRFTP8Z2Utw0I5HuBOXHzUPPQWr6ouJdJqDKLbFU/OEiYwZ79LalZkmmw==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.3.tgz", + "integrity": "sha512-nxbeqjQNxsvo/uYYAw9kij6td05YVUlf1qti09rVfbWSLT5H6wo3c+USIwX6nzXWk5kFZzXnEqO82856r0aM2Q==", "dev": true }, "hastscript": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.1.0.tgz", - "integrity": "sha512-7mOQX5VfVs/gmrOGlN8/EDfp1GqV6P3gTNVt+KnX4gbYhpASTM8bklFdFQCbFRAadURXAmw0R1QQdBdqp7jswQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.1.1.tgz", + "integrity": "sha512-xHo1Hkcqd0LlWNuDL3/BxwhgAGp3d7uEvCMgCTrBY+zsOooPPH+8KAvW8PCgl+GB8H3H44nfSaF0A4BQ+4xlYg==", "dev": true, "requires": { "comma-separated-tokens": "^1.0.0", - "hast-util-parse-selector": "^2.2.0", - "property-information": "^5.0.1", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", "space-separated-tokens": "^1.0.0" } }, @@ -9648,6 +9769,35 @@ "obuf": "^1.0.0", "readable-stream": "^2.0.1", "wbuf": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "html-element-map": { @@ -9686,6 +9836,14 @@ "param-case": "^2.1.1", "relateurl": "^0.2.7", "uglify-js": "^3.5.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "html-tags": { @@ -9718,25 +9876,12 @@ "entities": "^1.1.1", "inherits": "^2.0.1", "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "http-cache-semantics": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", - "dev": true + "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" }, "http-deceiver": { "version": "1.2.7", @@ -9780,6 +9925,13 @@ "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", "requires-port": "^1.0.0" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + } } }, "http-proxy-middleware": { @@ -9825,6 +9977,21 @@ "postcss": "^7.0.14" } }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -9836,10 +10003,9 @@ "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" }, "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" }, "immer": { "version": "1.10.0", @@ -9857,13 +10023,19 @@ } }, "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + } } }, "import-from": { @@ -9884,10 +10056,9 @@ } }, "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" }, "import-local": { "version": "2.0.0", @@ -9910,13 +10081,9 @@ "dev": true }, "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" }, "indexes-of": { "version": "1.0.1", @@ -9969,20 +10136,32 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - } - } + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + } } }, "internal-ip": { @@ -10010,10 +10189,9 @@ } }, "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, "ip": { "version": "1.1.5", @@ -10434,9 +10612,9 @@ "dev": true }, "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "isbinaryfile": { "version": "4.0.2", @@ -10509,6 +10687,16 @@ "supports-color": "^6.1.0" }, "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -10533,6 +10721,16 @@ "source-map": "^0.6.1" }, "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10569,12 +10767,6 @@ "jest-cli": "^24.9.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -10628,36 +10820,44 @@ "yargs": "^13.3.0" } }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "p-try": "^2.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "p-limit": "^2.0.0" } }, - "which-module": { + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "wrap-ansi": { @@ -10671,12 +10871,6 @@ "strip-ansi": "^5.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", @@ -10890,14 +11084,6 @@ "micromatch": "^3.1.10", "slash": "^2.0.0", "stack-utils": "^1.0.1" - }, - "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } } }, "jest-mock": { @@ -11003,12 +11189,6 @@ "yargs": "^13.3.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -11041,48 +11221,44 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "p-try": "^2.0.0" } }, - "strip-bom": { + "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "which-module": { + "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "wrap-ansi": { @@ -11096,12 +11272,6 @@ "strip-ansi": "^5.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", @@ -11187,10 +11357,10 @@ "source-map": "^0.6.0" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "source-map": { @@ -11220,6 +11390,12 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true } } }, @@ -11395,6 +11571,30 @@ "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true }, + "acorn-globals": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "dev": true, + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "dev": true + } + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, "ws": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", @@ -11414,8 +11614,7 @@ "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" }, "json-parse-better-errors": { "version": "1.0.2", @@ -11460,7 +11659,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -11487,9 +11685,9 @@ } }, "jsx-ast-utils": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", - "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", + "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -11517,9 +11715,9 @@ } }, "keyboardevent-from-electron-accelerator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-1.1.0.tgz", - "integrity": "sha512-VDC4vKWGrR3VgIKCE4CsXnvObGgP8C2idnTKEMUkuEuvDGE1GEBX9FtNdJzrD00iQlhI3xFxRaeItsUmlERVng==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-2.0.0.tgz", + "integrity": "sha512-iQcmNA0M4ETMNi0kG/q0h/43wZk7rMeKYrXP7sqKIJbHkTU8Koowgzv+ieR/vWJbOwxx5nDC3UnudZ0aLSu4VA==" }, "keyboardevents-areequal": { "version": "0.2.2", @@ -11530,7 +11728,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, "requires": { "json-buffer": "3.0.0" } @@ -11591,6 +11788,14 @@ "core-js": "^3.0.4", "dotenv": "^8.0.0", "dotenv-expand": "^5.1.0" + }, + "dependencies": { + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true + } } }, "lazy-val": { @@ -11600,12 +11805,11 @@ "dev": true }, "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "^2.0.0" } }, "left-pad": { @@ -11615,10 +11819,9 @@ "dev": true }, "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" }, "levn": { "version": "0.3.0", @@ -11640,16 +11843,21 @@ } }, "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } } }, "loader-fs-cache": { @@ -11673,6 +11881,25 @@ "pkg-dir": "^1.0.0" } }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, "pkg-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", @@ -11710,19 +11937,12 @@ } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "requires": { - "p-locate": "^3.0.0", + "p-locate": "^2.0.0", "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - } } }, "lodash": { @@ -11841,28 +12061,25 @@ } }, "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "yallist": "^3.0.2" } }, "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "pify": "^3.0.0" }, "dependencies": { "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" } } }, @@ -11894,9 +12111,9 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" }, "map-or-similar": { "version": "1.5.0", @@ -11957,25 +12174,6 @@ "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, - "matcher": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.0.0.tgz", - "integrity": "sha512-nlmfSlgHBFx36j/Pl/KQPbIaqE8Zf0TqmSMjsuddHDg6PMSVgmyW9HpkLs0o0M1n2GIZ/S2BZBLIww/xjhiGng==", - "dev": true, - "optional": true, - "requires": { - "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "optional": true - } - } - }, "mathml-tag-names": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz", @@ -11992,9 +12190,9 @@ } }, "mdast-util-compact": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.3.tgz", - "integrity": "sha512-nRiU5GpNy62rZppDKbLwhhtw5DXoFMqw9UNZFmlPsNaQCZ//WLjGKUwWMdJrUH+Se7UvtO2gXtAMe0g/N+eI5w==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz", + "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==", "requires": { "unist-util-visit": "^1.1.0" } @@ -12024,13 +12222,6 @@ "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - } } }, "memoizerific": { @@ -12049,24 +12240,51 @@ "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", + "minimist-options": "^3.0.1", "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" } }, "merge-deep": { @@ -12080,19 +12298,6 @@ "kind-of": "^3.0.2" }, "dependencies": { - "clone-deep": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", - "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", - "dev": true, - "requires": { - "for-own": "^0.1.3", - "is-plain-object": "^2.0.1", - "kind-of": "^3.0.2", - "lazy-cache": "^1.0.3", - "shallow-clone": "^0.1.2" - } - }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -12101,35 +12306,6 @@ "requires": { "is-buffer": "^1.1.5" } - }, - "shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^2.0.1", - "lazy-cache": "^0.2.3", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", - "dev": true, - "requires": { - "is-buffer": "^1.0.2" - } - }, - "lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", - "dev": true - } - } } } }, @@ -12208,10 +12384,9 @@ } }, "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "mimic-response": { "version": "1.0.1", @@ -12265,6 +12440,16 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } } } }, @@ -12300,6 +12485,23 @@ "is-plain-obj": "^1.1.0" } }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -12419,11 +12621,6 @@ "integrity": "sha512-gFD2xGCl8YFgGHsqJ9NKRVdwlioeW3mI1iqfLNYQOv0+6JRwG58Zk9DIGQgyIaffSYaO1xsKnMaYzzNr1KyIAw==", "dev": true }, - "mout": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", - "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -12462,16 +12659,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", @@ -12517,6 +12704,14 @@ "railroad-diagrams": "^1.0.0", "randexp": "0.4.6", "semver": "^5.4.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "negotiator": { @@ -12529,6 +12724,11 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -12592,6 +12792,17 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true + }, + "tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } } } }, @@ -12631,10 +12842,54 @@ "vm-browserify": "^1.0.1" }, "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } } } }, @@ -12658,9 +12913,9 @@ } }, "node-releases": { - "version": "1.1.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.36.tgz", - "integrity": "sha512-ggXhX6QGyJSjj3r+6ml2LqqC28XOWmKtpb+a15/Zpr9V3yoNazxJNlcQDS9bYaid5FReEWHEgToH1mwoUceWwg==", + "version": "1.1.39", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.39.tgz", + "integrity": "sha512-8MRC/ErwNCHOlAFycy9OPca46fQYUjbJRDcZTHVWIGXIjYLM73k70vv3WkYutVnM4cCo4hE0MqBVVZjP6vjISA==", "requires": { "semver": "^6.3.0" }, @@ -12673,9 +12928,9 @@ } }, "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz", + "integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -12685,7 +12940,7 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", @@ -12697,12 +12952,34 @@ "true-case-path": "^1.0.2" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -12726,11 +13003,188 @@ "which": "^1.2.9" } }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, @@ -12772,28 +13226,7 @@ "normalize-url": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", - "dev": true - }, - "npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "optional": true, - "requires": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true - } - } + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" }, "npm-run-path": { "version": "2.0.2", @@ -12824,6 +13257,38 @@ "boolbase": "~1.0.0" } }, + "nugget": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", + "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", + "dev": true, + "requires": { + "debug": "^2.1.3", + "minimist": "^1.1.0", + "pretty-bytes": "^1.0.2", + "progress-stream": "^1.1.0", + "request": "^2.45.0", + "single-line-log": "^1.1.2", + "throttleit": "0.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", @@ -12851,9 +13316,9 @@ } }, "nwsapi": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", - "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, "oauth-sign": { @@ -12901,9 +13366,9 @@ "dev": true }, "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" }, "object-is": { "version": "1.0.1", @@ -12990,9 +13455,9 @@ } }, "oboe": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.3.tgz", - "integrity": "sha1-K0hl29Rr6BIlcT9Om/5Lz09oCk8=", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", "requires": { "http-https": "^1.0.0" } @@ -13030,6 +13495,14 @@ "dev": true, "requires": { "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + } } }, "open": { @@ -13064,27 +13537,21 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true } } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "original": { @@ -13107,12 +13574,13 @@ "dev": true }, "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "requires": { - "lcid": "^1.0.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, "os-tmpdir": { @@ -13134,8 +13602,7 @@ "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" }, "p-defer": { "version": "1.0.0", @@ -13162,19 +13629,19 @@ "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "requires": { - "p-try": "^2.0.0" + "p-try": "^1.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "p-limit": "^2.0.0" + "p-limit": "^1.1.0" } }, "p-map": { @@ -13205,9 +13672,9 @@ } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, "package-json": { "version": "6.5.0", @@ -13242,6 +13709,35 @@ "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "param-case": { @@ -13260,6 +13756,14 @@ "dev": true, "requires": { "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + } } }, "parse-asn1": { @@ -13275,6 +13779,23 @@ "safe-buffer": "^5.1.1" } }, + "parse-color": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-color/-/parse-color-1.0.0.tgz", + "integrity": "sha1-e3SLlag/A/FqlPU15S1/PZRlhhk=", + "dev": true, + "requires": { + "color-convert": "~0.5.0" + }, + "dependencies": { + "color-convert": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz", + "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0=", + "dev": true + } + } + }, "parse-entities": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", @@ -13298,12 +13819,12 @@ } }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse-passwd": { @@ -13313,10 +13834,13 @@ "dev": true }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "dev": true, + "requires": { + "@types/node": "*" + } }, "parseurl": { "version": "1.3.3", @@ -13339,13 +13863,9 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" }, "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -13368,29 +13888,26 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "requires": { "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - } } }, "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } } }, "pbkdf2": { @@ -13416,9 +13933,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, "pinkie": { "version": "2.0.4", @@ -13457,69 +13974,59 @@ "requires": { "locate-path": "^3.0.0" } - } - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" } } }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "dev": true, + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" + } + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -13536,12 +14043,12 @@ } }, "polished": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/polished/-/polished-3.4.1.tgz", - "integrity": "sha512-GflTnlP5rrpDoigjczEkS6Ye7NDA4sFvAnlr5hSDrEvjiVj97Xzev3hZlLi3UB27fpxyTS9rWU64VzVLWkG+mg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/polished/-/polished-3.4.2.tgz", + "integrity": "sha512-9Rch6iMZckABr6EFCLPZsxodeBpXMo9H4fRlfR/9VjMEyy5xpo1/WgXlJGgSjPyVhEZNycbW7UmYMNyWS5MI0g==", "dev": true, "requires": { - "@babel/runtime": "^7.4.5" + "@babel/runtime": "^7.6.3" } }, "popper.js": { @@ -13576,9 +14083,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "7.0.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", - "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", + "version": "7.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", + "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -13688,6 +14195,25 @@ "postcss": "^7.0.16", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", + "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "dev": true + } } }, "postcss-modules-scope": { @@ -13698,6 +14224,19 @@ "requires": { "postcss": "^7.0.6", "postcss-selector-parser": "^6.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } } }, "postcss-modules-values": { @@ -13752,12 +14291,11 @@ } }, "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", - "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", - "dev": true, + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", "requires": { - "cssesc": "^3.0.0", + "dot-prop": "^4.1.1", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -13777,9 +14315,9 @@ "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==" }, "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" }, "prelude-ls": { "version": "1.1.2", @@ -13790,116 +14328,342 @@ "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "pretty-bytes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" + "get-stdin": "^4.0.1", + "meow": "^3.1.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", "dev": true - } - } - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "prismjs": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", - "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", - "dev": true, - "requires": { - "clipboard": "^2.0.0" - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "promise.allsettled": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.1.tgz", - "integrity": "sha512-3ST7RS7TY3TYLOIe+OACZFvcWVe1osbgz2x07nTb446pa3t4GUZWidMDzQ4zf9jC2l6mRa1/3X81icFYbi+D/g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.13.0", - "function-bind": "^1.1.1" - } - }, - "promise.prototype.finally": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/promise.prototype.finally/-/promise.prototype.finally-3.1.1.tgz", - "integrity": "sha512-gnt8tThx0heJoI3Ms8a/JdkYBVhYP/wv+T7yQimR+kdOEJL21xTFbiJhMRqnSPcr54UVvMbsscDk2w+ivyaLPw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.13.0", - "function-bind": "^1.1.1" - } - }, + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "prismjs": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", + "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", + "dev": true, + "requires": { + "clipboard": "^2.0.0" + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "progress-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", + "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", + "dev": true, + "requires": { + "speedometer": "~0.1.2", + "through2": "~0.2.3" + }, + "dependencies": { + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9", + "xtend": "~2.1.1" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "~2.0.3" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "promise.allsettled": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.1.tgz", + "integrity": "sha512-3ST7RS7TY3TYLOIe+OACZFvcWVe1osbgz2x07nTb446pa3t4GUZWidMDzQ4zf9jC2l6mRa1/3X81icFYbi+D/g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.13.0", + "function-bind": "^1.1.1" + } + }, + "promise.prototype.finally": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/promise.prototype.finally/-/promise.prototype.finally-3.1.1.tgz", + "integrity": "sha512-gnt8tThx0heJoI3Ms8a/JdkYBVhYP/wv+T7yQimR+kdOEJL21xTFbiJhMRqnSPcr54UVvMbsscDk2w+ivyaLPw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.13.0", + "function-bind": "^1.1.1" + } + }, "prompts": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.2.1.tgz", - "integrity": "sha512-VObPvJiWPhpZI6C5m60XOzTfnYg/xc/an+r9VYymj9WJW3B/DIH+REzjpAACPf8brwPeP+7vz3bIim3S+AaMjw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.0.tgz", + "integrity": "sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg==", "dev": true, "requires": { "kleur": "^3.0.3", @@ -13936,13 +14700,6 @@ "xtend": "^4.0.1" } }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true, - "optional": true - }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -14073,12 +14830,6 @@ "yargs": "~3.10.0" } }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", @@ -14197,16 +14948,16 @@ "dev": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "requires": { + "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", "strict-uri-encode": "^1.0.0" } @@ -14279,11 +15030,6 @@ "safe-buffer": "^5.1.0" } }, - "randomhex": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", - "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -14298,13 +15044,6 @@ "http-errors": "1.7.2", "iconv-lite": "0.4.24", "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - } } }, "raw-loader": { @@ -14396,9 +15135,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "browserslist": { @@ -14465,6 +15204,12 @@ "slash": "^1.0.0" } }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, "inquirer": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", @@ -14486,34 +15231,77 @@ "through": "^2.3.6" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } }, - "path-type": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "p-limit": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } } } @@ -14533,6 +15321,12 @@ "recast": "^0.17.3" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "recast": { "version": "0.17.6", "resolved": "https://registry.npmjs.org/recast/-/recast-0.17.6.tgz", @@ -14562,23 +15356,12 @@ "object-assign": "^4.1.1", "prop-types": "^15.6.2", "scheduler": "^0.17.0" - }, - "dependencies": { - "scheduler": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", - "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - } } }, "react-draggable": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.0.3.tgz", - "integrity": "sha512-4vD6zms+9QGeZ2RQXzlUBw8PBYUXy+dzYX5r22idjp9YwQKIIvD/EojL0rbjS1GK4C3P0rAJnmKa8gDQYWUDyA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.1.0.tgz", + "integrity": "sha512-Or/qe70cfymshqoC8Lsp0ukTzijJObehb7Vfl7tb5JRxoV+b6PDkOGoqYaWBzZ59k9dH/bwraLGsnlW78/3vrA==", "dev": true, "requires": { "classnames": "^2.2.5", @@ -14638,9 +15421,9 @@ } }, "react-is": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.10.2.tgz", - "integrity": "sha512-INBT1QEgtcCCgvccr5/86CfD71fw9EPmDxgiJX4I2Ddr6ZsV6iFXsuby+qWJPtmNuMY0zByTsG4468P7nHuNWA==" + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", + "integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -14649,9 +15432,9 @@ "dev": true }, "react-popper": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.4.tgz", - "integrity": "sha512-9AcQB29V+WrBKk6X7p0eojd1f25/oJajVdMZkywIoAV6Ag7hzE1Mhyeup2Q1QnvFRtGQFQvtqfhlEoDAPfKAVA==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.6.tgz", + "integrity": "sha512-kLTfa9z8n+0jJvRVal9+vIuirg41rObg4Bbrvv/ZfsGPQDN9reyVVSxqnHF1ZNgXgV7x11PeUfd5ItF8DZnqhg==", "dev": true, "requires": { "@babel/runtime": "^7.1.2", @@ -14684,9 +15467,9 @@ } }, "react-popper-tooltip": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/react-popper-tooltip/-/react-popper-tooltip-2.9.1.tgz", - "integrity": "sha512-LSbvXLEQlNKWig2GMKQW/1bBwCkWIr9cpJ+WJpSGGGhX45CthRtwyilPPLJQkc3qI6UMTAXPp0Fe/pj9E77trg==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/react-popper-tooltip/-/react-popper-tooltip-2.10.0.tgz", + "integrity": "sha512-iMNWaY41G7kcx2/kcV+37GLe4C93yI9CPZ9DH+V9tOtJIJwEzm/w9+mlr6G1QLzxefDxjliqymMXk9X73pyuWA==", "dev": true, "requires": { "@babel/runtime": "^7.6.3", @@ -14725,9 +15508,9 @@ } }, "react-sizeme": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/react-sizeme/-/react-sizeme-2.6.9.tgz", - "integrity": "sha512-bKHpOoLWRhKgvMZmS+4NQhlQApuMwZySqweQ2vqSoqgAy+Bc0L6ApTrKU7+Wf4xJL62SmCwOSBKGBu0PthPhTA==", + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/react-sizeme/-/react-sizeme-2.6.10.tgz", + "integrity": "sha512-OJAPQxSqbcpbsXFD+fr5ARw4hNSAOimWcaTOLcRkIqnTp9+IFWY0w3Qdw1sMez6Ao378aimVL/sW6TTsgigdOA==", "dev": true, "requires": { "element-resize-detector": "^1.1.15", @@ -14750,21 +15533,21 @@ } }, "react-test-renderer": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.10.2.tgz", - "integrity": "sha512-k9Qzyev6cTIcIfrhgrFlYQAFxh5EEDO6ALNqYqmKsWVA7Q/rUMTay5nD3nthi6COmYsd4ghVYyi8U86aoeMqYQ==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.11.0.tgz", + "integrity": "sha512-nh9gDl8R4ut+ZNNb2EeKO5VMvTKxwzurbSMuGBoKtjpjbg8JK/u3eVPVNi1h1Ue+eYK9oSzJjb+K3lzLxyA4ag==", "dev": true, "requires": { "object-assign": "^4.1.1", "prop-types": "^15.6.2", "react-is": "^16.8.6", - "scheduler": "^0.16.2" + "scheduler": "^0.17.0" } }, "react-textarea-autosize": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-7.1.0.tgz", - "integrity": "sha512-c2FlR/fP0qbxmlrW96SdrbgP/v0XZMTupqB90zybvmDVDutytUgPl7beU35klwcTeMepUIQEpQUn3P3bdshGPg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-7.1.2.tgz", + "integrity": "sha512-uH3ORCsCa3C6LHxExExhF4jHoXYCQwE5oECmrRsunlspaDAbS4mGKNlWZqjLfInWtFQcf0o1n1jC/NGXFdUBCg==", "dev": true, "requires": { "@babel/runtime": "^7.1.2", @@ -14772,65 +15555,78 @@ } }, "read-config-file": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-5.0.0.tgz", - "integrity": "sha512-jIKUu+C84bfnKxyJ5j30CxCqgXWYjZLXuVE/NYlMEpeni+dhESgAeZOZd0JZbg1xTkMmnCdxksDoarkOyfEsOg==", - "dev": true, - "requires": { - "dotenv": "^8.0.0", - "dotenv-expand": "^5.1.0", - "fs-extra": "^8.1.0", - "js-yaml": "^3.13.1", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-3.2.2.tgz", + "integrity": "sha512-PuFpMgZF01VB0ydH1dfitAxCP/fh+qnfbA9cYNIPoxPbz0SMngsrafCtaHDWfER7MwlDz4fmrNBhPkakxxFpTg==", + "dev": true, + "requires": { + "ajv": "^6.9.2", + "ajv-keywords": "^3.4.0", + "bluebird-lst": "^1.0.7", + "dotenv": "^6.2.0", + "dotenv-expand": "^4.2.0", + "fs-extra-p": "^7.0.1", + "js-yaml": "^3.12.1", "json5": "^2.1.0", "lazy-val": "^1.0.4" }, "dependencies": { + "dotenv-expand": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-4.2.0.tgz", + "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=", + "dev": true + }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "requires": { - "graceful-fs": "^4.2.0", + "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } + }, + "fs-extra-p": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-7.0.1.tgz", + "integrity": "sha512-yhd2OV0HnHt2oitlp+X9hl2ReX4X/7kQeL7/72qzPHTZj5eUPGzAKOvEglU02Fa1OeG2rSy/aKB4WGVaLiF8tw==", + "dev": true, + "requires": { + "bluebird-lst": "^1.0.7", + "fs-extra": "^7.0.1" + } } } }, "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "load-json-file": "^1.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, "readdirp": { @@ -14841,6 +15637,35 @@ "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "realpath-native": { @@ -14897,13 +15722,12 @@ } }, "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" } }, "reflect.ownkeys": { @@ -15106,6 +15930,23 @@ "htmlparser2": "^3.3.0", "strip-ansi": "^3.0.0", "utila": "^0.4.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, "repeat-element": { @@ -15157,24 +15998,31 @@ "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } } }, "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", + "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.15" } }, "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", + "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", "dev": true, "requires": { - "request-promise-core": "1.1.2", + "request-promise-core": "1.1.3", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" } @@ -15252,6 +16100,19 @@ "is-windows": "^1.0.1", "resolve-dir": "^1.0.0" } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } } } }, @@ -15274,7 +16135,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, "requires": { "lowercase-keys": "^1.0.0" } @@ -15333,30 +16193,6 @@ "bn.js": "^4.11.1" } }, - "roarr": { - "version": "2.14.4", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.14.4.tgz", - "integrity": "sha512-QMzRAQGZFPgnx4nNWp4Q+WHfiZh2HTSEjNaxFLrEIj3PmcQ1GHL5OjaaIyF9ybUDD2aZ9t3Awc/obrRPils9ng==", - "dev": true, - "optional": true, - "requires": { - "boolean": "^2.0.3", - "detect-node": "^2.0.4", - "globalthis": "^1.0.0", - "json-stringify-safe": "^5.0.1", - "semver-compare": "^1.0.0", - "sprintf-js": "^1.1.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true, - "optional": true - } - } - }, "rst-selector-parser": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", @@ -15459,85 +16295,338 @@ "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", "yargs": "^7.0.0" - } - }, - "sass-loader": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.0.tgz", - "integrity": "sha512-+qeMu563PN7rPdit2+n5uuYVR0SSVwm0JsOUsaJXzgYcClWSlmX0iHDnmeOobPkf5kUglVot3QS6SyLyaQoJ4w==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.2.3", - "neo-async": "^2.6.1", - "schema-utils": "^2.1.0", - "semver": "^6.3.0" }, "dependencies": { - "schema-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", - "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true - } - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "scrypt": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", - "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", - "requires": { - "nan": "^2.0.8" - } - }, - "scrypt.js": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", - "integrity": "sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A==", - "requires": { - "scrypt": "^6.0.2", - "scryptsy": "^1.2.1" - } - }, - "scryptsy": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "sass-loader": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.0.tgz", + "integrity": "sha512-+qeMu563PN7rPdit2+n5uuYVR0SSVwm0JsOUsaJXzgYcClWSlmX0iHDnmeOobPkf5kUglVot3QS6SyLyaQoJ4w==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "loader-utils": "^1.2.3", + "neo-async": "^2.6.1", + "schema-utils": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "schema-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", + "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "scheduler": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", + "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "scrypt": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", + "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", + "optional": true, + "requires": { + "nan": "^2.0.8" + } + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "scrypt-shim": { + "version": "github:web3-js/scrypt-shim#be5e616323a8b5e568788bf94d03c1b8410eac54", + "from": "github:web3-js/scrypt-shim", + "requires": { + "scryptsy": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "scrypt.js": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", + "integrity": "sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A==", + "requires": { + "scrypt": "^6.0.2", + "scryptsy": "^1.2.1" + } + }, + "scryptsy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", "requires": { "pbkdf2": "^3.0.3" @@ -15585,16 +16674,6 @@ "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", "requires": { "commander": "~2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "requires": { - "graceful-readlink": ">= 1.0.0" - } - } } }, "select": { @@ -15622,13 +16701,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true, - "optional": true - }, "semver-diff": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", @@ -15680,25 +16752,6 @@ } } }, - "serialize-error": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-5.0.0.tgz", - "integrity": "sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==", - "dev": true, - "optional": true, - "requires": { - "type-fest": "^0.8.0" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "optional": true - } - } - }, "serialize-javascript": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", @@ -15865,21 +16918,41 @@ } }, "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", "dev": true, "requires": { - "kind-of": "^6.0.2" - } - }, - "shallow-equal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.0.tgz", - "integrity": "sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==", - "dev": true - }, - "shallowequal": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "dev": true, + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", + "dev": true + } + } + }, + "shallow-equal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.0.tgz", + "integrity": "sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==", + "dev": true + }, + "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", @@ -15965,17 +17038,62 @@ "simplebar": "^4.2.3" } }, + "single-line-log": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", + "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", + "dev": true, + "requires": { + "string-width": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "sisteransi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.3.tgz", - "integrity": "sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz", + "integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==", "dev": true }, "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" }, "slice-ansi": { "version": "2.1.0", @@ -16169,9 +17287,9 @@ } }, "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -16252,18 +17370,6 @@ "obuf": "^1.1.2", "readable-stream": "^3.0.6", "wbuf": "^1.7.3" - }, - "dependencies": { - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "specificity": { @@ -16271,6 +17377,12 @@ "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==" }, + "speedometer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", + "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=", + "dev": true + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -16362,6 +17474,38 @@ "dev": true, "requires": { "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stealthy-require": { @@ -16383,6 +17527,35 @@ "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-each": { @@ -16404,6 +17577,35 @@ "readable-stream": "^2.3.6", "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-shift": { @@ -16426,6 +17628,12 @@ "strip-ansi": "^4.0.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -16438,22 +17646,13 @@ } }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } + "strip-ansi": "^5.1.0" } }, "string.prototype.matchall": { @@ -16520,11 +17719,18 @@ } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } } }, "stringify-entities": { @@ -16539,28 +17745,17 @@ } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } + "ansi-regex": "^4.1.0" } }, "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, "strip-dirs": { "version": "2.1.0", @@ -16584,13 +17779,9 @@ } }, "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" }, "strip-json-comments": { "version": "2.0.1", @@ -16677,334 +17868,74 @@ "sugarss": "^2.0.0", "svg-tags": "^1.0.0", "table": "^5.0.0" + } + }, + "stylelint-config-rational-order": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/stylelint-config-rational-order/-/stylelint-config-rational-order-0.1.2.tgz", + "integrity": "sha512-Qo7ZQaihCwTqijfZg4sbdQQHtugOX/B1/fYh018EiDZHW+lkqH9uHOnsDwDPGZrYJuB6CoyI7MZh2ecw2dOkew==", + "requires": { + "stylelint": "^9.10.1", + "stylelint-order": "^2.2.1" + } + }, + "stylelint-config-recommended": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", + "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==" + }, + "stylelint-config-standard": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-19.0.0.tgz", + "integrity": "sha512-VvcODsL1PryzpYteWZo2YaA5vU/pWfjqBpOvmeA8iB2MteZ/ZhI1O4hnrWMidsS4vmEJpKtjdhLdfGJmmZm6Cg==", + "requires": { + "stylelint-config-recommended": "^3.0.0" + } + }, + "stylelint-order": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-2.2.1.tgz", + "integrity": "sha512-019KBV9j8qp1MfBjJuotse6MgaZqGVtXMc91GU9MsS9Feb+jYUvUU3Z8XiClqPdqJZQ0ryXQJGg3U3PcEjXwfg==", + "requires": { + "lodash": "^4.17.10", + "postcss": "^7.0.2", + "postcss-sorting": "^4.1.0" + } + }, + "sugarss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", + "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", + "requires": { + "postcss": "^7.0.2" + } + }, + "sumchecker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz", + "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=", + "dev": true, + "requires": { + "debug": "^2.2.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "ms": "2.0.0" } }, - "file-entry-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", - "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", - "requires": { - "flat-cache": "^2.0.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - } - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" - }, - "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "trim-newlines": { + "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "requires": { - "camelcase": "^4.1.0" - } + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, - "stylelint-config-rational-order": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/stylelint-config-rational-order/-/stylelint-config-rational-order-0.1.2.tgz", - "integrity": "sha512-Qo7ZQaihCwTqijfZg4sbdQQHtugOX/B1/fYh018EiDZHW+lkqH9uHOnsDwDPGZrYJuB6CoyI7MZh2ecw2dOkew==", - "requires": { - "stylelint": "^9.10.1", - "stylelint-order": "^2.2.1" - } - }, - "stylelint-config-recommended": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", - "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==" - }, - "stylelint-config-standard": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-19.0.0.tgz", - "integrity": "sha512-VvcODsL1PryzpYteWZo2YaA5vU/pWfjqBpOvmeA8iB2MteZ/ZhI1O4hnrWMidsS4vmEJpKtjdhLdfGJmmZm6Cg==", - "requires": { - "stylelint-config-recommended": "^3.0.0" - } - }, - "stylelint-order": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-2.2.1.tgz", - "integrity": "sha512-019KBV9j8qp1MfBjJuotse6MgaZqGVtXMc91GU9MsS9Feb+jYUvUU3Z8XiClqPdqJZQ0ryXQJGg3U3PcEjXwfg==", - "requires": { - "lodash": "^4.17.10", - "postcss": "^7.0.2", - "postcss-sorting": "^4.1.0" - } - }, - "sugarss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", - "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", - "requires": { - "postcss": "^7.0.2" - } - }, - "sumchecker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz", - "integrity": "sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==", - "dev": true, - "requires": { - "debug": "^4.1.0" - } - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -17025,17 +17956,17 @@ "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" }, "svgo": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", - "integrity": "sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", "dev": true, "requires": { "chalk": "^2.4.1", "coa": "^2.0.2", "css-select": "^2.0.0", "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.33", - "csso": "^3.5.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", "js-yaml": "^3.13.1", "mkdirp": "~0.5.1", "object.values": "^1.1.0", @@ -17046,58 +17977,44 @@ }, "dependencies": { "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^2.1.2", + "css-what": "^3.2.1", "domutils": "^1.7.0", "nth-check": "^1.0.2" } }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } + "css-what": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", + "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==", + "dev": true } } }, "swarm-js": { - "version": "0.1.37", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.37.tgz", - "integrity": "sha512-G8gi5fcXP/2upwiuOShJ258sIufBVztekgobr3cVgYXObZwJ5AXLqZn52AI+/ffft29pJexF9WNdUxjlkVehoQ==", + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", "requires": { "bluebird": "^3.5.0", "buffer": "^5.0.5", "decompress": "^4.0.0", "eth-lib": "^0.1.26", - "fs-extra": "^2.1.2", - "fs-promise": "^2.0.0", + "fs-extra": "^4.0.2", "got": "^7.1.0", "mime-types": "^2.1.16", "mkdirp-promise": "^5.0.1", "mock-fs": "^4.1.0", "setimmediate": "^1.0.5", - "tar.gz": "^1.0.5", + "tar": "^4.0.2", "xhr-request-promise": "^0.1.2" }, "dependencies": { - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -17169,31 +18086,6 @@ "lodash": "^4.17.14", "slice-ansi": "^2.1.0", "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } } }, "taffydb": { @@ -17208,13 +18100,17 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" } }, "tar-stream": { @@ -17229,31 +18125,41 @@ "readable-stream": "^2.3.0", "to-buffer": "^1.1.1", "xtend": "^4.0.0" - } - }, - "tar.gz": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/tar.gz/-/tar.gz-1.0.7.tgz", - "integrity": "sha512-uhGatJvds/3diZrETqMj4RxBR779LKlIE74SsMcn5JProZsfs9j0QBwWO1RW+IWNJxS2x8Zzra1+AW6OQHWphg==", - "requires": { - "bluebird": "^2.9.34", - "commander": "^2.8.1", - "fstream": "^1.0.8", - "mout": "^0.11.0", - "tar": "^2.1.1" }, "dependencies": { - "bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } } } }, "telejson": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/telejson/-/telejson-3.0.3.tgz", - "integrity": "sha512-gUOh6wox1zJjbGMg+e26NquZcp/F18EbIaqVvjiGqikRqVB4fYEAM8Nyin8smgwX30XhaRBOg+kCj4vInmvwAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/telejson/-/telejson-3.1.0.tgz", + "integrity": "sha512-mhiVy+xp2atri1bzSzdy/gVGXlOhibaoZ092AUq5xhnrZGdzhF0fLaOduHJQghkro+qmjYMwhsOL9CkD2zTicg==", "dev": true, "requires": { "@types/is-function": "^1.0.0", @@ -17266,11 +18172,27 @@ "memoizerific": "^1.11.3" }, "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, "isobject": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true } } }, @@ -17337,19 +18259,40 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, "terser": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.9.tgz", - "integrity": "sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.0.tgz", + "integrity": "sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==", "requires": { "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -17401,54 +18344,40 @@ "locate-path": "^3.0.0" } }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "p-try": "^2.0.0" } }, - "path-type": { + "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "p-limit": "^2.0.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, "read-pkg-up": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", @@ -17464,12 +18393,6 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, @@ -17479,22 +18402,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "thenify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", - "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, "throat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", @@ -17507,6 +18414,12 @@ "integrity": "sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg==", "dev": true }, + "throttleit": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -17519,6 +18432,35 @@ "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "thunky": { @@ -17607,8 +18549,7 @@ "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" }, "to-regex": { "version": "3.0.2", @@ -17684,10 +18625,9 @@ "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" }, "trim-trailing-lines": { "version": "1.1.2", @@ -17724,9 +18664,9 @@ "dev": true }, "ts-pnp": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.4.tgz", - "integrity": "sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.5.tgz", + "integrity": "sha512-ti7OGMOUOzo66wLF3liskw6YQIaSsBgc4GOAlWRnIEj8htCxJUxskanMUoJOD6MDCRAXo36goXJZch+nOS0VMA==", "dev": true }, "tslib": { @@ -17739,13 +18679,6 @@ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "optional": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -17759,6 +18692,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -17803,9 +18741,9 @@ } }, "typescript": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", - "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", + "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", "dev": true }, "ua-parser-js": { @@ -17821,15 +18759,21 @@ "dev": true }, "uglify-js": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.3.tgz", - "integrity": "sha512-KfQUgOqTkLp2aZxrMbCuKCDGW9slFYu2A23A36Gs7sGzTLcRBDORdOi5E21KWHFIfkY8kzgi/Pr1cXCh0yIp5g==", + "version": "3.6.8", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz", + "integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==", "dev": true, "requires": { "commander": "~2.20.3", "source-map": "~0.6.1" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -17857,24 +18801,12 @@ "requires": { "buffer": "^5.2.1", "through": "^2.3.8" - }, - "dependencies": { - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - } } }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", - "dev": true + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, "unfetch": { "version": "4.1.0", @@ -17976,9 +18908,9 @@ } }, "unist-util-find-all-after": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.4.tgz", - "integrity": "sha512-CaxvMjTd+yF93BKLJvZnEfqdM7fgEACsIpQqz8vIj9CJnUb9VpyymFS3tg6TCtgrF7vfCJBF5jbT2Ox9CBRYRQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz", + "integrity": "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==", "requires": { "unist-util-is": "^3.0.0" } @@ -17989,17 +18921,17 @@ "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" }, "unist-util-remove-position": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", - "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", + "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", "requires": { "unist-util-visit": "^1.1.0" } }, "unist-util-stringify-position": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz", - "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.2.tgz", + "integrity": "sha512-nK5n8OGhZ7ZgUwoUbL8uiVRwAbZyzBsB/Ddrlbu6jwwubFza4oe15KlyEaLNMXQW1svOQq4xesUeqA85YrIUQA==", "requires": { "@types/unist": "^2.0.2" } @@ -18023,8 +18955,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unpipe": { "version": "1.0.0", @@ -18070,6 +19001,11 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" } } }, @@ -18096,6 +19032,14 @@ "latest-version": "^5.0.0", "semver-diff": "^2.0.0", "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + } } }, "upper-case": { @@ -18175,7 +19119,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, "requires": { "prepend-http": "^2.0.0" } @@ -18273,13 +19216,6 @@ "integrity": "sha512-i/aOdu1FPW48Y2NRt/BmHxcpoKcl7vvGtxUkPoacUVNU8jtPlb68QYcYqt7Fls9wqO5YpfLEoUHCrpk3pkIqsQ==", "requires": { "date-fns": "2.0.1" - }, - "dependencies": { - "date-fns": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.0.1.tgz", - "integrity": "sha512-C14oTzTZy8DH1Eq8N78owrCWvf3+cnJw88BTK/N3DYWVxDJuJzPaNdplzYxDYuuXXGvqBcO4Vy5SOrwAooXSWw==" - } } }, "value-equal": { @@ -18334,23 +19270,23 @@ } }, "vfile-location": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", - "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", + "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==" }, "vfile-message": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.1.tgz", - "integrity": "sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.2.tgz", + "integrity": "sha512-gNV2Y2fDvDOOqq8bEe7cF3DXU6QgV4uA9zMR2P8tix11l1r7zju3zry3wZ8sx+BEfuO6WQ7z2QzfWTvqHQiwsA==", "requires": { - "@types/unist": "^2.0.2", + "@types/unist": "^2.0.0", "unist-util-stringify-position": "^2.0.0" } }, "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "void-elements": { "version": "2.0.1", @@ -18359,9 +19295,9 @@ "dev": true }, "vue-docgen-api": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/vue-docgen-api/-/vue-docgen-api-3.25.0.tgz", - "integrity": "sha512-BhY/xjc/c+x6fqHW7Xi6N0eiYheTC+JtWXq3dNMGlMWl/qdcDaWPeenwhZg7YSZvzz/rq6TqcigkKSLAuS6QgA==", + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/vue-docgen-api/-/vue-docgen-api-3.26.0.tgz", + "integrity": "sha512-ujdg4i5ZI/wE46RZQMFzKnDGyhEuPCu+fMA86CAd9EIek/6+OqraSVBm5ZkLrbEd5f8xxdnqMU4yiSGHHeao/Q==", "dev": true, "requires": { "@babel/parser": "^7.2.3", @@ -18376,6 +19312,16 @@ "vue-template-compiler": "^2.0.0" }, "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "recast": { "version": "0.17.6", "resolved": "https://registry.npmjs.org/recast/-/recast-0.17.6.tgz", @@ -18393,6 +19339,12 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, @@ -18473,257 +19425,174 @@ "neo-async": "^2.5.0" } }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "web3": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.34.tgz", - "integrity": "sha1-NH5WG3hAmMtVYzFfSQR5odkfKrE=", - "requires": { - "web3-bzz": "1.0.0-beta.34", - "web3-core": "1.0.0-beta.34", - "web3-eth": "1.0.0-beta.34", - "web3-eth-personal": "1.0.0-beta.34", - "web3-net": "1.0.0-beta.34", - "web3-shh": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" - } - }, - "web3-bzz": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.34.tgz", - "integrity": "sha1-Bo03d3q2Xlxg+OyLmlDP5FJ3kpw=", - "requires": { - "got": "7.1.0", - "swarm-js": "0.1.37", - "underscore": "1.8.3" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "web3-core": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.34.tgz", - "integrity": "sha1-EhvoVV6fsA0sXQXd0zgdDJ5GmH4=", + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-core-requestmanager": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "minimalistic-assert": "^1.0.0" } }, - "web3-core-helpers": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.34.tgz", - "integrity": "sha1-sWjaANPhnhVrwVriAyA91N/uLQM=", + "web3": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.2.tgz", + "integrity": "sha512-/ChbmB6qZpfGx6eNpczt5YSUBHEA5V2+iUCbn85EVb3Zv6FVxrOo5Tv7Lw0gE2tW7EEjASbCyp3mZeiZaCCngg==", + "requires": { + "@types/node": "^12.6.1", + "web3-bzz": "1.2.2", + "web3-core": "1.2.2", + "web3-eth": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-shh": "1.2.2", + "web3-utils": "1.2.2" + }, + "dependencies": { + "@types/node": { + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==" + } + } + }, + "web3-bzz": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.2.tgz", + "integrity": "sha512-b1O2ObsqUN1lJxmFSjvnEC4TsaCbmh7Owj3IAIWTKqL9qhVgx7Qsu5O9cD13pBiSPNZJ68uJPaKq380QB4NWeA==", "requires": { - "underscore": "1.8.3", - "web3-eth-iban": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" }, "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + "@types/node": { + "version": "10.17.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.5.tgz", + "integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==" } } }, - "web3-core-method": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.34.tgz", - "integrity": "sha1-7BY8iixJD6AqfsFVWfpzB/x8xt0=", - "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-promievent": "1.0.0-beta.34", - "web3-core-subscriptions": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "web3-core": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.2.tgz", + "integrity": "sha512-miHAX3qUgxV+KYfaOY93Hlc3kLW2j5fH8FJy6kSxAv+d4d5aH0wwrU2IIoJylQdT+FeenQ38sgsCnFu9iZ1hCQ==", + "requires": { + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-requestmanager": "1.2.2", + "web3-utils": "1.2.2" }, "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + "@types/node": { + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==" } } }, + "web3-core-helpers": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.2.tgz", + "integrity": "sha512-HJrRsIGgZa1jGUIhvGz4S5Yh6wtOIo/TMIsSLe+Xay+KVnbseJpPprDI5W3s7H2ODhMQTbogmmUFquZweW2ImQ==", + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-core-method": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.2.tgz", + "integrity": "sha512-szR4fDSBxNHaF1DFqE+j6sFR/afv9Aa36OW93saHZnrh+iXSrYeUUDfugeNcRlugEKeUCkd4CZylfgbK2SKYJA==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-utils": "1.2.2" + } + }, "web3-core-promievent": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.34.tgz", - "integrity": "sha1-pPT6Z4S7KT6CxglgrltWqUzQPtw=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.2.tgz", + "integrity": "sha512-tKvYeT8bkUfKABcQswK6/X79blKTKYGk949urZKcLvLDEaWrM3uuzDwdQT3BNKzQ3vIvTggFPX9BwYh0F1WwqQ==", "requires": { "any-promise": "1.3.0", - "eventemitter3": "1.1.1" - }, - "dependencies": { - "eventemitter3": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", - "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=" - } + "eventemitter3": "3.1.2" } }, "web3-core-requestmanager": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.34.tgz", - "integrity": "sha1-Afj2zyrmtvC3DDi64e90G1urIVw=", - "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34", - "web3-providers-http": "1.0.0-beta.34", - "web3-providers-ipc": "1.0.0-beta.34", - "web3-providers-ws": "1.0.0-beta.34" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.2.tgz", + "integrity": "sha512-a+gSbiBRHtHvkp78U2bsntMGYGF2eCb6219aMufuZWeAZGXJ63Wc2321PCbA8hF9cQrZI4EoZ4kVLRI4OF15Hw==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "web3-providers-http": "1.2.2", + "web3-providers-ipc": "1.2.2", + "web3-providers-ws": "1.2.2" } }, "web3-core-subscriptions": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.34.tgz", - "integrity": "sha1-n+0UQDPyIcPPIQYDAv/a9e8t4t4=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.2.tgz", + "integrity": "sha512-QbTgigNuT4eicAWWr7ahVpJyM8GbICsR1Ys9mJqzBEwpqS+RXTRVSkwZ2IsxO+iqv6liMNwGregbJLq4urMFcQ==", "requires": { - "eventemitter3": "1.1.1", - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34" - }, - "dependencies": { - "eventemitter3": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", - "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" } }, "web3-eth": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.34.tgz", - "integrity": "sha1-dAhgAIUMb+b1Ne9Jg31tS7YRMmg=", - "requires": { - "underscore": "1.8.3", - "web3-core": "1.0.0-beta.34", - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-core-subscriptions": "1.0.0-beta.34", - "web3-eth-abi": "1.0.0-beta.34", - "web3-eth-accounts": "1.0.0-beta.34", - "web3-eth-contract": "1.0.0-beta.34", - "web3-eth-iban": "1.0.0-beta.34", - "web3-eth-personal": "1.0.0-beta.34", - "web3-net": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.2.tgz", + "integrity": "sha512-UXpC74mBQvZzd4b+baD4Ocp7g+BlwxhBHumy9seyE/LMIcMlePXwCKzxve9yReNpjaU16Mmyya6ZYlyiKKV8UA==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-accounts": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-eth-ens": "1.2.2", + "web3-eth-iban": "1.2.2", + "web3-eth-personal": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" } }, "web3-eth-abi": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.34.tgz", - "integrity": "sha1-A0Uz46ovfln/MXk+rqaFwO1a9no=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz", + "integrity": "sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw==", "requires": { - "bn.js": "4.11.6", - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.2" } }, "web3-eth-accounts": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.34.tgz", - "integrity": "sha1-4JFC7uzHl6w0WbdemyOUbTaV8zM=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.2.tgz", + "integrity": "sha512-KzHOEyXOEZ13ZOkWN3skZKqSo5f4Z1ogPFNn9uZbKCz+kSp+gCAEKxyfbOsB/JMAp5h7o7pb6eYsPCUBJmFFiA==", "requires": { "any-promise": "1.3.0", "crypto-browserify": "3.12.0", "eth-lib": "0.2.7", - "scrypt.js": "0.2.0", - "underscore": "1.8.3", - "uuid": "2.0.1", - "web3-core": "1.0.0-beta.34", - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-shim": "github:web3-js/scrypt-shim", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" }, "dependencies": { "eth-lib": { @@ -18736,169 +19605,147 @@ "xhr-request-promise": "^0.1.2" } }, - "scrypt.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz", - "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", - "requires": { - "scrypt": "^6.0.2", - "scryptsy": "^1.2.1" - } - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" } } }, "web3-eth-contract": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.34.tgz", - "integrity": "sha1-nbs4+udkOoCEJ6IBgEcOx0FckeY=", - "requires": { - "underscore": "1.8.3", - "web3-core": "1.0.0-beta.34", - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-core-promievent": "1.0.0-beta.34", - "web3-core-subscriptions": "1.0.0-beta.34", - "web3-eth-abi": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.2.tgz", + "integrity": "sha512-EKT2yVFws3FEdotDQoNsXTYL798+ogJqR2//CaGwx3p0/RvQIgfzEwp8nbgA6dMxCsn9KOQi7OtklzpnJMkjtA==", + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-utils": "1.2.2" + } + }, + "web3-eth-ens": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.2.tgz", + "integrity": "sha512-CFjkr2HnuyMoMFBoNUWojyguD4Ef+NkyovcnUc/iAb9GP4LHohKrODG4pl76R5u61TkJGobC2ij6TyibtsyVYg==", + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-promievent": "1.2.2", + "web3-eth-abi": "1.2.2", + "web3-eth-contract": "1.2.2", + "web3-utils": "1.2.2" } }, "web3-eth-iban": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.34.tgz", - "integrity": "sha1-mvRYYFhnzPdOqXmq8yazi6alugw=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.2.tgz", + "integrity": "sha512-gxKXBoUhaTFHr0vJB/5sd4i8ejF/7gIsbM/VvemHT3tF5smnmY6hcwSMmn7sl5Gs+83XVb/BngnnGkf+I/rsrQ==", "requires": { - "bn.js": "4.11.6", - "web3-utils": "1.0.0-beta.34" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } + "bn.js": "4.11.8", + "web3-utils": "1.2.2" } }, "web3-eth-personal": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.34.tgz", - "integrity": "sha1-mvuhZzQuveVCC81YlcP2w0OI8gU=", - "requires": { - "web3-core": "1.0.0-beta.34", - "web3-core-helpers": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-net": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.2.tgz", + "integrity": "sha512-4w+GLvTlFqW3+q4xDUXvCEMU7kRZ+xm/iJC8gm1Li1nXxwwFbs+Y+KBK6ZYtoN1qqAnHR+plYpIoVo27ixI5Rg==", + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.2", + "web3-core-helpers": "1.2.2", + "web3-core-method": "1.2.2", + "web3-net": "1.2.2", + "web3-utils": "1.2.2" + }, + "dependencies": { + "@types/node": { + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==" + } } }, "web3-net": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.34.tgz", - "integrity": "sha1-QnzqL0MYgUScjjjVIykPFz+f9j0=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.2.tgz", + "integrity": "sha512-K07j2DXq0x4UOJgae65rWZKraOznhk8v5EGSTdFqASTx7vWE/m+NqBijBYGEsQY1lSMlVaAY9UEQlcXK5HzXTw==", "requires": { - "web3-core": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-utils": "1.0.0-beta.34" + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-utils": "1.2.2" } }, "web3-providers-http": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.34.tgz", - "integrity": "sha1-5WG1K7tDdmKCAH1AKFv+NVDCfno=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.2.tgz", + "integrity": "sha512-BNZ7Hguy3eBszsarH5gqr9SIZNvqk9eKwqwmGH1LQS1FL3NdoOn7tgPPdddrXec4fL94CwgNk4rCU+OjjZRNDg==", "requires": { - "web3-core-helpers": "1.0.0-beta.34", - "xhr2": "0.1.4" + "web3-core-helpers": "1.2.2", + "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.34.tgz", - "integrity": "sha1-obd/GjBtc2SanAOQUuQMtxMo0Ao=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.2.tgz", + "integrity": "sha512-t97w3zi5Kn/LEWGA6D9qxoO0LBOG+lK2FjlEdCwDQatffB/+vYrzZ/CLYVQSoyFZAlsDoBasVoYSWZK1n39aHA==", "requires": { - "oboe": "2.1.3", - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2" } }, "web3-providers-ws": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.34.tgz", - "integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.2.tgz", + "integrity": "sha512-Wb1mrWTGMTXOpJkL0yGvL/WYLt8fUIXx8k/l52QB2IiKzvyd42dTWn4+j8IKXGSYYzOm7NMqv6nhA5VDk12VfA==", "requires": { - "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.34", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } + "underscore": "1.9.1", + "web3-core-helpers": "1.2.2", + "websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" } }, "web3-shh": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.34.tgz", - "integrity": "sha1-l1Bh1x6uxCzO5Xb3vY9w8DhEr+A=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.2.tgz", + "integrity": "sha512-og258NPhlBn8yYrDWjoWBBb6zo1OlBgoWGT+LL5/LPqRbjPe09hlOYHgscAAr9zZGtohTOty7RrxYw6Z6oDWCg==", "requires": { - "web3-core": "1.0.0-beta.34", - "web3-core-method": "1.0.0-beta.34", - "web3-core-subscriptions": "1.0.0-beta.34", - "web3-net": "1.0.0-beta.34" + "web3-core": "1.2.2", + "web3-core-method": "1.2.2", + "web3-core-subscriptions": "1.2.2", + "web3-net": "1.2.2" } }, "web3-utils": { - "version": "1.0.0-beta.34", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.34.tgz", - "integrity": "sha1-lBH8OarvOcpOBhafdiKX2f8CCXA=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.2.tgz", + "integrity": "sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A==", "requires": { - "bn.js": "4.11.6", - "eth-lib": "0.1.27", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", - "randomhex": "0.1.5", - "underscore": "1.8.3", - "utf8": "2.1.1" + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" }, "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "utf8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", - "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=" + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } } } }, @@ -18936,28 +19783,12 @@ "terser-webpack-plugin": "^1.4.1", "watchpack": "^1.6.0", "webpack-sources": "^1.4.1" - }, - "dependencies": { - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } } }, "webpack-cli": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.9.tgz", - "integrity": "sha512-xwnSxWl8nZtBl/AFJCOn9pG7s5CYUYdZxmmukv+fAHLcBIHM36dImfpQg3WfShZXeArkWlf6QRw24Klcsv8a5A==", + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.10.tgz", + "integrity": "sha512-u1dgND9+MXaEt74sJR4PR7qkPxXUSQ0RXYq8x1L6Jg1MYVEmGPrH6Ah6C4arD4r0J1P5HKjRqpab36k0eIzPqg==", "dev": true, "requires": { "chalk": "2.4.2", @@ -18973,12 +19804,6 @@ "yargs": "13.2.4" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -19022,58 +19847,46 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "invert-kv": "^2.0.0" + "p-try": "^2.0.0" } }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "p-limit": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -19089,12 +19902,6 @@ "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", "dev": true }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", @@ -19106,12 +19913,6 @@ "strip-ansi": "^5.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { "version": "13.2.4", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", @@ -19172,97 +19973,54 @@ "chokidar": "^2.1.8", "compression": "^1.7.4", "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.2.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.4", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.25", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.4.0", - "spdy": "^4.0.1", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "12.0.5" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.2.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.4", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.25", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.7", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.4.0", + "spdy": "^4.0.1", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -19271,11 +20029,6 @@ "has-flag": "^3.0.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, "ws": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", @@ -19283,34 +20036,6 @@ "requires": { "async-limiter": "~1.0.0" } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -19324,6 +20049,23 @@ "html-entities": "^1.2.0", "querystring": "^0.2.0", "strip-ansi": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, "webpack-log": { @@ -19352,12 +20094,13 @@ } }, "websocket": { - "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", - "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "version": "github:web3-js/WebSocket-Node#905deb4812572b344f5801f8c9ce8bb02799d82e", + "from": "github:web3-js/WebSocket-Node#polyfill/globalThis", "requires": { "debug": "^2.2.0", - "nan": "^2.3.3", - "typedarray-to-buffer": "^3.1.2", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", "yaeti": "^0.0.6" }, "dependencies": { @@ -19432,10 +20175,9 @@ } }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wide-align": { "version": "1.1.3", @@ -19444,6 +20186,33 @@ "dev": true, "requires": { "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "widest-line": { @@ -19453,6 +20222,33 @@ "dev": true, "requires": { "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "window-size": { @@ -19476,30 +20272,19 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", "dev": true - }, - "acorn-globals": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", - "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", - "dev": true, - "requires": { - "acorn": "^4.0.4" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", "dev": true }, "worker-farm": { @@ -19637,22 +20422,6 @@ "is-function": "^1.0.1", "parse-headers": "^2.0.0", "xtend": "^4.0.0" - }, - "dependencies": { - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - } - }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - } } }, "xhr-request": { @@ -19667,18 +20436,6 @@ "timed-out": "^4.0.1", "url-set-query": "^1.0.0", "xhr": "^2.0.4" - }, - "dependencies": { - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - } } }, "xhr-request-promise": { @@ -19689,10 +20446,13 @@ "xhr-request": "^1.0.1" } }, - "xhr2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } }, "xml-name-validator": { "version": "3.0.0", @@ -19700,21 +20460,38 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, "xmlcreate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.1.tgz", "integrity": "sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA==", "dev": true }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=", + "dev": true + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yaeti": { "version": "0.0.6", @@ -19722,75 +20499,111 @@ "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { - "number-is-nan": "^1.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } + "camelcase": "^4.1.0" } }, "yauzl": { diff --git a/package.json b/package.json index 979721a7..d923aae6 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,20 @@ "name": "zero_one-app", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "./src/electron.js", + "author": { + "name":"", + "email":"pavkahanov@neos1.com" + }, "scripts": { "render-test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", + "build": "webpack --mode=production --config webpack.dev.js && NODE_ENV=production electron-builder", "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", + "electron-build": "NODE_ENV=production electron-builder", "storybook": "start-storybook", - "docs": "jsdoc -c ./jsdoc.json", - "build": "webpack --config webpack.dev.js && electron-builder" + "docs": "jsdoc -c ./jsdoc.json" }, - "author": "neos1.com", "license": "ISC", "dependencies": { "@babel/core": "^7.6.4", @@ -54,8 +58,8 @@ "copy-webpack-plugin": "^5.0.4", "cross-env": "^6.0.3", "css-loader": "^3.2.0", - "electron": "^7.1.1", - "electron-builder": "^21.2.0", + "electron": "^3.0.11", + "electron-builder": "^20.38.3", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", "eslint": "^6.5.1", diff --git a/src/constants/index.js b/src/constants/index.js index ffee803b..edf2ce8e 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -10,17 +10,23 @@ export const votingStates = { export const fs = window.require('fs'); export const path = window.require('path'); +const ENV = process.env.NODE_ENV || 'development'; +window.__ENV = ENV; + +const devPath = window.process.env.INIT_CWD; +const prodPath = window.process.env.PORTABLE_EXECUTABLE_DIR || path.join(window.__dirname, '../src'); + export const ROOT_DIR = window.__ENV === 'production' - ? window.process.env.PORTABLE_EXECUTABLE_DIR - : path.join(window.process.env.INIT_CWD, './src/'); + ? prodPath + : path.join(devPath, './src/'); export const PATH_TO_WALLETS = window.__ENV === 'production' - ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './wallets/') - : path.join(window.process.env.INIT_CWD, './src/wallets/'); + ? path.join(prodPath, './wallets/') + : path.join(devPath, './src/wallets/'); export const PATH_TO_CONTRACTS = window.__ENV === 'production' - ? path.join(window.process.env.PORTABLE_EXECUTABLE_DIR, './contracts/') - : path.join(window.process.env.INIT_CWD, './src/contracts/'); + ? path.join(prodPath, './contracts/') + : path.join(devPath, './src/contracts/'); export const SOL_PATH_REGEXP = new RegExp(/(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')/g); export const SOL_IMPORT_REGEXP = new RegExp(/(import)*.(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')(;)/g); diff --git a/src/electron.js b/src/electron.js index 3e564bd0..d1464cc9 100644 --- a/src/electron.js +++ b/src/electron.js @@ -19,7 +19,11 @@ function createWindow() { nodeIntegration: true, }, }); - mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, './build/ballot/index.html')}`); + mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`); + // eslint-disable-next-line no-unused-expressions + isDev + ? process.env.NODE_ENV = 'production' + : process.env.NODE_ENV = 'development'; mainWindow.on('closed', () => mainWindow = null); electronLocalshortcut.register(mainWindow, 'F12', () => { From 62ebb524b1f7d3fe2e42adde01a20fd3a30cbfb1 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 11 Nov 2019 18:34:09 +0700 Subject: [PATCH 100/219] Fixes --- src/components/CreationAlert/index.js | 7 +- src/components/Input/index.js | 3 +- src/components/InputSeed/SeedForm.js | 52 +++++++++++ src/components/InputSeed/index.js | 88 +++++++------------ src/stores/UserStore/UserStore.js | 2 +- ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 +++++ 6 files changed, 113 insertions(+), 60 deletions(-) create mode 100644 src/components/InputSeed/SeedForm.js create mode 100644 src/wallets/UTC--2019-11-1T11-19-35.359000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 78a91601..d2747f9d 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -1,3 +1,4 @@ +/* eslint-disable no-nested-ternary */ import React from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; @@ -16,10 +17,8 @@ const CreationAlert = ({ success = false, recover = false }) => (
- {success ? 'Создание кошелька' : ''} - {success ? 'Кошелек успешно создан' : ''} - {recover ? 'Восстановление кошелька' : ''} - {recover ? 'Кошелек успешно восстанолен' : ''} + {success ? 'Создание кошелька' : recover ? 'Восстановление кошелька' : ''} + {success ? 'Кошелек успешно создан' : recover ? 'Кошелек успешно восстанолен' : ''} +
+ + ); + } +} + +SeedInput.propTypes = { + submit: propTypes.func.isRequired, + error: propTypes.func.isRequired, + seed: propTypes.arrayOf(propTypes.string).isRequired, +}; + +export default SeedInput; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index f6dd4344..4742c298 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -1,3 +1,4 @@ +/* eslint-disable max-len */ /* eslint-disable no-empty */ /* eslint-disable no-console */ /* eslint-disable no-unused-vars */ @@ -9,13 +10,13 @@ import Container from '../Container'; import Header from '../Header'; import Heading from '../Heading'; import Input from '../Input'; -import SeedForm from '../../stores/FormsStore/SeedForm'; import styles from '../Login/Login.scss'; import FormBlock from '../FormBlock'; import { Button, IconButton } from '../Button'; import { BackIcon } from '../Icons'; import Loader from '../Loader'; +import SeedInput from './SeedForm'; @inject('appStore', 'userStore') @@ -41,43 +42,40 @@ class InputSeed extends Component { }); } - render() { + submitForm=(form) => { const { userStore, appStore, recover } = this.props; + const values = Object.values(form.values()); + userStore.mnemonicRepeat = values; + const mnemonic = values.join(' '); + if (userStore.isSeedValid(mnemonic)) { + this.toggleLoading(); + if (recover) { + userStore.recoverWallet(mnemonic) + .then((data) => { + userStore.setEncryptedWallet(data.v3wallet); + userStore.getEthBalance(); + this.setRedirect(); + }); + } else if (!recover) { + if (userStore.isSeedValid(mnemonic)) { + userStore.saveWalletToFile(); + this.setRedirect(); + } + } + } else { + appStore.displayAlert('Проверьте правильность заполнения полей', 2000); + } + } + + showError=() => { + const { appStore } = this.props; + appStore.displayAlert('Заполните все поля', 2000); + } + + render() { + const { userStore, recover } = this.props; const { _mnemonic: seed } = userStore; const { loading, redirect } = this.state; - const { setRedirect, toggleLoading } = this; - const seedForm = new SeedForm({ - hooks: { - onSuccess(form) { - const values = Object.values(form.values()); - userStore._mnemonic = values; - const mnemonic = values.join(' '); - if (userStore.isSeedValid(mnemonic)) { - toggleLoading(); - if (recover) { - userStore.recoverWallet(mnemonic) - .then((data) => { - console.log(data); - userStore.setEncryptedWallet(data.v3wallet); - userStore.getEthBalance(); - setRedirect(); - }); - } else if (!recover) { - if (userStore.isSeedValid(mnemonic)) { - userStore.saveWalletToFile(); - setRedirect(); - } - } - } else { - appStore.displayAlert('Проверьте правильность заполнения полей', 2000); - } - }, - onError(form) { - appStore.displayAlert('Заполните все поля', 2000); - console.log(`ALARM ${form}`); - }, - }, - }); if (redirect) return recover ? : ; return ( @@ -88,7 +86,7 @@ class InputSeed extends Component { {'Проверка резервной фразы'} {loading ? 'Проверяется фраза' : 'Введите фразу, которую вы записали'} - {loading ? : } + {loading ? : }
@@ -102,20 +100,6 @@ class InputSeed extends Component { } } -const InputBlock = ({ form, seed }) => ( -
-
- {seed.map((word, index) => ( - - {index + 1} - - ))} -
-
- -
-
-); InputSeed.propTypes = { userStore: propTypes.object.isRequired, @@ -123,9 +107,5 @@ InputSeed.propTypes = { recover: propTypes.bool.isRequired, }; -InputBlock.propTypes = { - form: propTypes.object.isRequired, - seed: propTypes.arrayOf(propTypes.string).isRequired, -}; export default InputSeed; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 34bde5d1..0bcf5585 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -18,7 +18,7 @@ class UserStore { @observable _mnemonic = Array(12); - @observable _mnemonicRepeat = []; + @observable _mnemonicRepeat = Array(12); @observable address = ''; diff --git a/src/wallets/UTC--2019-11-1T11-19-35.359000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-11-1T11-19-35.359000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json new file mode 100644 index 00000000..1e5628ec --- /dev/null +++ b/src/wallets/UTC--2019-11-1T11-19-35.359000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "ed6e6845-0e69-4942-aa6d-4aee9ae76ad4", + "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", + "crypto": { + "ciphertext": "819d60d45c757ec36b78d28a7f1fd09c77d854430bbce1ff89ca32d21467b4ba", + "cipherparams": { + "iv": "e573cf3328ed3ea7a0307c3c06b29e1b" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "19f55c87d370534c472ee956c199bdd45640cae0b30afe0bc44e9b36d786bdf6", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "6aa8b2e509396457608e68566c0c90d559b4e929fb83eea7391b401e1be742d6" + } +} \ No newline at end of file From c26e922c16680d34cb829224137e6f72b387010e Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 07:57:36 +0700 Subject: [PATCH 101/219] fixed some issues --- src/components/Button/index.js | 12 ++- .../CreateNewProjectWithTokens/index.js | 4 +- .../CreateNewProjectWithoutTokens/index.js | 4 +- src/components/CreateWallet/PasswordForm.js | 2 +- src/components/Input/Input.scss | 3 +- src/components/InputSeed/SeedForm.js | 2 +- src/components/LangSwitcher/LangSwitcher.scss | 4 + src/components/LangSwitcher/index.js | 73 ++++++++++++++++--- src/stores/AppStore/AppStore.js | 7 +- 9 files changed, 88 insertions(+), 23 deletions(-) diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 8cc977e4..5bac475a 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -4,9 +4,9 @@ import propTypes from 'prop-types'; import styles from './Button.scss'; export const Button = ({ - children, type, className, onClick, + children, type, disabled, className, onClick, }) => ( - +
@@ -184,7 +184,7 @@ const InputProjectData = ({ form, onClick }) => (
- +
diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index dffab139..cf38bbb3 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -183,7 +183,7 @@ const CreateTokenData = inject('userStore')(observer(({ userStore: { address },
- +
@@ -247,7 +247,7 @@ const InputProjectData = ({ form, onClick }) => (
- +
diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index d2b9aae1..944442f7 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -44,7 +44,7 @@ class PasswordForm extends Component {
- +
diff --git a/src/components/Input/Input.scss b/src/components/Input/Input.scss index 123f4387..6660a398 100644 --- a/src/components/Input/Input.scss +++ b/src/components/Input/Input.scss @@ -2,7 +2,7 @@ .field { position: relative; display: inline-block; - padding: 8px 5px; + padding: 0 5px; text-align: left; border-bottom: 1px solid $lightGrey; svg { @@ -12,6 +12,7 @@ &__input { width: 85%; margin-left: 20px; + padding: 8px 0; vertical-align: middle; background: transparent; border: none; diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index cf8937ea..56d0c0fd 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -36,7 +36,7 @@ class SeedInput extends Component { ))}
- +
); diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index ef2495da..3b0c1091 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -39,6 +39,10 @@ visibility: hidden; opacity: 0; transition: .2s linear; + &-opened { + visibility: visible; + opacity: 1; + } } &__option { display: block; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 5de19923..af71c9ef 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -1,16 +1,67 @@ -import React from 'react'; +/* eslint-disable jsx-a11y/no-static-element-interactions */ +/* eslint-disable jsx-a11y/click-events-have-key-events */ +import React, { Component } from 'react'; import styles from './LangSwitcher.scss'; -const LangSwitcher = () => ( -
- RUS -
- Русский (RUS) - Русский (ENG) - Русский (ESP) -
-
-); +class LangSwitcher extends Component { + constructor(props) { + super(props); + this.state = { + opened: false, + value: 'RUS', + }; + this.setWrapperRef = this.setWrapperRef.bind(this); + this.handleClickOutside = this.handleClickOutside.bind(this); + } + + componentDidMount() { + document.addEventListener('mousedown', this.handleClickOutside); + } + + componentWillUnmount() { + document.addEventListener('mousedown', this.handleClickOutside); + } + + setWrapperRef(node) { + this.wrapperRef = node; + } + + toggleOptions=() => { + const { opened } = this.state; + this.setState({ + opened: !opened, + }); + } + + selectOption=(e) => { + const value = e.target.getAttribute('data-value'); + this.setState({ value }); + this.toggleOptions(); + } + + handleClickOutside(event) { + if (this.wrapperRef && !this.wrapperRef.contains(event.target)) { + this.closeOptions(); + } + } + + render() { + const { opened, value } = this.state; + return ( +
+ + {' '} + {value} + +
+ Русский (RUS) + Русский (ENG) + Русский (ESP) +
+
+ ); + } +} export default LangSwitcher; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 3f37bb61..0dc0050e 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -23,6 +23,8 @@ class AppStore { @observable alertText = ''; + @observable alertTimeout = ''; + constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -139,7 +141,10 @@ class AppStore { @action displayAlert(text, timeOut) { this.alertVisible = true; this.alertText = text; - setTimeout(() => { + if (typeof this.alertTimeout === 'number') { + clearTimeout(this.alertTimeout); + } + this.alertTimeout = setTimeout(() => { this.alertVisible = false; }, timeOut); } From 76dea4f23b83b25993e545b44477943095948ab2 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 08:53:43 +0700 Subject: [PATCH 102/219] Lang switcher now is Class component --- src/components/LangSwitcher/LangSwitcher.scss | 30 ++++++++++--------- src/components/LangSwitcher/index.js | 4 +-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index 3b0c1091..f2da9112 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -2,27 +2,31 @@ .lang { display: inline-block; - &--selected { - position: relative; - display: block; - padding: 5px 0; - font-weight: bold; - &:hover { - & + .lang__options { - visibility: visible; - opacity: 1; - } + &--opened { + .lang__options { + visibility: visible; + opacity: 1; + } + .lang--selected{ &:after { border-color: transparent transparent $primary transparent; border-width: 0px 3px 6px 3px; } } + } + &--selected { + position: relative; + display: block; + padding: 5px 0; + font-weight: bold; + cursor: pointer; &:after { top: 50%; right: 0; display: inline-block; width: 0; height: 0; + margin-left: 5px; border-color: $primary transparent transparent transparent; border-style: solid; border-width: 6px 3px 0 3px; @@ -34,15 +38,13 @@ &__options { position: absolute; display: inline-block; + width: max-content; padding: 5px 10px; border: 1px solid $border; visibility: hidden; opacity: 0; transition: .2s linear; - &-opened { - visibility: visible; - opacity: 1; - } + } &__option { display: block; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index af71c9ef..449f209a 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -49,12 +49,12 @@ class LangSwitcher extends Component { render() { const { opened, value } = this.state; return ( -
+
{' '} {value} -
+
Русский (RUS) Русский (ENG) Русский (ESP) From 10b9eeb6d9d1e4518f14f87cce31706f1c4ab036 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 10:34:17 +0700 Subject: [PATCH 103/219] Fixed: - possibility to start wallet decoding without wallet selecting - button fix --- src/components/AddExisitingProject/index.js | 3 +++ src/components/Button/Button.scss | 3 +++ src/components/Button/index.js | 2 +- src/components/Dropdown/index.js | 15 ++++++++------- src/components/Input/Input.scss | 6 ++++-- src/components/Input/index.js | 8 +++++++- src/components/InputSeed/index.js | 4 ++-- src/components/LangSwitcher/index.js | 6 ++++++ src/components/Login/Login.scss | 10 ++++++---- src/components/Login/index.js | 3 ++- src/services/Web3Service/Web3Service.js | 2 +- src/stores/FormsStore/LoginForm.js | 8 +++++++- 12 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 471a1ad2..163178bd 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -103,6 +103,9 @@ const InputBlock = ({ form }) => (
+ + + ); diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 93b10b41..fe170b85 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -12,6 +12,9 @@ &__text { vertical-align: middle; } + &__content { + line-height: 15px; + } svg { margin-right: 10px; path, diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 5bac475a..47d36f34 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -30,7 +30,7 @@ export const IconButton = ({ children, type, disabled, className, onClick, }) => ( ); @@ -16,6 +27,9 @@ DropdownOption.propTypes = { value: propTypes.string.isRequired, label: propTypes.string.isRequired, select: propTypes.func.isRequired, + subOption: propTypes.string.isRequired, +}; +DropdownOption.defaultProps = { }; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 3a64bb16..2a13a90c 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -78,7 +78,7 @@ const InputForm = ({ {'Приготовьтесь к новой эре в сфере голосования'} - + diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index aa04d92d..a840e268 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -7,6 +7,8 @@ import { class AppStore { @observable walletList = {}; + @observable balances = {}; + @observable projectList = []; @observable ERC = { @@ -35,11 +37,15 @@ class AppStore { * @function */ @action readWalletList = () => { + const { Web3Service: { web3: { eth } } } = this.rootStore; this.walletList = {}; + const files = fs.readdirSync(PATH_TO_WALLETS); files.forEach((file) => { const wallet = JSON.parse(fs.readFileSync(path.join(PATH_TO_WALLETS, file), 'utf8')); const walletObject = {}; + eth.getBalance(wallet.address) + .then((balance) => { this.balances[wallet.address] = balance; }); walletObject[wallet.address] = wallet; this.walletList = Object.assign(this.walletList, walletObject); }); diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 0b885cdb..d04f25e9 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -27,10 +27,10 @@ class RootStore { constructor() { const configRaw = fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8'); const config = JSON.parse(configRaw); + this.Web3Service = new Web3Service(config.host); this.appStore = new AppStore(this); this.userStore = new UserStore(this); this.walletService = new WalletService(); - this.Web3Service = new Web3Service(config.host); this.contractService = new ContractService(this); } From f56eac45f48f7ec8b013bf4567a6a4efbb8b07e1 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 14:56:27 +0700 Subject: [PATCH 109/219] added thumb icon --- src/assets/images/thumb.png | Bin 0 -> 146 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/assets/images/thumb.png diff --git a/src/assets/images/thumb.png b/src/assets/images/thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..28100311684566dc333c3b226e23727655e822eb GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ;0V1_0*t`W&oCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eBzPhK2V@L(#+;aW2M)I4zA{vK7ToYS{OWC{an^LB{Ts5-=!zK literal 0 HcmV?d00001 From de5dbc81e2f5c2e27987afe78aa95c506cca8feb Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 15:09:46 +0700 Subject: [PATCH 110/219] fixed props errors --- src/components/ProjectUploading/ProgressBlock/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index 833cf4cd..1008af3e 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -23,6 +23,9 @@ ProgressBlock.propTypes = { text: propTypes.string.isRequired, index: propTypes.number.isRequired, state: propTypes.number.isRequired, - noline: propTypes.bool.isRequired, + noline: propTypes.bool, +}; +ProgressBlock.defaultProps = { + noline: false, }; export default ProgressBlock; From 8edda6d4a29272e25471c57554ffd67345dd4d85 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 15:15:22 +0700 Subject: [PATCH 111/219] added real balance in token creation form --- src/components/CreateNewProjectWithoutTokens/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index cf38bbb3..c27a907a 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -148,7 +148,7 @@ class CreateNewProjectWithoutTokens extends Component { } } -const CreateTokenData = inject('userStore')(observer(({ userStore: { address }, form }) => ( +const CreateTokenData = inject('userStore', 'appStore')(observer(({ userStore: { address }, appStore: { balances }, form }) => ( {'Создание токенов'} @@ -163,7 +163,10 @@ const CreateTokenData = inject('userStore')(observer(({ userStore: { address },

Баланс: -

0,1023147932 ETH

+

+ {(balances[address.replace('0x', '')] / 1.0e18).toFixed(5)} + {' ETH'} +

Токены зачислятся на этот кошелек После их можно будет распределить

From 60c72bda356b712828afa808ce5508fc04ff5b5c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 15:50:43 +0700 Subject: [PATCH 112/219] added error messages on connection lost --- src/assets/styles/style.scss | 4 ++++ .../CreateNewProjectWithoutTokens/index.js | 4 ++-- .../ProjectUploading/ProgressBlock/index.js | 10 +++++++--- src/components/ProjectUploading/index.js | 12 +++++++++--- src/config.json | 4 ++++ src/services/Web3Service/Web3Service.js | 5 +++-- src/stores/AppStore/AppStore.js | 7 +++++++ src/stores/RootStore/RootStore.js | 2 +- 8 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 49757e3f..881d812d 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -89,6 +89,10 @@ svg { color: #37474F; font-size: 12px; opacity: .5; + span { + display: block; + margin-bottom: 10px; + } &+strong { display: inline-block; width: 165%; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index c27a907a..dc8b971d 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -49,7 +49,7 @@ class CreateNewProjectWithoutTokens extends Component { const { name, symbol, count, password, } = form.values(); - const deployArgs = [name, symbol, Number(count)]; + const deployArgs = [name, symbol, count]; userStore.readWallet(password) .then((buffer) => { if (!(buffer instanceof Error)) { @@ -66,7 +66,7 @@ class CreateNewProjectWithoutTokens extends Component { appStore.deployArgs = [receipt.contractAddress]; clearInterval(interval); } - }); + }).catch(() => { appStore.displayAlert('Нет соединения с хостом, проверьте подключение к сети', 3000); }); }, 5000); }); } diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index 1008af3e..e341fe7f 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -12,14 +12,18 @@ const ProgressBlock = ({
- {children} + {children[0] ? children[0] : children}
-

{text}

+

+ {text} + {children[1] ? children[1] : ''} +

+ {!noline ?
: ''}
); ProgressBlock.propTypes = { - children: propTypes.element.isRequired, + children: propTypes.arrayOf(propTypes.node).isRequired, text: propTypes.string.isRequired, index: propTypes.number.isRequired, state: propTypes.number.isRequired, diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 8a25e42a..b7f4f73f 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -54,7 +54,7 @@ class ProjectUploading extends Component { }); }); } - }); + }).catch(() => { appStore.displayAlert('Нет соединения с хостом, проверьте подключение к сети', 3000); }); }, 2000); }); } @@ -75,7 +75,7 @@ class ProjectUploading extends Component { } } -const Progress = ({ step }) => ( +const Progress = inject('appStore')(observer(({ appStore, step }) => ( {'Загружаем контракт'} @@ -117,11 +117,16 @@ const Progress = ({ step }) => ( noline > + + {appStore.uploadedQuestion} + {'/'} + {appStore.countOfQuestions} +
-); +))); const AlertBlock = () => ( @@ -142,6 +147,7 @@ ProjectUploading.propTypes = { }; Progress.propTypes = { step: propTypes.number.isRequired, + appStore: propTypes.object.isRequired, }; export default ProjectUploading; diff --git a/src/config.json b/src/config.json index 7dcee25e..85f2d95a 100644 --- a/src/config.json +++ b/src/config.json @@ -13,6 +13,10 @@ { "name": "T3st", "address": "0xACA55c33D67d549CacA4f700D0319B865D8E0FC5" + }, + { + "name": "T3qwe", + "address": "0xd0F558FD47C5cD55A4B651fBFd6a36c3D530968c" } ] } \ No newline at end of file diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 8dba2453..1ef7b42c 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -9,9 +9,10 @@ class web3Service { * @constructor * @param {string} provider - provider for this.web3 */ - constructor(url) { + constructor(url, rootStore) { this.web3 = new Web3(new Web3.providers.HttpProvider(url)); this.address2nonce = {}; + this.rootStore = rootStore; } createContractInstance(abi) { @@ -32,7 +33,7 @@ class web3Service { return this.getGasPrice() .then((gasPrice) => { transaction.gasPrice = new BN(gasPrice).lte(new BN(maxGasPrice)) - ? gasPrice + ? maxGasPrice : maxGasPrice; return Promise.resolve(gas); }) diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index a840e268..744b0eb2 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -27,6 +27,10 @@ class AppStore { @observable alertTimeout = ''; + @observable uploadedQuestion = 0; + + @observable countOfQuestions = 0; + constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -121,12 +125,15 @@ class AppStore { contract.options.address = address; contractService.setContract(contract); const { countOfUploaded, totalCount } = await contractService.checkQuestions(); + this.countOfQuestions = Number(totalCount); + this.uploadedQuestion = Number(countOfUploaded); // eslint-disable-next-line no-console let idx = Number(countOfUploaded) === 0 ? 1 : Number(countOfUploaded); // eslint-disable-next-line no-async-promise-executor for (idx; idx <= totalCount; idx += 1) { // eslint-disable-next-line no-await-in-loop await contractService.sendQuestion(idx); + this.uploadedQuestion += 1; } Promise.resolve(); } diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index d04f25e9..273502dd 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -27,7 +27,7 @@ class RootStore { constructor() { const configRaw = fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8'); const config = JSON.parse(configRaw); - this.Web3Service = new Web3Service(config.host); + this.Web3Service = new Web3Service(config.host, this); this.appStore = new AppStore(this); this.userStore = new UserStore(this); this.walletService = new WalletService(); From bf290c0459cbd45073eb08bdbbad4a383af7af15 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 16:13:44 +0700 Subject: [PATCH 113/219] Added icons on "go to project" buttons --- src/components/AddExisitingProject/index.js | 9 ++++++--- src/components/Button/Button.scss | 6 ++++++ src/components/ProjectUploading/index.js | 9 ++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 163178bd..f3a9be1e 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; -import { Button } from '../Button'; +import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -15,7 +15,7 @@ import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; import styles from '../Login/Login.scss'; import Input from '../Input'; -import { Address, TokenName } from '../Icons'; +import { Address, TokenName, Login } from '../Icons'; @inject('appStore') @observer @@ -125,7 +125,10 @@ const MessageBlock = () => ( {'Проект успешно подключен!'} {'Теперь можно начать работу с ним или выбрать другой проект'} - + + {} + {'К подключенному проекту'} + diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index fe170b85..31f3e7f6 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -45,6 +45,12 @@ color: $primary; background-color: $white; border-color: $lightGrey; + svg { + path { + transition: 0.2s; + stroke: $primary; + } + } } &:active { border-color: $primary; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index b7f4f73f..3ca3e9ab 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -13,9 +13,9 @@ import Header from '../Header'; import styles from '../Login/Login.scss'; import ProgressBlock from './ProgressBlock'; import { - CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, + CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, Login, } from '../Icons'; -import { Button } from '../Button'; +import { Button, IconButton } from '../Button'; @inject('userStore', 'appStore') @observer @@ -134,7 +134,10 @@ const AlertBlock = () => ( {'Проект успешно создан!'} {'Теперь можно начать работу с ним или выбрать другой проект'} - + + {} + {'К подключенному проекту'} + From b72939176e556e3cf98ada4a12a555c85f5e35ed Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 16:36:00 +0700 Subject: [PATCH 114/219] Small fixes --- src/components/CreateNewProjectWithoutTokens/index.js | 2 +- src/components/InputSeed/index.js | 1 + src/stores/FormsStore/CreateProject.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index dc8b971d..7c4777c4 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -49,7 +49,7 @@ class CreateNewProjectWithoutTokens extends Component { const { name, symbol, count, password, } = form.values(); - const deployArgs = [name, symbol, count]; + const deployArgs = [name, symbol, Number(count)]; userStore.readWallet(password) .then((buffer) => { if (!(buffer instanceof Error)) { diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 2b9e2872..75b1e980 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -47,6 +47,7 @@ class InputSeed extends Component { const values = Object.values(form.values()); userStore.mnemonicRepeat = values; const mnemonic = values.join(' '); + console.log(mnemonic); if (userStore.isSeedValid(mnemonic)) { this.toggleLoading(); if (recover) { diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js index cfad7a39..d1c33e11 100644 --- a/src/stores/FormsStore/CreateProject.js +++ b/src/stores/FormsStore/CreateProject.js @@ -18,7 +18,7 @@ class СreateProjectForm extends ExtendedForm { type: 'password', label: 'Password', placeholder: 'Введите пароль', - rules: 'required|string', + rules: 'required|password', }], }; } From 26faf0e58b16c536342385c7ed12f2d8e9eff701 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 18:20:04 +0700 Subject: [PATCH 115/219] Now we can change language, locales in progress --- package-lock.json | 36 ++++++++++++++++++++++++++-- package.json | 7 ++++-- src/components/LangSwitcher/index.js | 5 ++-- src/components/Login/index.js | 23 +++++++++--------- src/config.json | 12 ++++++++++ src/i18n.js | 30 +++++++++++++++++++++++ src/index.js | 1 + src/locales/en/headings.js | 23 ++++++++++++++++++ src/locales/ru/headings.js | 23 ++++++++++++++++++ 9 files changed, 143 insertions(+), 17 deletions(-) create mode 100644 src/i18n.js create mode 100644 src/locales/en/headings.js create mode 100644 src/locales/ru/headings.js diff --git a/package-lock.json b/package-lock.json index 3b0df9e1..1d1e202a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9846,6 +9846,14 @@ } } }, + "html-parse-stringify2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz", + "integrity": "sha1-3FZwtyksoVi3vJFsmmc1rIhyg0o=", + "requires": { + "void-elements": "^2.0.1" + } + }, "html-tags": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", @@ -9960,6 +9968,22 @@ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, + "i18next": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.0.0.tgz", + "integrity": "sha512-xxNKNOqLdGP/M+/fzzBOhcc9hCAqv6gDhHq0xbYz/Vlz5PlMfr9P1LbBvmk7RkZjYoh/kyM1tnfSl+sJ2VaD0Q==", + "requires": { + "@babel/runtime": "^7.3.1" + } + }, + "i18next-xhr-backend": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/i18next-xhr-backend/-/i18next-xhr-backend-3.2.2.tgz", + "integrity": "sha512-OtRf2Vo3IqAxsttQbpjYnmMML12IMB5e0fc5B7qKJFLScitYaXa1OhMX0n0X/3vrfFlpHL9Ro/H+ps4Ej2j7QQ==", + "requires": { + "@babel/runtime": "^7.5.5" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -15420,6 +15444,15 @@ "prop-types": "^15.6.1" } }, + "react-i18next": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.1.0.tgz", + "integrity": "sha512-FxHNBA6ptW7cygTpbIz5GAN9lrsB89xqgwpD3AzwSB4CDQsd+9i9/Je3Hc3VF6joAb1khFmCUO3ETJFLSrmuwg==", + "requires": { + "@babel/runtime": "^7.3.1", + "html-parse-stringify2": "2.0.1" + } + }, "react-is": { "version": "16.11.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", @@ -19291,8 +19324,7 @@ "void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" }, "vue-docgen-api": { "version": "3.26.0", diff --git a/package.json b/package.json index d923aae6..4af89483 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "", "main": "./src/electron.js", "author": { - "name":"", - "email":"pavkahanov@neos1.com" + "name": "", + "email": "pavkahanov@neos1.com" }, "scripts": { "render-test": "jest", @@ -29,6 +29,8 @@ "ethereumjs-tx": "^2.1.1", "ethereumjs-util": "^6.2.0", "ethereumjs-wallet": "^0.6.3", + "i18next": "^19.0.0", + "i18next-xhr-backend": "^3.2.2", "mobx": "^5.15.0", "mobx-react": "^6.1.4", "mobx-react-form": "^2.0.8", @@ -36,6 +38,7 @@ "prop-types": "^15.7.2", "react": "^16.10.2", "react-dom": "^16.10.2", + "react-i18next": "^11.1.0", "react-router-dom": "^5.1.2", "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^19.0.0", diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 202226f9..ee6ffb49 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -2,6 +2,7 @@ /* eslint-disable jsx-a11y/click-events-have-key-events */ import React, { Component } from 'react'; import styles from './LangSwitcher.scss'; +import i18n from '../../i18n'; class LangSwitcher extends Component { @@ -38,6 +39,7 @@ class LangSwitcher extends Component { const value = e.target.getAttribute('data-value'); this.setState({ value }); this.toggleOptions(); + i18n.changeLanguage(value); } closeOptions = () => { @@ -62,8 +64,7 @@ class LangSwitcher extends Component {
Русский (RUS) - Русский (ENG) - Русский (ESP) + English (ENG)
); diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 2a13a90c..a5ae7c28 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -4,6 +4,7 @@ import React, { Component } from 'react'; import { observer, inject } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import Container from '../Container'; import Header from '../Header'; import FormBlock from '../FormBlock'; @@ -15,6 +16,7 @@ import { Button } from '../Button'; import Loader from '../Loader'; import LoginForm from '../../stores/FormsStore/LoginForm'; + import styles from './Login.scss'; @@ -69,13 +71,13 @@ class Login extends Component { } } -const InputForm = ({ - appStore, form, +const InputForm = withTranslation(['headings'])(({ + appStore, form, t, }) => ( - {'Вход в систему'} - {'Приготовьтесь к новой эре в сфере голосования'} + {t('login.heading')} + {t('login.subheading')} @@ -94,19 +96,18 @@ const InputForm = ({
- -); +)); -const LoadingBlock = () => ( +const LoadingBlock = withTranslation(['headings'])(({ t }) => ( - {'Вход в систему'} - {'Приготовьтесь к новой эре в сфере голосования'} + {t('login.heading')} + {t('login.subheading')} -); +)); Login.propTypes = { appStore: propTypes.object.isRequired, @@ -118,4 +119,4 @@ InputForm.propTypes = { }; -export default Login; +export default withTranslation()(Login); diff --git a/src/config.json b/src/config.json index 85f2d95a..2740d30e 100644 --- a/src/config.json +++ b/src/config.json @@ -17,6 +17,18 @@ { "name": "T3qwe", "address": "0xd0F558FD47C5cD55A4B651fBFd6a36c3D530968c" + }, + { + "name": "Name", + "address": "0xd0F558FD47C5cD55A4B651fBFd6a36c3D530968c" + }, + { + "name": "testing!", + "address": "0x118852809990A0133FE21efF928bD1472b683764" + }, + { + "name": "Name123123", + "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" } ] } \ No newline at end of file diff --git a/src/i18n.js b/src/i18n.js new file mode 100644 index 00000000..e938d02c --- /dev/null +++ b/src/i18n.js @@ -0,0 +1,30 @@ +import i18n from 'i18next'; +import { initReactI18next } from 'react-i18next'; +import headingsEn from './locales/en/headings'; +import headingsRu from './locales/ru/headings'; + +const resources = { + ENG: { + headings: headingsEn, + }, + RUS: { + headings: headingsRu, + }, +}; + +i18n + .use(initReactI18next) // passes i18n down to react-i18next + .init({ + resources, + fallbackLng: 'en', + lng: 'ru', + react: { + wait: false, + bindI18n: 'languageChanged loaded', + bindStore: 'added removed', + nsMode: 'default', + useSuspense: false, + }, + }); + +export default i18n; diff --git a/src/index.js b/src/index.js index d3479bc7..bf414af7 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import rootStore from './stores/RootStore'; import Alert from './components/Alert'; +import './i18n'; import './assets/styles/style.scss'; diff --git a/src/locales/en/headings.js b/src/locales/en/headings.js new file mode 100644 index 00000000..d9f1b8af --- /dev/null +++ b/src/locales/en/headings.js @@ -0,0 +1,23 @@ +const headings = { + login: { heading: 'Sign In', subheading: 'Get ready for a new era of voting' }, + logging: { heading: 'Sighning in', subheading: 'It does not take much time' }, + projects: { heading: 'Project selection', subheading: 'Chose a project or create a new one' }, + addingProject: { heading: 'Adding a project', subheading: 'Create a new one or connect already existing' }, + passwordCreation: { heading: 'Password creation', subheading: 'Will be used to enter the wallet and transactions confirmation' }, + showSeed: { heading: 'Reserve phrase', subheading: 'Will be used for password recovery' }, + seedCheck: { heading: 'Reserve phrase check', subheading: 'Enter the phrase u wrote down' }, + сonnectProject: { heading: 'Project connecting', subheading: 'Create a new one or connect already existing' }, + projectChecking: { heading: 'Checking the project address', subheading: 'It does not take much time' }, + projectConnected: { heading: 'Project is connected!', subheading: 'Now you can start working with it or choose another project' }, + newProject: { heading: 'Creating a new project', subheading: 'Choose the suitable option ' }, + existingTokens: { heading: 'Connecting contarct', subheading: 'The owner of this contract will be considered the owner of the created project' }, + checkingTokens: { heading: 'Checking the project address', subheading: 'It does not take much time' }, + checkingTokensConfirm: { heading: 'The contract is checked', subheading: 'Verify the data before proceeding' }, + newTokens: { heading: 'Token creating', subheading: '' }, + tokensCreating: { heading: 'Creating ERC20 tokens', subheading: 'It does not take much time' }, + tokensCreated: { heading: 'Tokens are created!', subheading: 'Now you need to create a project' }, + projectCreating: { heading: 'Creating a project', subheading: 'The project contract will be uploaded to the network by a wallet' }, + uploadingProject: { heading: 'Uploading a contract', subheading: 'It can take up to 5 minutes' }, + projectCreated: { heading: 'Contract is created!', subheading: 'Now you can start working with it or choose another project' }, +}; +export default headings; diff --git a/src/locales/ru/headings.js b/src/locales/ru/headings.js new file mode 100644 index 00000000..a958daca --- /dev/null +++ b/src/locales/ru/headings.js @@ -0,0 +1,23 @@ +const headings = { + login: { heading: 'Вход в систему', subheading: 'Приготовьтесь к новой эре в сфере голосования' }, + logging: { heading: 'Выполняется вход', subheading: 'Это не займет много времени' }, + passwordCreation: { heading: 'Создание пароля', subheading: 'Будет использоваться для входа в кошелек и подтверждения транзакций' }, + showSeed: { heading: 'Резервная фраза', subheading: 'Нужна для восстановления пароля' }, + seedCheck: { heading: 'Проверка резервной фразы', subheading: 'Введите фразу, которую вы записали' }, + projects: { heading: 'Выбор проекта', subheading: 'Выберите проект или создайте новый' }, + addingProject: { heading: 'Добавление проекта', subheading: 'Cоздайте новый или подключите уже существующий' }, + сonnectProject: { heading: 'Подключить проект', subheading: 'Подключите уже существующий проект' }, + projectChecking: { heading: 'Проверяем адрес проекта', subheading: 'Это не займет много времени' }, + projectConnected: { heading: 'Проект успешно подключен!', subheading: 'Теперь можно начать работу с ним или выбрать другой проект' }, + newProject: { heading: 'Создание нового проекта', subheading: 'Выберите подходящий вам вариант' }, + existingTokens: { heading: 'Подключение контракта', subheading: 'Владелец этого контракта будет считаться и владельцем создаваемого проекта' }, + checkingTokens: { heading: 'Проверяем адрес контракта', subheading: 'Это не займет много времени' }, + checkingTokensConfirm: { heading: 'Контракт успешно проверен', subheading: 'Проверьте правильность данных перед тем, как продолжить' }, + newTokens: { heading: 'Создание токенов', subheading: '' }, + tokensCreating: { heading: 'Создаем токены ERC20', subheading: 'Это не займет много времени' }, + tokensCreated: { heading: 'Токены успешно созданы!', subheading: 'Теперь нужно создать проект' }, + projectCreating: { heading: 'Создание проекта', subheading: 'Контракт проекта будет загружен в сеть при помощи кошелька' }, + uploadingProject: { heading: 'Загружаем контракт', subheading: 'Это может занять до 5 минут' }, + projectCreated: { heading: 'Проект успешно создан!', subheading: 'Теперь можно начать работу с ним или выбрать другой проект' }, +}; +export default headings; From dac618d5480794eb65eb67d2b6c355ef74045294 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 12 Nov 2019 18:45:16 +0700 Subject: [PATCH 116/219] Locales renamed for consistency --- src/components/Alert/Alert.scss | 1 + src/components/CreateWallet/PasswordForm.js | 11 ++++++----- src/components/CreateWallet/index.js | 11 ++++++----- src/components/Login/index.js | 5 ++--- src/i18n.js | 8 ++++---- src/locales/{en => ENG}/headings.js | 0 src/locales/{ru => RUS}/headings.js | 0 7 files changed, 19 insertions(+), 17 deletions(-) rename src/locales/{en => ENG}/headings.js (100%) rename src/locales/{ru => RUS}/headings.js (100%) diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index 4bc7b9ba..f5e58c10 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -4,6 +4,7 @@ position: fixed; top: 100%; left: 50%; + z-index: 3; display: flex; flex-flow: row nowrap; align-items: center; diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index 944442f7..13ef6579 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; - +import { withTranslation } from 'react-i18next'; import { NavLink } from 'react-router-dom'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -12,7 +12,7 @@ import Indicator from '../Indicator'; import styles from '../Login/Login.scss'; import passwordValidation from '../../utils/PasswordValidation'; - +@withTranslation(['headings']) class PasswordForm extends Component { constructor(props) { super(props); @@ -27,14 +27,14 @@ class PasswordForm extends Component { } render() { - const { state, form } = this.props; + const { state, form, t } = this.props; const { validity } = this.state; return ( - {'Создание пароля'} - {'Будет использоваться для входа в кошелек и подтверждения транзакций'} + {t('headings:passwordCreation.heading')} + {t('headings:passwordCreation.subheading')}
@@ -97,5 +97,6 @@ class PasswordForm extends Component { PasswordForm.propTypes = { state: propTypes.bool.isRequired, form: propTypes.func.isRequired, + t: propTypes.func.isRequired, }; export default PasswordForm; diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 4c69383b..a552f46b 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -4,6 +4,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; import { Redirect } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import Container from '../Container'; import Header from '../Header'; import FormBlock from '../FormBlock'; @@ -89,15 +90,15 @@ class CreateWallet extends Component { } -const CreationLoader = () => ( +const CreationLoader = withTranslation(['headings'])(({ t }) => ( - {'Создание пароля'} - {'Будет использоваться для входа в кошелек и подтверждения транзакций'} + {t('headings:passwordCreation.heading')} + {t('headings:passwordCreation.subheading')} -); +)); CreateWallet.propTypes = { userStore: propTypes.object.isRequired, @@ -105,4 +106,4 @@ CreateWallet.propTypes = { }; -export default CreateWallet; +export default withTranslation()(CreateWallet); diff --git a/src/components/Login/index.js b/src/components/Login/index.js index a5ae7c28..463c7a12 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -19,7 +19,6 @@ import LoginForm from '../../stores/FormsStore/LoginForm'; import styles from './Login.scss'; - @inject('userStore', 'appStore') @observer class Login extends Component { @@ -102,8 +101,8 @@ const InputForm = withTranslation(['headings'])(({ const LoadingBlock = withTranslation(['headings'])(({ t }) => ( - {t('login.heading')} - {t('login.subheading')} + {t('headings.logging.heading')} + {t('headings.logging.subheading')} diff --git a/src/i18n.js b/src/i18n.js index e938d02c..26ea4c93 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -1,7 +1,7 @@ import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; -import headingsEn from './locales/en/headings'; -import headingsRu from './locales/ru/headings'; +import headingsEn from './locales/ENG/headings'; +import headingsRu from './locales/RUS/headings'; const resources = { ENG: { @@ -16,8 +16,8 @@ i18n .use(initReactI18next) // passes i18n down to react-i18next .init({ resources, - fallbackLng: 'en', - lng: 'ru', + fallbackLng: 'ENG', + lng: 'RUS', react: { wait: false, bindI18n: 'languageChanged loaded', diff --git a/src/locales/en/headings.js b/src/locales/ENG/headings.js similarity index 100% rename from src/locales/en/headings.js rename to src/locales/ENG/headings.js diff --git a/src/locales/ru/headings.js b/src/locales/RUS/headings.js similarity index 100% rename from src/locales/ru/headings.js rename to src/locales/RUS/headings.js From 4ea6de6f0cac04b6137fcd67798b54f89fbc4ece Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 13 Nov 2019 09:23:08 +0700 Subject: [PATCH 117/219] Header moved to root app file --- src/components/AddExisitingProject/index.js | 27 +++++++++---------- src/components/AddNewProject/index.js | 2 -- src/components/CreateNewProject/index.js | 2 -- .../CreateNewProjectWithTokens/index.js | 2 -- .../CreateNewProjectWithoutTokens/index.js | 3 +-- src/components/CreateWallet/index.js | 2 -- src/components/CreationAlert/index.js | 2 -- src/components/DisplayUserInfo/index.js | 2 -- src/components/Header/Header.scss | 3 ++- src/components/InputSeed/index.js | 2 -- src/components/Login/index.js | 10 +++---- src/components/ProjectList/index.js | 2 -- src/components/ProjectUploading/index.js | 2 -- src/components/ShowSeed/index.js | 2 -- src/index.js | 2 ++ 15 files changed, 22 insertions(+), 43 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index f3a9be1e..db6bf7f7 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -3,11 +3,11 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; +import { withTranslation } from 'react-i18next'; import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import Loader from '../Loader'; import Explanation from '../Explanation'; import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; @@ -63,7 +63,6 @@ class AddExistingProject extends Component { }); return ( -
{step === 'default' ? : ''} {step === 'loading' ? : ''} @@ -74,11 +73,11 @@ class AddExistingProject extends Component { ); } } -const InputBlock = ({ form }) => ( +const InputBlock = withTranslation(['headings'])(({ t, form }) => ( - {'Подключить проект'} - {'Cоздайте новый или подключите уже существующий'} + {t('headings:сonnectProject.heading')} + {t('headings:сonnectProject.subheading')} @@ -107,23 +106,23 @@ const InputBlock = ({ form }) => ( -); +)); -const LoadingBlock = () => ( +const LoadingBlock = withTranslation(['headings'])(({ t }) => ( - {'Проверяем адрес проекта'} - {'Это не займет много времени'} + {t('headings:projectChecking.heading')} + {t('headings:projectChecking.subheading')} -); +)); -const MessageBlock = () => ( +const MessageBlock = withTranslation(['headings'])(({ t }) => ( - {'Проект успешно подключен!'} - {'Теперь можно начать работу с ним или выбрать другой проект'} + {t('headings:projectConnected.heading')} + {t('headings:projectConnected.subheading')} {} @@ -133,7 +132,7 @@ const MessageBlock = () => ( -); +)); AddExistingProject.propTypes = { appStore: propTypes.object.isRequired, }; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 885bcd3f..d21a7083 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -4,7 +4,6 @@ import { IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import { CreateToken, ChainIcon, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -12,7 +11,6 @@ import styles from '../Login/Login.scss'; const AddNewProject = () => ( -
diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index add198db..863294b4 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -6,7 +6,6 @@ import { IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import { Ethereum, CreateToken, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -21,7 +20,6 @@ class CreateNewProject extends Component { render() { return ( -
diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 65079022..b0e3db45 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -7,7 +7,6 @@ import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import Loader from '../Loader'; import Indicator from '../Indicator'; import Explanation from '../Explanation'; @@ -96,7 +95,6 @@ class CreateNewProjectWithTokens extends Component { }); return ( -
{position === 'token' ? : ''} diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 7c4777c4..5558fb4d 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -8,7 +8,7 @@ import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; + import Loader from '../Loader'; import Indicator from '../Indicator'; import Explanation from '../Explanation'; @@ -135,7 +135,6 @@ class CreateNewProjectWithoutTokens extends Component { }); return ( -
{position === 'token' ? : ''} diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index a552f46b..fa47f384 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -6,7 +6,6 @@ import { observer, inject } from 'mobx-react'; import { Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; import Container from '../Container'; -import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Loader from '../Loader'; @@ -69,7 +68,6 @@ class CreateWallet extends Component { } return ( -
{!loading ? ( diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index d2747f9d..e3bd0fe0 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -3,7 +3,6 @@ import React from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import Container from '../Container'; -import Header from '../Header'; import FormBlock from '../FormBlock'; import { Button } from '../Button'; import Heading from '../Heading'; @@ -13,7 +12,6 @@ import styles from '../Login/Login.scss'; const CreationAlert = ({ success = false, recover = false }) => ( -
diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 6ebe9653..8a57fb99 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -2,7 +2,6 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import { NavLink } from 'react-router-dom'; import Container from '../Container'; -import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import { Button } from '../Button'; @@ -11,7 +10,6 @@ import styles from '../Login/Login.scss'; const DisplayUserInfo = inject('userStore')(observer(({ userStore: { balance, address } }) => ( -
{' '} diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index f5011a21..95f2e9a5 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -1,9 +1,10 @@ @import '../../assets/styles/partials/variables'; .header { - position: relative; + position: absolute; top: 30px; left: 50%; + z-index: 2; display: flex; flex-flow: row nowrap; align-items:center; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 75b1e980..c8f32875 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -7,7 +7,6 @@ import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import Container from '../Container'; -import Header from '../Header'; import Heading from '../Heading'; import Input from '../Input'; @@ -80,7 +79,6 @@ class InputSeed extends Component { if (redirect) return recover ? : ; return ( -
diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 463c7a12..7b980081 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -6,7 +6,6 @@ import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; import Container from '../Container'; -import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Dropdown from '../Dropdown'; @@ -50,7 +49,6 @@ class Login extends Component { if (userStore.authorized) return ; return ( -
{ !logging @@ -75,8 +73,8 @@ const InputForm = withTranslation(['headings'])(({ }) => ( - {t('login.heading')} - {t('login.subheading')} + {t('headings:login.heading')} + {t('headings:login.subheading')} @@ -101,8 +99,8 @@ const InputForm = withTranslation(['headings'])(({ const LoadingBlock = withTranslation(['headings'])(({ t }) => ( - {t('headings.logging.heading')} - {t('headings.logging.subheading')} + {t('headings:logging.heading')} + {t('headings:logging.subheading')} diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index ccfe65c0..f3df4c95 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -6,7 +6,6 @@ import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import { AddIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -32,7 +31,6 @@ class ProjectList extends Component { )); return ( -
diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 3ca3e9ab..3806e668 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -8,7 +8,6 @@ import { NavLink } from 'react-router-dom'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Header from '../Header'; import styles from '../Login/Login.scss'; import ProgressBlock from './ProgressBlock'; @@ -63,7 +62,6 @@ class ProjectUploading extends Component { const { step, loading } = this.state; return ( -
{ loading ? : diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index acd5e35a..e7b35988 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -5,7 +5,6 @@ import propTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import { NavLink, Redirect } from 'react-router-dom'; import Container from '../Container'; -import Header from '../Header'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Explanation from '../Explanation'; @@ -41,7 +40,6 @@ class ShowSeed extends Component { const { visible } = this.state; return ( -
diff --git a/src/index.js b/src/index.js index bf414af7..bc3c705c 100644 --- a/src/index.js +++ b/src/index.js @@ -7,10 +7,12 @@ import Alert from './components/Alert'; import './i18n'; import './assets/styles/style.scss'; +import Header from './components/Header'; const { stores } = rootStore; render( +
{stores.appStore.alertText} From fddd00b8c8909c97a65d7e9eb26281889f3653d7 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 13 Nov 2019 09:36:32 +0700 Subject: [PATCH 118/219] Localized some new components --- src/components/AddNewProject/index.js | 9 ++++---- src/components/CreateNewProject/index.js | 12 ++++++----- src/components/ProjectList/index.js | 10 +++++---- src/i18n.js | 4 ++++ src/locales/ENG/explanations.js | 5 +++++ src/locales/RUS/explanations.js | 5 +++++ ...6bf53bfcea0028a01cd63336c34d06316f589.json | 21 +++++++++++++++++++ ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 +++++++++++++++++++ 8 files changed, 74 insertions(+), 13 deletions(-) create mode 100644 src/locales/ENG/explanations.js create mode 100644 src/locales/RUS/explanations.js create mode 100644 src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json create mode 100644 src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index d21a7083..0638e8f3 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -1,5 +1,6 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import { IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -9,13 +10,13 @@ import { CreateToken, ChainIcon, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; -const AddNewProject = () => ( +const AddNewProject = withTranslation()(({ t }) => (
- {'Добавление проекта'} - {'Cоздайте новый или подключите уже существующий'} + {t('headings:addingProject.heading')} + {t('headings:addingProject.subheading')}
@@ -40,6 +41,6 @@ const AddNewProject = () => (
-); +)); export default AddNewProject; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 863294b4..3441f53e 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -1,7 +1,8 @@ import React, { Component } from 'react'; -// import propTypes from 'prop-types'; +import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { observer } from 'mobx-react'; +import { withTranslation } from 'react-i18next'; import { IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -18,13 +19,14 @@ class CreateNewProject extends Component { } render() { + const { t } = this.props; return (
- {'Создание нового проекта'} - {'Выберите подходящий вам вариант'} + {t('headings:newProject.heading')} + {t('headings:newProject.subheading')}
@@ -56,8 +58,8 @@ class CreateNewProject extends Component { } CreateNewProject.propTypes = { - + t: propTypes.func.isRequired, }; -export default CreateNewProject; +export default withTranslation()(CreateNewProject); diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index f3df4c95..d713e1d8 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; +import { withTranslation } from 'react-i18next'; import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -25,7 +26,7 @@ class ProjectList extends Component { } render() { - const { appStore: { projectList } } = this.props; + const { appStore: { projectList }, t } = this.props; const projects = projectList.map((project, index) => ( )); @@ -34,8 +35,8 @@ class ProjectList extends Component {
- {'Выбор проекта'} - {'Выберите проект или создайте новый'} + {t('headings:projects.heading')} + {t('headings:projects.subheading')}
{' '} @@ -56,6 +57,7 @@ class ProjectList extends Component { ProjectList.propTypes = { appStore: propTypes.object.isRequired, + t: propTypes.func.isRequired, }; -export default ProjectList; +export default withTranslation()(ProjectList); diff --git a/src/i18n.js b/src/i18n.js index 26ea4c93..d3ebb739 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -2,13 +2,17 @@ import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import headingsEn from './locales/ENG/headings'; import headingsRu from './locales/RUS/headings'; +import explanationsEn from './locales/ENG/explanations'; +import explanationsRu from './locales/RUS/explanations'; const resources = { ENG: { headings: headingsEn, + explanations: explanationsEn, }, RUS: { headings: headingsRu, + explanations: explanationsRu, }, }; diff --git a/src/locales/ENG/explanations.js b/src/locales/ENG/explanations.js new file mode 100644 index 00000000..eb1b4d6e --- /dev/null +++ b/src/locales/ENG/explanations.js @@ -0,0 +1,5 @@ +const explanations = { + +}; + +export default explanations; diff --git a/src/locales/RUS/explanations.js b/src/locales/RUS/explanations.js new file mode 100644 index 00000000..eb1b4d6e --- /dev/null +++ b/src/locales/RUS/explanations.js @@ -0,0 +1,5 @@ +const explanations = { + +}; + +export default explanations; diff --git a/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json b/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json new file mode 100644 index 00000000..c9aa6d90 --- /dev/null +++ b/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "3c169816-8e24-41c6-90df-7f9a82eaf224", + "address": "6306bf53bfcea0028a01cd63336c34d06316f589", + "crypto": { + "ciphertext": "220a7eae5fb2de87e54bfa3fe48e8aac09a17cbac2bce8ba198949abdba94e87", + "cipherparams": { + "iv": "3765e83ac8e1aab053fa9bd181542054" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "3173abd0c03537c3d9b531a0c3e69b367ac8551e29611cf5711c709fbf4f5da7", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "7fb59ba6cad24763071898cc7294a55a401f74d4bb8666206f8afafe28c7983d" + } +} \ No newline at end of file diff --git a/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json new file mode 100644 index 00000000..ad90e853 --- /dev/null +++ b/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "b30b7f61-2f2f-40d8-8491-28862ace31f3", + "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", + "crypto": { + "ciphertext": "1d29a7726a2999b015f817498dd748eb2ca792a32a9abc008f178f5b01132c4b", + "cipherparams": { + "iv": "afa694cf6a300c14f12cbff7a897ae02" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "8ea0571e377c825a3abd80afcacf66ea8d012b0b06d6ad9ea1ebe9875684c6af", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "46dbd2b3ce899c2a0f583eeb1de3339f6886a2dfff9d5ed7d458ee01d1334846" + } +} \ No newline at end of file From 5488a510acfbaf2095bb509374210646ae5b2859 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 13 Nov 2019 15:16:26 +0700 Subject: [PATCH 119/219] Localize explanations and buttons --- src/components/AddExisitingProject/index.js | 33 +++++++---- src/components/AddNewProject/index.js | 6 +- src/components/CreateNewProject/index.js | 6 +- .../CreateNewProjectWithTokens/index.js | 51 ++++++++++------- .../CreateNewProjectWithoutTokens/index.js | 57 ++++++++++--------- src/components/CreateWallet/PasswordForm.js | 24 +++----- src/components/CreationAlert/index.js | 11 ++-- src/components/DisplayUserInfo/index.js | 11 ++-- src/components/Login/index.js | 10 ++-- src/components/ProjectList/index.js | 4 +- src/components/ShowSeed/index.js | 10 ++-- src/i18n.js | 5 ++ src/locales/ENG/buttons.js | 21 +++++++ src/locales/ENG/explanations.js | 22 ++++++- src/locales/ENG/headings.js | 3 + src/locales/RUS/buttons.js | 21 +++++++ src/locales/RUS/explanations.js | 25 +++++++- src/locales/RUS/headings.js | 3 + 18 files changed, 218 insertions(+), 105 deletions(-) create mode 100644 src/locales/ENG/buttons.js create mode 100644 src/locales/RUS/buttons.js diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index db6bf7f7..e5f1e879 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -15,7 +15,9 @@ import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; import styles from '../Login/Login.scss'; import Input from '../Input'; -import { Address, TokenName, Login } from '../Icons'; +import { + Address, TokenName, Login, BackIcon, +} from '../Icons'; @inject('appStore') @observer @@ -47,7 +49,7 @@ class AddExistingProject extends Component { } render() { - const { appStore } = this.props; + const { appStore, t } = this.props; const { step } = this.state; const { connectProject } = this; @@ -67,13 +69,19 @@ class AddExistingProject extends Component { {step === 'default' ? : ''} {step === 'loading' ? : ''} {step === 'success' ? : ''} + + + + {t('buttons:back')} + +
); } } -const InputBlock = withTranslation(['headings'])(({ t, form }) => ( +const InputBlock = withTranslation()(({ t, form }) => ( {t('headings:сonnectProject.heading')} @@ -87,28 +95,28 @@ const InputBlock = withTranslation(['headings'])(({ t, form }) => (
- +

- Название задается вами и отображается в списке проектов + {t('explanations:project.name')}

- Адрес сообщает создатель проекта + {t('explanations:project.address')}

- - - + )); -const LoadingBlock = withTranslation(['headings'])(({ t }) => ( +const LoadingBlock = withTranslation()(({ t }) => ( {t('headings:projectChecking.heading')} @@ -118,7 +126,7 @@ const LoadingBlock = withTranslation(['headings'])(({ t }) => ( )); -const MessageBlock = withTranslation(['headings'])(({ t }) => ( +const MessageBlock = withTranslation()(({ t }) => ( {t('headings:projectConnected.heading')} @@ -126,7 +134,7 @@ const MessageBlock = withTranslation(['headings'])(({ t }) => ( {} - {'К подключенному проекту'} + {t('buttons:toConnectedProject')} @@ -135,6 +143,7 @@ const MessageBlock = withTranslation(['headings'])(({ t }) => ( )); AddExistingProject.propTypes = { appStore: propTypes.object.isRequired, + t: propTypes.func.isRequired, }; InputBlock.propTypes = { form: propTypes.object.isRequired, diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 0638e8f3..62817ba0 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -22,13 +22,13 @@ const AddNewProject = withTranslation()(({ t }) => ( - Создать + {t('buttons:create')} - Подключить + {t('buttons:connect')}
@@ -36,7 +36,7 @@ const AddNewProject = withTranslation()(({ t }) => ( - Назад + {t('buttons:back')}
diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 3441f53e..50bf5b57 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -33,14 +33,14 @@ class CreateNewProject extends Component { Если есть токены ERC20 - Подключить контракт и создать проект + {t('buttons:withTokens')} Если токенов ERC20 нет - Создать новые токены и проект + {t('buttons:withoutTokens')}
@@ -48,7 +48,7 @@ class CreateNewProject extends Component { - Назад + {t('buttons:back')}
diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index b0e3db45..80f6b80d 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -107,44 +108,46 @@ class CreateNewProjectWithTokens extends Component { } } -const InputTokenAddress = ({ form }) => ( +const InputTokenAddress = withTranslation()(({ t, form }) => ( - {'Подключение контракта'} - {'Владелец этого контракта будет считаться и владельцем создаваемого проекта'} + {t('headings:existingTokens.heading')} + {t('headings:existingTokens.subheading')}
- +
- Назад + {t('buttons:back')} -); +)); -const LoadingBlock = () => ( +const LoadingBlock = withTranslation(({ t }) => ( - {'Проверяем адрес контракта'} - {'Это не займет много времени'} + {t('headings:checkingTokens.heading')} + {t('headings:checkingTokens.subheading')} -); +)); -const ContractConfirmation = inject('appStore')(observer(({ appStore: { ERC }, onSubmit }) => ( +const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, appStore: { ERC }, onSubmit }) => ( - {'Контракт успешно подключен!'} - {'Проверьте правильность данных перед тем, как продолжить'} + {t('headings:checkingTokensConfirm.heading')} + {t('headings:checkingTokensConfirm.subheading')}
@@ -159,17 +162,19 @@ const ContractConfirmation = inject('appStore')(observer(({ appStore: { ERC }, o
- +
-))); +)))); -const InputProjectData = ({ form, onClick }) => ( +const InputProjectData = withTranslation()(({ t, form, onClick }) => ( - {'Создание проекта'} - {'Контракт проекта будет загружен в сеть при помощи кошелька'} + {t('headings:projectCreating.heading')} + {t('headings:projectCreating.subheading')}
@@ -179,22 +184,24 @@ const InputProjectData = ({ form, onClick }) => (
- +

- Название задается вами и отображается в списке проектов + {t('explanations:project.name')}

{ onClick(); }}> - Назад + {t('buttons:back')}
-); +)); const StepIndicator = ({ step, count }) => (
diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 5558fb4d..6c961402 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -4,6 +4,7 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import { Button, IconButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -147,27 +148,29 @@ class CreateNewProjectWithoutTokens extends Component { } } -const CreateTokenData = inject('userStore', 'appStore')(observer(({ userStore: { address }, appStore: { balances }, form }) => ( +const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation()(({ + t, userStore: { address }, appStore: { balances }, form, +}) => ( - {'Создание токенов'} - {''} + {t('headings:newTokens.heading')} + {t('headings:newTokens.subheading')}

- Контракт будет загружен в сеть при помощи кошелька: + {t('explanations:token.left.wallet')}

{address}

- Баланс: + {t('explanations:token.left.balance')}

{(balances[address.replace('0x', '')] / 1.0e18).toFixed(5)} {' ETH'}

-

Токены зачислятся на этот кошелек После их можно будет распределить

+

{t('explanations:token.left.tokens')}

@@ -190,56 +193,56 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(({ userStore: {

- Символом токена называется его сокращенно название. Например: ETH, BTC и т.п. + {t('explanations:token.right.symbol')}

- Общее число токенов задаете вы. - В дальнейшем их можно будет распределить - между участниками проекта + {t('explanations:token.right.count')}

- Назад + {t('buttons:back')}
-))); +)))); -const LoadingBlock = () => ( +const LoadingBlock = withTranslation()(({ t }) => ( - {'Создаем токены ERC20'} - {'Это не займет много времени'} + {t('headings:tokensCreating.heading')} + {t('headings:tokensCreating.subheading')} -); +)); -const TokenCreationAlert = ({ onSubmit }) => ( +const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => ( - {'Токены успешно созданы!'} - {'Теперь нужно создать проект'} + {t('headings:tokensCreated.heading')} + {t('headings:tokensCreated.subheading')}
- +
-); +)); -const InputProjectData = ({ form, onClick }) => ( +const InputProjectData = withTranslation()(({ form, onClick, t }) => ( - {'Создание проекта'} - {'Контракт проекта будет загружен в сеть при помощи кошелька'} + {t('headings:projectCreating.heading')} + {t('headings:projectCreating.subheading')}
@@ -254,17 +257,17 @@ const InputProjectData = ({ form, onClick }) => (

- Название задается вами и отображается в списке проектов + {t('explanations:project.name')}

{ onClick(); }}> - Назад + {t('buttons:back')}
-); +)); const StepIndicator = ({ step, count }) => (
diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index 13ef6579..740c7ccf 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -12,7 +12,7 @@ import Indicator from '../Indicator'; import styles from '../Login/Login.scss'; import passwordValidation from '../../utils/PasswordValidation'; -@withTranslation(['headings']) +@withTranslation() class PasswordForm extends Component { constructor(props) { super(props); @@ -44,38 +44,32 @@ class PasswordForm extends Component {
- +

- Пароль задается на английской раскладке + { t('explanations:passwordCreating.0')}
- И должен содержать: + { t('explanations:passwordCreating.1')}

  • - {' '} - цифру - {' '} + { t('explanations:passwordRules.numeric')}
  • - {' '} - заглавную букву - {' '} + { t('explanations:passwordRules.upperCase')}
  • - {' '} - спецсимвол + { t('explanations:passwordRules.symbol')}
  • - {' '} - не менее 6 знаков + { t('explanations:passwordRules.length')}

@@ -85,7 +79,7 @@ class PasswordForm extends Component { - Назад + {t('buttons:back')} diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index e3bd0fe0..614eba6b 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -2,6 +2,7 @@ import React from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import Container from '../Container'; import FormBlock from '../FormBlock'; import { Button } from '../Button'; @@ -10,23 +11,23 @@ import Heading from '../Heading'; import styles from '../Login/Login.scss'; -const CreationAlert = ({ success = false, recover = false }) => ( +const CreationAlert = withTranslation()(({ t, success = false, recover = false }) => (
- {success ? 'Создание кошелька' : recover ? 'Восстановление кошелька' : ''} - {success ? 'Кошелек успешно создан' : recover ? 'Кошелек успешно восстанолен' : ''} + {success ? t('headings:walletCreated.heading') : recover ? t('headings:walletRoestored.heading') : ''} + {success ? t('headings:walletCreated.subheading') : recover ? t('headings:walletRoestored.subheading') : ''}
-); +)); CreationAlert.propTypes = { success: propTypes.bool.isRequired, recover: propTypes.bool.isRequired, diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 8a57fb99..492c7060 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -1,6 +1,7 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import { NavLink } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -8,14 +9,14 @@ import { Button } from '../Button'; import styles from '../Login/Login.scss'; -const DisplayUserInfo = inject('userStore')(observer(({ userStore: { balance, address } }) => ( +const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, userStore: { balance, address } }) => (
{' '} - {'Процесс восстановления кошелька'} - {'Проверьте правильность данных перед тем, как продолжить'} + {t('headings:walletRestoring.heading')} + {t('headings:walletRestoring.subheading')}
@@ -31,13 +32,13 @@ const DisplayUserInfo = inject('userStore')(observer(({ userStore: { balance, ad
- +
-))); +)))); export default DisplayUserInfo; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 7b980081..187daa4c 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -68,7 +68,7 @@ class Login extends Component { } } -const InputForm = withTranslation(['headings'])(({ +const InputForm = withTranslation()(({ appStore, form, t, }) => ( @@ -84,19 +84,19 @@ const InputForm = withTranslation(['headings'])(({
- + - + - +
)); -const LoadingBlock = withTranslation(['headings'])(({ t }) => ( +const LoadingBlock = withTranslation()(({ t }) => ( {t('headings:logging.heading')} diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index d713e1d8..16a5793e 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -11,7 +11,7 @@ import { AddIcon } from '../Icons'; import styles from '../Login/Login.scss'; - +@withTranslation() @inject('appStore') @observer class ProjectList extends Component { @@ -44,7 +44,7 @@ class ProjectList extends Component { - Добавить проект + {t('buttons:addProject')}
diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index e7b35988..e06616d8 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -4,6 +4,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import { NavLink, Redirect } from 'react-router-dom'; +import { withTranslation } from 'react-i18next'; import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; @@ -36,15 +37,15 @@ class ShowSeed extends Component { } render() { - const { userStore } = this.props; + const { userStore, t } = this.props; const { visible } = this.state; return (
- {'Резервная фраза'} - {'Нужна для восстановления пароля'} + {t('headings:showSeed.heading')} + {t('headings:showSeed.subheading')}
{userStore._mnemonic.map((word, id) => ( @@ -89,6 +90,7 @@ const SeedWord = ({ word, id, visible }) => ( ShowSeed.propTypes = { userStore: propTypes.object.isRequired, appStore: propTypes.object.isRequired, + t: propTypes.func.isRequired, }; SeedWord.propTypes = { id: propTypes.number.isRequired, @@ -96,4 +98,4 @@ SeedWord.propTypes = { visible: propTypes.bool.isRequired, }; -export default ShowSeed; +export default withTranslation()(ShowSeed); diff --git a/src/i18n.js b/src/i18n.js index d3ebb739..c00eb1d9 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -4,15 +4,20 @@ import headingsEn from './locales/ENG/headings'; import headingsRu from './locales/RUS/headings'; import explanationsEn from './locales/ENG/explanations'; import explanationsRu from './locales/RUS/explanations'; +import buttonsEn from './locales/ENG/buttons'; +import buttonsRu from './locales/RUS/buttons'; + const resources = { ENG: { headings: headingsEn, explanations: explanationsEn, + buttons: buttonsEn, }, RUS: { headings: headingsRu, explanations: explanationsRu, + buttons: buttonsRu, }, }; diff --git a/src/locales/ENG/buttons.js b/src/locales/ENG/buttons.js new file mode 100644 index 00000000..7303b775 --- /dev/null +++ b/src/locales/ENG/buttons.js @@ -0,0 +1,21 @@ +const buttons = { + login: 'Sign in', + newWallet: 'Create a new key', + forgotPassword: 'Forgot a password?', + showSeed: 'Show phrase', + hideSeed: 'Hide phrase', + seedWroted: 'I wrote down', + addProject: 'Add project', + create: 'Create', + connect: 'Connect', + continue: 'Continue', + finish: 'Complete', + back: 'Back', + otherProject: 'Choose another project', + toConnectedProject: 'To connected project', + toCreatedProject: 'To created project', + withTokens: 'Connect contract and create project', + withoutTokens: 'Create new contract and project', + toWallets: 'To wallets', +}; +export default buttons; diff --git a/src/locales/ENG/explanations.js b/src/locales/ENG/explanations.js index eb1b4d6e..697100f6 100644 --- a/src/locales/ENG/explanations.js +++ b/src/locales/ENG/explanations.js @@ -1,5 +1,25 @@ const explanations = { - + passwordCreating: ['Password must be set in', ' English layout and contain:'], + passwordRules: { + numeric: 'a numeral', + upperCase: 'a capital letter', + symbol: 'a special character', + length: 'minimum 6 char length', + }, + seed: ['The phrase gives you complete control over your account', 'Be sure to write down and do’t tell it to anyone'], + project: { name: 'The project title is set by you and appears in the project selection page', address: 'The address is provided by the creator of the project' }, + tokens: { + left: + { + wallet: 'The contract will be uploaded to the network by a wallet:', + balance: 'Balance: ', + tokens: 'Tokens will be credited to this wallet Тhey can be distributed later', + }, + right: { + symbol: 'A token symbol is its abbreviated name. For example: ETH, BTC, etc.', + count: 'The total number of tokens is set by you. They can be distributed among the project participants later.', + }, + }, }; export default explanations; diff --git a/src/locales/ENG/headings.js b/src/locales/ENG/headings.js index d9f1b8af..cee2c729 100644 --- a/src/locales/ENG/headings.js +++ b/src/locales/ENG/headings.js @@ -19,5 +19,8 @@ const headings = { projectCreating: { heading: 'Creating a project', subheading: 'The project contract will be uploaded to the network by a wallet' }, uploadingProject: { heading: 'Uploading a contract', subheading: 'It can take up to 5 minutes' }, projectCreated: { heading: 'Contract is created!', subheading: 'Now you can start working with it or choose another project' }, + walletRestored: { heading: 'Wallet restoring', subheading: 'Wallet is succesfully restored' }, + walletCreated: { heading: 'Wallet creating', subheading: 'Wallet is succesfully created' }, + walletRestoring: { heading: 'Wallet restoring', subheading: 'Check the data accuracy before continuing' }, }; export default headings; diff --git a/src/locales/RUS/buttons.js b/src/locales/RUS/buttons.js new file mode 100644 index 00000000..0dba007a --- /dev/null +++ b/src/locales/RUS/buttons.js @@ -0,0 +1,21 @@ +const buttons = { + login: 'Войти', + newWallet: 'Создать новый ключ', + forgotPassword: 'Забыли пароль?', + showSeed: 'Показать фразу', + hideSeed: 'Скрыть фразу', + seedWroted: 'Я записал', + addProject: 'Добавить проект', + create: 'Создать', + connect: 'Подключить', + continue: 'Продолжить', + finish: 'Завершить', + back: 'Назад', + otherProject: 'Выбрать другой проект', + toConnectedProject: 'К подлюченному проекту', + toCreatedProject: 'К созданному проекту', + withTokens: 'Подключить контракт и создать проект', + withoutTokens: 'Создать новые токены и проект', + toWallets: 'К выбору кошелька', +}; +export default buttons; diff --git a/src/locales/RUS/explanations.js b/src/locales/RUS/explanations.js index eb1b4d6e..80ee15d7 100644 --- a/src/locales/RUS/explanations.js +++ b/src/locales/RUS/explanations.js @@ -1,5 +1,28 @@ const explanations = { - + passwordCreating: ['Пароль задается на английской раскладке', 'И должен содержать:'], + passwordRules: { + numeric: 'цифру', + upperCase: 'заглавную букву', + symbol: 'спецсимол', + length: 'не менее 6 символов', + }, + seed: ['Фраза дает полный контроль над вашей учетной записью.', 'Обязательно запишите и не сообщайте ее никому'], + project: { + name: 'Название задается вами и отображается в списке проектов', + address: 'Адрес сообщает создатель проекта', + }, + tokens: { + left: + { + wallet: 'Контракт будет загружен в сеть при помощи кошелька:', + balance: 'Баланс: ', + tokens: 'Токены зачислятся на этот кошелек После их можно будет распределить', + }, + right: { + symbol: 'Символом токена называется его сокращенно название. Например: ETH, BTC и т.п.', + count: 'Общее число токенов задаете вы. В дальнейшем их можно будет распределить между участниками проекта', + }, + }, }; export default explanations; diff --git a/src/locales/RUS/headings.js b/src/locales/RUS/headings.js index a958daca..3ff246b8 100644 --- a/src/locales/RUS/headings.js +++ b/src/locales/RUS/headings.js @@ -19,5 +19,8 @@ const headings = { projectCreating: { heading: 'Создание проекта', subheading: 'Контракт проекта будет загружен в сеть при помощи кошелька' }, uploadingProject: { heading: 'Загружаем контракт', subheading: 'Это может занять до 5 минут' }, projectCreated: { heading: 'Проект успешно создан!', subheading: 'Теперь можно начать работу с ним или выбрать другой проект' }, + walletRestored: { heading: 'Восстановление кошелька', subheading: 'Кошелек успешно восстанолен' }, + walletCreated: { heading: 'Создание кошелька', subheading: 'Кошелек успешно создан' }, + walletRestoring: { heading: 'Процесс восстановления кошелька', subheading: 'Проверьте правильность данных перед тем, как продолжить' }, }; export default headings; From 4328cb92e699778c740b375489b045973a3ab2a6 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 13 Nov 2019 16:05:36 +0700 Subject: [PATCH 120/219] small fixes --- src/components/AddExisitingProject/index.js | 19 +++++++++---------- src/components/Alert/Alert.scss | 2 +- src/components/Logo/index.js | 4 +++- src/components/ShowSeed/index.js | 10 +++++----- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index e5f1e879..1b034234 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -49,7 +49,7 @@ class AddExistingProject extends Component { } render() { - const { appStore, t } = this.props; + const { appStore } = this.props; const { step } = this.state; const { connectProject } = this; @@ -63,18 +63,13 @@ class AddExistingProject extends Component { }, }, }); + return (
{step === 'default' ? : ''} {step === 'loading' ? : ''} {step === 'success' ? : ''} - - - - {t('buttons:back')} - -
@@ -112,7 +107,12 @@ const InputBlock = withTranslation()(({ t, form }) => (
- + + + + {t('buttons:back')} + +
)); @@ -137,13 +137,12 @@ const MessageBlock = withTranslation()(({ t }) => ( {t('buttons:toConnectedProject')} - + )); AddExistingProject.propTypes = { appStore: propTypes.object.isRequired, - t: propTypes.func.isRequired, }; InputBlock.propTypes = { form: propTypes.object.isRequired, diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index f5e58c10..1a2ffae4 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -4,13 +4,13 @@ position: fixed; top: 100%; left: 50%; - z-index: 3; display: flex; flex-flow: row nowrap; align-items: center; justify-content: space-between; max-width: 380px; padding: 15px; + background-color: $white; border: 1px solid $lightGrey; border-radius: 2px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); diff --git a/src/components/Logo/index.js b/src/components/Logo/index.js index b0f84018..af198298 100644 --- a/src/components/Logo/index.js +++ b/src/components/Logo/index.js @@ -2,7 +2,9 @@ import React from 'react'; import styles from './Logo.scss'; const Logo = () => ( - + + // eslint-disable-next-line jsx-a11y/anchor-is-valid + 01 diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index e06616d8..ca3836fc 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -54,24 +54,24 @@ class ShowSeed extends Component {
- +
- Назад + {t('buttons:back')}
-

Фраза дает полный контроль над вашей учетной записью

-

Обязательно запишите и не сообщайте ее никому

+

{t('explanations:seed.0')}

+

{t('explanations:seed.1')}

{!visible ? : } - {!visible ? 'Показать фразу' : 'Скрыть фразу'} + {!visible ? t('buttons:showSeed') : t('buttons:hideSeed')}
From eb315ae44c5d1bbbd6467296d94981a6e99a69ce Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 13 Nov 2019 17:42:11 +0700 Subject: [PATCH 121/219] More locales and validator messages --- src/components/CreationAlert/index.js | 4 +-- src/components/InputSeed/index.js | 12 ++++--- src/i18n.js | 4 +++ src/locales/ENG/errors.js | 0 src/locales/ENG/explanations.js | 2 +- src/locales/ENG/fields.js | 13 +++++++ src/locales/ENG/headings.js | 2 +- src/locales/RUS/errors.js | 0 src/locales/RUS/explanations.js | 2 +- src/locales/RUS/fields.js | 13 +++++++ src/locales/RUS/headings.js | 2 +- src/stores/FormsStore/ConnectProject.js | 5 +-- src/stores/FormsStore/ConnectToken.js | 3 +- src/stores/FormsStore/CreateProject.js | 5 +-- src/stores/FormsStore/CreateToken.js | 9 ++--- src/stores/FormsStore/CreateWalletForm.js | 5 +-- src/stores/FormsStore/LoginForm.js | 5 +-- src/utils/Validator/index.js | 36 +++++++++++-------- ...bd00ca3a9ed0825ded12edd4ac010e54225ac.json | 21 +++++++++++ 19 files changed, 104 insertions(+), 39 deletions(-) create mode 100644 src/locales/ENG/errors.js create mode 100644 src/locales/ENG/fields.js create mode 100644 src/locales/RUS/errors.js create mode 100644 src/locales/RUS/fields.js create mode 100644 src/wallets/UTC--2019-13-3T9-50-50.871000000Z--613bd00ca3a9ed0825ded12edd4ac010e54225ac.json diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 614eba6b..d8e59eb3 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -16,8 +16,8 @@ const CreationAlert = withTranslation()(({ t, success = false, recover = false }
- {success ? t('headings:walletCreated.heading') : recover ? t('headings:walletRoestored.heading') : ''} - {success ? t('headings:walletCreated.subheading') : recover ? t('headings:walletRoestored.subheading') : ''} + {success ? t('headings:walletCreated.heading') : recover ? t('headings:walletRestored.heading') : ''} + {success ? t('headings:walletCreated.subheading') : recover ? t('headings:walletRestored.subheading') : ''}
- projects ); } } -const Progress = inject('appStore')(observer(({ appStore, step }) => ( +const Progress = withTranslation()(inject('appStore')(observer(({ t, appStore, step }) => ( - {'Загружаем контракт'} - {'Это может занять до 5 минут'} + {t('headings:uploadingProject.heading')} + {t('headings:uploadingProject.subheading')}
(
-))); +)))); -const AlertBlock = () => ( +const AlertBlock = withTranslation()(({ t }) => ( - {'Проект успешно создан!'} - {'Теперь можно начать работу с ним или выбрать другой проект'} + {t('headings:projectCreated.heading')} + {t('headings:projectCreated.subheading')} {} {'К подключенному проекту'} - + -); +)); // //ProjectUploading.propTypes = {}; ProjectUploading.propTypes = { appStore: propTypes.object.isRequired, + t: propTypes.func.isRequired, }; Progress.propTypes = { step: propTypes.number.isRequired, appStore: propTypes.object.isRequired, + t: propTypes.func.isRequired, }; export default ProjectUploading; diff --git a/src/i18n.js b/src/i18n.js index e18f7fef..908f21c7 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -10,6 +10,8 @@ import fieldsEn from './locales/ENG/fields'; import fieldsRu from './locales/RUS/fields'; import otherEn from './locales/ENG/other'; import otherRu from './locales/RUS/other'; +import errorsEn from './locales/ENG/errors'; +import errorsRu from './locales/RUS/errors'; const resources = { @@ -19,6 +21,7 @@ const resources = { buttons: buttonsEn, fields: fieldsEn, other: otherEn, + errors: errorsEn, }, RUS: { headings: headingsRu, @@ -26,6 +29,7 @@ const resources = { buttons: buttonsRu, fields: fieldsRu, other: otherRu, + errors: errorsRu, }, }; diff --git a/src/locales/ENG/errors.js b/src/locales/ENG/errors.js index e69de29b..73888097 100644 --- a/src/locales/ENG/errors.js +++ b/src/locales/ENG/errors.js @@ -0,0 +1,11 @@ +const errors = { + wrongAddress: 'Enter valid address', + wrongPassword: 'Wrong password, please try again', + tryAgain: 'Something goes wrong, please try again', + validationError: 'Please check field filled accurate', + emptyFields: 'Form have empty fields', + lowBalance: 'Your balance is to low for this', + hostUnreachable: 'Host is unreachable, please check your internet connection and try again', +}; + +export default errors; diff --git a/src/locales/ENG/other.js b/src/locales/ENG/other.js index 76d20c36..5e07a5dc 100644 --- a/src/locales/ENG/other.js +++ b/src/locales/ENG/other.js @@ -2,5 +2,10 @@ const other = { step: 'Step', from: 'from', yourWallet: 'Your wallet', + compiling: 'Compiling', + sending: 'Sendind', + txHash: 'Awaiting hash', + txReceipt: 'Awaiting receipt', + questionsUploading: 'Uploading questions', }; export default other; diff --git a/src/locales/RUS/errors.js b/src/locales/RUS/errors.js index e69de29b..6c54fb3d 100644 --- a/src/locales/RUS/errors.js +++ b/src/locales/RUS/errors.js @@ -0,0 +1,10 @@ +const errors = { + wrongAddress: 'Проверьте правильность введенного адреса', + wrongPassword: 'Неверный пароль, попробуйте еще раз', + tryAgain: 'Произошла ошибка, попробуйте еще раз', + validationError: 'Проверьте правильность заполнения данных', + emptyFields: 'Вы ввели не все данные, пожалуйста, введите все данные', + lowBalance: 'Ваш баланс слишком мал для этого действия', + hostUnreachable: 'Соединение с хостом потеряно, проверьте доступ к интернету и повторите еще раз', +}; +export default errors; diff --git a/src/locales/RUS/other.js b/src/locales/RUS/other.js index 1147d0ff..61ddc9e5 100644 --- a/src/locales/RUS/other.js +++ b/src/locales/RUS/other.js @@ -2,5 +2,10 @@ const other = { step: 'Шаг', from: 'из', yourWallet: 'Ваш кошелек', + compiling: 'Компиляция', + sending: 'Отправка', + txHash: 'Получение хэша', + txReceipt: 'Получение чека', + questionsUploading: 'Загрузка вопросов', }; export default other; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 0b6d6969..6747af2e 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -43,6 +43,15 @@ class UserStore { this.rootStore.walletService.readWallet(wallet, password); } + @action checkBalance(address) { + const { Web3Service: { web3 } } = this.rootStore; + return new Promise((resolve, reject) => { + web3.eth.getBalance(address).then((balance) => { + resolve((balance / 1.0e18).toFixed(5)); + }).catch(() => { reject(); }); + }); + } + @action createWallet(password) { return new Promise((resolve, reject) => { this.rootStore.walletService.createWallet(password).then((data) => { @@ -84,7 +93,8 @@ class UserStore { this.readWallet(password).then((data) => { if (!(data.privateKey instanceof Error)) { this.privateKey = data.privateKey; - this.setEncryptedWallet(data.wallet); + console.log(data); + this.setEncryptedWallet(JSON.parse(data.wallet)); this.authorized = true; } }).catch(() => { From 28dcb0655b3ffc6051f4c8b347c7c710d5deb7e2 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 10:37:05 +0700 Subject: [PATCH 126/219] small fix --- src/models/FormModel/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/models/FormModel/index.js b/src/models/FormModel/index.js index 8f399182..86654215 100644 --- a/src/models/FormModel/index.js +++ b/src/models/FormModel/index.js @@ -31,7 +31,6 @@ class ExtendedForm extends Form { onSuccess: (form) => { const promise = $this.fireHook('onSuccessHook', form); promise - .catch(() => {}) .finally(() => { $this.setLoading(false); }); From 15dfe04df12c260f19902b1da21b98a58fd5c89c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 10:58:04 +0700 Subject: [PATCH 127/219] removed console.log's and fixed tx Sending --- src/components/AddExisitingProject/index.js | 2 +- src/components/Button/Button.scss | 26 ++++++++++++------- .../CreateNewProjectWithoutTokens/index.js | 6 ++--- src/components/InputSeed/index.js | 1 - src/components/ProjectList/index.js | 2 +- src/config.json | 12 +++++++++ .../ContractService/ContractService.js | 3 --- src/stores/UserStore/UserStore.js | 7 +++-- src/utils/Validator/index.js | 2 +- 9 files changed, 37 insertions(+), 24 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 68547cf2..60155cfc 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -138,7 +138,7 @@ const MessageBlock = withTranslation()(({ t }) => ( {t('buttons:toConnectedProject')} - + )); diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index c0d03066..7ceb5e05 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -13,16 +13,7 @@ vertical-align: middle; } &__content { - display: table; - line-height: 15px; - text-align: center; - &>* { - display: table-cell; - } - &>.btn__text { - max-width: 65px; - text-align: left; - } + } svg { margin-right: 10px; @@ -128,6 +119,7 @@ color: $grey; border-style: dashed; border-radius: 0; + &:hover { color: $primary; } @@ -135,6 +127,20 @@ color: $white; } } + &--add-project{ + .btn__content{ + display: table; + line-height: 15px; + text-align: center; + &>* { + display: table-cell; + } + &>.btn__text { + max-width: 65px; + text-align: left; + } + } + } &--noborder { border: none; } diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index d65498eb..e380461b 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -53,8 +53,8 @@ class CreateNewProjectWithoutTokens extends Component { } = form.values(); const deployArgs = [name, symbol, Number(count)]; userStore.readWallet(password) - .then((buffer) => { - if (!(buffer instanceof Error)) { + .then((data) => { + if (!(data instanceof Error)) { userStore.checkBalance(userStore.address).then((balance) => { if (balance > 0.5) { appStore.deployContract('ERC20', deployArgs, password).then((hash) => { @@ -210,7 +210,7 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- +
diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index a2b6cae0..9e44292b 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -49,7 +49,6 @@ class InputSeed extends Component { const values = Object.values(form.values()); userStore.mnemonicRepeat = values; const mnemonic = values.join(' '); - console.log(mnemonic); if (userStore.isSeedValid(mnemonic)) { this.toggleLoading(); if (recover) { diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 16a5793e..82c91cfa 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -42,7 +42,7 @@ class ProjectList extends Component { {' '} {projects} - + {t('buttons:addProject')} diff --git a/src/config.json b/src/config.json index 2740d30e..3eee0cb0 100644 --- a/src/config.json +++ b/src/config.json @@ -29,6 +29,18 @@ { "name": "Name123123", "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" + }, + { + "name": "name123213", + "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" + }, + { + "name": "nasdeq", + "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" + }, + { + "name": "name", + "address": "0xEa7e6b7c017d18671f666F23303628a48aBbe4aF" } ] } \ No newline at end of file diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index c1ac8c2d..42e051a6 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -223,18 +223,15 @@ class ContractService { return new Promise((resolve, reject) => { Web3Service.formTxData(address, rawTx, maxGasPrice) .then((formedTx) => { - console.log(formedTx); userStore.singTransaction(formedTx, password) .then((signedTx) => { Web3Service.sendSignedTransaction(`0x${signedTx}`) .then((txHash) => { - console.log(txHash); const interval = setInterval(() => { web3.eth.getTransactionReceipt(txHash).then((receipt) => { // eslint-disable-next-line valid-typeof if (receipt) { clearInterval(interval); - console.log(receipt); resolve(); } }); diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 6747af2e..a20be809 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -93,7 +93,6 @@ class UserStore { this.readWallet(password).then((data) => { if (!(data.privateKey instanceof Error)) { this.privateKey = data.privateKey; - console.log(data); this.setEncryptedWallet(JSON.parse(data.wallet)); this.authorized = true; } @@ -139,10 +138,10 @@ class UserStore { @action singTransaction(data, password) { return new Promise((resolve, reject) => { // eslint-disable-next-line consistent-return - this.readWallet(password).then((buffer) => { - if (buffer instanceof Error) return false; + this.readWallet(password).then((info) => { + if (info instanceof Error) return false; const privateKey = Buffer.from( - buffer, + info.privateKey, 'hex', ); const tx = new Tx(data, { chain: 'ropsten' }); diff --git a/src/utils/Validator/index.js b/src/utils/Validator/index.js index 91e9623f..e8fd5aef 100644 --- a/src/utils/Validator/index.js +++ b/src/utils/Validator/index.js @@ -39,7 +39,7 @@ const plugins = { ); validator.useLang(languages[language]); validator.setMessages('en', { - required: 'The :attribute field is required.', + required: 'The field is required.', same: 'Fields must be same', password: 'Field value not valid', address: 'Enter valid address', From 3ef1aeb7e70ea5b07104868181bccf1017be511c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 11:38:38 +0700 Subject: [PATCH 128/219] fixed some problems with translations --- src/components/CreateNewProject/index.js | 4 ++-- src/components/CreateNewProjectWithTokens/index.js | 4 ++-- src/components/DisplayUserInfo/index.js | 4 ++-- src/locales/ENG/other.js | 6 ++++++ src/locales/RUS/fields.js | 2 +- src/locales/RUS/other.js | 6 ++++++ 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 50bf5b57..016b5244 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -30,14 +30,14 @@ class CreateNewProject extends Component {
- Если есть токены ERC20 + {t('other:withTokens')} {t('buttons:withTokens')} - Если токенов ERC20 нет + {t('other:withoutTokens')} {t('buttons:withoutTokens')} diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index d0102fb2..463b2076 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -174,12 +174,12 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t,
-

Символ токена

+

{t('other:tokenSymbol')}

{ERC.symbol}

-

Баланс

+

{t('other:count')}

{ERC.totalSupply}

diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 492c7060..51bb1793 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -21,12 +21,12 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use
-

Символ токена

+

{t('other:walletAddress')}

{`${address.substr(0, 8)}...${address.substr(35, 41)}`}

-

Баланс

+

{t('other:balance')}

{balance}

diff --git a/src/locales/ENG/other.js b/src/locales/ENG/other.js index 5e07a5dc..755f406d 100644 --- a/src/locales/ENG/other.js +++ b/src/locales/ENG/other.js @@ -7,5 +7,11 @@ const other = { txHash: 'Awaiting hash', txReceipt: 'Awaiting receipt', questionsUploading: 'Uploading questions', + walletAddress: 'Wallet', + balance: 'Balance', + tokenSymbol: 'Token symbol', + count: 'Quantity', + withTokens: 'If you have ERC20 tokens', + withoutTokens: "If you don't have ERC20 tokens", }; export default other; diff --git a/src/locales/RUS/fields.js b/src/locales/RUS/fields.js index 0a784a85..81c14fb6 100644 --- a/src/locales/RUS/fields.js +++ b/src/locales/RUS/fields.js @@ -1,7 +1,7 @@ const placeholders = { wallet: 'Выберите кошелек', password: 'Пароль', - enterPassword: 'Ввелите пароль', + enterPassword: 'Введите пароль', repeatPassword: 'Повторите пароль', tokenTitle: 'Название токена', symbol: 'Символ', diff --git a/src/locales/RUS/other.js b/src/locales/RUS/other.js index 61ddc9e5..8e8483c2 100644 --- a/src/locales/RUS/other.js +++ b/src/locales/RUS/other.js @@ -7,5 +7,11 @@ const other = { txHash: 'Получение хэша', txReceipt: 'Получение чека', questionsUploading: 'Загрузка вопросов', + walletAddress: 'Кошелек', + balance: 'Баланс', + tokenSymbol: 'Символ токена', + count: 'Количество', + withTokens: 'Если есть токены ERC20', + withoutTokens: 'Если токенов ERC20 нет', }; export default other; From 7587704e9998b9a82d43135be27a2f82f1734594 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 14:00:24 +0700 Subject: [PATCH 129/219] removed wrong env from package.json and fixed password regex --- package.json | 5 +++-- src/utils/Validator/index.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4af89483..c1ec4ac0 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "scripts": { "render-test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", - "build": "webpack --mode=production --config webpack.dev.js && NODE_ENV=production electron-builder", + "build": "webpack --mode=production --config webpack.dev.js && electron-builder", "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", - "electron-build": "NODE_ENV=production electron-builder", + "electron-build": "electron-builder", "storybook": "start-storybook", "docs": "jsdoc -c ./jsdoc.json" }, @@ -103,6 +103,7 @@ ] }, "build": { + "appId": "ZeroOne", "files": [ "build/**/*", "src/wallets/**/*", diff --git a/src/utils/Validator/index.js b/src/utils/Validator/index.js index e8fd5aef..3e9573e9 100644 --- a/src/utils/Validator/index.js +++ b/src/utils/Validator/index.js @@ -16,7 +16,7 @@ validatorjs.prototype.setAttributeNames = function setAttributeNames(attributes) const rules = { password: { - function: (value) => value.match(/(?=(?=.*[!@#$%^&*()_\-+=~])+(?=[a-z A-Z])+(?=[^0-9])).{6,}/g), + function: (value) => value.match(/(?=.*[!@#$%^&*()_\-+=~])+(?=[a-z]*[A-Z]*[0-9]).{6,}/g), }, address: { function: (value) => value.match(/(0x)+([0-9 a-f A-F]){40}/g), From 0da228442d45524c203622a43c24a1c016e94c4c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 14:05:05 +0700 Subject: [PATCH 130/219] fixed wrong redirect when creating project without tokens --- src/components/CreateNewProjectWithoutTokens/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index e380461b..9b82ccd7 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -37,8 +37,7 @@ class CreateNewProjectWithoutTokens extends Component { returnToContractConnecting = () => { this.setState({ - position: 'token', - step: 1, + position: 'tokenCreated', }); } From 916d1f7cccefd8de70cbc75798983a42a0393c9d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 14:54:30 +0700 Subject: [PATCH 131/219] Small fixes --- src/components/Button/Button.scss | 7 ++++--- src/components/Login/index.js | 4 +++- src/stores/FormsStore/CreateToken.js | 2 +- src/stores/UserStore/UserStore.js | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 7ceb5e05..cb1e48cf 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -12,9 +12,10 @@ &__text { vertical-align: middle; } - &__content { - - } + &[disabled='true']{ + cursor: default; + opacity: .5; + } svg { margin-right: 10px; path, diff --git a/src/components/Login/index.js b/src/components/Login/index.js index e3d7ab85..171ef33e 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -40,7 +40,9 @@ class Login extends Component { const loginForm = new LoginForm({ hooks: { onSuccess(form) { - userStore.login(form.values().password); + return new Promise(() => { + userStore.login(form.values().password); + }); }, onError() { appStore.displayAlert(t('errors:emptyFields'), 3000); diff --git a/src/stores/FormsStore/CreateToken.js b/src/stores/FormsStore/CreateToken.js index 0ff2558e..7ab6a2b7 100644 --- a/src/stores/FormsStore/CreateToken.js +++ b/src/stores/FormsStore/CreateToken.js @@ -25,7 +25,7 @@ class CreateTokenForm extends ExtendedForm { type: 'text', label: 'Количество токенов', placeholder: i18n.t('fields:quantity'), - rules: 'required|numeric', + rules: 'required|numeric|min:1|max:2147483647 ', }, { name: 'password', type: 'password', diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index a20be809..9fa8d483 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -2,6 +2,7 @@ /* eslint-disable no-unused-vars */ import { observable, action } from 'mobx'; import { Transaction as Tx } from 'ethereumjs-tx'; +import i18n from 'i18next'; /** * Describes store with user data */ @@ -98,7 +99,7 @@ class UserStore { } }).catch(() => { this.logging = false; - appStore.displayAlert('Неверный пароль', 3000); + appStore.displayAlert(i18n.t('errors:wrongPassword'), 3000); }); } From a3c5fb8518c7e56e97cb424121abbec83db25beb Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 15:40:01 +0700 Subject: [PATCH 132/219] small styling improvements --- src/components/Button/Button.scss | 2 +- .../CreateNewProjectWithTokens/index.js | 18 +++++++++++---- .../CreateNewProjectWithoutTokens/index.js | 23 +++++++++++++------ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index cb1e48cf..c30de5b2 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -12,7 +12,7 @@ &__text { vertical-align: middle; } - &[disabled='true']{ + &[disabled]{ cursor: default; opacity: .5; } diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 463b2076..d04300c3 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -30,6 +30,7 @@ class CreateNewProjectWithTokens extends Component { this.state = { position: 'token', step: 1, + disabled: false, }; } @@ -65,6 +66,7 @@ class CreateNewProjectWithTokens extends Component { gotoUploading = (form) => { const { appStore, userStore, t } = this.props; const { name, password } = form.values(); + this.setState({ disabled: true }); appStore.name = name; appStore.password = password; userStore.readWallet(password) @@ -79,6 +81,7 @@ class CreateNewProjectWithTokens extends Component { this.setState({ position: 'projectInfo', step: 2, + disabled: false, }); appStore.displayAlert(t('errors:lowBalance'), 3000); } @@ -88,13 +91,14 @@ class CreateNewProjectWithTokens extends Component { this.setState({ position: 'projectInfo', step: 2, + disabled: false, }); appStore.displayAlert(t('errors:tryAgain'), 3000); }); } render() { - const { position, step } = this.state; + const { position, step, disabled } = this.state; if (position === 'uploading') return ; const { gotoUploading, checkToken } = this; const connectToken = new ConnectTokenForm({ @@ -110,7 +114,9 @@ class CreateNewProjectWithTokens extends Component { const createProject = new CreateProjectForm({ hooks: { onSuccess(form) { - gotoUploading(form); + return new Promise(() => { + gotoUploading(form); + }); }, onError() { }, @@ -123,7 +129,7 @@ class CreateNewProjectWithTokens extends Component { {position === 'token' ? : ''} {position === 'check' ? : ''} {position === 'tokenChecked' ? : ''} - {position === 'projectInfo' ? : ''} + {position === 'projectInfo' ? : ''}
); @@ -192,7 +198,9 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, )))); -const InputProjectData = withTranslation()(({ t, form, onClick }) => ( +const InputProjectData = withTranslation()(({ + t, form, onClick, disabled, +}) => ( {t('headings:projectCreating.heading')} @@ -206,7 +214,7 @@ const InputProjectData = withTranslation()(({ t, form, onClick }) => (
-
diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 9b82ccd7..5a845ec9 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -32,6 +32,7 @@ class CreateNewProjectWithoutTokens extends Component { position: 'token', step: 1, tokenAddr: '', + disabled: false, }; } @@ -103,7 +104,7 @@ class CreateNewProjectWithoutTokens extends Component { const { name, password } = form.values(); appStore.name = name; appStore.password = password; - + this.setState({ disabled: true }); userStore.readWallet(password) .then(() => { userStore.checkBalance(userStore.address) @@ -116,6 +117,7 @@ class CreateNewProjectWithoutTokens extends Component { this.setState({ position: 'projectInfo', step: 2, + disabled: false, }); appStore.displayAlert(t('errors:lowBalance'), 3000); } @@ -125,6 +127,7 @@ class CreateNewProjectWithoutTokens extends Component { this.setState({ position: 'projectInfo', step: 2, + disabled: false, }); appStore.displayAlert(t('errors:tryAgain'), 3000); }); @@ -132,13 +135,15 @@ class CreateNewProjectWithoutTokens extends Component { render() { const { appStore, t } = this.props; - const { position, step } = this.state; + const { position, step, disabled } = this.state; if (position === 'uploading') return ; const { createToken, gotoUploading } = this; const CreateToken = new CreateTokenForm({ hooks: { onSuccess(form) { - createToken(form); + return new Promise(() => { + createToken(form); + }); }, onError() { appStore.displayAlert(t('errors:validationError'), 3000); @@ -148,7 +153,9 @@ class CreateNewProjectWithoutTokens extends Component { const CreateProject = new CreateProjectForm({ hooks: { onSuccess(form) { - gotoUploading(form); + return new Promise(() => { + gotoUploading(form); + }); }, onError() { appStore.displayAlert(t('errors:validationError'), 3000); @@ -162,7 +169,7 @@ class CreateNewProjectWithoutTokens extends Component { {position === 'token' ? : ''} {position === 'creation' ? : ''} {position === 'tokenCreated' ? : ''} - {position === 'projectInfo' ? : ''} + {position === 'projectInfo' ? : ''}
); @@ -259,7 +266,9 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => ( )); -const InputProjectData = withTranslation()(({ form, onClick, t }) => ( +const InputProjectData = withTranslation()(({ + form, disabled, onClick, t, +}) => ( {t('headings:projectCreating.heading')} @@ -273,7 +282,7 @@ const InputProjectData = withTranslation()(({ form, onClick, t }) => (
- +
From 6ef21498aa8023a7488d9f9e7cf2ffc95e764e70 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 18:01:38 +0700 Subject: [PATCH 133/219] Design fixes --- src/assets/styles/style.scss | 13 +++- src/components/AddExisitingProject/index.js | 6 +- src/components/AddNewProject/index.js | 6 +- src/components/Button/Button.scss | 12 ++++ .../CreateNewProjectWithTokens/index.js | 18 +++-- .../CreateNewProjectWithoutTokens/index.js | 71 ++++++++++++------- src/components/CreateWallet/PasswordForm.js | 6 +- src/components/CreateWallet/index.js | 6 +- src/components/DisplayUserInfo/index.js | 6 +- src/components/Explanation/Explanation.scss | 6 +- src/components/Heading/Heading.scss | 2 + src/components/Login/Login.scss | 28 ++++++-- src/components/ProjectList/index.js | 2 +- src/components/ProjectUploading/index.js | 12 ++-- src/components/User/User.scss | 1 + src/locales/ENG/explanations.js | 4 +- src/locales/RUS/explanations.js | 4 +- src/locales/RUS/headings.js | 12 ++-- src/stores/FormsStore/ConnectProject.js | 2 +- src/stores/FormsStore/CreateProject.js | 2 +- 20 files changed, 154 insertions(+), 65 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 881d812d..19a8b167 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -41,7 +41,7 @@ svg { top: 50%; left: 100%; width: 96px; - border-top: 2px dashed rgba($color: $primary, $alpha: .5); + border: 1px dashed rgba($color: $primary, $alpha: .5); transform: translateY(-50%); opacity: 0; transition: .3s ease-in; @@ -75,7 +75,6 @@ svg { transition: .2s; stroke: rgba($color: $primary, $alpha: .5); } - & > img { position: absolute; top: 50%; @@ -99,6 +98,7 @@ svg { margin: 5px 0 0 -35%; } } + &.success{ .progress-block__icon { &>svg { @@ -119,7 +119,10 @@ svg { border-top: 2px solid rgba($color: $primary, $alpha: 1); opacity: 1; } - + &>p{ + color: $primary; + opacity: 1; + } } &.active{ & > img { @@ -148,6 +151,10 @@ svg { animation-play-state: running; transform-origin: center center; } + &>p{ + color: $primary; + opacity: 1; + } } } diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 60155cfc..795de7af 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -60,7 +60,7 @@ class AddExistingProject extends Component { connectProject(form); }, onError() { - appStore.displayAlert(t('errors:wrongAddress'), 3000); + appStore.displayAlert(t('errors:validationError'), 3000); }, }, }); @@ -91,7 +91,7 @@ const InputBlock = withTranslation()(({ t, form }) => (
-
@@ -133,7 +133,7 @@ const MessageBlock = withTranslation()(({ t }) => ( {t('headings:projectConnected.heading')} {t('headings:projectConnected.subheading')} - + {} {t('buttons:toConnectedProject')} diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 62817ba0..b8c97667 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -16,7 +16,11 @@ const AddNewProject = withTranslation()(({ t }) => ( {t('headings:addingProject.heading')} - {t('headings:addingProject.subheading')} + + {t('headings:addingProject.subheading.0')} +
+ {t('headings:addingProject.subheading.1')} +
diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index c30de5b2..41f0a9e3 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -176,6 +176,18 @@ } } } + &--310{ + max-width: 310px; + } + &--240{ + max-width: 240px; + } + &--project { + padding: 30px 10px; + .btn__text{ + font-weight: 700; + } + } &.icon--top{ svg { width: 100%; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index d04300c3..ea41b315 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -147,7 +147,7 @@ const InputTokenAddress = withTranslation()(({ t, form }) => (
-
@@ -175,7 +175,11 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, {t('headings:checkingTokensConfirm.heading')} - {t('headings:checkingTokensConfirm.subheading')} + + {t('headings:checkingTokensConfirm.subheading.0')} +
+ {t('headings:checkingTokensConfirm.subheading.1')} +
@@ -190,7 +194,7 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t,
-
@@ -204,7 +208,11 @@ const InputProjectData = withTranslation()(({ {t('headings:projectCreating.heading')} - {t('headings:projectCreating.subheading')} + + {t('headings:projectCreating.subheading.0')} +
+ {t('headings:projectCreating.subheading.1')} +
@@ -214,7 +222,7 @@ const InputProjectData = withTranslation()(({
-
diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 5a845ec9..e0433ffc 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -26,6 +26,17 @@ import styles from '../Login/Login.scss'; @inject('userStore', 'appStore') @observer class CreateNewProjectWithoutTokens extends Component { + form = new CreateTokenForm({ + hooks: { + onSuccess: (form) => new Promise((resolve, reject) => { + this.createToken(form).then(resolve()).catch(reject()); + }), + onError: () => { + this.showValidationError(); + }, + }, + }); + constructor(props) { super(props); this.state = { @@ -36,6 +47,7 @@ class CreateNewProjectWithoutTokens extends Component { }; } + returnToContractConnecting = () => { this.setState({ position: 'tokenCreated', @@ -47,7 +59,6 @@ class CreateNewProjectWithoutTokens extends Component { this.setState({ position: 'creation', }); - const { name, symbol, count, password, } = form.values(); @@ -73,6 +84,7 @@ class CreateNewProjectWithoutTokens extends Component { }).catch(() => { appStore.displayAlert(t('errors:hostUnreachable'), 3000); }); }, 5000); }); + Promise.resolve(); } else { this.setState({ position: 'token', @@ -88,9 +100,15 @@ class CreateNewProjectWithoutTokens extends Component { step: 1, }); appStore.displayAlert(t('errors:wrongPassword'), 3000); + Promise.reject(); }); } + showValidationError = () => { + const { appStore, t } = this.props; + appStore.displayAlert(t('errors:validationError'), 3000); + } + gotoProjectInfo = () => { this.setState({ position: 'projectInfo', @@ -137,19 +155,7 @@ class CreateNewProjectWithoutTokens extends Component { const { appStore, t } = this.props; const { position, step, disabled } = this.state; if (position === 'uploading') return ; - const { createToken, gotoUploading } = this; - const CreateToken = new CreateTokenForm({ - hooks: { - onSuccess(form) { - return new Promise(() => { - createToken(form); - }); - }, - onError() { - appStore.displayAlert(t('errors:validationError'), 3000); - }, - }, - }); + const { gotoUploading } = this; const CreateProject = new CreateProjectForm({ hooks: { onSuccess(form) { @@ -166,7 +172,7 @@ class CreateNewProjectWithoutTokens extends Component {
- {position === 'token' ? : ''} + {position === 'token' ? : ''} {position === 'creation' ? : ''} {position === 'tokenCreated' ? : ''} {position === 'projectInfo' ? : ''} @@ -188,17 +194,25 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation

- {t('explanations:token.left.wallet')} -

{address}

+ {t('explanations:token.left.wallet.0')} +
+ {t('explanations:token.left.wallet.1')} + {address}

{t('explanations:token.left.balance')} -

- {(balances[address.replace('0x', '')] / 1.0e18).toFixed(5)} - {' ETH'} -

+ + + {(balances[address.replace('0x', '')] / 1.0e18).toFixed(5)} + {' ETH'} + + +

+

+ {t('explanations:token.left.tokens.0')} +
+ {t('explanations:token.left.tokens.1')}

-

{t('explanations:token.left.tokens')}

@@ -216,7 +230,7 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- +
@@ -258,7 +272,7 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => (
-
@@ -272,7 +286,12 @@ const InputProjectData = withTranslation()(({ {t('headings:projectCreating.heading')} - {t('headings:projectCreating.subheading')} + + {t('headings:projectCreating.subheading.0')} +
+ {t('headings:projectCreating.subheading.1')} +
+
@@ -282,7 +301,7 @@ const InputProjectData = withTranslation()(({
- +
diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index 740c7ccf..2a6c193b 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -34,7 +34,11 @@ class PasswordForm extends Component { {t('headings:passwordCreation.heading')} - {t('headings:passwordCreation.subheading')} + + {t('headings:passwordCreation.subheading.0')} +
+ {t('headings:passwordCreation.subheading.1')} +
diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index fa47f384..31520f0d 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -92,7 +92,11 @@ const CreationLoader = withTranslation(['headings'])(({ t }) => ( {t('headings:passwordCreation.heading')} - {t('headings:passwordCreation.subheading')} + + {t('headings:passwordCreation.subheading.0')} +
+ {t('headings:passwordCreation.subheading.1')} +
diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 51bb1793..c97c9eb1 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -16,7 +16,11 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use {t('headings:walletRestoring.heading')} - {t('headings:walletRestoring.subheading')} + + {t('headings:walletRestoring.subheading.0')} +
+ {t('headings:walletRestoring.subheading.1')} +
diff --git a/src/components/Explanation/Explanation.scss b/src/components/Explanation/Explanation.scss index 1961b796..e0bcabfd 100644 --- a/src/components/Explanation/Explanation.scss +++ b/src/components/Explanation/Explanation.scss @@ -9,7 +9,11 @@ padding-left: 10px; border-left: 1px solid $border; p { - margin-bottom: 5px; + margin-bottom: 15px; + line-height: 17px; + &>span{ + display: block; + } } } } \ No newline at end of file diff --git a/src/components/Heading/Heading.scss b/src/components/Heading/Heading.scss index ff340f58..0056e237 100644 --- a/src/components/Heading/Heading.scss +++ b/src/components/Heading/Heading.scss @@ -3,10 +3,12 @@ .heading { text-align: center; &--main { + width: 112%; margin-bottom: 5px; color: $primary; font-weight: bold; font-size: 24px; + transform: translateX(-6%); } &--sub { color: $secondary; diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index f1cd11ab..dd636d9b 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -23,7 +23,7 @@ } } &__block { - padding: 60px 90px; + padding: 60px 94px; text-align: center; .heading { margin-bottom: 60px; @@ -41,7 +41,7 @@ margin: 10px auto; &--default { width: 100%; - margin: 20px 0; + margin: 42px auto 20px; } } } @@ -50,9 +50,14 @@ } .btn--back { position: absolute; - bottom: -40px; + bottom: -62px; left: 50%; transform: translateX(-50%); + svg{ + width: 14px; + height: 12px; + margin-right: 3px; + } } &__explanation { position: absolute; @@ -61,8 +66,7 @@ text-align: left; transform: translateY(-50%); &--left { - right: 100%; - + right: 103.5%; } &--right { left: 102%; @@ -74,6 +78,9 @@ vertical-align: middle; } } + strong{ + font-weight: 700; + } } &__group { display: flex; @@ -101,6 +108,7 @@ display: inline-block; width: 1px; background-color: $primary; + opacity: .1; } &-value { color: $secondary; @@ -224,10 +232,18 @@ fill: $white; } } + .btn__content{ + .btn__text { + display: block; + width: 80%; + margin: 5px auto 0; + } + } + } &__label { display: inline-block; - margin-bottom: 10px; + margin-bottom: 0px; font-weight: 700; font-size: 14px; } diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 82c91cfa..f83d4f68 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -28,7 +28,7 @@ class ProjectList extends Component { render() { const { appStore: { projectList }, t } = this.props; const projects = projectList.map((project, index) => ( - + )); return ( diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 2bf5d515..78c1f8f8 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -131,14 +131,18 @@ const AlertBlock = withTranslation()(({ t }) => ( {t('headings:projectCreated.heading')} - {t('headings:projectCreated.subheading')} + + {t('headings:projectCreated.subheading.0')} +
+ {t('headings:projectCreated.subheading.1')} +
- + {} - {'К подключенному проекту'} + {t('buttons:toCreatedProject')} - +
)); diff --git a/src/components/User/User.scss b/src/components/User/User.scss index 739dc70e..1b9f31cf 100644 --- a/src/components/User/User.scss +++ b/src/components/User/User.scss @@ -11,6 +11,7 @@ margin: 0 10px; font-size: 12px; vertical-align: middle; + background-color: $white; &--full { display: none; } diff --git a/src/locales/ENG/explanations.js b/src/locales/ENG/explanations.js index 5395cb5b..6dc9bd22 100644 --- a/src/locales/ENG/explanations.js +++ b/src/locales/ENG/explanations.js @@ -11,9 +11,9 @@ const explanations = { token: { left: { - wallet: 'The contract will be uploaded to the network by a wallet:', + wallet: ['The contract will be uploaded to the network', ' by a wallet:'], balance: 'Balance: ', - tokens: 'Tokens will be credited to this wallet Тhey can be distributed later', + tokens: ['Tokens will be credited to this wallet', ' Тhey can be distributed later'], }, right: { symbol: 'A token symbol is its abbreviated name. For example: ETH, BTC, etc.', diff --git a/src/locales/RUS/explanations.js b/src/locales/RUS/explanations.js index 55588b71..bb55eede 100644 --- a/src/locales/RUS/explanations.js +++ b/src/locales/RUS/explanations.js @@ -14,9 +14,9 @@ const explanations = { token: { left: { - wallet: 'Контракт будет загружен в сеть при помощи кошелька:', + wallet: ['Контракт будет загружен в сеть', ' при помощи кошелька:'], balance: 'Баланс: ', - tokens: 'Токены зачислятся на этот кошелек После их можно будет распределить', + tokens: ['Токены зачислятся на этот кошелек ', 'После их можно будет распределить'], }, right: { symbol: 'Символом токена называется его сокращенно название. Например: ETH, BTC и т.п.', diff --git a/src/locales/RUS/headings.js b/src/locales/RUS/headings.js index bd1d17c6..da95effd 100644 --- a/src/locales/RUS/headings.js +++ b/src/locales/RUS/headings.js @@ -1,26 +1,26 @@ const headings = { login: { heading: 'Вход в систему', subheading: 'Приготовьтесь к новой эре в сфере голосования' }, logging: { heading: 'Выполняется вход', subheading: 'Это не займет много времени' }, - passwordCreation: { heading: 'Создание пароля', subheading: 'Будет использоваться для входа в кошелек и подтверждения транзакций' }, + passwordCreation: { heading: 'Создание пароля', subheading: ['Будет использоваться для входа в', 'кошелек и подтверждения транзакций'] }, showSeed: { heading: 'Резервная фраза', subheading: 'Нужна для восстановления пароля' }, seedCheck: { heading: 'Проверка резервной фразы', subheading: ['Проверяется фраза', 'Введите фразу, которую вы записали'] }, projects: { heading: 'Выбор проекта', subheading: 'Выберите проект или создайте новый' }, - addingProject: { heading: 'Добавление проекта', subheading: 'Cоздайте новый или подключите уже существующий' }, + addingProject: { heading: 'Добавление проекта', subheading: ['Cоздайте новый или подключите', 'уже существующий'] }, сonnectProject: { heading: 'Подключить проект', subheading: 'Подключите уже существующий проект' }, projectChecking: { heading: 'Проверяем адрес проекта', subheading: 'Это не займет много времени' }, projectConnected: { heading: 'Проект успешно подключен!', subheading: 'Теперь можно начать работу с ним или выбрать другой проект' }, newProject: { heading: 'Создание нового проекта', subheading: 'Выберите подходящий вам вариант' }, existingTokens: { heading: 'Подключение контракта', subheading: 'Владелец этого контракта будет считаться и владельцем создаваемого проекта' }, checkingTokens: { heading: 'Проверяем адрес контракта', subheading: 'Это не займет много времени' }, - checkingTokensConfirm: { heading: 'Контракт успешно проверен', subheading: 'Проверьте правильность данных перед тем, как продолжить' }, + checkingTokensConfirm: { heading: 'Контракт успешно проверен', subheading: ['Проверьте правильность данных', ' перед тем, как продолжить'] }, newTokens: { heading: 'Создание токенов', subheading: '' }, tokensCreating: { heading: 'Создаем токены ERC20', subheading: 'Это не займет много времени' }, tokensCreated: { heading: 'Токены успешно созданы!', subheading: 'Теперь нужно создать проект' }, - projectCreating: { heading: 'Создание проекта', subheading: 'Контракт проекта будет загружен в сеть при помощи кошелька' }, + projectCreating: { heading: 'Создание проекта', subheading: ['Контракт проекта будет загружен в сеть', 'при помощи кошелька'] }, uploadingProject: { heading: 'Загружаем контракт', subheading: 'Это может занять до 5 минут' }, - projectCreated: { heading: 'Проект успешно создан!', subheading: 'Теперь можно начать работу с ним или выбрать другой проект' }, + projectCreated: { heading: 'Проект успешно создан!', subheading: ['Теперь можно начать работу с', 'ним или выбрать другой проект'] }, walletRestored: { heading: 'Восстановление кошелька', subheading: 'Кошелек успешно восстанолен' }, walletCreated: { heading: 'Создание кошелька', subheading: 'Кошелек успешно создан' }, - walletRestoring: { heading: 'Процесс восстановления кошелька', subheading: 'Проверьте правильность данных перед тем, как продолжить' }, + walletRestoring: { heading: 'Процесс восстановления кошелька', subheading: ['Проверьте правильность данных', ' перед тем, как продолжить'] }, }; export default headings; diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js index 933645d9..d68cbe41 100644 --- a/src/stores/FormsStore/ConnectProject.js +++ b/src/stores/FormsStore/ConnectProject.js @@ -13,7 +13,7 @@ class ConnectProjectForm extends ExtendedForm { type: 'text', label: 'Project Name', placeholder: i18n.t('fields:projectTitle'), - rules: 'required|string|between:3,10', + rules: 'required|string|between:3,20', }, { name: 'address', type: 'text', diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js index 8fe9cac5..7c8f31e7 100644 --- a/src/stores/FormsStore/CreateProject.js +++ b/src/stores/FormsStore/CreateProject.js @@ -13,7 +13,7 @@ class СreateProjectForm extends ExtendedForm { type: 'text', label: 'Project name', placeholder: i18n.t('fields:projectTitle'), - rules: 'required|string', + rules: 'required|string|between:3,20', }, { name: 'password', type: 'password', From c89340a8bb5c6ec4be37e3b1abed878787a1f83f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 14 Nov 2019 18:08:42 +0700 Subject: [PATCH 134/219] Small fixes --- src/components/CreateNewProjectWithTokens/index.js | 13 +++---------- src/locales/ENG/headings.js | 4 ++-- src/locales/RUS/headings.js | 4 ++-- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index ea41b315..eb8e2442 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -182,16 +182,9 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, -
-
-

{t('other:tokenSymbol')}

-

{ERC.symbol}

-
-
-
-

{t('other:count')}

-

{ERC.totalSupply}

-
+
+

{t('other:count')}

+

{`${ERC.totalSupply} ${ERC.symbol}`}

+
+ ); + } +} + +DefaultDialogFooter.propTypes = { + t: PropTypes.func.isRequired, + dialogStore: PropTypes.shape({ + hide: PropTypes.func.isRequired, + }).isRequired, +}; + +export default DefaultDialogFooter; diff --git a/src/components/Dialog/DefaultDialogFooter.test.js b/src/components/Dialog/DefaultDialogFooter.test.js new file mode 100644 index 00000000..942a05d6 --- /dev/null +++ b/src/components/Dialog/DefaultDialogFooter.test.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import DefaultDialogFooter from './DefaultDialogFooter'; +import { Button } from '../Button'; + +describe('DefaultDialogFooter', () => { + let wrapper; + let mockHide; + + beforeEach(() => { + mockHide = jest.fn(); + wrapper = shallow( + ('test')} + />, + ).dive().dive(); + }); + + it('should render without error', () => { + expect(wrapper.length).toEqual(1); + }); + + it('button prop onClick should call mockHide', () => { + const button = wrapper.find(Button); + button.prop('onClick')(); + expect(mockHide).toHaveBeenCalled(); + }); +}); diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js new file mode 100644 index 00000000..3873c371 --- /dev/null +++ b/src/components/Dialog/Dialog.js @@ -0,0 +1,160 @@ +import React from 'react'; +import { observer, inject } from 'mobx-react'; +import PropTypes from 'prop-types'; +import { Portal } from 'react-portal'; +import { CloseIcon } from '../Icons'; +import DefaultDialogFooter from './DefaultDialogFooter'; + +import styles from './Dialog.scss'; + +@inject('dialogStore') +@observer +class Dialog extends React.Component { + componentDidMount() { + const { + name, + history, + onOpen, + onClose, + dialogStore, + } = this.props; + document.addEventListener('mousedown', this.handleClickOutside); + dialogStore.add(name, { + history, + onOpen, + onClose, + }); + } + + componentWillUnmount() { + const { name, dialogStore } = this.props; + document.removeEventListener('mousedown', this.handleClickOutside); + dialogStore.remove(name); + } + + handleClickOutside = (e) => { + e.stopPropagation(); + const { props: { name, dialogStore }, cancel } = this; + if (dialogStore.closing) return; + if (!dialogStore.open || (dialogStore.dialog !== name)) return; + if (this.wrapperRef && !this.wrapperRef.contains(e.target)) { + dialogStore.hide(); + cancel(); + } + } + + hideDialog = (e) => { + if (e) e.preventDefault(); + const { props: { dialogStore }, cancel } = this; + dialogStore.hide(); + cancel(); + } + + cancel = () => { + const { onCancel } = this.props; + if (onCancel && typeof onCancel === 'function') onCancel(); + } + + setWrapperRef = (node) => { + if (!this.wrapperRef) this.wrapperRef = node; + } + + render() { + const { props } = this; + const { + size, + name, + header, + footer, + className, + topIcon, + } = this.props; + const store = props.dialogStore; + const dialogSize = `dialog--${size}`; + return ( + +
+
+
+
+
+ +
+
+
+ { + topIcon + ? (
{topIcon}
) + : null + } +
{header}
+
+
+ {props.children} +
+ {footer} +
+
+
+
+ ); + } +} + + +Dialog.propTypes = { + size: PropTypes.oneOf([ + 'sm', + 'lg', + ]), + name: PropTypes.string.isRequired, + topIcon: PropTypes.node, + header: PropTypes.string.isRequired, + footer: PropTypes.element, + className: PropTypes.string, + history: PropTypes.bool, + onOpen: PropTypes.func, + onClose: PropTypes.func, + onCancel: PropTypes.func, + dialogStore: PropTypes.shape({ + add: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + closing: PropTypes.bool.isRequired, + open: PropTypes.bool.isRequired, + dialog: PropTypes.string.isRequired, + hide: PropTypes.func.isRequired, + }).isRequired, + children: PropTypes.node, +}; + +Dialog.defaultProps = { + size: 'sm', + className: '', + topIcon: null, + footer: (), + history: true, + onOpen: null, + onClose: null, + onCancel: null, + children: null, +}; + +export default Dialog; diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss new file mode 100644 index 00000000..6121f5bf --- /dev/null +++ b/src/components/Dialog/Dialog.scss @@ -0,0 +1,230 @@ +.content { + position: relative; + z-index: 5; + display: inline-block; + min-width: 290px; + max-width: 570px; + margin: 50px auto; + background: #fff; + border: 1px solid #E1E4E8; + opacity: 0; + pointer-events: none; + + &__inner { + position: relative; + z-index: 1; + min-height: 325px; + } +} + +.dialog { + position: fixed; + top: 0; + left: 0; + z-index: 5; + display: block; + width: 100%; + height: 100%; + overflow: none; + text-align: center; + pointer-events: none; + + &__header { + position: relative; + z-index: 4; + padding: 10px; + padding-top: 55px; + font-weight: 700; + font-size: 24px; + font-family: "Grotesk"; + line-height: 28px; + text-align: center; + + &-icon { + margin-bottom: 18px; + } + } + + &__title { + margin: 0; + padding: 0; + } + + &__body { + position: relative; + z-index: 2; + padding: 10px 40px; + } + + &__footer { + position: relative; + z-index: 5; + width: 100%; + padding: 25px 0; + + &--default { + padding-top: 55px; + } + } + + &--open { + z-index: 100; + overflow: auto; + opacity: 1; + transition: opacity 0.4s; + pointer-events: auto; + + .content { + animation-name: anim-open; + animation-duration: 0.7s; + animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); + animation-fill-mode: forwards; + pointer-events: auto; + } + } + + &--close { + opacity: 1; + transition: opacity 0.4s; + + .content { + animation-name: anim-close; + animation-duration: 0.4s; + animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); + animation-fill-mode: forwards; + pointer-events: auto; + } + } + + &--lg { + .content { + width: 740px; + min-width: 740px; + } + } + + &--sm { + .content { + width: 495px; + min-width: 495px; + } + } +} + +.close { + position: absolute; + top: -16px; + right: -16px; + z-index: 10; + width: 32px; + height: 32px; + color: #e1e4e8; + font-size: 0; + background-color: #fff; + border: 1px solid #e1e4e8; + outline: none; + transform: rotate(45deg); + cursor: pointer; + opacity: 1; + transition: all 0.5s; + + &:hover { + color: #808080; + } + + &:active { + color: #4d4d4d; + } + + svg { + transform: rotate(-45deg); + } +} + +.footer { + &__button { + display: block; + min-width: 260px; + margin: 0 auto 0 auto; + padding: 5px 0; + font-size: 24px; + } + + &__bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(250, 250, 250, 0.5); + background-size: cover; + backdrop-filter: blur(10px); + } +} + +.error { + &__message { + color: #fff; + font-weight: 600; + font-size: 18px; + text-align: center; + text-shadow: 0 1px 2px #000; + } + + &__description { + margin-top: 15px; + color: #dfc; + font-weight: 600; + font-size: 13px; + text-align: center; + text-shadow: 0 1px 2px #000; + opacity: 0.5; + } + + &__back { + margin-top: 45px; + margin-bottom: 20px; + } +} + +@keyframes anim-open { + 0% { + -webkit-transform: translate3d(0, -400px, 0); + transform: translate3d(0, -400px, 0); + opacity: 0; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } +} + +@keyframes anim-close { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } + + 100% { + -webkit-transform: translate3d(0, 100px, 0); + transform: translate3d(0, 100px, 0); + opacity: 0; + } +} + +@keyframes anim-elem { + 0% { + -webkit-transform: translate3d(0, -100px, 0); + transform: translate3d(0, -100px, 0); + opacity: 0; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + } +} diff --git a/src/components/Dialog/Dialog.stories.js b/src/components/Dialog/Dialog.stories.js new file mode 100644 index 00000000..6ed26b4d --- /dev/null +++ b/src/components/Dialog/Dialog.stories.js @@ -0,0 +1,55 @@ +import React from 'react'; +import { storiesOf } from '@storybook/react'; +import Dialog from './Dialog'; +import { VerifyIcon } from '../Icons'; +import DefaultDialogFooter from './DefaultDialogFooter'; + + +storiesOf('Dialog', module) + .add('default', () => ( + {}, + add: () => {}, + hide: () => {}, + closing: false, + open: true, + dialog: 'dialog-stories', + }} + name="dialog-stories" + header="Заголовок" + footer={( + {}, + }} + /> + )} + > + 0x295856bcf02b2017607e4f61cfc1573fd05d511f + + )) + .add('with icon', () => ( + {}, + add: () => {}, + hide: () => {}, + closing: false, + open: true, + dialog: 'dialog-stories', + }} + name="dialog-stories" + header="Заголовок" + topIcon={()} + footer={( + {}, + }} + /> + )} + > + 0x295856bcf02b2017607e4f61cfc1573fd05d511f + + )); diff --git a/src/components/Dialog/index.js b/src/components/Dialog/index.js new file mode 100644 index 00000000..16772f4f --- /dev/null +++ b/src/components/Dialog/index.js @@ -0,0 +1,3 @@ +import Dialog from './Dialog'; + +export default { Dialog }; diff --git a/src/index.js b/src/index.js index bc3c705c..ae8a1946 100644 --- a/src/index.js +++ b/src/index.js @@ -4,14 +4,18 @@ import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import rootStore from './stores/RootStore'; import Alert from './components/Alert'; +import Header from './components/Header'; import './i18n'; import './assets/styles/style.scss'; -import Header from './components/Header'; const { stores } = rootStore; + render( - +
diff --git a/src/stores/DialogStore/DialogItemModel.js b/src/stores/DialogStore/DialogItemModel.js new file mode 100644 index 00000000..b2175e2b --- /dev/null +++ b/src/stores/DialogStore/DialogItemModel.js @@ -0,0 +1,54 @@ +/* global document */ +/* global Event */ + +const defaults = { + onOpen: null, + onClose: null, + history: true, +}; + +class DialogItem { + constructor(name, options) { + this._name = name; + this.options = { ...defaults, ...options }; + } + + get name() { + return this._name; + } + + get id() { + return `dialog-${this.name}`; + } + + get history() { + return this.options.history; + } + + open() { + const { options: { onOpen } } = this; + const input = document.querySelector(`#${this.id} [open-focus]`); + if (input) { + const inputEvent = new Event('input', { bubbles: true }); + if (!input.value) { + input.focus(); + input.dispatchEvent(inputEvent); + } + } else { + const button = document.querySelector(`#${this.id} button`); + if (button) button.focus(); + } + if (onOpen && typeof onOpen === 'function') { + onOpen(); + } + } + + close() { + const { options: { onClose } } = this; + if (onClose && typeof onClose === 'function') { + onClose(); + } + } +} + +export default DialogItem; diff --git a/src/stores/DialogStore/DialogStore.js b/src/stores/DialogStore/DialogStore.js new file mode 100644 index 00000000..db6990bb --- /dev/null +++ b/src/stores/DialogStore/DialogStore.js @@ -0,0 +1,111 @@ +import { + observable, + computed, + action, +} from 'mobx'; +import DialogItem from './DialogItemModel'; +import withEventEmitter from '../../utils/with-event-emitter'; + +@withEventEmitter +class DialogStore { + @observable open = false; + + @observable closing = false; + + @observable dialog = null; + + history = []; + + list = {}; + + @computed + get isOpen() { + if (this.open && this.dialog) return this.dialog; + return false; + } + + getDialog(dialogName) { + const { list } = this; + return list[dialogName]; + } + + doesExist(dialog) { + return this.getDialog(dialog) !== undefined; + } + + add(name, options) { + this.list[name] = new DialogItem(name, options); + } + + remove(name) { + delete this.list[name]; + } + + @action + show(dialogName) { + const { open, dialog: currentDialogName } = this; + const dialog = this.getDialog(dialogName); + // not found + if (!dialog) return this.hide(); + // this dialog is opened next already + if (dialog.name === currentDialogName) return Promise.resolve(); + // save provided dialog as next to open + if (open) { + this.next = dialogName; + return this.hide(true); + } + document.body.classList.add('dialog-overlay'); + this.open = true; + this.dialog = dialog.name; + dialog.open(); + this.addToHistory(dialog); + this.emit(`${dialog.name}:open`); + return Promise.resolve(); + } + + @action + hide() { + const { dialog: dialogName } = this; + const dialog = this.getDialog(dialogName); + // closing right now + if (this.closing || !dialog) { + return Promise.resolve(); + } + return new Promise((resolve) => { + this.closing = true; + setTimeout(() => { + const { next } = this; + this.open = false; + this.closing = false; + this.dialog = false; + if (dialog) dialog.close(); + if (!next || typeof next !== 'boolean') { + document.body.classList.remove('dialog-overlay'); + } + if (next) { + this.next = false; + this.show(next) + .then(resolve); + } + this.emit(`${dialog.name}:hidden`); + return resolve(); + }, 400); + }); + } + + addToHistory(dialog) { + if (dialog.history === false) return false; + return this.history.push(dialog.name); + } + + toggle(dialogName) { + const { open } = this; + if (!open || this.dialog !== dialogName) { + this.hide().then(() => { this.show(dialogName); }); + } else { + this.hide(); + } + } +} + +export default DialogStore; diff --git a/src/stores/DialogStore/index.js b/src/stores/DialogStore/index.js new file mode 100644 index 00000000..ffd7d4d1 --- /dev/null +++ b/src/stores/DialogStore/index.js @@ -0,0 +1,3 @@ +import DialogStore from './DialogStore'; + +export default DialogStore; diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 273502dd..09f93254 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -4,6 +4,7 @@ import { observable, action, computed } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; +import DialogStore from '../DialogStore'; import Web3Service from '../../services/Web3Service'; import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; @@ -32,6 +33,7 @@ class RootStore { this.userStore = new UserStore(this); this.walletService = new WalletService(); this.contractService = new ContractService(this); + this.dialogStore = new DialogStore(); } /** @@ -44,8 +46,8 @@ class RootStore { @computed get stores() { - const { appStore, userStore } = this; - return { appStore, userStore }; + const { appStore, userStore, dialogStore } = this; + return { appStore, userStore, dialogStore }; } } const rootStore = window.rootStore = new RootStore(); diff --git a/src/utils/with-event-emitter.js b/src/utils/with-event-emitter.js new file mode 100644 index 00000000..a7fa1956 --- /dev/null +++ b/src/utils/with-event-emitter.js @@ -0,0 +1,25 @@ +import EventEmitter from './EventEmitter'; + +export default (target) => ( + class extends target { + constructor(...args) { + super(...args); + this.eventEmitter = new EventEmitter(); + } + + emit(eventName, data) { + if (super.emit) super.emit(eventName, data); + if (!this.eventEmitter) return; + this.eventEmitter.emit(eventName, data); + } + + subscribe(eventName, fn) { + if (super.subscribe) super.subscribe(eventName, fn); + return this.eventEmitter.subscribe(eventName, fn); + } + + on(eventName, fn) { + return this.subscribe(eventName, fn); + } + } +); From 88d71539b8cbc805b35d8bb54768d3f00b20a7c7 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 16:40:56 +0700 Subject: [PATCH 144/219] Update package.json --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b71e0b94..8bf0b812 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "email": "pavkahanov@neos1.com" }, "scripts": { - "render-test": "jest", + "test": "jest", "dev": "webpack-dev-server --hot --config webpack.dev.js", "build": "webpack --mode=production --config webpack.dev.js && electron-builder", "electron-dev": "concurrently \"npm run dev\" \"wait-on http://localhost:3000 && electron ./src/electron.js\"", @@ -139,6 +139,8 @@ "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy", "\\.(css|less|scss|sss|styl)$": "/node_modules/jest-css-modules" }, - "setupFilesAfterEnv": ["/src/setupTests.js"] + "setupFilesAfterEnv": [ + "/src/setupTests.js" + ] } } From 4ff49c3d6f73672888056a0dae190790589bac93 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 17:21:42 +0700 Subject: [PATCH 145/219] Update .eslintrc.json --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 38070616..ff1a6b98 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,8 @@ { "env": { "browser": true, - "es6": true + "es6": true, + "jest": true }, "parser": "babel-eslint", "extends": ["airbnb"], From 66187cb8ceda37db047e226180684743c27f7c5f Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 17:21:44 +0700 Subject: [PATCH 146/219] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b72a12a3..a0ab4d28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ docs/ build/ -dist/ \ No newline at end of file +dist/ +coverage/ From 47bff828004dff3ce121f6272b4c04a1d715d841 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 17:25:46 +0700 Subject: [PATCH 147/219] upd prop types & add test --- src/components/Dialog/DefaultDialogFooter.js | 6 +- src/components/Dialog/Dialog.js | 14 +- src/components/Dialog/Dialog.test.js | 198 +++++++++++++++++++ 3 files changed, 210 insertions(+), 8 deletions(-) create mode 100644 src/components/Dialog/Dialog.test.js diff --git a/src/components/Dialog/DefaultDialogFooter.js b/src/components/Dialog/DefaultDialogFooter.js index 3386c693..da25f11e 100644 --- a/src/components/Dialog/DefaultDialogFooter.js +++ b/src/components/Dialog/DefaultDialogFooter.js @@ -32,10 +32,14 @@ class DefaultDialogFooter extends React.Component { } DefaultDialogFooter.propTypes = { - t: PropTypes.func.isRequired, + t: PropTypes.func, dialogStore: PropTypes.shape({ hide: PropTypes.func.isRequired, }).isRequired, }; +DefaultDialogFooter.defaultProps = { + t: (k) => (k), +}; + export default DefaultDialogFooter; diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 3873c371..8b8ad284 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -126,14 +126,7 @@ Dialog.propTypes = { 'lg', ]), name: PropTypes.string.isRequired, - topIcon: PropTypes.node, header: PropTypes.string.isRequired, - footer: PropTypes.element, - className: PropTypes.string, - history: PropTypes.bool, - onOpen: PropTypes.func, - onClose: PropTypes.func, - onCancel: PropTypes.func, dialogStore: PropTypes.shape({ add: PropTypes.func.isRequired, remove: PropTypes.func.isRequired, @@ -142,6 +135,13 @@ Dialog.propTypes = { dialog: PropTypes.string.isRequired, hide: PropTypes.func.isRequired, }).isRequired, + topIcon: PropTypes.node, + footer: PropTypes.element, + className: PropTypes.string, + history: PropTypes.bool, + onOpen: PropTypes.func, + onClose: PropTypes.func, + onCancel: PropTypes.func, children: PropTypes.node, }; diff --git a/src/components/Dialog/Dialog.test.js b/src/components/Dialog/Dialog.test.js new file mode 100644 index 00000000..6fdb68dd --- /dev/null +++ b/src/components/Dialog/Dialog.test.js @@ -0,0 +1,198 @@ +import React from 'react'; +import { Provider } from 'mobx-react'; +import { shallow, mount } from 'enzyme'; +import Dialog from './Dialog'; + +describe('Dialog', () => { + describe('with default props', () => { + let element; + let elementInstance; + let wrapper; + let mockDialogAdd; + let mockDialogRemove; + let mockOnCancel; + let mockDialogHide; + + beforeEach(() => { + mockDialogAdd = jest.fn(); + mockDialogRemove = jest.fn(); + mockOnCancel = jest.fn(); + mockDialogHide = jest.fn(); + element = shallow( + footer test content} + />, + ); + wrapper = element.dive().dive(); + elementInstance = element.dive().instance(); + }); + + it('should render without error', () => { + expect(wrapper.length).toEqual(1); + expect(wrapper.find('.dialog').hasClass('dialog--sm')).toEqual(true); + expect(wrapper.find('.close__container').length).toEqual(1); + expect(wrapper.find('.dialog__title').text()).toEqual('TEST'); + expect(wrapper.find('.dialog__header-icon').length).toEqual(0); + expect(wrapper.find('.footer--test').length).toEqual(1); + expect(wrapper.find('.footer--test').text()).toEqual('footer test content'); + }); + + it('hideDialog should call mockDialogHide & mockOnCancel', () => { + const closeButton = wrapper.find('.close'); + closeButton.prop('onClick')({ preventDefault: () => {} }); + expect(mockDialogHide).toHaveBeenCalled(); + expect(mockOnCancel).toHaveBeenCalled(); + }); + + it('cancel should call mockOnCancel', () => { + elementInstance.cancel(); + expect(mockOnCancel).toHaveBeenCalled(); + }); + + it('Dialog unmount should call mockDialogRemove', () => { + elementInstance.componentWillUnmount(); + expect(mockDialogRemove).toHaveBeenCalled(); + }); + }); + + describe('mount component with mockDialogHide', () => { + let wrapper; + let outerNode; + let mockDialogHide; + + beforeEach(() => { + outerNode = document.createElement('div'); + mockDialogHide = jest.fn(); + wrapper = mount( + {}, + remove: () => {}, + dialog: 'test', + open: true, + hide: mockDialogHide, + closing: false, + }} + appStore={{}} + > + + , + { attachTo: outerNode }, + ); + }); + + it('click outside component should call mockDialogHide', () => { + document.body.appendChild(outerNode); + outerNode.dispatchEvent(new Event('mousedown', { + bubbles: true, + stopPropagation: () => {}, + })); + expect(mockDialogHide).toHaveBeenCalled(); + }); + + it('wrapperRef should be truthy', () => { + const dialog = wrapper.find(Dialog.wrappedComponent); + expect(dialog.instance().wrapperRef).toBeTruthy(); + }); + }); + + describe('footer=null', () => { + let wrapper; + + beforeEach(() => { + wrapper = shallow( + {}, + remove: () => {}, + hide: () => {}, + open: false, + closing: false, + dialog: 'test', + }} + name="test" + header="Test title" + footer={null} + />, + ).dive().dive(); + }); + + it('should render without footer', () => { + expect(wrapper.find('.footer').length).toEqual(0); + }); + }); + + describe('topIcon not null', () => { + let wrapper; + + beforeEach(() => { + wrapper = shallow( + {}, + remove: () => {}, + hide: () => {}, + open: false, + closing: false, + dialog: 'test', + }} + name="test" + header="Test title" + topIcon={test top icon} + footer={null} + />, + ).dive().dive(); + }); + + it('should render without footer', () => { + expect(wrapper.find('.footer').length).toEqual(0); + expect(wrapper.find('.test-top-icon').text()).toEqual('test top icon'); + }); + }); + + describe('open & closing', () => { + let wrapper; + + beforeEach(() => { + wrapper = shallow( + {}, + remove: () => {}, + hide: () => {}, + open: true, + closing: true, + dialog: 'test', + }} + name="test" + header="Test title" + size={null} + />, + ).dive().dive(); + }); + + it('should has dialog--close class', () => { + expect(wrapper.find('.dialog').hasClass('dialog--close')).toEqual(true); + }); + + it('should has dialog--open class', () => { + expect(wrapper.find('.dialog').hasClass('dialog--open')).toEqual(true); + }); + }); +}); From 689d3e79801c3057b6266f58a1cf39db9807c7fc Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 17:31:44 +0700 Subject: [PATCH 148/219] Update index.js --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index ae8a1946..704ffdf2 100644 --- a/src/index.js +++ b/src/index.js @@ -15,6 +15,7 @@ render(
From f405513159d016ddf7b54ea8b2f5e1eedc4339c9 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 18 Nov 2019 17:43:28 +0700 Subject: [PATCH 149/219] Upd for files --- src/components/Dialog/DefaultDialogFooter.js | 2 +- src/components/Dialog/Dialog.scss | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/components/Dialog/DefaultDialogFooter.js b/src/components/Dialog/DefaultDialogFooter.js index da25f11e..71666a68 100644 --- a/src/components/Dialog/DefaultDialogFooter.js +++ b/src/components/Dialog/DefaultDialogFooter.js @@ -21,7 +21,7 @@ class DefaultDialogFooter extends React.Component { `} > +
+ )} + className="agreed-message" + /> + ); + } +} + +export default AgreedMessage; diff --git a/src/components/Dialog/DefaultDialogFooter.js b/src/components/Dialog/DefaultDialogFooter.js index 71666a68..8e798046 100644 --- a/src/components/Dialog/DefaultDialogFooter.js +++ b/src/components/Dialog/DefaultDialogFooter.js @@ -1,3 +1,4 @@ +/* eslint-disable react/static-property-placement */ import React from 'react'; import { withTranslation } from 'react-i18next'; import { PropTypes } from 'prop-types'; @@ -9,6 +10,17 @@ import styles from './Dialog.scss'; @withTranslation('buttons') @inject('dialogStore') class DefaultDialogFooter extends React.Component { + static propTypes = { + t: PropTypes.func, + dialogStore: PropTypes.shape({ + hide: PropTypes.func.isRequired, + }).isRequired, + }; + + static defaultProps = { + t: (k) => (k), + }; + render() { const { props } = this; const { dialogStore, t } = props; @@ -31,15 +43,15 @@ class DefaultDialogFooter extends React.Component { } } -DefaultDialogFooter.propTypes = { - t: PropTypes.func, - dialogStore: PropTypes.shape({ - hide: PropTypes.func.isRequired, - }).isRequired, -}; +// DefaultDialogFooter.propTypes = { +// t: PropTypes.func, +// dialogStore: PropTypes.shape({ +// hide: PropTypes.func.isRequired, +// }).isRequired, +// }; -DefaultDialogFooter.defaultProps = { - t: (k) => (k), -}; +// DefaultDialogFooter.defaultProps = { +// t: (k) => (k), +// }; export default DefaultDialogFooter; diff --git a/src/components/Dialog/DefinetelyAgree.js b/src/components/Dialog/DefinetelyAgree.js index 8578a989..1c4dd1a5 100644 --- a/src/components/Dialog/DefinetelyAgree.js +++ b/src/components/Dialog/DefinetelyAgree.js @@ -1,3 +1,4 @@ +/* eslint-disable react/static-property-placement */ import React from 'react'; import { withTranslation } from 'react-i18next'; import { inject } from 'mobx-react'; @@ -6,8 +7,15 @@ import Dialog from './Dialog'; import { VerifyIcon } from '../Icons'; // import FinPassForm from '../../stores/FormsStore/FinPassForm'; +// TODO Finalize after form universal create @inject('dialogStore') +@withTranslation() class DefinetelyAgree extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + dialogStore: PropTypes.shape({}).isRequired, + }; + // finPassForm = new FinPassForm({ // onSuccess(form) { // return form; @@ -23,7 +31,7 @@ class DefinetelyAgree extends React.Component { return ( )} > definetely agree content @@ -32,9 +40,4 @@ class DefinetelyAgree extends React.Component { } } -DefinetelyAgree.propTypes = { - t: PropTypes.func.isRequired, - dialogStore: PropTypes.shape({}).isRequired, -}; - -export default withTranslation()(DefinetelyAgree); +export default DefinetelyAgree; diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 8b8ad284..875db462 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -1,3 +1,4 @@ +/* eslint-disable react/static-property-placement */ import React from 'react'; import { observer, inject } from 'mobx-react'; import PropTypes from 'prop-types'; @@ -10,6 +11,46 @@ import styles from './Dialog.scss'; @inject('dialogStore') @observer class Dialog extends React.Component { + static propTypes = { + size: PropTypes.oneOf([ + 'sm', + 'lg', + ]), + name: PropTypes.string.isRequired, + header: PropTypes.string.isRequired, + dialogStore: PropTypes.shape({ + add: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + closing: PropTypes.bool.isRequired, + open: PropTypes.bool.isRequired, + dialog: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.bool, + ]), + hide: PropTypes.func.isRequired, + }).isRequired, + topIcon: PropTypes.node, + footer: PropTypes.element, + className: PropTypes.string, + history: PropTypes.bool, + onOpen: PropTypes.func, + onClose: PropTypes.func, + onCancel: PropTypes.func, + children: PropTypes.node, + }; + + static defaultProps = { + size: 'sm', + className: '', + topIcon: null, + footer: (), + history: true, + onOpen: null, + onClose: null, + onCancel: null, + children: null, + }; + componentDidMount() { const { name, @@ -119,42 +160,4 @@ class Dialog extends React.Component { } } - -Dialog.propTypes = { - size: PropTypes.oneOf([ - 'sm', - 'lg', - ]), - name: PropTypes.string.isRequired, - header: PropTypes.string.isRequired, - dialogStore: PropTypes.shape({ - add: PropTypes.func.isRequired, - remove: PropTypes.func.isRequired, - closing: PropTypes.bool.isRequired, - open: PropTypes.bool.isRequired, - dialog: PropTypes.string.isRequired, - hide: PropTypes.func.isRequired, - }).isRequired, - topIcon: PropTypes.node, - footer: PropTypes.element, - className: PropTypes.string, - history: PropTypes.bool, - onOpen: PropTypes.func, - onClose: PropTypes.func, - onCancel: PropTypes.func, - children: PropTypes.node, -}; - -Dialog.defaultProps = { - size: 'sm', - className: '', - topIcon: null, - footer: (), - history: true, - onOpen: null, - onClose: null, - onCancel: null, - children: null, -}; - export default Dialog; diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 224cb161..254218e9 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -14,6 +14,12 @@ position: relative; z-index: 1; min-height: 325px; + + &.agreed-message { + .dialog__header { + padding-top: 92px; + } + } } } @@ -42,6 +48,11 @@ &-icon { margin-bottom: 18px; + + svg { + width: auto; + height: auto; + } } } @@ -65,6 +76,11 @@ &--default { padding-top: 55px; } + + &--agreed-message { + padding-top: 53px; + padding-bottom: 58px; + } } &--open { diff --git a/src/i18n.js b/src/i18n.js index 80ce4b75..d2bcc17c 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -12,8 +12,8 @@ import otherEn from './locales/ENG/other'; import otherRu from './locales/RUS/other'; import errorsEn from './locales/ENG/errors'; import errorsRu from './locales/RUS/errors'; -import dialogEn from './locales/ENG/dialog'; -import dialogRu from './locales/RUS/dialog'; +import dialogsEn from './locales/ENG/dialogs'; +import dialogsRu from './locales/RUS/dialogs'; const resources = { @@ -24,7 +24,7 @@ const resources = { fields: fieldsEn, other: otherEn, errors: errorsEn, - dialog: dialogEn, + dialogs: dialogsEn, }, RUS: { headings: headingsRu, @@ -33,7 +33,7 @@ const resources = { fields: fieldsRu, other: otherRu, errors: errorsRu, - dialog: dialogRu, + dialogs: dialogsRu, }, }; diff --git a/src/locales/ENG/dialog.js b/src/locales/ENG/dialogs.js similarity index 74% rename from src/locales/ENG/dialog.js rename to src/locales/ENG/dialogs.js index 0358f2d9..b05f13c0 100644 --- a/src/locales/ENG/dialog.js +++ b/src/locales/ENG/dialogs.js @@ -1,5 +1,6 @@ const dialog = { definetelyAgree: 'Do you definitely agree?', + agreedMessage: 'You agreed', }; export default dialog; diff --git a/src/locales/RUS/dialog.js b/src/locales/RUS/dialogs.js similarity index 62% rename from src/locales/RUS/dialog.js rename to src/locales/RUS/dialogs.js index ae49079c..9a7909af 100644 --- a/src/locales/RUS/dialog.js +++ b/src/locales/RUS/dialogs.js @@ -1,5 +1,6 @@ const dialog = { definetelyAgree: 'Вы точно согласны?', + agreedMessage: 'Вы выразили согласие', }; export default dialog; diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 9b4c7e8b..728079da 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -1,6 +1,4 @@ -/* eslint-disable no-multi-assign */ -/* eslint-disable no-multi-spaces */ -import { observable, action, computed } from 'mobx'; +import { action, computed } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; @@ -11,22 +9,6 @@ import ContractService from '../../services/ContractService'; import { fs, path, ROOT_DIR } from '../../constants'; class RootStore { - // stores - @observable projectStore; - - @observable appStore; - - @observable userStore; - - @observable dialogStore; - - // services - @observable walletService; - - @observable contractService; - - @observable Web3Service; - constructor() { const configRaw = fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8'); const config = JSON.parse(configRaw); @@ -46,11 +28,13 @@ class RootStore { this.projectStore = new ProjectStore(address); } - @computed get stores() { const { appStore, userStore, dialogStore } = this; return { appStore, userStore, dialogStore }; } } -const rootStore = window.rootStore = new RootStore(); + +const rootStore = new RootStore(); +window.rootStore = rootStore; + export default rootStore; From 4a67b7a84837eaaed1df45ffc653611ddacea99e Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Tue, 19 Nov 2019 14:18:33 +0700 Subject: [PATCH 154/219] Update .eslintrc.json --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index ff1a6b98..615aba3a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,6 +21,7 @@ "plugins": ["react"], "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], + // "react/static-property-placement": ["error", "static public field"], "no-underscore-dangle":"off" } } From 93120fc25c6483d20662ec60a8ef3c3b9e202439 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Tue, 19 Nov 2019 14:36:30 +0700 Subject: [PATCH 155/219] Upd for Dialog --- src/assets/styles/style.scss | 7 ++++--- src/components/Dialog/Dialog.js | 13 ++++++++++--- src/components/Dialog/Dialog.scss | 23 +++++++++++++++-------- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index ad583eaa..1af1d78e 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -11,17 +11,18 @@ body { background-color: #FAFBFC; - &::after { + &::after, + &::before { position: fixed; top: 0; left: 0; z-index: 16; width: 100%; height: 100%; - overflow: none; + overflow: unset; background: rgba(250, 250, 250, 0.5); opacity: 0; - backdrop-filter: blur(10px); + filter: blur(10px); transition: opacity 0.4s 0.1s; content: ''; pointer-events: none; diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 875db462..37f269e0 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -14,6 +14,7 @@ class Dialog extends React.Component { static propTypes = { size: PropTypes.oneOf([ 'sm', + 'md', 'lg', ]), name: PropTypes.string.isRequired, @@ -148,9 +149,15 @@ class Dialog extends React.Component { }
{header}
-
- {props.children} -
+ { + props.children + ? ( +
+ {props.children} +
+ ) + : null + } {footer}
diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 254218e9..360c3a8d 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -40,10 +40,6 @@ z-index: 4; padding: 10px; padding-top: 55px; - font-weight: 700; - font-size: 24px; - font-family: "Grotesk"; - line-height: 28px; text-align: center; &-icon { @@ -59,6 +55,10 @@ &__title { margin: 0; padding: 0; + font-weight: 700; + font-size: 24px; + font-family: "Grotesk"; + line-height: 28px; } &__body { @@ -113,19 +113,26 @@ } } - &--lg { + &--sm { .content { - width: 740px; - min-width: 740px; + width: 421px; + min-width: 421px; } } - &--sm { + &--md { .content { width: 495px; min-width: 495px; } } + + &--lg { + .content { + width: 740px; + min-width: 740px; + } + } } .close { From eb41b128644363034fbaa7a4fd5becba1bd6e591 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Tue, 19 Nov 2019 14:44:05 +0700 Subject: [PATCH 156/219] Create AgreedMessage.test.js --- src/components/Dialog/AgreedMessage.test.js | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/components/Dialog/AgreedMessage.test.js diff --git a/src/components/Dialog/AgreedMessage.test.js b/src/components/Dialog/AgreedMessage.test.js new file mode 100644 index 00000000..482db9db --- /dev/null +++ b/src/components/Dialog/AgreedMessage.test.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import AgreedMessage from './AgreedMessage'; + +describe('AgreedMessage', () => { + let wrapper; + let instance; + let mockHide; + + beforeEach(() => { + mockHide = jest.fn(); + wrapper = shallow( + , + ).dive().dive(); + instance = wrapper.instance(); + }); + + it('should render without error', () => { + expect(wrapper.length).toEqual(1); + }); + + it('hide method should call mockHide', () => { + instance.hide(); + expect(mockHide).toHaveBeenCalled(); + }); +}); From 7b3b00742ecebc0cd18cc9fadee183a6f1d496ad Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Tue, 19 Nov 2019 14:54:04 +0700 Subject: [PATCH 157/219] Add RejectMessage --- src/components/Dialog/Dialog.scss | 6 ++- src/components/Dialog/RejectMessage.js | 53 +++++++++++++++++++++ src/components/Dialog/RejectMessage.test.js | 30 ++++++++++++ src/components/Icons/index.js | 39 +++++++++++++++ src/locales/ENG/dialogs.js | 1 + src/locales/RUS/dialogs.js | 1 + 6 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 src/components/Dialog/RejectMessage.js create mode 100644 src/components/Dialog/RejectMessage.test.js diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 360c3a8d..3b6b60b8 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -15,7 +15,8 @@ z-index: 1; min-height: 325px; - &.agreed-message { + &.agreed-message, + &.reject-message { .dialog__header { padding-top: 92px; } @@ -77,7 +78,8 @@ padding-top: 55px; } - &--agreed-message { + &--agreed-message, + &--reject-message { padding-top: 53px; padding-bottom: 58px; } diff --git a/src/components/Dialog/RejectMessage.js b/src/components/Dialog/RejectMessage.js new file mode 100644 index 00000000..bf50291a --- /dev/null +++ b/src/components/Dialog/RejectMessage.js @@ -0,0 +1,53 @@ +/* eslint-disable react/static-property-placement */ +import React from 'react'; +import { inject } from 'mobx-react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; +import Dialog from './Dialog'; +import { RejectIcon } from '../Icons'; +import { Button } from '../Button'; + +import styles from './Dialog.scss'; + +/** + * Dialog with message about reject decision + */ +@withTranslation(['dialogs', 'buttons']) +@inject('dialogStore') +class RejectMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + dialogStore: PropTypes.shape({ + hide: PropTypes.func.isRequired, + }).isRequired, + }; + + hide = () => { + const { dialogStore } = this.props; + dialogStore.hide(); + } + + render() { + const { t } = this.props; + return ( + )} + footer={( +
+ +
+ )} + className="reject-message" + /> + ); + } +} + +export default RejectMessage; diff --git a/src/components/Dialog/RejectMessage.test.js b/src/components/Dialog/RejectMessage.test.js new file mode 100644 index 00000000..cd2855ed --- /dev/null +++ b/src/components/Dialog/RejectMessage.test.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import RejectMessage from './RejectMessage'; + +describe('RejectMessage', () => { + let wrapper; + let instance; + let mockHide; + + beforeEach(() => { + mockHide = jest.fn(); + wrapper = shallow( + , + ).dive().dive(); + instance = wrapper.instance(); + }); + + it('should render without error', () => { + expect(wrapper.length).toEqual(1); + }); + + it('hide method should call mockHide', () => { + instance.hide(); + expect(mockHide).toHaveBeenCalled(); + }); +}); diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index b12eb06a..b268ec25 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -390,3 +390,42 @@ VerifyIcon.defaultProps = { strokeWidth: 2, color: '#000', }; + +export const RejectIcon = ({ + width, + height, + color, + strokeWidth, +}) => ( + + + + + +); + +RejectIcon.propTypes = { + width: PropTypes.number, + height: PropTypes.number, + strokeWidth: PropTypes.number, + color: PropTypes.string, +}; + +RejectIcon.defaultProps = { + width: 32, + height: 32, + strokeWidth: 2, + color: '#000', +}; diff --git a/src/locales/ENG/dialogs.js b/src/locales/ENG/dialogs.js index b05f13c0..e2b8932d 100644 --- a/src/locales/ENG/dialogs.js +++ b/src/locales/ENG/dialogs.js @@ -1,6 +1,7 @@ const dialog = { definetelyAgree: 'Do you definitely agree?', agreedMessage: 'You agreed', + rejectMessage: 'You voted against', }; export default dialog; diff --git a/src/locales/RUS/dialogs.js b/src/locales/RUS/dialogs.js index 9a7909af..2b8a507d 100644 --- a/src/locales/RUS/dialogs.js +++ b/src/locales/RUS/dialogs.js @@ -1,6 +1,7 @@ const dialog = { definetelyAgree: 'Вы точно согласны?', agreedMessage: 'Вы выразили согласие', + rejectMessage: 'Вы проголосовали против', }; export default dialog; From 55457957631363b30738b58256583035f399d52f Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 19 Nov 2019 18:11:20 +0700 Subject: [PATCH 158/219] fixed magic classes and added enums --- ...lbarBtn--down.svg => scrollbarBtnDown.svg} | 0 src/assets/styles/style.scss | 142 +---------------- src/components/AddExisitingProject/index.js | 116 +++++++++----- src/components/AddNewProject/index.js | 2 +- src/components/AddProjectToConfig/index.js | 9 -- src/components/Alert/index.js | 7 +- src/components/CreateNewProject/index.js | 2 +- .../CreateNewProjectWithTokens/index.js | 103 ++++++++----- .../CreateNewProjectWithoutTokens/index.js | 96 ++++++++---- src/components/DisplayUserInfo/index.js | 17 +-- src/components/Dropdown/Dropdown.scss | 2 +- src/components/Dropdown/index.js | 12 +- src/components/DropdownOption/index.js | 6 +- src/components/Header/HeaderNav/index.js | 10 +- src/components/Heading/index.js | 4 +- src/components/Hint/index.js | 4 +- src/components/Indicator/index.js | 2 +- src/components/Input/index.js | 15 +- src/components/LangSwitcher/index.js | 10 +- src/components/Login/Login.scss | 143 +++++++++++++++++- src/components/Logo/index.js | 4 +- src/components/ProjectList/index.js | 2 +- .../ProjectUploading/ProgressBlock/index.js | 18 ++- src/components/ProjectUploading/index.js | 17 ++- src/components/User/index.js | 6 +- src/index.js | 2 + src/stores/AppStore/AppStore.js | 2 +- 27 files changed, 434 insertions(+), 319 deletions(-) rename src/assets/images/{scrollbarBtn--down.svg => scrollbarBtnDown.svg} (100%) delete mode 100644 src/components/AddProjectToConfig/index.js diff --git a/src/assets/images/scrollbarBtn--down.svg b/src/assets/images/scrollbarBtnDown.svg similarity index 100% rename from src/assets/images/scrollbarBtn--down.svg rename to src/assets/images/scrollbarBtnDown.svg diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 19a8b167..c6000776 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -8,156 +8,21 @@ font-weight: 400; font-family: "Grotesk"; } + body { background-color: #FAFBFC; } + a { color: inherit; text-decoration: none; } + svg { width: 18px; height: 18px; } -.step-indicator { - position: absolute; - bottom: 100%; - left: 50%; - color: #808080; - font-size: 12px; - text-align: center; - transform: translate(-50%, 30%); -} - -.progress-block{ - position: relative; - display: inline-block; - width: 80px; - height: 80px; - transition: .3s linear; - .progress-line{ - position: absolute; - top: 50%; - left: 100%; - width: 96px; - border: 1px dashed rgba($color: $primary, $alpha: .5); - transform: translateY(-50%); - opacity: 0; - transition: .3s ease-in; - } - &__icon { - position: absolute; - top: 50%; - left: 50%; - display: inline-block; - transform: translate(-50%, -50%); - & > svg { - width: 42px; - height: 42px; - path { - transition: .2s; - fill: rgba($color: $primary, $alpha: .5); - } - } - } - &>svg { - position: absolute; - top: 0%; - left: 50%; - width: 80px; - height: 80px; - transform: translate(-50%, 0%) scale(1); - } - .stroke-still { - stroke-dasharray: 2; - stroke-width: 4; - transition: .2s; - stroke: rgba($color: $primary, $alpha: .5); - } - & > img { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - opacity: .5; - } - &>p{ - width: 100%; - margin: 90px 0 0; - color: #37474F; - font-size: 12px; - opacity: .5; - span { - display: block; - margin-bottom: 10px; - } - &+strong { - display: inline-block; - width: 165%; - margin: 5px 0 0 -35%; - } - } - - &.success{ - .progress-block__icon { - &>svg { - path { - fill: rgba($color: $primary, $alpha: 1); - } - } - } - .stroke-still { - stroke-dasharray: 0; - stroke: rgba($color: $primary, $alpha: 1); - } - & > img { - opacity: 1; - } - .progress-line{ - width: 96px; - border-top: 2px solid rgba($color: $primary, $alpha: 1); - opacity: 1; - } - &>p{ - color: $primary; - opacity: 1; - } - } - &.active{ - & > img { - opacity: 1; - } - .progress-block__icon { - svg { - path { - fill: $primary - } - } - } - .progress-line { - opacity: 1; - } - .stroke-still { - stroke: transparent; - } - .stroke-animation { - stroke-width: 4; - animation: stroke-spacing 4s ease-in, stroke-color 5.2s linear; - animation-iteration-count: infinite; - animation-delay: 0; - animation-direction: normal; - animation-fill-mode: forwards; - animation-play-state: running; - transform-origin: center center; - } - &>p{ - color: $primary; - opacity: 1; - } - } -} - @keyframes stroke-spacing { 0% { @@ -177,7 +42,6 @@ svg { } } - @keyframes stroke-color { 0% { stroke: $primary; } 24% { stroke: $primary; } diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 0c1f7d1d..1220aea1 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -11,74 +11,112 @@ import Container from '../Container'; import Loader from '../Loader'; import Explanation from '../Explanation'; import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; - - -import styles from '../Login/Login.scss'; import Input from '../Input'; import { Address, TokenName, Login, BackIcon, } from '../Icons'; + +import styles from '../Login/Login.scss'; + @withTranslation() @inject('appStore') @observer + class AddExistingProject extends Component { + connectForm = new ConnectProjectForm({ + hooks: { + onSuccess: (form) => { + this.connectProject(form); + }, + onError: () => { + this.showError(); + }, + }, + }); + + steps = { + default: '0', + loading: '1', + success: '2', + } + + // eslint-disable-next-line react/static-property-placement + static propTypes = { + appStore: propTypes.shape({ + checkProject: propTypes.func.isRequired, + addProjectToList: propTypes.func.isRequired, + displayAlert: propTypes.func.isRequired, + }).isRequired, + t: propTypes.func.isRequired, + }; + constructor(props) { super(props); this.state = { - step: 'default', + currentStep: this.steps.default, }; } connectProject = (form) => { + const { steps } = this; const { appStore, t } = this.props; const { name, address } = form.values(); this.setState({ - step: 'loading', + currentStep: steps.loading, + }); + return new Promise((resolve, reject) => { + appStore.checkProject(address) + .then(() => { + this.setState({ currentStep: steps.success }); + appStore.addProjectToList({ name, address }); + resolve(); + }) + .catch(() => { + appStore.displayAlert(t('errors:tryAgain'), 3000); + this.state = { + currentStep: steps.default, + }; + reject(); + }); }); - appStore.checkProject(address) - .then(() => { - this.setState({ step: 'success' }); - appStore.addProjectToList({ name, address }); - }) - .catch(() => { - appStore.displayAlert(t('errors:tryAgain'), 3000); - this.state = { - step: 'default', - }; - }); } - render() { + showError = () => { const { appStore, t } = this.props; - const { step } = this.state; - const { connectProject } = this; - - const connectForm = new ConnectProjectForm({ - hooks: { - onSuccess(form) { - connectProject(form); - }, - onError() { - appStore.displayAlert(t('errors:validationError'), 3000); - }, - }, - }); + appStore.displayAlert(t('errors:validationError'), 3000); + } + + // eslint-disable-next-line class-methods-use-this + renderSwitch(step) { + switch (step) { + case '0': + return ; + case '1': + return ; + case '2': + return ; + default: + return ''; + } + } + + render() { + const { currentStep } = this.state; return (
- {step === 'default' ? : ''} - {step === 'loading' ? : ''} - {step === 'success' ? : ''} + {this.renderSwitch(currentStep)}
); } } + const InputBlock = withTranslation()(({ t, form }) => ( - + {t('headings:сonnectProject.heading')} {t('headings:сonnectProject.subheading')} @@ -142,15 +180,9 @@ const MessageBlock = withTranslation()(({ t }) => ( )); -AddExistingProject.propTypes = { - appStore: propTypes.shape({ - checkProject: propTypes.func.isRequired, - addProjectToList: propTypes.func.isRequired, - displayAlert: propTypes.func.isRequired, - }).isRequired, - t: propTypes.func.isRequired, -}; + InputBlock.propTypes = { form: propTypes.func.isRequired, }; + export default AddExistingProject; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index b8c97667..fb56c9d1 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -13,7 +13,7 @@ import styles from '../Login/Login.scss'; const AddNewProject = withTranslation()(({ t }) => (
- + {t('headings:addingProject.heading')} diff --git a/src/components/AddProjectToConfig/index.js b/src/components/AddProjectToConfig/index.js deleted file mode 100644 index ccdcab54..00000000 --- a/src/components/AddProjectToConfig/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -const AddProjectToConfig = () => ( -
- AddProjectToConfig -
-); - -export default AddProjectToConfig; diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js index eea14d57..2f3144e3 100644 --- a/src/components/Alert/index.js +++ b/src/components/Alert/index.js @@ -7,12 +7,12 @@ import { IconInfo, CloseIcon } from '../Icons'; import styles from './Alert.scss'; const Alert = inject('appStore')(observer(({ appStore }) => ( -
+
- + {appStore.alertText} - { appStore.closeAlert(); }}> + { appStore.closeAlert(); }}>
@@ -22,6 +22,7 @@ Alert.propTypes = { appStore: propTypes.shape({ alertVisible: propTypes.bool.isRequired, alertText: propTypes.string.isRequired, + closeAlert: propTypes.func.isRequired, }).isRequired, children: propTypes.string.isRequired, }; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 016b5244..72f1d47d 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -23,7 +23,7 @@ class CreateNewProject extends Component { return (
- + {t('headings:newProject.heading')} {t('headings:newProject.subheading')} diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 3b3aed1c..2e8c86f1 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -25,31 +25,61 @@ import Input from '../Input'; @inject('userStore', 'appStore') @observer class CreateNewProjectWithTokens extends Component { + connectToken = new ConnectTokenForm({ + hooks: { + onSuccess: (form) => { + this.checkToken(form); + }, + onError: () => { + }, + }, + }); + + createProject = new CreateProjectForm({ + hooks: { + onSuccess: (form) => new Promise(() => { + this.gotoUploading(form); + }), + onError: () => { + }, + }, + }); + + steps = { + token: 0, + check: 1, + tokenChecked: 2, + projectInfo: 3, + uploading: 4, + } + constructor(props) { super(props); this.state = { - position: 'token', + currentStep: this.steps.token, step: 1, disabled: false, }; } returnToTokenAddress=() => { + const { steps } = this; this.setState({ - position: 'token', + currentStep: steps.token, step: 1, }); } checkToken = (form) => { + const { steps } = this; const { address } = form.values(); const { appStore } = this.props; this.setState({ - position: 'check', + currentStep: steps.check, }); appStore.checkErc(address).then(() => { this.setState({ - position: 'tokenChecked', + currentStep: steps.tokenChecked, step: 2, }); appStore.deployArgs = [address]; @@ -57,13 +87,15 @@ class CreateNewProjectWithTokens extends Component { } gotoProjectInfo = () => { + const { steps } = this; this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 3, }); } gotoUploading = (form) => { + const { steps } = this; const { appStore, userStore, t } = this.props; const { name, password } = form.values(); this.setState({ disabled: true }); @@ -75,11 +107,11 @@ class CreateNewProjectWithTokens extends Component { .then((balance) => { if (balance > 0.05) { this.setState({ - position: 'uploading', + currentStep: steps.uploading, }); } else { this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 2, disabled: false, }); @@ -89,7 +121,7 @@ class CreateNewProjectWithTokens extends Component { }) .catch(() => { this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 2, disabled: false, }); @@ -97,39 +129,36 @@ class CreateNewProjectWithTokens extends Component { }); } - render() { - const { position, step, disabled } = this.state; - if (position === 'uploading') return ; - const { gotoUploading, checkToken } = this; - const connectToken = new ConnectTokenForm({ - hooks: { - onSuccess(form) { - checkToken(form); - }, - onError() { - }, - }, - }); + renderSwitch(step) { + const { disabled } = this.state; + switch (step) { + case 0: + return ; + case 1: + return ; + case 2: + return ; + case 3: + return ( + + ); + default: + return ''; + } + } - const createProject = new CreateProjectForm({ - hooks: { - onSuccess(form) { - return new Promise(() => { - gotoUploading(form); - }); - }, - onError() { - }, - }, - }); + render() { + const { currentStep, step } = this.state; + if (currentStep === 4) return ; return (
- {position === 'token' ? : ''} - {position === 'check' ? : ''} - {position === 'tokenChecked' ? : ''} - {position === 'projectInfo' ? : ''} + {this.renderSwitch(currentStep)}
); @@ -235,7 +264,7 @@ const InputProjectData = withTranslation()(({ )); const StepIndicator = withTranslation()(({ t, step, count }) => ( -
+

{t('other:step')} diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index c3928837..158403a7 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -37,11 +37,30 @@ class CreateNewProjectWithoutTokens extends Component { }, }); + createProject = new CreateProjectForm({ + hooks: { + onSuccess: (form) => new Promise(() => { + this.gotoUploading(form); + }), + onError: () => { + this.showError(); + }, + }, + }); + + steps = { + token: 1, + creation: 2, + tokenCreated: 3, + projectInfo: 4, + } + + constructor(props) { super(props); this.state = { - position: 'token', step: 1, + currentStep: this.steps.token, tokenAddr: '', disabled: false, }; @@ -49,15 +68,17 @@ class CreateNewProjectWithoutTokens extends Component { returnToContractConnecting = () => { + const { steps } = this; this.setState({ - position: 'tokenCreated', + currentStep: steps.tokenCreated, }); } createToken = (form) => { + const { steps } = this; const { appStore, userStore, t } = this.props; this.setState({ - position: 'creation', + currentStep: steps.creation, }); const { name, symbol, count, password, @@ -77,7 +98,7 @@ class CreateNewProjectWithoutTokens extends Component { if (receipt) { this.setState({ tokenAddr: receipt.contractAddress, - position: 'tokenCreated', + currentStep: steps.tokenCreated, }); appStore.deployArgs = [receipt.contractAddress]; clearInterval(interval); @@ -88,7 +109,7 @@ class CreateNewProjectWithoutTokens extends Component { resolve(); } else { this.setState({ - position: 'token', + currentStep: steps.token, step: 1, }); appStore.displayAlert(t('errors:lowBalance'), 3000); @@ -98,7 +119,7 @@ class CreateNewProjectWithoutTokens extends Component { } }).catch(() => { this.setState({ - position: 'token', + currentStep: steps.token, step: 1, }); appStore.displayAlert(t('errors:wrongPassword'), 3000); @@ -113,14 +134,16 @@ class CreateNewProjectWithoutTokens extends Component { } gotoProjectInfo = () => { + const { steps } = this; this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 2, }); } gotoUploading = (form) => { + const { steps } = this; const { userStore, appStore, t } = this.props; const { name, password } = form.values(); appStore.name = name; @@ -132,11 +155,11 @@ class CreateNewProjectWithoutTokens extends Component { .then((balance) => { if (balance > 0.05) { this.setState({ - position: 'uploading', + currentStep: steps.uploading, }); } else { this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 2, disabled: false, }); @@ -146,7 +169,7 @@ class CreateNewProjectWithoutTokens extends Component { }) .catch(() => { this.setState({ - position: 'projectInfo', + currentStep: steps.projectInfo, step: 2, disabled: false, }); @@ -154,31 +177,42 @@ class CreateNewProjectWithoutTokens extends Component { }); } - render() { + showError() { const { appStore, t } = this.props; - const { position, step, disabled } = this.state; - if (position === 'uploading') return ; - const { gotoUploading } = this; - const CreateProject = new CreateProjectForm({ - hooks: { - onSuccess(form) { - return new Promise(() => { - gotoUploading(form); - }); - }, - onError() { - appStore.displayAlert(t('errors:validationError'), 3000); - }, - }, - }); + appStore.displayAlert(t('errors:validationError'), 3000); + } + + // eslint-disable-next-line class-methods-use-this + renderSwitch(step) { + const { disabled } = this.state; + switch (step) { + case 1: + return ; + case 2: + return ; + case 3: + return ; + case 4: + return ( + + ); + default: + return ''; + } + } + + render() { + const { currentStep, step } = this.state; + if (currentStep === 'uploading') return ; return (

- {position === 'token' ? : ''} - {position === 'creation' ? : ''} - {position === 'tokenCreated' ? : ''} - {position === 'projectInfo' ? : ''} + {this.renderSwitch(currentStep)}
); @@ -322,7 +356,7 @@ const InputProjectData = withTranslation()(({ )); const StepIndicator = withTranslation()(({ t, step, count }) => ( -
+

{t('other:step')} diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index c97c9eb1..938ba4a1 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -12,7 +12,6 @@ import styles from '../Login/Login.scss'; const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, userStore: { balance, address } }) => (

- {' '} {t('headings:walletRestoring.heading')} @@ -23,15 +22,15 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use -
-
-

{t('other:walletAddress')}

-

{`${address.substr(0, 8)}...${address.substr(35, 41)}`}

+
+
+

{t('other:walletAddress')}

+

{`${address.substr(0, 8)}...${address.substr(35, 41)}`}

-
-
-

{t('other:balance')}

-

{balance}

+
+
+

{t('other:balance')}

+

{balance}

diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index d9c0e0b1..4c7fd9a6 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -121,7 +121,7 @@ position: relative; width: 20px; height: 20px; - background-image: url(../../assets/images/scrollbarBtn--down.svg); + background-image: url(../../assets/images/scrollbarBtnDown.svg); background-repeat: no-repeat; background-position: center; background-size: cover; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 6860e8df..45b5daea 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -79,17 +79,17 @@ class Dropdown extends Component { return (
- -
+
{getOptions}
diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js index 3d7a790d..35c4ac86 100644 --- a/src/components/DropdownOption/index.js +++ b/src/components/DropdownOption/index.js @@ -1,19 +1,21 @@ import React from 'react'; import propTypes from 'prop-types'; +import styles from '../Dropdown/Dropdown.scss'; + const DropdownOption = ({ value, label, select, subOption, }) => ( @@ -40,9 +40,9 @@ export const IconButton = ({ className={`${styles.btn} ${className}`} onClick={onClick} > -

+

{children[0]} - + {children[1]}

diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 2e8c86f1..439acc5b 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -303,13 +303,20 @@ CreateNewProjectWithTokens.propTypes = { t: propTypes.func.isRequired, }; InputTokenAddress.propTypes = { - form: propTypes.func.isRequired, + form: propTypes.shape({ + $: propTypes.func.isRequired, + onSubmit: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, + }).isRequired, }; ContractConfirmation.propTypes = { onSubmit: propTypes.func.isRequired, }; InputProjectData.propTypes = { - form: propTypes.func.isRequired, + form: propTypes.shape({ + $: propTypes.func.isRequired, + onSubmit: propTypes.func.isRequired, + }).isRequired, onClick: propTypes.func.isRequired, }; StepIndicator.propTypes = { diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 158403a7..e22f8fed 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -395,13 +395,20 @@ CreateNewProjectWithoutTokens.propTypes = { t: propTypes.func.isRequired, }; CreateTokenData.propTypes = { - form: propTypes.func.isRequired, + form: propTypes.shape({ + onSubmit: propTypes.func.isRequired, + $: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, + }).isRequired, }; TokenCreationAlert.propTypes = { onSubmit: propTypes.func.isRequired, }; InputProjectData.propTypes = { - form: propTypes.func.isRequired, + form: propTypes.shape({ + $: propTypes.func.isRequired, + onSubmit: propTypes.func.isRequired, + }).isRequired, onClick: propTypes.func.isRequired, }; StepIndicator.propTypes = { diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index 2a6c193b..633a01b3 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -94,7 +94,10 @@ class PasswordForm extends Component { PasswordForm.propTypes = { state: propTypes.bool.isRequired, - form: propTypes.func.isRequired, + form: propTypes.shape({ + $: propTypes.func.isRequired, + onSubmit: propTypes.func.isRequired, + }).isRequired, t: propTypes.func.isRequired, }; export default PasswordForm; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 36703bfc..680f3398 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -118,8 +118,11 @@ InputForm.propTypes = { appStore: propTypes.shape({ wallets: propTypes.arrayOf(propTypes.object).isRequired, }).isRequired, - // eslint-disable-next-line react/forbid-prop-types - form: propTypes.object.isRequired, + form: propTypes.shape({ + $: propTypes.func.isRequired, + onSubmit: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, + }).isRequired, }; From e5f28d8fab3d4217ba78982c802f644428e3764d Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 20 Nov 2019 11:30:58 +0700 Subject: [PATCH 160/219] Dialog add closeable prop & new TransferTokenInProgress dialog --- src/components/Dialog/Dialog.js | 43 +++++++++++------- src/components/Dialog/Dialog.scss | 20 +++++++++ src/components/Dialog/Dialog.stories.js | 1 - src/components/Dialog/Dialog.test.js | 44 +++++++++++++++++++ .../Dialog/TransferTokenInProgress.js | 39 ++++++++++++++++ .../Dialog/TransferTokenInProgress.test.js | 18 ++++++++ src/locales/ENG/dialogs.js | 2 + src/locales/RUS/dialogs.js | 2 + 8 files changed, 151 insertions(+), 18 deletions(-) create mode 100644 src/components/Dialog/TransferTokenInProgress.js create mode 100644 src/components/Dialog/TransferTokenInProgress.test.js diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 37f269e0..792f3e07 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -37,6 +37,7 @@ class Dialog extends React.Component { onOpen: PropTypes.func, onClose: PropTypes.func, onCancel: PropTypes.func, + closeable: PropTypes.bool, children: PropTypes.node, }; @@ -50,6 +51,7 @@ class Dialog extends React.Component { onClose: null, onCancel: null, children: null, + closeable: true, }; componentDidMount() { @@ -76,9 +78,9 @@ class Dialog extends React.Component { handleClickOutside = (e) => { e.stopPropagation(); - const { props: { name, dialogStore }, cancel } = this; + const { props: { name, dialogStore, closeable }, cancel } = this; if (dialogStore.closing) return; - if (!dialogStore.open || (dialogStore.dialog !== name)) return; + if (closeable === false || !dialogStore.open || (dialogStore.dialog !== name)) return; if (this.wrapperRef && !this.wrapperRef.contains(e.target)) { dialogStore.hide(); cancel(); @@ -110,6 +112,7 @@ class Dialog extends React.Component { footer, className, topIcon, + closeable, } = this.props; const store = props.dialogStore; const dialogSize = `dialog--${size}`; @@ -126,21 +129,27 @@ class Dialog extends React.Component { >
-
-
- -
-
+ { + closeable !== false + ? ( +
+
+ +
+
+ ) + : null + }
{ topIcon diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 3b6b60b8..332c886b 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -21,6 +21,19 @@ padding-top: 92px; } } + + &.transfer-progress { + .dialog__header { + padding-top: 67px; + padding-bottom: 0; + } + + .dialog__subtext { + color: rgba(0, 0, 0, 0.7); + font-size: 14px; + line-height: 16px; + } + } } } @@ -68,6 +81,13 @@ padding: 10px 40px; } + &__loader { + width: 100%; + padding-top: 92px; + padding-bottom: 110px; + text-align: center; + } + &__footer { position: relative; z-index: 5; diff --git a/src/components/Dialog/Dialog.stories.js b/src/components/Dialog/Dialog.stories.js index 665ce974..566d3d7e 100644 --- a/src/components/Dialog/Dialog.stories.js +++ b/src/components/Dialog/Dialog.stories.js @@ -6,7 +6,6 @@ import { VerifyIcon } from '../Icons'; import DefaultDialogFooter from './DefaultDialogFooter'; import DefinetelyAgree from './DefinetelyAgree'; - storiesOf('Dialog', module) .addDecorator((story) => ( { }); }); + describe('closeable=false', () => { + let wrapper; + let outerNode; + let mockDialogHide; + + beforeEach(() => { + outerNode = document.createElement('div'); + document.body.appendChild(outerNode); + mockDialogHide = jest.fn(); + wrapper = mount( + {}, + remove: () => {}, + dialog: 'test', + open: true, + closing: false, + hide: mockDialogHide, + }} + appStore={{}} + > + + , + { attachTo: outerNode }, + ); + }); + + it('should render correct with needed class', () => { + expect(wrapper.find('.close__container').length).toEqual(0); + }); + + it('should not call mockDialogHide on outside click', () => { + outerNode.dispatchEvent(new Event('mousedown', { + bubbles: true, + stopPropagation: () => {}, + })); + expect(mockDialogHide).not.toHaveBeenCalled(); + }); + }); + describe('footer=null', () => { let wrapper; diff --git a/src/components/Dialog/TransferTokenInProgress.js b/src/components/Dialog/TransferTokenInProgress.js new file mode 100644 index 00000000..54275e5e --- /dev/null +++ b/src/components/Dialog/TransferTokenInProgress.js @@ -0,0 +1,39 @@ +/* eslint-disable react/static-property-placement */ +import React from 'react'; +import { withTranslation } from 'react-i18next'; +import PropTypes from 'prop-types'; +import Dialog from './Dialog'; +import Loader from '../Loader'; + +import styles from './Dialog.scss'; + +@withTranslation('dialogs') +class TransferTokenInProgress extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + } + + render() { + const { props } = this; + const { t } = props; + return ( + +

+ {t('dialogs:someTimeText')} +

+
+ +
+
+ ); + } +} + +export default TransferTokenInProgress; diff --git a/src/components/Dialog/TransferTokenInProgress.test.js b/src/components/Dialog/TransferTokenInProgress.test.js new file mode 100644 index 00000000..3a98bf88 --- /dev/null +++ b/src/components/Dialog/TransferTokenInProgress.test.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import TransferTokenInProgress from './TransferTokenInProgress'; + +describe('TransferTokenInProgress', () => { + let wrapper; + + beforeEach(() => { + wrapper = shallow( + , + ).dive(); + }); + + it('should render without error', () => { + expect(wrapper.length).toEqual(1); + expect(wrapper.find('.dialog__loader').length).toEqual(1); + }); +}); diff --git a/src/locales/ENG/dialogs.js b/src/locales/ENG/dialogs.js index e2b8932d..2e969a05 100644 --- a/src/locales/ENG/dialogs.js +++ b/src/locales/ENG/dialogs.js @@ -2,6 +2,8 @@ const dialog = { definetelyAgree: 'Do you definitely agree?', agreedMessage: 'You agreed', rejectMessage: 'You voted against', + transferInProgress: 'Token transfer in progress', + someTimeText: 'It will take some time', }; export default dialog; diff --git a/src/locales/RUS/dialogs.js b/src/locales/RUS/dialogs.js index 2b8a507d..32e84e9e 100644 --- a/src/locales/RUS/dialogs.js +++ b/src/locales/RUS/dialogs.js @@ -2,6 +2,8 @@ const dialog = { definetelyAgree: 'Вы точно согласны?', agreedMessage: 'Вы выразили согласие', rejectMessage: 'Вы проголосовали против', + transferInProgress: 'Переводим токены', + someTimeText: 'Это займет некоторое время', }; export default dialog; From 3659e57ad2d2e620b947bf25e27e6fa90fa3475c Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 20 Nov 2019 13:15:47 +0700 Subject: [PATCH 161/219] add TokenTransferSuccess dialog --- src/components/Dialog/Dialog.scss | 15 ++++++++ src/components/Dialog/TokenTransferSuccess.js | 37 +++++++++++++++++++ .../Dialog/TokenTransferSuccess.test.js | 24 ++++++++++++ src/constants/index.js | 2 + src/locales/ENG/dialogs.js | 1 + src/locales/ENG/other.js | 1 + src/locales/RUS/dialogs.js | 1 + src/locales/RUS/other.js | 1 + src/setupTests.js | 11 ++++++ 9 files changed, 93 insertions(+) create mode 100644 src/components/Dialog/TokenTransferSuccess.js create mode 100644 src/components/Dialog/TokenTransferSuccess.test.js diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 332c886b..121b01fc 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -34,6 +34,21 @@ line-height: 16px; } } + + &.transfer-success { + .dialog__subtext { + color: rgba(0, 0, 0, 0.7); + font-size: 14px; + line-height: 16px; + } + + .dialog__value { + margin-top: 8px; + font-weight: 700; + font-size: 14px; + line-height: 16px; + } + } } } diff --git a/src/components/Dialog/TokenTransferSuccess.js b/src/components/Dialog/TokenTransferSuccess.js new file mode 100644 index 00000000..efaa84d7 --- /dev/null +++ b/src/components/Dialog/TokenTransferSuccess.js @@ -0,0 +1,37 @@ +/* eslint-disable react/static-property-placement */ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; +import Dialog from './Dialog'; +import { EMPTY_DATA_STRING } from '../../constants'; + +import styles from './Dialog.scss'; + +@withTranslation(['dialogs', 'other']) +class TokenTransferSuccess extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + value: PropTypes.string, + } + + static defaultProps = { + value: EMPTY_DATA_STRING, + } + + render() { + const { props: { t, value } } = this; + return ( + +

{t('other:yourBalance')}

+
{value}
+
+ ); + } +} + +export default TokenTransferSuccess; diff --git a/src/components/Dialog/TokenTransferSuccess.test.js b/src/components/Dialog/TokenTransferSuccess.test.js new file mode 100644 index 00000000..6cff08ea --- /dev/null +++ b/src/components/Dialog/TokenTransferSuccess.test.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import TokenTransferSuccess from './TokenTransferSuccess'; +import { EMPTY_DATA_STRING } from '../../constants'; + +describe('TokenTransferSuccess', () => { + it('should render correct without value', () => { + const wrapper = shallow( + , + ).dive(); + expect(wrapper.length).toEqual(1); + expect(wrapper.find('.dialog__subtext').text()).toEqual('other:yourBalance'); + expect(wrapper.find('.dialog__value').text()).toEqual(EMPTY_DATA_STRING); + }); + + it('should render correct with value', () => { + const wrapper = shallow( + , + ).dive(); + expect(wrapper.length).toEqual(1); + expect(wrapper.find('.dialog__subtext').text()).toEqual('other:yourBalance'); + expect(wrapper.find('.dialog__value').text()).toEqual('0.22124214 TKN'); + }); +}); diff --git a/src/constants/index.js b/src/constants/index.js index edf2ce8e..e3c88c73 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -31,3 +31,5 @@ export const PATH_TO_CONTRACTS = window.__ENV === 'production' export const SOL_PATH_REGEXP = new RegExp(/(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')/g); export const SOL_IMPORT_REGEXP = new RegExp(/(import)*.(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')(;)/g); export const SOL_VERSION_REGEXP = new RegExp(/(pragma).(solidity).((\^)?)([0-9](.)?){1,}/g); + +export const EMPTY_DATA_STRING = '-/-'; diff --git a/src/locales/ENG/dialogs.js b/src/locales/ENG/dialogs.js index 2e969a05..bd2146a9 100644 --- a/src/locales/ENG/dialogs.js +++ b/src/locales/ENG/dialogs.js @@ -4,6 +4,7 @@ const dialog = { rejectMessage: 'You voted against', transferInProgress: 'Token transfer in progress', someTimeText: 'It will take some time', + tokenTransferSuccess: 'Tokens successfully transferred!', }; export default dialog; diff --git a/src/locales/ENG/other.js b/src/locales/ENG/other.js index 755f406d..9c18b784 100644 --- a/src/locales/ENG/other.js +++ b/src/locales/ENG/other.js @@ -13,5 +13,6 @@ const other = { count: 'Quantity', withTokens: 'If you have ERC20 tokens', withoutTokens: "If you don't have ERC20 tokens", + yourBalance: 'Your balance', }; export default other; diff --git a/src/locales/RUS/dialogs.js b/src/locales/RUS/dialogs.js index 32e84e9e..4a7ff65b 100644 --- a/src/locales/RUS/dialogs.js +++ b/src/locales/RUS/dialogs.js @@ -4,6 +4,7 @@ const dialog = { rejectMessage: 'Вы проголосовали против', transferInProgress: 'Переводим токены', someTimeText: 'Это займет некоторое время', + tokenTransferSuccess: 'Токены успешно переведены!', }; export default dialog; diff --git a/src/locales/RUS/other.js b/src/locales/RUS/other.js index 8e8483c2..6d2f600f 100644 --- a/src/locales/RUS/other.js +++ b/src/locales/RUS/other.js @@ -13,5 +13,6 @@ const other = { count: 'Количество', withTokens: 'Если есть токены ERC20', withoutTokens: 'Если токенов ERC20 нет', + yourBalance: 'Ваш баланс', }; export default other; diff --git a/src/setupTests.js b/src/setupTests.js index 054e7c23..9714a977 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -2,4 +2,15 @@ import { configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; +global.require = (param) => { + switch (param) { + case 'path': + return { + join: jest.fn(), + }; + default: + return jest.fn(); + } +}; + configure({ adapter: new Adapter() }); From 4dbc428b8480d03c3125b0c28608f8f24cadf5cb Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 20 Nov 2019 13:18:27 +0700 Subject: [PATCH 162/219] upd description --- src/components/Dialog/DefaultDialogFooter.js | 3 +++ src/components/Dialog/Dialog.js | 3 +++ src/components/Dialog/TokenTransferSuccess.js | 3 +++ src/components/Dialog/TransferTokenInProgress.js | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/components/Dialog/DefaultDialogFooter.js b/src/components/Dialog/DefaultDialogFooter.js index 8e798046..a0ed4219 100644 --- a/src/components/Dialog/DefaultDialogFooter.js +++ b/src/components/Dialog/DefaultDialogFooter.js @@ -7,6 +7,9 @@ import { Button } from '../Button'; import styles from './Dialog.scss'; +/** + * Default component for dialog footer + */ @withTranslation('buttons') @inject('dialogStore') class DefaultDialogFooter extends React.Component { diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 792f3e07..86e38113 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -8,6 +8,9 @@ import DefaultDialogFooter from './DefaultDialogFooter'; import styles from './Dialog.scss'; +/** + * Dialog component + */ @inject('dialogStore') @observer class Dialog extends React.Component { diff --git a/src/components/Dialog/TokenTransferSuccess.js b/src/components/Dialog/TokenTransferSuccess.js index efaa84d7..aa5d1bb8 100644 --- a/src/components/Dialog/TokenTransferSuccess.js +++ b/src/components/Dialog/TokenTransferSuccess.js @@ -7,6 +7,9 @@ import { EMPTY_DATA_STRING } from '../../constants'; import styles from './Dialog.scss'; +/** + * Dialog with message about success token transfer + */ @withTranslation(['dialogs', 'other']) class TokenTransferSuccess extends React.Component { static propTypes = { diff --git a/src/components/Dialog/TransferTokenInProgress.js b/src/components/Dialog/TransferTokenInProgress.js index 54275e5e..a0e71e4b 100644 --- a/src/components/Dialog/TransferTokenInProgress.js +++ b/src/components/Dialog/TransferTokenInProgress.js @@ -7,6 +7,9 @@ import Loader from '../Loader'; import styles from './Dialog.scss'; +/** + * Dialog with token transfer in progress + */ @withTranslation('dialogs') class TransferTokenInProgress extends React.Component { static propTypes = { From e60deaf07acbdf71f8c9964e16a1a9008e0530e9 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 20 Nov 2019 13:35:04 +0700 Subject: [PATCH 163/219] Update style.scss --- src/assets/styles/style.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 1af1d78e..ae8aa255 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -11,8 +11,7 @@ body { background-color: #FAFBFC; - &::after, - &::before { + &::after { position: fixed; top: 0; left: 0; From d0f57a82bc9e3917da28cd5ade2c3cbaa5bffb80 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 20 Nov 2019 13:41:16 +0700 Subject: [PATCH 164/219] remove useless code --- src/components/Dialog/DefaultDialogFooter.js | 11 --------- src/components/Dialog/Dialog.scss | 25 -------------------- 2 files changed, 36 deletions(-) diff --git a/src/components/Dialog/DefaultDialogFooter.js b/src/components/Dialog/DefaultDialogFooter.js index a0ed4219..460a8b67 100644 --- a/src/components/Dialog/DefaultDialogFooter.js +++ b/src/components/Dialog/DefaultDialogFooter.js @@ -46,15 +46,4 @@ class DefaultDialogFooter extends React.Component { } } -// DefaultDialogFooter.propTypes = { -// t: PropTypes.func, -// dialogStore: PropTypes.shape({ -// hide: PropTypes.func.isRequired, -// }).isRequired, -// }; - -// DefaultDialogFooter.defaultProps = { -// t: (k) => (k), -// }; - export default DefaultDialogFooter; diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 121b01fc..f6ed24d4 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -208,31 +208,6 @@ } } -.error { - &__message { - color: #fff; - font-weight: 600; - font-size: 18px; - text-align: center; - text-shadow: 0 1px 2px #000; - } - - &__description { - margin-top: 15px; - color: #dfc; - font-weight: 600; - font-size: 13px; - text-align: center; - text-shadow: 0 1px 2px #000; - opacity: 0.5; - } - - &__back { - margin-top: 45px; - margin-bottom: 20px; - } -} - @keyframes anim-open { 0% { transform: translate(0, -800px); From 859b4fdb9cd98c5d32f178ed864dbf27956143e8 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 20 Nov 2019 14:36:15 +0700 Subject: [PATCH 165/219] Every type of button now is component --- src/components/AddExisitingProject/index.js | 20 +- src/components/AddNewProject/index.js | 14 +- src/components/Button/Button.scss | 14 +- src/components/Button/index.js | 349 +++++++++++++++++- src/components/CreateNewProject/index.js | 14 +- .../CreateNewProjectWithTokens/index.js | 24 +- .../CreateNewProjectWithoutTokens/index.js | 22 +- src/components/CreateWallet/PasswordForm.js | 7 +- src/components/CreationAlert/index.js | 6 +- src/components/DisplayUserInfo/index.js | 6 +- src/components/InputSeed/SeedForm.js | 6 +- src/components/Login/index.js | 10 +- src/components/ProjectList/index.js | 12 +- src/components/ProjectUploading/index.js | 12 +- src/components/ShowSeed/index.js | 10 +- 15 files changed, 453 insertions(+), 73 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index a884b705..1388ecd3 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -4,7 +4,9 @@ import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; import { withTranslation } from 'react-i18next'; -import { Button, IconButton } from '../Button'; +import { + BlackWidestButton, IconBlackButton, LinkButton, BackButton, +} from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -129,9 +131,9 @@ const InputBlock = withTranslation()(({ t, form }) => (
- +
@@ -147,10 +149,10 @@ const InputBlock = withTranslation()(({ t, form }) => (
- + {t('buttons:back')} - + )); @@ -171,12 +173,14 @@ const MessageBlock = withTranslation()(({ t }) => ( {t('headings:projectConnected.heading')} {t('headings:projectConnected.subheading')} - + {} {t('buttons:toConnectedProject')} - + - + + {t('buttons:otherProject')} + )); diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index fb56c9d1..1cc3c1db 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { IconButton } from '../Button'; +import { IconWhiteButton, BackButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -24,24 +24,24 @@ const AddNewProject = withTranslation()(({ t }) => (
- + {t('buttons:create')} - + - + {t('buttons:connect')} - +
- + {t('buttons:back')} - +
diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 41f0a9e3..cc1430f3 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -188,9 +188,15 @@ font-weight: 700; } } - &.icon--top{ - svg { - width: 100%; - } + &--back { + position: absolute; + bottom: -62px; + left: 50%; + transform: translateX(-50%); + } +} +.icon--top{ + svg { + width: 100%; } } diff --git a/src/components/Button/index.js b/src/components/Button/index.js index c909627d..651c4ead 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -3,6 +3,11 @@ import React from 'react'; import propTypes from 'prop-types'; import styles from './Button.scss'; + +/* + ? BUTTONS WITHOUT ICONS +*/ + export const Button = ({ children, type, disabled, className, onClick, }) => ( @@ -31,8 +36,193 @@ Button.defaultProps = { onClick: () => false, }; + +export const BlackButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +BlackButton.propTypes = { + children: propTypes.string.isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +BlackButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + + +export const BlackWideButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +BlackWideButton.propTypes = { + children: propTypes.string.isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +BlackWideButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + + +export const BlackWidestButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +BlackWidestButton.propTypes = { + children: propTypes.string.isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +BlackWidestButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + + +export const WhiteButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +WhiteButton.propTypes = { + children: propTypes.string.isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +WhiteButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + + +export const LinkButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +LinkButton.propTypes = { + children: propTypes.arrayOf(propTypes.node).isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +LinkButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + +export const BorderedLinkButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +BorderedLinkButton.propTypes = { + children: propTypes.arrayOf(propTypes.node).isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +BorderedLinkButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + +export const ProjectButton = ({ + children, type, disabled, onClick, +}) => ( + +); + +ProjectButton.propTypes = { + children: propTypes.arrayOf(propTypes.node).isRequired, + onClick: propTypes.func, + disabled: propTypes.bool, + type: propTypes.string, +}; +ProjectButton.defaultProps = { + type: 'button', + disabled: false, + onClick: () => false, +}; + + +/* + ? BUTTONS WITH ICONS +*/ + export const IconButton = ({ - children, type, disabled, className, onClick, + children, type, className, disabled, onClick, }) => (
diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 439acc5b..d39bc2fe 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -4,7 +4,9 @@ import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { Button, IconButton } from '../Button'; +import { + BlackWidestButton, BackButton, +} from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -176,15 +178,15 @@ const InputTokenAddress = withTranslation()(({ t, form }) => (
- +
- + {t('buttons:back')} - + @@ -216,9 +218,9 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t,

{`${ERC.totalSupply} ${ERC.symbol}`}

- +
@@ -244,9 +246,9 @@ const InputProjectData = withTranslation()(({
- +
@@ -255,10 +257,10 @@ const InputProjectData = withTranslation()(({

- { onClick(); }}> + { onClick(); }}> {t('buttons:back')} - + )); diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index e22f8fed..e9892dba 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -5,7 +5,7 @@ import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { Button, IconButton } from '../Button'; +import { BlackWidestButton, BackButton, BlackWideButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -267,7 +267,9 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- + + {t('buttons:create')} +
@@ -282,10 +284,10 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- + {t('buttons:back')} - + @@ -309,9 +311,9 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => (
- +
@@ -338,7 +340,9 @@ const InputProjectData = withTranslation()(({
- + + {t('buttons:continue')} +
@@ -347,10 +351,10 @@ const InputProjectData = withTranslation()(({

- { onClick(); }}> + { onClick(); }}> {t('buttons:back')} - + )); diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index 633a01b3..ad2df21c 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -6,7 +6,7 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import { Password, BackIcon } from '../Icons'; import Input from '../Input'; -import { Button, IconButton } from '../Button'; +import { IconButton, BlackWidestButton } from '../Button'; import Explanation from '../Explanation'; import Indicator from '../Indicator'; import styles from '../Login/Login.scss'; @@ -48,7 +48,9 @@ class PasswordForm extends Component {
- + + {t('buttons:continue')} +
@@ -97,6 +99,7 @@ PasswordForm.propTypes = { form: propTypes.shape({ $: propTypes.func.isRequired, onSubmit: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, }).isRequired, t: propTypes.func.isRequired, }; diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 9aef902a..1e9af0ec 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import { inject, observer } from 'mobx-react'; import Container from '../Container'; import FormBlock from '../FormBlock'; -import { Button } from '../Button'; +import { BlackWidestButton } from '../Button'; import Heading from '../Heading'; import styles from '../Login/Login.scss'; @@ -34,9 +34,9 @@ const CreationAlert = withTranslation()(({ t, success = false, recover = false } - +
diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 938ba4a1..7a10f3c7 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -5,7 +5,7 @@ import { withTranslation } from 'react-i18next'; import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; -import { Button } from '../Button'; +import { BlackWidestButton } from '../Button'; import styles from '../Login/Login.scss'; @@ -35,7 +35,9 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use
- + + {t('buttons:continue')} +
diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index f51fae8d..473d1050 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -4,7 +4,7 @@ import propTypes from 'prop-types'; import SeedForm from '../../stores/FormsStore/SeedForm'; import styles from '../Login/Login.scss'; import Input from '../Input'; -import { Button } from '../Button'; +import { BlackWidestButton } from '../Button'; class SeedInput extends Component { @@ -40,7 +40,9 @@ class SeedInput extends Component { ))}
- + + Продолжить +
); diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 680f3398..06be8818 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -11,7 +11,7 @@ import Heading from '../Heading'; import Dropdown from '../Dropdown'; import { CreditCard, Password } from '../Icons'; import Input from '../Input'; -import { Button } from '../Button'; +import { BlackWidestButton, BorderedLinkButton } from '../Button'; import Loader from '../Loader'; import LoginForm from '../../stores/FormsStore/LoginForm'; @@ -80,12 +80,14 @@ const InputForm = withTranslation()(({
- + + {t('buttons:continue')} + - + {t('buttons:newWallet')} - + {t('buttons:forgotPassword')}
diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 9bea3519..6beb4199 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -3,7 +3,7 @@ import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; import { withTranslation } from 'react-i18next'; -import { Button, IconButton } from '../Button'; +import { ProjectButton, AddProjectButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -28,7 +28,11 @@ class ProjectList extends Component { render() { const { appStore: { projectList }, t } = this.props; const projects = projectList.map((project, index) => ( - + + {project.name.replace(/([!@#$%^&*()_+\-=])+/g, ' ')} + )); return ( @@ -42,10 +46,10 @@ class ProjectList extends Component { {' '} {projects} - + {t('buttons:addProject')} - +
diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 7ba28d5c..eae6fe3a 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -15,7 +15,9 @@ import ProgressBlock from './ProgressBlock'; import { CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, Login, } from '../Icons'; -import { Button, IconButton } from '../Button'; +import { + IconBlackButton, LinkButton, +} from '../Button'; @withTranslation() @inject('userStore', 'appStore') @@ -146,12 +148,14 @@ const AlertBlock = withTranslation()(({ t }) => ( {t('headings:projectCreated.subheading.1')} - + {} {t('buttons:toCreatedProject')} - + - + + {t('buttons:otherProject')} + )); diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index 151f2958..a61acb6f 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -9,7 +9,7 @@ import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Explanation from '../Explanation'; -import { IconButton, Button } from '../Button'; +import { IconButton, BlackWidestButton, SeedToggleButton } from '../Button'; import { BackIcon, EyeIcon, CrossedEyeIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -54,7 +54,9 @@ class ShowSeed extends Component {
- + + {t('buttons:continue')} +
@@ -69,10 +71,10 @@ class ShowSeed extends Component {

{t('explanations:seed.0')}

{t('explanations:seed.1')}

- + {!visible ? : } {!visible ? t('buttons:showSeed') : t('buttons:hideSeed')} - +
From f7c9621ec81c6ba610e989a0c68d316b84036e80 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 20 Nov 2019 14:57:08 +0700 Subject: [PATCH 166/219] Small fixes --- src/components/AddExisitingProject/index.js | 1 - src/components/AddNewProject/index.js | 1 - src/components/CreateNewProjectWithTokens/index.js | 3 +-- src/components/CreateWallet/index.js | 3 +-- src/components/DisplayUserInfo/index.js | 2 +- src/components/Indicator/index.js | 1 + src/components/Input/index.js | 1 + src/components/InputSeed/SeedForm.js | 3 +-- src/components/LangSwitcher/index.js | 2 +- src/components/Login/Login.scss | 4 ++++ src/components/ProjectUploading/ProgressBlock/index.js | 1 + src/components/ProjectUploading/index.js | 4 ++-- 12 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 1388ecd3..298c3075 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -18,7 +18,6 @@ import { Address, TokenName, Login, BackIcon, } from '../Icons'; - import styles from '../Login/Login.scss'; @withTranslation() diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 1cc3c1db..2bccfe51 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -9,7 +9,6 @@ import { CreateToken, ChainIcon, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; - const AddNewProject = withTranslation()(({ t }) => (
diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index d39bc2fe..9073e889 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -11,6 +11,7 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; import Loader from '../Loader'; +import Input from '../Input'; import Indicator from '../Indicator'; import Explanation from '../Explanation'; import { @@ -19,9 +20,7 @@ import { import ConnectTokenForm from '../../stores/FormsStore/ConnectToken'; import CreateProjectForm from '../../stores/FormsStore/CreateProject'; - import styles from '../Login/Login.scss'; -import Input from '../Input'; @withTranslation() @inject('userStore', 'appStore') diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 1dd3a688..ef557fe6 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -10,12 +10,11 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Loader from '../Loader'; import styles from '../Login/Login.scss'; +import passwordValidation from '../../utils/PasswordValidation'; import PasswordForm from './PasswordForm'; -import passwordValidation from '../../utils/PasswordValidation'; import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; - @inject('userStore', 'appStore') @observer class CreateWallet extends Component { diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 7a10f3c7..83f9bf23 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -6,8 +6,8 @@ import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import { BlackWidestButton } from '../Button'; -import styles from '../Login/Login.scss'; +import styles from '../Login/Login.scss'; const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, userStore: { balance, address } }) => ( diff --git a/src/components/Indicator/index.js b/src/components/Indicator/index.js index cb115d99..ddefe3f4 100644 --- a/src/components/Indicator/index.js +++ b/src/components/Indicator/index.js @@ -1,5 +1,6 @@ import React from 'react'; import propTypes from 'prop-types'; + import styles from './Indicator.scss'; const Indicator = ({ checked }) => ( diff --git a/src/components/Input/index.js b/src/components/Input/index.js index c154de56..75990a1a 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { observer } from 'mobx-react'; + import styles from './Input.scss'; @observer diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index 473d1050..c1d7c56b 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -1,11 +1,10 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; - import SeedForm from '../../stores/FormsStore/SeedForm'; -import styles from '../Login/Login.scss'; import Input from '../Input'; import { BlackWidestButton } from '../Button'; +import styles from '../Login/Login.scss'; class SeedInput extends Component { constructor(props) { diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 834489ff..41bffacd 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -1,9 +1,9 @@ /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */ import React, { Component } from 'react'; -import styles from './LangSwitcher.scss'; import i18n from '../../i18n'; +import styles from './LangSwitcher.scss'; class LangSwitcher extends Component { constructor(props) { diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index a7819e20..91072025 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -124,6 +124,7 @@ } } } + .seed { display: flex; flex-flow: row wrap; @@ -174,6 +175,7 @@ } } } + .projects { display: grid; grid-row-gap: 10px; @@ -187,6 +189,7 @@ margin: 0; } } + .create, .add-project { display: flex; flex-flow: row wrap; @@ -245,6 +248,7 @@ font-size: 14px; } } + .progress { display: flex; flex-flow: row nowrap; diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index 8ff055b1..34d111ff 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -1,5 +1,6 @@ import React from 'react'; import propTypes from 'prop-types'; + import styles from '../../Login/Login.scss'; const ProgressBlock = ({ diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index eae6fe3a..a425de1d 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -9,8 +9,6 @@ import { withTranslation } from 'react-i18next'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; - -import styles from '../Login/Login.scss'; import ProgressBlock from './ProgressBlock'; import { CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, Login, @@ -19,6 +17,8 @@ import { IconBlackButton, LinkButton, } from '../Button'; +import styles from '../Login/Login.scss'; + @withTranslation() @inject('userStore', 'appStore') @observer From 22d0cbf7e315974229feb00bf41580da5f1269a1 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 21 Nov 2019 18:45:37 +0700 Subject: [PATCH 167/219] huge bunch of issues fixes --- src/assets/styles/style.scss | 29 ----- src/components/AddExisitingProject/index.js | 14 +-- src/components/AddNewProject/index.js | 2 +- src/components/Alert/Alert.scss | 3 + src/components/Alert/index.js | 21 ++-- src/components/CreateNewProject/index.js | 8 +- .../CreateNewProjectWithTokens/index.js | 61 +++++---- .../CreateNewProjectWithoutTokens/index.js | 85 +++++-------- src/components/CreateWallet/PasswordForm.js | 3 +- src/components/CreateWallet/index.js | 11 +- src/components/CreationAlert/index.js | 12 +- src/components/DropdownOption/index.js | 2 +- src/components/FormBlock/index.js | 4 +- src/components/Input/index.js | 16 ++- src/components/InputSeed/SeedForm.js | 18 +-- src/components/InputSeed/index.js | 13 +- src/components/LangSwitcher/index.js | 3 +- src/components/Login/Login.scss | 39 +++++- src/components/Login/index.js | 3 +- src/components/Logo/Logo.scss | 32 ----- .../ProjectUploading/ProgressBlock/index.js | 10 +- src/components/ProjectUploading/index.js | 18 +-- src/components/RequiredAuthorization/index.js | 3 +- src/components/Router/SimpleRouter.js | 1 - src/components/ShowSeed/index.js | 6 +- src/index.js | 13 +- .../ContractService/ContractService.js | 118 ++++++++---------- .../ContractService/entities/Question.js | 47 +++++++ .../EventEmitterService}/index.js | 5 +- src/services/WalletService/WalletService.js | 30 ++--- .../WalletService/entities/WorkerWrapper.js | 2 +- src/services/Web3Service/Web3Service.js | 38 +----- src/stores/AlertStore/AlertStore.js | 21 ++++ src/stores/AlertStore/index.js | 3 + src/stores/AppStore/AppStore.js | 28 ++--- src/stores/FormsStore/ConnectProject.js | 5 +- src/stores/FormsStore/ConnectToken.js | 5 +- src/stores/FormsStore/CreateProject.js | 5 +- src/stores/FormsStore/CreateToken.js | 5 +- src/stores/FormsStore/CreateWalletForm.js | 5 +- src/stores/FormsStore/LoginForm.js | 2 - src/stores/FormsStore/SeedForm.js | 6 +- src/stores/RootStore/RootStore.js | 24 ++-- src/stores/UserStore/UserStore.js | 10 ++ src/utils/Validator/index.js | 3 - src/workers/login.worker.js | 13 -- 46 files changed, 374 insertions(+), 431 deletions(-) create mode 100644 src/services/ContractService/entities/Question.js rename src/{utils/EventEmitter => services/EventEmitterService}/index.js (76%) create mode 100644 src/stores/AlertStore/AlertStore.js create mode 100644 src/stores/AlertStore/index.js delete mode 100644 src/workers/login.worker.js diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index c6000776..41a6ecba 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -24,35 +24,6 @@ svg { } -@keyframes stroke-spacing { - 0% { - stroke-dasharray: 0 200; - } - 45% { - stroke-dashoffset: 0; - stroke-dasharray: 200 200; - } - 90% { - stroke-dashoffset: -200; - stroke-dasharray: 200 200; - } - 100% { - stroke-dashoffset: -200; - stroke-dasharray: 200 200; - } -} - -@keyframes stroke-color { - 0% { stroke: $primary; } - 24% { stroke: $primary; } - 25% { stroke: $primary; } - 49% { stroke: $primary; } - 50% { stroke: $primary; } - 74% { stroke: $primary; } - 75% { stroke: $primary; } - 99% { stroke: $primary; } -} - ::-webkit-scrollbar-thumb { border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 298c3075..23728245 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -23,7 +23,6 @@ import styles from '../Login/Login.scss'; @withTranslation() @inject('appStore') @observer - class AddExistingProject extends Component { connectForm = new ConnectProjectForm({ hooks: { @@ -37,9 +36,9 @@ class AddExistingProject extends Component { }); steps = { - default: '0', - loading: '1', - success: '2', + default: 0, + loading: 1, + success: 2, } // eslint-disable-next-line react/static-property-placement @@ -90,12 +89,13 @@ class AddExistingProject extends Component { // eslint-disable-next-line class-methods-use-this renderSwitch(step) { + const { steps } = this; switch (step) { - case '0': + case steps.default: return ; - case '1': + case steps.loading: return ; - case '2': + case steps.success: return ; default: return ''; diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index 2bccfe51..d0aecbcc 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -11,7 +11,7 @@ import styles from '../Login/Login.scss'; const AddNewProject = withTranslation()(({ t }) => ( -
+
{t('headings:addingProject.heading')} diff --git a/src/components/Alert/Alert.scss b/src/components/Alert/Alert.scss index 1a2ffae4..aeb58e25 100644 --- a/src/components/Alert/Alert.scss +++ b/src/components/Alert/Alert.scss @@ -28,6 +28,9 @@ vertical-align: middle; } &__close { + background: transparent; + border: none; + outline: none; cursor: pointer; svg { rect { diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js index 2f3144e3..3bfce2b0 100644 --- a/src/components/Alert/index.js +++ b/src/components/Alert/index.js @@ -1,30 +1,27 @@ -/* eslint-disable jsx-a11y/click-events-have-key-events */ -/* eslint-disable jsx-a11y/no-static-element-interactions */ import React from 'react'; import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; import { IconInfo, CloseIcon } from '../Icons'; import styles from './Alert.scss'; -const Alert = inject('appStore')(observer(({ appStore }) => ( -
+const Alert = inject('alertStore')(observer(({ alertStore }) => ( +
- {appStore.alertText} + {alertStore.text} - { appStore.closeAlert(); }}> +
))); Alert.propTypes = { - appStore: propTypes.shape({ - alertVisible: propTypes.bool.isRequired, - alertText: propTypes.string.isRequired, + alertStore: propTypes.shape({ + text: propTypes.string.isRequired, + visible: propTypes.bool.isRequired, closeAlert: propTypes.func.isRequired, - }).isRequired, - children: propTypes.string.isRequired, + }), }; export default Alert; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 58dbd355..a8d9d48b 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -11,13 +11,9 @@ import { Ethereum, CreateToken, BackIcon } from '../Icons'; import styles from '../Login/Login.scss'; +@withTranslation() @observer class CreateNewProject extends Component { - constructor(props) { - super(props); - this.state = {}; - } - render() { const { t } = this.props; return ( @@ -62,4 +58,4 @@ CreateNewProject.propTypes = { }; -export default withTranslation()(CreateNewProject); +export default CreateNewProject; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 9073e889..9521b1e4 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -58,8 +58,7 @@ class CreateNewProjectWithTokens extends Component { super(props); this.state = { currentStep: this.steps.token, - step: 1, - disabled: false, + indicatorStep: 1, }; } @@ -67,7 +66,7 @@ class CreateNewProjectWithTokens extends Component { const { steps } = this; this.setState({ currentStep: steps.token, - step: 1, + indicatorStep: 1, }); } @@ -81,9 +80,9 @@ class CreateNewProjectWithTokens extends Component { appStore.checkErc(address).then(() => { this.setState({ currentStep: steps.tokenChecked, - step: 2, + indicatorStep: 2, }); - appStore.deployArgs = [address]; + appStore.setDeployArgs([address]); }); } @@ -91,7 +90,7 @@ class CreateNewProjectWithTokens extends Component { const { steps } = this; this.setState({ currentStep: steps.projectInfo, - step: 3, + indicatorStep: 3, }); } @@ -99,9 +98,8 @@ class CreateNewProjectWithTokens extends Component { const { steps } = this; const { appStore, userStore, t } = this.props; const { name, password } = form.values(); - this.setState({ disabled: true }); - appStore.name = name; - appStore.password = password; + appStore.setProjectName(name); + userStore.setPassword(password); userStore.readWallet(password) .then(() => { userStore.checkBalance(userStore.address) @@ -113,8 +111,7 @@ class CreateNewProjectWithTokens extends Component { } else { this.setState({ currentStep: steps.projectInfo, - step: 2, - disabled: false, + indicatorStep: 2, }); appStore.displayAlert(t('errors:lowBalance'), 3000); } @@ -123,27 +120,25 @@ class CreateNewProjectWithTokens extends Component { .catch(() => { this.setState({ currentStep: steps.projectInfo, - step: 2, - disabled: false, + indicatorStep: 2, }); appStore.displayAlert(t('errors:tryAgain'), 3000); }); } renderSwitch(step) { - const { disabled } = this.state; + const { steps } = this; switch (step) { - case 0: + case steps.token: return ; - case 1: + case steps.check: return ; - case 2: + case steps.tokenChecked: return ; - case 3: + case steps.projectInfo: return ( ); @@ -153,12 +148,13 @@ class CreateNewProjectWithTokens extends Component { } render() { - const { currentStep, step } = this.state; - if (currentStep === 4) return ; + const { steps } = this; + const { currentStep, indicatorStep } = this.state; + if (currentStep === steps.uploading) return ; return (
- + {this.renderSwitch(currentStep)}
@@ -211,7 +207,7 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, {t('headings:checkingTokensConfirm.subheading.1')} -
+

{t('other:count')}

{`${ERC.totalSupply} ${ERC.symbol}`}

@@ -221,12 +217,12 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, {t('buttons:continue')}
- +
)))); const InputProjectData = withTranslation()(({ - t, form, onClick, disabled, + t, form, onClick, }) => ( @@ -245,7 +241,7 @@ const InputProjectData = withTranslation()(({
- + {t('buttons:continue')}
@@ -256,7 +252,7 @@ const InputProjectData = withTranslation()(({

- { onClick(); }}> + {t('buttons:back')} @@ -269,15 +265,11 @@ const StepIndicator = withTranslation()(({ t, step, count }) => (

{t('other:step')} - {' '} - {step} - {' '} + {` ${step} `} {t('other:from')} - {' '} - {count} - {' '} + {` ${count} `}

@@ -295,11 +287,14 @@ CreateNewProjectWithTokens.propTypes = { name: propTypes.string.isRequired, password: propTypes.string.isRequired, displayAlert: propTypes.func.isRequired, + setDeployArgs: propTypes.func.isRequired, + setProjectName: propTypes.func.isRequired, }).isRequired, userStore: propTypes.shape({ readWallet: propTypes.func.isRequired, checkBalance: propTypes.func.isRequired, address: propTypes.string.isRequired, + setPassword: propTypes.func.isRequired, }).isRequired, t: propTypes.func.isRequired, }; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index e9892dba..fcae9317 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -1,5 +1,3 @@ -/* eslint-disable react/no-unused-state */ -/* eslint-disable no-console */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; @@ -17,9 +15,9 @@ import Input from '../Input'; import { BackIcon, Password, TokenSymbol, TokenCount, TokenName, } from '../Icons'; - import CreateTokenForm from '../../stores/FormsStore/CreateToken'; import CreateProjectForm from '../../stores/FormsStore/CreateProject'; + import styles from '../Login/Login.scss'; @withTranslation() @@ -28,9 +26,9 @@ import styles from '../Login/Login.scss'; class CreateNewProjectWithoutTokens extends Component { form = new CreateTokenForm({ hooks: { - onSuccess: (form) => new Promise((resolve, reject) => { - this.createToken(form).then(resolve()).catch(reject()); - }), + onSuccess: (form) => { + this.createToken(form); + }, onError: () => { this.showValidationError(); }, @@ -39,11 +37,11 @@ class CreateNewProjectWithoutTokens extends Component { createProject = new CreateProjectForm({ hooks: { - onSuccess: (form) => new Promise(() => { + onSuccess: (form) => { this.gotoUploading(form); - }), + }, onError: () => { - this.showError(); + this.showValidationError(); }, }, }); @@ -59,10 +57,8 @@ class CreateNewProjectWithoutTokens extends Component { constructor(props) { super(props); this.state = { - step: 1, + indicatorStep: 1, currentStep: this.steps.token, - tokenAddr: '', - disabled: false, }; } @@ -91,16 +87,13 @@ class CreateNewProjectWithoutTokens extends Component { userStore.checkBalance(userStore.address).then((balance) => { if (balance > 0.5) { appStore.deployContract('ERC20', deployArgs, password).then((hash) => { - // eslint-disable-next-line no-unused-vars const interval = setInterval(() => { - // eslint-disable-next-line consistent-return appStore.checkReceipt(hash).then((receipt) => { if (receipt) { this.setState({ - tokenAddr: receipt.contractAddress, currentStep: steps.tokenCreated, }); - appStore.deployArgs = [receipt.contractAddress]; + appStore.setDeployArgs([receipt.contractAddress]); clearInterval(interval); } }).catch(() => { appStore.displayAlert(t('errors:hostUnreachable'), 3000); }); @@ -110,7 +103,7 @@ class CreateNewProjectWithoutTokens extends Component { } else { this.setState({ currentStep: steps.token, - step: 1, + indicatorStep: 1, }); appStore.displayAlert(t('errors:lowBalance'), 3000); reject(); @@ -120,7 +113,7 @@ class CreateNewProjectWithoutTokens extends Component { }).catch(() => { this.setState({ currentStep: steps.token, - step: 1, + indicatorStep: 1, }); appStore.displayAlert(t('errors:wrongPassword'), 3000); reject(); @@ -137,7 +130,7 @@ class CreateNewProjectWithoutTokens extends Component { const { steps } = this; this.setState({ currentStep: steps.projectInfo, - step: 2, + indicatorStep: 2, }); } @@ -146,9 +139,8 @@ class CreateNewProjectWithoutTokens extends Component { const { steps } = this; const { userStore, appStore, t } = this.props; const { name, password } = form.values(); - appStore.name = name; - appStore.password = password; - this.setState({ disabled: true }); + appStore.setProjectName(name); + userStore.setPassword(password); userStore.readWallet(password) .then(() => { userStore.checkBalance(userStore.address) @@ -160,8 +152,7 @@ class CreateNewProjectWithoutTokens extends Component { } else { this.setState({ currentStep: steps.projectInfo, - step: 2, - disabled: false, + indicatorStep: 2, }); appStore.displayAlert(t('errors:lowBalance'), 3000); } @@ -170,33 +161,26 @@ class CreateNewProjectWithoutTokens extends Component { .catch(() => { this.setState({ currentStep: steps.projectInfo, - step: 2, - disabled: false, + indicatorStep: 2, }); appStore.displayAlert(t('errors:tryAgain'), 3000); }); } - showError() { - const { appStore, t } = this.props; - appStore.displayAlert(t('errors:validationError'), 3000); - } - // eslint-disable-next-line class-methods-use-this renderSwitch(step) { - const { disabled } = this.state; + const { steps } = this; switch (step) { - case 1: + case steps.token: return ; - case 2: + case steps.creation: return ; - case 3: + case steps.tokenCreated: return ; - case 4: + case steps.projectInfo: return ( ); @@ -206,12 +190,12 @@ class CreateNewProjectWithoutTokens extends Component { } render() { - const { currentStep, step } = this.state; + const { currentStep, indicatorStep } = this.state; if (currentStep === 'uploading') return ; return (

- + {this.renderSwitch(currentStep)}
@@ -240,7 +224,7 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation {t('explanations:token.left.balance')} - {(balances[address.replace('0x', '')] / 1.0e18).toFixed(5)} + {Number(balances[address.replace('0x', '')]).toFixed(5)} {' ETH'} @@ -311,7 +295,7 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => (
- { onSubmit(); }}> + {t('buttons:continue')}
@@ -320,7 +304,7 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => ( )); const InputProjectData = withTranslation()(({ - form, disabled, onClick, t, + form, onClick, t, }) => ( @@ -340,7 +324,7 @@ const InputProjectData = withTranslation()(({
- + {t('buttons:continue')}
@@ -351,7 +335,7 @@ const InputProjectData = withTranslation()(({

- { onClick(); }}> + {t('buttons:back')} @@ -364,15 +348,11 @@ const StepIndicator = withTranslation()(({ t, step, count }) => (

{t('other:step')} - {' '} - { step } - {' '} + {` ${step} `} {t('other:from')} - {' '} - { count } - {' '} + {` ${count} `}

@@ -388,13 +368,15 @@ CreateNewProjectWithoutTokens.propTypes = { checkReceipt: propTypes.func.isRequired, deployArgs: propTypes.arrayOf(propTypes.any).isRequired, displayAlert: propTypes.func.isRequired, - name: propTypes.string.isRequired, + setProjectName: propTypes.func.isRequired, password: propTypes.string.isRequired, + setDeployArgs: propTypes.func.isRequired, }).isRequired, userStore: propTypes.shape({ readWallet: propTypes.func.isRequired, checkBalance: propTypes.func.isRequired, address: propTypes.string.isRequired, + setPassword: propTypes.func.isRequired, }).isRequired, t: propTypes.func.isRequired, }; @@ -412,6 +394,7 @@ InputProjectData.propTypes = { form: propTypes.shape({ $: propTypes.func.isRequired, onSubmit: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, }).isRequired, onClick: propTypes.func.isRequired, }; diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index ad2df21c..e559baec 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -9,9 +9,10 @@ import Input from '../Input'; import { IconButton, BlackWidestButton } from '../Button'; import Explanation from '../Explanation'; import Indicator from '../Indicator'; -import styles from '../Login/Login.scss'; import passwordValidation from '../../utils/PasswordValidation'; +import styles from '../Login/Login.scss'; + @withTranslation() class PasswordForm extends Component { constructor(props) { diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index ef557fe6..403eedb2 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -9,12 +9,12 @@ import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Loader from '../Loader'; -import styles from '../Login/Login.scss'; import passwordValidation from '../../utils/PasswordValidation'; - import PasswordForm from './PasswordForm'; import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; +import styles from '../Login/Login.scss'; + @inject('userStore', 'appStore') @observer class CreateWallet extends Component { @@ -32,8 +32,8 @@ class CreateWallet extends Component { this.setState({ loading: true }); if (recover) { userStore.recoverWallet(values.password).then(() => { - this.setState({ redirect: true }); userStore.saveWalletToFile(); + this.setState({ redirect: true }); }).catch(() => { this.setState({ loading: false }); }); @@ -46,7 +46,6 @@ class CreateWallet extends Component { } } - render() { const { recover } = this.props; const { redirect, loading } = this.state; @@ -57,7 +56,6 @@ class CreateWallet extends Component { createWallet(form); }, onError() { - }, }, }); @@ -78,15 +76,12 @@ class CreateWallet extends Component { /> ) : } - -

); } } - const CreationLoader = withTranslation(['headings'])(({ t }) => ( diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 1e9af0ec..32991d49 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -29,8 +29,16 @@ const CreationAlert = withTranslation()(({ t, success = false, recover = false }
- {success ? t('headings:walletCreated.heading') : recover ? t('headings:walletRestored.heading') : ''} - {success ? t('headings:walletCreated.subheading') : recover ? t('headings:walletRestored.subheading') : ''} + {success + ? t('headings:walletCreated.heading') + : recover + ? t('headings:walletRestored.heading') + : ''} + {success + ? t('headings:walletCreated.subheading') + : recover + ? t('headings:walletRestored.subheading') + : ''} diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js index 35c4ac86..028b4e8a 100644 --- a/src/components/DropdownOption/index.js +++ b/src/components/DropdownOption/index.js @@ -16,7 +16,7 @@ const DropdownOption = ({ {subOption !== '' ? ( - {(Number(subOption) / 1.0e18).toFixed(5)} + {Number(subOption).toFixed(5)} {' ETH'} ) diff --git a/src/components/FormBlock/index.js b/src/components/FormBlock/index.js index 2c672583..0c1399f2 100644 --- a/src/components/FormBlock/index.js +++ b/src/components/FormBlock/index.js @@ -1,8 +1,10 @@ import React from 'react'; import propTypes from 'prop-types'; +import styles from '../Login/Login.scss'; + const FormBlock = ({ children, className }) => ( -
+
{children}
); diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 75990a1a..3409c832 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ /* eslint-disable react/jsx-props-no-spreading */ import React, { Component } from 'react'; import propTypes from 'prop-types'; @@ -8,12 +7,6 @@ import styles from './Input.scss'; @observer class Input extends Component { - constructor(props) { - super(props); - this.state = { - }; - } - handleOnChange = (e) => { const { field, onInput } = this.props; field.onChange(e); @@ -46,8 +39,13 @@ class Input extends Component { Input.propTypes = { children: propTypes.element.isRequired, className: propTypes.string, - // eslint-disable-next-line react/forbid-prop-types - field: propTypes.object.isRequired, + field: propTypes.shape({ + error: propTypes.string.isRequired, + value: propTypes.string.isRequired, + placeholder: propTypes.string.isRequired, + bind: propTypes.func.isRequired, + onChange: propTypes.func.isRequired, + }).isRequired, onInput: propTypes.func, }; Input.defaultProps = { diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index c1d7c56b..bef3e20f 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -1,26 +1,25 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; import SeedForm from '../../stores/FormsStore/SeedForm'; import Input from '../Input'; import { BlackWidestButton } from '../Button'; import styles from '../Login/Login.scss'; +@withTranslation() class SeedInput extends Component { - constructor(props) { - super(props); - this.state = {}; - } - render() { - const { seed, submit, error } = this.props; + const { + seed, submit, showError, t, + } = this.props; const seedForm = new SeedForm({ hooks: { onSuccess(form) { submit(form); }, onError() { - error(); + showError(); }, }, }); @@ -40,7 +39,7 @@ class SeedInput extends Component {
- Продолжить + {t('buttons:continue')}
@@ -50,8 +49,9 @@ class SeedInput extends Component { SeedInput.propTypes = { submit: propTypes.func.isRequired, - error: propTypes.func.isRequired, + showError: propTypes.func.isRequired, seed: propTypes.arrayOf(propTypes.string).isRequired, + t: propTypes.func.isRequired, }; export default SeedInput; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 2f3e0a5a..46244abd 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import Container from '../Container'; import Heading from '../Heading'; import FormBlock from '../FormBlock'; -import { IconButton } from '../Button'; +import { BackButton } from '../Button'; import { BackIcon } from '../Icons'; import Loader from '../Loader'; import SeedInput from './SeedForm'; @@ -41,7 +41,7 @@ class InputSeed extends Component { userStore, appStore, recover, t, } = this.props; const values = Object.values(form.values()); - userStore.mnemonicRepeat = values; + userStore.setMemonicRepeat(values); const mnemonic = values.join(' '); if (userStore.isSeedValid(mnemonic)) { this.toggleLoading(); @@ -86,15 +86,15 @@ class InputSeed extends Component { )}
- + {t('buttons:back')} - +
@@ -105,7 +105,7 @@ class InputSeed extends Component { InputSeed.propTypes = { userStore: propTypes.shape({ - mnemonicRepeat: propTypes.arrayOf(propTypes.string).isRequired, + setMemonicRepeat: propTypes.func.isRequired, isSeedValid: propTypes.func.isRequired, recoverWallet: propTypes.func.isRequired, setEncryptedWallet: propTypes.func.isRequired, @@ -120,5 +120,4 @@ InputSeed.propTypes = { t: propTypes.func.isRequired, }; - export default InputSeed; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 41bffacd..84aef8a5 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -58,8 +58,7 @@ class LangSwitcher extends Component { const { opened, value } = this.state; return (
- - {' '} + {value}
diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 91072025..0a100269 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -305,6 +305,10 @@ margin: 5px 0 0 -35%; } } + .stroke-animation { + opacity: 0; + } + &.success{ .progress-block__icon { &>svg { @@ -322,7 +326,7 @@ } .progress-line{ width: 96px; - border-top: 2px solid rgba($color: $primary, $alpha: 1); + border: 1px solid rgba($color: $primary, $alpha: 1); opacity: 1; } &>p { @@ -335,6 +339,9 @@ & > img { opacity: 1; } + .stroke-animation { + opacity: 1; + } .progress-block__icon { svg { path { @@ -395,3 +402,33 @@ text-align: center; transform: translate(-50%, 30%); } + + +@keyframes stroke-spacing { + 0% { + stroke-dasharray: 0 200; + } + 45% { + stroke-dashoffset: 0; + stroke-dasharray: 200 200; + } + 90% { + stroke-dashoffset: -200; + stroke-dasharray: 200 200; + } + 100% { + stroke-dashoffset: -200; + stroke-dasharray: 200 200; + } +} + +@keyframes stroke-color { + 0% { stroke: $primary; } + 24% { stroke: $primary; } + 25% { stroke: $primary; } + 49% { stroke: $primary; } + 50% { stroke: $primary; } + 74% { stroke: $primary; } + 75% { stroke: $primary; } + 99% { stroke: $primary; } +} diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 06be8818..bc5403f9 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -27,7 +27,6 @@ class Login extends Component { } render() { - // eslint-disable-next-line no-unused-vars const { appStore, userStore, t } = this.props; const { logging } = userStore; const loginForm = new LoginForm({ @@ -116,6 +115,7 @@ Login.propTypes = { }).isRequired, t: propTypes.func.isRequired, }; + InputForm.propTypes = { appStore: propTypes.shape({ wallets: propTypes.arrayOf(propTypes.object).isRequired, @@ -127,5 +127,4 @@ InputForm.propTypes = { }).isRequired, }; - export default withTranslation()(Login); diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss index 1e224649..17b07ff9 100644 --- a/src/components/Logo/Logo.scss +++ b/src/components/Logo/Logo.scss @@ -1,37 +1,5 @@ @import '../../assets/styles/partials/variables'; -/*.logo { - position: relative; - display: inline-block; - border: 3px solid $primary; - span{ - display: inline-block; - vertical-align: middle; - transition: 0.2s linear; - } - &__dark { - padding: 3.5px 5px; - color: $white; - font-size: 32px; - background-color: $primary; - font-family: "Roboto Mono"; - } - &__light { - position: relative; - padding: 15px; - color: $primary; - font-weight: bold; - font-size: 12px; - background-color: $white; - } - &:hover { - .logo { - &__dark, &__light { - filter: invert(100%); - } - } - } -}*/ .logo{ display: table; height: 53px; diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index 34d111ff..a00e9118 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -11,10 +11,10 @@ const ProgressBlock = ({ ${state > index ? 'success' : ''}`} > - - - - + + + +
{children[0] ? children[0] : children} @@ -34,7 +34,9 @@ ProgressBlock.propTypes = { state: propTypes.number.isRequired, noline: propTypes.bool, }; + ProgressBlock.defaultProps = { noline: false, }; + export default ProgressBlock; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index a425de1d..ce703104 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -36,13 +36,15 @@ class ProjectUploading extends Component { this.state = { step: this.steps.compiling, address: '', - loading: true, + uploading: true, }; } componentDidMount() { const { steps } = this; - const { appStore, appStore: { deployArgs, name, password }, t } = this.props; + const { + appStore, appStore: { deployArgs, name }, userStore: { password }, t, + } = this.props; this.setState({ step: steps.sending, }); @@ -62,7 +64,7 @@ class ProjectUploading extends Component { clearInterval(interval); appStore.deployQuestions(receipt.contractAddress).then(() => { this.setState({ - loading: false, + uploading: false, }); }); } @@ -72,12 +74,12 @@ class ProjectUploading extends Component { } render() { - const { step, loading } = this.state; + const { step, uploading } = this.state; return ( -
+
{ - loading ? : + uploading ? : }
@@ -160,7 +162,6 @@ const AlertBlock = withTranslation()(({ t }) => ( )); -// //ProjectUploading.propTypes = {}; ProjectUploading.propTypes = { appStore: propTypes.shape({ deployContract: propTypes.func.isRequired, @@ -172,6 +173,9 @@ ProjectUploading.propTypes = { deployQuestions: propTypes.func.isRequired, displayAlert: propTypes.func.isRequired, }).isRequired, + userStore: propTypes.shape({ + password: propTypes.string.isRequired, + }).isRequired, t: propTypes.func.isRequired, }; Progress.propTypes = { diff --git a/src/components/RequiredAuthorization/index.js b/src/components/RequiredAuthorization/index.js index c2a6ecce..33080620 100644 --- a/src/components/RequiredAuthorization/index.js +++ b/src/components/RequiredAuthorization/index.js @@ -3,7 +3,8 @@ import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; import { Redirect } from 'react-router-dom'; -@inject('userStore') @observer +@inject('userStore') +@observer class RequiredAuthorization extends React.Component { render() { const { props } = this; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index f9b18f91..52deb2f6 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -2,7 +2,6 @@ import React from 'react'; import { MemoryRouter, Route, Switch, } from 'react-router-dom'; - import Login from '../Login'; import CreateWallet from '../CreateWallet'; import InputSeed from '../InputSeed'; diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index a61acb6f..05bce657 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -9,7 +9,7 @@ import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Explanation from '../Explanation'; -import { IconButton, BlackWidestButton, SeedToggleButton } from '../Button'; +import { BlackWidestButton, SeedToggleButton, BackButton } from '../Button'; import { BackIcon, EyeIcon, CrossedEyeIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -61,10 +61,10 @@ class ShowSeed extends Component {
- + {t('buttons:back')} - +
diff --git a/src/index.js b/src/index.js index 6b3e5d29..2977160a 100644 --- a/src/index.js +++ b/src/index.js @@ -4,21 +4,18 @@ import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import rootStore from './stores/RootStore'; import Alert from './components/Alert'; +import Header from './components/Header'; import './i18n'; import './assets/styles/style.scss'; -import Header from './components/Header'; -const { stores } = rootStore; -// eslint-disable-next-line no-console -console.log(stores); +const { userStore, appStore, alertStore } = rootStore; + render( - +
- - {stores.appStore.alertText} - + , document.getElementById('root'), ); diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index d0776a19..d2be7298 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -9,6 +9,7 @@ import { BN } from 'ethereumjs-util'; import { fs, PATH_TO_CONTRACTS, path, SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP, ROOT_DIR, } from '../../constants'; +import Question from './entities/Question'; /** * Class for forming transactions @@ -17,14 +18,22 @@ class ContractService { constructor(rootStore) { this._contract = {}; this.rootStore = rootStore; + this.sysQuestions = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8')); + this.ercAbi = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './ERC20.abi'))); } + /** + * sets instance of contract to this._contract + * @param {object} instance instance of contract created by Web3Service + */ + // eslint-disable-next-line consistent-return setContract(instance) { + if (!(instance instanceof Object)) return new Error('this is not contract'); this._contract = instance; } /** - * compiling contracts and returning type of compiled contract, bytecode & abi + * compiles contracts and returning type of compiled contract, bytecode & abi * @param {string} type - ERC20 - if compiling ERC20 token contract, project - if project contract * @returns {object} contains type of compiled contract, his bytecode and abi for deploying */ @@ -49,7 +58,7 @@ class ContractService { const { bytecode, metadata } = contractData; const { output: { abi } } = JSON.parse(metadata); resolve({ type, bytecode, abi }); - } else reject(); + } else reject(new Error('Something went wrong on contract compiling')); }); }); }); @@ -94,14 +103,14 @@ class ContractService { /** * Sendind transaction with contract to blockchain * @param {object} params parameters for deploying - * @param {string} params.type ERC20 if deploying ERC20 token, Project - if project contract * @param {array} params.deployArgs ERC20 - [Name, Symbol, Count], Project - [tokenAddress] * @param {string} params.bytecode bytecode of contract * @param {JSON} params.abi JSON interface of contract + * @param {string} params.password password of user wallet * @returns {Promise} Promise of web3.sendSignedTransaction which resolves on txHash */ deployContract({ - type, deployArgs, bytecode, abi, password, + deployArgs, bytecode, abi, password, }) { const { rootStore: { Web3Service, userStore } } = this; const { address } = userStore; @@ -118,8 +127,8 @@ class ContractService { gasPrice: maxGasPrice, }; - return new Promise((resolve, reject) => { - Web3Service.formTxData(address, tx, maxGasPrice).then((formedTx) => { + return new Promise((resolve) => { + Web3Service.createTxData(address, tx, maxGasPrice).then((formedTx) => { userStore.singTransaction(formedTx, password).then((signedTx) => { Web3Service.sendSignedTransaction(`0x${signedTx}`).then((txHash) => { resolve(txHash); @@ -130,28 +139,27 @@ class ContractService { } /** - * Creates transaction - * @param {string} method - * @param {array} params + * checks erc20 tokens contract on totalSupply and symbol + * @param {string} address address of erc20 contract + * @return {object} {totalSypply, symbol} */ - createTxData(method, params) { - return this.contract.methods[method](params).encodeABI(); - } - - async checkTokens(address) { - const { rootStore: { Web3Service, userStore } } = this; - const abi = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './ERC20.abi'))); - const contract = Web3Service.createContractInstance(abi); + const { rootStore: { Web3Service }, ercAbi } = this; + const contract = Web3Service.createContractInstance(ercAbi); contract.options.address = address; const totalSupply = await contract.methods.totalSupply().call(); const symbol = await contract.methods.symbol().call(); return { totalSupply, symbol }; } + /** + * checks is the address of contract + * @param {string} address address of contract + * @return {Promise} Promise with function which resolves, if address is contract + */ // eslint-disable-next-line class-methods-use-this checkProject(address) { - const { rootStore: { Web3Service, userStore } } = this; + const { rootStore: { Web3Service } } = this; return new Promise((resolve, reject) => { Web3Service.web3.eth.getCode(address).then((bytecode) => { if (bytecode === '0x') reject(); @@ -181,37 +189,37 @@ class ContractService { return data; } - getSystemQuestions() { - this.sysQuestions = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8')); - } - + /** + * checks count of uploaded to contract questions and total count of system questions + * @function + * @returns {object} {countOfUploaded, totalCount} + */ async checkQuestions() { - this.getSystemQuestions(); const countOfUploaded = await this._contract.methods.getCount().call(); const totalCount = Object.keys(this.sysQuestions).length; return ({ countOfUploaded, totalCount }); } + /** + * send question to created contract + * @param {number} idx id of question; + * @return {Promise} Promise, which resolves on transaction hash + */ async sendQuestion(idx) { const { Web3Service, Web3Service: { web3 }, userStore, appStore: { password }, } = this.rootStore; const sysQuestion = this.sysQuestions[idx]; - // eslint-disable-next-line consistent-return await this.getQuestion(idx).then((result) => { if (result.caption === '') { const { address } = userStore; - const { - id, group, name, caption, time, method, formula, parameters, - } = sysQuestion; - - const preparedFormula = this.convertFormula(formula); - const params = parameters.map((param) => web3.utils.utf8ToHex(param)); + const question = new Question(sysQuestion); const contractAddr = this._contract.options.address; + const params = question.getUploadingParams(contractAddr); + + const dataTx = this._contract.methods.saveNewQuestion(...params).encodeABI(); - // eslint-disable-next-line max-len - const dataTx = this._contract.methods.saveNewQuestion([id, group, time], 0, name, caption, contractAddr, method, preparedFormula, params).encodeABI(); const maxGasPrice = 30000000000; const rawTx = { to: contractAddr, @@ -221,47 +229,25 @@ class ContractService { }; - return new Promise((resolve, reject) => { - Web3Service.formTxData(address, rawTx, maxGasPrice) - .then((formedTx) => { - userStore.singTransaction(formedTx, password) - .then((signedTx) => { - Web3Service.sendSignedTransaction(`0x${signedTx}`) - .then((txHash) => { - const interval = setInterval(() => { - web3.eth.getTransactionReceipt(txHash).then((receipt) => { - // eslint-disable-next-line valid-typeof - if (receipt) { - clearInterval(interval); - resolve(); - } - }); - }, 5000); - }); + return new Promise(() => { + Web3Service.createTxData(address, rawTx, maxGasPrice) + .then((formedTx) => userStore.singTransaction(formedTx, password)) + .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) + .then((txHash) => { + const interval = setInterval(() => { + web3.eth.getTransactionReceipt(txHash).then((receipt) => { + if (receipt) { + clearInterval(interval); + Promise.resolve(); + } }); + }, 5000); }); }); } }); } - convertFormula(formula) { - const FORMULA_REGEXP = new RegExp(/(group)|((?:[a-zA-Z0-9]{1,}))|((quorum|positive))|(>=|<=)|([0-9%]{1,})|(quorum|all)/g); - const matched = formula.match(FORMULA_REGEXP); - - const convertedFormula = []; - - matched[0] === 'group' ? convertedFormula.push(0) : convertedFormula.push(1); - matched[1] === 'Owners' ? convertedFormula.push(1) : convertedFormula.push(2); - matched[3] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); - matched[4] === '<=' ? convertedFormula.push(0) : convertedFormula.push(1); - convertedFormula.push(Number(matched[5])); - - if (matched.length === 9) { - matched[8] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); - } - return convertedFormula; - } getQuestion(id) { return this.callMethod('question', id); diff --git a/src/services/ContractService/entities/Question.js b/src/services/ContractService/entities/Question.js new file mode 100644 index 00000000..9a1cc1f7 --- /dev/null +++ b/src/services/ContractService/entities/Question.js @@ -0,0 +1,47 @@ +/* eslint-disable no-unused-expressions */ +import web3 from 'web3'; + +class Question { + constructor({ + id, group, name, caption, time, method, formula, parameters, + }) { + this.id = id; + this.group = group; + this.name = name; + this.caption = caption; + this.time = time; + this.method = method; + this.formula = formula; + this.parameters = parameters; + } + + /** + * convert simple formula of system question for contract + * @param {string} formula text implimentation of formula + * @returns {array} numeric implimentation of formula for smart contract + */ + getFormulaForContract() { + const FORMULA_REGEXP = new RegExp(/(group)|((?:[a-zA-Z0-9]{1,}))|((quorum|positive))|(>=|<=)|([0-9%]{1,})|(quorum|all)/g); + const matched = this.formula.match(FORMULA_REGEXP); + const convertedFormula = []; + matched[0] === 'group' ? convertedFormula.push(0) : convertedFormula.push(1); + matched[1] === 'Owners' ? convertedFormula.push(1) : convertedFormula.push(2); + matched[3] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); + matched[4] === '<=' ? convertedFormula.push(0) : convertedFormula.push(1); + convertedFormula.push(Number(matched[5])); + if (matched.length === 9) { + matched[8] === 'quorum' ? convertedFormula.push(0) : convertedFormula.push(1); + } + return convertedFormula; + } + + getUploadingParams(contractAddr) { + const { + id, group, name, caption, time, method, parameters, + } = this; + const convertedFormula = this.getFormulaForContract(); + const params = parameters.map((param) => web3.utils.utf8ToHex(param)); + return [[id, group, time], 0, name, caption, contractAddr, method, convertedFormula, params]; + } +} +export default Question; diff --git a/src/utils/EventEmitter/index.js b/src/services/EventEmitterService/index.js similarity index 76% rename from src/utils/EventEmitter/index.js rename to src/services/EventEmitterService/index.js index 28f19233..e60b8ee7 100644 --- a/src/utils/EventEmitter/index.js +++ b/src/services/EventEmitterService/index.js @@ -1,4 +1,4 @@ -class EventEmitter { +class EventEmitterService { constructor() { this.events = {}; } @@ -14,5 +14,4 @@ class EventEmitter { } } -const eventEmitter = new EventEmitter(); -export default eventEmitter; +export default EventEmitterService; diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index a1957d61..015bc90f 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ /* eslint-disable class-methods-use-this */ import WorkerWrapper from './entities/WorkerWrapper'; import WalletWorker from '../../workers/wallet.worker'; @@ -6,9 +5,10 @@ import { fs, path, PATH_TO_WALLETS } from '../../constants'; const bip39 = require('bip39'); -/** Service for working with wallets */ const worker = new WorkerWrapper(new WalletWorker()); + +/** Service for working with wallets */ class WalletService { /** * Decrypts wallet @@ -58,25 +58,13 @@ class WalletService { * @returns {Promise} */ recoverWallet(mnemonic) { - return new Promise((resolve, reject) => { - if (bip39.validateMnemonic) { - const data = { - action: 'recover', - mnemonic, - }; - resolve(worker.send(data)); - } else reject(); - }); - } - - /** - * Checking wallet for creating txDaat - * @param {string} wallet encryptedWallet - * @param {string} password password - * @return {bool} is password correct - */ - validateMnemonic(mnemonic) { - return bip39.validateMnemonic(mnemonic); + if (bip39.validateMnemonic) { + const data = { + action: 'recover', + mnemonic, + }; + return Promise.resolve(worker.send(data)); + } return Promise.reject(); } } export default WalletService; diff --git a/src/services/WalletService/entities/WorkerWrapper.js b/src/services/WalletService/entities/WorkerWrapper.js index 201625ce..fd072e55 100644 --- a/src/services/WalletService/entities/WorkerWrapper.js +++ b/src/services/WalletService/entities/WorkerWrapper.js @@ -5,11 +5,11 @@ class WorkerWrapper { worker; stack = {}; + /** * @constructor * @param {function} worker instance of worker, which will be used */ - constructor(worker) { this.worker = worker; this._listen(); diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 1ef7b42c..5618e11e 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -1,8 +1,8 @@ -/* eslint-disable no-console */ import Web3 from 'web3'; import { BN } from 'ethereumjs-util'; + /** - * Class for working with this.web3 (sending transactions) + * Service for working with web3 (sending signed transactions, creating transactions) */ class web3Service { /** @@ -11,7 +11,6 @@ class web3Service { */ constructor(url, rootStore) { this.web3 = new Web3(new Web3.providers.HttpProvider(url)); - this.address2nonce = {}; this.rootStore = rootStore; } @@ -20,7 +19,7 @@ class web3Service { return new Contract(abi); } - formTxData(address, tx, maxGasPrice) { + createTxData(address, tx, maxGasPrice) { const { web3: { eth } } = this; let transaction = { ...tx }; return eth.getTransactionCount(address, 'pending') @@ -33,15 +32,15 @@ class web3Service { return this.getGasPrice() .then((gasPrice) => { transaction.gasPrice = new BN(gasPrice).lte(new BN(maxGasPrice)) - ? maxGasPrice + ? gasPrice : maxGasPrice; return Promise.resolve(gas); }) .catch(Promise.reject); }) // eslint-disable-next-line no-unused-vars - .then((gas) => ( - { ...transaction } + .then((gasPrice) => ( + { ...transaction, gasPrice } )) .catch((err) => Promise.reject(err)); } @@ -68,30 +67,5 @@ class web3Service { }); }); } - - /** - * Getting nonce of address - * @param {string} address address, for which we getting nonce - */ - getNonce(address) { - return new Promise((resolve, reject) => { - if (!this.address2nonce[address]) { - this.web3.eth.getTransactionCount(address, 'pending').then((nonce) => { - this.address2nonce[address] += nonce; - resolve(nonce); - }).catch((e) => reject(e)); - } else { - resolve(this.address2nonce[address]); - } - }); - } - - /** - * Decreasing nonce of address - * @param {string} address address, for which we decrease nonce - */ - decreaseNonce(address) { - if (this.address2nonce[address]) this.address2nonce[address] -= 1; - } } export default web3Service; diff --git a/src/stores/AlertStore/AlertStore.js b/src/stores/AlertStore/AlertStore.js new file mode 100644 index 00000000..7e86e818 --- /dev/null +++ b/src/stores/AlertStore/AlertStore.js @@ -0,0 +1,21 @@ +import { observable, action } from 'mobx'; + +class AlertStore { + @observable text = ''; + + @observable visible = false; + + @action showAlert = (text, interval = 3000) => { + this.text = text; + this.visible = true; + setTimeout(() => { + this.visible = false; + }, interval); + } + + @action closeAlert = () => { + this.visible = false; + } +} + +export default AlertStore; diff --git a/src/stores/AlertStore/index.js b/src/stores/AlertStore/index.js new file mode 100644 index 00000000..8b3776d6 --- /dev/null +++ b/src/stores/AlertStore/index.js @@ -0,0 +1,3 @@ +import AlertStore from './AlertStore'; + +export default AlertStore; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 61e060d0..93daa70c 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -19,8 +19,6 @@ class AppStore { @observable name = ''; - @observable password=''; - @observable alertVisible = false; @observable alertText = ''; @@ -41,7 +39,7 @@ class AppStore { * @function */ @action readWalletList() { - const { Web3Service: { web3: { eth } } } = this.rootStore; + const { Web3Service: { web3: { eth, utils } } } = this.rootStore; this.walletList = {}; const files = fs.readdirSync(PATH_TO_WALLETS); @@ -49,7 +47,7 @@ class AppStore { const wallet = JSON.parse(fs.readFileSync(path.join(PATH_TO_WALLETS, file), 'utf8')); const walletObject = {}; eth.getBalance(wallet.address) - .then((balance) => { this.balances[wallet.address] = balance; }); + .then((balance) => { this.balances[wallet.address] = utils.fromWei(balance); }); walletObject[wallet.address] = wallet; this.walletList = Object.assign(this.walletList, walletObject); }); @@ -151,24 +149,22 @@ class AppStore { } @action displayAlert(text, timeOut) { - this.alertVisible = true; - this.alertText = text; - if (typeof this.alertTimeout === 'number') { - clearTimeout(this.alertTimeout); - } - this.alertTimeout = setTimeout(() => { - this.alertVisible = false; - }, timeOut); - } - - @action closeAlert() { - this.alertVisible = false; + const { alertStore } = this.rootStore; + alertStore.showAlert(text, timeOut); } @computed get wallets() { const wallets = Object.keys(this.walletList); return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); } + + @action setProjectName(value) { + this.name = value; + } + + @action setDeployArgs(value) { + this.deployArgs = value; + } } export default AppStore; diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js index d68cbe41..f91a4144 100644 --- a/src/stores/FormsStore/ConnectProject.js +++ b/src/stores/FormsStore/ConnectProject.js @@ -1,10 +1,7 @@ +/* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; -/* eslint-disable no-alert */ -/* eslint-disable no-console */ -/* eslint-disable class-methods-use-this */ - class ConnectProjectForm extends ExtendedForm { setup() { return { diff --git a/src/stores/FormsStore/ConnectToken.js b/src/stores/FormsStore/ConnectToken.js index 9772a71d..619f9392 100644 --- a/src/stores/FormsStore/ConnectToken.js +++ b/src/stores/FormsStore/ConnectToken.js @@ -1,10 +1,7 @@ +/* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; -/* eslint-disable no-alert */ -/* eslint-disable no-console */ -/* eslint-disable class-methods-use-this */ - class ConnectTokenForm extends ExtendedForm { setup() { return { diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js index 7c8f31e7..fc3d3eb7 100644 --- a/src/stores/FormsStore/CreateProject.js +++ b/src/stores/FormsStore/CreateProject.js @@ -1,10 +1,7 @@ +/* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; -/* eslint-disable no-alert */ -/* eslint-disable no-console */ -/* eslint-disable class-methods-use-this */ - class СreateProjectForm extends ExtendedForm { setup() { return { diff --git a/src/stores/FormsStore/CreateToken.js b/src/stores/FormsStore/CreateToken.js index 7ab6a2b7..b3e81b37 100644 --- a/src/stores/FormsStore/CreateToken.js +++ b/src/stores/FormsStore/CreateToken.js @@ -1,10 +1,7 @@ +/* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; -/* eslint-disable no-alert */ -/* eslint-disable no-console */ -/* eslint-disable class-methods-use-this */ - class CreateTokenForm extends ExtendedForm { setup() { return { diff --git a/src/stores/FormsStore/CreateWalletForm.js b/src/stores/FormsStore/CreateWalletForm.js index 096b838b..ac767cbb 100644 --- a/src/stores/FormsStore/CreateWalletForm.js +++ b/src/stores/FormsStore/CreateWalletForm.js @@ -1,10 +1,7 @@ +/* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; -/* eslint-disable no-alert */ -/* eslint-disable no-console */ -/* eslint-disable class-methods-use-this */ - class CreateWalletForm extends ExtendedForm { setup() { return { diff --git a/src/stores/FormsStore/LoginForm.js b/src/stores/FormsStore/LoginForm.js index ea9f7abd..d96e27fa 100644 --- a/src/stores/FormsStore/LoginForm.js +++ b/src/stores/FormsStore/LoginForm.js @@ -1,5 +1,3 @@ -/* eslint-disable no-alert */ -/* eslint-disable no-console */ /* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; diff --git a/src/stores/FormsStore/SeedForm.js b/src/stores/FormsStore/SeedForm.js index c0b1691b..2f5624c1 100644 --- a/src/stores/FormsStore/SeedForm.js +++ b/src/stores/FormsStore/SeedForm.js @@ -1,9 +1,5 @@ -import ExtendedForm from '../../models/FormModel'; - -/* eslint-disable no-alert */ -/* eslint-disable no-console */ /* eslint-disable class-methods-use-this */ - +import ExtendedForm from '../../models/FormModel'; class SeedForm extends ExtendedForm { setup() { diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 273502dd..a19b3a25 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -1,12 +1,14 @@ /* eslint-disable no-multi-assign */ /* eslint-disable no-multi-spaces */ -import { observable, action, computed } from 'mobx'; +import { observable, action } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; +import AlertStore from '../AlertStore'; import Web3Service from '../../services/Web3Service'; import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; +import EventEmitterService from '../../services/EventEmitterService'; import { fs, path, ROOT_DIR } from '../../constants'; class RootStore { @@ -15,14 +17,18 @@ class RootStore { @observable appStore; - @observable userStore ; + @observable userStore; + + @observable alertStore; // services - @observable walletService ; + walletService ; + + contractService ; - @observable contractService ; + Web3Service ; - @observable Web3Service ; + eventEmitterService; constructor() { const configRaw = fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8'); @@ -30,7 +36,9 @@ class RootStore { this.Web3Service = new Web3Service(config.host, this); this.appStore = new AppStore(this); this.userStore = new UserStore(this); + this.alertStore = new AlertStore(); this.walletService = new WalletService(); + this.eventEmitterService = new EventEmitterService(); this.contractService = new ContractService(this); } @@ -41,12 +49,6 @@ class RootStore { @action initProject(address) { this.projectStore = new ProjectStore(address); } - - - @computed get stores() { - const { appStore, userStore } = this; - return { appStore, userStore }; - } } const rootStore = window.rootStore = new RootStore(); export default rootStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index abff1eae..242c63d4 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -25,10 +25,16 @@ class UserStore { @observable balance = 0; + @observable password = ''; + constructor(rootStore) { this.rootStore = rootStore; } + @action setPassword(value) { + this.password = value; + } + @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; this.address = `0x${wallet.address}`; @@ -171,6 +177,10 @@ class UserStore { this.balance = await web3.eth.getBalance(this.address); } + @action setMnemonicRepeat(value) { + this._mnemonicRepeat = value; + } + @computed get mnemonic() { return this._mnemonic; } diff --git a/src/utils/Validator/index.js b/src/utils/Validator/index.js index 3e9573e9..05e3daf1 100644 --- a/src/utils/Validator/index.js +++ b/src/utils/Validator/index.js @@ -1,7 +1,6 @@ import validatorjs from 'validatorjs'; import i18n from 'i18next'; - validatorjs.prototype.setAttributeNames = function setAttributeNames(attributes) { if (!attributes) return; const modified = { ...attributes }; @@ -11,7 +10,6 @@ validatorjs.prototype.setAttributeNames = function setAttributeNames(attributes) modified[attribute] = modified[attribute].toLowerCase(); } this.messages._setAttributeNames(modified); - // eslint-disable-next-line no-console }; const rules = { @@ -28,7 +26,6 @@ const plugins = { dvr: { package: validatorjs, extend: ({ validator }) => { - // eslint-disable-next-line no-console const { language } = i18n; const languages = { RUS: 'ru', diff --git a/src/workers/login.worker.js b/src/workers/login.worker.js deleted file mode 100644 index 2bb2f34e..00000000 --- a/src/workers/login.worker.js +++ /dev/null @@ -1,13 +0,0 @@ -const ejsWallet = require('ethereumjs-wallet'); - -onmessage = async (e) => { - - const { keystore, password } = JSON.parse(e.data); - let privateKey - try { - privateKey = await ejsWallet.fromV3(keystore, password).getPrivateKeyString(); - self.postMessage({privateKey: privateKey, error: null}); - } catch (error) { - self.postMessage({error:'error', privateKey: null}); - } -} \ No newline at end of file From 2219f73e1adb87d17c6cbc310dde4541efabe7c0 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 11:35:43 +0700 Subject: [PATCH 168/219] created method subscribeTxReceipt --- .../CreateNewProjectWithoutTokens/index.js | 23 +++++------- src/components/ProjectUploading/index.js | 35 +++++++++---------- .../ContractService/ContractService.js | 20 +++-------- src/services/Web3Service/Web3Service.js | 31 +++++++++++++--- src/stores/AppStore/AppStore.js | 4 +-- 5 files changed, 59 insertions(+), 54 deletions(-) diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index fcae9317..175dd310 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -86,20 +86,15 @@ class CreateNewProjectWithoutTokens extends Component { if (!(data instanceof Error)) { userStore.checkBalance(userStore.address).then((balance) => { if (balance > 0.5) { - appStore.deployContract('ERC20', deployArgs, password).then((hash) => { - const interval = setInterval(() => { - appStore.checkReceipt(hash).then((receipt) => { - if (receipt) { - this.setState({ - currentStep: steps.tokenCreated, - }); - appStore.setDeployArgs([receipt.contractAddress]); - clearInterval(interval); - } - }).catch(() => { appStore.displayAlert(t('errors:hostUnreachable'), 3000); }); - }, 5000); - }); - resolve(); + appStore.deployContract('ERC20', deployArgs, password) + .then((txHash) => appStore.checkReceipt(txHash)) + .then((receipt) => { + this.setState({ + currentStep: steps.tokenCreated, + }); + appStore.setDeployArgs([receipt.contractAddress]); + resolve(); + }); } else { this.setState({ currentStep: steps.token, diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index ce703104..8e60f797 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -48,29 +48,28 @@ class ProjectUploading extends Component { this.setState({ step: steps.sending, }); + appStore.deployContract('project', deployArgs, password) .then((txHash) => { this.setState({ step: steps.receipt, }); - const interval = setInterval(() => { - appStore.checkReceipt(txHash).then((receipt) => { - if (receipt) { - this.setState({ - step: steps.questions, - address: receipt.contractAddress, - }); - appStore.addProjectToList({ name, address: receipt.contractAddress }); - clearInterval(interval); - appStore.deployQuestions(receipt.contractAddress).then(() => { - this.setState({ - uploading: false, - }); - }); - } - }).catch(() => { appStore.displayAlert(t('errors:hostUnreachable'), 3000); }); - }, 2000); - }); + return appStore.checkReceipt(txHash); + }) + .then((receipt) => { + if (receipt) { + this.setState({ + step: steps.questions, + address: receipt.contractAddress, + }); + appStore.addProjectToList({ name, address: receipt.contractAddress }); + appStore.deployQuestions(receipt.contractAddress).then(() => { + this.setState({ + uploading: false, + }); + }); + } + }).catch(() => { appStore.displayAlert(t('errors:hostUnreachable'), 3000); }); } render() { diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index d2be7298..c42e864d 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -128,13 +128,10 @@ class ContractService { }; return new Promise((resolve) => { - Web3Service.createTxData(address, tx, maxGasPrice).then((formedTx) => { - userStore.singTransaction(formedTx, password).then((signedTx) => { - Web3Service.sendSignedTransaction(`0x${signedTx}`).then((txHash) => { - resolve(txHash); - }); - }); - }); + Web3Service.createTxData(address, tx, maxGasPrice) + .then((formedTx) => userStore.singTransaction(formedTx, password)) + .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) + .then((txHash) => resolve(txHash)); }); } @@ -234,14 +231,7 @@ class ContractService { .then((formedTx) => userStore.singTransaction(formedTx, password)) .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) .then((txHash) => { - const interval = setInterval(() => { - web3.eth.getTransactionReceipt(txHash).then((receipt) => { - if (receipt) { - clearInterval(interval); - Promise.resolve(); - } - }); - }, 5000); + Web3Service.subscribeTxReceipt(txHash); }); }); } diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 5618e11e..8995e79d 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -32,16 +32,18 @@ class web3Service { return this.getGasPrice() .then((gasPrice) => { transaction.gasPrice = new BN(gasPrice).lte(new BN(maxGasPrice)) - ? gasPrice + ? maxGasPrice : maxGasPrice; - return Promise.resolve(gas); + return Promise.resolve(transaction.gasPrice); }) .catch(Promise.reject); }) // eslint-disable-next-line no-unused-vars - .then((gasPrice) => ( - { ...transaction, gasPrice } - )) + .then((gasPrice) => { + // eslint-disable-next-line no-console + console.log(gasPrice); + return { ...transaction, gasPrice }; + }) .catch((err) => Promise.reject(err)); } @@ -67,5 +69,24 @@ class web3Service { }); }); } + + /** + * checking transaction receipt by hash every 5 seconds + * @param {string} txHash hash of transaction + * @return {Promise} Promise which resolves on successful receipt fetching + */ + subscribeTxReceipt(txHash) { + const { web3 } = this; + return new Promise((resolve) => { + const interval = setInterval(() => { + web3.eth.getTransactionReceipt(txHash).then((receipt) => { + if (receipt) { + clearInterval(interval); + resolve(receipt); + } + }); + }, 5000); + }); + } } export default web3Service; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 93daa70c..62ad3703 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -144,8 +144,8 @@ class AppStore { } @action checkReceipt(hash) { - const { Web3Service: { web3 } } = this.rootStore; - return web3.eth.getTransactionReceipt(hash); + const { Web3Service } = this.rootStore; + return Web3Service.subscribeTxReceipt(hash); } @action displayAlert(text, timeOut) { From ad94ecc16ebdee9377792c389e812d2eabaf16a4 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 14:05:58 +0700 Subject: [PATCH 169/219] Icons now separated --- src/components/Icons/entities/AddIcon.js | 11 + src/components/Icons/entities/AddressIcon.js | 13 + src/components/Icons/entities/BackIcon.js | 8 + src/components/Icons/entities/ChainIcon.js | 10 + src/components/Icons/entities/CloseIcon.js | 9 + .../Icons/entities/CompilingIcon.js | 33 ++ .../Icons/entities/CreateTokenIcon.js | 16 + .../Icons/entities/CreditCardIcon.js | 9 + .../Icons/entities/CrossedEyeIcon.js | 17 + .../Icons/entities/DropdownArrowIcon.js | 8 + src/components/Icons/entities/EthereumIcon.js | 10 + src/components/Icons/entities/EyeIcon.js | 10 + src/components/Icons/entities/InfoIcon.js | 11 + src/components/Icons/entities/LoginIcon.js | 10 + src/components/Icons/entities/PasswordIcon.js | 9 + .../Icons/entities/QuestionUploadingIcon.js | 23 ++ src/components/Icons/entities/SendingIcon.js | 37 ++ src/components/Icons/entities/StatsIcon.js | 17 + .../Icons/entities/TokenCountIcon.js | 11 + .../Icons/entities/TokenNameIcon.js | 9 + .../Icons/entities/TokenSymbolIcon.js | 9 + src/components/Icons/entities/TxHashIcon.js | 38 ++ .../Icons/entities/TxRecieptIcon.js | 59 +++ src/components/Icons/index.js | 374 +++--------------- src/services/Web3Service/Web3Service.js | 5 - 25 files changed, 437 insertions(+), 329 deletions(-) create mode 100644 src/components/Icons/entities/AddIcon.js create mode 100644 src/components/Icons/entities/AddressIcon.js create mode 100644 src/components/Icons/entities/BackIcon.js create mode 100644 src/components/Icons/entities/ChainIcon.js create mode 100644 src/components/Icons/entities/CloseIcon.js create mode 100644 src/components/Icons/entities/CompilingIcon.js create mode 100644 src/components/Icons/entities/CreateTokenIcon.js create mode 100644 src/components/Icons/entities/CreditCardIcon.js create mode 100644 src/components/Icons/entities/CrossedEyeIcon.js create mode 100644 src/components/Icons/entities/DropdownArrowIcon.js create mode 100644 src/components/Icons/entities/EthereumIcon.js create mode 100644 src/components/Icons/entities/EyeIcon.js create mode 100644 src/components/Icons/entities/InfoIcon.js create mode 100644 src/components/Icons/entities/LoginIcon.js create mode 100644 src/components/Icons/entities/PasswordIcon.js create mode 100644 src/components/Icons/entities/QuestionUploadingIcon.js create mode 100644 src/components/Icons/entities/SendingIcon.js create mode 100644 src/components/Icons/entities/StatsIcon.js create mode 100644 src/components/Icons/entities/TokenCountIcon.js create mode 100644 src/components/Icons/entities/TokenNameIcon.js create mode 100644 src/components/Icons/entities/TokenSymbolIcon.js create mode 100644 src/components/Icons/entities/TxHashIcon.js create mode 100644 src/components/Icons/entities/TxRecieptIcon.js diff --git a/src/components/Icons/entities/AddIcon.js b/src/components/Icons/entities/AddIcon.js new file mode 100644 index 00000000..fb47c014 --- /dev/null +++ b/src/components/Icons/entities/AddIcon.js @@ -0,0 +1,11 @@ +import React from 'react'; + + +const AddIcon = () => ( + + + + +); + +export default AddIcon; diff --git a/src/components/Icons/entities/AddressIcon.js b/src/components/Icons/entities/AddressIcon.js new file mode 100644 index 00000000..a785e489 --- /dev/null +++ b/src/components/Icons/entities/AddressIcon.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const Address = () => ( + + + + + + + +); + +export default Address; diff --git a/src/components/Icons/entities/BackIcon.js b/src/components/Icons/entities/BackIcon.js new file mode 100644 index 00000000..1e888898 --- /dev/null +++ b/src/components/Icons/entities/BackIcon.js @@ -0,0 +1,8 @@ +import React from 'react'; + +const BackIcon = () => ( + + + +); +export default BackIcon; diff --git a/src/components/Icons/entities/ChainIcon.js b/src/components/Icons/entities/ChainIcon.js new file mode 100644 index 00000000..1fd2590b --- /dev/null +++ b/src/components/Icons/entities/ChainIcon.js @@ -0,0 +1,10 @@ +import React from 'react'; + +const ChainIcon = () => ( + + + + +); + +export default ChainIcon; diff --git a/src/components/Icons/entities/CloseIcon.js b/src/components/Icons/entities/CloseIcon.js new file mode 100644 index 00000000..9a1193d3 --- /dev/null +++ b/src/components/Icons/entities/CloseIcon.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const CloseIcon = () => ( + + + + +); +export default CloseIcon; diff --git a/src/components/Icons/entities/CompilingIcon.js b/src/components/Icons/entities/CompilingIcon.js new file mode 100644 index 00000000..5180e098 --- /dev/null +++ b/src/components/Icons/entities/CompilingIcon.js @@ -0,0 +1,33 @@ +import React from 'react'; + +const CompilingIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export default CompilingIcon; diff --git a/src/components/Icons/entities/CreateTokenIcon.js b/src/components/Icons/entities/CreateTokenIcon.js new file mode 100644 index 00000000..a86dc17b --- /dev/null +++ b/src/components/Icons/entities/CreateTokenIcon.js @@ -0,0 +1,16 @@ +import React from 'react'; + +const CreateToken = () => ( + + + + + + + + + + + +); +export default CreateToken; diff --git a/src/components/Icons/entities/CreditCardIcon.js b/src/components/Icons/entities/CreditCardIcon.js new file mode 100644 index 00000000..07fbadda --- /dev/null +++ b/src/components/Icons/entities/CreditCardIcon.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const CreditCard = () => ( + + + + +); +export default CreditCard; diff --git a/src/components/Icons/entities/CrossedEyeIcon.js b/src/components/Icons/entities/CrossedEyeIcon.js new file mode 100644 index 00000000..04080bba --- /dev/null +++ b/src/components/Icons/entities/CrossedEyeIcon.js @@ -0,0 +1,17 @@ +import React from 'react'; + + +const CrossedEyeIcon = () => ( + + + + + + + + + + + +); +export default CrossedEyeIcon; diff --git a/src/components/Icons/entities/DropdownArrowIcon.js b/src/components/Icons/entities/DropdownArrowIcon.js new file mode 100644 index 00000000..ce04565a --- /dev/null +++ b/src/components/Icons/entities/DropdownArrowIcon.js @@ -0,0 +1,8 @@ +import React from 'react'; + +const DropdownArrow = () => ( + + + +); +export default DropdownArrow; diff --git a/src/components/Icons/entities/EthereumIcon.js b/src/components/Icons/entities/EthereumIcon.js new file mode 100644 index 00000000..33ccf53c --- /dev/null +++ b/src/components/Icons/entities/EthereumIcon.js @@ -0,0 +1,10 @@ +import React from 'react'; + +const Ethereum = () => ( + + + + +); + +export default Ethereum; diff --git a/src/components/Icons/entities/EyeIcon.js b/src/components/Icons/entities/EyeIcon.js new file mode 100644 index 00000000..5b8e1c4b --- /dev/null +++ b/src/components/Icons/entities/EyeIcon.js @@ -0,0 +1,10 @@ +import React from 'react'; + +const EyeIcon = () => ( + + + + +); + +export default EyeIcon; diff --git a/src/components/Icons/entities/InfoIcon.js b/src/components/Icons/entities/InfoIcon.js new file mode 100644 index 00000000..918e136c --- /dev/null +++ b/src/components/Icons/entities/InfoIcon.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const IconInfo = () => ( + + + + + +); + +export default IconInfo; diff --git a/src/components/Icons/entities/LoginIcon.js b/src/components/Icons/entities/LoginIcon.js new file mode 100644 index 00000000..c3421fb7 --- /dev/null +++ b/src/components/Icons/entities/LoginIcon.js @@ -0,0 +1,10 @@ +import React from 'react'; + +const Login = () => ( + + + + + +); +export default Login; diff --git a/src/components/Icons/entities/PasswordIcon.js b/src/components/Icons/entities/PasswordIcon.js new file mode 100644 index 00000000..975f4599 --- /dev/null +++ b/src/components/Icons/entities/PasswordIcon.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const Password = () => ( + + + +); + +export default Password; diff --git a/src/components/Icons/entities/QuestionUploadingIcon.js b/src/components/Icons/entities/QuestionUploadingIcon.js new file mode 100644 index 00000000..67b431af --- /dev/null +++ b/src/components/Icons/entities/QuestionUploadingIcon.js @@ -0,0 +1,23 @@ +import React from 'react'; + +const QuestionUploadingIcon = () => ( + + + + + + + + + + + + + + + + + + +); +export default QuestionUploadingIcon; diff --git a/src/components/Icons/entities/SendingIcon.js b/src/components/Icons/entities/SendingIcon.js new file mode 100644 index 00000000..c6ab16a2 --- /dev/null +++ b/src/components/Icons/entities/SendingIcon.js @@ -0,0 +1,37 @@ +import React from 'react'; + +const SendingIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export default SendingIcon; diff --git a/src/components/Icons/entities/StatsIcon.js b/src/components/Icons/entities/StatsIcon.js new file mode 100644 index 00000000..22cbe455 --- /dev/null +++ b/src/components/Icons/entities/StatsIcon.js @@ -0,0 +1,17 @@ +import React from 'react'; + +const Stats = () => ( + + + + + + + + + + + +); + +export default Stats; diff --git a/src/components/Icons/entities/TokenCountIcon.js b/src/components/Icons/entities/TokenCountIcon.js new file mode 100644 index 00000000..41dbe791 --- /dev/null +++ b/src/components/Icons/entities/TokenCountIcon.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const TokenCount = () => ( + + + + + +); + +export default TokenCount; diff --git a/src/components/Icons/entities/TokenNameIcon.js b/src/components/Icons/entities/TokenNameIcon.js new file mode 100644 index 00000000..94a728d6 --- /dev/null +++ b/src/components/Icons/entities/TokenNameIcon.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const TokenName = () => ( + + + + +); +export default TokenName; diff --git a/src/components/Icons/entities/TokenSymbolIcon.js b/src/components/Icons/entities/TokenSymbolIcon.js new file mode 100644 index 00000000..ff71fbeb --- /dev/null +++ b/src/components/Icons/entities/TokenSymbolIcon.js @@ -0,0 +1,9 @@ +import React from 'react'; + +const TokenSymbol = () => ( + + + +); + +export default TokenSymbol; diff --git a/src/components/Icons/entities/TxHashIcon.js b/src/components/Icons/entities/TxHashIcon.js new file mode 100644 index 00000000..5ea0eb54 --- /dev/null +++ b/src/components/Icons/entities/TxHashIcon.js @@ -0,0 +1,38 @@ +import React from 'react'; + +const TxHashIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); +export default TxHashIcon; diff --git a/src/components/Icons/entities/TxRecieptIcon.js b/src/components/Icons/entities/TxRecieptIcon.js new file mode 100644 index 00000000..e1e0c352 --- /dev/null +++ b/src/components/Icons/entities/TxRecieptIcon.js @@ -0,0 +1,59 @@ +import React from 'react'; + +const TxRecieptIcon = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export default TxRecieptIcon; diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index ffdcfdf6..8c256f69 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -1,324 +1,50 @@ -import React from 'react'; - - -export const AddIcon = () => ( - - - - -); - -export const CrossedEyeIcon = () => ( - - - - - - - - - - - -); -export const EyeIcon = () => ( - - - - -); - -export const BackIcon = () => ( - - - -); - -export const Address = () => ( - - - - - - - -); - -export const CreateToken = () => ( - - - - - - - - - - - -); - -export const Ethereum = () => ( - - - - -); - -export const Login = () => ( - - - - - -); - -export const Password = () => ( - - - -); - -export const Stats = () => ( - - - - - - - - - - - -); - -export const TokenSymbol = () => ( - - - -); - -export const TokenCount = () => ( - - - - - -); - -export const TokenName = () => ( - - - - -); - -export const CreditCard = () => ( - - - - -); -export const DropdownArrow = () => ( - - - -); -export const IconInfo = () => ( - - - - - -); -export const CloseIcon = () => ( - - - - -); -export const ChainIcon = () => ( - - - - -); - - -export const CompilingIcon = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -export const SendingIcon = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -export const TxHashIcon = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -export const TxRecieptIcon = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -export const QuestionUploadingIcon = () => ( - - - - - - - - - - - - - - - - - - -); +import AddIcon from './entities/AddIcon'; +import Address from './entities/AddressIcon'; +import BackIcon from './entities/BackIcon'; +import ChainIcon from './entities/ChainIcon'; +import CloseIcon from './entities/CloseIcon'; +import CompilingIcon from './entities/CompilingIcon'; +import CreateToken from './entities/CreateTokenIcon'; +import CreditCard from './entities/CreditCardIcon'; +import CrossedEyeIcon from './entities/CrossedEyeIcon'; +import DropdownArrow from './entities/DropdownArrowIcon'; +import Ethereum from './entities/EthereumIcon'; +import EyeIcon from './entities/EyeIcon'; +import IconInfo from './entities/InfoIcon'; +import Login from './entities/LoginIcon'; +import Password from './entities/PasswordIcon'; +import QuestionUploadingIcon from './entities/QuestionUploadingIcon'; +import SendingIcon from './entities/SendingIcon'; +import Stats from './entities/StatsIcon'; +import TokenCount from './entities/TokenCountIcon'; +import TokenSymbol from './entities/TokenSymbolIcon'; +import TokenName from './entities/TokenNameIcon'; +import TxHashIcon from './entities/TxHashIcon'; +import TxRecieptIcon from './entities/TxRecieptIcon'; + + +export { + AddIcon, + Address, + BackIcon, + ChainIcon, + CloseIcon, + CompilingIcon, + CreateToken, + CreditCard, + CrossedEyeIcon, + DropdownArrow, + Ethereum, + EyeIcon, + IconInfo, + Login, + Password, + QuestionUploadingIcon, + SendingIcon, + Stats, + TokenCount, + TokenName, + TokenSymbol, + TxHashIcon, + TxRecieptIcon, +}; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 8995e79d..aa300545 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -47,11 +47,6 @@ class web3Service { .catch((err) => Promise.reject(err)); } - getGasPrice() { - const { web3: { eth: { getGasPrice } } } = this; - return getGasPrice(); - } - /** * Sending transaction to contract * @param {string} txData Raw transaction (without 0x) From ba60368f074fe5c9f588712ab341f0b4be9ea009 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 15:38:37 +0700 Subject: [PATCH 170/219] dedicated step indicator --- .../CreateNewProjectWithTokens/index.js | 27 ++--------------- .../CreateNewProjectWithoutTokens/index.js | 27 ++--------------- src/components/StepIndicator/StepIndicator.js | 30 +++++++++++++++++++ src/components/StepIndicator/index.js | 0 4 files changed, 34 insertions(+), 50 deletions(-) create mode 100644 src/components/StepIndicator/StepIndicator.js create mode 100644 src/components/StepIndicator/index.js diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 9521b1e4..b86fb57d 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -12,7 +12,7 @@ import Heading from '../Heading'; import Container from '../Container'; import Loader from '../Loader'; import Input from '../Input'; -import Indicator from '../Indicator'; +import StepIndicator from '../StepIndicator/StepIndicator'; import Explanation from '../Explanation'; import { BackIcon, Address, TokenName, Password, @@ -154,7 +154,7 @@ class CreateNewProjectWithTokens extends Component { return (
- + {this.renderSwitch(currentStep)}
@@ -260,25 +260,6 @@ const InputProjectData = withTranslation()(({ )); -const StepIndicator = withTranslation()(({ t, step, count }) => ( -
-

- {t('other:step')} - - {` ${step} `} - - {t('other:from')} - - {` ${count} `} - -

-

- = 1} /> - = 2} /> - = 3} /> -

-
-)); CreateNewProjectWithTokens.propTypes = { appStore: propTypes.shape({ @@ -315,9 +296,5 @@ InputProjectData.propTypes = { }).isRequired, onClick: propTypes.func.isRequired, }; -StepIndicator.propTypes = { - step: propTypes.number.isRequired, - count: propTypes.number.isRequired, -}; export default CreateNewProjectWithTokens; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 175dd310..750bc51a 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -7,9 +7,8 @@ import { BlackWidestButton, BackButton, BlackWideButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; - +import StepIndicator from '../StepIndicator/StepIndicator'; import Loader from '../Loader'; -import Indicator from '../Indicator'; import Explanation from '../Explanation'; import Input from '../Input'; import { @@ -190,7 +189,7 @@ class CreateNewProjectWithoutTokens extends Component { return (
- + {this.renderSwitch(currentStep)}
@@ -338,24 +337,6 @@ const InputProjectData = withTranslation()(({ )); -const StepIndicator = withTranslation()(({ t, step, count }) => ( -
-

- {t('other:step')} - - {` ${step} `} - - {t('other:from')} - - {` ${count} `} - -

-

- = 1} /> - = 2} /> -

-
-)); CreateNewProjectWithoutTokens.propTypes = { appStore: propTypes.shape({ @@ -393,9 +374,5 @@ InputProjectData.propTypes = { }).isRequired, onClick: propTypes.func.isRequired, }; -StepIndicator.propTypes = { - step: propTypes.number.isRequired, - count: propTypes.number.isRequired, -}; export default CreateNewProjectWithoutTokens; diff --git a/src/components/StepIndicator/StepIndicator.js b/src/components/StepIndicator/StepIndicator.js new file mode 100644 index 00000000..10c2f11e --- /dev/null +++ b/src/components/StepIndicator/StepIndicator.js @@ -0,0 +1,30 @@ +/* eslint-disable no-console */ +import React from 'react'; +import { withTranslation } from 'react-i18next'; +import Indicator from '../Indicator'; + +import styles from '../Login/Login.scss'; + +const StepIndicator = withTranslation()(({ t, currentStep, stepCount }) => { + const arr = new Array(stepCount).fill(''); + return ( +
+

+ {t('other:step')} + + {` ${currentStep} `} + + {t('other:from')} + + {` ${stepCount} `} + +

+

+ {arr.map((item, index) => = index + 1} />)} +

+
+ ); +}); + + +export default StepIndicator; diff --git a/src/components/StepIndicator/index.js b/src/components/StepIndicator/index.js new file mode 100644 index 00000000..e69de29b From d0106e21b527cea43f71472e5345d3be6b7fb6e0 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 16:24:41 +0700 Subject: [PATCH 171/219] Separeted LoadingBlock --- src/components/AddExisitingProject/index.js | 22 +++---- .../CreateNewProjectWithTokens/index.js | 24 ++++---- .../CreateNewProjectWithoutTokens/index.js | 61 +++++++++---------- src/components/Header/index.js | 11 +--- src/components/LangSwitcher/index.js | 9 +-- src/components/LoadingBlock/index.js | 17 ++++++ src/components/Login/index.js | 20 +++--- src/components/StepIndicator/StepIndicator.js | 30 --------- src/components/StepIndicator/index.js | 30 +++++++++ src/stores/AppStore/AppStore.js | 12 ++-- 10 files changed, 120 insertions(+), 116 deletions(-) create mode 100644 src/components/LoadingBlock/index.js delete mode 100644 src/components/StepIndicator/StepIndicator.js diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 23728245..362edb15 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -10,13 +10,13 @@ import { import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Loader from '../Loader'; import Explanation from '../Explanation'; import ConnectProjectForm from '../../stores/FormsStore/ConnectProject'; import Input from '../Input'; import { Address, TokenName, Login, BackIcon, } from '../Icons'; +import LoadingBlock from '../LoadingBlock'; import styles from '../Login/Login.scss'; @@ -90,11 +90,19 @@ class AddExistingProject extends Component { // eslint-disable-next-line class-methods-use-this renderSwitch(step) { const { steps } = this; + const { t } = this.props; switch (step) { case steps.default: return ; case steps.loading: - return ; + return ( + + + {t('headings:projectChecking.heading')} + {t('headings:projectChecking.subheading')} + + + ); case steps.success: return ; default: @@ -156,16 +164,6 @@ const InputBlock = withTranslation()(({ t, form }) => ( )); -const LoadingBlock = withTranslation()(({ t }) => ( - - - {t('headings:projectChecking.heading')} - {t('headings:projectChecking.subheading')} - - - -)); - const MessageBlock = withTranslation()(({ t }) => ( diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index b86fb57d..4e48674a 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -10,9 +10,9 @@ import { import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import Loader from '../Loader'; +import LoadingBlock from '../LoadingBlock'; import Input from '../Input'; -import StepIndicator from '../StepIndicator/StepIndicator'; +import StepIndicator from '../StepIndicator'; import Explanation from '../Explanation'; import { BackIcon, Address, TokenName, Password, @@ -127,12 +127,20 @@ class CreateNewProjectWithTokens extends Component { } renderSwitch(step) { + const { t } = this.props; const { steps } = this; switch (step) { case steps.token: return ; case steps.check: - return ; + return ( + + + {t('headings:checkingTokens.heading')} + {t('headings:checkingTokens.subheading')} + + + ); case steps.tokenChecked: return ; case steps.projectInfo: @@ -187,16 +195,6 @@ const InputTokenAddress = withTranslation()(({ t, form }) => ( )); -const LoadingBlock = withTranslation()(({ t }) => ( - - - {t('headings:checkingTokens.heading')} - {t('headings:checkingTokens.subheading')} - - - -)); - const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t, appStore: { ERC }, onSubmit }) => ( diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 750bc51a..25750f96 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -7,8 +7,8 @@ import { BlackWidestButton, BackButton, BlackWideButton } from '../Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; -import StepIndicator from '../StepIndicator/StepIndicator'; -import Loader from '../Loader'; +import StepIndicator from '../StepIndicator'; +import LoadingBlock from '../LoadingBlock'; import Explanation from '../Explanation'; import Input from '../Input'; import { @@ -83,26 +83,27 @@ class CreateNewProjectWithoutTokens extends Component { userStore.readWallet(password) .then((data) => { if (!(data instanceof Error)) { - userStore.checkBalance(userStore.address).then((balance) => { - if (balance > 0.5) { - appStore.deployContract('ERC20', deployArgs, password) - .then((txHash) => appStore.checkReceipt(txHash)) - .then((receipt) => { - this.setState({ - currentStep: steps.tokenCreated, + userStore.checkBalance(userStore.address) + .then((balance) => { + if (balance > 0.5) { + appStore.deployContract('ERC20', deployArgs, password) + .then((txHash) => appStore.checkReceipt(txHash)) + .then((receipt) => { + this.setState({ + currentStep: steps.tokenCreated, + }); + appStore.setDeployArgs([receipt.contractAddress]); + resolve(); }); - appStore.setDeployArgs([receipt.contractAddress]); - resolve(); + } else { + this.setState({ + currentStep: steps.token, + indicatorStep: 1, }); - } else { - this.setState({ - currentStep: steps.token, - indicatorStep: 1, - }); - appStore.displayAlert(t('errors:lowBalance'), 3000); - reject(); - } - }); + appStore.displayAlert(t('errors:lowBalance'), 3000); + reject(); + } + }); } }).catch(() => { this.setState({ @@ -163,12 +164,20 @@ class CreateNewProjectWithoutTokens extends Component { renderSwitch(step) { + const { t } = this.props; const { steps } = this; switch (step) { case steps.token: return ; case steps.creation: - return ; + return ( + + + {t('headings:tokensCreating.heading')} + {t('headings:tokensCreating.subheading')} + + + ); case steps.tokenCreated: return ; case steps.projectInfo: @@ -271,16 +280,6 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation )))); -const LoadingBlock = withTranslation()(({ t }) => ( - - - {t('headings:tokensCreating.heading')} - {t('headings:tokensCreating.subheading')} - - - -)); - const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => ( diff --git a/src/components/Header/index.js b/src/components/Header/index.js index cfd05348..e38d6664 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -1,5 +1,4 @@ import React from 'react'; -import propTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import Logo from '../Logo'; import HeaderNav from './HeaderNav'; @@ -8,10 +7,10 @@ import User from '../User'; import styles from './Header.scss'; -const Header = inject('userStore')(observer(({ userStore: { authorized, address }, isMenu }) => ( +const Header = inject('userStore', 'appStore')(observer(({ appStore: { inProject }, userStore: { authorized, address } }) => (
- {isMenu ? : ''} + {inProject ? : ''}
@@ -19,10 +18,4 @@ const Header = inject('userStore')(observer(({ userStore: { authorized, address
))); -Header.propTypes = { - isMenu: propTypes.bool, -}; -Header.defaultProps = { - isMenu: false, -}; export default Header; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 84aef8a5..fa6d7213 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -10,8 +10,9 @@ class LangSwitcher extends Component { super(props); this.state = { opened: false, - value: 'RUS', }; + + this.setWrapperRef = this.setWrapperRef.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); } @@ -37,7 +38,6 @@ class LangSwitcher extends Component { selectOption=(e) => { const value = e.target.getAttribute('data-value'); - this.setState({ value }); this.toggleOptions(); i18n.changeLanguage(value); } @@ -55,11 +55,12 @@ class LangSwitcher extends Component { } render() { - const { opened, value } = this.state; + const { opened } = this.state; + const { language } = i18n; return (
- {value} + {language}
Русский (RUS) diff --git a/src/components/LoadingBlock/index.js b/src/components/LoadingBlock/index.js new file mode 100644 index 00000000..98518593 --- /dev/null +++ b/src/components/LoadingBlock/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import FormBlock from '../FormBlock'; +import Loader from '../Loader'; + + +const LoadingBlock = ({ children }) => ( + + {children} + + +); +LoadingBlock.propTypes = { + children: propTypes.node.isRequired, +}; + +export default LoadingBlock; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index bc5403f9..f326f97a 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -12,7 +12,7 @@ import Dropdown from '../Dropdown'; import { CreditCard, Password } from '../Icons'; import Input from '../Input'; import { BlackWidestButton, BorderedLinkButton } from '../Button'; -import Loader from '../Loader'; +import LoadingBlock from '../LoadingBlock'; import LoginForm from '../../stores/FormsStore/LoginForm'; import styles from './Login.scss'; @@ -55,7 +55,14 @@ class Login extends Component { onChange={this.getPassword} /> ) - : + : ( + + + {t('headings:logging.heading')} + {t('headings:logging.subheading')} + + + ) }
@@ -93,15 +100,6 @@ const InputForm = withTranslation()(({ )); -const LoadingBlock = withTranslation()(({ t }) => ( - - - {t('headings:logging.heading')} - {t('headings:logging.subheading')} - - - -)); Login.propTypes = { appStore: propTypes.shape({ diff --git a/src/components/StepIndicator/StepIndicator.js b/src/components/StepIndicator/StepIndicator.js deleted file mode 100644 index 10c2f11e..00000000 --- a/src/components/StepIndicator/StepIndicator.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable no-console */ -import React from 'react'; -import { withTranslation } from 'react-i18next'; -import Indicator from '../Indicator'; - -import styles from '../Login/Login.scss'; - -const StepIndicator = withTranslation()(({ t, currentStep, stepCount }) => { - const arr = new Array(stepCount).fill(''); - return ( -
-

- {t('other:step')} - - {` ${currentStep} `} - - {t('other:from')} - - {` ${stepCount} `} - -

-

- {arr.map((item, index) => = index + 1} />)} -

-
- ); -}); - - -export default StepIndicator; diff --git a/src/components/StepIndicator/index.js b/src/components/StepIndicator/index.js index e69de29b..10c2f11e 100644 --- a/src/components/StepIndicator/index.js +++ b/src/components/StepIndicator/index.js @@ -0,0 +1,30 @@ +/* eslint-disable no-console */ +import React from 'react'; +import { withTranslation } from 'react-i18next'; +import Indicator from '../Indicator'; + +import styles from '../Login/Login.scss'; + +const StepIndicator = withTranslation()(({ t, currentStep, stepCount }) => { + const arr = new Array(stepCount).fill(''); + return ( +
+

+ {t('other:step')} + + {` ${currentStep} `} + + {t('other:from')} + + {` ${stepCount} `} + +

+

+ {arr.map((item, index) => = index + 1} />)} +

+
+ ); +}); + + +export default StepIndicator; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 62ad3703..fd7c0cad 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -19,16 +19,12 @@ class AppStore { @observable name = ''; - @observable alertVisible = false; - - @observable alertText = ''; - - @observable alertTimeout = ''; - @observable uploadedQuestion = 0; @observable countOfQuestions = 0; + @observable userInProject = false; + constructor(rootStore) { this.rootStore = rootStore; this.readWalletList(); @@ -158,6 +154,10 @@ class AppStore { return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); } + @computed get inProject() { + return this.userInProject; + } + @action setProjectName(value) { this.name = value; } From 62eb6d9aeb7f6de2a689df2d3da73ac8f8b34147 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 16:49:16 +0700 Subject: [PATCH 172/219] create wallet using form.loading --- src/components/CreateWallet/index.js | 60 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 403eedb2..0572f2ac 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -18,47 +18,50 @@ import styles from '../Login/Login.scss'; @inject('userStore', 'appStore') @observer class CreateWallet extends Component { + createForm = new CreateWalletForm({ + hooks: { + onSuccess: (form) => { + this.createWallet(form); + }, + onError: () => { + }, + }, + }); + constructor(props) { super(props); this.state = { redirect: false, - loading: false, }; } createWallet = (form) => { const { userStore, recover } = this.props; const values = form.values(); - this.setState({ loading: true }); - if (recover) { - userStore.recoverWallet(values.password).then(() => { - userStore.saveWalletToFile(); - this.setState({ redirect: true }); - }).catch(() => { - this.setState({ loading: false }); - }); - } else { - userStore.createWallet(values.password).then(() => { - this.setState({ redirect: true }); - }).catch(() => { - this.setState({ loading: false }); - }); - } + return new Promise((resolve, reject) => { + if (recover) { + userStore.recoverWallet(values.password).then(() => { + userStore.saveWalletToFile(); + resolve(); + this.setState({ redirect: true }); + }).catch(() => { + reject(); + }); + } else { + userStore.createWallet(values.password).then(() => { + resolve(); + this.setState({ redirect: true }); + }).catch(() => { + reject(); + }); + } + }); } render() { const { recover } = this.props; - const { redirect, loading } = this.state; - const { createWallet } = this; - const createForm = new CreateWalletForm({ - hooks: { - onSuccess(form) { - createWallet(form); - }, - onError() { - }, - }, - }); + const { redirect } = this.state; + const { createForm } = this; if (redirect) { return recover ? : ; @@ -66,11 +69,10 @@ class CreateWallet extends Component { return (
- {!loading + {!createForm.loading ? ( From 14cbff873740ec7fdd6c964469e0e27ca26d0b86 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 17:10:00 +0700 Subject: [PATCH 173/219] seed input using form.loading --- src/components/InputSeed/SeedForm.js | 26 +++----- src/components/InputSeed/index.js | 66 ++++++++++++--------- src/services/WalletService/WalletService.js | 9 +++ 3 files changed, 55 insertions(+), 46 deletions(-) diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index bef3e20f..c4909470 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; -import SeedForm from '../../stores/FormsStore/SeedForm'; import Input from '../Input'; import { BlackWidestButton } from '../Button'; @@ -11,26 +10,16 @@ import styles from '../Login/Login.scss'; class SeedInput extends Component { render() { const { - seed, submit, showError, t, + seed, form, t, } = this.props; - const seedForm = new SeedForm({ - hooks: { - onSuccess(form) { - submit(form); - }, - onError() { - showError(); - }, - }, - }); return ( -
+
{seed.map((word, index) => ( {index + 1} @@ -38,7 +27,7 @@ class SeedInput extends Component { ))}
- + {t('buttons:continue')}
@@ -48,8 +37,11 @@ class SeedInput extends Component { } SeedInput.propTypes = { - submit: propTypes.func.isRequired, - showError: propTypes.func.isRequired, + form: propTypes.shape({ + onSubmit: propTypes.func.isRequired, + loading: propTypes.bool.isRequired, + $: propTypes.func.isRequired, + }).isRequired, seed: propTypes.arrayOf(propTypes.string).isRequired, t: propTypes.func.isRequired, }; diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 46244abd..afd9b6c1 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -9,18 +9,28 @@ import FormBlock from '../FormBlock'; import { BackButton } from '../Button'; import { BackIcon } from '../Icons'; import Loader from '../Loader'; +import SeedForm from '../../stores/FormsStore/SeedForm'; import SeedInput from './SeedForm'; + import styles from '../Login/Login.scss'; @withTranslation() @inject('appStore', 'userStore') @observer class InputSeed extends Component { + seedForm = new SeedForm({ + hooks: { + onSuccess: (form) => this.submitForm(form), + onError: () => { + this.showError(); + }, + }, + }); + constructor(props) { super(props); this.state = { - loading: false, redirect: false, }; } @@ -29,38 +39,36 @@ class InputSeed extends Component { this.setState({ redirect: true }); } - toggleLoading = () => { - const { loading } = this.state; - this.setState({ - loading: !loading, - }); - } submitForm = (form) => { const { userStore, appStore, recover, t, } = this.props; const values = Object.values(form.values()); - userStore.setMemonicRepeat(values); + userStore.setMnemonicRepeat(values); const mnemonic = values.join(' '); - if (userStore.isSeedValid(mnemonic)) { - this.toggleLoading(); - if (recover) { - userStore.recoverWallet(mnemonic) - .then((data) => { - userStore.setEncryptedWallet(data.v3wallet); - userStore.getEthBalance(); + return new Promise((resolve, reject) => { + if (userStore.isSeedValid(mnemonic)) { + if (recover) { + userStore.recoverWallet(mnemonic) + .then((data) => { + userStore.setEncryptedWallet(data.v3wallet); + userStore.getEthBalance(); + this.setRedirect(); + resolve(); + }); + } else if (!recover) { + if (userStore.isSeedValid(mnemonic)) { + userStore.saveWalletToFile(); this.setRedirect(); - }); - } else if (!recover) { - if (userStore.isSeedValid(mnemonic)) { - userStore.saveWalletToFile(); - this.setRedirect(); + resolve(); + } } + } else { + appStore.displayAlert(t('errors:validationError'), 2000); + reject(); } - } else { - appStore.displayAlert(t('errors:validationError'), 2000); - } + }); } showError = () => { @@ -70,7 +78,8 @@ class InputSeed extends Component { render() { const { userStore, recover, t } = this.props; - const { loading, redirect } = this.state; + const { redirect } = this.state; + const { seedForm } = this; if (redirect) return recover ? : ; return ( @@ -78,15 +87,14 @@ class InputSeed extends Component { {t('headings:seedCheck.heading')} - {loading ? t('headings:seedCheck.subheading.0') : t('headings:seedCheck.subheading.1')} + {seedForm.loading ? t('headings:seedCheck.subheading.0') : t('headings:seedCheck.subheading.1')} - {loading + {seedForm.loading ? : ( )} @@ -105,7 +113,7 @@ class InputSeed extends Component { InputSeed.propTypes = { userStore: propTypes.shape({ - setMemonicRepeat: propTypes.func.isRequired, + setMnemonicRepeat: propTypes.func.isRequired, isSeedValid: propTypes.func.isRequired, recoverWallet: propTypes.func.isRequired, setEncryptedWallet: propTypes.func.isRequired, diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 015bc90f..bd245f12 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -66,5 +66,14 @@ class WalletService { return Promise.resolve(worker.send(data)); } return Promise.reject(); } + + /** + * validates mnemonic + * @param {string} mnemonic mnemonic + * @returns {boolean} is mnemonic valid + */ + validateMnemonic(mnemonic) { + return bip39.validateMnemonic(mnemonic); + } } export default WalletService; From d181351009d3e54b6c530ed161b5bec11e3e1e42 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 17:31:18 +0700 Subject: [PATCH 174/219] Lang switcher uses i18next --- src/components/LangSwitcher/index.js | 14 +++++++++++--- src/i18n.js | 4 ++-- src/locales/ENG/other.js | 2 ++ src/locales/RUS/other.js | 2 ++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index fa6d7213..b1cd5daf 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -1,10 +1,12 @@ /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */ import React, { Component } from 'react'; +import { withTranslation } from 'react-i18next'; +import propTypes from 'prop-types'; import i18n from '../../i18n'; - import styles from './LangSwitcher.scss'; +@withTranslation() class LangSwitcher extends Component { constructor(props) { super(props); @@ -56,6 +58,7 @@ class LangSwitcher extends Component { render() { const { opened } = this.state; + const { t } = this.props; const { language } = i18n; return (
@@ -63,12 +66,17 @@ class LangSwitcher extends Component { {language}
- Русский (RUS) - English (ENG) + { + i18n.languages.map((item) => {`${t(`other:${item}`)}(${item})`}) + }
); } } +LangSwitcher.propTypes = { + t: propTypes.func.isRequired, +}; + export default LangSwitcher; diff --git a/src/i18n.js b/src/i18n.js index 908f21c7..45c850cf 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -37,7 +37,7 @@ i18n .use(initReactI18next) // passes i18n down to react-i18next .init({ resources, - fallbackLng: 'ENG', + fallbackLng: ['RUS', 'ENG'], lng: 'RUS', react: { wait: false, @@ -47,5 +47,5 @@ i18n useSuspense: false, }, }); - +window.i18n = i18n; export default i18n; diff --git a/src/locales/ENG/other.js b/src/locales/ENG/other.js index 755f406d..c51597f7 100644 --- a/src/locales/ENG/other.js +++ b/src/locales/ENG/other.js @@ -13,5 +13,7 @@ const other = { count: 'Quantity', withTokens: 'If you have ERC20 tokens', withoutTokens: "If you don't have ERC20 tokens", + RUS: 'Русский', + ENG: 'English', }; export default other; diff --git a/src/locales/RUS/other.js b/src/locales/RUS/other.js index 8e8483c2..fad12ca8 100644 --- a/src/locales/RUS/other.js +++ b/src/locales/RUS/other.js @@ -13,5 +13,7 @@ const other = { count: 'Количество', withTokens: 'Если есть токены ERC20', withoutTokens: 'Если токенов ERC20 нет', + RUS: 'Русский', + ENG: 'English', }; export default other; From 1463bef8887ce21d90a609ca535be4a5296caf68 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 22 Nov 2019 18:23:05 +0700 Subject: [PATCH 175/219] project uploading steps now more accurate --- src/components/ProjectUploading/index.js | 86 ++++++++++-------------- 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 8e60f797..f1615e45 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -86,58 +86,42 @@ class ProjectUploading extends Component { } } -const Progress = withTranslation()(inject('appStore')(observer(({ t, appStore, step }) => ( - - - {t('headings:uploadingProject.heading')} - {t('headings:uploadingProject.subheading')} - -
- - - - - - - - - - - - - - - - {appStore.uploadedQuestion} - {'/'} - {appStore.countOfQuestions} - - -
+const Progress = withTranslation()(inject('appStore')(observer(({ t, appStore, step }) => { + const steps = [ + [t('other:compiling'), ], + [t('other:sending'), ], + [t('other:txHash'), ], + [t('other:txReceipt'), ], + [t('other:questionsUploading'), [ + , + + {appStore.uploadedQuestion} + {'/'} + {appStore.countOfQuestions} + ], + ]]; -
-)))); + + return ( + + + {t('headings:uploadingProject.heading')} + {t('headings:uploadingProject.subheading')} + +
+ {steps.map((item, index) => ( + + {item[1]} + + ))} +
+
+ ); +}))); const AlertBlock = withTranslation()(({ t }) => ( From 024d7f73971afb4aabefcf6dd80ca6aace74ebed Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 25 Nov 2019 17:47:36 +0700 Subject: [PATCH 176/219] Buttons now more customizable --- src/components/AddExisitingProject/index.js | 22 +- src/components/AddNewProject/index.js | 17 +- src/components/Button/Button.js | 67 ++++++ src/components/Button/Button.scss | 191 ++++++++---------- src/components/Button/Button.stories.js | 89 ++++++-- src/components/CreateNewProject/index.js | 17 +- .../CreateNewProjectWithTokens/index.js | 26 +-- .../CreateNewProjectWithoutTokens/index.js | 38 ++-- src/components/CreateWallet/PasswordForm.js | 19 +- src/components/CreationAlert/index.js | 6 +- src/components/DisplayUserInfo/index.js | 6 +- src/components/InputSeed/SeedForm.js | 6 +- src/components/InputSeed/index.js | 6 +- src/components/Login/index.js | 14 +- src/components/ProjectList/index.js | 12 +- src/components/ProjectUploading/index.js | 13 +- src/components/ShowSeed/index.js | 19 +- 17 files changed, 341 insertions(+), 227 deletions(-) create mode 100644 src/components/Button/Button.js diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 362edb15..94b92c66 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -4,9 +4,7 @@ import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; import { withTranslation } from 'react-i18next'; -import { - BlackWidestButton, IconBlackButton, LinkButton, BackButton, -} from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -138,9 +136,9 @@ const InputBlock = withTranslation()(({ t, form }) => (
- +
@@ -156,10 +154,9 @@ const InputBlock = withTranslation()(({ t, form }) => (
- - + )); @@ -170,14 +167,13 @@ const MessageBlock = withTranslation()(({ t }) => ( {t('headings:projectConnected.heading')} {t('headings:projectConnected.subheading')} - - {} + - + )); diff --git a/src/components/AddNewProject/index.js b/src/components/AddNewProject/index.js index d0aecbcc..7d9f75b5 100644 --- a/src/components/AddNewProject/index.js +++ b/src/components/AddNewProject/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { IconWhiteButton, BackButton } from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -23,24 +23,21 @@ const AddNewProject = withTranslation()(({ t }) => (
- - + - - +
- - +
diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js new file mode 100644 index 00000000..a622c851 --- /dev/null +++ b/src/components/Button/Button.js @@ -0,0 +1,67 @@ +import React, { Component } from 'react'; +import propTypes from 'prop-types'; + +import styles from './Button.scss'; + +class Button extends Component { + constructor(props) { + super(props); + this.state = { + + }; + } + + render() { + const { + children, + theme, + size, + type, + disabled, + icon, + iconTop, + onClick, + } = this.props; + return ( + // eslint-disable-next-line react/button-has-type + + ); + } +} + +Button.propTypes = { + children: propTypes.string.isRequired, + icon: propTypes.node, + iconTop: propTypes.bool, + type: propTypes.string, + disabled: propTypes.bool.isRequired, + onClick: propTypes.func.isRequired, + theme: propTypes.string, + size: propTypes.string, +}; + +Button.defaultProps = { + type: 'button', + theme: 'black', + size: 'default', + icon: null, + iconTop: false, +}; + +export default Button; diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index cc1430f3..0d2c227d 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -1,43 +1,49 @@ @import "../../assets/styles/partials/variables"; .btn { - padding: 14px 0; + padding: 14px 10px; + text-align: center; text-decoration: none; border: none; border-radius: 2px; outline: none; cursor: pointer; transition: 0.2s linear; + &>* { + margin: 0; + padding: 0; + } + svg, + &__icon, &__text { vertical-align: middle; } - &[disabled]{ - cursor: default; - opacity: .5; - } + svg { - margin-right: 10px; path, circle { transition: 0.2s; } } - &--big { - width: 140px; - padding: 30px 0; - font-weight: bold; - font-size: 14px; - } - &--default { - min-width: 232px; - padding: 16px 0; - font-size: 12px; - } - &--small { - min-width: 124px; - padding: 5px; + &__icon { + svg { + margin-right: 10px; + } + &--block { + display: block; + text-align: center; + svg { + margin: 0 auto 10px; + } + } } + + &[disabled]{ + cursor: default; + opacity: .5; + } + &--black { color: $white; background-color: $primary; @@ -57,26 +63,7 @@ border-color: $primary; } } - &--link { - padding: 0; - color: $linkColor; - background-color: transparent; - border-bottom: 1px solid $linkColor; - svg { - path { - stroke: $linkColor; - } - } - &:hover { - color: $secondary; - border-color: $secondary; - svg { - path { - stroke: $secondary; - } - } - } - } + &--white { color: $primary; background-color: $white; @@ -116,84 +103,80 @@ } } } - &--dashed { - color: $grey; - border-style: dashed; - border-radius: 0; - - &:hover { - color: $primary; - } - &:active { - color: $white; - } - } - &--add-project{ - .btn__content{ - display: table; - line-height: 15px; - text-align: center; - &>* { - display: table-cell; - } - &>.btn__text { - max-width: 65px; - text-align: left; - } - } - } - &--noborder { - border: none; - } - &--show-seed { - display: inline-block; - padding: 15px; + + &--link { + padding: 0; + color: $linkColor; + background-color: transparent; + border-bottom: 1px solid $linkColor; svg { - path{ - fill: $white; - } - } - .btn__content { - display: inline-block; - &>* { - display: unset; + path { + stroke: $linkColor; } } &:hover { + color: $secondary; + border-color: $secondary; svg { - path{ - fill: $white; - stroke: $primary; + path { + stroke: $secondary; } } } - &:active { - svg { - path{ - fill: $primary; - stroke: $white; - } + } + + &--project { + @extend .btn--white; + width: 145px; + height: 85px; + padding: 10px 10px; + font-weight: 700; + font-size: 14px; + } + + &--addproject { + @extend .btn--project; + color: $border; + font-weight: 400; + border-style: dashed; + border-radius: 0; + .btn__content { + display: flex; + flex-flow: row nowrap; + align-items: center; + .btn__icon { + flex-grow:1; + } + .btn__text { + flex-grow: 1; + width: 50px; + text-align: left; } } + &:hover { + color: $primary; + } } - &--310{ - max-width: 310px; + + &--showseed { + @extend .btn--white; } - &--240{ - max-width: 240px; + + &--back { + @extend .btn--link; + border: none; } - &--project { - padding: 30px 10px; - .btn__text{ - font-weight: 700; - } + + &--block { + display: block; + width: 100%; + } + &--240 { + width: 240px; + } + &--310 { + width: 310px; } - &--back { - position: absolute; - bottom: -62px; - left: 50%; - transform: translateX(-50%); - } } .icon--top{ svg { diff --git a/src/components/Button/Button.stories.js b/src/components/Button/Button.stories.js index c7d11d88..14fc0238 100644 --- a/src/components/Button/Button.stories.js +++ b/src/components/Button/Button.stories.js @@ -1,25 +1,80 @@ import React from 'react'; -import { Button, IconButton } from './index'; -import { AddIcon, BackIcon } from '../Icons'; +import Button from './Button'; +import { BackIcon, AddIcon, EyeIcon } from '../Icons'; export default { title: 'Button' }; -export const Black = () => ; -export const White = () => ; -export const Small = () => ; +export const defaultButton = () => ( + +); + +export const whiteButton = () => ( + +); + +export const iconButton = () => ( + +); + +export const iconTopButton = () => ( + +); -export const WhiteDashed = () => ( - - - Отправить - +export const linkButton = () => ( + ); -export const linkButton = () => ; -export const arrowButton = () => ( - - - Назад - -) \ No newline at end of file +export const BackButton = () => ( + +); + +export const addProjectButton = () => ( + +); + +export const projectButton = () => ( + +); + +export const showSeed = () => ( + +); diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index a8d9d48b..bd74314e 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -3,7 +3,7 @@ import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { observer } from 'mobx-react'; import { withTranslation } from 'react-i18next'; -import { IconTopWhiteButton, BackButton } from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -27,25 +27,22 @@ class CreateNewProject extends Component {
{t('other:withTokens')} - - + {t('other:withoutTokens')} - - +
- - +
diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 4e48674a..377fe42a 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -4,9 +4,7 @@ import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { - BlackWidestButton, BackButton, -} from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -181,15 +179,14 @@ const InputTokenAddress = withTranslation()(({ t, form }) => (
- +
- - + @@ -211,9 +208,9 @@ const ContractConfirmation = inject('appStore')(observer(withTranslation()(({ t,

{`${ERC.totalSupply} ${ERC.symbol}`}

- { onSubmit(); }}> +
@@ -239,9 +236,9 @@ const InputProjectData = withTranslation()(({
- +
@@ -250,10 +247,9 @@ const InputProjectData = withTranslation()(({

- - + )); diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 25750f96..a1a42a9f 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -3,7 +3,7 @@ import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; import { NavLink, Redirect } from 'react-router-dom'; import { withTranslation } from 'react-i18next'; -import { BlackWidestButton, BackButton, BlackWideButton } from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -254,9 +254,14 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- +
@@ -271,10 +276,9 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation
- - + @@ -288,9 +292,14 @@ const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => (
- +
@@ -317,9 +326,9 @@ const InputProjectData = withTranslation()(({
- +
@@ -328,10 +337,13 @@ const InputProjectData = withTranslation()(({

- - + )); diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index e559baec..d5d7b881 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -6,7 +6,7 @@ import FormBlock from '../FormBlock'; import Heading from '../Heading'; import { Password, BackIcon } from '../Icons'; import Input from '../Input'; -import { IconButton, BlackWidestButton } from '../Button'; +import Button from '../Button/Button'; import Explanation from '../Explanation'; import Indicator from '../Indicator'; import passwordValidation from '../../utils/PasswordValidation'; @@ -49,9 +49,14 @@ class PasswordForm extends Component {
- +
@@ -84,10 +89,12 @@ class PasswordForm extends Component {
- - + diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 32991d49..75ed8956 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import { inject, observer } from 'mobx-react'; import Container from '../Container'; import FormBlock from '../FormBlock'; -import { BlackWidestButton } from '../Button'; +import Button from '../Button/Button'; import Heading from '../Heading'; import styles from '../Login/Login.scss'; @@ -42,9 +42,9 @@ const CreationAlert = withTranslation()(({ t, success = false, recover = false } - +
diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 83f9bf23..98765101 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -5,7 +5,7 @@ import { withTranslation } from 'react-i18next'; import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; -import { BlackWidestButton } from '../Button'; +import Button from '../Button/Button'; import styles from '../Login/Login.scss'; @@ -35,9 +35,9 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use
- +
diff --git a/src/components/InputSeed/SeedForm.js b/src/components/InputSeed/SeedForm.js index c4909470..f390f8c2 100644 --- a/src/components/InputSeed/SeedForm.js +++ b/src/components/InputSeed/SeedForm.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import Input from '../Input'; -import { BlackWidestButton } from '../Button'; +import Button from '../Button/Button'; import styles from '../Login/Login.scss'; @@ -27,9 +27,9 @@ class SeedInput extends Component { ))}
- +
); diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index afd9b6c1..8dada7c9 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import Container from '../Container'; import Heading from '../Heading'; import FormBlock from '../FormBlock'; -import { BackButton } from '../Button'; +import Button from '../Button/Button'; import { BackIcon } from '../Icons'; import Loader from '../Loader'; import SeedForm from '../../stores/FormsStore/SeedForm'; @@ -99,10 +99,10 @@ class InputSeed extends Component { )} - +
diff --git a/src/components/Login/index.js b/src/components/Login/index.js index f326f97a..7c3d249d 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -11,7 +11,7 @@ import Heading from '../Heading'; import Dropdown from '../Dropdown'; import { CreditCard, Password } from '../Icons'; import Input from '../Input'; -import { BlackWidestButton, BorderedLinkButton } from '../Button'; +import Button from '../Button/Button'; import LoadingBlock from '../LoadingBlock'; import LoginForm from '../../stores/FormsStore/LoginForm'; @@ -86,14 +86,18 @@ const InputForm = withTranslation()(({
- + - {t('buttons:newWallet')} + - {t('buttons:forgotPassword')} +
diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 6beb4199..94329d4a 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -3,7 +3,7 @@ import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { inject, observer } from 'mobx-react'; import { withTranslation } from 'react-i18next'; -import { ProjectButton, AddProjectButton } from '../Button'; +import Button from '../Button/Button'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Container from '../Container'; @@ -28,11 +28,12 @@ class ProjectList extends Component { render() { const { appStore: { projectList }, t } = this.props; const projects = projectList.map((project, index) => ( - {project.name.replace(/([!@#$%^&*()_+\-=])+/g, ' ')} - + )); return ( @@ -46,10 +47,9 @@ class ProjectList extends Component { {' '} {projects} - - +
diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index f1615e45..ebe358ae 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -13,9 +13,7 @@ import ProgressBlock from './ProgressBlock'; import { CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, Login, } from '../Icons'; -import { - IconBlackButton, LinkButton, -} from '../Button'; +import Button from '../Button'; import styles from '../Login/Login.scss'; @@ -133,14 +131,13 @@ const AlertBlock = withTranslation()(({ t }) => ( {t('headings:projectCreated.subheading.1')} - - {} + - + )); diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index 05bce657..c061a420 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -9,7 +9,7 @@ import Container from '../Container'; import FormBlock from '../FormBlock'; import Heading from '../Heading'; import Explanation from '../Explanation'; -import { BlackWidestButton, SeedToggleButton, BackButton } from '../Button'; +import Button from '../Button/Button'; import { BackIcon, EyeIcon, CrossedEyeIcon } from '../Icons'; import styles from '../Login/Login.scss'; @@ -54,27 +54,30 @@ class ShowSeed extends Component {
- +
- +

{t('explanations:seed.0')}

{t('explanations:seed.1')}

- - {!visible ? : } +
From d492a5e67e056711a2c9a94f2a2f6ff333506dfd Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 09:41:57 +0700 Subject: [PATCH 177/219] returned getGasPrice function --- src/services/ContractService/ContractService.js | 9 +++++---- src/services/Web3Service/Web3Service.js | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index c42e864d..e79fb840 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -38,14 +38,14 @@ class ContractService { * @returns {object} contains type of compiled contract, his bytecode and abi for deploying */ compileContract(type) { - this.combineContract(type); return new Promise((resolve, reject) => { window.BrowserSolc.getVersions((sources, releases) => { const version = releases['0.4.24']; const questions = fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8'); - const contract = type === 'ERC20' - ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, './output.sol'), 'utf8') - : fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter/output.sol'), 'utf8'); + /* const contract = type === 'ERC20' + ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, './output.sol'), 'utf8') + : fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter/output.sol'), 'utf8'); */ + const contract = this.combineContract(type); const contractName = type === 'ERC20' ? ':ERC20' : ':Voter'; @@ -98,6 +98,7 @@ class ContractService { mainContract = mainContract.replace(SOL_VERSION_REGEXP, compiler); mainContract = mainContract.replace(new RegExp(/(calldata)/g), ''); fs.writeFileSync(path.join(PATH_TO_CONTRACTS, `${dir}output.sol`), mainContract, 'utf8'); + return mainContract; } /** diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index aa300545..8995e79d 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -47,6 +47,11 @@ class web3Service { .catch((err) => Promise.reject(err)); } + getGasPrice() { + const { web3: { eth: { getGasPrice } } } = this; + return getGasPrice(); + } + /** * Sending transaction to contract * @param {string} txData Raw transaction (without 0x) From 5e2815c34483c1dc7258592987c41188c3be9701 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 09:54:26 +0700 Subject: [PATCH 178/219] removed extra lines --- src/assets/styles/style.scss | 1 - src/components/AddExisitingProject/index.js | 2 -- src/components/Button/index.js | 3 --- src/components/CreateNewProject/index.js | 1 - src/components/CreateNewProjectWithTokens/index.js | 1 - src/components/CreateNewProjectWithoutTokens/index.js | 5 ----- src/components/CreateWallet/index.js | 1 - src/components/Dropdown/index.js | 5 ----- src/components/Hint/index.js | 2 +- src/components/Icons/entities/AddIcon.js | 1 - src/components/Icons/entities/CrossedEyeIcon.js | 2 +- src/components/Icons/index.js | 1 - src/components/InputSeed/index.js | 3 --- src/components/LangSwitcher/index.js | 1 - src/components/LoadingBlock/index.js | 1 - src/components/Login/Login.scss | 1 - src/components/Login/index.js | 1 - src/components/Logo/Logo.scss | 2 -- src/components/ProjectUploading/index.js | 1 - src/components/Router/SimpleRouter.js | 1 - src/components/ShowSeed/index.js | 1 - src/components/StepIndicator/index.js | 1 - src/electron.js | 2 -- src/i18n.js | 1 - src/services/ContractService/ContractService.js | 2 -- src/services/WalletService/WalletService.js | 1 - src/services/Web3Service/Web3Service.js | 4 ++++ src/stores/AppStore/AppStore.js | 1 - src/stores/ProjectStore/ProjectStore.js | 1 - src/stores/QuestionStore/QuestionStore.js | 1 - src/stores/UsergroupStore/UsergroupStore.js | 1 - src/utils/Validator/index.js | 1 - src/workers/wallet.worker.js | 1 - 33 files changed, 6 insertions(+), 48 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 41a6ecba..7782da00 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -23,7 +23,6 @@ svg { height: 18px; } - ::-webkit-scrollbar-thumb { border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 94b92c66..d052925d 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -110,14 +110,12 @@ class AddExistingProject extends Component { render() { const { currentStep } = this.state; - return (
{this.renderSwitch(currentStep)}
- ); } } diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 651c4ead..7780473b 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -36,7 +36,6 @@ Button.defaultProps = { onClick: () => false, }; - export const BlackButton = ({ children, type, disabled, onClick, }) => ( @@ -62,7 +61,6 @@ BlackButton.defaultProps = { onClick: () => false, }; - export const BlackWideButton = ({ children, type, disabled, onClick, }) => ( @@ -140,7 +138,6 @@ WhiteButton.defaultProps = { onClick: () => false, }; - export const LinkButton = ({ children, type, disabled, onClick, }) => ( diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index bd74314e..4c3c8ca0 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -54,5 +54,4 @@ CreateNewProject.propTypes = { t: propTypes.func.isRequired, }; - export default CreateNewProject; diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index 377fe42a..ddd5a62d 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -254,7 +254,6 @@ const InputProjectData = withTranslation()(({ )); - CreateNewProjectWithTokens.propTypes = { appStore: propTypes.shape({ checkErc: propTypes.func.isRequired, diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index a1a42a9f..5bc6d6c6 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -52,7 +52,6 @@ class CreateNewProjectWithoutTokens extends Component { projectInfo: 4, } - constructor(props) { super(props); this.state = { @@ -61,7 +60,6 @@ class CreateNewProjectWithoutTokens extends Component { }; } - returnToContractConnecting = () => { const { steps } = this; this.setState({ @@ -129,7 +127,6 @@ class CreateNewProjectWithoutTokens extends Component { }); } - gotoUploading = (form) => { const { steps } = this; const { userStore, appStore, t } = this.props; @@ -162,7 +159,6 @@ class CreateNewProjectWithoutTokens extends Component { }); } - renderSwitch(step) { const { t } = this.props; const { steps } = this; @@ -348,7 +344,6 @@ const InputProjectData = withTranslation()(({ )); - CreateNewProjectWithoutTokens.propTypes = { appStore: propTypes.shape({ deployContract: propTypes.func.isRequired, diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 0572f2ac..97e62579 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -107,5 +107,4 @@ CreateWallet.propTypes = { recover: propTypes.bool.isRequired, }; - export default withTranslation()(CreateWallet); diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 45b5daea..e44fa93d 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -28,7 +28,6 @@ class Dropdown extends Component { this.wrapperRef = node; } - toggleOptions = () => { const { opened } = this.state; this.setState({ opened: !opened }); @@ -38,7 +37,6 @@ class Dropdown extends Component { this.setState({ opened: false }); } - handleSelect = (selected) => { const { onSelect, field } = this.props; this.setState({ @@ -50,14 +48,12 @@ class Dropdown extends Component { this.toggleOptions(); } - handleClickOutside(event) { if (this.wrapperRef && !this.wrapperRef.contains(event.target)) { this.closeOptions(); } } - render() { const { children, options, field, subOptions, @@ -75,7 +71,6 @@ class Dropdown extends Component { )); // eslint-disable-next-line no-console - return (
diff --git a/src/components/Hint/index.js b/src/components/Hint/index.js index 3ad2182d..e55184fa 100644 --- a/src/components/Hint/index.js +++ b/src/components/Hint/index.js @@ -1,7 +1,7 @@ import React from 'react'; import propTypes from 'prop-types'; -import styles from './Hint.scss'; +import styles from './Hint.scss'; const Hint = ({ children }) => (
diff --git a/src/components/Icons/entities/AddIcon.js b/src/components/Icons/entities/AddIcon.js index fb47c014..8fa487dd 100644 --- a/src/components/Icons/entities/AddIcon.js +++ b/src/components/Icons/entities/AddIcon.js @@ -1,6 +1,5 @@ import React from 'react'; - const AddIcon = () => ( diff --git a/src/components/Icons/entities/CrossedEyeIcon.js b/src/components/Icons/entities/CrossedEyeIcon.js index 04080bba..96dc22df 100644 --- a/src/components/Icons/entities/CrossedEyeIcon.js +++ b/src/components/Icons/entities/CrossedEyeIcon.js @@ -1,6 +1,5 @@ import React from 'react'; - const CrossedEyeIcon = () => ( @@ -14,4 +13,5 @@ const CrossedEyeIcon = () => ( ); + export default CrossedEyeIcon; diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js index 8c256f69..290eb262 100644 --- a/src/components/Icons/index.js +++ b/src/components/Icons/index.js @@ -22,7 +22,6 @@ import TokenName from './entities/TokenNameIcon'; import TxHashIcon from './entities/TxHashIcon'; import TxRecieptIcon from './entities/TxRecieptIcon'; - export { AddIcon, Address, diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index 8dada7c9..c303495d 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -12,7 +12,6 @@ import Loader from '../Loader'; import SeedForm from '../../stores/FormsStore/SeedForm'; import SeedInput from './SeedForm'; - import styles from '../Login/Login.scss'; @withTranslation() @@ -39,7 +38,6 @@ class InputSeed extends Component { this.setState({ redirect: true }); } - submitForm = (form) => { const { userStore, appStore, recover, t, @@ -110,7 +108,6 @@ class InputSeed extends Component { } } - InputSeed.propTypes = { userStore: propTypes.shape({ setMnemonicRepeat: propTypes.func.isRequired, diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index b1cd5daf..e694cb72 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -14,7 +14,6 @@ class LangSwitcher extends Component { opened: false, }; - this.setWrapperRef = this.setWrapperRef.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); } diff --git a/src/components/LoadingBlock/index.js b/src/components/LoadingBlock/index.js index 98518593..fab407b0 100644 --- a/src/components/LoadingBlock/index.js +++ b/src/components/LoadingBlock/index.js @@ -3,7 +3,6 @@ import propTypes from 'prop-types'; import FormBlock from '../FormBlock'; import Loader from '../Loader'; - const LoadingBlock = ({ children }) => ( {children} diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 0a100269..5fc035d1 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -403,7 +403,6 @@ transform: translate(-50%, 30%); } - @keyframes stroke-spacing { 0% { stroke-dasharray: 0 200; diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 7c3d249d..01dbdb5a 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -104,7 +104,6 @@ const InputForm = withTranslation()(({ )); - Login.propTypes = { appStore: propTypes.shape({ displayAlert: propTypes.func.isRequired, diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss index 17b07ff9..62b8c378 100644 --- a/src/components/Logo/Logo.scss +++ b/src/components/Logo/Logo.scss @@ -6,7 +6,6 @@ color: $primary; text-decoration: none; border: 3px solid $primary; - &__dark { display: table-cell; min-width: 49px; @@ -22,7 +21,6 @@ font-family: "Roboto Mono"; } } - &__light { display: table-cell; min-width: 79px; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index ebe358ae..bd6377e8 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -99,7 +99,6 @@ const Progress = withTranslation()(inject('appStore')(observer(({ t, appStore, s ], ]]; - return ( diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 52deb2f6..94e1ec92 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -16,7 +16,6 @@ import ProjectUploading from '../ProjectUploading'; import CreationAlert from '../CreationAlert'; import DisplayUserInfo from '../DisplayUserInfo'; - const SimpleRouter = () => ( diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index c061a420..7b1d3d96 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -24,7 +24,6 @@ class ShowSeed extends Component { }; } - toggleWords = () => { const { visible } = this.state; this.setState({ diff --git a/src/components/StepIndicator/index.js b/src/components/StepIndicator/index.js index 10c2f11e..46be02eb 100644 --- a/src/components/StepIndicator/index.js +++ b/src/components/StepIndicator/index.js @@ -26,5 +26,4 @@ const StepIndicator = withTranslation()(({ t, currentStep, stepCount }) => { ); }); - export default StepIndicator; diff --git a/src/electron.js b/src/electron.js index d1464cc9..78ed3f80 100644 --- a/src/electron.js +++ b/src/electron.js @@ -3,7 +3,6 @@ const { app, BrowserWindow } = require('electron'); const electronLocalshortcut = require('electron-localshortcut'); const isDev = require('electron-is-dev'); - const path = require('path'); let mainWindow; @@ -31,7 +30,6 @@ function createWindow() { }); } - app.on('ready', createWindow); app.on('window-all-closed', () => { diff --git a/src/i18n.js b/src/i18n.js index 45c850cf..76fc2293 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -13,7 +13,6 @@ import otherRu from './locales/RUS/other'; import errorsEn from './locales/ENG/errors'; import errorsRu from './locales/RUS/errors'; - const resources = { ENG: { headings: headingsEn, diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index e79fb840..ff75571b 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -226,7 +226,6 @@ class ContractService { value: '0x0', }; - return new Promise(() => { Web3Service.createTxData(address, rawTx, maxGasPrice) .then((formedTx) => userStore.singTransaction(formedTx, password)) @@ -239,7 +238,6 @@ class ContractService { }); } - getQuestion(id) { return this.callMethod('question', id); } diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index bd245f12..0d1996c2 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -3,7 +3,6 @@ import WorkerWrapper from './entities/WorkerWrapper'; import WalletWorker from '../../workers/wallet.worker'; import { fs, path, PATH_TO_WALLETS } from '../../constants'; - const bip39 = require('bip39'); const worker = new WorkerWrapper(new WalletWorker()); diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 8995e79d..c1e4fb2d 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -47,6 +47,10 @@ class web3Service { .catch((err) => Promise.reject(err)); } + /** + * getting gas price + * @returns {number} gasPrice from network + */ getGasPrice() { const { web3: { eth: { getGasPrice } } } = this; return getGasPrice(); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index fd7c0cad..a9e48335 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -3,7 +3,6 @@ import { fs, path, PATH_TO_WALLETS, ROOT_DIR, PATH_TO_CONTRACTS, } from '../../constants'; - class AppStore { @observable walletList = {}; diff --git a/src/stores/ProjectStore/ProjectStore.js b/src/stores/ProjectStore/ProjectStore.js index b03b79cb..063499fc 100644 --- a/src/stores/ProjectStore/ProjectStore.js +++ b/src/stores/ProjectStore/ProjectStore.js @@ -45,7 +45,6 @@ class ProjectStore { return (questionId, parameters); } - /** * getting usergroups lentgh from contract */ diff --git a/src/stores/QuestionStore/QuestionStore.js b/src/stores/QuestionStore/QuestionStore.js index 90aef058..aea16405 100644 --- a/src/stores/QuestionStore/QuestionStore.js +++ b/src/stores/QuestionStore/QuestionStore.js @@ -50,7 +50,6 @@ class QuestionStore { */ @action getQuestionById = (id) => this._questions.filter((question) => question.id === id) - /** * Getting list of questions for displaying * @function diff --git a/src/stores/UsergroupStore/UsergroupStore.js b/src/stores/UsergroupStore/UsergroupStore.js index 22a8e3aa..0040f26e 100644 --- a/src/stores/UsergroupStore/UsergroupStore.js +++ b/src/stores/UsergroupStore/UsergroupStore.js @@ -79,5 +79,4 @@ class UsergroupStore { } } - export default UsergroupStore; diff --git a/src/utils/Validator/index.js b/src/utils/Validator/index.js index 05e3daf1..cf5d328e 100644 --- a/src/utils/Validator/index.js +++ b/src/utils/Validator/index.js @@ -21,7 +21,6 @@ const rules = { }, }; - const plugins = { dvr: { package: validatorjs, diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index c7901714..4c8c055e 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -45,7 +45,6 @@ const readWallet = ({ id, payload: { input, password } }) => { } }; - onmessage = (e) => { const { payload } = e.data; const { action } = payload; From f48b8241111de1f3ff87da1ecc6558c8cfcdf86c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 09:56:50 +0700 Subject: [PATCH 179/219] added jsdoc returns to combineContract --- src/services/ContractService/ContractService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index ff75571b..d63067e9 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -67,6 +67,7 @@ class ContractService { /** * reading all imports in main contract file and importing all files in one output file * @param {string} type type of project - ERC20 for ERC-20 tokens, Project for project contract + * @returns {string} combined contracts */ // eslint-disable-next-line class-methods-use-this combineContract(type) { @@ -97,7 +98,6 @@ class ContractService { } mainContract = mainContract.replace(SOL_VERSION_REGEXP, compiler); mainContract = mainContract.replace(new RegExp(/(calldata)/g), ''); - fs.writeFileSync(path.join(PATH_TO_CONTRACTS, `${dir}output.sol`), mainContract, 'utf8'); return mainContract; } From 18ab45683c571455967c517cb058b08f77e11050 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 09:58:20 +0700 Subject: [PATCH 180/219] removed unnesecary lines in compileContract --- src/services/ContractService/ContractService.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index d63067e9..1f90b31a 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -41,10 +41,6 @@ class ContractService { return new Promise((resolve, reject) => { window.BrowserSolc.getVersions((sources, releases) => { const version = releases['0.4.24']; - const questions = fs.readFileSync(path.join(PATH_TO_CONTRACTS, './sysQuestions.json'), 'utf8'); - /* const contract = type === 'ERC20' - ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, './output.sol'), 'utf8') - : fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter/output.sol'), 'utf8'); */ const contract = this.combineContract(type); const contractName = type === 'ERC20' ? ':ERC20' From 34b41b7166ed291b8c24467f0cb5d2385c10fcbc Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 10:02:44 +0700 Subject: [PATCH 181/219] removed old buttons --- src/components/Button/index.js | 405 ----------------------- src/components/ProjectUploading/index.js | 2 +- 2 files changed, 1 insertion(+), 406 deletions(-) delete mode 100644 src/components/Button/index.js diff --git a/src/components/Button/index.js b/src/components/Button/index.js deleted file mode 100644 index 7780473b..00000000 --- a/src/components/Button/index.js +++ /dev/null @@ -1,405 +0,0 @@ -/* eslint-disable react/button-has-type */ -import React from 'react'; -import propTypes from 'prop-types'; -import styles from './Button.scss'; - - -/* - ? BUTTONS WITHOUT ICONS -*/ - -export const Button = ({ - children, type, disabled, className, onClick, -}) => ( - - {children} - - -); - -Button.propTypes = { - children: propTypes.string.isRequired, - className: propTypes.string.isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -Button.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const BlackButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -BlackButton.propTypes = { - children: propTypes.string.isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -BlackButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const BlackWideButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -BlackWideButton.propTypes = { - children: propTypes.string.isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -BlackWideButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const BlackWidestButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -BlackWidestButton.propTypes = { - children: propTypes.string.isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -BlackWidestButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const WhiteButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -WhiteButton.propTypes = { - children: propTypes.string.isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -WhiteButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const LinkButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -LinkButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -LinkButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const BorderedLinkButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -BorderedLinkButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -BorderedLinkButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const ProjectButton = ({ - children, type, disabled, onClick, -}) => ( - -); - -ProjectButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -ProjectButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -/* - ? BUTTONS WITH ICONS -*/ - -export const IconButton = ({ - children, type, className, disabled, onClick, -}) => ( - -); - -IconButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - className: propTypes.string.isRequired, - type: propTypes.string, -}; -IconButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const IconBlackButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -IconBlackButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -IconBlackButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const IconWhiteButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -IconWhiteButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -IconWhiteButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const IconTopWhiteButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -IconTopWhiteButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -IconTopWhiteButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const AddProjectButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -AddProjectButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -AddProjectButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - - -export const SeedToggleButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -SeedToggleButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -SeedToggleButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; - -export const BackButton = ({ - children, type, disabled, onClick, -}) => ( - - {children} - -); - -BackButton.propTypes = { - children: propTypes.arrayOf(propTypes.node).isRequired, - onClick: propTypes.func, - disabled: propTypes.bool, - type: propTypes.string, -}; -BackButton.defaultProps = { - type: 'button', - disabled: false, - onClick: () => false, -}; diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index bd6377e8..447ab749 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -13,7 +13,7 @@ import ProgressBlock from './ProgressBlock'; import { CompilingIcon, SendingIcon, TxHashIcon, TxRecieptIcon, QuestionUploadingIcon, Login, } from '../Icons'; -import Button from '../Button'; +import Button from '../Button/Button'; import styles from '../Login/Login.scss'; From abb12450691f9f661f74c7b358072c43fb0f4211 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Tue, 26 Nov 2019 18:03:50 +0700 Subject: [PATCH 182/219] Bucnh of fixes --- src/components/AddExisitingProject/index.js | 1 - src/components/Button/Button.js | 16 +-- src/components/CreateNewProject/index.js | 4 +- .../CreateNewProjectWithTokens/index.js | 1 - .../CreateNewProjectWithoutTokens/index.js | 133 +++++++++--------- src/components/CreateWallet/PasswordForm.js | 1 - src/components/CreateWallet/index.js | 2 - src/components/DisplayUserInfo/index.js | 4 +- src/components/Dropdown/index.js | 7 +- src/components/DropdownOption/index.js | 2 - src/components/LangSwitcher/LangSwitcher.scss | 6 +- src/components/LangSwitcher/index.js | 11 +- src/components/Login/index.js | 39 ++--- src/components/ProjectUploading/index.js | 5 - src/components/ShowSeed/index.js | 5 +- src/components/StepIndicator/index.js | 1 - src/constants/index.js | 4 +- src/electron.js | 1 - src/models/FormModel/index.js | 3 +- .../ContractService/ContractService.js | 7 +- src/services/WalletService/WalletService.js | 7 +- src/stores/AppStore/AppStore.js | 24 ++-- src/stores/AppStore/entities/Alert.js | 0 src/stores/RootStore/RootStore.js | 11 +- src/stores/UserStore/UserStore.js | 81 +++++++---- src/workers/wallet.worker.js | 3 +- 26 files changed, 196 insertions(+), 183 deletions(-) create mode 100644 src/stores/AppStore/entities/Alert.js diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index d052925d..911351c1 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js index a622c851..33546295 100644 --- a/src/components/Button/Button.js +++ b/src/components/Button/Button.js @@ -3,14 +3,8 @@ import propTypes from 'prop-types'; import styles from './Button.scss'; +// eslint-disable-next-line react/prefer-stateless-function class Button extends Component { - constructor(props) { - super(props); - this.state = { - - }; - } - render() { const { children, @@ -19,7 +13,7 @@ class Button extends Component { type, disabled, icon, - iconTop, + iconPosition, onClick, } = this.props; return ( @@ -33,7 +27,7 @@ class Button extends Component { onClick={onClick} >

- + {icon} @@ -48,7 +42,7 @@ class Button extends Component { Button.propTypes = { children: propTypes.string.isRequired, icon: propTypes.node, - iconTop: propTypes.bool, + iconPosition: propTypes.bool, type: propTypes.string, disabled: propTypes.bool.isRequired, onClick: propTypes.func.isRequired, @@ -61,7 +55,7 @@ Button.defaultProps = { theme: 'black', size: 'default', icon: null, - iconTop: false, + iconPosition: false, }; export default Button; diff --git a/src/components/CreateNewProject/index.js b/src/components/CreateNewProject/index.js index 4c3c8ca0..56cd8307 100644 --- a/src/components/CreateNewProject/index.js +++ b/src/components/CreateNewProject/index.js @@ -27,13 +27,13 @@ class CreateNewProject extends Component {

{t('other:withTokens')} - {t('other:withoutTokens')} - diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index ddd5a62d..a1867c8d 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import propTypes from 'prop-types'; diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 5bc6d6c6..ae496783 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -25,23 +25,15 @@ import styles from '../Login/Login.scss'; class CreateNewProjectWithoutTokens extends Component { form = new CreateTokenForm({ hooks: { - onSuccess: (form) => { - this.createToken(form); - }, - onError: () => { - this.showValidationError(); - }, + onSuccess: (form) => this.createToken(form), + onError: () => this.showValidationError(), }, }); createProject = new CreateProjectForm({ hooks: { - onSuccess: (form) => { - this.gotoUploading(form); - }, - onError: () => { - this.showValidationError(); - }, + onSuccess: (form) => this.gotoUploading(form), + onError: () => this.showValidationError(), }, }); @@ -69,7 +61,7 @@ class CreateNewProjectWithoutTokens extends Component { createToken = (form) => { const { steps } = this; - const { appStore, userStore, t } = this.props; + const { userStore, t } = this.props; this.setState({ currentStep: steps.creation, }); @@ -77,41 +69,18 @@ class CreateNewProjectWithoutTokens extends Component { name, symbol, count, password, } = form.values(); const deployArgs = [name, symbol, Number(count)]; - return new Promise((resolve, reject) => { - userStore.readWallet(password) - .then((data) => { - if (!(data instanceof Error)) { - userStore.checkBalance(userStore.address) - .then((balance) => { - if (balance > 0.5) { - appStore.deployContract('ERC20', deployArgs, password) - .then((txHash) => appStore.checkReceipt(txHash)) - .then((receipt) => { - this.setState({ - currentStep: steps.tokenCreated, - }); - appStore.setDeployArgs([receipt.contractAddress]); - resolve(); - }); - } else { - this.setState({ - currentStep: steps.token, - indicatorStep: 1, - }); - appStore.displayAlert(t('errors:lowBalance'), 3000); - reject(); - } - }); - } - }).catch(() => { - this.setState({ - currentStep: steps.token, - indicatorStep: 1, - }); - appStore.displayAlert(t('errors:wrongPassword'), 3000); - reject(); - }); - }); + + return userStore.readWallet(password) + .then(() => userStore.checkBalance(userStore.address)) + // eslint-disable-next-line consistent-return + .then((balance) => { + if (balance > 0.05) { + this.deployTokenContract(deployArgs, password); + } else { + return this.returnToTokenCreating(t('errors:lowBalance')); + } + }) + .catch(() => this.returnToTokenCreating(t('errors:tryAgain'))); } showValidationError = () => { @@ -133,30 +102,58 @@ class CreateNewProjectWithoutTokens extends Component { const { name, password } = form.values(); appStore.setProjectName(name); userStore.setPassword(password); - userStore.readWallet(password) - .then(() => { - userStore.checkBalance(userStore.address) - .then((balance) => { - if (balance > 0.05) { - this.setState({ - currentStep: steps.uploading, - }); - } else { - this.setState({ - currentStep: steps.projectInfo, - indicatorStep: 2, - }); - appStore.displayAlert(t('errors:lowBalance'), 3000); - } + + return userStore.readWallet(password) + .then(() => userStore.checkBalance(userStore.address)) + .then((balance) => { + if (balance > 0.05) { + this.setState({ + currentStep: steps.uploading, }); + } else { + this.returnToProjectInfo(t('errors:lowBalance')); + } }) .catch(() => { + this.returnToProjectInfo(t('errors:tryAgain')); + }); + } + + + deployTokenContract(deployArgs, password) { + const { steps } = this; + const { appStore } = this.props; + appStore.deployContract('ERC20', deployArgs, password) + .then((txHash) => appStore.checkReceipt(txHash)) + .then((receipt) => { this.setState({ - currentStep: steps.projectInfo, - indicatorStep: 2, + currentStep: steps.tokenCreated, }); - appStore.displayAlert(t('errors:tryAgain'), 3000); + appStore.setDeployArgs([receipt.contractAddress]); }); + return Promise.resolve(); + } + + returnToTokenCreating(errorText) { + const { steps } = this; + const { appStore } = this.props; + this.setState({ + currentStep: steps.token, + indicatorStep: 1, + }); + appStore.displayAlert(errorText); + // return Promise.reject(); + } + + returnToProjectInfo(errorText) { + const { steps } = this; + const { appStore } = this.props; + + this.setState({ + currentStep: steps.projectInfo, + indicatorStep: 2, + }); + appStore.displayAlert(errorText); } renderSwitch(step) { @@ -202,7 +199,7 @@ class CreateNewProjectWithoutTokens extends Component { } } -const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation()(({ +const CreateTokenData = withTranslation()(inject('userStore', 'appStore')(observer((({ t, userStore: { address }, appStore: { balances }, form, }) => ( @@ -278,7 +275,7 @@ const CreateTokenData = inject('userStore', 'appStore')(observer(withTranslation -)))); +))))); const TokenCreationAlert = withTranslation()(({ onSubmit, t }) => ( diff --git a/src/components/CreateWallet/PasswordForm.js b/src/components/CreateWallet/PasswordForm.js index d5d7b881..36c35e91 100644 --- a/src/components/CreateWallet/PasswordForm.js +++ b/src/components/CreateWallet/PasswordForm.js @@ -97,7 +97,6 @@ class PasswordForm extends Component { - ); } } diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 97e62579..21db3aa3 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -1,5 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ -/* eslint-disable no-console */ import React, { Component } from 'react'; import propTypes from 'prop-types'; import { observer, inject } from 'mobx-react'; diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 98765101..60322ae6 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -21,7 +21,7 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use {t('headings:walletRestoring.subheading.1')} -
+

{t('other:walletAddress')}

@@ -40,7 +40,7 @@ const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, use
- +
diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index e44fa93d..1f4292ec 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -98,8 +98,11 @@ Dropdown.propTypes = { // eslint-disable-next-line react/forbid-prop-types subOptions: propTypes.object, onSelect: propTypes.func.isRequired, - // eslint-disable-next-line react/forbid-prop-types - field: propTypes.object.isRequired, + field: propTypes.shape({ + set: propTypes.func.isRequired, + value: propTypes.string.isRequired, + placeholder: propTypes.string.isRequired, + }).isRequired, }; Dropdown.defaultProps = { children: '', diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js index 028b4e8a..5b7b9dd4 100644 --- a/src/components/DropdownOption/index.js +++ b/src/components/DropdownOption/index.js @@ -9,7 +9,6 @@ const DropdownOption = ({ ); diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index f2da9112..2bb70228 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -44,11 +44,15 @@ visibility: hidden; opacity: 0; transition: .2s linear; - + } &__option { display: block; padding: 5px 0; + font-size: 16px; + background-color: $white; + border: none; + outline: none; cursor: pointer; } } \ No newline at end of file diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index e694cb72..636e7031 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -66,7 +66,16 @@ class LangSwitcher extends Component {
{ - i18n.languages.map((item) => {`${t(`other:${item}`)}(${item})`}) + i18n.languages.map((item) => ( + + )) }
diff --git a/src/components/Login/index.js b/src/components/Login/index.js index 01dbdb5a..52095573 100644 --- a/src/components/Login/index.js +++ b/src/components/Login/index.js @@ -1,5 +1,3 @@ -/* eslint-disable no-alert */ -/* eslint-disable no-console */ import React, { Component } from 'react'; import { observer, inject } from 'mobx-react'; import propTypes from 'prop-types'; @@ -21,32 +19,39 @@ import styles from './Login.scss'; @inject('userStore', 'appStore') @observer class Login extends Component { + loginForm = new LoginForm({ + hooks: { + onSuccess: (form) => this.login(form), + onError: () => { + this.showError(); + }, + }, + }); + componentDidMount() { const { appStore } = this.props; appStore.readWalletList(); } + login(form) { + const { userStore } = this.props; + return userStore.login(form.values().password); + } + + showError() { + const { appStore, t } = this.props; + appStore.displayAlert(t('errors:emptyFields'), 3000); + } + render() { const { appStore, userStore, t } = this.props; - const { logging } = userStore; - const loginForm = new LoginForm({ - hooks: { - onSuccess(form) { - return new Promise(() => { - userStore.login(form.values().password); - }); - }, - onError() { - appStore.displayAlert(t('errors:emptyFields'), 3000); - }, - }, - }); + const { loginForm } = this; if (userStore.authorized) return ; return (
{ - !logging + !loginForm.loading ? ( { diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index 7b1d3d96..01c10fbc 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -1,4 +1,3 @@ -/* eslint-disable class-methods-use-this */ /* eslint-disable react/jsx-props-no-spreading */ import React, { Component } from 'react'; import propTypes from 'prop-types'; @@ -14,6 +13,7 @@ import { BackIcon, EyeIcon, CrossedEyeIcon } from '../Icons'; import styles from '../Login/Login.scss'; +@withTranslation() @inject('userStore', 'appStore') @observer class ShowSeed extends Component { @@ -31,6 +31,7 @@ class ShowSeed extends Component { }); } + // eslint-disable-next-line class-methods-use-this redirectToInput() { return ; } @@ -103,4 +104,4 @@ SeedWord.propTypes = { visible: propTypes.bool.isRequired, }; -export default withTranslation()(ShowSeed); +export default ShowSeed; diff --git a/src/components/StepIndicator/index.js b/src/components/StepIndicator/index.js index 46be02eb..b518eae3 100644 --- a/src/components/StepIndicator/index.js +++ b/src/components/StepIndicator/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import React from 'react'; import { withTranslation } from 'react-i18next'; import Indicator from '../Indicator'; diff --git a/src/constants/index.js b/src/constants/index.js index edf2ce8e..d7666128 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -1,6 +1,4 @@ /* eslint-disable no-useless-escape */ -/* eslint-disable import/prefer-default-export */ - export const votingStates = { default: 0, prepared: 1, @@ -31,3 +29,5 @@ export const PATH_TO_CONTRACTS = window.__ENV === 'production' export const SOL_PATH_REGEXP = new RegExp(/(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')/g); export const SOL_IMPORT_REGEXP = new RegExp(/(import)*.(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')(;)/g); export const SOL_VERSION_REGEXP = new RegExp(/(pragma).(solidity).((\^)?)([0-9](.)?){1,}/g); + +export const walletHdPath = "m/44'/60'/0'/0/0"; diff --git a/src/electron.js b/src/electron.js index 78ed3f80..bfa9aea4 100644 --- a/src/electron.js +++ b/src/electron.js @@ -1,4 +1,3 @@ - const { app, BrowserWindow } = require('electron'); const electronLocalshortcut = require('electron-localshortcut'); const isDev = require('electron-is-dev'); diff --git a/src/models/FormModel/index.js b/src/models/FormModel/index.js index 86654215..751e7469 100644 --- a/src/models/FormModel/index.js +++ b/src/models/FormModel/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { extendObservable, action } from 'mobx'; import { Form } from 'mobx-react-form'; import dvr from 'mobx-react-form/lib/validators/DVR'; @@ -33,6 +32,8 @@ class ExtendedForm extends Form { promise .finally(() => { $this.setLoading(false); + // eslint-disable-next-line no-console + console.log($this.loading); }); }, onError: (form) => { diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 1f90b31a..c392a184 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -1,9 +1,6 @@ -/* eslint-disable no-unused-expressions */ -/* eslint-disable class-methods-use-this */ -/* eslint-disable no-loop-func */ /* eslint-disable no-useless-escape */ +/* eslint-disable no-loop-func */ /* eslint-disable no-unused-vars */ -/* eslint-disable no-console */ import browserSolc from 'browser-solc'; import { BN } from 'ethereumjs-util'; import { @@ -45,9 +42,7 @@ class ContractService { const contractName = type === 'ERC20' ? ':ERC20' : ':Voter'; - console.info(`Компилятор ${version} загружается, подождите...`); window.BrowserSolc.loadVersion(version, (compiler) => { - console.info(`Компилятор ${version} загружен, компиляция...`); const compiledContract = compiler.compile(contract); const contractData = compiledContract.contracts[contractName]; if (contractData.interface !== '') { diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 0d1996c2..30ce15ad 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -27,12 +27,9 @@ class WalletService { /** * Write encrypted wallet to file * @param {string} encryptedWallet + * @param {string} name name of the wallet, generated by ethereumjs-wallet */ - writeWalletToFile(encryptedWallet) { - let date = new Date(); - date = `${date.getUTCFullYear()}-${date.getUTCDate()}-${date.getUTCDay()}T${date.getUTCHours()}-${date.getUTCMinutes()}-${date.getUTCSeconds()}.${date.getMilliseconds() * 1000000}Z`; - const walletName = encryptedWallet.address; - const name = `UTC--${date}--${walletName}`; + writeWalletToFile(encryptedWallet, name) { fs.writeFileSync(path.join(PATH_TO_WALLETS, `${name}.json`), JSON.stringify(encryptedWallet, null, '\t'), 'utf8'); } diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index a9e48335..88e50718 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -52,7 +52,7 @@ class AppStore { * selecting encrypted wallet and pushing this to userStore * @param {string} address address of wallet */ - @action selectWallet = (address) => { + selectWallet = (address) => { const { userStore } = this.rootStore; const key = address.replace('0x', ''); userStore.setEncryptedWallet(this.walletList[key]); @@ -77,13 +77,12 @@ class AppStore { @action deployContract(type, deployArgs, password) { const { contractService } = this.rootStore; - return new Promise((resolve) => { - contractService.compileContract(type).then(({ bytecode, abi }) => { - resolve(contractService.deployContract({ + return contractService.compileContract(type) + .then(({ bytecode, abi }) => { + (contractService.deployContract({ type, deployArgs, bytecode, abi, password, })); }); - }); } @action checkErc(address) { @@ -100,15 +99,14 @@ class AppStore { }); } + @action checkProject(address) { const { contractService } = this.rootStore; - return new Promise((resolve, reject) => { - contractService.checkProject(address) - .then((data) => { - resolve(data); - }) - .catch(() => { reject(); }); - }); + return contractService.checkProject(address) + .then((data) => { + Promise.resolve(data); + }) + .catch(() => { Promise.reject(); }); } @action async deployQuestions(address) { @@ -128,7 +126,7 @@ class AppStore { await contractService.sendQuestion(idx); this.uploadedQuestion += 1; } - Promise.resolve(); + return Promise.resolve(); } // eslint-disable-next-line class-methods-use-this diff --git a/src/stores/AppStore/entities/Alert.js b/src/stores/AppStore/entities/Alert.js new file mode 100644 index 00000000..e69de29b diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index a19b3a25..b61c7a2d 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -1,5 +1,3 @@ -/* eslint-disable no-multi-assign */ -/* eslint-disable no-multi-spaces */ import { observable, action } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; @@ -22,11 +20,11 @@ class RootStore { @observable alertStore; // services - walletService ; + walletService; - contractService ; + contractService; - Web3Service ; + Web3Service; eventEmitterService; @@ -50,5 +48,6 @@ class RootStore { this.projectStore = new ProjectStore(address); } } -const rootStore = window.rootStore = new RootStore(); +// eslint-disable-next-line no-multi-assign +const rootStore = window.rootStore = new RootStore(); export default rootStore; diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 242c63d4..c1f06248 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -1,5 +1,3 @@ -/* eslint-disable no-console */ -/* eslint-disable no-unused-vars */ import { observable, action, computed } from 'mobx'; import { Transaction as Tx } from 'ethereumjs-tx'; import i18n from 'i18next'; @@ -9,12 +7,12 @@ import i18n from 'i18next'; class UserStore { @observable authorized = false; - @observable logging = false; - @observable redirectToProjects = false; @observable encryptedWallet = ''; + @observable walletName = ''; + @observable privateKey = ''; @observable _mnemonic = Array(12); @@ -40,34 +38,31 @@ class UserStore { this.address = `0x${wallet.address}`; } - /** - * checking password by wallet service - * @param password password for decoding - * @return {bool} is password correct - */ - @action checkPassword(password) { - const wallet = JSON.stringify(this.encryptedWallet); - this.rootStore.walletService.readWallet(wallet, password); - } - @action checkBalance(address) { const { Web3Service: { web3 } } = this.rootStore; return new Promise((resolve, reject) => { web3.eth.getBalance(address).then((balance) => { - resolve((balance / 1.0e18).toFixed(5)); + resolve(Number(web3.utils.fromWei(balance)).toFixed(5)); }).catch(() => { reject(); }); }); } + /** + * create wallet by given password + * @param {string} password password which will be used for wallet decrypting + * @return {Promise} resolves on success with {v3wallet, mnemonic, privateKey, walletName} + */ @action createWallet(password) { return new Promise((resolve, reject) => { this.rootStore.walletService.createWallet(password).then((data) => { if (data.v3wallet) { - const { v3wallet, mnemonic, privateKey } = data; + const { + v3wallet, mnemonic, privateKey, walletName, + } = data; this.setEncryptedWallet(v3wallet); + this.setWalletName(walletName); this._mnemonic = mnemonic.split(' '); this.privateKey = privateKey; - // eslint-disable-next-line no-console resolve(true); } else { reject(new Error('Error on creating wallet')); @@ -76,16 +71,23 @@ class UserStore { }); } + /** + * recovering wallet by mnemonic + * @param {string} password + * @returns {Promise} resolves with {v3wallet, privateKey} + */ @action recoverWallet(password) { const seed = this._mnemonic.join(' '); return new Promise((resolve, reject) => { this.rootStore.walletService.createWallet(password, seed).then((data) => { if (data.v3wallet) { - const { v3wallet, mnemonic, privateKey } = data; + const { + v3wallet, mnemonic, privateKey, walletName, + } = data; this.setEncryptedWallet(v3wallet); + this.setWalletName(walletName); this._mnemonic = mnemonic.split(' '); this.privateKey = privateKey; - // eslint-disable-next-line no-console resolve(data); } else { reject(new Error('Error on creating wallet')); @@ -94,21 +96,30 @@ class UserStore { }); } + /** + * method for authorize wallet for working with projects + * @param {string} password password for wallet + * @returns {Promise} resolve on success authorization + */ @action login(password) { const { appStore } = this.rootStore; - this.logging = true; - this.readWallet(password).then((data) => { - if (!(data.privateKey instanceof Error)) { - this.privateKey = data.privateKey; - this.setEncryptedWallet(JSON.parse(data.wallet)); - this.authorized = true; - } + return this.readWallet(password).then((data) => { + this.privateKey = data.privateKey; + this.setEncryptedWallet(JSON.parse(data.wallet)); + this.authorized = true; + Promise.resolve(); }).catch(() => { - this.logging = false; appStore.displayAlert(i18n.t('errors:wrongPassword'), 3000); + Promise.reject(); }); } + /** + * read wallet for any operations with it + * @param {string} password password for wallet + * @returns {Promise} resolves with object {v3wallet, privateKey} + */ + @action readWallet(password) { const wallet = JSON.stringify(this.encryptedWallet); return new Promise((resolve, reject) => { @@ -124,12 +135,20 @@ class UserStore { }); } + /** + * saves wallet to file by generated name + */ @action saveWalletToFile() { const { walletService, appStore } = this.rootStore; - walletService.writeWalletToFile(this.encryptedWallet); + walletService.writeWalletToFile(this.encryptedWallet, this.walletName); appStore.readWalletList(); } + /** + * checks is seed valid with walletService + * @param {string} mnemonic mnemonic + * @returns {bool} is valid + */ @action isSeedValid(mnemonic) { const { walletService } = this.rootStore; return walletService.validateMnemonic(mnemonic); @@ -143,7 +162,7 @@ class UserStore { * @return Signed TX data */ @action singTransaction(data, password) { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { // eslint-disable-next-line consistent-return this.readWallet(password).then((info) => { if (info instanceof Error) return false; @@ -181,6 +200,10 @@ class UserStore { this._mnemonicRepeat = value; } + @action setWalletName(name) { + this.walletName = name; + } + @computed get mnemonic() { return this._mnemonic; } diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index 4c8c055e..11c7a830 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -1,4 +1,3 @@ - const ejsWallet = require('ethereumjs-wallet'); const hdKey = require('ethereumjs-wallet/hdkey'); const bip39 = require('bip39'); @@ -14,6 +13,7 @@ const createWallet = ({ id, payload: { mnemonic, password = '', action } }) => { const privateKey = wallet.getPrivateKeyString(); const v3wallet = wallet.toV3(password); + const walletName = wallet.getV3Filename(new Date()); const payload = { action, @@ -21,6 +21,7 @@ const createWallet = ({ id, payload: { mnemonic, password = '', action } }) => { wallet, v3wallet, mnemonic, + walletName, }; return { id, payload }; } catch (e) { From c0dafa46b1a6e0c276a455a3e5b8cffd7e129833 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Wed, 27 Nov 2019 18:10:03 +0700 Subject: [PATCH 183/219] Some fixes for creating token contract recovering wallet, and some more --- .../CreateNewProjectWithoutTokens/index.js | 29 ++++++------- src/components/InputSeed/index.js | 2 +- src/services/WalletService/WalletService.js | 2 +- src/stores/AppStore/AppStore.js | 41 ++++++++++++++---- src/stores/UserStore/UserStore.js | 43 +++++++++++++------ ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 +++++++++ ...6bf53bfcea0028a01cd63336c34d06316f589.json | 21 --------- ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 --------- ...bd00ca3a9ed0825ded12edd4ac010e54225ac.json | 21 --------- ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 --------- 10 files changed, 96 insertions(+), 126 deletions(-) create mode 100644 src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json delete mode 100644 src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json delete mode 100644 src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json delete mode 100644 src/wallets/UTC--2019-13-3T9-50-50.871000000Z--613bd00ca3a9ed0825ded12edd4ac010e54225ac.json delete mode 100644 src/wallets/UTC--2019-14-4T2-8-1.581000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index ae496783..800a6a64 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -73,13 +73,9 @@ class CreateNewProjectWithoutTokens extends Component { return userStore.readWallet(password) .then(() => userStore.checkBalance(userStore.address)) // eslint-disable-next-line consistent-return - .then((balance) => { - if (balance > 0.05) { - this.deployTokenContract(deployArgs, password); - } else { - return this.returnToTokenCreating(t('errors:lowBalance')); - } - }) + .then((balance) => (this.isEnoughBalance(balance) + ? this.deployTokenContract(deployArgs, password) + : this.returnToTokenCreating(t('errors:lowBalance')))) .catch(() => this.returnToTokenCreating(t('errors:tryAgain'))); } @@ -105,20 +101,18 @@ class CreateNewProjectWithoutTokens extends Component { return userStore.readWallet(password) .then(() => userStore.checkBalance(userStore.address)) - .then((balance) => { - if (balance > 0.05) { - this.setState({ - currentStep: steps.uploading, - }); - } else { - this.returnToProjectInfo(t('errors:lowBalance')); - } - }) + .then((balance) => (this.isEnoughBalance(balance) + ? this.setState({ currentStep: steps.uploading }) + : this.returnToProjectInfo(t('errors:lowBalance')))) .catch(() => { this.returnToProjectInfo(t('errors:tryAgain')); }); } + // eslint-disable-next-line class-methods-use-this + isEnoughBalance(balance) { + return balance > 0.05; + } deployTokenContract(deployArgs, password) { const { steps } = this; @@ -142,7 +136,7 @@ class CreateNewProjectWithoutTokens extends Component { indicatorStep: 1, }); appStore.displayAlert(errorText); - // return Promise.reject(); + return Promise.resolve(); } returnToProjectInfo(errorText) { @@ -154,6 +148,7 @@ class CreateNewProjectWithoutTokens extends Component { indicatorStep: 2, }); appStore.displayAlert(errorText); + return Promise.resolve(); } renderSwitch(step) { diff --git a/src/components/InputSeed/index.js b/src/components/InputSeed/index.js index c303495d..2b1b3690 100644 --- a/src/components/InputSeed/index.js +++ b/src/components/InputSeed/index.js @@ -48,7 +48,7 @@ class InputSeed extends Component { return new Promise((resolve, reject) => { if (userStore.isSeedValid(mnemonic)) { if (recover) { - userStore.recoverWallet(mnemonic) + userStore.recoverWallet() .then((data) => { userStore.setEncryptedWallet(data.v3wallet); userStore.getEthBalance(); diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 30ce15ad..c35162f7 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -54,7 +54,7 @@ class WalletService { * @returns {Promise} */ recoverWallet(mnemonic) { - if (bip39.validateMnemonic) { + if (this.validateMnemonic(mnemonic)) { const data = { action: 'recover', mnemonic, diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 88e50718..e2a796a0 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -68,13 +68,10 @@ class AppStore { } /** - * Adding encrypted Wallet to userStore - * @param {string} encryptedWallet encrypted keystore v3 + * compile contract by given type and arguments + * @param {string} type type of contract - ERC20 for erc tokens, project - for project contract + * @returns {Promise} Function which compiles contract and deploy contract to network on success */ - @action setUserWallet(encryptedWallet) { - this.userStore.setEncryptedWallet(encryptedWallet); - } - @action deployContract(type, deployArgs, password) { const { contractService } = this.rootStore; return contractService.compileContract(type) @@ -85,6 +82,11 @@ class AppStore { }); } + /** + * checks given address on ERC20 tokens + * @param {string} address address of ERC20 contract + * @returns {Promise} resolves on success checking and set information about ERC token + */ @action checkErc(address) { const { contractService } = this.rootStore; return new Promise((resolve, reject) => { @@ -99,7 +101,10 @@ class AppStore { }); } - + /** + * checks if given address is contract in network + * @param {string} address address, which will be ckecked on contract instance + */ @action checkProject(address) { const { contractService } = this.rootStore; return contractService.checkProject(address) @@ -109,6 +114,11 @@ class AppStore { .catch(() => { Promise.reject(); }); } + /** + * Upload questions to created project + * @param {string} address address of smart contract, where will be uploaded questions + * @return Promise.resolve() + */ @action async deployQuestions(address) { const { Web3Service, contractService } = this.rootStore; const abi = JSON.parse(fs.readFileSync(path.join(PATH_TO_CONTRACTS, './Voter.abi'), 'utf8')); @@ -118,9 +128,7 @@ class AppStore { const { countOfUploaded, totalCount } = await contractService.checkQuestions(); this.countOfQuestions = Number(totalCount); this.uploadedQuestion = Number(countOfUploaded); - // eslint-disable-next-line no-console let idx = Number(countOfUploaded) === 0 ? 1 : Number(countOfUploaded); - // eslint-disable-next-line no-async-promise-executor for (idx; idx <= totalCount; idx += 1) { // eslint-disable-next-line no-await-in-loop await contractService.sendQuestion(idx); @@ -129,6 +137,10 @@ class AppStore { return Promise.resolve(); } + /** + * add project to config and update config saved in file + * @param {object} data data about project {name, address} + */ // eslint-disable-next-line class-methods-use-this @action addProjectToList(data) { const config = JSON.parse(fs.readFileSync(path.join(ROOT_DIR, './config.json'), 'utf8')); @@ -136,16 +148,27 @@ class AppStore { fs.writeFileSync(path.join(ROOT_DIR, './config.json'), JSON.stringify(config, null, '\t')); } + /** + * Check transaction receipt + * @param {string} hash Transaction hash + * @return {Promise} Promise with interval, which resolves on succesfull receipt recieving + */ @action checkReceipt(hash) { const { Web3Service } = this.rootStore; return Web3Service.subscribeTxReceipt(hash); } + /** + * + * @param {string} text error text + * @param {number} [timeOut=3000] timeout when alert disappear + */ @action displayAlert(text, timeOut) { const { alertStore } = this.rootStore; alertStore.showAlert(text, timeOut); } + @computed get wallets() { const wallets = Object.keys(this.walletList); return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index c1f06248..f3c84430 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -33,11 +33,20 @@ class UserStore { this.password = value; } + /** + * saves v3 keystore and wallet address to store + * @param {object} wallet JSON Keystore V3 + */ @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; this.address = `0x${wallet.address}`; } + /** + * checking Ethereum balance for given address + * @param {string} address wallet adddress + * @returns {Promise} resolves with balance rounded to 5 decimal places + */ @action checkBalance(address) { const { Web3Service: { web3 } } = this.rootStore; return new Promise((resolve, reject) => { @@ -47,6 +56,7 @@ class UserStore { }); } + /** * create wallet by given password * @param {string} password password which will be used for wallet decrypting @@ -61,7 +71,7 @@ class UserStore { } = data; this.setEncryptedWallet(v3wallet); this.setWalletName(walletName); - this._mnemonic = mnemonic.split(' '); + this.setMnemonic(mnemonic); this.privateKey = privateKey; resolve(true); } else { @@ -76,17 +86,17 @@ class UserStore { * @param {string} password * @returns {Promise} resolves with {v3wallet, privateKey} */ - @action recoverWallet(password) { - const seed = this._mnemonic.join(' '); + @action recoverWallet() { + const seed = this._mnemonicRepeat.join(' '); return new Promise((resolve, reject) => { - this.rootStore.walletService.createWallet(password, seed).then((data) => { + this.rootStore.walletService.createWallet(undefined, seed).then((data) => { if (data.v3wallet) { const { v3wallet, mnemonic, privateKey, walletName, } = data; this.setEncryptedWallet(v3wallet); this.setWalletName(walletName); - this._mnemonic = mnemonic.split(' '); + this.setMnemonic(mnemonic); this.privateKey = privateKey; resolve(data); } else { @@ -103,15 +113,16 @@ class UserStore { */ @action login(password) { const { appStore } = this.rootStore; - return this.readWallet(password).then((data) => { - this.privateKey = data.privateKey; - this.setEncryptedWallet(JSON.parse(data.wallet)); - this.authorized = true; - Promise.resolve(); - }).catch(() => { - appStore.displayAlert(i18n.t('errors:wrongPassword'), 3000); - Promise.reject(); - }); + return this.readWallet(password) + .then((data) => { + this.privateKey = data.privateKey; + this.setEncryptedWallet(JSON.parse(data.wallet)); + this.authorized = true; + Promise.resolve(); + }).catch(() => { + appStore.displayAlert(i18n.t('errors:wrongPassword'), 3000); + Promise.reject(); + }); } /** @@ -196,6 +207,10 @@ class UserStore { this.balance = await web3.eth.getBalance(this.address); } + @action setMnemonic(value) { + this._mnemonic = value.split(' '); + } + @action setMnemonicRepeat(value) { this._mnemonicRepeat = value; } diff --git a/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json new file mode 100644 index 00000000..26d21971 --- /dev/null +++ b/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "9879e148-5b17-4457-aa8b-c5f0e762aa15", + "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", + "crypto": { + "ciphertext": "d27b4d33b1e205d8476f66e92857ac5966a4baf0676db6112bd0ae41ab92f598", + "cipherparams": { + "iv": "7f3686c39b21225c1132e9ddf0dd4f82" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "aa63eb8bf2d950b0dc737fa98ca42385711c3c254e5fa2bf761106379f99454c", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "3001412db0644c4296de18b6f4811719365090a5c9cb9a5f88780a75a7a8053c" + } +} \ No newline at end of file diff --git a/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json b/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json deleted file mode 100644 index c9aa6d90..00000000 --- a/src/wallets/UTC--2019-12-2T9-20-3.484000000Z--6306bf53bfcea0028a01cd63336c34d06316f589.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 3, - "id": "3c169816-8e24-41c6-90df-7f9a82eaf224", - "address": "6306bf53bfcea0028a01cd63336c34d06316f589", - "crypto": { - "ciphertext": "220a7eae5fb2de87e54bfa3fe48e8aac09a17cbac2bce8ba198949abdba94e87", - "cipherparams": { - "iv": "3765e83ac8e1aab053fa9bd181542054" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "3173abd0c03537c3d9b531a0c3e69b367ac8551e29611cf5711c709fbf4f5da7", - "n": 262144, - "r": 8, - "p": 1 - }, - "mac": "7fb59ba6cad24763071898cc7294a55a401f74d4bb8666206f8afafe28c7983d" - } -} \ No newline at end of file diff --git a/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json deleted file mode 100644 index ad90e853..00000000 --- a/src/wallets/UTC--2019-12-2T9-24-22.671000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 3, - "id": "b30b7f61-2f2f-40d8-8491-28862ace31f3", - "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", - "crypto": { - "ciphertext": "1d29a7726a2999b015f817498dd748eb2ca792a32a9abc008f178f5b01132c4b", - "cipherparams": { - "iv": "afa694cf6a300c14f12cbff7a897ae02" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "8ea0571e377c825a3abd80afcacf66ea8d012b0b06d6ad9ea1ebe9875684c6af", - "n": 262144, - "r": 8, - "p": 1 - }, - "mac": "46dbd2b3ce899c2a0f583eeb1de3339f6886a2dfff9d5ed7d458ee01d1334846" - } -} \ No newline at end of file diff --git a/src/wallets/UTC--2019-13-3T9-50-50.871000000Z--613bd00ca3a9ed0825ded12edd4ac010e54225ac.json b/src/wallets/UTC--2019-13-3T9-50-50.871000000Z--613bd00ca3a9ed0825ded12edd4ac010e54225ac.json deleted file mode 100644 index e0531582..00000000 --- a/src/wallets/UTC--2019-13-3T9-50-50.871000000Z--613bd00ca3a9ed0825ded12edd4ac010e54225ac.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 3, - "id": "2d52f1d6-ca10-4c42-9fe7-8f226e6b2674", - "address": "613bd00ca3a9ed0825ded12edd4ac010e54225ac", - "crypto": { - "ciphertext": "ccdba3169547f8d12926226fdc056111a60ec08b5690e415cbfd1e3e09a3b5af", - "cipherparams": { - "iv": "ba010ab3c1975aaa63eb1f81e93b72d1" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "1d7330450c2d56ba7934288533c32815312e719a5b7cfa397fdbda2a64e50411", - "n": 262144, - "r": 8, - "p": 1 - }, - "mac": "770cbe835226a41d5d946fd3e86faf475d4ec466066256b427a2faa9abad44fc" - } -} \ No newline at end of file diff --git a/src/wallets/UTC--2019-14-4T2-8-1.581000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-14-4T2-8-1.581000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json deleted file mode 100644 index 22957681..00000000 --- a/src/wallets/UTC--2019-14-4T2-8-1.581000000Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 3, - "id": "2460785b-645f-4a92-9829-6eb274f7774a", - "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", - "crypto": { - "ciphertext": "a5f765ba26d6a69986df2a1003297135ba03405e7b7650828156d2528468edc8", - "cipherparams": { - "iv": "ca3854ffee434e82e71f513bc62f4810" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "64baf24152f9e5f4f3f5a37d23df73da2cd03ed623ecd462199b14efa94139cf", - "n": 262144, - "r": 8, - "p": 1 - }, - "mac": "ee3df54ca95a4673cfd4bf62bb73fd81428865835547a4308ec387144e649434" - } -} \ No newline at end of file From 08576ba9cc5f524ad63e42eac9c99f7b9b67407c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 07:51:48 +0700 Subject: [PATCH 184/219] some more fixes --- .eslintrc.json | 3 ++- src/components/Alert/index.js | 8 +++---- src/index.js | 4 ++-- .../ContractService/ContractService.js | 24 ++++++++----------- src/services/Web3Service/Web3Service.js | 14 +++++++---- src/stores/AlertStore/AlertStore.js | 21 ---------------- src/stores/AlertStore/index.js | 3 --- src/stores/AppStore/AppStore.js | 12 ++++++++-- src/stores/AppStore/entities/Alert.js | 21 ++++++++++++++++ src/stores/RootStore/RootStore.js | 2 -- 10 files changed, 58 insertions(+), 54 deletions(-) delete mode 100644 src/stores/AlertStore/AlertStore.js delete mode 100644 src/stores/AlertStore/index.js diff --git a/.eslintrc.json b/.eslintrc.json index 38070616..94ab6ee6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,6 +20,7 @@ "plugins": ["react"], "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], - "no-underscore-dangle":"off" + "no-underscore-dangle":"off", + "linebreak-style": "off" } } diff --git a/src/components/Alert/index.js b/src/components/Alert/index.js index 3bfce2b0..a3f190ee 100644 --- a/src/components/Alert/index.js +++ b/src/components/Alert/index.js @@ -4,13 +4,13 @@ import { observer, inject } from 'mobx-react'; import { IconInfo, CloseIcon } from '../Icons'; import styles from './Alert.scss'; -const Alert = inject('alertStore')(observer(({ alertStore }) => ( -
+const Alert = inject('appStore')(observer(({ appStore, appStore: { alert } }) => ( +
- {alertStore.text} + {alert.text} -
diff --git a/src/index.js b/src/index.js index 2977160a..f23f7b92 100644 --- a/src/index.js +++ b/src/index.js @@ -9,10 +9,10 @@ import './i18n'; import './assets/styles/style.scss'; -const { userStore, appStore, alertStore } = rootStore; +const { userStore, appStore } = rootStore; render( - +
diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index c392a184..6315fec2 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -9,7 +9,7 @@ import { import Question from './entities/Question'; /** - * Class for forming transactions + * Class for work with contracts */ class ContractService { constructor(rootStore) { @@ -168,15 +168,6 @@ class ContractService { return data; } - /** - * getting one question - * @param {number} id id of question - * @param {string} from address who calls method - */ - async fetchQuestion(id, from) { - const data = await this.contract.methods.getQuestion(id).call({ from }); - return data; - } /** * checks count of uploaded to contract questions and total count of system questions @@ -196,13 +187,13 @@ class ContractService { */ async sendQuestion(idx) { const { - Web3Service, Web3Service: { web3 }, userStore, appStore: { password }, + Web3Service, userStore, } = this.rootStore; const sysQuestion = this.sysQuestions[idx]; // eslint-disable-next-line consistent-return - await this.getQuestion(idx).then((result) => { + await this.fetchQuestion(idx).then((result) => { if (result.caption === '') { - const { address } = userStore; + const { address, password } = userStore; const question = new Question(sysQuestion); const contractAddr = this._contract.options.address; const params = question.getUploadingParams(contractAddr); @@ -229,7 +220,12 @@ class ContractService { }); } - getQuestion(id) { + /** + * Fetching one question from contract + * @param {number} id id of question + * @returns {Object} Question data from contract + */ + fetchQuestion(id) { return this.callMethod('question', id); } diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index c1e4fb2d..df239e3f 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -4,7 +4,7 @@ import { BN } from 'ethereumjs-util'; /** * Service for working with web3 (sending signed transactions, creating transactions) */ -class web3Service { +class Web3Service { /** * @constructor * @param {string} provider - provider for this.web3 @@ -31,9 +31,13 @@ class web3Service { if (!maxGasPrice) return (Promise.resolve(gas)); return this.getGasPrice() .then((gasPrice) => { - transaction.gasPrice = new BN(gasPrice).lte(new BN(maxGasPrice)) - ? maxGasPrice - : maxGasPrice; + const minGasPrice = 10000000000; + const gp = new BN(gasPrice); + const minGp = new BN(minGasPrice); + const maxGp = new BN(maxGasPrice); + transaction.gasPrice = (gp.gte(minGp) && gp.lte(maxGp)) + ? gasPrice + : minGasPrice; return Promise.resolve(transaction.gasPrice); }) .catch(Promise.reject); @@ -93,4 +97,4 @@ class web3Service { }); } } -export default web3Service; +export default Web3Service; diff --git a/src/stores/AlertStore/AlertStore.js b/src/stores/AlertStore/AlertStore.js deleted file mode 100644 index 7e86e818..00000000 --- a/src/stores/AlertStore/AlertStore.js +++ /dev/null @@ -1,21 +0,0 @@ -import { observable, action } from 'mobx'; - -class AlertStore { - @observable text = ''; - - @observable visible = false; - - @action showAlert = (text, interval = 3000) => { - this.text = text; - this.visible = true; - setTimeout(() => { - this.visible = false; - }, interval); - } - - @action closeAlert = () => { - this.visible = false; - } -} - -export default AlertStore; diff --git a/src/stores/AlertStore/index.js b/src/stores/AlertStore/index.js deleted file mode 100644 index 8b3776d6..00000000 --- a/src/stores/AlertStore/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import AlertStore from './AlertStore'; - -export default AlertStore; diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index e2a796a0..c33aac38 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -2,6 +2,7 @@ import { observable, action, computed } from 'mobx'; import { fs, path, PATH_TO_WALLETS, ROOT_DIR, PATH_TO_CONTRACTS, } from '../../constants'; +import Alert from './entities/Alert'; class AppStore { @observable walletList = {}; @@ -18,6 +19,8 @@ class AppStore { @observable name = ''; + @observable alert = new Alert() + @observable uploadedQuestion = 0; @observable countOfQuestions = 0; @@ -164,8 +167,13 @@ class AppStore { * @param {number} [timeOut=3000] timeout when alert disappear */ @action displayAlert(text, timeOut) { - const { alertStore } = this.rootStore; - alertStore.showAlert(text, timeOut); + const { alert } = this; + alert.showAlert(text, timeOut); + } + + @action closeAlert() { + const { alert } = this; + alert.closeAlert(); } diff --git a/src/stores/AppStore/entities/Alert.js b/src/stores/AppStore/entities/Alert.js index e69de29b..98595898 100644 --- a/src/stores/AppStore/entities/Alert.js +++ b/src/stores/AppStore/entities/Alert.js @@ -0,0 +1,21 @@ +import { observable, action } from 'mobx'; + +class Alert { + @observable text = ''; + + @observable visible = false; + + @action showAlert = (text, interval = 3000) => { + this.text = text; + this.visible = true; + setTimeout(() => { + this.visible = false; + }, interval); + } + + @action closeAlert = () => { + this.visible = false; + } +} + +export default Alert; diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index b61c7a2d..1c610083 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -2,7 +2,6 @@ import { observable, action } from 'mobx'; import AppStore from '../AppStore'; import UserStore from '../UserStore'; import ProjectStore from '../ProjectStore'; -import AlertStore from '../AlertStore'; import Web3Service from '../../services/Web3Service'; import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; @@ -34,7 +33,6 @@ class RootStore { this.Web3Service = new Web3Service(config.host, this); this.appStore = new AppStore(this); this.userStore = new UserStore(this); - this.alertStore = new AlertStore(); this.walletService = new WalletService(); this.eventEmitterService = new EventEmitterService(); this.contractService = new ContractService(this); From dfa8f616c0fa8ba82156197d52654930b64b831d Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 09:33:06 +0700 Subject: [PATCH 185/219] fixed: - UserSrore - header - Heading --- src/components/Heading/Heading.scss | 4 ++-- src/components/Login/Login.scss | 5 ++++- src/components/Logo/index.js | 5 +++-- src/components/Router/SimpleRouter.js | 2 ++ src/index.js | 4 ++-- src/stores/UserStore/UserStore.js | 12 +++++++++--- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/Heading/Heading.scss b/src/components/Heading/Heading.scss index 0056e237..a205516b 100644 --- a/src/components/Heading/Heading.scss +++ b/src/components/Heading/Heading.scss @@ -3,14 +3,14 @@ .heading { text-align: center; &--main { - width: 112%; margin-bottom: 5px; color: $primary; font-weight: bold; font-size: 24px; - transform: translateX(-6%); } &--sub { + width: 70%; + margin: 0 auto; color: $secondary; font-size: 14px; } diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 5fc035d1..13dd0746 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -20,7 +20,7 @@ } } &__block { - padding: 60px 94px; + padding: 60px 44px; text-align: center; .heading { margin-bottom: 60px; @@ -41,6 +41,9 @@ margin: 42px auto 20px; } } + form, .add-project { + padding: 0 50px; + } } &__submit { text-align: center; diff --git a/src/components/Logo/index.js b/src/components/Logo/index.js index 5abbddc2..777eb181 100644 --- a/src/components/Logo/index.js +++ b/src/components/Logo/index.js @@ -1,16 +1,17 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import styles from './Logo.scss'; const Logo = () => ( // eslint-disable-next-line jsx-a11y/anchor-is-valid - + 01 ZeroOne - + ); export default Logo; diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 94e1ec92..96c9037d 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -15,9 +15,11 @@ import AddNewProject from '../AddNewProject'; import ProjectUploading from '../ProjectUploading'; import CreationAlert from '../CreationAlert'; import DisplayUserInfo from '../DisplayUserInfo'; +import Header from '../Header'; const SimpleRouter = () => ( +
diff --git a/src/index.js b/src/index.js index f23f7b92..1e96e9d0 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import rootStore from './stores/RootStore'; import Alert from './components/Alert'; -import Header from './components/Header'; +// import Header from './components/Header'; import './i18n'; import './assets/styles/style.scss'; @@ -13,7 +13,7 @@ const { userStore, appStore } = rootStore; render( -
+ , diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index f3c84430..4e8d772a 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -19,8 +19,6 @@ class UserStore { @observable _mnemonicRepeat = Array(12); - @observable address = ''; - @observable balance = 0; @observable password = ''; @@ -29,6 +27,10 @@ class UserStore { this.rootStore = rootStore; } + /** + * saves password to store for decoding wallet and transaction signing + *@param {string} value password from form + */ @action setPassword(value) { this.password = value; } @@ -39,7 +41,6 @@ class UserStore { */ @action setEncryptedWallet(wallet) { this.encryptedWallet = wallet; - this.address = `0x${wallet.address}`; } /** @@ -219,6 +220,11 @@ class UserStore { this.walletName = name; } + @computed get address() { + const { encryptedWallet } = this; + return `0x${encryptedWallet.address}`; + } + @computed get mnemonic() { return this._mnemonic; } From 944f1839bda6ea8a57af6a52848c994ddb391bba Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 09:44:31 +0700 Subject: [PATCH 186/219] New module for window-using objects and constants small fixes --- src/components/Dropdown/index.js | 3 +-- src/constants/index.js | 21 ------------------- src/constants/windowModules.js | 20 ++++++++++++++++++ .../ContractService/ContractService.js | 5 +++-- src/services/WalletService/WalletService.js | 2 +- src/stores/AppStore/AppStore.js | 2 +- src/stores/RootStore/RootStore.js | 2 +- ...cb0ecdfaaca6013327271d2b8eb71dbafabee.json | 21 ------------------- src/workers/wallet.worker.js | 4 ++-- 9 files changed, 29 insertions(+), 51 deletions(-) create mode 100644 src/constants/windowModules.js delete mode 100644 src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 1f4292ec..d7cc6e03 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -95,8 +95,7 @@ class Dropdown extends Component { Dropdown.propTypes = { children: propTypes.element, options: propTypes.arrayOf(propTypes.object).isRequired, - // eslint-disable-next-line react/forbid-prop-types - subOptions: propTypes.object, + subOptions: propTypes.shape({}), onSelect: propTypes.func.isRequired, field: propTypes.shape({ set: propTypes.func.isRequired, diff --git a/src/constants/index.js b/src/constants/index.js index d7666128..93c235b3 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -5,27 +5,6 @@ export const votingStates = { active: 2, }; -export const fs = window.require('fs'); -export const path = window.require('path'); - -const ENV = process.env.NODE_ENV || 'development'; -window.__ENV = ENV; - -const devPath = window.process.env.INIT_CWD; -const prodPath = window.process.env.PORTABLE_EXECUTABLE_DIR || path.join(window.__dirname, '../src'); - -export const ROOT_DIR = window.__ENV === 'production' - ? prodPath - : path.join(devPath, './src/'); - -export const PATH_TO_WALLETS = window.__ENV === 'production' - ? path.join(prodPath, './wallets/') - : path.join(devPath, './src/wallets/'); - -export const PATH_TO_CONTRACTS = window.__ENV === 'production' - ? path.join(prodPath, './contracts/') - : path.join(devPath, './src/contracts/'); - export const SOL_PATH_REGEXP = new RegExp(/(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')/g); export const SOL_IMPORT_REGEXP = new RegExp(/(import)*.(\"|\')((\.{1,2}\/){1,})(\w+\/){0,}?(\w+\.(?:sol))(\"|\')(;)/g); export const SOL_VERSION_REGEXP = new RegExp(/(pragma).(solidity).((\^)?)([0-9](.)?){1,}/g); diff --git a/src/constants/windowModules.js b/src/constants/windowModules.js new file mode 100644 index 00000000..e588d5e0 --- /dev/null +++ b/src/constants/windowModules.js @@ -0,0 +1,20 @@ +export const fs = window.require('fs'); +export const path = window.require('path'); + +const ENV = process.env.NODE_ENV || 'development'; +window.__ENV = ENV; + +const devPath = window.process.env.INIT_CWD; +const prodPath = window.process.env.PORTABLE_EXECUTABLE_DIR || path.join(window.__dirname, '../src'); + +export const ROOT_DIR = window.__ENV === 'production' + ? prodPath + : path.join(devPath, './src/'); + +export const PATH_TO_WALLETS = window.__ENV === 'production' + ? path.join(prodPath, './wallets/') + : path.join(devPath, './src/wallets/'); + +export const PATH_TO_CONTRACTS = window.__ENV === 'production' + ? path.join(prodPath, './contracts/') + : path.join(devPath, './src/contracts/'); diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 6315fec2..a53fde72 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -3,9 +3,10 @@ /* eslint-disable no-unused-vars */ import browserSolc from 'browser-solc'; import { BN } from 'ethereumjs-util'; +import { SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP } from '../../constants'; import { - fs, PATH_TO_CONTRACTS, path, SOL_IMPORT_REGEXP, SOL_PATH_REGEXP, SOL_VERSION_REGEXP, ROOT_DIR, -} from '../../constants'; + fs, PATH_TO_CONTRACTS, path, +} from '../../constants/windowModules'; import Question from './entities/Question'; /** diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index c35162f7..4e29e111 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -1,7 +1,7 @@ /* eslint-disable class-methods-use-this */ import WorkerWrapper from './entities/WorkerWrapper'; import WalletWorker from '../../workers/wallet.worker'; -import { fs, path, PATH_TO_WALLETS } from '../../constants'; +import { fs, path, PATH_TO_WALLETS } from '../../constants/windowModules'; const bip39 = require('bip39'); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index c33aac38..9b6c6088 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -1,7 +1,7 @@ import { observable, action, computed } from 'mobx'; import { fs, path, PATH_TO_WALLETS, ROOT_DIR, PATH_TO_CONTRACTS, -} from '../../constants'; +} from '../../constants/windowModules'; import Alert from './entities/Alert'; class AppStore { diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index 1c610083..b8299c25 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -6,7 +6,7 @@ import Web3Service from '../../services/Web3Service'; import WalletService from '../../services/WalletService'; import ContractService from '../../services/ContractService'; import EventEmitterService from '../../services/EventEmitterService'; -import { fs, path, ROOT_DIR } from '../../constants'; +import { fs, path, ROOT_DIR } from '../../constants/windowModules'; class RootStore { // stores diff --git a/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json b/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json deleted file mode 100644 index 26d21971..00000000 --- a/src/wallets/UTC--2019-11-27T09-51-30.828Z--ff2cb0ecdfaaca6013327271d2b8eb71dbafabee.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 3, - "id": "9879e148-5b17-4457-aa8b-c5f0e762aa15", - "address": "ff2cb0ecdfaaca6013327271d2b8eb71dbafabee", - "crypto": { - "ciphertext": "d27b4d33b1e205d8476f66e92857ac5966a4baf0676db6112bd0ae41ab92f598", - "cipherparams": { - "iv": "7f3686c39b21225c1132e9ddf0dd4f82" - }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "aa63eb8bf2d950b0dc737fa98ca42385711c3c254e5fa2bf761106379f99454c", - "n": 262144, - "r": 8, - "p": 1 - }, - "mac": "3001412db0644c4296de18b6f4811719365090a5c9cb9a5f88780a75a7a8053c" - } -} \ No newline at end of file diff --git a/src/workers/wallet.worker.js b/src/workers/wallet.worker.js index 11c7a830..48cd767b 100644 --- a/src/workers/wallet.worker.js +++ b/src/workers/wallet.worker.js @@ -1,9 +1,9 @@ +import { walletHdPath } from '../constants'; + const ejsWallet = require('ethereumjs-wallet'); const hdKey = require('ethereumjs-wallet/hdkey'); const bip39 = require('bip39'); -const walletHdPath = "m/44'/60'/0'/0/0"; - const createWallet = ({ id, payload: { mnemonic, password = '', action } }) => { try { const wallet = hdKey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic)) From 2b624e8da892cda882e24ff0151f60d5bd0ea7de Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 10:09:04 +0700 Subject: [PATCH 187/219] new Icons --- src/components/Icons/entities/CloseIcon.js | 32 ++++++++++++-- src/components/Icons/entities/VerifyIcon.js | 48 +++++++++++++++++++++ 2 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 src/components/Icons/entities/VerifyIcon.js diff --git a/src/components/Icons/entities/CloseIcon.js b/src/components/Icons/entities/CloseIcon.js index 9a1193d3..5883683a 100644 --- a/src/components/Icons/entities/CloseIcon.js +++ b/src/components/Icons/entities/CloseIcon.js @@ -1,9 +1,33 @@ import React from 'react'; +import PropTypes from 'prop-types'; -const CloseIcon = () => ( - - - +const CloseIcon = ({ + width, + height, + fill, +}) => ( + + + ); + +CloseIcon.propTypes = { + width: PropTypes.number, + height: PropTypes.number, + fill: PropTypes.string, +}; + +CloseIcon.defaultProps = { + width: 11, + height: 11, + fill: '#E1E4E8', +}; + export default CloseIcon; diff --git a/src/components/Icons/entities/VerifyIcon.js b/src/components/Icons/entities/VerifyIcon.js new file mode 100644 index 00000000..6b960ddb --- /dev/null +++ b/src/components/Icons/entities/VerifyIcon.js @@ -0,0 +1,48 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + + +const VerifyIcon = ({ + width, + height, + color, + strokeWidth, +}) => ( + + + + +); + +VerifyIcon.propTypes = { + width: PropTypes.number, + height: PropTypes.number, + strokeWidth: PropTypes.number, + color: PropTypes.string, +}; + +VerifyIcon.defaultProps = { + width: 32, + height: 32, + strokeWidth: 2, + color: '#000', +}; +export default VerifyIcon; From 73e64daf0d8b9eaa39545845a8611dfd46cdf887 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 10:50:04 +0700 Subject: [PATCH 188/219] tests for password validation --- package-lock.json | 24 ++--- package.json | 4 +- .../PasswordValidation.test.js | 93 +++++++++++++++++++ 3 files changed, 104 insertions(+), 17 deletions(-) create mode 100644 src/utils/PasswordValidation/PasswordValidation.test.js diff --git a/package-lock.json b/package-lock.json index 2e2f4212..efc1e078 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9529,10 +9529,9 @@ "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==" }, "handlebars": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", - "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", - "dev": true, + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", "requires": { "neo-async": "^2.6.0", "optimist": "^0.6.1", @@ -9543,8 +9542,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -13574,7 +13572,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" @@ -13583,8 +13580,7 @@ "minimist": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" } } }, @@ -18831,7 +18827,6 @@ "version": "3.6.8", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz", "integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==", - "dev": true, "requires": { "commander": "~2.20.3", "source-map": "~0.6.1" @@ -18840,14 +18835,12 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -20352,8 +20345,7 @@ "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" }, "worker-farm": { "version": "1.7.0", diff --git a/package.json b/package.json index 6db0ec3c..8c5fc170 100644 --- a/package.json +++ b/package.json @@ -138,6 +138,8 @@ "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy", "\\.(css|less|scss|sss|styl)$": "/node_modules/jest-css-modules" }, - "setupFilesAfterEnv": ["/src/setupTests.js"] + "setupFilesAfterEnv": [ + "/src/setupTests.js" + ] } } diff --git a/src/utils/PasswordValidation/PasswordValidation.test.js b/src/utils/PasswordValidation/PasswordValidation.test.js new file mode 100644 index 00000000..aec0e77c --- /dev/null +++ b/src/utils/PasswordValidation/PasswordValidation.test.js @@ -0,0 +1,93 @@ +import passwordValidation from './index'; + + +describe('test for password validation', () => { + test('password T3sting!', () => { + const validity = passwordValidation('T3sting!'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password 123!@#qweQWE', () => { + const validity = passwordValidation('123!@#qweQWE'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password T3st!ng', () => { + const validity = passwordValidation('T3st!ng'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password t3sT!ng!', () => { + const validity = passwordValidation('t3sT!ng!'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password T#st1ng', () => { + const validity = passwordValidation('T#st1ng'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(false); + expect(validity.Length).toBe(true); + }); + test('password !@#qwe123QWE', () => { + const validity = passwordValidation('!@#qwe123QWE'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password qwe123QWE', () => { + const validity = passwordValidation('qwe123QWE'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(false); + expect(validity.Length).toBe(true); + }); + test('password QWE123QWE', () => { + const validity = passwordValidation('QWE123QWE'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(false); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(false); + expect(validity.Length).toBe(true); + }); + test('password testtin!', () => { + const validity = passwordValidation('testtin!'); + expect(validity.High).toBe(false); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(false); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password !qwe1!2', () => { + const validity = passwordValidation('!qwe1!2'); + expect(validity.High).toBe(false); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(true); + }); + test('password !@Qq2', () => { + const validity = passwordValidation('!@Qq2'); + expect(validity.High).toBe(true); + expect(validity.Low).toBe(true); + expect(validity.Num).toBe(true); + expect(validity.Char).toBe(true); + expect(validity.Length).toBe(false); + }); +}); From b453537a423d7f57d0b49a11725cb484511277f8 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 15:40:41 +0700 Subject: [PATCH 189/219] remaked combining function to recursive --- src/contracts/Project/Project.sol | 1 - src/contracts/Voter/VoterBase.sol | 1 - src/contracts/Voter/output.sol | 917 ------------------ .../ContractService/ContractService.js | 67 +- .../PasswordValidation.test.js | 1 + 5 files changed, 47 insertions(+), 940 deletions(-) delete mode 100644 src/contracts/Voter/output.sol diff --git a/src/contracts/Project/Project.sol b/src/contracts/Project/Project.sol index 1e8a08a1..b27720b0 100644 --- a/src/contracts/Project/Project.sol +++ b/src/contracts/Project/Project.sol @@ -1,6 +1,5 @@ pragma solidity 0.5; - contract Project { uint public test; diff --git a/src/contracts/Voter/VoterBase.sol b/src/contracts/Voter/VoterBase.sol index e532891b..8297ee95 100644 --- a/src/contracts/Voter/VoterBase.sol +++ b/src/contracts/Voter/VoterBase.sol @@ -9,7 +9,6 @@ import "../IERC20.sol"; - /** * @title VoterBase * @dev an base difinitions for voter diff --git a/src/contracts/Voter/output.sol b/src/contracts/Voter/output.sol deleted file mode 100644 index 1cc4a848..00000000 --- a/src/contracts/Voter/output.sol +++ /dev/null @@ -1,917 +0,0 @@ -pragma solidity ^0.4.24; - - - - - - -library QuestionGroups { - - enum GroupType { - // system group - SYSTEM, - // user group - CUSTOM - } - - struct Group { - // group type - GroupType groupType; - // group name - string name; - } - - struct List { - uint groupIdIndex; - mapping (bytes32 => uint) uniqNames; - mapping (uint => Group) group; - } - - function init(List storage _self) internal { - _self.groupIdIndex = 1; - Group memory systemGroup = Group({ - name: 'Системные', - groupType: GroupType.SYSTEM - }); - save(_self, systemGroup); - Group memory otherGroup = Group({ - name: "Другие", - groupType: GroupType.CUSTOM - }); - save(_self, otherGroup); - } - - function save(List storage _self, Group memory _group) internal returns (uint id) { - bytes32 name = keccak256(abi.encodePacked(_group.name)); - uint groupId = _self.groupIdIndex; - require(!exists(_self, name), "provided group already exists"); - _self.group[groupId] = _group; - _self.uniqNames[name] = groupId; - _self.groupIdIndex++; - return groupId; - } - - function exists(List storage _self, bytes32 _name) internal view returns (bool) { - return _self.uniqNames[_name] != 0; - } - -} - - - - -library UserGroups { - - enum GroupStatus { - // deleted or inactive question - INACTIVE, - // active question - ACTIVE - } - - struct UserGroup { - string name; - string groupType; - GroupStatus status; - address groupAddr; - } - - struct List { - uint groupIdIndex; - mapping (bytes32 => uint) uniqNames; - mapping (uint => string) names; - mapping (uint => UserGroup) group; - } - - function init(List storage _self, address _ERC20) internal { - _self.groupIdIndex = 1; - UserGroup memory group = UserGroup({ - name: "Owner", - groupType: "ERC20", - status: GroupStatus.ACTIVE, - groupAddr: _ERC20 - }); - save(_self, group); - } - - function save(List storage _self, UserGroup memory _group) internal returns (uint id) { - bytes32 key = keccak256(abi.encodePacked(_group.name)); - string memory name = _group.name; - uint groupId = _self.groupIdIndex; - require(!exists(_self, key), "provided group already exists"); - _self.names[groupId] = name; - _self.group[groupId] = _group; - _self.uniqNames[key] = groupId; - _self.groupIdIndex++; - return groupId; - } - - function exists(List storage _self, bytes32 _name) internal view returns (bool) { - return _self.uniqNames[_name] != 0; - } - -} - - - - -library Questions { - - enum Status { - // deleted or inactive question - INACTIVE, - // active question - ACTIVE - } - - struct Question { - // question group id - uint groupId; - // question status - Status status; - // question name - string caption; - // question description - string text; - // question length in minutes - uint time; - // target address - address target; - // method to be called - bytes4 methodSelector; - uint[] formula; - bytes32[] parameters; - } - - struct List { - uint questionIdIndex; - mapping (bytes32 => uint) uniqNames; - mapping (uint => Question) question; - } - - function init(List storage _self) internal { - _self.questionIdIndex = 1; - } - - function save(List storage _self, Question memory _question, uint _id) internal returns (uint id) { - bytes32 name = keccak256(abi.encodePacked(_question.caption)); - uint questionId = _self.questionIdIndex; - require(!exists(_self, name), "provided group already exists"); - _self.question[_id] = _question; - _self.uniqNames[name] = questionId; - _self.questionIdIndex++; - return questionId; - } - - function exists(List storage _self, bytes32 _name) internal view returns (bool) { - return _self.uniqNames[_name] != 0; - } - -} - - - -library Votings { - - enum Status {ACTIVE, ENDED} - - struct Voting { - // ? question id used for vote - uint questionId; - // ? vote status - Status status; - // ? group of users, who started vote - uint starterGroup; - // ? user, who started the voting - address starterAddress; - // ? block when voting was started - uint startTime; - uint endTime; - // ? contains pairs of (address => vote) for every user - mapping (address=> mapping(address => uint)) votes; - - // contains total weights for voting variants - mapping (address=> mapping(address => uint256)) voteWeigths; - mapping (uint=> mapping(string => uint256)) descisionWeights; - mapping (address=> mapping (address=>uint256)) tokenReturns; - - bytes data; - } - - struct List { - uint votingIdIndex; - mapping (uint => Voting) voting; - mapping (uint => uint) descision; - } - - function init(List storage _self) internal { - _self.votingIdIndex = 1; - } - - - function save(List storage _self, Voting memory _voting) internal returns (uint id) { - uint votingId = _self.votingIdIndex; - _self.voting[votingId] = _voting; - _self.votingIdIndex++; - return votingId; - } - - function close(List storage _self) internal { - uint votingId = _self.votingIdIndex - 1; - _self.voting[votingId].status = Status.ENDED; - } - -} - - - - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. Does not include - * the optional functions; to access them see `ERC20Detailed`. - */ -interface IERC20 { - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - /** - * @dev Returns the amount of tokens in existence. - */ - function name() external view returns (string); - /** - * @dev Returns the amount of tokens in existence. - */ - function symbol() external view returns (string); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a `Transfer` event. - */ - function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through `transferFrom`. This is - * zero by default. - * - * This value changes when `approve` or `transferFrom` are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * > Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an `Approval` event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a `Transfer` event. - */ - function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); - - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to `approve`. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); -} - - - - -/** - * @title VoterInterface - * @dev an interface for voter - */ -interface VoterInterface { - // LIBRARIES - using QuestionGroups for QuestionGroups.List; - using Questions for Questions.List; - using Votings for Votings.List; - using UserGroups for UserGroups.List; - - - // DIFINTIONS - // new question added event - event NewQuestion( - uint groupId, - Questions.Status status, - string caption, - string text, - uint time, - address target, - bytes4 methodSelector - ); - // new Votings added event - event NewVoting( - uint id, - uint questionId, - Votings.Status status, - uint starterGroup, - address starterAddress, - uint startblock - ); - - // METHODS - /* - * @notice adds new question to question library - * @param _ids question group id - * @param _status question status - * @param _caption question name - * @param _text question description - * @param _time question length - * @param _target target address to call - * @param _methodSelector method to call - * @param _formula voting formula - * @param _parameters parameters of inputs - * return new question id - */ - function saveNewQuestion( - uint[] _idsAndTime, - Questions.Status _status, - string _caption, - string _text, - address _target, - bytes4 _methodSelector, - uint[] _formula, - bytes32[] _parameters - ) external returns (bool _saved); - - /** - * @notice adds new question to question library - * @param _name question group name - * @return new question id - */ - function saveNewGroup( - string _name - ) external returns (uint id); - - /** - * @notice gets question data - * @param _id question id - * @return question data - */ - function question( - uint _id - ) external view returns ( - uint groupId, - Questions.Status status, - string memory caption, - string memory text, - uint time, - address target, - bytes4 methodSelector, - uint[] memory _formula, - bytes32[] memory _parameters - ); - - function getCount() external returns (uint length); - - function startNewVoting( - uint questionId, - Votings.Status status, - uint starterGroup, - bytes data - ) external returns (bool); - - function voting(uint id) external view returns ( - uint questionId, - Votings.Status status, - string memory caption, - string memory text, - uint startTime, - uint endTime, - bytes data - ); - function getVotingsCount() external view returns (uint length); -} - - - - - - -/** - * @title VoterBase - * @dev an base difinitions for voter - */ -contract VoterBase is VoterInterface { - - Questions.List public questions; - QuestionGroups.List public groups; - Votings.List public votings; - UserGroups.List public userGroups; - - IERC20 public ERC20; - - constructor() public { - questions.init(); - groups.init(); - votings.init(); - } - - // METHODS - function setERC20(address _address) public { - ERC20 = IERC20(_address); - userGroups.init(_address); - } - - /* - * @notice creates new question to saveNewQuestion function - * @param _groupId question group id - * @param _status question status - * @param _caption question name - * @param _text question description - * @param _time question length - * @param _target target address to call - * @param _methodSelector method to call - * @param _formula voting formula - * @param _parameters parameters of inputs - * @return new question id - */ - function createNewQuestion( - uint[] memory _idsAndTime, - Questions.Status _status, - string memory _caption, - string memory _text, - address _target, - bytes4 _methodSelector, - uint[] memory _formula, - bytes32[] memory _parameters - ) private returns (Questions.Question memory _question) { - Questions.Question memory question = Questions.Question({ - groupId: _idsAndTime[1], - status: _status, - caption: _caption, - text: _text, - time: _idsAndTime[2], - target: _target, - methodSelector: _methodSelector, - formula: _formula, - parameters: _parameters - }); - questions.save(question, _idsAndTime[0]); - - emit NewQuestion( _idsAndTime[1], _status, _caption, _text, _idsAndTime[0], _target, _methodSelector ); - return question; - } - - /* - * @notice adds new question to question library - * @param _groupId question group id - * @param _status question status - * @param _caption question name - * @param _text question description - * @param _time question length - * @param _target target address to call - * @param _methodSelector method to call - * @param _formula voting formula - * @param _parameters parameters of inputs - * @return new question id - */ - function saveNewQuestion( - uint[] _idsAndTime, - Questions.Status _status, - string _caption, - string _text, - address _target, - bytes4 _methodSelector, - uint[] _formula, - bytes32[] _parameters - - ) external returns (bool _saved){ - Questions.Question memory question = createNewQuestion( - _idsAndTime, - _status, - _caption, - _text, - _target, - _methodSelector, - _formula, - _parameters - ); - return true; - } - - - /** - * @notice adds new question to question library - * @param _name question group name - * @return new question id - */ - function saveNewGroup( - string _name - ) external returns (uint id) { - QuestionGroups.Group memory group = QuestionGroups.Group({ - name: _name, - groupType: QuestionGroups.GroupType.CUSTOM - }); - id = groups.save(group); - return id; - } - - function getCount() external returns (uint length) { - uint count = questions.questionIdIndex; - return count; - } - - /** - * @notice gets question data - * @param _id question id - * @return question data - */ - function question(uint _id) public view returns ( - uint groupId, - Questions.Status status, - string memory caption, - string memory text, - uint time, - address target, - bytes4 methodSelector, - uint[] memory _formula, - bytes32[] memory _parameters - ) { - uint id = _id; - return ( - questions.question[id].groupId, - questions.question[id].status, - questions.question[id].caption, - questions.question[id].text, - questions.question[id].time, - questions.question[id].target, - questions.question[id].methodSelector, - questions.question[id].formula, - questions.question[id].parameters - ); - } - - function getQuestionGroup(uint _id) public view returns ( - string name, - QuestionGroups.GroupType groupType - ) { - return ( - groups.group[_id].name, - groups.group[_id].groupType - ); - } - - function getQuestionGroupsLength() public view returns (uint length) { - return groups.groupIdIndex ; - } - function getUserGroup(uint _id) public view returns ( - string name, - string groupType, - UserGroups.GroupStatus status, - address groupAddress - ) { - return ( - userGroups.group[_id].name, - userGroups.group[_id].groupType, - userGroups.group[_id].status, - userGroups.group[_id].groupAddr - ); - } - - function getUserGroupsLength() public view returns (uint length) { - return userGroups.groupIdIndex ; - } - - function isActiveVoting() public view returns (bool) { - - } - - /** - * @notice adds new voting to voting library - * @param _questionId question id - * @param _status voting status - * @param _starterGroup group which started voting - * @return new voting id - */ - - function startNewVoting( - uint _questionId, - Votings.Status _status, - uint _starterGroup, - bytes _data - ) external returns (bool) { - bool canStart; - uint votingId = votings.votingIdIndex - 1; - if ( - ((votings.votingIdIndex == 1) && (votings.voting[votingId].status == Votings.Status.ACTIVE)) - || (!(votings.votingIdIndex == 1) && !(votings.voting[votingId].status == Votings.Status.ACTIVE))) { - canStart = true; - uint start = block.timestamp; - uint _endTime = start + (questions.question[_questionId].time * 60); - Votings.Voting memory voting = Votings.Voting({ - questionId: _questionId, - status: _status, - starterGroup: _starterGroup, - starterAddress: msg.sender, - startTime: block.timestamp, - endTime: _endTime, - data: _data - }); - - uint id = votings.save(voting); - - emit NewVoting ( - id, - _questionId, - _status, - _starterGroup, - msg.sender, - block.number - ); - } else { - canStart = false; - } - return canStart; - } - - function voting(uint _id) external view returns ( - uint id, - Votings.Status status, - string memory caption, - string memory text, - uint startTime, - uint endTime, - bytes data - ){ - uint votingId = _id; - uint questionId = votings.voting[_id].questionId; - return ( - votings.voting[votingId].questionId, - votings.voting[votingId].status, - questions.question[questionId].caption, - questions.question[questionId].text, - votings.voting[votingId].startTime, - votings.voting[votingId].endTime, - votings.voting[votingId].data - ); - } - - function getVotingsCount() external view returns (uint count) { - return votings.votingIdIndex; - } - - function getVotingDescision(uint _id) external view returns (uint result) { - return votings.descision[_id]; - } - - function closeVoting() external { - uint votingId = votings.votingIdIndex - 1; - uint questionId = votings.voting[votingId].questionId; - uint[] storage formula = questions.question[questionId].formula; - - uint votingCondition = formula[2]; // 1 - positive, 0 - quorum - uint sign = formula[3]; // 1 - >=, 2 - <= - uint percent = formula[4]; - uint quorumPercent; - uint modificator; // modificator of votingCondition: 1 - of all, 0 - of quorum - - string memory groupName = userGroups.names[formula[1]]; - IERC20 group = IERC20(userGroups.group[formula[1]].groupAddr); - uint256 positiveVotes = votings.voting[votingId].descisionWeights[1][groupName]; - uint256 negativeVotes = votings.voting[votingId].descisionWeights[2][groupName]; - uint256 totalSupply = group.totalSupply(); - - if (formula[5] != 0) { // if modificator exists in question - modificator = formula[5]; - } else { - modificator = 0; - } - - - if (votingCondition == 0) { - // if condition == quorum - quorumPercent = (positiveVotes + negativeVotes) * 100 / totalSupply; - } else if (votingCondition == 1) { - // else if condition == positive - if (modificator == 0) { - // of quorum - quorumPercent = (positiveVotes * 100 / (positiveVotes + negativeVotes) ); - } else if (modificator == 1) { - // of all - quorumPercent = ( positiveVotes * 100 / totalSupply ); - } - } - - if (sign == 1) { - // if >= - if (quorumPercent >= percent) { - if (positiveVotes > negativeVotes) { - votings.descision[votingId] = 1; - address(this).call(votings.voting[votingId].data); - } else if (positiveVotes < negativeVotes) { - votings.descision[votingId] = 2; - } else if (positiveVotes == negativeVotes) { - votings.descision[votingId] = 0; - } - } - } else if (sign == 0) { - //if <= - if (quorumPercent <= percent) { - if (positiveVotes > negativeVotes) { - votings.descision[votingId] = 1; - address(this).call(votings.voting[votingId].data); - } else if (positiveVotes < negativeVotes) { - votings.descision[votingId] = 2; - } else if (positiveVotes == negativeVotes) { - votings.descision[votingId] = 0; - } - } - } - - - votings.voting[votingId].status = Votings.Status.ENDED; - } - - - function getVotes(uint _votingId) external view returns (uint256[3] memory _votes) { - uint questionId = votings.voting[_votingId].questionId; - uint groupId = questions.question[questionId].groupId; - string memory groupName = userGroups.names[groupId]; - IERC20 group = IERC20(userGroups.group[groupId].groupAddr); - uint256[3] memory votes; - votes[0] = votings.voting[_votingId].descisionWeights[1][groupName]; - votes[1] = votings.voting[_votingId].descisionWeights[2][groupName]; - votes[2] = group.totalSupply(); - return votes; - } - - function returnTokens(uint votingId) public returns (bool status){ - uint questionId = votings.voting[votingId].questionId; - uint groupId = questions.question[questionId].groupId; - string memory groupType = userGroups.group[groupId].groupType; - IERC20 group = IERC20(userGroups.group[groupId].groupAddr); - uint256 weight = votings.voting[votingId].voteWeigths[address(group)][msg.sender]; - bool isReturned = this.isUserReturnTokens(votingId, msg.sender); - - if (!isReturned) { - if( bytes4(keccak256(groupType)) == bytes4(keccak256("ERC20"))) { - group.transfer(msg.sender, weight); - } else { - group.transferFrom(address(this), msg.sender, weight); - } - votings.voting[votingId].tokenReturns[address(group)][msg.sender] = weight; - } - return true; - } - - function isUserReturnTokens(uint votingId, address user) returns (bool result) { - uint questionId = votings.voting[votingId].questionId; - uint groupId = questions.question[questionId].groupId; - string memory groupType = userGroups.group[groupId].groupType; - IERC20 group = IERC20(userGroups.group[groupId].groupAddr); - uint256 returnedTokens = votings.voting[votingId].tokenReturns[address(group)][user]; - return returnedTokens > 0; - } - - - function findUserGroup(address user) external returns (uint) { - uint votingIndex = votings.votingIdIndex - 1; - uint questionId = votings.voting[votingIndex].questionId; - uint groupId = questions.question[questionId].groupId; - IERC20 group = IERC20(userGroups.group[groupId].groupAddr); - uint256 balance = group.balanceOf(user); - uint index = 0; - if (balance != 0 ) { - index = groupId; - } - return index; - } - - - function sendVote(uint _choice) external returns (uint result, uint256 votePos, uint256 voteNeg) { - uint _voteId = votings.votingIdIndex - 1; - uint timestamp = votings.voting[_voteId].endTime; - uint questionId = votings.voting[_voteId].questionId; - uint groupId = questions.question[questionId].groupId; - string memory groupName = userGroups.names[groupId]; - uint index = this.findUserGroup(msg.sender); - IERC20 group = IERC20(userGroups.group[index].groupAddr); - uint256 balance = group.balanceOf(msg.sender); - - if (block.timestamp < timestamp ) { - if ( balance != 0) { - if (votings.voting[_voteId].votes[address(group)][msg.sender] == 0) { - group.transferFrom(msg.sender, address(this), balance); - votings.voting[_voteId].votes[address(group)][msg.sender] = _choice; - votings.voting[_voteId].voteWeigths[address(group)][msg.sender] = balance; - votings.voting[_voteId].descisionWeights[_choice][groupName] += balance; - } - } - } else { - this.closeVoting(); - } - return ( - votings.voting[_voteId].votes[address(group)][msg.sender] = _choice, - votings.voting[_voteId].descisionWeights[1][groupName], - votings.voting[_voteId].descisionWeights[2][groupName] - ); - } - - function getERCAddress() external view returns (address _address) { - return address(ERC20); - } - - function getUserBalance() external view returns (uint256 balance) { - uint256 _balance = ERC20.balanceOf(msg.sender); - return _balance; - } - - function getERCTotal() external view returns (uint256 balance) { - return ERC20.totalSupply(); - } - - function getERCSymbol() external view returns (string symbol) { - return ERC20.symbol(); - } - - function getUserVote(uint _voteId) external view returns (uint vote) { - uint questionId = votings.voting[_voteId].questionId; - uint groupId = questions.question[questionId].groupId; - IERC20 group = IERC20(userGroups.group[groupId].groupAddr); - return votings.voting[_voteId].votes[address(group)][msg.sender]; - } - - function getUserWeight() external view returns (uint256 weight) { - uint _voteId = votings.votingIdIndex - 1; - return votings.voting[_voteId].voteWeigths[address(ERC20)][msg.sender]; - } - - function transferERC20(address _who, uint256 _value) external returns (uint256 newBalance) { - ERC20.transferFrom(msg.sender, _who, _value); - return ERC20.balanceOf(msg.sender); - } - - function addresses() external view returns (address user, address instance) { - return ( - msg.sender, - address(this) - ); - } - - function saveNewUserGroup (string _name, address _address, string _type) external { - UserGroups.UserGroup memory userGroup = UserGroups.UserGroup({ - name: _name, - groupType: _type, - status: UserGroups.GroupStatus.ACTIVE, - groupAddr: _address - }); - userGroups.save(userGroup); - } - - function setCustomGroupAdmin(address group, address admin) external returns (bool) { - require(group.call( bytes4( keccak256("setAdmin(address)")), admin)); - return true; - } -} - - - -contract Voter is VoterBase { - - IERC20 public ERC20; - - constructor(address _address) public { - // implement contract deploy - // set erc20 token here - setERC20(_address); - } - - -} diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index a53fde72..8387ca99 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -45,6 +45,8 @@ class ContractService { : ':Voter'; window.BrowserSolc.loadVersion(version, (compiler) => { const compiledContract = compiler.compile(contract); + // eslint-disable-next-line no-console + console.log(compiledContract); const contractData = compiledContract.contracts[contractName]; if (contractData.interface !== '') { const { bytecode, metadata } = contractData; @@ -63,34 +65,57 @@ class ContractService { */ // eslint-disable-next-line class-methods-use-this combineContract(type) { - let imports; - const files = {}; + const importedFiles = {}; const dir = type === 'ERC20' ? './' : './Voter/'; const compiler = 'pragma solidity ^0.4.24;'; - let mainContract = type === 'ERC20' - ? fs.readFileSync(path.join(PATH_TO_CONTRACTS, `${dir}ERC20.sol`), 'utf8') - : fs.readFileSync(path.join(PATH_TO_CONTRACTS, `${dir}Voter.sol`), 'utf8'); - while (mainContract.match(SOL_IMPORT_REGEXP)) { - imports = mainContract.match(SOL_PATH_REGEXP); - imports.forEach((name) => { - let file = name; - file = file.replace(new RegExp(/(\'|\")/g), ''); - const absolutePath = path.join(PATH_TO_CONTRACTS, `${dir}${file}`); + const getImports = (file) => { + const files = file.match(SOL_PATH_REGEXP); + return files ? files.map((singleFile) => singleFile.replace(new RegExp(/(\'|\")/g), '')) : []; + }; + + const readFile = (src) => { + // eslint-disable-next-line no-console + console.log(`%c${src}`, 'color: green; font-size:14px;'); + // read file by given src + let mainImport = fs.readFileSync(src, 'utf8'); + // getting the list of files, which will be imported + const importList = getImports(mainImport); + // finding the folder, which contains file with given src + const currentFolder = src.replace(/(((\.\/|\.\.\/)).{1,})*([a-zA-z0-9])*(\.sol)/g, ''); - if (!files[absolutePath]) { - let addSol = fs.readFileSync(absolutePath, 'utf8'); - addSol = addSol.replace(addSol.match(SOL_VERSION_REGEXP), ''); - mainContract = mainContract.replace(mainContract.match(SOL_IMPORT_REGEXP)[0], addSol); - files[absolutePath] = true; + importList.forEach((file) => { + // read file, which contains in list of imports + const pathToFile = path.join(currentFolder, file); + if (!importedFiles[pathToFile]) { + // if file not imported already reads the file and deleting compiler version + const includedFile = (readFile(pathToFile)).replace(SOL_VERSION_REGEXP, ''); + if (mainImport.match(SOL_IMPORT_REGEXP)) { + // if main file contains import - replacing this import by content of imported file + mainImport = mainImport.replace(mainImport.match(SOL_IMPORT_REGEXP)[0], includedFile); + } + // marking that we succesfully import this file + importedFiles[pathToFile] = true; } else { - mainContract = mainContract.replace(mainContract.match(SOL_IMPORT_REGEXP)[0], ''); + // if file already imported, just delete matched file import declaration + mainImport = mainImport.replace(mainImport.match(SOL_IMPORT_REGEXP)[0], ''); + // eslint-disable-next-line no-console + console.log(`%c${src} %carlerady imported`, 'color: green; font-size:14px;', 'color: red; font-size:16px;'); } }); - } - mainContract = mainContract.replace(SOL_VERSION_REGEXP, compiler); - mainContract = mainContract.replace(new RegExp(/(calldata)/g), ''); - return mainContract; + + return mainImport; + }; + + const pathToMainFile = type === 'ERC20' + ? path.join(PATH_TO_CONTRACTS, `${dir}ERC20.sol`) + : path.join(PATH_TO_CONTRACTS, `${dir}Voter.sol`); + + let output = readFile(pathToMainFile); + + output = output.replace(SOL_VERSION_REGEXP, compiler); + output = output.replace(/(calldata)/g, ''); + return output; } /** diff --git a/src/utils/PasswordValidation/PasswordValidation.test.js b/src/utils/PasswordValidation/PasswordValidation.test.js index aec0e77c..bab4dfc6 100644 --- a/src/utils/PasswordValidation/PasswordValidation.test.js +++ b/src/utils/PasswordValidation/PasswordValidation.test.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ import passwordValidation from './index'; From ebfb8fd5b2369001cf72cfdafeed7a7cfdaef0da Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 16:18:17 +0700 Subject: [PATCH 190/219] fixed bug with clearing dropdown on unmount --- src/components/Dropdown/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index d7cc6e03..9f2c2a75 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -10,7 +10,6 @@ class Dropdown extends Component { this.state = { opened: false, selectedValue: '', - selectedLabel: '', }; this.setWrapperRef = this.setWrapperRef.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); @@ -40,7 +39,6 @@ class Dropdown extends Component { handleSelect = (selected) => { const { onSelect, field } = this.props; this.setState({ - selectedLabel: selected, selectedValue: selected, }); field.set(selected); @@ -58,7 +56,7 @@ class Dropdown extends Component { const { children, options, field, subOptions, } = this.props; - const { opened, selectedLabel, selectedValue } = this.state; + const { opened, selectedValue } = this.state; const getOptions = options.map((option) => ( {children ? {children} : ''} - {selectedLabel || field.placeholder } + {field.value || field.placeholder } From c3a4082e8368abba511b9523279fae5b9e4f440c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Thu, 28 Nov 2019 19:16:23 +0700 Subject: [PATCH 191/219] fixed promise premature execution --- .../CreateNewProjectWithoutTokens/index.js | 6 +++++- src/services/ContractService/ContractService.js | 15 +++++++++------ src/services/Web3Service/Web3Service.js | 6 +----- src/stores/AppStore/AppStore.js | 8 ++++---- src/stores/UserStore/UserStore.js | 2 ++ 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 800a6a64..d575dbb9 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -118,7 +118,11 @@ class CreateNewProjectWithoutTokens extends Component { const { steps } = this; const { appStore } = this.props; appStore.deployContract('ERC20', deployArgs, password) - .then((txHash) => appStore.checkReceipt(txHash)) + .then((txHash) => { + // eslint-disable-next-line no-console + console.log(txHash); + return appStore.checkReceipt(txHash); + }) .then((receipt) => { this.setState({ currentStep: steps.tokenCreated, diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 8387ca99..2160e14b 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -145,12 +145,15 @@ class ContractService { gasPrice: maxGasPrice, }; - return new Promise((resolve) => { - Web3Service.createTxData(address, tx, maxGasPrice) - .then((formedTx) => userStore.singTransaction(formedTx, password)) - .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) - .then((txHash) => resolve(txHash)); - }); + + return Web3Service.createTxData(address, tx, maxGasPrice) + .then((formedTx) => userStore.singTransaction(formedTx, password)) + .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) + .then((txHash) => { + // eslint-disable-next-line no-console + console.log('wwpw'); + Promise.resolve(txHash); + }); } /** diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index df239e3f..5b43e502 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -43,11 +43,7 @@ class Web3Service { .catch(Promise.reject); }) // eslint-disable-next-line no-unused-vars - .then((gasPrice) => { - // eslint-disable-next-line no-console - console.log(gasPrice); - return { ...transaction, gasPrice }; - }) + .then((gasPrice) => (transaction)) .catch((err) => Promise.reject(err)); } diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 9b6c6088..0eb98be5 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -77,12 +77,12 @@ class AppStore { */ @action deployContract(type, deployArgs, password) { const { contractService } = this.rootStore; - return contractService.compileContract(type) - .then(({ bytecode, abi }) => { - (contractService.deployContract({ + return new Promise(() => { + contractService.compileContract(type) + .then(({ bytecode, abi }) => contractService.deployContract({ type, deployArgs, bytecode, abi, password, })); - }); + }); } /** diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 4e8d772a..5be64391 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -174,6 +174,8 @@ class UserStore { * @return Signed TX data */ @action singTransaction(data, password) { + // eslint-disable-next-line no-console + console.log('start'); return new Promise((resolve) => { // eslint-disable-next-line consistent-return this.readWallet(password).then((info) => { From 0c0af70fd445af93269ab1b98feb3f4229e8ec97 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 10:16:04 +0700 Subject: [PATCH 192/219] Code styling fixes --- src/components/Button/Button.scss | 14 ++++--------- .../CreateNewProjectWithoutTokens/index.js | 6 +----- src/components/Dropdown/Dropdown.scss | 13 ++++++------ src/components/Dropdown/index.js | 1 - src/components/DropdownOption/index.js | 1 - src/components/Header/Header.scss | 4 ++++ src/components/Heading/index.js | 1 + src/components/Hint/Hint.scss | 2 ++ .../Icons/entities/CreateTokenIcon.js | 1 + .../Icons/entities/QuestionUploadingIcon.js | 1 + .../Icons/entities/TokenNameIcon.js | 1 + src/components/Icons/entities/TxHashIcon.js | 1 + src/components/Icons/entities/VerifyIcon.js | 1 - src/components/Indicator/Indicator.scss | 1 + src/components/Indicator/index.js | 1 + src/components/Input/index.js | 1 + src/components/LangSwitcher/LangSwitcher.scss | 5 ++++- src/components/Loader/Loader.scss | 2 ++ src/components/Login/Login.scss | 20 +++++++++++++++++-- src/components/Logo/Logo.scss | 3 +++ src/components/Logo/index.js | 1 + .../ProjectUploading/ProgressBlock/index.js | 2 +- src/components/ProjectUploading/index.js | 1 + src/components/Router/SimpleRouter.js | 1 + src/components/ShowSeed/index.js | 1 + src/components/User/index.js | 1 + src/electron.js | 1 - src/index.test.js | 3 +-- src/models/FormModel/index.js | 2 -- .../ContractService/ContractService.js | 20 ++----------------- src/stores/AppStore/AppStore.js | 1 - src/stores/UserStore/UserStore.js | 3 --- .../PasswordValidation.test.js | 1 - src/utils/PasswordValidation/index.js | 1 - 34 files changed, 62 insertions(+), 57 deletions(-) diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 0d2c227d..783b9554 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -9,11 +9,6 @@ outline: none; cursor: pointer; transition: 0.2s linear; - &>* { - margin: 0; - padding: 0; - } - svg, &__icon, &__text { @@ -26,6 +21,7 @@ transition: 0.2s; } } + &__icon { svg { margin-right: 10px; @@ -171,15 +167,13 @@ display: block; width: 100%; } + &--240 { width: 240px; } + &--310 { width: 310px; } } -.icon--top{ - svg { - width: 100%; - } -} + diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index d575dbb9..800a6a64 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -118,11 +118,7 @@ class CreateNewProjectWithoutTokens extends Component { const { steps } = this; const { appStore } = this.props; appStore.deployContract('ERC20', deployArgs, password) - .then((txHash) => { - // eslint-disable-next-line no-console - console.log(txHash); - return appStore.checkReceipt(txHash); - }) + .then((txHash) => appStore.checkReceipt(txHash)) .then((receipt) => { this.setState({ currentStep: steps.tokenCreated, diff --git a/src/components/Dropdown/Dropdown.scss b/src/components/Dropdown/Dropdown.scss index 4c7fd9a6..002e8db2 100644 --- a/src/components/Dropdown/Dropdown.scss +++ b/src/components/Dropdown/Dropdown.scss @@ -6,6 +6,7 @@ background: transparent; outline: none; } + &__head { position: relative; width: 100%; @@ -35,8 +36,8 @@ } } } - } + &__arrow { position: absolute; top: 50%; @@ -52,6 +53,7 @@ } } } + &__icon { position: relative; display: inline-block; @@ -70,6 +72,7 @@ content: ""; } } + &__selected { display: inline-block; max-width: 80%; @@ -77,6 +80,7 @@ text-overflow: ellipsis; vertical-align: middle; } + &__options { position: absolute; top: 100%; @@ -94,13 +98,11 @@ &::-webkit-scrollbar { width: 20px; } - /* Track */ &::-webkit-scrollbar-track { background: #fff; border: 2px solid #f1f1f1; } - /* Handle */ &::-webkit-scrollbar-thumb { background-image: url(../../assets/images/thumb.png); @@ -108,7 +110,6 @@ background-position: center; border: 1px solid $border; } - &::-webkit-scrollbar-button:vertical:decrement{ width: 20px; height: 20px; @@ -126,15 +127,15 @@ background-position: center; background-size: cover; } - - } + &__option { display: block; padding: 10px 0; border: none; cursor: pointer; } + &__suboption { margin-left: 30px; color: $linkColor; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index 9f2c2a75..be18c9fa 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -67,7 +67,6 @@ class Dropdown extends Component { select={this.handleSelect} /> )); - // eslint-disable-next-line no-console return (
diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js index 5b7b9dd4..ded0d40a 100644 --- a/src/components/DropdownOption/index.js +++ b/src/components/DropdownOption/index.js @@ -32,5 +32,4 @@ DropdownOption.propTypes = { DropdownOption.defaultProps = { }; - export default DropdownOption; diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index 3521d83e..392cf70d 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -16,6 +16,7 @@ color: $primary; background-color: #FAFBFC; } + &__line { position: absolute; top: 50%; @@ -27,6 +28,7 @@ border: none; transform: translate(-50%, -50%); } + &__link { position: relative; margin: 0 30px; @@ -48,10 +50,12 @@ } } } + .lang { padding: 10px; background-color: #fafbfc; } + .user { margin-left: 10px; vertical-align: middle; diff --git a/src/components/Heading/index.js b/src/components/Heading/index.js index a6cd559c..fca314fa 100644 --- a/src/components/Heading/index.js +++ b/src/components/Heading/index.js @@ -8,6 +8,7 @@ const Heading = ({ children }) => ( {children[1] ?

{children[1]}

: ''}
); + Heading.propTypes = { children: propTypes.arrayOf(propTypes.string).isRequired, }; diff --git a/src/components/Hint/Hint.scss b/src/components/Hint/Hint.scss index 2461a3c4..47b52df4 100644 --- a/src/components/Hint/Hint.scss +++ b/src/components/Hint/Hint.scss @@ -6,6 +6,7 @@ width: 16px; height: 16px; cursor: default; + &__icon { position: relative; display: inline-block; @@ -41,6 +42,7 @@ } } } + &__text { position: absolute; top:50%; diff --git a/src/components/Icons/entities/CreateTokenIcon.js b/src/components/Icons/entities/CreateTokenIcon.js index a86dc17b..9c391c55 100644 --- a/src/components/Icons/entities/CreateTokenIcon.js +++ b/src/components/Icons/entities/CreateTokenIcon.js @@ -13,4 +13,5 @@ const CreateToken = () => ( ); + export default CreateToken; diff --git a/src/components/Icons/entities/QuestionUploadingIcon.js b/src/components/Icons/entities/QuestionUploadingIcon.js index 67b431af..fd187537 100644 --- a/src/components/Icons/entities/QuestionUploadingIcon.js +++ b/src/components/Icons/entities/QuestionUploadingIcon.js @@ -20,4 +20,5 @@ const QuestionUploadingIcon = () => ( ); + export default QuestionUploadingIcon; diff --git a/src/components/Icons/entities/TokenNameIcon.js b/src/components/Icons/entities/TokenNameIcon.js index 94a728d6..c2369cc9 100644 --- a/src/components/Icons/entities/TokenNameIcon.js +++ b/src/components/Icons/entities/TokenNameIcon.js @@ -6,4 +6,5 @@ const TokenName = () => ( ); + export default TokenName; diff --git a/src/components/Icons/entities/TxHashIcon.js b/src/components/Icons/entities/TxHashIcon.js index 5ea0eb54..51cc1b11 100644 --- a/src/components/Icons/entities/TxHashIcon.js +++ b/src/components/Icons/entities/TxHashIcon.js @@ -35,4 +35,5 @@ const TxHashIcon = () => ( ); + export default TxHashIcon; diff --git a/src/components/Icons/entities/VerifyIcon.js b/src/components/Icons/entities/VerifyIcon.js index 6b960ddb..9d56f4ab 100644 --- a/src/components/Icons/entities/VerifyIcon.js +++ b/src/components/Icons/entities/VerifyIcon.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; - const VerifyIcon = ({ width, height, diff --git a/src/components/Indicator/Indicator.scss b/src/components/Indicator/Indicator.scss index f479b158..233e23f1 100644 --- a/src/components/Indicator/Indicator.scss +++ b/src/components/Indicator/Indicator.scss @@ -9,6 +9,7 @@ border: 1px solid $primary; transform: rotate(45deg); transition: .3s linear; + &--checked { background-color: $primary; } diff --git a/src/components/Indicator/index.js b/src/components/Indicator/index.js index ddefe3f4..06cdf763 100644 --- a/src/components/Indicator/index.js +++ b/src/components/Indicator/index.js @@ -10,4 +10,5 @@ const Indicator = ({ checked }) => ( Indicator.propTypes = { checked: propTypes.bool.isRequired, }; + export default Indicator; diff --git a/src/components/Input/index.js b/src/components/Input/index.js index 3409c832..d073daff 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -48,6 +48,7 @@ Input.propTypes = { }).isRequired, onInput: propTypes.func, }; + Input.defaultProps = { className: '', onInput: () => null, diff --git a/src/components/LangSwitcher/LangSwitcher.scss b/src/components/LangSwitcher/LangSwitcher.scss index 2bb70228..2613e390 100644 --- a/src/components/LangSwitcher/LangSwitcher.scss +++ b/src/components/LangSwitcher/LangSwitcher.scss @@ -2,6 +2,7 @@ .lang { display: inline-block; + &--opened { .lang__options { visibility: visible; @@ -14,6 +15,7 @@ } } } + &--selected { position: relative; display: block; @@ -35,6 +37,7 @@ content: ''; } } + &__options { position: absolute; display: inline-block; @@ -44,8 +47,8 @@ visibility: hidden; opacity: 0; transition: .2s linear; - } + &__option { display: block; padding: 5px 0; diff --git a/src/components/Loader/Loader.scss b/src/components/Loader/Loader.scss index 3774d9c5..f6488e83 100644 --- a/src/components/Loader/Loader.scss +++ b/src/components/Loader/Loader.scss @@ -7,6 +7,7 @@ height: 14px; margin: 20px; background-color: $primary; + &:before { position: absolute; top: 50%; @@ -19,6 +20,7 @@ animation: loaderSpin 2s ease-in infinite; content: ''; } + &:after { position: absolute; top: 50%; diff --git a/src/components/Login/Login.scss b/src/components/Login/Login.scss index 13dd0746..bd4d362a 100644 --- a/src/components/Login/Login.scss +++ b/src/components/Login/Login.scss @@ -13,12 +13,14 @@ padding: 60px 50px; } } + &--ultrawide { width: 1062px; .form__block { padding: 70px 90px 110px; } } + &__block { padding: 60px 44px; text-align: center; @@ -45,9 +47,11 @@ padding: 0 50px; } } + &__submit { text-align: center; } + .btn--back { position: absolute; bottom: -62px; @@ -59,6 +63,7 @@ margin-right: 3px; } } + &__explanation { position: absolute; top: 50%; @@ -82,6 +87,7 @@ font-weight: 700; } } + &__group { display: flex; flex-flow: row nowrap; @@ -93,6 +99,7 @@ } } } + &__token { display: flex; &-half { @@ -115,6 +122,7 @@ font-size: 14px; } } + &__wallet { font-size: 12px; &-label{ @@ -127,11 +135,11 @@ } } } - .seed { display: flex; flex-flow: row wrap; justify-content: space-between; + &__word { display: inline-block; width: 33%; @@ -148,6 +156,7 @@ font-weight: bold; } } + .field { position: relative; width: 30%; @@ -184,6 +193,7 @@ grid-row-gap: 10px; grid-template-columns: repeat(3, 1fr); justify-items: center; + .btn { display: flex; flex-flow: row nowrap; @@ -197,6 +207,7 @@ display: flex; flex-flow: row wrap; justify-content: space-between; + &>a { display: inline-block; width: calc(50% - 5px); @@ -226,6 +237,7 @@ } } .create { + .btn--white { padding: 15px; svg { @@ -244,6 +256,7 @@ } } + &__label { display: inline-block; margin-bottom: 0px; @@ -256,6 +269,7 @@ display: flex; flex-flow: row nowrap; justify-content: space-around; + &-block { position: relative; display: inline-block; @@ -377,13 +391,15 @@ } } -.stroke{ +.stroke { + &-still { stroke-dasharray: 2; stroke-width: 4; transition: .2s; stroke: rgba($color: $primary, $alpha: .5); } + &-animation { stroke-width: 4; transform-origin: center center; diff --git a/src/components/Logo/Logo.scss b/src/components/Logo/Logo.scss index 62b8c378..8ed4a7ce 100644 --- a/src/components/Logo/Logo.scss +++ b/src/components/Logo/Logo.scss @@ -6,6 +6,7 @@ color: $primary; text-decoration: none; border: 3px solid $primary; + &__dark { display: table-cell; min-width: 49px; @@ -21,6 +22,7 @@ font-family: "Roboto Mono"; } } + &__light { display: table-cell; min-width: 79px; @@ -36,6 +38,7 @@ font-family: "Grotesk"; } } + &:hover { .logo__dark, .logo__light { diff --git a/src/components/Logo/index.js b/src/components/Logo/index.js index 777eb181..49b60577 100644 --- a/src/components/Logo/index.js +++ b/src/components/Logo/index.js @@ -14,4 +14,5 @@ const Logo = () => (
); + export default Logo; diff --git a/src/components/ProjectUploading/ProgressBlock/index.js b/src/components/ProjectUploading/ProgressBlock/index.js index a00e9118..e1426c9b 100644 --- a/src/components/ProjectUploading/ProgressBlock/index.js +++ b/src/components/ProjectUploading/ProgressBlock/index.js @@ -23,10 +23,10 @@ const ProgressBlock = ({ {text} {children[1] ? children[1] : ''}

- {!noline ?
: ''}
); + ProgressBlock.propTypes = { children: propTypes.arrayOf(propTypes.node).isRequired, text: propTypes.string.isRequired, diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 2c652bd7..19487193 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -152,6 +152,7 @@ ProjectUploading.propTypes = { }).isRequired, t: propTypes.func.isRequired, }; + Progress.propTypes = { step: propTypes.number.isRequired, appStore: propTypes.shape({ diff --git a/src/components/Router/SimpleRouter.js b/src/components/Router/SimpleRouter.js index 96c9037d..92eea738 100644 --- a/src/components/Router/SimpleRouter.js +++ b/src/components/Router/SimpleRouter.js @@ -41,4 +41,5 @@ const SimpleRouter = () => ( ); + export default SimpleRouter; diff --git a/src/components/ShowSeed/index.js b/src/components/ShowSeed/index.js index 01c10fbc..2462075e 100644 --- a/src/components/ShowSeed/index.js +++ b/src/components/ShowSeed/index.js @@ -98,6 +98,7 @@ ShowSeed.propTypes = { }).isRequired, t: propTypes.func.isRequired, }; + SeedWord.propTypes = { id: propTypes.number.isRequired, word: propTypes.string.isRequired, diff --git a/src/components/User/index.js b/src/components/User/index.js index b4c5e370..93457481 100644 --- a/src/components/User/index.js +++ b/src/components/User/index.js @@ -13,4 +13,5 @@ const User = ({ children }) => ( User.propTypes = { children: propTypes.string.isRequired, }; + export default User; diff --git a/src/electron.js b/src/electron.js index bfa9aea4..1418e1ac 100644 --- a/src/electron.js +++ b/src/electron.js @@ -23,7 +23,6 @@ function createWindow() { ? process.env.NODE_ENV = 'production' : process.env.NODE_ENV = 'development'; mainWindow.on('closed', () => mainWindow = null); - electronLocalshortcut.register(mainWindow, 'F12', () => { mainWindow.webContents.toggleDevTools(); }); diff --git a/src/index.test.js b/src/index.test.js index 3a2dfce3..355a0231 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -2,7 +2,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; - it('renders without crashing', () => { -}); \ No newline at end of file +}); diff --git a/src/models/FormModel/index.js b/src/models/FormModel/index.js index 751e7469..f1e4bd9a 100644 --- a/src/models/FormModel/index.js +++ b/src/models/FormModel/index.js @@ -32,8 +32,6 @@ class ExtendedForm extends Form { promise .finally(() => { $this.setLoading(false); - // eslint-disable-next-line no-console - console.log($this.loading); }); }, onError: (form) => { diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 2160e14b..02a4230a 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -45,8 +45,6 @@ class ContractService { : ':Voter'; window.BrowserSolc.loadVersion(version, (compiler) => { const compiledContract = compiler.compile(contract); - // eslint-disable-next-line no-console - console.log(compiledContract); const contractData = compiledContract.contracts[contractName]; if (contractData.interface !== '') { const { bytecode, metadata } = contractData; @@ -68,22 +66,17 @@ class ContractService { const importedFiles = {}; const dir = type === 'ERC20' ? './' : './Voter/'; const compiler = 'pragma solidity ^0.4.24;'; - const getImports = (file) => { const files = file.match(SOL_PATH_REGEXP); return files ? files.map((singleFile) => singleFile.replace(new RegExp(/(\'|\")/g), '')) : []; }; - const readFile = (src) => { - // eslint-disable-next-line no-console - console.log(`%c${src}`, 'color: green; font-size:14px;'); // read file by given src let mainImport = fs.readFileSync(src, 'utf8'); // getting the list of files, which will be imported const importList = getImports(mainImport); // finding the folder, which contains file with given src const currentFolder = src.replace(/(((\.\/|\.\.\/)).{1,})*([a-zA-z0-9])*(\.sol)/g, ''); - importList.forEach((file) => { // read file, which contains in list of imports const pathToFile = path.join(currentFolder, file); @@ -99,11 +92,8 @@ class ContractService { } else { // if file already imported, just delete matched file import declaration mainImport = mainImport.replace(mainImport.match(SOL_IMPORT_REGEXP)[0], ''); - // eslint-disable-next-line no-console - console.log(`%c${src} %carlerady imported`, 'color: green; font-size:14px;', 'color: red; font-size:16px;'); } }); - return mainImport; }; @@ -112,9 +102,9 @@ class ContractService { : path.join(PATH_TO_CONTRACTS, `${dir}Voter.sol`); let output = readFile(pathToMainFile); - output = output.replace(SOL_VERSION_REGEXP, compiler); output = output.replace(/(calldata)/g, ''); + return output; } @@ -145,13 +135,10 @@ class ContractService { gasPrice: maxGasPrice, }; - return Web3Service.createTxData(address, tx, maxGasPrice) .then((formedTx) => userStore.singTransaction(formedTx, password)) .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) .then((txHash) => { - // eslint-disable-next-line no-console - console.log('wwpw'); Promise.resolve(txHash); }); } @@ -197,7 +184,6 @@ class ContractService { return data; } - /** * checks count of uploaded to contract questions and total count of system questions * @function @@ -241,9 +227,7 @@ class ContractService { Web3Service.createTxData(address, rawTx, maxGasPrice) .then((formedTx) => userStore.singTransaction(formedTx, password)) .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) - .then((txHash) => { - Web3Service.subscribeTxReceipt(txHash); - }); + .then((txHash) => Web3Service.subscribeTxReceipt(txHash)); }); } }); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 0eb98be5..6c036fbb 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -176,7 +176,6 @@ class AppStore { alert.closeAlert(); } - @computed get wallets() { const wallets = Object.keys(this.walletList); return wallets.map((wallet) => ({ label: `0x${wallet}`, value: `0x${wallet}` })); diff --git a/src/stores/UserStore/UserStore.js b/src/stores/UserStore/UserStore.js index 5be64391..2c8c684c 100644 --- a/src/stores/UserStore/UserStore.js +++ b/src/stores/UserStore/UserStore.js @@ -57,7 +57,6 @@ class UserStore { }); } - /** * create wallet by given password * @param {string} password password which will be used for wallet decrypting @@ -174,8 +173,6 @@ class UserStore { * @return Signed TX data */ @action singTransaction(data, password) { - // eslint-disable-next-line no-console - console.log('start'); return new Promise((resolve) => { // eslint-disable-next-line consistent-return this.readWallet(password).then((info) => { diff --git a/src/utils/PasswordValidation/PasswordValidation.test.js b/src/utils/PasswordValidation/PasswordValidation.test.js index bab4dfc6..6327679d 100644 --- a/src/utils/PasswordValidation/PasswordValidation.test.js +++ b/src/utils/PasswordValidation/PasswordValidation.test.js @@ -1,7 +1,6 @@ /* eslint-disable no-undef */ import passwordValidation from './index'; - describe('test for password validation', () => { test('password T3sting!', () => { const validity = passwordValidation('T3sting!'); diff --git a/src/utils/PasswordValidation/index.js b/src/utils/PasswordValidation/index.js index 1eddec0e..f2e2af90 100644 --- a/src/utils/PasswordValidation/index.js +++ b/src/utils/PasswordValidation/index.js @@ -13,7 +13,6 @@ const passwordValidation = (value) => { Length: regexLength.test(value), }; - // eslint-disable-next-line no-console return values; }; From 2c6b7487e6101ca9c11a952d2acfd504c3635cbf Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 10:28:21 +0700 Subject: [PATCH 193/219] buttons now functional component --- src/components/Button/Button.js | 66 +++++++++++++++------------------ 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js index 33546295..bebb1ae2 100644 --- a/src/components/Button/Button.js +++ b/src/components/Button/Button.js @@ -1,43 +1,37 @@ -import React, { Component } from 'react'; +import React from 'react'; import propTypes from 'prop-types'; import styles from './Button.scss'; -// eslint-disable-next-line react/prefer-stateless-function -class Button extends Component { - render() { - const { - children, - theme, - size, - type, - disabled, - icon, - iconPosition, - onClick, - } = this.props; - return ( - // eslint-disable-next-line react/button-has-type - - ); - } -} +const Button = ({ + children, + theme, + size, + type, + disabled, + icon, + iconPosition, + onClick, +}) => ( + // eslint-disable-next-line react/button-has-type + +); Button.propTypes = { children: propTypes.string.isRequired, From beb2ca22ca9b6d3adbac4126e93e9ee692259085 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 13:19:18 +0700 Subject: [PATCH 194/219] More codestyle fixes --- src/components/CreationAlert/index.js | 3 + src/components/Dropdown/index.js | 2 + src/components/DropdownOption/index.js | 1 + src/components/Explanation/Explanation.scss | 1 + src/components/FormBlock/index.js | 2 + src/components/Header/index.js | 1 + src/components/LangSwitcher/index.js | 4 +- src/components/LoadingBlock/index.js | 1 + src/components/Logo/index.js | 2 - src/components/ProjectList/index.js | 2 +- src/components/User/User.scss | 4 + src/config.json | 1 - src/contracts/output.sol | 399 ------------------ src/electron.js | 1 - src/index.js | 2 - .../ContractService/entities/Question.js | 5 + src/services/WalletService/WalletService.js | 1 + src/services/Web3Service/Web3Service.js | 1 + src/stores/FormsStore/ConnectProject.js | 1 + src/stores/FormsStore/ConnectToken.js | 1 + src/stores/FormsStore/CreateProject.js | 1 + src/stores/FormsStore/CreateToken.js | 1 + src/stores/FormsStore/CreateWalletForm.js | 1 + src/stores/RootStore/RootStore.js | 1 + 24 files changed, 31 insertions(+), 408 deletions(-) delete mode 100644 src/contracts/output.sol diff --git a/src/components/CreationAlert/index.js b/src/components/CreationAlert/index.js index 75ed8956..3484e110 100644 --- a/src/components/CreationAlert/index.js +++ b/src/components/CreationAlert/index.js @@ -17,6 +17,7 @@ const WalletAddress = withTranslation()(inject('userStore')(observer(({ t, userS

{userStore.address}

)))); + WalletAddress.propTypes = { userStore: propTypes.shape({ address: propTypes.string.isRequired, @@ -50,8 +51,10 @@ const CreationAlert = withTranslation()(({ t, success = false, recover = false }
)); + CreationAlert.propTypes = { success: propTypes.bool.isRequired, recover: propTypes.bool.isRequired, }; + export default CreationAlert; diff --git a/src/components/Dropdown/index.js b/src/components/Dropdown/index.js index be18c9fa..5a2e7f95 100644 --- a/src/components/Dropdown/index.js +++ b/src/components/Dropdown/index.js @@ -11,6 +11,7 @@ class Dropdown extends Component { opened: false, selectedValue: '', }; + this.setWrapperRef = this.setWrapperRef.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); } @@ -100,6 +101,7 @@ Dropdown.propTypes = { placeholder: propTypes.string.isRequired, }).isRequired, }; + Dropdown.defaultProps = { children: '', subOptions: {}, diff --git a/src/components/DropdownOption/index.js b/src/components/DropdownOption/index.js index ded0d40a..69a6cf81 100644 --- a/src/components/DropdownOption/index.js +++ b/src/components/DropdownOption/index.js @@ -29,6 +29,7 @@ DropdownOption.propTypes = { select: propTypes.func.isRequired, subOption: propTypes.string.isRequired, }; + DropdownOption.defaultProps = { }; diff --git a/src/components/Explanation/Explanation.scss b/src/components/Explanation/Explanation.scss index e0bcabfd..1d03db9b 100644 --- a/src/components/Explanation/Explanation.scss +++ b/src/components/Explanation/Explanation.scss @@ -5,6 +5,7 @@ padding: 5px; color: $border; font-size: 12px; + &__string { padding-left: 10px; border-left: 1px solid $border; diff --git a/src/components/FormBlock/index.js b/src/components/FormBlock/index.js index 0c1399f2..f5577416 100644 --- a/src/components/FormBlock/index.js +++ b/src/components/FormBlock/index.js @@ -8,10 +8,12 @@ const FormBlock = ({ children, className }) => ( {children}
); + FormBlock.propTypes = { children: propTypes.node.isRequired, className: propTypes.string, }; + FormBlock.defaultProps = { className: '', }; diff --git a/src/components/Header/index.js b/src/components/Header/index.js index e38d6664..4cb974f4 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -18,4 +18,5 @@ const Header = inject('userStore', 'appStore')(observer(({ appStore: { inProject
))); + export default Header; diff --git a/src/components/LangSwitcher/index.js b/src/components/LangSwitcher/index.js index 636e7031..5dc1669f 100644 --- a/src/components/LangSwitcher/index.js +++ b/src/components/LangSwitcher/index.js @@ -30,14 +30,14 @@ class LangSwitcher extends Component { this.wrapperRef = node; } - toggleOptions=() => { + toggleOptions = () => { const { opened } = this.state; this.setState({ opened: !opened, }); } - selectOption=(e) => { + selectOption = (e) => { const value = e.target.getAttribute('data-value'); this.toggleOptions(); i18n.changeLanguage(value); diff --git a/src/components/LoadingBlock/index.js b/src/components/LoadingBlock/index.js index fab407b0..3d5dc5cc 100644 --- a/src/components/LoadingBlock/index.js +++ b/src/components/LoadingBlock/index.js @@ -9,6 +9,7 @@ const LoadingBlock = ({ children }) => ( ); + LoadingBlock.propTypes = { children: propTypes.node.isRequired, }; diff --git a/src/components/Logo/index.js b/src/components/Logo/index.js index 49b60577..ac442623 100644 --- a/src/components/Logo/index.js +++ b/src/components/Logo/index.js @@ -3,8 +3,6 @@ import { Link } from 'react-router-dom'; import styles from './Logo.scss'; const Logo = () => ( - - // eslint-disable-next-line jsx-a11y/anchor-is-valid 01 diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 94329d4a..247e9359 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -67,4 +67,4 @@ ProjectList.propTypes = { t: propTypes.func.isRequired, }; -export default withTranslation()(ProjectList); +export default ProjectList; diff --git a/src/components/User/User.scss b/src/components/User/User.scss index 1b9f31cf..8e9dfe58 100644 --- a/src/components/User/User.scss +++ b/src/components/User/User.scss @@ -1,12 +1,15 @@ @import '../../assets/styles/partials/variables'; + .user { display: inline-block; font-size: 0; border: 1px solid $primary; cursor: pointer; + &__image { vertical-align: middle; } + &__wallet { margin: 0 10px; font-size: 12px; @@ -16,6 +19,7 @@ display: none; } } + &:hover { .user__wallet { &--full { diff --git a/src/config.json b/src/config.json index 3eee0cb0..a2fddce5 100644 --- a/src/config.json +++ b/src/config.json @@ -1,6 +1,5 @@ { "host": "https://ropsten.infura.io/v3/14b2319f08e24f3aadfe1aa933301b38", - "gasPrice": 40000000000, "projects": [ { "name": "tetete", diff --git a/src/contracts/output.sol b/src/contracts/output.sol deleted file mode 100644 index 8149af39..00000000 --- a/src/contracts/output.sol +++ /dev/null @@ -1,399 +0,0 @@ -pragma solidity ^0.4.24; - - - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. Does not include - * the optional functions; to access them see `ERC20Detailed`. - */ -interface IERC20 { - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - /** - * @dev Returns the amount of tokens in existence. - */ - function name() external view returns (string); - /** - * @dev Returns the amount of tokens in existence. - */ - function symbol() external view returns (string); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a `Transfer` event. - */ - function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through `transferFrom`. This is - * zero by default. - * - * This value changes when `approve` or `transferFrom` are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * > Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an `Approval` event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a `Transfer` event. - */ - function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); - - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to `approve`. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); -} - - -/** - * @title SafeMath - * @dev Unsigned math operations with safety checks that revert on error - */ -library SafeMath { - /** - * @dev Multiplies two unsigned integers, reverts on overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return 0; - } - - uint256 c = a * b; - require(c / a == b); - - return c; - } - - /** - * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - // Solidity only automatically asserts when dividing by 0 - require(b > 0); - uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold - - return c; - } - - /** - * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - require(b <= a); - uint256 c = a - b; - - return c; - } - - /** - * @dev Adds two unsigned integers, reverts on overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require(c >= a); - - return c; - } - - /** - * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), - * reverts when dividing by zero. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - require(b != 0); - return a % b; - } -} - -/** - * @dev Implementation of the `IERC20` interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using `_mint`. - * For a generic mechanism see `ERC20Mintable`. - * - * *For a detailed writeup see our guide [How to implement supply - * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* - * - * We have followed general OpenZeppelin guidelines: functions revert instead - * of returning `false` on failure. This behavior is nonetheless conventional - * and does not conflict with the expectations of ERC20 applications. - * - * Additionally, an `Approval` event is emitted on calls to `transferFrom`. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard `decreaseAllowance` and `increaseAllowance` - * functions have been added to mitigate the well-known issues around setting - * allowances. See `IERC20.approve`. - */ -contract ERC20 is IERC20 { - using SafeMath for uint256; - - mapping (address => uint256) private _balances; - - mapping (address => mapping (address => uint256)) private _allowances; - - uint256 private _totalSupply; - - string private _name; - - string private _symbol; - - constructor (string name, string symbol, uint256 totalSupply) public { - _name = name; - _symbol = symbol; - _totalSupply = totalSupply; - _balances[msg.sender] = totalSupply; - } - - /** - * @dev See `IERC20.totalSupply`. - */ - function totalSupply() public view returns (uint256) { - return _totalSupply; - } - - /** - * @dev See `IERC20.balanceOf`. - */ - function balanceOf(address account) public view returns (uint256) { - return _balances[account]; - } - - /** - * @dev Get the symbol of token. - */ - function symbol() public view returns (string) { - return _symbol; - } - /** - * @dev Get the name of token. - */ - function name() public view returns (string) { - return _name; - } - - /** - * @dev See `IERC20.transfer`. - * - * Requirements: - * - * - `recipient` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ - function transfer(address recipient, uint256 amount) public returns (bool) { - _transfer(msg.sender, recipient, amount); - return true; - } - - /** - * @dev See `IERC20.allowance`. - */ - function allowance(address owner, address spender) public view returns (uint256) { - return _allowances[owner][spender]; - } - - /** - * @dev See `IERC20.approve`. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function approve(address spender, uint256 value) public returns (bool) { - _approve(msg.sender, spender, value); - return true; - } - - /** - * @dev See `IERC20.transferFrom`. - * - * Emits an `Approval` event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of `ERC20`; - * - * Requirements: - * - `sender` and `recipient` cannot be the zero address. - * - `sender` must have a balance of at least `value`. - * - the caller must have allowance for `sender`'s tokens of at least - * `amount`. - */ - function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { - _transfer(sender, recipient, amount); - _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); - return true; - } - - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to `approve` that can be used as a mitigation for - * problems described in `IERC20.approve`. - * - * Emits an `Approval` event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { - _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); - return true; - } - - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to `approve` that can be used as a mitigation for - * problems described in `IERC20.approve`. - * - * Emits an `Approval` event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `subtractedValue`. - */ - function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { - _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); - return true; - } - - /** - * @dev Moves tokens `amount` from `sender` to `recipient`. - * - * This is internal function is equivalent to `transfer`, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a `Transfer` event. - * - * Requirements: - * - * - `sender` cannot be the zero address. - * - `recipient` cannot be the zero address. - * - `sender` must have a balance of at least `amount`. - */ - function _transfer(address sender, address recipient, uint256 amount) internal { - require(sender != address(0), "ERC20: transfer from the zero address"); - require(recipient != address(0), "ERC20: transfer to the zero address"); - - _balances[sender] = _balances[sender].sub(amount); - _balances[recipient] = _balances[recipient].add(amount); - emit Transfer(sender, recipient, amount); - } - - /** @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a `Transfer` event with `from` set to the zero address. - * - * Requirements - * - * - `to` cannot be the zero address. - */ - function _mint(address account, uint256 amount) internal { - require(account != address(0), "ERC20: mint to the zero address"); - - _totalSupply = _totalSupply.add(amount); - _balances[account] = _balances[account].add(amount); - emit Transfer(address(0), account, amount); - } - - /** - * @dev Destoys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a `Transfer` event with `to` set to the zero address. - * - * Requirements - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ - function _burn(address account, uint256 value) internal { - require(account != address(0), "ERC20: burn from the zero address"); - - _totalSupply = _totalSupply.sub(value); - _balances[account] = _balances[account].sub(value); - emit Transfer(account, address(0), value); - } - - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. - * - * This is internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an `Approval` event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ - function _approve(address owner, address spender, uint256 value) internal { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - - _allowances[owner][spender] = value; - emit Approval(owner, spender, value); - } - - /** - * @dev Destoys `amount` tokens from `account`.`amount` is then deducted - * from the caller's allowance. - * - * See `_burn` and `_approve`. - */ - function _burnFrom(address account, uint256 amount) internal { - _burn(account, amount); - _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); - } -} \ No newline at end of file diff --git a/src/electron.js b/src/electron.js index 1418e1ac..59301c66 100644 --- a/src/electron.js +++ b/src/electron.js @@ -1,7 +1,6 @@ const { app, BrowserWindow } = require('electron'); const electronLocalshortcut = require('electron-localshortcut'); const isDev = require('electron-is-dev'); - const path = require('path'); let mainWindow; diff --git a/src/index.js b/src/index.js index 1e96e9d0..cff9bced 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,6 @@ import { Provider } from 'mobx-react'; import SimpleRouter from './components/Router/SimpleRouter'; import rootStore from './stores/RootStore'; import Alert from './components/Alert'; -// import Header from './components/Header'; import './i18n'; import './assets/styles/style.scss'; @@ -13,7 +12,6 @@ const { userStore, appStore } = rootStore; render( - , diff --git a/src/services/ContractService/entities/Question.js b/src/services/ContractService/entities/Question.js index 9a1cc1f7..46361168 100644 --- a/src/services/ContractService/entities/Question.js +++ b/src/services/ContractService/entities/Question.js @@ -35,6 +35,11 @@ class Question { return convertedFormula; } + /** + * getting formed parameters for contract + * @param {string} contractAddr address of target contract + * @returns {array} formed data for encoding transaction + */ getUploadingParams(contractAddr) { const { id, group, name, caption, time, method, parameters, diff --git a/src/services/WalletService/WalletService.js b/src/services/WalletService/WalletService.js index 4e29e111..acaaa6a6 100644 --- a/src/services/WalletService/WalletService.js +++ b/src/services/WalletService/WalletService.js @@ -72,4 +72,5 @@ class WalletService { return bip39.validateMnemonic(mnemonic); } } + export default WalletService; diff --git a/src/services/Web3Service/Web3Service.js b/src/services/Web3Service/Web3Service.js index 5b43e502..634a11bc 100644 --- a/src/services/Web3Service/Web3Service.js +++ b/src/services/Web3Service/Web3Service.js @@ -93,4 +93,5 @@ class Web3Service { }); } } + export default Web3Service; diff --git a/src/stores/FormsStore/ConnectProject.js b/src/stores/FormsStore/ConnectProject.js index f91a4144..1fa25943 100644 --- a/src/stores/FormsStore/ConnectProject.js +++ b/src/stores/FormsStore/ConnectProject.js @@ -21,4 +21,5 @@ class ConnectProjectForm extends ExtendedForm { }; } } + export default ConnectProjectForm; diff --git a/src/stores/FormsStore/ConnectToken.js b/src/stores/FormsStore/ConnectToken.js index 619f9392..3c247bb2 100644 --- a/src/stores/FormsStore/ConnectToken.js +++ b/src/stores/FormsStore/ConnectToken.js @@ -15,4 +15,5 @@ class ConnectTokenForm extends ExtendedForm { }; } } + export default ConnectTokenForm; diff --git a/src/stores/FormsStore/CreateProject.js b/src/stores/FormsStore/CreateProject.js index fc3d3eb7..a35ed028 100644 --- a/src/stores/FormsStore/CreateProject.js +++ b/src/stores/FormsStore/CreateProject.js @@ -21,4 +21,5 @@ class СreateProjectForm extends ExtendedForm { }; } } + export default СreateProjectForm; diff --git a/src/stores/FormsStore/CreateToken.js b/src/stores/FormsStore/CreateToken.js index b3e81b37..6efd78d4 100644 --- a/src/stores/FormsStore/CreateToken.js +++ b/src/stores/FormsStore/CreateToken.js @@ -33,4 +33,5 @@ class CreateTokenForm extends ExtendedForm { }; } } + export default CreateTokenForm; diff --git a/src/stores/FormsStore/CreateWalletForm.js b/src/stores/FormsStore/CreateWalletForm.js index ac767cbb..e01a1760 100644 --- a/src/stores/FormsStore/CreateWalletForm.js +++ b/src/stores/FormsStore/CreateWalletForm.js @@ -21,4 +21,5 @@ class CreateWalletForm extends ExtendedForm { }; } } + export default CreateWalletForm; diff --git a/src/stores/RootStore/RootStore.js b/src/stores/RootStore/RootStore.js index b8299c25..88f4c7d5 100644 --- a/src/stores/RootStore/RootStore.js +++ b/src/stores/RootStore/RootStore.js @@ -46,6 +46,7 @@ class RootStore { this.projectStore = new ProjectStore(address); } } + // eslint-disable-next-line no-multi-assign const rootStore = window.rootStore = new RootStore(); export default rootStore; From e983155c1910c4b2846569acd0bfc7912c6768b0 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 15:00:12 +0700 Subject: [PATCH 195/219] fixed contract deploying --- src/assets/styles/style.scss | 4 ---- src/components/AddExisitingProject/index.js | 1 - src/components/Container/index.js | 1 + .../CreateNewProjectWithoutTokens/index.js | 1 - .../ContractService/ContractService.js | 16 +++++++------- src/stores/AppStore/AppStore.js | 5 +++-- ...1b0660a89f459a46313f391b4521963a8e5b7.json | 21 +++++++++++++++++++ 7 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 src/wallets/UTC--2019-11-29T07-19-05.154Z--7f51b0660a89f459a46313f391b4521963a8e5b7.json diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index 7782da00..e182d4a9 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -21,8 +21,4 @@ a { svg { width: 18px; height: 18px; -} - -::-webkit-scrollbar-thumb { - border: 1px solid $border; } \ No newline at end of file diff --git a/src/components/AddExisitingProject/index.js b/src/components/AddExisitingProject/index.js index 911351c1..baa72b36 100644 --- a/src/components/AddExisitingProject/index.js +++ b/src/components/AddExisitingProject/index.js @@ -84,7 +84,6 @@ class AddExistingProject extends Component { appStore.displayAlert(t('errors:validationError'), 3000); } - // eslint-disable-next-line class-methods-use-this renderSwitch(step) { const { steps } = this; const { t } = this.props; diff --git a/src/components/Container/index.js b/src/components/Container/index.js index 05e8d913..e1739d91 100644 --- a/src/components/Container/index.js +++ b/src/components/Container/index.js @@ -1,5 +1,6 @@ import React from 'react'; import propTypes from 'prop-types'; + import styles from './Container.scss'; const Container = ({ children }) => ( diff --git a/src/components/CreateNewProjectWithoutTokens/index.js b/src/components/CreateNewProjectWithoutTokens/index.js index 800a6a64..cc2286a7 100644 --- a/src/components/CreateNewProjectWithoutTokens/index.js +++ b/src/components/CreateNewProjectWithoutTokens/index.js @@ -72,7 +72,6 @@ class CreateNewProjectWithoutTokens extends Component { return userStore.readWallet(password) .then(() => userStore.checkBalance(userStore.address)) - // eslint-disable-next-line consistent-return .then((balance) => (this.isEnoughBalance(balance) ? this.deployTokenContract(deployArgs, password) : this.returnToTokenCreating(t('errors:lowBalance')))) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 02a4230a..5fcd0e50 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -135,12 +135,12 @@ class ContractService { gasPrice: maxGasPrice, }; - return Web3Service.createTxData(address, tx, maxGasPrice) - .then((formedTx) => userStore.singTransaction(formedTx, password)) - .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) - .then((txHash) => { - Promise.resolve(txHash); - }); + return new Promise((resolve) => { + Web3Service.createTxData(address, tx, maxGasPrice) + .then((formedTx) => userStore.singTransaction(formedTx, password)) + .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) + .then((txHash) => resolve(txHash)); + }); } /** @@ -223,11 +223,11 @@ class ContractService { value: '0x0', }; - return new Promise(() => { + return new Promise((resolve) => { Web3Service.createTxData(address, rawTx, maxGasPrice) .then((formedTx) => userStore.singTransaction(formedTx, password)) .then((signedTx) => Web3Service.sendSignedTransaction(`0x${signedTx}`)) - .then((txHash) => Web3Service.subscribeTxReceipt(txHash)); + .then((txHash) => resolve(txHash)); }); } }); diff --git a/src/stores/AppStore/AppStore.js b/src/stores/AppStore/AppStore.js index 6c036fbb..27400adc 100644 --- a/src/stores/AppStore/AppStore.js +++ b/src/stores/AppStore/AppStore.js @@ -77,11 +77,12 @@ class AppStore { */ @action deployContract(type, deployArgs, password) { const { contractService } = this.rootStore; - return new Promise(() => { + return new Promise((resolve) => { contractService.compileContract(type) .then(({ bytecode, abi }) => contractService.deployContract({ type, deployArgs, bytecode, abi, password, - })); + })) + .then((txhash) => resolve(txhash)); }); } diff --git a/src/wallets/UTC--2019-11-29T07-19-05.154Z--7f51b0660a89f459a46313f391b4521963a8e5b7.json b/src/wallets/UTC--2019-11-29T07-19-05.154Z--7f51b0660a89f459a46313f391b4521963a8e5b7.json new file mode 100644 index 00000000..08f07869 --- /dev/null +++ b/src/wallets/UTC--2019-11-29T07-19-05.154Z--7f51b0660a89f459a46313f391b4521963a8e5b7.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "fc76e19f-f0cd-443a-a275-869053e418c7", + "address": "7f51b0660a89f459a46313f391b4521963a8e5b7", + "crypto": { + "ciphertext": "56953182a01baba41d0b8c5bde3ea1056696ff8b748944a5738519aabfc1184b", + "cipherparams": { + "iv": "2536ee3ec7985c1b708f1b97c5fdb1af" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "258cd6b009cd9cf397b18040f4871ddeead4cf3c6c781ccfafec83b8ff3c5229", + "n": 262144, + "r": 8, + "p": 1 + }, + "mac": "9908077786372dcb21cffe114b92b942a2568e92c6c6b184d8eb1f7512414a86" + } +} \ No newline at end of file From b010a7cd40572d0f07fe121df99b2689f2c3b6ad Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 16:12:12 +0700 Subject: [PATCH 196/219] Fixes for uploading questions --- src/components/ProjectUploading/index.js | 1 + src/config.json | 28 ------------------- .../ContractService/ContractService.js | 10 ++++--- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/src/components/ProjectUploading/index.js b/src/components/ProjectUploading/index.js index 19487193..c323c6e6 100644 --- a/src/components/ProjectUploading/index.js +++ b/src/components/ProjectUploading/index.js @@ -106,6 +106,7 @@ const Progress = withTranslation()(inject('appStore')(observer(({ t, appStore, s text={item[0]} index={index} state={step} + noline={index === 4} > {item[1]} diff --git a/src/config.json b/src/config.json index a2fddce5..c19978c1 100644 --- a/src/config.json +++ b/src/config.json @@ -12,34 +12,6 @@ { "name": "T3st", "address": "0xACA55c33D67d549CacA4f700D0319B865D8E0FC5" - }, - { - "name": "T3qwe", - "address": "0xd0F558FD47C5cD55A4B651fBFd6a36c3D530968c" - }, - { - "name": "Name", - "address": "0xd0F558FD47C5cD55A4B651fBFd6a36c3D530968c" - }, - { - "name": "testing!", - "address": "0x118852809990A0133FE21efF928bD1472b683764" - }, - { - "name": "Name123123", - "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" - }, - { - "name": "name123213", - "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" - }, - { - "name": "nasdeq", - "address": "0x104184d5E8CD2D830887BAfF03793507dFB2F46a" - }, - { - "name": "name", - "address": "0xEa7e6b7c017d18671f666F23303628a48aBbe4aF" } ] } \ No newline at end of file diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 5fcd0e50..9810f13f 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -180,7 +180,9 @@ class ContractService { * @param params parameters for method */ async callMethod(method, ...params) { - const data = await this.contract.methods[method](...params).call(); + // eslint-disable-next-line no-console + console.log(`this.contract.methods[${method}](${[...params]}).call();`); + const data = await this._contract.methods[method](...params).call(); return data; } @@ -239,7 +241,7 @@ class ContractService { * @returns {Object} Question data from contract */ fetchQuestion(id) { - return this.callMethod('question', id); + return this.callMethod('question', [id]); } /** @@ -248,7 +250,7 @@ class ContractService { * @param {string} from address who calls method */ async fetchVoting(id) { - return this.callMethod('getVoting', id); + return this.callMethod('getVoting', [id]); } /** @@ -257,7 +259,7 @@ class ContractService { * @param {string} from address, who calls */ async fetchVotingStats(id) { - return this.callMethod('getVotingStats', id); + return this.callMethod('getVotingStats', [id]); } /** From 29dfdc42304bf9bfb3b038ece163d1aa499abd0c Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Fri, 29 Nov 2019 16:15:02 +0700 Subject: [PATCH 197/219] removed console output --- src/services/ContractService/ContractService.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/services/ContractService/ContractService.js b/src/services/ContractService/ContractService.js index 9810f13f..a1f9a374 100644 --- a/src/services/ContractService/ContractService.js +++ b/src/services/ContractService/ContractService.js @@ -180,8 +180,6 @@ class ContractService { * @param params parameters for method */ async callMethod(method, ...params) { - // eslint-disable-next-line no-console - console.log(`this.contract.methods[${method}](${[...params]}).call();`); const data = await this._contract.methods[method](...params).call(); return data; } From 228ff341fb8698b5fe625f017f402f4839c8ad36 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Mon, 2 Dec 2019 09:28:58 +0700 Subject: [PATCH 198/219] Update FinPassForm.js --- src/stores/FormsStore/FinPassForm.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/stores/FormsStore/FinPassForm.js b/src/stores/FormsStore/FinPassForm.js index a6006e36..ec5ff96a 100644 --- a/src/stores/FormsStore/FinPassForm.js +++ b/src/stores/FormsStore/FinPassForm.js @@ -1,5 +1,3 @@ -/* eslint-disable no-alert */ -/* eslint-disable no-console */ /* eslint-disable class-methods-use-this */ import i18n from 'i18next'; import ExtendedForm from '../../models/FormModel'; From 9c89be3497b57fd1525b208a137f494e31ccd669 Mon Sep 17 00:00:00 2001 From: pavkahanov Date: Mon, 2 Dec 2019 11:34:13 +0700 Subject: [PATCH 199/219] Some fixes --- .../CreateNewProjectWithTokens/index.js | 18 ++++++------------ src/components/CreateWallet/index.js | 7 +++---- src/components/DisplayUserInfo/index.js | 2 +- src/components/ProjectList/index.js | 1 - .../ContractService/ContractService.js | 3 ++- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/components/CreateNewProjectWithTokens/index.js b/src/components/CreateNewProjectWithTokens/index.js index a1867c8d..1bdf36f5 100644 --- a/src/components/CreateNewProjectWithTokens/index.js +++ b/src/components/CreateNewProjectWithTokens/index.js @@ -25,21 +25,15 @@ import styles from '../Login/Login.scss'; class CreateNewProjectWithTokens extends Component { connectToken = new ConnectTokenForm({ hooks: { - onSuccess: (form) => { - this.checkToken(form); - }, - onError: () => { - }, + onSuccess: (form) => this.checkToken(form), + onError: () => {}, }, }); createProject = new CreateProjectForm({ hooks: { - onSuccess: (form) => new Promise(() => { - this.gotoUploading(form); - }), - onError: () => { - }, + onSuccess: (form) => this.gotoUploading(form), + onError: () => {}, }, }); @@ -74,7 +68,7 @@ class CreateNewProjectWithTokens extends Component { this.setState({ currentStep: steps.check, }); - appStore.checkErc(address).then(() => { + return appStore.checkErc(address).then(() => { this.setState({ currentStep: steps.tokenChecked, indicatorStep: 2, @@ -97,7 +91,7 @@ class CreateNewProjectWithTokens extends Component { const { name, password } = form.values(); appStore.setProjectName(name); userStore.setPassword(password); - userStore.readWallet(password) + return userStore.readWallet(password) .then(() => { userStore.checkBalance(userStore.address) .then((balance) => { diff --git a/src/components/CreateWallet/index.js b/src/components/CreateWallet/index.js index 21db3aa3..38b36b31 100644 --- a/src/components/CreateWallet/index.js +++ b/src/components/CreateWallet/index.js @@ -13,14 +13,13 @@ import CreateWalletForm from '../../stores/FormsStore/CreateWalletForm'; import styles from '../Login/Login.scss'; +@withTranslation() @inject('userStore', 'appStore') @observer class CreateWallet extends Component { createForm = new CreateWalletForm({ hooks: { - onSuccess: (form) => { - this.createWallet(form); - }, + onSuccess: (form) => this.createWallet(form), onError: () => { }, }, @@ -105,4 +104,4 @@ CreateWallet.propTypes = { recover: propTypes.bool.isRequired, }; -export default withTranslation()(CreateWallet); +export default CreateWallet; diff --git a/src/components/DisplayUserInfo/index.js b/src/components/DisplayUserInfo/index.js index 60322ae6..28b43c53 100644 --- a/src/components/DisplayUserInfo/index.js +++ b/src/components/DisplayUserInfo/index.js @@ -9,7 +9,7 @@ import Button from '../Button/Button'; import styles from '../Login/Login.scss'; -const DisplayUserInfo = inject('userStore')(observer(withTranslation()(({ t, userStore: { balance, address } }) => ( +const DisplayUserInfo = withTranslation()(inject('userStore')(observer(({ t, userStore: { balance, address } }) => (
diff --git a/src/components/ProjectList/index.js b/src/components/ProjectList/index.js index 247e9359..08f606f2 100644 --- a/src/components/ProjectList/index.js +++ b/src/components/ProjectList/index.js @@ -44,7 +44,6 @@ class ProjectList extends Component { {t('headings:projects.subheading')}
- {' '} {projects} -
- )} - className="agreed-message" - /> - ); - } -} - -export default AgreedMessage; diff --git a/src/components/Dialog/AgreedMessage.test.js b/src/components/Dialog/AgreedMessage.test.js deleted file mode 100644 index 482db9db..00000000 --- a/src/components/Dialog/AgreedMessage.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import AgreedMessage from './AgreedMessage'; - -describe('AgreedMessage', () => { - let wrapper; - let instance; - let mockHide; - - beforeEach(() => { - mockHide = jest.fn(); - wrapper = shallow( - , - ).dive().dive(); - instance = wrapper.instance(); - }); - - it('should render without error', () => { - expect(wrapper.length).toEqual(1); - }); - - it('hide method should call mockHide', () => { - instance.hide(); - expect(mockHide).toHaveBeenCalled(); - }); -}); diff --git a/src/components/Dialog/DefinetelyAgree.js b/src/components/Dialog/DefinetelyAgree.js deleted file mode 100644 index caf71133..00000000 --- a/src/components/Dialog/DefinetelyAgree.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { withTranslation } from 'react-i18next'; -import { inject } from 'mobx-react'; -import PropTypes from 'prop-types'; -import Dialog from './Dialog'; -import { VerifyIcon } from '../Icons'; -// import FinPassForm from '../../stores/FormsStore/FinPassForm'; - -// TODO Finalize after form universal create -@inject('dialogStore') -@withTranslation() -class DefinetelyAgree extends React.Component { - static propTypes = { - t: PropTypes.func.isRequired, - dialogStore: PropTypes.shape({}).isRequired, - }; - - // finPassForm = new FinPassForm({ - // onSuccess(form) { - // return form; - // }, - // onError() { - // console.error('error'); - // }, - // }) - - render() { - const { props } = this; - const { t } = props; - return ( - )} - > - definetely agree content - - ); - } -} - -export default DefinetelyAgree; diff --git a/src/components/Dialog/Dialog.js b/src/components/Dialog/Dialog.js index 292009fe..c6fd776c 100644 --- a/src/components/Dialog/Dialog.js +++ b/src/components/Dialog/Dialog.js @@ -20,7 +20,7 @@ class Dialog extends React.Component { 'lg', ]), name: PropTypes.string.isRequired, - header: PropTypes.string.isRequired, + header: PropTypes.string, dialogStore: PropTypes.shape({ add: PropTypes.func.isRequired, remove: PropTypes.func.isRequired, @@ -32,7 +32,6 @@ class Dialog extends React.Component { ]), hide: PropTypes.func.isRequired, }).isRequired, - topIcon: PropTypes.node, footer: PropTypes.element, className: PropTypes.string, history: PropTypes.bool, @@ -46,7 +45,7 @@ class Dialog extends React.Component { static defaultProps = { size: 'sm', className: '', - topIcon: null, + header: null, footer: (), history: true, onOpen: null, @@ -113,7 +112,6 @@ class Dialog extends React.Component { header, footer, className, - topIcon, closeable, } = this.props; const store = props.dialogStore; @@ -152,14 +150,15 @@ class Dialog extends React.Component { ) : null } -
- { - topIcon - ? (
{topIcon}
) - : null - } -
{header}
-
+ { + header + ? ( +
+
{header}
+
+ ) + : null + } { props.children ? ( diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index f6ed24d4..80c3a289 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -14,41 +14,6 @@ position: relative; z-index: 1; min-height: 325px; - - &.agreed-message, - &.reject-message { - .dialog__header { - padding-top: 92px; - } - } - - &.transfer-progress { - .dialog__header { - padding-top: 67px; - padding-bottom: 0; - } - - .dialog__subtext { - color: rgba(0, 0, 0, 0.7); - font-size: 14px; - line-height: 16px; - } - } - - &.transfer-success { - .dialog__subtext { - color: rgba(0, 0, 0, 0.7); - font-size: 14px; - line-height: 16px; - } - - .dialog__value { - margin-top: 8px; - font-weight: 700; - font-size: 14px; - line-height: 16px; - } - } } } @@ -70,15 +35,6 @@ padding: 10px; padding-top: 55px; text-align: center; - - &-icon { - margin-bottom: 18px; - - svg { - width: auto; - height: auto; - } - } } &__title { @@ -96,28 +52,16 @@ padding: 10px 40px; } - &__loader { - width: 100%; - padding-top: 92px; - padding-bottom: 110px; - text-align: center; - } - &__footer { position: relative; z-index: 5; + box-sizing: border-box; width: 100%; - padding: 25px 0; + padding: 25px 10px; &--default { padding-top: 55px; } - - &--agreed-message, - &--reject-message { - padding-top: 53px; - padding-bottom: 58px; - } } &--open { diff --git a/src/components/Dialog/Dialog.stories.js b/src/components/Dialog/Dialog.stories.js index c0b826f9..a2ebbc96 100644 --- a/src/components/Dialog/Dialog.stories.js +++ b/src/components/Dialog/Dialog.stories.js @@ -3,12 +3,13 @@ import { Provider } from 'mobx-react'; // eslint-disable-next-line import/no-extraneous-dependencies import { storiesOf } from '@storybook/react'; import Dialog from './Dialog'; -import { VerifyIcon } from '../Icons'; import DefaultDialogFooter from './DefaultDialogFooter'; -import DefinetelyAgree from './DefinetelyAgree'; -import RejectMessage from './RejectMessage'; -import TokenTransferSuccess from './TokenTransferSuccess'; -import TransferTokenInProgress from './TransferTokenInProgress'; +import { + AgreedMessage, + RejectMessage, + TransferSuccessMessage, + TokenInProgressMessage, +} from '../Messages'; const defaultDialogStore = { remove: () => {}, @@ -47,22 +48,6 @@ storiesOf('Dialog', module) > 0x295856bcf02b2017607e4f61cfc1573fd05d511f - )) - .add('With icon', () => ( - )} - footer={( - - )} - > - 0x295856bcf02b2017607e4f61cfc1573fd05d511f - )); storiesOf('Dialog', module) @@ -70,14 +55,21 @@ storiesOf('Dialog', module) {story()} )) - .add('Definetely Agree', () => ( - + .add('Agreed', () => ( + + {}} + /> + )); storiesOf('Dialog', module) @@ -91,12 +83,15 @@ storiesOf('Dialog', module) {story()} )) - .add('RejectMessage', () => ( - + .add('Reject', () => ( + + {}} + /> + )); storiesOf('Dialog', module) @@ -111,10 +106,15 @@ storiesOf('Dialog', module) )) .add('TokenTransferSuccess', () => ( - + + {}} + value="0.134234 TKN" + /> + )); storiesOf('Dialog', module) @@ -128,6 +128,14 @@ storiesOf('Dialog', module) {story()} )) - .add('TransferTokenInProgress', () => ( - + .add('TokenInProgress', () => ( + + {}} + /> + )); diff --git a/src/components/Dialog/Dialog.test.js b/src/components/Dialog/Dialog.test.js index 775fd811..d1772409 100644 --- a/src/components/Dialog/Dialog.test.js +++ b/src/components/Dialog/Dialog.test.js @@ -182,34 +182,6 @@ describe('Dialog', () => { }); }); - describe('topIcon not null', () => { - let wrapper; - - beforeEach(() => { - wrapper = shallow( - {}, - remove: () => {}, - hide: () => {}, - open: false, - closing: false, - dialog: 'test', - }} - name="test" - header="Test title" - topIcon={test top icon} - footer={null} - />, - ).dive().dive(); - }); - - it('should render without footer', () => { - expect(wrapper.find('.footer').length).toEqual(0); - expect(wrapper.find('.test-top-icon').text()).toEqual('test top icon'); - }); - }); - describe('open & closing', () => { let wrapper; diff --git a/src/components/Dialog/RejectMessage.js b/src/components/Dialog/RejectMessage.js deleted file mode 100644 index 4bfc1515..00000000 --- a/src/components/Dialog/RejectMessage.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import { inject } from 'mobx-react'; -import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; -import Dialog from './Dialog'; -import { RejectIcon } from '../Icons'; -import Button from '../Button/Button'; - -import styles from './Dialog.scss'; - -/** - * Dialog with message about reject decision - */ -@withTranslation(['dialogs', 'buttons']) -@inject('dialogStore') -class RejectMessage extends React.Component { - static propTypes = { - t: PropTypes.func.isRequired, - dialogStore: PropTypes.shape({ - hide: PropTypes.func.isRequired, - }).isRequired, - }; - - hide = () => { - const { dialogStore } = this.props; - dialogStore.hide(); - } - - render() { - const { t } = this.props; - return ( - )} - footer={( -
- -
- )} - className="reject-message" - /> - ); - } -} - -export default RejectMessage; diff --git a/src/components/Dialog/RejectMessage.test.js b/src/components/Dialog/RejectMessage.test.js deleted file mode 100644 index cd2855ed..00000000 --- a/src/components/Dialog/RejectMessage.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import RejectMessage from './RejectMessage'; - -describe('RejectMessage', () => { - let wrapper; - let instance; - let mockHide; - - beforeEach(() => { - mockHide = jest.fn(); - wrapper = shallow( - , - ).dive().dive(); - instance = wrapper.instance(); - }); - - it('should render without error', () => { - expect(wrapper.length).toEqual(1); - }); - - it('hide method should call mockHide', () => { - instance.hide(); - expect(mockHide).toHaveBeenCalled(); - }); -}); diff --git a/src/components/Dialog/TokenTransferSuccess.js b/src/components/Dialog/TokenTransferSuccess.js deleted file mode 100644 index 02041f26..00000000 --- a/src/components/Dialog/TokenTransferSuccess.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; -import Dialog from './Dialog'; -import { EMPTY_DATA_STRING } from '../../constants'; - -import styles from './Dialog.scss'; - -/** - * Dialog with message about success token transfer - */ -@withTranslation(['dialogs', 'other']) -class TokenTransferSuccess extends React.Component { - static propTypes = { - t: PropTypes.func.isRequired, - value: PropTypes.string, - } - - static defaultProps = { - value: EMPTY_DATA_STRING, - } - - render() { - const { props: { t, value } } = this; - return ( - -

{t('other:yourBalance')}

-
{value}
-
- ); - } -} - -export default TokenTransferSuccess; diff --git a/src/components/Dialog/TokenTransferSuccess.test.js b/src/components/Dialog/TokenTransferSuccess.test.js deleted file mode 100644 index 6cff08ea..00000000 --- a/src/components/Dialog/TokenTransferSuccess.test.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import TokenTransferSuccess from './TokenTransferSuccess'; -import { EMPTY_DATA_STRING } from '../../constants'; - -describe('TokenTransferSuccess', () => { - it('should render correct without value', () => { - const wrapper = shallow( - , - ).dive(); - expect(wrapper.length).toEqual(1); - expect(wrapper.find('.dialog__subtext').text()).toEqual('other:yourBalance'); - expect(wrapper.find('.dialog__value').text()).toEqual(EMPTY_DATA_STRING); - }); - - it('should render correct with value', () => { - const wrapper = shallow( - , - ).dive(); - expect(wrapper.length).toEqual(1); - expect(wrapper.find('.dialog__subtext').text()).toEqual('other:yourBalance'); - expect(wrapper.find('.dialog__value').text()).toEqual('0.22124214 TKN'); - }); -}); diff --git a/src/components/Dialog/TransferTokenInProgress.js b/src/components/Dialog/TransferTokenInProgress.js deleted file mode 100644 index 1e232e74..00000000 --- a/src/components/Dialog/TransferTokenInProgress.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { withTranslation } from 'react-i18next'; -import PropTypes from 'prop-types'; -import Dialog from './Dialog'; -import Loader from '../Loader'; - -import styles from './Dialog.scss'; - -/** - * Dialog with token transfer in progress - */ -@withTranslation('dialogs') -class TransferTokenInProgress extends React.Component { - static propTypes = { - t: PropTypes.func.isRequired, - } - - render() { - const { props } = this; - const { t } = props; - return ( - -

- {t('dialogs:someTimeText')} -

-
- -
-
- ); - } -} - -export default TransferTokenInProgress; diff --git a/src/components/Dialog/TransferTokenInProgress.test.js b/src/components/Dialog/TransferTokenInProgress.test.js deleted file mode 100644 index 3a98bf88..00000000 --- a/src/components/Dialog/TransferTokenInProgress.test.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import TransferTokenInProgress from './TransferTokenInProgress'; - -describe('TransferTokenInProgress', () => { - let wrapper; - - beforeEach(() => { - wrapper = shallow( - , - ).dive(); - }); - - it('should render without error', () => { - expect(wrapper.length).toEqual(1); - expect(wrapper.find('.dialog__loader').length).toEqual(1); - }); -}); diff --git a/src/components/Messages/AgreedMessage.js b/src/components/Messages/AgreedMessage.js new file mode 100644 index 00000000..8fda443b --- /dev/null +++ b/src/components/Messages/AgreedMessage.js @@ -0,0 +1,40 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; +import { VerifyIcon } from '../Icons'; +import DefaultMessage from './DefaultMessage'; +import Button from '../Button/Button'; + +import styles from './Message.scss'; + +/** + * Message about agreed decision + */ +@withTranslation(['dialogs']) +class AgreedMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + onButtonClick: PropTypes.func.isRequired, + }; + + render() { + const { t, onButtonClick } = this.props; + return ( +
+ + +
+ +
+
+ ); + } +} + +export default AgreedMessage; diff --git a/src/components/Messages/DefaultMessage.js b/src/components/Messages/DefaultMessage.js new file mode 100644 index 00000000..3ae721b3 --- /dev/null +++ b/src/components/Messages/DefaultMessage.js @@ -0,0 +1,39 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import styles from './Message.scss'; + +class DefaultMessage extends React.PureComponent { + static propTypes = { + title: PropTypes.string.isRequired, + children: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.node, + ]), + }; + + static defaultProps = { + children: null, + }; + + render() { + const { props } = this; + const { title, children } = props; + return ( +
+ { + title + ? ( +

{title}

+ ) + : null + } + {children} +
+ ); + } +} + +export default DefaultMessage; diff --git a/src/components/Messages/Message.scss b/src/components/Messages/Message.scss new file mode 100644 index 00000000..e74b429a --- /dev/null +++ b/src/components/Messages/Message.scss @@ -0,0 +1,81 @@ +.message { + &__container { + width: 100%; + } + + &__title { + margin-top: 18px; + margin-bottom: 8px; + color: #000; + font-weight: 700; + font-size: 24px; + font-family: "Grotesk"; + line-height: 28px; + text-align: center; + } + + &--agreed, + &--reject { + text-align: center; + + .footer { + padding-top: 53px; + padding-bottom: 48px; + } + + svg { + width: auto; + height: auto; + padding-top: 82px; + } + } + + &--transfer-success { + text-align: center; + + .subtext { + color: rgba(0, 0, 0, 0.7); + font-size: 14px; + line-height: 16px; + } + + .value { + margin-top: 8px; + font-weight: 700; + font-size: 14px; + line-height: 16px; + } + + .message { + &__title { + margin-top: 57px; + } + } + + .footer { + padding-top: 48px; + padding-bottom: 51px; + } + } + + &--progress { + .message { + &__title { + margin-top: 57px; + } + } + + .subtext { + color: rgba(0, 0, 0, 0.7); + font-size: 14px; + line-height: 16px; + } + + .loader__container { + width: 100%; + padding-top: 92px; + padding-bottom: 110px; + text-align: center; + } + } +} diff --git a/src/components/Messages/Messages.stories.js b/src/components/Messages/Messages.stories.js new file mode 100644 index 00000000..1b79e57c --- /dev/null +++ b/src/components/Messages/Messages.stories.js @@ -0,0 +1,27 @@ +import React from 'react'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { storiesOf } from '@storybook/react'; +import { DefaultMessage, AgreedMessage, RejectMessage, TransferSuccessMessage } from '.'; + +storiesOf('Messages', module) + .add('With children & title', () => ( + +
content Messages
+
+ )) + .add('With title', () => ( + + )) + .add('Agreed', () => ( + {}} /> + )) + .add('Reject', () => ( + {}} /> + )) + .add('TransferSuccessMessage', () => ( + {}} /> + )); diff --git a/src/components/Messages/RejectMessage.js b/src/components/Messages/RejectMessage.js new file mode 100644 index 00000000..b6719575 --- /dev/null +++ b/src/components/Messages/RejectMessage.js @@ -0,0 +1,40 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; +import { RejectIcon } from '../Icons'; +import Button from '../Button/Button'; +import DefaultMessage from './DefaultMessage'; + +import styles from './Message.scss'; + +/** + * Message about reject decision + */ +@withTranslation(['dialogs', 'buttons']) +class RejectMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + onButtonClick: PropTypes.func.isRequired, + }; + + render() { + const { t, onButtonClick } = this.props; + return ( +
+ + +
+ +
+
+ ); + } +} + +export default RejectMessage; diff --git a/src/components/Messages/TokenInProgressMessage.js b/src/components/Messages/TokenInProgressMessage.js new file mode 100644 index 00000000..ee5a02f4 --- /dev/null +++ b/src/components/Messages/TokenInProgressMessage.js @@ -0,0 +1,38 @@ +import React from 'react'; +import { withTranslation } from 'react-i18next'; +import PropTypes from 'prop-types'; +import Loader from '../Loader'; +import DefaultMessage from './DefaultMessage'; + +import styles from './Message.scss'; + +/** + * Dialog with token transfer in progress + */ +@withTranslation('dialogs') +class TokenInProgressMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + } + + render() { + const { props } = this; + const { t } = props; + return ( +
+ +

+ {t('dialogs:someTimeText')} +

+
+ +
+
+
+ ); + } +} + +export default TokenInProgressMessage; diff --git a/src/components/Messages/TransferSuccessMessage.js b/src/components/Messages/TransferSuccessMessage.js new file mode 100644 index 00000000..6e3e0217 --- /dev/null +++ b/src/components/Messages/TransferSuccessMessage.js @@ -0,0 +1,46 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation } from 'react-i18next'; +import { EMPTY_DATA_STRING } from '../../constants'; +import DefaultMessage from './DefaultMessage'; +import Button from '../Button/Button'; + +import styles from './Message.scss'; +/** + * Dialog with message about success token transfer + */ +@withTranslation(['dialogs', 'other']) +class TransferSuccessMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + onButtonClick: PropTypes.func.isRequired, + value: PropTypes.string, + } + + static defaultProps = { + value: EMPTY_DATA_STRING, + } + + render() { + const { props: { onButtonClick, t, value } } = this; + return ( +
+ +

{t('other:yourBalance')}

+
{value}
+
+
+ +
+
+ ); + } +} + +export default TransferSuccessMessage; diff --git a/src/components/Messages/index.js b/src/components/Messages/index.js new file mode 100644 index 00000000..4e724aae --- /dev/null +++ b/src/components/Messages/index.js @@ -0,0 +1,14 @@ +import DefaultMessage from './DefaultMessage'; +import AgreedMessage from './AgreedMessage'; +import RejectMessage from './RejectMessage'; +import TransferSuccessMessage from './TransferSuccessMessage'; +import TokenInProgressMessage from './TokenInProgressMessage'; + +export default DefaultMessage; + +export { + AgreedMessage, + RejectMessage, + TransferSuccessMessage, + TokenInProgressMessage, +}; From 8de3844c3f8cec5c81268d379d628d3044f41dac Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Wed, 4 Dec 2019 14:49:12 +0700 Subject: [PATCH 214/219] add messages tests --- src/components/Button/Button.js | 7 ++-- src/components/Messages/AgreedMessage.test.js | 29 +++++++++++++ .../Messages/DefaultMessage.test.js | 28 +++++++++++++ src/components/Messages/RejectMessage.test.js | 29 +++++++++++++ .../Messages/TokenInProgressMessage.test.js | 17 ++++++++ .../Messages/TransferSuccessMessage.test.js | 41 +++++++++++++++++++ 6 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 src/components/Messages/AgreedMessage.test.js create mode 100644 src/components/Messages/DefaultMessage.test.js create mode 100644 src/components/Messages/RejectMessage.test.js create mode 100644 src/components/Messages/TokenInProgressMessage.test.js create mode 100644 src/components/Messages/TransferSuccessMessage.test.js diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js index bebb1ae2..ff27dab0 100644 --- a/src/components/Button/Button.js +++ b/src/components/Button/Button.js @@ -17,8 +17,8 @@ const Button = ({ -
+ { + onButtonClick + ? ( +
+ +
+ ) + : null + }
); } diff --git a/src/components/Messages/RejectMessage.test.js b/src/components/Messages/RejectMessage.test.js index dd590ed2..be2e4226 100644 --- a/src/components/Messages/RejectMessage.test.js +++ b/src/components/Messages/RejectMessage.test.js @@ -26,4 +26,12 @@ describe('RejectMessage', () => { button.prop('onClick')(); expect(mockOnClick).toHaveBeenCalled(); }); + + it('should render correct without onButtonClick', async () => { + const wrapperCustom = shallow( + , + ).dive(); + expect(wrapper.length).toEqual(1); + expect(wrapperCustom.find(Button).length).toEqual(0); + }); }); diff --git a/src/components/Messages/TransferSuccessMessage.js b/src/components/Messages/TransferSuccessMessage.js index 6e3e0217..936a2b1f 100644 --- a/src/components/Messages/TransferSuccessMessage.js +++ b/src/components/Messages/TransferSuccessMessage.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; +import { withTranslation, Trans } from 'react-i18next'; import { EMPTY_DATA_STRING } from '../../constants'; import DefaultMessage from './DefaultMessage'; import Button from '../Button/Button'; @@ -13,16 +13,32 @@ import styles from './Message.scss'; class TransferSuccessMessage extends React.Component { static propTypes = { t: PropTypes.func.isRequired, - onButtonClick: PropTypes.func.isRequired, + onButtonClick: PropTypes.func, value: PropTypes.string, + buttonText: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.shape({}), + ]), + } + + static defaultProps = { + onButtonClick: null, } static defaultProps = { value: EMPTY_DATA_STRING, + buttonText: , } render() { - const { props: { onButtonClick, t, value } } = this; + const { + props: { + onButtonClick, + t, + value, + buttonText, + }, + } = this; return (
{t('other:yourBalance')}

{value}
-
- -
+ { + onButtonClick + ? ( +
+ +
+ ) + : null + }
); } diff --git a/src/components/Messages/TransferSuccessMessage.test.js b/src/components/Messages/TransferSuccessMessage.test.js index 14e37cac..1c87d1fb 100644 --- a/src/components/Messages/TransferSuccessMessage.test.js +++ b/src/components/Messages/TransferSuccessMessage.test.js @@ -38,4 +38,14 @@ describe('TransferSuccessMessage', () => { ).dive(); expect(wrapperCustom.find('.value').text()).toEqual('0.1234 TKN'); }); + + it('should render correct without onButtonClick', async () => { + const wrapperCustom = shallow( + , + ).dive(); + expect(wrapper.length).toEqual(1); + expect(wrapperCustom.find(Button).length).toEqual(0); + }); }); From c11957b352b705c6134d91f5fd2b4d1844b2ae1d Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Thu, 5 Dec 2019 09:11:25 +0700 Subject: [PATCH 217/219] Rename messages folder & refactor messages with button --- src/components/Dialog/Dialog.stories.js | 2 +- src/components/Message/AgreedMessage.js | 61 +++++++++++++++++++ .../AgreedMessage.test.js | 8 +++ .../{Messages => Message}/DefaultMessage.js | 0 .../DefaultMessage.test.js | 0 .../{Messages => Message}/Message.scss | 0 .../{Messages => Message}/Messages.stories.js | 0 .../{Messages => Message}/RejectMessage.js | 0 .../RejectMessage.test.js | 0 .../TokenInProgressMessage.js | 0 .../TokenInProgressMessage.test.js | 0 .../TransferSuccessMessage.js | 0 .../TransferSuccessMessage.test.js | 0 src/components/{Messages => Message}/index.js | 0 src/components/Messages/AgreedMessage.js | 40 ------------ 15 files changed, 70 insertions(+), 41 deletions(-) create mode 100644 src/components/Message/AgreedMessage.js rename src/components/{Messages => Message}/AgreedMessage.test.js (73%) rename src/components/{Messages => Message}/DefaultMessage.js (100%) rename src/components/{Messages => Message}/DefaultMessage.test.js (100%) rename src/components/{Messages => Message}/Message.scss (100%) rename src/components/{Messages => Message}/Messages.stories.js (100%) rename src/components/{Messages => Message}/RejectMessage.js (100%) rename src/components/{Messages => Message}/RejectMessage.test.js (100%) rename src/components/{Messages => Message}/TokenInProgressMessage.js (100%) rename src/components/{Messages => Message}/TokenInProgressMessage.test.js (100%) rename src/components/{Messages => Message}/TransferSuccessMessage.js (100%) rename src/components/{Messages => Message}/TransferSuccessMessage.test.js (100%) rename src/components/{Messages => Message}/index.js (100%) delete mode 100644 src/components/Messages/AgreedMessage.js diff --git a/src/components/Dialog/Dialog.stories.js b/src/components/Dialog/Dialog.stories.js index 211a3d04..5e9737e5 100644 --- a/src/components/Dialog/Dialog.stories.js +++ b/src/components/Dialog/Dialog.stories.js @@ -9,7 +9,7 @@ import { RejectMessage, TransferSuccessMessage, TokenInProgressMessage, -} from '../Messages'; +} from '../Message'; const defaultDialogStore = { remove: () => {}, diff --git a/src/components/Message/AgreedMessage.js b/src/components/Message/AgreedMessage.js new file mode 100644 index 00000000..8c1e5c64 --- /dev/null +++ b/src/components/Message/AgreedMessage.js @@ -0,0 +1,61 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withTranslation, Trans } from 'react-i18next'; +import { VerifyIcon } from '../Icons'; +import DefaultMessage from './DefaultMessage'; +import Button from '../Button/Button'; + +import styles from './Message.scss'; + +/** + * Message about agreed decision + */ +@withTranslation(['dialogs']) +class AgreedMessage extends React.Component { + static propTypes = { + t: PropTypes.func.isRequired, + onButtonClick: PropTypes.func, + buttonText: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.shape({}), + ]), + }; + + static defaultProps = { + onButtonClick: null, + buttonText: , + } + + render() { + const { + props: { + onButtonClick, + t, + buttonText, + }, + } = this; + return ( +
+ + + { + onButtonClick + ? ( +
+ +
+ ) + : null + } +
+ ); + } +} + +export default AgreedMessage; diff --git a/src/components/Messages/AgreedMessage.test.js b/src/components/Message/AgreedMessage.test.js similarity index 73% rename from src/components/Messages/AgreedMessage.test.js rename to src/components/Message/AgreedMessage.test.js index 22034c4f..979c452c 100644 --- a/src/components/Messages/AgreedMessage.test.js +++ b/src/components/Message/AgreedMessage.test.js @@ -26,4 +26,12 @@ describe('AgreedMessage', () => { button.prop('onClick')(); expect(mockOnClick).toHaveBeenCalled(); }); + + it('should render correct without onButtonClick', async () => { + const wrapperCustom = shallow( + , + ).dive(); + expect(wrapper.length).toEqual(1); + expect(wrapperCustom.find(Button).length).toEqual(0); + }); }); diff --git a/src/components/Messages/DefaultMessage.js b/src/components/Message/DefaultMessage.js similarity index 100% rename from src/components/Messages/DefaultMessage.js rename to src/components/Message/DefaultMessage.js diff --git a/src/components/Messages/DefaultMessage.test.js b/src/components/Message/DefaultMessage.test.js similarity index 100% rename from src/components/Messages/DefaultMessage.test.js rename to src/components/Message/DefaultMessage.test.js diff --git a/src/components/Messages/Message.scss b/src/components/Message/Message.scss similarity index 100% rename from src/components/Messages/Message.scss rename to src/components/Message/Message.scss diff --git a/src/components/Messages/Messages.stories.js b/src/components/Message/Messages.stories.js similarity index 100% rename from src/components/Messages/Messages.stories.js rename to src/components/Message/Messages.stories.js diff --git a/src/components/Messages/RejectMessage.js b/src/components/Message/RejectMessage.js similarity index 100% rename from src/components/Messages/RejectMessage.js rename to src/components/Message/RejectMessage.js diff --git a/src/components/Messages/RejectMessage.test.js b/src/components/Message/RejectMessage.test.js similarity index 100% rename from src/components/Messages/RejectMessage.test.js rename to src/components/Message/RejectMessage.test.js diff --git a/src/components/Messages/TokenInProgressMessage.js b/src/components/Message/TokenInProgressMessage.js similarity index 100% rename from src/components/Messages/TokenInProgressMessage.js rename to src/components/Message/TokenInProgressMessage.js diff --git a/src/components/Messages/TokenInProgressMessage.test.js b/src/components/Message/TokenInProgressMessage.test.js similarity index 100% rename from src/components/Messages/TokenInProgressMessage.test.js rename to src/components/Message/TokenInProgressMessage.test.js diff --git a/src/components/Messages/TransferSuccessMessage.js b/src/components/Message/TransferSuccessMessage.js similarity index 100% rename from src/components/Messages/TransferSuccessMessage.js rename to src/components/Message/TransferSuccessMessage.js diff --git a/src/components/Messages/TransferSuccessMessage.test.js b/src/components/Message/TransferSuccessMessage.test.js similarity index 100% rename from src/components/Messages/TransferSuccessMessage.test.js rename to src/components/Message/TransferSuccessMessage.test.js diff --git a/src/components/Messages/index.js b/src/components/Message/index.js similarity index 100% rename from src/components/Messages/index.js rename to src/components/Message/index.js diff --git a/src/components/Messages/AgreedMessage.js b/src/components/Messages/AgreedMessage.js deleted file mode 100644 index 8fda443b..00000000 --- a/src/components/Messages/AgreedMessage.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; -import { VerifyIcon } from '../Icons'; -import DefaultMessage from './DefaultMessage'; -import Button from '../Button/Button'; - -import styles from './Message.scss'; - -/** - * Message about agreed decision - */ -@withTranslation(['dialogs']) -class AgreedMessage extends React.Component { - static propTypes = { - t: PropTypes.func.isRequired, - onButtonClick: PropTypes.func.isRequired, - }; - - render() { - const { t, onButtonClick } = this.props; - return ( -
- - -
- -
-
- ); - } -} - -export default AgreedMessage; From cab953e35b7325d64d7b994e2e1f8027ace3a3f3 Mon Sep 17 00:00:00 2001 From: WORK_Pavel Date: Thu, 5 Dec 2019 09:22:44 +0700 Subject: [PATCH 218/219] upd jsdoc --- src/stores/DialogStore/DialogItemModel.js | 9 +++++++++ src/stores/DialogStore/DialogStore.js | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/stores/DialogStore/DialogItemModel.js b/src/stores/DialogStore/DialogItemModel.js index 12f5eaf7..ed9fb852 100644 --- a/src/stores/DialogStore/DialogItemModel.js +++ b/src/stores/DialogStore/DialogItemModel.js @@ -8,6 +8,15 @@ const defaults = { * Single modal dialog model */ class DialogItem { + /** + * @param {string} name name dialog + * @param {object} options options for dialog + * @param {boolean} options.history add to history or not + * @param {Function} options.onOpen method that is called + * on open dialog + * @param {Function} options.onClose method that is called + * on close dialog + */ constructor(name, options) { this._name = name; this.options = { ...defaults, ...options }; diff --git a/src/stores/DialogStore/DialogStore.js b/src/stores/DialogStore/DialogStore.js index 5ad54348..73bf9304 100644 --- a/src/stores/DialogStore/DialogStore.js +++ b/src/stores/DialogStore/DialogStore.js @@ -61,6 +61,11 @@ class DialogStore { * * @param {string} name name new dialog * @param {object} options options for new dialog + * @param {boolean} options.history add to history or not + * @param {Function} options.onOpen method that is called + * on open dialog + * @param {Function} options.onClose method that is called + * on close dialog */ add(name, options) { this.list[name] = new DialogItem(name, options); From 6976a0f22831edd74b463388ceea71d43f327ca4 Mon Sep 17 00:00:00 2001 From: Vladimir Vinokurov Date: Sat, 25 Jan 2020 01:01:12 +0700 Subject: [PATCH 219/219] Create LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f8677c80 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2019] [NEOS company] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.