From ebea46526e261ce7f3fc7357066f48c46cff9247 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 5 Oct 2018 18:11:30 +0200 Subject: [PATCH 001/146] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..0bd7356a6 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# HostsModule +This module manages competition hosts From 1b0e344f5ce8a6d42d3c5eb4c6857cad3c8bf919 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 18 Oct 2018 08:29:36 +0200 Subject: [PATCH 002/146] Setting a minimal client workspace, routing not working --- client/.gitignore | 16 + client/.npmignore | 3 + client/package-lock.json | 691 +++++++++++++++++++++++++++++++++++++++ client/package.json | 22 ++ client/src/index.js | 30 ++ 5 files changed, 762 insertions(+) create mode 100644 client/.gitignore create mode 100644 client/.npmignore create mode 100644 client/package-lock.json create mode 100644 client/package.json create mode 100644 client/src/index.js diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 000000000..c25e5957f --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,16 @@ +# Logs +logs +*.log +npm-debug.log* + +# Dependency directories +node_modules + +# Optional npm cache directory +.npm + +# Visual Studio Code +.vscode + +#Mac specific files +.DS_Store diff --git a/client/.npmignore b/client/.npmignore new file mode 100644 index 000000000..e4bf041a8 --- /dev/null +++ b/client/.npmignore @@ -0,0 +1,3 @@ +build +node_modules +.DS_Store diff --git a/client/package-lock.json b/client/package-lock.json new file mode 100644 index 000000000..3c05a5b3f --- /dev/null +++ b/client/package-lock.json @@ -0,0 +1,691 @@ +{ + "name": "@advancedalgos/hosts-client", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", + "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==", + "requires": { + "regenerator-runtime": "^0.12.0" + } + }, + "@material-ui/core": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.2.2.tgz", + "integrity": "sha512-wDTJyR76+OBdlltiPs3lc1gD6zR+dSA6nITtgkBeLf1NvWfNotMWdvldIDnF3bu24ySAX9imfzDfkBu4Edtqww==", + "requires": { + "@babel/runtime": "7.1.2", + "@types/jss": "^9.5.6", + "@types/react-transition-group": "^2.0.8", + "brcast": "^3.0.1", + "classnames": "^2.2.5", + "csstype": "^2.5.2", + "debounce": "^1.1.0", + "deepmerge": "^2.0.1", + "dom-helpers": "^3.2.1", + "hoist-non-react-statics": "^2.5.0", + "is-plain-object": "^2.0.4", + "jss": "^9.3.3", + "jss-camel-case": "^6.0.0", + "jss-default-unit": "^8.0.2", + "jss-global": "^3.0.0", + "jss-nested": "^6.0.1", + "jss-props-sort": "^6.0.0", + "jss-vendor-prefixer": "^7.0.0", + "keycode": "^2.1.9", + "normalize-scroll-left": "^0.1.2", + "popper.js": "^1.14.1", + "prop-types": "^15.6.0", + "react-event-listener": "^0.6.2", + "react-transition-group": "^2.2.1", + "recompose": "0.28.0 - 0.30.0", + "warning": "^4.0.1" + } + }, + "@material-ui/icons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-3.0.1.tgz", + "integrity": "sha512-1kNcxYiIT1x8iDPEAlgmKrfRTIV8UyK6fLVcZ9kMHIKGWft9I451V5mvSrbCjbf7MX1TbLWzZjph0aVCRf9MqQ==", + "requires": { + "@babel/runtime": "7.0.0", + "recompose": "^0.29.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", + "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", + "requires": { + "regenerator-runtime": "^0.12.0" + } + }, + "recompose": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.29.0.tgz", + "integrity": "sha512-J/qLXNU4W+AeHCDR70ajW8eMd1uroqZaECTj6qqDLPMILz3y0EzpYlvrnxKB9DnqcngWrtGwjXY9JeXaW9kS1A==", + "requires": { + "@babel/runtime": "^7.0.0", + "change-emitter": "^0.1.2", + "fbjs": "^0.8.1", + "hoist-non-react-statics": "^2.3.1", + "react-lifecycles-compat": "^3.0.2", + "symbol-observable": "^1.0.4" + } + } + } + }, + "@types/jss": { + "version": "9.5.7", + "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.7.tgz", + "integrity": "sha512-OZimStu2QdDMtZ0h72JXqvLVbWUjXd5ZLk8vxLmfuC/nM1AabRyyGoxSufnzixrbpEcVcyy/JV5qeQu2JnjVZw==", + "requires": { + "csstype": "^2.0.0", + "indefinite-observable": "^1.0.1" + } + }, + "@types/prop-types": { + "version": "15.5.6", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.5.6.tgz", + "integrity": "sha512-ZBFR7TROLVzCkswA3Fmqq+IIJt62/T7aY/Dmz+QkU7CaW2QFqAitCE8Ups7IzmGhcN1YWMBT4Qcoc07jU9hOJQ==" + }, + "@types/react": { + "version": "16.4.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz", + "integrity": "sha512-eFzJKEg6pdeaukVLVZ8Xb79CTl/ysX+ExmOfAAqcFlCCK5TgFDD9kWR0S18sglQ3EmM8U+80enjUqbfnUyqpdA==", + "requires": { + "@types/prop-types": "*", + "csstype": "^2.2.0" + } + }, + "@types/react-transition-group": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.0.14.tgz", + "integrity": "sha512-pa7qB0/mkhwWMBFoXhX8BcntK8G4eQl4sIfSrJCxnivTYRQWjOWf2ClR9bWdm0EUFBDHzMbKYS+QYfDtBzkY4w==", + "requires": { + "@types/react": "*" + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "brcast": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz", + "integrity": "sha512-eI3yqf9YEqyGl9PCNTR46MGvDylGtaHjalcz6Q3fAPnP/PhpKkkve52vFdfGpwp4VUvK6LUr4TQN+2stCrEwTg==" + }, + "change-emitter": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz", + "integrity": "sha1-6LL+PX8at9aaMhma/5HqaTFAlRU=" + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "css-vendor": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-0.3.8.tgz", + "integrity": "sha1-ZCHP0wNM5mT+dnOXL9ARn8KJQfo=", + "requires": { + "is-in-browser": "^1.0.2" + } + }, + "csstype": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.5.7.tgz", + "integrity": "sha512-Nt5VDyOTIIV4/nRFswoCKps1R5CD1hkiyjBE9/thNaNZILLEviVw9yWQw15+O+CpNjQKB/uvdcxFFOrSflY3Yw==" + }, + "debounce": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", + "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==" + }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==" + }, + "dom-helpers": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", + "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" + }, + "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 + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + } + } + }, + "fbjs-css-vars": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.1.tgz", + "integrity": "sha512-IM+v/C40MNZWqsLErc32e0TyIk/NhkkQZL0QmjBh6zi1eXv0/GeVKmKmueQX7nn9SXQBQbTUcB8zuexIF3/88w==" + }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, + "graphql-tag": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.0.tgz", + "integrity": "sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w==" + }, + "history": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", + "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "requires": { + "invariant": "^2.2.1", + "loose-envify": "^1.2.0", + "resolve-pathname": "^2.2.0", + "value-equal": "^0.4.0", + "warning": "^3.0.0" + }, + "dependencies": { + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + }, + "hyphenate-style-name": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz", + "integrity": "sha1-MRYKNpMK2vH8BMYHT360FGXU7Es=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "indefinite-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-1.0.1.tgz", + "integrity": "sha1-CZFUI8yNb36xy3iCrRNGM8mm7cM=", + "requires": { + "symbol-observable": "1.0.4" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "jss": { + "version": "9.8.7", + "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz", + "integrity": "sha512-awj3XRZYxbrmmrx9LUSj5pXSUfm12m8xzi/VKeqI1ZwWBtQ0kVPTs3vYs32t4rFw83CgFDukA8wKzOE9sMQnoQ==", + "requires": { + "is-in-browser": "^1.1.3", + "symbol-observable": "^1.1.0", + "warning": "^3.0.0" + }, + "dependencies": { + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "jss-camel-case": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-6.1.0.tgz", + "integrity": "sha512-HPF2Q7wmNW1t79mCqSeU2vdd/vFFGpkazwvfHMOhPlMgXrJDzdj9viA2SaHk9ZbD5pfL63a8ylp4++irYbbzMQ==", + "requires": { + "hyphenate-style-name": "^1.0.2" + } + }, + "jss-default-unit": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/jss-default-unit/-/jss-default-unit-8.0.2.tgz", + "integrity": "sha512-WxNHrF/18CdoAGw2H0FqOEvJdREXVXLazn7PQYU7V6/BWkCV0GkmWsppNiExdw8dP4TU1ma1dT9zBNJ95feLmg==" + }, + "jss-global": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jss-global/-/jss-global-3.0.0.tgz", + "integrity": "sha512-wxYn7vL+TImyQYGAfdplg7yaxnPQ9RaXY/cIA8hawaVnmmWxDHzBK32u1y+RAvWboa3lW83ya3nVZ/C+jyjZ5Q==" + }, + "jss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jss-nested/-/jss-nested-6.0.1.tgz", + "integrity": "sha512-rn964TralHOZxoyEgeq3hXY8hyuCElnvQoVrQwKHVmu55VRDd6IqExAx9be5HgK0yN/+hQdgAXQl/GUrBbbSTA==", + "requires": { + "warning": "^3.0.0" + }, + "dependencies": { + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "jss-props-sort": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/jss-props-sort/-/jss-props-sort-6.0.0.tgz", + "integrity": "sha512-E89UDcrphmI0LzmvYk25Hp4aE5ZBsXqMWlkFXS0EtPkunJkRr+WXdCNYbXbksIPnKlBenGB9OxzQY+mVc70S+g==" + }, + "jss-vendor-prefixer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz", + "integrity": "sha512-Agd+FKmvsI0HLcYXkvy8GYOw3AAASBUpsmIRvVQheps+JWaN892uFOInTr0DRydwaD91vSSUCU4NssschvF7MA==", + "requires": { + "css-vendor": "^0.3.8" + } + }, + "keycode": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz", + "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" + }, + "lodash.flowright": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/lodash.flowright/-/lodash.flowright-3.5.0.tgz", + "integrity": "sha1-K1//OZcW1+fcVyT+k0n2cGUYTWc=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "min-document": { + "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" + } + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "normalize-scroll-left": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz", + "integrity": "sha512-F9YMRls0zCF6BFIE2YnXDRpHPpfd91nOIaNdDgrx5YMoPLo8Wqj+6jNXHQsYBavJeXP4ww8HCt0xQAKc5qk2Fg==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "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=", + "requires": { + "isarray": "0.0.1" + } + }, + "popper.js": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz", + "integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=" + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, + "react": { + "version": "16.5.2", + "resolved": "https://registry.npmjs.org/react/-/react-16.5.2.tgz", + "integrity": "sha512-FDCSVd3DjVTmbEAjUNX6FgfAmQ+ypJfHUsqUJOYNCBUp1h8lqmtC+0mXJ+JjsWx4KAVTkk1vKd1hLQPvEviSuw==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.5.0" + } + }, + "react-apollo": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/react-apollo/-/react-apollo-2.2.4.tgz", + "integrity": "sha512-haS5R30Qvteb65ZLfWomUZQh47VU4ld4Kof3zlqdbLOrYPt3/DdVZC8ZFPZSxd5zPeIJtZqpUfAxD1WHVoMPIA==", + "requires": { + "fbjs": "^1.0.0", + "hoist-non-react-statics": "^3.0.0", + "invariant": "^2.2.2", + "lodash.flowright": "^3.5.0", + "lodash.isequal": "^4.5.0", + "prop-types": "^15.6.0" + }, + "dependencies": { + "fbjs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-1.0.0.tgz", + "integrity": "sha512-MUgcMEJaFhCaF1QtWGnmq9ZDRAzECTCRAF7O6UZIlAlkTs1SasiX9aP0Iw7wfD2mJ7wDTNfg2w7u5fSCwJk1OA==", + "requires": { + "core-js": "^2.4.1", + "fbjs-css-vars": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "hoist-non-react-statics": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.0.1.tgz", + "integrity": "sha512-1kXwPsOi0OGQIZNVMPvgWJ9tSnGMiMfJdihqEzrPEXlHOBh9AAHXX/QYmAJTXztnz/K+PQ8ryCb4eGaN6HlGbQ==", + "requires": { + "react-is": "^16.3.2" + } + } + } + }, + "react-event-listener": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.4.tgz", + "integrity": "sha512-t7VSjIuUFmN+GeyKb+wm025YLeojVB85kJL6sSs0wEBJddfmKBEQz+CNBZ2zBLKVWkPy/fZXM6U5yvojjYBVYQ==", + "requires": { + "@babel/runtime": "7.0.0", + "prop-types": "^15.6.0", + "warning": "^4.0.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", + "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", + "requires": { + "regenerator-runtime": "^0.12.0" + } + } + } + }, + "react-hot-loader": { + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.11.tgz", + "integrity": "sha512-T0G5jURyTsFLoiW6MTr5Q35UHC/B2pmYJ7+VBjk8yMDCEABRmCGy4g6QwxoB4pWg4/xYvVTa/Pbqnsgx/+NLuA==", + "dev": true, + "requires": { + "fast-levenshtein": "^2.0.6", + "global": "^4.3.0", + "hoist-non-react-statics": "^2.5.0", + "prop-types": "^15.6.1", + "react-lifecycles-compat": "^3.0.4", + "shallowequal": "^1.0.2" + } + }, + "react-is": { + "version": "16.5.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.5.2.tgz", + "integrity": "sha512-hSl7E6l25GTjNEZATqZIuWOgSnpXb3kD0DVCujmg46K5zLxsbiKaaT6VO9slkSBDPZfYs30lwfJwbOFOnoEnKQ==" + }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-router": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", + "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "requires": { + "history": "^4.7.2", + "hoist-non-react-statics": "^2.5.0", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.1", + "warning": "^4.0.1" + } + }, + "react-router-dom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz", + "integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==", + "requires": { + "history": "^4.7.2", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.1", + "react-router": "^4.3.1", + "warning": "^4.0.1" + } + }, + "react-transition-group": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.0.tgz", + "integrity": "sha512-qYB3JBF+9Y4sE4/Mg/9O6WFpdoYjeeYqx0AFb64PTazVy8RPMiE3A47CG9QmM4WJ/mzDiZYslV+Uly6O1Erlgw==", + "requires": { + "dom-helpers": "^3.3.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2", + "react-lifecycles-compat": "^3.0.4" + } + }, + "recompose": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.30.0.tgz", + "integrity": "sha512-ZTrzzUDa9AqUIhRk4KmVFihH0rapdCSMFXjhHbNrjAWxBuUD/guYlyysMnuHjlZC/KRiOKRtB4jf96yYSkKE8w==", + "requires": { + "@babel/runtime": "^7.0.0", + "change-emitter": "^0.1.2", + "fbjs": "^0.8.1", + "hoist-non-react-statics": "^2.3.1", + "react-lifecycles-compat": "^3.0.2", + "symbol-observable": "^1.0.4" + } + }, + "regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + }, + "resolve-pathname": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", + "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "schedule": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz", + "integrity": "sha512-HUcJicG5Ou8xfR//c2rPT0lPIRR09vVvN81T9fqfVgBmhERUbDEQoYKjpBxbueJnCPpSu2ujXzOnRQt6x9o/jw==", + "requires": { + "object-assign": "^4.1.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" + }, + "ua-parser-js": { + "version": "0.7.18", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", + "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" + }, + "value-equal": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", + "integrity": "sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw==" + }, + "warning": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.2.tgz", + "integrity": "sha512-wbTp09q/9C+jJn4KKJfJfoS6VleK/Dti0yqWSm6KMvJ4MRCXFQNapHuJXutJIrWV0Cf4AhTdeIe4qdKHR1+Hug==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "whatwg-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + } + } +} diff --git a/client/package.json b/client/package.json new file mode 100644 index 000000000..55beea823 --- /dev/null +++ b/client/package.json @@ -0,0 +1,22 @@ +{ + "name": "@advancedalgos/hosts-client", + "version": "0.0.1", + "description": "Advanced Algos Host client-side web app", + "author": "", + "license": "", + "main": "src/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "devDependencies": { + "react-hot-loader": "^4.3.11" + }, + "dependencies": { + "@material-ui/core": "^3.2.0", + "@material-ui/icons": "^3.0.1", + "graphql-tag": "^2.10.0", + "react": "^16.5.2", + "react-apollo": "^2.2.4", + "react-router-dom": "^4.3.1" + } +} diff --git a/client/src/index.js b/client/src/index.js new file mode 100644 index 000000000..aa272fd99 --- /dev/null +++ b/client/src/index.js @@ -0,0 +1,30 @@ +import React, { Component } from 'react' +import { Route, BrowserRouter, Switch } from 'react-router-dom' + +const Base = () => ( +

+ base website +

+) + +const Added = () => ( +

+ added website +

+) + +class App extends Component { + render () { + return ( + + +

{window.location.pathname}

+ + +
+
+ ) + } +} + +export default App From dd339f6899558013973e85cc1ef2387d38a05030 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 18 Oct 2018 08:31:36 +0200 Subject: [PATCH 003/146] first draft on the backend, no auth, no subscription, no edition --- server/.babelrc | 3 + server/.env.example | 4 + server/.gitignore | 23 + server/package-lock.json | 5850 ++++++++++++++++++++++++++++++ server/package.json | 32 + server/src/index.js | 45 + server/src/models/competition.js | 40 + server/src/schema.js | 166 + server/src/utils/functions.js | 14 + server/src/utils/logger.js | 39 + 10 files changed, 6216 insertions(+) create mode 100644 server/.babelrc create mode 100644 server/.env.example create mode 100644 server/.gitignore create mode 100644 server/package-lock.json create mode 100644 server/package.json create mode 100644 server/src/index.js create mode 100644 server/src/models/competition.js create mode 100644 server/src/schema.js create mode 100644 server/src/utils/functions.js create mode 100644 server/src/utils/logger.js diff --git a/server/.babelrc b/server/.babelrc new file mode 100644 index 000000000..f2e312799 --- /dev/null +++ b/server/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env", "stage-2"] +} diff --git a/server/.env.example b/server/.env.example new file mode 100644 index 000000000..dd712e3f9 --- /dev/null +++ b/server/.env.example @@ -0,0 +1,4 @@ +PORT=3000 +DB_USERNAME=example_name +DB_PASSWORD=example_password +DB_DOMAIN=example.com:1234/example_name diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 000000000..8e14c1a3d --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,23 @@ +# Logs +logs +*.log +npm-debug.log* + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# dotenv environment variables file +.env + +# Build folder js files +build/ +dist/ + +# Visual Studio Code +.vscode + +#Mac specific files +.DS_Store diff --git a/server/package-lock.json b/server/package-lock.json new file mode 100644 index 000000000..fbcbb16c0 --- /dev/null +++ b/server/package-lock.json @@ -0,0 +1,5850 @@ +{ + "name": "@advancedalgos/hosts-client", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/body-parser": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", + "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", + "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", + "requires": { + "@types/node": "*" + } + }, + "@types/events": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" + }, + "@types/express": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", + "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "@types/express-jwt": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/express-jwt/-/express-jwt-0.0.34.tgz", + "integrity": "sha1-/b7kxq9cCiRu8qkz9VGZc8dxfwI=", + "requires": { + "@types/express": "*", + "@types/express-unless": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", + "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", + "requires": { + "@types/events": "*", + "@types/node": "*", + "@types/range-parser": "*" + } + }, + "@types/express-unless": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.0.32.tgz", + "integrity": "sha512-6YpJyFNlDDnPnRjMOvJCoDYlSDDmG/OEEUsPk7yhNkL4G9hUYtgab6vi1CcWsGSSSM0CsvNlWTG+ywAGnvF03g==", + "requires": { + "@types/express": "*" + } + }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" + }, + "@types/node": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz", + "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==" + }, + "@types/range-parser": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", + "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" + }, + "@types/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "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 + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.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" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "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=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "chokidar": "^1.6.1", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "dev": true, + "requires": { + "babel-helper-bindify-decorators": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", + "dev": true + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "dev": true + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", + "dev": true + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-generators": "^6.5.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "dev": true, + "requires": { + "babel-helper-explode-class": "^6.24.1", + "babel-plugin-syntax-decorators": "^6.13.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "dev": true, + "requires": { + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators": "^6.24.1", + "babel-preset-stage-3": "^6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-plugin-transform-exponentiation-operator": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.22.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", + "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + }, + "bson": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", + "integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg==" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000892", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000892.tgz", + "integrity": "sha512-X9rxMaWZNbJB5qjkDqPtNv/yfViTeUL6ILk0QJNxLV3OhKC5Acn5vxsuUvllR6B48mog8lmS+whwHq/QIYSL9w==", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" + }, + "colors": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" + }, + "colorspace": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.1.tgz", + "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "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==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", + "integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "cross-fetch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz", + "integrity": "sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=", + "requires": { + "node-fetch": "2.1.2", + "whatwg-fetch": "2.0.4" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "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" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "dot-prop": { + "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" + } + }, + "dotenv": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.1.0.tgz", + "integrity": "sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw==" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", + "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "electron-to-chromium": { + "version": "1.3.79", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.79.tgz", + "integrity": "sha512-LQdY3j4PxuUl6xfxiFruTSlCniTrTrzAd8/HfsLEMi0PUpaQ0Iy+Pr4N4VllDYjs0Hyu2lkTbvzqlG+PX9NsNw==", + "dev": true + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "requires": { + "env-variable": "0.0.x" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "env-variable": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", + "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "event-stream": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz", + "integrity": "sha512-dGXNg4F/FgVzlApjzItL+7naHutA3fDqbV/zAZqDDlXTjiMnQmZKu+prImWKszeBM5UQeGvAl3u1wBiKeDh61g==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "flatmap-stream": "^0.1.0", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "express-graphql": { + "version": "0.6.12", + "resolved": "http://registry.npmjs.org/express-graphql/-/express-graphql-0.6.12.tgz", + "integrity": "sha512-ouLWV0hRw4hnaLtXzzwhdC79ewxKbY2PRvm05mPc/zOH5W5WVCHDQ1SmNxEPBQdUeeSNh29aIqW9zEQkA3kMuA==", + "requires": { + "accepts": "^1.3.0", + "content-type": "^1.0.4", + "http-errors": "^1.3.0", + "raw-body": "^2.3.2" + } + }, + "express-jwt": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/express-jwt/-/express-jwt-5.3.1.tgz", + "integrity": "sha512-1C9RNq0wMp/JvsH/qZMlg3SIPvKu14YkZ4YYv7gJQ1Vq+Dv8LH9tLKenS5vMNth45gTlEUGx+ycp9IHIlaHP/g==", + "requires": { + "async": "^1.5.0", + "express-unless": "^0.3.0", + "jsonwebtoken": "^8.1.0", + "lodash.set": "^4.0.0" + } + }, + "express-unless": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/express-unless/-/express-unless-0.3.1.tgz", + "integrity": "sha1-JVfBRudb65A+LSR/m1ugFFJpbiA=" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-safe-stringify": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", + "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==" + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "flatmap-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", + "integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "optional": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": 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" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "optional": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "got": { + "version": "6.7.1", + "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "graphql": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", + "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", + "requires": { + "iterall": "^1.2.2" + } + }, + "graphql-config": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-2.2.1.tgz", + "integrity": "sha512-U8+1IAhw9m6WkZRRcyj8ZarK96R6lQBQ0an4lp76Ps9FyhOXENC5YQOxOFGm5CxPrX2rD0g3Je4zG5xdNJjwzQ==", + "requires": { + "graphql-import": "^0.7.1", + "graphql-request": "^1.5.0", + "js-yaml": "^3.10.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.4" + } + }, + "graphql-import": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/graphql-import/-/graphql-import-0.7.1.tgz", + "integrity": "sha512-YpwpaPjRUVlw2SN3OPljpWbVRWAhMAyfSba5U47qGMOSsPLi2gYeJtngGpymjm9nk57RFWEpjqwh4+dpYuFAPw==", + "requires": { + "lodash": "^4.17.4", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "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==" + } + } + }, + "graphql-playground-html": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/graphql-playground-html/-/graphql-playground-html-1.6.4.tgz", + "integrity": "sha512-mnpAVYSR3TesYsJ5OLJVJMA0muTCw4npsCI1cKMtW35lbA6KljZkLkz3ZWXhEIYPnHKIeUHEtbn1ZGkEXtAxLg==", + "requires": { + "graphql-config": "2.2.1" + } + }, + "graphql-playground-middleware-express": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/graphql-playground-middleware-express/-/graphql-playground-middleware-express-1.7.6.tgz", + "integrity": "sha512-fICPxYGIdhCxtFlwCnP3uZ2uRWeQ9wj7OkcWUiHNwaFma2TbRD5nNKaPA2u21YWha9xv26qIDxxcdW27F/lcbQ==", + "requires": { + "graphql-playground-html": "1.6.4" + } + }, + "graphql-request": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-1.8.2.tgz", + "integrity": "sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg==", + "requires": { + "cross-fetch": "2.2.2" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://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" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "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 + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true, + "optional": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "optional": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "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 + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true, + "optional": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true, + "optional": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "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==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "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=" + }, + "json5": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonwebtoken": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.3.0.tgz", + "integrity": "sha512-oge/hvlmeJCH+iIz1DwcO7vKPkNGJHhgkspk8OH3VKlw+mbi42WtD4ig1+VXRln765vxptAv+xT26Fd3cteqag==", + "requires": { + "jws": "^3.1.5", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jwa": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", + "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.10", + "safe-buffer": "^5.0.1" + } + }, + "jwks-rsa": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.3.0.tgz", + "integrity": "sha512-9q+d5VffK/FvFAjuXoddrq7zQybFSINV4mcwJJExGKXGyjWWpTt3vsn/aX33aB0heY02LK0qSyicdtRK0gVTig==", + "requires": { + "@types/express-jwt": "0.0.34", + "debug": "^2.2.0", + "limiter": "^1.1.0", + "lru-memoizer": "^1.6.0", + "ms": "^2.0.0", + "request": "^2.73.0" + } + }, + "jws": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", + "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", + "requires": { + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" + } + }, + "kareem": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", + "integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg==" + }, + "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" + } + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "requires": { + "colornames": "^1.1.1" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "^4.0.0" + } + }, + "limiter": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.3.tgz", + "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==" + }, + "lock": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/lock/-/lock-0.1.4.tgz", + "integrity": "sha1-/sfervF+fDoKVeHaBCgD4l2RdF0=" + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, + "logform": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-1.10.0.tgz", + "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==", + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.2.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "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 + }, + "lru-cache": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", + "requires": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + } + }, + "lru-memoizer": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-1.12.0.tgz", + "integrity": "sha1-7+ZXBsyKnMZT+A8NWm6jitlQ41I=", + "requires": { + "lock": "~0.1.2", + "lodash": "^4.17.4", + "lru-cache": "~4.0.0", + "very-fast-args": "^1.1.0" + } + }, + "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" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true, + "optional": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memory-pager": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.1.0.tgz", + "integrity": "sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg==", + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "requires": { + "mime-db": "~1.36.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mongodb": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.6.tgz", + "integrity": "sha512-E5QJuXQoMlT7KyCYqNNMfAkhfQD79AT4F8Xd+6x37OX+8BL17GyXyWvfm6wuyx4wnzCCPoCSLeMeUN2S7dU9yw==", + "requires": { + "mongodb-core": "3.1.5", + "safe-buffer": "^5.1.2" + } + }, + "mongodb-core": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.5.tgz", + "integrity": "sha512-emT/tM4ZBinqd6RZok+EzDdtN4LjYJIckv71qQVOEFmvXgT5cperZegVmTgox/1cx4XQu6LJ5ZuIwipP/eKdQg==", + "requires": { + "bson": "^1.1.0", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + }, + "dependencies": { + "bson": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", + "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" + } + } + }, + "mongoose": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.4.tgz", + "integrity": "sha512-DIUWOyYgZv2zGi/BoFEaFiaCVuDonnzGhW3cnc3JFjBScYn6z24tS2j3VB0dtMoX8FFjxmmMVnlmHPEIbV4PKA==", + "requires": { + "async": "2.6.1", + "bson": "~1.0.5", + "kareem": "2.3.0", + "lodash.get": "4.4.2", + "mongodb": "3.1.6", + "mongodb-core": "3.1.5", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.5.1", + "mquery": "3.2.0", + "ms": "2.0.0", + "regexp-clone": "0.0.1", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz", + "integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg==" + }, + "mquery": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz", + "integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "0.0.1", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "node-fetch": { + "version": "2.1.2", + "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + }, + "nodemon": { + "version": "1.18.4", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.4.tgz", + "integrity": "sha512-hyK6vl65IPnky/ee+D3IWvVGgJa/m3No2/Xc/3wanS6Ce1MWjCzH6NnhPJ/vZM+6JFym16jtHx51lmCMB9HDtg==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "debug": "^3.1.0", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.0", + "semver": "^5.5.0", + "supports-color": "^5.2.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.2", + "update-notifier": "^2.3.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "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" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^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" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "glob-parent": { + "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" + }, + "dependencies": { + "is-glob": { + "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" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "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" + } + }, + "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 + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "optional": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.4", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "optional": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "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 + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true, + "optional": true + }, + "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-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "dev": true, + "requires": { + "event-stream": "~3.3.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + }, + "pstree.remy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.0.tgz", + "integrity": "sha512-q5I5vLRMVtdWa8n/3UEzZX7Lfghzrg9eG2IKk2ENLSofKRCXVqMvMUHxCKgXNaqH/8ebhBxrqftHWnyTFweJ5Q==", + "dev": true, + "requires": { + "ps-tree": "^1.1.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "randomatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true, + "optional": true + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://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" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.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" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "optional": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp-clone": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", + "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz", + "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "shebang-command": { + "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" + } + }, + "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 + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.1.tgz", + "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "stream-combiner": { + "version": "0.2.2", + "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", + "dev": true, + "requires": { + "duplexer": "~0.1.1", + "through": "~2.3.4" + } + }, + "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" + }, + "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", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "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" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "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 + }, + "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 + }, + "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 + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + } + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "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=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "~1.0.10" + } + }, + "tough-cookie": { + "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==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "undefsafe": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", + "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", + "dev": true, + "requires": { + "debug": "^2.2.0" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "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=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "very-fast-args": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/very-fast-args/-/very-fast-args-1.1.0.tgz", + "integrity": "sha1-4W0dH6+KbllqJGQh/ZCneWPQs5Y=" + }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + }, + "which": { + "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" + } + }, + "widest-line": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", + "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "dev": true, + "requires": { + "string-width": "^2.1.1" + } + }, + "winston": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.1.0.tgz", + "integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==", + "requires": { + "async": "^2.6.0", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^1.9.1", + "one-time": "0.0.4", + "readable-stream": "^2.3.6", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.2.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "winston-transport": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.2.0.tgz", + "integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==", + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 000000000..0e1118e2e --- /dev/null +++ b/server/package.json @@ -0,0 +1,32 @@ +{ + "name": "@advancedalgos/hosts-client", + "version": "0.0.1", + "description": "Advanced Algos Host client-side web app", + "author": "", + "license": "", + "main": "src/index.js", + "scripts": { + "start": "nodemon --exec babel-node --presets env,stage-2 src/index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-env": "^1.7.0", + "babel-preset-stage-2": "^6.24.1", + "nodemon": "^1.18.4" + }, + "dependencies": { + "cors": "^2.8.4", + "dotenv": "^6.0.0", + "express": "^4.16.3", + "express-graphql": "^0.6.12", + "express-jwt": "^5.3.1", + "graphql": "^14.0.0", + "graphql-playground-middleware-express": "^1.7.6", + "jsonwebtoken": "^8.3.0", + "jwks-rsa": "^1.3.0", + "lodash": "^4.17.10", + "mongoose": "^5.3.4", + "winston": "^3.1.0" + } +} diff --git a/server/src/index.js b/server/src/index.js new file mode 100644 index 000000000..6eddcd065 --- /dev/null +++ b/server/src/index.js @@ -0,0 +1,45 @@ +import express from 'express' +import cors from 'cors' +import mongoose from 'mongoose' +import graphqlHTTP from 'express-graphql' +import 'dotenv/config' +import expressPlayground from 'graphql-playground-middleware-express' + +import schema from './schema' + +// Initialise express +const app = express() + +// Allow cross origing request +app.use(cors()) +/* ------------------------------------------------- +---------------- Database setup -------------------- +------------------------------------------------- */ +// Database Connection +mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }) + +// Get Mongoose to use the global promise library +mongoose.Promise = global.Promise + +// Get the default connection +var db = mongoose.connection + +// bind error and success to console log +db.on('error', () => { console.error.bind(console, 'MongoDB connection error:') }) +db.once('open', () => { console.log('Connected to the DB.') }) + +/* ------------------------------------------------- +----------------- Graphql setup -------------------- +------------------------------------------------- */ + +app.use('/graphql', graphqlHTTP(req => { + return { + schema: schema, + context: { user: req.user } + } +})) +app.get('/playground', expressPlayground({ endpoint: '/graphql' })) + +app.listen(process.env.PORT, () => { + console.log(`Listening on port ${process.env.PORT}`) +}) diff --git a/server/src/models/competition.js b/server/src/models/competition.js new file mode 100644 index 000000000..a776da7ec --- /dev/null +++ b/server/src/models/competition.js @@ -0,0 +1,40 @@ +import mongoose, { Schema } from 'mongoose' + +const competitionSchema = new Schema({ + codeName: String, + displayName: String, + host: String, + description: String, + startDatetime: Date, + finishDatetime: Date, + formula: String, + plotter: { + codeName: String, + host: String, + repo: String, + moduleName: String + }, + rules: [{ + number: Number, + title: String, + description: String + }], + prizes: [{ + position: Number, + algoPrize: Number, + otherPrizes: [{ + condition: String, + amount: Number, + asset: String + }] + }], + participants: [{ + id: String, + bot: String, + release: String + }] +}) + +const Competition = mongoose.model('Competition', competitionSchema) + +export default Competition diff --git a/server/src/schema.js b/server/src/schema.js new file mode 100644 index 000000000..e06d93252 --- /dev/null +++ b/server/src/schema.js @@ -0,0 +1,166 @@ +import { + GraphQLObjectType, + GraphQLSchema, + GraphQLID, + GraphQLString, + GraphQLInt, + GraphQLList, + GraphQLNonNull +} from 'graphql' +import { slugify } from './utils/functions' +import Competition from './models/competition' + +const PlotterType = new GraphQLObjectType({ + name: 'Plotter', + fields: () => ({ + codeName: { type: GraphQLString }, + host: { type: GraphQLString }, + repo: { type: GraphQLString }, + moduleName: { type: GraphQLString } + }) +}) + +const RuleType = new GraphQLObjectType({ + name: 'Rule', + fields: () => ({ + number: { type: GraphQLInt }, + title: { type: GraphQLString }, + description: { type: GraphQLString } + }) +}) + +const ParticipantType = new GraphQLObjectType({ + name: 'Participant', + fields: () => ({ + devTeam: { type: GraphQLString }, + bot: { type: GraphQLString }, + release: { type: GraphQLString } + }) +}) + +const OtherPrizeType = new GraphQLObjectType({ + name: 'OtherPrize', + fields: () => ({ + condition: { type: GraphQLString }, + amount: { type: GraphQLInt }, + asset: { type: GraphQLString } + }) +}) + +const PrizeType = new GraphQLObjectType({ + name: 'Prize', + fields: () => ({ + position: { type: GraphQLInt }, + algoPrize: { type: GraphQLInt }, + otherPrizes: { + type: new GraphQLList(OtherPrizeType), + resolve (parent, args) { + return parent.otherPrizes + } + } + }) +}) + +const CompetitionType = new GraphQLObjectType({ + name: 'Competition', + fields: () => ({ + codeName: { type: GraphQLID }, + displayName: { type: GraphQLString }, + host: { type: GraphQLString }, + description: { type: GraphQLString }, + startDatetime: { type: GraphQLString }, + finishDatetime: { type: GraphQLString }, + formula: { type: GraphQLString }, + plotter: { + type: PlotterType, + resolve (parent, args) { + return parent.plotter + } + }, + rules: { + type: new GraphQLList(RuleType), + resolve (parent, args) { + return parent.rules + } + }, + participants: { + type: new GraphQLList(ParticipantType), + resolve (parent, args) { + return parent.participants + } + }, + prizes: { + type: new GraphQLList(PrizeType), + resolve (parent, args) { + return parent.prizes + } + } + }) +}) + +const RootQuery = new GraphQLObjectType({ + name: 'RootQueryType', + fields: { + competitions: { + type: new GraphQLList(CompetitionType), + resolve (parent, args, context) { + return Competition.find() + } + }, + competitionsByHost: { + type: new GraphQLList(CompetitionType), + args: { + host: { type: new GraphQLNonNull(GraphQLString) } + }, + resolve (parent, args, context) { + return Competition.find({ + host: args.host + }) + } + } + } +}) + +const Mutation = new GraphQLObjectType({ + name: 'Mutation', + fields: { + hostCompetition: { + type: CompetitionType, + args: { + displayName: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: new GraphQLNonNull(GraphQLString) }, + startDatetime: { type: new GraphQLNonNull(GraphQLString) }, + finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, + formula: { type: new GraphQLNonNull(GraphQLString) } + }, + resolve (parent, args, context) { + // let authIdOnSession = context.user.sub + let authIdOnSession = 'some-id' + let newCompetition = new Competition({ + host: authIdOnSession, + displayName: args.displayName, + description: args.description, + // startDatetime: args.startDatetime, + // finishDatetime: args.finishDatetime, + formula: args.formula + }) + newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id + return new Promise((resolve, reject) => { + newCompetition.save((err) => { + if (err) reject(err) + else { + resolve(newCompetition) + } + }) + }) + } + } + } +}) + +const Schema = new GraphQLSchema({ + query: RootQuery, + mutation: Mutation +}) + +export default Schema diff --git a/server/src/utils/functions.js b/server/src/utils/functions.js new file mode 100644 index 000000000..148fefd5e --- /dev/null +++ b/server/src/utils/functions.js @@ -0,0 +1,14 @@ +export const capitalize = (string) => { + return (string).charAt(0).toUpperCase() + (string).slice(1) +} + +export const slugify = (text) => { + return text.toString().toLowerCase() + .replace(/\s+/g, '-') + .replace(/[^\w\-]+/g, '') + .replace(/\-\-+/g, '-') + .replace(/^-+/, '') + .replace(/-+$/, '') +} + +export default { capitalize, slugify } diff --git a/server/src/utils/logger.js b/server/src/utils/logger.js new file mode 100644 index 000000000..81232e663 --- /dev/null +++ b/server/src/utils/logger.js @@ -0,0 +1,39 @@ +const { createLogger, format, transports } = require('winston') +const { combine, timestamp, simple } = format + +const options = { + file: { + level: 'info', + filename: '../logs/app.log', + handleExceptions: true, + json: true, + maxsize: 5242880, // 5MB + maxFiles: 5, + colorize: false, + timestamp: true + }, + console: { + level: 'debug', + handleExceptions: true, + json: false, + colorize: true, + timestamp: true + } +} + +const logger = createLogger({ + level: 'info', + format: combine( + timestamp({ + format: 'YYYY-MM-DD HH:mm:ss' + }), + simple() + ), + transports: [ + new transports.File(options.file), + new transports.Console(options.console) + ], + exitOnError: false // do not exit on handled exceptions +}) + +export default logger From f0741afd211eb99b0e30369057fa41e2bd9d67bc Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 18 Oct 2018 16:53:10 +0200 Subject: [PATCH 004/146] correcting the little routing problem --- client/src/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/index.js b/client/src/index.js index aa272fd99..a175a5473 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -3,22 +3,21 @@ import { Route, BrowserRouter, Switch } from 'react-router-dom' const Base = () => (

- base website + Base component

) const Added = () => (

- added website + Added component

) class App extends Component { render () { return ( - + -

{window.location.pathname}

From e07f0ba077c77186467477e92a00a80e124689f9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 18 Oct 2018 17:12:53 +0200 Subject: [PATCH 005/146] a tiny bit of refactoring (separating types to own files) --- server/src/schema.js | 166 ------------------------- server/src/schema/index.js | 78 ++++++++++++ server/src/schema/types/Competition.js | 51 ++++++++ server/src/schema/types/OtherPrize.js | 16 +++ server/src/schema/types/Participant.js | 15 +++ server/src/schema/types/Plotter.js | 16 +++ server/src/schema/types/Prize.js | 22 ++++ server/src/schema/types/Rule.js | 16 +++ server/src/schema/types/index.js | 16 +++ 9 files changed, 230 insertions(+), 166 deletions(-) delete mode 100644 server/src/schema.js create mode 100644 server/src/schema/index.js create mode 100644 server/src/schema/types/Competition.js create mode 100644 server/src/schema/types/OtherPrize.js create mode 100644 server/src/schema/types/Participant.js create mode 100644 server/src/schema/types/Plotter.js create mode 100644 server/src/schema/types/Prize.js create mode 100644 server/src/schema/types/Rule.js create mode 100644 server/src/schema/types/index.js diff --git a/server/src/schema.js b/server/src/schema.js deleted file mode 100644 index e06d93252..000000000 --- a/server/src/schema.js +++ /dev/null @@ -1,166 +0,0 @@ -import { - GraphQLObjectType, - GraphQLSchema, - GraphQLID, - GraphQLString, - GraphQLInt, - GraphQLList, - GraphQLNonNull -} from 'graphql' -import { slugify } from './utils/functions' -import Competition from './models/competition' - -const PlotterType = new GraphQLObjectType({ - name: 'Plotter', - fields: () => ({ - codeName: { type: GraphQLString }, - host: { type: GraphQLString }, - repo: { type: GraphQLString }, - moduleName: { type: GraphQLString } - }) -}) - -const RuleType = new GraphQLObjectType({ - name: 'Rule', - fields: () => ({ - number: { type: GraphQLInt }, - title: { type: GraphQLString }, - description: { type: GraphQLString } - }) -}) - -const ParticipantType = new GraphQLObjectType({ - name: 'Participant', - fields: () => ({ - devTeam: { type: GraphQLString }, - bot: { type: GraphQLString }, - release: { type: GraphQLString } - }) -}) - -const OtherPrizeType = new GraphQLObjectType({ - name: 'OtherPrize', - fields: () => ({ - condition: { type: GraphQLString }, - amount: { type: GraphQLInt }, - asset: { type: GraphQLString } - }) -}) - -const PrizeType = new GraphQLObjectType({ - name: 'Prize', - fields: () => ({ - position: { type: GraphQLInt }, - algoPrize: { type: GraphQLInt }, - otherPrizes: { - type: new GraphQLList(OtherPrizeType), - resolve (parent, args) { - return parent.otherPrizes - } - } - }) -}) - -const CompetitionType = new GraphQLObjectType({ - name: 'Competition', - fields: () => ({ - codeName: { type: GraphQLID }, - displayName: { type: GraphQLString }, - host: { type: GraphQLString }, - description: { type: GraphQLString }, - startDatetime: { type: GraphQLString }, - finishDatetime: { type: GraphQLString }, - formula: { type: GraphQLString }, - plotter: { - type: PlotterType, - resolve (parent, args) { - return parent.plotter - } - }, - rules: { - type: new GraphQLList(RuleType), - resolve (parent, args) { - return parent.rules - } - }, - participants: { - type: new GraphQLList(ParticipantType), - resolve (parent, args) { - return parent.participants - } - }, - prizes: { - type: new GraphQLList(PrizeType), - resolve (parent, args) { - return parent.prizes - } - } - }) -}) - -const RootQuery = new GraphQLObjectType({ - name: 'RootQueryType', - fields: { - competitions: { - type: new GraphQLList(CompetitionType), - resolve (parent, args, context) { - return Competition.find() - } - }, - competitionsByHost: { - type: new GraphQLList(CompetitionType), - args: { - host: { type: new GraphQLNonNull(GraphQLString) } - }, - resolve (parent, args, context) { - return Competition.find({ - host: args.host - }) - } - } - } -}) - -const Mutation = new GraphQLObjectType({ - name: 'Mutation', - fields: { - hostCompetition: { - type: CompetitionType, - args: { - displayName: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) }, - startDatetime: { type: new GraphQLNonNull(GraphQLString) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, - formula: { type: new GraphQLNonNull(GraphQLString) } - }, - resolve (parent, args, context) { - // let authIdOnSession = context.user.sub - let authIdOnSession = 'some-id' - let newCompetition = new Competition({ - host: authIdOnSession, - displayName: args.displayName, - description: args.description, - // startDatetime: args.startDatetime, - // finishDatetime: args.finishDatetime, - formula: args.formula - }) - newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id - return new Promise((resolve, reject) => { - newCompetition.save((err) => { - if (err) reject(err) - else { - resolve(newCompetition) - } - }) - }) - } - } - } -}) - -const Schema = new GraphQLSchema({ - query: RootQuery, - mutation: Mutation -}) - -export default Schema diff --git a/server/src/schema/index.js b/server/src/schema/index.js new file mode 100644 index 000000000..79102d8fe --- /dev/null +++ b/server/src/schema/index.js @@ -0,0 +1,78 @@ +import { + GraphQLObjectType, + GraphQLSchema, + GraphQLString, + GraphQLList, + GraphQLNonNull +} from 'graphql' +import { slugify } from '../utils/functions' + +import Competition from '../models/competition' +import { CompetitionType } from './types' + +const RootQuery = new GraphQLObjectType({ + name: 'RootQueryType', + fields: { + competitions: { + type: new GraphQLList(CompetitionType), + resolve (parent, args, context) { + return Competition.find() + } + }, + competitionsByHost: { + type: new GraphQLList(CompetitionType), + args: { + host: { type: new GraphQLNonNull(GraphQLString) } + }, + resolve (parent, args, context) { + return Competition.find({ + host: args.host + }) + } + } + } +}) + +const Mutation = new GraphQLObjectType({ + name: 'Mutation', + fields: { + hostCompetition: { + type: CompetitionType, + args: { + displayName: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: new GraphQLNonNull(GraphQLString) }, + startDatetime: { type: new GraphQLNonNull(GraphQLString) }, + finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, + formula: { type: new GraphQLNonNull(GraphQLString) } + }, + resolve (parent, args, context) { + // let authIdOnSession = context.user.sub + let authIdOnSession = 'some-id' + let newCompetition = new Competition({ + host: authIdOnSession, + displayName: args.displayName, + description: args.description, + // startDatetime: args.startDatetime, + // finishDatetime: args.finishDatetime, + formula: args.formula + }) + newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id + return new Promise((resolve, reject) => { + newCompetition.save((err) => { + if (err) reject(err) + else { + resolve(newCompetition) + } + }) + }) + } + } + } +}) + +const Schema = new GraphQLSchema({ + query: RootQuery, + mutation: Mutation +}) + +export default Schema diff --git a/server/src/schema/types/Competition.js b/server/src/schema/types/Competition.js new file mode 100644 index 000000000..9b4f9728e --- /dev/null +++ b/server/src/schema/types/Competition.js @@ -0,0 +1,51 @@ +import { + GraphQLObjectType, + GraphQLString, + GraphQLList, + GraphQLID +} from 'graphql' +import { + PlotterType, + RuleType, + ParticipantType, + PrizeType +} from './index' + +const CompetitionType = new GraphQLObjectType({ + name: 'Competition', + fields: () => ({ + codeName: { type: GraphQLID }, + displayName: { type: GraphQLString }, + host: { type: GraphQLString }, + description: { type: GraphQLString }, + startDatetime: { type: GraphQLString }, + finishDatetime: { type: GraphQLString }, + formula: { type: GraphQLString }, + plotter: { + type: PlotterType, + resolve (parent, args) { + return parent.plotter + } + }, + rules: { + type: new GraphQLList(RuleType), + resolve (parent, args) { + return parent.rules + } + }, + participants: { + type: new GraphQLList(ParticipantType), + resolve (parent, args) { + return parent.participants + } + }, + prizes: { + type: new GraphQLList(PrizeType), + resolve (parent, args) { + return parent.prizes + } + } + }) +}) + +export default CompetitionType diff --git a/server/src/schema/types/OtherPrize.js b/server/src/schema/types/OtherPrize.js new file mode 100644 index 000000000..6fb186283 --- /dev/null +++ b/server/src/schema/types/OtherPrize.js @@ -0,0 +1,16 @@ +import { + GraphQLObjectType, + GraphQLString, + GraphQLInt +} from 'graphql' + +const OtherPrizeType = new GraphQLObjectType({ + name: 'OtherPrize', + fields: () => ({ + condition: { type: GraphQLString }, + amount: { type: GraphQLInt }, + asset: { type: GraphQLString } + }) +}) + +export default OtherPrizeType diff --git a/server/src/schema/types/Participant.js b/server/src/schema/types/Participant.js new file mode 100644 index 000000000..13f27da4f --- /dev/null +++ b/server/src/schema/types/Participant.js @@ -0,0 +1,15 @@ +import { + GraphQLObjectType, + GraphQLString +} from 'graphql' + +const ParticipantType = new GraphQLObjectType({ + name: 'Participant', + fields: () => ({ + devTeam: { type: GraphQLString }, + bot: { type: GraphQLString }, + release: { type: GraphQLString } + }) +}) + +export default ParticipantType diff --git a/server/src/schema/types/Plotter.js b/server/src/schema/types/Plotter.js new file mode 100644 index 000000000..ee2b3de67 --- /dev/null +++ b/server/src/schema/types/Plotter.js @@ -0,0 +1,16 @@ +import { + GraphQLObjectType, + GraphQLString +} from 'graphql' + +const PlotterType = new GraphQLObjectType({ + name: 'Plotter', + fields: () => ({ + codeName: { type: GraphQLString }, + host: { type: GraphQLString }, + repo: { type: GraphQLString }, + moduleName: { type: GraphQLString } + }) +}) + +export default PlotterType diff --git a/server/src/schema/types/Prize.js b/server/src/schema/types/Prize.js new file mode 100644 index 000000000..5588afd9a --- /dev/null +++ b/server/src/schema/types/Prize.js @@ -0,0 +1,22 @@ +import { + GraphQLObjectType, + GraphQLList, + GraphQLInt +} from 'graphql' +import { OtherPrizeType } from './index' + +const PrizeType = new GraphQLObjectType({ + name: 'Prize', + fields: () => ({ + position: { type: GraphQLInt }, + algoPrize: { type: GraphQLInt }, + otherPrizes: { + type: new GraphQLList(OtherPrizeType), + resolve (parent, args) { + return parent.otherPrizes + } + } + }) +}) + +export default PrizeType diff --git a/server/src/schema/types/Rule.js b/server/src/schema/types/Rule.js new file mode 100644 index 000000000..f8a6b98ef --- /dev/null +++ b/server/src/schema/types/Rule.js @@ -0,0 +1,16 @@ +import { + GraphQLObjectType, + GraphQLInt, + GraphQLString +} from 'graphql' + +const RuleType = new GraphQLObjectType({ + name: 'Rule', + fields: () => ({ + number: { type: GraphQLInt }, + title: { type: GraphQLString }, + description: { type: GraphQLString } + }) +}) + +export default RuleType diff --git a/server/src/schema/types/index.js b/server/src/schema/types/index.js new file mode 100644 index 000000000..be10a14df --- /dev/null +++ b/server/src/schema/types/index.js @@ -0,0 +1,16 @@ +import PlotterType from './Plotter' +import RuleType from './Rule' +import ParticipantType from './Participant' +import OtherPrizeType from './OtherPrize' +import PrizeType from './Prize' +import CompetitionType from './Competition' + +export { + PlotterType, + RuleType, + ParticipantType, + OtherPrizeType, + PrizeType, + CompetitionType +} +export default CompetitionType From 039bca157105937e4130d60ae1c2e77c5bca4fe4 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 14:23:25 +0200 Subject: [PATCH 006/146] Refactoring queries and mutations, removing default exports --- server/src/schema/index.js | 72 ++++--------------- .../src/schema/mutations/HostCompetition.js | 45 ++++++++++++ server/src/schema/mutations/index.js | 5 ++ server/src/schema/queries/Competitions.js | 16 +++++ .../src/schema/queries/CompetitionsByHost.js | 25 +++++++ server/src/schema/queries/index.js | 7 ++ server/src/schema/types/index.js | 1 - 7 files changed, 111 insertions(+), 60 deletions(-) create mode 100644 server/src/schema/mutations/HostCompetition.js create mode 100644 server/src/schema/mutations/index.js create mode 100644 server/src/schema/queries/Competitions.js create mode 100644 server/src/schema/queries/CompetitionsByHost.js create mode 100644 server/src/schema/queries/index.js diff --git a/server/src/schema/index.js b/server/src/schema/index.js index 79102d8fe..ad95b4c32 100644 --- a/server/src/schema/index.js +++ b/server/src/schema/index.js @@ -1,73 +1,27 @@ import { GraphQLObjectType, - GraphQLSchema, - GraphQLString, - GraphQLList, - GraphQLNonNull + GraphQLSchema } from 'graphql' -import { slugify } from '../utils/functions' -import Competition from '../models/competition' -import { CompetitionType } from './types' +import { HostCompetitionMutation } from './mutations' +import { + CompetitionsQuery, + CompetitionsByHostQuery +} from './queries' const RootQuery = new GraphQLObjectType({ name: 'RootQueryType', - fields: { - competitions: { - type: new GraphQLList(CompetitionType), - resolve (parent, args, context) { - return Competition.find() - } - }, - competitionsByHost: { - type: new GraphQLList(CompetitionType), - args: { - host: { type: new GraphQLNonNull(GraphQLString) } - }, - resolve (parent, args, context) { - return Competition.find({ - host: args.host - }) - } - } - } + fields: Object.assign( + CompetitionsQuery, + CompetitionsByHostQuery + ) }) const Mutation = new GraphQLObjectType({ name: 'Mutation', - fields: { - hostCompetition: { - type: CompetitionType, - args: { - displayName: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) }, - startDatetime: { type: new GraphQLNonNull(GraphQLString) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, - formula: { type: new GraphQLNonNull(GraphQLString) } - }, - resolve (parent, args, context) { - // let authIdOnSession = context.user.sub - let authIdOnSession = 'some-id' - let newCompetition = new Competition({ - host: authIdOnSession, - displayName: args.displayName, - description: args.description, - // startDatetime: args.startDatetime, - // finishDatetime: args.finishDatetime, - formula: args.formula - }) - newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id - return new Promise((resolve, reject) => { - newCompetition.save((err) => { - if (err) reject(err) - else { - resolve(newCompetition) - } - }) - }) - } - } - } + fields: Object.assign( + HostCompetitionMutation + ) }) const Schema = new GraphQLSchema({ diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js new file mode 100644 index 000000000..81f28757b --- /dev/null +++ b/server/src/schema/mutations/HostCompetition.js @@ -0,0 +1,45 @@ +import { + GraphQLNonNull, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' +import { slugify } from '../../utils/functions' + +const args = { + displayName: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: new GraphQLNonNull(GraphQLString) }, + startDatetime: { type: new GraphQLNonNull(GraphQLString) }, + finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, + formula: { type: new GraphQLNonNull(GraphQLString) } +} + +const mutation = { + hostCompetition: { + type: CompetitionType, + args, + resolve (parent, args, context) { + // let authIdOnSession = context.user.sub + let authIdOnSession = 'some-id' + let newCompetition = new Competition({ + host: authIdOnSession, + displayName: args.displayName, + description: args.description, + // startDatetime: args.startDatetime, + // finishDatetime: args.finishDatetime, + formula: args.formula + }) + newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id + return new Promise((resolve, reject) => { + newCompetition.save((err) => { + if (err) reject(err) + else { + resolve(newCompetition) + } + }) + }) + } + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js new file mode 100644 index 000000000..b07702c42 --- /dev/null +++ b/server/src/schema/mutations/index.js @@ -0,0 +1,5 @@ +import HostCompetitionMutation from './HostCompetition' + +export { + HostCompetitionMutation +} diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js new file mode 100644 index 000000000..554e02118 --- /dev/null +++ b/server/src/schema/queries/Competitions.js @@ -0,0 +1,16 @@ +import { + GraphQLList +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const query = { + competitions: { + type: new GraphQLList(CompetitionType), + resolve (parent, args, context) { + return Competition.find() + } + } +} + +export default query diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js new file mode 100644 index 000000000..e5faf54c7 --- /dev/null +++ b/server/src/schema/queries/CompetitionsByHost.js @@ -0,0 +1,25 @@ +import { + GraphQLList, + GraphQLString, + GraphQLNonNull +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + host: { type: new GraphQLNonNull(GraphQLString) } +} + +const query = { + competitionsByHost: { + type: new GraphQLList(CompetitionType), + args, + resolve (parent, args, context) { + return Competition.find({ + host: args.host + }) + } + } +} + +export default query diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js new file mode 100644 index 000000000..15167df24 --- /dev/null +++ b/server/src/schema/queries/index.js @@ -0,0 +1,7 @@ +import CompetitionsQuery from './Competitions' +import CompetitionsByHostQuery from './CompetitionsByHost' + +export { + CompetitionsQuery, + CompetitionsByHostQuery +} diff --git a/server/src/schema/types/index.js b/server/src/schema/types/index.js index be10a14df..6431a687c 100644 --- a/server/src/schema/types/index.js +++ b/server/src/schema/types/index.js @@ -13,4 +13,3 @@ export { PrizeType, CompetitionType } -export default CompetitionType From d4690f32955d5ae64b5901718bdfef7a630f5a09 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 14:51:00 +0200 Subject: [PATCH 007/146] adding epoch function and making date a number --- server/src/models/competition.js | 4 ++-- server/src/schema/mutations/HostCompetition.js | 5 +++-- server/src/schema/types/Competition.js | 5 +++-- server/src/utils/functions.js | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/server/src/models/competition.js b/server/src/models/competition.js index a776da7ec..d6baa3918 100644 --- a/server/src/models/competition.js +++ b/server/src/models/competition.js @@ -5,8 +5,8 @@ const competitionSchema = new Schema({ displayName: String, host: String, description: String, - startDatetime: Date, - finishDatetime: Date, + startDatetime: Number, + finishDatetime: Number, formula: String, plotter: { codeName: String, diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index 81f28757b..bda90ee6a 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -1,5 +1,6 @@ import { GraphQLNonNull, + GraphQLInt, GraphQLString } from 'graphql' import { CompetitionType } from '../types' @@ -9,8 +10,8 @@ import { slugify } from '../../utils/functions' const args = { displayName: { type: new GraphQLNonNull(GraphQLString) }, description: { type: new GraphQLNonNull(GraphQLString) }, - startDatetime: { type: new GraphQLNonNull(GraphQLString) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLString) }, + startDatetime: { type: new GraphQLNonNull(GraphQLInt) }, + finishDatetime: { type: new GraphQLNonNull(GraphQLInt) }, formula: { type: new GraphQLNonNull(GraphQLString) } } diff --git a/server/src/schema/types/Competition.js b/server/src/schema/types/Competition.js index 9b4f9728e..009cfe702 100644 --- a/server/src/schema/types/Competition.js +++ b/server/src/schema/types/Competition.js @@ -1,5 +1,6 @@ import { GraphQLObjectType, + GraphQLInt, GraphQLString, GraphQLList, GraphQLID @@ -18,8 +19,8 @@ const CompetitionType = new GraphQLObjectType({ displayName: { type: GraphQLString }, host: { type: GraphQLString }, description: { type: GraphQLString }, - startDatetime: { type: GraphQLString }, - finishDatetime: { type: GraphQLString }, + startDatetime: { type: GraphQLInt }, + finishDatetime: { type: GraphQLInt }, formula: { type: GraphQLString }, plotter: { type: PlotterType, diff --git a/server/src/utils/functions.js b/server/src/utils/functions.js index 148fefd5e..fe27e5dde 100644 --- a/server/src/utils/functions.js +++ b/server/src/utils/functions.js @@ -11,4 +11,6 @@ export const slugify = (text) => { .replace(/-+$/, '') } -export default { capitalize, slugify } +export const epoch = () => { + return Math.round(new Date().getTime() / 1000) +} From f0b8ef0e54016876e6ccb8217f9f909d8ecadb01 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 15:05:54 +0200 Subject: [PATCH 008/146] setting dates in mutation --- server/src/schema/mutations/HostCompetition.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index bda90ee6a..7dfc1aa06 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -26,8 +26,8 @@ const mutation = { host: authIdOnSession, displayName: args.displayName, description: args.description, - // startDatetime: args.startDatetime, - // finishDatetime: args.finishDatetime, + startDatetime: args.startDatetime, + finishDatetime: args.finishDatetime, formula: args.formula }) newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id From 335024c646a1eb0344575a8757f9b19358c7bfe4 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 15:27:13 +0200 Subject: [PATCH 009/146] Adding "includeOld" optional flag on current queries Have to find a way to turn this into a "trait" in a way --- server/src/schema/queries/Competitions.js | 13 ++++++++++++- server/src/schema/queries/CompetitionsByHost.js | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js index 554e02118..e6069ae74 100644 --- a/server/src/schema/queries/Competitions.js +++ b/server/src/schema/queries/Competitions.js @@ -1,14 +1,25 @@ import { + GraphQLBoolean, GraphQLList } from 'graphql' +import { epoch } from '../../utils/functions' import { CompetitionType } from '../types' import Competition from '../../models/competition' +const args = { + includeOld: { type: GraphQLBoolean } +} + const query = { competitions: { type: new GraphQLList(CompetitionType), + args, resolve (parent, args, context) { - return Competition.find() + return Competition.find( + Object.assign( + {}, + args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + )) } } } diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js index e5faf54c7..94081f640 100644 --- a/server/src/schema/queries/CompetitionsByHost.js +++ b/server/src/schema/queries/CompetitionsByHost.js @@ -1,13 +1,16 @@ import { + GraphQLBoolean, GraphQLList, GraphQLString, GraphQLNonNull } from 'graphql' +import { epoch } from '../../utils/functions' import { CompetitionType } from '../types' import Competition from '../../models/competition' const args = { - host: { type: new GraphQLNonNull(GraphQLString) } + host: { type: new GraphQLNonNull(GraphQLString) }, + includeOld: { type: GraphQLBoolean } } const query = { @@ -15,9 +18,14 @@ const query = { type: new GraphQLList(CompetitionType), args, resolve (parent, args, context) { - return Competition.find({ - host: args.host - }) + return Competition.find( + Object.assign( + { + host: args.host + }, + args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + ) + ) } } } From 8d036a89f85733ca6de1e032ffe19dbc41b92a0c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 16:45:52 +0200 Subject: [PATCH 010/146] correcting missnaming in the model element --- server/src/models/competition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/models/competition.js b/server/src/models/competition.js index d6baa3918..e7dbc4c0b 100644 --- a/server/src/models/competition.js +++ b/server/src/models/competition.js @@ -29,7 +29,7 @@ const competitionSchema = new Schema({ }] }], participants: [{ - id: String, + devTeam: String, bot: String, release: String }] From 758368161ba9e8691d26f7603d01d8a173352485 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 16:46:28 +0200 Subject: [PATCH 011/146] Creating a "registerToCompetition" mutation Have to add error message if creation duplication was avoided --- server/src/schema/index.js | 8 ++- .../schema/mutations/RegisterToCompetition.js | 49 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 server/src/schema/mutations/RegisterToCompetition.js diff --git a/server/src/schema/index.js b/server/src/schema/index.js index ad95b4c32..2277a001f 100644 --- a/server/src/schema/index.js +++ b/server/src/schema/index.js @@ -3,7 +3,10 @@ import { GraphQLSchema } from 'graphql' -import { HostCompetitionMutation } from './mutations' +import { + HostCompetitionMutation, + RegisterToCompetitionMutation +} from './mutations' import { CompetitionsQuery, CompetitionsByHostQuery @@ -20,7 +23,8 @@ const RootQuery = new GraphQLObjectType({ const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( - HostCompetitionMutation + HostCompetitionMutation, + RegisterToCompetitionMutation ) }) diff --git a/server/src/schema/mutations/RegisterToCompetition.js b/server/src/schema/mutations/RegisterToCompetition.js new file mode 100644 index 000000000..6441925d3 --- /dev/null +++ b/server/src/schema/mutations/RegisterToCompetition.js @@ -0,0 +1,49 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + devTeam: { type: new GraphQLNonNull(GraphQLString) }, + bot: { type: new GraphQLNonNull(GraphQLString) }, + release: { type: new GraphQLNonNull(GraphQLString) } +} + +const mutation = { + registerToCompetition: { + type: CompetitionType, + args, + resolve (parent, args, context) { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { + if (err) reject(err) + else { + if (competition.participants.some(participant => participant.devTeam === args.devTeam)) { + // need to add an error message here TODO + resolve(competition) + } else { + competition.participants.push({ + devTeam: args.devTeam, + bot: args.bot, + release: args.release + }) + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + } + }) + }) + } + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index b07702c42..e8b9045d4 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -1,5 +1,7 @@ import HostCompetitionMutation from './HostCompetition' +import RegisterToCompetitionMutation from './RegisterToCompetition' export { - HostCompetitionMutation + HostCompetitionMutation, + RegisterToCompetitionMutation } From a51cf9712762187ca5bd04cdc5510dbd4fff6b43 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 16:50:32 +0200 Subject: [PATCH 012/146] refactoring resolve functions out of query core --- .../src/schema/mutations/HostCompetition.js | 44 +++++++-------- .../schema/mutations/RegisterToCompetition.js | 54 ++++++++++--------- server/src/schema/queries/Competitions.js | 16 +++--- .../src/schema/queries/CompetitionsByHost.js | 22 ++++---- 4 files changed, 72 insertions(+), 64 deletions(-) diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index 7dfc1aa06..78f2438d0 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -15,31 +15,33 @@ const args = { formula: { type: new GraphQLNonNull(GraphQLString) } } +const resolve = (parent, args, context) => { + // let authIdOnSession = context.user.sub + let authIdOnSession = 'some-id' + let newCompetition = new Competition({ + host: authIdOnSession, + displayName: args.displayName, + description: args.description, + startDatetime: args.startDatetime, + finishDatetime: args.finishDatetime, + formula: args.formula + }) + newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id + return new Promise((resolve, reject) => { + newCompetition.save((err) => { + if (err) reject(err) + else { + resolve(newCompetition) + } + }) + }) +} + const mutation = { hostCompetition: { type: CompetitionType, args, - resolve (parent, args, context) { - // let authIdOnSession = context.user.sub - let authIdOnSession = 'some-id' - let newCompetition = new Competition({ - host: authIdOnSession, - displayName: args.displayName, - description: args.description, - startDatetime: args.startDatetime, - finishDatetime: args.finishDatetime, - formula: args.formula - }) - newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id - return new Promise((resolve, reject) => { - newCompetition.save((err) => { - if (err) reject(err) - else { - resolve(newCompetition) - } - }) - }) - } + resolve } } diff --git a/server/src/schema/mutations/RegisterToCompetition.js b/server/src/schema/mutations/RegisterToCompetition.js index 6441925d3..2816187df 100644 --- a/server/src/schema/mutations/RegisterToCompetition.js +++ b/server/src/schema/mutations/RegisterToCompetition.js @@ -13,36 +13,38 @@ const args = { release: { type: new GraphQLNonNull(GraphQLString) } } +const resolve = (parent, args, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { + if (err) reject(err) + else { + if (competition.participants.some(participant => participant.devTeam === args.devTeam)) { + // need to add an error message here TODO + resolve(competition) + } else { + competition.participants.push({ + devTeam: args.devTeam, + bot: args.bot, + release: args.release + }) + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + } + }) + }) +} + const mutation = { registerToCompetition: { type: CompetitionType, args, - resolve (parent, args, context) { - // let authIdOnSession = context.user.sub - return new Promise((resolve, reject) => { - Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { - if (err) reject(err) - else { - if (competition.participants.some(participant => participant.devTeam === args.devTeam)) { - // need to add an error message here TODO - resolve(competition) - } else { - competition.participants.push({ - devTeam: args.devTeam, - bot: args.bot, - release: args.release - }) - competition.save((err) => { - if (err) reject(err) - else { - resolve(competition) - } - }) - } - } - }) - }) - } + resolve } } diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js index e6069ae74..3e40959e1 100644 --- a/server/src/schema/queries/Competitions.js +++ b/server/src/schema/queries/Competitions.js @@ -10,17 +10,19 @@ const args = { includeOld: { type: GraphQLBoolean } } +const resolve = (parent, args, context) => { + return Competition.find( + Object.assign( + {}, + args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + )) +} + const query = { competitions: { type: new GraphQLList(CompetitionType), args, - resolve (parent, args, context) { - return Competition.find( - Object.assign( - {}, - args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} - )) - } + resolve } } diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js index 94081f640..8ba72c897 100644 --- a/server/src/schema/queries/CompetitionsByHost.js +++ b/server/src/schema/queries/CompetitionsByHost.js @@ -13,20 +13,22 @@ const args = { includeOld: { type: GraphQLBoolean } } +const resolve = (parent, args, context) => { + return Competition.find( + Object.assign( + { + host: args.host + }, + args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + ) + ) +} + const query = { competitionsByHost: { type: new GraphQLList(CompetitionType), args, - resolve (parent, args, context) { - return Competition.find( - Object.assign( - { - host: args.host - }, - args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} - ) - ) - } + resolve } } From e632e6cf5909177265f960e275508483eb0131e1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 17:11:39 +0200 Subject: [PATCH 013/146] Creating a "competitionsByDevTeam" query --- server/src/schema/index.js | 6 ++-- .../schema/queries/CompetitionsByDevTeam.js | 35 +++++++++++++++++++ server/src/schema/queries/index.js | 4 ++- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 server/src/schema/queries/CompetitionsByDevTeam.js diff --git a/server/src/schema/index.js b/server/src/schema/index.js index 2277a001f..8ef7decda 100644 --- a/server/src/schema/index.js +++ b/server/src/schema/index.js @@ -9,14 +9,16 @@ import { } from './mutations' import { CompetitionsQuery, - CompetitionsByHostQuery + CompetitionsByHostQuery, + CompetitionsByDevTeamQuery } from './queries' const RootQuery = new GraphQLObjectType({ name: 'RootQueryType', fields: Object.assign( CompetitionsQuery, - CompetitionsByHostQuery + CompetitionsByHostQuery, + CompetitionsByDevTeamQuery ) }) diff --git a/server/src/schema/queries/CompetitionsByDevTeam.js b/server/src/schema/queries/CompetitionsByDevTeam.js new file mode 100644 index 000000000..5be97bdcd --- /dev/null +++ b/server/src/schema/queries/CompetitionsByDevTeam.js @@ -0,0 +1,35 @@ +import { + GraphQLBoolean, + GraphQLList, + GraphQLString, + GraphQLNonNull +} from 'graphql' +import { epoch } from '../../utils/functions' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + devTeam: { type: new GraphQLNonNull(GraphQLString) }, + includeOld: { type: GraphQLBoolean } +} + +const resolve = (parent, args, context) => { + return Competition.find( + Object.assign( + { + participants: { $elemMatch: { devTeam: args.devTeam } } + }, + args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + ) + ) +} + +const query = { + competitionsByDevTeam: { + type: new GraphQLList(CompetitionType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js index 15167df24..07e3b56bd 100644 --- a/server/src/schema/queries/index.js +++ b/server/src/schema/queries/index.js @@ -1,7 +1,9 @@ import CompetitionsQuery from './Competitions' import CompetitionsByHostQuery from './CompetitionsByHost' +import CompetitionsByDevTeamQuery from './CompetitionsByDevTeam' export { CompetitionsQuery, - CompetitionsByHostQuery + CompetitionsByHostQuery, + CompetitionsByDevTeamQuery } From 2fa444757b33531b684f64bcb4d967e10fbf3e4e Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 17:16:55 +0200 Subject: [PATCH 014/146] Refactoring a bit more --- server/src/schema/index.js | 29 ++-------------------------- server/src/schema/mutations/index.js | 17 ++++++++++++---- server/src/schema/queries/index.js | 19 +++++++++++++----- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/server/src/schema/index.js b/server/src/schema/index.js index 8ef7decda..4155e4999 100644 --- a/server/src/schema/index.js +++ b/server/src/schema/index.js @@ -1,34 +1,9 @@ import { - GraphQLObjectType, GraphQLSchema } from 'graphql' -import { - HostCompetitionMutation, - RegisterToCompetitionMutation -} from './mutations' -import { - CompetitionsQuery, - CompetitionsByHostQuery, - CompetitionsByDevTeamQuery -} from './queries' - -const RootQuery = new GraphQLObjectType({ - name: 'RootQueryType', - fields: Object.assign( - CompetitionsQuery, - CompetitionsByHostQuery, - CompetitionsByDevTeamQuery - ) -}) - -const Mutation = new GraphQLObjectType({ - name: 'Mutation', - fields: Object.assign( - HostCompetitionMutation, - RegisterToCompetitionMutation - ) -}) +import Mutation from './mutations' +import RootQuery from './queries' const Schema = new GraphQLSchema({ query: RootQuery, diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index e8b9045d4..372c2c3a6 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -1,7 +1,16 @@ +import { + GraphQLObjectType +} from 'graphql' + import HostCompetitionMutation from './HostCompetition' import RegisterToCompetitionMutation from './RegisterToCompetition' -export { - HostCompetitionMutation, - RegisterToCompetitionMutation -} +const Mutation = new GraphQLObjectType({ + name: 'Mutation', + fields: Object.assign( + HostCompetitionMutation, + RegisterToCompetitionMutation + ) +}) + +export default Mutation diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js index 07e3b56bd..58a55bec3 100644 --- a/server/src/schema/queries/index.js +++ b/server/src/schema/queries/index.js @@ -1,9 +1,18 @@ +import { + GraphQLObjectType +} from 'graphql' + import CompetitionsQuery from './Competitions' import CompetitionsByHostQuery from './CompetitionsByHost' import CompetitionsByDevTeamQuery from './CompetitionsByDevTeam' -export { - CompetitionsQuery, - CompetitionsByHostQuery, - CompetitionsByDevTeamQuery -} +const RootQuery = new GraphQLObjectType({ + name: 'RootQueryType', + fields: Object.assign( + CompetitionsQuery, + CompetitionsByHostQuery, + CompetitionsByDevTeamQuery + ) +}) + +export default RootQuery From eeda497f97847975224075c3e4c19add0e0bdca1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 17:33:39 +0200 Subject: [PATCH 015/146] Creating a "addRuleToCompetition" mutation --- .../schema/mutations/AddRuleToCompetition.js | 54 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 server/src/schema/mutations/AddRuleToCompetition.js diff --git a/server/src/schema/mutations/AddRuleToCompetition.js b/server/src/schema/mutations/AddRuleToCompetition.js new file mode 100644 index 000000000..a165940df --- /dev/null +++ b/server/src/schema/mutations/AddRuleToCompetition.js @@ -0,0 +1,54 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + title: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, args, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { + if (err) reject(err) + else { + if (competition.rules.some(rule => rule.title === args.title)) { + // need to add an error message here TODO + resolve(competition) + } else { + let number = 1 + while (competition.rules.some(rule => rule.number === number)) { + number++ + } + competition.rules.push({ + number, + title: args.title, + description: args.description + }) + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + } + }) + }) +} + +const mutation = { + addRuleToCompetition: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 372c2c3a6..ba6d90418 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -4,12 +4,14 @@ import { import HostCompetitionMutation from './HostCompetition' import RegisterToCompetitionMutation from './RegisterToCompetition' +import AddRuleToCompetitionMutation from './AddRuleToCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( HostCompetitionMutation, - RegisterToCompetitionMutation + RegisterToCompetitionMutation, + AddRuleToCompetitionMutation ) }) From 676e7619d830d144c6ef7b2cea80bdc70fd924bd Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 17:39:55 +0200 Subject: [PATCH 016/146] yet a bit more refactoring --- server/src/schema/mutations/AddRuleToCompetition.js | 10 +++++----- server/src/schema/mutations/HostCompetition.js | 12 ++++++------ server/src/schema/mutations/RegisterToCompetition.js | 10 +++++----- server/src/schema/queries/Competitions.js | 4 ++-- server/src/schema/queries/CompetitionsByDevTeam.js | 6 +++--- server/src/schema/queries/CompetitionsByHost.js | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/server/src/schema/mutations/AddRuleToCompetition.js b/server/src/schema/mutations/AddRuleToCompetition.js index a165940df..1f843cf99 100644 --- a/server/src/schema/mutations/AddRuleToCompetition.js +++ b/server/src/schema/mutations/AddRuleToCompetition.js @@ -12,13 +12,13 @@ const args = { description: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, args, context) => { +const resolve = (parent, { codeName, title, description }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { + Competition.findOne({ codeName }).exec((err, competition) => { if (err) reject(err) else { - if (competition.rules.some(rule => rule.title === args.title)) { + if (competition.rules.some(rule => rule.title === title)) { // need to add an error message here TODO resolve(competition) } else { @@ -28,8 +28,8 @@ const resolve = (parent, args, context) => { } competition.rules.push({ number, - title: args.title, - description: args.description + title, + description }) competition.save((err) => { if (err) reject(err) diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index 78f2438d0..b590593dd 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -15,16 +15,16 @@ const args = { formula: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, args, context) => { +const resolve = (parent, { displayName, description, startDatetime, finishDatetime, formula }, context) => { // let authIdOnSession = context.user.sub let authIdOnSession = 'some-id' let newCompetition = new Competition({ host: authIdOnSession, - displayName: args.displayName, - description: args.description, - startDatetime: args.startDatetime, - finishDatetime: args.finishDatetime, - formula: args.formula + displayName, + description, + startDatetime, + finishDatetime, + formula }) newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id return new Promise((resolve, reject) => { diff --git a/server/src/schema/mutations/RegisterToCompetition.js b/server/src/schema/mutations/RegisterToCompetition.js index 2816187df..ecd72aa83 100644 --- a/server/src/schema/mutations/RegisterToCompetition.js +++ b/server/src/schema/mutations/RegisterToCompetition.js @@ -13,10 +13,10 @@ const args = { release: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, args, context) => { +const resolve = (parent, { codeName, devTeam, bot, release }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: args.codeName }).exec((err, competition) => { + Competition.findOne({ codeName }).exec((err, competition) => { if (err) reject(err) else { if (competition.participants.some(participant => participant.devTeam === args.devTeam)) { @@ -24,9 +24,9 @@ const resolve = (parent, args, context) => { resolve(competition) } else { competition.participants.push({ - devTeam: args.devTeam, - bot: args.bot, - release: args.release + devTeam, + bot, + release }) competition.save((err) => { if (err) reject(err) diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js index 3e40959e1..f27992984 100644 --- a/server/src/schema/queries/Competitions.js +++ b/server/src/schema/queries/Competitions.js @@ -10,11 +10,11 @@ const args = { includeOld: { type: GraphQLBoolean } } -const resolve = (parent, args, context) => { +const resolve = (parent, { includeOld }, context) => { return Competition.find( Object.assign( {}, - args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? { finishDatetime: { $gt: epoch() } } : {} )) } diff --git a/server/src/schema/queries/CompetitionsByDevTeam.js b/server/src/schema/queries/CompetitionsByDevTeam.js index 5be97bdcd..4d4d44bbf 100644 --- a/server/src/schema/queries/CompetitionsByDevTeam.js +++ b/server/src/schema/queries/CompetitionsByDevTeam.js @@ -13,13 +13,13 @@ const args = { includeOld: { type: GraphQLBoolean } } -const resolve = (parent, args, context) => { +const resolve = (parent, { devTeam, includeOld }, context) => { return Competition.find( Object.assign( { - participants: { $elemMatch: { devTeam: args.devTeam } } + participants: { $elemMatch: { devTeam } } }, - args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? { finishDatetime: { $gt: epoch() } } : {} ) ) } diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js index 8ba72c897..b6b2fc819 100644 --- a/server/src/schema/queries/CompetitionsByHost.js +++ b/server/src/schema/queries/CompetitionsByHost.js @@ -13,13 +13,13 @@ const args = { includeOld: { type: GraphQLBoolean } } -const resolve = (parent, args, context) => { +const resolve = (parent, { host, includeOld }, context) => { return Competition.find( Object.assign( { - host: args.host + host }, - args.includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? { finishDatetime: { $gt: epoch() } } : {} ) ) } From 6eaff5cf145c5bdbaa20399ebccd1a049c535c3b Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 18:09:30 +0200 Subject: [PATCH 017/146] Creating a "editCompetition" mutation --- .../src/schema/mutations/EditCompetition.js | 59 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 server/src/schema/mutations/EditCompetition.js diff --git a/server/src/schema/mutations/EditCompetition.js b/server/src/schema/mutations/EditCompetition.js new file mode 100644 index 000000000..ba8ed6a9d --- /dev/null +++ b/server/src/schema/mutations/EditCompetition.js @@ -0,0 +1,59 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLInt, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + displayName: { type: GraphQLString }, + description: { type: GraphQLString }, + startDatetime: { type: GraphQLInt }, + finishDatetime: { type: GraphQLInt }, + formula: { type: GraphQLString }, + plotterCodeName: { type: GraphQLString }, + plotterHost: { type: GraphQLString }, + plotterRepo: { type: GraphQLString }, + plotterModuleName: { type: GraphQLString } +} + +const resolve = (parent, { codeName, displayName, description, startDatetime, finishDatetime, + formula, plotterCodeName, plotterHost, plotterRepo, plotterModuleName }, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName }).exec((err, competition) => { + if (err) reject(err) + else { + competition.displayName = displayName || competition.displayName + competition.description = description || competition.description + competition.startDatetime = startDatetime || competition.startDatetime + competition.finishDatetime = finishDatetime || competition.finishDatetime + competition.formula = formula || competition.formula + competition.plotter.codeName = plotterCodeName || competition.plotter.codeName + competition.plotter.host = plotterHost || competition.plotter.host + competition.plotter.repo = plotterRepo || competition.plotter.repo + competition.plotter.moduleName = plotterModuleName || competition.plotter.moduleName + + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + }) + }) +} + +const mutation = { + editCompetition: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index ba6d90418..f6bec378f 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -5,13 +5,15 @@ import { import HostCompetitionMutation from './HostCompetition' import RegisterToCompetitionMutation from './RegisterToCompetition' import AddRuleToCompetitionMutation from './AddRuleToCompetition' +import EditCompetitionMutation from './EditCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( HostCompetitionMutation, RegisterToCompetitionMutation, - AddRuleToCompetitionMutation + AddRuleToCompetitionMutation, + EditCompetitionMutation ) }) From eacd89f8a7af5075209bf7d3f23358199b4d24f1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 18:32:49 +0200 Subject: [PATCH 018/146] Creating a "editRuleOfCompetition" mutation --- .../schema/mutations/EditRuleOfCompetition.js | 56 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 server/src/schema/mutations/EditRuleOfCompetition.js diff --git a/server/src/schema/mutations/EditRuleOfCompetition.js b/server/src/schema/mutations/EditRuleOfCompetition.js new file mode 100644 index 000000000..55cd5519c --- /dev/null +++ b/server/src/schema/mutations/EditRuleOfCompetition.js @@ -0,0 +1,56 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + title: { type: new GraphQLNonNull(GraphQLString) }, + newtitle: { type: GraphQLString }, + description: { type: GraphQLString } +} + +const resolve = (parent, { codeName, title, newtitle, description }, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName }).exec((err, competition) => { + if (err) reject(err) + else { + let ruleIndex + competition.rules.find((rule, index) => { + if (rule.title === title) { + ruleIndex = index + } + }) + + competition.rules[ruleIndex].description = description || competition.rules[ruleIndex].description + if (competition.rules.some(rule => rule.title === newtitle)) { + // need to add an error message here TODO + resolve(competition) + } else { + competition.rules[ruleIndex].title = newtitle || competition.rules[ruleIndex].title + } + + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + }) + }) +} + +const mutation = { + editRuleOfCompetition: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index f6bec378f..4ae05f2ce 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -6,6 +6,7 @@ import HostCompetitionMutation from './HostCompetition' import RegisterToCompetitionMutation from './RegisterToCompetition' import AddRuleToCompetitionMutation from './AddRuleToCompetition' import EditCompetitionMutation from './EditCompetition' +import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -13,7 +14,8 @@ const Mutation = new GraphQLObjectType({ HostCompetitionMutation, RegisterToCompetitionMutation, AddRuleToCompetitionMutation, - EditCompetitionMutation + EditCompetitionMutation, + EditRuleOfCompetitionMutation ) }) From 6e5932581c6ccbc0eec460615368f87b4149b2d9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 18:42:32 +0200 Subject: [PATCH 019/146] Creating a "editParticipantOfCompetition" mutation --- .../mutations/EditParticipantOfCompetition.js | 51 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 server/src/schema/mutations/EditParticipantOfCompetition.js diff --git a/server/src/schema/mutations/EditParticipantOfCompetition.js b/server/src/schema/mutations/EditParticipantOfCompetition.js new file mode 100644 index 000000000..0cb37d749 --- /dev/null +++ b/server/src/schema/mutations/EditParticipantOfCompetition.js @@ -0,0 +1,51 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + devTeam: { type: new GraphQLNonNull(GraphQLString) }, + bot: { type: GraphQLString }, + release: { type: GraphQLString } +} + +const resolve = (parent, { codeName, devTeam, bot, release }, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName }).exec((err, competition) => { + if (err) reject(err) + else { + let participantIndex + competition.participants.find((participant, index) => { + if (participant.devTeam === devTeam) { + participantIndex = index + } + }) + + competition.participants[participantIndex].bot = bot || competition.participants[participantIndex].bot + competition.participants[participantIndex].release = release || competition.participants[participantIndex].release + + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + }) + }) +} + +const mutation = { + editParticipantOfCompetition: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 4ae05f2ce..475977133 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -7,6 +7,7 @@ import RegisterToCompetitionMutation from './RegisterToCompetition' import AddRuleToCompetitionMutation from './AddRuleToCompetition' import EditCompetitionMutation from './EditCompetition' import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' +import EditParticipantOfCompetitionMutation from './EditParticipantOfCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -15,7 +16,8 @@ const Mutation = new GraphQLObjectType({ RegisterToCompetitionMutation, AddRuleToCompetitionMutation, EditCompetitionMutation, - EditRuleOfCompetitionMutation + EditRuleOfCompetitionMutation, + EditParticipantOfCompetitionMutation ) }) From 3e16e089f0a15fa2a3a93f85f9f27f8075ae6d4a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 19 Oct 2018 18:42:57 +0200 Subject: [PATCH 020/146] reordering mutations --- server/src/schema/mutations/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 475977133..6c076c8b9 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -3,21 +3,21 @@ import { } from 'graphql' import HostCompetitionMutation from './HostCompetition' -import RegisterToCompetitionMutation from './RegisterToCompetition' -import AddRuleToCompetitionMutation from './AddRuleToCompetition' import EditCompetitionMutation from './EditCompetition' -import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' +import RegisterToCompetitionMutation from './RegisterToCompetition' import EditParticipantOfCompetitionMutation from './EditParticipantOfCompetition' +import AddRuleToCompetitionMutation from './AddRuleToCompetition' +import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( HostCompetitionMutation, - RegisterToCompetitionMutation, - AddRuleToCompetitionMutation, EditCompetitionMutation, - EditRuleOfCompetitionMutation, - EditParticipantOfCompetitionMutation + RegisterToCompetitionMutation, + EditParticipantOfCompetitionMutation, + AddRuleToCompetitionMutation, + EditRuleOfCompetitionMutation ) }) From d5d8c2fbe3b7492b3645e5352ecfb8f1d68dfd9c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 04:26:11 +0200 Subject: [PATCH 021/146] Creating a "addPrizeToCompetition" mutation --- .../schema/mutations/AddPrizeToCompetition.js | 50 +++++++++++++++++++ server/src/schema/mutations/index.js | 4 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 server/src/schema/mutations/AddPrizeToCompetition.js diff --git a/server/src/schema/mutations/AddPrizeToCompetition.js b/server/src/schema/mutations/AddPrizeToCompetition.js new file mode 100644 index 000000000..194141ea7 --- /dev/null +++ b/server/src/schema/mutations/AddPrizeToCompetition.js @@ -0,0 +1,50 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLInt, + GraphQLString +} from 'graphql' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + codeName: { type: new GraphQLNonNull(GraphQLID) }, + position: { type: new GraphQLNonNull(GraphQLInt) }, + algoPrize: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, { codeName, position, algoPrize }, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName }).exec((err, competition) => { + if (err) reject(err) + else { + if (competition.prizes.some(prize => prize.position === position)) { + // need to add an error message here TODO + resolve(competition) + } else { + competition.prizes.push({ + position, + algoPrize + }) + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + } + }) + }) +} + +const mutation = { + addPrizeToCompetition: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 6c076c8b9..fc37f8426 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -8,6 +8,7 @@ import RegisterToCompetitionMutation from './RegisterToCompetition' import EditParticipantOfCompetitionMutation from './EditParticipantOfCompetition' import AddRuleToCompetitionMutation from './AddRuleToCompetition' import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' +import AddPrizeToCompetitionMutation from './AddPrizeToCompetition' const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -17,7 +18,8 @@ const Mutation = new GraphQLObjectType({ RegisterToCompetitionMutation, EditParticipantOfCompetitionMutation, AddRuleToCompetitionMutation, - EditRuleOfCompetitionMutation + EditRuleOfCompetitionMutation, + AddPrizeToCompetitionMutation ) }) From 1af910e51f484c053feaa7e8b528e9f61d94893c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 04:35:25 +0200 Subject: [PATCH 022/146] refactoring a bit for shorter mutation names --- .../{AddPrizeToCompetition.js => AddPrize.js} | 8 ++++---- .../{AddRuleToCompetition.js => AddRule.js} | 8 ++++---- ...antOfCompetition.js => EditParticipant.js} | 8 ++++---- .../{EditRuleOfCompetition.js => EditRule.js} | 8 ++++---- server/src/schema/mutations/index.js | 20 +++++++++---------- 5 files changed, 26 insertions(+), 26 deletions(-) rename server/src/schema/mutations/{AddPrizeToCompetition.js => AddPrize.js} (79%) rename server/src/schema/mutations/{AddRuleToCompetition.js => AddRule.js} (81%) rename server/src/schema/mutations/{EditParticipantOfCompetition.js => EditParticipant.js} (81%) rename server/src/schema/mutations/{EditRuleOfCompetition.js => EditRule.js} (82%) diff --git a/server/src/schema/mutations/AddPrizeToCompetition.js b/server/src/schema/mutations/AddPrize.js similarity index 79% rename from server/src/schema/mutations/AddPrizeToCompetition.js rename to server/src/schema/mutations/AddPrize.js index 194141ea7..f7e5498f1 100644 --- a/server/src/schema/mutations/AddPrizeToCompetition.js +++ b/server/src/schema/mutations/AddPrize.js @@ -8,15 +8,15 @@ import { CompetitionType } from '../types' import Competition from '../../models/competition' const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, + competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, position: { type: new GraphQLNonNull(GraphQLInt) }, algoPrize: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, { codeName, position, algoPrize }, context) => { +const resolve = (parent, { competitionCodeName, position, algoPrize }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { if (err) reject(err) else { if (competition.prizes.some(prize => prize.position === position)) { @@ -40,7 +40,7 @@ const resolve = (parent, { codeName, position, algoPrize }, context) => { } const mutation = { - addPrizeToCompetition: { + addPrize: { type: CompetitionType, args, resolve diff --git a/server/src/schema/mutations/AddRuleToCompetition.js b/server/src/schema/mutations/AddRule.js similarity index 81% rename from server/src/schema/mutations/AddRuleToCompetition.js rename to server/src/schema/mutations/AddRule.js index 1f843cf99..23a144548 100644 --- a/server/src/schema/mutations/AddRuleToCompetition.js +++ b/server/src/schema/mutations/AddRule.js @@ -7,15 +7,15 @@ import { CompetitionType } from '../types' import Competition from '../../models/competition' const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, + competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, description: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, { codeName, title, description }, context) => { +const resolve = (parent, { competitionCodeName, title, description }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { if (err) reject(err) else { if (competition.rules.some(rule => rule.title === title)) { @@ -44,7 +44,7 @@ const resolve = (parent, { codeName, title, description }, context) => { } const mutation = { - addRuleToCompetition: { + addRule: { type: CompetitionType, args, resolve diff --git a/server/src/schema/mutations/EditParticipantOfCompetition.js b/server/src/schema/mutations/EditParticipant.js similarity index 81% rename from server/src/schema/mutations/EditParticipantOfCompetition.js rename to server/src/schema/mutations/EditParticipant.js index 0cb37d749..1a1db28ad 100644 --- a/server/src/schema/mutations/EditParticipantOfCompetition.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -7,16 +7,16 @@ import { CompetitionType } from '../types' import Competition from '../../models/competition' const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, + competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, devTeam: { type: new GraphQLNonNull(GraphQLString) }, bot: { type: GraphQLString }, release: { type: GraphQLString } } -const resolve = (parent, { codeName, devTeam, bot, release }, context) => { +const resolve = (parent, { competitionCodeName, devTeam, bot, release }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { if (err) reject(err) else { let participantIndex @@ -41,7 +41,7 @@ const resolve = (parent, { codeName, devTeam, bot, release }, context) => { } const mutation = { - editParticipantOfCompetition: { + editParticipant: { type: CompetitionType, args, resolve diff --git a/server/src/schema/mutations/EditRuleOfCompetition.js b/server/src/schema/mutations/EditRule.js similarity index 82% rename from server/src/schema/mutations/EditRuleOfCompetition.js rename to server/src/schema/mutations/EditRule.js index 55cd5519c..660c7f0df 100644 --- a/server/src/schema/mutations/EditRuleOfCompetition.js +++ b/server/src/schema/mutations/EditRule.js @@ -7,16 +7,16 @@ import { CompetitionType } from '../types' import Competition from '../../models/competition' const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, + competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, newtitle: { type: GraphQLString }, description: { type: GraphQLString } } -const resolve = (parent, { codeName, title, newtitle, description }, context) => { +const resolve = (parent, { competitionCodeName, title, newtitle, description }, context) => { // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { if (err) reject(err) else { let ruleIndex @@ -46,7 +46,7 @@ const resolve = (parent, { codeName, title, newtitle, description }, context) => } const mutation = { - editRuleOfCompetition: { + editRule: { type: CompetitionType, args, resolve diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index fc37f8426..6fb93cdcf 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -4,22 +4,22 @@ import { import HostCompetitionMutation from './HostCompetition' import EditCompetitionMutation from './EditCompetition' -import RegisterToCompetitionMutation from './RegisterToCompetition' -import EditParticipantOfCompetitionMutation from './EditParticipantOfCompetition' -import AddRuleToCompetitionMutation from './AddRuleToCompetition' -import EditRuleOfCompetitionMutation from './EditRuleOfCompetition' -import AddPrizeToCompetitionMutation from './AddPrizeToCompetition' +import RegisterMutation from './Register' +import EditParticipantMutation from './EditParticipant' +import AddRuleMutation from './AddRule' +import EditRuleMutation from './EditRule' +import AddPrizeMutation from './AddPrize' const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( HostCompetitionMutation, EditCompetitionMutation, - RegisterToCompetitionMutation, - EditParticipantOfCompetitionMutation, - AddRuleToCompetitionMutation, - EditRuleOfCompetitionMutation, - AddPrizeToCompetitionMutation + RegisterMutation, + EditParticipantMutation, + AddRuleMutation, + EditRuleMutation, + AddPrizeMutation ) }) From 234f220c74eacebb31ebdda1523b3c795b00cbb3 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 04:44:04 +0200 Subject: [PATCH 023/146] correcting refactoring error --- server/src/schema/mutations/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 6fb93cdcf..12553d93e 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -4,7 +4,7 @@ import { import HostCompetitionMutation from './HostCompetition' import EditCompetitionMutation from './EditCompetition' -import RegisterMutation from './Register' +import RegisterToCompetitionMutation from './RegisterToCompetition' import EditParticipantMutation from './EditParticipant' import AddRuleMutation from './AddRule' import EditRuleMutation from './EditRule' @@ -15,7 +15,7 @@ const Mutation = new GraphQLObjectType({ fields: Object.assign( HostCompetitionMutation, EditCompetitionMutation, - RegisterMutation, + RegisterToCompetitionMutation, EditParticipantMutation, AddRuleMutation, EditRuleMutation, From 50c9268942d57209b4d774e1f7f3c6ebc125fdfd Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 04:52:08 +0200 Subject: [PATCH 024/146] creating a "is between function" --- server/src/utils/functions.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/src/utils/functions.js b/server/src/utils/functions.js index fe27e5dde..0963b4b45 100644 --- a/server/src/utils/functions.js +++ b/server/src/utils/functions.js @@ -14,3 +14,13 @@ export const slugify = (text) => { export const epoch = () => { return Math.round(new Date().getTime() / 1000) } + +export const isBetween = (value, valA, valB) => { + const min = valA < valB ? valA : valB + const max = valA > valB ? valA : valB + if (value >= min && value <= max) { + return true + } else { + return false + } +} From d71b24aa03fcd99e620fea5f9266b9c93e404060 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 04:55:04 +0200 Subject: [PATCH 025/146] Creating a "reorderRules" mutation --- server/src/schema/mutations/ReorderRules.js | 50 +++++++++++++++++++++ server/src/schema/mutations/index.js | 2 + 2 files changed, 52 insertions(+) create mode 100644 server/src/schema/mutations/ReorderRules.js diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js new file mode 100644 index 000000000..3cf33fd4f --- /dev/null +++ b/server/src/schema/mutations/ReorderRules.js @@ -0,0 +1,50 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLInt +} from 'graphql' +import { isBetween } from '../../utils/functions' +import { CompetitionType } from '../types' +import Competition from '../../models/competition' + +const args = { + competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, + fromNumber: { type: new GraphQLNonNull(GraphQLInt) }, + toNumber: { type: new GraphQLNonNull(GraphQLInt) } +} + +const resolve = (parent, { competitionCodeName, fromNumber, toNumber }, context) => { + // let authIdOnSession = context.user.sub + return new Promise((resolve, reject) => { + Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { + if (err) reject(err) + else { + const delta = fromNumber > toNumber ? 1 : -1 + competition.rules.forEach((part) => { + if (part.number === fromNumber) { + part.number = toNumber + } else if (isBetween(part.number, fromNumber, toNumber)) { + part.number += delta + } + }) + + competition.save((err) => { + if (err) reject(err) + else { + resolve(competition) + } + }) + } + }) + }) +} + +const mutation = { + reorderRules: { + type: CompetitionType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 12553d93e..a760dee03 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -8,6 +8,7 @@ import RegisterToCompetitionMutation from './RegisterToCompetition' import EditParticipantMutation from './EditParticipant' import AddRuleMutation from './AddRule' import EditRuleMutation from './EditRule' +import ReorderRulesMutation from './ReorderRules' import AddPrizeMutation from './AddPrize' const Mutation = new GraphQLObjectType({ @@ -19,6 +20,7 @@ const Mutation = new GraphQLObjectType({ EditParticipantMutation, AddRuleMutation, EditRuleMutation, + ReorderRulesMutation, AddPrizeMutation ) }) From 07d2d1adabb612af426d2be26b068c2127ba0392 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 05:00:41 +0200 Subject: [PATCH 026/146] remove logger (at least for now) --- server/src/utils/logger.js | 39 -------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 server/src/utils/logger.js diff --git a/server/src/utils/logger.js b/server/src/utils/logger.js deleted file mode 100644 index 81232e663..000000000 --- a/server/src/utils/logger.js +++ /dev/null @@ -1,39 +0,0 @@ -const { createLogger, format, transports } = require('winston') -const { combine, timestamp, simple } = format - -const options = { - file: { - level: 'info', - filename: '../logs/app.log', - handleExceptions: true, - json: true, - maxsize: 5242880, // 5MB - maxFiles: 5, - colorize: false, - timestamp: true - }, - console: { - level: 'debug', - handleExceptions: true, - json: false, - colorize: true, - timestamp: true - } -} - -const logger = createLogger({ - level: 'info', - format: combine( - timestamp({ - format: 'YYYY-MM-DD HH:mm:ss' - }), - simple() - ), - transports: [ - new transports.File(options.file), - new transports.Console(options.console) - ], - exitOnError: false // do not exit on handled exceptions -}) - -export default logger From 56a357ef3bed231fa9f54aef466d8cd7ef2914ea Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 05:03:10 +0200 Subject: [PATCH 027/146] reordering imports on index.js --- server/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/index.js b/server/src/index.js index 6eddcd065..74343ecc4 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -1,8 +1,8 @@ import express from 'express' +import 'dotenv/config' import cors from 'cors' import mongoose from 'mongoose' import graphqlHTTP from 'express-graphql' -import 'dotenv/config' import expressPlayground from 'graphql-playground-middleware-express' import schema from './schema' From 6583ea7c33bcd3bf8169f95f85c903e126762d7c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 06:22:36 +0200 Subject: [PATCH 028/146] hotfix : includeOld was the inverted --- server/src/schema/queries/Competitions.js | 2 +- server/src/schema/queries/CompetitionsByDevTeam.js | 2 +- server/src/schema/queries/CompetitionsByHost.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js index f27992984..1b933000a 100644 --- a/server/src/schema/queries/Competitions.js +++ b/server/src/schema/queries/Competitions.js @@ -14,7 +14,7 @@ const resolve = (parent, { includeOld }, context) => { return Competition.find( Object.assign( {}, - includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? {} : { finishDatetime: { $gt: epoch() } } )) } diff --git a/server/src/schema/queries/CompetitionsByDevTeam.js b/server/src/schema/queries/CompetitionsByDevTeam.js index 4d4d44bbf..cb03ec215 100644 --- a/server/src/schema/queries/CompetitionsByDevTeam.js +++ b/server/src/schema/queries/CompetitionsByDevTeam.js @@ -19,7 +19,7 @@ const resolve = (parent, { devTeam, includeOld }, context) => { { participants: { $elemMatch: { devTeam } } }, - includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? {} : { finishDatetime: { $gt: epoch() } } ) ) } diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js index b6b2fc819..70e36fac5 100644 --- a/server/src/schema/queries/CompetitionsByHost.js +++ b/server/src/schema/queries/CompetitionsByHost.js @@ -19,7 +19,7 @@ const resolve = (parent, { host, includeOld }, context) => { { host }, - includeOld ? { finishDatetime: { $gt: epoch() } } : {} + includeOld ? {} : { finishDatetime: { $gt: epoch() } } ) ) } From d291366d5f5e9eeb9591316874cc4f1bbdb30820 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 06:27:18 +0200 Subject: [PATCH 029/146] some minimal authorisation system --- server/.env.example | 4 +++ server/src/index.js | 25 ++++++++++++++++++- server/src/schema/mutations/AddPrize.js | 8 +++--- server/src/schema/mutations/AddRule.js | 9 +++---- .../src/schema/mutations/EditCompetition.js | 8 +++--- .../src/schema/mutations/EditParticipant.js | 1 - server/src/schema/mutations/EditRule.js | 8 +++--- .../src/schema/mutations/HostCompetition.js | 5 ++-- .../schema/mutations/RegisterToCompetition.js | 1 - server/src/schema/mutations/ReorderRules.js | 8 +++--- 10 files changed, 50 insertions(+), 27 deletions(-) diff --git a/server/.env.example b/server/.env.example index dd712e3f9..62dcff0a5 100644 --- a/server/.env.example +++ b/server/.env.example @@ -2,3 +2,7 @@ PORT=3000 DB_USERNAME=example_name DB_PASSWORD=example_password DB_DOMAIN=example.com:1234/example_name + +AUTH0_DOMAIN=auth0-domain +AUTH0_AUDIENCE=auth0-audience +AUTH0_ISSUER=auth0-issuer diff --git a/server/src/index.js b/server/src/index.js index 74343ecc4..9901deb8d 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -4,6 +4,8 @@ import cors from 'cors' import mongoose from 'mongoose' import graphqlHTTP from 'express-graphql' import expressPlayground from 'graphql-playground-middleware-express' +import jwt from 'express-jwt' +import jwksRsa from 'jwks-rsa' import schema from './schema' @@ -29,9 +31,30 @@ db.on('error', () => { console.error.bind(console, 'MongoDB connection error:') db.once('open', () => { console.log('Connected to the DB.') }) /* ------------------------------------------------- ------------------ Graphql setup -------------------- +------------- Authentification setup --------------- ------------------------------------------------- */ +app.use('/graphql', + jwt({ + secret: jwksRsa.expressJwtSecret({ + cache: true, + rateLimit: true, + jwksRequestsPerMinute: 1, + jwksUri: `https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json` + }), + credentialsRequired: false, + audience: process.env.AUTH0_AUDIENCE, + issuer: process.env.AUTH0_ISSUER, + algorithms: [`RS256`] + }), + function (req, res, next) { + return next() + } +) + +/* ------------------------------------------------- +----------------- Graphql setup -------------------- +------------------------------------------------- */ app.use('/graphql', graphqlHTTP(req => { return { schema: schema, diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index f7e5498f1..29997e43f 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -14,11 +14,11 @@ const args = { } const resolve = (parent, { competitionCodeName, position, algoPrize }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { - if (err) reject(err) - else { + Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + if (err || !competition) { + reject(err) + } else { if (competition.prizes.some(prize => prize.position === position)) { // need to add an error message here TODO resolve(competition) diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index 23a144548..67ad1298b 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -13,13 +13,12 @@ const args = { } const resolve = (parent, { competitionCodeName, title, description }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { - if (err) reject(err) - else { + Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + if (err || !competition) { + reject(err) + } else { if (competition.rules.some(rule => rule.title === title)) { - // need to add an error message here TODO resolve(competition) } else { let number = 1 diff --git a/server/src/schema/mutations/EditCompetition.js b/server/src/schema/mutations/EditCompetition.js index ba8ed6a9d..55885f358 100644 --- a/server/src/schema/mutations/EditCompetition.js +++ b/server/src/schema/mutations/EditCompetition.js @@ -22,11 +22,11 @@ const args = { const resolve = (parent, { codeName, displayName, description, startDatetime, finishDatetime, formula, plotterCodeName, plotterHost, plotterRepo, plotterModuleName }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { - if (err) reject(err) - else { + Competition.findOne({ codeName, host: context.user.sub }).exec((err, competition) => { + if (err || !competition) { + reject(err) + } else { competition.displayName = displayName || competition.displayName competition.description = description || competition.description competition.startDatetime = startDatetime || competition.startDatetime diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index 1a1db28ad..f89677075 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -14,7 +14,6 @@ const args = { } const resolve = (parent, { competitionCodeName, devTeam, bot, release }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { if (err) reject(err) diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index 660c7f0df..ab96d25fd 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -14,11 +14,11 @@ const args = { } const resolve = (parent, { competitionCodeName, title, newtitle, description }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { - if (err) reject(err) - else { + Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + if (err || !competition) { + reject(err) + } else { let ruleIndex competition.rules.find((rule, index) => { if (rule.title === title) { diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index b590593dd..a9c46dbed 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -16,10 +16,9 @@ const args = { } const resolve = (parent, { displayName, description, startDatetime, finishDatetime, formula }, context) => { - // let authIdOnSession = context.user.sub - let authIdOnSession = 'some-id' + const host = context.user.sub let newCompetition = new Competition({ - host: authIdOnSession, + host, displayName, description, startDatetime, diff --git a/server/src/schema/mutations/RegisterToCompetition.js b/server/src/schema/mutations/RegisterToCompetition.js index ecd72aa83..932d31018 100644 --- a/server/src/schema/mutations/RegisterToCompetition.js +++ b/server/src/schema/mutations/RegisterToCompetition.js @@ -14,7 +14,6 @@ const args = { } const resolve = (parent, { codeName, devTeam, bot, release }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { Competition.findOne({ codeName }).exec((err, competition) => { if (err) reject(err) diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index 3cf33fd4f..c11503bee 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -14,11 +14,11 @@ const args = { } const resolve = (parent, { competitionCodeName, fromNumber, toNumber }, context) => { - // let authIdOnSession = context.user.sub return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { - if (err) reject(err) - else { + Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + if (err || !competition) { + reject(err) + } else { const delta = fromNumber > toNumber ? 1 : -1 competition.rules.forEach((part) => { if (part.number === fromNumber) { From 099f545559f5e3817b02b2dced408bd208168064 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 06:31:11 +0200 Subject: [PATCH 030/146] removing useless npm dependency --- server/package-lock.json | 211 +++++++-------------------------------- server/package.json | 5 +- 2 files changed, 35 insertions(+), 181 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index fbcbb16c0..b0b7a417c 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1352,19 +1352,11 @@ "object-visit": "^1.0.0" } }, - "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "requires": { "color-name": "1.1.3" } @@ -1372,35 +1364,8 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colornames": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", - "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" - }, - "colorspace": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.1.tgz", - "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", - "requires": { - "color": "3.0.x", - "text-hex": "1.0.x" - } + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "combined-stream": { "version": "1.0.7", @@ -1636,16 +1601,6 @@ "repeating": "^2.0.0" } }, - "diagnostics": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", - "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", - "requires": { - "colorspace": "1.1.x", - "enabled": "1.0.x", - "kuler": "1.0.x" - } - }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -1700,24 +1655,11 @@ "integrity": "sha512-LQdY3j4PxuUl6xfxiFruTSlCniTrTrzAd8/HfsLEMi0PUpaQ0Iy+Pr4N4VllDYjs0Hyu2lkTbvzqlG+PX9NsNw==", "dev": true }, - "enabled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", - "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", - "requires": { - "env-variable": "0.0.x" - } - }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, - "env-variable": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", - "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==" - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1911,16 +1853,6 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, - "fast-safe-stringify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", - "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==" - }, - "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" - }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -2071,12 +2003,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2091,17 +2025,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2218,7 +2155,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2230,6 +2168,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2244,6 +2183,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2251,12 +2191,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2275,6 +2217,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2355,7 +2298,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2367,6 +2311,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2488,6 +2433,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2903,11 +2849,6 @@ "kind-of": "^3.0.2" } }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", @@ -3100,7 +3041,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-typedarray": { "version": "1.0.0", @@ -3116,7 +3058,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -3271,14 +3214,6 @@ "is-buffer": "^1.1.5" } }, - "kuler": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", - "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", - "requires": { - "colornames": "^1.1.1" - } - }, "latest-version": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", @@ -3354,25 +3289,6 @@ "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" }, - "logform": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-1.10.0.tgz", - "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==", - "requires": { - "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", - "fecha": "^2.3.3", - "ms": "^2.1.1", - "triple-beam": "^1.2.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4223,11 +4139,6 @@ "wrappy": "1" } }, - "one-time": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", - "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -4370,7 +4281,8 @@ "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true }, "proxy-addr": { "version": "2.0.4", @@ -4487,6 +4399,7 @@ "version": "2.3.6", "resolved": "http://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", @@ -5087,14 +5000,6 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "requires": { - "is-arrayish": "^0.3.1" - } - }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -5296,11 +5201,6 @@ "tweetnacl": "~0.14.0" } }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -5368,6 +5268,7 @@ "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" } @@ -5408,11 +5309,6 @@ "execa": "^0.7.0" } }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, "through": { "version": "2.3.8", "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -5497,11 +5393,6 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -5719,7 +5610,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "utils-merge": { "version": "1.0.1", @@ -5783,41 +5675,6 @@ "string-width": "^2.1.1" } }, - "winston": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.1.0.tgz", - "integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==", - "requires": { - "async": "^2.6.0", - "diagnostics": "^1.1.1", - "is-stream": "^1.1.0", - "logform": "^1.9.1", - "one-time": "0.0.4", - "readable-stream": "^2.3.6", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.2.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "winston-transport": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.2.0.tgz", - "integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==", - "requires": { - "readable-stream": "^2.3.6", - "triple-beam": "^1.2.0" - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/server/package.json b/server/package.json index 0e1118e2e..0693cd562 100644 --- a/server/package.json +++ b/server/package.json @@ -23,10 +23,7 @@ "express-jwt": "^5.3.1", "graphql": "^14.0.0", "graphql-playground-middleware-express": "^1.7.6", - "jsonwebtoken": "^8.3.0", "jwks-rsa": "^1.3.0", - "lodash": "^4.17.10", - "mongoose": "^5.3.4", - "winston": "^3.1.0" + "mongoose": "^5.3.4" } } From 708ab25a7464172426a8026d8f5811b7f01acf3c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 20 Oct 2018 06:54:40 +0200 Subject: [PATCH 031/146] installing sentry --- server/.env.example | 2 + server/package-lock.json | 118 +++++++++++++++++++++++++++++++-------- server/package.json | 1 + server/src/index.js | 8 +++ 4 files changed, 106 insertions(+), 23 deletions(-) diff --git a/server/.env.example b/server/.env.example index 62dcff0a5..30f282292 100644 --- a/server/.env.example +++ b/server/.env.example @@ -6,3 +6,5 @@ DB_DOMAIN=example.com:1234/example_name AUTH0_DOMAIN=auth0-domain AUTH0_AUDIENCE=auth0-audience AUTH0_ISSUER=auth0-issuer + +SENTRY_DNS=https://some-val@sentry.io/some-id diff --git a/server/package-lock.json b/server/package-lock.json index b0b7a417c..b28917c2f 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -4,6 +4,63 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@sentry/core": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz", + "integrity": "sha512-QJExTxZ1ZA5P/To5gOwd3sowukXW0N/Q9nfu8biRDNa+YURn6ElLjO0fD6eIBqX1f3npo/kTiWZwFBc7LXEzSg==", + "requires": { + "@sentry/hub": "4.1.1", + "@sentry/minimal": "4.1.1", + "@sentry/types": "4.1.0", + "@sentry/utils": "4.1.1" + } + }, + "@sentry/hub": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.1.1.tgz", + "integrity": "sha512-VmcZOgcbFjJzK1oQNwcFP/wgfoWQr24dFv1C0uwdXldNXx3mwyUVkomvklBHz90HwiahsI/gCc+ZmbC3ECQk2Q==", + "requires": { + "@sentry/types": "4.1.0", + "@sentry/utils": "4.1.1" + } + }, + "@sentry/minimal": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.1.1.tgz", + "integrity": "sha512-xRKWA46OGnZinJyTljDUel53emPP9mb/XNi/kF6SBaVDOUXl7HAB8kP7Bn7eLBwOanxN8PbYoAzh/lIQXWTmDg==", + "requires": { + "@sentry/hub": "4.1.1", + "@sentry/types": "4.1.0" + } + }, + "@sentry/node": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.1.1.tgz", + "integrity": "sha512-wbo8F2IqZW+exlOyQzQ7+bPNPXIYmG2g73ZgHFh0x3MHVOTSKgfiO3BzCqmFyUDhxqkEL23PQqLhM07GEtH3Bw==", + "requires": { + "@sentry/core": "4.1.1", + "@sentry/hub": "4.1.1", + "@sentry/types": "4.1.0", + "@sentry/utils": "4.1.1", + "cookie": "0.3.1", + "lsmod": "1.0.0", + "md5": "2.2.1", + "stack-trace": "0.0.10" + } + }, + "@sentry/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.1.0.tgz", + "integrity": "sha512-KY7B9wYs1NACHlYzG4OuP6k4uQJkyDPJppftjj3NJYShfwdDTO1I2Swkhhb5dJMEMMMpBJGxXmiqZ2mX5ErISQ==" + }, + "@sentry/utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.1.1.tgz", + "integrity": "sha512-XMvGqAWATBrRkOF0lkt0Ij8of2mRmp4WeFTUAgiKzCekxfUBLBaTb4wTaFXz1cnnnjVTwcAq72qBRMhHwQ0IIg==", + "requires": { + "@sentry/types": "4.1.0" + } + }, "@types/body-parser": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", @@ -1278,6 +1335,11 @@ "supports-color": "^2.0.0" } }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" + }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", @@ -1490,6 +1552,11 @@ "which": "^1.2.9" } }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" + }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -2003,14 +2070,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2025,20 +2090,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -2155,8 +2217,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -2168,7 +2229,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2183,7 +2243,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2191,14 +2250,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2217,7 +2274,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2298,8 +2354,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2311,7 +2366,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2433,7 +2487,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2861,8 +2914,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-ci": { "version": "1.2.1", @@ -3324,6 +3376,11 @@ "very-fast-args": "^1.1.0" } }, + "lsmod": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", + "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -3361,6 +3418,16 @@ "dev": true, "optional": true }, + "md5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "requires": { + "charenc": "~0.0.1", + "crypt": "~0.0.1", + "is-buffer": "~1.1.1" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -5201,6 +5268,11 @@ "tweetnacl": "~0.14.0" } }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", diff --git a/server/package.json b/server/package.json index 0693cd562..b704fb069 100644 --- a/server/package.json +++ b/server/package.json @@ -16,6 +16,7 @@ "nodemon": "^1.18.4" }, "dependencies": { + "@sentry/node": "^4.1.1", "cors": "^2.8.4", "dotenv": "^6.0.0", "express": "^4.16.3", diff --git a/server/src/index.js b/server/src/index.js index 9901deb8d..799223ade 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -8,10 +8,15 @@ import jwt from 'express-jwt' import jwksRsa from 'jwks-rsa' import schema from './schema' +const Sentry = require('@sentry/node') // Initialise express const app = express() +// Initialising sentry +Sentry.init({ dsn: process.env.SENTRY_DNS }) +app.use(Sentry.Handlers.requestHandler()) + // Allow cross origing request app.use(cors()) /* ------------------------------------------------- @@ -63,6 +68,9 @@ app.use('/graphql', graphqlHTTP(req => { })) app.get('/playground', expressPlayground({ endpoint: '/graphql' })) +// Sentry error handling middleware +app.use(Sentry.Handlers.errorHandler()) + app.listen(process.env.PORT, () => { console.log(`Listening on port ${process.env.PORT}`) }) From c9ede0f0d9eb6868c45dd2d83427784283dc73be Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 22 Oct 2018 17:47:43 +0200 Subject: [PATCH 032/146] some minimal V1 for a part of the frontend --- client/package-lock.json | 894 ++++++++++++++++++++ client/package.json | 2 + client/src/Components/Search/Competition.js | 124 +++ client/src/Components/Search/index.js | 67 ++ client/src/Components/Search/styles.js | 4 + client/src/Components/TopBar/data.js | 11 + client/src/Components/TopBar/index.js | 45 + client/src/Components/TopBar/styles.js | 37 + client/src/index.js | 48 +- client/src/utils/index.js | 5 + client/src/utils/local-storage.js | 9 + 11 files changed, 1239 insertions(+), 7 deletions(-) create mode 100644 client/src/Components/Search/Competition.js create mode 100644 client/src/Components/Search/index.js create mode 100644 client/src/Components/Search/styles.js create mode 100644 client/src/Components/TopBar/data.js create mode 100644 client/src/Components/TopBar/index.js create mode 100644 client/src/Components/TopBar/styles.js create mode 100644 client/src/utils/index.js create mode 100644 client/src/utils/local-storage.js diff --git a/client/package-lock.json b/client/package-lock.json index 3c05a5b3f..1d672433d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4,6 +4,36 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@advancedalgos/web-components": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@advancedalgos/web-components/-/web-components-0.0.13.tgz", + "integrity": "sha512-jXz2w/r08GX8uqB4UTDaow27T3juvR7Bk/80TWmDORVPNCPK152MEUBgxF161hAyOj1jdB+K4M1Fy5GkEpDhmw==", + "requires": { + "@azure/storage-blob": "^10.1.0-preview", + "@material-ui/core": "^3.2.2", + "@material-ui/icons": "^3.0.1", + "apollo-client": "^2.4.2", + "blob-util": "^2.0.2", + "browser-image-resizer": "^1.2.0", + "graphql": "^14.0.2", + "graphql-tag": "^2.9.2", + "prop-types": "^15.6.2", + "react-apollo": "^2.1.11", + "react-dropzone": "^5.1.0", + "react-image-crop": "^5.0.0", + "react-image-cropper": "^1.3.0" + } + }, + "@azure/storage-blob": { + "version": "10.1.0-preview", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-10.1.0-preview.tgz", + "integrity": "sha512-vKY4dF8VCRCOOQ03Z1ResyjZbWg4jPOnQtRtlSEKE6a7WwFE3EuIbhE7OQfEihuNYyE+XWLkTjrHxeHDFx1hFg==", + "requires": { + "events": "3.0.0", + "ms-rest-js": "0.22.425", + "tslib": "^1.9.3" + } + }, "@babel/runtime": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", @@ -77,6 +107,62 @@ } } }, + "@types/async": { + "version": "2.0.49", + "resolved": "http://registry.npmjs.org/@types/async/-/async-2.0.49.tgz", + "integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==", + "optional": true + }, + "@types/body-parser": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", + "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", + "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", + "requires": { + "@types/node": "*" + } + }, + "@types/events": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" + }, + "@types/express": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", + "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", + "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", + "requires": { + "@types/events": "*", + "@types/node": "*", + "@types/range-parser": "*" + } + }, + "@types/form-data": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", + "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", + "requires": { + "@types/node": "*" + } + }, "@types/jss": { "version": "9.5.7", "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.7.tgz", @@ -86,11 +172,26 @@ "indefinite-observable": "^1.0.1" } }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" + }, + "@types/node": { + "version": "9.6.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.35.tgz", + "integrity": "sha512-h5zvHS8wXHGa+Gcqs9K8vqCgOtqjr0+NqG/DDJmQIX1wpR9HivAfgV8bjcD3mGM4bPfQw5Aneb2Pn8355L83jA==" + }, "@types/prop-types": { "version": "15.5.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.5.6.tgz", "integrity": "sha512-ZBFR7TROLVzCkswA3Fmqq+IIJt62/T7aY/Dmz+QkU7CaW2QFqAitCE8Ups7IzmGhcN1YWMBT4Qcoc07jU9hOJQ==" }, + "@types/range-parser": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", + "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" + }, "@types/react": { "version": "16.4.18", "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz", @@ -108,16 +209,171 @@ "@types/react": "*" } }, + "@types/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "@types/uuid": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz", + "integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==", + "requires": { + "@types/node": "*" + } + }, + "@types/zen-observable": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", + "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "apollo-cache": { + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.17.tgz", + "integrity": "sha512-7sp24n2HZO4vXgTaKNomLyIfGxG4gDdDkBB0jkRzRi7HhnKmfwhiF/RCiKNbgLdrPX151INdls0KwIVliD0dHQ==", + "requires": { + "apollo-utilities": "^1.0.21" + } + }, + "apollo-client": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.2.tgz", + "integrity": "sha512-g1z23umaVSoKLj9xNl0aAnk2KBF4JeBi7MeKFc9CGTixH7TkqeQUQtxcjrC7j2h4KmDbuhOAHOFUGf8YshN+ag==", + "requires": { + "@types/async": "2.0.49", + "@types/zen-observable": "^0.8.0", + "apollo-cache": "1.1.17", + "apollo-link": "^1.0.0", + "apollo-link-dedup": "^1.0.0", + "apollo-utilities": "1.0.21", + "symbol-observable": "^1.0.2", + "zen-observable": "^0.8.0" + } + }, + "apollo-link": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", + "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", + "requires": { + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.10" + } + }, + "apollo-link-dedup": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.10.tgz", + "integrity": "sha512-tpUI9lMZsidxdNygSY1FxflXEkUZnvKRkMUsXXuQUNoSLeNtEvUX7QtKRAl4k9ubLl8JKKc9X3L3onAFeGTK8w==", + "requires": { + "apollo-link": "^1.2.3" + } + }, + "apollo-utilities": { + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.21.tgz", + "integrity": "sha512-ZcxELlEl+sDCYBgEMdNXJAsZtRVm8wk4HIA58bMsqYfd1DSAJQEtZ93F0GZgYNAGy3QyaoBeZtbb0/01++G8JQ==", + "requires": { + "fast-json-stable-stringify": "^2.0.0", + "fclone": "^1.0.11" + } + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=" + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "attr-accept": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", + "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", + "requires": { + "core-js": "^2.5.0" + } + }, + "axios": { + "version": "0.18.0", + "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "brcast": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz", "integrity": "sha512-eI3yqf9YEqyGl9PCNTR46MGvDylGtaHjalcz6Q3fAPnP/PhpKkkve52vFdfGpwp4VUvK6LUr4TQN+2stCrEwTg==" }, + "browser-image-resizer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browser-image-resizer/-/browser-image-resizer-1.2.0.tgz", + "integrity": "sha512-xMiB6BnRsD6RWmkD6Av90qXY7uaAOXJPaS5D8cSazyao/bx6ENCm67XGl6BIhn1ETjK52yEs8A/atmMPp74M4A==" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, "change-emitter": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz", @@ -128,11 +384,49 @@ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "css-vendor": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-0.3.8.tgz", @@ -151,11 +445,37 @@ "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==" }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, "deepmerge": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==" }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "dom-helpers": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", @@ -167,6 +487,11 @@ "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", "dev": true }, + "duplexer": { + "version": "0.1.1", + "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -175,6 +500,66 @@ "iconv-lite": "~0.4.13" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "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==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "event-stream": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz", + "integrity": "sha512-dGXNg4F/FgVzlApjzItL+7naHutA3fDqbV/zAZqDDlXTjiMnQmZKu+prImWKszeBM5UQeGvAl3u1wBiKeDh61g==", + "requires": { + "duplexer": "^0.1.1", + "flatmap-stream": "^0.1.0", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" + } + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -207,6 +592,44 @@ "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.1.tgz", "integrity": "sha512-IM+v/C40MNZWqsLErc32e0TyIk/NhkkQZL0QmjBh6zi1eXv0/GeVKmKmueQX7nn9SXQBQbTUcB8zuexIF3/88w==" }, + "fclone": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", + "integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=" + }, + "flatmap-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", + "integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw==" + }, + "follow-redirects": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", + "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "requires": { + "debug": "=3.1.0" + } + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -217,11 +640,42 @@ "process": "~0.5.1" } }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "graphql": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", + "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", + "requires": { + "iterall": "^1.2.2" + } + }, "graphql-tag": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.0.tgz", "integrity": "sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w==" }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "history": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", @@ -249,6 +703,11 @@ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, "hyphenate-style-name": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz", @@ -278,6 +737,34 @@ "loose-envify": "^1.0.0" } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, "is-in-browser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", @@ -291,16 +778,37 @@ "isobject": "^3.0.1" } }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "requires": { + "has-symbols": "^1.0.0" + } + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -315,11 +823,26 @@ "whatwg-fetch": ">=0.10.0" } }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, "jss": { "version": "9.8.7", "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz", @@ -399,6 +922,17 @@ "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz", "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" }, + "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" + } + }, "lodash.flowright": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/lodash.flowright/-/lodash.flowright-3.5.0.tgz", @@ -417,6 +951,29 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "requires": { + "mime-db": "~1.37.0" + } + }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -426,6 +983,41 @@ "dom-walk": "^0.1.0" } }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "ms-rest-js": { + "version": "0.22.425", + "resolved": "https://registry.npmjs.org/ms-rest-js/-/ms-rest-js-0.22.425.tgz", + "integrity": "sha512-PM9l0Si+T3kFxce8hwB/LlCxPJSHwSlFUSpjdJHzPvF+2w8lw7huE/FCPnRfdaUm7IikQESkJhydnbqX6g2OuQ==", + "requires": { + "@types/express": "^4.11.1", + "@types/form-data": "^2.2.1", + "@types/node": "^9.4.6", + "@types/uuid": "^3.4.3", + "axios": "^0.18.0", + "form-data": "^2.3.2", + "tough-cookie": "^2.4.3", + "tslib": "^1.9.2", + "uuid": "^3.2.1", + "xml2js": "^0.4.19" + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -435,16 +1027,62 @@ "is-stream": "^1.0.1" } }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, "normalize-scroll-left": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz", "integrity": "sha512-F9YMRls0zCF6BFIE2YnXDRpHPpfd91nOIaNdDgrx5YMoPLo8Wqj+6jNXHQsYBavJeXP4ww8HCt0xQAKc5qk2Fg==" }, + "npm-run-all": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.3.tgz", + "integrity": "sha512-aOG0N3Eo/WW+q6sUIdzcV2COS8VnTZCmdji0VQIAZF3b+a3YWb0AD0vFIyjKec18A7beLGbaQ5jFTNI2bPt9Cg==", + "requires": { + "ansi-styles": "^3.2.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.4", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "ps-tree": "^1.1.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "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-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, "path-to-regexp": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", @@ -453,6 +1091,27 @@ "isarray": "0.0.1" } }, + "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" + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "requires": { + "through": "~2.3" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, "popper.js": { "version": "1.14.4", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz", @@ -481,6 +1140,24 @@ "object-assign": "^4.1.1" } }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "requires": { + "event-stream": "~3.3.0" + } + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, "react": { "version": "16.5.2", "resolved": "https://registry.npmjs.org/react/-/react-16.5.2.tgz", @@ -530,6 +1207,26 @@ } } }, + "react-dom": { + "version": "16.5.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.2.tgz", + "integrity": "sha512-RC8LDw8feuZOHVgzEf7f+cxBr/DnKdqp56VU0lAs1f4UfKc4cU8wU4fTq/mgnvynLQo8OtlPC19NUFh/zjZPuA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "schedule": "^0.5.0" + } + }, + "react-dropzone": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-5.1.1.tgz", + "integrity": "sha512-C9kXI3D95rVXbLLg9DvzCnmjplKwpfj/2F/MwvGVM05kDwWMzKVKZnmgZHZUebmiVj4mFOmBs2ObLiKvAxunGw==", + "requires": { + "attr-accept": "^1.1.3", + "prop-types": "^15.6.2" + } + }, "react-event-listener": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.4.tgz", @@ -564,6 +1261,23 @@ "shallowequal": "^1.0.2" } }, + "react-image-crop": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/react-image-crop/-/react-image-crop-5.0.0.tgz", + "integrity": "sha512-MBT18tcHeEpmrhbSS6hx00MmfNgrnlhZuwY96cGRPhUmNeabxM7UBCcoU+oJCZXB0iGZk38zy/YGoZ4ELVp/LQ==" + }, + "react-image-cropper": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-image-cropper/-/react-image-cropper-1.3.0.tgz", + "integrity": "sha512-OPEMv66xXQdNsAixqxhlsSX3+D3KVRQMYc6YHmgGINeKx433xB9l04hMFynngPuUa+ChiKal6aQmbzpg79iJ+Q==", + "requires": { + "deep-extend": "^0.4.1", + "npm-run-all": "^4.1.1", + "prop-types": "^15.6.0", + "react": "^16.2.0", + "react-dom": "^16.2.0" + } + }, "react-is": { "version": "16.5.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.5.2.tgz", @@ -612,6 +1326,16 @@ "react-lifecycles-compat": "^3.0.4" } }, + "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" + } + }, "recompose": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.30.0.tgz", @@ -640,6 +1364,11 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "schedule": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz", @@ -648,6 +1377,11 @@ "object-assign": "^4.1.1" } }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -659,16 +1393,141 @@ "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "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==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "requires": { + "through": "2" + } + }, + "stream-combiner": { + "version": "0.2.2", + "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", + "requires": { + "duplexer": "~0.1.1", + "through": "~2.3.4" + } + }, + "string.prototype.padend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", + "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.4.3", + "function-bind": "^1.0.2" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "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" + } + }, "symbol-observable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tough-cookie": { + "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==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, "ua-parser-js": { "version": "0.7.18", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "validate-npm-package-license": { + "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==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "value-equal": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", @@ -686,6 +1545,41 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "zen-observable": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.10.tgz", + "integrity": "sha512-UXEh0ekA/QWYI2NkLHc5IH0V1FstIN4qGVlVvq0DQAS3oR72mofYHkjJ2f4ysMKRAziwnACzg3c0ZuG+SMDu8w==" + }, + "zen-observable-ts": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", + "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", + "requires": { + "zen-observable": "^0.8.0" + } } } } diff --git a/client/package.json b/client/package.json index 55beea823..126f5a9de 100644 --- a/client/package.json +++ b/client/package.json @@ -12,8 +12,10 @@ "react-hot-loader": "^4.3.11" }, "dependencies": { + "@advancedalgos/web-components": "0.0.13", "@material-ui/core": "^3.2.0", "@material-ui/icons": "^3.0.1", + "classnames": "^2.2.6", "graphql-tag": "^2.10.0", "react": "^16.5.2", "react-apollo": "^2.2.4", diff --git a/client/src/Components/Search/Competition.js b/client/src/Components/Search/Competition.js new file mode 100644 index 000000000..bccb5df88 --- /dev/null +++ b/client/src/Components/Search/Competition.js @@ -0,0 +1,124 @@ +import React from 'react' + +import { toLocalTime } from '../../utils' + +import { + Grid, Paper, Typography, Button, + Dialog, DialogContent, DialogContentText, DialogTitle +} from '@material-ui/core' +import { withStyles } from '@material-ui/core/styles' + +const styles = theme => ({ + root: { + flexGrow: 1, + padding: 20, + margin: 10 + }, + image: { + width: 128, + height: '100%', + cursor: 'default' + }, + img: { + margin: 'auto', + display: 'block', + maxWidth: '100%', + maxHeight: '100%' + + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } + +}) + +class Competition extends React.Component { + render () { + const classes = this.props.classes + const { displayName, + startDatetime, + finishDatetime, + host, + description, + formula, + prizes + } = this.props.competition + const firstPrice = prizes.find(prize => { + return prize.position === 1 + }) + return ( + + + + { displayName } + From : {toLocalTime(startDatetime)} + To : {toLocalTime(finishDatetime)} + + + Hosted by: { host } + Formula: { formula } + First prize: { firstPrice ? firstPrice.algoPrize + ' ALGOS' : 'none' } + + + + + Description : + { description } + + + + + + + + + Edit Key + + + + You will need to complete this form with the information from + the exchange. + + +

some stuff

+ +
+
+ + + + Audit Log History + + +

some stuff

+
+
+
+
+
+
+
+ ) + } +} +export default withStyles(styles)(Competition) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js new file mode 100644 index 000000000..7c46f096e --- /dev/null +++ b/client/src/Components/Search/index.js @@ -0,0 +1,67 @@ +import React from 'react' +import gql from 'graphql-tag' +import { Query } from 'react-apollo' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import Competition from './Competition' + +import styles from './styles' + +const HOST_COMPETITIONS = gql` + query Hosts_Competitions{ + hosts_Competitions { + displayName + host + startDatetime + finishDatetime + description + formula + participants { + devTeam + } + prizes { + position + algoPrize + } + } + } +` + +class Search extends React.Component { + render () { + return ( + + + Enroll in an competition + + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + const list = data.hosts_Competitions.map((competition, index) => { + return ( + + ) + }) + return ( + + { list } + + ) + }} + + + ) + } +} + +export default withStyles(styles)(Search) diff --git a/client/src/Components/Search/styles.js b/client/src/Components/Search/styles.js new file mode 100644 index 000000000..175dc52e5 --- /dev/null +++ b/client/src/Components/Search/styles.js @@ -0,0 +1,4 @@ +const styles = theme => ({ +}) + +export default styles diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js new file mode 100644 index 000000000..2f58b632b --- /dev/null +++ b/client/src/Components/TopBar/data.js @@ -0,0 +1,11 @@ +import GamesIcon from '@material-ui/icons/Games' +import SearchIcon from '@material-ui/icons/Search' +import LibraryAddIcon from '@material-ui/icons/LibraryAdd' + +const data = [ + { title: 'Look for competitions', to: '/', icon: SearchIcon, text: '' }, + { title: 'Competitions you applied for', to: '/competitions', icon: GamesIcon, text: '' }, + { title: 'Host your own competition', to: '/host-your-own', icon: LibraryAddIcon, text: '' } +] + +export default data diff --git a/client/src/Components/TopBar/index.js b/client/src/Components/TopBar/index.js new file mode 100644 index 000000000..768485f37 --- /dev/null +++ b/client/src/Components/TopBar/index.js @@ -0,0 +1,45 @@ +import React from 'react' +import { Link } from 'react-router-dom' +import classNames from 'classnames' + +import AppBar from '@material-ui/core/AppBar' +import Toolbar from '@material-ui/core/Toolbar' +import Typography from '@material-ui/core/Typography' +import Button from '@material-ui/core/Button' +import { withStyles } from '@material-ui/core/styles' + +import datas from './data' +import styles from './styles' + +const TopBar = ({ classes, user, match }) => { + const buttons = datas.map((data, index) => { + const Icon = data.icon + return ( + ) + } + ) + return ( +
+ + + + Manage competition + + {buttons} + + +
+ ) +} + +export default withStyles(styles)(TopBar) diff --git a/client/src/Components/TopBar/styles.js b/client/src/Components/TopBar/styles.js new file mode 100644 index 000000000..25cf9ab3b --- /dev/null +++ b/client/src/Components/TopBar/styles.js @@ -0,0 +1,37 @@ +const styles = theme => ({ + root: { + flexGrow: 1 + }, + flex: { + flexGrow: 1, + marginLeft: 30 + }, + menuButton: { + marginLeft: -12, + marginRight: 20 + }, + cssRoot: { + color: '#FFFFFF', + backgroundColor: theme.palette.secondary, + '&:hover': { + backgroundColor: theme.palette.dark + }, + whiteSpace: 'nowrap', + paddingRight: 2 * theme.spacing.unit, + paddingLeft: 2 * theme.spacing.unit + }, + button: { + margin: theme.spacing.unit + }, + leftIcon: { + marginRight: theme.spacing.unit + }, + rightIcon: { + marginLeft: theme.spacing.unit + }, + iconSmall: { + fontSize: 20 + } +}) + +export default styles diff --git a/client/src/index.js b/client/src/index.js index a175a5473..fc8bc3d64 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,10 +1,19 @@ import React, { Component } from 'react' import { Route, BrowserRouter, Switch } from 'react-router-dom' +import { MessageCard } from '@advancedalgos/web-components' +import { getItem } from './utils/local-storage' + +import TopBar from './Components/TopBar' +import Search from './Components/Search' + const Base = () => ( -

- Base component -

+
+

Base component

+ +
Loading...
+
+
) const Added = () => ( @@ -14,13 +23,38 @@ const Added = () => ( ) class App extends Component { + constructor (props) { + super(props) + this.state = { + user: null + } + } + + async componentDidMount () { + let user = await getItem('user') + + if (user !== null && user !== undefined && user !== 'undefined') { + user = JSON.parse(user) + this.setState({ user: user }) + } + } + render () { + let loggedIn + if (this.state.user !== null) { + loggedIn = () + } else { + loggedIn = '' + } return ( - - - - +
+ {loggedIn} + + + + +
) } diff --git a/client/src/utils/index.js b/client/src/utils/index.js new file mode 100644 index 000000000..85e5928d7 --- /dev/null +++ b/client/src/utils/index.js @@ -0,0 +1,5 @@ +export const toLocalTime = (epoch) => { + let localDate = new Date(0) + localDate.setUTCSeconds(epoch) + return localDate.toString() +} diff --git a/client/src/utils/local-storage.js b/client/src/utils/local-storage.js new file mode 100644 index 000000000..963ba0f36 --- /dev/null +++ b/client/src/utils/local-storage.js @@ -0,0 +1,9 @@ +const getItem = async name => window.localStorage.getItem(name) +const setItem = async (name, value) => window.localStorage.setItem(name, value) +const removeItem = async name => window.localStorage.removeItem(name) + +export { + getItem, + setItem, + removeItem +} From 5a9bc58a60dac29d39282fe4aae00292b4163af1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 23 Oct 2018 12:20:16 +0200 Subject: [PATCH 033/146] Package information update --- server/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/package.json b/server/package.json index b704fb069..8f88c93a8 100644 --- a/server/package.json +++ b/server/package.json @@ -1,7 +1,7 @@ { - "name": "@advancedalgos/hosts-client", + "name": "hosts-server", "version": "0.0.1", - "description": "Advanced Algos Host client-side web app", + "description": "Advanced Algos Host backend API", "author": "", "license": "", "main": "src/index.js", From 1c7b3500013649cb8c6a617b77cdbd052bdbe8cc Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 24 Oct 2018 17:36:47 +0200 Subject: [PATCH 034/146] removing JWT deconstruction and switching to userId --- server/package-lock.json | 586 ++---------------- server/package.json | 2 - server/src/index.js | 26 +- server/src/schema/mutations/AddPrize.js | 2 +- server/src/schema/mutations/AddRule.js | 2 +- .../src/schema/mutations/EditCompetition.js | 2 +- server/src/schema/mutations/EditRule.js | 2 +- .../src/schema/mutations/HostCompetition.js | 2 +- server/src/schema/mutations/ReorderRules.js | 2 +- 9 files changed, 45 insertions(+), 581 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index b28917c2f..8299dc622 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@advancedalgos/hosts-client", + "name": "hosts-server", "version": "0.0.1", "lockfileVersion": 1, "requires": true, @@ -61,89 +61,6 @@ "@sentry/types": "4.1.0" } }, - "@types/body-parser": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", - "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.32", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", - "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", - "requires": { - "@types/node": "*" - } - }, - "@types/events": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" - }, - "@types/express": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", - "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" - } - }, - "@types/express-jwt": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/express-jwt/-/express-jwt-0.0.34.tgz", - "integrity": "sha1-/b7kxq9cCiRu8qkz9VGZc8dxfwI=", - "requires": { - "@types/express": "*", - "@types/express-unless": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", - "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", - "requires": { - "@types/events": "*", - "@types/node": "*", - "@types/range-parser": "*" - } - }, - "@types/express-unless": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.0.32.tgz", - "integrity": "sha512-6YpJyFNlDDnPnRjMOvJCoDYlSDDmG/OEEUsPk7yhNkL4G9hUYtgab6vi1CcWsGSSSM0CsvNlWTG+ywAGnvF03g==", - "requires": { - "@types/express": "*" - } - }, - "@types/mime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", - "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" - }, - "@types/node": { - "version": "10.12.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz", - "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==" - }, - "@types/range-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", - "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" - }, - "@types/serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", - "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" - } - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -159,17 +76,6 @@ "negotiator": "0.6.1" } }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, "ansi-align": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", @@ -244,57 +150,24 @@ "dev": true, "optional": true }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "async": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "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=" - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" - }, "babel-cli": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", @@ -1146,14 +1019,6 @@ } } }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, "binary-extensions": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", @@ -1264,11 +1129,6 @@ "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", "integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg==" }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -1317,11 +1177,6 @@ "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", "dev": true }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, "chalk": { "version": "1.1.3", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -1399,11 +1254,6 @@ "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", "dev": true }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1429,14 +1279,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, "commander": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", @@ -1512,7 +1354,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cors": { "version": "2.8.4", @@ -1563,14 +1406,6 @@ "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1644,11 +1479,6 @@ } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1694,23 +1524,6 @@ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", - "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1853,27 +1666,6 @@ "raw-body": "^2.3.2" } }, - "express-jwt": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/express-jwt/-/express-jwt-5.3.1.tgz", - "integrity": "sha512-1C9RNq0wMp/JvsH/qZMlg3SIPvKu14YkZ4YYv7gJQ1Vq+Dv8LH9tLKenS5vMNth45gTlEUGx+ycp9IHIlaHP/g==", - "requires": { - "async": "^1.5.0", - "express-unless": "^0.3.0", - "jsonwebtoken": "^8.1.0", - "lodash.set": "^4.0.0" - } - }, - "express-unless": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/express-unless/-/express-unless-0.3.1.tgz", - "integrity": "sha1-JVfBRudb65A+LSR/m1ugFFJpbiA=" - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -1905,21 +1697,6 @@ "is-extglob": "^1.0.0" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -1977,21 +1754,6 @@ "for-in": "^1.0.1" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -2049,7 +1811,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2070,12 +1833,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2090,17 +1855,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2217,7 +1985,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2229,6 +1998,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2243,6 +2013,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2250,12 +2021,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2274,6 +2047,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2354,7 +2128,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2366,6 +2141,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2451,7 +2227,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2487,6 +2264,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2506,6 +2284,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2549,12 +2328,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2570,14 +2351,6 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -2712,20 +2485,6 @@ "cross-fetch": "2.2.2" } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", - "requires": { - "ajv": "^5.3.0", - "har-schema": "^2.0.0" - } - }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -2822,16 +2581,6 @@ "statuses": ">= 1.4.0 < 2" } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -3096,11 +2845,6 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -3129,11 +2873,6 @@ "isarray": "1.0.0" } }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, "iterall": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", @@ -3154,104 +2893,18 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "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=" - }, "json5": { "version": "0.5.1", "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, - "jsonwebtoken": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.3.0.tgz", - "integrity": "sha512-oge/hvlmeJCH+iIz1DwcO7vKPkNGJHhgkspk8OH3VKlw+mbi42WtD4ig1+VXRln765vxptAv+xT26Fd3cteqag==", - "requires": { - "jws": "^3.1.5", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jwa": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", - "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "^5.0.1" - } - }, - "jwks-rsa": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.3.0.tgz", - "integrity": "sha512-9q+d5VffK/FvFAjuXoddrq7zQybFSINV4mcwJJExGKXGyjWWpTt3vsn/aX33aB0heY02LK0qSyicdtRK0gVTig==", - "requires": { - "@types/express-jwt": "0.0.34", - "debug": "^2.2.0", - "limiter": "^1.1.0", - "lru-memoizer": "^1.6.0", - "ms": "^2.0.0", - "request": "^2.73.0" - } - }, - "jws": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", - "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", - "requires": { - "jwa": "^1.1.5", - "safe-buffer": "^5.0.1" - } - }, "kareem": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", @@ -3275,16 +2928,6 @@ "package-json": "^4.0.0" } }, - "limiter": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.3.tgz", - "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==" - }, - "lock": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/lock/-/lock-0.1.4.tgz", - "integrity": "sha1-/sfervF+fDoKVeHaBCgD4l2RdF0=" - }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -3301,46 +2944,6 @@ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, - "lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3360,22 +2963,12 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", + "dev": true, "requires": { "pseudomap": "^1.0.1", "yallist": "^2.0.0" } }, - "lru-memoizer": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-1.12.0.tgz", - "integrity": "sha1-7+ZXBsyKnMZT+A8NWm6jitlQ41I=", - "requires": { - "lock": "~0.1.2", - "lodash": "^4.17.4", - "lru-cache": "~4.0.0", - "very-fast-args": "^1.1.0" - } - }, "lsmod": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", @@ -4112,11 +3705,6 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4309,11 +3897,6 @@ "through": "~2.3" } }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -4372,12 +3955,8 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true }, "pstree.remy": { "version": "1.1.0", @@ -4388,11 +3967,6 @@ "ps-tree": "^1.1.0" } }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -4892,33 +4466,6 @@ "is-finite": "^1.0.0" } }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", @@ -5252,22 +4799,6 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "sshpk": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.1.tgz", - "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -5450,34 +4981,12 @@ "nopt": "~1.0.10" } }, - "tough-cookie": { - "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==", - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", @@ -5690,11 +5199,6 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, "v8flags": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", @@ -5709,21 +5213,6 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "very-fast-args": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/very-fast-args/-/very-fast-args-1.1.0.tgz", - "integrity": "sha1-4W0dH6+KbllqJGQh/ZCneWPQs5Y=" - }, "whatwg-fetch": { "version": "2.0.4", "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", @@ -5773,7 +5262,8 @@ "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } } diff --git a/server/package.json b/server/package.json index 8f88c93a8..230811b45 100644 --- a/server/package.json +++ b/server/package.json @@ -21,10 +21,8 @@ "dotenv": "^6.0.0", "express": "^4.16.3", "express-graphql": "^0.6.12", - "express-jwt": "^5.3.1", "graphql": "^14.0.0", "graphql-playground-middleware-express": "^1.7.6", - "jwks-rsa": "^1.3.0", "mongoose": "^5.3.4" } } diff --git a/server/src/index.js b/server/src/index.js index 799223ade..8b63b3f94 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -4,8 +4,6 @@ import cors from 'cors' import mongoose from 'mongoose' import graphqlHTTP from 'express-graphql' import expressPlayground from 'graphql-playground-middleware-express' -import jwt from 'express-jwt' -import jwksRsa from 'jwks-rsa' import schema from './schema' const Sentry = require('@sentry/node') @@ -35,35 +33,13 @@ var db = mongoose.connection db.on('error', () => { console.error.bind(console, 'MongoDB connection error:') }) db.once('open', () => { console.log('Connected to the DB.') }) -/* ------------------------------------------------- -------------- Authentification setup --------------- -------------------------------------------------- */ - -app.use('/graphql', - jwt({ - secret: jwksRsa.expressJwtSecret({ - cache: true, - rateLimit: true, - jwksRequestsPerMinute: 1, - jwksUri: `https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json` - }), - credentialsRequired: false, - audience: process.env.AUTH0_AUDIENCE, - issuer: process.env.AUTH0_ISSUER, - algorithms: [`RS256`] - }), - function (req, res, next) { - return next() - } -) - /* ------------------------------------------------- ----------------- Graphql setup -------------------- ------------------------------------------------- */ app.use('/graphql', graphqlHTTP(req => { return { schema: schema, - context: { user: req.user } + context: { userId: req.headers.userid } } })) app.get('/playground', expressPlayground({ endpoint: '/graphql' })) diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index 29997e43f..9fdda53e6 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -15,7 +15,7 @@ const args = { const resolve = (parent, { competitionCodeName, position, algoPrize }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { if (err || !competition) { reject(err) } else { diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index 67ad1298b..2729f463e 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -14,7 +14,7 @@ const args = { const resolve = (parent, { competitionCodeName, title, description }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { if (err || !competition) { reject(err) } else { diff --git a/server/src/schema/mutations/EditCompetition.js b/server/src/schema/mutations/EditCompetition.js index 55885f358..406eab073 100644 --- a/server/src/schema/mutations/EditCompetition.js +++ b/server/src/schema/mutations/EditCompetition.js @@ -23,7 +23,7 @@ const args = { const resolve = (parent, { codeName, displayName, description, startDatetime, finishDatetime, formula, plotterCodeName, plotterHost, plotterRepo, plotterModuleName }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName, host: context.user.sub }).exec((err, competition) => { + Competition.findOne({ codeName, host: context.userId }).exec((err, competition) => { if (err || !competition) { reject(err) } else { diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index ab96d25fd..c45da0438 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -15,7 +15,7 @@ const args = { const resolve = (parent, { competitionCodeName, title, newtitle, description }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { if (err || !competition) { reject(err) } else { diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js index a9c46dbed..cf763a643 100644 --- a/server/src/schema/mutations/HostCompetition.js +++ b/server/src/schema/mutations/HostCompetition.js @@ -16,7 +16,7 @@ const args = { } const resolve = (parent, { displayName, description, startDatetime, finishDatetime, formula }, context) => { - const host = context.user.sub + const host = context.userId let newCompetition = new Competition({ host, displayName, diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index c11503bee..0d479aa52 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -15,7 +15,7 @@ const args = { const resolve = (parent, { competitionCodeName, fromNumber, toNumber }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.user.sub }).exec((err, competition) => { + Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { if (err || !competition) { reject(err) } else { From 959f9668e6a4f75b45aa1f53b60051305f1ccc9f Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 27 Oct 2018 15:59:45 +0200 Subject: [PATCH 035/146] Complete refactoring --- server/src/models/competition.js | 40 ------------- server/src/models/event.js | 46 +++++++++++++++ server/src/models/formula.js | 11 ++++ server/src/models/index.js | 9 +++ server/src/models/plotter.js | 14 +++++ server/src/schema/mutations/AddPrize.js | 35 ++++++----- server/src/schema/mutations/AddRule.js | 32 +++++----- .../schema/mutations/CreateAndSetFormula.js | 46 +++++++++++++++ .../schema/mutations/CreateAndSetPlotter.js | 49 +++++++++++++++ server/src/schema/mutations/CreateFormula.js | 33 +++++++++++ server/src/schema/mutations/CreatePlotter.js | 36 +++++++++++ .../src/schema/mutations/EditCompetition.js | 59 ------------------- server/src/schema/mutations/EditEvent.js | 52 ++++++++++++++++ .../src/schema/mutations/EditParticipant.js | 30 +++++----- server/src/schema/mutations/EditRule.js | 28 ++++----- .../src/schema/mutations/HostCompetition.js | 47 --------------- server/src/schema/mutations/HostEvent.js | 45 ++++++++++++++ .../schema/mutations/RegisterToCompetition.js | 50 ---------------- .../src/schema/mutations/RegisterToEvent.js | 50 ++++++++++++++++ server/src/schema/mutations/ReorderRules.js | 34 +++++------ server/src/schema/mutations/index.js | 22 ++++--- server/src/schema/queries/Competitions.js | 29 --------- .../schema/queries/CompetitionsByDevTeam.js | 35 ----------- .../src/schema/queries/CompetitionsByHost.js | 35 ----------- server/src/schema/queries/Events.js | 35 +++++++++++ server/src/schema/queries/EventsByHost.js | 39 ++++++++++++ server/src/schema/queries/EventsByTeam.js | 39 ++++++++++++ server/src/schema/queries/Formulas.js | 21 +++++++ server/src/schema/queries/Plotters.js | 21 +++++++ server/src/schema/queries/index.js | 16 +++-- .../{OtherPrize.js => AdditionalPrize.js} | 4 +- .../schema/types/{Competition.js => Event.js} | 20 ++++--- server/src/schema/types/Formula.js | 17 ++++++ server/src/schema/types/Participant.js | 6 +- server/src/schema/types/Plotter.js | 8 ++- server/src/schema/types/Prize.js | 12 ++-- server/src/schema/types/Rule.js | 2 +- server/src/schema/types/index.js | 10 ++-- 38 files changed, 704 insertions(+), 413 deletions(-) delete mode 100644 server/src/models/competition.js create mode 100644 server/src/models/event.js create mode 100644 server/src/models/formula.js create mode 100644 server/src/models/index.js create mode 100644 server/src/models/plotter.js create mode 100644 server/src/schema/mutations/CreateAndSetFormula.js create mode 100644 server/src/schema/mutations/CreateAndSetPlotter.js create mode 100644 server/src/schema/mutations/CreateFormula.js create mode 100644 server/src/schema/mutations/CreatePlotter.js delete mode 100644 server/src/schema/mutations/EditCompetition.js create mode 100644 server/src/schema/mutations/EditEvent.js delete mode 100644 server/src/schema/mutations/HostCompetition.js create mode 100644 server/src/schema/mutations/HostEvent.js delete mode 100644 server/src/schema/mutations/RegisterToCompetition.js create mode 100644 server/src/schema/mutations/RegisterToEvent.js delete mode 100644 server/src/schema/queries/Competitions.js delete mode 100644 server/src/schema/queries/CompetitionsByDevTeam.js delete mode 100644 server/src/schema/queries/CompetitionsByHost.js create mode 100644 server/src/schema/queries/Events.js create mode 100644 server/src/schema/queries/EventsByHost.js create mode 100644 server/src/schema/queries/EventsByTeam.js create mode 100644 server/src/schema/queries/Formulas.js create mode 100644 server/src/schema/queries/Plotters.js rename server/src/schema/types/{OtherPrize.js => AdditionalPrize.js} (73%) rename server/src/schema/types/{Competition.js => Event.js} (72%) create mode 100644 server/src/schema/types/Formula.js diff --git a/server/src/models/competition.js b/server/src/models/competition.js deleted file mode 100644 index e7dbc4c0b..000000000 --- a/server/src/models/competition.js +++ /dev/null @@ -1,40 +0,0 @@ -import mongoose, { Schema } from 'mongoose' - -const competitionSchema = new Schema({ - codeName: String, - displayName: String, - host: String, - description: String, - startDatetime: Number, - finishDatetime: Number, - formula: String, - plotter: { - codeName: String, - host: String, - repo: String, - moduleName: String - }, - rules: [{ - number: Number, - title: String, - description: String - }], - prizes: [{ - position: Number, - algoPrize: Number, - otherPrizes: [{ - condition: String, - amount: Number, - asset: String - }] - }], - participants: [{ - devTeam: String, - bot: String, - release: String - }] -}) - -const Competition = mongoose.model('Competition', competitionSchema) - -export default Competition diff --git a/server/src/models/event.js b/server/src/models/event.js new file mode 100644 index 000000000..31d910b5c --- /dev/null +++ b/server/src/models/event.js @@ -0,0 +1,46 @@ +import mongoose, { Schema } from 'mongoose' +import Plotter from './plotter' +import Formula from './formula' + +const eventSchema = new Schema({ + designator: String, + name: String, + hostId: String, + description: String, + startDatetime: Number, + finishDatetime: Number, + formula: { type: Schema.Types.ObjectId, ref: Formula.modelName }, + plotter: { type: Schema.Types.ObjectId, ref: Plotter.modelName }, + rules: [{ + position: Number, + title: String, + description: String + }], + prizes: [{ + rank: Number, + amount: Number, + additional: [{ + condition: String, + amount: Number, + asset: String + }] + }], + participants: [{ + teamId: String, + botId: String, + releaseId: String + }] +}) + +eventSchema.pre('find', function () { + this.populate('formula').populate('plotter') +}) +eventSchema.post('save', function (doc, next) { + doc.populate('formula').populate('plotter').execPopulate().then(function () { + next() + }) +}) + +const Event = mongoose.model('Event', eventSchema) + +export default Event diff --git a/server/src/models/formula.js b/server/src/models/formula.js new file mode 100644 index 000000000..24e7015f4 --- /dev/null +++ b/server/src/models/formula.js @@ -0,0 +1,11 @@ +import mongoose, { Schema } from 'mongoose' + +const formulaSchema = new Schema({ + ownerId: String, + isTemplate: Boolean, + name: String +}) + +const Formula = mongoose.model('Formula', formulaSchema) + +export default Formula diff --git a/server/src/models/index.js b/server/src/models/index.js new file mode 100644 index 000000000..b35809dd1 --- /dev/null +++ b/server/src/models/index.js @@ -0,0 +1,9 @@ +import Plotter from './plotter' +import Event from './event' +import Formula from './formula' + +export { + Event, + Plotter, + Formula +} diff --git a/server/src/models/plotter.js b/server/src/models/plotter.js new file mode 100644 index 000000000..90c3f5d4f --- /dev/null +++ b/server/src/models/plotter.js @@ -0,0 +1,14 @@ +import mongoose, { Schema } from 'mongoose' + +const plotterSchema = new Schema({ + ownerId: String, + isTemplate: Boolean, + name: String, + host: String, + repo: String, + moduleName: String +}) + +const Plotter = mongoose.model('Plotter', plotterSchema) + +export default Plotter diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index 9fdda53e6..0e31a3ba1 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -1,36 +1,35 @@ import { GraphQLNonNull, GraphQLID, - GraphQLInt, - GraphQLString + GraphQLInt } from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' +import { EventType } from '../types' +import { Event } from '../../models' const args = { - competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, - position: { type: new GraphQLNonNull(GraphQLInt) }, - algoPrize: { type: new GraphQLNonNull(GraphQLString) } + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, + rank: { type: new GraphQLNonNull(GraphQLInt) }, + amount: { type: new GraphQLNonNull(GraphQLInt) } } -const resolve = (parent, { competitionCodeName, position, algoPrize }, context) => { +const resolve = (parent, { eventDesignator, rank, amount }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { - if (err || !competition) { + Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + if (err || !event) { reject(err) } else { - if (competition.prizes.some(prize => prize.position === position)) { + if (event.prizes.some(prize => prize.rank === rank)) { // need to add an error message here TODO - resolve(competition) + resolve(event) } else { - competition.prizes.push({ - position, - algoPrize + event.prizes.push({ + rank, + amount }) - competition.save((err) => { + event.save((err) => { if (err) reject(err) else { - resolve(competition) + resolve(event) } }) } @@ -41,7 +40,7 @@ const resolve = (parent, { competitionCodeName, position, algoPrize }, context) const mutation = { addPrize: { - type: CompetitionType, + type: EventType, args, resolve } diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index 2729f463e..606729114 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -3,37 +3,37 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' +import { EventType } from '../types' +import { Event } from '../../models' const args = { - competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, description: { type: new GraphQLNonNull(GraphQLString) } } -const resolve = (parent, { competitionCodeName, title, description }, context) => { +const resolve = (parent, { eventDesignator, title, description }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { - if (err || !competition) { + Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + if (err || !event) { reject(err) } else { - if (competition.rules.some(rule => rule.title === title)) { - resolve(competition) + if (event.rules.some(rule => rule.title === title)) { + resolve(event) } else { - let number = 1 - while (competition.rules.some(rule => rule.number === number)) { - number++ + let position = 1 + while (event.rules.some(rule => rule.position === position)) { + position++ } - competition.rules.push({ - number, + event.rules.push({ + position, title, description }) - competition.save((err) => { + event.save((err) => { if (err) reject(err) else { - resolve(competition) + resolve(event) } }) } @@ -44,7 +44,7 @@ const resolve = (parent, { competitionCodeName, title, description }, context) = const mutation = { addRule: { - type: CompetitionType, + type: EventType, args, resolve } diff --git a/server/src/schema/mutations/CreateAndSetFormula.js b/server/src/schema/mutations/CreateAndSetFormula.js new file mode 100644 index 000000000..1da7c5e5b --- /dev/null +++ b/server/src/schema/mutations/CreateAndSetFormula.js @@ -0,0 +1,46 @@ +import { + GraphQLNonNull, + GraphQLString +} from 'graphql' +import { EventType } from '../types' +import { Event, Formula } from '../../models' + +const args = { + eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, + name: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, { name, eventDesignator }, context) => { + const ownerId = context.userId + let newFormula = new Formula({ name, ownerId }) + return new Promise((resolve, reject) => { + Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { + if (err || !event) { + reject(err) + } else { + newFormula.save((err) => { + if (err) reject(err) + else { + } + }) + event.formula = newFormula._id + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + }) + }) +} + +const mutation = { + createAndSetFormula: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/CreateAndSetPlotter.js b/server/src/schema/mutations/CreateAndSetPlotter.js new file mode 100644 index 000000000..c8e850d05 --- /dev/null +++ b/server/src/schema/mutations/CreateAndSetPlotter.js @@ -0,0 +1,49 @@ +import { + GraphQLNonNull, + GraphQLString +} from 'graphql' +import { EventType } from '../types' +import { Event, Plotter } from '../../models' + +const args = { + eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, + name: { type: new GraphQLNonNull(GraphQLString) }, + host: { type: new GraphQLNonNull(GraphQLString) }, + repo: { type: new GraphQLNonNull(GraphQLString) }, + moduleName: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, { name, host, repo, moduleName, eventDesignator }, context) => { + const ownerId = context.userId + let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) + return new Promise((resolve, reject) => { + Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { + if (err || !event) { + reject(err) + } else { + newPlotter.save((err) => { + if (err) reject(err) + else { + } + }) + event.plotter = newPlotter._id + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + }) + }) +} + +const mutation = { + createAndSetPlotter: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/CreateFormula.js b/server/src/schema/mutations/CreateFormula.js new file mode 100644 index 000000000..89fd9b611 --- /dev/null +++ b/server/src/schema/mutations/CreateFormula.js @@ -0,0 +1,33 @@ +import { + GraphQLNonNull, + GraphQLString +} from 'graphql' +import { FormulaType } from '../types' +import { Formula } from '../../models' + +const args = { + name: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, { name }, context) => { + const ownerId = context.userId + let newFormula = new Formula({ name, ownerId }) + return new Promise((resolve, reject) => { + newFormula.save((err) => { + if (err) reject(err) + else { + resolve(newFormula) + } + }) + }) +} + +const mutation = { + createFormula: { + type: FormulaType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/CreatePlotter.js b/server/src/schema/mutations/CreatePlotter.js new file mode 100644 index 000000000..30e290b99 --- /dev/null +++ b/server/src/schema/mutations/CreatePlotter.js @@ -0,0 +1,36 @@ +import { + GraphQLNonNull, + GraphQLString +} from 'graphql' +import { PlotterType } from '../types' +import { Plotter } from '../../models' + +const args = { + name: { type: new GraphQLNonNull(GraphQLString) }, + host: { type: new GraphQLNonNull(GraphQLString) }, + repo: { type: new GraphQLNonNull(GraphQLString) }, + moduleName: { type: new GraphQLNonNull(GraphQLString) } +} + +const resolve = (parent, { name, host, repo, moduleName }, context) => { + const ownerId = context.userId + let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) + return new Promise((resolve, reject) => { + newPlotter.save((err) => { + if (err) reject(err) + else { + resolve(newPlotter) + } + }) + }) +} + +const mutation = { + createPlotter: { + type: PlotterType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/EditCompetition.js b/server/src/schema/mutations/EditCompetition.js deleted file mode 100644 index 406eab073..000000000 --- a/server/src/schema/mutations/EditCompetition.js +++ /dev/null @@ -1,59 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLInt, - GraphQLString -} from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' - -const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, - displayName: { type: GraphQLString }, - description: { type: GraphQLString }, - startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, - formula: { type: GraphQLString }, - plotterCodeName: { type: GraphQLString }, - plotterHost: { type: GraphQLString }, - plotterRepo: { type: GraphQLString }, - plotterModuleName: { type: GraphQLString } -} - -const resolve = (parent, { codeName, displayName, description, startDatetime, finishDatetime, - formula, plotterCodeName, plotterHost, plotterRepo, plotterModuleName }, context) => { - return new Promise((resolve, reject) => { - Competition.findOne({ codeName, host: context.userId }).exec((err, competition) => { - if (err || !competition) { - reject(err) - } else { - competition.displayName = displayName || competition.displayName - competition.description = description || competition.description - competition.startDatetime = startDatetime || competition.startDatetime - competition.finishDatetime = finishDatetime || competition.finishDatetime - competition.formula = formula || competition.formula - competition.plotter.codeName = plotterCodeName || competition.plotter.codeName - competition.plotter.host = plotterHost || competition.plotter.host - competition.plotter.repo = plotterRepo || competition.plotter.repo - competition.plotter.moduleName = plotterModuleName || competition.plotter.moduleName - - competition.save((err) => { - if (err) reject(err) - else { - resolve(competition) - } - }) - } - }) - }) -} - -const mutation = { - editCompetition: { - type: CompetitionType, - args, - resolve - } -} - -export default mutation diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js new file mode 100644 index 000000000..1e093b8e5 --- /dev/null +++ b/server/src/schema/mutations/EditEvent.js @@ -0,0 +1,52 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLInt, + GraphQLString +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + designator: { type: new GraphQLNonNull(GraphQLID) }, + name: { type: GraphQLString }, + description: { type: GraphQLString }, + startDatetime: { type: GraphQLInt }, + finishDatetime: { type: GraphQLInt }, + formulaId: { type: GraphQLString }, + plotterId: { type: GraphQLString } +} + +const resolve = (parent, { designator, name, description, startDatetime, finishDatetime, formulaId, plotterId }, context) => { + return new Promise((resolve, reject) => { + Event.findOne({ designator, hostId: context.userId }).exec((err, event) => { + if (err || !event) { + reject(err) + } else { + event.name = name || event.name + event.description = description || event.description + event.startDatetime = startDatetime || event.startDatetime + event.finishDatetime = finishDatetime || event.finishDatetime + event.formula = formulaId || event.formula + event.plotter = plotterId || event.plotter + + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + }) + }) +} + +const mutation = { + editEvent: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index f89677075..6adac2274 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -3,35 +3,35 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' +import { EventType } from '../types' +import { Event } from '../../models' const args = { - competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, - devTeam: { type: new GraphQLNonNull(GraphQLString) }, - bot: { type: GraphQLString }, - release: { type: GraphQLString } + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, + teamId: { type: new GraphQLNonNull(GraphQLString) }, + botId: { type: GraphQLString }, + releaseId: { type: GraphQLString } } -const resolve = (parent, { competitionCodeName, devTeam, bot, release }, context) => { +const resolve = (parent, { eventDesignator, teamId, botId, releaseId }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName }).exec((err, competition) => { + Event.findOne({ designator: eventDesignator }).exec((err, event) => { if (err) reject(err) else { let participantIndex - competition.participants.find((participant, index) => { - if (participant.devTeam === devTeam) { + event.participants.find((participant, index) => { + if (participant.teamId === teamId) { participantIndex = index } }) - competition.participants[participantIndex].bot = bot || competition.participants[participantIndex].bot - competition.participants[participantIndex].release = release || competition.participants[participantIndex].release + event.participants[participantIndex].botId = botId || event.participants[participantIndex].botId + event.participants[participantIndex].releaseId = releaseId || event.participants[participantIndex].releaseId - competition.save((err) => { + event.save((err) => { if (err) reject(err) else { - resolve(competition) + resolve(event) } }) } @@ -41,7 +41,7 @@ const resolve = (parent, { competitionCodeName, devTeam, bot, release }, context const mutation = { editParticipant: { - type: CompetitionType, + type: EventType, args, resolve } diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index c45da0438..4ec533f94 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -3,41 +3,41 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' +import { EventType } from '../types' +import { Event } from '../../models' const args = { - competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, newtitle: { type: GraphQLString }, description: { type: GraphQLString } } -const resolve = (parent, { competitionCodeName, title, newtitle, description }, context) => { +const resolve = (parent, { eventDesignator, title, newtitle, description }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { - if (err || !competition) { + Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + if (err || !event) { reject(err) } else { let ruleIndex - competition.rules.find((rule, index) => { + event.rules.find((rule, index) => { if (rule.title === title) { ruleIndex = index } }) - competition.rules[ruleIndex].description = description || competition.rules[ruleIndex].description - if (competition.rules.some(rule => rule.title === newtitle)) { + event.rules[ruleIndex].description = description || event.rules[ruleIndex].description + if (event.rules.some(rule => rule.title === newtitle)) { // need to add an error message here TODO - resolve(competition) + resolve(event) } else { - competition.rules[ruleIndex].title = newtitle || competition.rules[ruleIndex].title + event.rules[ruleIndex].title = newtitle || event.rules[ruleIndex].title } - competition.save((err) => { + event.save((err) => { if (err) reject(err) else { - resolve(competition) + resolve(event) } }) } @@ -47,7 +47,7 @@ const resolve = (parent, { competitionCodeName, title, newtitle, description }, const mutation = { editRule: { - type: CompetitionType, + type: EventType, args, resolve } diff --git a/server/src/schema/mutations/HostCompetition.js b/server/src/schema/mutations/HostCompetition.js deleted file mode 100644 index cf763a643..000000000 --- a/server/src/schema/mutations/HostCompetition.js +++ /dev/null @@ -1,47 +0,0 @@ -import { - GraphQLNonNull, - GraphQLInt, - GraphQLString -} from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' -import { slugify } from '../../utils/functions' - -const args = { - displayName: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) }, - startDatetime: { type: new GraphQLNonNull(GraphQLInt) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLInt) }, - formula: { type: new GraphQLNonNull(GraphQLString) } -} - -const resolve = (parent, { displayName, description, startDatetime, finishDatetime, formula }, context) => { - const host = context.userId - let newCompetition = new Competition({ - host, - displayName, - description, - startDatetime, - finishDatetime, - formula - }) - newCompetition.codeName = slugify(newCompetition.displayName) + '-' + newCompetition._id - return new Promise((resolve, reject) => { - newCompetition.save((err) => { - if (err) reject(err) - else { - resolve(newCompetition) - } - }) - }) -} - -const mutation = { - hostCompetition: { - type: CompetitionType, - args, - resolve - } -} - -export default mutation diff --git a/server/src/schema/mutations/HostEvent.js b/server/src/schema/mutations/HostEvent.js new file mode 100644 index 000000000..c2145736b --- /dev/null +++ b/server/src/schema/mutations/HostEvent.js @@ -0,0 +1,45 @@ +import { + GraphQLNonNull, + GraphQLInt, + GraphQLString +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' +import { slugify } from '../../utils/functions' + +const args = { + name: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: new GraphQLNonNull(GraphQLString) }, + startDatetime: { type: new GraphQLNonNull(GraphQLInt) }, + finishDatetime: { type: new GraphQLNonNull(GraphQLInt) } +} + +const resolve = (parent, { name, description, startDatetime, finishDatetime }, context) => { + const hostId = context.userId + let newEvent = new Event({ + hostId, + name, + description, + startDatetime, + finishDatetime + }) + newEvent.designator = slugify(newEvent.name) + '-' + newEvent._id + return new Promise((resolve, reject) => { + newEvent.save((err) => { + if (err) reject(err) + else { + resolve(newEvent) + } + }) + }) +} + +const mutation = { + hostEvent: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/RegisterToCompetition.js b/server/src/schema/mutations/RegisterToCompetition.js deleted file mode 100644 index 932d31018..000000000 --- a/server/src/schema/mutations/RegisterToCompetition.js +++ /dev/null @@ -1,50 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLString -} from 'graphql' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' - -const args = { - codeName: { type: new GraphQLNonNull(GraphQLID) }, - devTeam: { type: new GraphQLNonNull(GraphQLString) }, - bot: { type: new GraphQLNonNull(GraphQLString) }, - release: { type: new GraphQLNonNull(GraphQLString) } -} - -const resolve = (parent, { codeName, devTeam, bot, release }, context) => { - return new Promise((resolve, reject) => { - Competition.findOne({ codeName }).exec((err, competition) => { - if (err) reject(err) - else { - if (competition.participants.some(participant => participant.devTeam === args.devTeam)) { - // need to add an error message here TODO - resolve(competition) - } else { - competition.participants.push({ - devTeam, - bot, - release - }) - competition.save((err) => { - if (err) reject(err) - else { - resolve(competition) - } - }) - } - } - }) - }) -} - -const mutation = { - registerToCompetition: { - type: CompetitionType, - args, - resolve - } -} - -export default mutation diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js new file mode 100644 index 000000000..1c2e5f1a0 --- /dev/null +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -0,0 +1,50 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLString +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + designator: { type: new GraphQLNonNull(GraphQLID) }, + teamId: { type: new GraphQLNonNull(GraphQLString) }, + botId: { type: GraphQLString }, + releaseId: { type: GraphQLString } +} + +const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { + return new Promise((resolve, reject) => { + Event.findOne({ designator }).exec((err, event) => { + if (err) reject(err) + else { + if (event.participants.some(participant => participant.teamId === teamId)) { + // need to add an error message here TODO + resolve(event) + } else { + event.participants.push({ + teamId, + botId, + releaseId + }) + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + } + }) + }) +} + +const mutation = { + registerToEvent: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index 0d479aa52..7e14e114e 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -4,34 +4,34 @@ import { GraphQLInt } from 'graphql' import { isBetween } from '../../utils/functions' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' +import { EventType } from '../types' +import { Event } from '../../models' const args = { - competitionCodeName: { type: new GraphQLNonNull(GraphQLID) }, - fromNumber: { type: new GraphQLNonNull(GraphQLInt) }, - toNumber: { type: new GraphQLNonNull(GraphQLInt) } + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, + fromPosition: { type: new GraphQLNonNull(GraphQLInt) }, + toPosition: { type: new GraphQLNonNull(GraphQLInt) } } -const resolve = (parent, { competitionCodeName, fromNumber, toNumber }, context) => { +const resolve = (parent, { eventDesignator, fromPosition, toPosition }, context) => { return new Promise((resolve, reject) => { - Competition.findOne({ codeName: competitionCodeName, host: context.userId }).exec((err, competition) => { - if (err || !competition) { + Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + if (err || !event) { reject(err) } else { - const delta = fromNumber > toNumber ? 1 : -1 - competition.rules.forEach((part) => { - if (part.number === fromNumber) { - part.number = toNumber - } else if (isBetween(part.number, fromNumber, toNumber)) { - part.number += delta + const delta = fromPosition > toPosition ? 1 : -1 + event.rules.forEach((part) => { + if (part.position === fromPosition) { + part.position = toPosition + } else if (isBetween(part.position, fromPosition, toPosition)) { + part.position += delta } }) - competition.save((err) => { + event.save((err) => { if (err) reject(err) else { - resolve(competition) + resolve(event) } }) } @@ -41,7 +41,7 @@ const resolve = (parent, { competitionCodeName, fromNumber, toNumber }, context) const mutation = { reorderRules: { - type: CompetitionType, + type: EventType, args, resolve } diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index a760dee03..732ffcba8 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -2,26 +2,34 @@ import { GraphQLObjectType } from 'graphql' -import HostCompetitionMutation from './HostCompetition' -import EditCompetitionMutation from './EditCompetition' -import RegisterToCompetitionMutation from './RegisterToCompetition' +import HostEventMutation from './HostEvent' +import EditEventMutation from './EditEvent' +import RegisterToEventMutation from './RegisterToEvent' import EditParticipantMutation from './EditParticipant' import AddRuleMutation from './AddRule' import EditRuleMutation from './EditRule' import ReorderRulesMutation from './ReorderRules' import AddPrizeMutation from './AddPrize' +import CreateFormulaMutation from './CreateFormula' +import CreateAndSetFormulaMutation from './CreateAndSetFormula' +import CreatePlotterMutation from './CreatePlotter' +import CreateAndSetPlotterMutation from './CreateAndSetPlotter' const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( - HostCompetitionMutation, - EditCompetitionMutation, - RegisterToCompetitionMutation, + HostEventMutation, + EditEventMutation, + RegisterToEventMutation, EditParticipantMutation, AddRuleMutation, EditRuleMutation, ReorderRulesMutation, - AddPrizeMutation + AddPrizeMutation, + CreateFormulaMutation, + CreateAndSetFormulaMutation, + CreatePlotterMutation, + CreateAndSetPlotterMutation ) }) diff --git a/server/src/schema/queries/Competitions.js b/server/src/schema/queries/Competitions.js deleted file mode 100644 index 1b933000a..000000000 --- a/server/src/schema/queries/Competitions.js +++ /dev/null @@ -1,29 +0,0 @@ -import { - GraphQLBoolean, - GraphQLList -} from 'graphql' -import { epoch } from '../../utils/functions' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' - -const args = { - includeOld: { type: GraphQLBoolean } -} - -const resolve = (parent, { includeOld }, context) => { - return Competition.find( - Object.assign( - {}, - includeOld ? {} : { finishDatetime: { $gt: epoch() } } - )) -} - -const query = { - competitions: { - type: new GraphQLList(CompetitionType), - args, - resolve - } -} - -export default query diff --git a/server/src/schema/queries/CompetitionsByDevTeam.js b/server/src/schema/queries/CompetitionsByDevTeam.js deleted file mode 100644 index cb03ec215..000000000 --- a/server/src/schema/queries/CompetitionsByDevTeam.js +++ /dev/null @@ -1,35 +0,0 @@ -import { - GraphQLBoolean, - GraphQLList, - GraphQLString, - GraphQLNonNull -} from 'graphql' -import { epoch } from '../../utils/functions' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' - -const args = { - devTeam: { type: new GraphQLNonNull(GraphQLString) }, - includeOld: { type: GraphQLBoolean } -} - -const resolve = (parent, { devTeam, includeOld }, context) => { - return Competition.find( - Object.assign( - { - participants: { $elemMatch: { devTeam } } - }, - includeOld ? {} : { finishDatetime: { $gt: epoch() } } - ) - ) -} - -const query = { - competitionsByDevTeam: { - type: new GraphQLList(CompetitionType), - args, - resolve - } -} - -export default query diff --git a/server/src/schema/queries/CompetitionsByHost.js b/server/src/schema/queries/CompetitionsByHost.js deleted file mode 100644 index 70e36fac5..000000000 --- a/server/src/schema/queries/CompetitionsByHost.js +++ /dev/null @@ -1,35 +0,0 @@ -import { - GraphQLBoolean, - GraphQLList, - GraphQLString, - GraphQLNonNull -} from 'graphql' -import { epoch } from '../../utils/functions' -import { CompetitionType } from '../types' -import Competition from '../../models/competition' - -const args = { - host: { type: new GraphQLNonNull(GraphQLString) }, - includeOld: { type: GraphQLBoolean } -} - -const resolve = (parent, { host, includeOld }, context) => { - return Competition.find( - Object.assign( - { - host - }, - includeOld ? {} : { finishDatetime: { $gt: epoch() } } - ) - ) -} - -const query = { - competitionsByHost: { - type: new GraphQLList(CompetitionType), - args, - resolve - } -} - -export default query diff --git a/server/src/schema/queries/Events.js b/server/src/schema/queries/Events.js new file mode 100644 index 000000000..636988ac4 --- /dev/null +++ b/server/src/schema/queries/Events.js @@ -0,0 +1,35 @@ +import { + GraphQLInt, + GraphQLList +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + minDate: { type: GraphQLInt }, + maxDate: { type: GraphQLInt } +} + +const resolve = (parent, { minDate, maxDate }, context) => { + return Event.find( + Object.assign( + minDate || maxDate + ? { startDatetime: + Object.assign( + minDate ? { $gte: minDate } : {}, + maxDate ? { $lte: maxDate } : {} + ) } + : {} + ) + ) +} + +const query = { + events: { + type: new GraphQLList(EventType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js new file mode 100644 index 000000000..4b2cf35b3 --- /dev/null +++ b/server/src/schema/queries/EventsByHost.js @@ -0,0 +1,39 @@ +import { + GraphQLInt, + GraphQLList, + GraphQLString, + GraphQLNonNull +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + hostId: { type: new GraphQLNonNull(GraphQLString) }, + minDate: { type: GraphQLInt }, + maxDate: { type: GraphQLInt } +} + +const resolve = (parent, { hostId, minDate, maxDate }, context) => { + return Event.find( + Object.assign( + { hostId }, + minDate || maxDate + ? { startDatetime: + Object.assign( + minDate ? { $gte: minDate } : {}, + maxDate ? { $lte: maxDate } : {} + ) } + : {} + ) + ) +} + +const query = { + eventsByHost: { + type: new GraphQLList(EventType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/EventsByTeam.js b/server/src/schema/queries/EventsByTeam.js new file mode 100644 index 000000000..8c28391d7 --- /dev/null +++ b/server/src/schema/queries/EventsByTeam.js @@ -0,0 +1,39 @@ +import { + GraphQLInt, + GraphQLList, + GraphQLString, + GraphQLNonNull +} from 'graphql' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + teamId: { type: new GraphQLNonNull(GraphQLString) }, + minDate: { type: GraphQLInt }, + maxDate: { type: GraphQLInt } +} + +const resolve = (parent, { teamId, minDate, maxDate }, context) => { + return Event.find( + Object.assign( + { participants: { $elemMatch: { teamId } } }, + minDate || maxDate + ? { startDatetime: + Object.assign( + minDate ? { $gte: minDate } : {}, + maxDate ? { $lte: maxDate } : {} + ) } + : {} + ) + ) +} + +const query = { + eventsByTeam: { + type: new GraphQLList(EventType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/Formulas.js b/server/src/schema/queries/Formulas.js new file mode 100644 index 000000000..158fcf853 --- /dev/null +++ b/server/src/schema/queries/Formulas.js @@ -0,0 +1,21 @@ +import { + GraphQLList +} from 'graphql' +import { FormulaType } from '../types' +import { Formula } from '../../models' + +const args = {} + +const resolve = (parent, args, context) => { + return Formula.find() +} + +const query = { + formulas: { + type: new GraphQLList(FormulaType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/Plotters.js b/server/src/schema/queries/Plotters.js new file mode 100644 index 000000000..9bdc46296 --- /dev/null +++ b/server/src/schema/queries/Plotters.js @@ -0,0 +1,21 @@ +import { + GraphQLList +} from 'graphql' +import { PlotterType } from '../types' +import { Plotter } from '../../models' + +const args = {} + +const resolve = (parent, args, context) => { + return Plotter.find() +} + +const query = { + plotters: { + type: new GraphQLList(PlotterType), + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js index 58a55bec3..71aef39df 100644 --- a/server/src/schema/queries/index.js +++ b/server/src/schema/queries/index.js @@ -2,16 +2,20 @@ import { GraphQLObjectType } from 'graphql' -import CompetitionsQuery from './Competitions' -import CompetitionsByHostQuery from './CompetitionsByHost' -import CompetitionsByDevTeamQuery from './CompetitionsByDevTeam' +import EventsQuery from './Events' +import EventsByHostQuery from './EventsByHost' +import EventsByTeamQuery from './EventsByTeam' +import FormulasQuery from './Formulas' +import PlottersQuery from './Plotters' const RootQuery = new GraphQLObjectType({ name: 'RootQueryType', fields: Object.assign( - CompetitionsQuery, - CompetitionsByHostQuery, - CompetitionsByDevTeamQuery + EventsQuery, + EventsByHostQuery, + EventsByTeamQuery, + FormulasQuery, + PlottersQuery ) }) diff --git a/server/src/schema/types/OtherPrize.js b/server/src/schema/types/AdditionalPrize.js similarity index 73% rename from server/src/schema/types/OtherPrize.js rename to server/src/schema/types/AdditionalPrize.js index 6fb186283..f78c24d13 100644 --- a/server/src/schema/types/OtherPrize.js +++ b/server/src/schema/types/AdditionalPrize.js @@ -4,7 +4,7 @@ import { GraphQLInt } from 'graphql' -const OtherPrizeType = new GraphQLObjectType({ +const AdditionalPrizeType = new GraphQLObjectType({ name: 'OtherPrize', fields: () => ({ condition: { type: GraphQLString }, @@ -13,4 +13,4 @@ const OtherPrizeType = new GraphQLObjectType({ }) }) -export default OtherPrizeType +export default AdditionalPrizeType diff --git a/server/src/schema/types/Competition.js b/server/src/schema/types/Event.js similarity index 72% rename from server/src/schema/types/Competition.js rename to server/src/schema/types/Event.js index 009cfe702..1bb76b3a6 100644 --- a/server/src/schema/types/Competition.js +++ b/server/src/schema/types/Event.js @@ -6,22 +6,28 @@ import { GraphQLID } from 'graphql' import { + FormulaType, PlotterType, RuleType, ParticipantType, PrizeType } from './index' -const CompetitionType = new GraphQLObjectType({ - name: 'Competition', +const EventType = new GraphQLObjectType({ + name: 'Event', fields: () => ({ - codeName: { type: GraphQLID }, - displayName: { type: GraphQLString }, - host: { type: GraphQLString }, + designator: { type: GraphQLID }, + name: { type: GraphQLString }, + hostId: { type: GraphQLString }, description: { type: GraphQLString }, startDatetime: { type: GraphQLInt }, finishDatetime: { type: GraphQLInt }, - formula: { type: GraphQLString }, + formula: { + type: FormulaType, + resolve (parent, args) { + return parent.formula + } + }, plotter: { type: PlotterType, resolve (parent, args) { @@ -49,4 +55,4 @@ const CompetitionType = new GraphQLObjectType({ }) }) -export default CompetitionType +export default EventType diff --git a/server/src/schema/types/Formula.js b/server/src/schema/types/Formula.js new file mode 100644 index 000000000..b081cae14 --- /dev/null +++ b/server/src/schema/types/Formula.js @@ -0,0 +1,17 @@ +import { + GraphQLObjectType, + GraphQLString, + GraphQLBoolean +} from 'graphql' + +const FormulaType = new GraphQLObjectType({ + name: 'Formula', + fields: () => ({ + id: { type: GraphQLString }, + ownerId: { type: GraphQLString }, + isTemplate: { type: GraphQLBoolean }, + name: { type: GraphQLString } + }) +}) + +export default FormulaType diff --git a/server/src/schema/types/Participant.js b/server/src/schema/types/Participant.js index 13f27da4f..038c30a07 100644 --- a/server/src/schema/types/Participant.js +++ b/server/src/schema/types/Participant.js @@ -6,9 +6,9 @@ import { const ParticipantType = new GraphQLObjectType({ name: 'Participant', fields: () => ({ - devTeam: { type: GraphQLString }, - bot: { type: GraphQLString }, - release: { type: GraphQLString } + teamId: { type: GraphQLString }, + botId: { type: GraphQLString }, + releaseId: { type: GraphQLString } }) }) diff --git a/server/src/schema/types/Plotter.js b/server/src/schema/types/Plotter.js index ee2b3de67..610870eb6 100644 --- a/server/src/schema/types/Plotter.js +++ b/server/src/schema/types/Plotter.js @@ -1,12 +1,16 @@ import { GraphQLObjectType, - GraphQLString + GraphQLString, + GraphQLBoolean } from 'graphql' const PlotterType = new GraphQLObjectType({ name: 'Plotter', fields: () => ({ - codeName: { type: GraphQLString }, + id: { type: GraphQLString }, + ownerId: { type: GraphQLString }, + isTemplate: { type: GraphQLBoolean }, + name: { type: GraphQLString }, host: { type: GraphQLString }, repo: { type: GraphQLString }, moduleName: { type: GraphQLString } diff --git a/server/src/schema/types/Prize.js b/server/src/schema/types/Prize.js index 5588afd9a..aa0cabc38 100644 --- a/server/src/schema/types/Prize.js +++ b/server/src/schema/types/Prize.js @@ -3,17 +3,17 @@ import { GraphQLList, GraphQLInt } from 'graphql' -import { OtherPrizeType } from './index' +import { AdditionalPrizeType } from './index' const PrizeType = new GraphQLObjectType({ name: 'Prize', fields: () => ({ - position: { type: GraphQLInt }, - algoPrize: { type: GraphQLInt }, - otherPrizes: { - type: new GraphQLList(OtherPrizeType), + rank: { type: GraphQLInt }, + amount: { type: GraphQLInt }, + additional: { + type: new GraphQLList(AdditionalPrizeType), resolve (parent, args) { - return parent.otherPrizes + return parent.additional } } }) diff --git a/server/src/schema/types/Rule.js b/server/src/schema/types/Rule.js index f8a6b98ef..b9a5d59ca 100644 --- a/server/src/schema/types/Rule.js +++ b/server/src/schema/types/Rule.js @@ -7,7 +7,7 @@ import { const RuleType = new GraphQLObjectType({ name: 'Rule', fields: () => ({ - number: { type: GraphQLInt }, + position: { type: GraphQLInt }, title: { type: GraphQLString }, description: { type: GraphQLString } }) diff --git a/server/src/schema/types/index.js b/server/src/schema/types/index.js index 6431a687c..be64a7f25 100644 --- a/server/src/schema/types/index.js +++ b/server/src/schema/types/index.js @@ -1,15 +1,17 @@ import PlotterType from './Plotter' import RuleType from './Rule' import ParticipantType from './Participant' -import OtherPrizeType from './OtherPrize' +import AdditionalPrizeType from './AdditionalPrize' import PrizeType from './Prize' -import CompetitionType from './Competition' +import FormulaType from './Formula' +import EventType from './Event' export { PlotterType, RuleType, ParticipantType, - OtherPrizeType, + AdditionalPrizeType, PrizeType, - CompetitionType + FormulaType, + EventType } From 481f64f1fe14f1b0d87fecbee5765681accb466c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 27 Oct 2018 18:19:55 +0200 Subject: [PATCH 036/146] Adding a minimal error system --- server/src/errors/index.js | 4 ++++ server/src/index.js | 2 +- server/src/schema/mutations/AddPrize.js | 7 ++++++- server/src/schema/mutations/AddRule.js | 7 ++++++- server/src/schema/mutations/CreateAndSetFormula.js | 4 ++++ server/src/schema/mutations/CreateAndSetPlotter.js | 4 ++++ server/src/schema/mutations/CreateFormula.js | 4 ++++ server/src/schema/mutations/CreatePlotter.js | 4 ++++ server/src/schema/mutations/EditEvent.js | 7 ++++++- server/src/schema/mutations/EditParticipant.js | 5 +++++ server/src/schema/mutations/EditRule.js | 7 ++++++- server/src/schema/mutations/HostEvent.js | 4 ++++ server/src/schema/mutations/RegisterToEvent.js | 5 +++++ server/src/schema/mutations/ReorderRules.js | 5 +++++ 14 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 server/src/errors/index.js diff --git a/server/src/errors/index.js b/server/src/errors/index.js new file mode 100644 index 000000000..eb000c4ee --- /dev/null +++ b/server/src/errors/index.js @@ -0,0 +1,4 @@ +export class AuthentificationError extends Error { + code = 401 + message = 'You have to be authentificated to ' + ( this.message || "perform this action") +} diff --git a/server/src/index.js b/server/src/index.js index 8b63b3f94..a37022464 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -6,7 +6,7 @@ import graphqlHTTP from 'express-graphql' import expressPlayground from 'graphql-playground-middleware-express' import schema from './schema' -const Sentry = require('@sentry/node') +import * as Sentry from '@sentry/node' // Initialise express const app = express() diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index 0e31a3ba1..620442ab6 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLInt } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -13,8 +14,12 @@ const args = { } const resolve = (parent, { eventDesignator, rank, amount }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { - Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err || !event) { reject(err) } else { diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index 606729114..b3183fb6c 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -13,8 +14,12 @@ const args = { } const resolve = (parent, { eventDesignator, title, description }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { - Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err || !event) { reject(err) } else { diff --git a/server/src/schema/mutations/CreateAndSetFormula.js b/server/src/schema/mutations/CreateAndSetFormula.js index 1da7c5e5b..f8e145a22 100644 --- a/server/src/schema/mutations/CreateAndSetFormula.js +++ b/server/src/schema/mutations/CreateAndSetFormula.js @@ -2,6 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event, Formula } from '../../models' @@ -12,6 +13,9 @@ const args = { const resolve = (parent, { name, eventDesignator }, context) => { const ownerId = context.userId + if (!ownerId) { + throw new AuthentificationError() + } let newFormula = new Formula({ name, ownerId }) return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { diff --git a/server/src/schema/mutations/CreateAndSetPlotter.js b/server/src/schema/mutations/CreateAndSetPlotter.js index c8e850d05..75d518614 100644 --- a/server/src/schema/mutations/CreateAndSetPlotter.js +++ b/server/src/schema/mutations/CreateAndSetPlotter.js @@ -2,6 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event, Plotter } from '../../models' @@ -15,6 +16,9 @@ const args = { const resolve = (parent, { name, host, repo, moduleName, eventDesignator }, context) => { const ownerId = context.userId + if (!ownerId) { + throw new AuthentificationError() + } let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { diff --git a/server/src/schema/mutations/CreateFormula.js b/server/src/schema/mutations/CreateFormula.js index 89fd9b611..a8153209a 100644 --- a/server/src/schema/mutations/CreateFormula.js +++ b/server/src/schema/mutations/CreateFormula.js @@ -2,6 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { FormulaType } from '../types' import { Formula } from '../../models' @@ -11,6 +12,9 @@ const args = { const resolve = (parent, { name }, context) => { const ownerId = context.userId + if (!ownerId) { + throw new AuthentificationError() + } let newFormula = new Formula({ name, ownerId }) return new Promise((resolve, reject) => { newFormula.save((err) => { diff --git a/server/src/schema/mutations/CreatePlotter.js b/server/src/schema/mutations/CreatePlotter.js index 30e290b99..669dc81ec 100644 --- a/server/src/schema/mutations/CreatePlotter.js +++ b/server/src/schema/mutations/CreatePlotter.js @@ -2,6 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { PlotterType } from '../types' import { Plotter } from '../../models' @@ -14,6 +15,9 @@ const args = { const resolve = (parent, { name, host, repo, moduleName }, context) => { const ownerId = context.userId + if (!ownerId) { + throw new AuthentificationError() + } let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) return new Promise((resolve, reject) => { newPlotter.save((err) => { diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js index 1e093b8e5..f36fa26f9 100644 --- a/server/src/schema/mutations/EditEvent.js +++ b/server/src/schema/mutations/EditEvent.js @@ -4,6 +4,7 @@ import { GraphQLInt, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -18,8 +19,12 @@ const args = { } const resolve = (parent, { designator, name, description, startDatetime, finishDatetime, formulaId, plotterId }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { - Event.findOne({ designator, hostId: context.userId }).exec((err, event) => { + Event.findOne({ designator, hostId }).exec((err, event) => { if (err || !event) { reject(err) } else { diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index 6adac2274..3b8462da5 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -14,6 +15,10 @@ const args = { } const resolve = (parent, { eventDesignator, teamId, botId, releaseId }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator }).exec((err, event) => { if (err) reject(err) diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index 4ec533f94..1821d8aeb 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -14,8 +15,12 @@ const args = { } const resolve = (parent, { eventDesignator, title, newtitle, description }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { - Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { + Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err || !event) { reject(err) } else { diff --git a/server/src/schema/mutations/HostEvent.js b/server/src/schema/mutations/HostEvent.js index c2145736b..a562f6cb4 100644 --- a/server/src/schema/mutations/HostEvent.js +++ b/server/src/schema/mutations/HostEvent.js @@ -3,6 +3,7 @@ import { GraphQLInt, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' import { slugify } from '../../utils/functions' @@ -16,6 +17,9 @@ const args = { const resolve = (parent, { name, description, startDatetime, finishDatetime }, context) => { const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } let newEvent = new Event({ hostId, name, diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index 1c2e5f1a0..c34a29b57 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' +import { AuthentificationError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -14,6 +15,10 @@ const args = { } const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { Event.findOne({ designator }).exec((err, event) => { if (err) reject(err) diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index 7e14e114e..00846507e 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -3,6 +3,7 @@ import { GraphQLID, GraphQLInt } from 'graphql' +import { AuthentificationError } from '../../errors' import { isBetween } from '../../utils/functions' import { EventType } from '../types' import { Event } from '../../models' @@ -14,6 +15,10 @@ const args = { } const resolve = (parent, { eventDesignator, fromPosition, toPosition }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { if (err || !event) { From 734e158347a0b4af7cb095548d13de393811d467 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 27 Oct 2018 18:27:20 +0200 Subject: [PATCH 037/146] adding default/required attributes to the models --- server/src/models/event.js | 24 ++++++++++++------------ server/src/models/formula.js | 6 +++--- server/src/models/plotter.js | 12 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/server/src/models/event.js b/server/src/models/event.js index 31d910b5c..b547474ab 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -3,30 +3,30 @@ import Plotter from './plotter' import Formula from './formula' const eventSchema = new Schema({ - designator: String, - name: String, - hostId: String, + designator: { type: String, required: true }, + name: { type: String, required: true }, + hostId: { type: String, required: true }, description: String, - startDatetime: Number, - finishDatetime: Number, + startDatetime: { type: Number, required: true }, + finishDatetime: { type: Number, required: true }, formula: { type: Schema.Types.ObjectId, ref: Formula.modelName }, plotter: { type: Schema.Types.ObjectId, ref: Plotter.modelName }, rules: [{ - position: Number, - title: String, + position: { type: Number, required: true }, + title: { type: String, required: true }, description: String }], prizes: [{ - rank: Number, - amount: Number, + rank: { type: Number, required: true }, + amount: { type: Number, required: true }, additional: [{ condition: String, - amount: Number, - asset: String + amount: { type: Number, required: true }, + asset: { type: String, required: true } }] }], participants: [{ - teamId: String, + teamId: { type: String, required: true }, botId: String, releaseId: String }] diff --git a/server/src/models/formula.js b/server/src/models/formula.js index 24e7015f4..ca835ec6b 100644 --- a/server/src/models/formula.js +++ b/server/src/models/formula.js @@ -1,9 +1,9 @@ import mongoose, { Schema } from 'mongoose' const formulaSchema = new Schema({ - ownerId: String, - isTemplate: Boolean, - name: String + ownerId: { type: String, required: true }, + isTemplate: { type: Boolean, default: false }, + name: { type: String, required: true } }) const Formula = mongoose.model('Formula', formulaSchema) diff --git a/server/src/models/plotter.js b/server/src/models/plotter.js index 90c3f5d4f..d8fade1e4 100644 --- a/server/src/models/plotter.js +++ b/server/src/models/plotter.js @@ -1,12 +1,12 @@ import mongoose, { Schema } from 'mongoose' const plotterSchema = new Schema({ - ownerId: String, - isTemplate: Boolean, - name: String, - host: String, - repo: String, - moduleName: String + ownerId: { type: String, required: true }, + isTemplate: { type: Boolean, default: false }, + name: { type: String, required: true }, + host: { type: String, required: true }, + repo: { type: String, required: true }, + moduleName: { type: String, required: true } }) const Plotter = mongoose.model('Plotter', plotterSchema) From d3f0a610c18b79eec02c5c50ba717508ca3b1843 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 12:56:25 +0100 Subject: [PATCH 038/146] Cleaning the error system --- server/package.json | 5 +++++ server/src/errors/index.js | 12 +++++++++++- server/src/schema/mutations/AddPrize.js | 13 +++++++++---- server/src/schema/mutations/AddRule.js | 12 +++++++++--- server/src/schema/mutations/CreateAndSetFormula.js | 6 ++++-- server/src/schema/mutations/CreateAndSetPlotter.js | 6 ++++-- server/src/schema/mutations/EditEvent.js | 6 ++++-- server/src/schema/mutations/EditRule.js | 6 ++++-- server/src/schema/mutations/ReorderRules.js | 6 ++++-- 9 files changed, 54 insertions(+), 18 deletions(-) diff --git a/server/package.json b/server/package.json index 230811b45..2a4ca2256 100644 --- a/server/package.json +++ b/server/package.json @@ -9,6 +9,11 @@ "start": "nodemon --exec babel-node --presets env,stage-2 src/index.js", "test": "echo \"Error: no test specified\" && exit 1" }, + "standard": { + "ignore": [ + "/src/errors/index.js" + ] + }, "devDependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.7.0", diff --git a/server/src/errors/index.js b/server/src/errors/index.js index eb000c4ee..cfb70457e 100644 --- a/server/src/errors/index.js +++ b/server/src/errors/index.js @@ -1,4 +1,14 @@ export class AuthentificationError extends Error { code = 401 - message = 'You have to be authentificated to ' + ( this.message || "perform this action") + message = 'Autentification not found, you have to be authentificated to perform this action' +} + +export class DatabaseError extends Error { + code = 404 + message = 'Ressource not found : ' + this.message +} + +export class WrongArgumentsError extends Error { + code = 400 + message = 'Wrong arguments : ' + this.message } diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index 620442ab6..03e79b7c4 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -3,7 +3,11 @@ import { GraphQLID, GraphQLInt } from 'graphql' -import { AuthentificationError } from '../../errors' +import { + AuthentificationError, + DatabaseError, + WrongArgumentsError +} from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -20,12 +24,13 @@ const resolve = (parent, { eventDesignator, rank, amount }, context) => { } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { if (event.prizes.some(prize => prize.rank === rank)) { - // need to add an error message here TODO - resolve(event) + reject(new WrongArgumentsError('A prize for that rank already exists')) } else { event.prizes.push({ rank, diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index b3183fb6c..6968ab4e9 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -3,7 +3,11 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { + AuthentificationError, + DatabaseError, + WrongArgumentsError +} from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -20,11 +24,13 @@ const resolve = (parent, { eventDesignator, title, description }, context) => { } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { if (event.rules.some(rule => rule.title === title)) { - resolve(event) + reject(new WrongArgumentsError('A prize for that rank already exists')) } else { let position = 1 while (event.rules.some(rule => rule.position === position)) { diff --git a/server/src/schema/mutations/CreateAndSetFormula.js b/server/src/schema/mutations/CreateAndSetFormula.js index f8e145a22..21f631a1b 100644 --- a/server/src/schema/mutations/CreateAndSetFormula.js +++ b/server/src/schema/mutations/CreateAndSetFormula.js @@ -2,7 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, DatabaseError } from '../../errors' import { EventType } from '../types' import { Event, Formula } from '../../models' @@ -19,8 +19,10 @@ const resolve = (parent, { name, eventDesignator }, context) => { let newFormula = new Formula({ name, ownerId }) return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { newFormula.save((err) => { if (err) reject(err) diff --git a/server/src/schema/mutations/CreateAndSetPlotter.js b/server/src/schema/mutations/CreateAndSetPlotter.js index 75d518614..98aa2e7e4 100644 --- a/server/src/schema/mutations/CreateAndSetPlotter.js +++ b/server/src/schema/mutations/CreateAndSetPlotter.js @@ -2,7 +2,7 @@ import { GraphQLNonNull, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, DatabaseError } from '../../errors' import { EventType } from '../types' import { Event, Plotter } from '../../models' @@ -22,8 +22,10 @@ const resolve = (parent, { name, host, repo, moduleName, eventDesignator }, cont let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { newPlotter.save((err) => { if (err) reject(err) diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js index f36fa26f9..de5271efb 100644 --- a/server/src/schema/mutations/EditEvent.js +++ b/server/src/schema/mutations/EditEvent.js @@ -4,7 +4,7 @@ import { GraphQLInt, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, DatabaseError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -25,8 +25,10 @@ const resolve = (parent, { designator, name, description, startDatetime, finishD } return new Promise((resolve, reject) => { Event.findOne({ designator, hostId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { event.name = name || event.name event.description = description || event.description diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index 1821d8aeb..5b3113edf 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -3,7 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, DatabaseError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -21,8 +21,10 @@ const resolve = (parent, { eventDesignator, title, newtitle, description }, cont } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { let ruleIndex event.rules.find((rule, index) => { diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index 00846507e..0a29865d4 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -3,7 +3,7 @@ import { GraphQLID, GraphQLInt } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, DatabaseError } from '../../errors' import { isBetween } from '../../utils/functions' import { EventType } from '../types' import { Event } from '../../models' @@ -21,8 +21,10 @@ const resolve = (parent, { eventDesignator, fromPosition, toPosition }, context) } return new Promise((resolve, reject) => { Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { - if (err || !event) { + if (err) { reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) } else { const delta = fromPosition > toPosition ? 1 : -1 event.rules.forEach((part) => { From 2389aff531dc0b0f67bd579d825ee14a6298fe67 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 13:12:59 +0100 Subject: [PATCH 039/146] Adding a editPrize mutation --- server/src/schema/mutations/EditPrize.js | 55 ++++++++++++++++++++++++ server/src/schema/mutations/index.js | 2 + 2 files changed, 57 insertions(+) create mode 100644 server/src/schema/mutations/EditPrize.js diff --git a/server/src/schema/mutations/EditPrize.js b/server/src/schema/mutations/EditPrize.js new file mode 100644 index 000000000..6d291199c --- /dev/null +++ b/server/src/schema/mutations/EditPrize.js @@ -0,0 +1,55 @@ +import { + GraphQLNonNull, + GraphQLID, + GraphQLInt +} from 'graphql' +import { AuthentificationError, DatabaseError } from '../../errors' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, + rank: { type: new GraphQLNonNull(GraphQLInt) }, + amount: { type: GraphQLInt } +} + +const resolve = (parent, { eventDesignator, rank, amount }, context) => { + const hostId = context.userId + if (!hostId) { + throw new AuthentificationError() + } + return new Promise((resolve, reject) => { + Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { + if (err) { + reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')) + } else { + let prizeIndex + event.prizes.find((prize, index) => { + if (prize.rank === rank) { + prizeIndex = index + } + }) + + event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + }) + }) +} + +const mutation = { + editPrize: { + type: EventType, + args, + resolve + } +} + +export default mutation diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 732ffcba8..a49ba5114 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -10,6 +10,7 @@ import AddRuleMutation from './AddRule' import EditRuleMutation from './EditRule' import ReorderRulesMutation from './ReorderRules' import AddPrizeMutation from './AddPrize' +import EditPrizeMutation from './EditPrize' import CreateFormulaMutation from './CreateFormula' import CreateAndSetFormulaMutation from './CreateAndSetFormula' import CreatePlotterMutation from './CreatePlotter' @@ -26,6 +27,7 @@ const Mutation = new GraphQLObjectType({ EditRuleMutation, ReorderRulesMutation, AddPrizeMutation, + EditPrizeMutation, CreateFormulaMutation, CreateAndSetFormulaMutation, CreatePlotterMutation, From 41ea70838f6978a8eae0fcc19d310566b3ade1e8 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 13:13:24 +0100 Subject: [PATCH 040/146] Adding an error checker for edit prize and edit rule --- server/src/schema/mutations/EditPrize.js | 4 +++- server/src/schema/mutations/EditRule.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/schema/mutations/EditPrize.js b/server/src/schema/mutations/EditPrize.js index 6d291199c..51515f61b 100644 --- a/server/src/schema/mutations/EditPrize.js +++ b/server/src/schema/mutations/EditPrize.js @@ -31,7 +31,9 @@ const resolve = (parent, { eventDesignator, rank, amount }, context) => { prizeIndex = index } }) - + if (!prizeIndex) { + reject(new DatabaseError('There is no prize for that index')) + } event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount event.save((err) => { if (err) reject(err) diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index 5b3113edf..7dafe9829 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -32,7 +32,9 @@ const resolve = (parent, { eventDesignator, title, newtitle, description }, cont ruleIndex = index } }) - + if (!ruleIndex) { + reject(new DatabaseError('There is no rule with that title')) + } event.rules[ruleIndex].description = description || event.rules[ruleIndex].description if (event.rules.some(rule => rule.title === newtitle)) { // need to add an error message here TODO From d2c99cbc8a169ffea0a12681284dc7491ea380b2 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 13:21:54 +0100 Subject: [PATCH 041/146] Finishing the errors cleanup --- server/src/schema/mutations/EditRule.js | 5 ++--- server/src/schema/mutations/RegisterToEvent.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index 7dafe9829..acf83460b 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -3,7 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' +import { AuthentificationError, DatabaseError, WrongArgumentsError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -37,8 +37,7 @@ const resolve = (parent, { eventDesignator, title, newtitle, description }, cont } event.rules[ruleIndex].description = description || event.rules[ruleIndex].description if (event.rules.some(rule => rule.title === newtitle)) { - // need to add an error message here TODO - resolve(event) + reject(new WrongArgumentsError('There is already a rule using your new title')) } else { event.rules[ruleIndex].title = newtitle || event.rules[ruleIndex].title } diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index c34a29b57..138d7f9f5 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -3,7 +3,7 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import { AuthentificationError, WrongArgumentsError } from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -24,8 +24,7 @@ const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { if (err) reject(err) else { if (event.participants.some(participant => participant.teamId === teamId)) { - // need to add an error message here TODO - resolve(event) + reject(new WrongArgumentsError('You are already registred')) } else { event.participants.push({ teamId, From 13ad9b4e397fbeded46b940aba95d4f6beaa7fd9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 13:29:40 +0100 Subject: [PATCH 042/146] Correcting a little error in the error system --- server/src/schema/mutations/EditPrize.js | 3 ++- server/src/schema/mutations/EditRule.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/schema/mutations/EditPrize.js b/server/src/schema/mutations/EditPrize.js index 51515f61b..70a033f3b 100644 --- a/server/src/schema/mutations/EditPrize.js +++ b/server/src/schema/mutations/EditPrize.js @@ -25,7 +25,7 @@ const resolve = (parent, { eventDesignator, rank, amount }, context) => { } else if (!event) { reject(new DatabaseError('None of the events you own respond to that designator')) } else { - let prizeIndex + let prizeIndex = null event.prizes.find((prize, index) => { if (prize.rank === rank) { prizeIndex = index @@ -33,6 +33,7 @@ const resolve = (parent, { eventDesignator, rank, amount }, context) => { }) if (!prizeIndex) { reject(new DatabaseError('There is no prize for that index')) + return } event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount event.save((err) => { diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index acf83460b..d772dc011 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -26,7 +26,7 @@ const resolve = (parent, { eventDesignator, title, newtitle, description }, cont } else if (!event) { reject(new DatabaseError('None of the events you own respond to that designator')) } else { - let ruleIndex + let ruleIndex = null event.rules.find((rule, index) => { if (rule.title === title) { ruleIndex = index @@ -34,6 +34,7 @@ const resolve = (parent, { eventDesignator, title, newtitle, description }, cont }) if (!ruleIndex) { reject(new DatabaseError('There is no rule with that title')) + return } event.rules[ruleIndex].description = description || event.rules[ruleIndex].description if (event.rules.some(rule => rule.title === newtitle)) { From 7476850135f223df73a52fd25b81f1202b235fea Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 17:10:46 +0100 Subject: [PATCH 043/146] Checking for eligibility in the team --- server/.env.example | 2 + server/package-lock.json | 68 +++++++++-------- server/package.json | 1 + server/src/errors/index.js | 5 ++ server/src/index.js | 5 +- .../src/schema/mutations/EditParticipant.js | 68 ++++++++++++----- .../src/schema/mutations/RegisterToEvent.js | 75 +++++++++++++------ 7 files changed, 154 insertions(+), 70 deletions(-) diff --git a/server/.env.example b/server/.env.example index 30f282292..3a1f15081 100644 --- a/server/.env.example +++ b/server/.env.example @@ -8,3 +8,5 @@ AUTH0_AUDIENCE=auth0-audience AUTH0_ISSUER=auth0-issuer SENTRY_DNS=https://some-val@sentry.io/some-id + +TEAMS_ENDPOINT=https://teams-api.advancedalgos.net/graphql/ diff --git a/server/package-lock.json b/server/package-lock.json index 8299dc622..d98e7458a 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -168,6 +168,15 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "axios": { + "version": "0.18.0", + "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, "babel-cli": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", @@ -1738,6 +1747,24 @@ "integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw==", "dev": true }, + "follow-redirects": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", + "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1811,8 +1838,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1833,14 +1859,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1855,20 +1879,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1985,8 +2006,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -1998,7 +2018,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2013,7 +2032,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2021,14 +2039,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2047,7 +2063,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2128,8 +2143,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2141,7 +2155,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2227,8 +2240,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -2264,7 +2276,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2284,7 +2295,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2328,14 +2338,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/server/package.json b/server/package.json index 2a4ca2256..54abb1256 100644 --- a/server/package.json +++ b/server/package.json @@ -22,6 +22,7 @@ }, "dependencies": { "@sentry/node": "^4.1.1", + "axios": "^0.18.0", "cors": "^2.8.4", "dotenv": "^6.0.0", "express": "^4.16.3", diff --git a/server/src/errors/index.js b/server/src/errors/index.js index cfb70457e..b1085fedf 100644 --- a/server/src/errors/index.js +++ b/server/src/errors/index.js @@ -12,3 +12,8 @@ export class WrongArgumentsError extends Error { code = 400 message = 'Wrong arguments : ' + this.message } + +export class ServiceUnavailableError extends Error { + code = 503 + message = 'At least one service is unresponding ' + this.message +} diff --git a/server/src/index.js b/server/src/index.js index a37022464..c68ba1e9f 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -39,7 +39,10 @@ db.once('open', () => { console.log('Connected to the DB.') }) app.use('/graphql', graphqlHTTP(req => { return { schema: schema, - context: { userId: req.headers.userid } + context: { + userId: req.headers.userid, + authorization: req.headers.authorization + } } })) app.get('/playground', expressPlayground({ endpoint: '/graphql' })) diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index 3b8462da5..855370afa 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -3,7 +3,12 @@ import { GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError } from '../../errors' +import axios from 'axios' +import { + AuthentificationError, + WrongArgumentsError, + ServiceUnavailableError +} from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -15,32 +20,59 @@ const args = { } const resolve = (parent, { eventDesignator, teamId, botId, releaseId }, context) => { - const hostId = context.userId - if (!hostId) { + const userid = context.userId + if (!userid) { throw new AuthentificationError() } return new Promise((resolve, reject) => { - Event.findOne({ designator: eventDesignator }).exec((err, event) => { - if (err) reject(err) - else { - let participantIndex - event.participants.find((participant, index) => { - if (participant.teamId === teamId) { - participantIndex = index + axios({ + url: process.env.TEAMS_ENDPOINT, + method: 'post', + data: { + query: ` + { + teamsByRole{ + id + } } - }) - - event.participants[participantIndex].botId = botId || event.participants[participantIndex].botId - event.participants[participantIndex].releaseId = releaseId || event.participants[participantIndex].releaseId - - event.save((err) => { + ` + }, + headers: { + userid, + authorization: context.authorization + } + }).then( + (result) => { + if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { + reject(new WrongArgumentsError('You are not eligible to register this team')) + return + } + Event.findOne({ designator: eventDesignator }).exec((err, event) => { if (err) reject(err) else { - resolve(event) + let participantIndex + event.participants.find((participant, index) => { + if (participant.teamId === teamId) { + participantIndex = index + } + }) + + event.participants[participantIndex].botId = botId || event.participants[participantIndex].botId + event.participants[participantIndex].releaseId = releaseId || event.participants[participantIndex].releaseId + + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) } }) + }, + (error) => { + reject(new ServiceUnavailableError(error)) } - }) + ) }) } diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index 138d7f9f5..0c852abc8 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -1,9 +1,15 @@ +import 'dotenv/config' import { GraphQLNonNull, GraphQLID, GraphQLString } from 'graphql' -import { AuthentificationError, WrongArgumentsError } from '../../errors' +import axios from 'axios' +import { + AuthentificationError, + WrongArgumentsError, + ServiceUnavailableError +} from '../../errors' import { EventType } from '../types' import { Event } from '../../models' @@ -15,31 +21,58 @@ const args = { } const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { - const hostId = context.userId - if (!hostId) { + const userid = context.userId + if (!userid) { throw new AuthentificationError() } return new Promise((resolve, reject) => { - Event.findOne({ designator }).exec((err, event) => { - if (err) reject(err) - else { - if (event.participants.some(participant => participant.teamId === teamId)) { - reject(new WrongArgumentsError('You are already registred')) - } else { - event.participants.push({ - teamId, - botId, - releaseId - }) - event.save((err) => { - if (err) reject(err) - else { - resolve(event) + axios({ + url: process.env.TEAMS_ENDPOINT, + method: 'post', + data: { + query: ` + { + teamsByRole{ + id } - }) - } + } + ` + }, + headers: { + userid, + authorization: context.authorization } - }) + }).then( + (result) => { + if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { + reject(new WrongArgumentsError('You are not eligible to register this team')) + return + } + Event.findOne({ designator }).exec((err, event) => { + if (err) reject(err) + else { + if (event.participants.some(participant => participant.teamId === teamId)) { + reject(new WrongArgumentsError('You are already registred')) + } else { + event.participants.push({ + teamId, + botId, + releaseId + }) + event.save((err) => { + if (err) reject(err) + else { + resolve(event) + } + }) + } + } + }) + }, + (error) => { + reject(new ServiceUnavailableError(error)) + } + ) }) } From 91be2a6ff316ab7d3ac6ec110e59082d2fa9f2de Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 19:00:24 +0100 Subject: [PATCH 044/146] Event by host adding a fallback to current user if user not specified --- server/src/schema/queries/EventsByHost.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js index 4b2cf35b3..8a6d35848 100644 --- a/server/src/schema/queries/EventsByHost.js +++ b/server/src/schema/queries/EventsByHost.js @@ -1,14 +1,13 @@ import { GraphQLInt, GraphQLList, - GraphQLString, - GraphQLNonNull + GraphQLString } from 'graphql' import { EventType } from '../types' import { Event } from '../../models' const args = { - hostId: { type: new GraphQLNonNull(GraphQLString) }, + hostId: { type: GraphQLString }, minDate: { type: GraphQLInt }, maxDate: { type: GraphQLInt } } @@ -16,7 +15,7 @@ const args = { const resolve = (parent, { hostId, minDate, maxDate }, context) => { return Event.find( Object.assign( - { hostId }, + hostId ? { hostId } : { hostId: context.userId }, minDate || maxDate ? { startDatetime: Object.assign( From 99a15933e0d17710d6e24e98f1e91d6514dacfde Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 19:14:31 +0100 Subject: [PATCH 045/146] making standardjs lint work with ES7/next feature --- client/package-lock.json | 1483 ++++++++++++++++++++++++++++++++++++++ client/package.json | 7 +- 2 files changed, 1489 insertions(+), 1 deletion(-) diff --git a/client/package-lock.json b/client/package-lock.json index 1d672433d..f5ee1d165 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -34,6 +34,74 @@ "tslib": "^1.9.3" } }, + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/generator": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", + "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", + "dev": true, + "requires": { + "@babel/types": "^7.1.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@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==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.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==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", + "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", + "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "dev": true + }, "@babel/runtime": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", @@ -42,6 +110,45 @@ "regenerator-runtime": "^0.12.0" } }, + "@babel/template": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", + "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.1.2", + "@babel/types": "^7.1.2" + } + }, + "@babel/traverse": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz", + "integrity": "sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.1.3", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.1.3", + "@babel/types": "^7.1.3", + "debug": "^3.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + } + }, + "@babel/types": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", + "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, "@material-ui/core": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.2.2.tgz", @@ -231,6 +338,48 @@ "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" }, + "acorn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", + "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz", + "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==", + "dev": true + }, + "ajv": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "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": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -288,11 +437,30 @@ "fclone": "^1.0.11" } }, + "argparse": { + "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" + } + }, "array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "array-map": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", @@ -303,6 +471,27 @@ "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" }, + "array-union": { + "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" + } + }, + "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 + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -330,6 +519,73 @@ "is-buffer": "^1.1.5" } }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://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", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-eslint": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz", + "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "^1.0.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -364,6 +620,21 @@ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -379,11 +650,38 @@ "resolved": "https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz", "integrity": "sha1-6LL+PX8at9aaMhma/5HqaTFAlRU=" }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, "classnames": { "version": "2.2.6", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.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 + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -410,6 +708,12 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", @@ -453,11 +757,23 @@ "ms": "2.0.0" } }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true + }, "deep-extend": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "deepmerge": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", @@ -471,11 +787,65 @@ "object-keys": "^1.0.12" } }, + "deglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "dev": true, + "requires": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + }, + "dependencies": { + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-helpers": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", @@ -535,6 +905,281 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "dev": true, + "requires": { + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } + } + }, + "eslint-config-standard": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", + "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.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" + } + } + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^1.0.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" + } + } + } + }, + "eslint-plugin-es": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "dev": true, + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.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" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", + "dev": true, + "requires": { + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" + } + }, + "eslint-plugin-promise": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", + "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", + "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.2" + } + }, + "eslint-plugin-standard": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", + "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "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 + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, "event-stream": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz", @@ -555,6 +1200,23 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -597,6 +1259,53 @@ "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", "integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=" }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "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, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" + } + }, "flatmap-stream": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", @@ -625,11 +1334,43 @@ "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "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==", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -640,6 +1381,34 @@ "process": "~0.5.1" } }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "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": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -666,6 +1435,15 @@ "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -721,6 +1499,18 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "indefinite-observable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-1.0.1.tgz", @@ -729,6 +1519,43 @@ "symbol-observable": "1.0.4" } }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -765,11 +1592,41 @@ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, + "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 + }, "is-in-browser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -778,6 +1635,12 @@ "isobject": "^3.0.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -786,6 +1649,12 @@ "has": "^1.0.1" } }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -833,11 +1702,39 @@ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -917,11 +1814,30 @@ "css-vendor": "^0.3.8" } }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "^3.0.3" + } + }, "keycode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz", "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -933,6 +1849,30 @@ "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" + }, + "dependencies": { + "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 + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, "lodash.flowright": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/lodash.flowright/-/lodash.flowright-3.5.0.tgz", @@ -974,6 +1914,12 @@ "mime-db": "~1.37.0" } }, + "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 + }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -991,6 +1937,21 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -1013,6 +1974,18 @@ "xml2js": "^0.4.19" } }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -1069,6 +2042,68 @@ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "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 + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -1078,11 +2113,38 @@ "json-parse-better-errors": "^1.0.1" } }, + "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-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "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 + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "path-to-regexp": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", @@ -1112,17 +2174,91 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.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" + } + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "requires": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, "popper.js": { "version": "1.14.4", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz", "integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", "dev": true }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "dev": true + }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -1336,6 +2472,74 @@ "path-type": "^3.0.0" } }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.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" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.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-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "http://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", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + } + } + }, "recompose": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.30.0.tgz", @@ -1354,11 +2558,93 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, "resolve-pathname": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1417,6 +2703,27 @@ "jsonify": "~0.0.0" } }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "spdx-correct": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", @@ -1453,6 +2760,49 @@ "through": "2" } }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "standard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", + "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", + "dev": true, + "requires": { + "eslint": "~5.4.0", + "eslint-config-standard": "12.0.0", + "eslint-config-standard-jsx": "6.0.2", + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" + } + }, + "standard-engine": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", + "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", + "dev": true, + "requires": { + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "stream-combiner": { "version": "0.2.2", "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", @@ -1462,6 +2812,16 @@ "through": "~2.3.4" } }, + "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" + } + }, "string.prototype.padend": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", @@ -1472,11 +2832,34 @@ "function-bind": "^1.0.2" } }, + "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" + }, + "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-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, + "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 + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1490,11 +2873,46 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" }, + "table": { + "version": "4.0.3", + "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "dev": true, + "requires": { + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -1504,16 +2922,54 @@ "punycode": "^1.4.1" } }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "ua-parser-js": { "version": "0.7.18", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -1554,6 +3010,27 @@ "isexe": "^2.0.0" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -1568,6 +3045,12 @@ "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, "zen-observable": { "version": "0.8.10", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.10.tgz", diff --git a/client/package.json b/client/package.json index 126f5a9de..de1fa9e82 100644 --- a/client/package.json +++ b/client/package.json @@ -8,8 +8,13 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, + "standard": { + "parser": "babel-eslint" + }, "devDependencies": { - "react-hot-loader": "^4.3.11" + "babel-eslint": "^10.0.1", + "react-hot-loader": "^4.3.11", + "standard": "^12.0.1" }, "dependencies": { "@advancedalgos/web-components": "0.0.13", From 15106771f22b60233f83fcbf3ecdfd35f273a140 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 28 Oct 2018 20:57:16 +0100 Subject: [PATCH 046/146] a minimal event creation system and list --- client/src/Components/HostedEvent/graphql.js | 20 +++++ client/src/Components/HostedEvent/index.js | 86 ++++++++++++++++++++ client/src/Components/HostedEvent/new.js | 77 ++++++++++++++++++ client/src/Components/HostedEvent/styles.js | 10 +++ client/src/Components/TopBar/data.js | 6 +- client/src/index.js | 21 +---- 6 files changed, 199 insertions(+), 21 deletions(-) create mode 100644 client/src/Components/HostedEvent/graphql.js create mode 100644 client/src/Components/HostedEvent/index.js create mode 100644 client/src/Components/HostedEvent/new.js create mode 100644 client/src/Components/HostedEvent/styles.js diff --git a/client/src/Components/HostedEvent/graphql.js b/client/src/Components/HostedEvent/graphql.js new file mode 100644 index 000000000..83b5882ce --- /dev/null +++ b/client/src/Components/HostedEvent/graphql.js @@ -0,0 +1,20 @@ +import gql from 'graphql-tag' + +const fragments = ` + name +` + +export const HOSTS_HOSTEVENT = gql` + mutation Hosts_HostEvent($name: String!, $description: String!, $startDatetime: Int!, $finishDatetime: Int!) { + hosts_HostEvent(name: $name, description: $description, startDatetime: $startDatetime, finishDatetime: $finishDatetime) { + ${fragments} + } + } +` +export const HOSTS_EVENTSBYHOST = gql` + query Hosts_EventsByHost{ + hosts_EventsByHost { + ${fragments} + } + } +` diff --git a/client/src/Components/HostedEvent/index.js b/client/src/Components/HostedEvent/index.js new file mode 100644 index 000000000..323687de8 --- /dev/null +++ b/client/src/Components/HostedEvent/index.js @@ -0,0 +1,86 @@ +import React from 'react' +import { Query } from 'react-apollo' +import { HOSTS_EVENTSBYHOST } from './graphql' + +import { + Button, + Dialog, + DialogContent, + DialogContentText, + DialogTitle +} from '@material-ui/core' + +import { withStyles } from '@material-ui/core/styles' +import styles from './styles' + +import New from './new' + +class HostedEvent extends React.Component { + constructor (props) { + super(props) + this.state = { + isNewEventOpen: false + } + } + + handleNewEventOpen = () => { + this.setState({ isNewEventOpen: true }) + }; + + handleNewEventClose = () => { + this.setState({ isNewEventOpen: false }) + }; + + render () { + const { classes } = this.props + return ( + + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + const list = data.hosts_EventsByHost.map((event, index) => { + return ( +
+ {event.name} +
+ ) + }) + return ( + + { list } + + ) + }} +
+ + + + + + Host an event + + + + Here you will add just the minimal information, will be settable in the edit page of your event. + + + + + +
+ ) + } +} + +export default withStyles(styles)(HostedEvent) diff --git a/client/src/Components/HostedEvent/new.js b/client/src/Components/HostedEvent/new.js new file mode 100644 index 000000000..ad95e7bcf --- /dev/null +++ b/client/src/Components/HostedEvent/new.js @@ -0,0 +1,77 @@ +import React from 'react' +import { Mutation } from 'react-apollo' +import { HOSTS_HOSTEVENT, HOSTS_EVENTSBYHOST } from './graphql' + +/* +import classNames from 'classnames' +import { + Button, + TextField +} from '@material-ui/core' +*/ + +class New extends React.Component { + render () { + let name + let description + let startDatetime + let finishDatetime + // const { classes } = this.props + return ( + { + const { hosts_EventsByHost: hostedEvents } = store.readQuery({ query: HOSTS_EVENTSBYHOST }) + store.writeQuery({ + query: HOSTS_EVENTSBYHOST, + data: { hosts_EventsByHost: hostedEvents.concat([data.hosts_HostEvent]) } + }) + } + } + > + {(hostEvent, { data }) => ( +
+
{ + e.preventDefault() + hostEvent({ variables: { + name: name.value, + description: description.value, + startDatetime: parseInt(startDatetime.value, 10), + finishDatetime: parseInt(finishDatetime.value, 10) + } }) + this.props.handleNewEventClose() + }} + > + { + name = node + }} + /> + { + description = node + }} + /> + { + startDatetime = node + }} + /> + { + finishDatetime = node + }} + /> + +
+
this.clearTempStates()} /> +
+ )} + + ) + } +} + +export default New diff --git a/client/src/Components/HostedEvent/styles.js b/client/src/Components/HostedEvent/styles.js new file mode 100644 index 000000000..382437a4b --- /dev/null +++ b/client/src/Components/HostedEvent/styles.js @@ -0,0 +1,10 @@ + +const styles = theme => ({ + centered: { + display: 'block', + marginLeft: 'auto', + marginRight: 'auto' + } +}) + +export default styles diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 2f58b632b..37d33c471 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -3,9 +3,9 @@ import SearchIcon from '@material-ui/icons/Search' import LibraryAddIcon from '@material-ui/icons/LibraryAdd' const data = [ - { title: 'Look for competitions', to: '/', icon: SearchIcon, text: '' }, - { title: 'Competitions you applied for', to: '/competitions', icon: GamesIcon, text: '' }, - { title: 'Host your own competition', to: '/host-your-own', icon: LibraryAddIcon, text: '' } + { title: 'Look for an event', to: '/', icon: SearchIcon, text: '' }, + { title: 'Events you are enrolled in', to: '/events', icon: GamesIcon, text: '' }, + { title: 'Host your own competition', to: '/hosted-events', icon: LibraryAddIcon, text: '' } ] export default data diff --git a/client/src/index.js b/client/src/index.js index fc8bc3d64..2e4c0c8b6 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,26 +1,11 @@ import React, { Component } from 'react' import { Route, BrowserRouter, Switch } from 'react-router-dom' -import { MessageCard } from '@advancedalgos/web-components' import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' import Search from './Components/Search' - -const Base = () => ( -
-

Base component

- -
Loading...
-
-
-) - -const Added = () => ( -

- Added component -

-) +import HostedEvent from './Components/HostedEvent' class App extends Component { constructor (props) { @@ -35,7 +20,7 @@ class App extends Component { if (user !== null && user !== undefined && user !== 'undefined') { user = JSON.parse(user) - this.setState({ user: user }) + this.setState({ user }) } } @@ -52,7 +37,7 @@ class App extends Component { {loggedIn} - +
From 347848154aabec61e6932a9f7f64542707899089 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 12:08:16 +0100 Subject: [PATCH 047/146] Better date format (probably going to make it settable) --- client/src/utils/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/utils/index.js b/client/src/utils/index.js index 85e5928d7..4aee66165 100644 --- a/client/src/utils/index.js +++ b/client/src/utils/index.js @@ -1,5 +1,6 @@ export const toLocalTime = (epoch) => { let localDate = new Date(0) localDate.setUTCSeconds(epoch) - return localDate.toString() + var options = { year: 'numeric', month: 'long', day: '2-digit' } + return localDate.toLocaleDateString(options) + ' ' + localDate.toLocaleTimeString('en-US') } From 373bf5e315d84840b0a2fe109b33ffb6f733729a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 15:13:40 +0100 Subject: [PATCH 048/146] installing the datetime picker (locally for now) --- client/package-lock.json | 26 ++++++++++++++++++++++++++ client/package.json | 2 ++ client/src/index.js | 23 ++++++++++++++--------- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index f5ee1d165..cf10f29a6 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1891,11 +1891,29 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "luxon": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.4.4.tgz", + "integrity": "sha512-M21p8nbKZRLqVnQ0XAhhCo+2Z3Z6+zm9tuogDMZ2vlkFkw8AREF+d5/abn8tz1/ycu4cemNlqcQcc7HqjhrpTw==" + }, "map-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" }, + "material-ui-pickers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/material-ui-pickers/-/material-ui-pickers-1.0.1.tgz", + "integrity": "sha512-FRJwgeFUQdQxzNAybZvf11204KFBxqKS6sg4JvAO0cWmHULXJhrc9kuEDT8F7Pomwnv6+AyfxygsoMgIRcBMNg==", + "requires": { + "classnames": "^2.2.6", + "keycode": "^2.2.0", + "react-event-listener": "^0.6.4", + "react-text-mask": "=5.4.1", + "react-transition-group": "^2.5.0", + "tslib": "^1.9.3" + } + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -2451,6 +2469,14 @@ "warning": "^4.0.1" } }, + "react-text-mask": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/react-text-mask/-/react-text-mask-5.4.1.tgz", + "integrity": "sha512-mGx1n0x0skktwsKcpgAGnrgExFlXDflbWEHh8PC1UaQP8+EdHkW7JYczTghsBo2rnVwU9/4A9x/2bVt3HY46/w==", + "requires": { + "prop-types": "^15.5.6" + } + }, "react-transition-group": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.0.tgz", diff --git a/client/package.json b/client/package.json index de1fa9e82..a61a66e6f 100644 --- a/client/package.json +++ b/client/package.json @@ -22,6 +22,8 @@ "@material-ui/icons": "^3.0.1", "classnames": "^2.2.6", "graphql-tag": "^2.10.0", + "luxon": "^1.4.4", + "material-ui-pickers": "^1.0.1", "react": "^16.5.2", "react-apollo": "^2.2.4", "react-router-dom": "^4.3.1" diff --git a/client/src/index.js b/client/src/index.js index 2e4c0c8b6..a0212d5fd 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,6 +1,9 @@ import React, { Component } from 'react' import { Route, BrowserRouter, Switch } from 'react-router-dom' +import { MuiPickersUtilsProvider } from 'material-ui-pickers' +import LuxonUtils from 'material-ui-pickers/utils/luxon-utils' + import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' @@ -32,15 +35,17 @@ class App extends Component { loggedIn = '' } return ( - -
- {loggedIn} - - - - -
-
+ + +
+ {loggedIn} + + + + +
+
+
) } } From 3d3fb2fd2b213bfda3e57b48bba04e069ee10ac8 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 15:13:54 +0100 Subject: [PATCH 049/146] setting a cleaner form for event creation --- client/src/Components/HostedEvent/new.js | 83 +++++++++++++++--------- 1 file changed, 52 insertions(+), 31 deletions(-) diff --git a/client/src/Components/HostedEvent/new.js b/client/src/Components/HostedEvent/new.js index ad95e7bcf..1080dbbf1 100644 --- a/client/src/Components/HostedEvent/new.js +++ b/client/src/Components/HostedEvent/new.js @@ -1,22 +1,28 @@ import React from 'react' import { Mutation } from 'react-apollo' import { HOSTS_HOSTEVENT, HOSTS_EVENTSBYHOST } from './graphql' +import { DateTime } from 'luxon' -/* -import classNames from 'classnames' import { Button, TextField } from '@material-ui/core' -*/ +import { ChevronLeft, ChevronRight } from '@material-ui/icons' +import { DateTimePicker } from 'material-ui-pickers' class New extends React.Component { + constructor (props) { + super(props) + this.state = { + name: '', + description: '', + startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'), + finishDatetime: DateTime.local().plus({ days: 8 }).startOf('day') + } + } + render () { - let name - let description - let startDatetime - let finishDatetime - // const { classes } = this.props + const { name, description, startDatetime, finishDatetime } = this.state return ( { @@ -34,37 +40,52 @@ class New extends React.Component { onSubmit={e => { e.preventDefault() hostEvent({ variables: { - name: name.value, - description: description.value, - startDatetime: parseInt(startDatetime.value, 10), - finishDatetime: parseInt(finishDatetime.value, 10) + name: name, + description: description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: startDatetime.valueOf() / 1000 } }) this.props.handleNewEventClose() }} > - { - name = node - }} + this.setState({ name: e.target.value })} + fullWidth /> - { - description = node - }} + this.setState({ description: e.target.value })} + fullWidth /> - { - startDatetime = node - }} + } + rightArrowIcon={} + value={startDatetime} + onChange={(date) => this.setState({ startDatetime: date })} + helperText='Competition start date' /> - { - finishDatetime = node - }} + } + rightArrowIcon={} + value={finishDatetime} + onChange={(date) => this.setState({ finishDatetime: date })} + helperText='Competition finishing date' /> - +
this.clearTempStates()} />
From 0d82337a49bb28ad9bc44e3f67d1a13e00c1a5ab Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 16:12:02 +0100 Subject: [PATCH 050/146] renaming from new to New (2 step) renaming file (second step) . --- client/src/Components/HostedEvent/{new.js => New.js} | 0 client/src/Components/HostedEvent/index.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename client/src/Components/HostedEvent/{new.js => New.js} (100%) diff --git a/client/src/Components/HostedEvent/new.js b/client/src/Components/HostedEvent/New.js similarity index 100% rename from client/src/Components/HostedEvent/new.js rename to client/src/Components/HostedEvent/New.js diff --git a/client/src/Components/HostedEvent/index.js b/client/src/Components/HostedEvent/index.js index 323687de8..9b45f4a65 100644 --- a/client/src/Components/HostedEvent/index.js +++ b/client/src/Components/HostedEvent/index.js @@ -13,7 +13,7 @@ import { import { withStyles } from '@material-ui/core/styles' import styles from './styles' -import New from './new' +import New from './New' class HostedEvent extends React.Component { constructor (props) { From 35ee227fd20e92112314140e2bee34865a6e89d4 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 17:05:04 +0100 Subject: [PATCH 051/146] Minimal listing setup for you own competitions --- client/src/Components/HostedEvent/Event.js | 99 ++++++++++++++++++++ client/src/Components/HostedEvent/graphql.js | 5 + client/src/Components/HostedEvent/index.js | 5 +- 3 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 client/src/Components/HostedEvent/Event.js diff --git a/client/src/Components/HostedEvent/Event.js b/client/src/Components/HostedEvent/Event.js new file mode 100644 index 000000000..4f913c969 --- /dev/null +++ b/client/src/Components/HostedEvent/Event.js @@ -0,0 +1,99 @@ +import React from 'react' +import { Link } from 'react-router-dom' + +import { + Grid, Paper, + Typography, + Button +} from '@material-ui/core' +import { withStyles } from '@material-ui/core/styles' + +const styles = theme => ({ + root: { + flexGrow: 1, + padding: 20, + margin: 10 + }, + image: { + width: 128, + height: '100%', + cursor: 'default' + }, + img: { + margin: 'auto', + display: 'block', + maxWidth: '100%', + maxHeight: '100%' + + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } + +}) + +class Event extends React.Component { + render () { + const classes = this.props.classes + const { + name, + designator, + startDatetime, + finishDatetime, + hostId, + description + } = this.props.event + return ( + + + + {name} + From : {startDatetime} + To : {finishDatetime} + + + Hosted by: {hostId} + Formula: + First prize: + + + + + Description : + {description} + + + + + + + + + + ) + } +} + +export default withStyles(styles)(Event) diff --git a/client/src/Components/HostedEvent/graphql.js b/client/src/Components/HostedEvent/graphql.js index 83b5882ce..2c1c73859 100644 --- a/client/src/Components/HostedEvent/graphql.js +++ b/client/src/Components/HostedEvent/graphql.js @@ -2,6 +2,11 @@ import gql from 'graphql-tag' const fragments = ` name + designator + startDatetime + finishDatetime + hostId + description ` export const HOSTS_HOSTEVENT = gql` diff --git a/client/src/Components/HostedEvent/index.js b/client/src/Components/HostedEvent/index.js index 9b45f4a65..46b4d95f9 100644 --- a/client/src/Components/HostedEvent/index.js +++ b/client/src/Components/HostedEvent/index.js @@ -14,6 +14,7 @@ import { withStyles } from '@material-ui/core/styles' import styles from './styles' import New from './New' +import Event from './Event' class HostedEvent extends React.Component { constructor (props) { @@ -43,9 +44,7 @@ class HostedEvent extends React.Component { if (error) return `Error! ${error.message}` const list = data.hosts_EventsByHost.map((event, index) => { return ( -
- {event.name} -
+ ) }) return ( From b8591b79502bc212dffb41cc780d15aff8c1cb32 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 17:17:00 +0100 Subject: [PATCH 052/146] Using the host name instead of host ID --- client/src/Components/HostedEvent/Event.js | 4 ++-- client/src/Components/HostedEvent/graphql.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/Components/HostedEvent/Event.js b/client/src/Components/HostedEvent/Event.js index 4f913c969..2119f2075 100644 --- a/client/src/Components/HostedEvent/Event.js +++ b/client/src/Components/HostedEvent/Event.js @@ -44,7 +44,7 @@ class Event extends React.Component { designator, startDatetime, finishDatetime, - hostId, + host, description } = this.props.event return ( @@ -56,7 +56,7 @@ class Event extends React.Component { To : {finishDatetime} - Hosted by: {hostId} + Hosted by: {host.alias} ({host.lastName} {host.firstName}) Formula: First prize: diff --git a/client/src/Components/HostedEvent/graphql.js b/client/src/Components/HostedEvent/graphql.js index 2c1c73859..ac617d6a3 100644 --- a/client/src/Components/HostedEvent/graphql.js +++ b/client/src/Components/HostedEvent/graphql.js @@ -5,7 +5,11 @@ const fragments = ` designator startDatetime finishDatetime - hostId + host { + alias + firstName + lastName + } description ` From 8300b413a3907953ced659ae61f98a303cd3ae75 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 19:04:38 +0100 Subject: [PATCH 053/146] updating version and .env.example file on the server --- server/.env.example | 4 ---- server/package.json | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/.env.example b/server/.env.example index 3a1f15081..a96aeb926 100644 --- a/server/.env.example +++ b/server/.env.example @@ -3,10 +3,6 @@ DB_USERNAME=example_name DB_PASSWORD=example_password DB_DOMAIN=example.com:1234/example_name -AUTH0_DOMAIN=auth0-domain -AUTH0_AUDIENCE=auth0-audience -AUTH0_ISSUER=auth0-issuer - SENTRY_DNS=https://some-val@sentry.io/some-id TEAMS_ENDPOINT=https://teams-api.advancedalgos.net/graphql/ diff --git a/server/package.json b/server/package.json index 54abb1256..e3f4f664b 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "hosts-server", - "version": "0.0.1", + "version": "0.1.0", "description": "Advanced Algos Host backend API", "author": "", "license": "", From 9ece93bd64507660a054c0cc9557f588a0cdff42 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 29 Oct 2018 19:46:25 +0100 Subject: [PATCH 054/146] Removing unused packages --- client/package-lock.json | 853 +++++++++------------------------------ client/package.json | 1 - server/package-lock.json | 30 +- 3 files changed, 204 insertions(+), 680 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index cf10f29a6..76ab3adfe 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4,36 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@advancedalgos/web-components": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/@advancedalgos/web-components/-/web-components-0.0.13.tgz", - "integrity": "sha512-jXz2w/r08GX8uqB4UTDaow27T3juvR7Bk/80TWmDORVPNCPK152MEUBgxF161hAyOj1jdB+K4M1Fy5GkEpDhmw==", - "requires": { - "@azure/storage-blob": "^10.1.0-preview", - "@material-ui/core": "^3.2.2", - "@material-ui/icons": "^3.0.1", - "apollo-client": "^2.4.2", - "blob-util": "^2.0.2", - "browser-image-resizer": "^1.2.0", - "graphql": "^14.0.2", - "graphql-tag": "^2.9.2", - "prop-types": "^15.6.2", - "react-apollo": "^2.1.11", - "react-dropzone": "^5.1.0", - "react-image-crop": "^5.0.0", - "react-image-cropper": "^1.3.0" - } - }, - "@azure/storage-blob": { - "version": "10.1.0-preview", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-10.1.0-preview.tgz", - "integrity": "sha512-vKY4dF8VCRCOOQ03Z1ResyjZbWg4jPOnQtRtlSEKE6a7WwFE3EuIbhE7OQfEihuNYyE+XWLkTjrHxeHDFx1hFg==", - "requires": { - "events": "3.0.0", - "ms-rest-js": "0.22.425", - "tslib": "^1.9.3" - } - }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -150,9 +120,9 @@ } }, "@material-ui/core": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.2.2.tgz", - "integrity": "sha512-wDTJyR76+OBdlltiPs3lc1gD6zR+dSA6nITtgkBeLf1NvWfNotMWdvldIDnF3bu24ySAX9imfzDfkBu4Edtqww==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.3.2.tgz", + "integrity": "sha512-3yYGrWBzML7OhzmgwBvWpQnFq9ROWj+so+ULADB+lXjpOuxbUf8IUWbR4/S4chh+8/DTNMjTGIUdpj//XeubLQ==", "requires": { "@babel/runtime": "7.1.2", "@types/jss": "^9.5.6", @@ -214,62 +184,6 @@ } } }, - "@types/async": { - "version": "2.0.49", - "resolved": "http://registry.npmjs.org/@types/async/-/async-2.0.49.tgz", - "integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==", - "optional": true - }, - "@types/body-parser": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", - "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.32", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", - "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", - "requires": { - "@types/node": "*" - } - }, - "@types/events": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" - }, - "@types/express": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", - "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", - "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", - "requires": { - "@types/events": "*", - "@types/node": "*", - "@types/range-parser": "*" - } - }, - "@types/form-data": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", - "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", - "requires": { - "@types/node": "*" - } - }, "@types/jss": { "version": "9.5.7", "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.7.tgz", @@ -279,26 +193,11 @@ "indefinite-observable": "^1.0.1" } }, - "@types/mime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", - "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" - }, - "@types/node": { - "version": "9.6.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.35.tgz", - "integrity": "sha512-h5zvHS8wXHGa+Gcqs9K8vqCgOtqjr0+NqG/DDJmQIX1wpR9HivAfgV8bjcD3mGM4bPfQw5Aneb2Pn8355L83jA==" - }, "@types/prop-types": { "version": "15.5.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.5.6.tgz", "integrity": "sha512-ZBFR7TROLVzCkswA3Fmqq+IIJt62/T7aY/Dmz+QkU7CaW2QFqAitCE8Ups7IzmGhcN1YWMBT4Qcoc07jU9hOJQ==" }, - "@types/range-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", - "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" - }, "@types/react": { "version": "16.4.18", "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz", @@ -316,28 +215,6 @@ "@types/react": "*" } }, - "@types/serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", - "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" - } - }, - "@types/uuid": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz", - "integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==", - "requires": { - "@types/node": "*" - } - }, - "@types/zen-observable": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", - "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" - }, "acorn": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", @@ -384,59 +261,11 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { "color-convert": "^1.9.0" } }, - "apollo-cache": { - "version": "1.1.17", - "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.17.tgz", - "integrity": "sha512-7sp24n2HZO4vXgTaKNomLyIfGxG4gDdDkBB0jkRzRi7HhnKmfwhiF/RCiKNbgLdrPX151INdls0KwIVliD0dHQ==", - "requires": { - "apollo-utilities": "^1.0.21" - } - }, - "apollo-client": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.2.tgz", - "integrity": "sha512-g1z23umaVSoKLj9xNl0aAnk2KBF4JeBi7MeKFc9CGTixH7TkqeQUQtxcjrC7j2h4KmDbuhOAHOFUGf8YshN+ag==", - "requires": { - "@types/async": "2.0.49", - "@types/zen-observable": "^0.8.0", - "apollo-cache": "1.1.17", - "apollo-link": "^1.0.0", - "apollo-link-dedup": "^1.0.0", - "apollo-utilities": "1.0.21", - "symbol-observable": "^1.0.2", - "zen-observable": "^0.8.0" - } - }, - "apollo-link": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", - "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", - "requires": { - "apollo-utilities": "^1.0.0", - "zen-observable-ts": "^0.8.10" - } - }, - "apollo-link-dedup": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.10.tgz", - "integrity": "sha512-tpUI9lMZsidxdNygSY1FxflXEkUZnvKRkMUsXXuQUNoSLeNtEvUX7QtKRAl4k9ubLl8JKKc9X3L3onAFeGTK8w==", - "requires": { - "apollo-link": "^1.2.3" - } - }, - "apollo-utilities": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.21.tgz", - "integrity": "sha512-ZcxELlEl+sDCYBgEMdNXJAsZtRVm8wk4HIA58bMsqYfd1DSAJQEtZ93F0GZgYNAGy3QyaoBeZtbb0/01++G8JQ==", - "requires": { - "fast-json-stable-stringify": "^2.0.0", - "fclone": "^1.0.11" - } - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -446,11 +275,6 @@ "sprintf-js": "~1.0.2" } }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" - }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", @@ -461,16 +285,6 @@ "es-abstract": "^1.7.0" } }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=" - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" - }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -497,28 +311,6 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "attr-accept": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", - "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", - "requires": { - "core-js": "^2.5.0" - } - }, - "axios": { - "version": "0.18.0", - "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -589,17 +381,14 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "blob-util": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -610,15 +399,11 @@ "resolved": "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz", "integrity": "sha512-eI3yqf9YEqyGl9PCNTR46MGvDylGtaHjalcz6Q3fAPnP/PhpKkkve52vFdfGpwp4VUvK6LUr4TQN+2stCrEwTg==" }, - "browser-image-resizer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browser-image-resizer/-/browser-image-resizer-1.2.0.tgz", - "integrity": "sha512-xMiB6BnRsD6RWmkD6Av90qXY7uaAOXJPaS5D8cSazyao/bx6ENCm67XGl6BIhn1ETjK52yEs8A/atmMPp74M4A==" - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true }, "caller-path": { "version": "0.1.0", @@ -639,6 +424,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -686,6 +472,7 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "requires": { "color-name": "1.1.3" } @@ -693,20 +480,14 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "requires": { - "delayed-stream": "~1.0.0" - } + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "contains-path": { "version": "0.1.0", @@ -715,14 +496,15 @@ "dev": true }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "1.2.7", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" }, "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", @@ -750,11 +532,12 @@ "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "debug-log": { @@ -763,11 +546,6 @@ "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", "dev": true }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -783,6 +561,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -822,21 +601,8 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "rimraf": "^2.2.8" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -857,11 +623,6 @@ "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", "dev": true }, - "duplexer": { - "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" - }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -874,6 +635,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" } @@ -882,6 +644,7 @@ "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, "requires": { "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", @@ -894,6 +657,7 @@ "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", @@ -903,7 +667,8 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "eslint": { "version": "5.4.0", @@ -993,6 +758,12 @@ "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 } } }, @@ -1014,6 +785,12 @@ "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 } } }, @@ -1069,6 +846,12 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -1180,26 +963,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "event-stream": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz", - "integrity": "sha512-dGXNg4F/FgVzlApjzItL+7naHutA3fDqbV/zAZqDDlXTjiMnQmZKu+prImWKszeBM5UQeGvAl3u1wBiKeDh61g==", - "requires": { - "duplexer": "^0.1.1", - "flatmap-stream": "^0.1.0", - "from": "^0.1.7", - "map-stream": "0.0.7", - "pause-stream": "^0.0.11", - "split": "^1.0.1", - "stream-combiner": "^0.2.2", - "through": "^2.3.8" - } - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" - }, "external-editor": { "version": "2.2.0", "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", @@ -1220,7 +983,8 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -1240,13 +1004,6 @@ "promise": "^7.1.1", "setimmediate": "^1.0.5", "ua-parser-js": "^0.7.18" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - } } }, "fbjs-css-vars": { @@ -1254,11 +1011,6 @@ "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.1.tgz", "integrity": "sha512-IM+v/C40MNZWqsLErc32e0TyIk/NhkkQZL0QmjBh6zi1eXv0/GeVKmKmueQX7nn9SXQBQbTUcB8zuexIF3/88w==" }, - "fclone": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", - "integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=" - }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -1306,34 +1058,6 @@ "write": "^0.2.1" } }, - "flatmap-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", - "integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw==" - }, - "follow-redirects": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", - "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", - "requires": { - "debug": "=3.1.0" - } - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1343,7 +1067,8 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "functional-red-black-tree": { "version": "1.0.1", @@ -1399,28 +1124,13 @@ "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "graphql": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", - "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", - "requires": { - "iterall": "^1.2.2" - } + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true }, "graphql-tag": { "version": "2.10.0", @@ -1431,6 +1141,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -1447,12 +1158,14 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true }, "history": { "version": "4.7.2", @@ -1484,7 +1197,8 @@ "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true }, "hyphenate-style-name": { "version": "1.0.2", @@ -1567,17 +1281,14 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-builtin-module": { "version": "1.0.0", "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, "requires": { "builtin-modules": "^1.0.0" } @@ -1585,12 +1296,14 @@ "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true }, "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -1645,6 +1358,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, "requires": { "has": "^1.0.1" } @@ -1664,6 +1378,7 @@ "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" } @@ -1676,7 +1391,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", @@ -1692,11 +1408,6 @@ "whatwg-fetch": ">=0.10.0" } }, - "iterall": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", - "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1721,7 +1432,8 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -1735,11 +1447,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, "jss": { "version": "9.8.7", "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz", @@ -1839,13 +1546,14 @@ } }, "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=", + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", + "parse-json": "^2.2.0", + "pify": "^2.0.0", "strip-bom": "^3.0.0" } }, @@ -1896,11 +1604,6 @@ "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.4.4.tgz", "integrity": "sha512-M21p8nbKZRLqVnQ0XAhhCo+2Z3Z6+zm9tuogDMZ2vlkFkw8AREF+d5/abn8tz1/ycu4cemNlqcQcc7HqjhrpTw==" }, - "map-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", - "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" - }, "material-ui-pickers": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/material-ui-pickers/-/material-ui-pickers-1.0.1.tgz", @@ -1914,24 +1617,6 @@ "tslib": "^1.9.3" } }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, - "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" - }, - "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", - "requires": { - "mime-db": "~1.37.0" - } - }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -1951,6 +1636,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1971,26 +1657,10 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "ms-rest-js": { - "version": "0.22.425", - "resolved": "https://registry.npmjs.org/ms-rest-js/-/ms-rest-js-0.22.425.tgz", - "integrity": "sha512-PM9l0Si+T3kFxce8hwB/LlCxPJSHwSlFUSpjdJHzPvF+2w8lw7huE/FCPnRfdaUm7IikQESkJhydnbqX6g2OuQ==", - "requires": { - "@types/express": "^4.11.1", - "@types/form-data": "^2.2.1", - "@types/node": "^9.4.6", - "@types/uuid": "^3.4.3", - "axios": "^0.18.0", - "form-data": "^2.3.2", - "tough-cookie": "^2.4.3", - "tslib": "^1.9.2", - "uuid": "^3.2.1", - "xml2js": "^0.4.19" - } + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true }, "mute-stream": { "version": "0.0.7", @@ -2007,7 +1677,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 }, "node-fetch": { "version": "1.7.3", @@ -2022,6 +1693,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -2034,22 +1706,6 @@ "resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz", "integrity": "sha512-F9YMRls0zCF6BFIE2YnXDRpHPpfd91nOIaNdDgrx5YMoPLo8Wqj+6jNXHQsYBavJeXP4ww8HCt0xQAKc5qk2Fg==" }, - "npm-run-all": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.3.tgz", - "integrity": "sha512-aOG0N3Eo/WW+q6sUIdzcV2COS8VnTZCmdji0VQIAZF3b+a3YWb0AD0vFIyjKec18A7beLGbaQ5jFTNI2bPt9Cg==", - "requires": { - "ansi-styles": "^3.2.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.4", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "ps-tree": "^1.1.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - } - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -2058,7 +1714,8 @@ "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true }, "once": { "version": "1.4.0", @@ -2123,12 +1780,12 @@ "dev": true }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "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.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -2155,7 +1812,8 @@ "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", @@ -2172,25 +1830,19 @@ } }, "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, "requires": { - "pify": "^3.0.0" - } - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "requires": { - "through": "~2.3" + "pify": "^2.0.0" } }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true }, "pinkie": { "version": "2.0.4", @@ -2225,6 +1877,34 @@ "requires": { "locate-path": "^2.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=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^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=", + "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 } } }, @@ -2294,33 +1974,21 @@ "object-assign": "^4.1.1" } }, - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "requires": { - "event-stream": "~3.3.0" - } - }, - "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" - }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "react": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/react/-/react-16.5.2.tgz", - "integrity": "sha512-FDCSVd3DjVTmbEAjUNX6FgfAmQ+ypJfHUsqUJOYNCBUp1h8lqmtC+0mXJ+JjsWx4KAVTkk1vKd1hLQPvEviSuw==", + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.6.0.tgz", + "integrity": "sha512-zJPnx/jKtuOEXCbQ9BKaxDMxR0001/hzxXwYxG8septeyYGfsgAei6NgfbVgOhbY1WOP2o3VPs/E9HaN+9hV3Q==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "schedule": "^0.5.0" + "scheduler": "^0.10.0" } }, "react-apollo": { @@ -2336,6 +2004,11 @@ "prop-types": "^15.6.0" }, "dependencies": { + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, "fbjs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-1.0.0.tgz", @@ -2361,26 +2034,6 @@ } } }, - "react-dom": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.5.2.tgz", - "integrity": "sha512-RC8LDw8feuZOHVgzEf7f+cxBr/DnKdqp56VU0lAs1f4UfKc4cU8wU4fTq/mgnvynLQo8OtlPC19NUFh/zjZPuA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "schedule": "^0.5.0" - } - }, - "react-dropzone": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-5.1.1.tgz", - "integrity": "sha512-C9kXI3D95rVXbLLg9DvzCnmjplKwpfj/2F/MwvGVM05kDwWMzKVKZnmgZHZUebmiVj4mFOmBs2ObLiKvAxunGw==", - "requires": { - "attr-accept": "^1.1.3", - "prop-types": "^15.6.2" - } - }, "react-event-listener": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.4.tgz", @@ -2415,27 +2068,10 @@ "shallowequal": "^1.0.2" } }, - "react-image-crop": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/react-image-crop/-/react-image-crop-5.0.0.tgz", - "integrity": "sha512-MBT18tcHeEpmrhbSS6hx00MmfNgrnlhZuwY96cGRPhUmNeabxM7UBCcoU+oJCZXB0iGZk38zy/YGoZ4ELVp/LQ==" - }, - "react-image-cropper": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/react-image-cropper/-/react-image-cropper-1.3.0.tgz", - "integrity": "sha512-OPEMv66xXQdNsAixqxhlsSX3+D3KVRQMYc6YHmgGINeKx433xB9l04hMFynngPuUa+ChiKal6aQmbzpg79iJ+Q==", - "requires": { - "deep-extend": "^0.4.1", - "npm-run-all": "^4.1.1", - "prop-types": "^15.6.0", - "react": "^16.2.0", - "react-dom": "^16.2.0" - } - }, "react-is": { - "version": "16.5.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.5.2.tgz", - "integrity": "sha512-hSl7E6l25GTjNEZATqZIuWOgSnpXb3kD0DVCujmg46K5zLxsbiKaaT6VO9slkSBDPZfYs30lwfJwbOFOnoEnKQ==" + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.0.tgz", + "integrity": "sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -2489,13 +2125,14 @@ } }, "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, "requires": { - "load-json-file": "^4.0.0", + "load-json-file": "^2.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -2516,53 +2153,6 @@ "requires": { "locate-path": "^2.0.0" } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.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-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "http://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", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } } } }, @@ -2676,23 +2266,20 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "schedule": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz", - "integrity": "sha512-HUcJicG5Ou8xfR//c2rPT0lPIRR09vVvN81T9fqfVgBmhERUbDEQoYKjpBxbueJnCPpSu2ujXzOnRQt6x9o/jw==", + "scheduler": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.10.0.tgz", + "integrity": "sha512-+TSTVTCBAA3h8Anei3haDc1IRwMeDmtI/y/o3iBe3Mjl2vwYF9DtPDt929HyRmV/e7au7CLu8sc4C4W0VOs29w==", "requires": { + "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true }, "setimmediate": { "version": "1.0.5", @@ -2709,6 +2296,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" } @@ -2716,18 +2304,8 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true }, "signal-exit": { "version": "3.0.2", @@ -2754,6 +2332,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -2762,12 +2341,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" @@ -2776,15 +2357,8 @@ "spdx-license-ids": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" - }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "requires": { - "through": "2" - } + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true }, "sprintf-js": { "version": "1.0.3", @@ -2829,15 +2403,6 @@ } } }, - "stream-combiner": { - "version": "0.2.2", - "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", - "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", - "requires": { - "duplexer": "~0.1.1", - "through": "~2.3.4" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -2848,16 +2413,6 @@ "strip-ansi": "^4.0.0" } }, - "string.prototype.padend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", - "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.4.3", - "function-bind": "^1.0.2" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -2878,7 +2433,8 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true }, "strip-json-comments": { "version": "2.0.1", @@ -2890,6 +2446,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -2922,7 +2479,8 @@ "through": { "version": "2.3.8", "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "tmp": { "version": "0.0.33", @@ -2939,15 +2497,6 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, - "tough-cookie": { - "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==", - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -2969,9 +2518,9 @@ } }, "ua-parser-js": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", - "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" + "version": "0.7.19", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", + "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" }, "uniq": { "version": "1.0.1", @@ -2986,25 +2535,13 @@ "dev": true, "requires": { "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } } }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, "validate-npm-package-license": { "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" @@ -3032,6 +2569,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" } @@ -3057,38 +2595,11 @@ "mkdirp": "^0.5.1" } }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true - }, - "zen-observable": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.10.tgz", - "integrity": "sha512-UXEh0ekA/QWYI2NkLHc5IH0V1FstIN4qGVlVvq0DQAS3oR72mofYHkjJ2f4ysMKRAziwnACzg3c0ZuG+SMDu8w==" - }, - "zen-observable-ts": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", - "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", - "requires": { - "zen-observable": "^0.8.0" - } } } } diff --git a/client/package.json b/client/package.json index a61a66e6f..44309081a 100644 --- a/client/package.json +++ b/client/package.json @@ -17,7 +17,6 @@ "standard": "^12.0.1" }, "dependencies": { - "@advancedalgos/web-components": "0.0.13", "@material-ui/core": "^3.2.0", "@material-ui/icons": "^3.0.1", "classnames": "^2.2.6", diff --git a/server/package-lock.json b/server/package-lock.json index d98e7458a..ef36278b3 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,6 +1,6 @@ { "name": "hosts-server", - "version": "0.0.1", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1859,12 +1859,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1879,17 +1881,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2006,7 +2011,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2018,6 +2024,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2032,6 +2039,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2039,12 +2047,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2063,6 +2073,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2143,7 +2154,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2155,6 +2167,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2276,6 +2289,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", From 3d33b0f8bc31a848027f5a134ee65ac557e6e214 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 05:24:27 +0100 Subject: [PATCH 055/146] Adding missing dependency and contracting topbar import --- client/package-lock.json | 105 ++++++++++++++++++++++++-- client/package.json | 3 + client/src/Components/TopBar/index.js | 5 +- 3 files changed, 104 insertions(+), 9 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 76ab3adfe..01e8e63e4 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -184,6 +184,12 @@ } } }, + "@types/async": { + "version": "2.0.50", + "resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.50.tgz", + "integrity": "sha512-VMhZMMQgV1zsR+lX/0IBfAk+8Eb7dPVMWiQGFAt3qjo5x7Ml6b77jUo0e1C3ToD+XRDXqtrfw+6AB0uUsPEr3Q==", + "optional": true + }, "@types/jss": { "version": "9.5.7", "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.7.tgz", @@ -215,6 +221,11 @@ "@types/react": "*" } }, + "@types/zen-observable": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", + "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" + }, "acorn": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", @@ -266,6 +277,54 @@ "color-convert": "^1.9.0" } }, + "apollo-cache": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.19.tgz", + "integrity": "sha512-p163+GVne1Gyw2v9L5kHEQhUhih7btWvyUFOl4uKf7brieqd4tHZt8ZA3vT1SaXbCeQZNSp/tFI3yFyi8RPKzw==", + "requires": { + "apollo-utilities": "^1.0.24" + } + }, + "apollo-client": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.4.tgz", + "integrity": "sha512-i29w/+aa9O4fe8NxzJNOViHdsjpN2723Q2mNl0HiOJFwG+VjA4RXdTpyZHPZqcO8FwgK1k43l8nULD4Cdlx/Ww==", + "requires": { + "@types/async": "2.0.50", + "@types/zen-observable": "^0.8.0", + "apollo-cache": "1.1.19", + "apollo-link": "^1.0.0", + "apollo-link-dedup": "^1.0.0", + "apollo-utilities": "1.0.24", + "symbol-observable": "^1.0.2", + "zen-observable": "^0.8.0" + } + }, + "apollo-link": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", + "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", + "requires": { + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.10" + } + }, + "apollo-link-dedup": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.10.tgz", + "integrity": "sha512-tpUI9lMZsidxdNygSY1FxflXEkUZnvKRkMUsXXuQUNoSLeNtEvUX7QtKRAl4k9ubLl8JKKc9X3L3onAFeGTK8w==", + "requires": { + "apollo-link": "^1.2.3" + } + }, + "apollo-utilities": { + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.24.tgz", + "integrity": "sha512-cOXtrkio3wKfggp/zKCzQYxSZZRND/njNVmUksM1cckoJF3g/2o3bhh6z0HPhNhee8qzJzVXtl+3vmwXYGh0Gg==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -983,8 +1042,7 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fast-levenshtein": { "version": "2.0.6", @@ -1132,6 +1190,14 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, + "graphql": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", + "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", + "requires": { + "iterall": "^1.2.2" + } + }, "graphql-tag": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.0.tgz", @@ -1408,6 +1474,11 @@ "whatwg-fetch": ">=0.10.0" } }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2025,15 +2096,26 @@ } }, "hoist-non-react-statics": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.0.1.tgz", - "integrity": "sha512-1kXwPsOi0OGQIZNVMPvgWJ9tSnGMiMfJdihqEzrPEXlHOBh9AAHXX/QYmAJTXztnz/K+PQ8ryCb4eGaN6HlGbQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz", + "integrity": "sha512-MYcYuROh7SBM69xHGqXEwQqDux34s9tz+sCnxJmN18kgWh6JFdTw/5YdZtqsOdZJXddE/wUpCzfEdDrJj8p0Iw==", "requires": { "react-is": "^16.3.2" } } } }, + "react-dom": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.0.tgz", + "integrity": "sha512-Stm2D9dXEUUAQdvpvhvFj/DEXwC2PAL/RwEMhoN4dvvD2ikTlJegEXf97xryg88VIAU22ZAP7n842l+9BTz6+w==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.10.0" + } + }, "react-event-listener": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.4.tgz", @@ -2600,6 +2682,19 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true + }, + "zen-observable": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.10.tgz", + "integrity": "sha512-UXEh0ekA/QWYI2NkLHc5IH0V1FstIN4qGVlVvq0DQAS3oR72mofYHkjJ2f4ysMKRAziwnACzg3c0ZuG+SMDu8w==" + }, + "zen-observable-ts": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", + "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", + "requires": { + "zen-observable": "^0.8.0" + } } } } diff --git a/client/package.json b/client/package.json index 44309081a..9d800caa2 100644 --- a/client/package.json +++ b/client/package.json @@ -19,12 +19,15 @@ "dependencies": { "@material-ui/core": "^3.2.0", "@material-ui/icons": "^3.0.1", + "apollo-client": "^2.4.4", "classnames": "^2.2.6", + "graphql": "^14.0.2", "graphql-tag": "^2.10.0", "luxon": "^1.4.4", "material-ui-pickers": "^1.0.1", "react": "^16.5.2", "react-apollo": "^2.2.4", + "react-dom": "^16.6.0", "react-router-dom": "^4.3.1" } } diff --git a/client/src/Components/TopBar/index.js b/client/src/Components/TopBar/index.js index 768485f37..06fe761f6 100644 --- a/client/src/Components/TopBar/index.js +++ b/client/src/Components/TopBar/index.js @@ -2,10 +2,7 @@ import React from 'react' import { Link } from 'react-router-dom' import classNames from 'classnames' -import AppBar from '@material-ui/core/AppBar' -import Toolbar from '@material-ui/core/Toolbar' -import Typography from '@material-ui/core/Typography' -import Button from '@material-ui/core/Button' +import { AppBar, Toolbar, Typography, Button } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import datas from './data' From dc10e4d629bcc47cd3ab158835b43f179fd267a4 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 05:47:12 +0100 Subject: [PATCH 056/146] Auto redirect to edit page after event creation --- client/src/Components/HostedEvent/New.js | 2 +- client/src/Components/HostedEvent/index.js | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/client/src/Components/HostedEvent/New.js b/client/src/Components/HostedEvent/New.js index 1080dbbf1..9c8ceec45 100644 --- a/client/src/Components/HostedEvent/New.js +++ b/client/src/Components/HostedEvent/New.js @@ -31,6 +31,7 @@ class New extends React.Component { query: HOSTS_EVENTSBYHOST, data: { hosts_EventsByHost: hostedEvents.concat([data.hosts_HostEvent]) } }) + this.props.handleNewEvent(data.hosts_HostEvent) } } > @@ -45,7 +46,6 @@ class New extends React.Component { startDatetime: startDatetime.valueOf() / 1000, finishDatetime: startDatetime.valueOf() / 1000 } }) - this.props.handleNewEventClose() }} > { - this.setState({ isNewEventOpen: true }) - }; - - handleNewEventClose = () => { - this.setState({ isNewEventOpen: false }) + handleNewEvent = (event) => { + this.props.history.push(`/${event.designator}`) }; render () { @@ -58,12 +54,12 @@ class HostedEvent extends React.Component { { this.setState({ isNewEventOpen: false }) }} aria-labelledby='addEvent-dialog-title' > @@ -73,7 +69,7 @@ class HostedEvent extends React.Component { Here you will add just the minimal information, will be settable in the edit page of your event. - + From 2387af92762aa0abd55d1d7fd86a0d66ec8e4349 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 05:55:50 +0100 Subject: [PATCH 057/146] Adding a query to get a single Event using a designator --- server/src/schema/queries/Event.js | 35 ++++++++++++++++++++++++++++++ server/src/schema/queries/index.js | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 server/src/schema/queries/Event.js diff --git a/server/src/schema/queries/Event.js b/server/src/schema/queries/Event.js new file mode 100644 index 000000000..64eee0855 --- /dev/null +++ b/server/src/schema/queries/Event.js @@ -0,0 +1,35 @@ +import { + GraphQLNonNull, + GraphQLID +} from 'graphql' +import { DatabaseError } from '../../errors' +import { EventType } from '../types' +import { Event } from '../../models' + +const args = { + designator: { type: new GraphQLNonNull(GraphQLID) } +} + +const resolve = (parent, { designator }, context) => { + return new Promise((resolve, reject) => { + Event.findOne({ designator }).exec((err, event) => { + if (err) { + reject(err) + } else if (!event) { + reject(new DatabaseError('None of the events respond to that designator')) + } else { + resolve(event) + } + }) + }) +} + +const query = { + event: { + type: EventType, + args, + resolve + } +} + +export default query diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js index 71aef39df..5d67c43bb 100644 --- a/server/src/schema/queries/index.js +++ b/server/src/schema/queries/index.js @@ -2,6 +2,7 @@ import { GraphQLObjectType } from 'graphql' +import EventQuery from './Event' import EventsQuery from './Events' import EventsByHostQuery from './EventsByHost' import EventsByTeamQuery from './EventsByTeam' @@ -11,6 +12,7 @@ import PlottersQuery from './Plotters' const RootQuery = new GraphQLObjectType({ name: 'RootQueryType', fields: Object.assign( + EventQuery, EventsQuery, EventsByHostQuery, EventsByTeamQuery, From 4420b63db00480007ba9bb624046197ac1860efb Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 06:16:33 +0100 Subject: [PATCH 058/146] a bit of renaming for better paths --- client/src/Components/{HostedEvent => HostedEvents}/Event.js | 2 +- client/src/Components/{HostedEvent => HostedEvents}/New.js | 0 .../src/Components/{HostedEvent => HostedEvents}/graphql.js | 0 client/src/Components/{HostedEvent => HostedEvents}/index.js | 2 +- client/src/Components/{HostedEvent => HostedEvents}/styles.js | 0 client/src/index.js | 4 ++-- 6 files changed, 4 insertions(+), 4 deletions(-) rename client/src/Components/{HostedEvent => HostedEvents}/Event.js (97%) rename client/src/Components/{HostedEvent => HostedEvents}/New.js (100%) rename client/src/Components/{HostedEvent => HostedEvents}/graphql.js (100%) rename client/src/Components/{HostedEvent => HostedEvents}/index.js (97%) rename client/src/Components/{HostedEvent => HostedEvents}/styles.js (100%) diff --git a/client/src/Components/HostedEvent/Event.js b/client/src/Components/HostedEvents/Event.js similarity index 97% rename from client/src/Components/HostedEvent/Event.js rename to client/src/Components/HostedEvents/Event.js index 2119f2075..383efc3c5 100644 --- a/client/src/Components/HostedEvent/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -73,7 +73,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/hosted-events/' + designator} + to={`/event/${designator}/edit`} > Edit diff --git a/client/src/Components/HostedEvent/New.js b/client/src/Components/HostedEvents/New.js similarity index 100% rename from client/src/Components/HostedEvent/New.js rename to client/src/Components/HostedEvents/New.js diff --git a/client/src/Components/HostedEvent/graphql.js b/client/src/Components/HostedEvents/graphql.js similarity index 100% rename from client/src/Components/HostedEvent/graphql.js rename to client/src/Components/HostedEvents/graphql.js diff --git a/client/src/Components/HostedEvent/index.js b/client/src/Components/HostedEvents/index.js similarity index 97% rename from client/src/Components/HostedEvent/index.js rename to client/src/Components/HostedEvents/index.js index dcc1c3ae4..08ef6829f 100644 --- a/client/src/Components/HostedEvent/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -25,7 +25,7 @@ class HostedEvent extends React.Component { } handleNewEvent = (event) => { - this.props.history.push(`/${event.designator}`) + this.props.history.push(`/event/${event.designator}/edit`) }; render () { diff --git a/client/src/Components/HostedEvent/styles.js b/client/src/Components/HostedEvents/styles.js similarity index 100% rename from client/src/Components/HostedEvent/styles.js rename to client/src/Components/HostedEvents/styles.js diff --git a/client/src/index.js b/client/src/index.js index a0212d5fd..c8ab94cbd 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -8,7 +8,7 @@ import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' import Search from './Components/Search' -import HostedEvent from './Components/HostedEvent' +import HostedEvents from './Components/HostedEvents' class App extends Component { constructor (props) { @@ -41,7 +41,7 @@ class App extends Component { {loggedIn} - +
From 3189e5b27f5b4641a0adaa1c81d4f4418bdb5e18 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 06:25:29 +0100 Subject: [PATCH 059/146] Setting up a query to get information for edit page --- client/src/Components/Event/Edit/index.js | 58 ++++++++++++++++++++++ client/src/Components/Event/Edit/styles.js | 4 ++ client/src/index.js | 2 + 3 files changed, 64 insertions(+) create mode 100644 client/src/Components/Event/Edit/index.js create mode 100644 client/src/Components/Event/Edit/styles.js diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js new file mode 100644 index 000000000..0bc8a1cf6 --- /dev/null +++ b/client/src/Components/Event/Edit/index.js @@ -0,0 +1,58 @@ +import React from 'react' +import gql from 'graphql-tag' +import { Query } from 'react-apollo' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import styles from './styles' + +const HOSTS_EVENT = gql` + query Hosts_Event($designator: ID!){ + hosts_Event(designator: $designator) { + name + designator + startDatetime + finishDatetime + host { + alias + firstName + lastName + } + description + } + } +` + +class Edit extends React.Component { + render () { + return ( + + + Enroll in an competition {this.props.match.params.slug} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + return ( +

+ {data.hosts_Event.description} +

+ ) + }} +
+
+ ) + } +} + +export default withStyles(styles)(Edit) diff --git a/client/src/Components/Event/Edit/styles.js b/client/src/Components/Event/Edit/styles.js new file mode 100644 index 000000000..175dc52e5 --- /dev/null +++ b/client/src/Components/Event/Edit/styles.js @@ -0,0 +1,4 @@ +const styles = theme => ({ +}) + +export default styles diff --git a/client/src/index.js b/client/src/index.js index c8ab94cbd..a03f99fe7 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -9,6 +9,7 @@ import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' import Search from './Components/Search' import HostedEvents from './Components/HostedEvents' +import EditEvent from './Components/Event/Edit' class App extends Component { constructor (props) { @@ -41,6 +42,7 @@ class App extends Component { {loggedIn} + From 70d1f20eced11f52fda85f8fcbc10f7c70af071c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 07:54:20 +0100 Subject: [PATCH 060/146] Refactoring graphQL with fragments --- client/src/Components/Event/Edit/index.js | 20 +----- .../Calls/hostedEvents.js} | 28 ++++----- client/src/Components/GraphQL/Calls/index.js | 7 +++ .../src/Components/GraphQL/Calls/showEvent.js | 15 +++++ .../src/Components/GraphQL/Fragments/event.js | 61 +++++++++++++++++++ .../src/Components/GraphQL/Fragments/index.js | 9 +++ client/src/Components/HostedEvents/New.js | 8 +-- client/src/Components/HostedEvents/index.js | 5 +- 8 files changed, 112 insertions(+), 41 deletions(-) rename client/src/Components/{HostedEvents/graphql.js => GraphQL/Calls/hostedEvents.js} (56%) create mode 100644 client/src/Components/GraphQL/Calls/index.js create mode 100644 client/src/Components/GraphQL/Calls/showEvent.js create mode 100644 client/src/Components/GraphQL/Fragments/event.js create mode 100644 client/src/Components/GraphQL/Fragments/index.js diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 0bc8a1cf6..d705b7e60 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -1,5 +1,4 @@ import React from 'react' -import gql from 'graphql-tag' import { Query } from 'react-apollo' import Typography from '@material-ui/core/Typography' @@ -7,22 +6,7 @@ import { withStyles } from '@material-ui/core/styles' import styles from './styles' -const HOSTS_EVENT = gql` - query Hosts_Event($designator: ID!){ - hosts_Event(designator: $designator) { - name - designator - startDatetime - finishDatetime - host { - alias - firstName - lastName - } - description - } - } -` +import { showEventCalls } from '../../GraphQL/Calls/index' class Edit extends React.Component { render () { @@ -37,7 +21,7 @@ class Edit extends React.Component { Enroll in an competition {this.props.match.params.slug} {({ loading, error, data }) => { diff --git a/client/src/Components/HostedEvents/graphql.js b/client/src/Components/GraphQL/Calls/hostedEvents.js similarity index 56% rename from client/src/Components/HostedEvents/graphql.js rename to client/src/Components/GraphQL/Calls/hostedEvents.js index ac617d6a3..850290690 100644 --- a/client/src/Components/HostedEvents/graphql.js +++ b/client/src/Components/GraphQL/Calls/hostedEvents.js @@ -1,29 +1,23 @@ import gql from 'graphql-tag' +import { eventMinimalInfo } from '../Fragments' -const fragments = ` - name - designator - startDatetime - finishDatetime - host { - alias - firstName - lastName - } - description -` - -export const HOSTS_HOSTEVENT = gql` +const HOSTS_HOSTEVENT = gql` mutation Hosts_HostEvent($name: String!, $description: String!, $startDatetime: Int!, $finishDatetime: Int!) { hosts_HostEvent(name: $name, description: $description, startDatetime: $startDatetime, finishDatetime: $finishDatetime) { - ${fragments} + ...EventMinimalInfo } } + ${eventMinimalInfo} ` -export const HOSTS_EVENTSBYHOST = gql` +const HOSTS_EVENTSBYHOST = gql` query Hosts_EventsByHost{ hosts_EventsByHost { - ${fragments} + ...EventMinimalInfo } } + ${eventMinimalInfo} ` +export default { + HOSTS_HOSTEVENT, + HOSTS_EVENTSBYHOST +} diff --git a/client/src/Components/GraphQL/Calls/index.js b/client/src/Components/GraphQL/Calls/index.js new file mode 100644 index 000000000..953d0edfb --- /dev/null +++ b/client/src/Components/GraphQL/Calls/index.js @@ -0,0 +1,7 @@ +import hostedEventsCalls from './hostedEvents' +import showEventCalls from './showEvent' + +export { + hostedEventsCalls, + showEventCalls +} diff --git a/client/src/Components/GraphQL/Calls/showEvent.js b/client/src/Components/GraphQL/Calls/showEvent.js new file mode 100644 index 000000000..1f06bf226 --- /dev/null +++ b/client/src/Components/GraphQL/Calls/showEvent.js @@ -0,0 +1,15 @@ +import gql from 'graphql-tag' +import { eventFullInfo } from '../Fragments' + +const HOSTS_EVENT = gql` + query Hosts_Event($designator: ID!) { + hosts_Event(designator: $designator) { + ...EventFullInfo + } + } + ${eventFullInfo} +` + +export default { + HOSTS_EVENT +} diff --git a/client/src/Components/GraphQL/Fragments/event.js b/client/src/Components/GraphQL/Fragments/event.js new file mode 100644 index 000000000..3b5f3c3ac --- /dev/null +++ b/client/src/Components/GraphQL/Fragments/event.js @@ -0,0 +1,61 @@ +import gql from 'graphql-tag' + +export const eventMinimalInfo = gql` + fragment EventMinimalInfo on hosts_Event { + name + designator + startDatetime + finishDatetime + host { + alias + firstName + lastName + } + description + } +` + +export const eventFullInfo = gql` + fragment EventFullInfo on hosts_Event { + designator + name + host{ + alias + firstName + lastName + } + description + startDatetime + finishDatetime + formula{ + name + } + plotter{ + name + host + repo + moduleName + } + rules{ + position + title + description + } + participants{ + team{ + name + } + botId + releaseId + } + prizes{ + rank + amount + additional{ + condition + amount + asset + } + } + } +` diff --git a/client/src/Components/GraphQL/Fragments/index.js b/client/src/Components/GraphQL/Fragments/index.js new file mode 100644 index 000000000..93d8f9971 --- /dev/null +++ b/client/src/Components/GraphQL/Fragments/index.js @@ -0,0 +1,9 @@ +import { + eventMinimalInfo, + eventFullInfo +} from './event' + +export { + eventMinimalInfo, + eventFullInfo +} diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/HostedEvents/New.js index 9c8ceec45..1a574aa50 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/HostedEvents/New.js @@ -1,6 +1,6 @@ import React from 'react' import { Mutation } from 'react-apollo' -import { HOSTS_HOSTEVENT, HOSTS_EVENTSBYHOST } from './graphql' +import { hostedEventsCalls } from '../GraphQL/Calls/index' import { DateTime } from 'luxon' import { @@ -24,11 +24,11 @@ class New extends React.Component { render () { const { name, description, startDatetime, finishDatetime } = this.state return ( - { - const { hosts_EventsByHost: hostedEvents } = store.readQuery({ query: HOSTS_EVENTSBYHOST }) + const { hosts_EventsByHost: hostedEvents } = store.readQuery({ query: hostedEventsCalls.HOSTS_EVENTSBYHOST }) store.writeQuery({ - query: HOSTS_EVENTSBYHOST, + query: hostedEventsCalls.HOSTS_EVENTSBYHOST, data: { hosts_EventsByHost: hostedEvents.concat([data.hosts_HostEvent]) } }) this.props.handleNewEvent(data.hosts_HostEvent) diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index 08ef6829f..acb777684 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -1,6 +1,5 @@ import React from 'react' import { Query } from 'react-apollo' -import { HOSTS_EVENTSBYHOST } from './graphql' import { Button, @@ -13,6 +12,8 @@ import { import { withStyles } from '@material-ui/core/styles' import styles from './styles' +import { hostedEventsCalls } from '../GraphQL/Calls/index' + import New from './New' import Event from './Event' @@ -33,7 +34,7 @@ class HostedEvent extends React.Component { return ( {({ loading, error, data }) => { if (loading) return 'Loading...' From 2e4f3c253a2ae5404f02379624520902ff64e396 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 07:55:54 +0100 Subject: [PATCH 061/146] Moving the GraphQL folder one directory higher --- client/src/Components/Event/Edit/index.js | 2 +- client/src/Components/HostedEvents/New.js | 2 +- client/src/Components/HostedEvents/index.js | 2 +- client/src/{Components => }/GraphQL/Calls/hostedEvents.js | 0 client/src/{Components => }/GraphQL/Calls/index.js | 0 client/src/{Components => }/GraphQL/Calls/showEvent.js | 0 client/src/{Components => }/GraphQL/Fragments/event.js | 0 client/src/{Components => }/GraphQL/Fragments/index.js | 0 8 files changed, 3 insertions(+), 3 deletions(-) rename client/src/{Components => }/GraphQL/Calls/hostedEvents.js (100%) rename client/src/{Components => }/GraphQL/Calls/index.js (100%) rename client/src/{Components => }/GraphQL/Calls/showEvent.js (100%) rename client/src/{Components => }/GraphQL/Fragments/event.js (100%) rename client/src/{Components => }/GraphQL/Fragments/index.js (100%) diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index d705b7e60..803c9e2cc 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -6,7 +6,7 @@ import { withStyles } from '@material-ui/core/styles' import styles from './styles' -import { showEventCalls } from '../../GraphQL/Calls/index' +import { showEventCalls } from '../../../GraphQL/Calls/index' class Edit extends React.Component { render () { diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/HostedEvents/New.js index 1a574aa50..f5567122d 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/HostedEvents/New.js @@ -1,6 +1,6 @@ import React from 'react' import { Mutation } from 'react-apollo' -import { hostedEventsCalls } from '../GraphQL/Calls/index' +import { hostedEventsCalls } from '../../GraphQL/Calls/index' import { DateTime } from 'luxon' import { diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index acb777684..ad9a37244 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -12,7 +12,7 @@ import { import { withStyles } from '@material-ui/core/styles' import styles from './styles' -import { hostedEventsCalls } from '../GraphQL/Calls/index' +import { hostedEventsCalls } from '../../GraphQL/Calls/index' import New from './New' import Event from './Event' diff --git a/client/src/Components/GraphQL/Calls/hostedEvents.js b/client/src/GraphQL/Calls/hostedEvents.js similarity index 100% rename from client/src/Components/GraphQL/Calls/hostedEvents.js rename to client/src/GraphQL/Calls/hostedEvents.js diff --git a/client/src/Components/GraphQL/Calls/index.js b/client/src/GraphQL/Calls/index.js similarity index 100% rename from client/src/Components/GraphQL/Calls/index.js rename to client/src/GraphQL/Calls/index.js diff --git a/client/src/Components/GraphQL/Calls/showEvent.js b/client/src/GraphQL/Calls/showEvent.js similarity index 100% rename from client/src/Components/GraphQL/Calls/showEvent.js rename to client/src/GraphQL/Calls/showEvent.js diff --git a/client/src/Components/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js similarity index 100% rename from client/src/Components/GraphQL/Fragments/event.js rename to client/src/GraphQL/Fragments/event.js diff --git a/client/src/Components/GraphQL/Fragments/index.js b/client/src/GraphQL/Fragments/index.js similarity index 100% rename from client/src/Components/GraphQL/Fragments/index.js rename to client/src/GraphQL/Fragments/index.js From 323835834c93245e326f4158ec0183a37a6ecce9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 08:14:05 +0100 Subject: [PATCH 062/146] Adding a path and components for a show page --- client/src/Components/Event/Show/index.js | 42 ++++++++++++++++++++++ client/src/Components/Event/Show/styles.js | 4 +++ client/src/index.js | 1 + 3 files changed, 47 insertions(+) create mode 100644 client/src/Components/Event/Show/index.js create mode 100644 client/src/Components/Event/Show/styles.js diff --git a/client/src/Components/Event/Show/index.js b/client/src/Components/Event/Show/index.js new file mode 100644 index 000000000..d0e89c9d6 --- /dev/null +++ b/client/src/Components/Event/Show/index.js @@ -0,0 +1,42 @@ +import React from 'react' +import { Query } from 'react-apollo' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import styles from './styles' + +import { showEventCalls } from '../../../GraphQL/Calls/index' + +class Show extends React.Component { + render () { + return ( + + + Enroll in an competition {this.props.match.params.slug} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + return ( +

+ {data.hosts_Event.description} +

+ ) + }} +
+
+ ) + } +} + +export default withStyles(styles)(Show) diff --git a/client/src/Components/Event/Show/styles.js b/client/src/Components/Event/Show/styles.js new file mode 100644 index 000000000..175dc52e5 --- /dev/null +++ b/client/src/Components/Event/Show/styles.js @@ -0,0 +1,4 @@ +const styles = theme => ({ +}) + +export default styles diff --git a/client/src/index.js b/client/src/index.js index a03f99fe7..dcaad35f6 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -43,6 +43,7 @@ class App extends Component { + From 7c43c402e2294d042a22349ad40c9ace7d9f234c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 08:19:44 +0100 Subject: [PATCH 063/146] Adding a route and component to list your competitions --- client/src/Components/Events/index.js | 9 +++++++++ client/src/index.js | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 client/src/Components/Events/index.js diff --git a/client/src/Components/Events/index.js b/client/src/Components/Events/index.js new file mode 100644 index 000000000..96d83a55d --- /dev/null +++ b/client/src/Components/Events/index.js @@ -0,0 +1,9 @@ +import React from 'react' + +class Index extends React.Component { + render () { + return

Here will come a list the competitions you applied for

+ } +} + +export default Index diff --git a/client/src/index.js b/client/src/index.js index dcaad35f6..245f4fa01 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -8,6 +8,7 @@ import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' import Search from './Components/Search' +import Events from './Components/Events' import HostedEvents from './Components/HostedEvents' import EditEvent from './Components/Event/Edit' @@ -42,6 +43,7 @@ class App extends Component { {loggedIn} + From b3944f5e22ea291de4bdab37d42f1fffc9cabab8 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 12:54:16 +0100 Subject: [PATCH 064/146] Making a minimal list page --- client/src/Components/HostedEvents/Event.js | 2 +- client/src/Components/Search/Competition.js | 124 -------------------- client/src/Components/Search/Event.js | 89 ++++++++++++++ client/src/Components/Search/index.js | 35 ++---- client/src/GraphQL/Calls/index.js | 2 + client/src/GraphQL/Calls/listEvents.js | 14 +++ 6 files changed, 114 insertions(+), 152 deletions(-) delete mode 100644 client/src/Components/Search/Competition.js create mode 100644 client/src/Components/Search/Event.js create mode 100644 client/src/GraphQL/Calls/listEvents.js diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 383efc3c5..e222c7731 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -83,7 +83,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/events/' + designator} + to={'/event/' + designator} > Show diff --git a/client/src/Components/Search/Competition.js b/client/src/Components/Search/Competition.js deleted file mode 100644 index bccb5df88..000000000 --- a/client/src/Components/Search/Competition.js +++ /dev/null @@ -1,124 +0,0 @@ -import React from 'react' - -import { toLocalTime } from '../../utils' - -import { - Grid, Paper, Typography, Button, - Dialog, DialogContent, DialogContentText, DialogTitle -} from '@material-ui/core' -import { withStyles } from '@material-ui/core/styles' - -const styles = theme => ({ - root: { - flexGrow: 1, - padding: 20, - margin: 10 - }, - image: { - width: 128, - height: '100%', - cursor: 'default' - }, - img: { - margin: 'auto', - display: 'block', - maxWidth: '100%', - maxHeight: '100%' - - }, - buttonList: { - margin: theme.spacing.unit, - float: 'right' - }, - buttonGrid: { - marginTop: -20 - } - -}) - -class Competition extends React.Component { - render () { - const classes = this.props.classes - const { displayName, - startDatetime, - finishDatetime, - host, - description, - formula, - prizes - } = this.props.competition - const firstPrice = prizes.find(prize => { - return prize.position === 1 - }) - return ( - - - - { displayName } - From : {toLocalTime(startDatetime)} - To : {toLocalTime(finishDatetime)} - - - Hosted by: { host } - Formula: { formula } - First prize: { firstPrice ? firstPrice.algoPrize + ' ALGOS' : 'none' } - - - - - Description : - { description } - - - - - - - - - Edit Key - - - - You will need to complete this form with the information from - the exchange. - - -

some stuff

- -
-
- - - - Audit Log History - - -

some stuff

-
-
-
-
-
-
-
- ) - } -} -export default withStyles(styles)(Competition) diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js new file mode 100644 index 000000000..756bac3d8 --- /dev/null +++ b/client/src/Components/Search/Event.js @@ -0,0 +1,89 @@ +import React from 'react' +import { Link } from 'react-router-dom' + +import { + Grid, Paper, + Typography, + Button +} from '@material-ui/core' +import { withStyles } from '@material-ui/core/styles' + +const styles = theme => ({ + root: { + flexGrow: 1, + padding: 20, + margin: 10 + }, + image: { + width: 128, + height: '100%', + cursor: 'default' + }, + img: { + margin: 'auto', + display: 'block', + maxWidth: '100%', + maxHeight: '100%' + + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } + +}) + +class Event extends React.Component { + render () { + const classes = this.props.classes + const { + name, + designator, + startDatetime, + finishDatetime, + host, + description + } = this.props.event + return ( + + + + {name} + From : {startDatetime} + To : {finishDatetime} + + + Hosted by: {host.alias} ({host.lastName} {host.firstName}) + Formula: + First prize: + + + + + Description : + {description} + + + + + + + + + ) + } +} + +export default withStyles(styles)(Event) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 7c46f096e..a459ca9d4 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -1,33 +1,14 @@ import React from 'react' -import gql from 'graphql-tag' import { Query } from 'react-apollo' -import Typography from '@material-ui/core/Typography' +import { Typography } from '@material-ui/core' + import { withStyles } from '@material-ui/core/styles' - -import Competition from './Competition' - import styles from './styles' -const HOST_COMPETITIONS = gql` - query Hosts_Competitions{ - hosts_Competitions { - displayName - host - startDatetime - finishDatetime - description - formula - participants { - devTeam - } - prizes { - position - algoPrize - } - } - } -` +import { listEventsCalls } from '../../GraphQL/Calls/index' + +import Event from './Event' class Search extends React.Component { render () { @@ -42,14 +23,14 @@ class Search extends React.Component { Enroll in an competition {({ loading, error, data }) => { if (loading) return 'Loading...' if (error) return `Error! ${error.message}` - const list = data.hosts_Competitions.map((competition, index) => { + const list = data.hosts_Events.map((event, index) => { return ( - + ) }) return ( diff --git a/client/src/GraphQL/Calls/index.js b/client/src/GraphQL/Calls/index.js index 953d0edfb..d3fe57c6d 100644 --- a/client/src/GraphQL/Calls/index.js +++ b/client/src/GraphQL/Calls/index.js @@ -1,7 +1,9 @@ import hostedEventsCalls from './hostedEvents' +import listEventsCalls from './listEvents' import showEventCalls from './showEvent' export { hostedEventsCalls, + listEventsCalls, showEventCalls } diff --git a/client/src/GraphQL/Calls/listEvents.js b/client/src/GraphQL/Calls/listEvents.js new file mode 100644 index 000000000..39084f491 --- /dev/null +++ b/client/src/GraphQL/Calls/listEvents.js @@ -0,0 +1,14 @@ +import gql from 'graphql-tag' +import { eventMinimalInfo } from '../Fragments' + +const HOSTS_EVENTS = gql` + query Hosts_Events{ + hosts_Events { + ...EventMinimalInfo + } + } + ${eventMinimalInfo} +` +export default { + HOSTS_EVENTS +} From 9c39f278f5244603b588c2afcf2158e8ac913dd1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 12:55:05 +0100 Subject: [PATCH 065/146] Removing useless style --- client/src/Components/HostedEvents/styles.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/src/Components/HostedEvents/styles.js b/client/src/Components/HostedEvents/styles.js index 382437a4b..175dc52e5 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/client/src/Components/HostedEvents/styles.js @@ -1,10 +1,4 @@ - const styles = theme => ({ - centered: { - display: 'block', - marginLeft: 'auto', - marginRight: 'auto' - } }) export default styles From 943b67a4f95974ab5bb59d667c98270dfcfdfb40 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 13:03:29 +0100 Subject: [PATCH 066/146] Adding margins to card styles --- client/src/Components/HostedEvents/Event.js | 31 ++------------------ client/src/Components/HostedEvents/styles.js | 15 ++++++++++ client/src/Components/Search/Event.js | 31 ++------------------ client/src/Components/Search/styles.js | 15 ++++++++++ 4 files changed, 34 insertions(+), 58 deletions(-) diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index e222c7731..24833190c 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -7,34 +7,7 @@ import { Button } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' - -const styles = theme => ({ - root: { - flexGrow: 1, - padding: 20, - margin: 10 - }, - image: { - width: 128, - height: '100%', - cursor: 'default' - }, - img: { - margin: 'auto', - display: 'block', - maxWidth: '100%', - maxHeight: '100%' - - }, - buttonList: { - margin: theme.spacing.unit, - float: 'right' - }, - buttonGrid: { - marginTop: -20 - } - -}) +import styles from './styles' class Event extends React.Component { render () { @@ -48,7 +21,7 @@ class Event extends React.Component { description } = this.props.event return ( - + {name} diff --git a/client/src/Components/HostedEvents/styles.js b/client/src/Components/HostedEvents/styles.js index 175dc52e5..90baf7f60 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/client/src/Components/HostedEvents/styles.js @@ -1,4 +1,19 @@ const styles = theme => ({ + card: { + flexGrow: 1, + padding: 20, + marginTop: 20, + marginBottom: 20, + marginLeft: 400, + marginRight: 400 + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } }) export default styles diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 756bac3d8..5b88cf195 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -7,34 +7,7 @@ import { Button } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' - -const styles = theme => ({ - root: { - flexGrow: 1, - padding: 20, - margin: 10 - }, - image: { - width: 128, - height: '100%', - cursor: 'default' - }, - img: { - margin: 'auto', - display: 'block', - maxWidth: '100%', - maxHeight: '100%' - - }, - buttonList: { - margin: theme.spacing.unit, - float: 'right' - }, - buttonGrid: { - marginTop: -20 - } - -}) +import styles from './styles' class Event extends React.Component { render () { @@ -48,7 +21,7 @@ class Event extends React.Component { description } = this.props.event return ( - + {name} diff --git a/client/src/Components/Search/styles.js b/client/src/Components/Search/styles.js index 175dc52e5..90baf7f60 100644 --- a/client/src/Components/Search/styles.js +++ b/client/src/Components/Search/styles.js @@ -1,4 +1,19 @@ const styles = theme => ({ + card: { + flexGrow: 1, + padding: 20, + marginTop: 20, + marginBottom: 20, + marginLeft: 400, + marginRight: 400 + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } }) export default styles From 520a68ad49059fd9717f47368f396340ce065a10 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 13:09:03 +0100 Subject: [PATCH 067/146] Styling the "host new event" button --- client/src/Components/HostedEvents/index.js | 43 ++++++++++---------- client/src/Components/HostedEvents/styles.js | 7 ++++ 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index ad9a37244..ff6b6e600 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -33,6 +33,12 @@ class HostedEvent extends React.Component { const { classes } = this.props return ( + + @@ -52,28 +58,21 @@ class HostedEvent extends React.Component { }} - - - { this.setState({ isNewEventOpen: false }) }} - aria-labelledby='addEvent-dialog-title' - > - - Host an event - - - - Here you will add just the minimal information, will be settable in the edit page of your event. - - - - - + { this.setState({ isNewEventOpen: false }) }} + aria-labelledby='addEvent-dialog-title' + > + + Host an event + + + + Here you will add just the minimal information, will be settable in the edit page of your event. + + + + ) } diff --git a/client/src/Components/HostedEvents/styles.js b/client/src/Components/HostedEvents/styles.js index 90baf7f60..e867e8174 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/client/src/Components/HostedEvents/styles.js @@ -13,6 +13,13 @@ const styles = theme => ({ }, buttonGrid: { marginTop: -20 + }, + addButton: { + display: 'block', + padding: 20, + marginTop: 20, + marginRight: 20, + marginLeft: 'auto' } }) From 50c2a47034fe74b262ad3b5ebaf4d83449ed54cc Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 13:15:38 +0100 Subject: [PATCH 068/146] correcting date format --- client/src/Components/HostedEvents/Event.js | 6 ++++-- client/src/Components/Search/Event.js | 6 ++++-- client/src/utils/index.js | 6 +++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 24833190c..37599da1b 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -9,6 +9,8 @@ import { import { withStyles } from '@material-ui/core/styles' import styles from './styles' +import { toLocalTime } from '../../utils' + class Event extends React.Component { render () { const classes = this.props.classes @@ -25,8 +27,8 @@ class Event extends React.Component { {name} - From : {startDatetime} - To : {finishDatetime} + From : {toLocalTime(startDatetime)} + To : {toLocalTime(finishDatetime)} Hosted by: {host.alias} ({host.lastName} {host.firstName}) diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 5b88cf195..bce6d2433 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -9,6 +9,8 @@ import { import { withStyles } from '@material-ui/core/styles' import styles from './styles' +import { toLocalTime } from '../../utils' + class Event extends React.Component { render () { const classes = this.props.classes @@ -25,8 +27,8 @@ class Event extends React.Component { {name} - From : {startDatetime} - To : {finishDatetime} + From : {toLocalTime(startDatetime)} + To : {toLocalTime(finishDatetime)} Hosted by: {host.alias} ({host.lastName} {host.firstName}) diff --git a/client/src/utils/index.js b/client/src/utils/index.js index 4aee66165..36ed3a467 100644 --- a/client/src/utils/index.js +++ b/client/src/utils/index.js @@ -2,5 +2,9 @@ export const toLocalTime = (epoch) => { let localDate = new Date(0) localDate.setUTCSeconds(epoch) var options = { year: 'numeric', month: 'long', day: '2-digit' } - return localDate.toLocaleDateString(options) + ' ' + localDate.toLocaleTimeString('en-US') + return ( + localDate.toLocaleDateString(options) + + ' at ' + + localDate.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' }) + ) } From 85415c45c20f44a7155ae6b2df8666ff094628d6 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 13:25:25 +0100 Subject: [PATCH 069/146] Adding a bit of margin before the title --- client/src/Components/Search/index.js | 2 ++ client/src/Components/Search/styles.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index a459ca9d4..109fb75a6 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -12,9 +12,11 @@ import Event from './Event' class Search extends React.Component { render () { + const classes = this.props.classes return ( ({ }, buttonGrid: { marginTop: -20 + }, + title: { + marginTop: 20 } }) From e54ffaa87aae29003d321b255641469b62c0f4f1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 14:34:00 +0100 Subject: [PATCH 070/146] Adding a minimal tab system (dirty, we have to centralize it) --- client/src/Components/Search/index.js | 62 ++++++++++++++++++++++++++ client/src/Components/Search/styles.js | 11 +++++ 2 files changed, 73 insertions(+) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 109fb75a6..b4fcffc86 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -3,6 +3,14 @@ import { Query } from 'react-apollo' import { Typography } from '@material-ui/core' +import AppBar from '@material-ui/core/AppBar' +import Tabs from '@material-ui/core/Tabs' +import Tab from '@material-ui/core/Tab' +import ProfileSheetIcon from '@material-ui/icons/Create' +import ProfileImagesIcon from '@material-ui/icons/Wallpaper' +import YourReferrerIcon from '@material-ui/icons/AccessibilityNew' +import DescendentsIcon from '@material-ui/icons/DeviceHub' + import { withStyles } from '@material-ui/core/styles' import styles from './styles' @@ -10,11 +18,65 @@ import { listEventsCalls } from '../../GraphQL/Calls/index' import Event from './Event' +function TabContainer (props) { + return ( + + {props.children} + + ) +} + class Search extends React.Component { + state = { + value: 0 + } + + handleChange = (event, value) => { + this.setState({ value }) + } + render () { const classes = this.props.classes + const { value } = this.state return ( +
+ + + } + /> + } + /> + } + /> + } + /> + + + {value === 0 &&

hahah

} + {value === 1 &&

hoho

} + {value === 2 &&

hihi

} + {value === 3 &&

hehe

} +
({ + root: { + flexGrow: 1, + width: '100%', + backgroundColor: theme.palette.background.paper, + padding: 0, + margin: 0 + }, + tabTitle: { + width: '25%', + maxWidth: 'none' + }, card: { flexGrow: 1, padding: 20, From 4e9152ade5c50e17331fe453b48e5405db36e08a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 14:55:53 +0100 Subject: [PATCH 071/146] Cleaning the tab system a bit --- client/src/Components/Search/Tabs/Future.js | 24 ++++ client/src/Components/Search/Tabs/History.js | 24 ++++ client/src/Components/Search/Tabs/Incoming.js | 24 ++++ client/src/Components/Search/Tabs/Past.js | 24 ++++ client/src/Components/Search/Tabs/index.js | 11 ++ client/src/Components/Search/index.js | 130 +++++++++--------- 6 files changed, 171 insertions(+), 66 deletions(-) create mode 100644 client/src/Components/Search/Tabs/Future.js create mode 100644 client/src/Components/Search/Tabs/History.js create mode 100644 client/src/Components/Search/Tabs/Incoming.js create mode 100644 client/src/Components/Search/Tabs/Past.js create mode 100644 client/src/Components/Search/Tabs/index.js diff --git a/client/src/Components/Search/Tabs/Future.js b/client/src/Components/Search/Tabs/Future.js new file mode 100644 index 000000000..1cedbe9af --- /dev/null +++ b/client/src/Components/Search/Tabs/Future.js @@ -0,0 +1,24 @@ +import React from 'react' +import { Typography } from '@material-ui/core' + +import { withStyles } from '@material-ui/core/styles' +import styles from '../styles' + +class Future extends React.Component { + render () { + const classes = this.props.classes + return ( + + Future competitions + + ) + } +} + +export default withStyles(styles)(Future) diff --git a/client/src/Components/Search/Tabs/History.js b/client/src/Components/Search/Tabs/History.js new file mode 100644 index 000000000..b457947fb --- /dev/null +++ b/client/src/Components/Search/Tabs/History.js @@ -0,0 +1,24 @@ +import React from 'react' +import { Typography } from '@material-ui/core' + +import { withStyles } from '@material-ui/core/styles' +import styles from '../styles' + +class History extends React.Component { + render () { + const classes = this.props.classes + return ( + + Your old competitions (maybe here, maybe not, who knows) + + ) + } +} + +export default withStyles(styles)(History) diff --git a/client/src/Components/Search/Tabs/Incoming.js b/client/src/Components/Search/Tabs/Incoming.js new file mode 100644 index 000000000..fa3dfc3b7 --- /dev/null +++ b/client/src/Components/Search/Tabs/Incoming.js @@ -0,0 +1,24 @@ +import React from 'react' +import { Typography } from '@material-ui/core' + +import { withStyles } from '@material-ui/core/styles' +import styles from '../styles' + +class Incoming extends React.Component { + render () { + const classes = this.props.classes + return ( + + Ongoing and incoming competitions + + ) + } +} + +export default withStyles(styles)(Incoming) diff --git a/client/src/Components/Search/Tabs/Past.js b/client/src/Components/Search/Tabs/Past.js new file mode 100644 index 000000000..4c953f7cb --- /dev/null +++ b/client/src/Components/Search/Tabs/Past.js @@ -0,0 +1,24 @@ +import React from 'react' +import { Typography } from '@material-ui/core' + +import { withStyles } from '@material-ui/core/styles' +import styles from '../styles' + +class Past extends React.Component { + render () { + const classes = this.props.classes + return ( + + This will come later + + ) + } +} + +export default withStyles(styles)(Past) diff --git a/client/src/Components/Search/Tabs/index.js b/client/src/Components/Search/Tabs/index.js new file mode 100644 index 000000000..a4077c1ac --- /dev/null +++ b/client/src/Components/Search/Tabs/index.js @@ -0,0 +1,11 @@ +import Future from './Future' +import History from './History' +import Incoming from './Incoming' +import Past from './Past' + +export { + Future, + History, + Incoming, + Past +} diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index b4fcffc86..0bc4c4e19 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -16,6 +16,12 @@ import styles from './styles' import { listEventsCalls } from '../../GraphQL/Calls/index' +import { + Future, + History, + Incoming, + Past +} from './Tabs' import Event from './Event' function TabContainer (props) { @@ -27,8 +33,11 @@ function TabContainer (props) { } class Search extends React.Component { - state = { - value: 0 + constructor (props) { + super(props) + this.state = { + value: 0 + } } handleChange = (event, value) => { @@ -39,72 +48,61 @@ class Search extends React.Component { const classes = this.props.classes const { value } = this.state return ( - -
- - - } - /> - } - /> - } - /> - } - /> - - - {value === 0 &&

hahah

} - {value === 1 &&

hoho

} - {value === 2 &&

hihi

} - {value === 3 &&

hehe

} -
- - Enroll in an competition - - - {({ loading, error, data }) => { - if (loading) return 'Loading...' - if (error) return `Error! ${error.message}` - const list = data.hosts_Events.map((event, index) => { - return ( - - ) - }) + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + const list = data.hosts_Events.map((event, index) => { return ( - - { list } - + ) - }} - -
+ }) + return ( + +
+ + + } + /> + } + /> + } + /> + } + /> + + + {value === 0 && } + {value === 1 && } + {value === 2 && } + {value === 3 && } +
+ { list } +
+ ) + }} +
) } } From aa820be4f660cb5a163fa1ceb772f43e8942607a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 15:18:38 +0100 Subject: [PATCH 072/146] Adapting icons --- client/src/Components/Search/index.js | 28 ++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 0bc4c4e19..26c090760 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -1,15 +1,17 @@ import React from 'react' import { Query } from 'react-apollo' -import { Typography } from '@material-ui/core' - -import AppBar from '@material-ui/core/AppBar' -import Tabs from '@material-ui/core/Tabs' -import Tab from '@material-ui/core/Tab' -import ProfileSheetIcon from '@material-ui/icons/Create' -import ProfileImagesIcon from '@material-ui/icons/Wallpaper' -import YourReferrerIcon from '@material-ui/icons/AccessibilityNew' -import DescendentsIcon from '@material-ui/icons/DeviceHub' +import { + Typography, + AppBar, + Tabs, + Tab +} from '@material-ui/core' +import { + GetApp as IncomingIcon, + AlarmAdd as FutureIcon, + History as HistoryIcon +} from '@material-ui/icons' import { withStyles } from '@material-ui/core/styles' import styles from './styles' @@ -74,22 +76,22 @@ class Search extends React.Component { } + icon={} /> } + icon={} /> } + icon={} /> } + icon={} /> From 2a90b9aa8c9f8bbf2da03808d9263725fc9be4db Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 16:01:48 +0100 Subject: [PATCH 073/146] Filtering and arranging evens into tabs --- client/src/Components/Search/Tabs/Future.js | 30 +++++++---- client/src/Components/Search/Tabs/History.js | 4 +- client/src/Components/Search/Tabs/Incoming.js | 50 +++++++++++++++---- client/src/Components/Search/Tabs/Past.js | 30 +++++++---- client/src/Components/Search/index.js | 22 ++++---- 5 files changed, 97 insertions(+), 39 deletions(-) diff --git a/client/src/Components/Search/Tabs/Future.js b/client/src/Components/Search/Tabs/Future.js index 1cedbe9af..2a46f4995 100644 --- a/client/src/Components/Search/Tabs/Future.js +++ b/client/src/Components/Search/Tabs/Future.js @@ -4,19 +4,31 @@ import { Typography } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import styles from '../styles' +import Event from '../Event' + class Future extends React.Component { render () { const classes = this.props.classes + const { FutureEvents } = this.props + + const futureEvents = FutureEvents.map((event, index) => { + return ( + + ) + }) return ( - - Future competitions - + + + Future events + + {futureEvents} + ) } } diff --git a/client/src/Components/Search/Tabs/History.js b/client/src/Components/Search/Tabs/History.js index b457947fb..0db046e5c 100644 --- a/client/src/Components/Search/Tabs/History.js +++ b/client/src/Components/Search/Tabs/History.js @@ -10,12 +10,12 @@ class History extends React.Component { return ( - Your old competitions (maybe here, maybe not, who knows) + Your old events (maybe here, maybe not, who knows) ) } diff --git a/client/src/Components/Search/Tabs/Incoming.js b/client/src/Components/Search/Tabs/Incoming.js index fa3dfc3b7..3956aa6d7 100644 --- a/client/src/Components/Search/Tabs/Incoming.js +++ b/client/src/Components/Search/Tabs/Incoming.js @@ -4,19 +4,51 @@ import { Typography } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import styles from '../styles' +import Event from '../Event' + class Incoming extends React.Component { render () { const classes = this.props.classes + const { IncomingEvents, OngoingEvents } = this.props + + const incomingEvents = IncomingEvents.map((event, index) => { + return ( + + ) + }) + const ongoingEvents = OngoingEvents.map((event, index) => { + return ( + + ) + }) return ( - - Ongoing and incoming competitions - + + + Ongoing and incoming competitions + + + Ongoing events: + + {ongoingEvents} + + Incoming events: + + {incomingEvents} + ) } } diff --git a/client/src/Components/Search/Tabs/Past.js b/client/src/Components/Search/Tabs/Past.js index 4c953f7cb..60a6bc5aa 100644 --- a/client/src/Components/Search/Tabs/Past.js +++ b/client/src/Components/Search/Tabs/Past.js @@ -4,19 +4,31 @@ import { Typography } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import styles from '../styles' +import Event from '../Event' + class Past extends React.Component { render () { const classes = this.props.classes + const { PastEvents } = this.props + + const pastEvents = PastEvents.map((event, index) => { + return ( + + ) + }) return ( - - This will come later - + + + A list of passed events + + {pastEvents} + ) } } diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 26c090760..e432c8a8c 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -1,5 +1,6 @@ import React from 'react' import { Query } from 'react-apollo' +import { DateTime } from 'luxon' import { Typography, @@ -24,7 +25,6 @@ import { Incoming, Past } from './Tabs' -import Event from './Event' function TabContainer (props) { return ( @@ -56,11 +56,14 @@ class Search extends React.Component { {({ loading, error, data }) => { if (loading) return 'Loading...' if (error) return `Error! ${error.message}` - const list = data.hosts_Events.map((event, index) => { - return ( - - ) - }) + const now = ~~(DateTime.local().valueOf() / 1000) + const inTwoWeeks = ~~(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000) + + const IncomingEvents = data.hosts_Events.filter(event => event.startDatetime > now && event.startDatetime < inTwoWeeks) + const OngoingEvents = data.hosts_Events.filter(event => event.finishDatetime > now && event.startDatetime < now) + const FutureEvents = data.hosts_Events.filter(event => event.startDatetime > now) + const PastEvents = data.hosts_Events.filter(event => event.finishDatetime < now) + return (
@@ -95,12 +98,11 @@ class Search extends React.Component { /> - {value === 0 && } - {value === 1 && } + {value === 0 && } + {value === 1 && } {value === 2 && } - {value === 3 && } + {value === 3 && }
- { list }
) }} From b5288c451b096c5c70ba74458fc830a543db7350 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 03:05:19 +0100 Subject: [PATCH 074/146] Adding an enum to the event model --- server/src/enums/EventStatus.js | 17 +++++++++++++++++ server/src/models/event.js | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 server/src/enums/EventStatus.js diff --git a/server/src/enums/EventStatus.js b/server/src/enums/EventStatus.js new file mode 100644 index 000000000..eca1ce59f --- /dev/null +++ b/server/src/enums/EventStatus.js @@ -0,0 +1,17 @@ +export const UNPUBLISHED = 'UNPUBLISHED' +export const PUBLISHED = 'PUBLISHED' +export const CANCELLED = 'CANCELLED' +export const RUNNING = 'RUNNING' +export const INTERRUPTED = 'INTERRUPTED' +export const FINISHED = 'FINISHED' + +export const EventStatusEnum = [ + UNPUBLISHED, + PUBLISHED, + CANCELLED, + RUNNING, + INTERRUPTED, + FINISHED +] + +export default EventStatusEnum diff --git a/server/src/models/event.js b/server/src/models/event.js index b547474ab..b348d9405 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -1,9 +1,14 @@ import mongoose, { Schema } from 'mongoose' import Plotter from './plotter' import Formula from './formula' +import { + UNPUBLISHED, + EventStatusEnum +} from '../enums/EventStatus' const eventSchema = new Schema({ designator: { type: String, required: true }, + status: { type: String, enum: EventStatusEnum, default: UNPUBLISHED }, name: { type: String, required: true }, hostId: { type: String, required: true }, description: String, From 4550d06224643be64fe465dab600d6da4add353c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 03:16:18 +0100 Subject: [PATCH 075/146] updating package-lock --- server/package-lock.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index ef36278b3..8335da2ae 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1838,7 +1838,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2253,7 +2254,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2309,6 +2311,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2352,12 +2355,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, From 657c8a1a9b72af3a90c51c27ed9b05e51f63a2be Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 04:20:43 +0100 Subject: [PATCH 076/146] went from standardjs to eslinter with airbnb settings(untested) --- server/.eslintrc.js | 8 + server/package-lock.json | 1461 ++++++++++++++++- server/package.json | 4 + server/src/enums/EventStatus.js | 18 +- server/src/errors/index.js | 10 +- server/src/index.js | 59 +- server/src/models/event.js | 42 +- server/src/models/formula.js | 10 +- server/src/models/index.js | 10 +- server/src/models/plotter.js | 10 +- server/src/schema/index.js | 14 +- server/src/schema/mutations/AddPrize.js | 75 +- server/src/schema/mutations/AddRule.js | 88 +- .../schema/mutations/CreateAndSetFormula.js | 72 +- .../schema/mutations/CreateAndSetPlotter.js | 80 +- server/src/schema/mutations/CreateFormula.js | 43 +- server/src/schema/mutations/CreatePlotter.js | 49 +- server/src/schema/mutations/EditEvent.js | 75 +- .../src/schema/mutations/EditParticipant.js | 94 +- server/src/schema/mutations/EditPrize.js | 74 +- server/src/schema/mutations/EditRule.js | 89 +- server/src/schema/mutations/HostEvent.js | 55 +- .../src/schema/mutations/RegisterToEvent.js | 96 +- server/src/schema/mutations/ReorderRules.js | 77 +- server/src/schema/mutations/index.js | 38 +- server/src/schema/queries/Event.js | 48 +- server/src/schema/queries/Events.js | 42 +- server/src/schema/queries/EventsByHost.js | 44 +- server/src/schema/queries/EventsByTeam.js | 44 +- server/src/schema/queries/Formulas.js | 22 +- server/src/schema/queries/Plotters.js | 22 +- server/src/schema/queries/index.js | 24 +- server/src/schema/types/AdditionalPrize.js | 12 +- server/src/schema/types/Event.js | 46 +- server/src/schema/types/Formula.js | 12 +- server/src/schema/types/Participant.js | 12 +- server/src/schema/types/Plotter.js | 12 +- server/src/schema/types/Prize.js | 20 +- server/src/schema/types/Rule.js | 12 +- server/src/schema/types/index.js | 18 +- server/src/utils/functions.js | 33 +- 41 files changed, 2257 insertions(+), 817 deletions(-) create mode 100644 server/.eslintrc.js diff --git a/server/.eslintrc.js b/server/.eslintrc.js new file mode 100644 index 000000000..b41dc444e --- /dev/null +++ b/server/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + parser: 'babel-eslint', + extends: 'airbnb-base', + rules: { + 'no-underscore-dangle': 'off', + 'no-param-reassign': 'off' + } +}; diff --git a/server/package-lock.json b/server/package-lock.json index 8335da2ae..7a13f7e72 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -4,6 +4,189 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/generator": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", + "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", + "dev": true, + "requires": { + "@babel/types": "^7.1.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } + } + }, + "@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==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.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==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", + "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", + "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "dev": true + }, + "@babel/template": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", + "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.1.2", + "@babel/types": "^7.1.2" + } + }, + "@babel/traverse": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz", + "integrity": "sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.1.3", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.1.3", + "@babel/types": "^7.1.3", + "debug": "^3.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + }, + "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" + } + }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", + "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, "@sentry/core": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz", @@ -76,6 +259,30 @@ "negotiator": "0.6.1" } }, + "acorn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", + "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz", + "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==", + "dev": true + }, + "ajv": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-align": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", @@ -85,6 +292,12 @@ "string-width": "^2.0.0" } }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -143,6 +356,21 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-union": { + "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" + } + }, + "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 + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -150,6 +378,12 @@ "dev": true, "optional": true }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -238,6 +472,32 @@ "source-map": "^0.5.7" } }, + "babel-eslint": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz", + "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } + } + }, "babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", @@ -1138,6 +1398,12 @@ "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", "integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg==" }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -1168,6 +1434,21 @@ } } }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -1199,6 +1480,12 @@ "supports-color": "^2.0.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -1228,6 +1515,12 @@ "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -1263,6 +1556,21 @@ "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", "dev": true }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.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 + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1319,6 +1627,12 @@ "xdg-basedir": "^3.0.0" } }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -1435,6 +1749,21 @@ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -1488,6 +1817,29 @@ } } }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1507,6 +1859,15 @@ "repeating": "^2.0.0" } }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -1549,6 +1910,39 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "error-ex": { + "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" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "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==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1560,11 +1954,261 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.8.0.tgz", + "integrity": "sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "imurmurhash": "^0.1.4", + "inquirer": "^6.1.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.0.2", + "text-table": "^0.2.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 + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.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", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "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": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "eslint-config-airbnb-base": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", + "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", + "dev": true, + "requires": { + "eslint-restricted-globals": "^0.1.1", + "object.assign": "^4.1.0", + "object.entries": "^1.0.4" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "dev": true, + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-restricted-globals": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", + "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", + "dev": true + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -1696,6 +2340,28 @@ } } }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -1706,6 +2372,43 @@ "is-extglob": "^1.0.0" } }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -1741,6 +2444,28 @@ "unpipe": "~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" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" + } + }, "flatmap-stream": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", @@ -1838,8 +2563,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1860,14 +2584,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1882,20 +2604,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -2012,8 +2731,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -2025,7 +2743,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2040,7 +2757,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2048,14 +2764,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2074,7 +2788,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2155,8 +2868,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2168,7 +2880,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2254,8 +2965,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -2291,7 +3001,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2311,7 +3020,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2355,17 +3063,27 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-stream": { "version": "3.0.0", "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -2427,6 +3145,28 @@ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "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": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "got": { "version": "6.7.1", "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", @@ -2512,6 +3252,15 @@ "cross-fetch": "2.2.2" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -2527,6 +3276,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "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 + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -2597,6 +3352,12 @@ "os-tmpdir": "^1.0.1" } }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, "http-errors": { "version": "1.6.3", "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -2616,6 +3377,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, "ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", @@ -2655,6 +3422,73 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "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 + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.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": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2678,6 +3512,12 @@ "kind-of": "^3.0.2" } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", @@ -2692,6 +3532,21 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, "is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", @@ -2710,6 +3565,12 @@ "kind-of": "^3.0.2" } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -2814,6 +3675,21 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, "is-path-inside": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", @@ -2854,12 +3730,33 @@ "dev": true, "optional": true }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-redirect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, "is-retry-allowed": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", @@ -2872,6 +3769,15 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "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" + } + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -2926,6 +3832,18 @@ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json5": { "version": "0.5.1", "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -2955,6 +3873,54 @@ "package-json": "^4.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "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" + }, + "dependencies": { + "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 + } + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -3050,7 +4016,7 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "memory-pager": { @@ -3109,6 +4075,12 @@ "mime-db": "~1.36.0" } }, + "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 + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3247,6 +4219,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "nan": { "version": "2.11.1", "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", @@ -3293,11 +4271,23 @@ } } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node-fetch": { "version": "2.1.2", "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", @@ -3708,6 +4698,18 @@ "abbrev": "1" } }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -3759,6 +4761,12 @@ } } }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -3776,6 +4784,30 @@ } } }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", + "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.6.1", + "function-bind": "^1.1.0", + "has": "^1.0.1" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -3821,6 +4853,29 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -3850,6 +4905,30 @@ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "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 + }, "package-json": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", @@ -3875,6 +4954,15 @@ "is-glob": "^2.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" + } + }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", @@ -3892,6 +4980,15 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, + "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-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3910,11 +5007,34 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "pause-stream": { "version": "0.0.11", "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -3930,12 +5050,48 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", @@ -3961,6 +5117,12 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "dev": true + }, "proxy-addr": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", @@ -3994,6 +5156,12 @@ "ps-tree": "^1.1.0" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -4063,6 +5231,38 @@ } } }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.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" + } + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -4413,6 +5613,12 @@ "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", @@ -4445,7 +5651,7 @@ }, "regjsgen": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "dev": true }, @@ -4493,6 +5699,24 @@ "is-finite": "^1.0.0" } }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", @@ -4502,6 +5726,15 @@ "semver": "^5.1.0" } }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, "resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", @@ -4513,12 +5746,49 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4526,7 +5796,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -4647,6 +5917,15 @@ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", @@ -4803,6 +6082,38 @@ "memory-pager": "^1.0.2" } }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "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 + }, + "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" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "dev": true + }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -4912,9 +6223,15 @@ "ansi-regex": "^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 + }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -4930,6 +6247,18 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "table": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", + "dev": true, + "requires": { + "ajv": "^6.5.3", + "lodash": "^4.17.10", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, "term-size": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", @@ -4939,6 +6268,12 @@ "execa": "^0.7.0" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4951,6 +6286,15 @@ "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -5014,6 +6358,21 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", @@ -5188,6 +6547,15 @@ } } }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -5235,6 +6603,16 @@ "user-home": "^1.1.1" } }, + "validate-npm-package-license": { + "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" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -5263,12 +6641,27 @@ "string-width": "^2.1.1" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", diff --git a/server/package.json b/server/package.json index e3f4f664b..a783ba4fc 100644 --- a/server/package.json +++ b/server/package.json @@ -16,8 +16,12 @@ }, "devDependencies": { "babel-cli": "^6.26.0", + "babel-eslint": "^10.0.1", "babel-preset-env": "^1.7.0", "babel-preset-stage-2": "^6.24.1", + "eslint": "^5.8.0", + "eslint-config-airbnb-base": "^13.1.0", + "eslint-plugin-import": "^2.14.0", "nodemon": "^1.18.4" }, "dependencies": { diff --git a/server/src/enums/EventStatus.js b/server/src/enums/EventStatus.js index eca1ce59f..50a4bc53e 100644 --- a/server/src/enums/EventStatus.js +++ b/server/src/enums/EventStatus.js @@ -1,9 +1,9 @@ -export const UNPUBLISHED = 'UNPUBLISHED' -export const PUBLISHED = 'PUBLISHED' -export const CANCELLED = 'CANCELLED' -export const RUNNING = 'RUNNING' -export const INTERRUPTED = 'INTERRUPTED' -export const FINISHED = 'FINISHED' +export const UNPUBLISHED = 'UNPUBLISHED'; +export const PUBLISHED = 'PUBLISHED'; +export const CANCELLED = 'CANCELLED'; +export const RUNNING = 'RUNNING'; +export const INTERRUPTED = 'INTERRUPTED'; +export const FINISHED = 'FINISHED'; export const EventStatusEnum = [ UNPUBLISHED, @@ -11,7 +11,7 @@ export const EventStatusEnum = [ CANCELLED, RUNNING, INTERRUPTED, - FINISHED -] + FINISHED, +]; -export default EventStatusEnum +export default EventStatusEnum; diff --git a/server/src/errors/index.js b/server/src/errors/index.js index b1085fedf..d97fc3ec5 100644 --- a/server/src/errors/index.js +++ b/server/src/errors/index.js @@ -1,19 +1,23 @@ export class AuthentificationError extends Error { code = 401 + message = 'Autentification not found, you have to be authentificated to perform this action' } export class DatabaseError extends Error { code = 404 - message = 'Ressource not found : ' + this.message + + message = `Ressource not found : ${this.message}` } export class WrongArgumentsError extends Error { code = 400 - message = 'Wrong arguments : ' + this.message + + message = `Wrong arguments : ${this.message}` } export class ServiceUnavailableError extends Error { code = 503 - message = 'At least one service is unresponding ' + this.message + + message = `At least one service is unresponding ${this.message}` } diff --git a/server/src/index.js b/server/src/index.js index c68ba1e9f..2ec8de3d2 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -1,55 +1,54 @@ -import express from 'express' -import 'dotenv/config' -import cors from 'cors' -import mongoose from 'mongoose' -import graphqlHTTP from 'express-graphql' -import expressPlayground from 'graphql-playground-middleware-express' +/* eslint-disable no-console */ +import express from 'express'; +import 'dotenv/config'; +import cors from 'cors'; +import mongoose from 'mongoose'; +import graphqlHTTP from 'express-graphql'; +import expressPlayground from 'graphql-playground-middleware-express'; +import * as Sentry from '@sentry/node'; -import schema from './schema' -import * as Sentry from '@sentry/node' +import schema from './schema'; // Initialise express -const app = express() +const app = express(); // Initialising sentry -Sentry.init({ dsn: process.env.SENTRY_DNS }) -app.use(Sentry.Handlers.requestHandler()) +Sentry.init({ dsn: process.env.SENTRY_DNS }); +app.use(Sentry.Handlers.requestHandler()); // Allow cross origing request -app.use(cors()) +app.use(cors()); /* ------------------------------------------------- ---------------- Database setup -------------------- ------------------------------------------------- */ // Database Connection -mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }) +mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); // Get Mongoose to use the global promise library -mongoose.Promise = global.Promise +mongoose.Promise = global.Promise; // Get the default connection -var db = mongoose.connection +const db = mongoose.connection; // bind error and success to console log -db.on('error', () => { console.error.bind(console, 'MongoDB connection error:') }) -db.once('open', () => { console.log('Connected to the DB.') }) +db.on('error', () => { console.error.bind(console, 'MongoDB connection error:'); }); +db.once('open', () => { console.log('Connected to the DB.'); }); /* ------------------------------------------------- ----------------- Graphql setup -------------------- ------------------------------------------------- */ -app.use('/graphql', graphqlHTTP(req => { - return { - schema: schema, - context: { - userId: req.headers.userid, - authorization: req.headers.authorization - } - } -})) -app.get('/playground', expressPlayground({ endpoint: '/graphql' })) +app.use('/graphql', graphqlHTTP(req => ({ + schema, + context: { + userId: req.headers.userid, + authorization: req.headers.authorization, + }, +}))); +app.get('/playground', expressPlayground({ endpoint: '/graphql' })); // Sentry error handling middleware -app.use(Sentry.Handlers.errorHandler()) +app.use(Sentry.Handlers.errorHandler()); app.listen(process.env.PORT, () => { - console.log(`Listening on port ${process.env.PORT}`) -}) + console.log(`Listening on port ${process.env.PORT}`); +}); diff --git a/server/src/models/event.js b/server/src/models/event.js index b348d9405..a3aefc289 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -1,10 +1,10 @@ -import mongoose, { Schema } from 'mongoose' -import Plotter from './plotter' -import Formula from './formula' +import mongoose, { Schema } from 'mongoose'; +import Plotter from './plotter'; +import Formula from './formula'; import { UNPUBLISHED, - EventStatusEnum -} from '../enums/EventStatus' + EventStatusEnum, +} from '../enums/EventStatus'; const eventSchema = new Schema({ designator: { type: String, required: true }, @@ -19,7 +19,7 @@ const eventSchema = new Schema({ rules: [{ position: { type: Number, required: true }, title: { type: String, required: true }, - description: String + description: String, }], prizes: [{ rank: { type: Number, required: true }, @@ -27,25 +27,25 @@ const eventSchema = new Schema({ additional: [{ condition: String, amount: { type: Number, required: true }, - asset: { type: String, required: true } - }] + asset: { type: String, required: true }, + }], }], participants: [{ teamId: { type: String, required: true }, botId: String, - releaseId: String - }] -}) + releaseId: String, + }], +}); -eventSchema.pre('find', function () { - this.populate('formula').populate('plotter') -}) -eventSchema.post('save', function (doc, next) { - doc.populate('formula').populate('plotter').execPopulate().then(function () { - next() - }) -}) +eventSchema.pre('find', () => { + this.populate('formula').populate('plotter'); +}); +eventSchema.post('save', (doc, next) => { + doc.populate('formula').populate('plotter').execPopulate().then(() => { + next(); + }); +}); -const Event = mongoose.model('Event', eventSchema) +const Event = mongoose.model('Event', eventSchema); -export default Event +export default Event; diff --git a/server/src/models/formula.js b/server/src/models/formula.js index ca835ec6b..43132bbf2 100644 --- a/server/src/models/formula.js +++ b/server/src/models/formula.js @@ -1,11 +1,11 @@ -import mongoose, { Schema } from 'mongoose' +import mongoose, { Schema } from 'mongoose'; const formulaSchema = new Schema({ ownerId: { type: String, required: true }, isTemplate: { type: Boolean, default: false }, - name: { type: String, required: true } -}) + name: { type: String, required: true }, +}); -const Formula = mongoose.model('Formula', formulaSchema) +const Formula = mongoose.model('Formula', formulaSchema); -export default Formula +export default Formula; diff --git a/server/src/models/index.js b/server/src/models/index.js index b35809dd1..251eda8ea 100644 --- a/server/src/models/index.js +++ b/server/src/models/index.js @@ -1,9 +1,9 @@ -import Plotter from './plotter' -import Event from './event' -import Formula from './formula' +import Plotter from './plotter'; +import Event from './event'; +import Formula from './formula'; export { Event, Plotter, - Formula -} + Formula, +}; diff --git a/server/src/models/plotter.js b/server/src/models/plotter.js index d8fade1e4..77f274206 100644 --- a/server/src/models/plotter.js +++ b/server/src/models/plotter.js @@ -1,4 +1,4 @@ -import mongoose, { Schema } from 'mongoose' +import mongoose, { Schema } from 'mongoose'; const plotterSchema = new Schema({ ownerId: { type: String, required: true }, @@ -6,9 +6,9 @@ const plotterSchema = new Schema({ name: { type: String, required: true }, host: { type: String, required: true }, repo: { type: String, required: true }, - moduleName: { type: String, required: true } -}) + moduleName: { type: String, required: true }, +}); -const Plotter = mongoose.model('Plotter', plotterSchema) +const Plotter = mongoose.model('Plotter', plotterSchema); -export default Plotter +export default Plotter; diff --git a/server/src/schema/index.js b/server/src/schema/index.js index 4155e4999..81d0b3150 100644 --- a/server/src/schema/index.js +++ b/server/src/schema/index.js @@ -1,13 +1,13 @@ import { - GraphQLSchema -} from 'graphql' + GraphQLSchema, +} from 'graphql'; -import Mutation from './mutations' -import RootQuery from './queries' +import Mutation from './mutations'; +import RootQuery from './queries'; const Schema = new GraphQLSchema({ query: RootQuery, - mutation: Mutation -}) + mutation: Mutation, +}); -export default Schema +export default Schema; diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js index 03e79b7c4..ff22e69ab 100644 --- a/server/src/schema/mutations/AddPrize.js +++ b/server/src/schema/mutations/AddPrize.js @@ -1,59 +1,62 @@ import { GraphQLNonNull, GraphQLID, - GraphQLInt -} from 'graphql' + GraphQLInt, +} from 'graphql'; import { AuthentificationError, DatabaseError, - WrongArgumentsError -} from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + WrongArgumentsError, +} from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: new GraphQLNonNull(GraphQLInt) } -} + amount: { type: new GraphQLNonNull(GraphQLInt) }, +}; const resolve = (parent, { eventDesignator, rank, amount }, context) => { - const hostId = context.userId + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - if (event.prizes.some(prize => prize.rank === rank)) { - reject(new WrongArgumentsError('A prize for that rank already exists')) - } else { - event.prizes.push({ - rank, - amount - }) - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) - } + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + if (event.prizes.some(prize => prize.rank === rank)) { + rej(new WrongArgumentsError('A prize for that rank already exists')); + return; + } + event.prizes.push({ + rank, + amount, + }); + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { addPrize: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js index 6968ab4e9..c7b43cdb5 100644 --- a/server/src/schema/mutations/AddRule.js +++ b/server/src/schema/mutations/AddRule.js @@ -1,64 +1,70 @@ import { GraphQLNonNull, GraphQLID, - GraphQLString -} from 'graphql' + GraphQLString, +} from 'graphql'; import { AuthentificationError, DatabaseError, - WrongArgumentsError -} from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + WrongArgumentsError, +} from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) } -} + description: { type: new GraphQLNonNull(GraphQLString) }, +}; const resolve = (parent, { eventDesignator, title, description }, context) => { - const hostId = context.userId + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - if (event.rules.some(rule => rule.title === title)) { - reject(new WrongArgumentsError('A prize for that rank already exists')) - } else { - let position = 1 - while (event.rules.some(rule => rule.position === position)) { - position++ - } - event.rules.push({ - position, - title, - description - }) - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) - } + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + if (event.rules.some(rule => rule.title === title)) { + rej(new WrongArgumentsError('A prize for that rank already exists')); + return; + } + const isFree = pos => event.rules.some(rule => rule.pos === pos); + let position = 1; + let shouldGrow = isFree(position); + while (shouldGrow) { + position += 1; + shouldGrow = isFree(position); + } + event.rules.push({ + position, + title, + description, + }); + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { addRule: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/CreateAndSetFormula.js b/server/src/schema/mutations/CreateAndSetFormula.js index 21f631a1b..d1d45970f 100644 --- a/server/src/schema/mutations/CreateAndSetFormula.js +++ b/server/src/schema/mutations/CreateAndSetFormula.js @@ -1,52 +1,56 @@ import { GraphQLNonNull, - GraphQLString -} from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' -import { EventType } from '../types' -import { Event, Formula } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError, DatabaseError } from '../../errors'; +import { EventType } from '../types'; +import { Event, Formula } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, - name: { type: new GraphQLNonNull(GraphQLString) } -} + name: { type: new GraphQLNonNull(GraphQLString) }, +}; const resolve = (parent, { name, eventDesignator }, context) => { - const ownerId = context.userId + const ownerId = context.userId; if (!ownerId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - let newFormula = new Formula({ name, ownerId }) - return new Promise((resolve, reject) => { + const newFormula = new Formula({ name, ownerId }); + return new Promise((res, reject) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - newFormula.save((err) => { - if (err) reject(err) - else { - } - }) - event.formula = newFormula._id - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + reject(err); + return; } - }) - }) -} + if (!event) { + reject(new DatabaseError('None of the events you own respond to that designator')); + return; + } + newFormula.save((error) => { + if (error) { + reject(error); + return; + } + event.formula = newFormula._id; + event.save((eventError) => { + if (eventError) { + reject(eventError); + return; + } + res(event); + }); + }); + }); + }); +}; const mutation = { createAndSetFormula: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/CreateAndSetPlotter.js b/server/src/schema/mutations/CreateAndSetPlotter.js index 98aa2e7e4..11cbfe846 100644 --- a/server/src/schema/mutations/CreateAndSetPlotter.js +++ b/server/src/schema/mutations/CreateAndSetPlotter.js @@ -1,55 +1,65 @@ import { GraphQLNonNull, - GraphQLString -} from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' -import { EventType } from '../types' -import { Event, Plotter } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError, DatabaseError } from '../../errors'; +import { EventType } from '../types'; +import { Event, Plotter } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, name: { type: new GraphQLNonNull(GraphQLString) }, host: { type: new GraphQLNonNull(GraphQLString) }, repo: { type: new GraphQLNonNull(GraphQLString) }, - moduleName: { type: new GraphQLNonNull(GraphQLString) } -} + moduleName: { type: new GraphQLNonNull(GraphQLString) }, +}; -const resolve = (parent, { name, host, repo, moduleName, eventDesignator }, context) => { - const ownerId = context.userId +const resolve = (parent, { + name, host, repo, moduleName, eventDesignator, +}, context) => { + const ownerId = context.userId; if (!ownerId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) - return new Promise((resolve, reject) => { + const newPlotter = new Plotter({ + name, host, repo, moduleName, ownerId, + }); + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - newPlotter.save((err) => { - if (err) reject(err) - else { - } - }) - event.plotter = newPlotter._id - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + + newPlotter.save((error) => { + if (error) { + rej(error); + return; + } + + event.plotter = newPlotter._id; + event.save((eventError) => { + if (eventError) { + rej(eventError); + return; + } + res(event); + }); + }); + }); + }); +}; const mutation = { createAndSetPlotter: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/CreateFormula.js b/server/src/schema/mutations/CreateFormula.js index a8153209a..4ff97b8c1 100644 --- a/server/src/schema/mutations/CreateFormula.js +++ b/server/src/schema/mutations/CreateFormula.js @@ -1,37 +1,38 @@ import { GraphQLNonNull, - GraphQLString -} from 'graphql' -import { AuthentificationError } from '../../errors' -import { FormulaType } from '../types' -import { Formula } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError } from '../../errors'; +import { FormulaType } from '../types'; +import { Formula } from '../../models'; const args = { - name: { type: new GraphQLNonNull(GraphQLString) } -} + name: { type: new GraphQLNonNull(GraphQLString) }, +}; const resolve = (parent, { name }, context) => { - const ownerId = context.userId + const ownerId = context.userId; if (!ownerId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - let newFormula = new Formula({ name, ownerId }) - return new Promise((resolve, reject) => { + const newFormula = new Formula({ name, ownerId }); + return new Promise((res, rej) => { newFormula.save((err) => { - if (err) reject(err) - else { - resolve(newFormula) + if (err) { + rej(err); + return; } - }) - }) -} + res(newFormula); + }); + }); +}; const mutation = { createFormula: { type: FormulaType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/CreatePlotter.js b/server/src/schema/mutations/CreatePlotter.js index 669dc81ec..a4fcdf26a 100644 --- a/server/src/schema/mutations/CreatePlotter.js +++ b/server/src/schema/mutations/CreatePlotter.js @@ -1,40 +1,45 @@ import { GraphQLNonNull, - GraphQLString -} from 'graphql' -import { AuthentificationError } from '../../errors' -import { PlotterType } from '../types' -import { Plotter } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError } from '../../errors'; +import { PlotterType } from '../types'; +import { Plotter } from '../../models'; const args = { name: { type: new GraphQLNonNull(GraphQLString) }, host: { type: new GraphQLNonNull(GraphQLString) }, repo: { type: new GraphQLNonNull(GraphQLString) }, - moduleName: { type: new GraphQLNonNull(GraphQLString) } -} + moduleName: { type: new GraphQLNonNull(GraphQLString) }, +}; -const resolve = (parent, { name, host, repo, moduleName }, context) => { - const ownerId = context.userId +const resolve = (parent, { + name, host, repo, moduleName, +}, context) => { + const ownerId = context.userId; if (!ownerId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - let newPlotter = new Plotter({ name, host, repo, moduleName, ownerId }) - return new Promise((resolve, reject) => { + const newPlotter = new Plotter({ + name, host, repo, moduleName, ownerId, + }); + return new Promise((res, reject) => { newPlotter.save((err) => { - if (err) reject(err) - else { - resolve(newPlotter) + if (err) { + reject(err); + return; } - }) - }) -} + res(newPlotter); + }); + }); +}; const mutation = { createPlotter: { type: PlotterType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js index de5271efb..e60cf6cbd 100644 --- a/server/src/schema/mutations/EditEvent.js +++ b/server/src/schema/mutations/EditEvent.js @@ -2,11 +2,11 @@ import { GraphQLNonNull, GraphQLID, GraphQLInt, - GraphQLString -} from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError, DatabaseError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { designator: { type: new GraphQLNonNull(GraphQLID) }, @@ -15,45 +15,50 @@ const args = { startDatetime: { type: GraphQLInt }, finishDatetime: { type: GraphQLInt }, formulaId: { type: GraphQLString }, - plotterId: { type: GraphQLString } -} + plotterId: { type: GraphQLString }, +}; -const resolve = (parent, { designator, name, description, startDatetime, finishDatetime, formulaId, plotterId }, context) => { - const hostId = context.userId +const resolve = (parent, { + designator, name, description, startDatetime, finishDatetime, formulaId, plotterId, +}, context) => { + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator, hostId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - event.name = name || event.name - event.description = description || event.description - event.startDatetime = startDatetime || event.startDatetime - event.finishDatetime = finishDatetime || event.finishDatetime - event.formula = formulaId || event.formula - event.plotter = plotterId || event.plotter - - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + event.name = name || event.name; + event.description = description || event.description; + event.startDatetime = startDatetime || event.startDatetime; + event.finishDatetime = finishDatetime || event.finishDatetime; + event.formula = formulaId || event.formula; + event.plotter = plotterId || event.plotter; + + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { editEvent: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index 855370afa..0abb8db32 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -1,30 +1,32 @@ import { GraphQLNonNull, GraphQLID, - GraphQLString -} from 'graphql' -import axios from 'axios' + GraphQLString, +} from 'graphql'; +import axios from 'axios'; import { AuthentificationError, WrongArgumentsError, - ServiceUnavailableError -} from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + ServiceUnavailableError, +} from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, teamId: { type: new GraphQLNonNull(GraphQLString) }, botId: { type: GraphQLString }, - releaseId: { type: GraphQLString } -} + releaseId: { type: GraphQLString }, +}; -const resolve = (parent, { eventDesignator, teamId, botId, releaseId }, context) => { - const userid = context.userId +const resolve = (parent, { + eventDesignator, teamId, botId, releaseId, +}, context) => { + const userid = context.userId; if (!userid) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { axios({ url: process.env.TEAMS_ENDPOINT, method: 'post', @@ -35,53 +37,53 @@ const resolve = (parent, { eventDesignator, teamId, botId, releaseId }, context) id } } - ` + `, }, headers: { userid, - authorization: context.authorization - } + authorization: context.authorization, + }, }).then( (result) => { if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { - reject(new WrongArgumentsError('You are not eligible to register this team')) - return + rej(new WrongArgumentsError('You are not eligible to register this team')); + return; } Event.findOne({ designator: eventDesignator }).exec((err, event) => { - if (err) reject(err) - else { - let participantIndex - event.participants.find((participant, index) => { - if (participant.teamId === teamId) { - participantIndex = index - } - }) - - event.participants[participantIndex].botId = botId || event.participants[participantIndex].botId - event.participants[participantIndex].releaseId = releaseId || event.participants[participantIndex].releaseId - - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + if (err) { + rej(err); + return; } - }) + const participantIndex = event.participant + .findIndex(participant => participant.teamId === teamId); + + event.participants[participantIndex].botId = botId + || event.participants[participantIndex].botId; + event.participants[participantIndex].releaseId = releaseId + || event.participants[participantIndex].releaseId; + + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); }, (error) => { - reject(new ServiceUnavailableError(error)) - } - ) - }) -} + rej(new ServiceUnavailableError(error)); + }, + ); + }); +}; const mutation = { editParticipant: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/EditPrize.js b/server/src/schema/mutations/EditPrize.js index 70a033f3b..279733d85 100644 --- a/server/src/schema/mutations/EditPrize.js +++ b/server/src/schema/mutations/EditPrize.js @@ -1,58 +1,56 @@ import { GraphQLNonNull, GraphQLID, - GraphQLInt -} from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLInt, +} from 'graphql'; +import { AuthentificationError, DatabaseError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: GraphQLInt } -} + amount: { type: GraphQLInt }, +}; const resolve = (parent, { eventDesignator, rank, amount }, context) => { - const hostId = context.userId + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - let prizeIndex = null - event.prizes.find((prize, index) => { - if (prize.rank === rank) { - prizeIndex = index - } - }) - if (!prizeIndex) { - reject(new DatabaseError('There is no prize for that index')) - return - } - event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + const prizeIndex = event.prizes.findIndex(prize => prize.rank === rank); + if (!prizeIndex) { + rej(new DatabaseError('There is no prize for that index')); + return; + } + event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount; + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { editPrize: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js index d772dc011..c931151ce 100644 --- a/server/src/schema/mutations/EditRule.js +++ b/server/src/schema/mutations/EditRule.js @@ -1,65 +1,64 @@ import { GraphQLNonNull, GraphQLID, - GraphQLString -} from 'graphql' -import { AuthentificationError, DatabaseError, WrongArgumentsError } from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLString, +} from 'graphql'; +import { AuthentificationError, DatabaseError, WrongArgumentsError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, title: { type: new GraphQLNonNull(GraphQLString) }, newtitle: { type: GraphQLString }, - description: { type: GraphQLString } -} + description: { type: GraphQLString }, +}; -const resolve = (parent, { eventDesignator, title, newtitle, description }, context) => { - const hostId = context.userId +const resolve = (parent, { + eventDesignator, title, newtitle, description, +}, context) => { + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - let ruleIndex = null - event.rules.find((rule, index) => { - if (rule.title === title) { - ruleIndex = index - } - }) - if (!ruleIndex) { - reject(new DatabaseError('There is no rule with that title')) - return - } - event.rules[ruleIndex].description = description || event.rules[ruleIndex].description - if (event.rules.some(rule => rule.title === newtitle)) { - reject(new WrongArgumentsError('There is already a rule using your new title')) - } else { - event.rules[ruleIndex].title = newtitle || event.rules[ruleIndex].title - } - - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + const ruleIndex = event.rules.findIndex(rule => rule.title === title); + if (!ruleIndex) { + rej(new DatabaseError('There is no rule with that title')); + return; + } + event.rules[ruleIndex].description = description || event.rules[ruleIndex].description; + if (event.rules.some(rule => rule.title === newtitle)) { + rej(new WrongArgumentsError('There is already a rule using your new title')); + return; + } + event.rules[ruleIndex].title = newtitle || event.rules[ruleIndex].title; + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { editRule: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/HostEvent.js b/server/src/schema/mutations/HostEvent.js index a562f6cb4..13fd6b494 100644 --- a/server/src/schema/mutations/HostEvent.js +++ b/server/src/schema/mutations/HostEvent.js @@ -1,49 +1,52 @@ import { GraphQLNonNull, GraphQLInt, - GraphQLString -} from 'graphql' -import { AuthentificationError } from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' -import { slugify } from '../../utils/functions' + GraphQLString, +} from 'graphql'; +import { AuthentificationError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; +import { slugify } from '../../utils/functions'; const args = { name: { type: new GraphQLNonNull(GraphQLString) }, description: { type: new GraphQLNonNull(GraphQLString) }, startDatetime: { type: new GraphQLNonNull(GraphQLInt) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLInt) } -} + finishDatetime: { type: new GraphQLNonNull(GraphQLInt) }, +}; -const resolve = (parent, { name, description, startDatetime, finishDatetime }, context) => { - const hostId = context.userId +const resolve = (parent, { + name, description, startDatetime, finishDatetime, +}, context) => { + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - let newEvent = new Event({ + const newEvent = new Event({ hostId, name, description, startDatetime, - finishDatetime - }) - newEvent.designator = slugify(newEvent.name) + '-' + newEvent._id - return new Promise((resolve, reject) => { + finishDatetime, + }); + newEvent.designator = `${slugify(newEvent.name)}-${newEvent._id}`; + return new Promise((res, rej) => { newEvent.save((err) => { - if (err) reject(err) - else { - resolve(newEvent) + if (err) { + rej(err); + return; } - }) - }) -} + res(newEvent); + }); + }); +}; const mutation = { hostEvent: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index 0c852abc8..7b3ee5050 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -1,31 +1,33 @@ -import 'dotenv/config' +import 'dotenv/config'; import { GraphQLNonNull, GraphQLID, - GraphQLString -} from 'graphql' -import axios from 'axios' + GraphQLString, +} from 'graphql'; +import axios from 'axios'; import { AuthentificationError, WrongArgumentsError, - ServiceUnavailableError -} from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + ServiceUnavailableError, +} from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { designator: { type: new GraphQLNonNull(GraphQLID) }, teamId: { type: new GraphQLNonNull(GraphQLString) }, botId: { type: GraphQLString }, - releaseId: { type: GraphQLString } -} + releaseId: { type: GraphQLString }, +}; -const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { - const userid = context.userId +const resolve = (parent, { + designator, teamId, botId, releaseId, +}, context) => { + const userid = context.userId; if (!userid) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { axios({ url: process.env.TEAMS_ENDPOINT, method: 'post', @@ -36,52 +38,54 @@ const resolve = (parent, { designator, teamId, botId, releaseId }, context) => { id } } - ` + `, }, headers: { userid, - authorization: context.authorization - } + authorization: context.authorization, + }, }).then( (result) => { if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { - reject(new WrongArgumentsError('You are not eligible to register this team')) - return + rej(new WrongArgumentsError('You are not eligible to register this team')); + return; } Event.findOne({ designator }).exec((err, event) => { - if (err) reject(err) - else { - if (event.participants.some(participant => participant.teamId === teamId)) { - reject(new WrongArgumentsError('You are already registred')) - } else { - event.participants.push({ - teamId, - botId, - releaseId - }) - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) - } + if (err) { + rej(err); + return; } - }) + if (event.participants.some(participant => participant.teamId === teamId)) { + rej(new WrongArgumentsError('You are already registred')); + return; + } + event.participants.push({ + teamId, + botId, + releaseId, + }); + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); }, (error) => { - reject(new ServiceUnavailableError(error)) - } - ) - }) -} + rej(new ServiceUnavailableError(error)); + }, + ); + }); +}; const mutation = { registerToEvent: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js index 0a29865d4..8f16546aa 100644 --- a/server/src/schema/mutations/ReorderRules.js +++ b/server/src/schema/mutations/ReorderRules.js @@ -1,57 +1,60 @@ import { GraphQLNonNull, GraphQLID, - GraphQLInt -} from 'graphql' -import { AuthentificationError, DatabaseError } from '../../errors' -import { isBetween } from '../../utils/functions' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLInt, +} from 'graphql'; +import { AuthentificationError, DatabaseError } from '../../errors'; +import { isBetween } from '../../utils/functions'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, fromPosition: { type: new GraphQLNonNull(GraphQLInt) }, - toPosition: { type: new GraphQLNonNull(GraphQLInt) } -} + toPosition: { type: new GraphQLNonNull(GraphQLInt) }, +}; const resolve = (parent, { eventDesignator, fromPosition, toPosition }, context) => { - const hostId = context.userId + const hostId = context.userId; if (!hostId) { - throw new AuthentificationError() + throw new AuthentificationError(); } - return new Promise((resolve, reject) => { + return new Promise((res, rej) => { Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')) - } else { - const delta = fromPosition > toPosition ? 1 : -1 - event.rules.forEach((part) => { - if (part.position === fromPosition) { - part.position = toPosition - } else if (isBetween(part.position, fromPosition, toPosition)) { - part.position += delta - } - }) - - event.save((err) => { - if (err) reject(err) - else { - resolve(event) - } - }) + rej(err); + return; } - }) - }) -} + if (!event) { + rej(new DatabaseError('None of the events you own respond to that designator')); + return; + } + const delta = fromPosition > toPosition ? 1 : -1; + event.rules.forEach((part) => { + if (part.position === fromPosition) { + part.position = toPosition; + } else if (isBetween(part.position, fromPosition, toPosition)) { + part.position += delta; + } + }); + + event.save((error) => { + if (error) { + rej(error); + return; + } + res(event); + }); + }); + }); +}; const mutation = { reorderRules: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default mutation +export default mutation; diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index a49ba5114..ffefe7dcf 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -1,20 +1,20 @@ import { - GraphQLObjectType -} from 'graphql' + GraphQLObjectType, +} from 'graphql'; -import HostEventMutation from './HostEvent' -import EditEventMutation from './EditEvent' -import RegisterToEventMutation from './RegisterToEvent' -import EditParticipantMutation from './EditParticipant' -import AddRuleMutation from './AddRule' -import EditRuleMutation from './EditRule' -import ReorderRulesMutation from './ReorderRules' -import AddPrizeMutation from './AddPrize' -import EditPrizeMutation from './EditPrize' -import CreateFormulaMutation from './CreateFormula' -import CreateAndSetFormulaMutation from './CreateAndSetFormula' -import CreatePlotterMutation from './CreatePlotter' -import CreateAndSetPlotterMutation from './CreateAndSetPlotter' +import HostEventMutation from './HostEvent'; +import EditEventMutation from './EditEvent'; +import RegisterToEventMutation from './RegisterToEvent'; +import EditParticipantMutation from './EditParticipant'; +import AddRuleMutation from './AddRule'; +import EditRuleMutation from './EditRule'; +import ReorderRulesMutation from './ReorderRules'; +import AddPrizeMutation from './AddPrize'; +import EditPrizeMutation from './EditPrize'; +import CreateFormulaMutation from './CreateFormula'; +import CreateAndSetFormulaMutation from './CreateAndSetFormula'; +import CreatePlotterMutation from './CreatePlotter'; +import CreateAndSetPlotterMutation from './CreateAndSetPlotter'; const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -31,8 +31,8 @@ const Mutation = new GraphQLObjectType({ CreateFormulaMutation, CreateAndSetFormulaMutation, CreatePlotterMutation, - CreateAndSetPlotterMutation - ) -}) + CreateAndSetPlotterMutation, + ), +}); -export default Mutation +export default Mutation; diff --git a/server/src/schema/queries/Event.js b/server/src/schema/queries/Event.js index 64eee0855..c35d48f47 100644 --- a/server/src/schema/queries/Event.js +++ b/server/src/schema/queries/Event.js @@ -1,35 +1,35 @@ import { GraphQLNonNull, - GraphQLID -} from 'graphql' -import { DatabaseError } from '../../errors' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLID, +} from 'graphql'; +import { DatabaseError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { - designator: { type: new GraphQLNonNull(GraphQLID) } -} + designator: { type: new GraphQLNonNull(GraphQLID) }, +}; -const resolve = (parent, { designator }, context) => { - return new Promise((resolve, reject) => { - Event.findOne({ designator }).exec((err, event) => { - if (err) { - reject(err) - } else if (!event) { - reject(new DatabaseError('None of the events respond to that designator')) - } else { - resolve(event) - } - }) - }) -} +const resolve = (parent, { designator }) => new Promise((res, rej) => { + Event.findOne({ designator }).exec((err, event) => { + if (err) { + rej(err); + return; + } + if (!event) { + rej(new DatabaseError('None of the events respond to that designator')); + return; + } + res(event); + }); +}); const query = { event: { type: EventType, args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/Events.js b/server/src/schema/queries/Events.js index 636988ac4..c5b1b5e9f 100644 --- a/server/src/schema/queries/Events.js +++ b/server/src/schema/queries/Events.js @@ -1,35 +1,35 @@ import { GraphQLInt, - GraphQLList -} from 'graphql' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLList, +} from 'graphql'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt } -} + maxDate: { type: GraphQLInt }, +}; -const resolve = (parent, { minDate, maxDate }, context) => { - return Event.find( - Object.assign( - minDate || maxDate - ? { startDatetime: +const resolve = (parent, { minDate, maxDate }) => Event.find( + Object.assign( + minDate || maxDate + ? { + startDatetime: Object.assign( minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {} - ) } - : {} - ) - ) -} + maxDate ? { $lte: maxDate } : {}, + ), + } + : {}, + ), +); const query = { events: { type: new GraphQLList(EventType), args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js index 8a6d35848..ac4975f40 100644 --- a/server/src/schema/queries/EventsByHost.js +++ b/server/src/schema/queries/EventsByHost.js @@ -1,38 +1,38 @@ import { GraphQLInt, GraphQLList, - GraphQLString -} from 'graphql' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLString, +} from 'graphql'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { hostId: { type: GraphQLString }, minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt } -} + maxDate: { type: GraphQLInt }, +}; -const resolve = (parent, { hostId, minDate, maxDate }, context) => { - return Event.find( - Object.assign( - hostId ? { hostId } : { hostId: context.userId }, - minDate || maxDate - ? { startDatetime: +const resolve = (parent, { hostId, minDate, maxDate }, context) => Event.find( + Object.assign( + hostId ? { hostId } : { hostId: context.userId }, + minDate || maxDate + ? { + startDatetime: Object.assign( minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {} - ) } - : {} - ) - ) -} + maxDate ? { $lte: maxDate } : {}, + ), + } + : {}, + ), +); const query = { eventsByHost: { type: new GraphQLList(EventType), args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/EventsByTeam.js b/server/src/schema/queries/EventsByTeam.js index 8c28391d7..10a914288 100644 --- a/server/src/schema/queries/EventsByTeam.js +++ b/server/src/schema/queries/EventsByTeam.js @@ -2,38 +2,38 @@ import { GraphQLInt, GraphQLList, GraphQLString, - GraphQLNonNull -} from 'graphql' -import { EventType } from '../types' -import { Event } from '../../models' + GraphQLNonNull, +} from 'graphql'; +import { EventType } from '../types'; +import { Event } from '../../models'; const args = { teamId: { type: new GraphQLNonNull(GraphQLString) }, minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt } -} + maxDate: { type: GraphQLInt }, +}; -const resolve = (parent, { teamId, minDate, maxDate }, context) => { - return Event.find( - Object.assign( - { participants: { $elemMatch: { teamId } } }, - minDate || maxDate - ? { startDatetime: +const resolve = (parent, { teamId, minDate, maxDate }) => Event.find( + Object.assign( + { participants: { $elemMatch: { teamId } } }, + minDate || maxDate + ? { + startDatetime: Object.assign( minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {} - ) } - : {} - ) - ) -} + maxDate ? { $lte: maxDate } : {}, + ), + } + : {}, + ), +); const query = { eventsByTeam: { type: new GraphQLList(EventType), args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/Formulas.js b/server/src/schema/queries/Formulas.js index 158fcf853..390587fdc 100644 --- a/server/src/schema/queries/Formulas.js +++ b/server/src/schema/queries/Formulas.js @@ -1,21 +1,19 @@ import { - GraphQLList -} from 'graphql' -import { FormulaType } from '../types' -import { Formula } from '../../models' + GraphQLList, +} from 'graphql'; +import { FormulaType } from '../types'; +import { Formula } from '../../models'; -const args = {} +const args = {}; -const resolve = (parent, args, context) => { - return Formula.find() -} +const resolve = () => Formula.find(); const query = { formulas: { type: new GraphQLList(FormulaType), args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/Plotters.js b/server/src/schema/queries/Plotters.js index 9bdc46296..b927041f0 100644 --- a/server/src/schema/queries/Plotters.js +++ b/server/src/schema/queries/Plotters.js @@ -1,21 +1,19 @@ import { - GraphQLList -} from 'graphql' -import { PlotterType } from '../types' -import { Plotter } from '../../models' + GraphQLList, +} from 'graphql'; +import { PlotterType } from '../types'; +import { Plotter } from '../../models'; -const args = {} +const args = {}; -const resolve = (parent, args, context) => { - return Plotter.find() -} +const resolve = () => Plotter.find(); const query = { plotters: { type: new GraphQLList(PlotterType), args, - resolve - } -} + resolve, + }, +}; -export default query +export default query; diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js index 5d67c43bb..1daa62ea1 100644 --- a/server/src/schema/queries/index.js +++ b/server/src/schema/queries/index.js @@ -1,13 +1,13 @@ import { - GraphQLObjectType -} from 'graphql' + GraphQLObjectType, +} from 'graphql'; -import EventQuery from './Event' -import EventsQuery from './Events' -import EventsByHostQuery from './EventsByHost' -import EventsByTeamQuery from './EventsByTeam' -import FormulasQuery from './Formulas' -import PlottersQuery from './Plotters' +import EventQuery from './Event'; +import EventsQuery from './Events'; +import EventsByHostQuery from './EventsByHost'; +import EventsByTeamQuery from './EventsByTeam'; +import FormulasQuery from './Formulas'; +import PlottersQuery from './Plotters'; const RootQuery = new GraphQLObjectType({ name: 'RootQueryType', @@ -17,8 +17,8 @@ const RootQuery = new GraphQLObjectType({ EventsByHostQuery, EventsByTeamQuery, FormulasQuery, - PlottersQuery - ) -}) + PlottersQuery, + ), +}); -export default RootQuery +export default RootQuery; diff --git a/server/src/schema/types/AdditionalPrize.js b/server/src/schema/types/AdditionalPrize.js index f78c24d13..ee3a791ff 100644 --- a/server/src/schema/types/AdditionalPrize.js +++ b/server/src/schema/types/AdditionalPrize.js @@ -1,16 +1,16 @@ import { GraphQLObjectType, GraphQLString, - GraphQLInt -} from 'graphql' + GraphQLInt, +} from 'graphql'; const AdditionalPrizeType = new GraphQLObjectType({ name: 'OtherPrize', fields: () => ({ condition: { type: GraphQLString }, amount: { type: GraphQLInt }, - asset: { type: GraphQLString } - }) -}) + asset: { type: GraphQLString }, + }), +}); -export default AdditionalPrizeType +export default AdditionalPrizeType; diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index 1bb76b3a6..7917e3032 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -3,15 +3,15 @@ import { GraphQLInt, GraphQLString, GraphQLList, - GraphQLID -} from 'graphql' + GraphQLID, +} from 'graphql'; import { FormulaType, PlotterType, RuleType, ParticipantType, - PrizeType -} from './index' + PrizeType, +} from './index'; const EventType = new GraphQLObjectType({ name: 'Event', @@ -24,35 +24,35 @@ const EventType = new GraphQLObjectType({ finishDatetime: { type: GraphQLInt }, formula: { type: FormulaType, - resolve (parent, args) { - return parent.formula - } + resolve(parent) { + return parent.formula; + }, }, plotter: { type: PlotterType, - resolve (parent, args) { - return parent.plotter - } + resolve(parent) { + return parent.plotter; + }, }, rules: { type: new GraphQLList(RuleType), - resolve (parent, args) { - return parent.rules - } + resolve(parent) { + return parent.rules; + }, }, participants: { type: new GraphQLList(ParticipantType), - resolve (parent, args) { - return parent.participants - } + resolve(parent) { + return parent.participants; + }, }, prizes: { type: new GraphQLList(PrizeType), - resolve (parent, args) { - return parent.prizes - } - } - }) -}) + resolve(parent) { + return parent.prizes; + }, + }, + }), +}); -export default EventType +export default EventType; diff --git a/server/src/schema/types/Formula.js b/server/src/schema/types/Formula.js index b081cae14..f5d312327 100644 --- a/server/src/schema/types/Formula.js +++ b/server/src/schema/types/Formula.js @@ -1,8 +1,8 @@ import { GraphQLObjectType, GraphQLString, - GraphQLBoolean -} from 'graphql' + GraphQLBoolean, +} from 'graphql'; const FormulaType = new GraphQLObjectType({ name: 'Formula', @@ -10,8 +10,8 @@ const FormulaType = new GraphQLObjectType({ id: { type: GraphQLString }, ownerId: { type: GraphQLString }, isTemplate: { type: GraphQLBoolean }, - name: { type: GraphQLString } - }) -}) + name: { type: GraphQLString }, + }), +}); -export default FormulaType +export default FormulaType; diff --git a/server/src/schema/types/Participant.js b/server/src/schema/types/Participant.js index 038c30a07..f3afb7745 100644 --- a/server/src/schema/types/Participant.js +++ b/server/src/schema/types/Participant.js @@ -1,15 +1,15 @@ import { GraphQLObjectType, - GraphQLString -} from 'graphql' + GraphQLString, +} from 'graphql'; const ParticipantType = new GraphQLObjectType({ name: 'Participant', fields: () => ({ teamId: { type: GraphQLString }, botId: { type: GraphQLString }, - releaseId: { type: GraphQLString } - }) -}) + releaseId: { type: GraphQLString }, + }), +}); -export default ParticipantType +export default ParticipantType; diff --git a/server/src/schema/types/Plotter.js b/server/src/schema/types/Plotter.js index 610870eb6..9e86390a5 100644 --- a/server/src/schema/types/Plotter.js +++ b/server/src/schema/types/Plotter.js @@ -1,8 +1,8 @@ import { GraphQLObjectType, GraphQLString, - GraphQLBoolean -} from 'graphql' + GraphQLBoolean, +} from 'graphql'; const PlotterType = new GraphQLObjectType({ name: 'Plotter', @@ -13,8 +13,8 @@ const PlotterType = new GraphQLObjectType({ name: { type: GraphQLString }, host: { type: GraphQLString }, repo: { type: GraphQLString }, - moduleName: { type: GraphQLString } - }) -}) + moduleName: { type: GraphQLString }, + }), +}); -export default PlotterType +export default PlotterType; diff --git a/server/src/schema/types/Prize.js b/server/src/schema/types/Prize.js index aa0cabc38..4b2fc8aba 100644 --- a/server/src/schema/types/Prize.js +++ b/server/src/schema/types/Prize.js @@ -1,9 +1,9 @@ import { GraphQLObjectType, GraphQLList, - GraphQLInt -} from 'graphql' -import { AdditionalPrizeType } from './index' + GraphQLInt, +} from 'graphql'; +import { AdditionalPrizeType } from './index'; const PrizeType = new GraphQLObjectType({ name: 'Prize', @@ -12,11 +12,11 @@ const PrizeType = new GraphQLObjectType({ amount: { type: GraphQLInt }, additional: { type: new GraphQLList(AdditionalPrizeType), - resolve (parent, args) { - return parent.additional - } - } - }) -}) + resolve(parent) { + return parent.additional; + }, + }, + }), +}); -export default PrizeType +export default PrizeType; diff --git a/server/src/schema/types/Rule.js b/server/src/schema/types/Rule.js index b9a5d59ca..e39a877fc 100644 --- a/server/src/schema/types/Rule.js +++ b/server/src/schema/types/Rule.js @@ -1,16 +1,16 @@ import { GraphQLObjectType, GraphQLInt, - GraphQLString -} from 'graphql' + GraphQLString, +} from 'graphql'; const RuleType = new GraphQLObjectType({ name: 'Rule', fields: () => ({ position: { type: GraphQLInt }, title: { type: GraphQLString }, - description: { type: GraphQLString } - }) -}) + description: { type: GraphQLString }, + }), +}); -export default RuleType +export default RuleType; diff --git a/server/src/schema/types/index.js b/server/src/schema/types/index.js index be64a7f25..a96f2f4db 100644 --- a/server/src/schema/types/index.js +++ b/server/src/schema/types/index.js @@ -1,10 +1,10 @@ -import PlotterType from './Plotter' -import RuleType from './Rule' -import ParticipantType from './Participant' -import AdditionalPrizeType from './AdditionalPrize' -import PrizeType from './Prize' -import FormulaType from './Formula' -import EventType from './Event' +import PlotterType from './Plotter'; +import RuleType from './Rule'; +import ParticipantType from './Participant'; +import AdditionalPrizeType from './AdditionalPrize'; +import PrizeType from './Prize'; +import FormulaType from './Formula'; +import EventType from './Event'; export { PlotterType, @@ -13,5 +13,5 @@ export { AdditionalPrizeType, PrizeType, FormulaType, - EventType -} + EventType, +}; diff --git a/server/src/utils/functions.js b/server/src/utils/functions.js index 0963b4b45..c37b1d87e 100644 --- a/server/src/utils/functions.js +++ b/server/src/utils/functions.js @@ -1,26 +1,19 @@ -export const capitalize = (string) => { - return (string).charAt(0).toUpperCase() + (string).slice(1) -} +export const capitalize = string => (string).charAt(0).toUpperCase() + (string).slice(1); -export const slugify = (text) => { - return text.toString().toLowerCase() - .replace(/\s+/g, '-') - .replace(/[^\w\-]+/g, '') - .replace(/\-\-+/g, '-') - .replace(/^-+/, '') - .replace(/-+$/, '') -} +export const slugify = text => text.toString().toLowerCase() + .replace(/\s+/g, '-') + .replace(/[^\w-]+/g, '') + .replace(/--+/g, '-') + .replace(/^-+/, '') + .replace(/-+$/, ''); -export const epoch = () => { - return Math.round(new Date().getTime() / 1000) -} +export const epoch = () => Math.round(new Date().getTime() / 1000); export const isBetween = (value, valA, valB) => { - const min = valA < valB ? valA : valB - const max = valA > valB ? valA : valB + const min = valA < valB ? valA : valB; + const max = valA > valB ? valA : valB; if (value >= min && value <= max) { - return true - } else { - return false + return true; } -} + return false; +}; From df4dbef6d008a168fb091b9b17233b94dd301a7a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 05:04:19 +0100 Subject: [PATCH 077/146] correcting a mistake made during linting --- server/src/models/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/models/event.js b/server/src/models/event.js index a3aefc289..c72ce3187 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -37,7 +37,7 @@ const eventSchema = new Schema({ }], }); -eventSchema.pre('find', () => { +eventSchema.pre('find', function populate() { this.populate('formula').populate('plotter'); }); eventSchema.post('save', (doc, next) => { From 205b45149573df4b3d22d867b634c7f6cbf0c43b Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 05:19:16 +0100 Subject: [PATCH 078/146] adding some data to error returning --- server/src/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/index.js b/server/src/index.js index 2ec8de3d2..683314b41 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -43,6 +43,14 @@ app.use('/graphql', graphqlHTTP(req => ({ userId: req.headers.userid, authorization: req.headers.authorization, }, + formatError(err) { + return { + message: err.message, + code: err.originalError && err.originalError.code, + locations: err.locations, + path: err.path, + }; + }, }))); app.get('/playground', expressPlayground({ endpoint: '/graphql' })); From 83fc42aecd9382da0bab5948d8beb483ee547e4b Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 06:48:42 +0100 Subject: [PATCH 079/146] Setting up sentry for both logging and error handling (unfinished) --- server/src/errors/index.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/server/src/errors/index.js b/server/src/errors/index.js index d97fc3ec5..15b0635a1 100644 --- a/server/src/errors/index.js +++ b/server/src/errors/index.js @@ -1,22 +1,44 @@ -export class AuthentificationError extends Error { +import * as Sentry from '@sentry/node'; + +class ClientError extends Error { + constructor(args) { + super(args); + Sentry.configureScope((scope) => { + scope.setLevel('info'); + }); + Sentry.captureException(this); + } +} + +class ServerError extends Error { + constructor(args) { + super(args); + Sentry.configureScope((scope) => { + scope.setLevel('error'); + }); + Sentry.captureException(this); + } +} + +export class AuthentificationError extends ClientError { code = 401 message = 'Autentification not found, you have to be authentificated to perform this action' } -export class DatabaseError extends Error { +export class DatabaseError extends ClientError { code = 404 message = `Ressource not found : ${this.message}` } -export class WrongArgumentsError extends Error { +export class WrongArgumentsError extends ClientError { code = 400 message = `Wrong arguments : ${this.message}` } -export class ServiceUnavailableError extends Error { +export class ServiceUnavailableError extends ServerError { code = 503 message = `At least one service is unresponding ${this.message}` From faa235dc02aa36a979300d25f5da6d583ccd8d03 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 07:22:09 +0100 Subject: [PATCH 080/146] Removing location from error message --- server/src/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/index.js b/server/src/index.js index 683314b41..ee5d09cfe 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -47,7 +47,6 @@ app.use('/graphql', graphqlHTTP(req => ({ return { message: err.message, code: err.originalError && err.originalError.code, - locations: err.locations, path: err.path, }; }, From c2960123eeb27fffbb6d8f5b1e67f30cc4a8d26d Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 08:04:53 +0100 Subject: [PATCH 081/146] a minimal refactoring of the entrypoint --- server/src/app.js | 40 ++++++++++++++++++++++ server/src/db.js | 9 +++++ server/src/errors/index.js | 2 +- server/src/index.js | 69 +++++++++----------------------------- 4 files changed, 65 insertions(+), 55 deletions(-) create mode 100644 server/src/app.js create mode 100644 server/src/db.js diff --git a/server/src/app.js b/server/src/app.js new file mode 100644 index 000000000..b36f54aef --- /dev/null +++ b/server/src/app.js @@ -0,0 +1,40 @@ +import 'dotenv/config'; +import express from 'express'; +import cors from 'cors'; +import graphqlHTTP from 'express-graphql'; +import expressPlayground from 'graphql-playground-middleware-express'; +import * as Sentry from '@sentry/node'; +import schema from './schema'; + +const app = express(); + +// Initialising sentry +Sentry.init({ dsn: process.env.SENTRY_DNS }); +app.use(Sentry.Handlers.requestHandler()); + +// authorising CORS +app.use(cors()); + +// Starting the graphql server +app.use('/graphql', graphqlHTTP(req => ({ + schema, + context: { + userId: req.headers.userid, + authorization: req.headers.authorization, + }, + formatError(err) { + return { + message: err.message, + code: err.originalError && err.originalError.code, + path: err.path, + }; + }, +}))); + +// Starting the graphql server +app.get('/playground', expressPlayground({ endpoint: '/graphql' })); + +// Sentry error handling middleware if anything pass through +app.use(Sentry.Handlers.errorHandler()); + +export default app; diff --git a/server/src/db.js b/server/src/db.js new file mode 100644 index 000000000..4492e884f --- /dev/null +++ b/server/src/db.js @@ -0,0 +1,9 @@ +import 'dotenv/config'; +import mongoose from 'mongoose'; + +mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); +mongoose.Promise = global.Promise; + +const db = mongoose.connection; + +export default db; diff --git a/server/src/errors/index.js b/server/src/errors/index.js index 15b0635a1..16c3974f1 100644 --- a/server/src/errors/index.js +++ b/server/src/errors/index.js @@ -4,7 +4,7 @@ class ClientError extends Error { constructor(args) { super(args); Sentry.configureScope((scope) => { - scope.setLevel('info'); + scope.setLevel('debug'); }); Sentry.captureException(this); } diff --git a/server/src/index.js b/server/src/index.js index ee5d09cfe..f9b2c65f3 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -1,60 +1,21 @@ /* eslint-disable no-console */ -import express from 'express'; -import 'dotenv/config'; -import cors from 'cors'; -import mongoose from 'mongoose'; -import graphqlHTTP from 'express-graphql'; -import expressPlayground from 'graphql-playground-middleware-express'; import * as Sentry from '@sentry/node'; +import db from './db'; +import app from './app'; -import schema from './schema'; - -// Initialise express -const app = express(); - -// Initialising sentry -Sentry.init({ dsn: process.env.SENTRY_DNS }); -app.use(Sentry.Handlers.requestHandler()); - -// Allow cross origing request -app.use(cors()); -/* ------------------------------------------------- ----------------- Database setup -------------------- -------------------------------------------------- */ -// Database Connection -mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); - -// Get Mongoose to use the global promise library -mongoose.Promise = global.Promise; - -// Get the default connection -const db = mongoose.connection; - -// bind error and success to console log -db.on('error', () => { console.error.bind(console, 'MongoDB connection error:'); }); -db.once('open', () => { console.log('Connected to the DB.'); }); - -/* ------------------------------------------------- ------------------ Graphql setup -------------------- -------------------------------------------------- */ -app.use('/graphql', graphqlHTTP(req => ({ - schema, - context: { - userId: req.headers.userid, - authorization: req.headers.authorization, - }, - formatError(err) { - return { - message: err.message, - code: err.originalError && err.originalError.code, - path: err.path, - }; - }, -}))); -app.get('/playground', expressPlayground({ endpoint: '/graphql' })); - -// Sentry error handling middleware -app.use(Sentry.Handlers.errorHandler()); +// Bind server success and error to sentry +db.on('error', (err) => { + Sentry.configureScope((scope) => { + scope.setLevel('error'); + }); + Sentry.captureException(err); +}); +db.once('open', () => { + Sentry.configureScope((scope) => { + scope.setLevel('info'); + }); + Sentry.captureMessage('Connected to the DB.'); +}); app.listen(process.env.PORT, () => { console.log(`Listening on port ${process.env.PORT}`); From 8cf29dbfc811e876f719f9a035fa28ff0d3a56c1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 08:19:27 +0100 Subject: [PATCH 082/146] updating package-lock --- server/package-lock.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index 7a13f7e72..24a7e0716 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -2584,12 +2584,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2604,17 +2606,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2731,7 +2736,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2743,6 +2749,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2757,6 +2764,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2764,12 +2772,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2788,6 +2798,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2868,7 +2879,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2880,6 +2892,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3001,6 +3014,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", From a94371f750ff3f3db6c16b0345a45b40e44da746 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 08:28:17 +0100 Subject: [PATCH 083/146] renaming in packages --- client/package-lock.json | 2 +- client/package.json | 4 ++-- server/package-lock.json | 30 ++++++++---------------------- server/package.json | 4 ++-- 4 files changed, 13 insertions(+), 27 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 01e8e63e4..9ebb00764 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@advancedalgos/hosts-client", + "name": "@advancedalgos/events-client", "version": "0.0.1", "lockfileVersion": 1, "requires": true, diff --git a/client/package.json b/client/package.json index 9d800caa2..96d0f6959 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { - "name": "@advancedalgos/hosts-client", + "name": "@advancedalgos/events-client", "version": "0.0.1", - "description": "Advanced Algos Host client-side web app", + "description": "Advanced Algos Event client-side web app", "author": "", "license": "", "main": "src/index.js", diff --git a/server/package-lock.json b/server/package-lock.json index 24a7e0716..c44492725 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,5 +1,5 @@ { - "name": "hosts-server", + "name": "events-server", "version": "0.1.0", "lockfileVersion": 1, "requires": true, @@ -2584,14 +2584,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2606,20 +2604,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -2736,8 +2731,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -2749,7 +2743,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2764,7 +2757,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2772,14 +2764,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2798,7 +2788,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2879,8 +2868,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -2892,7 +2880,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3014,7 +3001,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/server/package.json b/server/package.json index a783ba4fc..73c601f30 100644 --- a/server/package.json +++ b/server/package.json @@ -1,7 +1,7 @@ { - "name": "hosts-server", + "name": "events-server", "version": "0.1.0", - "description": "Advanced Algos Host backend API", + "description": "Advanced Algos Event backend API", "author": "", "license": "", "main": "src/index.js", From 7e7dbc140182b7c8b4e4ed3b6e8762e86639b9a0 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 08:28:43 +0100 Subject: [PATCH 084/146] Renaming hosts to events at as many places as possible --- README.md | 2 +- client/src/Components/Event/Edit/index.js | 4 ++-- client/src/Components/Event/Show/index.js | 4 ++-- client/src/Components/HostedEvents/New.js | 10 +++++----- client/src/Components/HostedEvents/index.js | 4 ++-- client/src/Components/Search/index.js | 10 +++++----- client/src/GraphQL/Calls/hostedEvents.js | 12 ++++++------ client/src/GraphQL/Calls/listEvents.js | 6 +++--- client/src/GraphQL/Calls/showEvent.js | 6 +++--- client/src/GraphQL/Fragments/event.js | 4 ++-- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 0bd7356a6..7efa4baa6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # HostsModule -This module manages competition hosts +This module manages competition events diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 803c9e2cc..1a17154bb 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -21,7 +21,7 @@ class Edit extends React.Component { Enroll in an competition {this.props.match.params.slug} {({ loading, error, data }) => { @@ -29,7 +29,7 @@ class Edit extends React.Component { if (error) return `Error! ${error.message}` return (

- {data.hosts_Event.description} + {data.events_Event.description}

) }} diff --git a/client/src/Components/Event/Show/index.js b/client/src/Components/Event/Show/index.js index d0e89c9d6..aaf59fb06 100644 --- a/client/src/Components/Event/Show/index.js +++ b/client/src/Components/Event/Show/index.js @@ -21,7 +21,7 @@ class Show extends React.Component { Enroll in an competition {this.props.match.params.slug} {({ loading, error, data }) => { @@ -29,7 +29,7 @@ class Show extends React.Component { if (error) return `Error! ${error.message}` return (

- {data.hosts_Event.description} + {data.events_Event.description}

) }} diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/HostedEvents/New.js index f5567122d..61b4d72ff 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/HostedEvents/New.js @@ -24,14 +24,14 @@ class New extends React.Component { render () { const { name, description, startDatetime, finishDatetime } = this.state return ( - { - const { hosts_EventsByHost: hostedEvents } = store.readQuery({ query: hostedEventsCalls.HOSTS_EVENTSBYHOST }) + const { events_EventsByHost: hostedEvents } = store.readQuery({ query: hostedEventsCalls.EVENTS_EVENTSBYHOST }) store.writeQuery({ - query: hostedEventsCalls.HOSTS_EVENTSBYHOST, - data: { hosts_EventsByHost: hostedEvents.concat([data.hosts_HostEvent]) } + query: hostedEventsCalls.EVENTS_EVENTSBYHOST, + data: { events_EventsByHost: hostedEvents.concat([data.events_HostEvent]) } }) - this.props.handleNewEvent(data.hosts_HostEvent) + this.props.handleNewEvent(data.events_HostEvent) } } > diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index ff6b6e600..4ccfd907d 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -40,12 +40,12 @@ class HostedEvent extends React.Component { {({ loading, error, data }) => { if (loading) return 'Loading...' if (error) return `Error! ${error.message}` - const list = data.hosts_EventsByHost.map((event, index) => { + const list = data.events_EventsByHost.map((event, index) => { return ( ) diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index e432c8a8c..0d50b2f86 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -51,7 +51,7 @@ class Search extends React.Component { const { value } = this.state return ( {({ loading, error, data }) => { if (loading) return 'Loading...' @@ -59,10 +59,10 @@ class Search extends React.Component { const now = ~~(DateTime.local().valueOf() / 1000) const inTwoWeeks = ~~(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000) - const IncomingEvents = data.hosts_Events.filter(event => event.startDatetime > now && event.startDatetime < inTwoWeeks) - const OngoingEvents = data.hosts_Events.filter(event => event.finishDatetime > now && event.startDatetime < now) - const FutureEvents = data.hosts_Events.filter(event => event.startDatetime > now) - const PastEvents = data.hosts_Events.filter(event => event.finishDatetime < now) + const IncomingEvents = data.events_Events.filter(event => event.startDatetime > now && event.startDatetime < inTwoWeeks) + const OngoingEvents = data.events_Events.filter(event => event.finishDatetime > now && event.startDatetime < now) + const FutureEvents = data.events_Events.filter(event => event.startDatetime > now) + const PastEvents = data.events_Events.filter(event => event.finishDatetime < now) return ( diff --git a/client/src/GraphQL/Calls/hostedEvents.js b/client/src/GraphQL/Calls/hostedEvents.js index 850290690..05b3f77f2 100644 --- a/client/src/GraphQL/Calls/hostedEvents.js +++ b/client/src/GraphQL/Calls/hostedEvents.js @@ -1,23 +1,23 @@ import gql from 'graphql-tag' import { eventMinimalInfo } from '../Fragments' -const HOSTS_HOSTEVENT = gql` +const EVENTS_HOSTEVENT = gql` mutation Hosts_HostEvent($name: String!, $description: String!, $startDatetime: Int!, $finishDatetime: Int!) { - hosts_HostEvent(name: $name, description: $description, startDatetime: $startDatetime, finishDatetime: $finishDatetime) { + events_HostEvent(name: $name, description: $description, startDatetime: $startDatetime, finishDatetime: $finishDatetime) { ...EventMinimalInfo } } ${eventMinimalInfo} ` -const HOSTS_EVENTSBYHOST = gql` +const EVENTS_EVENTSBYHOST = gql` query Hosts_EventsByHost{ - hosts_EventsByHost { + events_EventsByHost { ...EventMinimalInfo } } ${eventMinimalInfo} ` export default { - HOSTS_HOSTEVENT, - HOSTS_EVENTSBYHOST + EVENTS_HOSTEVENT, + EVENTS_EVENTSBYHOST } diff --git a/client/src/GraphQL/Calls/listEvents.js b/client/src/GraphQL/Calls/listEvents.js index 39084f491..c115eb746 100644 --- a/client/src/GraphQL/Calls/listEvents.js +++ b/client/src/GraphQL/Calls/listEvents.js @@ -1,14 +1,14 @@ import gql from 'graphql-tag' import { eventMinimalInfo } from '../Fragments' -const HOSTS_EVENTS = gql` +const EVENTS_EVENTS = gql` query Hosts_Events{ - hosts_Events { + events_Events { ...EventMinimalInfo } } ${eventMinimalInfo} ` export default { - HOSTS_EVENTS + EVENTS_EVENTS } diff --git a/client/src/GraphQL/Calls/showEvent.js b/client/src/GraphQL/Calls/showEvent.js index 1f06bf226..b26b0e0dc 100644 --- a/client/src/GraphQL/Calls/showEvent.js +++ b/client/src/GraphQL/Calls/showEvent.js @@ -1,9 +1,9 @@ import gql from 'graphql-tag' import { eventFullInfo } from '../Fragments' -const HOSTS_EVENT = gql` +const EVENTS_EVENT = gql` query Hosts_Event($designator: ID!) { - hosts_Event(designator: $designator) { + events_Event(designator: $designator) { ...EventFullInfo } } @@ -11,5 +11,5 @@ const HOSTS_EVENT = gql` ` export default { - HOSTS_EVENT + EVENTS_EVENT } diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js index 3b5f3c3ac..9fd7a4610 100644 --- a/client/src/GraphQL/Fragments/event.js +++ b/client/src/GraphQL/Fragments/event.js @@ -1,7 +1,7 @@ import gql from 'graphql-tag' export const eventMinimalInfo = gql` - fragment EventMinimalInfo on hosts_Event { + fragment EventMinimalInfo on events_Event { name designator startDatetime @@ -16,7 +16,7 @@ export const eventMinimalInfo = gql` ` export const eventFullInfo = gql` - fragment EventFullInfo on hosts_Event { + fragment EventFullInfo on events_Event { designator name host{ From 46f2bf04cbcd25922ae27b921e15cbc70045503c Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Thu, 1 Nov 2018 08:34:26 +0100 Subject: [PATCH 085/146] renaming routes --- client/src/Components/HostedEvents/Event.js | 4 ++-- client/src/Components/HostedEvents/index.js | 2 +- client/src/Components/Search/Event.js | 2 +- client/src/Components/TopBar/data.js | 4 ++-- client/src/index.js | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 37599da1b..47ad49c54 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -48,7 +48,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/event/${designator}/edit`} + to={`/edit/${designator}`} > Edit @@ -58,7 +58,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/event/' + designator} + to={'/show/' + designator} > Show diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index 4ccfd907d..248d0d929 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -26,7 +26,7 @@ class HostedEvent extends React.Component { } handleNewEvent = (event) => { - this.props.history.push(`/event/${event.designator}/edit`) + this.props.history.push(`/edit/${event.designator}`) }; render () { diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index bce6d2433..8a3579416 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -48,7 +48,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/event/' + designator} + to={'/show/' + designator} > Show diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 37d33c471..8726e606d 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -4,8 +4,8 @@ import LibraryAddIcon from '@material-ui/icons/LibraryAdd' const data = [ { title: 'Look for an event', to: '/', icon: SearchIcon, text: '' }, - { title: 'Events you are enrolled in', to: '/events', icon: GamesIcon, text: '' }, - { title: 'Host your own competition', to: '/hosted-events', icon: LibraryAddIcon, text: '' } + { title: 'Events you are enrolled in', to: '/my', icon: GamesIcon, text: '' }, + { title: 'Host your own competition', to: '/host', icon: LibraryAddIcon, text: '' } ] export default data diff --git a/client/src/index.js b/client/src/index.js index 245f4fa01..6989c8551 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -43,10 +43,10 @@ class App extends Component { {loggedIn} - - - - + + + + From ae283718714cce092c796f075b4b38026478baf0 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 2 Nov 2018 16:01:25 +0100 Subject: [PATCH 086/146] Switching to apollo server --- server/package-lock.json | 671 +++++++++++++++++++++++++++++++++------ server/package.json | 4 +- server/src/app.js | 36 +-- 3 files changed, 592 insertions(+), 119 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index c44492725..f7ebb4cd8 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -4,6 +4,21 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@apollographql/apollo-upload-server": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@apollographql/apollo-upload-server/-/apollo-upload-server-5.0.3.tgz", + "integrity": "sha512-tGAp3ULNyoA8b5o9LsU2Lq6SwgVPUOKAqKywu2liEtTvrFSGPrObwanhYwArq3GPeOqp2bi+JknSJCIU3oQN1Q==", + "requires": { + "@babel/runtime-corejs2": "^7.0.0-rc.1", + "busboy": "^0.2.14", + "object-path": "^0.11.4" + } + }, + "@apollographql/graphql-playground-html": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.4.tgz", + "integrity": "sha512-gwvaQO6/Hv4DEwhDLmmu2tzCU9oPjC5Xl9Kk8Yd0IxyKhYLlLalmkMMjsZLzU5H3fGaalLD96OYfxHL0ClVUDQ==" + }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -117,6 +132,22 @@ "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", "dev": true }, + "@babel/runtime-corejs2": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.1.2.tgz", + "integrity": "sha512-drxaPByExlcRDKW4ZLubUO4ZkI8/8ax9k9wve1aEthdLKFzjB7XRkOQ0xoTIWGxqdDnWDElkjYq77bt7yrcYJQ==", + "requires": { + "core-js": "^2.5.7", + "regenerator-runtime": "^0.12.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + } + } + }, "@babel/template": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", @@ -187,6 +218,60 @@ } } }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, "@sentry/core": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz", @@ -244,6 +329,102 @@ "@sentry/types": "4.1.0" } }, + "@types/accepts": { + "version": "1.3.5", + "resolved": "http://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/body-parser": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", + "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", + "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", + "requires": { + "@types/node": "*" + } + }, + "@types/cors": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.4.tgz", + "integrity": "sha512-ipZjBVsm2tF/n8qFGOuGBkUij9X9ZswVi9G3bx/6dz7POpVa6gVHcj1wsX/LVEn9MMF41fxK/PnZPPoTD1UFPw==", + "requires": { + "@types/express": "*" + } + }, + "@types/events": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" + }, + "@types/express": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", + "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", + "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", + "requires": { + "@types/events": "*", + "@types/node": "*", + "@types/range-parser": "*" + } + }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" + }, + "@types/node": { + "version": "10.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.2.tgz", + "integrity": "sha512-53ElVDSnZeFUUFIYzI8WLQ25IhWzb6vbddNp8UHlXQyU0ET2RhV5zg0NfubzU7iNMh5bBXb0htCzfvrSVNgzaQ==" + }, + "@types/range-parser": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", + "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" + }, + "@types/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "@types/ws": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-5.1.2.tgz", + "integrity": "sha512-NkTXUKTYdXdnPE2aUUbGOXE1XfMK527SCvU/9bj86kyFF6kZ9ZnOQ3mK5jADn98Y2vEUD/7wKDgZa7Qst2wYOg==", + "requires": { + "@types/events": "*", + "@types/node": "*" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -321,10 +502,152 @@ "normalize-path": "^2.0.0" } }, + "apollo-cache-control": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.2.5.tgz", + "integrity": "sha512-xEDrUvo3U2mQKSzA8NzQmgeqK4ytwFnTGl2YKGKPfG0+r8fZdswKp6CDBue29KLO8KkSuqW/hntveWrAdK51FQ==", + "requires": { + "apollo-server-env": "^2.0.3", + "graphql-extensions": "^0.2.1" + } + }, + "apollo-datasource": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.1.3.tgz", + "integrity": "sha512-yEGEe5Cjzqqu5ml1VV3O8+C+thzdknZri9Ny0P3daTGNO+45J3vBOMcmaANeeI2+OOeWxdqUNa5aPOx/35kniw==", + "requires": { + "apollo-server-caching": "0.1.2", + "apollo-server-env": "2.0.3" + } + }, + "apollo-engine-reporting": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.0.6.tgz", + "integrity": "sha512-JmfNJ9v3QEJQ8ZhLfCKEDiww53n5kj5HarP85p8LreoYNojbvcWN8Qm6RgvSG5N/ZJrAYHeTRQbSxm1vWwGubw==", + "requires": { + "apollo-engine-reporting-protobuf": "^0.0.1", + "apollo-server-env": "^2.0.3", + "async-retry": "^1.2.1", + "graphql-extensions": "^0.2.1", + "lodash": "^4.17.10" + } + }, + "apollo-engine-reporting-protobuf": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.0.1.tgz", + "integrity": "sha512-AySoDgog2p1Nph44FyyqaU4AfRZOXx8XZxRsVHvYY4dHlrMmDDhhjfF3Jswa7Wr8X/ivvx3xA0jimRn6rsG8Ew==", + "requires": { + "protobufjs": "^6.8.6" + } + }, + "apollo-link": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", + "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", + "requires": { + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.10" + } + }, + "apollo-server-caching": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.1.2.tgz", + "integrity": "sha512-jBRnsTgXN0m8yVpumoelaUq9mXR7YpJ3EE+y/alI7zgXY+0qFDqksRApU8dEfg3q6qUnO7rFxRhdG5eyc0+1ig==", + "requires": { + "lru-cache": "^4.1.3" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "apollo-server-core": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.1.0.tgz", + "integrity": "sha512-D1Tw0o3NzCQ2KGM8EWh9AHELHmn/SE361dtlqJxkbelxXqAkCIGIFywF30h+0ezhMbgbO7eqBBJfvRilF/oJHA==", + "requires": { + "@apollographql/apollo-upload-server": "^5.0.3", + "@types/ws": "^5.1.2", + "apollo-cache-control": "^0.2.5", + "apollo-datasource": "^0.1.3", + "apollo-engine-reporting": "^0.0.6", + "apollo-server-caching": "^0.1.2", + "apollo-server-env": "^2.0.3", + "apollo-server-errors": "^2.0.2", + "apollo-tracing": "^0.2.5", + "graphql-extensions": "^0.2.1", + "graphql-subscriptions": "^0.5.8", + "graphql-tag": "^2.9.2", + "graphql-tools": "^3.0.4", + "hash.js": "^1.1.3", + "lodash": "^4.17.10", + "subscriptions-transport-ws": "^0.9.11", + "ws": "^5.2.0" + } + }, + "apollo-server-env": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.0.3.tgz", + "integrity": "sha512-uIfKFH8n8xKO0eLb9Fa79+s2DdMuVethgznvW6SrOYq5VzgkIIobqKEuZPKa5wObw9CkCyju/+Sr7b7WWMFxUQ==", + "requires": { + "node-fetch": "^2.1.2", + "util.promisify": "^1.0.0" + } + }, + "apollo-server-errors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.0.2.tgz", + "integrity": "sha512-zyWDqAVDCkj9espVsoUpZr9PwDznM8UW6fBfhV+i1br//s2AQb07N6ektZ9pRIEvkhykDZW+8tQbDwAO0vUROg==" + }, + "apollo-server-express": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.1.0.tgz", + "integrity": "sha512-jLFIz1VLduMA/rme4OAy3IPeoaMEZOPoQXpio8AhfjIqCijRPPfoWJ2QMqz56C/g3vas7rZtgcVOrHpjBKudjw==", + "requires": { + "@apollographql/apollo-upload-server": "^5.0.3", + "@apollographql/graphql-playground-html": "^1.6.0", + "@types/accepts": "^1.3.5", + "@types/body-parser": "1.17.0", + "@types/cors": "^2.8.4", + "@types/express": "4.16.0", + "accepts": "^1.3.5", + "apollo-server-core": "^2.1.0", + "body-parser": "^1.18.3", + "cors": "^2.8.4", + "graphql-subscriptions": "^0.5.8", + "graphql-tools": "^3.0.4", + "type-is": "^1.6.16" + } + }, + "apollo-tracing": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.2.5.tgz", + "integrity": "sha512-DZO7pfL5LATHeJdVFoTZ/N3HwA+IMf1YnIt5K+uMQW+/MrRgYOtTszUv5tYX2cUIqHYHcbdDaBQUuIXwSpaV2Q==", + "requires": { + "apollo-server-env": "^2.0.3", + "graphql-extensions": "^0.2.1" + } + }, + "apollo-utilities": { + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.25.tgz", + "integrity": "sha512-AXvqkhni3Ir1ffm4SA1QzXn8k8I5BBl4PVKEyak734i4jFdp+xgfUyi2VCqF64TJlFTA/B73TRDUvO2D+tKtZg==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + }, "argparse": { "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" } @@ -396,6 +719,19 @@ "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, + "async-retry": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", + "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", + "requires": { + "retry": "0.12.0" + } + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -1216,10 +1552,16 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base": { "version": "0.11.2", @@ -1366,6 +1708,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1404,6 +1747,38 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "busboy": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", + "requires": { + "dicer": "0.2.5", + "readable-stream": "1.1.x" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "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=" + } + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -1611,7 +1986,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "configstore": { "version": "3.1.2", @@ -1671,14 +2047,12 @@ "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", - "dev": true + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cors": { "version": "2.8.4", @@ -1698,15 +2072,6 @@ "capture-stack-trace": "^1.0.0" } }, - "cross-fetch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz", - "integrity": "sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=", - "requires": { - "node-fetch": "2.1.2", - "whatwg-fetch": "2.0.4" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -1759,7 +2124,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -1845,6 +2209,11 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, + "deprecated-decorator": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", + "integrity": "sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=" + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -1859,6 +2228,38 @@ "repeating": "^2.0.0" } }, + "dicer": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", + "requires": { + "readable-stream": "1.1.x", + "streamsearch": "0.1.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "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=" + } + } + }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -1923,7 +2324,6 @@ "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, "requires": { "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", @@ -1936,7 +2336,6 @@ "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", @@ -2183,7 +2582,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", @@ -2236,6 +2636,11 @@ "through": "^2.3.8" } }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" + }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -2308,17 +2713,6 @@ "vary": "~1.1.2" } }, - "express-graphql": { - "version": "0.6.12", - "resolved": "http://registry.npmjs.org/express-graphql/-/express-graphql-0.6.12.tgz", - "integrity": "sha512-ouLWV0hRw4hnaLtXzzwhdC79ewxKbY2PRvm05mPc/zOH5W5WVCHDQ1SmNxEPBQdUeeSNh29aIqW9zEQkA3kMuA==", - "requires": { - "accepts": "^1.3.0", - "content-type": "^1.0.4", - "http-errors": "^1.3.0", - "raw-body": "^2.3.2" - } - }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -2381,8 +2775,7 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fast-levenshtein": { "version": "2.0.6", @@ -3075,8 +3468,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "functional-red-black-tree": { "version": "1.0.1", @@ -3200,63 +3592,43 @@ "iterall": "^1.2.2" } }, - "graphql-config": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-2.2.1.tgz", - "integrity": "sha512-U8+1IAhw9m6WkZRRcyj8ZarK96R6lQBQ0an4lp76Ps9FyhOXENC5YQOxOFGm5CxPrX2rD0g3Je4zG5xdNJjwzQ==", + "graphql-extensions": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.2.1.tgz", + "integrity": "sha512-/1FTPSWSffDjlRyMAV2UwQhojLmca9aQD0ieo1IYiqT5SE+uOWi4r83QF1CoER0sREIsH3s+nTmdH3cvQVG3MA==", "requires": { - "graphql-import": "^0.7.1", - "graphql-request": "^1.5.0", - "js-yaml": "^3.10.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.4" + "apollo-server-env": "^2.0.3" } }, - "graphql-import": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/graphql-import/-/graphql-import-0.7.1.tgz", - "integrity": "sha512-YpwpaPjRUVlw2SN3OPljpWbVRWAhMAyfSba5U47qGMOSsPLi2gYeJtngGpymjm9nk57RFWEpjqwh4+dpYuFAPw==", + "graphql-subscriptions": { + "version": "0.5.8", + "resolved": "http://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.5.8.tgz", + "integrity": "sha512-0CaZnXKBw2pwnIbvmVckby5Ge5e2ecmjofhYCdyeACbCly2j3WXDP/pl+s+Dqd2GQFC7y99NB+53jrt55CKxYQ==", "requires": { - "lodash": "^4.17.4", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "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==" - } + "iterall": "^1.2.1" } }, - "graphql-playground-html": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/graphql-playground-html/-/graphql-playground-html-1.6.4.tgz", - "integrity": "sha512-mnpAVYSR3TesYsJ5OLJVJMA0muTCw4npsCI1cKMtW35lbA6KljZkLkz3ZWXhEIYPnHKIeUHEtbn1ZGkEXtAxLg==", - "requires": { - "graphql-config": "2.2.1" - } + "graphql-tag": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.0.tgz", + "integrity": "sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w==" }, - "graphql-playground-middleware-express": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/graphql-playground-middleware-express/-/graphql-playground-middleware-express-1.7.6.tgz", - "integrity": "sha512-fICPxYGIdhCxtFlwCnP3uZ2uRWeQ9wj7OkcWUiHNwaFma2TbRD5nNKaPA2u21YWha9xv26qIDxxcdW27F/lcbQ==", + "graphql-tools": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-3.1.1.tgz", + "integrity": "sha512-yHvPkweUB0+Q/GWH5wIG60bpt8CTwBklCSzQdEHmRUgAdEQKxw+9B7zB3dG7wB3Ym7M7lfrS4Ej+jtDZfA2UXg==", "requires": { - "graphql-playground-html": "1.6.4" - } - }, - "graphql-request": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-1.8.2.tgz", - "integrity": "sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg==", - "requires": { - "cross-fetch": "2.2.2" + "apollo-link": "^1.2.2", + "apollo-utilities": "^1.0.1", + "deprecated-decorator": "^0.1.6", + "iterall": "^1.1.3", + "uuid": "^3.1.0" } }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -3279,8 +3651,7 @@ "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-value": { "version": "1.0.0", @@ -3342,6 +3713,15 @@ } } }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -3544,8 +3924,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": "1.2.1", @@ -3568,8 +3947,7 @@ "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, "is-descriptor": { "version": "0.1.6", @@ -3746,7 +4124,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, "requires": { "has": "^1.0.1" } @@ -3773,7 +4150,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" } @@ -3821,6 +4197,7 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -3937,6 +4314,11 @@ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4081,10 +4463,16 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4764,8 +5152,12 @@ "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "object-path": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz", + "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=" }, "object-visit": { "version": "1.0.1", @@ -4808,6 +5200,15 @@ "has": "^1.0.1" } }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -5123,6 +5524,26 @@ "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", "dev": true }, + "protobufjs": { + "version": "6.8.8", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", + "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + } + }, "proxy-addr": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", @@ -5144,8 +5565,7 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "pstree.remy": { "version": "1.1.0", @@ -5762,6 +6182,11 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -6135,7 +6560,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 }, "stack-trace": { "version": "0.0.10", @@ -6178,6 +6604,11 @@ "through": "~2.3.4" } }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -6241,12 +6672,29 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "subscriptions-transport-ws": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.15.tgz", + "integrity": "sha512-f9eBfWdHsePQV67QIX+VRhf++dn1adyC/PZHP6XI5AfKnZ4n0FW+v5omxwdHVpd4xq2ZijaHEcmlQrhBY79ZWQ==", + "requires": { + "backo2": "^1.0.2", + "eventemitter3": "^3.1.0", + "iterall": "^1.2.1", + "symbol-observable": "^1.0.4", + "ws": "^5.2.0" + } + }, "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 }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, "table": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", @@ -6589,11 +7037,25 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, "v8flags": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", @@ -6618,11 +7080,6 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -6673,6 +7130,14 @@ "signal-exit": "^3.0.2" } }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", @@ -6682,8 +7147,20 @@ "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "zen-observable": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.11.tgz", + "integrity": "sha512-N3xXQVr4L61rZvGMpWe8XoCGX8vhU35dPyQ4fm5CY/KDlG0F75un14hjbckPXTDuKUY6V0dqR2giT6xN8Y4GEQ==" + }, + "zen-observable-ts": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", + "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", + "requires": { + "zen-observable": "^0.8.0" + } } } } diff --git a/server/package.json b/server/package.json index 73c601f30..bc2983b27 100644 --- a/server/package.json +++ b/server/package.json @@ -26,13 +26,11 @@ }, "dependencies": { "@sentry/node": "^4.1.1", + "apollo-server-express": "^2.1.0", "axios": "^0.18.0", - "cors": "^2.8.4", "dotenv": "^6.0.0", "express": "^4.16.3", - "express-graphql": "^0.6.12", "graphql": "^14.0.0", - "graphql-playground-middleware-express": "^1.7.6", "mongoose": "^5.3.4" } } diff --git a/server/src/app.js b/server/src/app.js index b36f54aef..56654310a 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -1,8 +1,6 @@ import 'dotenv/config'; import express from 'express'; -import cors from 'cors'; -import graphqlHTTP from 'express-graphql'; -import expressPlayground from 'graphql-playground-middleware-express'; +import { ApolloServer } from 'apollo-server-express'; import * as Sentry from '@sentry/node'; import schema from './schema'; @@ -12,27 +10,27 @@ const app = express(); Sentry.init({ dsn: process.env.SENTRY_DNS }); app.use(Sentry.Handlers.requestHandler()); -// authorising CORS -app.use(cors()); // Starting the graphql server -app.use('/graphql', graphqlHTTP(req => ({ +const server = new ApolloServer({ schema, - context: { - userId: req.headers.userid, - authorization: req.headers.authorization, + playground: { + settings: { + 'editor.theme': 'dark', + 'editor.cursorShape': 'line', + }, }, - formatError(err) { - return { - message: err.message, - code: err.originalError && err.originalError.code, - path: err.path, - }; - }, -}))); + formatError: error => ({ + code: error.extensions.exception.code, + message: error.message, + path: error.path, + }), +}); -// Starting the graphql server -app.get('/playground', expressPlayground({ endpoint: '/graphql' })); +server.applyMiddleware({ + app, + cors: true, +}); // Sentry error handling middleware if anything pass through app.use(Sentry.Handlers.errorHandler()); From d58ffd0219efb96ca39607f6aad557e3c93cc370 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 2 Nov 2018 16:33:33 +0100 Subject: [PATCH 087/146] Refactoring models in order to facilitate lisibility --- server/src/models/event.js | 78 +++++++++++++++++++++++++++++------- server/src/models/formula.js | 15 +++++-- server/src/models/plotter.js | 30 +++++++++++--- 3 files changed, 99 insertions(+), 24 deletions(-) diff --git a/server/src/models/event.js b/server/src/models/event.js index c72ce3187..7c28d7dfc 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -6,32 +6,80 @@ import { EventStatusEnum, } from '../enums/EventStatus'; +const { ObjectId } = Schema.Types; + const eventSchema = new Schema({ - designator: { type: String, required: true }, - status: { type: String, enum: EventStatusEnum, default: UNPUBLISHED }, - name: { type: String, required: true }, - hostId: { type: String, required: true }, + designator: { + type: String, + required: true, + }, + status: { + type: String, + enum: EventStatusEnum, + default: UNPUBLISHED, + }, + name: { + type: String, + required: true, + }, + hostId: { + type: String, + required: true, + }, description: String, - startDatetime: { type: Number, required: true }, - finishDatetime: { type: Number, required: true }, - formula: { type: Schema.Types.ObjectId, ref: Formula.modelName }, - plotter: { type: Schema.Types.ObjectId, ref: Plotter.modelName }, + startDatetime: { + type: Number, + required: true, + }, + finishDatetime: { + type: Number, + required: true, + }, + formula: { + type: ObjectId, + ref: Formula.modelName, + }, + plotter: { + type: ObjectId, + ref: Plotter.modelName, + }, rules: [{ - position: { type: Number, required: true }, - title: { type: String, required: true }, + position: { + type: Number, + required: true, + }, + title: { + type: String, + required: true, + }, description: String, }], prizes: [{ - rank: { type: Number, required: true }, - amount: { type: Number, required: true }, + rank: { + type: Number, + required: true, + }, + amount: { + type: Number, + required: true, + }, additional: [{ condition: String, - amount: { type: Number, required: true }, - asset: { type: String, required: true }, + amount: { + type: Number, + required: true, + }, + asset: { + type: String, + required: true, + }, }], }], participants: [{ - teamId: { type: String, required: true }, + teamId: { + type: String, + required: true, + }, botId: String, releaseId: String, }], diff --git a/server/src/models/formula.js b/server/src/models/formula.js index 43132bbf2..ccc774334 100644 --- a/server/src/models/formula.js +++ b/server/src/models/formula.js @@ -1,9 +1,18 @@ import mongoose, { Schema } from 'mongoose'; const formulaSchema = new Schema({ - ownerId: { type: String, required: true }, - isTemplate: { type: Boolean, default: false }, - name: { type: String, required: true }, + ownerId: { + type: String, + required: true, + }, + isTemplate: { + type: Boolean, + default: false, + }, + name: { + type: String, + required: true, + }, }); const Formula = mongoose.model('Formula', formulaSchema); diff --git a/server/src/models/plotter.js b/server/src/models/plotter.js index 77f274206..a9a7feb92 100644 --- a/server/src/models/plotter.js +++ b/server/src/models/plotter.js @@ -1,12 +1,30 @@ import mongoose, { Schema } from 'mongoose'; const plotterSchema = new Schema({ - ownerId: { type: String, required: true }, - isTemplate: { type: Boolean, default: false }, - name: { type: String, required: true }, - host: { type: String, required: true }, - repo: { type: String, required: true }, - moduleName: { type: String, required: true }, + ownerId: { + type: String, + required: true, + }, + isTemplate: { + type: Boolean, + default: false, + }, + name: { + type: String, + required: true, + }, + host: { + type: String, + required: true, + }, + repo: { + type: String, + required: true, + }, + moduleName: { + type: String, + required: true, + }, }); const Plotter = mongoose.model('Plotter', plotterSchema); From fa02ee759341649a612220332ab7d787b60a6771 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 2 Nov 2018 20:00:40 +0100 Subject: [PATCH 088/146] Adding a preshared key verification middleware --- server/.env.example | 2 ++ server/src/app.js | 9 +++++++++ server/src/errors/notAllowed.json | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 server/src/errors/notAllowed.json diff --git a/server/.env.example b/server/.env.example index a96aeb926..81868d2aa 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,3 +1,5 @@ +PRESHARED_GATEWAY_KEY=SECRET_STUFF + PORT=3000 DB_USERNAME=example_name DB_PASSWORD=example_password diff --git a/server/src/app.js b/server/src/app.js index 56654310a..2a53b0250 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -3,6 +3,7 @@ import express from 'express'; import { ApolloServer } from 'apollo-server-express'; import * as Sentry from '@sentry/node'; import schema from './schema'; +import wrongPreshared from './errors/notAllowed.json'; const app = express(); @@ -10,6 +11,14 @@ const app = express(); Sentry.init({ dsn: process.env.SENTRY_DNS }); app.use(Sentry.Handlers.requestHandler()); +app.post('/graphql', (req, res, next) => { + if (req.headers.preshared === process.env.PRESHARED_GATEWAY_KEY) { + next(); + } else { + res.send(wrongPreshared); + } +}); + // Starting the graphql server const server = new ApolloServer({ diff --git a/server/src/errors/notAllowed.json b/server/src/errors/notAllowed.json new file mode 100644 index 000000000..b76604aa2 --- /dev/null +++ b/server/src/errors/notAllowed.json @@ -0,0 +1,8 @@ +{ + "errors": [ + { + "code": 401, + "message": "Wait, you're not supposed to be here, go through the gate as everyone else" + } + ] +} From b85dcb474f2abf1bfe537ef6f24e4622b0e357ac Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 2 Nov 2018 22:51:05 +0100 Subject: [PATCH 089/146] Adding the context configuration to apollo server --- server/src/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/app.js b/server/src/app.js index 2a53b0250..5dfc2d97c 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -29,6 +29,10 @@ const server = new ApolloServer({ 'editor.cursorShape': 'line', }, }, + context: ({ req }) => ({ + userId: req.headers.userid, + authorization: req.headers.authorization, + }), formatError: error => ({ code: error.extensions.exception.code, message: error.message, From 895eb3c475cc1f4684f81f54f63010d28cde2c21 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Fri, 2 Nov 2018 22:54:49 +0100 Subject: [PATCH 090/146] Adapting team verification calls to go through gateway --- server/.env.example | 2 +- server/src/schema/mutations/EditParticipant.js | 5 ++--- server/src/schema/mutations/RegisterToEvent.js | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/server/.env.example b/server/.env.example index 81868d2aa..25c16847a 100644 --- a/server/.env.example +++ b/server/.env.example @@ -7,4 +7,4 @@ DB_DOMAIN=example.com:1234/example_name SENTRY_DNS=https://some-val@sentry.io/some-id -TEAMS_ENDPOINT=https://teams-api.advancedalgos.net/graphql/ +GATEWAY_ENDPOINT=https://app-api.advancedalgos.net/graphql/ diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index 0abb8db32..fde3145da 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -28,19 +28,18 @@ const resolve = (parent, { } return new Promise((res, rej) => { axios({ - url: process.env.TEAMS_ENDPOINT, + url: process.env.GATEWAY_ENDPOINT, method: 'post', data: { query: ` { - teamsByRole{ + teams_TeamsByRole{ id } } `, }, headers: { - userid, authorization: context.authorization, }, }).then( diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index 7b3ee5050..a3443c4de 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -29,19 +29,18 @@ const resolve = (parent, { } return new Promise((res, rej) => { axios({ - url: process.env.TEAMS_ENDPOINT, + url: process.env.GATEWAY_ENDPOINT, method: 'post', data: { query: ` { - teamsByRole{ + teams_TeamsByRole{ id } } `, }, headers: { - userid, authorization: context.authorization, }, }).then( From f4cf5884f5e00d043446772224a692515301c679 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 3 Nov 2018 15:52:08 +0100 Subject: [PATCH 091/146] New types in order to dry up the code --- server/src/schema/types/AdditionalPrize.js | 8 +++-- server/src/schema/types/Event.js | 1 + server/src/schema/types/Formula.js | 1 + server/src/schema/types/Participant.js | 1 + server/src/schema/types/Plotter.js | 1 + server/src/schema/types/Prize.js | 6 ++-- server/src/schema/types/Rule.js | 1 + .../src/schema/types/input/AdditionalPrize.js | 18 ++++++++++++ server/src/schema/types/input/Event.js | 29 +++++++++++++++++++ server/src/schema/types/input/Formula.js | 15 ++++++++++ server/src/schema/types/input/Participant.js | 17 +++++++++++ server/src/schema/types/input/Plotter.js | 18 ++++++++++++ server/src/schema/types/input/Prize.js | 21 ++++++++++++++ server/src/schema/types/input/Rule.js | 18 ++++++++++++ server/src/schema/types/input/index.js | 17 +++++++++++ 15 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 server/src/schema/types/input/AdditionalPrize.js create mode 100644 server/src/schema/types/input/Event.js create mode 100644 server/src/schema/types/input/Formula.js create mode 100644 server/src/schema/types/input/Participant.js create mode 100644 server/src/schema/types/input/Plotter.js create mode 100644 server/src/schema/types/input/Prize.js create mode 100644 server/src/schema/types/input/Rule.js create mode 100644 server/src/schema/types/input/index.js diff --git a/server/src/schema/types/AdditionalPrize.js b/server/src/schema/types/AdditionalPrize.js index ee3a791ff..1c888b687 100644 --- a/server/src/schema/types/AdditionalPrize.js +++ b/server/src/schema/types/AdditionalPrize.js @@ -1,15 +1,17 @@ import { GraphQLObjectType, + GraphQLNonNull, GraphQLString, GraphQLInt, } from 'graphql'; const AdditionalPrizeType = new GraphQLObjectType({ - name: 'OtherPrize', + name: 'AdditionalPrize', + description: 'Non algo complementary prize', fields: () => ({ condition: { type: GraphQLString }, - amount: { type: GraphQLInt }, - asset: { type: GraphQLString }, + amount: { type: new GraphQLNonNull(GraphQLInt) }, + asset: { type: new GraphQLNonNull(GraphQLString) }, }), }); diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index 7917e3032..ec0bf6c2b 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -15,6 +15,7 @@ import { const EventType = new GraphQLObjectType({ name: 'Event', + description: 'Everything you need to know about an event', fields: () => ({ designator: { type: GraphQLID }, name: { type: GraphQLString }, diff --git a/server/src/schema/types/Formula.js b/server/src/schema/types/Formula.js index f5d312327..934cbcd60 100644 --- a/server/src/schema/types/Formula.js +++ b/server/src/schema/types/Formula.js @@ -6,6 +6,7 @@ import { const FormulaType = new GraphQLObjectType({ name: 'Formula', + description: 'For now it\'s simplay a named field', fields: () => ({ id: { type: GraphQLString }, ownerId: { type: GraphQLString }, diff --git a/server/src/schema/types/Participant.js b/server/src/schema/types/Participant.js index f3afb7745..28c2833df 100644 --- a/server/src/schema/types/Participant.js +++ b/server/src/schema/types/Participant.js @@ -5,6 +5,7 @@ import { const ParticipantType = new GraphQLObjectType({ name: 'Participant', + description: 'Informations about the participant of an event', fields: () => ({ teamId: { type: GraphQLString }, botId: { type: GraphQLString }, diff --git a/server/src/schema/types/Plotter.js b/server/src/schema/types/Plotter.js index 9e86390a5..798d197af 100644 --- a/server/src/schema/types/Plotter.js +++ b/server/src/schema/types/Plotter.js @@ -6,6 +6,7 @@ import { const PlotterType = new GraphQLObjectType({ name: 'Plotter', + description: 'Will soon change in order to use contained plotter objects', fields: () => ({ id: { type: GraphQLString }, ownerId: { type: GraphQLString }, diff --git a/server/src/schema/types/Prize.js b/server/src/schema/types/Prize.js index 4b2fc8aba..7a81a702a 100644 --- a/server/src/schema/types/Prize.js +++ b/server/src/schema/types/Prize.js @@ -2,14 +2,16 @@ import { GraphQLObjectType, GraphQLList, GraphQLInt, + GraphQLNonNull, } from 'graphql'; import { AdditionalPrizeType } from './index'; const PrizeType = new GraphQLObjectType({ name: 'Prize', + description: 'Prize, by default in algos', fields: () => ({ - rank: { type: GraphQLInt }, - amount: { type: GraphQLInt }, + rank: { type: new GraphQLNonNull(GraphQLInt) }, + amount: { type: new GraphQLNonNull(GraphQLInt) }, additional: { type: new GraphQLList(AdditionalPrizeType), resolve(parent) { diff --git a/server/src/schema/types/Rule.js b/server/src/schema/types/Rule.js index e39a877fc..46358242d 100644 --- a/server/src/schema/types/Rule.js +++ b/server/src/schema/types/Rule.js @@ -6,6 +6,7 @@ import { const RuleType = new GraphQLObjectType({ name: 'Rule', + description: 'Textual rules of an event', fields: () => ({ position: { type: GraphQLInt }, title: { type: GraphQLString }, diff --git a/server/src/schema/types/input/AdditionalPrize.js b/server/src/schema/types/input/AdditionalPrize.js new file mode 100644 index 000000000..0fe28c2f0 --- /dev/null +++ b/server/src/schema/types/input/AdditionalPrize.js @@ -0,0 +1,18 @@ +import { + GraphQLInputObjectType, + GraphQLNonNull, + GraphQLString, + GraphQLInt, +} from 'graphql'; + +const Type = new GraphQLInputObjectType({ + name: 'AdditionalPrizeInput', + description: 'Payload for formula input', + fields: () => ({ + condition: { type: GraphQLString }, + amount: { type: new GraphQLNonNull(GraphQLInt) }, + asset: { type: new GraphQLNonNull(GraphQLString) }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Event.js b/server/src/schema/types/input/Event.js new file mode 100644 index 000000000..54c8e0865 --- /dev/null +++ b/server/src/schema/types/input/Event.js @@ -0,0 +1,29 @@ +import { + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, + GraphQLList, +} from 'graphql'; +import InputFormulaType from './Formula'; +import InputPlotterType from './Plotter'; +import InputPrizeType from './Prize'; +import InputParticipantType from './Participant'; + +const Type = new GraphQLInputObjectType({ + name: 'EventInput', + description: 'Payload for event input', + fields: () => ({ + name: { type: GraphQLString }, + description: { type: GraphQLString }, + startDatetime: { type: GraphQLInt }, + finishDatetime: { type: GraphQLInt }, + formulaId: { type: GraphQLString }, + formula: { type: InputFormulaType }, + plotterId: { type: GraphQLString }, + plotter: { type: InputPlotterType }, + prizes: { type: new GraphQLList(InputPrizeType) }, + participants: { type: new GraphQLList(InputParticipantType) }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Formula.js b/server/src/schema/types/input/Formula.js new file mode 100644 index 000000000..bd9d070f1 --- /dev/null +++ b/server/src/schema/types/input/Formula.js @@ -0,0 +1,15 @@ +import { + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} from 'graphql'; + +const Type = new GraphQLInputObjectType({ + name: 'FormulaInput', + description: 'Payload for formula input', + fields: () => ({ + name: { type: new GraphQLNonNull(GraphQLString) }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Participant.js b/server/src/schema/types/input/Participant.js new file mode 100644 index 000000000..c3853df83 --- /dev/null +++ b/server/src/schema/types/input/Participant.js @@ -0,0 +1,17 @@ +import { + GraphQLInputObjectType, + GraphQLString, + GraphQLNonNull, +} from 'graphql'; + +const Type = new GraphQLInputObjectType({ + name: 'ParticipantInput', + description: 'Payload for formula input', + fields: () => ({ + teamId: { type: new GraphQLNonNull(GraphQLString) }, + botId: { type: GraphQLString }, + releaseId: { type: GraphQLString }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Plotter.js b/server/src/schema/types/input/Plotter.js new file mode 100644 index 000000000..1368aecf9 --- /dev/null +++ b/server/src/schema/types/input/Plotter.js @@ -0,0 +1,18 @@ +import { + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} from 'graphql'; + +const Type = new GraphQLInputObjectType({ + name: 'PlotterInput', + description: 'Payload for plotter input', + fields: () => ({ + name: { type: new GraphQLNonNull(GraphQLString) }, + host: { type: GraphQLString }, + repo: { type: GraphQLString }, + moduleName: { type: GraphQLString }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Prize.js b/server/src/schema/types/input/Prize.js new file mode 100644 index 000000000..5be06f0f2 --- /dev/null +++ b/server/src/schema/types/input/Prize.js @@ -0,0 +1,21 @@ +import { + GraphQLInputObjectType, + GraphQLList, + GraphQLInt, + GraphQLNonNull, +} from 'graphql'; +import InputAdditionalPrizeType from './AdditionalPrize'; + +const Type = new GraphQLInputObjectType({ + name: 'PrizeInput', + description: 'Payload for formula input', + fields: () => ({ + rank: { type: new GraphQLNonNull(GraphQLInt) }, + amount: { type: new GraphQLNonNull(GraphQLInt) }, + additional: { + type: new GraphQLList(InputAdditionalPrizeType), + }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/Rule.js b/server/src/schema/types/input/Rule.js new file mode 100644 index 000000000..220b99412 --- /dev/null +++ b/server/src/schema/types/input/Rule.js @@ -0,0 +1,18 @@ +import { + GraphQLNonNull, + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, +} from 'graphql'; + +const Type = new GraphQLInputObjectType({ + name: 'RuleInput', + description: 'Payload for rule input', + fields: () => ({ + position: { type: GraphQLInt }, + title: { type: new GraphQLNonNull(GraphQLString) }, + description: { type: GraphQLString }, + }), +}); + +export default Type; diff --git a/server/src/schema/types/input/index.js b/server/src/schema/types/input/index.js new file mode 100644 index 000000000..5bab6702a --- /dev/null +++ b/server/src/schema/types/input/index.js @@ -0,0 +1,17 @@ +import PlotterInputType from './Plotter'; +import RuleInputType from './Rule'; +import PrizeInputType from './Prize'; +import FormulaInputType from './Formula'; +import EventInputType from './Event'; +import AdditionalPrizeInputType from './AdditionalPrize'; +import ParticipantInputType from './Participant'; + +export { + PlotterInputType, + RuleInputType, + PrizeInputType, + FormulaInputType, + EventInputType, + AdditionalPrizeInputType, + ParticipantInputType, +}; From 3a46009042be2165e457975ba0c20cfb82dcf9a9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sat, 3 Nov 2018 16:31:11 +0100 Subject: [PATCH 092/146] Saving formulaId as formulaIf instead of Formula in the Db same for the plotters --- server/src/models/event.js | 16 ++++++++++------ server/src/schema/types/Event.js | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/server/src/models/event.js b/server/src/models/event.js index 7c28d7dfc..7f1b430b4 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -26,7 +26,9 @@ const eventSchema = new Schema({ type: String, required: true, }, - description: String, + description: { + type: String, + }, startDatetime: { type: Number, required: true, @@ -35,11 +37,11 @@ const eventSchema = new Schema({ type: Number, required: true, }, - formula: { + formulaId: { type: ObjectId, ref: Formula.modelName, }, - plotter: { + plotterId: { type: ObjectId, ref: Plotter.modelName, }, @@ -52,7 +54,9 @@ const eventSchema = new Schema({ type: String, required: true, }, - description: String, + description: { + type: String, + }, }], prizes: [{ rank: { @@ -86,10 +90,10 @@ const eventSchema = new Schema({ }); eventSchema.pre('find', function populate() { - this.populate('formula').populate('plotter'); + this.populate('formulaId').populate('plotterId'); }); eventSchema.post('save', (doc, next) => { - doc.populate('formula').populate('plotter').execPopulate().then(() => { + doc.populate('formulaId').populate('plotterId').execPopulate().then(() => { next(); }); }); diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index ec0bf6c2b..d54ecf377 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -26,13 +26,13 @@ const EventType = new GraphQLObjectType({ formula: { type: FormulaType, resolve(parent) { - return parent.formula; + return parent.formulaId; }, }, plotter: { type: PlotterType, resolve(parent) { - return parent.plotter; + return parent.plotterId; }, }, rules: { From 100119a75ba4a7d40aa3a42c20ae5215b146e6f2 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 4 Nov 2018 16:02:31 +0100 Subject: [PATCH 093/146] Adding Rules to Event input types --- server/src/schema/types/input/Event.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/schema/types/input/Event.js b/server/src/schema/types/input/Event.js index 54c8e0865..fba283123 100644 --- a/server/src/schema/types/input/Event.js +++ b/server/src/schema/types/input/Event.js @@ -8,6 +8,7 @@ import InputFormulaType from './Formula'; import InputPlotterType from './Plotter'; import InputPrizeType from './Prize'; import InputParticipantType from './Participant'; +import InputRuleType from './Rule'; const Type = new GraphQLInputObjectType({ name: 'EventInput', @@ -23,6 +24,7 @@ const Type = new GraphQLInputObjectType({ plotter: { type: InputPlotterType }, prizes: { type: new GraphQLList(InputPrizeType) }, participants: { type: new GraphQLList(InputParticipantType) }, + rules: { type: new GraphQLList(InputRuleType) }, }), }); From 73e1dbcdb8886779bcc9ec13814d3b688c4e8a01 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 4 Nov 2018 16:05:07 +0100 Subject: [PATCH 094/146] Removing userless mutation and adapting CreateEvent with new format --- server/src/schema/mutations/AddPrize.js | 62 ---------------- server/src/schema/mutations/AddRule.js | 70 ------------------- .../schema/mutations/CreateAndSetFormula.js | 56 --------------- .../schema/mutations/CreateAndSetPlotter.js | 65 ----------------- server/src/schema/mutations/CreateEvent.js | 65 +++++++++++++++++ server/src/schema/mutations/EditPrize.js | 56 --------------- server/src/schema/mutations/EditRule.js | 64 ----------------- server/src/schema/mutations/HostEvent.js | 52 -------------- server/src/schema/mutations/ReorderRules.js | 60 ---------------- server/src/schema/mutations/index.js | 18 +---- 10 files changed, 67 insertions(+), 501 deletions(-) delete mode 100644 server/src/schema/mutations/AddPrize.js delete mode 100644 server/src/schema/mutations/AddRule.js delete mode 100644 server/src/schema/mutations/CreateAndSetFormula.js delete mode 100644 server/src/schema/mutations/CreateAndSetPlotter.js create mode 100644 server/src/schema/mutations/CreateEvent.js delete mode 100644 server/src/schema/mutations/EditPrize.js delete mode 100644 server/src/schema/mutations/EditRule.js delete mode 100644 server/src/schema/mutations/HostEvent.js delete mode 100644 server/src/schema/mutations/ReorderRules.js diff --git a/server/src/schema/mutations/AddPrize.js b/server/src/schema/mutations/AddPrize.js deleted file mode 100644 index ff22e69ab..000000000 --- a/server/src/schema/mutations/AddPrize.js +++ /dev/null @@ -1,62 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLInt, -} from 'graphql'; -import { - AuthentificationError, - DatabaseError, - WrongArgumentsError, -} from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: new GraphQLNonNull(GraphQLInt) }, -}; - -const resolve = (parent, { eventDesignator, rank, amount }, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - if (event.prizes.some(prize => prize.rank === rank)) { - rej(new WrongArgumentsError('A prize for that rank already exists')); - return; - } - event.prizes.push({ - rank, - amount, - }); - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }); -}; - -const mutation = { - addPrize: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/AddRule.js b/server/src/schema/mutations/AddRule.js deleted file mode 100644 index c7b43cdb5..000000000 --- a/server/src/schema/mutations/AddRule.js +++ /dev/null @@ -1,70 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLString, -} from 'graphql'; -import { - AuthentificationError, - DatabaseError, - WrongArgumentsError, -} from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - title: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) }, -}; - -const resolve = (parent, { eventDesignator, title, description }, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - if (event.rules.some(rule => rule.title === title)) { - rej(new WrongArgumentsError('A prize for that rank already exists')); - return; - } - const isFree = pos => event.rules.some(rule => rule.pos === pos); - let position = 1; - let shouldGrow = isFree(position); - while (shouldGrow) { - position += 1; - shouldGrow = isFree(position); - } - event.rules.push({ - position, - title, - description, - }); - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }); -}; - -const mutation = { - addRule: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreateAndSetFormula.js b/server/src/schema/mutations/CreateAndSetFormula.js deleted file mode 100644 index d1d45970f..000000000 --- a/server/src/schema/mutations/CreateAndSetFormula.js +++ /dev/null @@ -1,56 +0,0 @@ -import { - GraphQLNonNull, - GraphQLString, -} from 'graphql'; -import { AuthentificationError, DatabaseError } from '../../errors'; -import { EventType } from '../types'; -import { Event, Formula } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, - name: { type: new GraphQLNonNull(GraphQLString) }, -}; - -const resolve = (parent, { name, eventDesignator }, context) => { - const ownerId = context.userId; - if (!ownerId) { - throw new AuthentificationError(); - } - const newFormula = new Formula({ name, ownerId }); - return new Promise((res, reject) => { - Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { - if (err) { - reject(err); - return; - } - if (!event) { - reject(new DatabaseError('None of the events you own respond to that designator')); - return; - } - newFormula.save((error) => { - if (error) { - reject(error); - return; - } - event.formula = newFormula._id; - event.save((eventError) => { - if (eventError) { - reject(eventError); - return; - } - res(event); - }); - }); - }); - }); -}; - -const mutation = { - createAndSetFormula: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreateAndSetPlotter.js b/server/src/schema/mutations/CreateAndSetPlotter.js deleted file mode 100644 index 11cbfe846..000000000 --- a/server/src/schema/mutations/CreateAndSetPlotter.js +++ /dev/null @@ -1,65 +0,0 @@ -import { - GraphQLNonNull, - GraphQLString, -} from 'graphql'; -import { AuthentificationError, DatabaseError } from '../../errors'; -import { EventType } from '../types'; -import { Event, Plotter } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLString) }, - name: { type: new GraphQLNonNull(GraphQLString) }, - host: { type: new GraphQLNonNull(GraphQLString) }, - repo: { type: new GraphQLNonNull(GraphQLString) }, - moduleName: { type: new GraphQLNonNull(GraphQLString) }, -}; - -const resolve = (parent, { - name, host, repo, moduleName, eventDesignator, -}, context) => { - const ownerId = context.userId; - if (!ownerId) { - throw new AuthentificationError(); - } - const newPlotter = new Plotter({ - name, host, repo, moduleName, ownerId, - }); - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId: ownerId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - - newPlotter.save((error) => { - if (error) { - rej(error); - return; - } - - event.plotter = newPlotter._id; - event.save((eventError) => { - if (eventError) { - rej(eventError); - return; - } - res(event); - }); - }); - }); - }); -}; - -const mutation = { - createAndSetPlotter: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreateEvent.js b/server/src/schema/mutations/CreateEvent.js new file mode 100644 index 000000000..abb920a3f --- /dev/null +++ b/server/src/schema/mutations/CreateEvent.js @@ -0,0 +1,65 @@ +import { AuthentificationError } from '../../errors'; +import { EventType } from '../types'; +import { Event, Formula, Plotter } from '../../models'; +import { slugify } from '../../utils/functions'; +import { EventInputType } from '../types/input'; + +export const args = { + event: { type: EventInputType }, +}; + +const resolve = (parent, { event }, context) => { + const hostId = context.userId; + if (!hostId) { + throw new AuthentificationError(); + } + + const eventSqueleton = { ...event }; + delete eventSqueleton.plotter; + delete eventSqueleton.formula; + eventSqueleton.hostId = hostId; + + const newEvent = new Event(eventSqueleton); + newEvent.designator = `${slugify(newEvent.name)}-${newEvent._id}`; + const { formula, plotter } = event; + + return new Promise((res, rej) => { + if (formula) { + formula.ownerId = hostId; + const newFormula = new Formula(formula); + newFormula.save((err) => { + if (err) { + rej(err); + } + }); + newEvent.formulaId = newFormula._id; + } + if (plotter) { + plotter.ownerId = hostId; + const newPlotter = new Plotter(plotter); + newPlotter.save((err) => { + if (err) { + rej(err); + } + }); + newEvent.plotterId = newPlotter._id; + } + newEvent.save((err) => { + if (err) { + rej(err); + return; + } + res(newEvent); + }); + }); +}; + +const mutation = { + createEvent: { + type: EventType, + args, + resolve, + }, +}; + +export default mutation; diff --git a/server/src/schema/mutations/EditPrize.js b/server/src/schema/mutations/EditPrize.js deleted file mode 100644 index 279733d85..000000000 --- a/server/src/schema/mutations/EditPrize.js +++ /dev/null @@ -1,56 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLInt, -} from 'graphql'; -import { AuthentificationError, DatabaseError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: GraphQLInt }, -}; - -const resolve = (parent, { eventDesignator, rank, amount }, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - const prizeIndex = event.prizes.findIndex(prize => prize.rank === rank); - if (!prizeIndex) { - rej(new DatabaseError('There is no prize for that index')); - return; - } - event.prizes[prizeIndex].amount = amount || event.prizes[prizeIndex].amount; - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }); -}; - -const mutation = { - editPrize: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/EditRule.js b/server/src/schema/mutations/EditRule.js deleted file mode 100644 index c931151ce..000000000 --- a/server/src/schema/mutations/EditRule.js +++ /dev/null @@ -1,64 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLString, -} from 'graphql'; -import { AuthentificationError, DatabaseError, WrongArgumentsError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - title: { type: new GraphQLNonNull(GraphQLString) }, - newtitle: { type: GraphQLString }, - description: { type: GraphQLString }, -}; - -const resolve = (parent, { - eventDesignator, title, newtitle, description, -}, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - const ruleIndex = event.rules.findIndex(rule => rule.title === title); - if (!ruleIndex) { - rej(new DatabaseError('There is no rule with that title')); - return; - } - event.rules[ruleIndex].description = description || event.rules[ruleIndex].description; - if (event.rules.some(rule => rule.title === newtitle)) { - rej(new WrongArgumentsError('There is already a rule using your new title')); - return; - } - event.rules[ruleIndex].title = newtitle || event.rules[ruleIndex].title; - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }); -}; - -const mutation = { - editRule: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/HostEvent.js b/server/src/schema/mutations/HostEvent.js deleted file mode 100644 index 13fd6b494..000000000 --- a/server/src/schema/mutations/HostEvent.js +++ /dev/null @@ -1,52 +0,0 @@ -import { - GraphQLNonNull, - GraphQLInt, - GraphQLString, -} from 'graphql'; -import { AuthentificationError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { slugify } from '../../utils/functions'; - -const args = { - name: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: new GraphQLNonNull(GraphQLString) }, - startDatetime: { type: new GraphQLNonNull(GraphQLInt) }, - finishDatetime: { type: new GraphQLNonNull(GraphQLInt) }, -}; - -const resolve = (parent, { - name, description, startDatetime, finishDatetime, -}, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - const newEvent = new Event({ - hostId, - name, - description, - startDatetime, - finishDatetime, - }); - newEvent.designator = `${slugify(newEvent.name)}-${newEvent._id}`; - return new Promise((res, rej) => { - newEvent.save((err) => { - if (err) { - rej(err); - return; - } - res(newEvent); - }); - }); -}; - -const mutation = { - hostEvent: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/ReorderRules.js b/server/src/schema/mutations/ReorderRules.js deleted file mode 100644 index 8f16546aa..000000000 --- a/server/src/schema/mutations/ReorderRules.js +++ /dev/null @@ -1,60 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, - GraphQLInt, -} from 'graphql'; -import { AuthentificationError, DatabaseError } from '../../errors'; -import { isBetween } from '../../utils/functions'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - fromPosition: { type: new GraphQLNonNull(GraphQLInt) }, - toPosition: { type: new GraphQLNonNull(GraphQLInt) }, -}; - -const resolve = (parent, { eventDesignator, fromPosition, toPosition }, context) => { - const hostId = context.userId; - if (!hostId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - Event.findOne({ designator: eventDesignator, hostId: context.userId }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - const delta = fromPosition > toPosition ? 1 : -1; - event.rules.forEach((part) => { - if (part.position === fromPosition) { - part.position = toPosition; - } else if (isBetween(part.position, fromPosition, toPosition)) { - part.position += delta; - } - }); - - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }); -}; - -const mutation = { - reorderRules: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index ffefe7dcf..1f621f13e 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -2,36 +2,22 @@ import { GraphQLObjectType, } from 'graphql'; -import HostEventMutation from './HostEvent'; +import CreateEventMutation from './CreateEvent'; import EditEventMutation from './EditEvent'; import RegisterToEventMutation from './RegisterToEvent'; import EditParticipantMutation from './EditParticipant'; -import AddRuleMutation from './AddRule'; -import EditRuleMutation from './EditRule'; -import ReorderRulesMutation from './ReorderRules'; -import AddPrizeMutation from './AddPrize'; -import EditPrizeMutation from './EditPrize'; import CreateFormulaMutation from './CreateFormula'; -import CreateAndSetFormulaMutation from './CreateAndSetFormula'; import CreatePlotterMutation from './CreatePlotter'; -import CreateAndSetPlotterMutation from './CreateAndSetPlotter'; const Mutation = new GraphQLObjectType({ name: 'Mutation', fields: Object.assign( - HostEventMutation, + CreateEventMutation, EditEventMutation, RegisterToEventMutation, EditParticipantMutation, - AddRuleMutation, - EditRuleMutation, - ReorderRulesMutation, - AddPrizeMutation, - EditPrizeMutation, CreateFormulaMutation, - CreateAndSetFormulaMutation, CreatePlotterMutation, - CreateAndSetPlotterMutation, ), }); From 91b1a9959818379d104bd9daa966c746fb3360dd Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Sun, 4 Nov 2018 16:37:05 +0100 Subject: [PATCH 095/146] Stop using soon to be deprecated function --- server/src/db.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/db.js b/server/src/db.js index 4492e884f..fb87523ca 100644 --- a/server/src/db.js +++ b/server/src/db.js @@ -2,6 +2,7 @@ import 'dotenv/config'; import mongoose from 'mongoose'; mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); +mongoose.set('useCreateIndex', true); mongoose.Promise = global.Promise; const db = mongoose.connection; From 189a8f1d8441d8f4371d1089b504d2666c664cc1 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 5 Nov 2018 15:27:04 +0100 Subject: [PATCH 096/146] Master refactoring, remove designator field --- server/src/db.js | 1 + server/src/models/event.js | 9 ++-- server/src/schema/mutations/CreateEvent.js | 36 ++-------------- server/src/schema/mutations/CreateFormula.js | 15 ++++--- server/src/schema/mutations/CreatePlotter.js | 22 ++++------ server/src/schema/mutations/EditEvent.js | 41 ++++--------------- .../src/schema/mutations/EditParticipant.js | 25 +++++------ .../src/schema/mutations/RegisterToEvent.js | 23 ++++------- server/src/schema/queries/Event.js | 8 ++-- server/src/schema/types/Event.js | 2 +- server/src/schema/types/input/Event.js | 4 -- 11 files changed, 56 insertions(+), 130 deletions(-) diff --git a/server/src/db.js b/server/src/db.js index fb87523ca..4ed47a0c2 100644 --- a/server/src/db.js +++ b/server/src/db.js @@ -3,6 +3,7 @@ import mongoose from 'mongoose'; mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); mongoose.set('useCreateIndex', true); +mongoose.set('useFindAndModify', false); mongoose.Promise = global.Promise; const db = mongoose.connection; diff --git a/server/src/models/event.js b/server/src/models/event.js index 7f1b430b4..87d495ccd 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -9,10 +9,6 @@ import { const { ObjectId } = Schema.Types; const eventSchema = new Schema({ - designator: { - type: String, - required: true, - }, status: { type: String, enum: EventStatusEnum, @@ -97,6 +93,11 @@ eventSchema.post('save', (doc, next) => { next(); }); }); +eventSchema.post('findOneAndUpdate', (doc, next) => { + doc.populate('formulaId').populate('plotterId').execPopulate().then(() => { + next(); + }); +}); const Event = mongoose.model('Event', eventSchema); diff --git a/server/src/schema/mutations/CreateEvent.js b/server/src/schema/mutations/CreateEvent.js index abb920a3f..2704f53e7 100644 --- a/server/src/schema/mutations/CreateEvent.js +++ b/server/src/schema/mutations/CreateEvent.js @@ -1,49 +1,21 @@ import { AuthentificationError } from '../../errors'; import { EventType } from '../types'; -import { Event, Formula, Plotter } from '../../models'; -import { slugify } from '../../utils/functions'; +import { Event } from '../../models'; import { EventInputType } from '../types/input'; export const args = { event: { type: EventInputType }, }; -const resolve = (parent, { event }, context) => { - const hostId = context.userId; +const resolve = (parent, { event }, { userId: hostId }) => { if (!hostId) { throw new AuthentificationError(); } - const eventSqueleton = { ...event }; - delete eventSqueleton.plotter; - delete eventSqueleton.formula; - eventSqueleton.hostId = hostId; - - const newEvent = new Event(eventSqueleton); - newEvent.designator = `${slugify(newEvent.name)}-${newEvent._id}`; - const { formula, plotter } = event; + event.hostId = hostId; + const newEvent = new Event(event); return new Promise((res, rej) => { - if (formula) { - formula.ownerId = hostId; - const newFormula = new Formula(formula); - newFormula.save((err) => { - if (err) { - rej(err); - } - }); - newEvent.formulaId = newFormula._id; - } - if (plotter) { - plotter.ownerId = hostId; - const newPlotter = new Plotter(plotter); - newPlotter.save((err) => { - if (err) { - rej(err); - } - }); - newEvent.plotterId = newPlotter._id; - } newEvent.save((err) => { if (err) { rej(err); diff --git a/server/src/schema/mutations/CreateFormula.js b/server/src/schema/mutations/CreateFormula.js index 4ff97b8c1..198c1fd0e 100644 --- a/server/src/schema/mutations/CreateFormula.js +++ b/server/src/schema/mutations/CreateFormula.js @@ -1,21 +1,20 @@ -import { - GraphQLNonNull, - GraphQLString, -} from 'graphql'; import { AuthentificationError } from '../../errors'; import { FormulaType } from '../types'; import { Formula } from '../../models'; +import { FormulaInputType } from '../types/input'; const args = { - name: { type: new GraphQLNonNull(GraphQLString) }, + formula: { type: FormulaInputType }, }; -const resolve = (parent, { name }, context) => { - const ownerId = context.userId; +const resolve = (parent, { formula }, { userId: ownerId }) => { if (!ownerId) { throw new AuthentificationError(); } - const newFormula = new Formula({ name, ownerId }); + + formula.ownerId = ownerId; + const newFormula = new Formula(formula); + return new Promise((res, rej) => { newFormula.save((err) => { if (err) { diff --git a/server/src/schema/mutations/CreatePlotter.js b/server/src/schema/mutations/CreatePlotter.js index a4fcdf26a..6cf060fbf 100644 --- a/server/src/schema/mutations/CreatePlotter.js +++ b/server/src/schema/mutations/CreatePlotter.js @@ -1,28 +1,20 @@ -import { - GraphQLNonNull, - GraphQLString, -} from 'graphql'; import { AuthentificationError } from '../../errors'; import { PlotterType } from '../types'; import { Plotter } from '../../models'; +import { PlotterInputType } from '../types/input'; const args = { - name: { type: new GraphQLNonNull(GraphQLString) }, - host: { type: new GraphQLNonNull(GraphQLString) }, - repo: { type: new GraphQLNonNull(GraphQLString) }, - moduleName: { type: new GraphQLNonNull(GraphQLString) }, + plotter: { type: PlotterInputType }, }; -const resolve = (parent, { - name, host, repo, moduleName, -}, context) => { - const ownerId = context.userId; +const resolve = (parent, { plotter }, { userId: ownerId }) => { if (!ownerId) { throw new AuthentificationError(); } - const newPlotter = new Plotter({ - name, host, repo, moduleName, ownerId, - }); + + plotter.ownerId = ownerId; + const newPlotter = new Plotter(plotter); + return new Promise((res, reject) => { newPlotter.save((err) => { if (err) { diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js index e60cf6cbd..093376207 100644 --- a/server/src/schema/mutations/EditEvent.js +++ b/server/src/schema/mutations/EditEvent.js @@ -1,54 +1,29 @@ import { GraphQLNonNull, GraphQLID, - GraphQLInt, - GraphQLString, } from 'graphql'; -import { AuthentificationError, DatabaseError } from '../../errors'; +import { AuthentificationError } from '../../errors'; import { EventType } from '../types'; import { Event } from '../../models'; +import { EventInputType } from '../types/input'; const args = { - designator: { type: new GraphQLNonNull(GraphQLID) }, - name: { type: GraphQLString }, - description: { type: GraphQLString }, - startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, - formulaId: { type: GraphQLString }, - plotterId: { type: GraphQLString }, + eventId: { type: new GraphQLNonNull(GraphQLID) }, + event: { type: EventInputType }, }; -const resolve = (parent, { - designator, name, description, startDatetime, finishDatetime, formulaId, plotterId, -}, context) => { - const hostId = context.userId; +const resolve = (parent, { eventId: _id, event }, { userId: hostId }) => { if (!hostId) { throw new AuthentificationError(); } + return new Promise((res, rej) => { - Event.findOne({ designator, hostId }).exec((err, event) => { + Event.findOneAndUpdate({ _id, hostId }, event, { new: true }, (err, modifiedEvent) => { if (err) { rej(err); return; } - if (!event) { - rej(new DatabaseError('None of the events you own respond to that designator')); - return; - } - event.name = name || event.name; - event.description = description || event.description; - event.startDatetime = startDatetime || event.startDatetime; - event.finishDatetime = finishDatetime || event.finishDatetime; - event.formula = formulaId || event.formula; - event.plotter = plotterId || event.plotter; - - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); + res(modifiedEvent); }); }); }; diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js index fde3145da..a241f34b4 100644 --- a/server/src/schema/mutations/EditParticipant.js +++ b/server/src/schema/mutations/EditParticipant.js @@ -1,7 +1,6 @@ import { GraphQLNonNull, GraphQLID, - GraphQLString, } from 'graphql'; import axios from 'axios'; import { @@ -11,19 +10,17 @@ import { } from '../../errors'; import { EventType } from '../types'; import { Event } from '../../models'; +import { ParticipantInputType } from '../types/input'; const args = { - eventDesignator: { type: new GraphQLNonNull(GraphQLID) }, - teamId: { type: new GraphQLNonNull(GraphQLString) }, - botId: { type: GraphQLString }, - releaseId: { type: GraphQLString }, + eventId: { type: new GraphQLNonNull(GraphQLID) }, + participant: { type: ParticipantInputType }, }; -const resolve = (parent, { - eventDesignator, teamId, botId, releaseId, -}, context) => { - const userid = context.userId; - if (!userid) { +const resolve = (parent, + { eventId: _id, participant: { teamId, botId, releaseId } }, + { userId, authorization }) => { + if (!userId) { throw new AuthentificationError(); } return new Promise((res, rej) => { @@ -39,16 +36,14 @@ const resolve = (parent, { } `, }, - headers: { - authorization: context.authorization, - }, + headers: { authorization }, }).then( (result) => { if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { - rej(new WrongArgumentsError('You are not eligible to register this team')); + rej(new WrongArgumentsError('You are not eligible to edit this team')); return; } - Event.findOne({ designator: eventDesignator }).exec((err, event) => { + Event.findOne({ _id }).exec((err, event) => { if (err) { rej(err); return; diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js index a3443c4de..445e26628 100644 --- a/server/src/schema/mutations/RegisterToEvent.js +++ b/server/src/schema/mutations/RegisterToEvent.js @@ -2,7 +2,6 @@ import 'dotenv/config'; import { GraphQLNonNull, GraphQLID, - GraphQLString, } from 'graphql'; import axios from 'axios'; import { @@ -12,19 +11,17 @@ import { } from '../../errors'; import { EventType } from '../types'; import { Event } from '../../models'; +import { ParticipantInputType } from '../types/input'; const args = { - designator: { type: new GraphQLNonNull(GraphQLID) }, - teamId: { type: new GraphQLNonNull(GraphQLString) }, - botId: { type: GraphQLString }, - releaseId: { type: GraphQLString }, + eventId: { type: new GraphQLNonNull(GraphQLID) }, + participant: { type: ParticipantInputType }, }; -const resolve = (parent, { - designator, teamId, botId, releaseId, -}, context) => { - const userid = context.userId; - if (!userid) { +const resolve = (parent, + { eventId: _id, participant: { teamId, botId, releaseId } }, + { userId, authorization }) => { + if (!userId) { throw new AuthentificationError(); } return new Promise((res, rej) => { @@ -40,16 +37,14 @@ const resolve = (parent, { } `, }, - headers: { - authorization: context.authorization, - }, + headers: { authorization }, }).then( (result) => { if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { rej(new WrongArgumentsError('You are not eligible to register this team')); return; } - Event.findOne({ designator }).exec((err, event) => { + Event.findOne({ _id }).exec((err, event) => { if (err) { rej(err); return; diff --git a/server/src/schema/queries/Event.js b/server/src/schema/queries/Event.js index c35d48f47..590aac259 100644 --- a/server/src/schema/queries/Event.js +++ b/server/src/schema/queries/Event.js @@ -7,17 +7,17 @@ import { EventType } from '../types'; import { Event } from '../../models'; const args = { - designator: { type: new GraphQLNonNull(GraphQLID) }, + eventId: { type: new GraphQLNonNull(GraphQLID) }, }; -const resolve = (parent, { designator }) => new Promise((res, rej) => { - Event.findOne({ designator }).exec((err, event) => { +const resolve = (parent, { eventId: _id }) => new Promise((res, rej) => { + Event.findOne({ _id }).exec((err, event) => { if (err) { rej(err); return; } if (!event) { - rej(new DatabaseError('None of the events respond to that designator')); + rej(new DatabaseError('None of the events respond to that id')); return; } res(event); diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index d54ecf377..4cc843906 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -17,7 +17,7 @@ const EventType = new GraphQLObjectType({ name: 'Event', description: 'Everything you need to know about an event', fields: () => ({ - designator: { type: GraphQLID }, + id: { type: GraphQLID }, name: { type: GraphQLString }, hostId: { type: GraphQLString }, description: { type: GraphQLString }, diff --git a/server/src/schema/types/input/Event.js b/server/src/schema/types/input/Event.js index fba283123..23fd7c2c7 100644 --- a/server/src/schema/types/input/Event.js +++ b/server/src/schema/types/input/Event.js @@ -4,8 +4,6 @@ import { GraphQLInputObjectType, GraphQLList, } from 'graphql'; -import InputFormulaType from './Formula'; -import InputPlotterType from './Plotter'; import InputPrizeType from './Prize'; import InputParticipantType from './Participant'; import InputRuleType from './Rule'; @@ -19,9 +17,7 @@ const Type = new GraphQLInputObjectType({ startDatetime: { type: GraphQLInt }, finishDatetime: { type: GraphQLInt }, formulaId: { type: GraphQLString }, - formula: { type: InputFormulaType }, plotterId: { type: GraphQLString }, - plotter: { type: InputPlotterType }, prizes: { type: new GraphQLList(InputPrizeType) }, participants: { type: new GraphQLList(InputParticipantType) }, rules: { type: new GraphQLList(InputRuleType) }, From 43f08bc14b94f0da967d11e20f34acf38f21b5c0 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 5 Nov 2018 16:22:44 +0100 Subject: [PATCH 097/146] removing participants from event creation --- server/src/schema/types/input/Event.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/src/schema/types/input/Event.js b/server/src/schema/types/input/Event.js index 23fd7c2c7..eb34c274f 100644 --- a/server/src/schema/types/input/Event.js +++ b/server/src/schema/types/input/Event.js @@ -5,7 +5,6 @@ import { GraphQLList, } from 'graphql'; import InputPrizeType from './Prize'; -import InputParticipantType from './Participant'; import InputRuleType from './Rule'; const Type = new GraphQLInputObjectType({ @@ -19,7 +18,6 @@ const Type = new GraphQLInputObjectType({ formulaId: { type: GraphQLString }, plotterId: { type: GraphQLString }, prizes: { type: new GraphQLList(InputPrizeType) }, - participants: { type: new GraphQLList(InputParticipantType) }, rules: { type: new GraphQLList(InputRuleType) }, }), }); From 6dd6fac7e69690c4360af4d091bc9c95fb80d13a Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Mon, 5 Nov 2018 16:24:31 +0100 Subject: [PATCH 098/146] updating server's package-lock --- server/package-lock.json | 502 ++++++++++++++++++--------------------- 1 file changed, 237 insertions(+), 265 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index f7ebb4cd8..c73da79d8 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -139,13 +139,6 @@ "requires": { "core-js": "^2.5.7", "regenerator-runtime": "^0.12.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" - } } }, "@babel/template": { @@ -273,43 +266,43 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@sentry/core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz", - "integrity": "sha512-QJExTxZ1ZA5P/To5gOwd3sowukXW0N/Q9nfu8biRDNa+YURn6ElLjO0fD6eIBqX1f3npo/kTiWZwFBc7LXEzSg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.2.4.tgz", + "integrity": "sha512-Oqn6dQduKBIJ8DNTyA6Hp5Nj3sOH/P0buT02wIv9InIHmxBVJ0zj/b4zRmOOuz77ikglOf5WL3cavdWF/2l2PA==", "requires": { - "@sentry/hub": "4.1.1", - "@sentry/minimal": "4.1.1", - "@sentry/types": "4.1.0", - "@sentry/utils": "4.1.1" + "@sentry/hub": "4.2.4", + "@sentry/minimal": "4.2.4", + "@sentry/types": "4.2.4", + "@sentry/utils": "4.2.4" } }, "@sentry/hub": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.1.1.tgz", - "integrity": "sha512-VmcZOgcbFjJzK1oQNwcFP/wgfoWQr24dFv1C0uwdXldNXx3mwyUVkomvklBHz90HwiahsI/gCc+ZmbC3ECQk2Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.2.4.tgz", + "integrity": "sha512-9X77HAGk/XT7k5OD4F+SUO3PIeLV1uMuzvGgw9cxxl/gSv70MO35bP6mJIVrA0U4NGtvmtYTTWsWB9moRCiE1g==", "requires": { - "@sentry/types": "4.1.0", - "@sentry/utils": "4.1.1" + "@sentry/types": "4.2.4", + "@sentry/utils": "4.2.4" } }, "@sentry/minimal": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.1.1.tgz", - "integrity": "sha512-xRKWA46OGnZinJyTljDUel53emPP9mb/XNi/kF6SBaVDOUXl7HAB8kP7Bn7eLBwOanxN8PbYoAzh/lIQXWTmDg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.2.4.tgz", + "integrity": "sha512-IKzva0leEoP1ZOBh6NgIwqsvO2DM+GAKtCuNi0dfKYp1Qt6PLXHZQXaPim6kC0h/bKHe3+m/d4NXrpJdDrD7BQ==", "requires": { - "@sentry/hub": "4.1.1", - "@sentry/types": "4.1.0" + "@sentry/hub": "4.2.4", + "@sentry/types": "4.2.4" } }, "@sentry/node": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.1.1.tgz", - "integrity": "sha512-wbo8F2IqZW+exlOyQzQ7+bPNPXIYmG2g73ZgHFh0x3MHVOTSKgfiO3BzCqmFyUDhxqkEL23PQqLhM07GEtH3Bw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.2.4.tgz", + "integrity": "sha512-82wPAOGqBhw1KvCkeeZXvCsWurOaZfEm3d7hfHXj5nnVbUr0Xb2HcRTNzBYPtMYXFZ9N0UNIn5nfGk7zmvpUuA==", "requires": { - "@sentry/core": "4.1.1", - "@sentry/hub": "4.1.1", - "@sentry/types": "4.1.0", - "@sentry/utils": "4.1.1", + "@sentry/core": "4.2.4", + "@sentry/hub": "4.2.4", + "@sentry/types": "4.2.4", + "@sentry/utils": "4.2.4", "cookie": "0.3.1", "lsmod": "1.0.0", "md5": "2.2.1", @@ -317,16 +310,16 @@ } }, "@sentry/types": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.1.0.tgz", - "integrity": "sha512-KY7B9wYs1NACHlYzG4OuP6k4uQJkyDPJppftjj3NJYShfwdDTO1I2Swkhhb5dJMEMMMpBJGxXmiqZ2mX5ErISQ==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.2.4.tgz", + "integrity": "sha512-oMtNVx1R4gMl2cECn8bNthSgEHBknES3yVZftyPbecOp3TwPb6MSbWdIWjxgVai1jXi9a/ZCuE/Zoypy33CBrA==" }, "@sentry/utils": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.1.1.tgz", - "integrity": "sha512-XMvGqAWATBrRkOF0lkt0Ij8of2mRmp4WeFTUAgiKzCekxfUBLBaTb4wTaFXz1cnnnjVTwcAq72qBRMhHwQ0IIg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.2.4.tgz", + "integrity": "sha512-S8wZM6X642AhaUejhbYu1neU8IxtFhgc7JeVM5BmNivzXOW/hrTIDpDiDvYZLq1KhdSpH8+Z8WnntmGWhW4PFg==", "requires": { - "@sentry/types": "4.1.0" + "@sentry/types": "4.2.4" } }, "@types/accepts": { @@ -441,9 +434,9 @@ } }, "acorn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", - "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", "dev": true }, "acorn-jsx": { @@ -453,9 +446,9 @@ "dev": true }, "ajv": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", - "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -475,7 +468,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -555,17 +548,6 @@ "integrity": "sha512-jBRnsTgXN0m8yVpumoelaUq9mXR7YpJ3EE+y/alI7zgXY+0qFDqksRApU8dEfg3q6qUnO7rFxRhdG5eyc0+1ig==", "requires": { "lru-cache": "^4.1.3" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - } } }, "apollo-server-core": { @@ -713,6 +695,14 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -820,18 +810,6 @@ "@babel/types": "^7.0.0", "eslint-scope": "3.7.1", "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } } }, "babel-generator": { @@ -1502,6 +1480,14 @@ "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } } }, "babel-template": { @@ -1737,9 +1723,9 @@ } }, "bson": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", - "integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", + "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" }, "builtin-modules": { "version": "1.1.1", @@ -1754,29 +1740,6 @@ "requires": { "dicer": "0.2.5", "readable-stream": "1.1.x" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "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=" - } } }, "bytes": { @@ -1831,9 +1794,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000892", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000892.tgz", - "integrity": "sha512-X9rxMaWZNbJB5qjkDqPtNv/yfViTeUL6ILk0QJNxLV3OhKC5Acn5vxsuUvllR6B48mog8lmS+whwHq/QIYSL9w==", + "version": "1.0.30000905", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000905.tgz", + "integrity": "sha512-cR6ICguvhRrkAjFfBoe54vJQMVOEz7vFmqrV6oor1a7GRg6DdswI40lkiV/QQvAMb4txzTkjSaLaJaiAtSuQzA==", "dev": true }, "capture-stack-trace": { @@ -2055,9 +2018,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cors": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", - "integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=", + "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" @@ -2073,12 +2036,14 @@ } }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" } @@ -2194,14 +2159,6 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "rimraf": "^2.2.8" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "depd": { @@ -2235,29 +2192,6 @@ "requires": { "readable-stream": "1.1.x", "streamsearch": "0.1.2" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "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=" - } } }, "doctrine": { @@ -2301,9 +2235,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.79", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.79.tgz", - "integrity": "sha512-LQdY3j4PxuUl6xfxiFruTSlCniTrTrzAd8/HfsLEMi0PUpaQ0Iy+Pr4N4VllDYjs0Hyu2lkTbvzqlG+PX9NsNw==", + "version": "1.3.83", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.83.tgz", + "integrity": "sha512-DqJoDarxq50dcHsOOlMLNoy+qQitlMNbYb6wwbE0oUw2veHdRkpNrhmngiUYKMErdJ8SJ48rpJsZTQgy5SoEAA==", "dev": true }, "encodeurl": { @@ -2425,19 +2359,6 @@ "supports-color": "^5.3.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", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "debug": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", @@ -2447,6 +2368,16 @@ "ms": "^2.1.1" } }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, "globals": { "version": "11.8.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", @@ -2537,6 +2468,12 @@ "esutils": "^2.0.2", "isarray": "^1.0.0" } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true } } }, @@ -2547,9 +2484,9 @@ "dev": true }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -2654,6 +2591,19 @@ "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } } }, "expand-brackets": { @@ -2711,6 +2661,13 @@ "type-is": "~1.6.16", "utils-merge": "1.0.1", "vary": "~1.1.2" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } } }, "extend-shallow": { @@ -2835,6 +2792,13 @@ "parseurl": "~1.3.2", "statuses": "~1.4.0", "unpipe": "~1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } } }, "find-up": { @@ -3549,14 +3513,6 @@ "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "got": { @@ -3579,9 +3535,9 @@ } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "graphql": { @@ -4161,10 +4117,9 @@ "dev": true }, "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "isexe": { "version": "2.0.0", @@ -4180,6 +4135,15 @@ "optional": true, "requires": { "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + } } }, "iterall": { @@ -4270,14 +4234,6 @@ "parse-json": "^2.2.0", "pify": "^2.0.0", "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "locate-path": { @@ -4335,13 +4291,12 @@ "dev": true }, "lru-cache": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", - "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", - "dev": true, + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "^1.0.1", - "yallist": "^2.0.0" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "lsmod": { @@ -4356,6 +4311,14 @@ "dev": true, "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=", + "dev": true + } } }, "map-cache": { @@ -4445,16 +4408,16 @@ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" }, "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "requires": { - "mime-db": "~1.36.0" + "mime-db": "~1.37.0" } }, "mimic-fn": { @@ -4514,43 +4477,36 @@ } }, "mongodb": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.6.tgz", - "integrity": "sha512-E5QJuXQoMlT7KyCYqNNMfAkhfQD79AT4F8Xd+6x37OX+8BL17GyXyWvfm6wuyx4wnzCCPoCSLeMeUN2S7dU9yw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.8.tgz", + "integrity": "sha512-yNKwYxQ6m00NV6+pMoWoheFTHSQVv1KkSrfOhRDYMILGWDYtUtQRqHrFqU75rmPIY8hMozVft8zdC4KYMWaM3Q==", "requires": { - "mongodb-core": "3.1.5", + "mongodb-core": "3.1.7", "safe-buffer": "^5.1.2" } }, "mongodb-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.5.tgz", - "integrity": "sha512-emT/tM4ZBinqd6RZok+EzDdtN4LjYJIckv71qQVOEFmvXgT5cperZegVmTgox/1cx4XQu6LJ5ZuIwipP/eKdQg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.7.tgz", + "integrity": "sha512-YffpSrLmgFNmrvkGx+yX00KyBNk64C0BalfEn6vHHkXtcMUGXw8nxrMmhq5eXPLLlYeBpD/CsgNxE2Chf0o4zQ==", "requires": { "bson": "^1.1.0", "require_optional": "^1.0.1", "safe-buffer": "^5.1.2", "saslprep": "^1.0.0" - }, - "dependencies": { - "bson": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", - "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" - } } }, "mongoose": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.4.tgz", - "integrity": "sha512-DIUWOyYgZv2zGi/BoFEaFiaCVuDonnzGhW3cnc3JFjBScYn6z24tS2j3VB0dtMoX8FFjxmmMVnlmHPEIbV4PKA==", + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.9.tgz", + "integrity": "sha512-FbCW2qCptfPW/ltRwgqKpPCK113WTIhZDnn+0L0hO2XoX9Yp4LuIP0Nab7eBK+TsiIXWZAvzKhnnUKElTbl5ow==", "requires": { "async": "2.6.1", - "bson": "~1.0.5", + "bson": "~1.1.0", "kareem": "2.3.0", "lodash.get": "4.4.2", - "mongodb": "3.1.6", - "mongodb-core": "3.1.5", + "mongodb": "3.1.8", + "mongodb-core": "3.1.7", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.5.1", "mquery": "3.2.0", @@ -4558,16 +4514,6 @@ "regexp-clone": "0.0.1", "safe-buffer": "5.1.2", "sliced": "1.0.1" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } - } } }, "mongoose-legacy-pluralize": { @@ -4677,17 +4623,17 @@ "dev": true }, "node-fetch": { - "version": "2.1.2", - "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", - "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.1.tgz", + "integrity": "sha512-ObXBpNCD3A/vYQiQtEWl7DuqjAXjfptYFuGHLdPl5U19/6kJuZV+8uMHLrkj3wJrJoyfg4nhgyFixZdaZoAiEQ==" }, "nodemon": { - "version": "1.18.4", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.4.tgz", - "integrity": "sha512-hyK6vl65IPnky/ee+D3IWvVGgJa/m3No2/Xc/3wanS6Ce1MWjCzH6NnhPJ/vZM+6JFym16jtHx51lmCMB9HDtg==", + "version": "1.18.6", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.6.tgz", + "integrity": "sha512-4pHQNYEZun+IkIC2jCaXEhkZnfA7rQe73i8RkdRyDJls/K+WxR7IpI5uNUsAvQ0zWvYcCDNGD+XVtw2ZG86/uQ==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^2.0.4", "debug": "^3.1.0", "ignore-by-default": "^1.0.1", "minimatch": "^3.0.4", @@ -5426,14 +5372,6 @@ "dev": true, "requires": { "pify": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "pause-stream": { @@ -5446,9 +5384,9 @@ } }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { @@ -5588,9 +5526,9 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", "dev": true, "optional": true, "requires": { @@ -5684,18 +5622,14 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, + "version": "1.1.14", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "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.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" } }, "readdirp": { @@ -5950,6 +5884,12 @@ } } }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -5982,6 +5922,30 @@ "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://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" + } } } }, @@ -5992,10 +5956,9 @@ "dev": true }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" }, "regenerator-transform": { "version": "0.10.1", @@ -6274,6 +6237,13 @@ "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } } }, "serve-static": { @@ -6590,9 +6560,9 @@ } }, "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "stream-combiner": { "version": "0.2.2", @@ -6637,13 +6607,9 @@ } }, "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" - } + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "strip-ansi": { "version": "3.0.1", @@ -6926,6 +6892,12 @@ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", From b14828655f917c4fe56752d17da50ef083e441eb Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 02:38:13 +0100 Subject: [PATCH 099/146] Installing a clean linter for the frontend --- client/.eslintrc.js | 21 ++ client/package-lock.json | 295 ++++++++++++++---- client/package.json | 4 + client/src/Components/Event/Edit/index.js | 24 +- client/src/Components/Event/Edit/styles.js | 6 +- client/src/Components/Event/Show/index.js | 24 +- client/src/Components/Event/Show/styles.js | 6 +- client/src/Components/Events/index.js | 10 +- client/src/Components/HostedEvents/Event.js | 32 +- client/src/Components/HostedEvents/New.js | 72 +++-- client/src/Components/HostedEvents/index.js | 55 ++-- client/src/Components/HostedEvents/styles.js | 14 +- client/src/Components/Search/Event.js | 32 +- client/src/Components/Search/Tabs/Future.js | 26 +- client/src/Components/Search/Tabs/History.js | 16 +- client/src/Components/Search/Tabs/Incoming.js | 32 +- client/src/Components/Search/Tabs/Past.js | 26 +- client/src/Components/Search/Tabs/index.js | 12 +- client/src/Components/Search/index.js | 72 +++-- client/src/Components/Search/styles.js | 18 +- client/src/Components/TopBar/data.js | 22 +- client/src/Components/TopBar/index.js | 31 +- client/src/Components/TopBar/styles.js | 24 +- client/src/GraphQL/Calls/hostedEvents.js | 12 +- client/src/GraphQL/Calls/index.js | 10 +- client/src/GraphQL/Calls/listEvents.js | 10 +- client/src/GraphQL/Calls/showEvent.js | 10 +- client/src/GraphQL/Fragments/event.js | 6 +- client/src/GraphQL/Fragments/index.js | 8 +- client/src/index.js | 48 +-- client/src/utils/index.js | 18 +- client/src/utils/local-storage.js | 10 +- server/.eslintrc.js | 2 +- 33 files changed, 607 insertions(+), 401 deletions(-) create mode 100644 client/.eslintrc.js diff --git a/client/.eslintrc.js b/client/.eslintrc.js new file mode 100644 index 000000000..250847da1 --- /dev/null +++ b/client/.eslintrc.js @@ -0,0 +1,21 @@ +module.exports = { + parser: 'babel-eslint', + extends: [ + 'airbnb-base', + 'plugin:react/recommended', + ], + rules: { + 'no-underscore-dangle': 'off', + 'no-param-reassign': 'off', + 'react/prop-types': 0, + }, + settings: { + 'react': { + 'pragma': 'React', + 'version': '16.5', + }, + }, + env: { + 'browser': true, + }, +}; diff --git a/client/package-lock.json b/client/package-lock.json index 9ebb00764..839c3b060 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -227,9 +227,9 @@ "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" }, "acorn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", - "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", "dev": true }, "acorn-jsx": { @@ -239,9 +239,9 @@ "dev": true }, "ajv": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", - "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -263,9 +263,9 @@ "dev": true }, "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "ansi-styles": { @@ -381,6 +381,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", @@ -496,9 +502,9 @@ "integrity": "sha1-6LL+PX8at9aaMhma/5HqaTFAlRU=" }, "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, "circular-json": { @@ -730,16 +736,16 @@ "dev": true }, "eslint": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", - "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.8.0.tgz", + "integrity": "sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ==", "dev": true, "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", - "debug": "^3.1.0", + "debug": "^4.0.1", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", "eslint-utils": "^1.3.1", @@ -751,11 +757,11 @@ "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", - "ignore": "^4.0.2", + "ignore": "^4.0.6", "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", + "inquirer": "^6.1.0", "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", + "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", "lodash": "^4.17.5", @@ -766,15 +772,24 @@ "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^2.0.0", + "regexpp": "^2.0.1", "require-uncached": "^1.0.3", - "semver": "^5.5.0", + "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", - "table": "^4.0.3", + "table": "^5.0.2", "text-table": "^0.2.0" }, "dependencies": { + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, "eslint-scope": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", @@ -787,6 +802,17 @@ } } }, + "eslint-config-airbnb-base": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", + "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", + "dev": true, + "requires": { + "eslint-restricted-globals": "^0.1.1", + "object.assign": "^4.1.0", + "object.entries": "^1.0.4" + } + }, "eslint-config-standard": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", @@ -953,6 +979,12 @@ "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", "dev": true }, + "eslint-restricted-globals": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", + "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", + "dev": true + }, "eslint-scope": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", @@ -1023,13 +1055,13 @@ "dev": true }, "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", "tmp": "^0.0.33" } }, @@ -1219,6 +1251,14 @@ "dev": true, "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=", + "dev": true + } } }, "has-flag": { @@ -1316,21 +1356,21 @@ "dev": true }, "inquirer": { - "version": "5.2.0", - "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.1.0", + "external-editor": "^3.0.0", "figures": "^2.0.0", - "lodash": "^4.3.0", + "lodash": "^4.17.10", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^5.5.2", + "rxjs": "^6.1.0", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" @@ -1788,6 +1828,30 @@ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", + "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.6.1", + "function-bind": "^1.1.0", + "has": "^1.0.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2327,20 +2391,12 @@ "dev": true }, "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "dev": true, "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } + "tslib": "^1.9.0" } }, "safer-buffer": { @@ -2463,6 +2519,131 @@ "eslint-plugin-react": "~7.11.1", "eslint-plugin-standard": "~4.0.0", "standard-engine": "~9.0.0" + }, + "dependencies": { + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "eslint": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "dev": true, + "requires": { + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" + } + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "table": { + "version": "4.0.3", + "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "dev": true, + "requires": { + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + } } }, "standard-engine": { @@ -2502,14 +2683,6 @@ "dev": true, "requires": { "ansi-regex": "^3.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-bom": { @@ -2539,15 +2712,13 @@ "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" }, "table": { - "version": "4.0.3", - "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "^6.5.3", + "lodash": "^4.17.10", "slice-ansi": "1.0.0", "string-width": "^2.1.1" } diff --git a/client/package.json b/client/package.json index 96d0f6959..c02059c10 100644 --- a/client/package.json +++ b/client/package.json @@ -13,6 +13,10 @@ }, "devDependencies": { "babel-eslint": "^10.0.1", + "eslint": "^5.8.0", + "eslint-config-airbnb-base": "^13.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-react": "^7.11.1", "react-hot-loader": "^4.3.11", "standard": "^12.0.1" }, diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 1a17154bb..6fc58c7f0 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -1,15 +1,15 @@ -import React from 'react' -import { Query } from 'react-apollo' +import React from 'react'; +import { Query } from 'react-apollo'; -import Typography from '@material-ui/core/Typography' -import { withStyles } from '@material-ui/core/styles' +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; -import styles from './styles' +import styles from './styles'; -import { showEventCalls } from '../../../GraphQL/Calls/index' +import { showEventCalls } from '../../../GraphQL/Calls/index'; class Edit extends React.Component { - render () { + render() { return ( {({ loading, error, data }) => { - if (loading) return 'Loading...' - if (error) return `Error! ${error.message}` + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; return (

{data.events_Event.description}

- ) + ); }}
- ) + ); } } -export default withStyles(styles)(Edit) +export default withStyles(styles)(Edit); diff --git a/client/src/Components/Event/Edit/styles.js b/client/src/Components/Event/Edit/styles.js index 175dc52e5..12fd82051 100644 --- a/client/src/Components/Event/Edit/styles.js +++ b/client/src/Components/Event/Edit/styles.js @@ -1,4 +1,4 @@ -const styles = theme => ({ -}) +const styles = () => ({ +}); -export default styles +export default styles; diff --git a/client/src/Components/Event/Show/index.js b/client/src/Components/Event/Show/index.js index aaf59fb06..86b2b61bc 100644 --- a/client/src/Components/Event/Show/index.js +++ b/client/src/Components/Event/Show/index.js @@ -1,15 +1,15 @@ -import React from 'react' -import { Query } from 'react-apollo' +import React from 'react'; +import { Query } from 'react-apollo'; -import Typography from '@material-ui/core/Typography' -import { withStyles } from '@material-ui/core/styles' +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; -import styles from './styles' +import styles from './styles'; -import { showEventCalls } from '../../../GraphQL/Calls/index' +import { showEventCalls } from '../../../GraphQL/Calls/index'; class Show extends React.Component { - render () { + render() { return ( {({ loading, error, data }) => { - if (loading) return 'Loading...' - if (error) return `Error! ${error.message}` + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; return (

{data.events_Event.description}

- ) + ); }}
- ) + ); } } -export default withStyles(styles)(Show) +export default withStyles(styles)(Show); diff --git a/client/src/Components/Event/Show/styles.js b/client/src/Components/Event/Show/styles.js index 175dc52e5..12fd82051 100644 --- a/client/src/Components/Event/Show/styles.js +++ b/client/src/Components/Event/Show/styles.js @@ -1,4 +1,4 @@ -const styles = theme => ({ -}) +const styles = () => ({ +}); -export default styles +export default styles; diff --git a/client/src/Components/Events/index.js b/client/src/Components/Events/index.js index 96d83a55d..dde254d73 100644 --- a/client/src/Components/Events/index.js +++ b/client/src/Components/Events/index.js @@ -1,9 +1,5 @@ -import React from 'react' +import React from 'react'; -class Index extends React.Component { - render () { - return

Here will come a list the competitions you applied for

- } -} +const Index = () =>

Here will come a list the competitions you applied for

; -export default Index +export default Index; diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 47ad49c54..7ccb22ec7 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -1,27 +1,27 @@ -import React from 'react' -import { Link } from 'react-router-dom' +import React from 'react'; +import { Link } from 'react-router-dom'; import { Grid, Paper, Typography, - Button -} from '@material-ui/core' -import { withStyles } from '@material-ui/core/styles' -import styles from './styles' + Button, +} from '@material-ui/core'; +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; -import { toLocalTime } from '../../utils' +import { toLocalTime } from '../../utils'; class Event extends React.Component { - render () { - const classes = this.props.classes + render() { + const { classes } = this.props; const { name, designator, startDatetime, finishDatetime, host, - description - } = this.props.event + description, + } = this.props.event; return ( @@ -31,7 +31,9 @@ class Event extends React.Component { To : {toLocalTime(finishDatetime)} - Hosted by: {host.alias} ({host.lastName} {host.firstName}) + + Hosted by: {host.alias} ({host.lastName} {host.firstName}) + Formula: First prize: @@ -58,7 +60,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/show/' + designator} + to={`/show/${designator}`} > Show @@ -67,8 +69,8 @@ class Event extends React.Component { - ) + ); } } -export default withStyles(styles)(Event) +export default withStyles(styles)(Event); diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/HostedEvents/New.js index 61b4d72ff..3b2d41245 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/HostedEvents/New.js @@ -1,64 +1,70 @@ -import React from 'react' -import { Mutation } from 'react-apollo' -import { hostedEventsCalls } from '../../GraphQL/Calls/index' -import { DateTime } from 'luxon' +import React from 'react'; +import { Mutation } from 'react-apollo'; +import { DateTime } from 'luxon'; import { Button, - TextField -} from '@material-ui/core' -import { ChevronLeft, ChevronRight } from '@material-ui/icons' -import { DateTimePicker } from 'material-ui-pickers' + TextField, +} from '@material-ui/core'; +import { ChevronLeft, ChevronRight } from '@material-ui/icons'; +import { DateTimePicker } from 'material-ui-pickers'; +import { hostedEventsCalls } from '../../GraphQL/Calls/index'; class New extends React.Component { - constructor (props) { - super(props) + constructor(props) { + super(props); this.state = { name: '', description: '', startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'), - finishDatetime: DateTime.local().plus({ days: 8 }).startOf('day') - } + finishDatetime: DateTime.local().plus({ days: 8 }).startOf('day'), + }; } - render () { - const { name, description, startDatetime, finishDatetime } = this.state + render() { + const { + name, description, startDatetime, finishDatetime, + } = this.state; return ( { - const { events_EventsByHost: hostedEvents } = store.readQuery({ query: hostedEventsCalls.EVENTS_EVENTSBYHOST }) + const { events_EventsByHost: hostedEvents } = store.readQuery({ + query: hostedEventsCalls.EVENTS_EVENTSBYHOST, + }); store.writeQuery({ query: hostedEventsCalls.EVENTS_EVENTSBYHOST, - data: { events_EventsByHost: hostedEvents.concat([data.events_HostEvent]) } - }) - this.props.handleNewEvent(data.events_HostEvent) + data: { events_EventsByHost: hostedEvents.concat([data.events_HostEvent]) }, + }); + this.props.handleNewEvent(data.events_HostEvent); } } > - {(hostEvent, { data }) => ( + {hostEvent => (
{ - e.preventDefault() - hostEvent({ variables: { - name: name, - description: description, - startDatetime: startDatetime.valueOf() / 1000, - finishDatetime: startDatetime.valueOf() / 1000 - } }) + onSubmit={(e) => { + e.preventDefault(); + hostEvent({ + variables: { + name, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: startDatetime.valueOf() / 1000, + }, + }); }} > this.setState({ name: e.target.value })} + onChange={e => this.setState({ name: e.target.value })} fullWidth /> this.setState({ description: e.target.value })} + onChange={e => this.setState({ description: e.target.value })} fullWidth /> } rightArrowIcon={} value={startDatetime} - onChange={(date) => this.setState({ startDatetime: date })} + onChange={date => this.setState({ startDatetime: date })} helperText='Competition start date' /> } rightArrowIcon={} value={finishDatetime} - onChange={(date) => this.setState({ finishDatetime: date })} + onChange={date => this.setState({ finishDatetime: date })} helperText='Competition finishing date' /> @@ -91,8 +97,8 @@ class New extends React.Component {
)}
- ) + ); } } -export default New +export default New; diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index 248d0d929..dfd5b8353 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -1,41 +1,41 @@ -import React from 'react' -import { Query } from 'react-apollo' +import React from 'react'; +import { Query } from 'react-apollo'; import { Button, Dialog, DialogContent, DialogContentText, - DialogTitle -} from '@material-ui/core' + DialogTitle, +} from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles' -import styles from './styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; -import { hostedEventsCalls } from '../../GraphQL/Calls/index' +import { hostedEventsCalls } from '../../GraphQL/Calls/index'; -import New from './New' -import Event from './Event' +import New from './New'; +import Event from './Event'; class HostedEvent extends React.Component { - constructor (props) { - super(props) + constructor(props) { + super(props); this.state = { - isNewEventOpen: false - } + isNewEventOpen: false, + }; } handleNewEvent = (event) => { - this.props.history.push(`/edit/${event.designator}`) + this.props.history.push(`/edit/${event.designator}`); }; - render () { - const { classes } = this.props + render() { + const { classes } = this.props; return ( @@ -43,24 +43,22 @@ class HostedEvent extends React.Component { query={hostedEventsCalls.EVENTS_EVENTSBYHOST} > {({ loading, error, data }) => { - if (loading) return 'Loading...' - if (error) return `Error! ${error.message}` - const list = data.events_EventsByHost.map((event, index) => { - return ( + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + const list = data.events_EventsByHost.map((event, index) => ( - ) - }) + )); return ( { list } - ) + ); }} { this.setState({ isNewEventOpen: false }) }} + onClose={() => { this.setState({ isNewEventOpen: false }); }} aria-labelledby='addEvent-dialog-title' > @@ -68,14 +66,15 @@ class HostedEvent extends React.Component { - Here you will add just the minimal information, will be settable in the edit page of your event. + Here you will add just the minimal information, + will be settable in the edit page of your event. - ) + ); } } -export default withStyles(styles)(HostedEvent) +export default withStyles(styles)(HostedEvent); diff --git a/client/src/Components/HostedEvents/styles.js b/client/src/Components/HostedEvents/styles.js index e867e8174..8a55c4d41 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/client/src/Components/HostedEvents/styles.js @@ -5,22 +5,22 @@ const styles = theme => ({ marginTop: 20, marginBottom: 20, marginLeft: 400, - marginRight: 400 + marginRight: 400, }, buttonList: { margin: theme.spacing.unit, - float: 'right' + float: 'right', }, buttonGrid: { - marginTop: -20 + marginTop: -20, }, addButton: { display: 'block', padding: 20, marginTop: 20, marginRight: 20, - marginLeft: 'auto' - } -}) + marginLeft: 'auto', + }, +}); -export default styles +export default styles; diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 8a3579416..42865cc2c 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -1,27 +1,27 @@ -import React from 'react' -import { Link } from 'react-router-dom' +import React from 'react'; +import { Link } from 'react-router-dom'; import { Grid, Paper, Typography, - Button -} from '@material-ui/core' -import { withStyles } from '@material-ui/core/styles' -import styles from './styles' + Button, +} from '@material-ui/core'; +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; -import { toLocalTime } from '../../utils' +import { toLocalTime } from '../../utils'; class Event extends React.Component { - render () { - const classes = this.props.classes + render() { + const { classes } = this.props; const { name, designator, startDatetime, finishDatetime, host, - description - } = this.props.event + description, + } = this.props.event; return ( @@ -31,7 +31,9 @@ class Event extends React.Component { To : {toLocalTime(finishDatetime)} - Hosted by: {host.alias} ({host.lastName} {host.firstName}) + + Hosted by: {host.alias} ({host.lastName} {host.firstName}) + Formula: First prize: @@ -48,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={'/show/' + designator} + to={`/show/${designator}`} > Show @@ -57,8 +59,8 @@ class Event extends React.Component { - ) + ); } } -export default withStyles(styles)(Event) +export default withStyles(styles)(Event); diff --git a/client/src/Components/Search/Tabs/Future.js b/client/src/Components/Search/Tabs/Future.js index 2a46f4995..6a83bf3c9 100644 --- a/client/src/Components/Search/Tabs/Future.js +++ b/client/src/Components/Search/Tabs/Future.js @@ -1,21 +1,19 @@ -import React from 'react' -import { Typography } from '@material-ui/core' +import React from 'react'; +import { Typography } from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles' -import styles from '../styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; -import Event from '../Event' +import Event from '../Event'; class Future extends React.Component { - render () { - const classes = this.props.classes - const { FutureEvents } = this.props + render() { + const { classes } = this.props; + const { FutureEvents } = this.props; - const futureEvents = FutureEvents.map((event, index) => { - return ( + const futureEvents = FutureEvents.map((event, index) => ( - ) - }) + )); return ( {futureEvents} - ) + ); } } -export default withStyles(styles)(Future) +export default withStyles(styles)(Future); diff --git a/client/src/Components/Search/Tabs/History.js b/client/src/Components/Search/Tabs/History.js index 0db046e5c..21d848289 100644 --- a/client/src/Components/Search/Tabs/History.js +++ b/client/src/Components/Search/Tabs/History.js @@ -1,12 +1,12 @@ -import React from 'react' -import { Typography } from '@material-ui/core' +import React from 'react'; +import { Typography } from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles' -import styles from '../styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; class History extends React.Component { - render () { - const classes = this.props.classes + render() { + const { classes } = this.props; return ( Your old events (maybe here, maybe not, who knows) - ) + ); } } -export default withStyles(styles)(History) +export default withStyles(styles)(History); diff --git a/client/src/Components/Search/Tabs/Incoming.js b/client/src/Components/Search/Tabs/Incoming.js index 3956aa6d7..94fe6b93b 100644 --- a/client/src/Components/Search/Tabs/Incoming.js +++ b/client/src/Components/Search/Tabs/Incoming.js @@ -1,26 +1,22 @@ -import React from 'react' -import { Typography } from '@material-ui/core' +import React from 'react'; +import { Typography } from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles' -import styles from '../styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; -import Event from '../Event' +import Event from '../Event'; class Incoming extends React.Component { - render () { - const classes = this.props.classes - const { IncomingEvents, OngoingEvents } = this.props + render() { + const { classes } = this.props; + const { IncomingEvents, OngoingEvents } = this.props; - const incomingEvents = IncomingEvents.map((event, index) => { - return ( + const incomingEvents = IncomingEvents.map((event, index) => ( - ) - }) - const ongoingEvents = OngoingEvents.map((event, index) => { - return ( + )); + const ongoingEvents = OngoingEvents.map((event, index) => ( - ) - }) + )); return ( {incomingEvents} - ) + ); } } -export default withStyles(styles)(Incoming) +export default withStyles(styles)(Incoming); diff --git a/client/src/Components/Search/Tabs/Past.js b/client/src/Components/Search/Tabs/Past.js index 60a6bc5aa..5ca060c67 100644 --- a/client/src/Components/Search/Tabs/Past.js +++ b/client/src/Components/Search/Tabs/Past.js @@ -1,21 +1,19 @@ -import React from 'react' -import { Typography } from '@material-ui/core' +import React from 'react'; +import { Typography } from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles' -import styles from '../styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; -import Event from '../Event' +import Event from '../Event'; class Past extends React.Component { - render () { - const classes = this.props.classes - const { PastEvents } = this.props + render() { + const { classes } = this.props; + const { PastEvents } = this.props; - const pastEvents = PastEvents.map((event, index) => { - return ( + const pastEvents = PastEvents.map((event, index) => ( - ) - }) + )); return ( {pastEvents} - ) + ); } } -export default withStyles(styles)(Past) +export default withStyles(styles)(Past); diff --git a/client/src/Components/Search/Tabs/index.js b/client/src/Components/Search/Tabs/index.js index a4077c1ac..d15abeb9c 100644 --- a/client/src/Components/Search/Tabs/index.js +++ b/client/src/Components/Search/Tabs/index.js @@ -1,11 +1,11 @@ -import Future from './Future' -import History from './History' -import Incoming from './Incoming' -import Past from './Past' +import Future from './Future'; +import History from './History'; +import Incoming from './Incoming'; +import Past from './Past'; export { Future, History, Incoming, - Past -} + Past, +}; diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 0d50b2f86..d1799aa7f 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -1,68 +1,70 @@ -import React from 'react' -import { Query } from 'react-apollo' -import { DateTime } from 'luxon' +import React from 'react'; +import { Query } from 'react-apollo'; +import { DateTime } from 'luxon'; import { Typography, AppBar, Tabs, - Tab -} from '@material-ui/core' + Tab, +} from '@material-ui/core'; import { GetApp as IncomingIcon, AlarmAdd as FutureIcon, - History as HistoryIcon -} from '@material-ui/icons' + History as HistoryIcon, +} from '@material-ui/icons'; -import { withStyles } from '@material-ui/core/styles' -import styles from './styles' +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; -import { listEventsCalls } from '../../GraphQL/Calls/index' +import { listEventsCalls } from '../../GraphQL/Calls/index'; import { Future, History, Incoming, - Past -} from './Tabs' + Past, +} from './Tabs'; -function TabContainer (props) { +function TabContainer(props) { return ( {props.children} - ) + ); } class Search extends React.Component { - constructor (props) { - super(props) + constructor(props) { + super(props); this.state = { - value: 0 - } + value: 0, + }; } handleChange = (event, value) => { - this.setState({ value }) + this.setState({ value }); } - render () { - const classes = this.props.classes - const { value } = this.state + render() { + const { classes } = this.props; + const { value } = this.state; return ( {({ loading, error, data }) => { - if (loading) return 'Loading...' - if (error) return `Error! ${error.message}` - const now = ~~(DateTime.local().valueOf() / 1000) - const inTwoWeeks = ~~(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000) + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + const now = Math.floor(DateTime.local().valueOf() / 1000); + const inTwoWeeks = Math.floor(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000); - const IncomingEvents = data.events_Events.filter(event => event.startDatetime > now && event.startDatetime < inTwoWeeks) - const OngoingEvents = data.events_Events.filter(event => event.finishDatetime > now && event.startDatetime < now) - const FutureEvents = data.events_Events.filter(event => event.startDatetime > now) - const PastEvents = data.events_Events.filter(event => event.finishDatetime < now) + const IncomingEvents = data.events_Events.filter(event => event.startDatetime > now + && event.startDatetime < inTwoWeeks); + const OngoingEvents = data.events_Events.filter(event => event.finishDatetime > now + && event.startDatetime < now); + const FutureEvents = data.events_Events.filter(event => event.startDatetime > now); + const PastEvents = data.events_Events.filter(event => event.finishDatetime < now); return ( @@ -98,17 +100,19 @@ class Search extends React.Component { /> - {value === 0 && } + {value === 0 && + + } {value === 1 && } {value === 2 && } {value === 3 && } - ) + ); }} - ) + ); } } -export default withStyles(styles)(Search) +export default withStyles(styles)(Search); diff --git a/client/src/Components/Search/styles.js b/client/src/Components/Search/styles.js index 9981d904a..139e732cb 100644 --- a/client/src/Components/Search/styles.js +++ b/client/src/Components/Search/styles.js @@ -4,11 +4,11 @@ const styles = theme => ({ width: '100%', backgroundColor: theme.palette.background.paper, padding: 0, - margin: 0 + margin: 0, }, tabTitle: { width: '25%', - maxWidth: 'none' + maxWidth: 'none', }, card: { flexGrow: 1, @@ -16,18 +16,18 @@ const styles = theme => ({ marginTop: 20, marginBottom: 20, marginLeft: 400, - marginRight: 400 + marginRight: 400, }, buttonList: { margin: theme.spacing.unit, - float: 'right' + float: 'right', }, buttonGrid: { - marginTop: -20 + marginTop: -20, }, title: { - marginTop: 20 - } -}) + marginTop: 20, + }, +}); -export default styles +export default styles; diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 8726e606d..918c91daa 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -1,11 +1,17 @@ -import GamesIcon from '@material-ui/icons/Games' -import SearchIcon from '@material-ui/icons/Search' -import LibraryAddIcon from '@material-ui/icons/LibraryAdd' +import GamesIcon from '@material-ui/icons/Games'; +import SearchIcon from '@material-ui/icons/Search'; +import LibraryAddIcon from '@material-ui/icons/LibraryAdd'; const data = [ - { title: 'Look for an event', to: '/', icon: SearchIcon, text: '' }, - { title: 'Events you are enrolled in', to: '/my', icon: GamesIcon, text: '' }, - { title: 'Host your own competition', to: '/host', icon: LibraryAddIcon, text: '' } -] + { + title: 'Look for an event', to: '/', icon: SearchIcon, text: '', + }, + { + title: 'Events you are enrolled in', to: '/my', icon: GamesIcon, text: '', + }, + { + title: 'Host your own competition', to: '/host', icon: LibraryAddIcon, text: '', + }, +]; -export default data +export default data; diff --git a/client/src/Components/TopBar/index.js b/client/src/Components/TopBar/index.js index 06fe761f6..c3ac67581 100644 --- a/client/src/Components/TopBar/index.js +++ b/client/src/Components/TopBar/index.js @@ -1,16 +1,18 @@ -import React from 'react' -import { Link } from 'react-router-dom' -import classNames from 'classnames' +import React from 'react'; +import { Link } from 'react-router-dom'; +import classNames from 'classnames'; -import { AppBar, Toolbar, Typography, Button } from '@material-ui/core' -import { withStyles } from '@material-ui/core/styles' +import { + AppBar, Toolbar, Typography, Button, +} from '@material-ui/core'; +import { withStyles } from '@material-ui/core/styles'; -import datas from './data' -import styles from './styles' +import datas from './data'; +import styles from './styles'; -const TopBar = ({ classes, user, match }) => { +const TopBar = ({ classes }) => { const buttons = datas.map((data, index) => { - const Icon = data.icon + const Icon = data.icon; return ( ) - } - ) + ); + }); return (
@@ -36,7 +37,7 @@ const TopBar = ({ classes, user, match }) => {
- ) -} + ); +}; -export default withStyles(styles)(TopBar) +export default withStyles(styles)(TopBar); diff --git a/client/src/Components/TopBar/styles.js b/client/src/Components/TopBar/styles.js index 25cf9ab3b..6202592d6 100644 --- a/client/src/Components/TopBar/styles.js +++ b/client/src/Components/TopBar/styles.js @@ -1,37 +1,37 @@ const styles = theme => ({ root: { - flexGrow: 1 + flexGrow: 1, }, flex: { flexGrow: 1, - marginLeft: 30 + marginLeft: 30, }, menuButton: { marginLeft: -12, - marginRight: 20 + marginRight: 20, }, cssRoot: { color: '#FFFFFF', backgroundColor: theme.palette.secondary, '&:hover': { - backgroundColor: theme.palette.dark + backgroundColor: theme.palette.dark, }, whiteSpace: 'nowrap', paddingRight: 2 * theme.spacing.unit, - paddingLeft: 2 * theme.spacing.unit + paddingLeft: 2 * theme.spacing.unit, }, button: { - margin: theme.spacing.unit + margin: theme.spacing.unit, }, leftIcon: { - marginRight: theme.spacing.unit + marginRight: theme.spacing.unit, }, rightIcon: { - marginLeft: theme.spacing.unit + marginLeft: theme.spacing.unit, }, iconSmall: { - fontSize: 20 - } -}) + fontSize: 20, + }, +}); -export default styles +export default styles; diff --git a/client/src/GraphQL/Calls/hostedEvents.js b/client/src/GraphQL/Calls/hostedEvents.js index 05b3f77f2..badd88e1e 100644 --- a/client/src/GraphQL/Calls/hostedEvents.js +++ b/client/src/GraphQL/Calls/hostedEvents.js @@ -1,5 +1,5 @@ -import gql from 'graphql-tag' -import { eventMinimalInfo } from '../Fragments' +import gql from 'graphql-tag'; +import { eventMinimalInfo } from '../Fragments'; const EVENTS_HOSTEVENT = gql` mutation Hosts_HostEvent($name: String!, $description: String!, $startDatetime: Int!, $finishDatetime: Int!) { @@ -8,7 +8,7 @@ const EVENTS_HOSTEVENT = gql` } } ${eventMinimalInfo} -` +`; const EVENTS_EVENTSBYHOST = gql` query Hosts_EventsByHost{ events_EventsByHost { @@ -16,8 +16,8 @@ const EVENTS_EVENTSBYHOST = gql` } } ${eventMinimalInfo} -` +`; export default { EVENTS_HOSTEVENT, - EVENTS_EVENTSBYHOST -} + EVENTS_EVENTSBYHOST, +}; diff --git a/client/src/GraphQL/Calls/index.js b/client/src/GraphQL/Calls/index.js index d3fe57c6d..334af1c78 100644 --- a/client/src/GraphQL/Calls/index.js +++ b/client/src/GraphQL/Calls/index.js @@ -1,9 +1,9 @@ -import hostedEventsCalls from './hostedEvents' -import listEventsCalls from './listEvents' -import showEventCalls from './showEvent' +import hostedEventsCalls from './hostedEvents'; +import listEventsCalls from './listEvents'; +import showEventCalls from './showEvent'; export { hostedEventsCalls, listEventsCalls, - showEventCalls -} + showEventCalls, +}; diff --git a/client/src/GraphQL/Calls/listEvents.js b/client/src/GraphQL/Calls/listEvents.js index c115eb746..f5c3204e0 100644 --- a/client/src/GraphQL/Calls/listEvents.js +++ b/client/src/GraphQL/Calls/listEvents.js @@ -1,5 +1,5 @@ -import gql from 'graphql-tag' -import { eventMinimalInfo } from '../Fragments' +import gql from 'graphql-tag'; +import { eventMinimalInfo } from '../Fragments'; const EVENTS_EVENTS = gql` query Hosts_Events{ @@ -8,7 +8,7 @@ const EVENTS_EVENTS = gql` } } ${eventMinimalInfo} -` +`; export default { - EVENTS_EVENTS -} + EVENTS_EVENTS, +}; diff --git a/client/src/GraphQL/Calls/showEvent.js b/client/src/GraphQL/Calls/showEvent.js index b26b0e0dc..105e09779 100644 --- a/client/src/GraphQL/Calls/showEvent.js +++ b/client/src/GraphQL/Calls/showEvent.js @@ -1,5 +1,5 @@ -import gql from 'graphql-tag' -import { eventFullInfo } from '../Fragments' +import gql from 'graphql-tag'; +import { eventFullInfo } from '../Fragments'; const EVENTS_EVENT = gql` query Hosts_Event($designator: ID!) { @@ -8,8 +8,8 @@ const EVENTS_EVENT = gql` } } ${eventFullInfo} -` +`; export default { - EVENTS_EVENT -} + EVENTS_EVENT, +}; diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js index 9fd7a4610..bf1bba058 100644 --- a/client/src/GraphQL/Fragments/event.js +++ b/client/src/GraphQL/Fragments/event.js @@ -1,4 +1,4 @@ -import gql from 'graphql-tag' +import gql from 'graphql-tag'; export const eventMinimalInfo = gql` fragment EventMinimalInfo on events_Event { @@ -13,7 +13,7 @@ export const eventMinimalInfo = gql` } description } -` +`; export const eventFullInfo = gql` fragment EventFullInfo on events_Event { @@ -58,4 +58,4 @@ export const eventFullInfo = gql` } } } -` +`; diff --git a/client/src/GraphQL/Fragments/index.js b/client/src/GraphQL/Fragments/index.js index 93d8f9971..cb2ce691c 100644 --- a/client/src/GraphQL/Fragments/index.js +++ b/client/src/GraphQL/Fragments/index.js @@ -1,9 +1,9 @@ import { eventMinimalInfo, - eventFullInfo -} from './event' + eventFullInfo, +} from './event'; export { eventMinimalInfo, - eventFullInfo -} + eventFullInfo, +}; diff --git a/client/src/index.js b/client/src/index.js index 6989c8551..3f1c182da 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,40 +1,40 @@ -import React, { Component } from 'react' -import { Route, BrowserRouter, Switch } from 'react-router-dom' +import React, { Component } from 'react'; +import { Route, BrowserRouter, Switch } from 'react-router-dom'; -import { MuiPickersUtilsProvider } from 'material-ui-pickers' -import LuxonUtils from 'material-ui-pickers/utils/luxon-utils' +import { MuiPickersUtilsProvider } from 'material-ui-pickers'; +import LuxonUtils from 'material-ui-pickers/utils/luxon-utils'; -import { getItem } from './utils/local-storage' +import { getItem } from './utils/local-storage'; -import TopBar from './Components/TopBar' -import Search from './Components/Search' -import Events from './Components/Events' -import HostedEvents from './Components/HostedEvents' -import EditEvent from './Components/Event/Edit' +import TopBar from './Components/TopBar'; +import Search from './Components/Search'; +import Events from './Components/Events'; +import HostedEvents from './Components/HostedEvents'; +import EditEvent from './Components/Event/Edit'; class App extends Component { - constructor (props) { - super(props) + constructor(props) { + super(props); this.state = { - user: null - } + user: null, + }; } - async componentDidMount () { - let user = await getItem('user') + async componentDidMount() { + let user = await getItem('user'); if (user !== null && user !== undefined && user !== 'undefined') { - user = JSON.parse(user) - this.setState({ user }) + user = JSON.parse(user); + this.setState({ user }); } } - render () { - let loggedIn + render() { + let loggedIn; if (this.state.user !== null) { - loggedIn = () + loggedIn = (); } else { - loggedIn = '' + loggedIn = ''; } return ( @@ -51,8 +51,8 @@ class App extends Component { - ) + ); } } -export default App +export default App; diff --git a/client/src/utils/index.js b/client/src/utils/index.js index 36ed3a467..2d2a69e07 100644 --- a/client/src/utils/index.js +++ b/client/src/utils/index.js @@ -1,10 +1,12 @@ export const toLocalTime = (epoch) => { - let localDate = new Date(0) - localDate.setUTCSeconds(epoch) - var options = { year: 'numeric', month: 'long', day: '2-digit' } + const localDate = new Date(0); + localDate.setUTCSeconds(epoch); + const options = { year: 'numeric', month: 'long', day: '2-digit' }; return ( - localDate.toLocaleDateString(options) + - ' at ' + - localDate.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' }) - ) -} + `${localDate.toLocaleDateString(options) + } at ${ + localDate.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' })}` + ); +}; + +export const temporaryFunction = input => input; diff --git a/client/src/utils/local-storage.js b/client/src/utils/local-storage.js index 963ba0f36..9da53f424 100644 --- a/client/src/utils/local-storage.js +++ b/client/src/utils/local-storage.js @@ -1,9 +1,9 @@ -const getItem = async name => window.localStorage.getItem(name) -const setItem = async (name, value) => window.localStorage.setItem(name, value) -const removeItem = async name => window.localStorage.removeItem(name) +const getItem = async name => window.localStorage.getItem(name); +const setItem = async (name, value) => window.localStorage.setItem(name, value); +const removeItem = async name => window.localStorage.removeItem(name); export { getItem, setItem, - removeItem -} + removeItem, +}; diff --git a/server/.eslintrc.js b/server/.eslintrc.js index b41dc444e..800621670 100644 --- a/server/.eslintrc.js +++ b/server/.eslintrc.js @@ -3,6 +3,6 @@ module.exports = { extends: 'airbnb-base', rules: { 'no-underscore-dangle': 'off', - 'no-param-reassign': 'off' + 'no-param-reassign': 'off', } }; From 59743d7221fdc6002685f7bdeda120beb1e68729 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 03:38:23 +0100 Subject: [PATCH 100/146] Adapting code for new API --- client/src/Components/Event/Edit/index.js | 2 +- client/src/Components/Event/Show/index.js | 2 +- client/src/Components/HostedEvents/Event.js | 6 +++--- client/src/Components/HostedEvents/New.js | 16 +++++++++------- client/src/Components/HostedEvents/index.js | 2 +- client/src/Components/Search/Event.js | 4 ++-- client/src/GraphQL/Calls/hostedEvents.js | 10 +++++----- client/src/GraphQL/Calls/listEvents.js | 2 +- client/src/GraphQL/Calls/showEvent.js | 4 ++-- client/src/GraphQL/Fragments/event.js | 4 ++-- client/src/index.js | 2 +- 11 files changed, 28 insertions(+), 26 deletions(-) diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 6fc58c7f0..f63874df6 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -22,7 +22,7 @@ class Edit extends React.Component { {({ loading, error, data }) => { if (loading) return 'Loading...'; diff --git a/client/src/Components/Event/Show/index.js b/client/src/Components/Event/Show/index.js index 86b2b61bc..4c83b98bd 100644 --- a/client/src/Components/Event/Show/index.js +++ b/client/src/Components/Event/Show/index.js @@ -22,7 +22,7 @@ class Show extends React.Component { {({ loading, error, data }) => { if (loading) return 'Loading...'; diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 7ccb22ec7..4ba395132 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -15,8 +15,8 @@ class Event extends React.Component { render() { const { classes } = this.props; const { + id, name, - designator, startDatetime, finishDatetime, host, @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/edit/${designator}`} + to={`/edit/${id}`} > Edit @@ -60,7 +60,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${designator}`} + to={`/show/${id}`} > Show diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/HostedEvents/New.js index 3b2d41245..3d2012f24 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/HostedEvents/New.js @@ -26,16 +26,16 @@ class New extends React.Component { name, description, startDatetime, finishDatetime, } = this.state; return ( - { const { events_EventsByHost: hostedEvents } = store.readQuery({ query: hostedEventsCalls.EVENTS_EVENTSBYHOST, }); store.writeQuery({ query: hostedEventsCalls.EVENTS_EVENTSBYHOST, - data: { events_EventsByHost: hostedEvents.concat([data.events_HostEvent]) }, + data: { events_EventsByHost: hostedEvents.concat([data.events_CreateEvent]) }, }); - this.props.handleNewEvent(data.events_HostEvent); + this.props.handleNewEvent(data.events_CreateEvent); } } > @@ -46,10 +46,12 @@ class New extends React.Component { e.preventDefault(); hostEvent({ variables: { - name, - description, - startDatetime: startDatetime.valueOf() / 1000, - finishDatetime: startDatetime.valueOf() / 1000, + event: { + name, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: startDatetime.valueOf() / 1000, + }, }, }); }} diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index dfd5b8353..bc25a705d 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -26,7 +26,7 @@ class HostedEvent extends React.Component { } handleNewEvent = (event) => { - this.props.history.push(`/edit/${event.designator}`); + this.props.history.push(`/edit/${event.id}`); }; render() { diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 42865cc2c..43c72f0ec 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -15,8 +15,8 @@ class Event extends React.Component { render() { const { classes } = this.props; const { + id, name, - designator, startDatetime, finishDatetime, host, @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${designator}`} + to={`/show/${id}`} > Show diff --git a/client/src/GraphQL/Calls/hostedEvents.js b/client/src/GraphQL/Calls/hostedEvents.js index badd88e1e..2fe4460be 100644 --- a/client/src/GraphQL/Calls/hostedEvents.js +++ b/client/src/GraphQL/Calls/hostedEvents.js @@ -1,16 +1,16 @@ import gql from 'graphql-tag'; import { eventMinimalInfo } from '../Fragments'; -const EVENTS_HOSTEVENT = gql` - mutation Hosts_HostEvent($name: String!, $description: String!, $startDatetime: Int!, $finishDatetime: Int!) { - events_HostEvent(name: $name, description: $description, startDatetime: $startDatetime, finishDatetime: $finishDatetime) { +const EVENTS_CREATEEVENT = gql` + mutation Events_CreateEvent($event:events_EventInput!) { + events_CreateEvent(event: $event) { ...EventMinimalInfo } } ${eventMinimalInfo} `; const EVENTS_EVENTSBYHOST = gql` - query Hosts_EventsByHost{ + query Events_EventsByHost{ events_EventsByHost { ...EventMinimalInfo } @@ -18,6 +18,6 @@ const EVENTS_EVENTSBYHOST = gql` ${eventMinimalInfo} `; export default { - EVENTS_HOSTEVENT, + EVENTS_CREATEEVENT, EVENTS_EVENTSBYHOST, }; diff --git a/client/src/GraphQL/Calls/listEvents.js b/client/src/GraphQL/Calls/listEvents.js index f5c3204e0..6941002fc 100644 --- a/client/src/GraphQL/Calls/listEvents.js +++ b/client/src/GraphQL/Calls/listEvents.js @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { eventMinimalInfo } from '../Fragments'; const EVENTS_EVENTS = gql` - query Hosts_Events{ + query Events_Events{ events_Events { ...EventMinimalInfo } diff --git a/client/src/GraphQL/Calls/showEvent.js b/client/src/GraphQL/Calls/showEvent.js index 105e09779..855c9b510 100644 --- a/client/src/GraphQL/Calls/showEvent.js +++ b/client/src/GraphQL/Calls/showEvent.js @@ -2,8 +2,8 @@ import gql from 'graphql-tag'; import { eventFullInfo } from '../Fragments'; const EVENTS_EVENT = gql` - query Hosts_Event($designator: ID!) { - events_Event(designator: $designator) { + query Events_Event($eventId: ID!) { + events_Event(eventId: $eventId) { ...EventFullInfo } } diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js index bf1bba058..299f00687 100644 --- a/client/src/GraphQL/Fragments/event.js +++ b/client/src/GraphQL/Fragments/event.js @@ -2,8 +2,8 @@ import gql from 'graphql-tag'; export const eventMinimalInfo = gql` fragment EventMinimalInfo on events_Event { + id name - designator startDatetime finishDatetime host { @@ -17,7 +17,7 @@ export const eventMinimalInfo = gql` export const eventFullInfo = gql` fragment EventFullInfo on events_Event { - designator + id name host{ alias diff --git a/client/src/index.js b/client/src/index.js index 3f1c182da..f1f7dc90c 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -44,7 +44,7 @@ class App extends Component { - + From 8b53cf1539cc8ec049d351e50cc0e5bf7d5e8fa8 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 05:24:21 +0100 Subject: [PATCH 101/146] Instoring the status type . --- client/src/GraphQL/Fragments/event.js | 2 ++ server/src/enums/EventStatus.js | 2 ++ server/src/schema/queries/Events.js | 2 ++ server/src/schema/queries/EventsByHost.js | 3 ++- server/src/schema/queries/EventsByTeam.js | 7 ++++++- server/src/schema/types/Event.js | 2 ++ server/src/schema/types/enum/EventStatus.js | 19 +++++++++++++++++++ 7 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 server/src/schema/types/enum/EventStatus.js diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js index 299f00687..cd72463a7 100644 --- a/client/src/GraphQL/Fragments/event.js +++ b/client/src/GraphQL/Fragments/event.js @@ -3,6 +3,7 @@ import gql from 'graphql-tag'; export const eventMinimalInfo = gql` fragment EventMinimalInfo on events_Event { id + status name startDatetime finishDatetime @@ -18,6 +19,7 @@ export const eventMinimalInfo = gql` export const eventFullInfo = gql` fragment EventFullInfo on events_Event { id + status name host{ alias diff --git a/server/src/enums/EventStatus.js b/server/src/enums/EventStatus.js index 50a4bc53e..025c28fca 100644 --- a/server/src/enums/EventStatus.js +++ b/server/src/enums/EventStatus.js @@ -4,6 +4,7 @@ export const CANCELLED = 'CANCELLED'; export const RUNNING = 'RUNNING'; export const INTERRUPTED = 'INTERRUPTED'; export const FINISHED = 'FINISHED'; +export const ARCHIVED = 'ARCHIVED'; export const EventStatusEnum = [ UNPUBLISHED, @@ -12,6 +13,7 @@ export const EventStatusEnum = [ RUNNING, INTERRUPTED, FINISHED, + ARCHIVED, ]; export default EventStatusEnum; diff --git a/server/src/schema/queries/Events.js b/server/src/schema/queries/Events.js index c5b1b5e9f..e8d0bcfef 100644 --- a/server/src/schema/queries/Events.js +++ b/server/src/schema/queries/Events.js @@ -4,6 +4,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; const args = { minDate: { type: GraphQLInt }, @@ -12,6 +13,7 @@ const args = { const resolve = (parent, { minDate, maxDate }) => Event.find( Object.assign( + { status: { $nin: [UNPUBLISHED, ARCHIVED] } }, minDate || maxDate ? { startDatetime: diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js index ac4975f40..449314cb1 100644 --- a/server/src/schema/queries/EventsByHost.js +++ b/server/src/schema/queries/EventsByHost.js @@ -5,6 +5,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; const args = { hostId: { type: GraphQLString }, @@ -14,7 +15,7 @@ const args = { const resolve = (parent, { hostId, minDate, maxDate }, context) => Event.find( Object.assign( - hostId ? { hostId } : { hostId: context.userId }, + hostId ? { hostId, status: { $nin: [UNPUBLISHED, ARCHIVED] } } : { hostId: context.userId }, minDate || maxDate ? { startDatetime: diff --git a/server/src/schema/queries/EventsByTeam.js b/server/src/schema/queries/EventsByTeam.js index 10a914288..7816ff347 100644 --- a/server/src/schema/queries/EventsByTeam.js +++ b/server/src/schema/queries/EventsByTeam.js @@ -6,6 +6,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; const args = { teamId: { type: new GraphQLNonNull(GraphQLString) }, @@ -15,7 +16,11 @@ const args = { const resolve = (parent, { teamId, minDate, maxDate }) => Event.find( Object.assign( - { participants: { $elemMatch: { teamId } } }, + { + participants: { $elemMatch: { teamId } }, + status: { $nin: [UNPUBLISHED, ARCHIVED] }, + }, + minDate || maxDate ? { startDatetime: diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index 4cc843906..a53041cb4 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -12,12 +12,14 @@ import { ParticipantType, PrizeType, } from './index'; +import EventStatusEnumType from './enum/EventStatus'; const EventType = new GraphQLObjectType({ name: 'Event', description: 'Everything you need to know about an event', fields: () => ({ id: { type: GraphQLID }, + status: { type: EventStatusEnumType }, name: { type: GraphQLString }, hostId: { type: GraphQLString }, description: { type: GraphQLString }, diff --git a/server/src/schema/types/enum/EventStatus.js b/server/src/schema/types/enum/EventStatus.js new file mode 100644 index 000000000..372abd92f --- /dev/null +++ b/server/src/schema/types/enum/EventStatus.js @@ -0,0 +1,19 @@ +import { + GraphQLEnumType, +} from 'graphql'; + +import { EventStatusEnum } from '../../../enums/EventStatus'; + +const values = {}; +EventStatusEnum.forEach((EventStatus) => { + values[EventStatus] = { value: EventStatus }; +}); + +const EventStatusEnumType = new GraphQLEnumType({ + name: 'EventStatusEnum', + values, +}); + +export { + EventStatusEnumType as default, +}; From c22ff708685a058a611d59dc692b6c55855ee19e Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 06:23:10 +0100 Subject: [PATCH 102/146] Exporting the create action out of the modaal into a dedicated button --- .../New.js => Event/Create/index.js} | 18 ++-- client/src/Components/Event/Create/styles.js | 4 + client/src/Components/HostedEvents/index.js | 92 +++++-------------- client/src/Components/HostedEvents/styles.js | 7 -- client/src/Components/TopBar/data.js | 18 ++-- client/src/index.js | 2 + 6 files changed, 46 insertions(+), 95 deletions(-) rename client/src/Components/{HostedEvents/New.js => Event/Create/index.js} (85%) create mode 100644 client/src/Components/Event/Create/styles.js diff --git a/client/src/Components/HostedEvents/New.js b/client/src/Components/Event/Create/index.js similarity index 85% rename from client/src/Components/HostedEvents/New.js rename to client/src/Components/Event/Create/index.js index 3d2012f24..599d10f0e 100644 --- a/client/src/Components/HostedEvents/New.js +++ b/client/src/Components/Event/Create/index.js @@ -8,9 +8,12 @@ import { } from '@material-ui/core'; import { ChevronLeft, ChevronRight } from '@material-ui/icons'; import { DateTimePicker } from 'material-ui-pickers'; -import { hostedEventsCalls } from '../../GraphQL/Calls/index'; +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; -class New extends React.Component { +import { hostedEventsCalls } from '../../../GraphQL/Calls'; + +class Create extends React.Component { constructor(props) { super(props); this.state = { @@ -28,14 +31,7 @@ class New extends React.Component { return ( { - const { events_EventsByHost: hostedEvents } = store.readQuery({ - query: hostedEventsCalls.EVENTS_EVENTSBYHOST, - }); - store.writeQuery({ - query: hostedEventsCalls.EVENTS_EVENTSBYHOST, - data: { events_EventsByHost: hostedEvents.concat([data.events_CreateEvent]) }, - }); - this.props.handleNewEvent(data.events_CreateEvent); + this.props.history.push(`/edit/${data.events_CreateEvent.id}`); } } > @@ -103,4 +99,4 @@ class New extends React.Component { } } -export default New; +export default withStyles(styles)(Create); diff --git a/client/src/Components/Event/Create/styles.js b/client/src/Components/Event/Create/styles.js new file mode 100644 index 000000000..12fd82051 --- /dev/null +++ b/client/src/Components/Event/Create/styles.js @@ -0,0 +1,4 @@ +const styles = () => ({ +}); + +export default styles; diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index bc25a705d..20b531949 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -1,80 +1,30 @@ import React from 'react'; import { Query } from 'react-apollo'; -import { - Button, - Dialog, - DialogContent, - DialogContentText, - DialogTitle, -} from '@material-ui/core'; - -import { withStyles } from '@material-ui/core/styles'; -import styles from './styles'; - import { hostedEventsCalls } from '../../GraphQL/Calls/index'; -import New from './New'; import Event from './Event'; -class HostedEvent extends React.Component { - constructor(props) { - super(props); - this.state = { - isNewEventOpen: false, - }; - } +const HostedEvent = () => ( + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + const list = data.events_EventsByHost.map((event, index) => ( + + )); + return ( + + { list } + + ); + }} + + +); - handleNewEvent = (event) => { - this.props.history.push(`/edit/${event.id}`); - }; - render() { - const { classes } = this.props; - return ( - - - - - {({ loading, error, data }) => { - if (loading) return 'Loading...'; - if (error) return `Error! ${error.message}`; - const list = data.events_EventsByHost.map((event, index) => ( - - )); - return ( - - { list } - - ); - }} - - - { this.setState({ isNewEventOpen: false }); }} - aria-labelledby='addEvent-dialog-title' - > - - Host an event - - - - Here you will add just the minimal information, - will be settable in the edit page of your event. - - - - - - ); - } -} - -export default withStyles(styles)(HostedEvent); +export default HostedEvent; diff --git a/client/src/Components/HostedEvents/styles.js b/client/src/Components/HostedEvents/styles.js index 8a55c4d41..866f1e2fc 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/client/src/Components/HostedEvents/styles.js @@ -14,13 +14,6 @@ const styles = theme => ({ buttonGrid: { marginTop: -20, }, - addButton: { - display: 'block', - padding: 20, - marginTop: 20, - marginRight: 20, - marginLeft: 'auto', - }, }); export default styles; diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 918c91daa..5077584e1 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -1,16 +1,22 @@ -import GamesIcon from '@material-ui/icons/Games'; -import SearchIcon from '@material-ui/icons/Search'; -import LibraryAddIcon from '@material-ui/icons/LibraryAdd'; +import { + Search, + GamepadRounded, + AccessibilityNew, + LibraryAdd, +} from '@material-ui/icons'; const data = [ { - title: 'Look for an event', to: '/', icon: SearchIcon, text: '', + title: 'Look for an event', to: '/', icon: Search, text: '', }, { - title: 'Events you are enrolled in', to: '/my', icon: GamesIcon, text: '', + title: 'Events you are enrolled in', to: '/my', icon: GamepadRounded, text: '', }, { - title: 'Host your own competition', to: '/host', icon: LibraryAddIcon, text: '', + title: 'Your hosted competition', to: '/host', icon: AccessibilityNew, text: '', + }, + { + title: 'Host a new competition', to: '/create', icon: LibraryAdd, text: '', }, ]; diff --git a/client/src/index.js b/client/src/index.js index f1f7dc90c..63d02671a 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -11,6 +11,7 @@ import Search from './Components/Search'; import Events from './Components/Events'; import HostedEvents from './Components/HostedEvents'; import EditEvent from './Components/Event/Edit'; +import CreateEvent from './Components/Event/Create'; class App extends Component { constructor(props) { @@ -44,6 +45,7 @@ class App extends Component { + From 7347d472bd9b58a725ec0a65712992d715047a90 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 06:38:56 +0100 Subject: [PATCH 103/146] Adding a new mutation for updating event status --- .../src/schema/mutations/ChangeEventStatus.js | 39 +++++++++++++++++++ server/src/schema/mutations/index.js | 2 + 2 files changed, 41 insertions(+) create mode 100644 server/src/schema/mutations/ChangeEventStatus.js diff --git a/server/src/schema/mutations/ChangeEventStatus.js b/server/src/schema/mutations/ChangeEventStatus.js new file mode 100644 index 000000000..8e95007b0 --- /dev/null +++ b/server/src/schema/mutations/ChangeEventStatus.js @@ -0,0 +1,39 @@ +import { + GraphQLNonNull, + GraphQLID, +} from 'graphql'; +import { AuthentificationError } from '../../errors'; +import { EventType } from '../types'; +import { Event } from '../../models'; +import EventStatusEnum from '../types/enum/EventStatus'; + +const args = { + eventId: { type: new GraphQLNonNull(GraphQLID) }, + status: { type: EventStatusEnum }, +}; + +const resolve = (parent, { eventId: _id, status }, { userId: hostId }) => { + if (!hostId) { + throw new AuthentificationError(); + } + + return new Promise((res, rej) => { + Event.findOneAndUpdate({ _id, hostId }, { status }, { new: true }, (err, modifiedEvent) => { + if (err) { + rej(err); + return; + } + res(modifiedEvent); + }); + }); +}; + +const mutation = { + changeEventStatus: { + type: EventType, + args, + resolve, + }, +}; + +export default mutation; diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 1f621f13e..5aa9b2354 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -8,6 +8,7 @@ import RegisterToEventMutation from './RegisterToEvent'; import EditParticipantMutation from './EditParticipant'; import CreateFormulaMutation from './CreateFormula'; import CreatePlotterMutation from './CreatePlotter'; +import ChangeEventStatusMutation from './ChangeEventStatus'; const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -18,6 +19,7 @@ const Mutation = new GraphQLObjectType({ EditParticipantMutation, CreateFormulaMutation, CreatePlotterMutation, + ChangeEventStatusMutation, ), }); From 793b52e1d7380fe6ba51f036091a8ecf48814d9e Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 06:43:38 +0100 Subject: [PATCH 104/146] Renaming from status to state --- client/src/GraphQL/Fragments/event.js | 4 ++-- .../enums/{EventStatus.js => EventState.js} | 4 ++-- server/src/models/event.js | 8 ++++---- ...angeEventStatus.js => ChangeEventState.js} | 10 +++++----- server/src/schema/mutations/index.js | 4 ++-- server/src/schema/queries/Events.js | 4 ++-- server/src/schema/queries/EventsByHost.js | 4 ++-- server/src/schema/queries/EventsByTeam.js | 4 ++-- server/src/schema/types/Event.js | 4 ++-- server/src/schema/types/enum/EventState.js | 19 +++++++++++++++++++ server/src/schema/types/enum/EventStatus.js | 19 ------------------- 11 files changed, 42 insertions(+), 42 deletions(-) rename server/src/enums/{EventStatus.js => EventState.js} (84%) rename server/src/schema/mutations/{ChangeEventStatus.js => ChangeEventState.js} (65%) create mode 100644 server/src/schema/types/enum/EventState.js delete mode 100644 server/src/schema/types/enum/EventStatus.js diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js index cd72463a7..96be79f08 100644 --- a/client/src/GraphQL/Fragments/event.js +++ b/client/src/GraphQL/Fragments/event.js @@ -3,7 +3,7 @@ import gql from 'graphql-tag'; export const eventMinimalInfo = gql` fragment EventMinimalInfo on events_Event { id - status + state name startDatetime finishDatetime @@ -19,7 +19,7 @@ export const eventMinimalInfo = gql` export const eventFullInfo = gql` fragment EventFullInfo on events_Event { id - status + state name host{ alias diff --git a/server/src/enums/EventStatus.js b/server/src/enums/EventState.js similarity index 84% rename from server/src/enums/EventStatus.js rename to server/src/enums/EventState.js index 025c28fca..4541a47ef 100644 --- a/server/src/enums/EventStatus.js +++ b/server/src/enums/EventState.js @@ -6,7 +6,7 @@ export const INTERRUPTED = 'INTERRUPTED'; export const FINISHED = 'FINISHED'; export const ARCHIVED = 'ARCHIVED'; -export const EventStatusEnum = [ +export const EventStateEnum = [ UNPUBLISHED, PUBLISHED, CANCELLED, @@ -16,4 +16,4 @@ export const EventStatusEnum = [ ARCHIVED, ]; -export default EventStatusEnum; +export default EventStateEnum; diff --git a/server/src/models/event.js b/server/src/models/event.js index 87d495ccd..c95ef5744 100644 --- a/server/src/models/event.js +++ b/server/src/models/event.js @@ -3,15 +3,15 @@ import Plotter from './plotter'; import Formula from './formula'; import { UNPUBLISHED, - EventStatusEnum, -} from '../enums/EventStatus'; + EventStateEnum, +} from '../enums/EventState'; const { ObjectId } = Schema.Types; const eventSchema = new Schema({ - status: { + state: { type: String, - enum: EventStatusEnum, + enum: EventStateEnum, default: UNPUBLISHED, }, name: { diff --git a/server/src/schema/mutations/ChangeEventStatus.js b/server/src/schema/mutations/ChangeEventState.js similarity index 65% rename from server/src/schema/mutations/ChangeEventStatus.js rename to server/src/schema/mutations/ChangeEventState.js index 8e95007b0..ada9367b8 100644 --- a/server/src/schema/mutations/ChangeEventStatus.js +++ b/server/src/schema/mutations/ChangeEventState.js @@ -5,20 +5,20 @@ import { import { AuthentificationError } from '../../errors'; import { EventType } from '../types'; import { Event } from '../../models'; -import EventStatusEnum from '../types/enum/EventStatus'; +import EventStateEnum from '../types/enum/EventState'; const args = { eventId: { type: new GraphQLNonNull(GraphQLID) }, - status: { type: EventStatusEnum }, + state: { type: EventStateEnum }, }; -const resolve = (parent, { eventId: _id, status }, { userId: hostId }) => { +const resolve = (parent, { eventId: _id, state }, { userId: hostId }) => { if (!hostId) { throw new AuthentificationError(); } return new Promise((res, rej) => { - Event.findOneAndUpdate({ _id, hostId }, { status }, { new: true }, (err, modifiedEvent) => { + Event.findOneAndUpdate({ _id, hostId }, { state }, { new: true }, (err, modifiedEvent) => { if (err) { rej(err); return; @@ -29,7 +29,7 @@ const resolve = (parent, { eventId: _id, status }, { userId: hostId }) => { }; const mutation = { - changeEventStatus: { + changeEventState: { type: EventType, args, resolve, diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js index 5aa9b2354..2bd29dc34 100644 --- a/server/src/schema/mutations/index.js +++ b/server/src/schema/mutations/index.js @@ -8,7 +8,7 @@ import RegisterToEventMutation from './RegisterToEvent'; import EditParticipantMutation from './EditParticipant'; import CreateFormulaMutation from './CreateFormula'; import CreatePlotterMutation from './CreatePlotter'; -import ChangeEventStatusMutation from './ChangeEventStatus'; +import ChangeEventStateMutation from './ChangeEventState'; const Mutation = new GraphQLObjectType({ name: 'Mutation', @@ -19,7 +19,7 @@ const Mutation = new GraphQLObjectType({ EditParticipantMutation, CreateFormulaMutation, CreatePlotterMutation, - ChangeEventStatusMutation, + ChangeEventStateMutation, ), }); diff --git a/server/src/schema/queries/Events.js b/server/src/schema/queries/Events.js index e8d0bcfef..fae289a5b 100644 --- a/server/src/schema/queries/Events.js +++ b/server/src/schema/queries/Events.js @@ -4,7 +4,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; const args = { minDate: { type: GraphQLInt }, @@ -13,7 +13,7 @@ const args = { const resolve = (parent, { minDate, maxDate }) => Event.find( Object.assign( - { status: { $nin: [UNPUBLISHED, ARCHIVED] } }, + { state: { $nin: [UNPUBLISHED, ARCHIVED] } }, minDate || maxDate ? { startDatetime: diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js index 449314cb1..6941570d4 100644 --- a/server/src/schema/queries/EventsByHost.js +++ b/server/src/schema/queries/EventsByHost.js @@ -5,7 +5,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; const args = { hostId: { type: GraphQLString }, @@ -15,7 +15,7 @@ const args = { const resolve = (parent, { hostId, minDate, maxDate }, context) => Event.find( Object.assign( - hostId ? { hostId, status: { $nin: [UNPUBLISHED, ARCHIVED] } } : { hostId: context.userId }, + hostId ? { hostId, state: { $nin: [UNPUBLISHED, ARCHIVED] } } : { hostId: context.userId }, minDate || maxDate ? { startDatetime: diff --git a/server/src/schema/queries/EventsByTeam.js b/server/src/schema/queries/EventsByTeam.js index 7816ff347..e9147e9b9 100644 --- a/server/src/schema/queries/EventsByTeam.js +++ b/server/src/schema/queries/EventsByTeam.js @@ -6,7 +6,7 @@ import { } from 'graphql'; import { EventType } from '../types'; import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventStatus'; +import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; const args = { teamId: { type: new GraphQLNonNull(GraphQLString) }, @@ -18,7 +18,7 @@ const resolve = (parent, { teamId, minDate, maxDate }) => Event.find( Object.assign( { participants: { $elemMatch: { teamId } }, - status: { $nin: [UNPUBLISHED, ARCHIVED] }, + state: { $nin: [UNPUBLISHED, ARCHIVED] }, }, minDate || maxDate diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js index a53041cb4..e4582e346 100644 --- a/server/src/schema/types/Event.js +++ b/server/src/schema/types/Event.js @@ -12,14 +12,14 @@ import { ParticipantType, PrizeType, } from './index'; -import EventStatusEnumType from './enum/EventStatus'; +import EventStateEnumType from './enum/EventState'; const EventType = new GraphQLObjectType({ name: 'Event', description: 'Everything you need to know about an event', fields: () => ({ id: { type: GraphQLID }, - status: { type: EventStatusEnumType }, + state: { type: EventStateEnumType }, name: { type: GraphQLString }, hostId: { type: GraphQLString }, description: { type: GraphQLString }, diff --git a/server/src/schema/types/enum/EventState.js b/server/src/schema/types/enum/EventState.js new file mode 100644 index 000000000..d4ef1304f --- /dev/null +++ b/server/src/schema/types/enum/EventState.js @@ -0,0 +1,19 @@ +import { + GraphQLEnumType, +} from 'graphql'; + +import { EventStateEnum } from '../../../enums/EventState'; + +const values = {}; +EventStateEnum.forEach((EventState) => { + values[EventState] = { value: EventState }; +}); + +const EventStateEnumType = new GraphQLEnumType({ + name: 'EventStateEnum', + values, +}); + +export { + EventStateEnumType as default, +}; diff --git a/server/src/schema/types/enum/EventStatus.js b/server/src/schema/types/enum/EventStatus.js deleted file mode 100644 index 372abd92f..000000000 --- a/server/src/schema/types/enum/EventStatus.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - GraphQLEnumType, -} from 'graphql'; - -import { EventStatusEnum } from '../../../enums/EventStatus'; - -const values = {}; -EventStatusEnum.forEach((EventStatus) => { - values[EventStatus] = { value: EventStatus }; -}); - -const EventStatusEnumType = new GraphQLEnumType({ - name: 'EventStatusEnum', - values, -}); - -export { - EventStatusEnumType as default, -}; From f3da7110ae74d4f4d7cd5da48843b40dbed80ff3 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 08:53:51 +0100 Subject: [PATCH 105/146] Config and apply more linting --- client/.eslintrc.js | 2 ++ client/src/Components/HostedEvents/index.js | 2 +- client/src/Components/Search/Tabs/Future.js | 2 +- client/src/Components/Search/Tabs/Incoming.js | 4 ++-- client/src/Components/Search/Tabs/Past.js | 2 +- server/.eslintrc.js | 1 + 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/.eslintrc.js b/client/.eslintrc.js index 250847da1..bdd833da9 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -5,9 +5,11 @@ module.exports = { 'plugin:react/recommended', ], rules: { + 'max-len': ['error', 140, 2], 'no-underscore-dangle': 'off', 'no-param-reassign': 'off', 'react/prop-types': 0, + 'react/jsx-indent': ['error', 2], }, settings: { 'react': { diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index 20b531949..32989e655 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -14,7 +14,7 @@ const HostedEvent = () => ( if (loading) return 'Loading...'; if (error) return `Error! ${error.message}`; const list = data.events_EventsByHost.map((event, index) => ( - + )); return ( diff --git a/client/src/Components/Search/Tabs/Future.js b/client/src/Components/Search/Tabs/Future.js index 6a83bf3c9..d5dbfc089 100644 --- a/client/src/Components/Search/Tabs/Future.js +++ b/client/src/Components/Search/Tabs/Future.js @@ -12,7 +12,7 @@ class Future extends React.Component { const { FutureEvents } = this.props; const futureEvents = FutureEvents.map((event, index) => ( - + )); return ( diff --git a/client/src/Components/Search/Tabs/Incoming.js b/client/src/Components/Search/Tabs/Incoming.js index 94fe6b93b..ab6b070dc 100644 --- a/client/src/Components/Search/Tabs/Incoming.js +++ b/client/src/Components/Search/Tabs/Incoming.js @@ -12,10 +12,10 @@ class Incoming extends React.Component { const { IncomingEvents, OngoingEvents } = this.props; const incomingEvents = IncomingEvents.map((event, index) => ( - + )); const ongoingEvents = OngoingEvents.map((event, index) => ( - + )); return ( diff --git a/client/src/Components/Search/Tabs/Past.js b/client/src/Components/Search/Tabs/Past.js index 5ca060c67..b01cb0684 100644 --- a/client/src/Components/Search/Tabs/Past.js +++ b/client/src/Components/Search/Tabs/Past.js @@ -12,7 +12,7 @@ class Past extends React.Component { const { PastEvents } = this.props; const pastEvents = PastEvents.map((event, index) => ( - + )); return ( diff --git a/server/.eslintrc.js b/server/.eslintrc.js index 800621670..c06bffbce 100644 --- a/server/.eslintrc.js +++ b/server/.eslintrc.js @@ -2,6 +2,7 @@ module.exports = { parser: 'babel-eslint', extends: 'airbnb-base', rules: { + 'max-len': ['error', 140, 2], 'no-underscore-dangle': 'off', 'no-param-reassign': 'off', } From 822ccd8b22fb3f2ae9eef057afa1be4b8160e61c Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 6 Nov 2018 12:13:46 +0100 Subject: [PATCH 106/146] Legal update --- CONTRIBUTING.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..311653120 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributing + +We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! + +Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. + +Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. + +In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). + +# Balanced Contributor Intellectual Property Agreement 1.0.1 + +This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). + +**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. + +**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. + +The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. + +**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. + +Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: + +1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. + + "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. + +2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. + +3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. + +4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. + +5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. + +6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. + +7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. + +8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. + + "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. + + The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..c049df9cb --- /dev/null +++ b/LICENSE @@ -0,0 +1,42 @@ +COPYRIGHT NOTICE + +© Copyright 2018 Advanced Algos LTD. + + +LICENSE NOTICE + +Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of +the business are still not clearly defined, we have chosen to --temporarily-- grant a +restrictive license for the use of this repository, until those business aspects are clarified +and a proper open source license can be granted. + +Advanced Algos LTD. is publishing the code of this software for several reasons. However, +it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company +in the crypto space and this module is still proprietary software. + +The reasons for opening up the code of this module at this stage are the following: + + * We believe that transparency is paramount to achieving our goals, so we want everyone + to be able to understand what this module does and how. Opening up the code of this module + allows anyone to take a close look. + + * We welcome contributions from the community. Contributions are regarded as voluntary work. + There may be incentives in place for certain kinds of contributions. Contact us to learn more. + Contributors agree to provide an express grant of patent rights for their contributions. + + +LICENSE WORDING + +Advanced Algos LTD. grants a limited license for the following uses: + +1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, + review or audit the code. + +2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository + with the sole purpose of correcting bugs and developing functionality in agreement with + Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms + detailed in CONTRIBUTING.MD. + +PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. + + From 67ebb4d38408683aac04db80e7b1767ebcbd6a71 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 6 Nov 2018 12:18:21 +0100 Subject: [PATCH 107/146] Legal update --- CODE_OF_CONDUCT.md | 46 +++++++++++++++++++++++++++++++++++++++ client/CODE_OF_CONDUCT.md | 46 +++++++++++++++++++++++++++++++++++++++ client/CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++++++++++ client/LICENSE | 42 +++++++++++++++++++++++++++++++++++ server/CODE_OF_CONDUCT.md | 46 +++++++++++++++++++++++++++++++++++++++ server/CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++++++++++ server/LICENSE | 42 +++++++++++++++++++++++++++++++++++ 7 files changed, 312 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 client/CODE_OF_CONDUCT.md create mode 100644 client/CONTRIBUTING.md create mode 100644 client/LICENSE create mode 100644 server/CODE_OF_CONDUCT.md create mode 100644 server/CONTRIBUTING.md create mode 100644 server/LICENSE diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c71b685b4 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/client/CODE_OF_CONDUCT.md b/client/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c71b685b4 --- /dev/null +++ b/client/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/client/CONTRIBUTING.md b/client/CONTRIBUTING.md new file mode 100644 index 000000000..311653120 --- /dev/null +++ b/client/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributing + +We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! + +Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. + +Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. + +In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). + +# Balanced Contributor Intellectual Property Agreement 1.0.1 + +This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). + +**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. + +**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. + +The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. + +**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. + +Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: + +1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. + + "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. + +2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. + +3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. + +4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. + +5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. + +6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. + +7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. + +8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. + + "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. + + The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/client/LICENSE b/client/LICENSE new file mode 100644 index 000000000..c049df9cb --- /dev/null +++ b/client/LICENSE @@ -0,0 +1,42 @@ +COPYRIGHT NOTICE + +© Copyright 2018 Advanced Algos LTD. + + +LICENSE NOTICE + +Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of +the business are still not clearly defined, we have chosen to --temporarily-- grant a +restrictive license for the use of this repository, until those business aspects are clarified +and a proper open source license can be granted. + +Advanced Algos LTD. is publishing the code of this software for several reasons. However, +it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company +in the crypto space and this module is still proprietary software. + +The reasons for opening up the code of this module at this stage are the following: + + * We believe that transparency is paramount to achieving our goals, so we want everyone + to be able to understand what this module does and how. Opening up the code of this module + allows anyone to take a close look. + + * We welcome contributions from the community. Contributions are regarded as voluntary work. + There may be incentives in place for certain kinds of contributions. Contact us to learn more. + Contributors agree to provide an express grant of patent rights for their contributions. + + +LICENSE WORDING + +Advanced Algos LTD. grants a limited license for the following uses: + +1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, + review or audit the code. + +2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository + with the sole purpose of correcting bugs and developing functionality in agreement with + Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms + detailed in CONTRIBUTING.MD. + +PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. + + diff --git a/server/CODE_OF_CONDUCT.md b/server/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c71b685b4 --- /dev/null +++ b/server/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/server/CONTRIBUTING.md b/server/CONTRIBUTING.md new file mode 100644 index 000000000..311653120 --- /dev/null +++ b/server/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributing + +We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! + +Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. + +Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. + +In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). + +# Balanced Contributor Intellectual Property Agreement 1.0.1 + +This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). + +**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. + +**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. + +The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. + +**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. + +Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: + +1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. + + "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. + +2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. + +3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. + +4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. + +5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. + +6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. + +7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. + +8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. + + "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. + + The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/server/LICENSE b/server/LICENSE new file mode 100644 index 000000000..c049df9cb --- /dev/null +++ b/server/LICENSE @@ -0,0 +1,42 @@ +COPYRIGHT NOTICE + +© Copyright 2018 Advanced Algos LTD. + + +LICENSE NOTICE + +Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of +the business are still not clearly defined, we have chosen to --temporarily-- grant a +restrictive license for the use of this repository, until those business aspects are clarified +and a proper open source license can be granted. + +Advanced Algos LTD. is publishing the code of this software for several reasons. However, +it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company +in the crypto space and this module is still proprietary software. + +The reasons for opening up the code of this module at this stage are the following: + + * We believe that transparency is paramount to achieving our goals, so we want everyone + to be able to understand what this module does and how. Opening up the code of this module + allows anyone to take a close look. + + * We welcome contributions from the community. Contributions are regarded as voluntary work. + There may be incentives in place for certain kinds of contributions. Contact us to learn more. + Contributors agree to provide an express grant of patent rights for their contributions. + + +LICENSE WORDING + +Advanced Algos LTD. grants a limited license for the following uses: + +1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, + review or audit the code. + +2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository + with the sole purpose of correcting bugs and developing functionality in agreement with + Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms + detailed in CONTRIBUTING.MD. + +PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. + + From 461248f5e46a3e37712b5519a252a8abd90fadcd Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 14:07:23 +0100 Subject: [PATCH 108/146] First draft of the first page of the form --- client/src/Components/Event/Create/index.js | 144 ++++++++++++++----- client/src/Components/Event/Create/styles.js | 37 ++++- 2 files changed, 147 insertions(+), 34 deletions(-) diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 599d10f0e..69c200d2c 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -3,8 +3,18 @@ import { Mutation } from 'react-apollo'; import { DateTime } from 'luxon'; import { - Button, TextField, + FormControl, + InputLabel, + Input, + Button, + MenuItem, + FormGroup, + Select, + FormHelperText, + Paper, + Grid, + Typography, } from '@material-ui/core'; import { ChevronLeft, ChevronRight } from '@material-ui/icons'; import { DateTimePicker } from 'material-ui-pickers'; @@ -28,6 +38,7 @@ class Create extends React.Component { const { name, description, startDatetime, finishDatetime, } = this.state; + const { classes } = this.props; return ( { @@ -36,7 +47,11 @@ class Create extends React.Component { } > {hostEvent => ( -
+ + + + Create a new event + { e.preventDefault(); @@ -52,47 +67,110 @@ class Create extends React.Component { }); }} > + + These are the basic information you need to input in order to create an event. + There might be some heavy changes in the near future as the application is still at a very early stage. + + + + this.setState({ name: e.target.value })} - fullWidth + className={classes.inputField} /> this.setState({ description: e.target.value })} - fullWidth + className={classes.inputField} /> - } - rightArrowIcon={} - value={startDatetime} - onChange={date => this.setState({ startDatetime: date })} - helperText='Competition start date' - /> - } - rightArrowIcon={} - value={finishDatetime} - onChange={date => this.setState({ finishDatetime: date })} - helperText='Competition finishing date' - /> - + + + The dates are purely indicative, as it is important for you to make sure everything is + ready before manually triggering the beginning and end of the event. + If you are confident use the scheduler to start it for you(incoming). + + + + + + } + rightArrowIcon={} + value={startDatetime} + helperText='Competition start date' + /> + + + } + rightArrowIcon={} + value={finishDatetime} + helperText='Competition finishing date' + /> + + + + + + + Select the formula + + + For new formula, select {'"'}create new{'"'} + + + + Select the Plotter + + + For new plotter, select {'"'}create new{'"'} + + + + + + -
this.clearTempStates()} /> -
+
)} ); diff --git a/client/src/Components/Event/Create/styles.js b/client/src/Components/Event/Create/styles.js index 12fd82051..44ef163a0 100644 --- a/client/src/Components/Event/Create/styles.js +++ b/client/src/Components/Event/Create/styles.js @@ -1,4 +1,39 @@ -const styles = () => ({ +const styles = theme => ({ + root: { + width: '50%', + flexGrow: 1, + padding: 10, + marginLeft: '25%', + marginTop: '2%', + }, + inputField: { + width: '80%', + marginLeft: '10%', + marginTop: 25, + }, + typography: { + width: '80%', + marginLeft: '10%', + marginTop: 40, + }, + checkbox: { + width: 150, + marginLeft: '0%', + marginTop: 20, + }, + selectEmpty: { + marginTop: theme.spacing.unit * 2, + }, + button: { + margin: theme.spacing.unit, + marginTop: theme.spacing.unit * 3, + }, + img: { + display: 'block', + marginTop: 20, + maxWidth: 120, + maxHeight: 24, + }, }); export default styles; From a4d7e6ebfafd59284e0023a006c8be39701687d4 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 14:24:14 +0100 Subject: [PATCH 109/146] cleaning unused styles --- client/src/Components/TopBar/styles.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/src/Components/TopBar/styles.js b/client/src/Components/TopBar/styles.js index 6202592d6..675c55cab 100644 --- a/client/src/Components/TopBar/styles.js +++ b/client/src/Components/TopBar/styles.js @@ -6,10 +6,6 @@ const styles = theme => ({ flexGrow: 1, marginLeft: 30, }, - menuButton: { - marginLeft: -12, - marginRight: 20, - }, cssRoot: { color: '#FFFFFF', backgroundColor: theme.palette.secondary, @@ -20,15 +16,9 @@ const styles = theme => ({ paddingRight: 2 * theme.spacing.unit, paddingLeft: 2 * theme.spacing.unit, }, - button: { - margin: theme.spacing.unit, - }, leftIcon: { marginRight: theme.spacing.unit, }, - rightIcon: { - marginLeft: theme.spacing.unit, - }, iconSmall: { fontSize: 20, }, From 94d99ea92c92efdc898be5bd04f2d1612549ecab Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 15:05:37 +0100 Subject: [PATCH 110/146] Minimal refactoring before sending everything down a step --- .../src/Components/Event/Create/Tabs/Basic.js | 27 +++ .../Event/Create/Tabs/PresentationPage.js | 27 +++ .../Event/Create/Tabs/TeamsServer.js | 27 +++ .../Components/Event/Create/Tabs/Technical.js | 27 +++ .../src/Components/Event/Create/Tabs/index.js | 11 + client/src/Components/Event/Create/index.js | 202 ++++++++++++------ client/src/Components/Event/Create/styles.js | 46 ++-- 7 files changed, 288 insertions(+), 79 deletions(-) create mode 100644 client/src/Components/Event/Create/Tabs/Basic.js create mode 100644 client/src/Components/Event/Create/Tabs/PresentationPage.js create mode 100644 client/src/Components/Event/Create/Tabs/TeamsServer.js create mode 100644 client/src/Components/Event/Create/Tabs/Technical.js create mode 100644 client/src/Components/Event/Create/Tabs/index.js diff --git a/client/src/Components/Event/Create/Tabs/Basic.js b/client/src/Components/Event/Create/Tabs/Basic.js new file mode 100644 index 000000000..87760d33a --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Basic.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class Basic extends React.Component { + render() { + const { classes } = this.props; + return ( + + + Basic + + + ); + } +} + +export default withStyles(styles)(Basic); diff --git a/client/src/Components/Event/Create/Tabs/PresentationPage.js b/client/src/Components/Event/Create/Tabs/PresentationPage.js new file mode 100644 index 000000000..1c674ddcc --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/PresentationPage.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class PresentationPage extends React.Component { + render() { + const { classes } = this.props; + return ( + + + PresentationPage + + + ); + } +} + +export default withStyles(styles)(PresentationPage); diff --git a/client/src/Components/Event/Create/Tabs/TeamsServer.js b/client/src/Components/Event/Create/Tabs/TeamsServer.js new file mode 100644 index 000000000..874c72d6f --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/TeamsServer.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class TeamsServer extends React.Component { + render() { + const { classes } = this.props; + return ( + + + TeamsServer + + + ); + } +} + +export default withStyles(styles)(TeamsServer); diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js new file mode 100644 index 000000000..f091e6bd2 --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class Technical extends React.Component { + render() { + const { classes } = this.props; + return ( + + + Technical + + + ); + } +} + +export default withStyles(styles)(Technical); diff --git a/client/src/Components/Event/Create/Tabs/index.js b/client/src/Components/Event/Create/Tabs/index.js new file mode 100644 index 000000000..feecaaf55 --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/index.js @@ -0,0 +1,11 @@ +import Basic from './Basic'; +import PresentationPage from './PresentationPage'; +import TeamsServer from './TeamsServer'; +import Technical from './Technical'; + +export { + Basic, + PresentationPage, + TeamsServer, + Technical, +}; diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 69c200d2c..cfbd9686e 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -15,18 +15,44 @@ import { Paper, Grid, Typography, + AppBar, + Tabs, + Tab, } from '@material-ui/core'; -import { ChevronLeft, ChevronRight } from '@material-ui/icons'; +import { + ChevronLeft, + ChevronRight, + Face as BasicIcon, + Alarm as TechnicalIcon, + Group as TeamAndServerIcon, + PresentToAll as PresentationIcon, +} from '@material-ui/icons'; import { DateTimePicker } from 'material-ui-pickers'; import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import { + Basic, + PresentationPage, + TeamsServer, + Technical, +} from './Tabs'; + import { hostedEventsCalls } from '../../../GraphQL/Calls'; +function TabContainer(props) { + return ( + + {props.children} + + ); +} + class Create extends React.Component { constructor(props) { super(props); this.state = { + value: 0, name: '', description: '', startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'), @@ -34,9 +60,13 @@ class Create extends React.Component { }; } + handleChange = (event, value) => { + this.setState({ value }); + } + render() { const { - name, description, startDatetime, finishDatetime, + name, description, startDatetime, finishDatetime, value, } = this.state; const { classes } = this.props; return ( @@ -47,60 +77,94 @@ class Create extends React.Component { } > {hostEvent => ( - - - - Create a new event - -
{ - e.preventDefault(); - hostEvent({ - variables: { - event: { - name, - description, - startDatetime: startDatetime.valueOf() / 1000, - finishDatetime: startDatetime.valueOf() / 1000, - }, - }, - }); - }} +
+ + - + } + /> + } + /> + } + disabled + /> + } + disabled + /> + + + + + Create a new event + + { + e.preventDefault(); + hostEvent({ + variables: { + event: { + name, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: startDatetime.valueOf() / 1000, + }, + }, + }); + }} + > + {value === 0 && + These are the basic information you need to input in order to create an event. There might be some heavy changes in the near future as the application is still at a very early stage. - + - - - - + The dates are purely indicative, as it is important for you to make sure everything is ready before manually triggering the beginning and end of the event. If you are confident use the scheduler to start it for you(incoming). - + - - - - + + + - - - + + - - - + + + - - + + Select the formula - - } @@ -140,17 +204,17 @@ class Create extends React.Component { name='select' className={classes.selectEmpty} > - moi - toi - nous - - For new formula, select {'"'}create new{'"'} - - - + moi + toi + nous + + For new formula, select {'"'}create new{'"'} + + + Select the Plotter - - } @@ -158,19 +222,27 @@ class Create extends React.Component { name='select' className={classes.selectEmpty} > - moi - toi - nous - - For new plotter, select {'"'}create new{'"'} - - - - - - - - + moi + toi + nous + + For new plotter, select {'"'}create new{'"'} + + + + + + + + } + {value === 1 && } + {value === 2 && } + {value === 3 && } + + +
)} ); diff --git a/client/src/Components/Event/Create/styles.js b/client/src/Components/Event/Create/styles.js index 44ef163a0..150cf362d 100644 --- a/client/src/Components/Event/Create/styles.js +++ b/client/src/Components/Event/Create/styles.js @@ -1,5 +1,34 @@ const styles = theme => ({ root: { + flexGrow: 1, + width: '100%', + backgroundColor: theme.palette.background.paper, + padding: 0, + margin: 0, + }, + tabTitle: { + width: '25%', + maxWidth: 'none', + }, + card: { + flexGrow: 1, + padding: 20, + marginTop: 20, + marginBottom: 20, + marginLeft: 400, + marginRight: 400, + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right', + }, + buttonGrid: { + marginTop: -20, + }, + title: { + marginTop: 20, + }, + paperRoot: { width: '50%', flexGrow: 1, padding: 10, @@ -16,23 +45,12 @@ const styles = theme => ({ marginLeft: '10%', marginTop: 40, }, - checkbox: { - width: 150, - marginLeft: '0%', - marginTop: 20, - }, selectEmpty: { marginTop: theme.spacing.unit * 2, }, - button: { - margin: theme.spacing.unit, - marginTop: theme.spacing.unit * 3, - }, - img: { - display: 'block', - marginTop: 20, - maxWidth: 120, - maxHeight: 24, + bottomButton: { + padding: 15, + margin: 20, }, }); From cb4a1155960ba7cc3ab222822af19c8278c85a37 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 15:37:00 +0100 Subject: [PATCH 111/146] Making the whole state system and all for creating the input form --- .../src/Components/Event/Create/Tabs/Basic.js | 137 +++++++++++++++-- client/src/Components/Event/Create/index.js | 145 +++--------------- 2 files changed, 149 insertions(+), 133 deletions(-) diff --git a/client/src/Components/Event/Create/Tabs/Basic.js b/client/src/Components/Event/Create/Tabs/Basic.js index 87760d33a..8c7797557 100644 --- a/client/src/Components/Event/Create/Tabs/Basic.js +++ b/client/src/Components/Event/Create/Tabs/Basic.js @@ -1,5 +1,23 @@ import React from 'react'; -import { Typography } from '@material-ui/core'; +import { + TextField, + FormControl, + InputLabel, + Input, + Button, + MenuItem, + FormGroup, + Select, + FormHelperText, + Typography, + Grid, +} from '@material-ui/core'; +import { + ChevronLeft, + ChevronRight, +} from '@material-ui/icons'; +import { DateTimePicker } from 'material-ui-pickers'; + import { withStyles } from '@material-ui/core/styles'; import styles from '../styles'; @@ -7,18 +25,117 @@ import styles from '../styles'; class Basic extends React.Component { render() { - const { classes } = this.props; + const { classes, event, edit } = this.props; return ( - - Basic + + These are the basic information you need to input in order to create an event. + There might be some heavy changes in the near future as the application is still at a very early stage. + + + + edit('name', newVal.target.value)} + /> + edit('description', newVal.target.value)} + /> + + + The dates are purely indicative, as it is important for you to make sure everything is + ready before manually triggering the beginning and end of the event. + If you are confident use the scheduler to start it for you(incoming). + + + + + + } + rightArrowIcon={} + value={event.startDatetime} + helperText='Competition start date' + onChange={newVal => edit('startDatetime', newVal)} + /> + + + } + rightArrowIcon={} + value={event.finishDatetime} + helperText='Competition finishing date' + onChange={newVal => edit('finishDatetime', newVal)} + /> + + + + + + + Select the formula + + + For new formula, select {'"'}create new{'"'} + + + + Select the Plotter + + + For new plotter, select {'"'}create new{'"'} + + + + + + ); } diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index cfbd9686e..9def0ded7 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -3,31 +3,18 @@ import { Mutation } from 'react-apollo'; import { DateTime } from 'luxon'; import { - TextField, - FormControl, - InputLabel, - Input, - Button, - MenuItem, - FormGroup, - Select, - FormHelperText, Paper, - Grid, Typography, AppBar, Tabs, Tab, } from '@material-ui/core'; import { - ChevronLeft, - ChevronRight, Face as BasicIcon, Alarm as TechnicalIcon, Group as TeamAndServerIcon, PresentToAll as PresentationIcon, } from '@material-ui/icons'; -import { DateTimePicker } from 'material-ui-pickers'; import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; @@ -60,13 +47,21 @@ class Create extends React.Component { }; } - handleChange = (event, value) => { + handleTabChange = (event, value) => { this.setState({ value }); } + handleEventChange = (newType, newVal) => { + this.setState({ [newType]: newVal }); + } + render() { const { - name, description, startDatetime, finishDatetime, value, + name, + description, + startDatetime, + finishDatetime, + value, } = this.state; const { classes } = this.props; return ( @@ -81,7 +76,7 @@ class Create extends React.Component { {value === 0 && - - These are the basic information you need to input in order to create an event. - There might be some heavy changes in the near future as the application is still at a very early stage. - - - - - - - - - The dates are purely indicative, as it is important for you to make sure everything is - ready before manually triggering the beginning and end of the event. - If you are confident use the scheduler to start it for you(incoming). - - - - - - } - rightArrowIcon={} - value={startDatetime} - helperText='Competition start date' - /> - - - } - rightArrowIcon={} - value={finishDatetime} - helperText='Competition finishing date' - /> - - - - - - - Select the formula - - - For new formula, select {'"'}create new{'"'} - - - - Select the Plotter - - - For new plotter, select {'"'}create new{'"'} - - - - - - - - } + this.handleEventChange(newType, newVal)} + /> + } {value === 1 && } {value === 2 && } {value === 3 && } From 402632c1268a99d0970a10172cb42c5f19d30350 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 15:44:17 +0100 Subject: [PATCH 112/146] Putting select placeholder in second tab --- .../src/Components/Event/Create/Tabs/Basic.js | 53 +++--------------- .../Components/Event/Create/Tabs/Technical.js | 56 ++++++++++++++++--- client/src/Components/Event/Create/index.js | 14 ++++- 3 files changed, 69 insertions(+), 54 deletions(-) diff --git a/client/src/Components/Event/Create/Tabs/Basic.js b/client/src/Components/Event/Create/Tabs/Basic.js index 8c7797557..b5e6e4353 100644 --- a/client/src/Components/Event/Create/Tabs/Basic.js +++ b/client/src/Components/Event/Create/Tabs/Basic.js @@ -1,14 +1,8 @@ import React from 'react'; import { TextField, - FormControl, - InputLabel, - Input, Button, - MenuItem, FormGroup, - Select, - FormHelperText, Typography, Grid, } from '@material-ui/core'; @@ -92,47 +86,18 @@ class Basic extends React.Component { - - - - Select the formula - - - For new formula, select {'"'}create new{'"'} - - - - Select the Plotter - - - For new plotter, select {'"'}create new{'"'} - + diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js index f091e6bd2..389c237e7 100644 --- a/client/src/Components/Event/Create/Tabs/Technical.js +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -1,5 +1,13 @@ import React from 'react'; -import { Typography } from '@material-ui/core'; +import { + Typography, + FormControl, + InputLabel, + Input, + Select, + FormHelperText, + MenuItem, +} from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import styles from '../styles'; @@ -10,15 +18,45 @@ class Technical extends React.Component { const { classes } = this.props; return ( - - Technical + + Select the formula and the plotter you want to use, you can also create your own with the corresponding button. + + + Select the formula + + + For new formula, select {'"'}create new{'"'} + + + + Select the Plotter + + + For new plotter, select {'"'}create new{'"'} + ); } diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 9def0ded7..ee979cb1d 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -44,6 +44,8 @@ class Create extends React.Component { description: '', startDatetime: DateTime.local().plus({ days: 1 }).startOf('day'), finishDatetime: DateTime.local().plus({ days: 8 }).startOf('day'), + formulaId: '', + plotterId: '', }; } @@ -62,6 +64,8 @@ class Create extends React.Component { startDatetime, finishDatetime, value, + formulaId, + plotterId, } = this.state; const { classes } = this.props; return ( @@ -136,7 +140,15 @@ class Create extends React.Component { edit={(newType, newVal) => this.handleEventChange(newType, newVal)} /> } - {value === 1 && } + {value === 1 && + this.handleEventChange(newType, newVal)} + /> + } {value === 2 && } {value === 3 && } From 3921e32534890fbaa74ae8e45b16141dd1959d09 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 15:55:14 +0100 Subject: [PATCH 113/146] Connecting selects with state --- .../Components/Event/Create/Tabs/Technical.js | 22 +++++++++---------- client/src/Components/Event/Create/styles.js | 3 +++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js index 389c237e7..a463b151d 100644 --- a/client/src/Components/Event/Create/Tabs/Technical.js +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -15,7 +15,7 @@ import styles from '../styles'; class Technical extends React.Component { render() { - const { classes } = this.props; + const { classes, event, edit } = this.props; return ( @@ -26,36 +26,36 @@ class Technical extends React.Component { Select the formula } displayEmpty - name='select' className={classes.selectEmpty} + onChange={newVal => edit('formulaId', newVal.target.value)} > moi toi nous - For new formula, select {'"'}create new{'"'} + console.log('Comming soon in a modaal')}> + To create a new formula, click here + Select the Plotter } displayEmpty - name='select' className={classes.selectEmpty} + onChange={newVal => edit('plotterId', newVal.target.value)} > moi toi nous - For new plotter, select {'"'}create new{'"'} + To create a new plotter, click here ); diff --git a/client/src/Components/Event/Create/styles.js b/client/src/Components/Event/Create/styles.js index 150cf362d..9d5460326 100644 --- a/client/src/Components/Event/Create/styles.js +++ b/client/src/Components/Event/Create/styles.js @@ -10,6 +10,9 @@ const styles = theme => ({ width: '25%', maxWidth: 'none', }, + clickable: { + cursor: 'pointer', + }, card: { flexGrow: 1, padding: 20, From 881a4754a02b11761fc146ecae9aa85885418c0d Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 16:28:05 +0100 Subject: [PATCH 114/146] populating selects from graphql queries --- .../Components/Event/Create/Tabs/Technical.js | 91 ++++++++++++++----- client/src/GraphQL/Calls/getOptions.js | 31 +++++++ client/src/GraphQL/Calls/index.js | 2 + 3 files changed, 101 insertions(+), 23 deletions(-) create mode 100644 client/src/GraphQL/Calls/getOptions.js diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js index a463b151d..56bdf46f9 100644 --- a/client/src/Components/Event/Create/Tabs/Technical.js +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -1,4 +1,6 @@ import React from 'react'; +import { Query } from 'react-apollo'; + import { Typography, FormControl, @@ -8,10 +10,11 @@ import { FormHelperText, MenuItem, } from '@material-ui/core'; - import { withStyles } from '@material-ui/core/styles'; import styles from '../styles'; +import { getOptionsCalls } from '../../../../GraphQL/Calls/index'; + class Technical extends React.Component { render() { @@ -25,17 +28,38 @@ class Technical extends React.Component { Select the formula - + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Formulas.map((formula, index) => ( + {formula.name} + )); + return ( + + ); + }} + console.log('Comming soon in a modaal')}> To create a new formula, click here @@ -44,17 +68,38 @@ class Technical extends React.Component { Select the Plotter - + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Plotters.map((plotter, index) => ( + {plotter.name} + )); + return ( + + ); + }} + To create a new plotter, click here diff --git a/client/src/GraphQL/Calls/getOptions.js b/client/src/GraphQL/Calls/getOptions.js new file mode 100644 index 000000000..f7bd3edf0 --- /dev/null +++ b/client/src/GraphQL/Calls/getOptions.js @@ -0,0 +1,31 @@ +import gql from 'graphql-tag'; + +const EVENTS_FORMULAS = gql` + query Events_Formulas{ + events_Formulas { + id + ownerId + isTemplate + name + } + } +`; + +const EVENTS_PLOTTERS = gql` + query Events_Plotters{ + events_Plotters { + id + ownerId + isTemplate + name + host + repo + moduleName + } + } +`; + +export default { + EVENTS_PLOTTERS, + EVENTS_FORMULAS, +}; diff --git a/client/src/GraphQL/Calls/index.js b/client/src/GraphQL/Calls/index.js index 334af1c78..b8225b64b 100644 --- a/client/src/GraphQL/Calls/index.js +++ b/client/src/GraphQL/Calls/index.js @@ -1,9 +1,11 @@ import hostedEventsCalls from './hostedEvents'; import listEventsCalls from './listEvents'; import showEventCalls from './showEvent'; +import getOptionsCalls from './getOptions'; export { hostedEventsCalls, listEventsCalls, showEventCalls, + getOptionsCalls, }; From 6d83c37bf19db714a54a13e827326ef658bde2b8 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 6 Nov 2018 16:40:23 +0100 Subject: [PATCH 115/146] creating migrations and setting up fragments --- client/src/GraphQL/Calls/getOptions.js | 36 +++++++++++++++++-------- client/src/GraphQL/Fragments/index.js | 6 +++++ client/src/GraphQL/Fragments/options.js | 22 +++++++++++++++ 3 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 client/src/GraphQL/Fragments/options.js diff --git a/client/src/GraphQL/Calls/getOptions.js b/client/src/GraphQL/Calls/getOptions.js index f7bd3edf0..cb9dfa700 100644 --- a/client/src/GraphQL/Calls/getOptions.js +++ b/client/src/GraphQL/Calls/getOptions.js @@ -1,31 +1,45 @@ import gql from 'graphql-tag'; +import { formulaInfo, plotterInfo } from '../Fragments'; const EVENTS_FORMULAS = gql` query Events_Formulas{ events_Formulas { - id - ownerId - isTemplate - name + ...FormulaInfo } } + ${formulaInfo} `; const EVENTS_PLOTTERS = gql` query Events_Plotters{ events_Plotters { - id - ownerId - isTemplate - name - host - repo - moduleName + ...PlotterInfo } } + ${plotterInfo} +`; + +const EVENTS_CREATEFORMULA = gql` + mutation Events_CreateEvent($event:events_EventInput!) { + events_CreateEvent(event: $event) { + ...FormulaInfo + } + } + ${formulaInfo} +`; + +const EVENTS_CREATEPLOTTER = gql` + mutation Events_CreatePlotter($plotter:events_PlotterInput!) { + events_CreatePlotter(plotter: $plotter) { + ...PlotterInfo + } + } + ${plotterInfo} `; export default { EVENTS_PLOTTERS, EVENTS_FORMULAS, + EVENTS_CREATEFORMULA, + EVENTS_CREATEPLOTTER, }; diff --git a/client/src/GraphQL/Fragments/index.js b/client/src/GraphQL/Fragments/index.js index cb2ce691c..a28f9ce7c 100644 --- a/client/src/GraphQL/Fragments/index.js +++ b/client/src/GraphQL/Fragments/index.js @@ -2,8 +2,14 @@ import { eventMinimalInfo, eventFullInfo, } from './event'; +import { + formulaInfo, + plotterInfo, +} from './options'; export { eventMinimalInfo, eventFullInfo, + formulaInfo, + plotterInfo, }; diff --git a/client/src/GraphQL/Fragments/options.js b/client/src/GraphQL/Fragments/options.js new file mode 100644 index 000000000..c25a82d08 --- /dev/null +++ b/client/src/GraphQL/Fragments/options.js @@ -0,0 +1,22 @@ +import gql from 'graphql-tag'; + +export const plotterInfo = gql` + fragment PlotterInfo on events_Plotter { + id + ownerId + isTemplate + name + host + repo + moduleName + } +`; + +export const formulaInfo = gql` + fragment FormulaInfo on events_Formula { + id + ownerId + isTemplate + name + } +`; From b890bfc4729c8a361cb2d1744851ae42884c193d Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 7 Nov 2018 13:53:12 +0100 Subject: [PATCH 116/146] Removing the internal BrowserRouter --- client/src/Components/Event/Create/index.js | 2 +- client/src/Components/HostedEvents/Event.js | 4 ++-- client/src/Components/Search/Event.js | 2 +- client/src/Components/TopBar/data.js | 8 +++---- client/src/index.js | 24 +++++++++------------ 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index ee979cb1d..add8dd232 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -71,7 +71,7 @@ class Create extends React.Component { return ( { - this.props.history.push(`/edit/${data.events_CreateEvent.id}`); + this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); } } > diff --git a/client/src/Components/HostedEvents/Event.js b/client/src/Components/HostedEvents/Event.js index 4ba395132..bab987a59 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/client/src/Components/HostedEvents/Event.js @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/edit/${id}`} + to={`/events/edit/${id}`} > Edit @@ -60,7 +60,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${id}`} + to={`/events/show/${id}`} > Show diff --git a/client/src/Components/Search/Event.js b/client/src/Components/Search/Event.js index 43c72f0ec..1736098ee 100644 --- a/client/src/Components/Search/Event.js +++ b/client/src/Components/Search/Event.js @@ -50,7 +50,7 @@ class Event extends React.Component { color='primary' size='small' component={Link} - to={`/show/${id}`} + to={`/events/show/${id}`} > Show diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js index 5077584e1..89c775f60 100644 --- a/client/src/Components/TopBar/data.js +++ b/client/src/Components/TopBar/data.js @@ -7,16 +7,16 @@ import { const data = [ { - title: 'Look for an event', to: '/', icon: Search, text: '', + title: 'Look for an event', to: '/events/', icon: Search, text: '', }, { - title: 'Events you are enrolled in', to: '/my', icon: GamepadRounded, text: '', + title: 'Events you are enrolled in', to: '/events/my', icon: GamepadRounded, text: '', }, { - title: 'Your hosted competition', to: '/host', icon: AccessibilityNew, text: '', + title: 'Your hosted competition', to: '/events/host', icon: AccessibilityNew, text: '', }, { - title: 'Host a new competition', to: '/create', icon: LibraryAdd, text: '', + title: 'Host a new competition', to: '/events/create', icon: LibraryAdd, text: '', }, ]; diff --git a/client/src/index.js b/client/src/index.js index 63d02671a..778b76313 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Route, BrowserRouter, Switch } from 'react-router-dom'; +import { Route, Switch } from 'react-router-dom'; import { MuiPickersUtilsProvider } from 'material-ui-pickers'; import LuxonUtils from 'material-ui-pickers/utils/luxon-utils'; @@ -39,19 +39,15 @@ class App extends Component { } return ( - -
- {loggedIn} - - - - - - - - -
-
+ {loggedIn} + + + + + + + +
); } From 847f5bc76ec7a2c08c87580e49b17ebd94c6bd8b Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 7 Nov 2018 14:06:44 +0100 Subject: [PATCH 117/146] Adding a create button on the second tab --- client/src/Components/Event/Create/Tabs/Technical.js | 9 +++++++++ client/src/Components/Event/Create/index.js | 2 ++ 2 files changed, 11 insertions(+) diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical.js index 56bdf46f9..29607dd42 100644 --- a/client/src/Components/Event/Create/Tabs/Technical.js +++ b/client/src/Components/Event/Create/Tabs/Technical.js @@ -9,6 +9,8 @@ import { Select, FormHelperText, MenuItem, + Grid, + Button, } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import styles from '../styles'; @@ -102,6 +104,13 @@ class Technical extends React.Component { To create a new plotter, click here + + + + + ); } diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index add8dd232..f281854c0 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -124,6 +124,8 @@ class Create extends React.Component { description, startDatetime: startDatetime.valueOf() / 1000, finishDatetime: finishDatetime.valueOf() / 1000, + formulaId, + plotterId, }, }, }); From a703a5cc4554a4f20d06ab18d056d289eab04b80 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 7 Nov 2018 16:05:34 +0100 Subject: [PATCH 118/146] updating mutations --- client/src/GraphQL/Calls/getOptions.js | 6 +++--- client/src/GraphQL/Calls/hostedEvents.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/GraphQL/Calls/getOptions.js b/client/src/GraphQL/Calls/getOptions.js index cb9dfa700..979ab6d2b 100644 --- a/client/src/GraphQL/Calls/getOptions.js +++ b/client/src/GraphQL/Calls/getOptions.js @@ -20,8 +20,8 @@ const EVENTS_PLOTTERS = gql` `; const EVENTS_CREATEFORMULA = gql` - mutation Events_CreateEvent($event:events_EventInput!) { - events_CreateEvent(event: $event) { + mutation Events_CreateFormula($formula: events_FormulaInput!) { + events_CreateFormula(formula: $formula) { ...FormulaInfo } } @@ -29,7 +29,7 @@ const EVENTS_CREATEFORMULA = gql` `; const EVENTS_CREATEPLOTTER = gql` - mutation Events_CreatePlotter($plotter:events_PlotterInput!) { + mutation Events_CreatePlotter($plotter: events_PlotterInput!) { events_CreatePlotter(plotter: $plotter) { ...PlotterInfo } diff --git a/client/src/GraphQL/Calls/hostedEvents.js b/client/src/GraphQL/Calls/hostedEvents.js index 2fe4460be..563a9db2b 100644 --- a/client/src/GraphQL/Calls/hostedEvents.js +++ b/client/src/GraphQL/Calls/hostedEvents.js @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { eventMinimalInfo } from '../Fragments'; const EVENTS_CREATEEVENT = gql` - mutation Events_CreateEvent($event:events_EventInput!) { + mutation Events_CreateEvent($event: events_EventInput!) { events_CreateEvent(event: $event) { ...EventMinimalInfo } From f3ee4745816b38bba4124f6ab6992ea8e49ae3ea Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 7 Nov 2018 16:45:33 +0100 Subject: [PATCH 119/146] Implementing mutation to create new plotter and formula --- .../Event/Create/Tabs/Technical/NewFormula.js | 80 +++++++++++++ .../Event/Create/Tabs/Technical/NewPlotter.js | 110 ++++++++++++++++++ .../Tabs/{Technical.js => Technical/index.js} | 67 +++++++---- 3 files changed, 235 insertions(+), 22 deletions(-) create mode 100644 client/src/Components/Event/Create/Tabs/Technical/NewFormula.js create mode 100644 client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js rename client/src/Components/Event/Create/Tabs/{Technical.js => Technical/index.js} (64%) diff --git a/client/src/Components/Event/Create/Tabs/Technical/NewFormula.js b/client/src/Components/Event/Create/Tabs/Technical/NewFormula.js new file mode 100644 index 000000000..11ef9356b --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Technical/NewFormula.js @@ -0,0 +1,80 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; + +class NewFormula extends React.Component { + constructor() { + super(); + this.state = { name: '' }; + } + + render() { + const { name } = this.state; + return ( + this.props.closeDialogs()} + aria-labelledby='createFormula-dialog-title' + > + + Create a new formula + + + + At least for now, all the formulas are publically available, creating it here will let you select it in the select element. + + + { + const { events_Formulas: formulas } = store.readQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + data: { events_Formulas: formulas.concat([data.events_CreateFormula]) }, + }); + this.props.closeDialogs(); + } + } + > + {createFormula => ( +
+
{ + e.preventDefault(); + createFormula({ + variables: { + formula: { name }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + + +
+ )} +
+ + +
+
+ ); + } +} + +export default NewFormula; diff --git a/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js b/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js new file mode 100644 index 000000000..2aeeb50b5 --- /dev/null +++ b/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js @@ -0,0 +1,110 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; + +class NewPlotter extends React.Component { + constructor() { + super(); + this.state = { + name: '', + host: '', + repo: '', + moduleName: '', + }; + } + + render() { + const { + name, host, repo, moduleName, + } = this.state; + return ( + this.props.closeDialogs()} + aria-labelledby='createPlotter-dialog-title' + > + + Create a new plotter + + + + At least for now, all the plotters are publically available, creating it here will let you select it in the select element. + + + { + const { events_Plotters: plotters } = store.readQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + data: { events_Plotters: plotters.concat([data.events_CreatePlotter]) }, + }); + this.props.closeDialogs(); + } + } + > + {createPlotter => ( +
+
{ + e.preventDefault(); + createPlotter({ + variables: { + plotter: { + name, + host, + repo, + moduleName, + }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + this.setState({ host: e.target.value })} + fullWidth + /> + this.setState({ repo: e.target.value })} + fullWidth + /> + this.setState({ moduleName: e.target.value })} + fullWidth + /> + + +
+ )} +
+ + +
+
+ ); + } +} + +export default NewPlotter; diff --git a/client/src/Components/Event/Create/Tabs/Technical.js b/client/src/Components/Event/Create/Tabs/Technical/index.js similarity index 64% rename from client/src/Components/Event/Create/Tabs/Technical.js rename to client/src/Components/Event/Create/Tabs/Technical/index.js index 29607dd42..438ad27f9 100644 --- a/client/src/Components/Event/Create/Tabs/Technical.js +++ b/client/src/Components/Event/Create/Tabs/Technical/index.js @@ -13,14 +13,29 @@ import { Button, } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; -import styles from '../styles'; +import styles from '../../styles'; -import { getOptionsCalls } from '../../../../GraphQL/Calls/index'; +import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; +import NewPlotter from './NewPlotter'; +import NewFormula from './NewFormula'; class Technical extends React.Component { + constructor(props) { + super(props); + this.state = { + isNewFormulaOpen: false, + isNewPlotterOpen: false, + }; + } + + closeDialogs = () => { + this.setState({ isNewFormulaOpen: false, isNewPlotterOpen: false }); + } + render() { const { classes, event, edit } = this.props; + const { isNewPlotterOpen, isNewFormulaOpen } = this.state; return ( @@ -50,19 +65,22 @@ class Technical extends React.Component { {formula.name} )); return ( - + + + { isNewFormulaOpen ? this.closeDialogs()} /> : ''} + ); }} - console.log('Comming soon in a modaal')}> + { this.setState({ isNewFormulaOpen: true }); }}> To create a new formula, click here @@ -90,19 +108,24 @@ class Technical extends React.Component { {plotter.name} )); return ( - + + + { isNewPlotterOpen ? this.closeDialogs()} /> : ''} + ); }} - To create a new plotter, click here + { this.setState({ isNewPlotterOpen: true }); }} > + To create a new plotter, click here + From 2a8aa2e095536f859391c0ac601f9b16563dbb06 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Wed, 7 Nov 2018 16:56:55 +0100 Subject: [PATCH 120/146] Adding sortable-hoc package to dependency --- client/package-lock.json | 31 +++++++++++++++++++++++++++++++ client/package.json | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/client/package-lock.json b/client/package-lock.json index 839c3b060..a0e36fd6a 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -443,6 +443,27 @@ "eslint-visitor-keys": "^1.0.0" } }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + } + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2251,6 +2272,16 @@ "warning": "^4.0.1" } }, + "react-sortable-hoc": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-0.8.3.tgz", + "integrity": "sha512-vt2qQ9DnPLjGZ9osM2jBULdi7WfFXtYVuHvjHX8o2em7Rcla9FXIG60aWFbvvpFC1iXyATw5PWZX0B57EUOYfQ==", + "requires": { + "babel-runtime": "^6.11.6", + "invariant": "^2.2.1", + "prop-types": "^15.5.7" + } + }, "react-text-mask": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/react-text-mask/-/react-text-mask-5.4.1.tgz", diff --git a/client/package.json b/client/package.json index c02059c10..2f3803efb 100644 --- a/client/package.json +++ b/client/package.json @@ -32,6 +32,7 @@ "react": "^16.5.2", "react-apollo": "^2.2.4", "react-dom": "^16.6.0", - "react-router-dom": "^4.3.1" + "react-router-dom": "^4.3.1", + "react-sortable-hoc": "^0.8.3" } } From a53266f0504a5364a50a0cac55a416991fc9b516 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 8 Nov 2018 14:31:48 +0100 Subject: [PATCH 121/146] Removing old topbar --- client/src/Components/TopBar/data.js | 23 --------- client/src/Components/TopBar/index.js | 67 +++++++++++++------------- client/src/Components/TopBar/styles.js | 50 +++++++++++-------- client/src/index.js | 56 +++++---------------- 4 files changed, 77 insertions(+), 119 deletions(-) delete mode 100644 client/src/Components/TopBar/data.js diff --git a/client/src/Components/TopBar/data.js b/client/src/Components/TopBar/data.js deleted file mode 100644 index 89c775f60..000000000 --- a/client/src/Components/TopBar/data.js +++ /dev/null @@ -1,23 +0,0 @@ -import { - Search, - GamepadRounded, - AccessibilityNew, - LibraryAdd, -} from '@material-ui/icons'; - -const data = [ - { - title: 'Look for an event', to: '/events/', icon: Search, text: '', - }, - { - title: 'Events you are enrolled in', to: '/events/my', icon: GamepadRounded, text: '', - }, - { - title: 'Your hosted competition', to: '/events/host', icon: AccessibilityNew, text: '', - }, - { - title: 'Host a new competition', to: '/events/create', icon: LibraryAdd, text: '', - }, -]; - -export default data; diff --git a/client/src/Components/TopBar/index.js b/client/src/Components/TopBar/index.js index c3ac67581..82e6b319f 100644 --- a/client/src/Components/TopBar/index.js +++ b/client/src/Components/TopBar/index.js @@ -1,43 +1,42 @@ import React from 'react'; -import { Link } from 'react-router-dom'; -import classNames from 'classnames'; -import { - AppBar, Toolbar, Typography, Button, -} from '@material-ui/core'; +import { Typography } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; -import datas from './data'; import styles from './styles'; -const TopBar = ({ classes }) => { - const buttons = datas.map((data, index) => { - const Icon = data.icon; +class TopBar extends React.Component { + render() { + const { + classes, + size, + title, + text, + } = this.props; + if (size === 'big') { + return ( +
+
+ {title} + {text} +
+
+ ); + } + if (size === 'medium') { + return ( +
+
+ {title} + {text} +
+
+ ); + } return ( - ); - }); - return ( -
- - - - Manage competition - - {buttons} - - -
- ); -}; +
+ ); + } +} export default withStyles(styles)(TopBar); diff --git a/client/src/Components/TopBar/styles.js b/client/src/Components/TopBar/styles.js index 675c55cab..ef12ddf5f 100644 --- a/client/src/Components/TopBar/styles.js +++ b/client/src/Components/TopBar/styles.js @@ -1,26 +1,38 @@ -const styles = theme => ({ - root: { - flexGrow: 1, +const styles = () => ({ + rootBig: { + backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', + width: '100%', + height: '100vh', }, - flex: { - flexGrow: 1, - marginLeft: 30, + rootMedium: { + backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', + width: '100%', + height: '50vh', }, - cssRoot: { - color: '#FFFFFF', - backgroundColor: theme.palette.secondary, - '&:hover': { - backgroundColor: theme.palette.dark, - }, - whiteSpace: 'nowrap', - paddingRight: 2 * theme.spacing.unit, - paddingLeft: 2 * theme.spacing.unit, + rootSmall: { + backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', + width: '100%', + height: '220px', }, - leftIcon: { - marginRight: theme.spacing.unit, + captions: { + position: 'relative', + top: '50%', + transform: 'translateY(-50%)', }, - iconSmall: { - fontSize: 20, + title: { + fontFamily: 'Saira', + color: 'white', + fontSize: '64px', + lineHeight: '78px', + fontWeight: 100, + }, + text: { + fontFamily: 'Saira', + color: 'white', + fontSize: '20px', + lineHeight: '30px', + fontWeight: 600, + padding: '20px 0 0.5em 0', }, }); diff --git a/client/src/index.js b/client/src/index.js index 778b76313..cdcd36eb2 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,56 +1,26 @@ -import React, { Component } from 'react'; +import React from 'react'; import { Route, Switch } from 'react-router-dom'; import { MuiPickersUtilsProvider } from 'material-ui-pickers'; import LuxonUtils from 'material-ui-pickers/utils/luxon-utils'; -import { getItem } from './utils/local-storage'; - -import TopBar from './Components/TopBar'; import Search from './Components/Search'; import Events from './Components/Events'; import HostedEvents from './Components/HostedEvents'; import EditEvent from './Components/Event/Edit'; import CreateEvent from './Components/Event/Create'; -class App extends Component { - constructor(props) { - super(props); - this.state = { - user: null, - }; - } - - async componentDidMount() { - let user = await getItem('user'); - - if (user !== null && user !== undefined && user !== 'undefined') { - user = JSON.parse(user); - this.setState({ user }); - } - } - - render() { - let loggedIn; - if (this.state.user !== null) { - loggedIn = (); - } else { - loggedIn = ''; - } - return ( - - {loggedIn} - - - - - - - - - - ); - } -} +const App = () => ( + + + + + + + + + + +); export default App; From e47b4a4b7aed91c107ba3836ec9b17f9a27cba11 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 8 Nov 2018 14:32:17 +0100 Subject: [PATCH 122/146] Integration of the new topbar --- client/src/Components/Event/Create/index.js | 175 ++++++++++---------- client/src/Components/Event/Edit/index.js | 3 + client/src/Components/Events/index.js | 5 +- client/src/Components/HostedEvents/index.js | 3 + client/src/Components/Search/index.js | 123 +++++++------- 5 files changed, 164 insertions(+), 145 deletions(-) diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index f281854c0..06e3e74ee 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -18,6 +18,8 @@ import { import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import TopBar from '../../TopBar'; + import { Basic, PresentationPage, @@ -69,95 +71,98 @@ class Create extends React.Component { } = this.state; const { classes } = this.props; return ( - { - this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); - } - } - > - {hostEvent => ( -
- - - } - /> - } - /> - } - disabled - /> - } - disabled - /> - - - - - Create a new event - -
{ - e.preventDefault(); - hostEvent({ - variables: { - event: { + + + { + this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); + } + } + > + {hostEvent => ( +
+ + + } + /> + } + /> + } + disabled + /> + } + disabled + /> + + + + + Create a new event + + { + e.preventDefault(); + hostEvent({ + variables: { + event: { + name, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: finishDatetime.valueOf() / 1000, + formulaId, + plotterId, + }, + }, + }); + }} + > + {value === 0 && + this.handleEventChange(newType, newVal)} + /> + } + {value === 1 && + - {value === 0 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 1 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 2 && } - {value === 3 && } - - -
- )} -
+ }} + edit={(newType, newVal) => this.handleEventChange(newType, newVal)} + /> + } + {value === 2 && } + {value === 3 && } + +
+
+ )} +
+ ); } } diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index f63874df6..0ed096d23 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -6,12 +6,15 @@ import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import TopBar from '../../TopBar'; + import { showEventCalls } from '../../../GraphQL/Calls/index'; class Edit extends React.Component { render() { return ( +

Here will come a list the competitions you applied for

; +const Index = () => ( + +); export default Index; diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index 32989e655..d3a67dd94 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -1,12 +1,15 @@ import React from 'react'; import { Query } from 'react-apollo'; +import TopBar from '../TopBar'; + import { hostedEventsCalls } from '../../GraphQL/Calls/index'; import Event from './Event'; const HostedEvent = () => ( + diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index d1799aa7f..945248476 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -17,6 +17,8 @@ import { import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import TopBar from '../TopBar'; + import { listEventsCalls } from '../../GraphQL/Calls/index'; import { @@ -50,67 +52,70 @@ class Search extends React.Component { const { classes } = this.props; const { value } = this.state; return ( - - {({ loading, error, data }) => { - if (loading) return 'Loading...'; - if (error) return `Error! ${error.message}`; - const now = Math.floor(DateTime.local().valueOf() / 1000); - const inTwoWeeks = Math.floor(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000); + + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + const now = Math.floor(DateTime.local().valueOf() / 1000); + const inTwoWeeks = Math.floor(DateTime.local().plus({ weeks: 2 }).valueOf() / 1000); - const IncomingEvents = data.events_Events.filter(event => event.startDatetime > now - && event.startDatetime < inTwoWeeks); - const OngoingEvents = data.events_Events.filter(event => event.finishDatetime > now - && event.startDatetime < now); - const FutureEvents = data.events_Events.filter(event => event.startDatetime > now); - const PastEvents = data.events_Events.filter(event => event.finishDatetime < now); + const IncomingEvents = data.events_Events.filter(event => event.startDatetime > now + && event.startDatetime < inTwoWeeks); + const OngoingEvents = data.events_Events.filter(event => event.finishDatetime > now + && event.startDatetime < now); + const FutureEvents = data.events_Events.filter(event => event.startDatetime > now); + const PastEvents = data.events_Events.filter(event => event.finishDatetime < now); - return ( - -
- - - } - /> - } - /> - } - /> - } - /> - - - {value === 0 && - - } - {value === 1 && } - {value === 2 && } - {value === 3 && } -
-
- ); - }} -
+ return ( + +
+ + + } + /> + } + /> + } + /> + } + /> + + + {value === 0 && + + } + {value === 1 && } + {value === 2 && } + {value === 3 && } +
+
+ ); + }} +
+
); } } From 606deac1fd55b462c1134c3e420d7542ab2d7e13 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 8 Nov 2018 14:32:52 +0100 Subject: [PATCH 123/146] Changing version in the package file for npm --- client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/package.json b/client/package.json index 2f3803efb..1e2ca46e7 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@advancedalgos/events-client", - "version": "0.0.1", + "version": "0.0.2", "description": "Advanced Algos Event client-side web app", "author": "", "license": "", From a1b7bd409a614a1159313d0c5879a21bb3375f60 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 17:26:18 +0100 Subject: [PATCH 124/146] Updating top bar and npm version --- client/package.json | 2 +- client/src/Components/BannerTopBar/index.js | 18 +++++++++ client/src/Components/Event/Create/index.js | 4 +- client/src/Components/Event/Edit/index.js | 4 +- client/src/Components/Events/index.js | 4 +- client/src/Components/HostedEvents/index.js | 4 +- client/src/Components/Search/index.js | 4 +- client/src/Components/TopBar/index.js | 42 --------------------- client/src/Components/TopBar/styles.js | 39 ------------------- 9 files changed, 29 insertions(+), 92 deletions(-) create mode 100644 client/src/Components/BannerTopBar/index.js delete mode 100644 client/src/Components/TopBar/index.js delete mode 100644 client/src/Components/TopBar/styles.js diff --git a/client/package.json b/client/package.json index 1e2ca46e7..9c0f49843 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@advancedalgos/events-client", - "version": "0.0.2", + "version": "0.0.3", "description": "Advanced Algos Event client-side web app", "author": "", "license": "", diff --git a/client/src/Components/BannerTopBar/index.js b/client/src/Components/BannerTopBar/index.js new file mode 100644 index 000000000..c006763f9 --- /dev/null +++ b/client/src/Components/BannerTopBar/index.js @@ -0,0 +1,18 @@ +import React from 'react'; +import Typography from '@material-ui/core/Typography'; + +const BannerTopBar = ({ + size, + backgroundUrl, + title, + text, +}) => ( +
+
+ {title} + {text} +
+
+); + +export default BannerTopBar; diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 06e3e74ee..34fd76ac6 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -18,7 +18,7 @@ import { import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; -import TopBar from '../../TopBar'; +import BannerTopBar from '../../BannerTopBar'; import { Basic, @@ -72,7 +72,7 @@ class Create extends React.Component { const { classes } = this.props; return ( - + { this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 0ed096d23..0b08d92e0 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -6,7 +6,7 @@ import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; -import TopBar from '../../TopBar'; +import BannerTopBar from '../../BannerTopBar'; import { showEventCalls } from '../../../GraphQL/Calls/index'; @@ -14,7 +14,7 @@ class Edit extends React.Component { render() { return ( - + ( - + ); export default Index; diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index d3a67dd94..b19f12447 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { Query } from 'react-apollo'; -import TopBar from '../TopBar'; +import BannerTopBar from '../BannerTopBar'; import { hostedEventsCalls } from '../../GraphQL/Calls/index'; @@ -9,7 +9,7 @@ import Event from './Event'; const HostedEvent = () => ( - + diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 945248476..549ccb304 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -17,7 +17,7 @@ import { import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; -import TopBar from '../TopBar'; +import BannerTopBar from '../BannerTopBar'; import { listEventsCalls } from '../../GraphQL/Calls/index'; @@ -53,7 +53,7 @@ class Search extends React.Component { const { value } = this.state; return ( - + diff --git a/client/src/Components/TopBar/index.js b/client/src/Components/TopBar/index.js deleted file mode 100644 index 82e6b319f..000000000 --- a/client/src/Components/TopBar/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; - -import { Typography } from '@material-ui/core'; -import { withStyles } from '@material-ui/core/styles'; - -import styles from './styles'; - -class TopBar extends React.Component { - render() { - const { - classes, - size, - title, - text, - } = this.props; - if (size === 'big') { - return ( -
-
- {title} - {text} -
-
- ); - } - if (size === 'medium') { - return ( -
-
- {title} - {text} -
-
- ); - } - return ( -
- ); - } -} - -export default withStyles(styles)(TopBar); diff --git a/client/src/Components/TopBar/styles.js b/client/src/Components/TopBar/styles.js deleted file mode 100644 index ef12ddf5f..000000000 --- a/client/src/Components/TopBar/styles.js +++ /dev/null @@ -1,39 +0,0 @@ -const styles = () => ({ - rootBig: { - backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', - width: '100%', - height: '100vh', - }, - rootMedium: { - backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', - width: '100%', - height: '50vh', - }, - rootSmall: { - backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)', - width: '100%', - height: '220px', - }, - captions: { - position: 'relative', - top: '50%', - transform: 'translateY(-50%)', - }, - title: { - fontFamily: 'Saira', - color: 'white', - fontSize: '64px', - lineHeight: '78px', - fontWeight: 100, - }, - text: { - fontFamily: 'Saira', - color: 'white', - fontSize: '20px', - lineHeight: '30px', - fontWeight: 600, - padding: '20px 0 0.5em 0', - }, -}); - -export default styles; From e0f8b3acf85ad072ab20aa27838531c7955f4e9c Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 17:58:11 +0100 Subject: [PATCH 125/146] Changing the picture of the banner --- client/package.json | 2 +- client/src/Components/Event/Create/index.js | 2 +- client/src/Components/Event/Edit/index.js | 2 +- client/src/Components/Events/index.js | 7 ++++++- client/src/Components/HostedEvents/index.js | 7 ++++++- client/src/Components/Search/index.js | 7 ++++++- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/client/package.json b/client/package.json index 9c0f49843..e8bc69f9b 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@advancedalgos/events-client", - "version": "0.0.3", + "version": "0.0.4", "description": "Advanced Algos Event client-side web app", "author": "", "license": "", diff --git a/client/src/Components/Event/Create/index.js b/client/src/Components/Event/Create/index.js index 34fd76ac6..16e63d092 100644 --- a/client/src/Components/Event/Create/index.js +++ b/client/src/Components/Event/Create/index.js @@ -72,7 +72,7 @@ class Create extends React.Component { const { classes } = this.props; return ( - + { this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js index 0b08d92e0..c1a8cb646 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/client/src/Components/Event/Edit/index.js @@ -14,7 +14,7 @@ class Edit extends React.Component { render() { return ( - + ( - + ); export default Index; diff --git a/client/src/Components/HostedEvents/index.js b/client/src/Components/HostedEvents/index.js index b19f12447..0a1305b0f 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/client/src/Components/HostedEvents/index.js @@ -9,7 +9,12 @@ import Event from './Event'; const HostedEvent = () => ( - + diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js index 549ccb304..4c07b3071 100644 --- a/client/src/Components/Search/index.js +++ b/client/src/Components/Search/index.js @@ -53,7 +53,12 @@ class Search extends React.Component { const { value } = this.state; return ( - + From 10706418b75968d357f69a2fe6eef60ae99f777a Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 18:00:46 +0100 Subject: [PATCH 126/146] adding graphql as a dependency --- server/package-lock.json | 419 +++++++++++++++++++++------------------ server/package.json | 2 +- 2 files changed, 224 insertions(+), 197 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index c73da79d8..51ff584a7 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -29,12 +29,12 @@ } }, "@babel/generator": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", - "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.5.tgz", + "integrity": "sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==", "dev": true, "requires": { - "@babel/types": "^7.1.3", + "@babel/types": "^7.1.5", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -42,9 +42,9 @@ }, "dependencies": { "jsesc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true } } @@ -127,15 +127,15 @@ } }, "@babel/parser": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", - "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.5.tgz", + "integrity": "sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==", "dev": true }, "@babel/runtime-corejs2": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.1.2.tgz", - "integrity": "sha512-drxaPByExlcRDKW4ZLubUO4ZkI8/8ax9k9wve1aEthdLKFzjB7XRkOQ0xoTIWGxqdDnWDElkjYq77bt7yrcYJQ==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.1.5.tgz", + "integrity": "sha512-WsYRwQsFhVmxkAqwypPTZyV9GpkqMEaAr2zOItOmqSX2GBFaI+eq98CN81e13o0zaUKJOQGYyjhNVqj56nnkYg==", "requires": { "core-js": "^2.5.7", "regenerator-runtime": "^0.12.0" @@ -153,17 +153,17 @@ } }, "@babel/traverse": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz", - "integrity": "sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.5.tgz", + "integrity": "sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.3", + "@babel/generator": "^7.1.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.3", - "@babel/types": "^7.1.3", + "@babel/parser": "^7.1.5", + "@babel/types": "^7.1.5", "debug": "^3.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" @@ -193,9 +193,9 @@ } }, "@babel/types": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", - "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.5.tgz", + "integrity": "sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -266,43 +266,43 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@sentry/core": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.2.4.tgz", - "integrity": "sha512-Oqn6dQduKBIJ8DNTyA6Hp5Nj3sOH/P0buT02wIv9InIHmxBVJ0zj/b4zRmOOuz77ikglOf5WL3cavdWF/2l2PA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.3.0.tgz", + "integrity": "sha512-VEMRshyF2J2IJkGTF9fnAd2/a/wR+42qrKwCLVeNxHzZm53VAnSfJd8ZA5jnN5RiydQVGDOylqvdfij/LmmsuQ==", "requires": { - "@sentry/hub": "4.2.4", - "@sentry/minimal": "4.2.4", - "@sentry/types": "4.2.4", - "@sentry/utils": "4.2.4" + "@sentry/hub": "4.3.0", + "@sentry/minimal": "4.3.0", + "@sentry/types": "4.3.0", + "@sentry/utils": "4.3.0" } }, "@sentry/hub": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.2.4.tgz", - "integrity": "sha512-9X77HAGk/XT7k5OD4F+SUO3PIeLV1uMuzvGgw9cxxl/gSv70MO35bP6mJIVrA0U4NGtvmtYTTWsWB9moRCiE1g==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.3.0.tgz", + "integrity": "sha512-9nh4Hcx2tZQVHr5JGy1XZd1RgwC2C+1tNFXu06rcxYB20nhKOKtOAH9STrv64vpnK+70AC4miRdlCgqHOKLdxA==", "requires": { - "@sentry/types": "4.2.4", - "@sentry/utils": "4.2.4" + "@sentry/types": "4.3.0", + "@sentry/utils": "4.3.0" } }, "@sentry/minimal": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.2.4.tgz", - "integrity": "sha512-IKzva0leEoP1ZOBh6NgIwqsvO2DM+GAKtCuNi0dfKYp1Qt6PLXHZQXaPim6kC0h/bKHe3+m/d4NXrpJdDrD7BQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.3.0.tgz", + "integrity": "sha512-yRN+L3O9mlcjqpWiivqJsm3Cy/YNh0ejQKpxxxPD186tl5nzEkAqRq5jCYelYIAdH1eBvg87H5VNNFr/shHxaQ==", "requires": { - "@sentry/hub": "4.2.4", - "@sentry/types": "4.2.4" + "@sentry/hub": "4.3.0", + "@sentry/types": "4.3.0" } }, "@sentry/node": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.2.4.tgz", - "integrity": "sha512-82wPAOGqBhw1KvCkeeZXvCsWurOaZfEm3d7hfHXj5nnVbUr0Xb2HcRTNzBYPtMYXFZ9N0UNIn5nfGk7zmvpUuA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.3.0.tgz", + "integrity": "sha512-2TZHi0XYpSVzKGT/M7mMlXidya4+ZmSZxZCMJ8KlWPljuQxzPoUeGwmYGXOHEsktOGG2eGajDv1hjGtHfamlnA==", "requires": { - "@sentry/core": "4.2.4", - "@sentry/hub": "4.2.4", - "@sentry/types": "4.2.4", - "@sentry/utils": "4.2.4", + "@sentry/core": "4.3.0", + "@sentry/hub": "4.3.0", + "@sentry/types": "4.3.0", + "@sentry/utils": "4.3.0", "cookie": "0.3.1", "lsmod": "1.0.0", "md5": "2.2.1", @@ -310,16 +310,16 @@ } }, "@sentry/types": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.2.4.tgz", - "integrity": "sha512-oMtNVx1R4gMl2cECn8bNthSgEHBknES3yVZftyPbecOp3TwPb6MSbWdIWjxgVai1jXi9a/ZCuE/Zoypy33CBrA==" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.3.0.tgz", + "integrity": "sha512-oBAusA+/JFJJlNfHgikyBPTyvmCr/YxZsLWL2FNOBNJkMClW+m7tQ63x/ZAqRSEd8lnJQxJSU7LfAYDH6LcChQ==" }, "@sentry/utils": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.2.4.tgz", - "integrity": "sha512-S8wZM6X642AhaUejhbYu1neU8IxtFhgc7JeVM5BmNivzXOW/hrTIDpDiDvYZLq1KhdSpH8+Z8WnntmGWhW4PFg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.3.0.tgz", + "integrity": "sha512-cEGygJbyc1SUGxbanvk3+JYadiywJupdEkp6L8rRfxur/nNQZq1Jd7tkdm4I2rz5YFVg+yayadAquvr4DIu9nA==", "requires": { - "@sentry/types": "4.2.4" + "@sentry/types": "4.3.0" } }, "@types/accepts": { @@ -391,9 +391,9 @@ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" }, "@types/node": { - "version": "10.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.2.tgz", - "integrity": "sha512-53ElVDSnZeFUUFIYzI8WLQ25IhWzb6vbddNp8UHlXQyU0ET2RhV5zg0NfubzU7iNMh5bBXb0htCzfvrSVNgzaQ==" + "version": "10.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.3.tgz", + "integrity": "sha512-sfGmOtSMSbQ/AKG8V9xD1gmjquC9awIIZ/Kj309pHb2n3bcRAcGMQv5nJ6gCXZVsneGE4+ve8DXKRCsrg3TFzg==" }, "@types/range-parser": { "version": "1.2.2", @@ -410,9 +410,9 @@ } }, "@types/ws": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-5.1.2.tgz", - "integrity": "sha512-NkTXUKTYdXdnPE2aUUbGOXE1XfMK527SCvU/9bj86kyFF6kZ9ZnOQ3mK5jADn98Y2vEUD/7wKDgZa7Qst2wYOg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.1.tgz", + "integrity": "sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q==", "requires": { "@types/events": "*", "@types/node": "*" @@ -496,39 +496,39 @@ } }, "apollo-cache-control": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.2.5.tgz", - "integrity": "sha512-xEDrUvo3U2mQKSzA8NzQmgeqK4ytwFnTGl2YKGKPfG0+r8fZdswKp6CDBue29KLO8KkSuqW/hntveWrAdK51FQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.3.0.tgz", + "integrity": "sha512-XtkinmravL9/IEAPXzJod9fKx4iesS0TNBV/619xwurv8eopZkbAiKVZ3WB4rbjoGQpBgEs0bekWIAhYGWLyOw==", "requires": { - "apollo-server-env": "^2.0.3", - "graphql-extensions": "^0.2.1" + "apollo-server-env": "2.2.0", + "graphql-extensions": "0.3.0" } }, "apollo-datasource": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.1.3.tgz", - "integrity": "sha512-yEGEe5Cjzqqu5ml1VV3O8+C+thzdknZri9Ny0P3daTGNO+45J3vBOMcmaANeeI2+OOeWxdqUNa5aPOx/35kniw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.2.0.tgz", + "integrity": "sha512-WJM9Ix3uogIfAG7mjL1NZQM9+45rcikn4mPWhE1Iuyw2+Y857J3uKJqQgF5h9Fg64SlCJh9u5WL3N7N5mg1fVw==", "requires": { - "apollo-server-caching": "0.1.2", - "apollo-server-env": "2.0.3" + "apollo-server-caching": "0.2.0", + "apollo-server-env": "2.2.0" } }, "apollo-engine-reporting": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.0.6.tgz", - "integrity": "sha512-JmfNJ9v3QEJQ8ZhLfCKEDiww53n5kj5HarP85p8LreoYNojbvcWN8Qm6RgvSG5N/ZJrAYHeTRQbSxm1vWwGubw==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.1.0.tgz", + "integrity": "sha512-OjG9MmNWRS3ZMSDc44Z6QMFQ66VDzs/E4H1yZELZ77BVrLsDx4i8Fft95byywACUpLvXhrCRtOdSZIwRPDq+cw==", "requires": { - "apollo-engine-reporting-protobuf": "^0.0.1", - "apollo-server-env": "^2.0.3", + "apollo-engine-reporting-protobuf": "0.1.0", + "apollo-server-env": "2.2.0", "async-retry": "^1.2.1", - "graphql-extensions": "^0.2.1", + "graphql-extensions": "0.3.0", "lodash": "^4.17.10" } }, "apollo-engine-reporting-protobuf": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.0.1.tgz", - "integrity": "sha512-AySoDgog2p1Nph44FyyqaU4AfRZOXx8XZxRsVHvYY4dHlrMmDDhhjfF3Jswa7Wr8X/ivvx3xA0jimRn6rsG8Ew==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.1.0.tgz", + "integrity": "sha512-GReJtAYTmpwg0drb9VgFtqObYYTCHkJhlHEYCeXY8bJV4fOgXsAZ7CIXR9nPKO0mBaoHIHaGYvXGcyCLrZ36VA==", "requires": { "protobufjs": "^6.8.6" } @@ -543,78 +543,85 @@ } }, "apollo-server-caching": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.1.2.tgz", - "integrity": "sha512-jBRnsTgXN0m8yVpumoelaUq9mXR7YpJ3EE+y/alI7zgXY+0qFDqksRApU8dEfg3q6qUnO7rFxRhdG5eyc0+1ig==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.2.0.tgz", + "integrity": "sha512-/v7xWEcyyahs3hwX4baH/GekuHz3LRt9NoIYwg869G1eeqjuwY6NsowRIujZ100anJQwm9v5A9/sLtHBFvbgYg==", "requires": { "lru-cache": "^4.1.3" } }, "apollo-server-core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.1.0.tgz", - "integrity": "sha512-D1Tw0o3NzCQ2KGM8EWh9AHELHmn/SE361dtlqJxkbelxXqAkCIGIFywF30h+0ezhMbgbO7eqBBJfvRilF/oJHA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.2.0.tgz", + "integrity": "sha512-Pd9YpC/xSzpVOr6KM5bDHQdcI8jjKu3hb8x7eyevh/Q7eyrF+ClmfPZvY5EnG4ETIJsTS0+fU1dnoGMmyxCBKw==", "requires": { "@apollographql/apollo-upload-server": "^5.0.3", - "@types/ws": "^5.1.2", - "apollo-cache-control": "^0.2.5", - "apollo-datasource": "^0.1.3", - "apollo-engine-reporting": "^0.0.6", - "apollo-server-caching": "^0.1.2", - "apollo-server-env": "^2.0.3", - "apollo-server-errors": "^2.0.2", - "apollo-tracing": "^0.2.5", - "graphql-extensions": "^0.2.1", - "graphql-subscriptions": "^0.5.8", + "@apollographql/graphql-playground-html": "^1.6.4", + "@types/ws": "^6.0.0", + "apollo-cache-control": "0.3.0", + "apollo-datasource": "0.2.0", + "apollo-engine-reporting": "0.1.0", + "apollo-server-caching": "0.2.0", + "apollo-server-env": "2.2.0", + "apollo-server-errors": "2.2.0", + "apollo-server-plugin-base": "0.1.0", + "apollo-tracing": "0.3.0", + "graphql-extensions": "0.3.0", + "graphql-subscriptions": "^1.0.0", "graphql-tag": "^2.9.2", - "graphql-tools": "^3.0.4", - "hash.js": "^1.1.3", + "graphql-tools": "^4.0.0", + "json-stable-stringify": "^1.0.1", "lodash": "^4.17.10", "subscriptions-transport-ws": "^0.9.11", - "ws": "^5.2.0" + "ws": "^6.0.0" } }, "apollo-server-env": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.0.3.tgz", - "integrity": "sha512-uIfKFH8n8xKO0eLb9Fa79+s2DdMuVethgznvW6SrOYq5VzgkIIobqKEuZPKa5wObw9CkCyju/+Sr7b7WWMFxUQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.2.0.tgz", + "integrity": "sha512-wjJiI5nQWPBpNmpiLP389Ezpstp71szS6DHAeTgYLb/ulCw3CTuuA+0/E1bsThVWiQaDeHZE0sE3yI8q2zrYiA==", "requires": { "node-fetch": "^2.1.2", "util.promisify": "^1.0.0" } }, "apollo-server-errors": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.0.2.tgz", - "integrity": "sha512-zyWDqAVDCkj9espVsoUpZr9PwDznM8UW6fBfhV+i1br//s2AQb07N6ektZ9pRIEvkhykDZW+8tQbDwAO0vUROg==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.2.0.tgz", + "integrity": "sha512-gV9EZG2tovFtT1cLuCTavnJu2DaKxnXPRNGSTo+SDI6IAk6cdzyW0Gje5N2+3LybI0Wq5KAbW6VLei31S4MWmg==" }, "apollo-server-express": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.1.0.tgz", - "integrity": "sha512-jLFIz1VLduMA/rme4OAy3IPeoaMEZOPoQXpio8AhfjIqCijRPPfoWJ2QMqz56C/g3vas7rZtgcVOrHpjBKudjw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.2.0.tgz", + "integrity": "sha512-E6WpImvCHKR9MHs64gTHhMrehk6/1NRE2+bblsHZg7ot8Iy6hVmzsCIzSmlPYh5uozpcyeRdC1pV0nwERtQKog==", "requires": { "@apollographql/apollo-upload-server": "^5.0.3", - "@apollographql/graphql-playground-html": "^1.6.0", + "@apollographql/graphql-playground-html": "^1.6.4", "@types/accepts": "^1.3.5", "@types/body-parser": "1.17.0", "@types/cors": "^2.8.4", "@types/express": "4.16.0", "accepts": "^1.3.5", - "apollo-server-core": "^2.1.0", + "apollo-server-core": "2.2.0", "body-parser": "^1.18.3", "cors": "^2.8.4", - "graphql-subscriptions": "^0.5.8", - "graphql-tools": "^3.0.4", + "graphql-subscriptions": "^1.0.0", + "graphql-tools": "^4.0.0", "type-is": "^1.6.16" } }, + "apollo-server-plugin-base": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-0.1.0.tgz", + "integrity": "sha512-ptaVBjR+Q1swdzsh84tY5Qb0yyTMO/IOBsBJzCdxuAKs+PAVFw7ZMQoe5bT0DJjKJXHjtfMiTF77mRLLBq2dEw==" + }, "apollo-tracing": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.2.5.tgz", - "integrity": "sha512-DZO7pfL5LATHeJdVFoTZ/N3HwA+IMf1YnIt5K+uMQW+/MrRgYOtTszUv5tYX2cUIqHYHcbdDaBQUuIXwSpaV2Q==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.3.0.tgz", + "integrity": "sha512-fkSpvzldDo1jBFap0d5lJYghEiH55eRVQzrC6vGvwr7rZNK5Moznwn9sBqy+4QsOaIp+wYc6pz/a+hwG4pasig==", "requires": { - "apollo-server-env": "^2.0.3", - "graphql-extensions": "^0.2.1" + "apollo-server-env": "2.2.0", + "graphql-extensions": "0.3.0" } }, "apollo-utilities": { @@ -683,12 +690,6 @@ "dev": true, "optional": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -1794,9 +1795,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000905", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000905.tgz", - "integrity": "sha512-cR6ICguvhRrkAjFfBoe54vJQMVOEz7vFmqrV6oor1a7GRg6DdswI40lkiV/QQvAMb4txzTkjSaLaJaiAtSuQzA==", + "version": "1.0.30000907", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000907.tgz", + "integrity": "sha512-No5sQ/OB2Nmka8MNOOM6nJx+Hxt6MQ6h7t7kgJFu9oTuwjykyKRSBP/+i/QAyFHxeHB+ddE0Da1CG5ihx9oehQ==", "dev": true }, "capture-stack-trace": { @@ -2147,17 +2148,16 @@ } }, "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "dev": true, "requires": { - "globby": "^5.0.0", + "globby": "^6.1.0", "is-path-cwd": "^1.0.0", "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", "rimraf": "^2.2.8" } }, @@ -2235,9 +2235,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.83", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.83.tgz", - "integrity": "sha512-DqJoDarxq50dcHsOOlMLNoy+qQitlMNbYb6wwbE0oUw2veHdRkpNrhmngiUYKMErdJ8SJ48rpJsZTQgy5SoEAA==", + "version": "1.3.84", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz", + "integrity": "sha512-IYhbzJYOopiTaNWMBp7RjbecUBsbnbDneOP86f3qvS0G0xfzwNSvMJpTrvi5/Y1gU7tg2NAgeg8a8rCYvW9Whw==", "dev": true }, "encodeurl": { @@ -2812,13 +2812,13 @@ } }, "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.2.tgz", + "integrity": "sha512-KByBY8c98sLUAGpnmjEdWTrtrLZRtZdwds+kAL/ciFXTCb7AZgqKsAnVnYFQj1hxepwO8JKN/8AsRWwLq+RK0A==", "dev": true, "requires": { "circular-json": "^0.3.1", - "del": "^2.0.2", + "del": "^3.0.0", "graceful-fs": "^4.1.2", "write": "^0.2.1" } @@ -3502,17 +3502,24 @@ "dev": true }, "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "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", - "arrify": "^1.0.0", "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": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "got": { @@ -3541,25 +3548,22 @@ "dev": true }, "graphql": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", - "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", + "version": "0.13.2", + "resolved": "http://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", + "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", "requires": { - "iterall": "^1.2.2" + "iterall": "^1.2.1" } }, "graphql-extensions": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.2.1.tgz", - "integrity": "sha512-/1FTPSWSffDjlRyMAV2UwQhojLmca9aQD0ieo1IYiqT5SE+uOWi4r83QF1CoER0sREIsH3s+nTmdH3cvQVG3MA==", - "requires": { - "apollo-server-env": "^2.0.3" - } + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.3.0.tgz", + "integrity": "sha512-+ppyD7g6acX0y2vj5hm5mRlCBngdHD2dE1jW7abAG4PAWg275TrczA3WXUxB6P9Q4uw0XA886Q+aagI5EmTSaA==" }, "graphql-subscriptions": { - "version": "0.5.8", - "resolved": "http://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.5.8.tgz", - "integrity": "sha512-0CaZnXKBw2pwnIbvmVckby5Ge5e2ecmjofhYCdyeACbCly2j3WXDP/pl+s+Dqd2GQFC7y99NB+53jrt55CKxYQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.0.0.tgz", + "integrity": "sha512-+ytmryoHF1LVf58NKEaNPRUzYyXplm120ntxfPcgOBC7TnK7Tv/4VRHeh4FAR9iL+O1bqhZs4nkibxQ+OA5cDQ==", "requires": { "iterall": "^1.2.1" } @@ -3570,11 +3574,11 @@ "integrity": "sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w==" }, "graphql-tools": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-3.1.1.tgz", - "integrity": "sha512-yHvPkweUB0+Q/GWH5wIG60bpt8CTwBklCSzQdEHmRUgAdEQKxw+9B7zB3dG7wB3Ym7M7lfrS4Ej+jtDZfA2UXg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.3.tgz", + "integrity": "sha512-NNZM0WSnVLX1zIMUxu7SjzLZ4prCp15N5L2T2ro02OVyydZ0fuCnZYRnx/yK9xjGWbZA0Q58yEO//Bv/psJWrg==", "requires": { - "apollo-link": "^1.2.2", + "apollo-link": "^1.2.3", "apollo-utilities": "^1.0.1", "deprecated-decorator": "^0.1.6", "iterall": "^1.1.3", @@ -3669,15 +3673,6 @@ } } }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -4169,7 +4164,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4179,6 +4174,14 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -4191,6 +4194,11 @@ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, "kareem": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", @@ -4234,6 +4242,14 @@ "parse-json": "^2.2.0", "pify": "^2.0.0", "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "locate-path": { @@ -4311,14 +4327,6 @@ "dev": true, "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=", - "dev": true - } } }, "map-cache": { @@ -4426,11 +4434,6 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -4497,9 +4500,9 @@ } }, "mongoose": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.9.tgz", - "integrity": "sha512-FbCW2qCptfPW/ltRwgqKpPCK113WTIhZDnn+0L0hO2XoX9Yp4LuIP0Nab7eBK+TsiIXWZAvzKhnnUKElTbl5ow==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.10.tgz", + "integrity": "sha512-h2cW/vR/7UFOAlOoGMpyWdXE75fvfC61TdX63tXnz8L95OU5p7Lj11FxZoznBKjfBPGUk79tmMz6zxPLyBkClQ==", "requires": { "async": "2.6.1", "bson": "~1.1.0", @@ -5225,13 +5228,13 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -5270,6 +5273,12 @@ "p-limit": "^1.1.0" } }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -5338,7 +5347,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5372,6 +5381,14 @@ "dev": true, "requires": { "pify": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "pause-stream": { @@ -5384,9 +5401,9 @@ } }, "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -6049,7 +6066,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -6084,7 +6101,7 @@ }, "require-uncached": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { @@ -6648,6 +6665,16 @@ "iterall": "^1.2.1", "symbol-observable": "^1.0.4", "ws": "^5.2.0" + }, + "dependencies": { + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } + } } }, "supports-color": { @@ -7103,9 +7130,9 @@ } }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", + "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", "requires": { "async-limiter": "~1.0.0" } diff --git a/server/package.json b/server/package.json index bc2983b27..c4367cb30 100644 --- a/server/package.json +++ b/server/package.json @@ -30,7 +30,7 @@ "axios": "^0.18.0", "dotenv": "^6.0.0", "express": "^4.16.3", - "graphql": "^14.0.0", + "graphql": "^0.13.2", "mongoose": "^5.3.4" } } From 1cf26feb2960e680d20c1195edc7254573ac4cb2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 19:41:20 +0100 Subject: [PATCH 127/146] Authorizing introspection for production environement --- server/package-lock.json | 6 +++--- server/src/app.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index 51ff584a7..355ae2dcc 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -391,9 +391,9 @@ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" }, "@types/node": { - "version": "10.12.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.3.tgz", - "integrity": "sha512-sfGmOtSMSbQ/AKG8V9xD1gmjquC9awIIZ/Kj309pHb2n3bcRAcGMQv5nJ6gCXZVsneGE4+ve8DXKRCsrg3TFzg==" + "version": "10.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.4.tgz", + "integrity": "sha512-0aFZiYCvoxyKP/Mg6PvqBb2UtWGIPf63r6rOAvRBrgyJOfanbL60yUH2U4FSpg+Yn6FW+JVYWtzn6hLTy745Fg==" }, "@types/range-parser": { "version": "1.2.2", diff --git a/server/src/app.js b/server/src/app.js index 5dfc2d97c..a146d25d9 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -38,6 +38,7 @@ const server = new ApolloServer({ message: error.message, path: error.path, }), + introspection: true, }); server.applyMiddleware({ From ac060d05216ad4bd42ca9c0ba29f150e105fc4ab Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 15 Jan 2019 13:56:47 +0100 Subject: [PATCH 128/146] Legal wording --- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 34 +++++++++++++++++----------------- LICENSE | 31 ++++++++++++++----------------- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c71b685b4..4b37b0e16 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team using the online form in the contacts page of the superalgos.org website. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 311653120..c67e8d115 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,44 +2,44 @@ We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! -Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. +Superalgos is a collective project, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. -Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. +Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regard. In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). # Balanced Contributor Intellectual Property Agreement 1.0.1 -This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). +This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Superalgos.org ("Project"). -**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. +**What is this?** This is the Project's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Project. -**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. +**Why is this?** The Project needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Project having the legal rights to the products and services it is providing so that the Project can continue operating and doing business. -The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. +The Project also believes that it's important to be clear on what it doesn't own. The Project doesn't want you looking over your shoulder every time you work on something personal or worrying that the Project will someday seize your open source non-lethal mousetrap simulation software. In other words, the Project isn't interested in appropriating your personal projects. -**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. +**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Project cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Project's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: -1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. +1. **What the Project owns.** The Project owns any IP ("Project IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Project product or service at the time you developed, invented, or created it, (ii) developed for use by the Project, or (iii) developed or promoted with existing Project IP or with the Project's endorsement. You hereby grant and assign, and will grant and assign, to the Project all rights and interests in all Project IP. - "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. + "Project IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. -2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. +2. **What the Project doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Project doesn't own it. In other words, the Project doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. -3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. +3. **Contribution of your IP to Project projects.** If you include your own IP – such as IP you created prior to working for the Project – into a Project product or service, it's still yours, of course, but you grant the Project a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Project would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. -4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. +4. **Your contributions to non-Project projects.** The Project recognizes that you may be engaged in work that requires you to submit IP to entities other than the Project, such as open source projects used by the Project. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Project and so should be run through Legal first. -5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. +5. **Voluntary Works** All Project IP that you are involved with or create as part of your work for the Project is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Project to learn more. 6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. -7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. +7. **IP protection.** The Project might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Project IP or IP under License (together, "All IP"), and, if the Project asks, to provide those records to the Project. You agree to help the Project secure and defend its rights in All IP. For your help the Project will compensate you at a reasonable rate. If the Project is unable to secure your help, you authorize the Project to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. -8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. +8. **Confidentiality.** As an contributor or contractor of the Project, you will have access to sensitive confidential information that is important to the Project's business. You are responsible for keeping this information confidential, including after you end your work for the Project. - "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. + "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Project because it is not publicly known. - The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file + The Project's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Project's Confidential Information for the purpose of performing your contribution and for the benefit of the Project. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/LICENSE b/LICENSE index c049df9cb..2fe09f449 100644 --- a/LICENSE +++ b/LICENSE @@ -1,23 +1,22 @@ COPYRIGHT NOTICE -© Copyright 2018 Advanced Algos LTD. +© Copyright 2018 Superalgos.org LICENSE NOTICE -Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of -the business are still not clearly defined, we have chosen to --temporarily-- grant a -restrictive license for the use of this repository, until those business aspects are clarified -and a proper open source license can be granted. +Superalgos is a collaborative project currently at a very early stage. Because certain aspects of +the project are still not clearly defined, we have chosen to --temporarily-- grant a restrictive +license for the use of this repository, until those aspects are clarified and a proper open source +license can be granted. -Advanced Algos LTD. is publishing the code of this software for several reasons. However, -it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company -in the crypto space and this module is still proprietary software. +Superalgos.org is publishing the code of this software for several reasons. However, it shall not be considered free software yet. Superalgos is a collaborative project in the crypto space and this +software is still proprietary software. -The reasons for opening up the code of this module at this stage are the following: +The reasons for opening up the code of this software at this stage are the following: - * We believe that transparency is paramount to achieving our goals, so we want everyone - to be able to understand what this module does and how. Opening up the code of this module + * We believe that transparency is paramount to achieving our goals, so we want everyone to + be able to understand what this software does and how. Opening up the code of this software allows anyone to take a close look. * We welcome contributions from the community. Contributions are regarded as voluntary work. @@ -27,16 +26,14 @@ The reasons for opening up the code of this module at this stage are the followi LICENSE WORDING -Advanced Algos LTD. grants a limited license for the following uses: +Superalgos.org grants a limited license for the following uses: 1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, review or audit the code. -2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository +2. COLLABORATING WITH Superalgos.org. You are granted permission to fork this repository with the sole purpose of correcting bugs and developing functionality in agreement with - Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms + Superalgos.org. By contributing to this repository you explicitely agree to the terms detailed in CONTRIBUTING.MD. -PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. - - +PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. \ No newline at end of file From f72b7eb8f5c67cec892825cd9a5a9af2b1114771 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 17:56:08 +0100 Subject: [PATCH 129/146] Separating front and back --- .eslintignore | 1 + client/.eslintrc.js => .eslintrc.js | 1 + client/.gitignore => .gitignore | 0 client/.npmignore => .npmignore | 0 README.md | 3 +- client/CODE_OF_CONDUCT.md | 46 - client/CONTRIBUTING.md | 45 - client/LICENSE | 42 - .../Event/Create/Tabs/Technical/NewPlotter.js | 110 - client/src/Components/Event/Show/styles.js | 4 - client/src/GraphQL/Fragments/event.js | 63 - client/package-lock.json => package-lock.json | 795 +- client/package.json => package.json | 15 +- postcss.config.js | 5 + server/.babelrc | 3 - server/.env.example | 10 - server/.eslintrc.js | 9 - server/.gitignore | 23 - server/CODE_OF_CONDUCT.md | 46 - server/CONTRIBUTING.md | 45 - server/LICENSE | 42 - server/package-lock.json | 7165 ----------------- server/package.json | 36 - server/src/app.js | 52 - server/src/db.js | 11 - server/src/enums/EventState.js | 19 - server/src/errors/index.js | 45 - server/src/errors/notAllowed.json | 8 - server/src/index.js | 22 - server/src/models/event.js | 104 - server/src/models/formula.js | 20 - server/src/models/index.js | 9 - server/src/models/plotter.js | 32 - server/src/schema/index.js | 13 - .../src/schema/mutations/ChangeEventState.js | 39 - server/src/schema/mutations/CreateEvent.js | 37 - server/src/schema/mutations/CreateFormula.js | 37 - server/src/schema/mutations/CreatePlotter.js | 37 - server/src/schema/mutations/EditEvent.js | 39 - .../src/schema/mutations/EditParticipant.js | 83 - .../src/schema/mutations/RegisterToEvent.js | 85 - server/src/schema/mutations/index.js | 26 - server/src/schema/queries/Event.js | 35 - server/src/schema/queries/Events.js | 37 - server/src/schema/queries/EventsByHost.js | 39 - server/src/schema/queries/EventsByTeam.js | 44 - server/src/schema/queries/Formulas.js | 19 - server/src/schema/queries/Plotters.js | 19 - server/src/schema/queries/index.js | 24 - server/src/schema/types/AdditionalPrize.js | 18 - server/src/schema/types/Event.js | 61 - server/src/schema/types/Formula.js | 18 - server/src/schema/types/Participant.js | 16 - server/src/schema/types/Plotter.js | 21 - server/src/schema/types/Prize.js | 24 - server/src/schema/types/Rule.js | 17 - server/src/schema/types/enum/EventState.js | 19 - server/src/schema/types/index.js | 17 - .../src/schema/types/input/AdditionalPrize.js | 18 - server/src/schema/types/input/Event.js | 25 - server/src/schema/types/input/Formula.js | 15 - server/src/schema/types/input/Participant.js | 17 - server/src/schema/types/input/Plotter.js | 18 - server/src/schema/types/input/Prize.js | 21 - server/src/schema/types/input/Rule.js | 18 - server/src/schema/types/input/index.js | 17 - server/src/utils/functions.js | 19 - .../Components/BannerTopBar/index.js | 0 .../Components/Event/Create/Tabs/Basic.js | 12 +- .../Event/Create/Tabs/PresentationPage.js | 0 .../Event/Create/Tabs/TeamsServer.js | 0 .../Create/Tabs/Technical/Formula/New.js | 52 +- .../Create/Tabs/Technical/Formula/index.js | 5 + .../Create/Tabs/Technical/Plotter/New.js | 108 + .../Create/Tabs/Technical/Plotter/index.js | 5 + .../Create/Tabs/Technical/Prizes/List.js | 80 + .../Event/Create/Tabs/Technical/Prizes/New.js | 106 + .../Create/Tabs/Technical/Prizes/index.js | 7 + .../Event/Create/Tabs/Technical/Rules/List.js | 81 + .../Event/Create/Tabs/Technical/Rules/New.js | 68 + .../Create/Tabs/Technical/Rules/index.js | 7 + .../Event/Create/Tabs/Technical/index.js | 61 +- .../Components/Event/Create/Tabs/index.js | 0 .../Components/Event/Create/index.js | 102 +- .../Components/Event/Create/styles.js | 13 +- src/Components/Event/Edit/Tabs/Basic.js | 115 + .../Event/Edit/Tabs/PresentationPage.js | 27 + src/Components/Event/Edit/Tabs/TeamsServer.js | 27 + .../Event/Edit/Tabs/Technical/Formula/New.js | 78 + .../Edit/Tabs/Technical/Formula/index.js | 5 + .../Event/Edit/Tabs/Technical/Plotter/New.js | 108 + .../Edit/Tabs/Technical/Plotter/index.js | 5 + .../Event/Edit/Tabs/Technical/Prizes/List.js | 80 + .../Event/Edit/Tabs/Technical/Prizes/New.js | 106 + .../Event/Edit/Tabs/Technical/Prizes/index.js | 7 + .../Event/Edit/Tabs/Technical/Rules/List.js | 81 + .../Event/Edit/Tabs/Technical/Rules/New.js | 68 + .../Event/Edit/Tabs/Technical/Rules/index.js | 7 + .../Event/Edit/Tabs/Technical/index.js | 195 + src/Components/Event/Edit/Tabs/index.js | 11 + .../Components/Event/Edit/index.js | 20 +- src/Components/Event/Edit/queried.js | 179 + src/Components/Event/Edit/styles.js | 51 + .../Components/Event/Show/index.js | 0 .../Components/Event/Show}/styles.js | 0 .../src => src}/Components/Events/index.js | 2 +- .../Components/HostedEvents/Event.js | 4 +- .../Components/HostedEvents/index.js | 6 +- .../Components/HostedEvents/styles.js | 2 - .../src => src}/Components/Search/Event.js | 4 +- .../Components/Search/Tabs/Future.js | 4 +- .../Components/Search/Tabs/History.js | 20 +- .../Components/Search/Tabs/Incoming.js | 4 +- .../Components/Search/Tabs/Past.js | 4 +- .../Components/Search/Tabs/index.js | 0 .../src => src}/Components/Search/index.js | 2 +- .../src => src}/Components/Search/styles.js | 2 - .../src => src}/GraphQL/Calls/getOptions.js | 0 .../src => src}/GraphQL/Calls/hostedEvents.js | 0 {client/src => src}/GraphQL/Calls/index.js | 0 .../src => src}/GraphQL/Calls/listEvents.js | 0 .../src => src}/GraphQL/Calls/showEvent.js | 0 src/GraphQL/Fragments/event.js | 125 + .../src => src}/GraphQL/Fragments/index.js | 0 .../src => src}/GraphQL/Fragments/options.js | 0 {client/src => src}/index.js | 20 +- src/styles.scss | 22 + {client/src => src}/utils/index.js | 0 {client/src => src}/utils/local-storage.js | 0 129 files changed, 2232 insertions(+), 9689 deletions(-) create mode 100644 .eslintignore rename client/.eslintrc.js => .eslintrc.js (90%) rename client/.gitignore => .gitignore (100%) rename client/.npmignore => .npmignore (100%) delete mode 100644 client/CODE_OF_CONDUCT.md delete mode 100644 client/CONTRIBUTING.md delete mode 100644 client/LICENSE delete mode 100644 client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js delete mode 100644 client/src/Components/Event/Show/styles.js delete mode 100644 client/src/GraphQL/Fragments/event.js rename client/package-lock.json => package-lock.json (81%) rename client/package.json => package.json (72%) create mode 100644 postcss.config.js delete mode 100644 server/.babelrc delete mode 100644 server/.env.example delete mode 100644 server/.eslintrc.js delete mode 100644 server/.gitignore delete mode 100644 server/CODE_OF_CONDUCT.md delete mode 100644 server/CONTRIBUTING.md delete mode 100644 server/LICENSE delete mode 100644 server/package-lock.json delete mode 100644 server/package.json delete mode 100644 server/src/app.js delete mode 100644 server/src/db.js delete mode 100644 server/src/enums/EventState.js delete mode 100644 server/src/errors/index.js delete mode 100644 server/src/errors/notAllowed.json delete mode 100644 server/src/index.js delete mode 100644 server/src/models/event.js delete mode 100644 server/src/models/formula.js delete mode 100644 server/src/models/index.js delete mode 100644 server/src/models/plotter.js delete mode 100644 server/src/schema/index.js delete mode 100644 server/src/schema/mutations/ChangeEventState.js delete mode 100644 server/src/schema/mutations/CreateEvent.js delete mode 100644 server/src/schema/mutations/CreateFormula.js delete mode 100644 server/src/schema/mutations/CreatePlotter.js delete mode 100644 server/src/schema/mutations/EditEvent.js delete mode 100644 server/src/schema/mutations/EditParticipant.js delete mode 100644 server/src/schema/mutations/RegisterToEvent.js delete mode 100644 server/src/schema/mutations/index.js delete mode 100644 server/src/schema/queries/Event.js delete mode 100644 server/src/schema/queries/Events.js delete mode 100644 server/src/schema/queries/EventsByHost.js delete mode 100644 server/src/schema/queries/EventsByTeam.js delete mode 100644 server/src/schema/queries/Formulas.js delete mode 100644 server/src/schema/queries/Plotters.js delete mode 100644 server/src/schema/queries/index.js delete mode 100644 server/src/schema/types/AdditionalPrize.js delete mode 100644 server/src/schema/types/Event.js delete mode 100644 server/src/schema/types/Formula.js delete mode 100644 server/src/schema/types/Participant.js delete mode 100644 server/src/schema/types/Plotter.js delete mode 100644 server/src/schema/types/Prize.js delete mode 100644 server/src/schema/types/Rule.js delete mode 100644 server/src/schema/types/enum/EventState.js delete mode 100644 server/src/schema/types/index.js delete mode 100644 server/src/schema/types/input/AdditionalPrize.js delete mode 100644 server/src/schema/types/input/Event.js delete mode 100644 server/src/schema/types/input/Formula.js delete mode 100644 server/src/schema/types/input/Participant.js delete mode 100644 server/src/schema/types/input/Plotter.js delete mode 100644 server/src/schema/types/input/Prize.js delete mode 100644 server/src/schema/types/input/Rule.js delete mode 100644 server/src/schema/types/input/index.js delete mode 100644 server/src/utils/functions.js rename {client/src => src}/Components/BannerTopBar/index.js (100%) rename {client/src => src}/Components/Event/Create/Tabs/Basic.js (91%) rename {client/src => src}/Components/Event/Create/Tabs/PresentationPage.js (100%) rename {client/src => src}/Components/Event/Create/Tabs/TeamsServer.js (100%) rename client/src/Components/Event/Create/Tabs/Technical/NewFormula.js => src/Components/Event/Create/Tabs/Technical/Formula/New.js (58%) create mode 100644 src/Components/Event/Create/Tabs/Technical/Formula/index.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Plotter/New.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Plotter/index.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Prizes/List.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Prizes/New.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Prizes/index.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Rules/List.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Rules/New.js create mode 100644 src/Components/Event/Create/Tabs/Technical/Rules/index.js rename {client/src => src}/Components/Event/Create/Tabs/Technical/index.js (69%) rename {client/src => src}/Components/Event/Create/Tabs/index.js (100%) rename {client/src => src}/Components/Event/Create/index.js (59%) rename {client/src => src}/Components/Event/Create/styles.js (79%) create mode 100644 src/Components/Event/Edit/Tabs/Basic.js create mode 100644 src/Components/Event/Edit/Tabs/PresentationPage.js create mode 100644 src/Components/Event/Edit/Tabs/TeamsServer.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Formula/New.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Formula/index.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Plotter/New.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Plotter/index.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Prizes/List.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Prizes/New.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Prizes/index.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Rules/List.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Rules/New.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/Rules/index.js create mode 100644 src/Components/Event/Edit/Tabs/Technical/index.js create mode 100644 src/Components/Event/Edit/Tabs/index.js rename {client/src => src}/Components/Event/Edit/index.js (59%) create mode 100644 src/Components/Event/Edit/queried.js create mode 100644 src/Components/Event/Edit/styles.js rename {client/src => src}/Components/Event/Show/index.js (100%) rename {client/src/Components/Event/Edit => src/Components/Event/Show}/styles.js (100%) rename {client/src => src}/Components/Events/index.js (71%) rename {client/src => src}/Components/HostedEvents/Event.js (92%) rename {client/src => src}/Components/HostedEvents/index.js (85%) rename {client/src => src}/Components/HostedEvents/styles.js (85%) rename {client/src => src}/Components/Search/Event.js (91%) rename {client/src => src}/Components/Search/Tabs/Future.js (94%) rename {client/src => src}/Components/Search/Tabs/History.js (52%) rename {client/src => src}/Components/Search/Tabs/Incoming.js (96%) rename {client/src => src}/Components/Search/Tabs/Past.js (94%) rename {client/src => src}/Components/Search/Tabs/index.js (100%) rename {client/src => src}/Components/Search/index.js (97%) rename {client/src => src}/Components/Search/styles.js (91%) rename {client/src => src}/GraphQL/Calls/getOptions.js (100%) rename {client/src => src}/GraphQL/Calls/hostedEvents.js (100%) rename {client/src => src}/GraphQL/Calls/index.js (100%) rename {client/src => src}/GraphQL/Calls/listEvents.js (100%) rename {client/src => src}/GraphQL/Calls/showEvent.js (100%) create mode 100644 src/GraphQL/Fragments/event.js rename {client/src => src}/GraphQL/Fragments/index.js (100%) rename {client/src => src}/GraphQL/Fragments/options.js (100%) rename {client/src => src}/index.js (54%) create mode 100644 src/styles.scss rename {client/src => src}/utils/index.js (100%) rename {client/src => src}/utils/local-storage.js (100%) diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..1756b4e84 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +postcss.config.js diff --git a/client/.eslintrc.js b/.eslintrc.js similarity index 90% rename from client/.eslintrc.js rename to .eslintrc.js index bdd833da9..237825159 100644 --- a/client/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { 'no-param-reassign': 'off', 'react/prop-types': 0, 'react/jsx-indent': ['error', 2], + 'import/prefer-default-export': 'off', }, settings: { 'react': { diff --git a/client/.gitignore b/.gitignore similarity index 100% rename from client/.gitignore rename to .gitignore diff --git a/client/.npmignore b/.npmignore similarity index 100% rename from client/.npmignore rename to .npmignore diff --git a/README.md b/README.md index 7efa4baa6..4d80d7e95 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# HostsModule -This module manages competition events +EventsClient diff --git a/client/CODE_OF_CONDUCT.md b/client/CODE_OF_CONDUCT.md deleted file mode 100644 index c71b685b4..000000000 --- a/client/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/client/CONTRIBUTING.md b/client/CONTRIBUTING.md deleted file mode 100644 index 311653120..000000000 --- a/client/CONTRIBUTING.md +++ /dev/null @@ -1,45 +0,0 @@ -# Contributing - -We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! - -Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. - -Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. - -In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). - -# Balanced Contributor Intellectual Property Agreement 1.0.1 - -This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). - -**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. - -**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. - -The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. - -**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. - -Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: - -1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. - - "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. - -2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. - -3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. - -4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. - -5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. - -6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. - -7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. - -8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. - - "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. - - The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/client/LICENSE b/client/LICENSE deleted file mode 100644 index c049df9cb..000000000 --- a/client/LICENSE +++ /dev/null @@ -1,42 +0,0 @@ -COPYRIGHT NOTICE - -© Copyright 2018 Advanced Algos LTD. - - -LICENSE NOTICE - -Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of -the business are still not clearly defined, we have chosen to --temporarily-- grant a -restrictive license for the use of this repository, until those business aspects are clarified -and a proper open source license can be granted. - -Advanced Algos LTD. is publishing the code of this software for several reasons. However, -it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company -in the crypto space and this module is still proprietary software. - -The reasons for opening up the code of this module at this stage are the following: - - * We believe that transparency is paramount to achieving our goals, so we want everyone - to be able to understand what this module does and how. Opening up the code of this module - allows anyone to take a close look. - - * We welcome contributions from the community. Contributions are regarded as voluntary work. - There may be incentives in place for certain kinds of contributions. Contact us to learn more. - Contributors agree to provide an express grant of patent rights for their contributions. - - -LICENSE WORDING - -Advanced Algos LTD. grants a limited license for the following uses: - -1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, - review or audit the code. - -2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository - with the sole purpose of correcting bugs and developing functionality in agreement with - Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms - detailed in CONTRIBUTING.MD. - -PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. - - diff --git a/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js b/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js deleted file mode 100644 index 2aeeb50b5..000000000 --- a/client/src/Components/Event/Create/Tabs/Technical/NewPlotter.js +++ /dev/null @@ -1,110 +0,0 @@ -import React from 'react'; -import { - Dialog, - DialogTitle, - DialogContent, - DialogContentText, - Button, - TextField, -} from '@material-ui/core'; - -import { Mutation } from 'react-apollo'; -import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; - -class NewPlotter extends React.Component { - constructor() { - super(); - this.state = { - name: '', - host: '', - repo: '', - moduleName: '', - }; - } - - render() { - const { - name, host, repo, moduleName, - } = this.state; - return ( - this.props.closeDialogs()} - aria-labelledby='createPlotter-dialog-title' - > - - Create a new plotter - - - - At least for now, all the plotters are publically available, creating it here will let you select it in the select element. - - - { - const { events_Plotters: plotters } = store.readQuery({ - query: getOptionsCalls.EVENTS_PLOTTERS, - }); - store.writeQuery({ - query: getOptionsCalls.EVENTS_PLOTTERS, - data: { events_Plotters: plotters.concat([data.events_CreatePlotter]) }, - }); - this.props.closeDialogs(); - } - } - > - {createPlotter => ( -
-
{ - e.preventDefault(); - createPlotter({ - variables: { - plotter: { - name, - host, - repo, - moduleName, - }, - }, - }); - }} - > - this.setState({ name: e.target.value })} - fullWidth - /> - this.setState({ host: e.target.value })} - fullWidth - /> - this.setState({ repo: e.target.value })} - fullWidth - /> - this.setState({ moduleName: e.target.value })} - fullWidth - /> - - -
- )} -
- - -
-
- ); - } -} - -export default NewPlotter; diff --git a/client/src/Components/Event/Show/styles.js b/client/src/Components/Event/Show/styles.js deleted file mode 100644 index 12fd82051..000000000 --- a/client/src/Components/Event/Show/styles.js +++ /dev/null @@ -1,4 +0,0 @@ -const styles = () => ({ -}); - -export default styles; diff --git a/client/src/GraphQL/Fragments/event.js b/client/src/GraphQL/Fragments/event.js deleted file mode 100644 index 96be79f08..000000000 --- a/client/src/GraphQL/Fragments/event.js +++ /dev/null @@ -1,63 +0,0 @@ -import gql from 'graphql-tag'; - -export const eventMinimalInfo = gql` - fragment EventMinimalInfo on events_Event { - id - state - name - startDatetime - finishDatetime - host { - alias - firstName - lastName - } - description - } -`; - -export const eventFullInfo = gql` - fragment EventFullInfo on events_Event { - id - state - name - host{ - alias - firstName - lastName - } - description - startDatetime - finishDatetime - formula{ - name - } - plotter{ - name - host - repo - moduleName - } - rules{ - position - title - description - } - participants{ - team{ - name - } - botId - releaseId - } - prizes{ - rank - amount - additional{ - condition - amount - asset - } - } - } -`; diff --git a/client/package-lock.json b/package-lock.json similarity index 81% rename from client/package-lock.json rename to package-lock.json index a0e36fd6a..73f497ea8 100644 --- a/client/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@advancedalgos/events-client", - "version": "0.0.1", + "name": "@superalgos/events-client", + "version": "0.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -14,16 +14,24 @@ } }, "@babel/generator": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", - "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.5.tgz", + "integrity": "sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==", "dev": true, "requires": { - "@babel/types": "^7.1.3", + "@babel/types": "^7.1.5", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "@babel/helper-function-name": { @@ -67,9 +75,9 @@ } }, "@babel/parser": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", - "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.5.tgz", + "integrity": "sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==", "dev": true }, "@babel/runtime": { @@ -92,26 +100,26 @@ } }, "@babel/traverse": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz", - "integrity": "sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.5.tgz", + "integrity": "sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.3", + "@babel/generator": "^7.1.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.3", - "@babel/types": "^7.1.3", + "@babel/parser": "^7.1.5", + "@babel/types": "^7.1.5", "debug": "^3.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" } }, "@babel/types": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", - "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.5.tgz", + "integrity": "sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -120,11 +128,12 @@ } }, "@material-ui/core": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.3.2.tgz", - "integrity": "sha512-3yYGrWBzML7OhzmgwBvWpQnFq9ROWj+so+ULADB+lXjpOuxbUf8IUWbR4/S4chh+8/DTNMjTGIUdpj//XeubLQ==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.5.1.tgz", + "integrity": "sha512-yMBwYV5HQ/kZjncSmzHSx4uxJCePdbq9N58Jl0tq9D1gD5fKVJY/lItnQLRlcpCzZUkGxfDhpDutvLDq58ZAkg==", "requires": { "@babel/runtime": "7.1.2", + "@material-ui/utils": "^3.0.0-alpha.0", "@types/jss": "^9.5.6", "@types/react-transition-group": "^2.0.8", "brcast": "^3.0.1", @@ -133,7 +142,7 @@ "debounce": "^1.1.0", "deepmerge": "^2.0.1", "dom-helpers": "^3.2.1", - "hoist-non-react-statics": "^2.5.0", + "hoist-non-react-statics": "^3.0.0", "is-plain-object": "^2.0.4", "jss": "^9.3.3", "jss-camel-case": "^6.0.0", @@ -169,6 +178,11 @@ "regenerator-runtime": "^0.12.0" } }, + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + }, "recompose": { "version": "0.29.0", "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.29.0.tgz", @@ -184,6 +198,14 @@ } } }, + "@material-ui/utils": { + "version": "3.0.0-alpha.0", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-3.0.0-alpha.0.tgz", + "integrity": "sha512-HwC/pBcPG81UP4Jh0BaH2i4wAY9aDOrvL5+B/7J6cyFlG/Wip5Li+qI+GDlk9MR3kpG8v0sxfpWA0IlQYcHK6g==", + "requires": { + "@babel/runtime": "7.1.2" + } + }, "@types/async": { "version": "2.0.50", "resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.50.tgz", @@ -205,9 +227,9 @@ "integrity": "sha512-ZBFR7TROLVzCkswA3Fmqq+IIJt62/T7aY/Dmz+QkU7CaW2QFqAitCE8Ups7IzmGhcN1YWMBT4Qcoc07jU9hOJQ==" }, "@types/react": { - "version": "16.4.18", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz", - "integrity": "sha512-eFzJKEg6pdeaukVLVZ8Xb79CTl/ysX+ExmOfAAqcFlCCK5TgFDD9kWR0S18sglQ3EmM8U+80enjUqbfnUyqpdA==", + "version": "16.7.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.7.3.tgz", + "integrity": "sha512-ve/2lnXuLNaTDR1SPvsEX25m+NoNW3PMJxL2jd372UR8oJPwR5+jgtcheUoN27O+qKLFmQy0y0YKRwZcwtny3w==", "requires": { "@types/prop-types": "*", "csstype": "^2.2.0" @@ -250,15 +272,9 @@ "uri-js": "^4.2.2" } }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, "ansi-escapes": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -278,24 +294,24 @@ } }, "apollo-cache": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.19.tgz", - "integrity": "sha512-p163+GVne1Gyw2v9L5kHEQhUhih7btWvyUFOl4uKf7brieqd4tHZt8ZA3vT1SaXbCeQZNSp/tFI3yFyi8RPKzw==", + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.20.tgz", + "integrity": "sha512-+Du0/4kUSuf5PjPx0+pvgMGV12ezbHA8/hubYuqRQoy/4AWb4faa61CgJNI6cKz2mhDd9m94VTNKTX11NntwkQ==", "requires": { - "apollo-utilities": "^1.0.24" + "apollo-utilities": "^1.0.25" } }, "apollo-client": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.4.tgz", - "integrity": "sha512-i29w/+aa9O4fe8NxzJNOViHdsjpN2723Q2mNl0HiOJFwG+VjA4RXdTpyZHPZqcO8FwgK1k43l8nULD4Cdlx/Ww==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.5.tgz", + "integrity": "sha512-nUm06EGa4TP/IY68OzmC3lTD32TqkjLOQdb69uYo+lHl8NnwebtrAw3qFtsQtTEz6ueBp/Z/HasNZng4jwafVQ==", "requires": { "@types/async": "2.0.50", "@types/zen-observable": "^0.8.0", - "apollo-cache": "1.1.19", + "apollo-cache": "1.1.20", "apollo-link": "^1.0.0", "apollo-link-dedup": "^1.0.0", - "apollo-utilities": "1.0.24", + "apollo-utilities": "1.0.25", "symbol-observable": "^1.0.2", "zen-observable": "^0.8.0" } @@ -318,9 +334,9 @@ } }, "apollo-utilities": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.24.tgz", - "integrity": "sha512-cOXtrkio3wKfggp/zKCzQYxSZZRND/njNVmUksM1cckoJF3g/2o3bhh6z0HPhNhee8qzJzVXtl+3vmwXYGh0Gg==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.25.tgz", + "integrity": "sha512-AXvqkhni3Ir1ffm4SA1QzXn8k8I5BBl4PVKEyak734i4jFdp+xgfUyi2VCqF64TJlFTA/B73TRDUvO2D+tKtZg==", "requires": { "fast-json-stable-stringify": "^2.0.0" } @@ -359,74 +375,23 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "autoprefixer": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.3.1.tgz", + "integrity": "sha512-DY9gOh8z3tnCbJ13JIWaeQsoYncTGdsrgCceBaQSIL4nvdrLxgbRSBPevg2XbX7u4QCSfLheSJEEIUUSlkbx6Q==", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "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", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://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", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "browserslist": "^4.3.3", + "caniuse-lite": "^1.0.30000898", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.5", + "postcss-value-parser": "^3.3.1" } }, "babel-eslint": { @@ -485,6 +450,17 @@ "resolved": "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz", "integrity": "sha512-eI3yqf9YEqyGl9PCNTR46MGvDylGtaHjalcz6Q3fAPnP/PhpKkkve52vFdfGpwp4VUvK6LUr4TQN+2stCrEwTg==" }, + "browserslist": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.4.tgz", + "integrity": "sha512-u5iz+ijIMUlmV8blX82VGFrB9ecnUg5qEt55CMZ/YJEhha+d8qpBfOFuutJ6F/VKRXjZoD33b6uvarpPxcl3RA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000899", + "electron-to-chromium": "^1.3.82", + "node-releases": "^1.0.1" + } + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -506,6 +482,12 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "caniuse-lite": { + "version": "1.0.30000907", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000907.tgz", + "integrity": "sha512-No5sQ/OB2Nmka8MNOOM6nJx+Hxt6MQ6h7t7kgJFu9oTuwjykyKRSBP/+i/QAyFHxeHB+ddE0Da1CG5ihx9oehQ==", + "dev": true + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -626,12 +608,6 @@ "ms": "^2.1.1" } }, - "debug-log": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -652,40 +628,17 @@ "object-keys": "^1.0.12" } }, - "deglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", - "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", - "dev": true, - "requires": { - "find-root": "^1.0.0", - "glob": "^7.0.5", - "ignore": "^3.0.9", - "pkg-config": "^1.1.0", - "run-parallel": "^1.1.2", - "uniq": "^1.0.1" - }, - "dependencies": { - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - } - } - }, "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "dev": true, "requires": { - "globby": "^5.0.0", + "globby": "^6.1.0", "is-path-cwd": "^1.0.0", "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", "rimraf": "^2.2.8" } }, @@ -699,9 +652,12 @@ } }, "dom-helpers": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", - "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", + "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", + "requires": { + "@babel/runtime": "^7.1.2" + } }, "dom-walk": { "version": "0.1.1", @@ -709,6 +665,12 @@ "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", "dev": true }, + "electron-to-chromium": { + "version": "1.3.84", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz", + "integrity": "sha512-IYhbzJYOopiTaNWMBp7RjbecUBsbnbDneOP86f3qvS0G0xfzwNSvMJpTrvi5/Y1gU7tg2NAgeg8a8rCYvW9Whw==", + "dev": true + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -757,9 +719,9 @@ "dev": true }, "eslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.8.0.tgz", - "integrity": "sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.9.0.tgz", + "integrity": "sha512-g4KWpPdqN0nth+goDNICNXGfJF7nNnepthp46CAlJoJtC5K/cLu3NgCM3AHu1CkJ5Hzt9V0Y0PBAO6Ay/gGb+w==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -834,18 +796,6 @@ "object.entries": "^1.0.4" } }, - "eslint-config-standard": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", - "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", - "dev": true - }, - "eslint-config-standard-jsx": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", - "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", - "dev": true - }, "eslint-import-resolver-node": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", @@ -900,16 +850,6 @@ } } }, - "eslint-plugin-es": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", - "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", - "dev": true, - "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.0" - } - }, "eslint-plugin-import": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", @@ -939,7 +879,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -961,26 +901,6 @@ } } }, - "eslint-plugin-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", - "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", - "dev": true, - "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^4.0.2", - "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" - } - }, - "eslint-plugin-promise": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", - "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", - "dev": true - }, "eslint-plugin-react": { "version": "7.11.1", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", @@ -994,12 +914,6 @@ "prop-types": "^15.6.2" } }, - "eslint-plugin-standard": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", - "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", - "dev": true - }, "eslint-restricted-globals": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", @@ -1141,12 +1055,6 @@ "object-assign": "^4.0.1" } }, - "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", @@ -1158,13 +1066,13 @@ } }, "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.2.tgz", + "integrity": "sha512-KByBY8c98sLUAGpnmjEdWTrtrLZRtZdwds+kAL/ciFXTCb7AZgqKsAnVnYFQj1hxepwO8JKN/8AsRWwLq+RK0A==", "dev": true, "requires": { "circular-json": "^0.3.1", - "del": "^2.0.2", + "del": "^3.0.0", "graceful-fs": "^4.1.2", "write": "^0.2.1" } @@ -1187,12 +1095,6 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "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==", - "dev": true - }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -1218,29 +1120,36 @@ } }, "globals": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", - "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", "dev": true }, "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "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", - "arrify": "^1.0.0", "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": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "graphql": { @@ -1265,23 +1174,6 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "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=", - "dev": true - } - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1317,9 +1209,12 @@ } }, "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz", + "integrity": "sha512-MYcYuROh7SBM69xHGqXEwQqDux34s9tz+sCnxJmN18kgWh6JFdTw/5YdZtqsOdZJXddE/wUpCzfEdDrJj8p0Iw==", + "requires": { + "react-is": "^16.3.2" + } }, "hosted-git-info": { "version": "2.7.1", @@ -1556,15 +1451,9 @@ } }, "jsesc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "json-schema-traverse": { @@ -1687,6 +1576,14 @@ "parse-json": "^2.2.0", "pify": "^2.0.0", "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "locate-path": { @@ -1732,9 +1629,9 @@ } }, "luxon": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.4.4.tgz", - "integrity": "sha512-M21p8nbKZRLqVnQ0XAhhCo+2Z3Z6+zm9tuogDMZ2vlkFkw8AREF+d5/abn8tz1/ycu4cemNlqcQcc7HqjhrpTw==" + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.6.2.tgz", + "integrity": "sha512-vZP3vVTK0aH3W6zleLYefctzpKaUaVtdF7G/WblRrf/lbEASMuV5ZlPR+2GBvaUEuD0TAf/r5NB98s3ER4shnQ==" }, "material-ui-pickers": { "version": "1.0.1", @@ -1821,6 +1718,15 @@ "is-stream": "^1.0.1" } }, + "node-releases": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.3.tgz", + "integrity": "sha512-ZaZWMsbuDcetpHmYeKWPO6e63pSXLb50M7lJgCbcM2nC/nQC3daNifmtp5a2kp7EWwYfhuvH6zLPWkrF8IiDdw==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -1833,11 +1739,23 @@ "validate-npm-package-license": "^3.0.1" } }, + "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 + }, "normalize-scroll-left": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz", "integrity": "sha512-F9YMRls0zCF6BFIE2YnXDRpHPpfd91nOIaNdDgrx5YMoPLo8Wqj+6jNXHQsYBavJeXP4ww8HCt0xQAKc5qk2Fg==" }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -1907,7 +1825,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -1929,6 +1847,12 @@ "p-limit": "^1.1.0" } }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -1955,7 +1879,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -1992,12 +1916,20 @@ "dev": true, "requires": { "pify": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -2015,66 +1947,6 @@ "pinkie": "^2.0.0" } }, - "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.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" - } - }, - "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=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^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=", - "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 - } - } - }, - "pkg-config": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", - "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", - "dev": true, - "requires": { - "debug-log": "^1.0.0", - "find-root": "^1.0.0", - "xtend": "^4.0.1" - } - }, "pkg-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", @@ -2091,9 +1963,26 @@ "dev": true }, "popper.js": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz", - "integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=" + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.5.tgz", + "integrity": "sha512-fs4Sd8bZLgEzrk8aS7Em1qh+wcawtE87kRUJQhK6+LndyV1HerX7+LURzAylVaTyWIn5NTB/lyjnWqw/AZ6Yrw==" + }, + "postcss": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", + "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.5.0" + } + }, + "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==", + "dev": true }, "prelude-ls": { "version": "1.1.2", @@ -2137,14 +2026,14 @@ "dev": true }, "react": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.6.0.tgz", - "integrity": "sha512-zJPnx/jKtuOEXCbQ9BKaxDMxR0001/hzxXwYxG8septeyYGfsgAei6NgfbVgOhbY1WOP2o3VPs/E9HaN+9hV3Q==", + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react/-/react-16.6.3.tgz", + "integrity": "sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.10.0" + "scheduler": "^0.11.2" } }, "react-apollo": { @@ -2179,26 +2068,18 @@ "setimmediate": "^1.0.5", "ua-parser-js": "^0.7.18" } - }, - "hoist-non-react-statics": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz", - "integrity": "sha512-MYcYuROh7SBM69xHGqXEwQqDux34s9tz+sCnxJmN18kgWh6JFdTw/5YdZtqsOdZJXddE/wUpCzfEdDrJj8p0Iw==", - "requires": { - "react-is": "^16.3.2" - } } } }, "react-dom": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.0.tgz", - "integrity": "sha512-Stm2D9dXEUUAQdvpvhvFj/DEXwC2PAL/RwEMhoN4dvvD2ikTlJegEXf97xryg88VIAU22ZAP7n842l+9BTz6+w==", + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.3.tgz", + "integrity": "sha512-8ugJWRCWLGXy+7PmNh8WJz3g1TaTUt1XyoIcFN+x0Zbkoz+KKdUyx1AQLYJdbFXjuF41Nmjn5+j//rxvhFjgSQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.10.0" + "scheduler": "^0.11.2" } }, "react-event-listener": { @@ -2222,9 +2103,9 @@ } }, "react-hot-loader": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.11.tgz", - "integrity": "sha512-T0G5jURyTsFLoiW6MTr5Q35UHC/B2pmYJ7+VBjk8yMDCEABRmCGy4g6QwxoB4pWg4/xYvVTa/Pbqnsgx/+NLuA==", + "version": "4.3.12", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.12.tgz", + "integrity": "sha512-GMM4TsqUVss2QPe+Y33NlgydA5/+7tAVQxR0rZqWvBpapM8JhD7p6ymMwSZzr5yxjoXXlK/6P6qNQBOqm1dqdg==", "dev": true, "requires": { "fast-levenshtein": "^2.0.6", @@ -2233,12 +2114,20 @@ "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.0.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==", + "dev": true + } } }, "react-is": { - "version": "16.6.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.0.tgz", - "integrity": "sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==" + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.3.tgz", + "integrity": "sha512-u7FDWtthB4rWibG/+mFbVd5FvdI20yde86qKGx4lVUTWmPlSWQ4QxbBIrrs+HnXGbxOUlUzTAP/VDmvCwaP2yA==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -2257,6 +2146,13 @@ "path-to-regexp": "^1.7.0", "prop-types": "^15.6.1", "warning": "^4.0.1" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + } } }, "react-router-dom": { @@ -2344,6 +2240,13 @@ "hoist-non-react-statics": "^2.3.1", "react-lifecycles-compat": "^3.0.2", "symbol-observable": "^1.0.4" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + } } }, "regenerator-runtime": { @@ -2359,7 +2262,7 @@ }, "require-uncached": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { @@ -2415,12 +2318,6 @@ "is-promise": "^2.1.0" } }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", - "dev": true - }, "rxjs": { "version": "6.3.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", @@ -2436,9 +2333,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "scheduler": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.10.0.tgz", - "integrity": "sha512-+TSTVTCBAA3h8Anei3haDc1IRwMeDmtI/y/o3iBe3Mjl2vwYF9DtPDt929HyRmV/e7au7CLu8sc4C4W0VOs29w==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.11.2.tgz", + "integrity": "sha512-+WCP3s3wOaW4S7C1tl3TEXp4l9lJn0ZK8G3W3WKRWmw77Z2cIFUW2MiNTMHn5sCjxN+t7N43HAOOgMjyAg5hlg==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -2492,9 +2389,9 @@ } }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "spdx-correct": { @@ -2524,9 +2421,9 @@ } }, "spdx-license-ids": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", "dev": true }, "sprintf-js": { @@ -2535,168 +2432,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "standard": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", - "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", - "dev": true, - "requires": { - "eslint": "~5.4.0", - "eslint-config-standard": "12.0.0", - "eslint-config-standard-jsx": "6.0.2", - "eslint-plugin-import": "~2.14.0", - "eslint-plugin-node": "~7.0.1", - "eslint-plugin-promise": "~4.0.0", - "eslint-plugin-react": "~7.11.1", - "eslint-plugin-standard": "~4.0.0", - "standard-engine": "~9.0.0" - }, - "dependencies": { - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "eslint": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", - "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", - "dev": true, - "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.2", - "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - }, - "table": { - "version": "4.0.3", - "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "dev": true, - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - } - } - } - }, - "standard-engine": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", - "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", - "dev": true, - "requires": { - "deglob": "^2.1.0", - "get-stdin": "^6.0.0", - "minimist": "^1.1.0", - "pkg-conf": "^2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -2806,12 +2541,6 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -2879,16 +2608,10 @@ "mkdirp": "^0.5.1" } }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, "zen-observable": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.10.tgz", - "integrity": "sha512-UXEh0ekA/QWYI2NkLHc5IH0V1FstIN4qGVlVvq0DQAS3oR72mofYHkjJ2f4ysMKRAziwnACzg3c0ZuG+SMDu8w==" + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.11.tgz", + "integrity": "sha512-N3xXQVr4L61rZvGMpWe8XoCGX8vhU35dPyQ4fm5CY/KDlG0F75un14hjbckPXTDuKUY6V0dqR2giT6xN8Y4GEQ==" }, "zen-observable-ts": { "version": "0.8.10", diff --git a/client/package.json b/package.json similarity index 72% rename from client/package.json rename to package.json index e8bc69f9b..a31064573 100644 --- a/client/package.json +++ b/package.json @@ -1,10 +1,14 @@ { - "name": "@advancedalgos/events-client", - "version": "0.0.4", - "description": "Advanced Algos Event client-side web app", + "name": "@superalgos/events-client", + "version": "0.0.1", + "description": "SuperAlgos Event client-side web app", "author": "", "license": "", "main": "src/index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/nikolabjelo/EventsClientModule.git" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, @@ -12,19 +16,18 @@ "parser": "babel-eslint" }, "devDependencies": { + "autoprefixer": "^9.2.0", "babel-eslint": "^10.0.1", "eslint": "^5.8.0", "eslint-config-airbnb-base": "^13.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-react": "^7.11.1", - "react-hot-loader": "^4.3.11", - "standard": "^12.0.1" + "react-hot-loader": "^4.3.11" }, "dependencies": { "@material-ui/core": "^3.2.0", "@material-ui/icons": "^3.0.1", "apollo-client": "^2.4.4", - "classnames": "^2.2.6", "graphql": "^14.0.2", "graphql-tag": "^2.10.0", "luxon": "^1.4.4", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 000000000..eb022cd60 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer'), + ], +}; diff --git a/server/.babelrc b/server/.babelrc deleted file mode 100644 index f2e312799..000000000 --- a/server/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["env", "stage-2"] -} diff --git a/server/.env.example b/server/.env.example deleted file mode 100644 index 25c16847a..000000000 --- a/server/.env.example +++ /dev/null @@ -1,10 +0,0 @@ -PRESHARED_GATEWAY_KEY=SECRET_STUFF - -PORT=3000 -DB_USERNAME=example_name -DB_PASSWORD=example_password -DB_DOMAIN=example.com:1234/example_name - -SENTRY_DNS=https://some-val@sentry.io/some-id - -GATEWAY_ENDPOINT=https://app-api.advancedalgos.net/graphql/ diff --git a/server/.eslintrc.js b/server/.eslintrc.js deleted file mode 100644 index c06bffbce..000000000 --- a/server/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - parser: 'babel-eslint', - extends: 'airbnb-base', - rules: { - 'max-len': ['error', 140, 2], - 'no-underscore-dangle': 'off', - 'no-param-reassign': 'off', - } -}; diff --git a/server/.gitignore b/server/.gitignore deleted file mode 100644 index 8e14c1a3d..000000000 --- a/server/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Dependency directories -node_modules/ - -# Optional npm cache directory -.npm - -# dotenv environment variables file -.env - -# Build folder js files -build/ -dist/ - -# Visual Studio Code -.vscode - -#Mac specific files -.DS_Store diff --git a/server/CODE_OF_CONDUCT.md b/server/CODE_OF_CONDUCT.md deleted file mode 100644 index c71b685b4..000000000 --- a/server/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at advancedalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/server/CONTRIBUTING.md b/server/CONTRIBUTING.md deleted file mode 100644 index 311653120..000000000 --- a/server/CONTRIBUTING.md +++ /dev/null @@ -1,45 +0,0 @@ -# Contributing - -We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! - -Advanced Algos LTD is a startup, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. - -Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards. - -In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). - -# Balanced Contributor Intellectual Property Agreement 1.0.1 - -This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Advanced Algos LTD ("Company"). - -**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company. - -**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business. - -The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects. - -**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. - -Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: - -1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP. - - "Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. - -2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. - -3. **Contribution of your IP to Company projects.** If you include your own IP – such as IP you created prior to working for the Company – into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. - -4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first. - -5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more. - -6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. - -7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. - -8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company. - - "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known. - - The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/server/LICENSE b/server/LICENSE deleted file mode 100644 index c049df9cb..000000000 --- a/server/LICENSE +++ /dev/null @@ -1,42 +0,0 @@ -COPYRIGHT NOTICE - -© Copyright 2018 Advanced Algos LTD. - - -LICENSE NOTICE - -Advanced Algos LTD. is a startup, currently at a very early stage. Because certain aspects of -the business are still not clearly defined, we have chosen to --temporarily-- grant a -restrictive license for the use of this repository, until those business aspects are clarified -and a proper open source license can be granted. - -Advanced Algos LTD. is publishing the code of this software for several reasons. However, -it shall not be considered free software yet. Advanced Algos LTD. is a for-profit company -in the crypto space and this module is still proprietary software. - -The reasons for opening up the code of this module at this stage are the following: - - * We believe that transparency is paramount to achieving our goals, so we want everyone - to be able to understand what this module does and how. Opening up the code of this module - allows anyone to take a close look. - - * We welcome contributions from the community. Contributions are regarded as voluntary work. - There may be incentives in place for certain kinds of contributions. Contact us to learn more. - Contributors agree to provide an express grant of patent rights for their contributions. - - -LICENSE WORDING - -Advanced Algos LTD. grants a limited license for the following uses: - -1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, - review or audit the code. - -2. COLLABORATING WITH ADVANCED ALGOS LTD. You are granted permission to fork this repository - with the sole purpose of correcting bugs and developing functionality in agreement with - Advanced Algos LTD. By contributing to this repository you explicitely agree to the terms - detailed in CONTRIBUTING.MD. - -PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. - - diff --git a/server/package-lock.json b/server/package-lock.json deleted file mode 100644 index 355ae2dcc..000000000 --- a/server/package-lock.json +++ /dev/null @@ -1,7165 +0,0 @@ -{ - "name": "events-server", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@apollographql/apollo-upload-server": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@apollographql/apollo-upload-server/-/apollo-upload-server-5.0.3.tgz", - "integrity": "sha512-tGAp3ULNyoA8b5o9LsU2Lq6SwgVPUOKAqKywu2liEtTvrFSGPrObwanhYwArq3GPeOqp2bi+JknSJCIU3oQN1Q==", - "requires": { - "@babel/runtime-corejs2": "^7.0.0-rc.1", - "busboy": "^0.2.14", - "object-path": "^0.11.4" - } - }, - "@apollographql/graphql-playground-html": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.4.tgz", - "integrity": "sha512-gwvaQO6/Hv4DEwhDLmmu2tzCU9oPjC5Xl9Kk8Yd0IxyKhYLlLalmkMMjsZLzU5H3fGaalLD96OYfxHL0ClVUDQ==" - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.5.tgz", - "integrity": "sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==", - "dev": true, - "requires": { - "@babel/types": "^7.1.5", - "jsesc": "^2.5.1", - "lodash": "^4.17.10", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - } - } - }, - "@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==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.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==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.5.tgz", - "integrity": "sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==", - "dev": true - }, - "@babel/runtime-corejs2": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.1.5.tgz", - "integrity": "sha512-WsYRwQsFhVmxkAqwypPTZyV9GpkqMEaAr2zOItOmqSX2GBFaI+eq98CN81e13o0zaUKJOQGYyjhNVqj56nnkYg==", - "requires": { - "core-js": "^2.5.7", - "regenerator-runtime": "^0.12.0" - } - }, - "@babel/template": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", - "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.2", - "@babel/types": "^7.1.2" - } - }, - "@babel/traverse": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.5.tgz", - "integrity": "sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.5", - "@babel/types": "^7.1.5", - "debug": "^3.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "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" - } - }, - "globals": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", - "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.5.tgz", - "integrity": "sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.10", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@sentry/core": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.3.0.tgz", - "integrity": "sha512-VEMRshyF2J2IJkGTF9fnAd2/a/wR+42qrKwCLVeNxHzZm53VAnSfJd8ZA5jnN5RiydQVGDOylqvdfij/LmmsuQ==", - "requires": { - "@sentry/hub": "4.3.0", - "@sentry/minimal": "4.3.0", - "@sentry/types": "4.3.0", - "@sentry/utils": "4.3.0" - } - }, - "@sentry/hub": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.3.0.tgz", - "integrity": "sha512-9nh4Hcx2tZQVHr5JGy1XZd1RgwC2C+1tNFXu06rcxYB20nhKOKtOAH9STrv64vpnK+70AC4miRdlCgqHOKLdxA==", - "requires": { - "@sentry/types": "4.3.0", - "@sentry/utils": "4.3.0" - } - }, - "@sentry/minimal": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.3.0.tgz", - "integrity": "sha512-yRN+L3O9mlcjqpWiivqJsm3Cy/YNh0ejQKpxxxPD186tl5nzEkAqRq5jCYelYIAdH1eBvg87H5VNNFr/shHxaQ==", - "requires": { - "@sentry/hub": "4.3.0", - "@sentry/types": "4.3.0" - } - }, - "@sentry/node": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.3.0.tgz", - "integrity": "sha512-2TZHi0XYpSVzKGT/M7mMlXidya4+ZmSZxZCMJ8KlWPljuQxzPoUeGwmYGXOHEsktOGG2eGajDv1hjGtHfamlnA==", - "requires": { - "@sentry/core": "4.3.0", - "@sentry/hub": "4.3.0", - "@sentry/types": "4.3.0", - "@sentry/utils": "4.3.0", - "cookie": "0.3.1", - "lsmod": "1.0.0", - "md5": "2.2.1", - "stack-trace": "0.0.10" - } - }, - "@sentry/types": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.3.0.tgz", - "integrity": "sha512-oBAusA+/JFJJlNfHgikyBPTyvmCr/YxZsLWL2FNOBNJkMClW+m7tQ63x/ZAqRSEd8lnJQxJSU7LfAYDH6LcChQ==" - }, - "@sentry/utils": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.3.0.tgz", - "integrity": "sha512-cEGygJbyc1SUGxbanvk3+JYadiywJupdEkp6L8rRfxur/nNQZq1Jd7tkdm4I2rz5YFVg+yayadAquvr4DIu9nA==", - "requires": { - "@sentry/types": "4.3.0" - } - }, - "@types/accepts": { - "version": "1.3.5", - "resolved": "http://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", - "requires": { - "@types/node": "*" - } - }, - "@types/body-parser": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", - "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.32", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", - "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", - "requires": { - "@types/node": "*" - } - }, - "@types/cors": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.4.tgz", - "integrity": "sha512-ipZjBVsm2tF/n8qFGOuGBkUij9X9ZswVi9G3bx/6dz7POpVa6gVHcj1wsX/LVEn9MMF41fxK/PnZPPoTD1UFPw==", - "requires": { - "@types/express": "*" - } - }, - "@types/events": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" - }, - "@types/express": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", - "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", - "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", - "requires": { - "@types/events": "*", - "@types/node": "*", - "@types/range-parser": "*" - } - }, - "@types/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" - }, - "@types/mime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", - "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" - }, - "@types/node": { - "version": "10.12.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.4.tgz", - "integrity": "sha512-0aFZiYCvoxyKP/Mg6PvqBb2UtWGIPf63r6rOAvRBrgyJOfanbL60yUH2U4FSpg+Yn6FW+JVYWtzn6hLTy745Fg==" - }, - "@types/range-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", - "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" - }, - "@types/serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", - "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" - } - }, - "@types/ws": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.1.tgz", - "integrity": "sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q==", - "requires": { - "@types/events": "*", - "@types/node": "*" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz", - "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==", - "dev": true - }, - "ajv": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", - "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - } - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "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 - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "apollo-cache-control": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.3.0.tgz", - "integrity": "sha512-XtkinmravL9/IEAPXzJod9fKx4iesS0TNBV/619xwurv8eopZkbAiKVZ3WB4rbjoGQpBgEs0bekWIAhYGWLyOw==", - "requires": { - "apollo-server-env": "2.2.0", - "graphql-extensions": "0.3.0" - } - }, - "apollo-datasource": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.2.0.tgz", - "integrity": "sha512-WJM9Ix3uogIfAG7mjL1NZQM9+45rcikn4mPWhE1Iuyw2+Y857J3uKJqQgF5h9Fg64SlCJh9u5WL3N7N5mg1fVw==", - "requires": { - "apollo-server-caching": "0.2.0", - "apollo-server-env": "2.2.0" - } - }, - "apollo-engine-reporting": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.1.0.tgz", - "integrity": "sha512-OjG9MmNWRS3ZMSDc44Z6QMFQ66VDzs/E4H1yZELZ77BVrLsDx4i8Fft95byywACUpLvXhrCRtOdSZIwRPDq+cw==", - "requires": { - "apollo-engine-reporting-protobuf": "0.1.0", - "apollo-server-env": "2.2.0", - "async-retry": "^1.2.1", - "graphql-extensions": "0.3.0", - "lodash": "^4.17.10" - } - }, - "apollo-engine-reporting-protobuf": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.1.0.tgz", - "integrity": "sha512-GReJtAYTmpwg0drb9VgFtqObYYTCHkJhlHEYCeXY8bJV4fOgXsAZ7CIXR9nPKO0mBaoHIHaGYvXGcyCLrZ36VA==", - "requires": { - "protobufjs": "^6.8.6" - } - }, - "apollo-link": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", - "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", - "requires": { - "apollo-utilities": "^1.0.0", - "zen-observable-ts": "^0.8.10" - } - }, - "apollo-server-caching": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.2.0.tgz", - "integrity": "sha512-/v7xWEcyyahs3hwX4baH/GekuHz3LRt9NoIYwg869G1eeqjuwY6NsowRIujZ100anJQwm9v5A9/sLtHBFvbgYg==", - "requires": { - "lru-cache": "^4.1.3" - } - }, - "apollo-server-core": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.2.0.tgz", - "integrity": "sha512-Pd9YpC/xSzpVOr6KM5bDHQdcI8jjKu3hb8x7eyevh/Q7eyrF+ClmfPZvY5EnG4ETIJsTS0+fU1dnoGMmyxCBKw==", - "requires": { - "@apollographql/apollo-upload-server": "^5.0.3", - "@apollographql/graphql-playground-html": "^1.6.4", - "@types/ws": "^6.0.0", - "apollo-cache-control": "0.3.0", - "apollo-datasource": "0.2.0", - "apollo-engine-reporting": "0.1.0", - "apollo-server-caching": "0.2.0", - "apollo-server-env": "2.2.0", - "apollo-server-errors": "2.2.0", - "apollo-server-plugin-base": "0.1.0", - "apollo-tracing": "0.3.0", - "graphql-extensions": "0.3.0", - "graphql-subscriptions": "^1.0.0", - "graphql-tag": "^2.9.2", - "graphql-tools": "^4.0.0", - "json-stable-stringify": "^1.0.1", - "lodash": "^4.17.10", - "subscriptions-transport-ws": "^0.9.11", - "ws": "^6.0.0" - } - }, - "apollo-server-env": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.2.0.tgz", - "integrity": "sha512-wjJiI5nQWPBpNmpiLP389Ezpstp71szS6DHAeTgYLb/ulCw3CTuuA+0/E1bsThVWiQaDeHZE0sE3yI8q2zrYiA==", - "requires": { - "node-fetch": "^2.1.2", - "util.promisify": "^1.0.0" - } - }, - "apollo-server-errors": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.2.0.tgz", - "integrity": "sha512-gV9EZG2tovFtT1cLuCTavnJu2DaKxnXPRNGSTo+SDI6IAk6cdzyW0Gje5N2+3LybI0Wq5KAbW6VLei31S4MWmg==" - }, - "apollo-server-express": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.2.0.tgz", - "integrity": "sha512-E6WpImvCHKR9MHs64gTHhMrehk6/1NRE2+bblsHZg7ot8Iy6hVmzsCIzSmlPYh5uozpcyeRdC1pV0nwERtQKog==", - "requires": { - "@apollographql/apollo-upload-server": "^5.0.3", - "@apollographql/graphql-playground-html": "^1.6.4", - "@types/accepts": "^1.3.5", - "@types/body-parser": "1.17.0", - "@types/cors": "^2.8.4", - "@types/express": "4.16.0", - "accepts": "^1.3.5", - "apollo-server-core": "2.2.0", - "body-parser": "^1.18.3", - "cors": "^2.8.4", - "graphql-subscriptions": "^1.0.0", - "graphql-tools": "^4.0.0", - "type-is": "^1.6.16" - } - }, - "apollo-server-plugin-base": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-0.1.0.tgz", - "integrity": "sha512-ptaVBjR+Q1swdzsh84tY5Qb0yyTMO/IOBsBJzCdxuAKs+PAVFw7ZMQoe5bT0DJjKJXHjtfMiTF77mRLLBq2dEw==" - }, - "apollo-tracing": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.3.0.tgz", - "integrity": "sha512-fkSpvzldDo1jBFap0d5lJYghEiH55eRVQzrC6vGvwr7rZNK5Moznwn9sBqy+4QsOaIp+wYc6pz/a+hwG4pasig==", - "requires": { - "apollo-server-env": "2.2.0", - "graphql-extensions": "0.3.0" - } - }, - "apollo-utilities": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.25.tgz", - "integrity": "sha512-AXvqkhni3Ir1ffm4SA1QzXn8k8I5BBl4PVKEyak734i4jFdp+xgfUyi2VCqF64TJlFTA/B73TRDUvO2D+tKtZg==", - "requires": { - "fast-json-stable-stringify": "^2.0.0" - } - }, - "argparse": { - "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" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "optional": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "array-union": { - "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" - } - }, - "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 - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true, - "optional": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" - }, - "async-retry": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", - "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", - "requires": { - "retry": "0.12.0" - } - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "axios": { - "version": "0.18.0", - "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, - "babel-cli": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", - "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "chokidar": "^1.6.1", - "commander": "^2.11.0", - "convert-source-map": "^1.5.0", - "fs-readdir-recursive": "^1.0.0", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "output-file-sync": "^1.1.2", - "path-is-absolute": "^1.0.1", - "slash": "^1.0.0", - "source-map": "^0.5.6", - "v8flags": "^2.1.1" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "babel-eslint": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz", - "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "^1.0.0" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-helper-bindify-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-explode-class": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", - "dev": true, - "requires": { - "babel-helper-bindify-decorators": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "dev": true, - "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-async-generators": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", - "dev": true - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", - "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", - "dev": true - }, - "babel-plugin-syntax-decorators": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", - "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", - "dev": true - }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-generator-functions": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-generators": "^6.5.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-class-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-plugin-syntax-class-properties": "^6.8.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", - "dev": true, - "requires": { - "babel-helper-explode-class": "^6.24.1", - "babel-plugin-syntax-decorators": "^6.13.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", - "dev": true, - "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "dev": true, - "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", - "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", - "dev": true, - "requires": { - "regenerator-transform": "^0.10.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-polyfill": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "regenerator-runtime": "^0.10.5" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", - "dev": true - } - } - }, - "babel-preset-env": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", - "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^3.2.6", - "invariant": "^2.2.2", - "semver": "^5.3.0" - } - }, - "babel-preset-stage-2": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", - "dev": true, - "requires": { - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-decorators": "^6.24.1", - "babel-preset-stage-3": "^6.24.1" - } - }, - "babel-preset-stage-3": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", - "dev": true, - "requires": { - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-plugin-transform-async-to-generator": "^6.24.1", - "babel-plugin-transform-exponentiation-operator": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.22.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", - "dev": true - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - } - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "optional": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - } - }, - "bson": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", - "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", - "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", - "requires": { - "dicer": "0.2.5", - "readable-stream": "1.1.x" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30000907", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000907.tgz", - "integrity": "sha512-No5sQ/OB2Nmka8MNOOM6nJx+Hxt6MQ6h7t7kgJFu9oTuwjykyKRSBP/+i/QAyFHxeHB+ddE0Da1CG5ihx9oehQ==", - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.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 - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "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==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "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" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.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", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "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" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "deprecated-decorator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", - "integrity": "sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", - "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", - "requires": { - "readable-stream": "1.1.x", - "streamsearch": "0.1.2" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dot-prop": { - "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" - } - }, - "dotenv": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.1.0.tgz", - "integrity": "sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw==" - }, - "duplexer": { - "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "electron-to-chromium": { - "version": "1.3.84", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz", - "integrity": "sha512-IYhbzJYOopiTaNWMBp7RjbecUBsbnbDneOP86f3qvS0G0xfzwNSvMJpTrvi5/Y1gU7tg2NAgeg8a8rCYvW9Whw==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "error-ex": { - "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" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "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==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.8.0.tgz", - "integrity": "sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.5.3", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "imurmurhash": "^0.1.4", - "inquirer": "^6.1.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.12.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.0.2", - "text-table": "^0.2.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 - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "globals": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", - "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "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": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "eslint-config-airbnb-base": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", - "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", - "dev": true, - "requires": { - "eslint-restricted-globals": "^0.1.1", - "object.assign": "^4.1.0", - "object.entries": "^1.0.4" - } - }, - "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", - "dev": true, - "requires": { - "debug": "^2.6.9", - "resolve": "^1.5.0" - } - }, - "eslint-module-utils": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", - "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "pkg-dir": "^1.0.0" - } - }, - "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", - "dev": true, - "requires": { - "contains-path": "^0.1.0", - "debug": "^2.6.8", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" - }, - "dependencies": { - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "eslint-restricted-globals": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", - "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", - "dev": true - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", - "dev": true, - "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "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 - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "event-stream": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz", - "integrity": "sha512-dGXNg4F/FgVzlApjzItL+7naHutA3fDqbV/zAZqDDlXTjiMnQmZKu+prImWKszeBM5UQeGvAl3u1wBiKeDh61g==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "flatmap-stream": "^0.1.0", - "from": "^0.1.7", - "map-stream": "0.0.7", - "pause-stream": "^0.0.11", - "split": "^1.0.1", - "stream-combiner": "^0.2.2", - "through": "^2.3.8" - } - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "optional": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "optional": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true, - "optional": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "optional": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - } - } - }, - "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" - } - }, - "flat-cache": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.2.tgz", - "integrity": "sha512-KByBY8c98sLUAGpnmjEdWTrtrLZRtZdwds+kAL/ciFXTCb7AZgqKsAnVnYFQj1hxepwO8JKN/8AsRWwLq+RK0A==", - "dev": true, - "requires": { - "circular-json": "^0.3.1", - "del": "^3.0.0", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" - } - }, - "flatmap-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz", - "integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw==", - "dev": true - }, - "follow-redirects": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", - "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "optional": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": 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" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "optional": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "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", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "got": { - "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "graphql": { - "version": "0.13.2", - "resolved": "http://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", - "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", - "requires": { - "iterall": "^1.2.1" - } - }, - "graphql-extensions": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.3.0.tgz", - "integrity": "sha512-+ppyD7g6acX0y2vj5hm5mRlCBngdHD2dE1jW7abAG4PAWg275TrczA3WXUxB6P9Q4uw0XA886Q+aagI5EmTSaA==" - }, - "graphql-subscriptions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.0.0.tgz", - "integrity": "sha512-+ytmryoHF1LVf58NKEaNPRUzYyXplm120ntxfPcgOBC7TnK7Tv/4VRHeh4FAR9iL+O1bqhZs4nkibxQ+OA5cDQ==", - "requires": { - "iterall": "^1.2.1" - } - }, - "graphql-tag": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.0.tgz", - "integrity": "sha512-9FD6cw976TLLf9WYIUPCaaTpniawIjHWZSwIRZSjrfufJamcXbVVYfN2TWvJYbw0Xf2JjYbl1/f2+wDnBVw3/w==" - }, - "graphql-tools": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.3.tgz", - "integrity": "sha512-NNZM0WSnVLX1zIMUxu7SjzLZ4prCp15N5L2T2ro02OVyydZ0fuCnZYRnx/yK9xjGWbZA0Q58yEO//Bv/psJWrg==", - "requires": { - "apollo-link": "^1.2.3", - "apollo-utilities": "^1.0.1", - "deprecated-decorator": "^0.1.6", - "iterall": "^1.1.3", - "uuid": "^3.1.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "http://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" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", - "dev": true - }, - "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 - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", - "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "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 - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.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": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", - "dev": true, - "requires": { - "ci-info": "^1.5.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true, - "optional": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "optional": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "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 - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true, - "optional": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true, - "optional": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "requires": { - "has-symbols": "^1.0.0" - } - }, - "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==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "requires": { - "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - } - } - }, - "iterall": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", - "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "kareem": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", - "integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg==" - }, - "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" - } - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "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" - }, - "dependencies": { - "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 - } - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "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 - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "lsmod": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", - "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" - }, - "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" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", - "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true, - "optional": true - }, - "md5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", - "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", - "requires": { - "charenc": "~0.0.1", - "crypt": "~0.0.1", - "is-buffer": "~1.1.1" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "memory-pager": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.1.0.tgz", - "integrity": "sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg==", - "optional": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - }, - "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" - }, - "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", - "requires": { - "mime-db": "~1.37.0" - } - }, - "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 - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mongodb": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.8.tgz", - "integrity": "sha512-yNKwYxQ6m00NV6+pMoWoheFTHSQVv1KkSrfOhRDYMILGWDYtUtQRqHrFqU75rmPIY8hMozVft8zdC4KYMWaM3Q==", - "requires": { - "mongodb-core": "3.1.7", - "safe-buffer": "^5.1.2" - } - }, - "mongodb-core": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.7.tgz", - "integrity": "sha512-YffpSrLmgFNmrvkGx+yX00KyBNk64C0BalfEn6vHHkXtcMUGXw8nxrMmhq5eXPLLlYeBpD/CsgNxE2Chf0o4zQ==", - "requires": { - "bson": "^1.1.0", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.10.tgz", - "integrity": "sha512-h2cW/vR/7UFOAlOoGMpyWdXE75fvfC61TdX63tXnz8L95OU5p7Lj11FxZoznBKjfBPGUk79tmMz6zxPLyBkClQ==", - "requires": { - "async": "2.6.1", - "bson": "~1.1.0", - "kareem": "2.3.0", - "lodash.get": "4.4.2", - "mongodb": "3.1.8", - "mongodb-core": "3.1.7", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.5.1", - "mquery": "3.2.0", - "ms": "2.0.0", - "regexp-clone": "0.0.1", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz", - "integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg==" - }, - "mquery": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz", - "integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "0.0.1", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.1.tgz", - "integrity": "sha512-ObXBpNCD3A/vYQiQtEWl7DuqjAXjfptYFuGHLdPl5U19/6kJuZV+8uMHLrkj3wJrJoyfg4nhgyFixZdaZoAiEQ==" - }, - "nodemon": { - "version": "1.18.6", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.6.tgz", - "integrity": "sha512-4pHQNYEZun+IkIC2jCaXEhkZnfA7rQe73i8RkdRyDJls/K+WxR7IpI5uNUsAvQ0zWvYcCDNGD+XVtw2ZG86/uQ==", - "dev": true, - "requires": { - "chokidar": "^2.0.4", - "debug": "^3.1.0", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.0", - "semver": "^5.5.0", - "supports-color": "^5.2.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.2", - "update-notifier": "^2.3.0" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "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" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^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" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "glob-parent": { - "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" - }, - "dependencies": { - "is-glob": { - "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" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "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" - } - }, - "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 - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object-path": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz", - "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.entries": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", - "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.6.1", - "function-bind": "^1.1.0", - "has": "^1.0.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "optional": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "output-file-sync": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", - "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.4", - "mkdirp": "^0.5.1", - "object-assign": "^4.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "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-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "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 - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "optional": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.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" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "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-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "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 - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "~2.3" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "requires": { - "find-up": "^1.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true, - "optional": true - }, - "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-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", - "dev": true - }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - } - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "dev": true, - "requires": { - "event-stream": "~3.3.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "pstree.remy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.0.tgz", - "integrity": "sha512-q5I5vLRMVtdWa8n/3UEzZX7Lfghzrg9eG2IKk2ENLSofKRCXVqMvMUHxCKgXNaqH/8ebhBxrqftHWnyTFweJ5Q==", - "dev": true, - "requires": { - "ps-tree": "^1.1.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "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==" - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "optional": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true, - "optional": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true, - "optional": true - } - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.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" - } - } - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.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" - } - } - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://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" - } - } - } - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" - }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "optional": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp-clone": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", - "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - } - } - }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - } - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "saslprep": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz", - "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - } - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - }, - "shebang-command": { - "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" - } - }, - "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 - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "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 - }, - "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" - } - }, - "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", - "dev": true - }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "dev": true, - "requires": { - "through": "2" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "stream-combiner": { - "version": "0.2.2", - "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", - "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", - "dev": true, - "requires": { - "duplexer": "~0.1.1", - "through": "~2.3.4" - } - }, - "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" - }, - "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" - }, - "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", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://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": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "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 - }, - "subscriptions-transport-ws": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.15.tgz", - "integrity": "sha512-f9eBfWdHsePQV67QIX+VRhf++dn1adyC/PZHP6XI5AfKnZ4n0FW+v5omxwdHVpd4xq2ZijaHEcmlQrhBY79ZWQ==", - "requires": { - "backo2": "^1.0.2", - "eventemitter3": "^3.1.0", - "iterall": "^1.2.1", - "symbol-observable": "^1.0.4", - "ws": "^5.2.0" - }, - "dependencies": { - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, - "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 - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, - "table": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", - "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", - "dev": true, - "requires": { - "ajv": "^6.5.3", - "lodash": "^4.17.10", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - } - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "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=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } - } - }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "requires": { - "nopt": "~1.0.10" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "undefsafe": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", - "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", - "dev": true, - "requires": { - "debug": "^2.2.0" - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "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=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true, - "requires": { - "user-home": "^1.1.1" - } - }, - "validate-npm-package-license": { - "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" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "which": { - "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" - } - }, - "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "ws": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.0.tgz", - "integrity": "sha512-H3dGVdGvW2H8bnYpIDc3u3LH8Wue3Qh+Zto6aXXFzvESkTVT6rAfKR6tR/+coaUvxs8yHtmNV0uioBF62ZGSTg==", - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "zen-observable": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.11.tgz", - "integrity": "sha512-N3xXQVr4L61rZvGMpWe8XoCGX8vhU35dPyQ4fm5CY/KDlG0F75un14hjbckPXTDuKUY6V0dqR2giT6xN8Y4GEQ==" - }, - "zen-observable-ts": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", - "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", - "requires": { - "zen-observable": "^0.8.0" - } - } - } -} diff --git a/server/package.json b/server/package.json deleted file mode 100644 index c4367cb30..000000000 --- a/server/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "events-server", - "version": "0.1.0", - "description": "Advanced Algos Event backend API", - "author": "", - "license": "", - "main": "src/index.js", - "scripts": { - "start": "nodemon --exec babel-node --presets env,stage-2 src/index.js", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "standard": { - "ignore": [ - "/src/errors/index.js" - ] - }, - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-eslint": "^10.0.1", - "babel-preset-env": "^1.7.0", - "babel-preset-stage-2": "^6.24.1", - "eslint": "^5.8.0", - "eslint-config-airbnb-base": "^13.1.0", - "eslint-plugin-import": "^2.14.0", - "nodemon": "^1.18.4" - }, - "dependencies": { - "@sentry/node": "^4.1.1", - "apollo-server-express": "^2.1.0", - "axios": "^0.18.0", - "dotenv": "^6.0.0", - "express": "^4.16.3", - "graphql": "^0.13.2", - "mongoose": "^5.3.4" - } -} diff --git a/server/src/app.js b/server/src/app.js deleted file mode 100644 index a146d25d9..000000000 --- a/server/src/app.js +++ /dev/null @@ -1,52 +0,0 @@ -import 'dotenv/config'; -import express from 'express'; -import { ApolloServer } from 'apollo-server-express'; -import * as Sentry from '@sentry/node'; -import schema from './schema'; -import wrongPreshared from './errors/notAllowed.json'; - -const app = express(); - -// Initialising sentry -Sentry.init({ dsn: process.env.SENTRY_DNS }); -app.use(Sentry.Handlers.requestHandler()); - -app.post('/graphql', (req, res, next) => { - if (req.headers.preshared === process.env.PRESHARED_GATEWAY_KEY) { - next(); - } else { - res.send(wrongPreshared); - } -}); - - -// Starting the graphql server -const server = new ApolloServer({ - schema, - playground: { - settings: { - 'editor.theme': 'dark', - 'editor.cursorShape': 'line', - }, - }, - context: ({ req }) => ({ - userId: req.headers.userid, - authorization: req.headers.authorization, - }), - formatError: error => ({ - code: error.extensions.exception.code, - message: error.message, - path: error.path, - }), - introspection: true, -}); - -server.applyMiddleware({ - app, - cors: true, -}); - -// Sentry error handling middleware if anything pass through -app.use(Sentry.Handlers.errorHandler()); - -export default app; diff --git a/server/src/db.js b/server/src/db.js deleted file mode 100644 index 4ed47a0c2..000000000 --- a/server/src/db.js +++ /dev/null @@ -1,11 +0,0 @@ -import 'dotenv/config'; -import mongoose from 'mongoose'; - -mongoose.connect(`mongodb://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_DOMAIN}`, { useNewUrlParser: true }); -mongoose.set('useCreateIndex', true); -mongoose.set('useFindAndModify', false); -mongoose.Promise = global.Promise; - -const db = mongoose.connection; - -export default db; diff --git a/server/src/enums/EventState.js b/server/src/enums/EventState.js deleted file mode 100644 index 4541a47ef..000000000 --- a/server/src/enums/EventState.js +++ /dev/null @@ -1,19 +0,0 @@ -export const UNPUBLISHED = 'UNPUBLISHED'; -export const PUBLISHED = 'PUBLISHED'; -export const CANCELLED = 'CANCELLED'; -export const RUNNING = 'RUNNING'; -export const INTERRUPTED = 'INTERRUPTED'; -export const FINISHED = 'FINISHED'; -export const ARCHIVED = 'ARCHIVED'; - -export const EventStateEnum = [ - UNPUBLISHED, - PUBLISHED, - CANCELLED, - RUNNING, - INTERRUPTED, - FINISHED, - ARCHIVED, -]; - -export default EventStateEnum; diff --git a/server/src/errors/index.js b/server/src/errors/index.js deleted file mode 100644 index 16c3974f1..000000000 --- a/server/src/errors/index.js +++ /dev/null @@ -1,45 +0,0 @@ -import * as Sentry from '@sentry/node'; - -class ClientError extends Error { - constructor(args) { - super(args); - Sentry.configureScope((scope) => { - scope.setLevel('debug'); - }); - Sentry.captureException(this); - } -} - -class ServerError extends Error { - constructor(args) { - super(args); - Sentry.configureScope((scope) => { - scope.setLevel('error'); - }); - Sentry.captureException(this); - } -} - -export class AuthentificationError extends ClientError { - code = 401 - - message = 'Autentification not found, you have to be authentificated to perform this action' -} - -export class DatabaseError extends ClientError { - code = 404 - - message = `Ressource not found : ${this.message}` -} - -export class WrongArgumentsError extends ClientError { - code = 400 - - message = `Wrong arguments : ${this.message}` -} - -export class ServiceUnavailableError extends ServerError { - code = 503 - - message = `At least one service is unresponding ${this.message}` -} diff --git a/server/src/errors/notAllowed.json b/server/src/errors/notAllowed.json deleted file mode 100644 index b76604aa2..000000000 --- a/server/src/errors/notAllowed.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "errors": [ - { - "code": 401, - "message": "Wait, you're not supposed to be here, go through the gate as everyone else" - } - ] -} diff --git a/server/src/index.js b/server/src/index.js deleted file mode 100644 index f9b2c65f3..000000000 --- a/server/src/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable no-console */ -import * as Sentry from '@sentry/node'; -import db from './db'; -import app from './app'; - -// Bind server success and error to sentry -db.on('error', (err) => { - Sentry.configureScope((scope) => { - scope.setLevel('error'); - }); - Sentry.captureException(err); -}); -db.once('open', () => { - Sentry.configureScope((scope) => { - scope.setLevel('info'); - }); - Sentry.captureMessage('Connected to the DB.'); -}); - -app.listen(process.env.PORT, () => { - console.log(`Listening on port ${process.env.PORT}`); -}); diff --git a/server/src/models/event.js b/server/src/models/event.js deleted file mode 100644 index c95ef5744..000000000 --- a/server/src/models/event.js +++ /dev/null @@ -1,104 +0,0 @@ -import mongoose, { Schema } from 'mongoose'; -import Plotter from './plotter'; -import Formula from './formula'; -import { - UNPUBLISHED, - EventStateEnum, -} from '../enums/EventState'; - -const { ObjectId } = Schema.Types; - -const eventSchema = new Schema({ - state: { - type: String, - enum: EventStateEnum, - default: UNPUBLISHED, - }, - name: { - type: String, - required: true, - }, - hostId: { - type: String, - required: true, - }, - description: { - type: String, - }, - startDatetime: { - type: Number, - required: true, - }, - finishDatetime: { - type: Number, - required: true, - }, - formulaId: { - type: ObjectId, - ref: Formula.modelName, - }, - plotterId: { - type: ObjectId, - ref: Plotter.modelName, - }, - rules: [{ - position: { - type: Number, - required: true, - }, - title: { - type: String, - required: true, - }, - description: { - type: String, - }, - }], - prizes: [{ - rank: { - type: Number, - required: true, - }, - amount: { - type: Number, - required: true, - }, - additional: [{ - condition: String, - amount: { - type: Number, - required: true, - }, - asset: { - type: String, - required: true, - }, - }], - }], - participants: [{ - teamId: { - type: String, - required: true, - }, - botId: String, - releaseId: String, - }], -}); - -eventSchema.pre('find', function populate() { - this.populate('formulaId').populate('plotterId'); -}); -eventSchema.post('save', (doc, next) => { - doc.populate('formulaId').populate('plotterId').execPopulate().then(() => { - next(); - }); -}); -eventSchema.post('findOneAndUpdate', (doc, next) => { - doc.populate('formulaId').populate('plotterId').execPopulate().then(() => { - next(); - }); -}); - -const Event = mongoose.model('Event', eventSchema); - -export default Event; diff --git a/server/src/models/formula.js b/server/src/models/formula.js deleted file mode 100644 index ccc774334..000000000 --- a/server/src/models/formula.js +++ /dev/null @@ -1,20 +0,0 @@ -import mongoose, { Schema } from 'mongoose'; - -const formulaSchema = new Schema({ - ownerId: { - type: String, - required: true, - }, - isTemplate: { - type: Boolean, - default: false, - }, - name: { - type: String, - required: true, - }, -}); - -const Formula = mongoose.model('Formula', formulaSchema); - -export default Formula; diff --git a/server/src/models/index.js b/server/src/models/index.js deleted file mode 100644 index 251eda8ea..000000000 --- a/server/src/models/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import Plotter from './plotter'; -import Event from './event'; -import Formula from './formula'; - -export { - Event, - Plotter, - Formula, -}; diff --git a/server/src/models/plotter.js b/server/src/models/plotter.js deleted file mode 100644 index a9a7feb92..000000000 --- a/server/src/models/plotter.js +++ /dev/null @@ -1,32 +0,0 @@ -import mongoose, { Schema } from 'mongoose'; - -const plotterSchema = new Schema({ - ownerId: { - type: String, - required: true, - }, - isTemplate: { - type: Boolean, - default: false, - }, - name: { - type: String, - required: true, - }, - host: { - type: String, - required: true, - }, - repo: { - type: String, - required: true, - }, - moduleName: { - type: String, - required: true, - }, -}); - -const Plotter = mongoose.model('Plotter', plotterSchema); - -export default Plotter; diff --git a/server/src/schema/index.js b/server/src/schema/index.js deleted file mode 100644 index 81d0b3150..000000000 --- a/server/src/schema/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import { - GraphQLSchema, -} from 'graphql'; - -import Mutation from './mutations'; -import RootQuery from './queries'; - -const Schema = new GraphQLSchema({ - query: RootQuery, - mutation: Mutation, -}); - -export default Schema; diff --git a/server/src/schema/mutations/ChangeEventState.js b/server/src/schema/mutations/ChangeEventState.js deleted file mode 100644 index ada9367b8..000000000 --- a/server/src/schema/mutations/ChangeEventState.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, -} from 'graphql'; -import { AuthentificationError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import EventStateEnum from '../types/enum/EventState'; - -const args = { - eventId: { type: new GraphQLNonNull(GraphQLID) }, - state: { type: EventStateEnum }, -}; - -const resolve = (parent, { eventId: _id, state }, { userId: hostId }) => { - if (!hostId) { - throw new AuthentificationError(); - } - - return new Promise((res, rej) => { - Event.findOneAndUpdate({ _id, hostId }, { state }, { new: true }, (err, modifiedEvent) => { - if (err) { - rej(err); - return; - } - res(modifiedEvent); - }); - }); -}; - -const mutation = { - changeEventState: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreateEvent.js b/server/src/schema/mutations/CreateEvent.js deleted file mode 100644 index 2704f53e7..000000000 --- a/server/src/schema/mutations/CreateEvent.js +++ /dev/null @@ -1,37 +0,0 @@ -import { AuthentificationError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { EventInputType } from '../types/input'; - -export const args = { - event: { type: EventInputType }, -}; - -const resolve = (parent, { event }, { userId: hostId }) => { - if (!hostId) { - throw new AuthentificationError(); - } - - event.hostId = hostId; - const newEvent = new Event(event); - - return new Promise((res, rej) => { - newEvent.save((err) => { - if (err) { - rej(err); - return; - } - res(newEvent); - }); - }); -}; - -const mutation = { - createEvent: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreateFormula.js b/server/src/schema/mutations/CreateFormula.js deleted file mode 100644 index 198c1fd0e..000000000 --- a/server/src/schema/mutations/CreateFormula.js +++ /dev/null @@ -1,37 +0,0 @@ -import { AuthentificationError } from '../../errors'; -import { FormulaType } from '../types'; -import { Formula } from '../../models'; -import { FormulaInputType } from '../types/input'; - -const args = { - formula: { type: FormulaInputType }, -}; - -const resolve = (parent, { formula }, { userId: ownerId }) => { - if (!ownerId) { - throw new AuthentificationError(); - } - - formula.ownerId = ownerId; - const newFormula = new Formula(formula); - - return new Promise((res, rej) => { - newFormula.save((err) => { - if (err) { - rej(err); - return; - } - res(newFormula); - }); - }); -}; - -const mutation = { - createFormula: { - type: FormulaType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/CreatePlotter.js b/server/src/schema/mutations/CreatePlotter.js deleted file mode 100644 index 6cf060fbf..000000000 --- a/server/src/schema/mutations/CreatePlotter.js +++ /dev/null @@ -1,37 +0,0 @@ -import { AuthentificationError } from '../../errors'; -import { PlotterType } from '../types'; -import { Plotter } from '../../models'; -import { PlotterInputType } from '../types/input'; - -const args = { - plotter: { type: PlotterInputType }, -}; - -const resolve = (parent, { plotter }, { userId: ownerId }) => { - if (!ownerId) { - throw new AuthentificationError(); - } - - plotter.ownerId = ownerId; - const newPlotter = new Plotter(plotter); - - return new Promise((res, reject) => { - newPlotter.save((err) => { - if (err) { - reject(err); - return; - } - res(newPlotter); - }); - }); -}; - -const mutation = { - createPlotter: { - type: PlotterType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/EditEvent.js b/server/src/schema/mutations/EditEvent.js deleted file mode 100644 index 093376207..000000000 --- a/server/src/schema/mutations/EditEvent.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, -} from 'graphql'; -import { AuthentificationError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { EventInputType } from '../types/input'; - -const args = { - eventId: { type: new GraphQLNonNull(GraphQLID) }, - event: { type: EventInputType }, -}; - -const resolve = (parent, { eventId: _id, event }, { userId: hostId }) => { - if (!hostId) { - throw new AuthentificationError(); - } - - return new Promise((res, rej) => { - Event.findOneAndUpdate({ _id, hostId }, event, { new: true }, (err, modifiedEvent) => { - if (err) { - rej(err); - return; - } - res(modifiedEvent); - }); - }); -}; - -const mutation = { - editEvent: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/EditParticipant.js b/server/src/schema/mutations/EditParticipant.js deleted file mode 100644 index a241f34b4..000000000 --- a/server/src/schema/mutations/EditParticipant.js +++ /dev/null @@ -1,83 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, -} from 'graphql'; -import axios from 'axios'; -import { - AuthentificationError, - WrongArgumentsError, - ServiceUnavailableError, -} from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { ParticipantInputType } from '../types/input'; - -const args = { - eventId: { type: new GraphQLNonNull(GraphQLID) }, - participant: { type: ParticipantInputType }, -}; - -const resolve = (parent, - { eventId: _id, participant: { teamId, botId, releaseId } }, - { userId, authorization }) => { - if (!userId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - axios({ - url: process.env.GATEWAY_ENDPOINT, - method: 'post', - data: { - query: ` - { - teams_TeamsByRole{ - id - } - } - `, - }, - headers: { authorization }, - }).then( - (result) => { - if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { - rej(new WrongArgumentsError('You are not eligible to edit this team')); - return; - } - Event.findOne({ _id }).exec((err, event) => { - if (err) { - rej(err); - return; - } - const participantIndex = event.participant - .findIndex(participant => participant.teamId === teamId); - - event.participants[participantIndex].botId = botId - || event.participants[participantIndex].botId; - event.participants[participantIndex].releaseId = releaseId - || event.participants[participantIndex].releaseId; - - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }, - (error) => { - rej(new ServiceUnavailableError(error)); - }, - ); - }); -}; - -const mutation = { - editParticipant: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/RegisterToEvent.js b/server/src/schema/mutations/RegisterToEvent.js deleted file mode 100644 index 445e26628..000000000 --- a/server/src/schema/mutations/RegisterToEvent.js +++ /dev/null @@ -1,85 +0,0 @@ -import 'dotenv/config'; -import { - GraphQLNonNull, - GraphQLID, -} from 'graphql'; -import axios from 'axios'; -import { - AuthentificationError, - WrongArgumentsError, - ServiceUnavailableError, -} from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { ParticipantInputType } from '../types/input'; - -const args = { - eventId: { type: new GraphQLNonNull(GraphQLID) }, - participant: { type: ParticipantInputType }, -}; - -const resolve = (parent, - { eventId: _id, participant: { teamId, botId, releaseId } }, - { userId, authorization }) => { - if (!userId) { - throw new AuthentificationError(); - } - return new Promise((res, rej) => { - axios({ - url: process.env.GATEWAY_ENDPOINT, - method: 'post', - data: { - query: ` - { - teams_TeamsByRole{ - id - } - } - `, - }, - headers: { authorization }, - }).then( - (result) => { - if (!result.data.data.teamsByRole.some(team => team.id === teamId)) { - rej(new WrongArgumentsError('You are not eligible to register this team')); - return; - } - Event.findOne({ _id }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (event.participants.some(participant => participant.teamId === teamId)) { - rej(new WrongArgumentsError('You are already registred')); - return; - } - event.participants.push({ - teamId, - botId, - releaseId, - }); - event.save((error) => { - if (error) { - rej(error); - return; - } - res(event); - }); - }); - }, - (error) => { - rej(new ServiceUnavailableError(error)); - }, - ); - }); -}; - -const mutation = { - registerToEvent: { - type: EventType, - args, - resolve, - }, -}; - -export default mutation; diff --git a/server/src/schema/mutations/index.js b/server/src/schema/mutations/index.js deleted file mode 100644 index 2bd29dc34..000000000 --- a/server/src/schema/mutations/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import { - GraphQLObjectType, -} from 'graphql'; - -import CreateEventMutation from './CreateEvent'; -import EditEventMutation from './EditEvent'; -import RegisterToEventMutation from './RegisterToEvent'; -import EditParticipantMutation from './EditParticipant'; -import CreateFormulaMutation from './CreateFormula'; -import CreatePlotterMutation from './CreatePlotter'; -import ChangeEventStateMutation from './ChangeEventState'; - -const Mutation = new GraphQLObjectType({ - name: 'Mutation', - fields: Object.assign( - CreateEventMutation, - EditEventMutation, - RegisterToEventMutation, - EditParticipantMutation, - CreateFormulaMutation, - CreatePlotterMutation, - ChangeEventStateMutation, - ), -}); - -export default Mutation; diff --git a/server/src/schema/queries/Event.js b/server/src/schema/queries/Event.js deleted file mode 100644 index 590aac259..000000000 --- a/server/src/schema/queries/Event.js +++ /dev/null @@ -1,35 +0,0 @@ -import { - GraphQLNonNull, - GraphQLID, -} from 'graphql'; -import { DatabaseError } from '../../errors'; -import { EventType } from '../types'; -import { Event } from '../../models'; - -const args = { - eventId: { type: new GraphQLNonNull(GraphQLID) }, -}; - -const resolve = (parent, { eventId: _id }) => new Promise((res, rej) => { - Event.findOne({ _id }).exec((err, event) => { - if (err) { - rej(err); - return; - } - if (!event) { - rej(new DatabaseError('None of the events respond to that id')); - return; - } - res(event); - }); -}); - -const query = { - event: { - type: EventType, - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/Events.js b/server/src/schema/queries/Events.js deleted file mode 100644 index fae289a5b..000000000 --- a/server/src/schema/queries/Events.js +++ /dev/null @@ -1,37 +0,0 @@ -import { - GraphQLInt, - GraphQLList, -} from 'graphql'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; - -const args = { - minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt }, -}; - -const resolve = (parent, { minDate, maxDate }) => Event.find( - Object.assign( - { state: { $nin: [UNPUBLISHED, ARCHIVED] } }, - minDate || maxDate - ? { - startDatetime: - Object.assign( - minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {}, - ), - } - : {}, - ), -); - -const query = { - events: { - type: new GraphQLList(EventType), - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/EventsByHost.js b/server/src/schema/queries/EventsByHost.js deleted file mode 100644 index 6941570d4..000000000 --- a/server/src/schema/queries/EventsByHost.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - GraphQLInt, - GraphQLList, - GraphQLString, -} from 'graphql'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; - -const args = { - hostId: { type: GraphQLString }, - minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt }, -}; - -const resolve = (parent, { hostId, minDate, maxDate }, context) => Event.find( - Object.assign( - hostId ? { hostId, state: { $nin: [UNPUBLISHED, ARCHIVED] } } : { hostId: context.userId }, - minDate || maxDate - ? { - startDatetime: - Object.assign( - minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {}, - ), - } - : {}, - ), -); - -const query = { - eventsByHost: { - type: new GraphQLList(EventType), - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/EventsByTeam.js b/server/src/schema/queries/EventsByTeam.js deleted file mode 100644 index e9147e9b9..000000000 --- a/server/src/schema/queries/EventsByTeam.js +++ /dev/null @@ -1,44 +0,0 @@ -import { - GraphQLInt, - GraphQLList, - GraphQLString, - GraphQLNonNull, -} from 'graphql'; -import { EventType } from '../types'; -import { Event } from '../../models'; -import { UNPUBLISHED, ARCHIVED } from '../../enums/EventState'; - -const args = { - teamId: { type: new GraphQLNonNull(GraphQLString) }, - minDate: { type: GraphQLInt }, - maxDate: { type: GraphQLInt }, -}; - -const resolve = (parent, { teamId, minDate, maxDate }) => Event.find( - Object.assign( - { - participants: { $elemMatch: { teamId } }, - state: { $nin: [UNPUBLISHED, ARCHIVED] }, - }, - - minDate || maxDate - ? { - startDatetime: - Object.assign( - minDate ? { $gte: minDate } : {}, - maxDate ? { $lte: maxDate } : {}, - ), - } - : {}, - ), -); - -const query = { - eventsByTeam: { - type: new GraphQLList(EventType), - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/Formulas.js b/server/src/schema/queries/Formulas.js deleted file mode 100644 index 390587fdc..000000000 --- a/server/src/schema/queries/Formulas.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - GraphQLList, -} from 'graphql'; -import { FormulaType } from '../types'; -import { Formula } from '../../models'; - -const args = {}; - -const resolve = () => Formula.find(); - -const query = { - formulas: { - type: new GraphQLList(FormulaType), - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/Plotters.js b/server/src/schema/queries/Plotters.js deleted file mode 100644 index b927041f0..000000000 --- a/server/src/schema/queries/Plotters.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - GraphQLList, -} from 'graphql'; -import { PlotterType } from '../types'; -import { Plotter } from '../../models'; - -const args = {}; - -const resolve = () => Plotter.find(); - -const query = { - plotters: { - type: new GraphQLList(PlotterType), - args, - resolve, - }, -}; - -export default query; diff --git a/server/src/schema/queries/index.js b/server/src/schema/queries/index.js deleted file mode 100644 index 1daa62ea1..000000000 --- a/server/src/schema/queries/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import { - GraphQLObjectType, -} from 'graphql'; - -import EventQuery from './Event'; -import EventsQuery from './Events'; -import EventsByHostQuery from './EventsByHost'; -import EventsByTeamQuery from './EventsByTeam'; -import FormulasQuery from './Formulas'; -import PlottersQuery from './Plotters'; - -const RootQuery = new GraphQLObjectType({ - name: 'RootQueryType', - fields: Object.assign( - EventQuery, - EventsQuery, - EventsByHostQuery, - EventsByTeamQuery, - FormulasQuery, - PlottersQuery, - ), -}); - -export default RootQuery; diff --git a/server/src/schema/types/AdditionalPrize.js b/server/src/schema/types/AdditionalPrize.js deleted file mode 100644 index 1c888b687..000000000 --- a/server/src/schema/types/AdditionalPrize.js +++ /dev/null @@ -1,18 +0,0 @@ -import { - GraphQLObjectType, - GraphQLNonNull, - GraphQLString, - GraphQLInt, -} from 'graphql'; - -const AdditionalPrizeType = new GraphQLObjectType({ - name: 'AdditionalPrize', - description: 'Non algo complementary prize', - fields: () => ({ - condition: { type: GraphQLString }, - amount: { type: new GraphQLNonNull(GraphQLInt) }, - asset: { type: new GraphQLNonNull(GraphQLString) }, - }), -}); - -export default AdditionalPrizeType; diff --git a/server/src/schema/types/Event.js b/server/src/schema/types/Event.js deleted file mode 100644 index e4582e346..000000000 --- a/server/src/schema/types/Event.js +++ /dev/null @@ -1,61 +0,0 @@ -import { - GraphQLObjectType, - GraphQLInt, - GraphQLString, - GraphQLList, - GraphQLID, -} from 'graphql'; -import { - FormulaType, - PlotterType, - RuleType, - ParticipantType, - PrizeType, -} from './index'; -import EventStateEnumType from './enum/EventState'; - -const EventType = new GraphQLObjectType({ - name: 'Event', - description: 'Everything you need to know about an event', - fields: () => ({ - id: { type: GraphQLID }, - state: { type: EventStateEnumType }, - name: { type: GraphQLString }, - hostId: { type: GraphQLString }, - description: { type: GraphQLString }, - startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, - formula: { - type: FormulaType, - resolve(parent) { - return parent.formulaId; - }, - }, - plotter: { - type: PlotterType, - resolve(parent) { - return parent.plotterId; - }, - }, - rules: { - type: new GraphQLList(RuleType), - resolve(parent) { - return parent.rules; - }, - }, - participants: { - type: new GraphQLList(ParticipantType), - resolve(parent) { - return parent.participants; - }, - }, - prizes: { - type: new GraphQLList(PrizeType), - resolve(parent) { - return parent.prizes; - }, - }, - }), -}); - -export default EventType; diff --git a/server/src/schema/types/Formula.js b/server/src/schema/types/Formula.js deleted file mode 100644 index 934cbcd60..000000000 --- a/server/src/schema/types/Formula.js +++ /dev/null @@ -1,18 +0,0 @@ -import { - GraphQLObjectType, - GraphQLString, - GraphQLBoolean, -} from 'graphql'; - -const FormulaType = new GraphQLObjectType({ - name: 'Formula', - description: 'For now it\'s simplay a named field', - fields: () => ({ - id: { type: GraphQLString }, - ownerId: { type: GraphQLString }, - isTemplate: { type: GraphQLBoolean }, - name: { type: GraphQLString }, - }), -}); - -export default FormulaType; diff --git a/server/src/schema/types/Participant.js b/server/src/schema/types/Participant.js deleted file mode 100644 index 28c2833df..000000000 --- a/server/src/schema/types/Participant.js +++ /dev/null @@ -1,16 +0,0 @@ -import { - GraphQLObjectType, - GraphQLString, -} from 'graphql'; - -const ParticipantType = new GraphQLObjectType({ - name: 'Participant', - description: 'Informations about the participant of an event', - fields: () => ({ - teamId: { type: GraphQLString }, - botId: { type: GraphQLString }, - releaseId: { type: GraphQLString }, - }), -}); - -export default ParticipantType; diff --git a/server/src/schema/types/Plotter.js b/server/src/schema/types/Plotter.js deleted file mode 100644 index 798d197af..000000000 --- a/server/src/schema/types/Plotter.js +++ /dev/null @@ -1,21 +0,0 @@ -import { - GraphQLObjectType, - GraphQLString, - GraphQLBoolean, -} from 'graphql'; - -const PlotterType = new GraphQLObjectType({ - name: 'Plotter', - description: 'Will soon change in order to use contained plotter objects', - fields: () => ({ - id: { type: GraphQLString }, - ownerId: { type: GraphQLString }, - isTemplate: { type: GraphQLBoolean }, - name: { type: GraphQLString }, - host: { type: GraphQLString }, - repo: { type: GraphQLString }, - moduleName: { type: GraphQLString }, - }), -}); - -export default PlotterType; diff --git a/server/src/schema/types/Prize.js b/server/src/schema/types/Prize.js deleted file mode 100644 index 7a81a702a..000000000 --- a/server/src/schema/types/Prize.js +++ /dev/null @@ -1,24 +0,0 @@ -import { - GraphQLObjectType, - GraphQLList, - GraphQLInt, - GraphQLNonNull, -} from 'graphql'; -import { AdditionalPrizeType } from './index'; - -const PrizeType = new GraphQLObjectType({ - name: 'Prize', - description: 'Prize, by default in algos', - fields: () => ({ - rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: new GraphQLNonNull(GraphQLInt) }, - additional: { - type: new GraphQLList(AdditionalPrizeType), - resolve(parent) { - return parent.additional; - }, - }, - }), -}); - -export default PrizeType; diff --git a/server/src/schema/types/Rule.js b/server/src/schema/types/Rule.js deleted file mode 100644 index 46358242d..000000000 --- a/server/src/schema/types/Rule.js +++ /dev/null @@ -1,17 +0,0 @@ -import { - GraphQLObjectType, - GraphQLInt, - GraphQLString, -} from 'graphql'; - -const RuleType = new GraphQLObjectType({ - name: 'Rule', - description: 'Textual rules of an event', - fields: () => ({ - position: { type: GraphQLInt }, - title: { type: GraphQLString }, - description: { type: GraphQLString }, - }), -}); - -export default RuleType; diff --git a/server/src/schema/types/enum/EventState.js b/server/src/schema/types/enum/EventState.js deleted file mode 100644 index d4ef1304f..000000000 --- a/server/src/schema/types/enum/EventState.js +++ /dev/null @@ -1,19 +0,0 @@ -import { - GraphQLEnumType, -} from 'graphql'; - -import { EventStateEnum } from '../../../enums/EventState'; - -const values = {}; -EventStateEnum.forEach((EventState) => { - values[EventState] = { value: EventState }; -}); - -const EventStateEnumType = new GraphQLEnumType({ - name: 'EventStateEnum', - values, -}); - -export { - EventStateEnumType as default, -}; diff --git a/server/src/schema/types/index.js b/server/src/schema/types/index.js deleted file mode 100644 index a96f2f4db..000000000 --- a/server/src/schema/types/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import PlotterType from './Plotter'; -import RuleType from './Rule'; -import ParticipantType from './Participant'; -import AdditionalPrizeType from './AdditionalPrize'; -import PrizeType from './Prize'; -import FormulaType from './Formula'; -import EventType from './Event'; - -export { - PlotterType, - RuleType, - ParticipantType, - AdditionalPrizeType, - PrizeType, - FormulaType, - EventType, -}; diff --git a/server/src/schema/types/input/AdditionalPrize.js b/server/src/schema/types/input/AdditionalPrize.js deleted file mode 100644 index 0fe28c2f0..000000000 --- a/server/src/schema/types/input/AdditionalPrize.js +++ /dev/null @@ -1,18 +0,0 @@ -import { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLString, - GraphQLInt, -} from 'graphql'; - -const Type = new GraphQLInputObjectType({ - name: 'AdditionalPrizeInput', - description: 'Payload for formula input', - fields: () => ({ - condition: { type: GraphQLString }, - amount: { type: new GraphQLNonNull(GraphQLInt) }, - asset: { type: new GraphQLNonNull(GraphQLString) }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Event.js b/server/src/schema/types/input/Event.js deleted file mode 100644 index eb34c274f..000000000 --- a/server/src/schema/types/input/Event.js +++ /dev/null @@ -1,25 +0,0 @@ -import { - GraphQLString, - GraphQLInt, - GraphQLInputObjectType, - GraphQLList, -} from 'graphql'; -import InputPrizeType from './Prize'; -import InputRuleType from './Rule'; - -const Type = new GraphQLInputObjectType({ - name: 'EventInput', - description: 'Payload for event input', - fields: () => ({ - name: { type: GraphQLString }, - description: { type: GraphQLString }, - startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, - formulaId: { type: GraphQLString }, - plotterId: { type: GraphQLString }, - prizes: { type: new GraphQLList(InputPrizeType) }, - rules: { type: new GraphQLList(InputRuleType) }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Formula.js b/server/src/schema/types/input/Formula.js deleted file mode 100644 index bd9d070f1..000000000 --- a/server/src/schema/types/input/Formula.js +++ /dev/null @@ -1,15 +0,0 @@ -import { - GraphQLNonNull, - GraphQLString, - GraphQLInputObjectType, -} from 'graphql'; - -const Type = new GraphQLInputObjectType({ - name: 'FormulaInput', - description: 'Payload for formula input', - fields: () => ({ - name: { type: new GraphQLNonNull(GraphQLString) }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Participant.js b/server/src/schema/types/input/Participant.js deleted file mode 100644 index c3853df83..000000000 --- a/server/src/schema/types/input/Participant.js +++ /dev/null @@ -1,17 +0,0 @@ -import { - GraphQLInputObjectType, - GraphQLString, - GraphQLNonNull, -} from 'graphql'; - -const Type = new GraphQLInputObjectType({ - name: 'ParticipantInput', - description: 'Payload for formula input', - fields: () => ({ - teamId: { type: new GraphQLNonNull(GraphQLString) }, - botId: { type: GraphQLString }, - releaseId: { type: GraphQLString }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Plotter.js b/server/src/schema/types/input/Plotter.js deleted file mode 100644 index 1368aecf9..000000000 --- a/server/src/schema/types/input/Plotter.js +++ /dev/null @@ -1,18 +0,0 @@ -import { - GraphQLNonNull, - GraphQLString, - GraphQLInputObjectType, -} from 'graphql'; - -const Type = new GraphQLInputObjectType({ - name: 'PlotterInput', - description: 'Payload for plotter input', - fields: () => ({ - name: { type: new GraphQLNonNull(GraphQLString) }, - host: { type: GraphQLString }, - repo: { type: GraphQLString }, - moduleName: { type: GraphQLString }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Prize.js b/server/src/schema/types/input/Prize.js deleted file mode 100644 index 5be06f0f2..000000000 --- a/server/src/schema/types/input/Prize.js +++ /dev/null @@ -1,21 +0,0 @@ -import { - GraphQLInputObjectType, - GraphQLList, - GraphQLInt, - GraphQLNonNull, -} from 'graphql'; -import InputAdditionalPrizeType from './AdditionalPrize'; - -const Type = new GraphQLInputObjectType({ - name: 'PrizeInput', - description: 'Payload for formula input', - fields: () => ({ - rank: { type: new GraphQLNonNull(GraphQLInt) }, - amount: { type: new GraphQLNonNull(GraphQLInt) }, - additional: { - type: new GraphQLList(InputAdditionalPrizeType), - }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/Rule.js b/server/src/schema/types/input/Rule.js deleted file mode 100644 index 220b99412..000000000 --- a/server/src/schema/types/input/Rule.js +++ /dev/null @@ -1,18 +0,0 @@ -import { - GraphQLNonNull, - GraphQLString, - GraphQLInt, - GraphQLInputObjectType, -} from 'graphql'; - -const Type = new GraphQLInputObjectType({ - name: 'RuleInput', - description: 'Payload for rule input', - fields: () => ({ - position: { type: GraphQLInt }, - title: { type: new GraphQLNonNull(GraphQLString) }, - description: { type: GraphQLString }, - }), -}); - -export default Type; diff --git a/server/src/schema/types/input/index.js b/server/src/schema/types/input/index.js deleted file mode 100644 index 5bab6702a..000000000 --- a/server/src/schema/types/input/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import PlotterInputType from './Plotter'; -import RuleInputType from './Rule'; -import PrizeInputType from './Prize'; -import FormulaInputType from './Formula'; -import EventInputType from './Event'; -import AdditionalPrizeInputType from './AdditionalPrize'; -import ParticipantInputType from './Participant'; - -export { - PlotterInputType, - RuleInputType, - PrizeInputType, - FormulaInputType, - EventInputType, - AdditionalPrizeInputType, - ParticipantInputType, -}; diff --git a/server/src/utils/functions.js b/server/src/utils/functions.js deleted file mode 100644 index c37b1d87e..000000000 --- a/server/src/utils/functions.js +++ /dev/null @@ -1,19 +0,0 @@ -export const capitalize = string => (string).charAt(0).toUpperCase() + (string).slice(1); - -export const slugify = text => text.toString().toLowerCase() - .replace(/\s+/g, '-') - .replace(/[^\w-]+/g, '') - .replace(/--+/g, '-') - .replace(/^-+/, '') - .replace(/-+$/, ''); - -export const epoch = () => Math.round(new Date().getTime() / 1000); - -export const isBetween = (value, valA, valB) => { - const min = valA < valB ? valA : valB; - const max = valA > valB ? valA : valB; - if (value >= min && value <= max) { - return true; - } - return false; -}; diff --git a/client/src/Components/BannerTopBar/index.js b/src/Components/BannerTopBar/index.js similarity index 100% rename from client/src/Components/BannerTopBar/index.js rename to src/Components/BannerTopBar/index.js diff --git a/client/src/Components/Event/Create/Tabs/Basic.js b/src/Components/Event/Create/Tabs/Basic.js similarity index 91% rename from client/src/Components/Event/Create/Tabs/Basic.js rename to src/Components/Event/Create/Tabs/Basic.js index b5e6e4353..d3d34e69a 100644 --- a/client/src/Components/Event/Create/Tabs/Basic.js +++ b/src/Components/Event/Create/Tabs/Basic.js @@ -35,10 +35,16 @@ class Basic extends React.Component { /> edit('name', newVal.target.value)} + onChange={newVal => edit('title', newVal.target.value)} + /> + edit('subtitle', newVal.target.value)} /> this.props.closeDialogs()} + onClose={() => closeDialogs()} aria-labelledby='createFormula-dialog-title' > @@ -42,39 +43,36 @@ class NewFormula extends React.Component { query: getOptionsCalls.EVENTS_FORMULAS, data: { events_Formulas: formulas.concat([data.events_CreateFormula]) }, }); - this.props.closeDialogs(); + closeDialogs(); } } > {createFormula => ( -
-
{ - e.preventDefault(); - createFormula({ - variables: { - formula: { name }, - }, - }); - }} - > - this.setState({ name: e.target.value })} - fullWidth - /> - - -
+
{ + e.preventDefault(); + createFormula({ + variables: { + formula: { name }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + + )}
- - + ); } } -export default NewFormula; +export default New; diff --git a/src/Components/Event/Create/Tabs/Technical/Formula/index.js b/src/Components/Event/Create/Tabs/Technical/Formula/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Formula/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Create/Tabs/Technical/Plotter/New.js b/src/Components/Event/Create/Tabs/Technical/Plotter/New.js new file mode 100644 index 000000000..5dc2b3b06 --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Plotter/New.js @@ -0,0 +1,108 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../../GraphQL/Calls/index'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + name: '', + host: '', + repo: '', + moduleName: '', + }; + } + + render() { + const { + name, host, repo, moduleName, + } = this.state; + const { closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='createPlotter-dialog-title' + > + + Create a new plotter + + + + At least for now, all the plotters are publically available, creating it here will let you select it in the select element. + + + { + const { events_Plotters: plotters } = store.readQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + data: { events_Plotters: plotters.concat([data.events_CreatePlotter]) }, + }); + closeDialogs(); + } + } + > + {createPlotter => ( +
{ + e.preventDefault(); + createPlotter({ + variables: { + plotter: { + name, + host, + repo, + moduleName, + }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + this.setState({ host: e.target.value })} + fullWidth + /> + this.setState({ repo: e.target.value })} + fullWidth + /> + this.setState({ moduleName: e.target.value })} + fullWidth + /> + + + )} +
+ +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Create/Tabs/Technical/Plotter/index.js b/src/Components/Event/Create/Tabs/Technical/Plotter/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Plotter/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Create/Tabs/Technical/Prizes/List.js b/src/Components/Event/Create/Tabs/Technical/Prizes/List.js new file mode 100644 index 000000000..4a08a93df --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Prizes/List.js @@ -0,0 +1,80 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deletePrize }) => ( +
+ + + + + + + + {value.fromRank}{value.toRank}{value.additional}{value.amount}{value.asset} + + + + + + deletePrize(value.position)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deletePrize }) => ( +
+ {items.map((value, index) => ( + deletePrize(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + let newPrizes = this.props.prizes.slice(0); + newPrizes.splice(newIndex, 0, newPrizes.splice(oldIndex, 1)[0]); + newPrizes = newPrizes.map((prize, index) => { + prize.position = index; + return prize; + }); + this.props.edit(newPrizes); + } + + deletePrize = (deletedIndex) => { + let newPrizes = this.props.prizes.slice(0); + newPrizes.splice(deletedIndex, 1); + newPrizes = newPrizes.map((prize, index) => { + prize.position = index; + return prize; + }); + this.props.edit(newPrizes); + } + + render() { + return ( + + this.deletePrize(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Create/Tabs/Technical/Prizes/New.js b/src/Components/Event/Create/Tabs/Technical/Prizes/New.js new file mode 100644 index 000000000..882c8b340 --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Prizes/New.js @@ -0,0 +1,106 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + additional: '', + amount: 0, + asset: '', + }; + } + + render() { + const { + fromRank, toRank, additional, amount, asset, + } = this.state; + const { addPrize, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addPrize-dialog-title' + > + + + Prizes are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addPrize({ + fromRank, + toRank, + additional, + amount, + asset, + }); + }} + > + + Conditions : + + + Examples : + If you want to make a price for the best bot only, you set both from and to rank to 1. + If you want the rest of the top 10 to get a price, you add a new price with from rank set to 2 and to rank set to 10. + Caution : + - Leaving "from rank" empty considers it to 0. + - Leaving "to rank" empty considers it as infinite + - Prizes are define in an additive manner, meaning that if a team qualifies for two prices, it gets both. + - Additional allows you to write addionnal textual condition, like "positive ROI only" for example. + + + this.setState({ fromRank: e.target.value })} + type="number" + /> + this.setState({ toRank: e.target.value })} + type="number" + /> + this.setState({ additional: e.target.value })} + fullWidth + /> + + Pool : + + + Here you define the pool, the amount is a number whereas asset is a text. For example 1BTC, 200$, or whatever. + + this.setState({ amount: e.target.value })} + type="number" + /> + this.setState({ asset: e.target.value })} + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Create/Tabs/Technical/Prizes/index.js b/src/Components/Event/Create/Tabs/Technical/Prizes/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Prizes/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/src/Components/Event/Create/Tabs/Technical/Rules/List.js b/src/Components/Event/Create/Tabs/Technical/Rules/List.js new file mode 100644 index 000000000..c9570ae4c --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Rules/List.js @@ -0,0 +1,81 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deleteRule }) => ( +
+ + + + + + + + {value.title} + + + {value.description} + + + + deleteRule(value.position)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deleteRule }) => ( +
+ {items.map((value, index) => ( + deleteRule(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + let newRules = this.props.rules.slice(0); + newRules.splice(newIndex, 0, newRules.splice(oldIndex, 1)[0]); + newRules = newRules.map((rule, index) => { + rule.position = index; + return rule; + }); + this.props.edit(newRules); + } + + deleteRule = (deletedIndex) => { + let newRules = this.props.rules.slice(0); + newRules.splice(deletedIndex, 1); + newRules = newRules.map((rule, index) => { + rule.position = index; + return rule; + }); + this.props.edit(newRules); + } + + render() { + return ( + + this.deleteRule(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Create/Tabs/Technical/Rules/New.js b/src/Components/Event/Create/Tabs/Technical/Rules/New.js new file mode 100644 index 000000000..e133c1508 --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Rules/New.js @@ -0,0 +1,68 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + title: '', + description: '', + }; + } + + render() { + const { + title, description, + } = this.state; + const { addRule, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addRule-dialog-title' + > + + Create a new rule + + + + Rules are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addRule( + title, + description, + ); + }} + > + this.setState({ title: e.target.value })} + fullWidth + /> + this.setState({ description: e.target.value })} + fullWidth + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Create/Tabs/Technical/Rules/index.js b/src/Components/Event/Create/Tabs/Technical/Rules/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Create/Tabs/Technical/Rules/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/client/src/Components/Event/Create/Tabs/Technical/index.js b/src/Components/Event/Create/Tabs/Technical/index.js similarity index 69% rename from client/src/Components/Event/Create/Tabs/Technical/index.js rename to src/Components/Event/Create/Tabs/Technical/index.js index 438ad27f9..1db2027c2 100644 --- a/client/src/Components/Event/Create/Tabs/Technical/index.js +++ b/src/Components/Event/Create/Tabs/Technical/index.js @@ -17,8 +17,11 @@ import styles from '../../styles'; import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; -import NewPlotter from './NewPlotter'; -import NewFormula from './NewFormula'; +import { List as RulesList, New as NewRule } from './Rules'; +import { List as PrizesList, New as NewPrize } from './Prizes'; + +import { New as NewPlotter } from './Plotter'; +import { New as NewFormula } from './Formula'; class Technical extends React.Component { constructor(props) { @@ -26,16 +29,39 @@ class Technical extends React.Component { this.state = { isNewFormulaOpen: false, isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, }; } + addRule = (title, description) => { + this.props.edit('rules', [...this.props.event.rules, { + title, + description, + position: this.props.event.rules.length, + }]); + this.closeDialogs(); + } + + addPrize = (prize) => { + this.props.edit('prizes', [...this.props.event.prizes, prize]); + this.closeDialogs(); + } + closeDialogs = () => { - this.setState({ isNewFormulaOpen: false, isNewPlotterOpen: false }); + this.setState({ + isNewFormulaOpen: false, + isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, + }); } render() { const { classes, event, edit } = this.props; - const { isNewPlotterOpen, isNewFormulaOpen } = this.state; + const { + isNewPlotterOpen, isNewFormulaOpen, isNewRuleOpen, isNewPrizeOpen, + } = this.state; return ( @@ -127,6 +153,33 @@ class Technical extends React.Component { To create a new plotter, click here + + + + Define the rules of your event. + + edit('rules', newVal)} /> + { isNewRuleOpen + ? this.closeDialogs()} addRule={(title, description) => this.addRule(title, description)} /> + : ''} + { this.setState({ isNewRuleOpen: true }); }} > + To add a new rule, click here + + + + + + Define the prizes of your event. + + edit('prizes', newVal)} /> + { isNewPrizeOpen + ? this.closeDialogs()} addPrize={prize => this.addPrize(prize)} /> + : ''} + { this.setState({ isNewPrizeOpen: true }); }} > + To add a new prize, click here + + +
)} diff --git a/client/src/Components/Event/Create/styles.js b/src/Components/Event/Create/styles.js similarity index 79% rename from client/src/Components/Event/Create/styles.js rename to src/Components/Event/Create/styles.js index 9d5460326..50a3490ca 100644 --- a/client/src/Components/Event/Create/styles.js +++ b/src/Components/Event/Create/styles.js @@ -13,14 +13,6 @@ const styles = theme => ({ clickable: { cursor: 'pointer', }, - card: { - flexGrow: 1, - padding: 20, - marginTop: 20, - marginBottom: 20, - marginLeft: 400, - marginRight: 400, - }, buttonList: { margin: theme.spacing.unit, float: 'right', @@ -32,11 +24,10 @@ const styles = theme => ({ marginTop: 20, }, paperRoot: { - width: '50%', flexGrow: 1, padding: 10, - marginLeft: '25%', - marginTop: '2%', + marginTop: 25, + marginBottom: 25, }, inputField: { width: '80%', diff --git a/src/Components/Event/Edit/Tabs/Basic.js b/src/Components/Event/Edit/Tabs/Basic.js new file mode 100644 index 000000000..d3d34e69a --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Basic.js @@ -0,0 +1,115 @@ +import React from 'react'; +import { + TextField, + Button, + FormGroup, + Typography, + Grid, +} from '@material-ui/core'; +import { + ChevronLeft, + ChevronRight, +} from '@material-ui/icons'; +import { DateTimePicker } from 'material-ui-pickers'; + + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class Basic extends React.Component { + render() { + const { classes, event, edit } = this.props; + return ( + + + These are the basic information you need to input in order to create an event. + There might be some heavy changes in the near future as the application is still at a very early stage. + + + + + edit('title', newVal.target.value)} + /> + edit('subtitle', newVal.target.value)} + /> + edit('description', newVal.target.value)} + /> + + + The dates are purely indicative, as it is important for you to make sure everything is + ready before manually triggering the beginning and end of the event. + If you are confident use the scheduler to start it for you(incoming). + + + + + + } + rightArrowIcon={} + value={event.startDatetime} + helperText='Competition start date' + onChange={newVal => edit('startDatetime', newVal)} + /> + + + } + rightArrowIcon={} + value={event.finishDatetime} + helperText='Competition finishing date' + onChange={newVal => edit('finishDatetime', newVal)} + /> + + + + + + + + + + + ); + } +} + +export default withStyles(styles)(Basic); diff --git a/src/Components/Event/Edit/Tabs/PresentationPage.js b/src/Components/Event/Edit/Tabs/PresentationPage.js new file mode 100644 index 000000000..1c674ddcc --- /dev/null +++ b/src/Components/Event/Edit/Tabs/PresentationPage.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class PresentationPage extends React.Component { + render() { + const { classes } = this.props; + return ( + + + PresentationPage + + + ); + } +} + +export default withStyles(styles)(PresentationPage); diff --git a/src/Components/Event/Edit/Tabs/TeamsServer.js b/src/Components/Event/Edit/Tabs/TeamsServer.js new file mode 100644 index 000000000..874c72d6f --- /dev/null +++ b/src/Components/Event/Edit/Tabs/TeamsServer.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class TeamsServer extends React.Component { + render() { + const { classes } = this.props; + return ( + + + TeamsServer + + + ); + } +} + +export default withStyles(styles)(TeamsServer); diff --git a/src/Components/Event/Edit/Tabs/Technical/Formula/New.js b/src/Components/Event/Edit/Tabs/Technical/Formula/New.js new file mode 100644 index 000000000..605782b2d --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Formula/New.js @@ -0,0 +1,78 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../../GraphQL/Calls/index'; + +class New extends React.Component { + constructor() { + super(); + this.state = { name: '' }; + } + + render() { + const { name } = this.state; + const { closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='createFormula-dialog-title' + > + + Create a new formula + + + + At least for now, all the formulas are publically available, creating it here will let you select it in the select element. + + + { + const { events_Formulas: formulas } = store.readQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + data: { events_Formulas: formulas.concat([data.events_CreateFormula]) }, + }); + closeDialogs(); + } + } + > + {createFormula => ( +
{ + e.preventDefault(); + createFormula({ + variables: { + formula: { name }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + + + )} +
+ +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Edit/Tabs/Technical/Formula/index.js b/src/Components/Event/Edit/Tabs/Technical/Formula/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Formula/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Edit/Tabs/Technical/Plotter/New.js b/src/Components/Event/Edit/Tabs/Technical/Plotter/New.js new file mode 100644 index 000000000..5dc2b3b06 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Plotter/New.js @@ -0,0 +1,108 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../../GraphQL/Calls/index'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + name: '', + host: '', + repo: '', + moduleName: '', + }; + } + + render() { + const { + name, host, repo, moduleName, + } = this.state; + const { closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='createPlotter-dialog-title' + > + + Create a new plotter + + + + At least for now, all the plotters are publically available, creating it here will let you select it in the select element. + + + { + const { events_Plotters: plotters } = store.readQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + data: { events_Plotters: plotters.concat([data.events_CreatePlotter]) }, + }); + closeDialogs(); + } + } + > + {createPlotter => ( +
{ + e.preventDefault(); + createPlotter({ + variables: { + plotter: { + name, + host, + repo, + moduleName, + }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + this.setState({ host: e.target.value })} + fullWidth + /> + this.setState({ repo: e.target.value })} + fullWidth + /> + this.setState({ moduleName: e.target.value })} + fullWidth + /> + + + )} +
+ +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Edit/Tabs/Technical/Plotter/index.js b/src/Components/Event/Edit/Tabs/Technical/Plotter/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Plotter/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js b/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js new file mode 100644 index 000000000..4a08a93df --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js @@ -0,0 +1,80 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deletePrize }) => ( +
+ + + + + + + + {value.fromRank}{value.toRank}{value.additional}{value.amount}{value.asset} + + + + + + deletePrize(value.position)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deletePrize }) => ( +
+ {items.map((value, index) => ( + deletePrize(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + let newPrizes = this.props.prizes.slice(0); + newPrizes.splice(newIndex, 0, newPrizes.splice(oldIndex, 1)[0]); + newPrizes = newPrizes.map((prize, index) => { + prize.position = index; + return prize; + }); + this.props.edit(newPrizes); + } + + deletePrize = (deletedIndex) => { + let newPrizes = this.props.prizes.slice(0); + newPrizes.splice(deletedIndex, 1); + newPrizes = newPrizes.map((prize, index) => { + prize.position = index; + return prize; + }); + this.props.edit(newPrizes); + } + + render() { + return ( + + this.deletePrize(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Edit/Tabs/Technical/Prizes/New.js b/src/Components/Event/Edit/Tabs/Technical/Prizes/New.js new file mode 100644 index 000000000..882c8b340 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Prizes/New.js @@ -0,0 +1,106 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + additional: '', + amount: 0, + asset: '', + }; + } + + render() { + const { + fromRank, toRank, additional, amount, asset, + } = this.state; + const { addPrize, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addPrize-dialog-title' + > + + + Prizes are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addPrize({ + fromRank, + toRank, + additional, + amount, + asset, + }); + }} + > + + Conditions : + + + Examples : + If you want to make a price for the best bot only, you set both from and to rank to 1. + If you want the rest of the top 10 to get a price, you add a new price with from rank set to 2 and to rank set to 10. + Caution : + - Leaving "from rank" empty considers it to 0. + - Leaving "to rank" empty considers it as infinite + - Prizes are define in an additive manner, meaning that if a team qualifies for two prices, it gets both. + - Additional allows you to write addionnal textual condition, like "positive ROI only" for example. + + + this.setState({ fromRank: e.target.value })} + type="number" + /> + this.setState({ toRank: e.target.value })} + type="number" + /> + this.setState({ additional: e.target.value })} + fullWidth + /> + + Pool : + + + Here you define the pool, the amount is a number whereas asset is a text. For example 1BTC, 200$, or whatever. + + this.setState({ amount: e.target.value })} + type="number" + /> + this.setState({ asset: e.target.value })} + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Edit/Tabs/Technical/Prizes/index.js b/src/Components/Event/Edit/Tabs/Technical/Prizes/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Prizes/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/src/Components/Event/Edit/Tabs/Technical/Rules/List.js b/src/Components/Event/Edit/Tabs/Technical/Rules/List.js new file mode 100644 index 000000000..c9570ae4c --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Rules/List.js @@ -0,0 +1,81 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deleteRule }) => ( +
+ + + + + + + + {value.title} + + + {value.description} + + + + deleteRule(value.position)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deleteRule }) => ( +
+ {items.map((value, index) => ( + deleteRule(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + let newRules = this.props.rules.slice(0); + newRules.splice(newIndex, 0, newRules.splice(oldIndex, 1)[0]); + newRules = newRules.map((rule, index) => { + rule.position = index; + return rule; + }); + this.props.edit(newRules); + } + + deleteRule = (deletedIndex) => { + let newRules = this.props.rules.slice(0); + newRules.splice(deletedIndex, 1); + newRules = newRules.map((rule, index) => { + rule.position = index; + return rule; + }); + this.props.edit(newRules); + } + + render() { + return ( + + this.deleteRule(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Edit/Tabs/Technical/Rules/New.js b/src/Components/Event/Edit/Tabs/Technical/Rules/New.js new file mode 100644 index 000000000..e133c1508 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Rules/New.js @@ -0,0 +1,68 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + title: '', + description: '', + }; + } + + render() { + const { + title, description, + } = this.state; + const { addRule, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addRule-dialog-title' + > + + Create a new rule + + + + Rules are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addRule( + title, + description, + ); + }} + > + this.setState({ title: e.target.value })} + fullWidth + /> + this.setState({ description: e.target.value })} + fullWidth + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Edit/Tabs/Technical/Rules/index.js b/src/Components/Event/Edit/Tabs/Technical/Rules/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/Rules/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/src/Components/Event/Edit/Tabs/Technical/index.js b/src/Components/Event/Edit/Tabs/Technical/index.js new file mode 100644 index 000000000..1db2027c2 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/Technical/index.js @@ -0,0 +1,195 @@ +import React from 'react'; +import { Query } from 'react-apollo'; + +import { + Typography, + FormControl, + InputLabel, + Input, + Select, + FormHelperText, + MenuItem, + Grid, + Button, +} from '@material-ui/core'; +import { withStyles } from '@material-ui/core/styles'; +import styles from '../../styles'; + +import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; + +import { List as RulesList, New as NewRule } from './Rules'; +import { List as PrizesList, New as NewPrize } from './Prizes'; + +import { New as NewPlotter } from './Plotter'; +import { New as NewFormula } from './Formula'; + +class Technical extends React.Component { + constructor(props) { + super(props); + this.state = { + isNewFormulaOpen: false, + isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, + }; + } + + addRule = (title, description) => { + this.props.edit('rules', [...this.props.event.rules, { + title, + description, + position: this.props.event.rules.length, + }]); + this.closeDialogs(); + } + + addPrize = (prize) => { + this.props.edit('prizes', [...this.props.event.prizes, prize]); + this.closeDialogs(); + } + + closeDialogs = () => { + this.setState({ + isNewFormulaOpen: false, + isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, + }); + } + + render() { + const { classes, event, edit } = this.props; + const { + isNewPlotterOpen, isNewFormulaOpen, isNewRuleOpen, isNewPrizeOpen, + } = this.state; + return ( + + + Select the formula and the plotter you want to use, you can also create your own with the corresponding button. + + + + Select the formula + + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Formulas.map((formula, index) => ( + {formula.name} + )); + return ( + + + { isNewFormulaOpen ? this.closeDialogs()} /> : ''} + + ); + }} + + { this.setState({ isNewFormulaOpen: true }); }}> + To create a new formula, click here + + + + + Select the Plotter + + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Plotters.map((plotter, index) => ( + {plotter.name} + )); + return ( + + + { isNewPlotterOpen ? this.closeDialogs()} /> : ''} + + ); + }} + + { this.setState({ isNewPlotterOpen: true }); }} > + To create a new plotter, click here + + + + + + Define the rules of your event. + + edit('rules', newVal)} /> + { isNewRuleOpen + ? this.closeDialogs()} addRule={(title, description) => this.addRule(title, description)} /> + : ''} + { this.setState({ isNewRuleOpen: true }); }} > + To add a new rule, click here + + + + + + Define the prizes of your event. + + edit('prizes', newVal)} /> + { isNewPrizeOpen + ? this.closeDialogs()} addPrize={prize => this.addPrize(prize)} /> + : ''} + { this.setState({ isNewPrizeOpen: true }); }} > + To add a new prize, click here + + + + + + + + + + ); + } +} + +export default withStyles(styles)(Technical); diff --git a/src/Components/Event/Edit/Tabs/index.js b/src/Components/Event/Edit/Tabs/index.js new file mode 100644 index 000000000..feecaaf55 --- /dev/null +++ b/src/Components/Event/Edit/Tabs/index.js @@ -0,0 +1,11 @@ +import Basic from './Basic'; +import PresentationPage from './PresentationPage'; +import TeamsServer from './TeamsServer'; +import Technical from './Technical'; + +export { + Basic, + PresentationPage, + TeamsServer, + Technical, +}; diff --git a/client/src/Components/Event/Edit/index.js b/src/Components/Event/Edit/index.js similarity index 59% rename from client/src/Components/Event/Edit/index.js rename to src/Components/Event/Edit/index.js index c1a8cb646..1db70051c 100644 --- a/client/src/Components/Event/Edit/index.js +++ b/src/Components/Event/Edit/index.js @@ -1,10 +1,9 @@ import React from 'react'; import { Query } from 'react-apollo'; -import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; - import styles from './styles'; +import Queried from './queried'; import BannerTopBar from '../../BannerTopBar'; @@ -14,15 +13,8 @@ class Edit extends React.Component { render() { return ( - - - Enroll in an competition {this.props.match.params.slug} - + + { if (loading) return 'Loading...'; if (error) return `Error! ${error.message}`; - return ( -

- {data.events_Event.description} -

- ); + return (); }}
diff --git a/src/Components/Event/Edit/queried.js b/src/Components/Event/Edit/queried.js new file mode 100644 index 000000000..ed3cde6d6 --- /dev/null +++ b/src/Components/Event/Edit/queried.js @@ -0,0 +1,179 @@ +import React from 'react'; +import { Mutation } from 'react-apollo'; + +import { + Paper, + Typography, + AppBar, + Tabs, + Tab, +} from '@material-ui/core'; +import { + Face as BasicIcon, + Alarm as TechnicalIcon, + Group as TeamAndServerIcon, + PresentToAll as PresentationIcon, +} from '@material-ui/icons'; +import { withStyles } from '@material-ui/core/styles'; +import styles from './styles'; + +import { + Basic, + PresentationPage, + TeamsServer, + Technical, +} from './Tabs'; + +import { hostedEventsCalls } from '../../../GraphQL/Calls/index'; + +function TabContainer(props) { + return ( + + {props.children} + + ); +} + +class Queried extends React.Component { + constructor(props) { + super(props); + this.state = { + value: 0, + title: this.props.event.title, + subtitle: this.props.event.subtitle, + description: this.props.event.description, + startDatetime: this.props.event.startDatetime * 1000, + finishDatetime: this.props.event.finishDatetime * 1000, + formulaId: this.props.event.formula.id, + plotterId: this.props.event.plotter.id, + prizes: this.props.event.prizes, + rules: this.props.event.rules, + }; + } + + handleTabChange = (event, value) => { + this.setState({ value }); + } + + handleEventChange = (newType, newVal) => { + this.setState({ [newType]: newVal }); + } + + + render() { + const { + title, + subtitle, + description, + startDatetime, + finishDatetime, + value, + formulaId, + plotterId, + prizes, + rules, + } = this.state; + const { classes } = this.props; + return ( + + { + this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); + } + } + > + {hostEvent => ( +
+ + + } + /> + } + /> + } + disabled + /> + } + disabled + /> + + +
+ + + Create a new event + +
{ + e.preventDefault(); + hostEvent({ + variables: { + event: { + title, + subtitle, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: finishDatetime.valueOf() / 1000, + formulaId, + plotterId, + }, + }, + }); + }} + > + {value === 0 && + this.handleEventChange(newType, newVal)} + /> + } + {value === 1 && + this.handleEventChange(newType, newVal)} + /> + } + {value === 2 && } + {value === 3 && } +
+
+
+
+ )} +
+
+ ); + } +} + +export default withStyles(styles)(Queried); diff --git a/src/Components/Event/Edit/styles.js b/src/Components/Event/Edit/styles.js new file mode 100644 index 000000000..50a3490ca --- /dev/null +++ b/src/Components/Event/Edit/styles.js @@ -0,0 +1,51 @@ +const styles = theme => ({ + root: { + flexGrow: 1, + width: '100%', + backgroundColor: theme.palette.background.paper, + padding: 0, + margin: 0, + }, + tabTitle: { + width: '25%', + maxWidth: 'none', + }, + clickable: { + cursor: 'pointer', + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right', + }, + buttonGrid: { + marginTop: -20, + }, + title: { + marginTop: 20, + }, + paperRoot: { + flexGrow: 1, + padding: 10, + marginTop: 25, + marginBottom: 25, + }, + inputField: { + width: '80%', + marginLeft: '10%', + marginTop: 25, + }, + typography: { + width: '80%', + marginLeft: '10%', + marginTop: 40, + }, + selectEmpty: { + marginTop: theme.spacing.unit * 2, + }, + bottomButton: { + padding: 15, + margin: 20, + }, +}); + +export default styles; diff --git a/client/src/Components/Event/Show/index.js b/src/Components/Event/Show/index.js similarity index 100% rename from client/src/Components/Event/Show/index.js rename to src/Components/Event/Show/index.js diff --git a/client/src/Components/Event/Edit/styles.js b/src/Components/Event/Show/styles.js similarity index 100% rename from client/src/Components/Event/Edit/styles.js rename to src/Components/Event/Show/styles.js diff --git a/client/src/Components/Events/index.js b/src/Components/Events/index.js similarity index 71% rename from client/src/Components/Events/index.js rename to src/Components/Events/index.js index 71623c568..8b6283b65 100644 --- a/client/src/Components/Events/index.js +++ b/src/Components/Events/index.js @@ -6,7 +6,7 @@ const Index = () => ( size='big' title='Your events' text='Here will be the list of YOUR events' - backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/events.jpg' + backgroundUrl='https://superalgos.org/img/photos/events.jpg' /> ); diff --git a/client/src/Components/HostedEvents/Event.js b/src/Components/HostedEvents/Event.js similarity index 92% rename from client/src/Components/HostedEvents/Event.js rename to src/Components/HostedEvents/Event.js index bab987a59..0379834f6 100644 --- a/client/src/Components/HostedEvents/Event.js +++ b/src/Components/HostedEvents/Event.js @@ -26,7 +26,7 @@ class Event extends React.Component { - {name} + {name} From : {toLocalTime(startDatetime)} To : {toLocalTime(finishDatetime)} @@ -40,7 +40,7 @@ class Event extends React.Component { - Description : + Description : {description} diff --git a/client/src/Components/HostedEvents/index.js b/src/Components/HostedEvents/index.js similarity index 85% rename from client/src/Components/HostedEvents/index.js rename to src/Components/HostedEvents/index.js index 0a1305b0f..d5fc17506 100644 --- a/client/src/Components/HostedEvents/index.js +++ b/src/Components/HostedEvents/index.js @@ -13,7 +13,7 @@ const HostedEvent = () => ( size='medium' title='Your hosted events' text='You are one of the pillars of this community, thank you' - backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/events.jpg' + backgroundUrl='https://superalgos.org/img/photos/events.jpg' /> ( )); return ( - +
{ list } - +
); }}
diff --git a/client/src/Components/HostedEvents/styles.js b/src/Components/HostedEvents/styles.js similarity index 85% rename from client/src/Components/HostedEvents/styles.js rename to src/Components/HostedEvents/styles.js index 866f1e2fc..62239d966 100644 --- a/client/src/Components/HostedEvents/styles.js +++ b/src/Components/HostedEvents/styles.js @@ -4,8 +4,6 @@ const styles = theme => ({ padding: 20, marginTop: 20, marginBottom: 20, - marginLeft: 400, - marginRight: 400, }, buttonList: { margin: theme.spacing.unit, diff --git a/client/src/Components/Search/Event.js b/src/Components/Search/Event.js similarity index 91% rename from client/src/Components/Search/Event.js rename to src/Components/Search/Event.js index 1736098ee..cf9c08d8a 100644 --- a/client/src/Components/Search/Event.js +++ b/src/Components/Search/Event.js @@ -26,7 +26,7 @@ class Event extends React.Component { - {name} + {name} From : {toLocalTime(startDatetime)} To : {toLocalTime(finishDatetime)} @@ -40,7 +40,7 @@ class Event extends React.Component { - Description : + Description : {description} diff --git a/client/src/Components/Search/Tabs/Future.js b/src/Components/Search/Tabs/Future.js similarity index 94% rename from client/src/Components/Search/Tabs/Future.js rename to src/Components/Search/Tabs/Future.js index d5dbfc089..21ba1383e 100644 --- a/client/src/Components/Search/Tabs/Future.js +++ b/src/Components/Search/Tabs/Future.js @@ -15,7 +15,7 @@ class Future extends React.Component { )); return ( - +
{futureEvents} - +
); } } diff --git a/client/src/Components/Search/Tabs/History.js b/src/Components/Search/Tabs/History.js similarity index 52% rename from client/src/Components/Search/Tabs/History.js rename to src/Components/Search/Tabs/History.js index 21d848289..bc3577f8e 100644 --- a/client/src/Components/Search/Tabs/History.js +++ b/src/Components/Search/Tabs/History.js @@ -8,15 +8,17 @@ class History extends React.Component { render() { const { classes } = this.props; return ( - - Your old events (maybe here, maybe not, who knows) - +
+ + Your old events (maybe here, maybe not, who knows) + +
); } } diff --git a/client/src/Components/Search/Tabs/Incoming.js b/src/Components/Search/Tabs/Incoming.js similarity index 96% rename from client/src/Components/Search/Tabs/Incoming.js rename to src/Components/Search/Tabs/Incoming.js index ab6b070dc..6d92f4dd8 100644 --- a/client/src/Components/Search/Tabs/Incoming.js +++ b/src/Components/Search/Tabs/Incoming.js @@ -18,7 +18,7 @@ class Incoming extends React.Component { )); return ( - +
{incomingEvents} - +
); } } diff --git a/client/src/Components/Search/Tabs/Past.js b/src/Components/Search/Tabs/Past.js similarity index 94% rename from client/src/Components/Search/Tabs/Past.js rename to src/Components/Search/Tabs/Past.js index b01cb0684..c4939b19b 100644 --- a/client/src/Components/Search/Tabs/Past.js +++ b/src/Components/Search/Tabs/Past.js @@ -15,7 +15,7 @@ class Past extends React.Component { )); return ( - +
{pastEvents} - +
); } } diff --git a/client/src/Components/Search/Tabs/index.js b/src/Components/Search/Tabs/index.js similarity index 100% rename from client/src/Components/Search/Tabs/index.js rename to src/Components/Search/Tabs/index.js diff --git a/client/src/Components/Search/index.js b/src/Components/Search/index.js similarity index 97% rename from client/src/Components/Search/index.js rename to src/Components/Search/index.js index 4c07b3071..304b5224d 100644 --- a/client/src/Components/Search/index.js +++ b/src/Components/Search/index.js @@ -57,7 +57,7 @@ class Search extends React.Component { size='medium' title='Events' text='All the events are going to be listed here' - backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/events.jpg' + backgroundUrl='https://superalgos.org/img/photos/events.jpg' /> ({ padding: 20, marginTop: 20, marginBottom: 20, - marginLeft: 400, - marginRight: 400, }, buttonList: { margin: theme.spacing.unit, diff --git a/client/src/GraphQL/Calls/getOptions.js b/src/GraphQL/Calls/getOptions.js similarity index 100% rename from client/src/GraphQL/Calls/getOptions.js rename to src/GraphQL/Calls/getOptions.js diff --git a/client/src/GraphQL/Calls/hostedEvents.js b/src/GraphQL/Calls/hostedEvents.js similarity index 100% rename from client/src/GraphQL/Calls/hostedEvents.js rename to src/GraphQL/Calls/hostedEvents.js diff --git a/client/src/GraphQL/Calls/index.js b/src/GraphQL/Calls/index.js similarity index 100% rename from client/src/GraphQL/Calls/index.js rename to src/GraphQL/Calls/index.js diff --git a/client/src/GraphQL/Calls/listEvents.js b/src/GraphQL/Calls/listEvents.js similarity index 100% rename from client/src/GraphQL/Calls/listEvents.js rename to src/GraphQL/Calls/listEvents.js diff --git a/client/src/GraphQL/Calls/showEvent.js b/src/GraphQL/Calls/showEvent.js similarity index 100% rename from client/src/GraphQL/Calls/showEvent.js rename to src/GraphQL/Calls/showEvent.js diff --git a/src/GraphQL/Fragments/event.js b/src/GraphQL/Fragments/event.js new file mode 100644 index 000000000..499266c68 --- /dev/null +++ b/src/GraphQL/Fragments/event.js @@ -0,0 +1,125 @@ +import gql from 'graphql-tag'; + +export const eventMinimalInfo = gql` + fragment EventMinimalInfo on events_Event { + id + state + title + startDatetime + finishDatetime + host { + alias + firstName + lastName + } + description + formula{ + name + } + plotter{ + name + } + } +`; + +export const eventFullInfo = gql` + fragment EventFullInfo on events_Event { + id + title + subtitle + hostId + host { + id + email + firstName + middleName + lastName + } + description + startDatetime + finishDatetime + state + rules { + title + description + } + prizes { + condition { + from + to + additional + } + pool { + amount + asset + } + } + participants { + participantId + + participant { + id + name + } + state + botId + releaseId + } + invitations { + inviteeId + invitee { + id + name + } + acceptedDate + refusedDate + by { + date + inviterId + inviter { + id + email + firstName + middleName + lastName + } + } + } + presentation { + banner + profile + page + } + formula { + id + ownerId + + owner { + id + email + firstName + middleName + lastName + } + isTemplate + name + } + + plotter { + id + ownerId + owner { + id + email + firstName + middleName + lastName + } + isTemplate + name + host + repo + moduleName + } + } +`; diff --git a/client/src/GraphQL/Fragments/index.js b/src/GraphQL/Fragments/index.js similarity index 100% rename from client/src/GraphQL/Fragments/index.js rename to src/GraphQL/Fragments/index.js diff --git a/client/src/GraphQL/Fragments/options.js b/src/GraphQL/Fragments/options.js similarity index 100% rename from client/src/GraphQL/Fragments/options.js rename to src/GraphQL/Fragments/options.js diff --git a/client/src/index.js b/src/index.js similarity index 54% rename from client/src/index.js rename to src/index.js index cdcd36eb2..02ebb96be 100644 --- a/client/src/index.js +++ b/src/index.js @@ -10,16 +10,20 @@ import HostedEvents from './Components/HostedEvents'; import EditEvent from './Components/Event/Edit'; import CreateEvent from './Components/Event/Create'; +import './styles.scss'; + const App = () => ( - - - - - - - - +
+ + + + + + + + +
); diff --git a/src/styles.scss b/src/styles.scss new file mode 100644 index 000000000..09aac0f1c --- /dev/null +++ b/src/styles.scss @@ -0,0 +1,22 @@ +.eventsModule{ + .sortableListItem{ + padding-top: 15px; + margin-right: 15px; + padding-bottom: 15px; + margin-left: 15px; + border-bottom: 1px solid rgba(142, 144, 146, 0.3); + } +} + +.dragHandle{ + position: relative; + top: 1px; + display: block; + width: 18px; + height: 11px; + opacity: .25; + margin-right: 20px; + cursor: row-resize; + background: -webkit-linear-gradient(top,#000,#000 20%,#fff 0,#fff 40%,#000 0,#000 60%,#fff 0,#fff 80%,#000 0,#000); + background: linear-gradient(180deg,#000,#000 20%,#fff 0,#fff 40%,#000 0,#000 60%,#fff 0,#fff 80%,#000 0,#000); +} diff --git a/client/src/utils/index.js b/src/utils/index.js similarity index 100% rename from client/src/utils/index.js rename to src/utils/index.js diff --git a/client/src/utils/local-storage.js b/src/utils/local-storage.js similarity index 100% rename from client/src/utils/local-storage.js rename to src/utils/local-storage.js From 27a9845e533e8703ddef258bbbf89ac1571a0aca Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 18:10:30 +0100 Subject: [PATCH 130/146] Switching repo for npmjs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a31064573..989ea60dc 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "main": "src/index.js", "repository": { "type": "git", - "url": "git+https://github.com/nikolabjelo/EventsClientModule.git" + "url": "git+https://github.com/Superalgos/EventsClientModule.git" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" From 7db952769495609f21d201c6131cd4faa86a9c0f Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 18:13:44 +0100 Subject: [PATCH 131/146] Updating package-lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 73f497ea8..f3eb6625a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@superalgos/events-client", - "version": "0.0.4", + "version": "0.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { From 4cb529af1e815ba1c148c1d5b88fc51b1383d71c Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 18:34:27 +0100 Subject: [PATCH 132/146] Forwarded Id in the edit event page and removed last occurrence of botId --- src/Components/Event/Edit/Tabs/Basic.js | 2 +- src/Components/Event/Edit/queried.js | 8 ++++++-- src/GraphQL/Calls/hostedEvents.js | 22 +++++++++++++++++----- src/GraphQL/Fragments/event.js | 7 ++++--- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/Components/Event/Edit/Tabs/Basic.js b/src/Components/Event/Edit/Tabs/Basic.js index d3d34e69a..15df901b6 100644 --- a/src/Components/Event/Edit/Tabs/Basic.js +++ b/src/Components/Event/Edit/Tabs/Basic.js @@ -29,7 +29,7 @@ class Basic extends React.Component { diff --git a/src/Components/Event/Edit/queried.js b/src/Components/Event/Edit/queried.js index ed3cde6d6..1637c23d4 100644 --- a/src/Components/Event/Edit/queried.js +++ b/src/Components/Event/Edit/queried.js @@ -39,6 +39,7 @@ class Queried extends React.Component { super(props); this.state = { value: 0, + id: this.props.event.id, title: this.props.event.title, subtitle: this.props.event.subtitle, description: this.props.event.description, @@ -62,6 +63,7 @@ class Queried extends React.Component { render() { const { + id, title, subtitle, description, @@ -76,9 +78,9 @@ class Queried extends React.Component { const { classes } = this.props; return ( - { - this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`); + this.props.history.push(`/events/edit/${data.events_EditEvent.id}`); } } > @@ -127,6 +129,7 @@ class Queried extends React.Component { e.preventDefault(); hostEvent({ variables: { + eventId: id, event: { title, subtitle, @@ -143,6 +146,7 @@ class Queried extends React.Component { {value === 0 && Date: Sun, 10 Feb 2019 19:07:44 +0100 Subject: [PATCH 133/146] Solving the autosubmit problem --- src/Components/Event/Create/Tabs/Basic.js | 6 +- .../Event/Create/Tabs/Technical/index.js | 6 +- src/Components/Event/Create/index.js | 73 ++++++++++--------- src/GraphQL/Calls/hostedEvents.js | 6 +- 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/src/Components/Event/Create/Tabs/Basic.js b/src/Components/Event/Create/Tabs/Basic.js index d3d34e69a..15d7ce7b5 100644 --- a/src/Components/Event/Create/Tabs/Basic.js +++ b/src/Components/Event/Create/Tabs/Basic.js @@ -19,7 +19,9 @@ import styles from '../styles'; class Basic extends React.Component { render() { - const { classes, event, edit } = this.props; + const { + classes, event, edit, create, + } = this.props; return ( @@ -102,7 +104,7 @@ class Basic extends React.Component { > Go to technical tab -
diff --git a/src/Components/Event/Create/Tabs/Technical/index.js b/src/Components/Event/Create/Tabs/Technical/index.js index 1db2027c2..52816befa 100644 --- a/src/Components/Event/Create/Tabs/Technical/index.js +++ b/src/Components/Event/Create/Tabs/Technical/index.js @@ -58,7 +58,9 @@ class Technical extends React.Component { } render() { - const { classes, event, edit } = this.props; + const { + classes, event, edit, create, + } = this.props; const { isNewPlotterOpen, isNewFormulaOpen, isNewRuleOpen, isNewPrizeOpen, } = this.state; @@ -182,7 +184,7 @@ class Technical extends React.Component { - diff --git a/src/Components/Event/Create/index.js b/src/Components/Event/Create/index.js index 5330b71c6..125450239 100644 --- a/src/Components/Event/Create/index.js +++ b/src/Components/Event/Create/index.js @@ -125,10 +125,17 @@ class Create extends React.Component { Create a new event -
{ - e.preventDefault(); - hostEvent({ + {value === 0 && + this.handleEventChange(newType, newVal)} + create={() => hostEvent({ variables: { event: { title, @@ -140,35 +147,35 @@ class Create extends React.Component { plotterId, }, }, - }); - }} - > - {value === 0 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 1 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 2 && } - {value === 3 && } - + })} + /> +
} + {value === 1 && + this.handleEventChange(newType, newVal)} + create={() => hostEvent({ + variables: { + event: { + title, + subtitle, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: finishDatetime.valueOf() / 1000, + formulaId, + plotterId, + }, + }, + })} + /> + } + {value === 2 && } + {value === 3 && }
diff --git a/src/GraphQL/Calls/hostedEvents.js b/src/GraphQL/Calls/hostedEvents.js index d04586c89..e5669b1ee 100644 --- a/src/GraphQL/Calls/hostedEvents.js +++ b/src/GraphQL/Calls/hostedEvents.js @@ -4,7 +4,7 @@ import { eventFullInfo } from '../Fragments'; const EVENTS_CREATEEVENT = gql` mutation Events_CreateEvent($event: events_EventInput!) { events_CreateEvent(event: $event) { - ...eventFullInfo + ...EventFullInfo } } ${eventFullInfo} @@ -13,7 +13,7 @@ const EVENTS_CREATEEVENT = gql` const EVENTS_EDITEVENT = gql` mutation Events_EditEvent($eventId: ID!, $event: events_EventInput!) { events_EditEvent(eventId: $eventId, event: $event) { - ...eventFullInfo + ...EventFullInfo } } ${eventFullInfo} @@ -22,7 +22,7 @@ const EVENTS_EDITEVENT = gql` const EVENTS_EVENTSBYHOST = gql` query Events_EventsByHost{ events_EventsByHost { - ...eventFullInfo + ...EventFullInfo } } ${eventFullInfo} From b8e1f67108885cb0d413a39b986f754fd0287a2a Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 19:15:23 +0100 Subject: [PATCH 134/146] Adding Rules and Prices to mutation calls --- src/Components/Event/Create/index.js | 4 + src/Components/Event/Edit/Tabs/Basic.js | 6 +- .../Event/Edit/Tabs/Technical/index.js | 6 +- src/Components/Event/Edit/queried.js | 82 +++++++++++-------- 4 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/Components/Event/Create/index.js b/src/Components/Event/Create/index.js index 125450239..b197c87f3 100644 --- a/src/Components/Event/Create/index.js +++ b/src/Components/Event/Create/index.js @@ -145,6 +145,8 @@ class Create extends React.Component { finishDatetime: finishDatetime.valueOf() / 1000, formulaId, plotterId, + prizes, + rules, }, }, })} @@ -169,6 +171,8 @@ class Create extends React.Component { finishDatetime: finishDatetime.valueOf() / 1000, formulaId, plotterId, + prizes, + rules, }, }, })} diff --git a/src/Components/Event/Edit/Tabs/Basic.js b/src/Components/Event/Edit/Tabs/Basic.js index 15df901b6..140388415 100644 --- a/src/Components/Event/Edit/Tabs/Basic.js +++ b/src/Components/Event/Edit/Tabs/Basic.js @@ -19,7 +19,9 @@ import styles from '../styles'; class Basic extends React.Component { render() { - const { classes, event, edit } = this.props; + const { + classes, event, edit, saveChanges, + } = this.props; return ( @@ -102,7 +104,7 @@ class Basic extends React.Component { > Go to technical tab - diff --git a/src/Components/Event/Edit/Tabs/Technical/index.js b/src/Components/Event/Edit/Tabs/Technical/index.js index 1db2027c2..81e43aaa8 100644 --- a/src/Components/Event/Edit/Tabs/Technical/index.js +++ b/src/Components/Event/Edit/Tabs/Technical/index.js @@ -58,7 +58,9 @@ class Technical extends React.Component { } render() { - const { classes, event, edit } = this.props; + const { + classes, event, edit, saveChanges, + } = this.props; const { isNewPlotterOpen, isNewFormulaOpen, isNewRuleOpen, isNewPrizeOpen, } = this.state; @@ -182,7 +184,7 @@ class Technical extends React.Component { - diff --git a/src/Components/Event/Edit/queried.js b/src/Components/Event/Edit/queried.js index 1637c23d4..c0223126f 100644 --- a/src/Components/Event/Edit/queried.js +++ b/src/Components/Event/Edit/queried.js @@ -84,7 +84,7 @@ class Queried extends React.Component { } } > - {hostEvent => ( + {editHosted => (
Create a new event -
{ - e.preventDefault(); - hostEvent({ + {value === 0 && + this.handleEventChange(newType, newVal)} + saveChanges={() => editHosted({ variables: { eventId: id, event: { @@ -140,36 +150,38 @@ class Queried extends React.Component { plotterId, }, }, - }); - }} - > - {value === 0 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 1 && - this.handleEventChange(newType, newVal)} - /> - } - {value === 2 && } - {value === 3 && } - + })} + /> +
} + {value === 1 && + this.handleEventChange(newType, newVal)} + saveChanges={() => editHosted({ + variables: { + eventId: id, + event: { + title, + subtitle, + description, + startDatetime: startDatetime.valueOf() / 1000, + finishDatetime: finishDatetime.valueOf() / 1000, + formulaId, + plotterId, + prizes, + rules, + }, + }, + })} + /> + } + {value === 2 && } + {value === 3 && }
From b1d7279d3480b237bebd5f0b721bf728b92bbe96 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 19:50:09 +0100 Subject: [PATCH 135/146] Removing "position" from rules --- src/Components/Event/Create/Tabs/Technical/index.js | 1 - src/Components/Event/Edit/Tabs/Technical/index.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Components/Event/Create/Tabs/Technical/index.js b/src/Components/Event/Create/Tabs/Technical/index.js index 52816befa..1840c37fb 100644 --- a/src/Components/Event/Create/Tabs/Technical/index.js +++ b/src/Components/Event/Create/Tabs/Technical/index.js @@ -38,7 +38,6 @@ class Technical extends React.Component { this.props.edit('rules', [...this.props.event.rules, { title, description, - position: this.props.event.rules.length, }]); this.closeDialogs(); } diff --git a/src/Components/Event/Edit/Tabs/Technical/index.js b/src/Components/Event/Edit/Tabs/Technical/index.js index 81e43aaa8..5cccd7490 100644 --- a/src/Components/Event/Edit/Tabs/Technical/index.js +++ b/src/Components/Event/Edit/Tabs/Technical/index.js @@ -38,7 +38,6 @@ class Technical extends React.Component { this.props.edit('rules', [...this.props.event.rules, { title, description, - position: this.props.event.rules.length, }]); this.closeDialogs(); } From 84b2fec38d9019dd277d0f28cceb864c9adf153b Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 20:41:30 +0100 Subject: [PATCH 136/146] Remove position from prizes/rules --- .../Event/Create/Tabs/Technical/Prizes/List.js | 16 ++++------------ .../Event/Create/Tabs/Technical/Rules/List.js | 16 ++++------------ .../Event/Edit/Tabs/Technical/Prizes/List.js | 16 ++++------------ .../Event/Edit/Tabs/Technical/Rules/List.js | 16 ++++------------ 4 files changed, 16 insertions(+), 48 deletions(-) diff --git a/src/Components/Event/Create/Tabs/Technical/Prizes/List.js b/src/Components/Event/Create/Tabs/Technical/Prizes/List.js index 4a08a93df..a1b310dd2 100644 --- a/src/Components/Event/Create/Tabs/Technical/Prizes/List.js +++ b/src/Components/Event/Create/Tabs/Technical/Prizes/List.js @@ -12,7 +12,7 @@ import { const DragHandle = SortableHandle(() =>
); -const SortableItem = SortableElement(({ value, deletePrize }) => ( +const SortableItem = SortableElement(({ value, deletePrize, index }) => (
@@ -27,7 +27,7 @@ const SortableItem = SortableElement(({ value, deletePrize }) => ( - deletePrize(value.position)} >Remove + deletePrize(index)} >Remove @@ -44,22 +44,14 @@ const SortableList = SortableContainer(({ items, deletePrize }) => ( class List extends React.Component { onSortEnd = ({ oldIndex, newIndex }) => { - let newPrizes = this.props.prizes.slice(0); + const newPrizes = this.props.prizes.slice(0); newPrizes.splice(newIndex, 0, newPrizes.splice(oldIndex, 1)[0]); - newPrizes = newPrizes.map((prize, index) => { - prize.position = index; - return prize; - }); this.props.edit(newPrizes); } deletePrize = (deletedIndex) => { - let newPrizes = this.props.prizes.slice(0); + const newPrizes = this.props.prizes.slice(0); newPrizes.splice(deletedIndex, 1); - newPrizes = newPrizes.map((prize, index) => { - prize.position = index; - return prize; - }); this.props.edit(newPrizes); } diff --git a/src/Components/Event/Create/Tabs/Technical/Rules/List.js b/src/Components/Event/Create/Tabs/Technical/Rules/List.js index c9570ae4c..e2966ae7d 100644 --- a/src/Components/Event/Create/Tabs/Technical/Rules/List.js +++ b/src/Components/Event/Create/Tabs/Technical/Rules/List.js @@ -12,7 +12,7 @@ import { const DragHandle = SortableHandle(() =>
); -const SortableItem = SortableElement(({ value, deleteRule }) => ( +const SortableItem = SortableElement(({ value, deleteRule, index }) => (
@@ -28,7 +28,7 @@ const SortableItem = SortableElement(({ value, deleteRule }) => ( - deleteRule(value.position)} >Remove + deleteRule(index)} >Remove @@ -45,22 +45,14 @@ const SortableList = SortableContainer(({ items, deleteRule }) => ( class List extends React.Component { onSortEnd = ({ oldIndex, newIndex }) => { - let newRules = this.props.rules.slice(0); + const newRules = this.props.rules.slice(0); newRules.splice(newIndex, 0, newRules.splice(oldIndex, 1)[0]); - newRules = newRules.map((rule, index) => { - rule.position = index; - return rule; - }); this.props.edit(newRules); } deleteRule = (deletedIndex) => { - let newRules = this.props.rules.slice(0); + const newRules = this.props.rules.slice(0); newRules.splice(deletedIndex, 1); - newRules = newRules.map((rule, index) => { - rule.position = index; - return rule; - }); this.props.edit(newRules); } diff --git a/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js b/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js index 4a08a93df..a1b310dd2 100644 --- a/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js +++ b/src/Components/Event/Edit/Tabs/Technical/Prizes/List.js @@ -12,7 +12,7 @@ import { const DragHandle = SortableHandle(() =>
); -const SortableItem = SortableElement(({ value, deletePrize }) => ( +const SortableItem = SortableElement(({ value, deletePrize, index }) => (
@@ -27,7 +27,7 @@ const SortableItem = SortableElement(({ value, deletePrize }) => ( - deletePrize(value.position)} >Remove + deletePrize(index)} >Remove @@ -44,22 +44,14 @@ const SortableList = SortableContainer(({ items, deletePrize }) => ( class List extends React.Component { onSortEnd = ({ oldIndex, newIndex }) => { - let newPrizes = this.props.prizes.slice(0); + const newPrizes = this.props.prizes.slice(0); newPrizes.splice(newIndex, 0, newPrizes.splice(oldIndex, 1)[0]); - newPrizes = newPrizes.map((prize, index) => { - prize.position = index; - return prize; - }); this.props.edit(newPrizes); } deletePrize = (deletedIndex) => { - let newPrizes = this.props.prizes.slice(0); + const newPrizes = this.props.prizes.slice(0); newPrizes.splice(deletedIndex, 1); - newPrizes = newPrizes.map((prize, index) => { - prize.position = index; - return prize; - }); this.props.edit(newPrizes); } diff --git a/src/Components/Event/Edit/Tabs/Technical/Rules/List.js b/src/Components/Event/Edit/Tabs/Technical/Rules/List.js index c9570ae4c..e2966ae7d 100644 --- a/src/Components/Event/Edit/Tabs/Technical/Rules/List.js +++ b/src/Components/Event/Edit/Tabs/Technical/Rules/List.js @@ -12,7 +12,7 @@ import { const DragHandle = SortableHandle(() =>
); -const SortableItem = SortableElement(({ value, deleteRule }) => ( +const SortableItem = SortableElement(({ value, deleteRule, index }) => (
@@ -28,7 +28,7 @@ const SortableItem = SortableElement(({ value, deleteRule }) => ( - deleteRule(value.position)} >Remove + deleteRule(index)} >Remove @@ -45,22 +45,14 @@ const SortableList = SortableContainer(({ items, deleteRule }) => ( class List extends React.Component { onSortEnd = ({ oldIndex, newIndex }) => { - let newRules = this.props.rules.slice(0); + const newRules = this.props.rules.slice(0); newRules.splice(newIndex, 0, newRules.splice(oldIndex, 1)[0]); - newRules = newRules.map((rule, index) => { - rule.position = index; - return rule; - }); this.props.edit(newRules); } deleteRule = (deletedIndex) => { - let newRules = this.props.rules.slice(0); + const newRules = this.props.rules.slice(0); newRules.splice(deletedIndex, 1); - newRules = newRules.map((rule, index) => { - rule.position = index; - return rule; - }); this.props.edit(newRules); } From 564270724601ee31db360b9ee22eb8e91ed39ff5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 11 Feb 2019 14:30:32 +0100 Subject: [PATCH 137/146] Setting up the "my hosted event page" --- src/Components/Event/Edit/queried.js | 3 +- src/Components/HostedEvents/Event.js | 69 ++++++++++++++++++++-------- src/Components/HostedEvents/index.js | 48 ++++++++++++++++++- src/GraphQL/Calls/hostedEvents.js | 14 +++++- 4 files changed, 108 insertions(+), 26 deletions(-) diff --git a/src/Components/Event/Edit/queried.js b/src/Components/Event/Edit/queried.js index c0223126f..54ecd7d6f 100644 --- a/src/Components/Event/Edit/queried.js +++ b/src/Components/Event/Edit/queried.js @@ -81,8 +81,7 @@ class Queried extends React.Component { { this.props.history.push(`/events/edit/${data.events_EditEvent.id}`); - } - } + }} > {editHosted => (
diff --git a/src/Components/HostedEvents/Event.js b/src/Components/HostedEvents/Event.js index 0379834f6..2f2b944f1 100644 --- a/src/Components/HostedEvents/Event.js +++ b/src/Components/HostedEvents/Event.js @@ -1,5 +1,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import { Mutation } from 'react-apollo'; + import { Grid, Paper, @@ -9,51 +11,78 @@ import { import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import { hostedEventsCalls } from '../../GraphQL/Calls/index'; + import { toLocalTime } from '../../utils'; class Event extends React.Component { render() { - const { classes } = this.props; + const { classes, showOnly } = this.props; const { id, - name, + title, + subtitle, startDatetime, finishDatetime, host, + formula, description, } = this.props.event; return ( - {name} + {title} + {subtitle} From : {toLocalTime(startDatetime)} To : {toLocalTime(finishDatetime)} - - Hosted by: {host.alias} ({host.lastName} {host.firstName}) - - Formula: - First prize: + Description : + {description} - Description : - {description} + + Hosted by: {host.alias} ({host.lastName} {host.firstName}) + + Formula: {formula.name} - + { !showOnly + ? + { + this.props.history.push(`/events/edit/${id}`); + }} + > + {publishEvent => ( + + )} + + + + : '' + } +
); } diff --git a/src/Components/Search/Tabs/History.js b/src/Components/Search/Tabs/History.js index bc3577f8e..10aa4f001 100644 --- a/src/Components/Search/Tabs/History.js +++ b/src/Components/Search/Tabs/History.js @@ -16,7 +16,7 @@ class History extends React.Component { color='textPrimary' gutterBottom > - Your old events (maybe here, maybe not, who knows) + Your old events (comming soon)
); diff --git a/src/Components/Search/Tabs/Ongoing.js b/src/Components/Search/Tabs/Ongoing.js index 0ba566d3c..24b392491 100644 --- a/src/Components/Search/Tabs/Ongoing.js +++ b/src/Components/Search/Tabs/Ongoing.js @@ -8,9 +8,9 @@ import Event from '../Event'; class Ongoing extends React.Component { render() { - const { OngoingEvents, classes } = this.props; + const { Events, classes } = this.props; - const ongoingEvents = OngoingEvents.map((event, index) => ( + const events = Events.map((event, index) => ( )); return ( @@ -24,7 +24,7 @@ class Ongoing extends React.Component { > Ongoing events: - {ongoingEvents} + {events}
); } diff --git a/src/Components/Search/index.js b/src/Components/Search/index.js index 173a701a8..83358cdd2 100644 --- a/src/Components/Search/index.js +++ b/src/Components/Search/index.js @@ -19,7 +19,7 @@ import styles from './styles'; import BannerTopBar from '../BannerTopBar'; -import { listEventsCalls } from '../../GraphQL/Calls/index'; +import { hostedEventsCalls } from '../../GraphQL/Calls/index'; import { Future, @@ -51,6 +51,7 @@ class Search extends React.Component { render() { const { classes } = this.props; const { value } = this.state; + const time = { now: Math.floor(DateTime.local().valueOf() / 1000) }; return ( - - {({ loading, error, data }) => { - if (loading) return 'Loading...'; - if (error) return `Error! ${error.message}`; - const now = Math.floor(DateTime.local().valueOf() / 1000); - - const OngoingEvents = data.events_Events.filter(event => event.endDatetime > now - && event.startDatetime < now); - const FutureEvents = data.events_Events.filter(event => event.startDatetime > now); - const PastEvents = data.events_Events.filter(event => event.endDatetime < now); - - return ( - -
- - - } - /> - } - /> - } - /> - } - /> - - - {value === 0 && - - } - {value === 1 && } - {value === 2 && } - {value === 3 && } -
-
- ); - }} -
+
+ + + } + /> + } + /> + } + /> + } + /> + + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + return ( + + {value === 0 && } + + ); + }} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + return ( + + {value === 1 && } + + ); + }} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + return ( + + {value === 2 && } + + ); + }} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + return ( + + {value === 3 && } + + ); + }} + +
); } diff --git a/src/GraphQL/Calls/hostedEvents.js b/src/GraphQL/Calls/hostedEvents.js index 562eadfcb..b2def08b3 100644 --- a/src/GraphQL/Calls/hostedEvents.js +++ b/src/GraphQL/Calls/hostedEvents.js @@ -20,8 +20,22 @@ const EVENTS_EDITEVENT = gql` `; const EVENTS_EVENTSBYHOST = gql` - query Events_Events($hostId: String!, $state: events_EventStateEnum, $maxEndDate: Int, $minEndDate: Int){ - events_Events(hostId: $hostId, state: $state, maxEndDate: $maxEndDate, minEndDate: $minEndDate) { + query Events_Events( + $hostId: String, + $state: events_EventStateEnum, + $minStartDate: Int, + $maxStartDate: Int, + $minEndDate: Int, + $maxEndDate: Int + ){ + events_Events( + hostId: $hostId, + state: $state, + minStartDate: $minStartDate, + maxStartDate: $maxStartDate, + minEndDate: $minEndDate, + maxEndDate: $maxEndDate + ) { ...EventFullInfo } } diff --git a/src/GraphQL/Fragments/event.js b/src/GraphQL/Fragments/event.js index 1478fa438..c1138c369 100644 --- a/src/GraphQL/Fragments/event.js +++ b/src/GraphQL/Fragments/event.js @@ -66,6 +66,14 @@ export const eventFullInfo = gql` botId } } + participatingAs{ + id + name + } + canParticipateAs{ + id + name + } invitations { inviteeId invitee { From 048aa1472282db6f455656593a69a3f41a0a5194 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 19 Feb 2019 03:26:32 +0100 Subject: [PATCH 143/146] Set enroll mutations --- src/Components/Search/Event.js | 67 +++++++++++++++++++++++++++- src/Components/Search/Tabs/Future.js | 2 +- src/GraphQL/Calls/hostedEvents.js | 13 ++++++ src/GraphQL/Fragments/event.js | 4 ++ 4 files changed, 84 insertions(+), 2 deletions(-) diff --git a/src/Components/Search/Event.js b/src/Components/Search/Event.js index 4183f6ad2..cf9d3721f 100644 --- a/src/Components/Search/Event.js +++ b/src/Components/Search/Event.js @@ -1,19 +1,23 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import { Mutation } from 'react-apollo'; import { Grid, Paper, Typography, Button, + Select, + MenuItem, } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; +import { hostedEventsCalls } from '../../GraphQL/Calls/index'; import { toLocalTime } from '../../utils'; class Event extends React.Component { render() { - const { classes, event } = this.props; + const { classes, event, enrollable = false } = this.props; const { id, title, @@ -24,7 +28,20 @@ class Event extends React.Component { formula, description, participatingAs, + canParticipateAs, } = event; + + const fbs = []; + + canParticipateAs.forEach((team) => { + team.fb.forEach((finb) => { + fbs.push({ + value: `${team.id}|${finb.id}`, + text: `${team.name} > ${finb.name}`, + }); + }); + }); + return ( @@ -48,6 +65,54 @@ class Event extends React.Component { You are participating as : { participatingAs.map(team => `${team.name}, `) } + { enrollable + ? { + window.location.reload(); + }} + > + {enrollToEvent => ( + + // + )} + + : '' + } + })} + > + Enroll + + )} : '' diff --git a/src/Components/Search/Tabs/Future.js b/src/Components/Search/Tabs/Future.js index 23d3b1c9f..90fba08a7 100644 --- a/src/Components/Search/Tabs/Future.js +++ b/src/Components/Search/Tabs/Future.js @@ -9,10 +9,10 @@ import Event from '../Event'; class Future extends React.Component { render() { const { classes } = this.props; - const { Events } = this.props; + const { Events, AKey } = this.props; const events = Events.map((event, index) => ( - + )); return (
diff --git a/src/Components/Search/index.js b/src/Components/Search/index.js index 83358cdd2..e5f1d5fdd 100644 --- a/src/Components/Search/index.js +++ b/src/Components/Search/index.js @@ -107,7 +107,7 @@ class Search extends React.Component { }} {({ loading, error, data }) => { @@ -115,7 +115,7 @@ class Search extends React.Component { if (error) return `Error! ${error.message}`; return ( - {value === 1 && } + {value === 1 && } ); }} diff --git a/src/GraphQL/Calls/hostedEvents.js b/src/GraphQL/Calls/hostedEvents.js index 2b46bc2ab..489119c7f 100644 --- a/src/GraphQL/Calls/hostedEvents.js +++ b/src/GraphQL/Calls/hostedEvents.js @@ -42,6 +42,33 @@ const EVENTS_EVENTSBYHOST = gql` ${eventFullInfo} `; +const EVENTS_EVENT_AND_AKEY = gql` + query Events_Events( + $hostId: String, + $state: events_EventStateEnum, + $minStartDate: Int, + $maxStartDate: Int, + $minEndDate: Int, + $maxEndDate: Int + ){ + events_Events( + hostId: $hostId, + state: $state, + minStartDate: $minStartDate, + maxStartDate: $maxStartDate, + minEndDate: $minEndDate, + maxEndDate: $maxEndDate + ) { + ...EventFullInfo + } + keyVault_AvailableKeys{ + id + key + } + } + ${eventFullInfo} +`; + const EVENTS_PUBLISHEVENT = gql` mutation Events_ChangeEventState($eventId: ID!, $state: events_EventStateEnum) { events_ChangeEventState(eventId: $eventId, state: $state) { @@ -52,10 +79,10 @@ const EVENTS_PUBLISHEVENT = gql` `; const REGISTER_EVENT = gql` - mutation Events_RegisterToEvent($eventId: ID!, $participantId: String!, $botId: String!) { + mutation Events_RegisterToEvent($eventId: ID!, $keyId: String!, $participantId: String!, $botId: String!) { events_RegisterToEvent( eventId: $eventId - participant: { participantId: $participantId, botId: $botId } + participant: { keyId: $keyId, participantId: $participantId, botId: $botId } ) { ...EventFullInfo } @@ -67,6 +94,7 @@ export default { EVENTS_CREATEEVENT, EVENTS_EDITEVENT, EVENTS_EVENTSBYHOST, + EVENTS_EVENT_AND_AKEY, EVENTS_PUBLISHEVENT, REGISTER_EVENT, }; From b10701b7b6b85a6af3cf8fec86bbe60eef6db139 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 25 Feb 2019 13:52:02 +0100 Subject: [PATCH 145/146] Added a show page --- src/Components/Event/Create/Tabs/Basic.js | 6 - src/Components/Event/Edit/Tabs/Basic.js | 10 +- .../Event/Edit/Tabs/Technical/index.js | 2 +- src/Components/Event/Edit/queried.js | 2 +- src/Components/Event/Show/Tabs/Basic.js | 111 ++++++++++ .../Event/Show/Tabs/PresentationPage.js | 27 +++ src/Components/Event/Show/Tabs/TeamsServer.js | 27 +++ .../Event/Show/Tabs/Technical/Formula/New.js | 78 +++++++ .../Show/Tabs/Technical/Formula/index.js | 5 + .../Event/Show/Tabs/Technical/Plotter/New.js | 108 ++++++++++ .../Show/Tabs/Technical/Plotter/index.js | 5 + .../Event/Show/Tabs/Technical/Prizes/List.js | 72 +++++++ .../Event/Show/Tabs/Technical/Prizes/New.js | 106 ++++++++++ .../Event/Show/Tabs/Technical/Prizes/index.js | 7 + .../Event/Show/Tabs/Technical/Rules/List.js | 73 +++++++ .../Event/Show/Tabs/Technical/Rules/New.js | 68 ++++++ .../Event/Show/Tabs/Technical/Rules/index.js | 7 + .../Event/Show/Tabs/Technical/index.js | 196 ++++++++++++++++++ src/Components/Event/Show/Tabs/index.js | 11 + src/Components/Event/Show/index.js | 85 +++++--- src/Components/Event/Show/styles.js | 49 ++++- src/index.js | 3 +- 22 files changed, 1016 insertions(+), 42 deletions(-) create mode 100644 src/Components/Event/Show/Tabs/Basic.js create mode 100644 src/Components/Event/Show/Tabs/PresentationPage.js create mode 100644 src/Components/Event/Show/Tabs/TeamsServer.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Formula/New.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Formula/index.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Plotter/New.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Plotter/index.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Prizes/List.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Prizes/New.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Prizes/index.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Rules/List.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Rules/New.js create mode 100644 src/Components/Event/Show/Tabs/Technical/Rules/index.js create mode 100644 src/Components/Event/Show/Tabs/Technical/index.js create mode 100644 src/Components/Event/Show/Tabs/index.js diff --git a/src/Components/Event/Create/Tabs/Basic.js b/src/Components/Event/Create/Tabs/Basic.js index a65394acd..6854ea420 100644 --- a/src/Components/Event/Create/Tabs/Basic.js +++ b/src/Components/Event/Create/Tabs/Basic.js @@ -56,12 +56,6 @@ class Basic extends React.Component { onChange={newVal => edit('description', newVal.target.value)} /> - - The dates are purely indicative, as it is important for you to make sure everything is - ready before manually triggering the beginning and end of the event. - If you are confident use the scheduler to start it for you(incoming). - - diff --git a/src/Components/Event/Edit/Tabs/Basic.js b/src/Components/Event/Edit/Tabs/Basic.js index 910099532..8210a3720 100644 --- a/src/Components/Event/Edit/Tabs/Basic.js +++ b/src/Components/Event/Edit/Tabs/Basic.js @@ -25,7 +25,7 @@ class Basic extends React.Component { return ( - These are the basic information you need to input in order to create an event. + These are the basic information you need to input in order to edit an event. There might be some heavy changes in the near future as the application is still at a very early stage. @@ -56,12 +56,6 @@ class Basic extends React.Component { onChange={newVal => edit('description', newVal.target.value)} /> - - The dates are purely indicative, as it is important for you to make sure everything is - ready before manually triggering the beginning and end of the event. - If you are confident use the scheduler to start it for you(incoming). - - @@ -105,7 +99,7 @@ class Basic extends React.Component { Go to technical tab diff --git a/src/Components/Event/Edit/Tabs/Technical/index.js b/src/Components/Event/Edit/Tabs/Technical/index.js index 5cccd7490..212aa6d50 100644 --- a/src/Components/Event/Edit/Tabs/Technical/index.js +++ b/src/Components/Event/Edit/Tabs/Technical/index.js @@ -184,7 +184,7 @@ class Technical extends React.Component { diff --git a/src/Components/Event/Edit/queried.js b/src/Components/Event/Edit/queried.js index b7ae18c2e..3ba72b60a 100644 --- a/src/Components/Event/Edit/queried.js +++ b/src/Components/Event/Edit/queried.js @@ -153,7 +153,7 @@ class Queried extends React.Component {
- Create a new event + Edit an event {value === 0 && + + These are the basic information you need to input in order to create an event. + There might be some heavy changes in the near future as the application is still at a very early stage. + + + + + edit('title', newVal.target.value)} + /> + edit('subtitle', newVal.target.value)} + /> + edit('description', newVal.target.value)} + /> + + + + + } + rightArrowIcon={} + value={event.startDatetime} + helperText='Competition start date' + onChange={newVal => edit('startDatetime', newVal)} + /> + + + } + rightArrowIcon={} + value={event.endDatetime} + helperText='Competition ending date' + onChange={newVal => edit('endDatetime', newVal)} + /> + + + + + + + + + + + ); + } +} + +export default withStyles(styles)(Basic); diff --git a/src/Components/Event/Show/Tabs/PresentationPage.js b/src/Components/Event/Show/Tabs/PresentationPage.js new file mode 100644 index 000000000..1c674ddcc --- /dev/null +++ b/src/Components/Event/Show/Tabs/PresentationPage.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class PresentationPage extends React.Component { + render() { + const { classes } = this.props; + return ( + + + PresentationPage + + + ); + } +} + +export default withStyles(styles)(PresentationPage); diff --git a/src/Components/Event/Show/Tabs/TeamsServer.js b/src/Components/Event/Show/Tabs/TeamsServer.js new file mode 100644 index 000000000..874c72d6f --- /dev/null +++ b/src/Components/Event/Show/Tabs/TeamsServer.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Typography } from '@material-ui/core'; + +import { withStyles } from '@material-ui/core/styles'; +import styles from '../styles'; + + +class TeamsServer extends React.Component { + render() { + const { classes } = this.props; + return ( + + + TeamsServer + + + ); + } +} + +export default withStyles(styles)(TeamsServer); diff --git a/src/Components/Event/Show/Tabs/Technical/Formula/New.js b/src/Components/Event/Show/Tabs/Technical/Formula/New.js new file mode 100644 index 000000000..605782b2d --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Formula/New.js @@ -0,0 +1,78 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../../GraphQL/Calls/index'; + +class New extends React.Component { + constructor() { + super(); + this.state = { name: '' }; + } + + render() { + const { name } = this.state; + const { closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='createFormula-dialog-title' + > + + Create a new formula + + + + At least for now, all the formulas are publically available, creating it here will let you select it in the select element. + + + { + const { events_Formulas: formulas } = store.readQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_FORMULAS, + data: { events_Formulas: formulas.concat([data.events_CreateFormula]) }, + }); + closeDialogs(); + } + } + > + {createFormula => ( +
{ + e.preventDefault(); + createFormula({ + variables: { + formula: { name }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + + + )} +
+ +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Show/Tabs/Technical/Formula/index.js b/src/Components/Event/Show/Tabs/Technical/Formula/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Formula/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Show/Tabs/Technical/Plotter/New.js b/src/Components/Event/Show/Tabs/Technical/Plotter/New.js new file mode 100644 index 000000000..5dc2b3b06 --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Plotter/New.js @@ -0,0 +1,108 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +import { Mutation } from 'react-apollo'; +import { getOptionsCalls } from '../../../../../../GraphQL/Calls/index'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + name: '', + host: '', + repo: '', + moduleName: '', + }; + } + + render() { + const { + name, host, repo, moduleName, + } = this.state; + const { closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='createPlotter-dialog-title' + > + + Create a new plotter + + + + At least for now, all the plotters are publically available, creating it here will let you select it in the select element. + + + { + const { events_Plotters: plotters } = store.readQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + }); + store.writeQuery({ + query: getOptionsCalls.EVENTS_PLOTTERS, + data: { events_Plotters: plotters.concat([data.events_CreatePlotter]) }, + }); + closeDialogs(); + } + } + > + {createPlotter => ( +
{ + e.preventDefault(); + createPlotter({ + variables: { + plotter: { + name, + host, + repo, + moduleName, + }, + }, + }); + }} + > + this.setState({ name: e.target.value })} + fullWidth + /> + this.setState({ host: e.target.value })} + fullWidth + /> + this.setState({ repo: e.target.value })} + fullWidth + /> + this.setState({ moduleName: e.target.value })} + fullWidth + /> + + + )} +
+ +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Show/Tabs/Technical/Plotter/index.js b/src/Components/Event/Show/Tabs/Technical/Plotter/index.js new file mode 100644 index 000000000..6f7047dad --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Plotter/index.js @@ -0,0 +1,5 @@ +import New from './New'; + +export { + New, +}; diff --git a/src/Components/Event/Show/Tabs/Technical/Prizes/List.js b/src/Components/Event/Show/Tabs/Technical/Prizes/List.js new file mode 100644 index 000000000..cc807f2c2 --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Prizes/List.js @@ -0,0 +1,72 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deletePrize, index }) => ( +
+ + + + + + + + {value.from}{value.to}{value.additional}{value.amount}{value.asset} + + + + + + deletePrize(index)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deletePrize }) => ( +
+ {items.map((value, index) => ( + deletePrize(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + const newPrizes = this.props.prizes.slice(0); + newPrizes.splice(newIndex, 0, newPrizes.splice(oldIndex, 1)[0]); + this.props.edit(newPrizes); + } + + deletePrize = (deletedIndex) => { + const newPrizes = this.props.prizes.slice(0); + newPrizes.splice(deletedIndex, 1); + this.props.edit(newPrizes); + } + + render() { + return ( + + this.deletePrize(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Show/Tabs/Technical/Prizes/New.js b/src/Components/Event/Show/Tabs/Technical/Prizes/New.js new file mode 100644 index 000000000..53d702b4e --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Prizes/New.js @@ -0,0 +1,106 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + additional: '', + amount: 0, + asset: '', + }; + } + + render() { + const { + from, to, additional, amount, asset, + } = this.state; + const { addPrize, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addPrize-dialog-title' + > + + + Prizes are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addPrize({ + from, + to, + additional, + amount, + asset, + }); + }} + > + + Conditions : + + + Examples : + If you want to make a price for the best bot only, you set both from and to rank to 1. + If you want the rest of the top 10 to get a price, you add a new price with from rank set to 2 and to rank set to 10. + Caution : + - Leaving "from rank" empty considers it to 0. + - Leaving "to rank" empty considers it as infinite + - Prizes are define in an additive manner, meaning that if a team qualifies for two prices, it gets both. + - Additional allows you to write addionnal textual condition, like "positive ROI only" for example. + + + this.setState({ from: e.target.value })} + type="number" + /> + this.setState({ to: e.target.value })} + type="number" + /> + this.setState({ additional: e.target.value })} + fullWidth + /> + + Pool : + + + Here you define the pool, the amount is a number whereas asset is a text. For example 1BTC, 200$, or whatever. + + this.setState({ amount: e.target.value })} + type="number" + /> + this.setState({ asset: e.target.value })} + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Show/Tabs/Technical/Prizes/index.js b/src/Components/Event/Show/Tabs/Technical/Prizes/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Prizes/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/src/Components/Event/Show/Tabs/Technical/Rules/List.js b/src/Components/Event/Show/Tabs/Technical/Rules/List.js new file mode 100644 index 000000000..e2966ae7d --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Rules/List.js @@ -0,0 +1,73 @@ +import React from 'react'; +import { + Paper, + Grid, + Typography, +} from '@material-ui/core'; +import { + SortableContainer, + SortableElement, + SortableHandle, +} from 'react-sortable-hoc'; + +const DragHandle = SortableHandle(() =>
); + +const SortableItem = SortableElement(({ value, deleteRule, index }) => ( +
+ + + + + + + + {value.title} + + + {value.description} + + + + deleteRule(index)} >Remove + + + +
+)); + +const SortableList = SortableContainer(({ items, deleteRule }) => ( +
+ {items.map((value, index) => ( + deleteRule(deleteId)} /> + ))} +
+)); + +class List extends React.Component { + onSortEnd = ({ oldIndex, newIndex }) => { + const newRules = this.props.rules.slice(0); + newRules.splice(newIndex, 0, newRules.splice(oldIndex, 1)[0]); + this.props.edit(newRules); + } + + deleteRule = (deletedIndex) => { + const newRules = this.props.rules.slice(0); + newRules.splice(deletedIndex, 1); + this.props.edit(newRules); + } + + render() { + return ( + + this.deleteRule(deleteId)} + /> + + ); + } +} + +export default List; diff --git a/src/Components/Event/Show/Tabs/Technical/Rules/New.js b/src/Components/Event/Show/Tabs/Technical/Rules/New.js new file mode 100644 index 000000000..e133c1508 --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Rules/New.js @@ -0,0 +1,68 @@ +import React from 'react'; +import { + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + Button, + TextField, +} from '@material-ui/core'; + +class New extends React.Component { + constructor() { + super(); + this.state = { + title: '', + description: '', + }; + } + + render() { + const { + title, description, + } = this.state; + const { addRule, closeDialogs } = this.props; + return ( + closeDialogs()} + aria-labelledby='addRule-dialog-title' + > + + Create a new rule + + + + Rules are define textually only. In case of infringement, contact us. + +
{ + e.preventDefault(); + addRule( + title, + description, + ); + }} + > + this.setState({ title: e.target.value })} + fullWidth + /> + this.setState({ description: e.target.value })} + fullWidth + /> + + + +
+
+ ); + } +} + +export default New; diff --git a/src/Components/Event/Show/Tabs/Technical/Rules/index.js b/src/Components/Event/Show/Tabs/Technical/Rules/index.js new file mode 100644 index 000000000..307bbe029 --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/Rules/index.js @@ -0,0 +1,7 @@ +import List from './List'; +import New from './New'; + +export { + List, + New, +}; diff --git a/src/Components/Event/Show/Tabs/Technical/index.js b/src/Components/Event/Show/Tabs/Technical/index.js new file mode 100644 index 000000000..1840c37fb --- /dev/null +++ b/src/Components/Event/Show/Tabs/Technical/index.js @@ -0,0 +1,196 @@ +import React from 'react'; +import { Query } from 'react-apollo'; + +import { + Typography, + FormControl, + InputLabel, + Input, + Select, + FormHelperText, + MenuItem, + Grid, + Button, +} from '@material-ui/core'; +import { withStyles } from '@material-ui/core/styles'; +import styles from '../../styles'; + +import { getOptionsCalls } from '../../../../../GraphQL/Calls/index'; + +import { List as RulesList, New as NewRule } from './Rules'; +import { List as PrizesList, New as NewPrize } from './Prizes'; + +import { New as NewPlotter } from './Plotter'; +import { New as NewFormula } from './Formula'; + +class Technical extends React.Component { + constructor(props) { + super(props); + this.state = { + isNewFormulaOpen: false, + isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, + }; + } + + addRule = (title, description) => { + this.props.edit('rules', [...this.props.event.rules, { + title, + description, + }]); + this.closeDialogs(); + } + + addPrize = (prize) => { + this.props.edit('prizes', [...this.props.event.prizes, prize]); + this.closeDialogs(); + } + + closeDialogs = () => { + this.setState({ + isNewFormulaOpen: false, + isNewPlotterOpen: false, + isNewRuleOpen: false, + isNewPrizeOpen: false, + }); + } + + render() { + const { + classes, event, edit, create, + } = this.props; + const { + isNewPlotterOpen, isNewFormulaOpen, isNewRuleOpen, isNewPrizeOpen, + } = this.state; + return ( + + + Select the formula and the plotter you want to use, you can also create your own with the corresponding button. + + + + Select the formula + + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Formulas.map((formula, index) => ( + {formula.name} + )); + return ( + + + { isNewFormulaOpen ? this.closeDialogs()} /> : ''} + + ); + }} + + { this.setState({ isNewFormulaOpen: true }); }}> + To create a new formula, click here + + + + + Select the Plotter + + + {({ loading, error, data }) => { + if (loading) { + return ( + + ); + } + if (error) return `Error! ${error.message}`; + const selects = data.events_Plotters.map((plotter, index) => ( + {plotter.name} + )); + return ( + + + { isNewPlotterOpen ? this.closeDialogs()} /> : ''} + + ); + }} + + { this.setState({ isNewPlotterOpen: true }); }} > + To create a new plotter, click here + + + + + + Define the rules of your event. + + edit('rules', newVal)} /> + { isNewRuleOpen + ? this.closeDialogs()} addRule={(title, description) => this.addRule(title, description)} /> + : ''} + { this.setState({ isNewRuleOpen: true }); }} > + To add a new rule, click here + + + + + + Define the prizes of your event. + + edit('prizes', newVal)} /> + { isNewPrizeOpen + ? this.closeDialogs()} addPrize={prize => this.addPrize(prize)} /> + : ''} + { this.setState({ isNewPrizeOpen: true }); }} > + To add a new prize, click here + + + + + + + + + + ); + } +} + +export default withStyles(styles)(Technical); diff --git a/src/Components/Event/Show/Tabs/index.js b/src/Components/Event/Show/Tabs/index.js new file mode 100644 index 000000000..feecaaf55 --- /dev/null +++ b/src/Components/Event/Show/Tabs/index.js @@ -0,0 +1,11 @@ +import Basic from './Basic'; +import PresentationPage from './PresentationPage'; +import TeamsServer from './TeamsServer'; +import Technical from './Technical'; + +export { + Basic, + PresentationPage, + TeamsServer, + Technical, +}; diff --git a/src/Components/Event/Show/index.js b/src/Components/Event/Show/index.js index 4c83b98bd..b37a17302 100644 --- a/src/Components/Event/Show/index.js +++ b/src/Components/Event/Show/index.js @@ -1,39 +1,76 @@ import React from 'react'; import { Query } from 'react-apollo'; -import Typography from '@material-ui/core/Typography'; +import { + Paper, + Typography, +} from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; - import styles from './styles'; +import { toLocalTime } from '../../../utils'; + +import BannerTopBar from '../../BannerTopBar'; + import { showEventCalls } from '../../../GraphQL/Calls/index'; class Show extends React.Component { render() { + const { classes } = this.props; return ( - - Enroll in an competition {this.props.match.params.slug} - - - {({ loading, error, data }) => { - if (loading) return 'Loading...'; - if (error) return `Error! ${error.message}`; - return ( -

- {data.events_Event.description} -

- ); - }} -
+ +
+ + + Event Details : + + + + {({ loading, error, data }) => { + if (loading) return 'Loading...'; + if (error) return `Error! ${error.message}`; + return ( + + + Title : + + + {data.events_Event.title} + + + Subtitle : + + + {data.events_Event.subtitle} + + + Dates : + + + From {toLocalTime(data.events_Event.startDatetime)} to {toLocalTime(data.events_Event.endDatetime)} + + + Formula : + + + {data.events_Event.formula.name} + + + Plotter : + + + {data.events_Event.plotter.name} + + + ); + }} + + +
); } diff --git a/src/Components/Event/Show/styles.js b/src/Components/Event/Show/styles.js index 12fd82051..50a3490ca 100644 --- a/src/Components/Event/Show/styles.js +++ b/src/Components/Event/Show/styles.js @@ -1,4 +1,51 @@ -const styles = () => ({ +const styles = theme => ({ + root: { + flexGrow: 1, + width: '100%', + backgroundColor: theme.palette.background.paper, + padding: 0, + margin: 0, + }, + tabTitle: { + width: '25%', + maxWidth: 'none', + }, + clickable: { + cursor: 'pointer', + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right', + }, + buttonGrid: { + marginTop: -20, + }, + title: { + marginTop: 20, + }, + paperRoot: { + flexGrow: 1, + padding: 10, + marginTop: 25, + marginBottom: 25, + }, + inputField: { + width: '80%', + marginLeft: '10%', + marginTop: 25, + }, + typography: { + width: '80%', + marginLeft: '10%', + marginTop: 40, + }, + selectEmpty: { + marginTop: theme.spacing.unit * 2, + }, + bottomButton: { + padding: 15, + margin: 20, + }, }); export default styles; diff --git a/src/index.js b/src/index.js index 2fbbce84c..b08dca31f 100644 --- a/src/index.js +++ b/src/index.js @@ -7,6 +7,7 @@ import LuxonUtils from 'material-ui-pickers/utils/luxon-utils'; import Search from './Components/Search'; import HostedEvents from './Components/HostedEvents'; import EditEvent from './Components/Event/Edit'; +import ShowEvent from './Components/Event/Show'; import CreateEvent from './Components/Event/Create'; import './styles.scss'; @@ -18,7 +19,7 @@ const App = () => ( - +
From 3a7f28b4a4475cd905642ace918aa336438e085a Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 28 Feb 2019 17:50:47 +0100 Subject: [PATCH 146/146] updating package version to v0.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 989ea60dc..b04e66be9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@superalgos/events-client", - "version": "0.0.1", + "version": "0.0.2", "description": "SuperAlgos Event client-side web app", "author": "", "license": "",