From 2b190f2d7105d7b3b40abc0409e2581d6a69ac1f Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 20 Feb 2018 14:30:36 -0300 Subject: [PATCH 01/40] POC - YT oauth --- .../.npm/package/.gitignore | 1 + .../rocketchat-livestream/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 140 ++++++++++++++++++ .../client/views/liveStreamTab.html | 1 + .../client/views/liveStreamTab.js | 11 ++ packages/rocketchat-livestream/package.js | 5 + .../server/functions/listYoutubeActivities.js | 64 ++++++++ .../rocketchat-livestream/server/settings.js | 14 +- 8 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 packages/rocketchat-livestream/.npm/package/.gitignore create mode 100644 packages/rocketchat-livestream/.npm/package/README create mode 100644 packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json create mode 100644 packages/rocketchat-livestream/server/functions/listYoutubeActivities.js diff --git a/packages/rocketchat-livestream/.npm/package/.gitignore b/packages/rocketchat-livestream/.npm/package/.gitignore new file mode 100644 index 0000000000000..3c3629e647f5d --- /dev/null +++ b/packages/rocketchat-livestream/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/rocketchat-livestream/.npm/package/README b/packages/rocketchat-livestream/.npm/package/README new file mode 100644 index 0000000000000..3d492553a438e --- /dev/null +++ b/packages/rocketchat-livestream/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json new file mode 100644 index 0000000000000..3636aca2c6748 --- /dev/null +++ b/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,140 @@ +{ + "lockfileVersion": 1, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==" + }, + "axios": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "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=" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=" + }, + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==" + }, + "google-auth-library": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.2.1.tgz", + "integrity": "sha512-+7AePCXe5MCE3ROzxrlgqdSj4pah5eCTey+915J1dZK87vfBlasVxeclxw9/Onglga9R5rqK6mFp5IbolUD+oQ==" + }, + "google-p12-pem": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.0.tgz", + "integrity": "sha512-tqu8IJF307iH8vXQEI5ZhuIk89vAf25rmoyoenckm/zY7Elzm4X/x6OPOk4wa3sRzkA/Y2CkubpvLxSEgIEQcg==" + }, + "googleapis": { + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-25.0.0.tgz", + "integrity": "sha512-hIP2VbwFliL7YHZQRaJrw5+ctunALJUior4KEw0vCYlcDezPnEA+HhTY2oq4I3PCHBKxKwc9xfV37Kkz6e/krw==" + }, + "gtoken": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.1.0.tgz", + "integrity": "sha512-r/dh/cVgPBWHcskq03KOSDl+L+0Ac0B8VEhpIbnrcsvHSJHdkEtwbC0lOZNxBIqWbM1+HNig8jpuCwKJzCcilg==" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=" + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==" + }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node-forge": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", + "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string-template": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", + "integrity": "sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } +} diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.html b/packages/rocketchat-livestream/client/views/liveStreamTab.html index 7ecad50cad6c6..cc8ce50b21039 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.html +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.html @@ -50,4 +50,5 @@ {{/if}} {{/if}} + diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index f888906dd144c..c5e8f32af0e8d 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -167,5 +167,16 @@ Template.liveStreamTab.events({ onCloseCallback: () => i.popoutOpen.set(false) }); i.popoutOpen.set(true); + }, + 'click .js-broadcast'(e) { + e.preventDefault(); + console.log('call broadcast stuff'); + Meteor.call('listYoutubeActivities', function(err, result) { + if (err) { + return handleError(err); + } + console.log('list youtube activities'); + console.log(result); + }); } }); diff --git a/packages/rocketchat-livestream/package.js b/packages/rocketchat-livestream/package.js index d145d7e95d554..06765529ceb98 100644 --- a/packages/rocketchat-livestream/package.js +++ b/packages/rocketchat-livestream/package.js @@ -23,6 +23,11 @@ Package.onUse(function(api) { api.addFiles([ 'server/models/Rooms.js', 'server/functions/saveStreamingOptions.js', + 'server/functions/listYoutubeActivities.js', 'server/settings.js' ], 'server'); + + Npm.depends({ + 'googleapis': '25.0.0' + }); }); diff --git a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js new file mode 100644 index 0000000000000..c89a650ebcd77 --- /dev/null +++ b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js @@ -0,0 +1,64 @@ +import google from 'googleapis'; + +const getAccessToken = (cb) => { + const OAuth2 = google.auth.OAuth2; + const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/_oauth/youtube'); + console.log(clientAuth); + const url = clientAuth.generateAuthUrl({ + access_type: 'offline', + scope: ['https://www.googleapis.com/auth/youtube'] + }); + + console.log(url); + clientAuth.getToken('4/AABpItSMNRCHhufOL7fhH9j23b4f_mO9cRo62BSTtSHQGHLCPKJ5x3jG_2vWyItVNX3iXK8vIIWCkWUxOEEnn0Y#', (err, tokens) => { + console.log('getting token', err, tokens); + if (err) { + return cb(err); + } + // set tokens to the client + // TODO: tokens should be set by OAuth2 client. + console.log(tokens); + clientAuth.setCredentials(tokens); + cb(clientAuth); + }); +}; + + +Meteor.methods({ + 'listYoutubeActivities'() { + console.log('inside method'); + return getAccessToken((clientAuth) => { + google.youtube('v3').activities.list({ + auth: clientAuth, + part: 'snippet', + mine: true, + key: RocketChat.settings.get('Broadcasting_api_key') + }, (err, result) => { + console.log(err, result); + return result; + }); + }); + // + + + } +}); + + +// RocketChat.listYoutubeActivities = function() { +// const OAuth2 = google.auth.OAuth2; +// const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/_oauth/youtube'); +// console.log(clientAuth); +// const url = clientAuth.generateAuthUrl({ +// access_type: 'offline', +// scope: ['https://www.googleapis.com/auth/youtube.readonly'] +// }); +// +// google.youtube.activities.list({ +// auth: clientAuth, +// params: { part: 'snippet' } +// }, (err, result) => { +// console.log(err, result); +// return result; +// }); +// }; diff --git a/packages/rocketchat-livestream/server/settings.js b/packages/rocketchat-livestream/server/settings.js index 4ef3103d4c688..61dd3888e6757 100644 --- a/packages/rocketchat-livestream/server/settings.js +++ b/packages/rocketchat-livestream/server/settings.js @@ -1,10 +1,22 @@ Meteor.startup(function() { - RocketChat.settings.addGroup('LiveStream', function() { + RocketChat.settings.addGroup('LiveStream & Broadcasting', function() { this.add('Livestream_enabled', false, { type: 'boolean', i18nLabel: 'Enabled', public: true, alert: 'This feature is currently in beta! Please report bugs to github.com/RocketChat/Rocket.Chat/issues' }); + this.add('Broadcasting_enabled', false, { + type: 'boolean', + i18nLabel: 'Enabled', + public: true, + alert: 'This feature is currently in beta! Please report bugs to github.com/RocketChat/Rocket.Chat/issues', + enableQuery: { _id: 'Livestream_enabled', value: true } + }); + + this.add('Broadcasting_client_id', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); + this.add('Broadcasting_client_secret', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); + this.add('Broadcasting_api_key', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); + }); }); From ff69f6983a2a61fb9e6502e715e7f73d3f8f26ef Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Fri, 2 Mar 2018 17:39:13 -0300 Subject: [PATCH 02/40] youtube auth --- .../server/functions/listYoutubeActivities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js index c89a650ebcd77..aef8db1df8d19 100644 --- a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js +++ b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js @@ -10,14 +10,14 @@ const getAccessToken = (cb) => { }); console.log(url); - clientAuth.getToken('4/AABpItSMNRCHhufOL7fhH9j23b4f_mO9cRo62BSTtSHQGHLCPKJ5x3jG_2vWyItVNX3iXK8vIIWCkWUxOEEnn0Y#', (err, tokens) => { + clientAuth.getToken('4/AAB557E2T6uXKyyL-33xSOJSJYVIlqideioO_PH6RyCqMdUArU4xcFEm-w-drT5ICqjOBIZ2sb2W4U93elgDIUI#', (err, tokens) => { console.log('getting token', err, tokens); if (err) { return cb(err); } // set tokens to the client // TODO: tokens should be set by OAuth2 client. - console.log(tokens); + // console.log(tokens); clientAuth.setCredentials(tokens); cb(clientAuth); }); From cfef679d898e9f37b45e343b04e5ec10b9f470b9 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Wed, 7 Mar 2018 20:07:27 -0300 Subject: [PATCH 03/40] livestream from broadcast tab --- package-lock.json | 144 +-- .../.app/package-lock.json | 874 ++++++++++++++++++ .../.npm/package/npm-shrinkwrap.json | 375 +++++++- .../client/views/broadcastView.html | 6 + .../client/views/broadcastView.js | 91 ++ .../client/views/liveStreamTab.js | 18 +- packages/rocketchat-livestream/package.js | 11 +- .../server/livestreamEncoder.js | 46 + .../rocketchat-ui/client/views/app/popout.js | 2 +- 9 files changed, 1469 insertions(+), 98 deletions(-) create mode 100644 packages/rocketchat-livechat/.app/package-lock.json create mode 100644 packages/rocketchat-livestream/client/views/broadcastView.html create mode 100644 packages/rocketchat-livestream/client/views/broadcastView.js create mode 100644 packages/rocketchat-livestream/server/livestreamEncoder.js diff --git a/package-lock.json b/package-lock.json index 0baedf23ed5a2..0046c17c70a3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "Rocket.Chat", - "version": "0.62.0-develop", + "version": "0.63.0-develop", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/runtime": { "version": "7.0.0-beta.40", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", - "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", + "integrity": "sha1-jjuPHS2GOdAQ6ZGn6ZwdnvV4+IY=", "requires": { "core-js": "2.5.3", "regenerator-runtime": "0.11.1" @@ -16,7 +16,7 @@ "@google-cloud/common": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.16.1.tgz", - "integrity": "sha512-1sufDsSfgJ7fuBLq+ux8t3TlydMlyWl9kPZx2WdLINkGtf5RjvXX6EWYZiCMKe8flJ3oC0l95j5atN2uX5n3rg==", + "integrity": "sha1-4fn8SVUzYpl+H7/3N0RPG0YN7Xg=", "requires": { "array-uniq": "1.0.3", "arrify": "1.0.1", @@ -41,7 +41,7 @@ "@google-cloud/language": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@google-cloud/language/-/language-1.1.0.tgz", - "integrity": "sha512-CcCc2zgX3M1X+rn+zy38QjCY/1R9CBCRd3cCqzIefZL16QgBod3ATPtVEHQG4KCyjnvCkMNMTQdYRCcsXs4wLw==", + "integrity": "sha1-ykV5nwpiN9HqQs0Y7v59MdG1Bys=", "requires": { "google-gax": "0.14.5", "lodash.merge": "4.6.1" @@ -50,7 +50,7 @@ "@google-cloud/storage": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.6.0.tgz", - "integrity": "sha512-yQ63bJYoiwY220gn/KdTLPoHppAPwFHfG7VFLPwJ+1R5U1eqUN5XV2a7uPj1szGF8/gxlKm2UbE8DgoJJ76DFw==", + "integrity": "sha1-Pep0DiS/CX2R8WWW4pFQUpB2eaI=", "requires": { "@google-cloud/common": "0.16.1", "arrify": "1.0.1", @@ -78,14 +78,14 @@ "mime": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "integrity": "sha1-Fh5UGWVVHTtUn6ERQ5Hjo9Vbkjs=" } } }, "@google-cloud/vision": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/@google-cloud/vision/-/vision-0.15.2.tgz", - "integrity": "sha512-SqirvZHIX95q24RIGGucVI4oS3FMZSnEXqw4SK8C6MlEfV3C0zn59eT1W8zcYvvFnR90+mHgw2PC2Z4ZMav/LQ==", + "integrity": "sha1-ZSeKujCKUWfpGOfZ+ZYzyIqh6j0=", "requires": { "@google-cloud/common": "0.16.1", "async": "2.6.0", @@ -117,12 +117,12 @@ "@protobufjs/base64": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + "integrity": "sha1-TIVzDlm5ofHzSQR9vyQpYDS7JzU=" }, "@protobufjs/codegen": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + "integrity": "sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs=" }, "@protobufjs/eventemitter": { "version": "1.1.0", @@ -166,12 +166,12 @@ "@types/long": { "version": "3.0.32", "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + "integrity": "sha1-9OWvMenpsZbY5fyopeLiCqPWC2k=" }, "@types/node": { "version": "8.9.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.4.tgz", - "integrity": "sha512-dSvD36qnQs78G1BPsrZFdPpvLgMW/dnvr5+nTW2csMs5TiP9MOXrjUbnMZOEwnIuBklXtn7b6TPA2Cuq07bDHA==" + "integrity": "sha1-39MnWCoGwRTrbgRB+j1vqzXtrUg=" }, "JSONStream": { "version": "1.3.2", @@ -506,7 +506,7 @@ "autolinker": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", - "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" + "integrity": "sha1-Z66donLoCODY644Cy8jN4wOUdFc=" }, "autoprefixer": { "version": "8.0.0", @@ -1680,7 +1680,7 @@ "bcrypt": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha1-sC3cbAtS6ha40883XVoy54DatUg=", + "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", "requires": { "nan": "2.6.2", "node-pre-gyp": "0.6.36" @@ -2190,7 +2190,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -2223,7 +2223,7 @@ "mocha": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", - "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "integrity": "sha1-fYbPvPNcuCnidUwy4XNV7AUzh5Q=", "dev": true, "requires": { "browser-stdout": "1.3.0", @@ -2241,13 +2241,13 @@ "commander": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "integrity": "sha1-FXFS/R56bI2YpbcVzzdt+SgARWM=", "dev": true }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -2269,7 +2269,7 @@ "supports-color": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "integrity": "sha1-iD992rwWUUKyphQn8zUt7RldGj4=", "dev": true, "requires": { "has-flag": "2.0.0" @@ -2385,7 +2385,7 @@ "codemirror": { "version": "5.35.0", "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.35.0.tgz", - "integrity": "sha512-8HQICjZlDfe1ai7bvU6m2uHxuZuFgsUCdDRU9OHVB+2RTRd+FftN1ezVCqbquG0Fyq+wETqyadKhUX46DswSUQ==" + "integrity": "sha1-KAZT1JVFW8ZqqH5ihCkrAndbqHg=" }, "coffeescript": { "version": "1.12.7", @@ -2545,7 +2545,7 @@ "configstore": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "integrity": "sha1-CU7mYquD+tmRdnjeEU+q6o/NypA=", "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", @@ -3418,7 +3418,7 @@ "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "integrity": "sha1-qoVnpu7QPFMfyJ0/cRzQ5SWd7HU=", "dev": true }, "diff-match-patch": { @@ -3438,7 +3438,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", "dev": true, "requires": { "esutils": "2.0.2" @@ -3864,7 +3864,7 @@ "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==", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", "dev": true }, "espree": { @@ -4171,7 +4171,7 @@ "file-type": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-7.6.0.tgz", - "integrity": "sha512-EAogdjMKf0PEU26Wk+N/Qkg8JXpMRo9t70dg7+t9QvcYUZb/XfA66Hdt15g4xRdam4wgiQsg/qycKUIuZQDJog==" + "integrity": "sha1-s9v8gCkUjobzB2GyElNWKUPSHwY=" }, "filename-regex": { "version": "2.0.1", @@ -4182,7 +4182,7 @@ "filesize": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.0.tgz", - "integrity": "sha512-g5OWtoZWcPI56js1DFhIEqyG9tnu/7sG3foHwgS9KGYFMfsYguI3E+PRVCmtmE96VajQIEMRU2OhN+ME589Gdw==" + "integrity": "sha1-ItB5YVYku2/TwEAmEgYopBs/Tvo=" }, "fill-keys": { "version": "1.0.2", @@ -4348,7 +4348,7 @@ "fs-minipass": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "integrity": "sha1-BsJ3IYRU7CiN93raVKA7hwKqy50=", "requires": { "minipass": "2.2.1" } @@ -5331,7 +5331,7 @@ "gcs-resumable-upload": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-0.9.0.tgz", - "integrity": "sha512-+Zrmr0JKO2y/2mg953TW6JLu+NAMHqQsKzqCm7CIT24gMQakolPJCMzDleVpVjXAqB7ZCD276tcUq2ebOfqTug==", + "integrity": "sha1-ZEICFJaWrRFDWLweDPQ6YLXsBFQ=", "requires": { "buffer-equal": "1.0.0", "configstore": "3.1.1", @@ -5430,7 +5430,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -5546,7 +5546,7 @@ "google-gax": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.14.5.tgz", - "integrity": "sha512-3A6KbrtLDavrqZnnzurnSydRIJnyH+2Sm56fAvXciQ/62aEnSDaR43MCgWhtReCLVjeFjBiCEIdX5zV0LVLVBg==", + "integrity": "sha1-ssc8Yd9s6tlPkEIdF/RP8WH2I8c=", "requires": { "extend": "3.0.1", "globby": "7.1.1", @@ -5571,7 +5571,7 @@ "google-proto-files": { "version": "0.14.2", "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.14.2.tgz", - "integrity": "sha512-wwm2TIlfTgAjDbjrxAb3akznO7vBM0PRLS6Xf2QfR3L7b0p+szD3iwOW0wMSFl3B0UbLv27hUVk+clePqCVmXA==", + "integrity": "sha1-lYz/6n6IiOALmmxV7RNiwGtCb0w=", "requires": { "globby": "7.1.1", "power-assert": "1.4.4", @@ -5595,13 +5595,13 @@ "growl": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "integrity": "sha1-GSa6kM8+3+KttJJ/WIC8IsZseQ8=", "dev": true }, "grpc": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.7.3.tgz", - "integrity": "sha512-7zXQJlDXMr/ZaDqdaIchgclViyoWo8GQxZSmFUAxR8GwSr28b6/BTgF221WG+2W693jpp74XJ/+I9DcPXsgt9Q==", + "integrity": "sha1-ydA0Mk4uyKBs+qV3oEShFvlsjJA=", "requires": { "arguejs": "0.2.3", "lodash": "4.17.5", @@ -6840,7 +6840,7 @@ "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", "requires": { "dom-serializer": "0.1.0", "domelementtype": "1.3.0" @@ -7412,7 +7412,7 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", "dev": true }, "is-stream": { @@ -7935,7 +7935,7 @@ "lodash.merge": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", - "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" + "integrity": "sha1-rcJdnLmbk5HFliTzefu6YNcRHVQ=" }, "lodash.template": { "version": "4.4.0", @@ -8068,7 +8068,7 @@ "mailparser": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/mailparser/-/mailparser-2.2.0.tgz", - "integrity": "sha512-HVaPa+5xQtG3CQ5SUxbDuJMRnDANC8WllUKXHm46v0tKu3I4YaUlBxg4Lpkvf+qF+kOn0lGcnQgvM6xY5mYALw==", + "integrity": "sha1-48TZUE1KX6W92C6N4tQm105F42c=", "requires": { "addressparser": "1.0.1", "he": "1.1.1", @@ -8083,7 +8083,7 @@ "mailsplit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/mailsplit/-/mailsplit-4.1.2.tgz", - "integrity": "sha512-5UWjUfhKlC4OR5PqZKcl4h7vnz2EP4M3Zg2SBbrztvAYX5lM/rA7tvaXkZ6zRcvK32Uul0GkRA037icDbiJIOw==", + "integrity": "sha1-xhi8MRpM/IOyJqHtwbUD9akk0IM=", "requires": { "libbase64": "1.0.2", "libmime": "3.1.0", @@ -8093,7 +8093,7 @@ "libbase64": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-1.0.2.tgz", - "integrity": "sha512-CyPjvTFbsGps2Sdvy9GVjSRPvUGpji8Hxb+iunp466guzxcd3QaK0k8Hur1sPkgD9FonW8V1z2F1y066YiliEg==" + "integrity": "sha1-L/E//mmx5AFZ9JNo4w0N2LsWNbU=" } } }, @@ -8244,7 +8244,7 @@ "mime-db": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + "integrity": "sha1-o0kgUKXLm2NFBUHjnZeI0icng9s=" }, "mime-type": { "version": "3.0.5", @@ -8286,7 +8286,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "1.1.11" } @@ -8309,7 +8309,7 @@ "minipass": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", - "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", + "integrity": "sha1-WtqXU4sQJ7TPchNDJChXjLVkAR8=", "requires": { "yallist": "3.0.2" }, @@ -8324,7 +8324,7 @@ "minizlib": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "integrity": "sha1-EeE2WM5GvDpwomeqxYNZ0eDCnOs=", "requires": { "minipass": "2.2.1" } @@ -8399,7 +8399,7 @@ "modelo": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.3.tgz", - "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA==" + "integrity": "sha1-snhYik24f8HlEHrjonfAh2842JQ=" }, "modify-values": { "version": "1.0.0", @@ -8654,7 +8654,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -8922,7 +8922,7 @@ "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", "requires": { "pify": "3.0.0" } @@ -9151,7 +9151,7 @@ "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", "dev": true }, "poplib": { @@ -9284,7 +9284,7 @@ "postcss-import": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", - "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", + "integrity": "sha1-Vck2LJGSmU7GiGXSJEGd8dspgfA=", "dev": true, "requires": { "postcss": "6.0.17", @@ -9333,7 +9333,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "supports-color": { @@ -9835,7 +9835,7 @@ "postcss-sorting": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-3.1.0.tgz", - "integrity": "sha512-YCPTcJwGIInF1LpMD1lIYvMHTGUL4s97o/OraA6eKvoauhhk6vjwOWDDjm6uRKqug/kyDPMKEzmYZ6FtW6RDgw==", + "integrity": "sha1-r3yQ7nOtElaaV2ZOrwZzXC4lvsA=", "dev": true, "requires": { "lodash": "4.17.5", @@ -9882,7 +9882,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "supports-color": { @@ -10060,7 +10060,7 @@ "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", "requires": { "asap": "2.0.6" } @@ -10113,7 +10113,7 @@ "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", "requires": { "end-of-stream": "1.4.1", "once": "1.4.0" @@ -10122,7 +10122,7 @@ "pumpify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", - "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", + "integrity": "sha1-gLfF334kFT0D8OesigWl0Gi9B/s=", "requires": { "duplexify": "3.5.3", "inherits": "2.0.3", @@ -10343,7 +10343,7 @@ "redis": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "integrity": "sha1-ICKI4/WMSfYHnZevehDhMDrhSwI=", "requires": { "double-ended-queue": "2.1.0-0", "redis-commands": "1.3.1", @@ -10581,7 +10581,7 @@ "resolve": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "integrity": "sha1-HwmsznlsmnYlefMbLBzEw83fnzY=", "dev": true, "requires": { "path-parse": "1.0.5" @@ -10633,7 +10633,7 @@ "retry-request": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.1.tgz", - "integrity": "sha512-PjAmtWIxjNj4Co/6FRtBl8afRP3CxrrIAnUzb1dzydfROd+6xt7xAebFeskgQgkfFf8NmzrXIoaB3HxmswXyxw==", + "integrity": "sha1-+3EnYjWmF+l1Uem+c3q1uRWR+54=", "requires": { "request": "2.83.0", "through2": "2.0.3" @@ -11114,7 +11114,7 @@ "simple-get": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.7.0.tgz", - "integrity": "sha512-RkE9rGPHcxYZ/baYmgJtOSM63vH0Vyq+ma5TijBcLla41SWlh8t6XYIGMR/oeZcmr+/G8k+zrClkkVrtnQ0esg==", + "integrity": "sha1-rTf5JtCBKSN/8IxPLt/W8Q4DgLU=", "requires": { "decompress-response": "3.3.0", "once": "1.4.0", @@ -11294,7 +11294,7 @@ "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "integrity": "sha1-YFvZvjA6pZ+zX5Ip++oN3snqB9k=", "dev": true, "requires": { "through": "2.3.8" @@ -11312,7 +11312,7 @@ "split2": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=", "dev": true, "requires": { "through2": "2.0.3" @@ -11464,7 +11464,7 @@ "string-format-obj": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz", - "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q==" + "integrity": "sha1-x2EspOKtkjgSqB2xktwpGFCqH2U=" }, "string-width": { "version": "1.0.2", @@ -11623,7 +11623,7 @@ "autoprefixer": { "version": "7.2.6", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", - "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", + "integrity": "sha1-JWZy+G98c12oScTwfQCKuwVgZ9w=", "dev": true, "requires": { "browserslist": "2.11.3", @@ -11637,7 +11637,7 @@ "browserslist": { "version": "2.11.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", "dev": true, "requires": { "caniuse-lite": "1.0.30000808", @@ -11870,7 +11870,7 @@ "stylelint-order": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-0.8.1.tgz", - "integrity": "sha512-8mp1P2wnI9XShYXVXDsxVigE2eXnc0C2O4ktbwUvTBwjCP4xZskIbUVxp1evSG3OK4R7hXVNl/2BnJCZkrcc/w==", + "integrity": "sha1-Nfca86FZVBVODpnlZGuj1vvjT40=", "dev": true, "requires": { "lodash": "4.17.5", @@ -11907,7 +11907,7 @@ "postcss": { "version": "6.0.19", "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", - "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "integrity": "sha1-dqeDhvZwudlJSmVb8jrAEu/9FVU=", "dev": true, "requires": { "chalk": "2.3.1", @@ -11918,7 +11918,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "supports-color": { @@ -12195,7 +12195,7 @@ "text-extensions": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", - "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==", + "integrity": "sha1-+qq6JiXtdG1WiiPk0KrNm/CKizk=", "dev": true }, "text-table": { @@ -12233,7 +12233,7 @@ "tlds": { "version": "1.199.0", "resolved": "https://registry.npmjs.org/tlds/-/tlds-1.199.0.tgz", - "integrity": "sha512-NM0jUhibJjEX4g0+1ETxOhuODIDpyvCC0A2BjxrTfMUMZ+uRZc6ZnJl9SmFtAW1s5iQgQIxezFpUij6/6OiRbg==" + "integrity": "sha1-pPyMMFghZIioCqrrtCeSUAflUhc=" }, "tmp": { "version": "0.0.33", @@ -12563,7 +12563,7 @@ "uc.micro": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz", - "integrity": "sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==" + "integrity": "sha1-DGXxX4FaoItWCmHOi023/8P0U3Y=" }, "uglify-js": { "version": "2.8.29", @@ -13070,7 +13070,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "requires": { "string-width": "1.0.2" } @@ -13136,7 +13136,7 @@ "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==", + "integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=", "requires": { "graceful-fs": "4.1.11", "imurmurhash": "0.1.4", @@ -13188,7 +13188,7 @@ "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", "requires": { "sax": "1.2.1", "xmlbuilder": "9.0.7" @@ -13493,7 +13493,7 @@ "xpath.js": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", - "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" + "integrity": "sha1-OBakTtS7NSCRCD0AKjg91RBKX/E=" }, "xtend": { "version": "4.0.1", diff --git a/packages/rocketchat-livechat/.app/package-lock.json b/packages/rocketchat-livechat/.app/package-lock.json new file mode 100644 index 0000000000000..9ab2c8bec66cc --- /dev/null +++ b/packages/rocketchat-livechat/.app/package-lock.json @@ -0,0 +1,874 @@ +{ + "name": "rocketchat-livechat", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", + "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "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.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "autolinker": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", + "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" + }, + "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.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", + "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.36" + } + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "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=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + }, + "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=" + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "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" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "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=" + }, + "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.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "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.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "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.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "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==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": 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=" + }, + "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" + } + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.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.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", + "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.4", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "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=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "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=" + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "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=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "rc": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", + "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.0" + } + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", + "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "toastr": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", + "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", + "requires": { + "jquery": "3.3.1" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "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.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "requires": { + "sprintf-js": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "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.3.0" + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json index 3636aca2c6748..a25f6fa4c05c4 100644 --- a/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-livestream/.npm/package/npm-shrinkwrap.json @@ -1,15 +1,30 @@ { "lockfileVersion": 1, "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==" }, + "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==" + }, "axios": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", - "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=" + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=" }, "base64url": { "version": "2.0.0", @@ -21,30 +36,149 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, + "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==" + }, + "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=" + }, + "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=" + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==" }, + "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=" + }, + "duplexify": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==" + }, "ecdsa-sig-formatter": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=" }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz", + "integrity": "sha1-Ay4iU0ic+PzgJma+yj0R7XotrtE=", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" + }, + "qs": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", + "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==" + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "finalhandler": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", + "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==" + } + } + }, + "fluent-ffmpeg": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz", + "integrity": "sha1-yVLeIkD4EuvaCqgAbXd27irPfXQ=" + }, "follow-redirects": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==" }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=" + }, + "gcp-metadata": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.2.tgz", + "integrity": "sha512-TlOa8HhM5klcBxBNazZUMeI9UZJoKJ4ceiBLPQoJIWNFeC/CqxjlaFE+/YnFQudqG5inhaaNtvoFVm/ZCbBFQQ==" + }, "google-auth-library": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.2.1.tgz", - "integrity": "sha512-+7AePCXe5MCE3ROzxrlgqdSj4pah5eCTey+915J1dZK87vfBlasVxeclxw9/Onglga9R5rqK6mFp5IbolUD+oQ==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.3.1.tgz", + "integrity": "sha512-NcAzFY+ScalfjmFTHnCXInuivtbIfib9irJ5H8AHONy3eA56YW1Tu5X1dtbjw5TNBgP+BMu+nIrglJsAlfZ/Hg==" }, "google-p12-pem": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.0.tgz", - "integrity": "sha512-tqu8IJF307iH8vXQEI5ZhuIk89vAf25rmoyoenckm/zY7Elzm4X/x6OPOk4wa3sRzkA/Y2CkubpvLxSEgIEQcg==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.1.tgz", + "integrity": "sha512-6Gb+R8wKs0uGWHYH8US1q4IGYEMKPzg/ty2A/AevGaVDMzPIqNOKFmDxZHsHwda2438u99CkU0HdatsKXOUtcg==" }, "googleapis": { "version": "25.0.0", @@ -52,15 +186,47 @@ "integrity": "sha512-hIP2VbwFliL7YHZQRaJrw5+ctunALJUior4KEw0vCYlcDezPnEA+HhTY2oq4I3PCHBKxKwc9xfV37Kkz6e/krw==" }, "gtoken": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.1.0.tgz", - "integrity": "sha512-r/dh/cVgPBWHcskq03KOSDl+L+0Ac0B8VEhpIbnrcsvHSJHdkEtwbC0lOZNxBIqWbM1+HNig8jpuCwKJzCcilg==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.1.1.tgz", + "integrity": "sha512-9wUP0Gb06lEJxX0w/w+n5Ghxh+/To0rbZSRCOu4Pih2sSDYXJwV4T7q6MPLW31cuKz0wqFQ60mW9nIKc8IgoyA==" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + } + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "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=" + }, "jwa": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", @@ -86,26 +252,86 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==" }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "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=" + }, "mime": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, "node-forge": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", - "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.4.tgz", + "integrity": "sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "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=" }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, + "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": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=" + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -116,21 +342,140 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "readable-stream": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", + "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==" + }, + "retry-axios": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", + "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "send": { + "version": "0.15.4", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.4.tgz", + "integrity": "sha1-mF+qPihLAnPHkzZKNcZze9k5Bbk=", + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" + } + } + }, + "serve-static": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz", + "integrity": "sha1-m2qpjutyU8Tu3Ewfb9vKYJkBqWE=" + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, "string-template": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", "integrity": "sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y=" }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==" + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "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.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" + }, "uuid": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "websocket-stream": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/websocket-stream/-/websocket-stream-5.1.2.tgz", + "integrity": "sha512-lchLOk435iDWs0jNuL+hiU14i3ERSrMA0IKSiJh7z6X/i4XNsutBZrtqu2CPOZuA4G/zabiqVAos0vW+S7GEVw==", + "dependencies": { + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==" + } + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.0.0.tgz", + "integrity": "sha512-XXG4S0b771C68AeTHebBsJJBZMguxj7Em+D657RViuj6ppRd3tfuOhIK8eGwZGNb76C8MjQfCTfH2NN50rJN4w==" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/packages/rocketchat-livestream/client/views/broadcastView.html b/packages/rocketchat-livestream/client/views/broadcastView.html new file mode 100644 index 0000000000000..3da083e4877a6 --- /dev/null +++ b/packages/rocketchat-livestream/client/views/broadcastView.html @@ -0,0 +1,6 @@ + diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js new file mode 100644 index 0000000000000..8a7cd270378da --- /dev/null +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -0,0 +1,91 @@ +const hasGetUserMedia = () => !!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); +const createAndConnect = (url) => { + if ('WebSocket' in window) { + const ws = new WebSocket(url); + ws.onopen = () => console.log('connected'); + + ws.onclose = () => console.log('closed'); + + ws.onerror = (evt) => console.error(`Error: ${ evt.data }`); + + return ws; + } else { + return null; + } +}; +const sendMessageToWebSocket = (message, ws) => { + if (ws != null) { + if (ws.readyState === 1) { ws.send(message); } + } +}; + +Template.broadcastView.helpers({ + broadcastSource() { + return Template.instance().mediaStream.get() ? window.URL.createObjectURL(Template.instance().mediaStream.get()) : ''; + } +}); + +Template.broadcastView.onCreated(function() { + this.connection = new ReactiveVar(createAndConnect('ws://localhost:3001/')); + this.mediaStream = new ReactiveVar(null); + this.mediaRecorder = new ReactiveVar(null); +}); +Template.broadcastView.onDestroyed(function() { + if (this.connection.get()) { + this.connection.get().close(); + } + if (this.mediaRecorder.get()) { + this.mediaRecorder.get().stop(); + } + this.mediaStream.set(null); +}); +Template.broadcastView.onRendered(function() { + + navigator.getMedia = (navigator.getUserMedia || + navigator.webkitGetUserMedia || + navigator.mozGetUserMedia || + navigator.msGetUserMedia); + + if (hasGetUserMedia()) { + navigator.getMedia( + {video: true, audio: true}, + (localMediaStream) => { + this.mediaStream.set(localMediaStream); + }, + (e) => console.log(e) + ); + } else { + alert('getUserMedia() is not supported in your browser!'); + } +}); + +Template.broadcastView.events({ + 'click .start-streaming'(e, i) { + let options = {mimeType: 'video/webm;codecs=vp9'}; + if (!MediaRecorder.isTypeSupported(options.mimeType)) { + console.log(`${ options.mimeType } is not Supported`); + options = {mimeType: 'video/webm;codecs=vp8'}; + if (!MediaRecorder.isTypeSupported(options.mimeType)) { + console.log(`${ options.mimeType } is not Supported`); + options = {mimeType: 'video/webm'}; + if (!MediaRecorder.isTypeSupported(options.mimeType)) { + console.log(`${ options.mimeType } is not Supported`); + options = {mimeType: ''}; + } + } + } + try { + i.mediaRecorder.set(new MediaRecorder(i.mediaStream.get(), options)); + } catch (e) { + console.error(`Exception while creating MediaRecorder: ${ e }`); + alert(`Exception while creating MediaRecorder: ${ e }. mimeType: ${ options.mimeType }`); + return; + } + i.mediaRecorder.get().ondataavailable = (event) => { + if (event.data && event.data.size > 0) { + sendMessageToWebSocket(event.data, i.connection.get()); + } + }; + i.mediaRecorder.get().start(10); // collect 10ms of data + } +}); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index c5e8f32af0e8d..5905f00563d1e 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -168,15 +168,17 @@ Template.liveStreamTab.events({ }); i.popoutOpen.set(true); }, - 'click .js-broadcast'(e) { + 'click .js-broadcast'(e, i) { e.preventDefault(); - console.log('call broadcast stuff'); - Meteor.call('listYoutubeActivities', function(err, result) { - if (err) { - return handleError(err); - } - console.log('list youtube activities'); - console.log(result); + popout.open({ + content: 'broadcastView', + // data: { + // streamingSource: i.streamingOptions.get().url, + // isAudioOnly: i.streamingOptions.get().isAudioOnly, + // showVideoControls: true, + // streamingOptions: i.streamingOptions.get() + // }, + onCloseCallback: () => i.popoutOpen.set(false) }); } }); diff --git a/packages/rocketchat-livestream/package.js b/packages/rocketchat-livestream/package.js index 06765529ceb98..4c4610d41e87f 100644 --- a/packages/rocketchat-livestream/package.js +++ b/packages/rocketchat-livestream/package.js @@ -14,6 +14,8 @@ Package.onUse(function(api) { api.addFiles([ 'client/views/liveStreamTab.html', 'client/views/liveStreamTab.js', + 'client/views/broadcastView.html', + 'client/views/broadcastView.js', 'client/styles/liveStreamTab.css', 'client/views/liveStreamView.html', 'client/views/liveStreamView.js', @@ -24,10 +26,15 @@ Package.onUse(function(api) { 'server/models/Rooms.js', 'server/functions/saveStreamingOptions.js', 'server/functions/listYoutubeActivities.js', - 'server/settings.js' + 'server/settings.js', + 'server/livestreamEncoder.js' ], 'server'); Npm.depends({ - 'googleapis': '25.0.0' + 'googleapis': '25.0.0', + 'fluent-ffmpeg': '2.1.2', + 'websocket-stream': '5.1.2', + 'ws': '5.0.0', + 'express': '4.15.4' }); }); diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js new file mode 100644 index 0000000000000..3ce7843d09b6d --- /dev/null +++ b/packages/rocketchat-livestream/server/livestreamEncoder.js @@ -0,0 +1,46 @@ +const ffmpeg = require('fluent-ffmpeg'); +const wss = require('websocket-stream'); +import ws from 'ws'; +const WebSocketServer = new ws.Server({port: 3001}); + +/* +VBR="2500k" # Bitrate de la vidéo en sortie +FPS="30" # FPS de la vidéo en sortie +QUAL="medium" # Preset de qualité FFMPEG +YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube + +SOURCE="default" # Source UDP (voir les annonces SAP) +KEY="x60x-0wyw-51j8-66tf" # Clé à récupérer sur l'event youtube + +ffmpeg \ + -f avfoundation -i "default" -deinterlace \ + -f lavfi -i anullsrc \ + -vcodec libx264 -pix_fmt yuv422p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \ + -acodec libmp3lame -ar 44100 -threads 6 -q:v 3 -b:a 712000 -bufsize 4000k -maxrate 960k \ + -f flv "$YOUTUBE_URL/$KEY" +*/ +WebSocketServer.on('connection', function(websocket) { + const stream = wss(websocket); + ffmpeg() + .input(stream) + .videoCodec('libx264') + .audioCodec('libmp3lame') + .outputFPS(30) + .addOption('-ar', 44100) + .addOption('-g', 60) + .addOption('-crf', 18) + .addOption('-pix_fmt', 'yuv420p') + .addOption('-threads', 6) + .addOption('-q:v', 3) + .addOption('-movflags', 'flagstart') + .addOption('-b:a', '384k') + .addOption('-maxrate', '750k') + .addOption('-bufsize', '3000k') + .addOption('-f', 'flv') + .on('error', function(err) { + console.log(`Error: ${ err.message }`); + }) + .save('rtmp://a.rtmp.youtube.com/live2/x60x-0wyw-51j8-66tf', function(stdout) { + console.log(`Convert complete${ stdout }`); + }); +}); diff --git a/packages/rocketchat-ui/client/views/app/popout.js b/packages/rocketchat-ui/client/views/app/popout.js index d96111d6032b5..5abd9fc6cb7a5 100644 --- a/packages/rocketchat-ui/client/views/app/popout.js +++ b/packages/rocketchat-ui/client/views/app/popout.js @@ -137,7 +137,7 @@ Template.popout.events({ }, 'dragstart .rc-popout-wrapper'(event) { const e = event.originalEvent || event; - const url = this.data.streamingSource || '.rc-popout-wrapper'; + const url = (this.data && this.data.streamingSource) || '.rc-popout-wrapper'; popout.x = e.offsetX; popout.y = e.offsetY; e.dataTransfer.setData('application/x-moz-node', e.currentTarget); From 21f9932ad487749c283faeae8e71c52cc1185dc8 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 7 Mar 2018 23:32:04 -0300 Subject: [PATCH 04/40] almos done --- package-lock.json | 53 ++++++------ package.json | 2 +- packages/rocketchat-auditing | 1 + .../client/views/broadcastView.js | 2 +- .../client/views/liveStreamTab.html | 2 +- .../client/views/liveStreamTab.js | 59 ++++++++++--- .../client/views/livestreamBroadcast.html | 3 + .../client/views/livestreamBroadcast.js | 0 packages/rocketchat-livestream/package.js | 3 + .../server/functions/listYoutubeActivities.js | 4 +- .../rocketchat-livestream/server/index.js | 2 + .../server/livestreamEncoder.js | 9 +- .../rocketchat-livestream/server/methods.js | 83 +++++++++++++++++++ .../rocketchat-livestream/server/routes.js | 48 +++++++++++ .../rocketchat-livestream/server/settings.js | 2 + 15 files changed, 226 insertions(+), 47 deletions(-) create mode 120000 packages/rocketchat-auditing create mode 100644 packages/rocketchat-livestream/client/views/livestreamBroadcast.html create mode 100644 packages/rocketchat-livestream/client/views/livestreamBroadcast.js create mode 100644 packages/rocketchat-livestream/server/index.js create mode 100644 packages/rocketchat-livestream/server/methods.js create mode 100644 packages/rocketchat-livestream/server/routes.js diff --git a/package-lock.json b/package-lock.json index 0046c17c70a3c..ee0f4a7114ac6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2399,9 +2399,9 @@ "dev": true }, "color": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color/-/color-2.0.1.tgz", - "integrity": "sha512-ubUCVVKfT7r2w2D3qtHakj8mbmKms+tThR8gI8zEYCbUBl8/voqFGt3kgBqGwXAopgXybnkuOq+qMYCRrp4cXw==", + "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" @@ -3608,7 +3608,6 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz", "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==", - "optional": true, "requires": { "prr": "1.0.1" } @@ -8312,13 +8311,6 @@ "integrity": "sha1-WtqXU4sQJ7TPchNDJChXjLVkAR8=", "requires": { "yallist": "3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" - } } }, "minizlib": { @@ -8539,8 +8531,7 @@ "natives": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz", - "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==", - "optional": true + "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==" }, "natural-compare": { "version": "1.4.0", @@ -10107,8 +10098,7 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "optional": true + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, "pump": { "version": "2.0.1", @@ -11053,23 +11043,28 @@ "dev": true }, "sharp": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.19.0.tgz", - "integrity": "sha1-YXKekPKR5iVAEiqAZcpfxwwaix8=", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.19.1.tgz", + "integrity": "sha1-gZvxH1w/T/MutGXyVbX7h+Q87qE=", "requires": { - "color": "2.0.1", + "color": "3.0.0", "detect-libc": "1.0.3", - "nan": "2.8.0", + "nan": "2.9.2", "semver": "5.5.0", "simple-get": "2.7.0", - "tar": "4.3.3", + "tar": "4.4.0", "tunnel-agent": "0.6.0" }, "dependencies": { + "nan": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz", + "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==" + }, "tar": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.3.3.tgz", - "integrity": "sha512-v9wjbOXloOIeXifMQGkKhPH3H7tjd+8BubFKOTU+64JpFZ3q2zBfsGlnc7KmyRgl8UxVa1SCRiF3F9tqSOgcaQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.0.tgz", + "integrity": "sha512-gJlTiiErwo96K904FnoYWl+5+FBgS+FimU6GMh66XLdLa55al8+d4jeDfPoGwSNHdtWI5FJP6xurmVqhBuGJpQ==", "requires": { "chownr": "1.0.1", "fs-minipass": "1.2.5", @@ -11078,11 +11073,6 @@ "mkdirp": "0.5.1", "yallist": "3.0.2" } - }, - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, @@ -13505,6 +13495,11 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + }, "yaqrcode": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/yaqrcode/-/yaqrcode-0.2.1.tgz", diff --git a/package.json b/package.json index a06da42663bea..1987706a0fbfc 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "querystring": "^0.2.0", "redis": "^2.8.0", "semver": "^5.5.0", - "sharp": "^0.19.0", + "sharp": "^0.19.1", "slack-client": "^2.0.6", "speakeasy": "^2.0.0", "tar-stream": "^1.5.5", diff --git a/packages/rocketchat-auditing b/packages/rocketchat-auditing new file mode 120000 index 0000000000000..04e5bb8416e1b --- /dev/null +++ b/packages/rocketchat-auditing @@ -0,0 +1 @@ +../../dev/Rocket.Chat.Enterprise/rocketchat-auditing/ \ No newline at end of file diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 8a7cd270378da..9e44ff5312f75 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -26,7 +26,7 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(function() { - this.connection = new ReactiveVar(createAndConnect('ws://localhost:3001/')); + this.connection = new ReactiveVar(createAndConnect(`ws://localhost:3001/${ this.data.idStream }`)); this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); }); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.html b/packages/rocketchat-livestream/client/views/liveStreamTab.html index cc8ce50b21039..d426467469b81 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.html +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.html @@ -50,5 +50,5 @@ {{/if}} {{/if}} - + {{ > liveStreamBroadcast}} diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index 5905f00563d1e..a821ecb05ca7a 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -168,17 +168,54 @@ Template.liveStreamTab.events({ }); i.popoutOpen.set(true); }, - 'click .js-broadcast'(e, i) { + async 'click .js-broadcast'(e, i) { e.preventDefault(); - popout.open({ - content: 'broadcastView', - // data: { - // streamingSource: i.streamingOptions.get().url, - // isAudioOnly: i.streamingOptions.get().isAudioOnly, - // showVideoControls: true, - // streamingOptions: i.streamingOptions.get() - // }, - onCloseCallback: () => i.popoutOpen.set(false) - }); + e.currentTarget.classList.add('loading'); + try { + const user = RocketChat.models.Users.findOne({_id: Meteor.userId()}, { fields: { 'settings.livestream': 1 }}); + if (!user.settings || !user.settings.livestream) { + const oauthWindow = window.open(`/api/v1/livestream/oauth?userId=${ Meteor.userId() }`, 'youtube-integration-oauth', 'width=400,height=600'); + await close(oauthWindow); + } + + const result = await call('livestreamGetChannel', {rid: i.data.rid}); + popout.open({ + content: 'broadcastView', + data: { + idStream : result.id + // streamingSource: i.streamingOptions.get().url, + // isAudioOnly: i.streamingOptions.get().isAudioOnly, + // showVideoControls: true, + // streamingOptions: i.streamingOptions.get() + }, + onCloseCallback: () => i.popoutOpen.set(false) + }); + + } catch (e) { + console.log(e); + } finally { + e.currentTarget.classList.remove('loading'); + } } }); + +export const call = (...args) => new Promise(function(resolve, reject) { + Meteor.call(...args, function(err, result) { + if (err) { + handleError(err); + reject(err); + } + resolve(result); + }); +}); + +export const close = (popup) => { + return new Promise(function(resolve, reject) { + const checkInterval = setInterval(() => { + if (popup.closed) { + clearInterval(checkInterval); + resolve(); + } + }, 300); + }); +}; diff --git a/packages/rocketchat-livestream/client/views/livestreamBroadcast.html b/packages/rocketchat-livestream/client/views/livestreamBroadcast.html new file mode 100644 index 0000000000000..7181461c12ff3 --- /dev/null +++ b/packages/rocketchat-livestream/client/views/livestreamBroadcast.html @@ -0,0 +1,3 @@ + diff --git a/packages/rocketchat-livestream/client/views/livestreamBroadcast.js b/packages/rocketchat-livestream/client/views/livestreamBroadcast.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/rocketchat-livestream/package.js b/packages/rocketchat-livestream/package.js index 4c4610d41e87f..e9c0c90a36a16 100644 --- a/packages/rocketchat-livestream/package.js +++ b/packages/rocketchat-livestream/package.js @@ -13,6 +13,8 @@ Package.onUse(function(api) { ]); api.addFiles([ 'client/views/liveStreamTab.html', + 'client/views/livestreamBroadcast.html', + 'client/views/livestreamBroadcast.js', 'client/views/liveStreamTab.js', 'client/views/broadcastView.html', 'client/views/broadcastView.js', @@ -23,6 +25,7 @@ Package.onUse(function(api) { ], 'client'); api.addFiles([ + 'server/index.js', 'server/models/Rooms.js', 'server/functions/saveStreamingOptions.js', 'server/functions/listYoutubeActivities.js', diff --git a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js index aef8db1df8d19..44905a378b9a6 100644 --- a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js +++ b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js @@ -26,7 +26,7 @@ const getAccessToken = (cb) => { Meteor.methods({ 'listYoutubeActivities'() { - console.log('inside method'); + // console.log('inside method'); return getAccessToken((clientAuth) => { google.youtube('v3').activities.list({ auth: clientAuth, @@ -34,7 +34,7 @@ Meteor.methods({ mine: true, key: RocketChat.settings.get('Broadcasting_api_key') }, (err, result) => { - console.log(err, result); + // console.log(err, result); return result; }); }); diff --git a/packages/rocketchat-livestream/server/index.js b/packages/rocketchat-livestream/server/index.js new file mode 100644 index 0000000000000..63ea14561bf55 --- /dev/null +++ b/packages/rocketchat-livestream/server/index.js @@ -0,0 +1,2 @@ +import './routes.js'; +import './methods.js'; diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js index 3ce7843d09b6d..7e7c19e719b56 100644 --- a/packages/rocketchat-livestream/server/livestreamEncoder.js +++ b/packages/rocketchat-livestream/server/livestreamEncoder.js @@ -19,7 +19,12 @@ ffmpeg \ -acodec libmp3lame -ar 44100 -threads 6 -q:v 3 -b:a 712000 -bufsize 4000k -maxrate 960k \ -f flv "$YOUTUBE_URL/$KEY" */ -WebSocketServer.on('connection', function(websocket) { +WebSocketServer.on('connection', function(websocket, req) { + const name = req.url.replace('/', ''); + console.log(name); + if (!name) { + return websocket.terminate(); + } const stream = wss(websocket); ffmpeg() .input(stream) @@ -40,7 +45,7 @@ WebSocketServer.on('connection', function(websocket) { .on('error', function(err) { console.log(`Error: ${ err.message }`); }) - .save('rtmp://a.rtmp.youtube.com/live2/x60x-0wyw-51j8-66tf', function(stdout) { + .save(`rtmp://a.rtmp.youtube.com/live2/${ name }`, function(stdout) { console.log(`Convert complete${ stdout }`); }); }); diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js new file mode 100644 index 0000000000000..00bda9c2c6a6d --- /dev/null +++ b/packages/rocketchat-livestream/server/methods.js @@ -0,0 +1,83 @@ +import {Meteor} from 'meteor/meteor'; +import google from 'googleapis'; +const OAuth2 = google.auth.OAuth2; + + +const p = fn => new Promise(function(resolve, reject) { + fn(function(err, value) { + if (err) { + return reject(err); + } + resolve(value.data); + }); +}); + +Meteor.methods({ + async livestreamGetChannel({rid}) { + const user = Meteor.user(); + + if (!(user.settings && user.settings.livestream)) { + throw new Meteor.Error('error-action-not-allowed', 'You have no settings to livestream', { + method: 'livestreamGetChannel' + }); + } + + const room = RocketChat.models.Rooms.findOne({_id: rid}); + + if (!room) { + // TODO: change error + throw new Meteor.Error('error-action-not-allowed', 'You have no settings to livestream', { + method: 'livestreamGetChannel' + }); + } + const auth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); + + auth.setCredentials({ + access_token: user.settings.livestream.access_token, + refresh_token: user.settings.livestream.refresh_token + }); + + const youtube = google.youtube({version:'v3', auth}); + + const [stream, broadcast] = await Promise.all([p((resolve) => youtube.liveStreams.insert({ + part: 'id,snippet,cdn,contentDetails,status', + resource: { + snippet: { + 'title': room.name || 'teste' + }, + 'cdn': { + 'format': '480p', + 'ingestionType': 'rtmp' + } + } + }, resolve)), p((resolve)=> youtube.liveBroadcasts.insert({ + part: 'id,snippet,contentDetails,status', + resource: { + snippet: { + 'title': room.name || 'teste', + 'scheduledStartTime' : new Date().toISOString() + }, + 'status': { + 'privacyStatus': 'unlisted' + } + } + }, resolve))]); + + youtube.liveBroadcasts.transition({ + part:'id,status', + id: broadcast.id, + broadcastStatus: 'live' + }); + + const ret = await p(resolve => youtube.liveBroadcasts.bind({ + part: 'id,snippet,status', + // resource: { + id: broadcast.id, + streamId: stream.id + }, resolve)); + + return {id: stream.cdn.ingestionInfo.streamName}; + + + } +}); diff --git a/packages/rocketchat-livestream/server/routes.js b/packages/rocketchat-livestream/server/routes.js new file mode 100644 index 0000000000000..17ecc69555868 --- /dev/null +++ b/packages/rocketchat-livestream/server/routes.js @@ -0,0 +1,48 @@ +import google from 'googleapis'; +const OAuth2 = google.auth.OAuth2; + +RocketChat.API.v1.addRoute('livestream/oauth', { + get: function functionName() { + const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); + const { userId } = this.queryParams; + console.log('userId', userId); + const url = clientAuth.generateAuthUrl({ + access_type: 'offline', + scope: ['https://www.googleapis.com/auth/youtube'], + state: JSON.stringify({ + userId + }) + }); + + return { + statusCode: 302, + headers: { + Location: url + }, body: 'Oauth redirect' + }; + } +}); + +RocketChat.API.v1.addRoute('livestream/oauth/callback', { + get: function functionName() { + const { code, state } = this.queryParams; + + const { userId } = JSON.parse(state); + + const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); + + const ret = Meteor.wrapAsync(clientAuth.getToken.bind(clientAuth))(code); + + console.log(ret); + + RocketChat.models.Users.update({ _id: userId }, {$set: { + 'settings.livestream' : ret + }}); + + return { + headers: { + 'content-type' : 'text/html' + }, body: '' + }; + } +}); diff --git a/packages/rocketchat-livestream/server/settings.js b/packages/rocketchat-livestream/server/settings.js index 61dd3888e6757..aad36cf0533d2 100644 --- a/packages/rocketchat-livestream/server/settings.js +++ b/packages/rocketchat-livestream/server/settings.js @@ -1,11 +1,13 @@ Meteor.startup(function() { RocketChat.settings.addGroup('LiveStream & Broadcasting', function() { + this.add('Livestream_enabled', false, { type: 'boolean', i18nLabel: 'Enabled', public: true, alert: 'This feature is currently in beta! Please report bugs to github.com/RocketChat/Rocket.Chat/issues' }); + this.add('Broadcasting_enabled', false, { type: 'boolean', i18nLabel: 'Enabled', From c78df8a0f070cde20479c9f49207ea5b5dd973a3 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Thu, 8 Mar 2018 12:30:39 -0300 Subject: [PATCH 05/40] Kill ffmpeg process --- package-lock.json | 23 +++++----- .../client/views/liveStreamTab.js | 42 +++++++++---------- .../server/livestreamEncoder.js | 7 +++- 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee0f4a7114ac6..269fcbc8b9360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -572,7 +572,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "supports-color": { @@ -605,7 +605,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" }, "xml2js": { "version": "0.4.17", @@ -3608,6 +3608,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz", "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==", + "optional": true, "requires": { "prr": "1.0.1" } @@ -3806,7 +3807,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -3815,7 +3816,7 @@ "globals": { "version": "11.3.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "integrity": "sha1-4E/be5eW2K2snI9kwUg3sjEzeLA=", "dev": true }, "has-flag": { @@ -8350,13 +8351,13 @@ "commander": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "integrity": "sha1-FXFS/R56bI2YpbcVzzdt+SgARWM=", "dev": true }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -8371,7 +8372,7 @@ "supports-color": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "integrity": "sha1-iD992rwWUUKyphQn8zUt7RldGj4=", "dev": true, "requires": { "has-flag": "2.0.0" @@ -8531,7 +8532,8 @@ "natives": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz", - "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==" + "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==", + "optional": true }, "natural-compare": { "version": "1.4.0", @@ -10098,7 +10100,8 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "optional": true }, "pump": { "version": "2.0.1", @@ -11123,7 +11126,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index a821ecb05ca7a..26b4c6fcfdd86 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -1,6 +1,27 @@ /* globals popout */ import toastr from 'toastr'; +export const call = (...args) => new Promise(function(resolve, reject) { + Meteor.call(...args, function(err, result) { + if (err) { + handleError(err); + reject(err); + } + resolve(result); + }); +}); + +export const close = (popup) => { + return new Promise(function(resolve) { + const checkInterval = setInterval(() => { + if (popup.closed) { + clearInterval(checkInterval); + resolve(); + } + }, 300); + }); +}; + function optionsFromUrl(url) { const options = {}; const parsedUrl = url.match(/(http:|https:|)\/\/(www.)?(youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/|embed\?clip=)?([A-Za-z0-9._%-]*)(\&\S+)?/); @@ -198,24 +219,3 @@ Template.liveStreamTab.events({ } } }); - -export const call = (...args) => new Promise(function(resolve, reject) { - Meteor.call(...args, function(err, result) { - if (err) { - handleError(err); - reject(err); - } - resolve(result); - }); -}); - -export const close = (popup) => { - return new Promise(function(resolve, reject) { - const checkInterval = setInterval(() => { - if (popup.closed) { - clearInterval(checkInterval); - resolve(); - } - }, 300); - }); -}; diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js index 7e7c19e719b56..8e4d4182dcfa3 100644 --- a/packages/rocketchat-livestream/server/livestreamEncoder.js +++ b/packages/rocketchat-livestream/server/livestreamEncoder.js @@ -26,7 +26,7 @@ WebSocketServer.on('connection', function(websocket, req) { return websocket.terminate(); } const stream = wss(websocket); - ffmpeg() + const encoder = ffmpeg() .input(stream) .videoCodec('libx264') .audioCodec('libmp3lame') @@ -48,4 +48,9 @@ WebSocketServer.on('connection', function(websocket, req) { .save(`rtmp://a.rtmp.youtube.com/live2/${ name }`, function(stdout) { console.log(`Convert complete${ stdout }`); }); + + websocket.on('close', () => { + console.log('websocket closed, kill FFMPEG'); + encoder.kill(); + }); }); From faa372b36c2b60903ffd6053791fceda366f3314 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 8 Mar 2018 12:35:35 -0300 Subject: [PATCH 06/40] change methods --- .../.app/package-lock.json | 874 ------------------ .../rocketchat-livestream/client/oauth.js | 15 + .../client/views/broadcastView.js | 2 +- .../client/views/liveStreamTab.js | 21 +- packages/rocketchat-livestream/package.js | 1 - .../server/functions/listYoutubeActivities.js | 64 -- .../server/functions/livestream.js | 85 ++ .../rocketchat-livestream/server/methods.js | 103 +-- 8 files changed, 148 insertions(+), 1017 deletions(-) delete mode 100644 packages/rocketchat-livechat/.app/package-lock.json create mode 100644 packages/rocketchat-livestream/client/oauth.js delete mode 100644 packages/rocketchat-livestream/server/functions/listYoutubeActivities.js create mode 100644 packages/rocketchat-livestream/server/functions/livestream.js diff --git a/packages/rocketchat-livechat/.app/package-lock.json b/packages/rocketchat-livechat/.app/package-lock.json deleted file mode 100644 index 9ab2c8bec66cc..0000000000000 --- a/packages/rocketchat-livechat/.app/package-lock.json +++ /dev/null @@ -1,874 +0,0 @@ -{ - "name": "rocketchat-livechat", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/runtime": { - "version": "7.0.0-beta.40", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", - "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "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.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "autolinker": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", - "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" - }, - "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.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", - "requires": { - "nan": "2.6.2", - "node-pre-gyp": "0.6.36" - } - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.0" - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "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=" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" - }, - "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=" - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "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" - } - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "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.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" - }, - "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=" - }, - "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.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "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.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "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.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "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.4.1", - "sshpk": "1.13.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "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==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jquery": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": 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=" - }, - "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" - } - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.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.8" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "moment": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", - "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" - }, - "node-pre-gyp": { - "version": "0.6.36", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", - "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.4", - "request": "2.83.0", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "2.2.1", - "tar-pack": "3.4.1" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "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=" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "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=" - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "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=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "rc": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", - "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } - }, - "sprintf-js": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", - "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "toastr": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", - "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", - "requires": { - "jquery": "3.3.1" - } - }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "requires": { - "punycode": "1.4.1" - } - }, - "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.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "underscore.string": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", - "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", - "requires": { - "sprintf-js": "1.1.1", - "util-deprecate": "1.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - }, - "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.3.0" - } - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/packages/rocketchat-livestream/client/oauth.js b/packages/rocketchat-livestream/client/oauth.js new file mode 100644 index 0000000000000..512390039bb39 --- /dev/null +++ b/packages/rocketchat-livestream/client/oauth.js @@ -0,0 +1,15 @@ +export const close = (popup) => { + return new Promise(function(resolve, reject) { + const checkInterval = setInterval(() => { + if (popup.closed) { + clearInterval(checkInterval); + resolve(); + } + }, 300); + }); +}; + +export const auth = async() => { + const oauthWindow = window.open(`/api/v1/livestream/oauth?userId=${ Meteor.userId() }`, 'youtube-integration-oauth', 'width=400,height=600'); + return await close(oauthWindow); +}; diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 9e44ff5312f75..e8df595724f8e 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -26,7 +26,7 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(function() { - this.connection = new ReactiveVar(createAndConnect(`ws://localhost:3001/${ this.data.idStream }`)); + this.connection = new ReactiveVar(createAndConnect(`ws://localhost:3001/${ this.data.id }`)); this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); }); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index a821ecb05ca7a..a3c1e4bce280e 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -1,5 +1,8 @@ /* globals popout */ import toastr from 'toastr'; +import { auth } from './oauth'; + + function optionsFromUrl(url) { const options = {}; @@ -174,15 +177,14 @@ Template.liveStreamTab.events({ try { const user = RocketChat.models.Users.findOne({_id: Meteor.userId()}, { fields: { 'settings.livestream': 1 }}); if (!user.settings || !user.settings.livestream) { - const oauthWindow = window.open(`/api/v1/livestream/oauth?userId=${ Meteor.userId() }`, 'youtube-integration-oauth', 'width=400,height=600'); - await close(oauthWindow); + await auth(); } - const result = await call('livestreamGetChannel', {rid: i.data.rid}); + const result = await call('livestreamGet', {rid: i.data.rid}); popout.open({ content: 'broadcastView', data: { - idStream : result.id + ...result // streamingSource: i.streamingOptions.get().url, // isAudioOnly: i.streamingOptions.get().isAudioOnly, // showVideoControls: true, @@ -208,14 +210,3 @@ export const call = (...args) => new Promise(function(resolve, reject) { resolve(result); }); }); - -export const close = (popup) => { - return new Promise(function(resolve, reject) { - const checkInterval = setInterval(() => { - if (popup.closed) { - clearInterval(checkInterval); - resolve(); - } - }, 300); - }); -}; diff --git a/packages/rocketchat-livestream/package.js b/packages/rocketchat-livestream/package.js index e9c0c90a36a16..7f90b696475ab 100644 --- a/packages/rocketchat-livestream/package.js +++ b/packages/rocketchat-livestream/package.js @@ -28,7 +28,6 @@ Package.onUse(function(api) { 'server/index.js', 'server/models/Rooms.js', 'server/functions/saveStreamingOptions.js', - 'server/functions/listYoutubeActivities.js', 'server/settings.js', 'server/livestreamEncoder.js' ], 'server'); diff --git a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js b/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js deleted file mode 100644 index 44905a378b9a6..0000000000000 --- a/packages/rocketchat-livestream/server/functions/listYoutubeActivities.js +++ /dev/null @@ -1,64 +0,0 @@ -import google from 'googleapis'; - -const getAccessToken = (cb) => { - const OAuth2 = google.auth.OAuth2; - const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/_oauth/youtube'); - console.log(clientAuth); - const url = clientAuth.generateAuthUrl({ - access_type: 'offline', - scope: ['https://www.googleapis.com/auth/youtube'] - }); - - console.log(url); - clientAuth.getToken('4/AAB557E2T6uXKyyL-33xSOJSJYVIlqideioO_PH6RyCqMdUArU4xcFEm-w-drT5ICqjOBIZ2sb2W4U93elgDIUI#', (err, tokens) => { - console.log('getting token', err, tokens); - if (err) { - return cb(err); - } - // set tokens to the client - // TODO: tokens should be set by OAuth2 client. - // console.log(tokens); - clientAuth.setCredentials(tokens); - cb(clientAuth); - }); -}; - - -Meteor.methods({ - 'listYoutubeActivities'() { - // console.log('inside method'); - return getAccessToken((clientAuth) => { - google.youtube('v3').activities.list({ - auth: clientAuth, - part: 'snippet', - mine: true, - key: RocketChat.settings.get('Broadcasting_api_key') - }, (err, result) => { - // console.log(err, result); - return result; - }); - }); - // - - - } -}); - - -// RocketChat.listYoutubeActivities = function() { -// const OAuth2 = google.auth.OAuth2; -// const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/_oauth/youtube'); -// console.log(clientAuth); -// const url = clientAuth.generateAuthUrl({ -// access_type: 'offline', -// scope: ['https://www.googleapis.com/auth/youtube.readonly'] -// }); -// -// google.youtube.activities.list({ -// auth: clientAuth, -// params: { part: 'snippet' } -// }, (err, result) => { -// console.log(err, result); -// return result; -// }); -// }; diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js new file mode 100644 index 0000000000000..7e36865b5e051 --- /dev/null +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -0,0 +1,85 @@ +import google from 'googleapis'; +const OAuth2 = google.auth.OAuth2; + + +const p = fn => new Promise(function(resolve, reject) { + fn(function(err, value) { + if (err) { + return reject(err); + } + resolve(value.data); + }); +}); + +export const startLiveStream = ({ + id, + access_token, + refresh_token, + clientId, + clientSecret +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + + return p(resolve => youtube.liveBroadcasts.transition({ + part:'id,status', + id, + broadcastStatus: 'live' + }, resolve)); +}; + +export const createLiveStream = async({ + room, + access_token, + refresh_token, + clientId, + clientSecret +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + + const [stream, broadcast] = await Promise.all([p((resolve) => youtube.liveStreams.insert({ + part: 'id,snippet,cdn,contentDetails,status', + resource: { + snippet: { + 'title': room.name || 'RocketChat Broadcast' + }, + 'cdn': { + 'format': '480p', + 'ingestionType': 'rtmp' + } + } + }, resolve)), p((resolve)=> youtube.liveBroadcasts.insert({ + part: 'id,snippet,contentDetails,status', + resource: { + snippet: { + 'title': room.name || 'RocketChat Broadcast', + 'scheduledStartTime' : new Date().toISOString() + }, + 'status': { + 'privacyStatus': 'unlisted' + } + } + }, resolve))]); + + const ret = await p(resolve => youtube.liveBroadcasts.bind({ + part: 'id,snippet,status', + // resource: { + id: broadcast.id, + streamId: stream.id + }, resolve)); + + return {id: stream.cdn.ingestionInfo.streamName, stream, broadcast}; +}; diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 00bda9c2c6a6d..76e577c68f03d 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,24 +1,41 @@ import {Meteor} from 'meteor/meteor'; -import google from 'googleapis'; -const OAuth2 = google.auth.OAuth2; +import { createLiveStream } from './functions/livestream'; +const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; -const p = fn => new Promise(function(resolve, reject) { - fn(function(err, value) { - if (err) { - return reject(err); +Meteor.methods({ + async livestreamStart({broadcastId}) { + if (!broadcastId) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamStart' + }); } - resolve(value.data); - }); -}); + const livestreamSettings = selectLivestreamSettings(Meteor.user()); -Meteor.methods({ - async livestreamGetChannel({rid}) { - const user = Meteor.user(); + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamStart' + }); + } - if (!(user.settings && user.settings.livestream)) { - throw new Meteor.Error('error-action-not-allowed', 'You have no settings to livestream', { - method: 'livestreamGetChannel' + const {access_token, refresh_token} = livestreamSettings; + + return await startLiveStream({ + id: broadcastId, + access_token, + refresh_token, + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') + }); + + }, + async livestreamGet({rid}) { + const livestreamSettings = selectLivestreamSettings(Meteor.user()); + + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamGet' }); } @@ -26,58 +43,20 @@ Meteor.methods({ if (!room) { // TODO: change error - throw new Meteor.Error('error-action-not-allowed', 'You have no settings to livestream', { - method: 'livestreamGetChannel' + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamGet' }); } - const auth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); - - auth.setCredentials({ - access_token: user.settings.livestream.access_token, - refresh_token: user.settings.livestream.refresh_token - }); - const youtube = google.youtube({version:'v3', auth}); + const {access_token, refresh_token} = livestreamSettings; - const [stream, broadcast] = await Promise.all([p((resolve) => youtube.liveStreams.insert({ - part: 'id,snippet,cdn,contentDetails,status', - resource: { - snippet: { - 'title': room.name || 'teste' - }, - 'cdn': { - 'format': '480p', - 'ingestionType': 'rtmp' - } - } - }, resolve)), p((resolve)=> youtube.liveBroadcasts.insert({ - part: 'id,snippet,contentDetails,status', - resource: { - snippet: { - 'title': room.name || 'teste', - 'scheduledStartTime' : new Date().toISOString() - }, - 'status': { - 'privacyStatus': 'unlisted' - } - } - }, resolve))]); - - youtube.liveBroadcasts.transition({ - part:'id,status', - id: broadcast.id, - broadcastStatus: 'live' + return await createLiveStream({ + room, + access_token, + refresh_token, + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); - const ret = await p(resolve => youtube.liveBroadcasts.bind({ - part: 'id,snippet,status', - // resource: { - id: broadcast.id, - streamId: stream.id - }, resolve)); - - return {id: stream.cdn.ingestionInfo.streamName}; - - } }); From 74698f598bf719a395afcf254dca095ab3e33233 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 8 Mar 2018 14:02:56 -0300 Subject: [PATCH 07/40] undo problems --- .../client/views/broadcastView.js | 20 ++++++++++-- .../client/views/liveStreamTab.js | 2 -- .../server/functions/livestream.js | 7 ++-- .../server/livestreamEncoder.js | 1 - .../rocketchat-livestream/server/methods.js | 32 +++++++++++++++++-- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index fa4b572e2e3ff..ebadfc4cbe570 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -19,6 +19,19 @@ const sendMessageToWebSocket = (message, ws) => { if (ws.readyState === 1) { ws.send(message); } } }; +export const call = (...args) => new Promise(function(resolve, reject) { + Meteor.call(...args, function(err, result) { + if (err) { + handleError(err); + reject(err); + } + resolve(result); + }); +}); + +const delay = (time) => new Promise(function(resolve, reject) { + setTimeout(resolve, time); +}); Template.broadcastView.helpers({ broadcastSource() { @@ -58,7 +71,7 @@ Template.broadcastView.onRendered(function() { }); Template.broadcastView.events({ - 'click .start-streaming'(e, i) { + async 'click .start-streaming'(e, i) { const connection = i.connection.get(); if (!connection) { return; @@ -86,8 +99,11 @@ Template.broadcastView.events({ }; mediaRecorder.start(100); // collect 10ms of data i.mediaRecorder.set(mediaRecorder); + await delay(20000); + await call('livestreamTest', {broadcastId:i.data.broadcast.id}); + await delay(20000); + await call('livestreamStart', {broadcastId:i.data.broadcast.id}); - Meteor.call('livestreamStart', {broadcastId:Session.get('openedRoom')}); } catch (e) { console.error(`Exception while creating MediaRecorder: ${ e }`); alert(`Exception while creating MediaRecorder: ${ e }. mimeType: ${ options.mimeType }`); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index 5ba774bea375f..01d8554900b93 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -2,8 +2,6 @@ import toastr from 'toastr'; import { auth } from '../oauth.js'; - - export const call = (...args) => new Promise(function(resolve, reject) { Meteor.call(...args, function(err, result) { if (err) { diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 7e36865b5e051..7ea68e8815c4d 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -11,12 +11,13 @@ const p = fn => new Promise(function(resolve, reject) { }); }); -export const startLiveStream = ({ +export const statusLiveStream = ({ id, access_token, refresh_token, clientId, - clientSecret + clientSecret, + status }) => { const auth = new OAuth2(clientId, clientSecret); @@ -30,7 +31,7 @@ export const startLiveStream = ({ return p(resolve => youtube.liveBroadcasts.transition({ part:'id,status', id, - broadcastStatus: 'live' + broadcastStatus: status }, resolve)); }; diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js index 792c81939b386..d6b06be7e04fc 100644 --- a/packages/rocketchat-livestream/server/livestreamEncoder.js +++ b/packages/rocketchat-livestream/server/livestreamEncoder.js @@ -48,7 +48,6 @@ WebSocketServer.on('connection', function(websocket, req) { .save(`rtmp://a.rtmp.youtube.com/live2/${ name }`, function(stdout) { console.log(`Convert complete${ stdout }`); }); - websocket.once('message', () => websocket.send('ok')); websocket.on('close', () => { encoder.kill(); }); diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 76e577c68f03d..246f94dae0453 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,5 +1,5 @@ import {Meteor} from 'meteor/meteor'; -import { createLiveStream } from './functions/livestream'; +import { createLiveStream, statusLiveStream } from './functions/livestream'; const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; @@ -21,10 +21,38 @@ Meteor.methods({ const {access_token, refresh_token} = livestreamSettings; - return await startLiveStream({ + return await statusLiveStream({ id: broadcastId, access_token, refresh_token, + status: 'live', + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') + }); + + }, + async livestreamTest({broadcastId}) { + if (!broadcastId) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamStart' + }); + } + const livestreamSettings = selectLivestreamSettings(Meteor.user()); + + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'livestreamStart' + }); + } + + const {access_token, refresh_token} = livestreamSettings; + + return await statusLiveStream({ + id: broadcastId, + access_token, + refresh_token, + status:'testing', clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); From ca1a858c01a8e0336347942495f15e7365511454 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Thu, 8 Mar 2018 14:02:59 -0300 Subject: [PATCH 08/40] refactoring some logs --- .../client/views/broadcastView.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index fa4b572e2e3ff..e637cdcce1df2 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -1,18 +1,12 @@ const getMedia = () => navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; const createAndConnect = (url) => { - if (!'WebSocket' in window) { + if (!'WebSocket' in window) { // eslint-disable-line no-negated-in-lhs return false; } const ws = new WebSocket(url); - ws.onopen = () => console.log('connected'); - - ws.onclose = () => console.log('closed'); - ws.onerror = (evt) => console.error(`Error: ${ evt.data }`); - return ws; - }; const sendMessageToWebSocket = (message, ws) => { if (ws != null) { @@ -30,7 +24,6 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(async function() { - this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); this.connection = new ReactiveVar(createAndConnect(`ws://localhost:3001/${ this.data.id }`)); @@ -45,9 +38,7 @@ Template.broadcastView.onDestroyed(function() { this.mediaStream.set(null); }); Template.broadcastView.onRendered(function() { - navigator.getMedia = getMedia(); - if (!navigator.getMedia) { return alert('getUserMedia() is not supported in your browser!'); } @@ -65,13 +56,10 @@ Template.broadcastView.events({ } let options = {mimeType: 'video/webm;codecs=vp9'}; if (!MediaRecorder.isTypeSupported(options.mimeType)) { - console.log(`${ options.mimeType } is not Supported`); options = {mimeType: 'video/webm;codecs=vp8'}; if (!MediaRecorder.isTypeSupported(options.mimeType)) { - console.log(`${ options.mimeType } is not Supported`); options = {mimeType: 'video/webm'}; if (!MediaRecorder.isTypeSupported(options.mimeType)) { - console.log(`${ options.mimeType } is not Supported`); options = {mimeType: ''}; } } @@ -84,12 +72,11 @@ Template.broadcastView.events({ } sendMessageToWebSocket(event.data, connection); }; - mediaRecorder.start(100); // collect 10ms of data + mediaRecorder.start(100); // collect 100ms of data i.mediaRecorder.set(mediaRecorder); - Meteor.call('livestreamStart', {broadcastId:Session.get('openedRoom')}); + Meteor.call('livestreamStart', {broadcastId: Session.get('openedRoom')}); } catch (e) { - console.error(`Exception while creating MediaRecorder: ${ e }`); alert(`Exception while creating MediaRecorder: ${ e }. mimeType: ${ options.mimeType }`); return; } From 6bc9f0de3642328c6f179e957071bb338b435aa2 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 8 Mar 2018 14:31:38 -0300 Subject: [PATCH 09/40] tests --- .../client/views/broadcastView.js | 12 ++++++-- .../server/functions/livestream.js | 23 +++++++++++++++ .../rocketchat-livestream/server/methods.js | 29 ++++++++++++++++++- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index ebadfc4cbe570..426e2769c5639 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -99,9 +99,17 @@ Template.broadcastView.events({ }; mediaRecorder.start(100); // collect 10ms of data i.mediaRecorder.set(mediaRecorder); - await delay(20000); + + while (true) { + const result = await call('livestreamStreamStatus', {streamId:i.data.stream.id}); + if (result === 'active') { + break; + } + await delay(1000); + } + await call('livestreamTest', {broadcastId:i.data.broadcast.id}); - await delay(20000); + await delay(25000); await call('livestreamStart', {broadcastId:i.data.broadcast.id}); } catch (e) { diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 7ea68e8815c4d..d0e2b0d372bca 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -11,6 +11,29 @@ const p = fn => new Promise(function(resolve, reject) { }); }); +export const statusStreamLiveStream = async({ + id, + access_token, + refresh_token, + clientId, + clientSecret, + status +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + const result = await p(resolve => youtube.liveStreams.list({ + part:'id,status', + id + }, resolve)); + return result.items && result.items[0].status.streamStatus; +}; + export const statusLiveStream = ({ id, access_token, diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 246f94dae0453..596f8b84eaf96 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,9 +1,36 @@ import {Meteor} from 'meteor/meteor'; -import { createLiveStream, statusLiveStream } from './functions/livestream'; +import { createLiveStream, statusLiveStream, statusStreamLiveStream } from './functions/livestream'; const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; Meteor.methods({ + + async livestreamStreamStatus({streamStatus}) { + if (!streamStatus) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'streamStatus' + }); + } + const livestreamSettings = selectLivestreamSettings(Meteor.user()); + + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { + method: 'streamStatus' + }); + } + + const {access_token, refresh_token} = livestreamSettings; + + return await statusStreamLiveStream({ + id: streamStatus, + access_token, + refresh_token, + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') + }); + + }, async livestreamStart({broadcastId}) { if (!broadcastId) { // TODO: change error From b32e214fc885e467c3728bdaff00d6377e6a06b2 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Thu, 8 Mar 2018 19:04:48 -0300 Subject: [PATCH 10/40] Customize popout for streaming --- .../client/views/broadcastView.html | 3 +-- .../client/views/broadcastView.js | 17 +++++++++----- .../client/views/liveStreamTab.html | 2 +- .../client/views/liveStreamTab.js | 8 +++++-- .../client/views/livestreamBroadcast.html | 2 +- .../rocketchat-livestream/server/methods.js | 14 ++++++------ .../client/imports/components/popout.css | 12 ++++++++++ .../client/views/app/popout.html | 10 +++++++++ .../rocketchat-ui/client/views/app/popout.js | 22 +++++++++++++++++++ 9 files changed, 71 insertions(+), 19 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.html b/packages/rocketchat-livestream/client/views/broadcastView.html index a49210589c818..44d69807f7a5b 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.html +++ b/packages/rocketchat-livestream/client/views/broadcastView.html @@ -1,6 +1,5 @@ diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 7385de8432a9f..99761d4f186a7 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -23,9 +23,7 @@ export const call = (...args) => new Promise(function(resolve, reject) { }); }); -const delay = (time) => new Promise(function(resolve, reject) { - setTimeout(resolve, time); -}); +const delay = (time) => new Promise((resolve) => setTimeout(resolve, time)); Template.broadcastView.helpers({ broadcastSource() { @@ -62,7 +60,7 @@ Template.broadcastView.onRendered(function() { }); Template.broadcastView.events({ - async 'click .start-streaming'(e, i) { + async 'startStreaming .streaming-popup'(e, i) { const connection = i.connection.get(); if (!connection) { return; @@ -88,8 +86,8 @@ Template.broadcastView.events({ mediaRecorder.start(100); // collect 100ms of data i.mediaRecorder.set(mediaRecorder); - while (true) { - const result = await call('livestreamStreamStatus', {streamId:i.data.stream.id}); + while (true) { //eslint-disable-line no-constant-condition + const result = await call('livestreamStreamStatus', {streamId:i.data.stream.id}); if (result === 'active') { break; } @@ -97,8 +95,15 @@ Template.broadcastView.events({ } await call('livestreamTest', {broadcastId:i.data.broadcast.id}); + call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}, function(err) { + if (err) { + return handleError(err); + } + }); + await delay(25000); await call('livestreamStart', {broadcastId:i.data.broadcast.id}); + document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); } catch (e) { alert(`Exception while creating MediaRecorder: ${ e }. mimeType: ${ options.mimeType }`); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.html b/packages/rocketchat-livestream/client/views/liveStreamTab.html index d426467469b81..484e1ee306917 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.html +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.html @@ -24,6 +24,7 @@ {{/if}} {{#if canEdit}} {{#if editing}} + {{ > liveStreamBroadcast}}
@@ -50,5 +51,4 @@
{{/if}} {{/if}} - {{ > liveStreamBroadcast}} diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index 01d8554900b93..32a6f6641ccca 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -2,6 +2,8 @@ import toastr from 'toastr'; import { auth } from '../oauth.js'; + + export const call = (...args) => new Promise(function(resolve, reject) { Meteor.call(...args, function(err, result) { if (err) { @@ -200,13 +202,15 @@ Template.liveStreamTab.events({ } const result = await call('livestreamGet', {rid: i.data.rid}); + console.log(result); popout.open({ content: 'broadcastView', data: { - ...result + ...result, // streamingSource: i.streamingOptions.get().url, // isAudioOnly: i.streamingOptions.get().isAudioOnly, - // showVideoControls: true, + showVideoControls: false, + showStreamControls: true // streamingOptions: i.streamingOptions.get() }, onCloseCallback: () => i.popoutOpen.set(false) diff --git a/packages/rocketchat-livestream/client/views/livestreamBroadcast.html b/packages/rocketchat-livestream/client/views/livestreamBroadcast.html index 7181461c12ff3..d4d0ccf19e5b3 100644 --- a/packages/rocketchat-livestream/client/views/livestreamBroadcast.html +++ b/packages/rocketchat-livestream/client/views/livestreamBroadcast.html @@ -1,3 +1,3 @@ diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 596f8b84eaf96..0555887d23f87 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -5,25 +5,25 @@ const selectLivestreamSettings = (user) => user && user.settings && user.setting Meteor.methods({ - async livestreamStreamStatus({streamStatus}) { - if (!streamStatus) { + async livestreamStreamStatus({streamId}) { + if (!streamId) { // TODO: change error - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'streamStatus' + throw new Meteor.Error('error-not-allowed', 'You have no settings to hgggghggg', { + method: 'livestreamStreamStatus' }); } const livestreamSettings = selectLivestreamSettings(Meteor.user()); if (!livestreamSettings) { - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'streamStatus' + throw new Meteor.Error('error-not-allowed', 'You have no settings to fasfas', { + method: 'livestreamStreamStatus' }); } const {access_token, refresh_token} = livestreamSettings; return await statusStreamLiveStream({ - id: streamStatus, + id: streamId, access_token, refresh_token, clientId: RocketChat.settings.get('Broadcasting_client_id'), diff --git a/packages/rocketchat-theme/client/imports/components/popout.css b/packages/rocketchat-theme/client/imports/components/popout.css index 3be7f8998851b..33afec493aedb 100644 --- a/packages/rocketchat-theme/client/imports/components/popout.css +++ b/packages/rocketchat-theme/client/imports/components/popout.css @@ -1,3 +1,8 @@ +@keyframes blink { + from {color: white;} + to {color: red;} +} + .rc-popout { min-width: 380px; max-width: 800px; @@ -90,6 +95,13 @@ & button { font-size: 16px; margin: 0 5px; + + &.starting { + animation: blink 2s infinite; + } + &.broadcasting { + color: red; + } } } diff --git a/packages/rocketchat-ui/client/views/app/popout.html b/packages/rocketchat-ui/client/views/app/popout.html index 33c2d9287c9d1..574f4dc8b3e4a 100644 --- a/packages/rocketchat-ui/client/views/app/popout.html +++ b/packages/rocketchat-ui/client/views/app/popout.html @@ -17,6 +17,11 @@

{{> icon icon="podcast"}}

{{/if}} {{/if}} + {{#if showStreamControls}} +
+ +
+ {{/if}} {{#unless isAudioOnly}} + + {{/if}} diff --git a/packages/rocketchat-ui/client/views/app/popout.js b/packages/rocketchat-ui/client/views/app/popout.js index 5abd9fc6cb7a5..27a9c06380ee6 100644 --- a/packages/rocketchat-ui/client/views/app/popout.js +++ b/packages/rocketchat-ui/client/views/app/popout.js @@ -4,6 +4,7 @@ this.popout = { context: null, isAudioOnly: false, showVideoControls: true, + showStreamControls: false, x: 0, y: 0, open(config = {}, fn) { @@ -19,6 +20,7 @@ this.popout = { if (config.data) { this.isAudioOnly = config.data.isAudioOnly; this.showVideoControls = config.data.showVideoControls; + this.showStreamControls = config.data.showStreamControls; } }, close() { @@ -82,6 +84,12 @@ Template.popout.helpers({ }, showVideoControls() { return Template.instance().showVideoControls.get(); + }, + showStreamControls() { + return Template.instance().showStreamControls.get(); + }, + getStreamStatus() { + return Template.instance().streamStatus.get(); } }); @@ -89,6 +97,8 @@ Template.popout.onRendered(function() { Template.instance().isMinimized.set(popout.isAudioOnly); Template.instance().isAudioOnly.set(popout.isAudioOnly); Template.instance().showVideoControls.set(popout.showVideoControls); + Template.instance().showStreamControls.set(popout.showStreamControls); + if (this.data.onRendered) { this.data.onRendered(); @@ -99,8 +109,11 @@ Template.popout.onCreated(function() { this.isAudioOnly = new ReactiveVar(popout.isAudioOnly); this.canOpenExternal = new ReactiveVar(popout.canOpenExternal); this.showVideoControls = new ReactiveVar(popout.showVideoControls); + this.showStreamControls = new ReactiveVar(popout.showStreamControls); + this.isMuted = new ReactiveVar(false); this.isPlaying = new ReactiveVar(true); + this.streamStatus = new ReactiveVar(''); document.body.addEventListener('dragstart', popout.dragstart, true); document.body.addEventListener('dragover', popout.dragover, true); document.body.addEventListener('dragend', popout.dragend, true); @@ -147,6 +160,15 @@ Template.popout.events({ 'dragend .rc-popout-wrapper'(event) { event.preventDefault(); }, + 'click .rc-popout__controls--record'(e, i) { + e.preventDefault(); + document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); + i.streamStatus.set('starting'); + }, + 'broadcastStream .streaming-popup'(e, i) { + e.preventDefault(); + i.streamStatus.set('broadcasting'); + }, 'click .rc-popout__controls--play'(e, i) { window.liveStreamPlayer.playVideo(); i.isPlaying.set(true); From 0337941d9202db31d95f81dd782405751ee775a2 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 12 Mar 2018 11:30:01 -0300 Subject: [PATCH 11/40] actions buttons --- .../client/views/broadcastView.js | 94 +++++++++---------- .../server/livestreamEncoder.js | 2 +- .../client/imports/components/popout.css | 32 ++++++- .../rocketchat-ui/client/views/app/popout.js | 8 +- 4 files changed, 80 insertions(+), 56 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 99761d4f186a7..51a9dc5cf9e39 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -35,9 +35,14 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(async function() { + const connection = createAndConnect(`ws://localhost:3002/${ this.data.id }`); this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); - this.connection = new ReactiveVar(createAndConnect(`ws://localhost:3001/${ this.data.id }`)); + this.connection = new ReactiveVar(connection); + + if (!connection) { + return; + } }); Template.broadcastView.onDestroyed(function() { if (this.connection.get()) { @@ -48,66 +53,59 @@ Template.broadcastView.onDestroyed(function() { } this.mediaStream.set(null); }); -Template.broadcastView.onRendered(function() { +Template.broadcastView.onRendered(async function() { navigator.getMedia = getMedia(); if (!navigator.getMedia) { return alert('getUserMedia() is not supported in your browser!'); } - navigator.getMedia( - {video: true, audio: true}, localMediaStream => this.mediaStream.set(localMediaStream), - (e) => console.log(e) - ); -}); + const localMediaStream = await new Promise((resolve, reject) => navigator.getMedia({video: true, audio: true}, resolve, reject)); -Template.broadcastView.events({ - async 'startStreaming .streaming-popup'(e, i) { - const connection = i.connection.get(); - if (!connection) { - return; - } - let options = {mimeType: 'video/webm;codecs=vp9'}; + const connection = this.connection.get(); + + this.mediaStream.set(localMediaStream); + let options = {mimeType: 'video/webm;codecs=vp9'}; + if (!MediaRecorder.isTypeSupported(options.mimeType)) { + options = {mimeType: 'video/webm;codecs=vp8'}; if (!MediaRecorder.isTypeSupported(options.mimeType)) { - options = {mimeType: 'video/webm;codecs=vp8'}; + options = {mimeType: 'video/webm'}; if (!MediaRecorder.isTypeSupported(options.mimeType)) { - options = {mimeType: 'video/webm'}; - if (!MediaRecorder.isTypeSupported(options.mimeType)) { - options = {mimeType: ''}; - } + options = {mimeType: ''}; } } - try { - const mediaRecorder = new MediaRecorder(i.mediaStream.get(), options); - mediaRecorder.ondataavailable = (event) => { - if (!(event.data || event.data.size > 0)) { - return; - } - sendMessageToWebSocket(event.data, connection); - }; - mediaRecorder.start(100); // collect 100ms of data - i.mediaRecorder.set(mediaRecorder); + } + try { + const mediaRecorder = new MediaRecorder(localMediaStream, options); + mediaRecorder.ondataavailable = (event) => { + if (!(event.data || event.data.size > 0)) { + return; + } + sendMessageToWebSocket(event.data, connection); + }; + mediaRecorder.start(300); // collect 100ms of data + this.mediaRecorder.set(mediaRecorder); - while (true) { //eslint-disable-line no-constant-condition - const result = await call('livestreamStreamStatus', {streamId:i.data.stream.id}); - if (result === 'active') { - break; - } - await delay(1000); + while (true) { //eslint-disable-line no-constant-condition + const result = await call('livestreamStreamStatus', {streamId:this.data.stream.id}); + if (result === 'active') { + break; } + console.log(result, 'FOR->>>>>'); + await delay(1000); + } + console.log('active'); + await call('livestreamTest', {broadcastId:this.data.broadcast.id}); + document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStreamReady')); + } catch (e) { + console.log(e); + } +}); - await call('livestreamTest', {broadcastId:i.data.broadcast.id}); - call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}, function(err) { - if (err) { - return handleError(err); - } - }); +Template.broadcastView.events({ + async 'startStreaming .streaming-popup'(e, i) { - await delay(25000); - await call('livestreamStart', {broadcastId:i.data.broadcast.id}); - document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); - } catch (e) { - alert(`Exception while creating MediaRecorder: ${ e }. mimeType: ${ options.mimeType }`); - return; - } + await call('livestreamStart', {broadcastId: i.data.broadcast.id}); + await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); + document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); } }); diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js index d6b06be7e04fc..b6f1198635791 100644 --- a/packages/rocketchat-livestream/server/livestreamEncoder.js +++ b/packages/rocketchat-livestream/server/livestreamEncoder.js @@ -1,7 +1,7 @@ const ffmpeg = require('fluent-ffmpeg'); const wss = require('websocket-stream'); import ws from 'ws'; -const WebSocketServer = new ws.Server({port: 3001}); +const WebSocketServer = new ws.Server({port: 3002}); /* VBR="2500k" # Bitrate de la vidéo en sortie diff --git a/packages/rocketchat-theme/client/imports/components/popout.css b/packages/rocketchat-theme/client/imports/components/popout.css index 33afec493aedb..d50663ff8f32c 100644 --- a/packages/rocketchat-theme/client/imports/components/popout.css +++ b/packages/rocketchat-theme/client/imports/components/popout.css @@ -1,8 +1,20 @@ -@keyframes blink { - from {color: white;} - to {color: red;} +@keyframes loading { + 0% { + opacity: 0; + transform: scale(0.7); + } + 50% { + opacity: 1; + transform: scale(1); + } + 100% { + opacity: 0; + transform: scale(0.7); + } } + + .rc-popout { min-width: 380px; max-width: 800px; @@ -96,8 +108,18 @@ font-size: 16px; margin: 0 5px; - &.starting { - animation: blink 2s infinite; + & > .rc-icon { + fill: currentColor; + stroke: currentColor; + } + + &.recording { + color: red; + animation: loading 2s infinite; + } + + &.loading { + animation: loading 2s infinite; } &.broadcasting { color: red; diff --git a/packages/rocketchat-ui/client/views/app/popout.js b/packages/rocketchat-ui/client/views/app/popout.js index 27a9c06380ee6..dd67bb3ba166f 100644 --- a/packages/rocketchat-ui/client/views/app/popout.js +++ b/packages/rocketchat-ui/client/views/app/popout.js @@ -113,7 +113,7 @@ Template.popout.onCreated(function() { this.isMuted = new ReactiveVar(false); this.isPlaying = new ReactiveVar(true); - this.streamStatus = new ReactiveVar(''); + this.streamStatus = new ReactiveVar('loading'); document.body.addEventListener('dragstart', popout.dragstart, true); document.body.addEventListener('dragover', popout.dragover, true); document.body.addEventListener('dragend', popout.dragend, true); @@ -165,9 +165,13 @@ Template.popout.events({ document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); i.streamStatus.set('starting'); }, + 'broadcastStreamReady .streaming-popup'(e, i) { + e.preventDefault(); + i.streamStatus.set('ready'); + }, 'broadcastStream .streaming-popup'(e, i) { e.preventDefault(); - i.streamStatus.set('broadcasting'); + i.streamStatus.set('recording'); }, 'click .rc-popout__controls--play'(e, i) { window.liveStreamPlayer.playVideo(); From af2263bc5f85c5a1a95730554a29cc2edc2d39ba Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 12 Mar 2018 18:32:07 -0300 Subject: [PATCH 12/40] stop media on destroy popout --- .../rocketchat-livestream/client/styles/liveStreamTab.css | 6 ++++-- .../rocketchat-livestream/client/views/broadcastView.js | 8 +++++--- .../rocketchat-livestream/server/functions/livestream.js | 5 ++--- packages/rocketchat-livestream/server/methods.js | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/rocketchat-livestream/client/styles/liveStreamTab.css b/packages/rocketchat-livestream/client/styles/liveStreamTab.css index 220196796806b..81b04efb3ad38 100644 --- a/packages/rocketchat-livestream/client/styles/liveStreamTab.css +++ b/packages/rocketchat-livestream/client/styles/liveStreamTab.css @@ -16,7 +16,8 @@ font-size: 50px; } & .--play-solid { - fill: var(--rc-color-primary-lightest);; + fill: var(--color-white); + fill: white; } } .liveStreamTab__form { @@ -37,7 +38,8 @@ & .current-setting { display: inline-block; text-decoration: none; - color: var(--rc-color-primary-dark); + color: var(--color-dark); + color: black; } & .rc-button { diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 51a9dc5cf9e39..73e047c9b9011 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -51,7 +51,11 @@ Template.broadcastView.onDestroyed(function() { if (this.mediaRecorder.get()) { this.mediaRecorder.get().stop(); } - this.mediaStream.set(null); + if (this.mediaStream) { + const mediaStream = this.mediaStream.get(); + mediaStream.getTracks().map((track) => track.stop()); + this.mediaStream.set(null); + } }); Template.broadcastView.onRendered(async function() { navigator.getMedia = getMedia(); @@ -102,8 +106,6 @@ Template.broadcastView.onRendered(async function() { Template.broadcastView.events({ async 'startStreaming .streaming-popup'(e, i) { - - await call('livestreamStart', {broadcastId: i.data.broadcast.id}); await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index d0e2b0d372bca..d11332bef421f 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -16,8 +16,7 @@ export const statusStreamLiveStream = async({ access_token, refresh_token, clientId, - clientSecret, - status + clientSecret }) => { const auth = new OAuth2(clientId, clientSecret); @@ -98,7 +97,7 @@ export const createLiveStream = async({ } }, resolve))]); - const ret = await p(resolve => youtube.liveBroadcasts.bind({ + await p(resolve => youtube.liveBroadcasts.bind({ part: 'id,snippet,status', // resource: { id: broadcast.id, diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 0555887d23f87..b711447b92a81 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -8,14 +8,14 @@ Meteor.methods({ async livestreamStreamStatus({streamId}) { if (!streamId) { // TODO: change error - throw new Meteor.Error('error-not-allowed', 'You have no settings to hgggghggg', { + throw new Meteor.Error('error-not-allowed', 'Livestream ID not found', { method: 'livestreamStreamStatus' }); } const livestreamSettings = selectLivestreamSettings(Meteor.user()); if (!livestreamSettings) { - throw new Meteor.Error('error-not-allowed', 'You have no settings to fasfas', { + throw new Meteor.Error('error-not-allowed', 'You have no settings to stream', { method: 'livestreamStreamStatus' }); } From 6c7dfb333155d79e4739ab096e8c975509440f15 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 12 Mar 2018 19:55:42 -0300 Subject: [PATCH 13/40] Add transition steps --- .../.app/package-lock.json | 874 ++++++++++++++++++ .../client/views/broadcastView.js | 44 +- .../client/views/liveStreamTab.js | 2 - .../server/functions/livestream.js | 27 +- .../rocketchat-livestream/server/methods.js | 59 +- .../client/imports/components/popout.css | 1 + 6 files changed, 960 insertions(+), 47 deletions(-) create mode 100644 packages/rocketchat-livechat/.app/package-lock.json diff --git a/packages/rocketchat-livechat/.app/package-lock.json b/packages/rocketchat-livechat/.app/package-lock.json new file mode 100644 index 0000000000000..9ab2c8bec66cc --- /dev/null +++ b/packages/rocketchat-livechat/.app/package-lock.json @@ -0,0 +1,874 @@ +{ + "name": "rocketchat-livechat", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", + "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "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.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "autolinker": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", + "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" + }, + "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.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", + "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.36" + } + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "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=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + }, + "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=" + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "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" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "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=" + }, + "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.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "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.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "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.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "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==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": 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=" + }, + "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" + } + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.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.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", + "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.4", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "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=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "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=" + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "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=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "rc": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", + "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.0" + } + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", + "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "toastr": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", + "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", + "requires": { + "jquery": "3.3.1" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "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.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "requires": { + "sprintf-js": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "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.3.0" + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 73e047c9b9011..1ce19b245d0e9 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -25,6 +25,31 @@ export const call = (...args) => new Promise(function(resolve, reject) { const delay = (time) => new Promise((resolve) => setTimeout(resolve, time)); +const waitForStreamStatus = async(id, status) => { + const streamActive = new Promise(async(resolve) => { + while (true) { //eslint-disable-line no-constant-condition + const currentStatus = await call('livestreamStreamStatus', { streamId: id }); + if (currentStatus === status) { + return resolve(status); + } + await delay(1500); + } + }); + await streamActive; +}; +const waitForBroadcastStatus = async(id, status) => { + const broadcastActive = new Promise(async(resolve) => { + while (true) { //eslint-disable-line no-constant-condition + const currentStatus = await call('getBroadcastStatus', { broadcastId: id }); + if (currentStatus === status) { + return resolve(status); + } + await delay(1500); + } + }); + await broadcastActive; +}; + Template.broadcastView.helpers({ broadcastSource() { return Template.instance().mediaStream.get() ? window.URL.createObjectURL(Template.instance().mediaStream.get()) : ''; @@ -50,6 +75,7 @@ Template.broadcastView.onDestroyed(function() { } if (this.mediaRecorder.get()) { this.mediaRecorder.get().stop(); + this.mediaRecorder.set(null); } if (this.mediaStream) { const mediaStream = this.mediaStream.get(); @@ -85,20 +111,13 @@ Template.broadcastView.onRendered(async function() { } sendMessageToWebSocket(event.data, connection); }; - mediaRecorder.start(300); // collect 100ms of data + mediaRecorder.start(100); // collect 100ms of data this.mediaRecorder.set(mediaRecorder); - while (true) { //eslint-disable-line no-constant-condition - const result = await call('livestreamStreamStatus', {streamId:this.data.stream.id}); - if (result === 'active') { - break; - } - console.log(result, 'FOR->>>>>'); - await delay(1000); - } - console.log('active'); - await call('livestreamTest', {broadcastId:this.data.broadcast.id}); + await waitForStreamStatus(this.data.stream.id, 'active'); + await call('setLivestreamStatus', { broadcastId: this.data.broadcast.id, status: 'testing' }); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStreamReady')); + } catch (e) { console.log(e); } @@ -106,7 +125,8 @@ Template.broadcastView.onRendered(async function() { Template.broadcastView.events({ async 'startStreaming .streaming-popup'(e, i) { - await call('livestreamStart', {broadcastId: i.data.broadcast.id}); + await waitForBroadcastStatus(i.data.stream.id, 'testing'); + await call('setLivestreamStatus', {broadcastId: i.data.broadcast.id, status: 'live'}); await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); } diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index 32a6f6641ccca..aab102c2e8b50 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -200,9 +200,7 @@ Template.liveStreamTab.events({ if (!user.settings || !user.settings.livestream) { await auth(); } - const result = await call('livestreamGet', {rid: i.data.rid}); - console.log(result); popout.open({ content: 'broadcastView', data: { diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index d11332bef421f..3175ea8b3f25d 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -11,6 +11,28 @@ const p = fn => new Promise(function(resolve, reject) { }); }); +export const statusBroadcast = async({ + id, + access_token, + refresh_token, + clientId, + clientSecret +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + const result = await p(resolve => youtube.liveBroadcasts.list({ + part:'id,status', + id + }, resolve)); + return result.items && result.items[0].status.lifeCycleStatus; +}; + export const statusStreamLiveStream = async({ id, access_token, @@ -65,13 +87,13 @@ export const createLiveStream = async({ clientSecret }) => { const auth = new OAuth2(clientId, clientSecret); - + console.log(11); auth.setCredentials({ access_token, refresh_token }); - const youtube = google.youtube({ version:'v3', auth }); + console.log(12); const [stream, broadcast] = await Promise.all([p((resolve) => youtube.liveStreams.insert({ part: 'id,snippet,cdn,contentDetails,status', @@ -96,6 +118,7 @@ export const createLiveStream = async({ } } }, resolve))]); + console.log(123); await p(resolve => youtube.liveBroadcasts.bind({ part: 'id,snippet,status', diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index b711447b92a81..6011b428d4f9a 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,5 +1,5 @@ import {Meteor} from 'meteor/meteor'; -import { createLiveStream, statusLiveStream, statusStreamLiveStream } from './functions/livestream'; +import { createLiveStream, statusLiveStream, statusStreamLiveStream, statusBroadcast } from './functions/livestream'; const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; @@ -31,7 +31,7 @@ Meteor.methods({ }); }, - async livestreamStart({broadcastId}) { + async setLivestreamStatus({broadcastId, status}) { if (!broadcastId) { // TODO: change error throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { @@ -52,66 +52,63 @@ Meteor.methods({ id: broadcastId, access_token, refresh_token, - status: 'live', + status, clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); }, - async livestreamTest({broadcastId}) { - if (!broadcastId) { - // TODO: change error - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'livestreamStart' - }); - } + async livestreamGet({rid}) { const livestreamSettings = selectLivestreamSettings(Meteor.user()); if (!livestreamSettings) { - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'livestreamStart' + throw new Meteor.Error('error--allowed', 'You have no settings to livestream', { + method: 'livestreamGet' }); } - const {access_token, refresh_token} = livestreamSettings; + const room = RocketChat.models.Rooms.findOne({_id: rid}); - return await statusLiveStream({ - id: broadcastId, + if (!room) { + // TODO: change error + throw new Meteor.Error('error-not-', 'You have no settings to livestream', { + method: 'livestreamGet' + }); + } + + const {access_token, refresh_token} = livestreamSettings; + return await createLiveStream({ + room, access_token, refresh_token, - status:'testing', clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); }, - async livestreamGet({rid}) { - const livestreamSettings = selectLivestreamSettings(Meteor.user()); - - if (!livestreamSettings) { - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'livestreamGet' + async getBroadcastStatus({broadcastId}) { + if (!broadcastId) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'Broadcast ID not found', { + method: 'getBroadcastStatus' }); } + const livestreamSettings = selectLivestreamSettings(Meteor.user()); - const room = RocketChat.models.Rooms.findOne({_id: rid}); - - if (!room) { - // TODO: change error - throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { - method: 'livestreamGet' + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to stream', { + method: 'getBroadcastStatus' }); } const {access_token, refresh_token} = livestreamSettings; - return await createLiveStream({ - room, + return await statusBroadcast({ + id: broadcastId, access_token, refresh_token, clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); - } }); diff --git a/packages/rocketchat-theme/client/imports/components/popout.css b/packages/rocketchat-theme/client/imports/components/popout.css index d50663ff8f32c..a9727dd057857 100644 --- a/packages/rocketchat-theme/client/imports/components/popout.css +++ b/packages/rocketchat-theme/client/imports/components/popout.css @@ -120,6 +120,7 @@ &.loading { animation: loading 2s infinite; + pointer-events: none; } &.broadcasting { color: red; From a6f58a2366b592aa9a75bb13c7596a43ca11546d Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 12 Mar 2018 19:56:45 -0300 Subject: [PATCH 14/40] remove logs --- packages/rocketchat-livestream/server/functions/livestream.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 3175ea8b3f25d..7f70400407877 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -87,13 +87,11 @@ export const createLiveStream = async({ clientSecret }) => { const auth = new OAuth2(clientId, clientSecret); - console.log(11); auth.setCredentials({ access_token, refresh_token }); const youtube = google.youtube({ version:'v3', auth }); - console.log(12); const [stream, broadcast] = await Promise.all([p((resolve) => youtube.liveStreams.insert({ part: 'id,snippet,cdn,contentDetails,status', @@ -118,7 +116,6 @@ export const createLiveStream = async({ } } }, resolve))]); - console.log(123); await p(resolve => youtube.liveBroadcasts.bind({ part: 'id,snippet,status', From b86df538643f7816de3eb95a74b4fbdc7e76d793 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 12 Mar 2018 19:59:50 -0300 Subject: [PATCH 15/40] fix errors --- packages/rocketchat-livestream/server/methods.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 6011b428d4f9a..7db96e295f3be 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -62,7 +62,7 @@ Meteor.methods({ const livestreamSettings = selectLivestreamSettings(Meteor.user()); if (!livestreamSettings) { - throw new Meteor.Error('error--allowed', 'You have no settings to livestream', { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { method: 'livestreamGet' }); } @@ -71,7 +71,7 @@ Meteor.methods({ if (!room) { // TODO: change error - throw new Meteor.Error('error-not-', 'You have no settings to livestream', { + throw new Meteor.Error('error-not-allowed', 'You have no settings to livestream', { method: 'livestreamGet' }); } From 5d7dd43c4ae1b11add4c7526cc67421bdfcf0d27 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 13 Mar 2018 14:14:26 -0300 Subject: [PATCH 16/40] fix --- .../.app/package-lock.json | 874 ------------------ .../client/views/broadcastView.js | 2 +- .../server/functions/livestream.js | 5 +- packages/rocketchat-reactions/client/init.js | 6 +- 4 files changed, 5 insertions(+), 882 deletions(-) delete mode 100644 packages/rocketchat-livechat/.app/package-lock.json diff --git a/packages/rocketchat-livechat/.app/package-lock.json b/packages/rocketchat-livechat/.app/package-lock.json deleted file mode 100644 index 9ab2c8bec66cc..0000000000000 --- a/packages/rocketchat-livechat/.app/package-lock.json +++ /dev/null @@ -1,874 +0,0 @@ -{ - "name": "rocketchat-livechat", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/runtime": { - "version": "7.0.0-beta.40", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", - "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "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.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "autolinker": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", - "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" - }, - "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.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", - "requires": { - "nan": "2.6.2", - "node-pre-gyp": "0.6.36" - } - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.0" - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "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=" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" - }, - "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=" - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "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" - } - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "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.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" - }, - "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=" - }, - "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.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "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.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "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.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "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.4.1", - "sshpk": "1.13.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "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==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jquery": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": 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=" - }, - "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" - } - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.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.8" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "moment": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", - "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" - }, - "node-pre-gyp": { - "version": "0.6.36", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", - "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.4", - "request": "2.83.0", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "2.2.1", - "tar-pack": "3.4.1" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "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=" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "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=" - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "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=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "rc": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", - "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } - }, - "sprintf-js": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", - "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "toastr": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", - "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", - "requires": { - "jquery": "3.3.1" - } - }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "requires": { - "punycode": "1.4.1" - } - }, - "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.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "underscore.string": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", - "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", - "requires": { - "sprintf-js": "1.1.1", - "util-deprecate": "1.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - }, - "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.3.0" - } - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 1ce19b245d0e9..58fe8ad58a1d3 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -116,6 +116,7 @@ Template.broadcastView.onRendered(async function() { await waitForStreamStatus(this.data.stream.id, 'active'); await call('setLivestreamStatus', { broadcastId: this.data.broadcast.id, status: 'testing' }); + await waitForBroadcastStatus(this.data.broadcast.id, 'testing'); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStreamReady')); } catch (e) { @@ -125,7 +126,6 @@ Template.broadcastView.onRendered(async function() { Template.broadcastView.events({ async 'startStreaming .streaming-popup'(e, i) { - await waitForBroadcastStatus(i.data.stream.id, 'testing'); await call('setLivestreamStatus', {broadcastId: i.data.broadcast.id, status: 'live'}); await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 7f70400407877..2ea67ce9acbcf 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -24,13 +24,14 @@ export const statusBroadcast = async({ access_token, refresh_token }); - + console.log('asd', id); const youtube = google.youtube({ version:'v3', auth }); const result = await p(resolve => youtube.liveBroadcasts.list({ part:'id,status', id }, resolve)); - return result.items && result.items[0].status.lifeCycleStatus; + + return result.items && result.items[0] && result.items[0].status.lifeCycleStatus; }; export const statusStreamLiveStream = async({ diff --git a/packages/rocketchat-reactions/client/init.js b/packages/rocketchat-reactions/client/init.js index 040caa413e9a6..fae4c664d169e 100644 --- a/packages/rocketchat-reactions/client/init.js +++ b/packages/rocketchat-reactions/client/init.js @@ -45,13 +45,9 @@ Meteor.startup(function() { 'message-mobile' ], action(event) { - const data = Blaze.getData(event.currentTarget); - event.stopPropagation(); - RocketChat.EmojiPicker.open(event.currentTarget, (emoji) => { - Meteor.call('setReaction', `:${ emoji }:`, data._arguments[1]._id); - }); + RocketChat.EmojiPicker.open(event.currentTarget, emoji => Meteor.call('setReaction', `:${ emoji }:`, this._arguments[1]._id)); }, condition(message) { const room = RocketChat.models.Rooms.findOne({ _id: message.rid }); From 05a335450cafeb4e1c34f10a6b2d1f5f5be0ad4e Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 13 Mar 2018 16:15:00 -0300 Subject: [PATCH 17/40] Finishing UI and improvments to broadcast flow --- .../client/styles/liveStreamTab.css | 2 -- .../client/views/broadcastView.js | 18 ++++++++--- .../server/functions/livestream.js | 28 +++++++++++++++-- .../rocketchat-livestream/server/methods.js | 31 +++++++++++++++++-- .../client/imports/components/popout.css | 12 +++---- .../client/views/app/popout.html | 2 ++ .../rocketchat-ui/client/views/app/popout.js | 14 ++++++--- 7 files changed, 86 insertions(+), 21 deletions(-) diff --git a/packages/rocketchat-livestream/client/styles/liveStreamTab.css b/packages/rocketchat-livestream/client/styles/liveStreamTab.css index 81b04efb3ad38..10438af2c7c06 100644 --- a/packages/rocketchat-livestream/client/styles/liveStreamTab.css +++ b/packages/rocketchat-livestream/client/styles/liveStreamTab.css @@ -16,7 +16,6 @@ font-size: 50px; } & .--play-solid { - fill: var(--color-white); fill: white; } } @@ -38,7 +37,6 @@ & .current-setting { display: inline-block; text-decoration: none; - color: var(--color-dark); color: black; } diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 58fe8ad58a1d3..925e320f9a543 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -77,9 +77,8 @@ Template.broadcastView.onDestroyed(function() { this.mediaRecorder.get().stop(); this.mediaRecorder.set(null); } - if (this.mediaStream) { - const mediaStream = this.mediaStream.get(); - mediaStream.getTracks().map((track) => track.stop()); + if (this.mediaStream.get()) { + this.mediaStream.get().getTracks().map((track) => track.stop()); this.mediaStream.set(null); } }); @@ -127,7 +126,18 @@ Template.broadcastView.onRendered(async function() { Template.broadcastView.events({ async 'startStreaming .streaming-popup'(e, i) { await call('setLivestreamStatus', {broadcastId: i.data.broadcast.id, status: 'live'}); - await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); + await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); + }, + async 'stopStreaming .streaming-popup'(e, i) { + await call('setBroadcastStatus', { broadcastId: i.data.broadcast.id, status: 'complete' }); + if (i.mediaRecorder.get()) { + i.mediaRecorder.get().stop(); + i.mediaRecorder.set(null); + } + if (i.mediaStream.get()) { + i.mediaStream.get().getTracks().map((track) => track.stop()); + i.mediaStream.set(null); + } } }); diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 2ea67ce9acbcf..7affb1e94bf69 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -11,7 +11,7 @@ const p = fn => new Promise(function(resolve, reject) { }); }); -export const statusBroadcast = async({ +export const getBroadcastStatus = async({ id, access_token, refresh_token, @@ -24,13 +24,11 @@ export const statusBroadcast = async({ access_token, refresh_token }); - console.log('asd', id); const youtube = google.youtube({ version:'v3', auth }); const result = await p(resolve => youtube.liveBroadcasts.list({ part:'id,status', id }, resolve)); - return result.items && result.items[0] && result.items[0].status.lifeCycleStatus; }; @@ -80,6 +78,30 @@ export const statusLiveStream = ({ }, resolve)); }; +export const setBroadcastStatus = ({ + id, + access_token, + refresh_token, + clientId, + clientSecret, + status +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + + return p(resolve => youtube.liveBroadcasts.transition({ + part:'id,status', + id, + broadcastStatus: status + }, resolve)); +}; + export const createLiveStream = async({ room, access_token, diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 7db96e295f3be..dbee392045f40 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,5 +1,5 @@ import {Meteor} from 'meteor/meteor'; -import { createLiveStream, statusLiveStream, statusStreamLiveStream, statusBroadcast } from './functions/livestream'; +import { createLiveStream, statusLiveStream, statusStreamLiveStream, getBroadcastStatus, setBroadcastStatus } from './functions/livestream'; const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; @@ -103,12 +103,39 @@ Meteor.methods({ const {access_token, refresh_token} = livestreamSettings; - return await statusBroadcast({ + return await getBroadcastStatus({ id: broadcastId, access_token, refresh_token, clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); + }, + async setBroadcastStatus({broadcastId, status}) { + if (!broadcastId) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'Broadcast ID not found', { + method: 'setBroadcastStatus' + }); + } + const livestreamSettings = selectLivestreamSettings(Meteor.user()); + + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to stream', { + method: 'setBroadcastStatus' + }); + } + + const {access_token, refresh_token} = livestreamSettings; + + return await setBroadcastStatus({ + id: broadcastId, + access_token, + refresh_token, + status, + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') + }); + } }); diff --git a/packages/rocketchat-theme/client/imports/components/popout.css b/packages/rocketchat-theme/client/imports/components/popout.css index a9727dd057857..96ba48dec29db 100644 --- a/packages/rocketchat-theme/client/imports/components/popout.css +++ b/packages/rocketchat-theme/client/imports/components/popout.css @@ -113,12 +113,7 @@ stroke: currentColor; } - &.recording { - color: red; - animation: loading 2s infinite; - } - - &.loading { + &.preparing { animation: loading 2s infinite; pointer-events: none; } @@ -126,6 +121,11 @@ color: red; } } + & span { + text-transform: capitalize; + font-size: 15px; + line-height: 18px; + } } &__content-icon { diff --git a/packages/rocketchat-ui/client/views/app/popout.html b/packages/rocketchat-ui/client/views/app/popout.html index 574f4dc8b3e4a..4d2691f965c48 100644 --- a/packages/rocketchat-ui/client/views/app/popout.html +++ b/packages/rocketchat-ui/client/views/app/popout.html @@ -20,6 +20,7 @@

{{> icon icon="podcast"}}

{{#if showStreamControls}}
+ {{ getStreamStatus }}
{{/if}} {{#unless isAudioOnly}} @@ -54,6 +55,7 @@

{{> icon icon="podcast"}}

{{#if showStreamControls}}
+ {{ getStreamStatus }}
{{/if}} diff --git a/packages/rocketchat-ui/client/views/app/popout.js b/packages/rocketchat-ui/client/views/app/popout.js index dd67bb3ba166f..8073eb635fc59 100644 --- a/packages/rocketchat-ui/client/views/app/popout.js +++ b/packages/rocketchat-ui/client/views/app/popout.js @@ -113,7 +113,7 @@ Template.popout.onCreated(function() { this.isMuted = new ReactiveVar(false); this.isPlaying = new ReactiveVar(true); - this.streamStatus = new ReactiveVar('loading'); + this.streamStatus = new ReactiveVar('preparing'); document.body.addEventListener('dragstart', popout.dragstart, true); document.body.addEventListener('dragover', popout.dragover, true); document.body.addEventListener('dragend', popout.dragend, true); @@ -162,8 +162,14 @@ Template.popout.events({ }, 'click .rc-popout__controls--record'(e, i) { e.preventDefault(); - document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); - i.streamStatus.set('starting'); + if (i.streamStatus.get() === 'ready') { + document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); + i.streamStatus.set('starting'); + } else if (i.streamStatus.get() === 'broadcasting') { + document.querySelector('.streaming-popup').dispatchEvent(new Event('stopStreaming')); + i.streamStatus.set('finished'); + setTimeout(() => popout && popout.close(), 2000); + } }, 'broadcastStreamReady .streaming-popup'(e, i) { e.preventDefault(); @@ -171,7 +177,7 @@ Template.popout.events({ }, 'broadcastStream .streaming-popup'(e, i) { e.preventDefault(); - i.streamStatus.set('recording'); + i.streamStatus.set('broadcasting'); }, 'click .rc-popout__controls--play'(e, i) { window.liveStreamPlayer.playVideo(); From eebe4a5ca37b355078ccadde239223d3d3204795 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 13 Mar 2018 16:15:00 -0300 Subject: [PATCH 18/40] Finishing UId improvments to broadcast flow --- packages/rocketchat-auditing | 1 - .../client/styles/liveStreamTab.css | 2 -- .../client/views/broadcastView.js | 18 ++++++++--- .../server/functions/livestream.js | 28 +++++++++++++++-- .../rocketchat-livestream/server/methods.js | 31 +++++++++++++++++-- .../client/imports/components/popout.css | 12 +++---- .../client/views/app/popout.html | 2 ++ .../rocketchat-ui/client/views/app/popout.js | 14 ++++++--- 8 files changed, 86 insertions(+), 22 deletions(-) delete mode 120000 packages/rocketchat-auditing diff --git a/packages/rocketchat-auditing b/packages/rocketchat-auditing deleted file mode 120000 index 04e5bb8416e1b..0000000000000 --- a/packages/rocketchat-auditing +++ /dev/null @@ -1 +0,0 @@ -../../dev/Rocket.Chat.Enterprise/rocketchat-auditing/ \ No newline at end of file diff --git a/packages/rocketchat-livestream/client/styles/liveStreamTab.css b/packages/rocketchat-livestream/client/styles/liveStreamTab.css index 81b04efb3ad38..10438af2c7c06 100644 --- a/packages/rocketchat-livestream/client/styles/liveStreamTab.css +++ b/packages/rocketchat-livestream/client/styles/liveStreamTab.css @@ -16,7 +16,6 @@ font-size: 50px; } & .--play-solid { - fill: var(--color-white); fill: white; } } @@ -38,7 +37,6 @@ & .current-setting { display: inline-block; text-decoration: none; - color: var(--color-dark); color: black; } diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 58fe8ad58a1d3..925e320f9a543 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -77,9 +77,8 @@ Template.broadcastView.onDestroyed(function() { this.mediaRecorder.get().stop(); this.mediaRecorder.set(null); } - if (this.mediaStream) { - const mediaStream = this.mediaStream.get(); - mediaStream.getTracks().map((track) => track.stop()); + if (this.mediaStream.get()) { + this.mediaStream.get().getTracks().map((track) => track.stop()); this.mediaStream.set(null); } }); @@ -127,7 +126,18 @@ Template.broadcastView.onRendered(async function() { Template.broadcastView.events({ async 'startStreaming .streaming-popup'(e, i) { await call('setLivestreamStatus', {broadcastId: i.data.broadcast.id, status: 'live'}); - await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); document.querySelector('.streaming-popup').dispatchEvent(new Event('broadcastStream')); + await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {id: i.data.broadcast.id, url: `https://www.youtube.com/embed/${ i.data.broadcast.id }`, thumbnail: `https://img.youtube.com/vi/${ i.data.broadcast.id }/0.jpg`}); + }, + async 'stopStreaming .streaming-popup'(e, i) { + await call('setBroadcastStatus', { broadcastId: i.data.broadcast.id, status: 'complete' }); + if (i.mediaRecorder.get()) { + i.mediaRecorder.get().stop(); + i.mediaRecorder.set(null); + } + if (i.mediaStream.get()) { + i.mediaStream.get().getTracks().map((track) => track.stop()); + i.mediaStream.set(null); + } } }); diff --git a/packages/rocketchat-livestream/server/functions/livestream.js b/packages/rocketchat-livestream/server/functions/livestream.js index 2ea67ce9acbcf..7affb1e94bf69 100644 --- a/packages/rocketchat-livestream/server/functions/livestream.js +++ b/packages/rocketchat-livestream/server/functions/livestream.js @@ -11,7 +11,7 @@ const p = fn => new Promise(function(resolve, reject) { }); }); -export const statusBroadcast = async({ +export const getBroadcastStatus = async({ id, access_token, refresh_token, @@ -24,13 +24,11 @@ export const statusBroadcast = async({ access_token, refresh_token }); - console.log('asd', id); const youtube = google.youtube({ version:'v3', auth }); const result = await p(resolve => youtube.liveBroadcasts.list({ part:'id,status', id }, resolve)); - return result.items && result.items[0] && result.items[0].status.lifeCycleStatus; }; @@ -80,6 +78,30 @@ export const statusLiveStream = ({ }, resolve)); }; +export const setBroadcastStatus = ({ + id, + access_token, + refresh_token, + clientId, + clientSecret, + status +}) => { + const auth = new OAuth2(clientId, clientSecret); + + auth.setCredentials({ + access_token, + refresh_token + }); + + const youtube = google.youtube({ version:'v3', auth }); + + return p(resolve => youtube.liveBroadcasts.transition({ + part:'id,status', + id, + broadcastStatus: status + }, resolve)); +}; + export const createLiveStream = async({ room, access_token, diff --git a/packages/rocketchat-livestream/server/methods.js b/packages/rocketchat-livestream/server/methods.js index 7db96e295f3be..dbee392045f40 100644 --- a/packages/rocketchat-livestream/server/methods.js +++ b/packages/rocketchat-livestream/server/methods.js @@ -1,5 +1,5 @@ import {Meteor} from 'meteor/meteor'; -import { createLiveStream, statusLiveStream, statusStreamLiveStream, statusBroadcast } from './functions/livestream'; +import { createLiveStream, statusLiveStream, statusStreamLiveStream, getBroadcastStatus, setBroadcastStatus } from './functions/livestream'; const selectLivestreamSettings = (user) => user && user.settings && user.settings.livestream; @@ -103,12 +103,39 @@ Meteor.methods({ const {access_token, refresh_token} = livestreamSettings; - return await statusBroadcast({ + return await getBroadcastStatus({ id: broadcastId, access_token, refresh_token, clientId: RocketChat.settings.get('Broadcasting_client_id'), clientSecret: RocketChat.settings.get('Broadcasting_client_secret') }); + }, + async setBroadcastStatus({broadcastId, status}) { + if (!broadcastId) { + // TODO: change error + throw new Meteor.Error('error-not-allowed', 'Broadcast ID not found', { + method: 'setBroadcastStatus' + }); + } + const livestreamSettings = selectLivestreamSettings(Meteor.user()); + + if (!livestreamSettings) { + throw new Meteor.Error('error-not-allowed', 'You have no settings to stream', { + method: 'setBroadcastStatus' + }); + } + + const {access_token, refresh_token} = livestreamSettings; + + return await setBroadcastStatus({ + id: broadcastId, + access_token, + refresh_token, + status, + clientId: RocketChat.settings.get('Broadcasting_client_id'), + clientSecret: RocketChat.settings.get('Broadcasting_client_secret') + }); + } }); diff --git a/packages/rocketchat-theme/client/imports/components/popout.css b/packages/rocketchat-theme/client/imports/components/popout.css index a9727dd057857..96ba48dec29db 100644 --- a/packages/rocketchat-theme/client/imports/components/popout.css +++ b/packages/rocketchat-theme/client/imports/components/popout.css @@ -113,12 +113,7 @@ stroke: currentColor; } - &.recording { - color: red; - animation: loading 2s infinite; - } - - &.loading { + &.preparing { animation: loading 2s infinite; pointer-events: none; } @@ -126,6 +121,11 @@ color: red; } } + & span { + text-transform: capitalize; + font-size: 15px; + line-height: 18px; + } } &__content-icon { diff --git a/packages/rocketchat-ui/client/views/app/popout.html b/packages/rocketchat-ui/client/views/app/popout.html index 574f4dc8b3e4a..4d2691f965c48 100644 --- a/packages/rocketchat-ui/client/views/app/popout.html +++ b/packages/rocketchat-ui/client/views/app/popout.html @@ -20,6 +20,7 @@

{{> icon icon="podcast"}}

{{#if showStreamControls}}
+ {{ getStreamStatus }}
{{/if}} {{#unless isAudioOnly}} @@ -54,6 +55,7 @@

{{> icon icon="podcast"}}

{{#if showStreamControls}}
+ {{ getStreamStatus }}
{{/if}} diff --git a/packages/rocketchat-ui/client/views/app/popout.js b/packages/rocketchat-ui/client/views/app/popout.js index dd67bb3ba166f..8073eb635fc59 100644 --- a/packages/rocketchat-ui/client/views/app/popout.js +++ b/packages/rocketchat-ui/client/views/app/popout.js @@ -113,7 +113,7 @@ Template.popout.onCreated(function() { this.isMuted = new ReactiveVar(false); this.isPlaying = new ReactiveVar(true); - this.streamStatus = new ReactiveVar('loading'); + this.streamStatus = new ReactiveVar('preparing'); document.body.addEventListener('dragstart', popout.dragstart, true); document.body.addEventListener('dragover', popout.dragover, true); document.body.addEventListener('dragend', popout.dragend, true); @@ -162,8 +162,14 @@ Template.popout.events({ }, 'click .rc-popout__controls--record'(e, i) { e.preventDefault(); - document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); - i.streamStatus.set('starting'); + if (i.streamStatus.get() === 'ready') { + document.querySelector('.streaming-popup').dispatchEvent(new Event('startStreaming')); + i.streamStatus.set('starting'); + } else if (i.streamStatus.get() === 'broadcasting') { + document.querySelector('.streaming-popup').dispatchEvent(new Event('stopStreaming')); + i.streamStatus.set('finished'); + setTimeout(() => popout && popout.close(), 2000); + } }, 'broadcastStreamReady .streaming-popup'(e, i) { e.preventDefault(); @@ -171,7 +177,7 @@ Template.popout.events({ }, 'broadcastStream .streaming-popup'(e, i) { e.preventDefault(); - i.streamStatus.set('recording'); + i.streamStatus.set('broadcasting'); }, 'click .rc-popout__controls--play'(e, i) { window.liveStreamPlayer.playVideo(); From 96d59cc70da0eb931fe1387e3fcacff4dc8fd3d3 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 13 Mar 2018 17:37:13 -0300 Subject: [PATCH 19/40] lint fix --- packages/rocketchat-livestream/client/oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-livestream/client/oauth.js b/packages/rocketchat-livestream/client/oauth.js index 512390039bb39..af59e3c675e4f 100644 --- a/packages/rocketchat-livestream/client/oauth.js +++ b/packages/rocketchat-livestream/client/oauth.js @@ -1,5 +1,5 @@ export const close = (popup) => { - return new Promise(function(resolve, reject) { + return new Promise(function(resolve) { const checkInterval = setInterval(() => { if (popup.closed) { clearInterval(checkInterval); From 29acd17d026c3865b479225bf177e7dfd9dc38e4 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 13 Mar 2018 18:00:09 -0300 Subject: [PATCH 20/40] update localhost urls for auth --- packages/rocketchat-livestream/client/views/broadcastView.js | 2 +- packages/rocketchat-livestream/server/routes.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 925e320f9a543..1cd7f66058b69 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -60,7 +60,7 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(async function() { - const connection = createAndConnect(`ws://localhost:3002/${ this.data.id }`); + const connection = createAndConnect(`ws://${ RocketChat.settings.get('Site_Url') }:3002/${ this.data.id }`); this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); this.connection = new ReactiveVar(connection); diff --git a/packages/rocketchat-livestream/server/routes.js b/packages/rocketchat-livestream/server/routes.js index 17ecc69555868..26d80d164a2d2 100644 --- a/packages/rocketchat-livestream/server/routes.js +++ b/packages/rocketchat-livestream/server/routes.js @@ -3,7 +3,7 @@ const OAuth2 = google.auth.OAuth2; RocketChat.API.v1.addRoute('livestream/oauth', { get: function functionName() { - const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); + const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), `${ RocketChat.settings.get('Site_Url') }/api/v1/livestream/oauth/callback`); const { userId } = this.queryParams; console.log('userId', userId); const url = clientAuth.generateAuthUrl({ @@ -29,7 +29,7 @@ RocketChat.API.v1.addRoute('livestream/oauth/callback', { const { userId } = JSON.parse(state); - const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), 'http://localhost:3000/api/v1/livestream/oauth/callback'); + const clientAuth = new OAuth2(RocketChat.settings.get('Broadcasting_client_id'), RocketChat.settings.get('Broadcasting_client_secret'), `${ RocketChat.settings.get('Site_Url') }/api/v1/livestream/oauth/callback`); const ret = Meteor.wrapAsync(clientAuth.getToken.bind(clientAuth))(code); From a67e4498f93774cadf2482613c8755d1af1f9502 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Tue, 13 Mar 2018 18:27:04 -0300 Subject: [PATCH 21/40] update site url --- packages/rocketchat-livestream/client/oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-livestream/client/oauth.js b/packages/rocketchat-livestream/client/oauth.js index af59e3c675e4f..73be90578b13a 100644 --- a/packages/rocketchat-livestream/client/oauth.js +++ b/packages/rocketchat-livestream/client/oauth.js @@ -10,6 +10,6 @@ export const close = (popup) => { }; export const auth = async() => { - const oauthWindow = window.open(`/api/v1/livestream/oauth?userId=${ Meteor.userId() }`, 'youtube-integration-oauth', 'width=400,height=600'); + const oauthWindow = window.open(`${ RocketChat.settings.get('Site_Url') }/api/v1/livestream/oauth?userId=${ Meteor.userId() }`, 'youtube-integration-oauth', 'width=400,height=600'); return await close(oauthWindow); }; From 8e7069461fafdd7b16f6337053dfd379a19b42f2 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Wed, 14 Mar 2018 17:31:02 -0300 Subject: [PATCH 22/40] remove encoder and add media server url settings --- .../.app/package-lock.json | 874 ++++++++++++++++++ .../client/views/broadcastView.js | 2 +- packages/rocketchat-livestream/package.js | 3 +- .../server/livestreamEncoder.js | 54 -- .../rocketchat-livestream/server/settings.js | 4 +- 5 files changed, 877 insertions(+), 60 deletions(-) create mode 100644 packages/rocketchat-livechat/.app/package-lock.json delete mode 100644 packages/rocketchat-livestream/server/livestreamEncoder.js diff --git a/packages/rocketchat-livechat/.app/package-lock.json b/packages/rocketchat-livechat/.app/package-lock.json new file mode 100644 index 0000000000000..9ab2c8bec66cc --- /dev/null +++ b/packages/rocketchat-livechat/.app/package-lock.json @@ -0,0 +1,874 @@ +{ + "name": "rocketchat-livechat", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.40.tgz", + "integrity": "sha512-vIM68NUCWauZJTFoVUG1lggva1I8FLB9zFKwWG7Xjin4FkHpEKJv2y4x1DGVPVt93S5/zHSBj1bXYEuxOkFGzg==", + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "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.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "autolinker": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.2.tgz", + "integrity": "sha512-IKLGtYFb3jzGTtgCpb4bm//1sXmmmgmr0msKshhYoc7EsWmLCFvuyxLcEIfcZ5gbCgZGXrnXkOkcBblOFEnlog==" + }, + "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.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", + "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", + "requires": { + "nan": "2.6.2", + "node-pre-gyp": "0.6.36" + } + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "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=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + }, + "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=" + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "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" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "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=" + }, + "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.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "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.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "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.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "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==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": 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=" + }, + "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" + } + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.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.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", + "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.4", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "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=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "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=" + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "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=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "rc": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", + "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.0" + } + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", + "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "toastr": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz", + "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", + "requires": { + "jquery": "3.3.1" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "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.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "requires": { + "sprintf-js": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "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.3.0" + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index 1cd7f66058b69..b886ea95c1ed3 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -60,7 +60,7 @@ Template.broadcastView.helpers({ }); Template.broadcastView.onCreated(async function() { - const connection = createAndConnect(`ws://${ RocketChat.settings.get('Site_Url') }:3002/${ this.data.id }`); + const connection = createAndConnect(`${ RocketChat.settings.get('Broadcasting_media_server_url') }/${ this.data.id }`); this.mediaStream = new ReactiveVar(null); this.mediaRecorder = new ReactiveVar(null); this.connection = new ReactiveVar(connection); diff --git a/packages/rocketchat-livestream/package.js b/packages/rocketchat-livestream/package.js index 7f90b696475ab..30b1b9d5ce46a 100644 --- a/packages/rocketchat-livestream/package.js +++ b/packages/rocketchat-livestream/package.js @@ -28,8 +28,7 @@ Package.onUse(function(api) { 'server/index.js', 'server/models/Rooms.js', 'server/functions/saveStreamingOptions.js', - 'server/settings.js', - 'server/livestreamEncoder.js' + 'server/settings.js' ], 'server'); Npm.depends({ diff --git a/packages/rocketchat-livestream/server/livestreamEncoder.js b/packages/rocketchat-livestream/server/livestreamEncoder.js deleted file mode 100644 index b6f1198635791..0000000000000 --- a/packages/rocketchat-livestream/server/livestreamEncoder.js +++ /dev/null @@ -1,54 +0,0 @@ -const ffmpeg = require('fluent-ffmpeg'); -const wss = require('websocket-stream'); -import ws from 'ws'; -const WebSocketServer = new ws.Server({port: 3002}); - -/* -VBR="2500k" # Bitrate de la vidéo en sortie -FPS="30" # FPS de la vidéo en sortie -QUAL="medium" # Preset de qualité FFMPEG -YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube - -SOURCE="default" # Source UDP (voir les annonces SAP) -KEY="x60x-0wyw-51j8-66tf" # Clé à récupérer sur l'event youtube - -ffmpeg \ - -f avfoundation -i "default" -deinterlace \ - -f lavfi -i anullsrc \ - -vcodec libx264 -pix_fmt yuv422p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \ - -acodec libmp3lame -ar 44100 -threads 6 -q:v 3 -b:a 712000 -bufsize 4000k -maxrate 960k \ - -f flv "$YOUTUBE_URL/$KEY" -*/ -WebSocketServer.on('connection', function(websocket, req) { - const name = req.url.replace('/', ''); - console.log(name); - if (!name) { - return websocket.terminate(); - } - const stream = wss(websocket); - const encoder = ffmpeg() - .input(stream) - .videoCodec('libx264') - .audioCodec('libmp3lame') - .outputFPS(30) - .addOption('-ar', 44100) - .addOption('-g', 60) - .addOption('-crf', 18) - .addOption('-pix_fmt', 'yuv420p') - .addOption('-threads', 6) - .addOption('-q:v', 3) - .addOption('-movflags', 'flagstart') - .addOption('-b:a', '384k') - .addOption('-maxrate', '750k') - .addOption('-bufsize', '3000k') - .addOption('-f', 'flv') - .on('error', function(err) { - console.log(`Error: ${ err.message }`); - }) - .save(`rtmp://a.rtmp.youtube.com/live2/${ name }`, function(stdout) { - console.log(`Convert complete${ stdout }`); - }); - websocket.on('close', () => { - encoder.kill(); - }); -}); diff --git a/packages/rocketchat-livestream/server/settings.js b/packages/rocketchat-livestream/server/settings.js index aad36cf0533d2..d195b6a573d63 100644 --- a/packages/rocketchat-livestream/server/settings.js +++ b/packages/rocketchat-livestream/server/settings.js @@ -3,14 +3,12 @@ Meteor.startup(function() { this.add('Livestream_enabled', false, { type: 'boolean', - i18nLabel: 'Enabled', public: true, alert: 'This feature is currently in beta! Please report bugs to github.com/RocketChat/Rocket.Chat/issues' }); this.add('Broadcasting_enabled', false, { type: 'boolean', - i18nLabel: 'Enabled', public: true, alert: 'This feature is currently in beta! Please report bugs to github.com/RocketChat/Rocket.Chat/issues', enableQuery: { _id: 'Livestream_enabled', value: true } @@ -19,6 +17,6 @@ Meteor.startup(function() { this.add('Broadcasting_client_id', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); this.add('Broadcasting_client_secret', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); this.add('Broadcasting_api_key', '', { type: 'string', public: false, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); - + this.add('Broadcasting_media_server_url', '', { type: 'string', public: true, enableQuery: { _id: 'Broadcasting_enabled', value: true } }); }); }); From f606fecb4d60f46f60abbd3aeeab708def02cb84 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Mon, 26 Mar 2018 19:08:13 -0300 Subject: [PATCH 23/40] Adds livestream notifier and clears tab when closing broadcast --- .../rocketchat-livestream/client/tabBar.js | 6 +++++- .../client/views/broadcastView.js | 7 +++++++ .../client/views/liveStreamTab.html | 3 ++- .../client/views/liveStreamTab.js | 11 +++++++++++ .../client/imports/components/header.css | 19 +++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-livestream/client/tabBar.js b/packages/rocketchat-livestream/client/tabBar.js index b7409dc3a0476..17001f5407581 100644 --- a/packages/rocketchat-livestream/client/tabBar.js +++ b/packages/rocketchat-livestream/client/tabBar.js @@ -7,7 +7,11 @@ Meteor.startup(function() { i18nTitle: 'Livestream', icon: 'podcast', template: 'liveStreamTab', - order: 3 + order: 1, + class: () => { + const roomWithStream = RocketChat.models.Rooms.findOne({_id: Session.get('openedRoom')}, { fields: { 'streamingOptions': 1 } }); + return roomWithStream && roomWithStream.streamingOptions && roomWithStream.streamingOptions.id ? 'live' : ''; + } }); } else { RocketChat.TabBar.removeButton('livestream'); diff --git a/packages/rocketchat-livestream/client/views/broadcastView.js b/packages/rocketchat-livestream/client/views/broadcastView.js index b886ea95c1ed3..252dac7bf4419 100644 --- a/packages/rocketchat-livestream/client/views/broadcastView.js +++ b/packages/rocketchat-livestream/client/views/broadcastView.js @@ -131,6 +131,13 @@ Template.broadcastView.events({ }, async 'stopStreaming .streaming-popup'(e, i) { await call('setBroadcastStatus', { broadcastId: i.data.broadcast.id, status: 'complete' }); + await call('saveRoomSettings', Session.get('openedRoom'), 'streamingOptions', {}, (err) => { + if (err) { + return handleError(err); + } + i.editing.set(false); + i.streamingOptions.set({}); + }); if (i.mediaRecorder.get()) { i.mediaRecorder.get().stop(); i.mediaRecorder.set(null); diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.html b/packages/rocketchat-livestream/client/views/liveStreamTab.html index 484e1ee306917..ce7aea6f19113 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.html +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.html @@ -41,7 +41,8 @@ {{else}} diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.js b/packages/rocketchat-livestream/client/views/liveStreamTab.js index aab102c2e8b50..38cbd5673eead 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.js +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.js @@ -107,6 +107,17 @@ Template.liveStreamTab.events({ e.preventDefault(); i.editing.set(false); }, + 'click .js-clear'(e, i) { + e.preventDefault(); + Meteor.call('saveRoomSettings', this.rid, 'streamingOptions', {}, function(err) { + if (err) { + return handleError(err); + } + i.editing.set(false); + i.streamingOptions.set({}); + return toastr.success(TAPi18n.__('Livestream_source_changed_succesfully')); + }); + }, 'click .js-save'(e, i) { e.preventDefault(); diff --git a/packages/rocketchat-theme/client/imports/components/header.css b/packages/rocketchat-theme/client/imports/components/header.css index ad19e063c8d4f..62f44c0880a61 100644 --- a/packages/rocketchat-theme/client/imports/components/header.css +++ b/packages/rocketchat-theme/client/imports/components/header.css @@ -203,6 +203,25 @@ &:hover { color: var(--rc-color-link-active); } + &.live { + position: relative; + } + &.live:before { + content: ''; + position: absolute; + right: -2px; + bottom: -1px; + display: block; + width: 10px; + width: var(--sidebar-account-status-bullet-size); + height: 10px; + height: var(--sidebar-account-status-bullet-size); + border-radius: 50%; + border-radius: var(--sidebar-account-status-bullet-radius); + background-color: #f5455c; + z-index: 1; + animation: blink 1.5s ease-in-out infinite; + } } &__more { From 0003526f8aae3ca9a1df79b0d8e81d3a51f1dfa1 Mon Sep 17 00:00:00 2001 From: Gabriel Delavald Date: Wed, 4 Apr 2018 18:24:45 -0300 Subject: [PATCH 24/40] Adds configurable message when livestream is not available --- .../client/styles/liveStreamTab.css | 3 + .../client/views/liveStreamTab.html | 11 +++- .../client/views/liveStreamTab.js | 61 +++++++++---------- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/packages/rocketchat-livestream/client/styles/liveStreamTab.css b/packages/rocketchat-livestream/client/styles/liveStreamTab.css index 10438af2c7c06..138ea9f5fca12 100644 --- a/packages/rocketchat-livestream/client/styles/liveStreamTab.css +++ b/packages/rocketchat-livestream/client/styles/liveStreamTab.css @@ -23,6 +23,9 @@ & .rc-switch { padding: 15px 5px; } + & .rc-input__label p { + padding: 10px 0; + } } .livestream--url { diff --git a/packages/rocketchat-livestream/client/views/liveStreamTab.html b/packages/rocketchat-livestream/client/views/liveStreamTab.html index ce7aea6f19113..8d8324b990378 100644 --- a/packages/rocketchat-livestream/client/views/liveStreamTab.html +++ b/packages/rocketchat-livestream/client/views/liveStreamTab.html @@ -20,13 +20,20 @@ {{/if}} {{/if}} {{else}} -

{{_ "Livestream_not_found" }}

+

{{ streamingUnavailableMessage }}

{{/if}} {{#if canEdit}} {{#if editing}} {{ > liveStreamBroadcast}}
- + +