From cbdcdd005d388fce56e9bd98e1901289de33bd5c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Jan 2019 14:47:10 +0100 Subject: [PATCH] Fix login/logout flow --- js/package-lock.json | 1369 +++------------------------ js/package.json | 16 +- js/src/App.vue | 35 +- js/src/apollo/user.ts | 25 + js/src/components/Account/Login.vue | 13 + js/src/components/Home.vue | 11 +- js/src/components/NavBar.vue | 30 +- js/src/constants.ts | 1 + js/src/graphql/user.ts | 15 + js/src/main.ts | 5 +- js/src/types/current-user.model.ts | 4 + js/src/types/login.model.ts | 6 +- js/src/utils/auth.ts | 9 +- js/src/vue-apollo.ts | 90 +- js/vue.config.js | 9 + 15 files changed, 307 insertions(+), 1331 deletions(-) create mode 100644 js/src/apollo/user.ts create mode 100644 js/src/types/current-user.model.ts diff --git a/js/package-lock.json b/js/package-lock.json index 1fbb8078..1e05c10c 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -4,32 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@apollographql/apollo-tools": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.2.8.tgz", - "integrity": "sha512-A7FTUigtpGCFBaLT1ILicdjM6pZ7LQNw7Vgos0t4aLYtvlKO/L1nMi/NO7bPypzZaJSToTgcxHJPRydP1Md+Kw==", - "dev": true, - "requires": { - "apollo-env": "0.2.5" - } - }, - "@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==", - "dev": true, - "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==", - "dev": true - }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -810,24 +784,6 @@ } } }, - "@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==", - "dev": true, - "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==", - "dev": true - } - } - }, "@babel/template": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", @@ -934,83 +890,10 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", - "dev": true - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "dev": true - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "dev": true - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", - "dev": true - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "dev": true, - "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=", - "dev": true - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", - "dev": true - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", - "dev": true - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", - "dev": true - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", - "dev": true - }, - "@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==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/async": { - "version": "2.0.49", - "resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.49.tgz", - "integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==", + "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/babel-types": { @@ -1026,78 +909,16 @@ "@types/babel-types": "*" } }, - "@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==", - "dev": true, - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, "@types/chai": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz", "integrity": "sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==", "dev": true }, - "@types/connect": { - "version": "3.4.32", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", - "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true - }, - "@types/express": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", - "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true - }, - "@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/lodash": { + "version": "4.14.120", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.120.tgz", + "integrity": "sha512-jQ21kQ120mo+IrDs1nFNVm/AsdFxIx2+vZ347DbogHJPd/JzKNMOqU6HCYin1W6v8l5R9XSO2/e9cxmn7HAnVw==", "dev": true }, "@types/mocha": { @@ -1111,38 +932,12 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.6.tgz", "integrity": "sha512-fnA7yvqg3oKQDb3skBif9w5RRKVKAaeKeNuLzZL37XcSiWL4IoSXQnnbchR3UnBu2EMLHBip7ZVEkqoIVBP8QQ==" }, - "@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==", - "dev": true - }, - "@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==", - "dev": true, - "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" - } - }, "@types/webpack-env": { "version": "1.13.6", "resolved": "http://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.13.6.tgz", "integrity": "sha512-5Th3OsZ4gTRdr9Mho83BQ23cex4sRhOR4XTG+m+cJc0FhtUBK9Vn62hBJ+pnQYnSxoPOsKoAPOx6FcphxBC8ng==", "dev": true }, - "@types/ws": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.1.tgz", - "integrity": "sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/node": "*" - } - }, "@types/zen-observable": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", @@ -1884,15 +1679,6 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, - "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-colors": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.1.tgz", @@ -1953,157 +1739,127 @@ } }, "apollo-cache": { - "version": "1.1.21", - "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.21.tgz", - "integrity": "sha512-5ErNb78KHtrJNimkDBTEigcvHkIqUmS7QJIk4lpZZ+XLVVgvk2fD+GhD1PLP+s8vHfAKVbO6vdbRxCCjGGrh5w==", + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.23.tgz", + "integrity": "sha512-9FcavymJQdjaYX6of1xgjFmWp8UUCtlW/S9k5bfMMnMNAAQMDnuOFVEklawdSbyAhM4hh1kSymyt/r23K1tVSA==", "requires": { - "apollo-utilities": "^1.0.26" - } - }, - "apollo-cache-control": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.3.3.tgz", - "integrity": "sha512-X6JhKfIaMLfl2jpsK/880BflXA+2lmm2sAsOZL4Bn2VrMsDtOssI1Ij9vNRbch9k9cA4WJvKed7Sql/wUIa1Eg==", - "dev": true, - "requires": { - "apollo-server-env": "2.2.0", - "graphql-extensions": "0.3.3" - } - }, - "apollo-cache-inmemory": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.3.11.tgz", - "integrity": "sha512-fSoyjBV5RV57J3i/VHDDB74ZgXc0PFiogheNFHEhC0mL6rg5e/DjTx0Vg+csIBk23gvlzTvV+eypx7Q2NJ+dYg==", - "requires": { - "apollo-cache": "^1.1.21", - "apollo-utilities": "^1.0.26", - "optimism": "^0.6.6" - } - }, - "apollo-client": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.3.tgz", - "integrity": "sha512-ALfqkvnv2ZXrk08rqegFDkgRNVh7G/hz+jK+dblCKjcbgUmBduSHsnIfc335povbZTLPjtb0/z0iMECJu3FvZw==", - "requires": { - "@types/async": "2.0.49", - "@types/zen-observable": "^0.8.0", - "apollo-cache": "1.1.18", - "apollo-link": "^1.0.0", - "apollo-link-dedup": "^1.0.0", - "apollo-utilities": "1.0.22", - "symbol-observable": "^1.0.2", - "zen-observable": "^0.8.0" + "apollo-utilities": "^1.1.0" }, "dependencies": { - "apollo-cache": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.18.tgz", - "integrity": "sha512-XZ17PxZw+FE75SKZcymsIqA5EetcmLxoHKXqvkGmWi4WZpVDX/hUoPTIUbRsGmHOfZfOokFviDOzOSnEdQo1Mw==", - "requires": { - "apollo-utilities": "^1.0.22" - } - }, "apollo-utilities": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.22.tgz", - "integrity": "sha512-6+78Woy+js6LrMrI/TS3Lbdti7D8LhgZnVANSGfsPqjVlEkMnl0p7XSfpEFfX69hDN04wf43+BnqgS2cgJkiMA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.1.0.tgz", + "integrity": "sha512-D3scmF6vJkCBECMasMEc0J9dNNHVULl6h2d7/oGJxWid1fgcAPHZJN5XLCZisuOfn0Dvvu3Unf/zK00Z3e49Qg==", "requires": { "fast-json-stable-stringify": "^2.0.0" } } } }, - "apollo-datasource": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.2.1.tgz", - "integrity": "sha512-r185+JTa5KuF1INeTAk7AEP76zwMN6c8Ph1lmpzJMNwBUEzTGnLClrccCskCBx4SxfnkdKbuQdwn9JwCJUWrdg==", - "dev": true, + "apollo-cache-inmemory": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.4.0.tgz", + "integrity": "sha512-gqwiZCApG+hRXEbtDrNIUtNcKKeO3RTih4mydJZRJpFp+PgBf8AZ2z4/uTJFFijmR9krmUWdCRfW1Aesb5+Ktg==", "requires": { - "apollo-server-caching": "0.2.1", - "apollo-server-env": "2.2.0" - } - }, - "apollo-engine-reporting": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.1.3.tgz", - "integrity": "sha512-VkjiifHMHIAxydXecT+ck0WtqpFIsMlylKnKeuNAXfIfAXHX/JYtLhbArTTyhDunLrphMiUewfFv9P0K+aX2jw==", - "dev": true, - "requires": { - "apollo-engine-reporting-protobuf": "0.1.0", - "apollo-server-env": "2.2.0", - "async-retry": "^1.2.1", - "graphql-extensions": "0.3.3", - "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==", - "dev": true, - "requires": { - "protobufjs": "^6.8.6" - } - }, - "apollo-env": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.2.5.tgz", - "integrity": "sha512-Gc7TEbwCl7jJVutnn8TWfzNSkrrqyoo0DP92BQJFU9pZbJhpidoXf2Sw1YwOJl82rRKH3ujM3C8vdZLOgpFcFA==", - "dev": true, - "requires": { - "core-js": "^3.0.0-beta.3", - "node-fetch": "^2.2.0" + "apollo-cache": "^1.1.23", + "apollo-utilities": "^1.1.0", + "optimism": "^0.6.8" }, "dependencies": { - "core-js": { - "version": "3.0.0-beta.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.0-beta.3.tgz", - "integrity": "sha512-kM/OfrnMThP5PwGAj5HhQLdjUqzjrllqN2EVnk/X9qrLsfYjR2hzZ+E/8CzH0xuosexZtqMTLQrk//BULrBj9w==", - "dev": true + "apollo-utilities": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.1.0.tgz", + "integrity": "sha512-D3scmF6vJkCBECMasMEc0J9dNNHVULl6h2d7/oGJxWid1fgcAPHZJN5XLCZisuOfn0Dvvu3Unf/zK00Z3e49Qg==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + } + } + }, + "apollo-client": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.9.tgz", + "integrity": "sha512-7IoIz+3hAk3166663ioyrsPdlTSAQa24HsJPVWw2QM/UE1wZTommu+uhwj9KugL6vpE/wyhyYgEs/9R7PlCsQA==", + "requires": { + "@types/async": "2.0.50", + "@types/zen-observable": "^0.8.0", + "apollo-cache": "1.1.23", + "apollo-link": "^1.0.0", + "apollo-link-dedup": "^1.0.0", + "apollo-utilities": "1.1.0", + "symbol-observable": "^1.0.2", + "zen-observable": "^0.8.0" + }, + "dependencies": { + "apollo-cache": { + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.23.tgz", + "integrity": "sha512-9FcavymJQdjaYX6of1xgjFmWp8UUCtlW/S9k5bfMMnMNAAQMDnuOFVEklawdSbyAhM4hh1kSymyt/r23K1tVSA==", + "requires": { + "apollo-utilities": "^1.1.0" + } + }, + "apollo-utilities": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.1.0.tgz", + "integrity": "sha512-D3scmF6vJkCBECMasMEc0J9dNNHVULl6h2d7/oGJxWid1fgcAPHZJN5XLCZisuOfn0Dvvu3Unf/zK00Z3e49Qg==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } } } }, "apollo-link": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.4.tgz", - "integrity": "sha512-B1z+9H2nTyWEhMXRFSnoZ1vSuAYP+V/EdUJvRx9uZ8yuIBZMm6reyVtr1n0BWlKeSFyPieKJy2RLzmITAAQAMQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.6.tgz", + "integrity": "sha512-sUNlA20nqIF3gG3F8eyMD+mO80fmf3dPZX+GUOs3MI9oZR8ug09H3F0UsWJMcpEg6h55Yy5wZ+BMmAjrbenF/Q==", "requires": { "apollo-utilities": "^1.0.0", - "zen-observable-ts": "^0.8.11" - } - }, - "apollo-link-context": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/apollo-link-context/-/apollo-link-context-1.0.10.tgz", - "integrity": "sha512-HX3BEmkANs2A8AcYCy92SFJrW+0SbGrhDTSHV6ZwKIJ9ZrsOtly8cMrRLzEw1emjHIz5SP7XJEn3ko7BwhBBSw==", - "dev": true, - "requires": { - "apollo-link": "^1.2.4" + "zen-observable-ts": "^0.8.13" } }, "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==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.13.tgz", + "integrity": "sha512-i4NuqT3DSFczFcC7NMUzmnYjKX7NggLY+rqYVf+kE9JjqKOQhT6wqhaWsVIABfIUGE/N0DTgYJBCMu/18aXmYA==", "requires": { - "apollo-link": "^1.2.3" + "apollo-link": "^1.2.6" + }, + "dependencies": { + "apollo-link": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.6.tgz", + "integrity": "sha512-sUNlA20nqIF3gG3F8eyMD+mO80fmf3dPZX+GUOs3MI9oZR8ug09H3F0UsWJMcpEg6h55Yy5wZ+BMmAjrbenF/Q==", + "requires": { + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.13" + } + }, + "zen-observable-ts": { + "version": "0.8.13", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.13.tgz", + "integrity": "sha512-WDb8SM0tHCb6c0l1k60qXWlm1ok3zN9U4VkLdnBKQwIYwUoB9psH7LIFgR+JVCCMmBxUgOjskIid8/N02k/2Bg==", + "requires": { + "zen-observable": "^0.8.0" + } + } } }, "apollo-link-http": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.7.tgz", - "integrity": "sha512-EZ9nynHjwYCpGYP5IsRrZGTWidUVpshk7MuSG4joqGtJMwpFCgMQz+y3BHdUhowHtfAd9z60XmeOTG9FJolb8A==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.9.tgz", + "integrity": "sha512-9tJy2zGm4Cm/1ycScDNZJe51dgnTSfKx7pKIgPZmcxkdDpgUY2DZitDH6ZBv4yp9z8MC9Xr9wgwc29s6hcadUQ==", "requires": { - "apollo-link": "^1.2.4", - "apollo-link-http-common": "^0.2.6" + "apollo-link": "^1.2.6", + "apollo-link-http-common": "^0.2.8" }, "dependencies": { "apollo-link-http-common": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.6.tgz", - "integrity": "sha512-LUOMWvrZuBP1hyWLBXyaW0KyFeKo79j+k3N+Q4HSkXKbLibnllXQ+JxxoSKGhm0bhREygiLtJAG9JnGlhxGO/Q==", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.8.tgz", + "integrity": "sha512-gGmXZN8mr7e9zjopzKQfZ7IKnh8H12NxBDzvp9nXI3U82aCVb72p+plgoYLcpMY8w6krvoYjgicFmf8LO20TCQ==", "requires": { - "apollo-link": "^1.2.4" + "apollo-link": "^1.2.6" } } } @@ -2116,153 +1872,15 @@ "apollo-link": "^1.2.3" } }, - "apollo-link-persisted-queries": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/apollo-link-persisted-queries/-/apollo-link-persisted-queries-0.2.2.tgz", - "integrity": "sha512-YL7XBu/5QsSbbYaWUXgm87T2Hn/2AQZk5Wr8CLXGDr3Wl3E/TRhBhKgQQTly9xhaTi7jgBO+AeIyTH5wCBHA9w==", - "dev": true, - "requires": { - "apollo-link": "^1.2.1", - "hash.js": "^1.1.3" - } - }, "apollo-link-state": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/apollo-link-state/-/apollo-link-state-0.4.2.tgz", "integrity": "sha512-xMPcAfuiPVYXaLwC6oJFIZrKgV3GmdO31Ag2eufRoXpvT0AfJZjdaPB4450Nu9TslHRePN9A3quxNueILlQxlw==", - "dev": true, "requires": { "apollo-utilities": "^1.0.8", "graphql-anywhere": "^4.1.0-alpha.0" } }, - "apollo-link-ws": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/apollo-link-ws/-/apollo-link-ws-1.0.10.tgz", - "integrity": "sha512-1Yx4iIUsWS8wuAdVJ2LF+LdIYAsqHSto8eShwJ/d2SovocsMCwN9hyS+JkaOPD/KHAkavTWzN6l3XwSOdOwevQ==", - "dev": true, - "requires": { - "apollo-link": "^1.2.4" - } - }, - "apollo-server-caching": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.2.1.tgz", - "integrity": "sha512-+U9F3X297LL8Gqy6ypfDNEv/DfV/tDht9Dr2z3AMaEkNW1bwO6rmdDL01zYxDuVDVq6Z3qSiNCSO2pXE2F0zmA==", - "dev": true, - "requires": { - "lru-cache": "^5.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - } - } - }, - "apollo-server-core": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.2.3.tgz", - "integrity": "sha512-sV+MDOmr+5THKKiKtinY0AJbvQrclocCidiIVV1H2EFDl61SGTklXsSukTHc/fDJFhOdIynMjbTJ3L/+6lf7Jw==", - "dev": true, - "requires": { - "@apollographql/apollo-tools": "^0.2.6", - "@apollographql/apollo-upload-server": "^5.0.3", - "@apollographql/graphql-playground-html": "^1.6.4", - "@types/ws": "^6.0.0", - "apollo-cache-control": "0.3.3", - "apollo-datasource": "0.2.1", - "apollo-engine-reporting": "0.1.3", - "apollo-server-caching": "0.2.1", - "apollo-server-env": "2.2.0", - "apollo-server-errors": "2.2.0", - "apollo-server-plugin-base": "0.1.3", - "apollo-tracing": "0.3.3", - "graphql-extensions": "0.3.3", - "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==", - "dev": true, - "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==", - "dev": true - }, - "apollo-server-express": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.2.3.tgz", - "integrity": "sha512-vyHRqxG7RSPo3wITjzN1Rm8MBkywZOPuPhESJhADZS3MTcX+FhPdnmuXMcem3CkLPpVezJk7Mf4C8yxykvehsQ==", - "dev": true, - "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.3", - "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.3", - "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-0.1.3.tgz", - "integrity": "sha512-+4PrBml5RG6GmKfkYcw8f92sSnM10gNgeLH6yKo89v9EhcMwHsjh6G5fjSLa8OPRratMV1hpO1FUNbiQS9Q5+Q==", - "dev": true - }, - "apollo-tracing": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.3.3.tgz", - "integrity": "sha512-gsTYgDVjtMlnomPq46aky7yk8XshCQfj9rxalCCismLlMomVW44fq+8GKQnZIkFOwiAsazRy4dzZ0cBbygA9sA==", - "dev": true, - "requires": { - "apollo-server-env": "2.2.0", - "graphql-extensions": "0.3.3" - } - }, - "apollo-upload-client": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/apollo-upload-client/-/apollo-upload-client-9.1.0.tgz", - "integrity": "sha512-ZN5gsbBjImEZTWWTUHpCEGDasnoBGbaODpznQ5EawyNHceuFYSNJbbft+ZZ841vZAcj9XZdKUKoaLBlMZ/r7nw==", - "dev": true, - "requires": { - "apollo-link": "^1.2.3", - "apollo-link-http-common": "^0.2.5", - "extract-files": "^4.0.0" - } - }, "apollo-utilities": { "version": "1.0.26", "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.26.tgz", @@ -2481,15 +2099,6 @@ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", "dev": true }, - "async-retry": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", - "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", - "dev": true, - "requires": { - "retry": "0.12.0" - } - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2710,12 +2319,6 @@ "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=", - "dev": true - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2910,21 +2513,6 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, - "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" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3105,42 +2693,6 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, - "busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", - "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", - "dev": true, - "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=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -3289,12 +2841,6 @@ "integrity": "sha512-x/E/SNwD80I0bT+fF9Y3Kbwo7Xd1xSafCAmFlpJmaVg3SQoJJOH4Ivb9fi9S0WjfqewQ6Ydt1zEVZpmMVYNeDA==", "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 - }, "case-sensitive-paths-webpack-plugin": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.2.tgz", @@ -3575,12 +3121,6 @@ } } }, - "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", @@ -3851,20 +3391,6 @@ "typedarray": "^0.0.6" } }, - "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" - } - }, "connect-history-api-fallback": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", @@ -4014,16 +3540,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, "cosmiconfig": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.7.tgz", @@ -4058,15 +3574,6 @@ "elliptic": "^6.0.0" } }, - "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" - } - }, "create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", @@ -4131,12 +3638,6 @@ "randomfill": "^1.0.3" } }, - "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 - }, "css-color-names": { "version": "0.0.4", "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", @@ -4517,12 +4018,6 @@ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", "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", @@ -4676,12 +4171,6 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "deprecated-decorator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", - "integrity": "sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=", - "dev": true - }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -4704,42 +4193,6 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, - "dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", - "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", - "dev": true, - "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=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", @@ -4904,12 +4357,6 @@ "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 - }, "duplexify": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", @@ -5172,12 +4619,6 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, - "esm": { - "version": "3.0.84", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.0.84.tgz", - "integrity": "sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw==", - "dev": true - }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", @@ -5471,12 +4912,6 @@ } } }, - "extract-files": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-4.1.0.tgz", - "integrity": "sha512-2gjdb3dVzr1ie9+K8pupPTnsNkK4qmzbTFOIxghiWoh6nCTajGCGC72ZNYX0nBWy5IOq1FXfRVgvkkLqqE4sdw==", - "dev": true - }, "extract-zip": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", @@ -6645,15 +6080,6 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", "dev": true }, - "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": "11.9.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", @@ -6692,33 +6118,6 @@ "minimatch": "~3.0.2" } }, - "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" - }, - "dependencies": { - "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 - } - } - }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -6732,58 +6131,35 @@ "dev": true }, "graphql": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", - "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", - "dev": true, + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.1.1.tgz", + "integrity": "sha512-C5zDzLqvfPAgTtP8AUPIt9keDabrdRAqSWjj2OPRKrKxI9Fb65I36s1uCs1UUBFnSWTdO7hyHi7z1ZbwKMKF6Q==", "requires": { "iterall": "^1.2.2" } }, "graphql-anywhere": { - "version": "4.1.23", - "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.1.23.tgz", - "integrity": "sha512-8wtmwxWmLzAy52Z4WAw9UiYZ4ViiNXM+2DMOSlg2F7WsVstD0v75uOjCLJQUvbld5kHrgzTxter/THFVkGL+Yw==", - "dev": true, + "version": "4.1.25", + "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.1.25.tgz", + "integrity": "sha512-6XgTH+3n2R+xhmfFMM37tIUyZPy7Q7/TA4H37m0x6dN/UtsDiGs4jfH1upCIiHc8eKtJ0leyadhFIiXqNB4KzA==", "requires": { - "apollo-utilities": "^1.0.26" - } - }, - "graphql-extensions": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.3.3.tgz", - "integrity": "sha512-pudOaHq7Ok+rh1ElzlqFaoYZWGefUNsqn/jX6eKns7rl0VHuB4qZBfhpVLTpquJpM6Y19/hsCYZNPfnUVMFIiA==", - "dev": true, - "requires": { - "@apollographql/apollo-tools": "^0.2.6" - } - }, - "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==", - "dev": true, - "requires": { - "iterall": "^1.2.1" + "apollo-utilities": "^1.1.0" + }, + "dependencies": { + "apollo-utilities": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.1.0.tgz", + "integrity": "sha512-D3scmF6vJkCBECMasMEc0J9dNNHVULl6h2d7/oGJxWid1fgcAPHZJN5XLCZisuOfn0Dvvu3Unf/zK00Z3e49Qg==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + } } }, "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==", - "dev": true, - "requires": { - "apollo-link": "^1.2.3", - "apollo-utilities": "^1.0.1", - "deprecated-decorator": "^0.1.6", - "iterall": "^1.1.3", - "uuid": "^3.1.0" - } + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.1.tgz", + "integrity": "sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==" }, "growl": { "version": "1.9.2", @@ -7298,12 +6674,6 @@ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "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 - }, "immutable-tuple": { "version": "0.4.9", "resolved": "https://registry.npmjs.org/immutable-tuple/-/immutable-tuple-0.4.9.tgz", @@ -7362,12 +6732,6 @@ } } }, - "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 - }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -7479,12 +6843,6 @@ "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 - }, "internal-ip": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", @@ -7705,22 +7063,6 @@ "is-extglob": "^2.1.1" } }, - "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": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -7781,12 +7123,6 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, - "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", @@ -7807,12 +7143,6 @@ "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", @@ -8160,15 +7490,6 @@ "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" - } - }, "launch-editor": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.2.1.tgz", @@ -8248,9 +7569,9 @@ } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "lodash._arraycopy": { "version": "3.0.0", @@ -8521,12 +7842,6 @@ "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", "dev": true }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "dev": true - }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -8557,12 +7872,6 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, - "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", @@ -8581,12 +7890,6 @@ "pify": "^3.0.0" } }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -9356,12 +8659,6 @@ "lower-case": "^1.1.1" } }, - "node-fetch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", - "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==", - "dev": true - }, "node-forge": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", @@ -9526,35 +8823,6 @@ } } }, - "nodemon": { - "version": "1.18.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.7.tgz", - "integrity": "sha512-xuC1V0F5EcEyKQ1VhHYD13owznQbUw29JKvZ8bVH7TmuvVNHvvbp9pLgE4PjTMRJVe0pJ8fGRvwR2nMiosIsPQ==", - "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.2", - "semver": "^5.5.0", - "supports-color": "^5.2.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.2", - "update-notifier": "^2.3.0" - }, - "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" - } - } - } - }, "nodent-runtime": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", @@ -9689,12 +8957,6 @@ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, - "object-path": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz", - "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=", - "dev": true - }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -10040,18 +9302,6 @@ "thunkify": "~2.1.1" } }, - "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" - } - }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", @@ -10830,12 +10080,6 @@ "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 - }, "prettier": { "version": "1.13.7", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", @@ -10895,27 +10139,6 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "dev": true, - "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", @@ -10982,12 +10205,6 @@ "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", "dev": true }, - "pstree.remy": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.2.tgz", - "integrity": "sha512-vL6NLxNHzkNTjGJUpMm5PLC+94/0tTlC1vkP9bdU0pOHih+EujMjgMTwfZopZvHWRFbqJ5Y73OMoau50PewDDA==", - "dev": true - }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -11265,18 +10482,6 @@ "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" - } - }, "read-pkg": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", @@ -11492,25 +10697,6 @@ "resolved": "https://registry.npmjs.org/register-service-worker/-/register-service-worker-1.5.2.tgz", "integrity": "sha512-XNqSZHJsFGnvEGkg/2IrCp6G8Ya3qLj4mq0bSHil/dfdO82LOxGnMnJjAD9MYCvf/8cDCO8pL+1i65yzmP7rPQ==" }, - "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.4.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", @@ -11743,12 +10929,6 @@ "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=", - "dev": true - }, "rgb-regex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", @@ -12031,15 +11211,6 @@ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, - "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", @@ -12738,12 +11909,6 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, - "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=", - "dev": true - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -12826,12 +11991,6 @@ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", "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 - }, "stylehacks": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.1.tgz", @@ -12856,30 +12015,6 @@ } } }, - "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==", - "dev": true, - "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==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -12948,49 +12083,6 @@ "is2": "2.0.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" - }, - "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" - } - }, - "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" - } - }, - "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 - } - } - }, "terser": { "version": "3.10.12", "resolved": "https://registry.npmjs.org/terser/-/terser-3.10.12.tgz", @@ -13189,9 +12281,9 @@ } }, "throttle-debounce": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.0.1.tgz", - "integrity": "sha512-Sr6jZBlWShsAaSXKyNXyNicOrJW/KtkDqIEwHt4wYwWA2wa/q67Luhqoujg48V8hTk60wB56tYrJJn6jc2R7VA==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.1.0.tgz", + "integrity": "sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg==" }, "through2": { "version": "2.0.5", @@ -13215,12 +12307,6 @@ "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", "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 - }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -13307,26 +12393,6 @@ "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", "dev": true }, - "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" - }, - "dependencies": { - "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" - } - } - } - }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -13394,30 +12460,6 @@ "semver": "^5.0.1" } }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - } - } - }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -13684,32 +12726,6 @@ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "optional": true }, - "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" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -13802,15 +12818,6 @@ "imurmurhash": "^0.1.4" } }, - "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" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -13874,36 +12881,12 @@ } } }, - "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" - } - }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -13991,15 +12974,6 @@ "requires-port": "^1.0.0" } }, - "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", @@ -14109,9 +13083,9 @@ "integrity": "sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ==" }, "vue-apollo": { - "version": "3.0.0-beta.26", - "resolved": "https://registry.npmjs.org/vue-apollo/-/vue-apollo-3.0.0-beta.26.tgz", - "integrity": "sha512-nWaPoKBGq1NR8g6kBnLy5yCCcoHkaxWQwPrY7vCcoBgYU8ZmA0czYN1na7hurtWLZdEiMC6B9LbaJWc+FRcUEA==", + "version": "3.0.0-beta.27", + "resolved": "https://registry.npmjs.org/vue-apollo/-/vue-apollo-3.0.0-beta.27.tgz", + "integrity": "sha512-0NcYSLReOI5vsZesX9rLVVKR8iZaJRAKsBG7eAUJ4RRIDzYBVpPET8C7v9oyhHymENN/FhImurq/krTk8z9ZYw==", "requires": { "chalk": "^2.4.1", "throttle-debounce": "^2.0.0" @@ -14122,59 +13096,6 @@ "resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-6.3.2.tgz", "integrity": "sha512-cH208IoM+jgZyEf/g7mnFyofwPDJTM/QvBNhYMjqGB8fCsRyTf68rH2ISw/G20tJv+5mIThQ3upKwoL4jLTr1A==" }, - "vue-cli-plugin-apollo": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.17.4.tgz", - "integrity": "sha512-3bB+Vc4kqvZYF8NW9D77HcIQpqwfLM3MvQEDjRvKEFeN+ZdJ9jtmcg+CUPm7li6xMkYWyFJcOSyI8kMYRfYFcw==", - "dev": true, - "requires": { - "apollo-cache-inmemory": "^1.3.9", - "apollo-client": "^2.4.5", - "apollo-link": "^1.2.3", - "apollo-link-context": "^1.0.9", - "apollo-link-persisted-queries": "^0.2.1", - "apollo-link-state": "^0.4.2", - "apollo-link-ws": "^1.0.9", - "apollo-server-express": "^2.2.0", - "apollo-upload-client": "^9.1.0", - "apollo-utilities": "^1.0.25", - "chalk": "^2.4.1", - "deepmerge": "^2.2.1", - "esm": "^3.0.84", - "execa": "^1.0.0", - "express": "^4.16.4", - "graphql": "^14.0.2", - "graphql-subscriptions": "^1.0.0", - "nodemon": "^1.18.6", - "subscriptions-transport-ws": "^0.9.15", - "ts-node": "^7.0.1" - }, - "dependencies": { - "@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==", - "dev": true, - "optional": true - }, - "apollo-client": { - "version": "2.4.7", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.4.7.tgz", - "integrity": "sha512-6aAm+16AFBYZhJF8eKxrup6AbYni01InDiwTfZhMMTP2xaXQWjsQnfaHbI2oE+hd3+AZFy1drkse8RZKghR/WQ==", - "dev": true, - "requires": { - "@types/async": "2.0.50", - "@types/zen-observable": "^0.8.0", - "apollo-cache": "1.1.21", - "apollo-link": "^1.0.0", - "apollo-link-dedup": "^1.0.0", - "apollo-utilities": "1.0.26", - "symbol-observable": "^1.0.2", - "zen-observable": "^0.8.0" - } - } - } - }, "vue-gettext": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/vue-gettext/-/vue-gettext-2.1.1.tgz", @@ -14792,15 +13713,6 @@ "string-width": "^1.0.2 || 2" } }, - "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" - } - }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", @@ -15088,17 +14000,6 @@ "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" - } - }, "ws": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz", @@ -15108,12 +14009,6 @@ "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 - }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -15187,12 +14082,6 @@ "fd-slicer": "~1.0.1" } }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, "yorkie": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yorkie/-/yorkie-2.0.0.tgz", @@ -15251,9 +14140,9 @@ "integrity": "sha512-Y9kPzjGvIZ5jchSlqlCpBW3I82zBBL4z+ulXDRVA1NwsKzjt5kwAi+gOYIy0htNkfuehGZZtP5mRXHRV6TjDWw==" }, "zen-observable-ts": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.11.tgz", - "integrity": "sha512-8bs7rgGV4kz5iTb9isudkuQjtWwPnQ8lXq6/T76vrepYZVMsDEv6BXaEA+DHdJSK3KVLduagi9jSpSAJ5NgKHw==", + "version": "0.8.13", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.13.tgz", + "integrity": "sha512-WDb8SM0tHCb6c0l1k60qXWlm1ok3zN9U4VkLdnBKQwIYwUoB9psH7LIFgR+JVCCMmBxUgOjskIid8/N02k/2Bg==", "requires": { "zen-observable": "^0.8.0" } diff --git a/js/package.json b/js/package.json index 38ed08c1..eeec4ed9 100644 --- a/js/package.json +++ b/js/package.json @@ -12,16 +12,20 @@ }, "dependencies": { "apollo-absinthe-upload-link": "^1.4.0", - "apollo-cache-inmemory": "^1.3.11", - "apollo-link": "^1.2.4", - "apollo-link-http": "^1.5.7", + "apollo-cache-inmemory": "^1.4.0", + "apollo-client": "^2.4.9", + "apollo-link": "^1.2.6", + "apollo-link-http": "^1.5.9", + "apollo-link-state": "^0.4.2", "easygettext": "^2.7.0", - "graphql-tag": "^2.9.0", + "graphql": "^14.1.1", + "graphql-tag": "^2.10.1", + "lodash": "^4.17.11", "material-design-icons": "^3.0.1", "ngeohash": "^0.6.3", "register-service-worker": "^1.4.1", "vue": "^2.5.17", - "vue-apollo": "^3.0.0-beta.26", + "vue-apollo": "^3.0.0-beta.27", "vue-class-component": "^6.3.2", "vue-gettext": "^2.1.1", "vue-gravatar": "^1.3.0", @@ -34,6 +38,7 @@ }, "devDependencies": { "@types/chai": "^4.1.0", + "@types/lodash": "^4.14.120", "@types/mocha": "^5.2.4", "@vue/cli-plugin-babel": "^3.1.1", "@vue/cli-plugin-e2e-nightwatch": "^3.1.1", @@ -49,7 +54,6 @@ "sass-loader": "^7.1.0", "tslint-config-airbnb": "^5.11.1", "typescript": "^3.0.0", - "vue-cli-plugin-apollo": "^0.17.4", "vue-template-compiler": "^2.5.17", "webpack-bundle-analyzer": "^3.0.3" }, diff --git a/js/src/App.vue b/js/src/App.vue index 3aefce0a..bd3b4b16 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -98,7 +98,7 @@ direction="top" open-on-hover transition="scale-transition" - v-if="user" + v-if="currentUser" > import NavBar from '@/components/NavBar.vue'; import { Component, Vue } from 'vue-property-decorator'; -import { AUTH_USER_ACTOR, AUTH_USER_ID } from '@/constants'; +import { AUTH_TOKEN, AUTH_USER_ACTOR, AUTH_USER_EMAIL, AUTH_USER_ID } from '@/constants'; +import { CURRENT_USER_CLIENT, UPDATE_CURRENT_USER_CLIENT } from '@/graphql/user'; +import { ICurrentUser } from '@/types/current-user.model' @Component({ + apollo: { + currentUser: { + query: CURRENT_USER_CLIENT + } + }, components: { NavBar, }, @@ -162,7 +169,6 @@ import { AUTH_USER_ACTOR, AUTH_USER_ID } from '@/constants'; export default class App extends Vue { drawer = false; fab = false; - user = localStorage.getItem(AUTH_USER_ID); items = [ { icon: 'poll', text: 'Events', route: 'EventList', role: null, @@ -183,9 +189,14 @@ export default class App extends Vue { show: false, text: '', }; + currentUser!: ICurrentUser; actor = localStorage.getItem(AUTH_USER_ACTOR); + mounted () { + this.initializeCurrentUser() + } + get displayed_name () { // FIXME: load actor return 'no implemented'; @@ -199,12 +210,28 @@ export default class App extends Vue { } getUser () { - return this.user === undefined ? false : this.user; + return this.currentUser.id ? this.currentUser : false; } toggleDrawer () { this.drawer = !this.drawer; } + + private initializeCurrentUser() { + const userId = localStorage.getItem(AUTH_USER_ID); + const userEmail = localStorage.getItem(AUTH_USER_EMAIL); + const token = localStorage.getItem(AUTH_TOKEN); + + if (userId && userEmail && token) { + return this.$apollo.mutate({ + mutation: UPDATE_CURRENT_USER_CLIENT, + variables: { + id: userId, + email: userEmail, + }, + }); + } + } } diff --git a/js/src/apollo/user.ts b/js/src/apollo/user.ts new file mode 100644 index 00000000..0aea7045 --- /dev/null +++ b/js/src/apollo/user.ts @@ -0,0 +1,25 @@ +export const currentUser = { + defaults: { + currentUser: { + __typename: 'CurrentUser', + id: null, + email: null, + }, + }, + + resolvers: { + Mutation: { + updateCurrentUser: (_, { id, email }, { cache }) => { + const data = { + currentUser: { + id, + email, + __typename: 'CurrentUser', + }, + }; + + cache.writeData({ data }); + }, + }, + }, +}; diff --git a/js/src/components/Account/Login.vue b/js/src/components/Account/Login.vue index 731d2866..f6b2b294 100644 --- a/js/src/components/Account/Login.vue +++ b/js/src/components/Account/Login.vue @@ -67,6 +67,8 @@ import { validateEmailField, validateRequiredField } from '@/utils/validators'; import { saveUserData } from '@/utils/auth'; import { ILogin } from '@/types/login.model' + import { UPDATE_CURRENT_USER_CLIENT } from '@/graphql/user' + import { onLogin } from '@/vue-apollo' @Component({ components: { @@ -123,6 +125,17 @@ }); saveUserData(result.data.login); + + await this.$apollo.mutate({ + mutation: UPDATE_CURRENT_USER_CLIENT, + variables: { + id: result.data.login.user.id, + email: this.credentials.email, + } + }); + + onLogin(this.$apollo); + this.$router.push({ name: 'Home' }); } catch (err) { console.error(err); diff --git a/js/src/components/Home.vue b/js/src/components/Home.vue index 8f923d49..0615fad0 100644 --- a/js/src/components/Home.vue +++ b/js/src/components/Home.vue @@ -5,7 +5,7 @@ src="https://picsum.photos/1200/900" dark height="300" - v-if="!user" + v-if="!currentUser.id" > @@ -88,12 +88,17 @@ import { AUTH_USER_ACTOR, AUTH_USER_ID } from '@/constants'; import { FETCH_EVENTS } from '@/graphql/event'; import { Component, Vue } from 'vue-property-decorator'; + import { ICurrentUser } from '@/types/current-user.model'; + import { CURRENT_USER_CLIENT } from '@/graphql/user'; @Component({ apollo: { events: { query: FETCH_EVENTS, }, + currentUser: { + query: CURRENT_USER_CLIENT, + }, }, }) export default class Home extends Vue { @@ -109,7 +114,7 @@ country = { name: null }; // FIXME: correctly parse local storage actor = JSON.parse(localStorage.getItem(AUTH_USER_ACTOR) || '{}'); - user = localStorage.getItem(AUTH_USER_ID); + currentUser!: ICurrentUser; get displayed_name() { return this.actor.name === null ? this.actor.preferredUsername : this.actor.name; @@ -126,7 +131,7 @@ geoLocalize() { const router = this.$router; - const sessionCity = sessionStorage.getItem('City') + const sessionCity = sessionStorage.getItem('City'); if (sessionCity) { router.push({ name: 'EventList', params: { location: sessionCity } }); } else { diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index ba372745..42728fd7 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -46,12 +46,15 @@ + + Logout + @@ -83,7 +86,7 @@ - + Login @@ -96,11 +99,14 @@ diff --git a/js/src/constants.ts b/js/src/constants.ts index 32e85cdf..9ccb54d2 100644 --- a/js/src/constants.ts +++ b/js/src/constants.ts @@ -1,3 +1,4 @@ export const AUTH_TOKEN = 'auth-token'; export const AUTH_USER_ID = 'auth-user-id'; +export const AUTH_USER_EMAIL = 'auth-user-email'; export const AUTH_USER_ACTOR = 'auth-user-actor'; diff --git a/js/src/graphql/user.ts b/js/src/graphql/user.ts index 4c714fbf..9031370e 100644 --- a/js/src/graphql/user.ts +++ b/js/src/graphql/user.ts @@ -19,3 +19,18 @@ mutation ValidateUser($token: String!) { } } `; + +export const CURRENT_USER_CLIENT = gql` +query { + currentUser @client { + id, + email + } +} +`; + +export const UPDATE_CURRENT_USER_CLIENT = gql` +mutation UpdateCurrentUser($id: Int!, $email: String!) { + updateCurrentUser(id: $id, email: $email) @client +} +` diff --git a/js/src/main.ts b/js/src/main.ts index e19967a2..69290872 100644 --- a/js/src/main.ts +++ b/js/src/main.ts @@ -9,8 +9,7 @@ import 'material-design-icons/iconfont/material-icons.css'; import 'vuetify/dist/vuetify.min.css'; import App from '@/App.vue'; import router from '@/router'; -// import store from './store'; -import { createProvider } from './vue-apollo'; +import { apolloProvider } from './vue-apollo'; const translations = require('@/i18n/translations.json'); @@ -36,6 +35,6 @@ new Vue({ router, el: '#app', template: '', - apolloProvider: createProvider(), + apolloProvider, components: { App }, }); diff --git a/js/src/types/current-user.model.ts b/js/src/types/current-user.model.ts new file mode 100644 index 00000000..394776ae --- /dev/null +++ b/js/src/types/current-user.model.ts @@ -0,0 +1,4 @@ +export interface ICurrentUser { + id: number, + email: string, +} diff --git a/js/src/types/login.model.ts b/js/src/types/login.model.ts index 1ed4b2c4..d3d3335e 100644 --- a/js/src/types/login.model.ts +++ b/js/src/types/login.model.ts @@ -1,7 +1,7 @@ +import { ICurrentUser } from '@/types/current-user.model'; + export interface ILogin { - user: { - id: number, - }, + user: ICurrentUser, token: string, } diff --git a/js/src/utils/auth.ts b/js/src/utils/auth.ts index cc9146da..0592696c 100644 --- a/js/src/utils/auth.ts +++ b/js/src/utils/auth.ts @@ -1,7 +1,14 @@ -import { AUTH_TOKEN, AUTH_USER_ID } from '@/constants'; +import { AUTH_TOKEN, AUTH_USER_EMAIL, AUTH_USER_ID } from '@/constants'; import { ILogin } from '@/types/login.model'; export function saveUserData(obj: ILogin) { localStorage.setItem(AUTH_USER_ID, `${obj.user.id}`); + localStorage.setItem(AUTH_USER_EMAIL, obj.user.email); localStorage.setItem(AUTH_TOKEN, obj.token); } + +export function deleteUserData() { + for (const key of [ AUTH_USER_ID, AUTH_USER_EMAIL, AUTH_TOKEN ]) { + localStorage.removeItem(key); + } +} diff --git a/js/src/vue-apollo.ts b/js/src/vue-apollo.ts index beb57297..25d7e6b1 100644 --- a/js/src/vue-apollo.ts +++ b/js/src/vue-apollo.ts @@ -3,9 +3,13 @@ import VueApollo from 'vue-apollo'; import { ApolloLink } from 'apollo-link'; import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemory'; import { createLink } from 'apollo-absinthe-upload-link'; -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client'; import { AUTH_TOKEN } from './constants'; import { GRAPHQL_API_ENDPOINT, GRAPHQL_API_FULL_PATH } from './api/_entrypoint'; +import { withClientState } from 'apollo-link-state'; +import { currentUser } from '@/apollo/user'; +import merge from 'lodash/merge'; +import { ApolloClient } from 'apollo-client'; +import { DollarApollo } from 'vue-apollo/types/vue-apollo'; // Install the vue plugin Vue.use(VueApollo); @@ -51,82 +55,40 @@ const uploadLink = createLink({ uri: httpEndpoint, }); -// const link = ApolloLink.from([ -// uploadLink, -// authMiddleware, -// HttpLink, -// ]); +const stateLink = withClientState({ + ...merge(currentUser), + cache, +}); -const link = authMiddleware.concat(uploadLink); +const link = stateLink.concat(authMiddleware).concat(uploadLink); -// Config -const defaultOptions = { +const apolloClient = new ApolloClient({ cache, link, - // You can use `https` for secure connection (recommended in production) - httpEndpoint, - // You can use `wss` for secure connection (recommended in production) - // Use `null` to disable subscriptions - // wsEndpoint: process.env.VUE_APP_GRAPHQL_WS || 'ws://localhost:4000/graphql', - // LocalStorage token - tokenName: AUTH_TOKEN, - // Enable Automatic Query persisting with Apollo Engine - persisting: false, - // Use websockets for everything (no HTTP) - // You need to pass a `wsEndpoint` for this to work - websocketsOnly: false, - // Is being rendered on the server? - ssr: false, - defaultHttpLink: false, connectToDevTools: true, -}; +}); -// Call this in the Vue app file -export function createProvider(options = {}) { - // Create apollo client - const { apolloClient, wsClient } = createApolloClient({ - ...defaultOptions, - ...options, - }); - apolloClient.wsClient = wsClient; +apolloClient.onResetStore(stateLink.writeDefaults as any); - // Create vue apollo provider - return new VueApollo({ - defaultClient: apolloClient, - // defaultOptions: { - // $query: { - // fetchPolicy: 'cache-and-network', - // }, - // }, - errorHandler(error) { - // eslint-disable-next-line no-console - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message); - }, - }); -} +export const apolloProvider = new VueApollo({ + defaultClient: apolloClient, + errorHandler(error) { + // eslint-disable-next-line no-console + console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message); + }, +}); // Manually call this when user log in -export async function onLogin(apolloClient, token) { - if (typeof localStorage !== 'undefined' && token) { - localStorage.setItem(AUTH_TOKEN, token); - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient); - try { - await apolloClient.resetStore(); - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (login)', 'color: orange;', e.message); - } +export function onLogin(apolloClient) { + // if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient); } // Manually call this when user log out -export async function onLogout(apolloClient) { - if (typeof localStorage !== 'undefined') { - localStorage.removeItem(AUTH_TOKEN); - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient); +export async function onLogout(apolloClient: DollarApollo) { + // if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient); + try { - await apolloClient.resetStore(); + await apolloClient.provider.defaultClient.resetStore(); } catch (e) { // eslint-disable-next-line no-console console.log('%cError on cache reset (logout)', 'color: orange;', e.message); diff --git a/js/vue.config.js b/js/vue.config.js index 8edae71f..b7608155 100644 --- a/js/vue.config.js +++ b/js/vue.config.js @@ -9,5 +9,14 @@ module.exports = { plugins: [ new Dotenv({ path: path.resolve(process.cwd(), '../.env') }), ], + module: { + rules: [ // fixes https://github.com/graphql/graphql-js/issues/1272 + { + test: /\.mjs$/, + include: /node_modules/, + type: 'javascript/auto', + }, + ], + }, }, };