From 8b4b1c38762122dea70d011ba4b1aa0b8850bc9c Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 4 Apr 2017 21:23:32 -0300 Subject: [PATCH 01/32] meteor add dispatch:mocha --- .meteor/packages | 2 ++ .meteor/versions | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.meteor/packages b/.meteor/packages index b817beef57..e3a90ee075 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -89,3 +89,5 @@ mizzao:sharejs@=0.9.0 aramk:quill softwarerero:accounts-t9n raix:rssfeed +dispatch:mocha + diff --git a/.meteor/versions b/.meteor/versions index 6511aafea0..5e5820fe56 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -6,6 +6,7 @@ accounts-ui@1.1.9 accounts-ui-unstyled@1.2.0 alanning:roles@1.2.15 aldeed:autoform@5.8.1 +aldeed:browser-tests@0.1.0 aldeed:collection2@2.10.0 aldeed:collection2-core@1.2.0 aldeed:schema-deny@1.1.0 @@ -51,6 +52,7 @@ ddp-server@1.3.13 deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 diff-sequence@1.0.7 +dispatch:mocha@0.3.0 ecmascript@0.6.3 ecmascript-runtime@0.3.15 ejson@1.0.13 @@ -117,6 +119,7 @@ peppelg:bootstrap-3-modal@1.0.4 percolate:migrations@0.9.8 percolate:synced-cron@1.3.2 pfafman:filesaver@1.3.2 +practicalmeteor:mocha-core@1.0.1 promise@0.8.8 raix:eventemitter@0.1.3 raix:handlebar-helpers@0.2.5 From 453f9b0f60f53b6f0b22ad5d4fd91ac6e90d613d Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 4 Apr 2017 15:33:21 -0300 Subject: [PATCH 02/32] Add npm scripts --- package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 897a52deab..1423cae31b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,14 @@ "scripts": { "lint": "eslint .", "lintfix": "eslint --fix .", - "test": "mocha ./.test/" + "pretest": "npm run lint --silent", + "start": "meteor run", + "test-app-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --full-app --once --driver-package dispatch:mocha", + "test-app-phantom": "TEST_BROWSER_DRIVER=phantomjs meteor test --full-app --once --driver-package dispatch:mocha", + "test-app-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --full-app --driver-package dispatch:mocha", + "test-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --once --driver-package dispatch:mocha", + "test-phantom": "TEST_BROWSER_DRIVER=phantomjs meteor test --once --driver-package dispatch:mocha", + "test-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --driver-package dispatch:mocha" }, "repository": { "type": "git", From f4663ddfe1c35f9f9028dfec573af4084adb2e92 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 14:50:05 -0300 Subject: [PATCH 03/32] meteor add practicalmeteor:chai --- .meteor/packages | 2 +- .meteor/versions | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.meteor/packages b/.meteor/packages index e3a90ee075..c12bcd600a 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -90,4 +90,4 @@ aramk:quill softwarerero:accounts-t9n raix:rssfeed dispatch:mocha - +practicalmeteor:chai \ No newline at end of file diff --git a/.meteor/versions b/.meteor/versions index 5e5820fe56..544b6bc368 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -119,6 +119,7 @@ peppelg:bootstrap-3-modal@1.0.4 percolate:migrations@0.9.8 percolate:synced-cron@1.3.2 pfafman:filesaver@1.3.2 +practicalmeteor:chai@2.1.0_1 practicalmeteor:mocha-core@1.0.1 promise@0.8.8 raix:eventemitter@0.1.3 From 3fcffa9660ce727684c336f8cb3b527066389f39 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Fri, 7 Apr 2017 10:23:10 -0300 Subject: [PATCH 04/32] Add a dummy test --- branding/client/branding.tests.js | 39 +++++++++++++++++++++++++++++++ tests/utils/test-helpers.js | 33 ++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 branding/client/branding.tests.js create mode 100644 tests/utils/test-helpers.js diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js new file mode 100644 index 0000000000..38bbcd4c6f --- /dev/null +++ b/branding/client/branding.tests.js @@ -0,0 +1,39 @@ +/* eslint-env mocha */ +/* eslint-disable func-names, prefer-arrow-callback */ + +// Meteor imports +import { Template } from 'meteor/templating'; +// import { $ } from 'meteor/jquery'; + +// Meteor contributed packages imports +import { chai } from 'meteor/practicalmeteor:chai'; + +// APINF imports +// import withRenderedTemplate from '/tests/utils/test-helpers.js'; + +describe('Branding', function () { + // TODO: is there a way to register these two helpers automatically? + beforeEach(function () { + Template.registerHelper('_', key => { return key; }); + }); + afterEach(function () { + Template.deregisterHelper('_'); + }); + + it('makes sure mocha is working', function () { + chai.assert.equal(1 + 2, 2); + }); + + describe('main template', function () { + // Instantiate a Branding template + // checks if all fields are there + }); + + describe('autoform', function () { + // Instantiate brandingEdit autoform + // Mock the call so that the data is not going to be inserted + // Fill all fields + // Hit the button + // Check if sAlert was called + }); +}); diff --git a/tests/utils/test-helpers.js b/tests/utils/test-helpers.js new file mode 100644 index 0000000000..1ccbe07196 --- /dev/null +++ b/tests/utils/test-helpers.js @@ -0,0 +1,33 @@ +/* Copyright 2017 Apinf Oy + This file is covered by the EUPL license. + You may obtain a copy of the licence at + https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ + + // Meteor packages imports +import { Blaze } from 'meteor/blaze'; +import { Template } from 'meteor/templating'; +import { Tracker } from 'meteor/tracker'; + +// Npm packages imports +import _ from 'lodash'; + +// Helper function to dynamically create a div +function withDiv (callback) { + const el = document.createElement('div'); + document.body.appendChild(el); + try { + callback(el); + } finally { + document.body.removeChild(el); + } +} + +// Render a template in Blaze for testing purposes +export default function withRenderedTemplate (template, data, callback) { + withDiv((el) => { + const ourTemplate = _.isString(template) ? Template[template] : template; + Blaze.renderWithData(ourTemplate, data, el); + Tracker.flush(); + callback(el); + }); +} From d09bc9ba2121047caa559ef7360d5ebe385b555b Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Fri, 7 Apr 2017 11:38:06 -0300 Subject: [PATCH 05/32] Fix dummy test. --- branding/client/branding.tests.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index 38bbcd4c6f..212558e034 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -21,12 +21,15 @@ describe('Branding', function () { }); it('makes sure mocha is working', function () { - chai.assert.equal(1 + 2, 2); + chai.assert.equal(1 + 2, 3); }); describe('main template', function () { // Instantiate a Branding template // checks if all fields are there + it('makes sure mocha is working mult', function () { + chai.assert.equal(1 * 2, 2); + }); }); describe('autoform', function () { @@ -35,5 +38,8 @@ describe('Branding', function () { // Fill all fields // Hit the button // Check if sAlert was called + it('makes sure mocha is working multiply', function () { + chai.assert.equal(10 * 2, 20); + }); }); }); From 42fa2af92b5419ee882726b71a44bb8e745a20a4 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 15:29:55 -0300 Subject: [PATCH 06/32] Add npm test scripts --- package.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1423cae31b..6aecfd3aed 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,8 @@ "eslint-config-airbnb-base": "^5.0.3", "eslint-import-resolver-meteor": "^0.3.3", "eslint-plugin-import": "^1.14.0", - "eslint-plugin-meteor": "^4.0.0" + "eslint-plugin-meteor": "^4.0.0", + "nightmare": "^2.10.0" }, "scripts": { "lint": "eslint .", @@ -48,11 +49,12 @@ "pretest": "npm run lint --silent", "start": "meteor run", "test-app-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --full-app --once --driver-package dispatch:mocha", - "test-app-phantom": "TEST_BROWSER_DRIVER=phantomjs meteor test --full-app --once --driver-package dispatch:mocha", + "test-app-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --full-app --once --driver-package dispatch:mocha", "test-app-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --full-app --driver-package dispatch:mocha", "test-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --once --driver-package dispatch:mocha", - "test-phantom": "TEST_BROWSER_DRIVER=phantomjs meteor test --once --driver-package dispatch:mocha", - "test-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --driver-package dispatch:mocha" + "test-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --once --driver-package dispatch:mocha", + "test-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --driver-package dispatch:mocha", + "test": "npm run test-nightmare && npm run test-app-nightmare" }, "repository": { "type": "git", From 8ae163dc4f23148b7649fa9dd4445f01dae3c59e Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 16:13:12 -0300 Subject: [PATCH 07/32] Improve continuous integration - Install meteor - Cache meteor installation - Run tests - Run eslint as a pretest step - Inspired by https://github.com/RocketChat/Rocket.Chat/blob/16743fb2c80f575fd2021d42ac5e31df76db128f/.travis.yml --- .travis.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93de32696e..4d7e73bb5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,16 +9,29 @@ branches: cache: yarn: true + directories: + - "$HOME/.meteor" + - "$HOME/build/apinf/platform/node_modules" + - "$HOME/build/apinf/platform/.meteor/local" before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH + - export PATH="$HOME/.yarn/bin:$HOME/.meteor:$PATH" + - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi services: - docker -before_script: - - yarn run lint +before_cache: + - rm -rf $HOME/build/apinf/platform/.meteor/local/log + - rm -rf $HOME/build/apinf/platform/.meteor/local/run + - rm -rf $HOME/build/apinf/platform/.meteor/local/db + +install: + - yarn install script: + - yarn test + +after_success: - ./.scripts/docker_build.sh From 22387ffaae3a538c8a8a7443a9d12501ce078c12 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 18:27:44 -0300 Subject: [PATCH 08/32] Wait tests to run for 30 minutes --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d7e73bb5b..388dbb154c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ install: - yarn install script: - - yarn test + - travis_wait 30 yarn test after_success: - ./.scripts/docker_build.sh From 64a1f9dab45680d56bcfa12d78676221a8d78cd5 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 19:22:22 -0300 Subject: [PATCH 09/32] Add chromedriver according to dispatch:mocha docs --- branding/client/branding.tests.js | 2 +- package.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index 212558e034..c8a19013af 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -2,7 +2,7 @@ /* eslint-disable func-names, prefer-arrow-callback */ // Meteor imports -import { Template } from 'meteor/templating'; +// import { Template } from 'meteor/templating'; // import { $ } from 'meteor/jquery'; // Meteor contributed packages imports diff --git a/package.json b/package.json index 6aecfd3aed..aee93a02c4 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,15 @@ "devDependencies": { "JSONStream": "^1.3.1", "babel-eslint": "^6.1.2", + "chromedriver": "^2.29.0", "csv-streamify": "^3.0.4", "eslint": "^3.4.0", "eslint-config-airbnb-base": "^5.0.3", "eslint-import-resolver-meteor": "^0.3.3", "eslint-plugin-import": "^1.14.0", "eslint-plugin-meteor": "^4.0.0", - "nightmare": "^2.10.0" + "nightmare": "^2.10.0", + "selenium-webdriver": "^3.0.0-beta-2" }, "scripts": { "lint": "eslint .", From 267b984535fa5d81547ac4808cad074b6cdf5240 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 11 Apr 2017 19:48:01 -0300 Subject: [PATCH 10/32] meteor add dispatch:mocha-browser --- .meteor/packages | 3 ++- .meteor/versions | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.meteor/packages b/.meteor/packages index c12bcd600a..909c2d434f 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -90,4 +90,5 @@ aramk:quill softwarerero:accounts-t9n raix:rssfeed dispatch:mocha -practicalmeteor:chai \ No newline at end of file +practicalmeteor:chai +dispatch:mocha-browser diff --git a/.meteor/versions b/.meteor/versions index 544b6bc368..42ca9e1d0a 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -53,6 +53,7 @@ deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 diff-sequence@1.0.7 dispatch:mocha@0.3.0 +dispatch:mocha-browser@0.0.4 ecmascript@0.6.3 ecmascript-runtime@0.3.15 ejson@1.0.13 From 490d661979e3b49d842ad8ad83584fb6d659427a Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Thu, 13 Apr 2017 18:40:05 +0300 Subject: [PATCH 11/32] Create a new server method userIsAdmin The method checkes if current user has an admin role --- users/server/methods.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/users/server/methods.js b/users/server/methods.js index e48d4c0448..9de22601a9 100644 --- a/users/server/methods.js +++ b/users/server/methods.js @@ -9,12 +9,17 @@ import { check } from 'meteor/check'; // Meteor contributed packages imports import { Accounts } from 'meteor/accounts-base'; +import { Roles } from 'meteor/alanning:roles'; import { ValidEmail } from 'meteor/froatsnook:valid-email'; // Collection imports import Settings from '/settings/collection'; Meteor.methods({ + userIsAdmin () { + // Make sure user is admin + return Roles.userIsInRole(this.userId, ['admin']); + }, deleteAccount (userId) { // Make sure userId is a String check(userId, String); From cce9b53f03914a923551d73910f7ffdb5720810f Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Thu, 13 Apr 2017 18:41:38 +0300 Subject: [PATCH 12/32] Remove part with FlorRouter.wait() Check if user is admin usgin the server method Add route '/users' as "requireAdminRole" --- core/client/lib/router.js | 43 ++++++++++----------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/core/client/lib/router.js b/core/client/lib/router.js index c0be725a03..b5093c2acf 100644 --- a/core/client/lib/router.js +++ b/core/client/lib/router.js @@ -1,32 +1,14 @@ /* Copyright 2017 Apinf Oy -This file is covered by the EUPL license. -You may obtain a copy of the licence at -https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ + This file is covered by the EUPL license. + You may obtain a copy of the licence at + https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ // Meteor packages imports import { Meteor } from 'meteor/meteor'; -import { Tracker } from 'meteor/tracker'; // Meteor contributed packages imports import { BlazeLayout } from 'meteor/kadira:blaze-layout'; import { FlowRouter } from 'meteor/kadira:flow-router'; -import { Roles } from 'meteor/alanning:roles'; - -FlowRouter.wait(); - -Tracker.autorun(() => { - // The Roles package actually depends on a subscription. - // If the subscription is not ready the Roles.userIsInRole method will always return false. - // That is used for checking of does user have the admin role - - // Make sure the roles subscription is ready & FlowRouter hasn't initialized already - if (Roles.subscription.ready() && !FlowRouter._initialized) { - // Start routing - return FlowRouter.initialize(); - } - // Otherwise nothing - return undefined; -}); // Define group for routes that require sign in const signedIn = FlowRouter.group({ @@ -66,24 +48,21 @@ const redirectToCatalogue = function () { }; const requireAdminRole = function () { - // Get user ID - const userId = Meteor.userId(); - - if (userId) { - const userIsAdmin = Roles.userIsInRole(userId, ['admin']); - - if (!userIsAdmin) { + // Using a server method check if user is admin + Meteor.call('userIsAdmin', (error, result) => { + if (!result) { // User is not authorized to access route FlowRouter.go('notAuthorized'); } - } else { - FlowRouter.go('signIn'); - } + }); }; FlowRouter.triggers.enter([redirectToCatalogue], { only: ['forgotPwd'] }); // Routes that require admin role -FlowRouter.triggers.enter([requireAdminRole], { only: ['settings', 'branding', 'proxies'] }); +FlowRouter.triggers.enter( + [requireAdminRole], + { only: ['settings', 'branding', 'proxies', 'accountsAdmin'] } +); export default signedIn; From dace8933e3f1f6fcf72104e0fb8f4635f064d82c Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Thu, 13 Apr 2017 18:41:45 +0300 Subject: [PATCH 13/32] Add route '/users' as "requireAdminRole" --- users/client/lib/router.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/users/client/lib/router.js b/users/client/lib/router.js index b76ea35795..ce7a01a983 100644 --- a/users/client/lib/router.js +++ b/users/client/lib/router.js @@ -3,42 +3,19 @@ This file is covered by the EUPL license. You may obtain a copy of the licence at https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ -// Meteor packages imports -import { Meteor } from 'meteor/meteor'; - // Meteor contributed packages imports import { Accounts } from 'meteor/accounts-base'; import { AccountsTemplates } from 'meteor/useraccounts:core'; import { BlazeLayout } from 'meteor/kadira:blaze-layout'; import { FlowRouter } from 'meteor/kadira:flow-router'; -import { Roles } from 'meteor/alanning:roles'; import { TAPi18n } from 'meteor/tap:i18n'; import { sAlert } from 'meteor/juliancwirko:s-alert'; // APINF imports import signedIn from '/core/client/lib/router'; -FlowRouter.route('/users', { +signedIn.route('/users', { name: 'accountsAdmin', - triggersEnter: [ - function (context, redirect) { - /* - Make sure user is authorized to access route (admin users only) - */ - - // Get current User ID - const userId = Meteor.userId(); - - // Check if User is admin - const userIsAdmin = Roles.userIsInRole(userId, 'admin'); - - // If user is not an admin - if (!userIsAdmin) { - // Redirect to 'not authorized' route - redirect('/not-authorized'); - } - }, - ], action () { BlazeLayout.render('masterLayout', { main: 'accountsAdmin' }); }, From 80dbfed13823ed70f2d3e899776fab2858aee4e2 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:07:16 -0300 Subject: [PATCH 14/32] Import template to fix lint --- branding/client/branding.tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index c8a19013af..212558e034 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -2,7 +2,7 @@ /* eslint-disable func-names, prefer-arrow-callback */ // Meteor imports -// import { Template } from 'meteor/templating'; +import { Template } from 'meteor/templating'; // import { $ } from 'meteor/jquery'; // Meteor contributed packages imports From 8f346d33c50f417da82930cca25776bfe3b0fce8 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:38:58 -0300 Subject: [PATCH 15/32] Revert "Remove part with FlorRouter.wait()" This reverts commit e0ae73778843a8fe8fb4af4558114397f1cded3f. --- core/client/lib/router.js | 43 +++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/core/client/lib/router.js b/core/client/lib/router.js index b5093c2acf..c0be725a03 100644 --- a/core/client/lib/router.js +++ b/core/client/lib/router.js @@ -1,14 +1,32 @@ /* Copyright 2017 Apinf Oy - This file is covered by the EUPL license. - You may obtain a copy of the licence at - https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ +This file is covered by the EUPL license. +You may obtain a copy of the licence at +https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ // Meteor packages imports import { Meteor } from 'meteor/meteor'; +import { Tracker } from 'meteor/tracker'; // Meteor contributed packages imports import { BlazeLayout } from 'meteor/kadira:blaze-layout'; import { FlowRouter } from 'meteor/kadira:flow-router'; +import { Roles } from 'meteor/alanning:roles'; + +FlowRouter.wait(); + +Tracker.autorun(() => { + // The Roles package actually depends on a subscription. + // If the subscription is not ready the Roles.userIsInRole method will always return false. + // That is used for checking of does user have the admin role + + // Make sure the roles subscription is ready & FlowRouter hasn't initialized already + if (Roles.subscription.ready() && !FlowRouter._initialized) { + // Start routing + return FlowRouter.initialize(); + } + // Otherwise nothing + return undefined; +}); // Define group for routes that require sign in const signedIn = FlowRouter.group({ @@ -48,21 +66,24 @@ const redirectToCatalogue = function () { }; const requireAdminRole = function () { - // Using a server method check if user is admin - Meteor.call('userIsAdmin', (error, result) => { - if (!result) { + // Get user ID + const userId = Meteor.userId(); + + if (userId) { + const userIsAdmin = Roles.userIsInRole(userId, ['admin']); + + if (!userIsAdmin) { // User is not authorized to access route FlowRouter.go('notAuthorized'); } - }); + } else { + FlowRouter.go('signIn'); + } }; FlowRouter.triggers.enter([redirectToCatalogue], { only: ['forgotPwd'] }); // Routes that require admin role -FlowRouter.triggers.enter( - [requireAdminRole], - { only: ['settings', 'branding', 'proxies', 'accountsAdmin'] } -); +FlowRouter.triggers.enter([requireAdminRole], { only: ['settings', 'branding', 'proxies'] }); export default signedIn; From a8038af18ca4292b912cffcbd33c19478588c453 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:41:32 -0300 Subject: [PATCH 16/32] Add copyright header --- branding/client/branding.tests.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index 212558e034..edbf3d4571 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -1,3 +1,8 @@ +/* Copyright 2017 Apinf Oy +This file is covered by the EUPL license. +You may obtain a copy of the licence at +https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ + /* eslint-env mocha */ /* eslint-disable func-names, prefer-arrow-callback */ From 35e39d2f9a0ed96f9c4f8ff17e5c82e4e62d9cde Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:47:23 -0300 Subject: [PATCH 17/32] Revert "Create a new server method userIsAdmin" This reverts commit 53e85d576a3dc8786db52b35e0056b0ca4025d26. --- users/server/methods.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/users/server/methods.js b/users/server/methods.js index 9de22601a9..e48d4c0448 100644 --- a/users/server/methods.js +++ b/users/server/methods.js @@ -9,17 +9,12 @@ import { check } from 'meteor/check'; // Meteor contributed packages imports import { Accounts } from 'meteor/accounts-base'; -import { Roles } from 'meteor/alanning:roles'; import { ValidEmail } from 'meteor/froatsnook:valid-email'; // Collection imports import Settings from '/settings/collection'; Meteor.methods({ - userIsAdmin () { - // Make sure user is admin - return Roles.userIsInRole(this.userId, ['admin']); - }, deleteAccount (userId) { // Make sure userId is a String check(userId, String); From 69cb95ca6b4d642b7743af44d5764d8147de4a22 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:53:25 -0300 Subject: [PATCH 18/32] Format code to improve readability --- core/client/lib/router.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/client/lib/router.js b/core/client/lib/router.js index c0be725a03..6e106b21d3 100644 --- a/core/client/lib/router.js +++ b/core/client/lib/router.js @@ -84,6 +84,9 @@ const requireAdminRole = function () { FlowRouter.triggers.enter([redirectToCatalogue], { only: ['forgotPwd'] }); // Routes that require admin role -FlowRouter.triggers.enter([requireAdminRole], { only: ['settings', 'branding', 'proxies'] }); +FlowRouter.triggers.enter( + [requireAdminRole], + { only: ['settings', 'branding', 'proxies'] } +); export default signedIn; From 4d2a7c8b99caf94609df101d92e5ce4fe9181aed Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 13:53:56 -0300 Subject: [PATCH 19/32] Wrap FlowRouter initialization in meteor client env --- core/client/lib/router.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/core/client/lib/router.js b/core/client/lib/router.js index 6e106b21d3..c8eb58b404 100644 --- a/core/client/lib/router.js +++ b/core/client/lib/router.js @@ -12,21 +12,23 @@ import { BlazeLayout } from 'meteor/kadira:blaze-layout'; import { FlowRouter } from 'meteor/kadira:flow-router'; import { Roles } from 'meteor/alanning:roles'; -FlowRouter.wait(); - -Tracker.autorun(() => { - // The Roles package actually depends on a subscription. - // If the subscription is not ready the Roles.userIsInRole method will always return false. - // That is used for checking of does user have the admin role - - // Make sure the roles subscription is ready & FlowRouter hasn't initialized already - if (Roles.subscription.ready() && !FlowRouter._initialized) { - // Start routing - return FlowRouter.initialize(); - } - // Otherwise nothing - return undefined; -}); +if (Meteor.isClient) { + FlowRouter.wait(); + + Tracker.autorun(() => { + // The Roles package actually depends on a subscription. + // If the subscription is not ready the Roles.userIsInRole method will always return false. + // That is used for checking of does user have the admin role + + // Make sure the roles subscription is ready & FlowRouter hasn't initialized already + if (Roles.subscription.ready() && !FlowRouter._initialized) { + // Start routing + return FlowRouter.initialize(); + } + // Otherwise nothing + return undefined; + }); +} // Define group for routes that require sign in const signedIn = FlowRouter.group({ From 601a9bf360f852d0320168d11467e0ac9890ad82 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 15:00:51 -0300 Subject: [PATCH 20/32] Workaround for FlowRouter error - [ERROR] There is no route for the path: / --- branding/client/branding.tests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index edbf3d4571..676a133e04 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -11,11 +11,17 @@ import { Template } from 'meteor/templating'; // import { $ } from 'meteor/jquery'; // Meteor contributed packages imports +import { FlowRouter } from 'meteor/kadira:flow-router'; import { chai } from 'meteor/practicalmeteor:chai'; // APINF imports // import withRenderedTemplate from '/tests/utils/test-helpers.js'; +FlowRouter.route('/', { + name: 'hack route for tests', + action () {}, +}); + describe('Branding', function () { // TODO: is there a way to register these two helpers automatically? beforeEach(function () { From 38c6d6ebca2d9def5840c01a3506759c94738efb Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 13 Apr 2017 15:31:25 -0300 Subject: [PATCH 21/32] meteor remove tap:i18n-ui --- .meteor/packages | 1 - .meteor/versions | 1 - 2 files changed, 2 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index 909c2d434f..d173196f1b 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -73,7 +73,6 @@ spiderable@1.0.14-release-testing.0 standard-minifier-css@1.3.3 standard-minifier-js@1.2.2 tap:i18n -tap:i18n-ui tmeasday:publish-counts todda00:friendly-slugs tracker@1.1.2 diff --git a/.meteor/versions b/.meteor/versions index 42ca9e1d0a..324749319a 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -152,7 +152,6 @@ srp@1.0.10 standard-minifier-css@1.3.3 standard-minifier-js@1.2.2 tap:i18n@1.8.2 -tap:i18n-ui@0.8.0 templating@1.3.0 templating-compiler@1.3.0 templating-runtime@1.3.0 From 272ed487a586f9a865553fa132046de0b6a360a3 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Wed, 19 Apr 2017 09:56:18 +0300 Subject: [PATCH 22/32] Revert "Add chromedriver according to dispatch:mocha docs" This reverts commit a982d14c03037a67357059cbccdfee5f9d88abb5. --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index aee93a02c4..6aecfd3aed 100644 --- a/package.json +++ b/package.json @@ -35,15 +35,13 @@ "devDependencies": { "JSONStream": "^1.3.1", "babel-eslint": "^6.1.2", - "chromedriver": "^2.29.0", "csv-streamify": "^3.0.4", "eslint": "^3.4.0", "eslint-config-airbnb-base": "^5.0.3", "eslint-import-resolver-meteor": "^0.3.3", "eslint-plugin-import": "^1.14.0", "eslint-plugin-meteor": "^4.0.0", - "nightmare": "^2.10.0", - "selenium-webdriver": "^3.0.0-beta-2" + "nightmare": "^2.10.0" }, "scripts": { "lint": "eslint .", From c40e6b67c30cc8bf7c7e047a288c90e71f83fbda Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Wed, 19 Apr 2017 11:25:02 +0300 Subject: [PATCH 23/32] Change npm scripts - test-chrome now uses dispatch:mocha-browser - npm test now only runs test-nightmare --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6aecfd3aed..3ddbbf3d19 100644 --- a/package.json +++ b/package.json @@ -48,13 +48,13 @@ "lintfix": "eslint --fix .", "pretest": "npm run lint --silent", "start": "meteor run", - "test-app-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --full-app --once --driver-package dispatch:mocha", + "test-app-chrome": "meteor test --full-app --once --driver-package dispatch:mocha-browser", "test-app-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --full-app --once --driver-package dispatch:mocha", - "test-app-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --full-app --driver-package dispatch:mocha", - "test-chrome": "TEST_BROWSER_DRIVER=chrome meteor test --once --driver-package dispatch:mocha", + "test-app-watch": "TEST_WATCH=1 meteor test --full-app --driver-package dispatch:mocha-browser", + "test-chrome": "meteor test --once --driver-package dispatch:mocha-browser", "test-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --once --driver-package dispatch:mocha", - "test-watch": "TEST_BROWSER_DRIVER=chrome TEST_WATCH=1 meteor test --driver-package dispatch:mocha", - "test": "npm run test-nightmare && npm run test-app-nightmare" + "test-watch": "TEST_WATCH=1 meteor test --driver-package dispatch:mocha-browser", + "test": "npm run test-nightmare" }, "repository": { "type": "git", From d97008cbd2fa9f361273435aad8a31fb5806e378 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Wed, 19 Apr 2017 11:42:41 +0300 Subject: [PATCH 24/32] Remove travis caching - https://travis-ci.org/apinf/platform/builds/223464835 error seems to be cause by current installed packages - TODO: add caching back after build is OK --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 388dbb154c..acc6cf1633 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,9 @@ branches: only: - develop +services: + - docker + cache: yarn: true directories: @@ -14,19 +17,16 @@ cache: - "$HOME/build/apinf/platform/node_modules" - "$HOME/build/apinf/platform/.meteor/local" -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH="$HOME/.yarn/bin:$HOME/.meteor:$PATH" - - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi - -services: - - docker - before_cache: - rm -rf $HOME/build/apinf/platform/.meteor/local/log - rm -rf $HOME/build/apinf/platform/.meteor/local/run - rm -rf $HOME/build/apinf/platform/.meteor/local/db +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH="$HOME/.yarn/bin:$HOME/.meteor:$PATH" + - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi + install: - yarn install From 5b3782cbf0d300ac0cb74b17bf22e57aa172960d Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 20 Apr 2017 13:29:47 +0300 Subject: [PATCH 25/32] meteor add dburles:factory --- .meteor/packages | 1 + .meteor/versions | 1 + 2 files changed, 2 insertions(+) diff --git a/.meteor/packages b/.meteor/packages index d173196f1b..0611a5137d 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -91,3 +91,4 @@ raix:rssfeed dispatch:mocha practicalmeteor:chai dispatch:mocha-browser +dburles:factory diff --git a/.meteor/versions b/.meteor/versions index 324749319a..0bdc8448c5 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -44,6 +44,7 @@ check@1.2.5 coffeescript@1.12.3_1 dandv:jquery-rateit@1.0.22_2 dburles:collection-helpers@1.1.0 +dburles:factory@1.1.0 ddp@1.2.5 ddp-client@1.3.3 ddp-common@1.2.8 From 6fa44f30ca2e9a8f87238169d45aeb60a6e6ec62 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Thu, 20 Apr 2017 15:17:56 +0300 Subject: [PATCH 26/32] Add faker npm package as dev-dependency --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 3ddbbf3d19..b114c3525d 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "eslint-import-resolver-meteor": "^0.3.3", "eslint-plugin-import": "^1.14.0", "eslint-plugin-meteor": "^4.0.0", + "faker": "^4.1.0", "nightmare": "^2.10.0" }, "scripts": { From 2bd4030abe2499537b01f59effce6917e9cbaa84 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Fri, 21 Apr 2017 17:18:56 +0300 Subject: [PATCH 27/32] Use yarn --- .travis.yml | 2 +- package.json | 4 +- yarn.lock | 765 ++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 736 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index acc6cf1633..3d2d205523 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_install: - if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi install: - - yarn install + - yarn script: - travis_wait 30 yarn test diff --git a/package.json b/package.json index b114c3525d..d8da7036ec 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "scripts": { "lint": "eslint .", "lintfix": "eslint --fix .", - "pretest": "npm run lint --silent", + "pretest": "yarn run lint --silent", "start": "meteor run", "test-app-chrome": "meteor test --full-app --once --driver-package dispatch:mocha-browser", "test-app-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --full-app --once --driver-package dispatch:mocha", @@ -55,7 +55,7 @@ "test-chrome": "meteor test --once --driver-package dispatch:mocha-browser", "test-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --once --driver-package dispatch:mocha", "test-watch": "TEST_WATCH=1 meteor test --driver-package dispatch:mocha-browser", - "test": "npm run test-nightmare" + "test": "yarn run test-nightmare" }, "repository": { "type": "git", diff --git a/yarn.lock b/yarn.lock index e23420c554..17ad2a9213 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,9 +38,9 @@ ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv@^4.7.0: - version "4.11.7" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.7.tgz#8655a5d86d0824985cc471a1d913fb6729a0ec48" +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -63,6 +63,10 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -89,6 +93,18 @@ asn1.js@^4.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + assert@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" @@ -99,6 +115,18 @@ async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" @@ -251,6 +279,12 @@ base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + bcrypt@^0.8.7: version "0.8.7" resolved "https://registry.yarnpkg.com/bcrypt/-/bcrypt-0.8.7.tgz#bc3875a9afd0a7b2cd231a6a7f218a5ce156b093" @@ -266,6 +300,12 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + brace-expansion@^1.0.0: version "1.1.7" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" @@ -348,7 +388,7 @@ buffer@^4.9.1: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.1.1: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -366,6 +406,21 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -404,6 +459,10 @@ clipboard@^1.5.16: select "^1.1.2" tiny-emitter "^1.0.0" +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -412,12 +471,18 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -combined-stream@^1.0.5: +combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" dependencies: delayed-stream "~1.0.0" +commander@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/commander/-/commander-1.0.4.tgz#5edeb1aee23c4fb541a6b70d692abef19669a2d3" + dependencies: + keypress "0.1.x" + commander@^2.7.1: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" @@ -432,7 +497,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.2: +concat-stream@1.6.0, concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -501,6 +566,12 @@ crossfilter@^1.3.12: version "1.3.12" resolved "https://registry.yarnpkg.com/crossfilter/-/crossfilter-1.3.12.tgz#147d7236a98c45c69f78bdc3a99d6fb00f70930c" +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + crypto-browserify@^3.11.0: version "3.11.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" @@ -522,6 +593,12 @@ csv-streamify@^3.0.4: dependencies: through2 "2.0.1" +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + d3@^3, d3@^3.5.17: version "3.5.17" resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" @@ -532,6 +609,12 @@ d@1: dependencies: es5-ext "^0.10.9" +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + datatables@^1.10.12: version "1.10.13" resolved "https://registry.yarnpkg.com/datatables/-/datatables-1.10.13.tgz#9bb2dec6f7dcf02049a00e4f0e7d3fe009c39346" @@ -549,16 +632,42 @@ dc@^2.1.3: crossfilter2 "~1.3" d3 "^3" -debug@2, debug@^2.1.1, debug@^2.2.0: - version "2.6.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.4.tgz#7586a9b3c39741c0282ae33445c4e8ac74734fe0" +debug@2, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0: + version "2.6.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a" dependencies: ms "0.7.3" +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/deep-defaults/-/deep-defaults-1.0.4.tgz#1a9762e2b6c8d6a4e9931b8ee7ff8cdcee1d1750" + dependencies: + lodash "3.0.x" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +defaults@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -618,6 +727,12 @@ domain-browser@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + elasticsearch@^11.0.1: version "11.0.1" resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-11.0.1.tgz#d180684c6bde7ecfa0fa24e62fa1c872eeae08e7" @@ -628,6 +743,27 @@ elasticsearch@^11.0.1: lodash-compat "^3.0.0" promise "^7.1.1" +electron-download@^3.0.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-3.3.0.tgz#2cfd54d6966c019c4d49ad65fbe65cc9cdef68c8" + dependencies: + debug "^2.2.0" + fs-extra "^0.30.0" + home-path "^1.0.1" + minimist "^1.2.0" + nugget "^2.0.0" + path-exists "^2.1.0" + rc "^1.1.2" + semver "^5.3.0" + sumchecker "^1.2.0" + +electron@^1.4.4: + version "1.6.8" + resolved "https://registry.yarnpkg.com/electron/-/electron-1.6.8.tgz#41cbbe7272ccd93339c040f856c0d6372a4ddb07" + dependencies: + electron-download "^3.0.1" + extract-zip "^1.0.3" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -640,6 +776,18 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +enqueue@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/enqueue/-/enqueue-1.0.2.tgz#9014e9bce570ee93ca96e6c8e63ad54c192b6bc8" + dependencies: + sliced "0.0.5" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.15" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" @@ -670,6 +818,10 @@ es6-promise@^3.0.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" +es6-promise@^4.0.5: + version "4.1.0" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.0.tgz#dda03ca8f9f89bc597e689842929de7ba8cebdf0" + es6-set@^0.1.4, es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -802,8 +954,8 @@ eslint@^3.4.0: user-home "^2.0.0" espree@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.1.tgz#28a83ab4aaed71ed8fe0f5efe61b76a05c13c4d2" + version "3.4.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.2.tgz#38dbdedbedc95b8961a1fbf04734a8f6a9c8c592" dependencies: acorn "^5.0.1" acorn-jsx "^3.0.0" @@ -859,13 +1011,36 @@ exit-hook@^1.0.0: resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" extend@3, extend@^3.0.0, extend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extract-zip@^1.0.3: + version "1.6.5" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.5.tgz#99a06735b6ea20ea9b705d779acffcc87cff0440" + dependencies: + concat-stream "1.6.0" + debug "2.2.0" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +faker@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/faker/-/faker-4.1.0.tgz#1e45bbbecc6774b3c195fad2835109c6d748cc3f" fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -903,7 +1078,7 @@ follow-redirects@0.0.7: debug "^2.2.0" stream-consume "^0.1.0" -forever-agent@^0.6.0: +forever-agent@^0.6.0, forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -915,10 +1090,28 @@ form-data@1.0.0-rc4: combined-stream "^1.0.5" mime-types "^2.1.10" +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + formidable@^1.0.17: version "1.1.1" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9" +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -927,6 +1120,10 @@ function-bind@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-source@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/function-source/-/function-source-0.1.0.tgz#d9104bf3e46788b55468c02bf1b2fabcf8fc19af" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -937,6 +1134,16 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + github@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/github/-/github-1.4.0.tgz#60aed8f16ffe381a3ca6dc6dba5bdd64445b7856" @@ -977,7 +1184,7 @@ good-listener@^1.2.0: dependencies: delegate "^3.1.2" -graceful-fs@^4.1.2: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -985,6 +1192,17 @@ graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -1003,6 +1221,15 @@ hash.js@^1.0.0, hash.js@^1.0.3: dependencies: inherits "^2.0.1" +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -1011,6 +1238,10 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + home-or-tmp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-1.0.0.tgz#4b9f1e40800c3e50c6c27f781676afcce71f3985" @@ -1025,6 +1256,14 @@ home-or-tmp@^2.0.0: os-homedir "^1.0.0" os-tmpdir "^1.0.1" +home-path@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/home-path/-/home-path-1.0.5.tgz#788b29815b12d53bacf575648476e6f9041d133f" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + http-browserify@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/http-browserify/-/http-browserify-1.7.0.tgz#33795ade72df88acfbfd36773cefeda764735b20" @@ -1032,6 +1271,14 @@ http-browserify@^1.7.0: Base64 "~0.2.0" inherits "~2.0.1" +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" @@ -1049,13 +1296,19 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" ignore@^3.2.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.7.tgz#4810ca5f1d8eca5595213a34b94f2eb4ed926bbd" + version "3.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.0.tgz#3812d22cbe9125f2c2b4915755a1b8abd745a001" imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -1075,6 +1328,10 @@ inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + inquirer@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" @@ -1107,6 +1364,16 @@ invariant@2.2.1, invariant@^2.2.0: dependencies: loose-envify "^1.0.0" +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -1158,10 +1425,32 @@ is-resolvable@^1.0.0: dependencies: tryit "^1.0.1" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + jquery-bbq@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/jquery-bbq/-/jquery-bbq-1.0.0.tgz#3500a7ab000e2ae39891fbf6f8f947012aee251c" @@ -1193,6 +1482,14 @@ js-yaml@^3.3.0, js-yaml@^3.4.6, js-yaml@^3.5.1, js-yaml@^3.8.1: argparse "^1.0.7" esprima "^3.1.1" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -1207,16 +1504,30 @@ json-schema-ref-parser@^1.4.1: js-yaml "^3.4.6" ono "^2.0.1" +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: jsonify "~0.0.0" +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -1229,6 +1540,25 @@ jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +keypress@0.1.x: + version "0.1.0" + resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -1236,6 +1566,16 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + locale-compare-polyfill@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/locale-compare-polyfill/-/locale-compare-polyfill-0.0.2.tgz#65c45ebf3dc2c79e5f47e218a3942d0d8e499eda" @@ -1280,6 +1620,10 @@ lodash.pickby@^4.0.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" +lodash@3.0.x: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.0.1.tgz#14d49028a38bc740241d11e2ecd57ec06d73c19a" + lodash@^3.10.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" @@ -1294,6 +1638,32 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0" +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +meow@^3.1.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + meteor-node-stubs@^0.2.5: version "0.2.6" resolved "https://registry.yarnpkg.com/meteor-node-stubs/-/meteor-node-stubs-0.2.6.tgz#dd43c9a8bc7793d80adc766d342410da6de909c5" @@ -1337,7 +1707,7 @@ mime-db@~1.27.0: version "1.27.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" -mime-types@^2.1.10: +mime-types@^2.1.10, mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.15" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" dependencies: @@ -1365,6 +1735,22 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minstache@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minstache/-/minstache-1.2.0.tgz#ff1cc403ac2844f68dbf18c662129be7eb0efc41" + dependencies: + commander "1.0.4" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -1375,6 +1761,10 @@ moment@^2.17.1: version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + ms@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" @@ -1391,15 +1781,62 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" +nightmare@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nightmare/-/nightmare-2.10.0.tgz#e9c5d590bb296f59685fd48218c2fbac44767b21" + dependencies: + debug "^2.2.0" + deep-defaults "^1.0.3" + defaults "^1.0.2" + electron "^1.4.4" + enqueue "^1.0.2" + function-source "^0.1.0" + jsesc "^0.5.0" + minstache "^1.2.0" + mkdirp "^0.5.1" + once "^1.3.3" + rimraf "^2.4.3" + sliced "1.0.1" + split2 "^2.0.1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +nugget@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/nugget/-/nugget-2.0.1.tgz#201095a487e1ad36081b3432fa3cada4f8d071b0" + dependencies: + debug "^2.1.3" + minimist "^1.1.0" + pretty-bytes "^1.0.2" + progress-stream "^1.1.0" + request "^2.45.0" + single-line-log "^1.1.2" + throttleit "0.0.2" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -once@^1.3.0: +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + +once@^1.3.0, once@^1.3.3: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -1450,6 +1887,12 @@ parse-asn1@^5.0.0: evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" @@ -1462,7 +1905,7 @@ path-exists@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-1.0.0.tgz#d5a8998eb71ef37a74c34eb0d9eba6e878eea081" -path-exists@^2.0.0: +path-exists@^2.0.0, path-exists@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" dependencies: @@ -1480,12 +1923,28 @@ path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + pbkdf2@^3.0.3: version "3.0.9" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" dependencies: create-hmac "^1.1.2" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -1520,6 +1979,13 @@ prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" +pretty-bytes@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84" + dependencies: + get-stdin "^4.0.1" + meow "^3.1.0" + private@^0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" @@ -1529,8 +1995,15 @@ process-nextick-args@~1.0.6: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" process@^0.11.9, process@~0.11.0: - version "0.11.9" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress-stream@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77" + dependencies: + speedometer "~0.1.2" + through2 "~0.2.3" progress@^1.1.8: version "1.1.8" @@ -1564,7 +2037,7 @@ q@^1.4.1: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@^6.1.0: +qs@^6.1.0, qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -1580,7 +2053,31 @@ randombytes@^2.0.0, randombytes@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" -readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.2.1, readable-stream@^2.2.2: +rc@^1.1.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.1, readable-stream@^2.2.2: version "2.2.9" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: @@ -1592,6 +2089,15 @@ readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.2.1, readable string_decoder "~1.0.0" util-deprecate "~1.0.1" +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@~2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" @@ -1617,9 +2123,16 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + regenerator-runtime@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" regenerator-runtime@^0.9.5: version "0.9.6" @@ -1631,6 +2144,33 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +request@^2.45.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + require-uncached@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -1655,7 +2195,7 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" -rimraf@^2.2.8: +rimraf@^2.2.8, rimraf@^2.4.3: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -1675,10 +2215,18 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + semver@~5.0.1: version "5.0.3" resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" @@ -1697,10 +2245,20 @@ shelljs@^0.7.5: interpret "^1.0.0" rechoir "^0.6.2" +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + simple-statistics@^2.2.0: version "2.5.0" resolved "https://registry.yarnpkg.com/simple-statistics/-/simple-statistics-2.5.0.tgz#7cd77b04288402f17fe21fd2b63c5e1a51ef3f51" +single-line-log@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/single-line-log/-/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364" + dependencies: + string-width "^1.0.1" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -1709,9 +2267,23 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +sliced@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/sliced/-/sliced-0.0.5.tgz#5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f" + +sliced@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + source-map-support@^0.4.2: - version "0.4.14" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" dependencies: source-map "^0.5.6" @@ -1719,10 +2291,49 @@ source-map@^0.5.0, source-map@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +speedometer@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d" + +split2@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" + dependencies: + through2 "^2.0.2" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" +sshpk@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" @@ -1759,20 +2370,43 @@ string_decoder@~1.0.0: dependencies: buffer-shims "~1.0.0" +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +sumchecker@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-1.3.1.tgz#79bb3b4456dd04f18ebdbc0d703a1d1daec5105d" + dependencies: + debug "^2.2.0" + es6-promise "^4.0.5" + superagent@^2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/superagent/-/superagent-2.3.0.tgz#703529a0714e57e123959ddefbce193b2e50d115" @@ -1839,6 +2473,10 @@ text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" +throttleit@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" + through2@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" @@ -1846,6 +2484,20 @@ through2@2.0.1: readable-stream "~2.0.0" xtend "~4.0.0" +through2@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f" + dependencies: + readable-stream "~1.1.9" + xtend "~2.1.1" + "through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -1865,8 +2517,18 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" to-fast-properties@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" trim-right@^1.0.1: version "1.0.1" @@ -1880,6 +2542,16 @@ tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -1921,10 +2593,27 @@ util@0.10.3, util@^0.10.3: dependencies: inherits "2.0.1" +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + validator@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/validator/-/validator-6.3.0.tgz#47ce23ed8d4eaddfa9d4b8ef0071b6cf1078d7c8" +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" @@ -1945,10 +2634,22 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -xtend@^4.0.0, xtend@~4.0.0: +xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + dependencies: + object-keys "~0.4.0" + +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" + z-schema@^3.16.1: version "3.18.2" resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.2.tgz#e422196b5efe60b46adef3c3f2aef2deaa911161" From 240526c4dd2e617e684afbef728041f674321ce3 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Fri, 21 Apr 2017 07:05:08 +0300 Subject: [PATCH 28/32] Test Branding rendering --- branding/client/branding.tests.js | 30 ++++++++++++++---------- branding/collection/factory.js | 39 +++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 branding/collection/factory.js diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index 676a133e04..52fb54eb40 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -6,16 +6,20 @@ https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence /* eslint-env mocha */ /* eslint-disable func-names, prefer-arrow-callback */ -// Meteor imports +// Meteor packages imports import { Template } from 'meteor/templating'; -// import { $ } from 'meteor/jquery'; +import { $ } from 'meteor/jquery'; + +// Collection imports +import Branding from '/branding/collection'; // Meteor contributed packages imports +import { Factory } from 'meteor/dburles:factory'; import { FlowRouter } from 'meteor/kadira:flow-router'; import { chai } from 'meteor/practicalmeteor:chai'; // APINF imports -// import withRenderedTemplate from '/tests/utils/test-helpers.js'; +import withRenderedTemplate from '/tests/utils/test-helpers.js'; FlowRouter.route('/', { name: 'hack route for tests', @@ -31,15 +35,17 @@ describe('Branding', function () { Template.deregisterHelper('_'); }); - it('makes sure mocha is working', function () { - chai.assert.equal(1 + 2, 3); - }); - - describe('main template', function () { - // Instantiate a Branding template - // checks if all fields are there - it('makes sure mocha is working mult', function () { - chai.assert.equal(1 * 2, 2); + describe('rendering when creating a new Branding', function () { + it('should show expected fields', function () { + // Instantiate a Branding model + const branding = Factory.build('branding'); + const data = { + // eslint-disable-next-line no-underscore-dangle + branding: Branding._transform(branding), + }; + withRenderedTemplate('branding', data, (el) => { + chai.assert.equal($(el).find('.siteTitle').val(), branding.siteTitle); + }); }); }); diff --git a/branding/collection/factory.js b/branding/collection/factory.js new file mode 100644 index 0000000000..071438fe4b --- /dev/null +++ b/branding/collection/factory.js @@ -0,0 +1,39 @@ +/* Copyright 2017 Apinf Oy +This file is covered by the EUPL license. +You may obtain a copy of the licence at +https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ + +// Meteor packages imports +import { Factory } from 'meteor/dburles:factory'; + +// Npm packages imports +import _ from 'lodash'; +import faker from 'faker'; + +// Collection imports +import Branding from './'; + +// Define branding factory for tests and seeds +// Make sure it has the same fields as the Schema. +Factory.define('branding', Branding, { + projectLogoFileId: () => { return 'projectLogoFileId'; }, + coverPhotoFileId: () => { return 'coverPhotoFileId'; }, + colors: () => {}, + 'colors.primary': () => { return faker.internet.color(); }, + 'colors.primaryText': () => { return faker.commerce.color(); }, + 'colors.coverPhotoOverlay': () => { return faker.internet.color(); }, + 'colors.overlayTransparency': () => { return _.random(0, 100); }, + siteTitle: () => { return faker.company.companyName(); }, + siteSlogan: () => { return faker.company.catchPhrase(); }, + siteFooter: () => { return faker.company.bs(); }, + privacyPolicy: () => { return faker.lorem.sentences(5); }, + termsOfUse: () => { return faker.lorem.paragraphs(3); }, + socialMedia: () => { + return [ + { + name: ['Facebook', 'Twitter', 'Github'][_.random(0, 2)], + url: faker.internet.url(), + }, + ]; + }, +}); From 993ac9153a1673829ae17dd622814c9ec5875678 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Fri, 28 Apr 2017 09:18:25 +0300 Subject: [PATCH 29/32] Remove faker --- branding/collection/factory.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/branding/collection/factory.js b/branding/collection/factory.js index 071438fe4b..a8dfe3bd2c 100644 --- a/branding/collection/factory.js +++ b/branding/collection/factory.js @@ -8,7 +8,6 @@ import { Factory } from 'meteor/dburles:factory'; // Npm packages imports import _ from 'lodash'; -import faker from 'faker'; // Collection imports import Branding from './'; @@ -19,20 +18,20 @@ Factory.define('branding', Branding, { projectLogoFileId: () => { return 'projectLogoFileId'; }, coverPhotoFileId: () => { return 'coverPhotoFileId'; }, colors: () => {}, - 'colors.primary': () => { return faker.internet.color(); }, - 'colors.primaryText': () => { return faker.commerce.color(); }, - 'colors.coverPhotoOverlay': () => { return faker.internet.color(); }, + 'colors.primary': () => { return '#fff'; }, + 'colors.primaryText': () => { return 'black'; }, + 'colors.coverPhotoOverlay': () => { return 'blue'; }, 'colors.overlayTransparency': () => { return _.random(0, 100); }, - siteTitle: () => { return faker.company.companyName(); }, - siteSlogan: () => { return faker.company.catchPhrase(); }, - siteFooter: () => { return faker.company.bs(); }, - privacyPolicy: () => { return faker.lorem.sentences(5); }, - termsOfUse: () => { return faker.lorem.paragraphs(3); }, + siteTitle: () => { return 'Site Title'; }, + siteSlogan: () => { return 'Site slogan - catch phrase'; }, + siteFooter: () => { return 'Copyright Site Title'; }, + privacyPolicy: () => { return 'Privacy Policy'; }, + termsOfUse: () => { return 'Terms of Use'; }, socialMedia: () => { return [ { name: ['Facebook', 'Twitter', 'Github'][_.random(0, 2)], - url: faker.internet.url(), + url: 'https://social.network/site', }, ]; }, From 2a58e6d857c866cd05c5c435002539ebe95eb965 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 2 May 2017 17:58:21 -0300 Subject: [PATCH 30/32] meteor add practicalmeteor:mocha --- .meteor/packages | 1 + .meteor/versions | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.meteor/packages b/.meteor/packages index 0611a5137d..40bc3e2abb 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -92,3 +92,4 @@ dispatch:mocha practicalmeteor:chai dispatch:mocha-browser dburles:factory +practicalmeteor:mocha diff --git a/.meteor/versions b/.meteor/versions index 0bdc8448c5..6085c25615 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -122,7 +122,10 @@ percolate:migrations@0.9.8 percolate:synced-cron@1.3.2 pfafman:filesaver@1.3.2 practicalmeteor:chai@2.1.0_1 +practicalmeteor:loglevel@1.2.0_2 +practicalmeteor:mocha@2.4.5_6 practicalmeteor:mocha-core@1.0.1 +practicalmeteor:sinon@1.14.1_2 promise@0.8.8 raix:eventemitter@0.1.3 raix:handlebar-helpers@0.2.5 @@ -158,6 +161,7 @@ templating-compiler@1.3.0 templating-runtime@1.3.0 templating-tools@1.1.0 tmeasday:publish-counts@0.8.0 +tmeasday:test-reporter-helpers@0.2.1 todda00:friendly-slugs@0.6.0 tracker@1.1.2 trever:quill@0.0.5 From f71d722259bfb0326ef31fc27807d1382af54868 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Tue, 2 May 2017 19:38:58 -0300 Subject: [PATCH 31/32] meteor remove dispatch:mocha-browser --- .meteor/packages | 1 - .meteor/versions | 1 - package.json | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index 40bc3e2abb..4db6e6838a 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -90,6 +90,5 @@ softwarerero:accounts-t9n raix:rssfeed dispatch:mocha practicalmeteor:chai -dispatch:mocha-browser dburles:factory practicalmeteor:mocha diff --git a/.meteor/versions b/.meteor/versions index 6085c25615..bc89bc7a53 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -54,7 +54,6 @@ deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 diff-sequence@1.0.7 dispatch:mocha@0.3.0 -dispatch:mocha-browser@0.0.4 ecmascript@0.6.3 ecmascript-runtime@0.3.15 ejson@1.0.13 diff --git a/package.json b/package.json index d8da7036ec..81e4dfdca6 100644 --- a/package.json +++ b/package.json @@ -49,12 +49,10 @@ "lintfix": "eslint --fix .", "pretest": "yarn run lint --silent", "start": "meteor run", - "test-app-chrome": "meteor test --full-app --once --driver-package dispatch:mocha-browser", + "test-app-chrome": "meteor test --full-app --once --driver-package practicalmeteor:mocha", "test-app-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --full-app --once --driver-package dispatch:mocha", - "test-app-watch": "TEST_WATCH=1 meteor test --full-app --driver-package dispatch:mocha-browser", - "test-chrome": "meteor test --once --driver-package dispatch:mocha-browser", + "test-chrome": "meteor test --driver-package practicalmeteor:mocha", "test-nightmare": "TEST_BROWSER_DRIVER=nightmare meteor test --once --driver-package dispatch:mocha", - "test-watch": "TEST_WATCH=1 meteor test --driver-package dispatch:mocha-browser", "test": "yarn run test-nightmare" }, "repository": { From 737f0cffd3830a560f93794bcdb0807a4b387233 Mon Sep 17 00:00:00 2001 From: Mauricio Vieira Date: Wed, 3 May 2017 10:53:52 -0300 Subject: [PATCH 32/32] WIP --- branding/client/branding.tests.js | 1 + tests/utils/test-helpers.js | 1 + 2 files changed, 2 insertions(+) diff --git a/branding/client/branding.tests.js b/branding/client/branding.tests.js index 52fb54eb40..7dc7210e5f 100644 --- a/branding/client/branding.tests.js +++ b/branding/client/branding.tests.js @@ -45,6 +45,7 @@ describe('Branding', function () { }; withRenderedTemplate('branding', data, (el) => { chai.assert.equal($(el).find('.siteTitle').val(), branding.siteTitle); + chai.expect(sAlert.collection.findOne().message).to.equal('Test warning message...'); }); }); }); diff --git a/tests/utils/test-helpers.js b/tests/utils/test-helpers.js index 1ccbe07196..9740344ef6 100644 --- a/tests/utils/test-helpers.js +++ b/tests/utils/test-helpers.js @@ -26,6 +26,7 @@ function withDiv (callback) { export default function withRenderedTemplate (template, data, callback) { withDiv((el) => { const ourTemplate = _.isString(template) ? Template[template] : template; + console.log(ourTemplate); Blaze.renderWithData(ourTemplate, data, el); Tracker.flush(); callback(el);